@talxis/base-controls 1.2406.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +1 -0
- package/.eslintrc +117 -0
- package/.npmgitignore +9 -0
- package/.vscode/settings.json +3 -0
- package/.yalcignore +2 -0
- package/README.md +18 -0
- package/azure-pipelines.yml +44 -0
- package/dist/Lookup-eb1505b3.js +1 -0
- package/dist/NumeralPCF-a609b7be.js +1 -0
- package/dist/components/DateTime/DateTime.d.ts +3 -0
- package/dist/components/DateTime/DateTime.js +1 -0
- package/dist/components/DateTime/components/Calendar.d.ts +12 -0
- package/dist/components/DateTime/hooks/useDateTime.d.ts +6 -0
- package/dist/components/DateTime/index.d.ts +2 -0
- package/dist/components/DateTime/interfaces.d.ts +31 -0
- package/dist/components/DateTime/styles.d.ts +34 -0
- package/dist/components/DateTime/translations.d.ts +3 -0
- package/dist/components/Decimal/Decimal.d.ts +3 -0
- package/dist/components/Decimal/Decimal.js +1 -0
- package/dist/components/Decimal/index.d.ts +2 -0
- package/dist/components/Decimal/interfaces.d.ts +13 -0
- package/dist/components/Duration/Duration.d.ts +3 -0
- package/dist/components/Duration/Duration.js +1 -0
- package/dist/components/Duration/index.d.ts +2 -0
- package/dist/components/Duration/interfaces.d.ts +31 -0
- package/dist/components/Duration/translations.d.ts +2 -0
- package/dist/components/Grid/Grid.d.ts +5 -0
- package/dist/components/Grid/Grid.js +10 -0
- package/dist/components/Grid/core/components/AgGrid/AgGrid.d.ts +2 -0
- package/dist/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/EmptyRecords.d.ts +2 -0
- package/dist/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/styles.d.ts +18 -0
- package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/LoadingOverlay.d.ts +2 -0
- package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.d.ts +12 -0
- package/dist/components/Grid/core/components/AgGrid/model/AgGrid.d.ts +13 -0
- package/dist/components/Grid/core/components/AgGrid/styles.d.ts +69 -0
- package/dist/components/Grid/core/components/Cell/Commands/Commands.d.ts +7 -0
- package/dist/components/Grid/core/components/Cell/Commands/Icon.d.ts +7 -0
- package/dist/components/Grid/core/components/Cell/Commands/styles.d.ts +19 -0
- package/dist/components/Grid/core/components/Cell/Commands/useCommands.d.ts +5 -0
- package/dist/components/Grid/core/components/Cell/EditableCell/EditableCell.d.ts +10 -0
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyCell.d.ts +11 -0
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.d.ts +10 -0
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/styles.d.ts +22 -0
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/styles.d.ts +47 -0
- package/dist/components/Grid/core/components/ColumnHeader/ColumnHeader.d.ts +6 -0
- package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/GlobalCheckbox.d.ts +2 -0
- package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/styles.d.ts +13 -0
- package/dist/components/Grid/core/components/ColumnHeader/styles.d.ts +37 -0
- package/dist/components/Grid/core/components/Component/Component.d.ts +11 -0
- package/dist/components/Grid/core/components/Component/controller/useComponentController.d.ts +9 -0
- package/dist/components/Grid/core/components/Component/model/Component.d.ts +10 -0
- package/dist/components/Grid/core/components/Dialog/Constants.d.ts +2 -0
- package/dist/components/Grid/core/components/Dialog/Styles.d.ts +2 -0
- package/dist/components/Grid/core/components/Dialog/index.d.ts +4 -0
- package/dist/components/Grid/core/components/Save/Save.d.ts +2 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.d.ts +3 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/RecordGrids.d.ts +7 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/styles.d.ts +48 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/styles.d.ts +31 -0
- package/dist/components/Grid/core/components/Save/hooks/useSave.d.ts +12 -0
- package/dist/components/Grid/core/components/Save/styles.d.ts +37 -0
- package/dist/components/Grid/core/controllers/useGridController.d.ts +9 -0
- package/dist/components/Grid/core/enums/ConditionOperator.d.ts +46 -0
- package/dist/components/Grid/core/enums/DataType.d.ts +24 -0
- package/dist/components/Grid/core/hooks/useGridInstance.d.ts +2 -0
- package/dist/components/Grid/core/hooks/useRefreshCallback.d.ts +2 -0
- package/dist/components/Grid/core/hooks/useRerender.d.ts +1 -0
- package/dist/components/Grid/core/interfaces/IGridColumn.d.ts +18 -0
- package/dist/components/Grid/core/interfaces/IGridContext.d.ts +4 -0
- package/dist/components/Grid/core/model/Grid.d.ts +51 -0
- package/dist/components/Grid/core/model/GridDependency.d.ts +13 -0
- package/dist/components/Grid/core/model/Metadata.d.ts +7 -0
- package/dist/components/Grid/core/services/RecordUpdateService/controllers/useRecordUpdateServiceController.d.ts +14 -0
- package/dist/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.d.ts +30 -0
- package/dist/components/Grid/filtering/components/FilterCallout/FilterCallout.d.ts +8 -0
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionOperator/ConditionOperator.d.ts +7 -0
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValue.d.ts +7 -0
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.d.ts +30 -0
- package/dist/components/Grid/filtering/components/FilterCallout/styles.d.ts +35 -0
- package/dist/components/Grid/filtering/constants.d.ts +5 -0
- package/dist/components/Grid/filtering/controller/useColumnFilterConditionController.d.ts +19 -0
- package/dist/components/Grid/filtering/model/Condition.d.ts +47 -0
- package/dist/components/Grid/filtering/model/Filtering.d.ts +11 -0
- package/dist/components/Grid/filtering/utils/FilteringUtilts.d.ts +34 -0
- package/dist/components/Grid/interfaces.d.ts +254 -0
- package/dist/components/Grid/paging/components/Paging/Paging.d.ts +2 -0
- package/dist/components/Grid/paging/components/Paging/styles.d.ts +35 -0
- package/dist/components/Grid/paging/controllers/usePagingController.d.ts +16 -0
- package/dist/components/Grid/paging/model/Paging.d.ts +15 -0
- package/dist/components/Grid/selection/controllers/useSelectionController.d.ts +11 -0
- package/dist/components/Grid/selection/model/Selection.d.ts +13 -0
- package/dist/components/Grid/sorting/Sorting.d.ts +9 -0
- package/dist/components/Grid/sorting/components/SortingContextualMenu/SortingContextualMenu.d.ts +8 -0
- package/dist/components/Grid/sorting/components/SortingContextualMenu/styles.d.ts +9 -0
- package/dist/components/Grid/sorting/controllers/useColumnSortingController.d.ts +8 -0
- package/dist/components/Grid/translations.d.ts +2 -0
- package/dist/components/Grid/validation/controllers/useRecordValidationController.d.ts +8 -0
- package/dist/components/Grid/validation/model/ColumnValidation.d.ts +11 -0
- package/dist/components/Lookup/Lookup.d.ts +3 -0
- package/dist/components/Lookup/Lookup.js +1 -0
- package/dist/components/Lookup/components/RecordCreator.d.ts +10 -0
- package/dist/components/Lookup/components/TargetSelector.d.ts +10 -0
- package/dist/components/Lookup/hooks/useFetchXml.d.ts +3 -0
- package/dist/components/Lookup/hooks/useLoadedEntities.d.ts +6 -0
- package/dist/components/Lookup/hooks/useLookup.d.ts +8 -0
- package/dist/components/Lookup/index.d.ts +2 -0
- package/dist/components/Lookup/interfaces.d.ts +52 -0
- package/dist/components/Lookup/lib.d.ts +1164 -0
- package/dist/components/Lookup/styles.d.ts +90 -0
- package/dist/components/Lookup/translations.d.ts +2 -0
- package/dist/components/MultiSelectOptionSet/MultiSelectOptionSet.d.ts +3 -0
- package/dist/components/MultiSelectOptionSet/MultiSelectOptionSet.js +1 -0
- package/dist/components/MultiSelectOptionSet/index.d.ts +2 -0
- package/dist/components/MultiSelectOptionSet/interfaces.d.ts +11 -0
- package/dist/components/OptionSet/OptionSet.d.ts +3 -0
- package/dist/components/OptionSet/OptionSet.js +1 -0
- package/dist/components/OptionSet/index.d.ts +2 -0
- package/dist/components/OptionSet/interfaces.d.ts +13 -0
- package/dist/components/TextField/TextField.d.ts +3 -0
- package/dist/components/TextField/TextField.js +1 -0
- package/dist/components/TextField/hooks/useTextField.d.ts +2 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/TextField/interfaces.d.ts +15 -0
- package/dist/components/TwoOptions/TwoOptions.d.ts +3 -0
- package/dist/components/TwoOptions/TwoOptions.js +1 -0
- package/dist/components/TwoOptions/index.d.ts +2 -0
- package/dist/components/TwoOptions/interfaces.d.ts +13 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useComponent.d.ts +7 -0
- package/dist/hooks/useComponent.js +1 -0
- package/dist/hooks/useFocusIn.d.ts +1 -0
- package/dist/hooks/useFocusIn.js +1 -0
- package/dist/hooks/useInputBasedComponent.d.ts +32 -0
- package/dist/hooks/useInputBasedComponent.js +1 -0
- package/dist/hooks/useMouseOver.d.ts +1 -0
- package/dist/hooks/useMouseOver.js +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/interfaces/context.d.ts +20 -0
- package/dist/interfaces/index.d.ts +9 -0
- package/dist/interfaces/parameters.d.ts +23 -0
- package/dist/interfaces/property.d.ts +100 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/utils/NumeralPCF.d.ts +6 -0
- package/examples/Currency/Currency/ControlManifest.Input.xml +53 -0
- package/examples/Currency/Currency/index.ts +66 -0
- package/examples/Currency/Currency.pcfproj +46 -0
- package/examples/Currency/package-lock.json +15900 -0
- package/examples/Currency/package.json +29 -0
- package/examples/Currency/pcfconfig.json +3 -0
- package/examples/Currency/tsconfig.json +7 -0
- package/examples/DateTime/DateTime/ControlManifest.Input.xml +58 -0
- package/examples/DateTime/DateTime/index.ts +69 -0
- package/examples/DateTime/DateTime.pcfproj +46 -0
- package/examples/DateTime/package-lock.json +15900 -0
- package/examples/DateTime/package.json +29 -0
- package/examples/DateTime/pcfconfig.json +3 -0
- package/examples/DateTime/tsconfig.json +7 -0
- package/examples/Decimal/Decimal/ControlManifest.Input.xml +66 -0
- package/examples/Decimal/Decimal/index.ts +66 -0
- package/examples/Decimal/Decimal.pcfproj +46 -0
- package/examples/Decimal/package-lock.json +15900 -0
- package/examples/Decimal/package.json +28 -0
- package/examples/Decimal/pcfconfig.json +3 -0
- package/examples/Decimal/tsconfig.json +7 -0
- package/examples/Duration/Duration/ControlManifest.Input.xml +53 -0
- package/examples/Duration/Duration/index.ts +66 -0
- package/examples/Duration/Duration.pcfproj +46 -0
- package/examples/Duration/package-lock.json +15900 -0
- package/examples/Duration/package.json +29 -0
- package/examples/Duration/pcfconfig.json +3 -0
- package/examples/Duration/tsconfig.json +7 -0
- package/examples/Grid/Grid/ControlManifest.Input.xml +28 -0
- package/examples/Grid/Grid/index.ts +100 -0
- package/examples/Grid/Grid.pcfproj +46 -0
- package/examples/Grid/package-lock.json +15901 -0
- package/examples/Grid/package.json +30 -0
- package/examples/Grid/pcfconfig.json +3 -0
- package/examples/Grid/tsconfig.json +7 -0
- package/examples/Lookup/Lookup/ControlManifest.Input.xml +51 -0
- package/examples/Lookup/Lookup/index.ts +90 -0
- package/examples/Lookup/Lookup.pcfproj +46 -0
- package/examples/Lookup/package-lock.json +15900 -0
- package/examples/Lookup/package.json +29 -0
- package/examples/Lookup/pcfconfig.json +3 -0
- package/examples/Lookup/tsconfig.json +8 -0
- package/examples/MultiSelectOptionSet/MultiSelectOptionSet/ControlManifest.Input.xml +53 -0
- package/examples/MultiSelectOptionSet/MultiSelectOptionSet/index.ts +86 -0
- package/examples/MultiSelectOptionSet/MultiSelectOptionSet.pcfproj +46 -0
- package/examples/MultiSelectOptionSet/package-lock.json +15900 -0
- package/examples/MultiSelectOptionSet/package.json +31 -0
- package/examples/MultiSelectOptionSet/pcfconfig.json +3 -0
- package/examples/MultiSelectOptionSet/tsconfig.json +7 -0
- package/examples/OptionSet/OptionSet/ControlManifest.Input.xml +53 -0
- package/examples/OptionSet/OptionSet/index.ts +70 -0
- package/examples/OptionSet/OptionSet.pcfproj +46 -0
- package/examples/OptionSet/package-lock.json +15900 -0
- package/examples/OptionSet/package.json +29 -0
- package/examples/OptionSet/pcfconfig.json +3 -0
- package/examples/OptionSet/tsconfig.json +7 -0
- package/examples/TwoOptions/TwoOptions/ControlManifest.Input.xml +53 -0
- package/examples/TwoOptions/TwoOptions/index.ts +69 -0
- package/examples/TwoOptions/TwoOptions.pcfproj +46 -0
- package/examples/TwoOptions/package-lock.json +15900 -0
- package/examples/TwoOptions/package.json +29 -0
- package/examples/TwoOptions/pcfconfig.json +3 -0
- package/examples/TwoOptions/tsconfig.json +7 -0
- package/package.json +94 -0
- package/public/index.html +43 -0
- package/public/manifest.json +25 -0
- package/rollup.config.js +44 -0
- package/src/components/DateTime/DateTime.tsx +97 -0
- package/src/components/DateTime/components/Calendar.tsx +80 -0
- package/src/components/DateTime/hooks/useDateTime.ts +144 -0
- package/src/components/DateTime/index.ts +2 -0
- package/src/components/DateTime/interfaces.ts +22 -0
- package/src/components/DateTime/styles.ts +37 -0
- package/src/components/DateTime/translations.ts +18 -0
- package/src/components/Decimal/Decimal.tsx +120 -0
- package/src/components/Decimal/index.ts +2 -0
- package/src/components/Decimal/interfaces.ts +20 -0
- package/src/components/Duration/Duration.tsx +143 -0
- package/src/components/Duration/index.ts +2 -0
- package/src/components/Duration/interfaces.ts +22 -0
- package/src/components/Duration/translations.ts +30 -0
- package/src/components/Grid/Grid.tsx +24 -0
- package/src/components/Grid/core/components/AgGrid/AgGrid.tsx +206 -0
- package/src/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/EmptyRecords.tsx +16 -0
- package/src/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/styles.ts +20 -0
- package/src/components/Grid/core/components/AgGrid/components/LoadingOverlay/LoadingOverlay.tsx +7 -0
- package/src/components/Grid/core/components/AgGrid/controllers/useAgGridController.ts +68 -0
- package/src/components/Grid/core/components/AgGrid/model/AgGrid.ts +100 -0
- package/src/components/Grid/core/components/AgGrid/styles.ts +72 -0
- package/src/components/Grid/core/components/Cell/Commands/Commands.tsx +32 -0
- package/src/components/Grid/core/components/Cell/Commands/Icon.tsx +17 -0
- package/src/components/Grid/core/components/Cell/Commands/styles.ts +21 -0
- package/src/components/Grid/core/components/Cell/Commands/useCommands.tsx +53 -0
- package/src/components/Grid/core/components/Cell/EditableCell/EditableCell.tsx +140 -0
- package/src/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyCell.tsx +176 -0
- package/src/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.tsx +67 -0
- package/src/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/styles.ts +24 -0
- package/src/components/Grid/core/components/Cell/ReadOnlyCell/styles.ts +56 -0
- package/src/components/Grid/core/components/ColumnHeader/ColumnHeader.tsx +71 -0
- package/src/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/GlobalCheckbox.tsx +31 -0
- package/src/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/styles.ts +16 -0
- package/src/components/Grid/core/components/ColumnHeader/styles.ts +40 -0
- package/src/components/Grid/core/components/Component/Component.tsx +59 -0
- package/src/components/Grid/core/components/Component/controller/useComponentController.ts +39 -0
- package/src/components/Grid/core/components/Component/model/Component.ts +251 -0
- package/src/components/Grid/core/components/Dialog/Constants.tsx +8 -0
- package/src/components/Grid/core/components/Dialog/Styles.tsx +61 -0
- package/src/components/Grid/core/components/Dialog/index.tsx +22 -0
- package/src/components/Grid/core/components/Dialog/interfaces/index.d.ts +7 -0
- package/src/components/Grid/core/components/Save/Save.tsx +74 -0
- package/src/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.tsx +63 -0
- package/src/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/RecordGrids.tsx +153 -0
- package/src/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/styles.ts +52 -0
- package/src/components/Grid/core/components/Save/components/ChangeEditor/styles.ts +34 -0
- package/src/components/Grid/core/components/Save/hooks/useSave.ts +59 -0
- package/src/components/Grid/core/components/Save/styles.ts +41 -0
- package/src/components/Grid/core/controllers/useGridController.ts +46 -0
- package/src/components/Grid/core/enums/ConditionOperator.ts +46 -0
- package/src/components/Grid/core/enums/DataType.ts +25 -0
- package/src/components/Grid/core/hooks/useGridInstance.ts +7 -0
- package/src/components/Grid/core/hooks/useRefreshCallback.ts +20 -0
- package/src/components/Grid/core/hooks/useRerender.ts +15 -0
- package/src/components/Grid/core/interfaces/IGridColumn.ts +19 -0
- package/src/components/Grid/core/interfaces/IGridContext.ts +7 -0
- package/src/components/Grid/core/model/Grid.ts +250 -0
- package/src/components/Grid/core/model/GridDependency.ts +34 -0
- package/src/components/Grid/core/model/Metadata.ts +20 -0
- package/src/components/Grid/core/services/RecordUpdateService/controllers/useRecordUpdateServiceController.ts +36 -0
- package/src/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.ts +222 -0
- package/src/components/Grid/filtering/components/FilterCallout/FilterCallout.tsx +83 -0
- package/src/components/Grid/filtering/components/FilterCallout/components/ConditionOperator/ConditionOperator.tsx +66 -0
- package/src/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValue.tsx +48 -0
- package/src/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.ts +120 -0
- package/src/components/Grid/filtering/components/FilterCallout/styles.ts +37 -0
- package/src/components/Grid/filtering/constants.ts +48 -0
- package/src/components/Grid/filtering/controller/useColumnFilterConditionController.ts +63 -0
- package/src/components/Grid/filtering/model/Condition.ts +309 -0
- package/src/components/Grid/filtering/model/Filtering.ts +78 -0
- package/src/components/Grid/filtering/utils/FilteringUtilts.ts +190 -0
- package/src/components/Grid/interfaces.ts +109 -0
- package/src/components/Grid/paging/components/Paging/Paging.tsx +76 -0
- package/src/components/Grid/paging/components/Paging/styles.ts +38 -0
- package/src/components/Grid/paging/controllers/usePagingController.ts +34 -0
- package/src/components/Grid/paging/model/Paging.ts +49 -0
- package/src/components/Grid/selection/controllers/useSelectionController.ts +25 -0
- package/src/components/Grid/selection/model/Selection.ts +60 -0
- package/src/components/Grid/sorting/Sorting.ts +30 -0
- package/src/components/Grid/sorting/components/SortingContextualMenu/SortingContextualMenu.tsx +126 -0
- package/src/components/Grid/sorting/components/SortingContextualMenu/styles.ts +12 -0
- package/src/components/Grid/sorting/controllers/useColumnSortingController.ts +26 -0
- package/src/components/Grid/translations.ts +80 -0
- package/src/components/Grid/validation/controllers/useRecordValidationController.ts +31 -0
- package/src/components/Grid/validation/model/ColumnValidation.ts +81 -0
- package/src/components/Lookup/Lookup.tsx +199 -0
- package/src/components/Lookup/components/RecordCreator.tsx +53 -0
- package/src/components/Lookup/components/TargetSelector.tsx +43 -0
- package/src/components/Lookup/hooks/useFetchXml.ts +31 -0
- package/src/components/Lookup/hooks/useLoadedEntities.ts +23 -0
- package/src/components/Lookup/hooks/useLookup.ts +126 -0
- package/src/components/Lookup/index.ts +2 -0
- package/src/components/Lookup/interfaces.ts +45 -0
- package/src/components/Lookup/lib.ts +3110 -0
- package/src/components/Lookup/styles.ts +106 -0
- package/src/components/Lookup/translations.ts +28 -0
- package/src/components/MultiSelectOptionSet/MultiSelectOptionSet.tsx +83 -0
- package/src/components/MultiSelectOptionSet/index.ts +2 -0
- package/src/components/MultiSelectOptionSet/interfaces.ts +14 -0
- package/src/components/OptionSet/OptionSet.tsx +67 -0
- package/src/components/OptionSet/index.ts +2 -0
- package/src/components/OptionSet/interfaces.ts +17 -0
- package/src/components/TextField/TextField.tsx +58 -0
- package/src/components/TextField/hooks/useTextField.ts +42 -0
- package/src/components/TextField/index.ts +2 -0
- package/src/components/TextField/interfaces.ts +20 -0
- package/src/components/TwoOptions/TwoOptions.tsx +43 -0
- package/src/components/TwoOptions/index.ts +2 -0
- package/src/components/TwoOptions/interfaces.ts +17 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useComponent.ts +83 -0
- package/src/hooks/useFocusIn.ts +23 -0
- package/src/hooks/useInputBasedComponent.ts +71 -0
- package/src/hooks/useMouseOver.ts +23 -0
- package/src/index.tsx +12 -0
- package/src/interfaces/context.ts +21 -0
- package/src/interfaces/index.ts +12 -0
- package/src/interfaces/parameters.ts +26 -0
- package/src/interfaces/property.ts +111 -0
- package/src/sandbox/index.tsx +137 -0
- package/src/sandbox/mock/Context.ts +18 -0
- package/src/sandbox/mock/Formatting.ts +186 -0
- package/src/sandbox/mock/Mode.ts +25 -0
- package/src/sandbox/mock/UserSettings.ts +31 -0
- package/src/sandbox/mock/Utility.ts +14 -0
- package/src/sandbox/shared/durationList.tsx +24 -0
- package/src/sandbox/shared/multiSelectOptionList.tsx +5 -0
- package/src/sandbox/shared/optionList.tsx +5 -0
- package/src/stories/Introduction.stories.mdx +122 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/types/index.ts +3 -0
- package/src/utils/NumeralPCF.ts +62 -0
- package/tsconfig.json +28 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pcf-project",
|
|
3
|
+
"version": "1.2406.2",
|
|
4
|
+
"description": "Project containing your PowerApps Component Framework (PCF) control.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "pcf-scripts build",
|
|
7
|
+
"clean": "pcf-scripts clean",
|
|
8
|
+
"lint": "pcf-scripts lint",
|
|
9
|
+
"lint:fix": "pcf-scripts lint fix",
|
|
10
|
+
"rebuild": "pcf-scripts rebuild",
|
|
11
|
+
"start": "pcf-scripts start",
|
|
12
|
+
"start:watch": "pcf-scripts start watch",
|
|
13
|
+
"refreshTypes": "pcf-scripts refreshTypes"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@microsoft/eslint-plugin-power-apps": "^0.2.6",
|
|
17
|
+
"@types/node": "^18.8.2",
|
|
18
|
+
"@types/powerapps-component-framework": "^1.3.4",
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "^5.39.0",
|
|
20
|
+
"@typescript-eslint/parser": "^5.39.0",
|
|
21
|
+
"eslint": "^8.24.0",
|
|
22
|
+
"eslint-plugin-import": "^2.26.0",
|
|
23
|
+
"eslint-plugin-node": "^11.1.0",
|
|
24
|
+
"eslint-plugin-promise": "^6.0.1",
|
|
25
|
+
"pcf-scripts": "^1",
|
|
26
|
+
"pcf-start": "^1",
|
|
27
|
+
"typescript": "^4.9.5"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<manifest>
|
|
3
|
+
<control namespace="TALXIS.PCF" constructor="Grid" version="5.0.1" display-name-key="Grid" description-key="Grid description" control-type="standard">
|
|
4
|
+
<data-set name="Grid" display-name-key="Dataset_Display_Key">
|
|
5
|
+
</data-set>
|
|
6
|
+
<property name="EnableEditing" display-name-key="EnableEditing_Display_Key" description-key="EnableEditing_Description_Key" of-type="TwoOptions" usage="input" />
|
|
7
|
+
<property name="EnablePagination" display-name-key="EnablePagination_Display_Key" description-key="EnablePagination_Description_Key" of-type="TwoOptions" usage="input" />
|
|
8
|
+
<property name="EnableFiltering" display-name-key="EnableFiltering_Display_Key" description-key="EnableFiltering_Description_Key" of-type="TwoOptions" usage="input" />
|
|
9
|
+
<property name="EnableSorting" display-name-key="EnableSorting_Display_Key" description-key="EnableSorting_Description_Key" of-type="TwoOptions" usage="input" />
|
|
10
|
+
<property name="EnableNavigation" display-name-key="EnableNavigation_Display_Key" description-key="EnableNavigation_Description_Key" of-type="TwoOptions" usage="input" />
|
|
11
|
+
<property name="SelectableRows" display-name-key="SelectableRows_Display_Key" description-key="SelectableRows_Description_Key" of-type="SingleLine.Text" usage="input">
|
|
12
|
+
</property>
|
|
13
|
+
|
|
14
|
+
<resources>
|
|
15
|
+
<code path="index.ts" order="1"/>
|
|
16
|
+
</resources>
|
|
17
|
+
<feature-usage>
|
|
18
|
+
<uses-feature name="Device.captureAudio" required="true" />
|
|
19
|
+
<uses-feature name="Device.captureImage" required="true" />
|
|
20
|
+
<uses-feature name="Device.captureVideo" required="true" />
|
|
21
|
+
<uses-feature name="Device.getBarcodeValue" required="true" />
|
|
22
|
+
<uses-feature name="Device.getCurrentPosition" required="true" />
|
|
23
|
+
<uses-feature name="Device.pickFile" required="true" />
|
|
24
|
+
<uses-feature name="Utility" required="true" />
|
|
25
|
+
<uses-feature name="WebAPI" required="true" />
|
|
26
|
+
</feature-usage>
|
|
27
|
+
</control>
|
|
28
|
+
</manifest>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { IInputs, IOutputs } from "./generated/ManifestTypes";
|
|
2
|
+
import * as ReactDOM from 'react-dom';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Grid as GridComponent } from '../../../dist/components/Grid/Grid';
|
|
5
|
+
import { IGrid, IGridParameters } from "../../../dist/components/Grid/interfaces";
|
|
6
|
+
|
|
7
|
+
export class Grid implements ComponentFramework.StandardControl<IInputs, IOutputs> {
|
|
8
|
+
private _container: HTMLDivElement;
|
|
9
|
+
private _selectedRecordIds: string[] = [];
|
|
10
|
+
constructor() {
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Used to initialize the control instance. Controls can kick off remote server calls and other initialization actions here.
|
|
16
|
+
* Data-set values are not initialized here, use updateView.
|
|
17
|
+
* @param context The entire property bag available to control via Context Object; It contains values as set up by the customizer mapped to property names defined in the manifest, as well as utility functions.
|
|
18
|
+
* @param notifyOutputChanged A callback method to alert the framework that the control has new outputs ready to be retrieved asynchronously.
|
|
19
|
+
* @param state A piece of data that persists in one session for a single user. Can be set at any point in a controls life cycle by calling 'setControlState' in the Mode interface.
|
|
20
|
+
* @param container If a control is marked control-type='standard', it will receive an empty div element within which it can render its content.
|
|
21
|
+
*/
|
|
22
|
+
public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container: HTMLDivElement): void {
|
|
23
|
+
this._container = container;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Called when any value in the property bag has changed. This includes field values, data-sets, global values such as container height and width, offline status, control metadata values such as label, visible, etc.
|
|
28
|
+
* @param context The entire property bag available to control via Context Object; It contains values as set up by the customizer mapped to names defined in the manifest, as well as utility functions
|
|
29
|
+
*/
|
|
30
|
+
public updateView(context: ComponentFramework.Context<IInputs>): void {
|
|
31
|
+
if (window.location.port === '8181') {
|
|
32
|
+
context.factory.requestRender = () => {
|
|
33
|
+
this.updateView(context);
|
|
34
|
+
};
|
|
35
|
+
//@ts-ignore - inject
|
|
36
|
+
context.utils.getEntityMetadata = () => {
|
|
37
|
+
return {
|
|
38
|
+
Attributes: {
|
|
39
|
+
get: () => {
|
|
40
|
+
return {
|
|
41
|
+
attributeDescriptor: {
|
|
42
|
+
RequiredLevel: 2,
|
|
43
|
+
IsValidForUpdate: true
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
context.parameters.Grid = {
|
|
51
|
+
...context.parameters.Grid,
|
|
52
|
+
columns: [...context.parameters.Grid.columns],
|
|
53
|
+
sorting: context.parameters.Grid.sorting ?? [],
|
|
54
|
+
//@ts-ignore - not part of types
|
|
55
|
+
paging: {...context.parameters.Grid.paging, pageNumber: 1, pageSize: 25},
|
|
56
|
+
refresh: () => {
|
|
57
|
+
this.updateView(context);
|
|
58
|
+
},
|
|
59
|
+
getSelectedRecordIds: () => {
|
|
60
|
+
return this._selectedRecordIds;
|
|
61
|
+
},
|
|
62
|
+
setSelectedRecordIds: (ids: string[]) => {
|
|
63
|
+
this._selectedRecordIds = ids;
|
|
64
|
+
this.updateView(context);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
for(const [key, value] of Object.entries(context.parameters.Grid.records)) {
|
|
68
|
+
//@ts-ignore / misssing implementation
|
|
69
|
+
context.parameters.Grid.records[key].setValue = () => {
|
|
70
|
+
context.factory.requestRender();
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
ReactDOM.render(React.createElement(GridComponent, {
|
|
75
|
+
context: context,
|
|
76
|
+
parameters: {
|
|
77
|
+
...context.parameters,
|
|
78
|
+
EnableEditing: {
|
|
79
|
+
raw: true
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
} as any), this._container);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* It is called by the framework prior to a control receiving new data.
|
|
87
|
+
* @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as "bound" or "output"
|
|
88
|
+
*/
|
|
89
|
+
public getOutputs(): IOutputs {
|
|
90
|
+
return {};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
|
|
95
|
+
* i.e. cancelling any pending remote calls, removing listeners, etc.
|
|
96
|
+
*/
|
|
97
|
+
public destroy(): void {
|
|
98
|
+
// Add code to cleanup control if necessary
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<PropertyGroup>
|
|
4
|
+
<PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
|
|
5
|
+
</PropertyGroup>
|
|
6
|
+
|
|
7
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
|
8
|
+
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.props')" />
|
|
9
|
+
|
|
10
|
+
<PropertyGroup>
|
|
11
|
+
<Name>Grid</Name>
|
|
12
|
+
<ProjectGuid>f3abb6c4-d594-4bf7-a4f6-15d438e64388</ProjectGuid>
|
|
13
|
+
<OutputPath>$(MSBuildThisFileDirectory)out\controls</OutputPath>
|
|
14
|
+
</PropertyGroup>
|
|
15
|
+
|
|
16
|
+
<PropertyGroup>
|
|
17
|
+
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
|
18
|
+
<!--Remove TargetFramework when this is available in 16.1-->
|
|
19
|
+
<TargetFramework>net462</TargetFramework>
|
|
20
|
+
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
|
|
21
|
+
</PropertyGroup>
|
|
22
|
+
|
|
23
|
+
<ItemGroup>
|
|
24
|
+
<PackageReference Include="Microsoft.PowerApps.MSBuild.Pcf" Version="1.*" />
|
|
25
|
+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
|
|
26
|
+
</ItemGroup>
|
|
27
|
+
|
|
28
|
+
<ItemGroup>
|
|
29
|
+
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\.gitignore" />
|
|
30
|
+
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\bin\**" />
|
|
31
|
+
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\obj\**" />
|
|
32
|
+
<ExcludeDirectories Include="$(OutputPath)\**" />
|
|
33
|
+
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.pcfproj" />
|
|
34
|
+
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.pcfproj.user" />
|
|
35
|
+
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.sln" />
|
|
36
|
+
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\node_modules\**" />
|
|
37
|
+
</ItemGroup>
|
|
38
|
+
|
|
39
|
+
<ItemGroup>
|
|
40
|
+
<None Include="$(MSBuildThisFileDirectory)\**" Exclude="@(ExcludeDirectories)" />
|
|
41
|
+
</ItemGroup>
|
|
42
|
+
|
|
43
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
|
44
|
+
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.targets')" />
|
|
45
|
+
|
|
46
|
+
</Project>
|