@talxis/base-controls 1.2410.3 → 1.2410.5

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.
Files changed (138) hide show
  1. package/README.md +20 -11
  2. package/dist/components/DatasetControl/DatasetControl.d.ts +3 -0
  3. package/dist/components/DatasetControl/DatasetControl.js +58 -0
  4. package/dist/components/DatasetControl/DatasetControl.js.map +1 -0
  5. package/dist/components/DatasetControl/hooks/useRerender.d.ts +1 -0
  6. package/dist/components/DatasetControl/hooks/useRerender.js +9 -0
  7. package/dist/components/DatasetControl/hooks/useRerender.js.map +1 -0
  8. package/dist/components/DatasetControl/index.d.ts +2 -0
  9. package/dist/components/DatasetControl/index.js +2 -0
  10. package/dist/components/DatasetControl/index.js.map +1 -0
  11. package/dist/components/DatasetControl/interfaces.d.ts +10 -0
  12. package/dist/components/DatasetControl/styles.d.ts +8 -0
  13. package/dist/components/DatasetControl/styles.js +17 -0
  14. package/dist/components/DatasetControl/styles.js.map +1 -0
  15. package/dist/components/DatasetControl/translations.d.ts +10 -0
  16. package/dist/components/DatasetControl/translations.js +7 -0
  17. package/dist/components/DatasetControl/translations.js.map +1 -0
  18. package/dist/components/Decimal/Decimal.js +1 -1
  19. package/dist/components/Decimal/Decimal.js.map +1 -1
  20. package/dist/components/Duration/Duration.js +1 -1
  21. package/dist/components/Duration/Duration.js.map +1 -1
  22. package/dist/components/Grid/Grid.js +9 -2
  23. package/dist/components/Grid/Grid.js.map +1 -1
  24. package/dist/components/Grid/constants.d.ts +1 -2
  25. package/dist/components/Grid/constants.js +2 -2
  26. package/dist/components/Grid/constants.js.map +1 -1
  27. package/dist/components/Grid/core/components/AgGrid/AgGrid.js +21 -47
  28. package/dist/components/Grid/core/components/AgGrid/AgGrid.js.map +1 -1
  29. package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.d.ts +2 -3
  30. package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.js +12 -8
  31. package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.js.map +1 -1
  32. package/dist/components/Grid/core/components/AgGrid/model/AgGrid.d.ts +1 -2
  33. package/dist/components/Grid/core/components/AgGrid/model/AgGrid.js +20 -16
  34. package/dist/components/Grid/core/components/AgGrid/model/AgGrid.js.map +1 -1
  35. package/dist/components/Grid/core/components/AgGrid/styles.d.ts +1 -4
  36. package/dist/components/Grid/core/components/AgGrid/styles.js +6 -9
  37. package/dist/components/Grid/core/components/AgGrid/styles.js.map +1 -1
  38. package/dist/components/Grid/core/components/Cell/Commands/Commands.d.ts +2 -2
  39. package/dist/components/Grid/core/components/Cell/Commands/Commands.js.map +1 -1
  40. package/dist/components/Grid/core/components/Cell/Commands/Icon.d.ts +2 -2
  41. package/dist/components/Grid/core/components/Cell/Commands/Icon.js.map +1 -1
  42. package/dist/components/Grid/core/components/Cell/Commands/useCommands.d.ts +2 -2
  43. package/dist/components/Grid/core/components/Cell/Commands/useCommands.js +2 -0
  44. package/dist/components/Grid/core/components/Cell/Commands/useCommands.js.map +1 -1
  45. package/dist/components/Grid/core/components/Cell/EditableCell/EditableCell.js +4 -6
  46. package/dist/components/Grid/core/components/Cell/EditableCell/EditableCell.js.map +1 -1
  47. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/Notifications/Notifications.d.ts +11 -0
  48. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/Notifications/Notifications.js +93 -0
  49. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/Notifications/Notifications.js.map +1 -0
  50. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/Notifications/styles.d.ts +36 -0
  51. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/Notifications/styles.js +42 -0
  52. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/Notifications/styles.js.map +1 -0
  53. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyCell.d.ts +2 -2
  54. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyCell.js +106 -29
  55. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyCell.js.map +1 -1
  56. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.d.ts +2 -2
  57. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.js +3 -3
  58. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.js.map +1 -1
  59. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/styles.d.ts +49 -2
  60. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/styles.js +51 -4
  61. package/dist/components/Grid/core/components/Cell/ReadOnlyCell/styles.js.map +1 -1
  62. package/dist/components/Grid/core/components/ColumnHeader/ColumnHeader.js +1 -1
  63. package/dist/components/Grid/core/components/ColumnHeader/ColumnHeader.js.map +1 -1
  64. package/dist/components/Grid/core/components/Component/model/Component.js +18 -11
  65. package/dist/components/Grid/core/components/Component/model/Component.js.map +1 -1
  66. package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.js.map +1 -1
  67. package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/RecordGrids.js +8 -0
  68. package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/RecordGrids.js.map +1 -1
  69. package/dist/components/Grid/core/constants.d.ts +1 -0
  70. package/dist/components/Grid/core/constants.js +4 -0
  71. package/dist/components/Grid/core/constants.js.map +1 -0
  72. package/dist/components/Grid/core/controllers/useGridController.d.ts +0 -2
  73. package/dist/components/Grid/core/controllers/useGridController.js +1 -17
  74. package/dist/components/Grid/core/controllers/useGridController.js.map +1 -1
  75. package/dist/components/Grid/core/interfaces/IGridColumn.d.ts +9 -18
  76. package/dist/components/Grid/core/model/Grid.d.ts +17 -10
  77. package/dist/components/Grid/core/model/Grid.js +93 -74
  78. package/dist/components/Grid/core/model/Grid.js.map +1 -1
  79. package/dist/components/Grid/core/model/GridDependency.d.ts +1 -1
  80. package/dist/components/Grid/core/model/Metadata.d.ts +2 -3
  81. package/dist/components/Grid/core/model/Metadata.js +13 -9
  82. package/dist/components/Grid/core/model/Metadata.js.map +1 -1
  83. package/dist/components/Grid/core/services/KeyListener.d.ts +8 -0
  84. package/dist/components/Grid/core/services/KeyListener.js +22 -0
  85. package/dist/components/Grid/core/services/KeyListener.js.map +1 -0
  86. package/dist/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.d.ts +8 -8
  87. package/dist/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.js +22 -26
  88. package/dist/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.js.map +1 -1
  89. package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.d.ts +16 -16
  90. package/dist/components/Grid/filtering/controller/useColumnFilterConditionController.js.map +1 -1
  91. package/dist/components/Grid/filtering/model/Condition.js +7 -3
  92. package/dist/components/Grid/filtering/model/Condition.js.map +1 -1
  93. package/dist/components/Grid/filtering/model/Filtering.js +4 -4
  94. package/dist/components/Grid/filtering/model/Filtering.js.map +1 -1
  95. package/dist/components/Grid/interfaces.d.ts +5 -14
  96. package/dist/components/Grid/paging/components/Paging/Paging.js +7 -1
  97. package/dist/components/Grid/paging/components/Paging/Paging.js.map +1 -1
  98. package/dist/components/Grid/paging/controllers/usePagingController.d.ts +2 -1
  99. package/dist/components/Grid/paging/controllers/usePagingController.js +1 -0
  100. package/dist/components/Grid/paging/controllers/usePagingController.js.map +1 -1
  101. package/dist/components/Grid/paging/model/Paging.d.ts +2 -1
  102. package/dist/components/Grid/paging/model/Paging.js +22 -4
  103. package/dist/components/Grid/paging/model/Paging.js.map +1 -1
  104. package/dist/components/Grid/selection/controllers/useSelectionController.d.ts +2 -2
  105. package/dist/components/Grid/selection/controllers/useSelectionController.js +7 -3
  106. package/dist/components/Grid/selection/controllers/useSelectionController.js.map +1 -1
  107. package/dist/components/Grid/selection/model/Selection.d.ts +3 -3
  108. package/dist/components/Grid/selection/model/Selection.js +7 -4
  109. package/dist/components/Grid/selection/model/Selection.js.map +1 -1
  110. package/dist/components/Grid/sorting/Sorting.js +5 -6
  111. package/dist/components/Grid/sorting/Sorting.js.map +1 -1
  112. package/dist/components/Grid/sorting/components/SortingContextualMenu/SortingContextualMenu.js +3 -3
  113. package/dist/components/Grid/sorting/components/SortingContextualMenu/SortingContextualMenu.js.map +1 -1
  114. package/dist/components/Grid/translations.d.ts +8 -0
  115. package/dist/components/Grid/translations.js +3 -1
  116. package/dist/components/Grid/translations.js.map +1 -1
  117. package/dist/components/Grid/validation/controllers/useRecordValidationController.d.ts +2 -2
  118. package/dist/components/Grid/validation/controllers/useRecordValidationController.js +2 -2
  119. package/dist/components/Grid/validation/controllers/useRecordValidationController.js.map +1 -1
  120. package/dist/hooks/useControl.js +1 -1
  121. package/dist/hooks/useControl.js.map +1 -1
  122. package/dist/hooks/useThemeOverride.d.ts +1 -0
  123. package/dist/hooks/useThemeOverride.js +23 -0
  124. package/dist/hooks/useThemeOverride.js.map +1 -0
  125. package/dist/index.d.ts +351 -367
  126. package/dist/index.js +1 -1
  127. package/dist/interfaces/property.d.ts +0 -29
  128. package/dist/utils/Theme.js +26 -0
  129. package/dist/utils/Theme.js.map +1 -1
  130. package/dist/utils/index.d.ts +0 -1
  131. package/dist/utils/index.js +0 -1
  132. package/dist/utils/index.js.map +1 -1
  133. package/package.json +4 -3
  134. package/dist/components/Grid/core/hooks/useRerender.js +0 -13
  135. package/dist/components/Grid/core/hooks/useRerender.js.map +0 -1
  136. package/dist/utils/Numeral.d.ts +0 -6
  137. package/dist/utils/Numeral.js +0 -64
  138. package/dist/utils/Numeral.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- export { Numeral } from './utils/Numeral.js';
2
1
  export { useControl } from './hooks/useControl.js';
3
2
  export { useControlSizing } from './hooks/useControlSizing.js';
4
3
  export { useFocusIn } from './hooks/useFocusIn.js';
@@ -16,4 +15,5 @@ export { MultiSelectOptionSet } from './components/MultiSelectOptionSet/MultiSel
16
15
  export { OptionSet } from './components/OptionSet/OptionSet.js';
17
16
  export { TextField } from './components/TextField/TextField.js';
18
17
  export { TwoOptions } from './components/TwoOptions/TwoOptions.js';
18
+ export { DatasetControl } from './components/DatasetControl/DatasetControl.js';
19
19
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,4 @@
1
1
  /// <reference types="powerapps-component-framework" />
2
- import { IEntityColumn, IEntityRecord } from "../components/Grid/interfaces";
3
2
  type ExcludedProps = Pick<ComponentFramework.PropertyTypes.Property, 'formatted'>;
4
3
  export interface IProperty extends Omit<Partial<ComponentFramework.PropertyTypes.Property>, keyof ExcludedProps | 'attributes'> {
5
4
  }
@@ -60,32 +59,4 @@ export interface ILookupProperty extends IProperty, Omit<Partial<ComponentFramew
60
59
  fetchXml?: string;
61
60
  }[]>;
62
61
  }
63
- export interface IDatasetProperty extends IProperty, Omit<ComponentFramework.PropertyTypes.DataSet, 'error' | 'errorMessage'> {
64
- columns: IEntityColumn[];
65
- records: {
66
- [id: string]: IEntityRecord;
67
- };
68
- paging: ComponentFramework.PropertyHelper.DataSetApi.Paging & {
69
- pageNumber: number;
70
- };
71
- retrieveRecordCommand: (recordIds: string[], specificCommands?: string[], filterByPriority?: boolean, useNestedFormat?: boolean, refreshAllRules?: boolean) => {
72
- canExecute: boolean;
73
- /**
74
- * Seems to be always empty - buttons present in Flyout and SplitButton are put on first level (the array of buttons is flattened).
75
- */
76
- children: any[];
77
- commandId: string;
78
- commandButtonId: string;
79
- controlType: any;
80
- icon: string;
81
- label: string;
82
- shouldBeVisible: boolean;
83
- tooltip: string;
84
- /**
85
- * Temp portal property
86
- */
87
- __isInline?: boolean;
88
- execute: () => Promise<void>;
89
- }[];
90
- }
91
62
  export {};
@@ -32,6 +32,32 @@ const getControlTheme = (fluentDesignLanguage) => {
32
32
  };
33
33
  const normalizeComponentStyling = (theme) => {
34
34
  theme.components = {
35
+ //@ts-ignore
36
+ CommandBarButton: {
37
+ styles: {
38
+ root: {
39
+ backgroundColor: 'transparent'
40
+ },
41
+ rootHovered: {
42
+ backgroundColor: theme.semanticColors.buttonBackgroundHovered
43
+ },
44
+ rootPressed: {
45
+ backgroundColor: theme.semanticColors.buttonBackgroundPressed
46
+ },
47
+ rootExpanded: {
48
+ backgroundColor: theme.semanticColors.buttonBackgroundHovered
49
+ },
50
+ rootChecked: {
51
+ backgroundColor: theme.semanticColors.buttonBackgroundChecked
52
+ },
53
+ rootCheckedPressed: {
54
+ backgroundColor: theme.semanticColors.buttonBackgroundPressed
55
+ },
56
+ rootExpandedHovered: {
57
+ backgroundColor: theme.semanticColors.buttonBackgroundPressed
58
+ }
59
+ }
60
+ },
35
61
  Checkbox: {
36
62
  styles: (props) => {
37
63
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.js","sources":["../../src/utils/Theme.ts"],"sourcesContent":["import { createTheme, getTheme, ICheckboxStyleProps, IToggleStyleProps } from '@fluentui/react';\nimport { createV8Theme } from '@fluentui/react-migration-v8-v9';\nimport { ITheme } from '../interfaces/theme';\n\nconst lightTheme = createTheme({\n palette: {\n white: '#ffffff'\n },\n})\n\n\nexport const getControlTheme = (fluentDesignLanguage?: ComponentFramework.FluentDesignState): ITheme => {\n const fluentTheme = getTheme();\n if (!fluentDesignLanguage) {\n return {\n ...fluentTheme, effects: {\n ...fluentTheme.effects,\n underlined: false\n },\n semanticColors: {\n ...fluentTheme.semanticColors,\n inputBorder: 'transparent',\n }\n }\n }\n const v8Theme: ITheme = createV8Theme(fluentDesignLanguage.brand, fluentDesignLanguage.tokenTheme);\n v8Theme.semanticColors.inputBackground = fluentDesignLanguage.tokenTheme.inputBackground ?? fluentDesignLanguage.tokenTheme.colorNeutralBackground1Hover;\n v8Theme.semanticColors.inputBorder = fluentDesignLanguage.tokenTheme.inputBorder ?? 'transparent';\n v8Theme.semanticColors.inputBorderHovered = fluentDesignLanguage.tokenTheme.inputBorderHovered ?? v8Theme.semanticColors.inputBorder;\n v8Theme.semanticColors.inputText = fluentDesignLanguage.tokenTheme.inputText ?? v8Theme.semanticColors.inputText;\n v8Theme.semanticColors.inputPlaceholderText = fluentDesignLanguage.tokenTheme.inputPlaceholderText ?? v8Theme.semanticColors.inputText\n v8Theme.semanticColors.inputTextHovered = fluentDesignLanguage.tokenTheme.inputTextHovered ?? v8Theme.semanticColors.inputText;\n v8Theme.effects.underlined = fluentDesignLanguage.tokenTheme.underlined ?? true;\n return normalizeComponentStyling(v8Theme);\n}\n\nexport const normalizeComponentStyling = (theme: ITheme) => {\n theme.components = {\n Checkbox: {\n styles: (props: ICheckboxStyleProps) => {\n return {\n root: {\n ':hover .ms-Checkbox-checkbox': {\n borderColor: !props.checked ? 'inherit' : undefined\n }\n }\n }\n }\n },\n Toggle: {\n styles: (props: IToggleStyleProps) => {\n return {\n pill: {\n backgroundColor: !props.checked ? theme.semanticColors.inputBackground : undefined,\n ':hover': {\n borderColor: !props.checked ? props.theme.semanticColors.smallInputBorder : undefined\n },\n }\n };\n }\n }\n };\n const originalSemanticColors = { ...theme.semanticColors };\n const baseTheme = lightTheme;\n for (const key of Object.keys(baseTheme.semanticColors)) {\n if (key.startsWith('menu') || key.startsWith('list')) {\n //@ts-ignore - a\n theme.semanticColors[key] = baseTheme.semanticColors[key];\n }\n }\n theme.semanticColors.menuIcon = originalSemanticColors.menuIcon;\n return theme;\n}"],"names":[],"mappings":";;;AAIA,MAAM,UAAU,GAAG,WAAW,CAAC;AAC3B,IAAA,OAAO,EAAE;AACL,QAAA,KAAK,EAAE,SAAS;AACnB,KAAA;AACJ,CAAA,CAAC,CAAA;AAGW,MAAA,eAAe,GAAG,CAAC,oBAA2D,KAAY;AACnG,IAAA,MAAM,WAAW,GAAG,QAAQ,EAAE,CAAC;IAC/B,IAAI,CAAC,oBAAoB,EAAE;QACvB,OAAO;YACH,GAAG,WAAW,EAAE,OAAO,EAAE;gBACrB,GAAG,WAAW,CAAC,OAAO;AACtB,gBAAA,UAAU,EAAE,KAAK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createTheme, getTheme, ICheckboxStyleProps, IToggleStyleProps } from '@fluentui/react';\nimport { createV8Theme } from '@fluentui/react-migration-v8-v9';\nimport { ITheme } from '../interfaces/theme';\n\nconst lightTheme = createTheme({\n palette: {\n white: '#ffffff'\n },\n})\n\n\nexport const getControlTheme = (fluentDesignLanguage?: ComponentFramework.FluentDesignState): ITheme => {\n const fluentTheme = getTheme();\n if (!fluentDesignLanguage) {\n return {\n ...fluentTheme, effects: {\n ...fluentTheme.effects,\n underlined: false\n },\n semanticColors: {\n ...fluentTheme.semanticColors,\n inputBorder: 'transparent',\n }\n }\n }\n const v8Theme: ITheme = createV8Theme(fluentDesignLanguage.brand, fluentDesignLanguage.tokenTheme);\n v8Theme.semanticColors.inputBackground = fluentDesignLanguage.tokenTheme.inputBackground ?? fluentDesignLanguage.tokenTheme.colorNeutralBackground1Hover;\n v8Theme.semanticColors.inputBorder = fluentDesignLanguage.tokenTheme.inputBorder ?? 'transparent';\n v8Theme.semanticColors.inputBorderHovered = fluentDesignLanguage.tokenTheme.inputBorderHovered ?? v8Theme.semanticColors.inputBorder;\n v8Theme.semanticColors.inputText = fluentDesignLanguage.tokenTheme.inputText ?? v8Theme.semanticColors.inputText;\n v8Theme.semanticColors.inputPlaceholderText = fluentDesignLanguage.tokenTheme.inputPlaceholderText ?? v8Theme.semanticColors.inputText\n v8Theme.semanticColors.inputTextHovered = fluentDesignLanguage.tokenTheme.inputTextHovered ?? v8Theme.semanticColors.inputText;\n v8Theme.effects.underlined = fluentDesignLanguage.tokenTheme.underlined ?? true;\n return normalizeComponentStyling(v8Theme);\n}\n\nexport const normalizeComponentStyling = (theme: ITheme) => {\n theme.components = {\n //@ts-ignore\n CommandBarButton: {\n styles: {\n root: {\n backgroundColor: 'transparent'\n },\n rootHovered: {\n backgroundColor: theme.semanticColors.buttonBackgroundHovered\n },\n rootPressed: {\n backgroundColor: theme.semanticColors.buttonBackgroundPressed\n },\n rootExpanded: {\n backgroundColor: theme.semanticColors.buttonBackgroundHovered\n },\n rootChecked: {\n backgroundColor: theme.semanticColors.buttonBackgroundChecked\n },\n rootCheckedPressed: {\n backgroundColor: theme.semanticColors.buttonBackgroundPressed\n },\n rootExpandedHovered: {\n backgroundColor: theme.semanticColors.buttonBackgroundPressed\n }\n }\n },\n Checkbox: {\n styles: (props: ICheckboxStyleProps) => {\n return {\n root: {\n ':hover .ms-Checkbox-checkbox': {\n borderColor: !props.checked ? 'inherit' : undefined\n }\n }\n }\n }\n },\n Toggle: {\n styles: (props: IToggleStyleProps) => {\n return {\n pill: {\n backgroundColor: !props.checked ? theme.semanticColors.inputBackground : undefined,\n ':hover': {\n borderColor: !props.checked ? props.theme.semanticColors.smallInputBorder : undefined\n },\n }\n };\n }\n }\n };\n const originalSemanticColors = { ...theme.semanticColors };\n const baseTheme = lightTheme;\n for (const key of Object.keys(baseTheme.semanticColors)) {\n if (key.startsWith('menu') || key.startsWith('list')) {\n //@ts-ignore - a\n theme.semanticColors[key] = baseTheme.semanticColors[key];\n }\n }\n theme.semanticColors.menuIcon = originalSemanticColors.menuIcon;\n return theme;\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,UAAU,GAAG,WAAW,CAAC;AAC3B,IAAA,OAAO,EAAE;AACL,QAAA,KAAK,EAAE,SAAS;AACnB,KAAA;AACJ,CAAA,CAAC,CAAA;AAGW,MAAA,eAAe,GAAG,CAAC,oBAA2D,KAAY;AACnG,IAAA,MAAM,WAAW,GAAG,QAAQ,EAAE,CAAC;IAC/B,IAAI,CAAC,oBAAoB,EAAE;QACvB,OAAO;YACH,GAAG,WAAW,EAAE,OAAO,EAAE;gBACrB,GAAG,WAAW,CAAC,OAAO;AACtB,gBAAA,UAAU,EAAE,KAAK;AACpB,aAAA;AACD,YAAA,cAAc,EAAE;gBACZ,GAAG,WAAW,CAAC,cAAc;AAC7B,gBAAA,WAAW,EAAE,aAAa;AAC7B,aAAA;SACJ,CAAA;AACJ,KAAA;AACD,IAAA,MAAM,OAAO,GAAW,aAAa,CAAC,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c,EAAE,CAAC;IAC3D,MAAM,SAAS,GAAG,UAAU,CAAC;IAC7B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE;AACrD,QAAA,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;;AAElD,YAAA,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AAC7D,SAAA;AACJ,KAAA;IACD,KAAK,CAAC,cAAc,CAAC,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC;AAChE,IAAA,OAAO,KAAK,CAAC;AACjB;;;;"}
@@ -1,2 +1 @@
1
- export * from './Numeral';
2
1
  export * from './Theme';
@@ -1,3 +1,2 @@
1
- export { Numeral } from './Numeral.js';
2
1
  export { getControlTheme, normalizeComponentStyling } from './Theme.js';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talxis/base-controls",
3
- "version": "1.2410.3",
3
+ "version": "1.2410.5",
4
4
  "description": "Set of React components that natively work with Power Apps Component Framework API's",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -30,6 +30,7 @@
30
30
  "@types/react": "^17.0.38",
31
31
  "@types/react-dom": "^17.0.11",
32
32
  "@types/validator": "^13.11.9",
33
+ "@types/xrm": "^9.0.81",
33
34
  "babel-loader": "^8.2.3",
34
35
  "esbuild": "^0.13.9",
35
36
  "glob": "^11.0.0",
@@ -71,8 +72,8 @@
71
72
  "@ag-grid-community/styles": "^31.3.2",
72
73
  "@fluentui/react": "^8.119.1",
73
74
  "@fluentui/react-migration-v8-v9": "^9.6.20",
74
- "@talxis/client-libraries": "1.2407.2",
75
- "@talxis/react-components": "^1.2409.8",
75
+ "@talxis/client-libraries": "1.2410.8",
76
+ "@talxis/react-components": "^1.2409.9",
76
77
  "color": "^4.2.3",
77
78
  "dayjs": "^1.11.10",
78
79
  "external-svg-loader": "^1.7.1",
@@ -1,13 +0,0 @@
1
- import { useState } from 'react';
2
-
3
- const useRerender = () => {
4
- const [rerender, setRerender] = useState(0);
5
- const renderDecorator = async (fn) => {
6
- await fn?.();
7
- setRerender(c => c + 1);
8
- };
9
- return [rerender, renderDecorator];
10
- };
11
-
12
- export { useRerender };
13
- //# sourceMappingURL=useRerender.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRerender.js","sources":["../../../../../src/components/Grid/core/hooks/useRerender.ts"],"sourcesContent":["import { useEffect, useState } from \"react\"\n\nexport const useRerender = (): [\n number,\n (fn?: () => any | Promise<any>) => void\n] => {\n const [rerender, setRerender] = useState<number>(0);\n\n const renderDecorator = async (fn?: () => any | Promise<any>) => {\n await fn?.();\n setRerender(c => c + 1);\n }\n\n return [rerender, renderDecorator];\n}"],"names":[],"mappings":";;AAEO,MAAM,WAAW,GAAG,MAGvB;IACA,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;AAEpD,IAAA,MAAM,eAAe,GAAG,OAAO,EAA6B,KAAI;QAC5D,MAAM,EAAE,IAAI,CAAC;QACb,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5B,KAAC,CAAA;AAED,IAAA,OAAO,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;AACvC;;;;"}
@@ -1,6 +0,0 @@
1
- /// <reference types="powerapps-component-framework" />
2
- export declare class Numeral {
3
- static decimal(formatting: ComponentFramework.UserSettingApi.NumberFormattingInfo): void;
4
- static currency(formatting: ComponentFramework.UserSettingApi.NumberFormattingInfo): void;
5
- private static get _locales();
6
- }
@@ -1,64 +0,0 @@
1
- import numeral from 'numeral';
2
-
3
- class Numeral {
4
- static decimal(formatting) {
5
- const locale = {
6
- ordinal: (num) => {
7
- return '.';
8
- },
9
- currency: {
10
- symbol: formatting.currencySymbol
11
- },
12
- abbreviations: {
13
- thousand: 'k',
14
- million: 'm',
15
- billion: 'b',
16
- trillion: 't'
17
- },
18
- delimiters: {
19
- decimal: formatting.numberDecimalSeparator,
20
- thousands: formatting.numberGroupSeparator,
21
- }
22
- };
23
- if (!this._locales.includes('__pcfcustomdecimal')) {
24
- numeral.register('locale', '__pcfcustomdecimal', locale);
25
- }
26
- else {
27
- numeral.locales['__pcfcustomdecimal'] = locale;
28
- }
29
- numeral.locale('__pcfcustomdecimal');
30
- }
31
- static currency(formatting) {
32
- const locale = {
33
- ordinal: (num) => {
34
- return '.';
35
- },
36
- currency: {
37
- symbol: formatting.currencySymbol
38
- },
39
- abbreviations: {
40
- thousand: 'k',
41
- million: 'm',
42
- billion: 'b',
43
- trillion: 't'
44
- },
45
- delimiters: {
46
- decimal: formatting.currencyDecimalSeparator,
47
- thousands: formatting.currencyGroupSeparator,
48
- }
49
- };
50
- if (!this._locales.includes('__pcfcustomcurrency')) {
51
- numeral.register('locale', '__pcfcustomcurrency', locale);
52
- }
53
- else {
54
- numeral.locales['__pcfcustomcurrency'] = locale;
55
- }
56
- numeral.locale('__pcfcustomcurrency');
57
- }
58
- static get _locales() {
59
- return Object.keys(numeral.locales);
60
- }
61
- }
62
-
63
- export { Numeral };
64
- //# sourceMappingURL=Numeral.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Numeral.js","sources":["../../src/utils/Numeral.ts"],"sourcesContent":["import numeral from \"numeral\";\n\nexport class Numeral {\n public static decimal(formatting: ComponentFramework.UserSettingApi.NumberFormattingInfo) {\n const locale = {\n ordinal: (num: number) => {\n return '.';\n },\n currency: {\n symbol: formatting.currencySymbol\n },\n abbreviations: {\n thousand: 'k',\n million: 'm',\n billion: 'b',\n trillion: 't'\n },\n delimiters: {\n decimal: formatting.numberDecimalSeparator,\n thousands: formatting.numberGroupSeparator,\n }\n };\n if (!this._locales.includes('__pcfcustomdecimal')) {\n numeral.register('locale', '__pcfcustomdecimal', locale);\n }\n else {\n numeral.locales['__pcfcustomdecimal'] = locale;\n }\n numeral.locale('__pcfcustomdecimal');\n }\n\n public static currency(formatting: ComponentFramework.UserSettingApi.NumberFormattingInfo) {\n const locale = {\n ordinal: (num: number) => {\n return '.';\n },\n currency: {\n symbol: formatting.currencySymbol\n },\n abbreviations: {\n thousand: 'k',\n million: 'm',\n billion: 'b',\n trillion: 't'\n },\n delimiters: {\n decimal: formatting.currencyDecimalSeparator,\n thousands: formatting.currencyGroupSeparator,\n }\n };\n if (!this._locales.includes('__pcfcustomcurrency')) {\n numeral.register('locale', '__pcfcustomcurrency', locale);\n }\n else {\n numeral.locales['__pcfcustomcurrency'] = locale;\n }\n numeral.locale('__pcfcustomcurrency');\n }\n private static get _locales() {\n return Object.keys(numeral.locales);\n }\n}"],"names":[],"mappings":";;MAEa,OAAO,CAAA;IACT,OAAO,OAAO,CAAC,UAAkE,EAAA;AACpF,QAAA,MAAM,MAAM,GAAG;AACX,YAAA,OAAO,EAAE,CAAC,GAAW,KAAI;AACrB,gBAAA,OAAO,GAAG,CAAC;aACd;AACD,YAAA,QAAQ,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,cAAc;AACpC,aAAA;AACD,YAAA,aAAa,EAAE;AACX,gBAAA,QAAQ,EAAE,GAAG;AACb,gBAAA,OAAO,EAAE,GAAG;AACZ,gBAAA,OAAO,EAAE,GAAG;AACZ,gBAAA,QAAQ,EAAE,GAAG;AAChB,aAAA;AACD,YAAA,UAAU,EAAE;gBACR,OAAO,EAAE,UAAU,CAAC,sBAAsB;gBAC1C,SAAS,EAAE,UAAU,CAAC,oBAAoB;AAC7C,aAAA;SACJ,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,C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