Skip to content

Commit 053a2e8

Browse files
Added PowerCAT-Code-Components
0 parents  commit 053a2e8

File tree

410 files changed

+301507
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

410 files changed

+301507
-0
lines changed

.github/workflows/create-release.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Create Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
build:
12+
13+
runs-on: windows-latest
14+
env:
15+
MajorVersion: 0
16+
MinorVersion: 0
17+
BuildVersion: ${{ github.run_number }}
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: actions/setup-node@v1
22+
with:
23+
node-version: '12.x'
24+
25+
- run: npm ci
26+
working-directory: "./build-scripts"
27+
28+
- name: Version Stamp Code Components
29+
uses: actions/github-script@v2
30+
with:
31+
script: |
32+
const version = require(`${process.env.GITHUB_WORKSPACE}/build-scripts/version-stamp.js`)
33+
version({
34+
majorVersion: ${{ env.MajorVersion }},
35+
minorVersion: ${{ env.MinorVersion }},
36+
buildVersion: ${{ env.BuildVersion }},
37+
manifestsPaths: [
38+
`${process.env.GITHUB_WORKSPACE}/AutoWidthLabel/AutoWidthLabel`,
39+
`${process.env.GITHUB_WORKSPACE}/Breadcrumb/Breadcrumb`,
40+
`${process.env.GITHUB_WORKSPACE}/CommandBar/CommandBar`,
41+
`${process.env.GITHUB_WORKSPACE}/ContextMenu/ContextMenu`,
42+
`${process.env.GITHUB_WORKSPACE}/DetailsList/DetailsList`,
43+
`${process.env.GITHUB_WORKSPACE}/Elevation/Elevation`,
44+
`${process.env.GITHUB_WORKSPACE}/Icon/Icon`,
45+
`${process.env.GITHUB_WORKSPACE}/KeyboardShortcuts/KeyboardShortcuts`,
46+
`${process.env.GITHUB_WORKSPACE}/Nav/Nav`,
47+
`${process.env.GITHUB_WORKSPACE}/Picker/Picker`,
48+
`${process.env.GITHUB_WORKSPACE}/Pivot/Pivot`,
49+
`${process.env.GITHUB_WORKSPACE}/ResizableTextarea/ResizableTextarea`,
50+
`${process.env.GITHUB_WORKSPACE}/TagList/TagList`,
51+
`${process.env.GITHUB_WORKSPACE}/ThemeGenerator/ThemeGenerator`
52+
],
53+
solutionPaths: `${process.env.GITHUB_WORKSPACE}/Solution/src/Other/Solution.xml`}
54+
)
55+
56+
- run: npm ci
57+
working-directory: "./AutoWidthLabel"
58+
- run: npm ci
59+
working-directory: "./Breadcrumb"
60+
- run: npm ci
61+
working-directory: "./CommandBar"
62+
- run: npm ci
63+
working-directory: "./ContextMenu"
64+
- run: npm ci
65+
working-directory: "./DetailsList"
66+
- run: npm ci
67+
working-directory: "./Elevation"
68+
- run: npm ci
69+
working-directory: "./Icon"
70+
- run: npm ci
71+
working-directory: "./KeyboardShortcuts"
72+
- run: npm ci
73+
working-directory: "./Nav"
74+
- run: npm ci
75+
working-directory: "./Picker"
76+
- run: npm ci
77+
working-directory: "./Pivot"
78+
- run: npm ci
79+
working-directory: "./ResizableTextarea"
80+
- run: npm ci
81+
working-directory: "./TagList"
82+
- run: npm ci
83+
working-directory: "./ThemeGenerator"
84+
85+
- uses: actions/setup-dotnet@v1
86+
with:
87+
dotnet-version: '5.x'
88+
89+
- run: dotnet build -c release
90+
working-directory: "./Solution"
91+
92+
- name: Create Release
93+
id: create_release
94+
uses: actions/create-release@v1
95+
env:
96+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
with:
98+
tag_name: v${{ env.MajorVersion }}.${{ env.MinorVersion }}.${{ env.BuildVersion }}
99+
release_name: v${{ env.MajorVersion }}.${{ env.MinorVersion }}.${{ env.BuildVersion }}
100+
draft: true
101+
prerelease: true
102+
103+
- name: Upload Release Asset
104+
id: upload-release-asset
105+
uses: actions/upload-release-asset@v1
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
with:
109+
upload_url: ${{ steps.create_release.outputs.upload_url }}
110+
asset_path: Solution/bin/Release/Solution.zip
111+
asset_name: PowerCATCodeComponents_unmanaged_${{ env.MajorVersion }}_${{ env.MinorVersion }}_0_${{ env.BuildVersion }}.zip
112+
asset_content_type: application/zip
113+

.github/workflows/pr_validate_all.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Validate PR
2+
on: pull_request
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true
7+
8+
jobs:
9+
build:
10+
name: Validate
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
component-directory:
15+
- "./AutoWidthLabel"
16+
- "./Breadcrumb"
17+
- "./CommandBar"
18+
- "./ContextMenu"
19+
- "./DetailsList"
20+
- "./Elevation"
21+
- "./Icon"
22+
- "./KeyboardShortcuts"
23+
- "./Nav"
24+
- "./Picker"
25+
- "./Pivot"
26+
- "./ResizableTextarea"
27+
- "./TagList"
28+
29+
30+
defaults:
31+
run:
32+
working-directory: ${{ matrix.component-directory }}
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
- uses: actions/setup-node@v1
37+
with:
38+
node-version: '12.x'
39+
- name: Install dependencies
40+
run: npm ci
41+
- run: npm run build
42+
- run: npm test
43+

AutoWidthLabel/.eslintrc.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"env": {
4+
"browser": true,
5+
"commonjs": true,
6+
"es6": true,
7+
"jest": true,
8+
"jasmine": true
9+
},
10+
"extends": [
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:prettier/recommended",
13+
"prettier",
14+
"plugin:sonarjs/recommended"
15+
],
16+
"parserOptions": {
17+
"project": "./tsconfig.json"
18+
},
19+
"plugins": [
20+
"@typescript-eslint",
21+
"prettier",
22+
"sonarjs"
23+
],
24+
"rules": {
25+
"prettier/prettier": "error"
26+
},
27+
"overrides": [
28+
{
29+
"files": [
30+
"*.ts"
31+
],
32+
"rules": {
33+
"camelcase": [
34+
2,
35+
{
36+
"properties": "never"
37+
}
38+
]
39+
}
40+
}
41+
],
42+
"ignorePatterns": [
43+
"**/generated/**"
44+
]
45+
}

AutoWidthLabel/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# generated directory
7+
**/generated
8+
9+
# output directory
10+
/out
11+
/coverage
12+
13+
# msbuild output directories
14+
/bin
15+
/obj

AutoWidthLabel/.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": false,
5+
"printWidth": 120,
6+
"tabWidth": 2,
7+
"endOfLine":"auto"
8+
}

AutoWidthLabel/.vscode/launch.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"name": "vscode-jest-tests",
10+
"request": "launch",
11+
"args": ["${fileBasename}", "--runInBand", "--code-coverage=false" ],
12+
13+
"cwd": "${workspaceFolder}",
14+
"console": "integratedTerminal",
15+
"internalConsoleOptions": "neverOpen",
16+
"disableOptimisticBPs": false,
17+
"smartStep": true,
18+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
19+
"skipFiles": ["node_modules/**/*.js", "<node_internals>/**/*.js", "async_hooks.js", "inspector_async_hook.js"]
20+
}
21+
]
22+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<manifest>
3+
<!--
4+
Canvas Apps: ✔
5+
Custom Pages: ✔
6+
Model-driven Apps: -
7+
Portals: -
8+
-->
9+
<control namespace="PowerCAT" constructor="AutoWidthLabel" version="0.0.1" display-name-key="AutoWidthLabel" description-key="AutoWidthLabel_Desc" control-type="standard">
10+
<property name="Text" display-name-key="Text" description-key="Text" of-type="SingleLine.Text" usage="bound" required="true" default-value="Text" />
11+
12+
<!-- Font Properties -->
13+
<property name="FontName" display-name-key="FontName" of-type="SingleLine.Text" usage="input" default-value="Segoe UI" />
14+
<property name="FontSize" display-name-key="FontSize" of-type="Decimal" usage="input" default-value="10.5"/>
15+
<property name="FontSizeUnits" display-name-key="FontSizeUnits" of-type="Enum" usage="input" default-value="0">
16+
<value name="Pt" display-name-key="Pt">0</value>
17+
<value name="Px" display-name-key="Px">1</value>
18+
</property>
19+
<property name="FontColor" display-name-key="FontColor" of-type="SingleLine.Text" usage="input" />
20+
<property name="FontWeight" display-name-key="FontWeight" of-type="SingleLine.Text" usage="input" />
21+
<property name="DisabledFontColor" display-name-key="DisabledFontColor" of-type="SingleLine.Text" usage="input" />
22+
<property name="DisabledFontWeight" display-name-key="DisabledFontWeight" of-type="SingleLine.Text" usage="input" />
23+
<property name="FocusFontColor" display-name-key="FocusFontColor" of-type="SingleLine.Text" usage="input" />
24+
<property name="FocusFontWeight" display-name-key="FocusFontWeight" of-type="SingleLine.Text" usage="input" />
25+
<property name="HoverFontColor" display-name-key="HoverFontColor" of-type="SingleLine.Text" usage="input" />
26+
<property name="HoverFontWeight" display-name-key="HoverFontWeight" of-type="SingleLine.Text" usage="input" />
27+
28+
<!-- Fill Properties -->
29+
<property name="FillColor" display-name-key="FillColor" of-type="SingleLine.Text" usage="input" />
30+
<property name="DisabledFillColor" display-name-key="DisabledFillColor" of-type="SingleLine.Text" usage="input" />
31+
<property name="FocusFillColor" display-name-key="FocusFillColor" of-type="SingleLine.Text" usage="input" />
32+
<property name="HoverFillColor" display-name-key="HoverFillColor" of-type="SingleLine.Text" usage="input" />
33+
34+
<!-- Border Styles -->
35+
<property name="BorderColor" display-name-key="BorderColor" of-type="SingleLine.Text" usage="input" />
36+
<property name="BorderThickness" display-name-key="BorderThickness" of-type="Whole.None" usage="input" default-value="0" />
37+
<property name="BorderRadius" display-name-key="BorderRadius" of-type="Whole.None" usage="input" />
38+
<property name="DisabledBorderColor" display-name-key="DisabledBorderColor" of-type="SingleLine.Text" usage="input" />
39+
<property name="FocusBorderColor" display-name-key="FocusBorderColor" of-type="SingleLine.Text" usage="input" />
40+
<property name="FocusBorderThickness" display-name-key="FocusBorderThickness" of-type="Whole.None" usage="input" />
41+
<property name="HoverBorderColor" display-name-key="HoverBorderColor" of-type="SingleLine.Text" usage="input" />
42+
<property name="HoverBorderThickness" display-name-key="HoverBorderThickness" of-type="Whole.None" usage="input" />
43+
44+
<!-- Style Properties -->
45+
<property name="PaddingLeft" display-name-key="PaddingLeft" description-key="PaddingLeft_Desc" of-type="Whole.None" usage="input" default-value="0" />
46+
<property name="PaddingRight" display-name-key="PaddingRight" description-key="PaddingRight_Desc" of-type="Whole.None" usage="input" default-value="0" />
47+
<property name="PaddingTop" display-name-key="PaddingTop" description-key="PaddingTop_Desc" of-type="Whole.None" usage="input" default-value="0" />
48+
<property name="PaddingBottom" display-name-key="PaddingBottom" description-key="PaddingBottom_Desc" of-type="Whole.None" usage="input" default-value="0" />
49+
50+
<property name="AutoWidth" display-name-key="AutoWidth" description-key="Auto Width" of-type="Whole.None" usage="output" required="true" />
51+
52+
<resources>
53+
<code path="index.ts" order="1"/>
54+
<resx path="strings/AutoWidthLabel.1033.resx" version="1.0.0" />
55+
<css path="css/AutoWidthLabel.css" order="1" />
56+
</resources>
57+
</control>
58+
</manifest>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const enum FontSizeUnits {
2+
Pt = "0",
3+
Px = "1",
4+
}

0 commit comments

Comments
 (0)