Skip to content

Commit

Permalink
Beta (#341)
Browse files Browse the repository at this point in the history
* Included chart components
  • Loading branch information
Ramakrishnan24689 authored May 21, 2024
1 parent 0b03d06 commit 72ec467
Show file tree
Hide file tree
Showing 217 changed files with 208,149 additions and 307,257 deletions.
250 changes: 192 additions & 58 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ jobs:

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: "12.x"
node-version: "18.x"

- run: npm ci
working-directory: "./build-scripts"
- name: Clear npm cache
run: npm cache clean --force

- name: Install Dependencies in build-scripts
run: |
cd ./build-scripts
npm install
npm ci
- name: Version Stamp Code Components
uses: actions/github-script@v2
Expand All @@ -40,13 +47,17 @@ jobs:
`${process.env.GITHUB_WORKSPACE}/CommandBar/CommandBar`,
`${process.env.GITHUB_WORKSPACE}/ContextMenu/ContextMenu`,
`${process.env.GITHUB_WORKSPACE}/DetailsList/DetailsList`,
`${process.env.GITHUB_WORKSPACE}/DonutChart/DonutChart`,
`${process.env.GITHUB_WORKSPACE}/Elevation/Elevation`,
`${process.env.GITHUB_WORKSPACE}/Facepile/Facepile`,
`${process.env.GITHUB_WORKSPACE}/GaugeChart/GaugeChart`,
`${process.env.GITHUB_WORKSPACE}/HorizontalBarChart/HorizontalBarChart`,
`${process.env.GITHUB_WORKSPACE}/Icon/Icon`,
`${process.env.GITHUB_WORKSPACE}/KeyboardShortcuts/KeyboardShortcuts`,
`${process.env.GITHUB_WORKSPACE}/MaskedTextField/MaskedTextField`,
`${process.env.GITHUB_WORKSPACE}/Nav/Nav`,
`${process.env.GITHUB_WORKSPACE}/Persona/Persona`,
`${process.env.GITHUB_WORKSPACE}/PeoplePicker/PeoplePicker`,
`${process.env.GITHUB_WORKSPACE}/Persona/Persona`,
`${process.env.GITHUB_WORKSPACE}/Picker/Picker`,
`${process.env.GITHUB_WORKSPACE}/Pivot/Pivot`,
`${process.env.GITHUB_WORKSPACE}/ProgressIndicator/ProgressIndicator`,
Expand All @@ -55,68 +66,192 @@ jobs:
`${process.env.GITHUB_WORKSPACE}/Shimmer/Shimmer`,
`${process.env.GITHUB_WORKSPACE}/SpinButton/SpinButton`,
`${process.env.GITHUB_WORKSPACE}/Spinner/Spinner`,
`${process.env.GITHUB_WORKSPACE}/StackedBarChart/StackedBarChart`,
`${process.env.GITHUB_WORKSPACE}/SubwayNav/SubwayNav`,
`${process.env.GITHUB_WORKSPACE}/TagList/TagList`,
`${process.env.GITHUB_WORKSPACE}/ThemeGenerator/ThemeGenerator`
],
`${process.env.GITHUB_WORKSPACE}/ThemeGenerator/ThemeGenerator`
],
solutionPaths: `${process.env.GITHUB_WORKSPACE}/Solution/src/Other/Solution.xml`,
beta: false}
)
- name: Install Dependencies in AutoWidthLabel
run: |
cd ./AutoWidthLabel
npm install
npm ci
- name: Install Dependencies in Breadcrumb
run: |
cd ./Breadcrumb
npm install
npm ci
- name: Install Dependencies in Calendar
run: |
cd ./Calendar
npm install
npm ci
- name: Install Dependencies in CommandBar
run: |
cd ./CommandBar
npm install
npm ci
- name: Install Dependencies in ContextMenu
run: |
cd ./ContextMenu
npm install
npm ci
- name: Install Dependencies in DetailsList
run: |
cd ./DetailsList
npm install
npm ci
- name: Install Dependencies in DonutChart
run: |
cd ./DonutChart
npm install
npm ci
- name: Install Dependencies in Elevation
run: |
cd ./Elevation
npm install
npm ci
- name: Install Dependencies in Facepile
run: |
cd ./Facepile
npm install
npm ci
- name: Install Dependencies in GaugeChart
run: |
cd ./GaugeChart
npm install
npm ci
- name: Install Dependencies in HorizontalBarChart
run: |
cd ./HorizontalBarChart
npm install
npm ci
- name: Install Dependencies in Icon
run: |
cd ./Icon
npm install
npm ci
- name: Install Dependencies in KeyboardShortcuts
run: |
cd ./KeyboardShortcuts
npm install
npm ci
- name: Install Dependencies in MaskedTextField
run: |
cd ./MaskedTextField
npm install
npm ci
- run: npm ci
working-directory: "./AutoWidthLabel"
- run: npm ci
working-directory: "./Breadcrumb"
- run: npm ci
working-directory: "./Calendar"
- run: npm ci
working-directory: "./CommandBar"
- run: npm ci
working-directory: "./ContextMenu"
- run: npm ci
working-directory: "./DetailsList"
- run: npm ci
working-directory: "./Elevation"
- run: npm ci
working-directory: "./Facepile"
- run: npm ci
working-directory: "./Icon"
- run: npm ci
working-directory: "./KeyboardShortcuts"
- run: npm ci
working-directory: "./MaskedTextField"
- run: npm ci
working-directory: "./Nav"
- run: npm ci
working-directory: "./PeoplePicker"
- run: npm ci
working-directory: "./Persona"
- run: npm ci
working-directory: "./Picker"
- run: npm ci
working-directory: "./Pivot"
- run: npm ci
working-directory: "./ProgressIndicator"
- run: npm ci
working-directory: "./ResizableTextarea"
- run: npm ci
working-directory: "./SearchBox"
- run: npm ci
working-directory: "./Shimmer"
- run: npm ci
working-directory: "./Spinner"
- run: npm ci
working-directory: "./SpinButton"
- run: npm ci
working-directory: "./SubwayNav"
- run: npm ci
working-directory: "./TagList"
- run: npm ci
working-directory: "./ThemeGenerator"
- name: Install Dependencies in Nav
run: |
cd ./Nav
npm install
npm ci
- name: Install Dependencies in PeoplePicker
run: |
cd ./PeoplePicker
npm install
npm ci
- name: Install Dependencies in Persona
run: |
cd ./Persona
npm install
npm ci
- name: Install Dependencies in Picker
run: |
cd ./Picker
npm install
npm ci
- name: Install Dependencies in Pivot
run: |
cd ./Pivot
npm install
npm ci
- name: Install Dependencies in ProgressIndicator
run: |
cd ./ProgressIndicator
npm install
npm ci
- name: Install Dependencies in ResizableTextarea
run: |
cd ./ResizableTextarea
npm install
npm ci
- name: Install Dependencies in SearchBox
run: |
cd ./SearchBox
npm install
npm ci
- name: Install Dependencies in Shimmer
run: |
cd ./Shimmer
npm install
npm ci
- name: Install Dependencies in SpinButton
run: |
cd ./SpinButton
npm install
npm ci
- name: Install Dependencies in Spinner
run: |
cd ./Spinner
npm install
npm ci
- name: Install Dependencies in StackedBarChart
run: |
cd ./StackedBarChart
npm install
npm ci
- name: Install Dependencies in SubwayNav
run: |
cd ./SubwayNav
npm install
npm ci
- name: Install Dependencies in TagList
run: |
cd ./TagList
npm install
npm ci
- name: Install Dependencies in ThemeGenerator
run: |
cd ./ThemeGenerator
npm install
npm ci
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.x"
dotnet-version: "6.x"

- run: dotnet build -c release
working-directory: "./Solution"
Expand Down Expand Up @@ -153,4 +288,3 @@ jobs:
asset_path: Solution/bin/Release/Solution_managed.zip
asset_name: PowerCATCodeComponents_managed_${{ env.MajorVersion }}_${{ env.MinorVersion }}_0_${{ env.BuildVersion }}.zip
asset_content_type: application/zip

23 changes: 13 additions & 10 deletions .github/workflows/pr_validate_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ jobs:
matrix:
component-directory:
- "./AutoWidthLabel"
- "./Breadcrumb"
- "./Calendar"
- "./CommandBar"
- "./ContextMenu"
- "./DetailsList"
- "./Elevation"
- "./Breadcrumb"
- "./Calendar"
- "./CommandBar"
- "./ContextMenu"
- "./DetailsList"
- "./DonutChart"
- "./Elevation"
- "./Facepile"
- "./GaugeChart"
- "./HorizontalBarChart"
- "./Icon"
- "./KeyboardShortcuts"
- "./Nav"
Expand All @@ -30,12 +33,13 @@ jobs:
- "./ProgressIndicator"
- "./ResizableTextarea"
- "./SearchBox"
- "./Shimmer"
- "./SpinButton"
- "./Spinner"
- "./Shimmer"
- "./StackedBarChart"
- "./SubwayNav"
- "./TagList"

- "./ThemeGenerator"

defaults:
run:
Expand All @@ -45,9 +49,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '18.x'
- name: Install dependencies
run: npm ci
- run: npm run build
- run: npm test

30 changes: 30 additions & 0 deletions AutoWidthLabel/AutoWidthLabel/__mocks__/mock-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class MockContext<T> implements ComponentFramework.Context<T> {
getClient: jest.fn(),
getFormFactor: jest.fn(),
isOffline: jest.fn(),
isNetworkAvailable: jest.fn(),
};

// Canvas apps currently assigns a positive tab-index
Expand All @@ -37,6 +38,7 @@ export class MockContext<T> implements ComponentFramework.Context<T> {
webAPI: ComponentFramework.WebApi;
parameters: T;
updatedProperties: string[] = [];
events: IEventBag;
}

export class MockState implements ComponentFramework.Dictionary {}
Expand Down Expand Up @@ -78,6 +80,19 @@ export class MockEnumProperty<T> implements ComponentFramework.PropertyTypes.Enu
raw: T;
}

export class MockTwoOptionsProperty implements ComponentFramework.PropertyTypes.TwoOptionsProperty {
constructor(raw?: boolean) {
if (raw) this.raw = raw;
}
raw: boolean;
attributes?: ComponentFramework.PropertyHelper.FieldPropertyMetadata.TwoOptionMetadata | undefined;
error: boolean;
errorMessage: string;
formatted?: string | undefined;
security?: ComponentFramework.PropertyHelper.SecurityValues | undefined;
type: string;
}

export class MockDecimalNumberProperty implements ComponentFramework.PropertyTypes.DecimalNumberProperty {
attributes?: ComponentFramework.PropertyHelper.FieldPropertyMetadata.DecimalNumberMetadata | undefined;
raw: number | null;
Expand All @@ -87,3 +102,18 @@ export class MockDecimalNumberProperty implements ComponentFramework.PropertyTyp
security?: ComponentFramework.PropertyHelper.SecurityValues | undefined;
type: string;
}

export class MockDateTimeProperty implements ComponentFramework.PropertyTypes.DateTimeProperty {
constructor(raw?: Date) {
if (raw) this.raw = raw;
}
raw: Date;
attributes?: ComponentFramework.PropertyHelper.FieldPropertyMetadata.DateTimeMetadata | undefined;
error: boolean;
errorMessage: string;
formatted?: string | undefined;
security?: ComponentFramework.PropertyHelper.SecurityValues | undefined;
type: string;
}

export declare type IEventBag = Record<string, () => void>;
Loading

0 comments on commit 72ec467

Please sign in to comment.