@adaptabletools/adaptable 16.0.0-canary.1 → 16.0.0-canary.3

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 (169) hide show
  1. package/base.css +31 -31
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +155 -155
  4. package/index.css +39 -39
  5. package/index.css.map +1 -1
  6. package/package.json +1 -1
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +12 -1
  10. package/src/AdaptableOptions/ActionRowOptions.d.ts +8 -5
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -2
  12. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -2
  13. package/src/AdaptableOptions/FilterOptions.d.ts +1 -0
  14. package/src/AdaptableOptions/FormatColumnOptions.d.ts +51 -0
  15. package/src/AdaptableOptions/GroupingOptions.d.ts +0 -13
  16. package/src/AdaptableOptions/{SearchOptions.d.ts → QuickSearchOptions.d.ts} +3 -3
  17. package/src/AdaptableOptions/QuickSearchOptions.js +2 -0
  18. package/src/AdaptableOptions/TeamSharingOptions.d.ts +5 -0
  19. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +8 -41
  20. package/src/Api/ColumnApi.d.ts +18 -7
  21. package/src/Api/DataChangeHistoryApi.d.ts +6 -0
  22. package/src/Api/EventApi.d.ts +19 -6
  23. package/src/Api/Events/ChexboxColumnClicked.d.ts +1 -0
  24. package/src/Api/Events/ScheduleTriggered.d.ts +11 -0
  25. package/src/Api/Events/ScheduleTriggered.js +2 -0
  26. package/src/Api/Implementation/ActionRowApiImpl.js +7 -5
  27. package/src/Api/Implementation/ApiBase.d.ts +3 -2
  28. package/src/Api/Implementation/ApiBase.js +5 -2
  29. package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -0
  30. package/src/Api/Implementation/ChartingApiImpl.js +4 -0
  31. package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -1
  32. package/src/Api/Implementation/ColumnApiImpl.js +22 -3
  33. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
  34. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +3 -0
  35. package/src/Api/Implementation/OptionsApiImpl.d.ts +3 -2
  36. package/src/Api/Implementation/OptionsApiImpl.js +5 -2
  37. package/src/Api/Implementation/PredicateApiImpl.d.ts +5 -5
  38. package/src/Api/Implementation/PredicateApiImpl.js +8 -8
  39. package/src/Api/Implementation/ScheduleApiImpl.d.ts +4 -0
  40. package/src/Api/Implementation/ScheduleApiImpl.js +5 -0
  41. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +0 -3
  42. package/src/Api/Implementation/StyledColumnApiImpl.js +0 -26
  43. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
  44. package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -0
  45. package/src/Api/Internal/AdaptableInternalApi.js +2 -2
  46. package/src/Api/Internal/AlertInternalApi.js +7 -2
  47. package/src/Api/Internal/FilterInternalApi.js +8 -4
  48. package/src/Api/Internal/FormatColumnInternalApi.js +12 -14
  49. package/src/Api/Internal/ScheduleInternalApi.d.ts +8 -0
  50. package/src/Api/Internal/ScheduleInternalApi.js +20 -0
  51. package/src/Api/Internal/StyledColumnInternalApi.d.ts +5 -2
  52. package/src/Api/Internal/StyledColumnInternalApi.js +29 -2
  53. package/src/Api/Internal/UserInterfaceInternalApi.d.ts +5 -0
  54. package/src/Api/Internal/UserInterfaceInternalApi.js +18 -0
  55. package/src/Api/OptionsApi.d.ts +7 -3
  56. package/src/Api/PredicateApi.d.ts +5 -5
  57. package/src/Api/StyledColumnApi.d.ts +0 -14
  58. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
  59. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +7 -7
  60. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +8 -15
  61. package/src/PredefinedConfig/Common/AdaptablePredicate.js +65 -41
  62. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  63. package/src/PredefinedConfig/StyledColumnState.d.ts +3 -2
  64. package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
  65. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  66. package/src/Redux/ActionsReducers/SystemRedux.js +17 -3
  67. package/src/Redux/Store/AdaptableStore.js +2 -3
  68. package/src/Strategy/AdaptableModuleBase.d.ts +6 -6
  69. package/src/Strategy/FlashingCellModule.js +6 -2
  70. package/src/Strategy/Interface/IModule.d.ts +2 -2
  71. package/src/Strategy/ScheduleModule.js +3 -2
  72. package/src/Strategy/StyledColumnModule.js +24 -15
  73. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  74. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +7 -3
  75. package/src/Utilities/Helpers/AdaptableHelper.js +1 -1
  76. package/src/Utilities/MenuItem.d.ts +4 -4
  77. package/src/Utilities/Services/MetamodelService.js +5 -1
  78. package/src/Utilities/Services/ModuleService.js +1 -1
  79. package/src/Utilities/Services/QueryLanguageService.js +1 -1
  80. package/src/Utilities/Services/RowEditService.js +1 -1
  81. package/src/Utilities/Services/TeamSharingService.d.ts +2 -0
  82. package/src/Utilities/Services/TeamSharingService.js +60 -3
  83. package/src/Utilities/Services/ValidationService.js +6 -2
  84. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +6 -0
  85. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.js +2 -0
  86. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
  87. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +1 -1
  88. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +6 -6
  89. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +32 -23
  90. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +3 -3
  91. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +5 -5
  92. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
  93. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
  94. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +3 -3
  95. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +11 -11
  96. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +3 -3
  97. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +11 -21
  98. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +3 -3
  99. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +6 -7
  100. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +3 -3
  101. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
  102. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +4 -1
  103. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -4
  104. package/src/View/AdaptableWizardView/Wizard.d.ts +4 -1
  105. package/src/View/AdaptableWizardView/Wizard.js +11 -10
  106. package/src/View/Charting/useChartingElements.js +1 -1
  107. package/src/View/Components/AdaptableButton/index.d.ts +3 -0
  108. package/src/View/Components/AdaptableButton/index.js +18 -0
  109. package/src/View/Components/AdaptableIconComponent/index.d.ts +7 -0
  110. package/src/View/Components/AdaptableIconComponent/index.js +16 -0
  111. package/src/View/Components/AdaptableIconComponent/useCustomIcon.d.ts +2 -0
  112. package/src/View/Components/AdaptableIconComponent/useCustomIcon.js +12 -0
  113. package/src/{components → View/Components}/Badge/index.d.ts +1 -1
  114. package/src/{components → View/Components}/Badge/index.js +1 -1
  115. package/src/View/Components/FilterForm/FilterForm.js +1 -1
  116. package/src/View/Components/FilterForm/ListBoxMenu.js +2 -2
  117. package/src/View/Components/FilterForm/QuickFilterForm.js +3 -2
  118. package/src/View/Components/Panels/PanelWithButton.d.ts +2 -2
  119. package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
  120. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
  121. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
  122. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  123. package/src/View/Components/PredicateEditor/PredicateEditor.js +4 -4
  124. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -2
  125. package/src/View/Dashboard/Dashboard.js +4 -4
  126. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -0
  127. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +13 -7
  128. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +7 -1
  129. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
  130. package/src/View/DataChangeHistory/buildActionColumnButton.js +9 -2
  131. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  132. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  133. package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
  134. package/src/View/QuickSearch/QuickSearchStatusBarContent.js +1 -1
  135. package/src/View/QuickSearch/QuickSearchViewPanel.js +1 -1
  136. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
  137. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
  138. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -5
  139. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +2 -9
  140. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -1
  141. package/src/View/UIHelper.d.ts +2 -2
  142. package/src/agGrid/ActionColumnRenderer.d.ts +0 -2
  143. package/src/agGrid/ActionColumnRenderer.js +20 -5
  144. package/src/agGrid/Adaptable.d.ts +5 -2
  145. package/src/agGrid/Adaptable.js +61 -25
  146. package/src/agGrid/BadgeRenderer.js +19 -20
  147. package/src/agGrid/CheckboxRenderer.js +1 -1
  148. package/src/agGrid/agGridHelper.js +4 -2
  149. package/src/agGrid/agGridMenuHelper.js +11 -4
  150. package/src/agGrid/attachAddaptableColumnTypes.d.ts +1 -0
  151. package/src/agGrid/attachAddaptableColumnTypes.js +5 -4
  152. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  153. package/src/components/Icon/index.d.ts +11 -0
  154. package/src/components/{AdaptableIconComponent → Icon}/index.js +10 -10
  155. package/src/components/IconSelector/IconSelector.js +3 -3
  156. package/src/components/SimpleButton/index.js +10 -10
  157. package/src/components/Toggle/Toggle.d.ts +2 -2
  158. package/src/components/Toggle/Toggle.js +2 -2
  159. package/src/components/icons/index.d.ts +4 -4
  160. package/src/components/icons/index.js +6 -6
  161. package/src/metamodel/adaptable.metamodel.d.ts +125 -57
  162. package/src/metamodel/adaptable.metamodel.js +1 -1
  163. package/src/types.d.ts +9 -6
  164. package/version.d.ts +1 -1
  165. package/version.js +1 -1
  166. package/src/View/Components/AdaptableViewIcon/index.d.ts +0 -10
  167. package/src/View/Components/AdaptableViewIcon/index.js +0 -18
  168. package/src/components/AdaptableIconComponent/index.d.ts +0 -11
  169. /package/src/AdaptableOptions/{SearchOptions.js → FormatColumnOptions.js} +0 -0
@@ -1,24 +1,35 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getBadgeRendererForColumn = void 0;
4
- const Badge_1 = require("../components/Badge");
4
+ const Badge_1 = require("../View/Components/Badge");
5
+ const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
5
6
  const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
6
7
  if (!styledColumn.BadgeStyle) {
7
8
  return;
8
9
  }
9
10
  return class BadgetRenderer {
11
+ getAdaptableInstance(params) {
12
+ const adaptable = params.api.__adaptable;
13
+ return adaptable;
14
+ }
10
15
  init(params) {
11
- var _a, _b, _c, _d, _e, _f;
16
+ var _a, _b, _c, _d;
17
+ const adaptable = this.getAdaptableInstance(params);
18
+ const adapatableApi = adaptable.api;
12
19
  this.eGui = document.createElement('div');
13
20
  this.eGui.className = 'ab-Badge__wrapper';
14
21
  const formattedValue = (_c = (_b = (_a = params.formatValue) === null || _a === void 0 ? void 0 : _a.call(params, params.value)) !== null && _b !== void 0 ? _b : params.value) !== null && _c !== void 0 ? _c : '';
15
- const badge = api.styledColumnApi.internalApi.getApplicableBadge(styledColumn, {
22
+ const predicateDefHandlerContext = {
16
23
  value: params.value,
17
24
  oldValue: null,
18
25
  displayValue: params.formatValue,
19
26
  node: params.node,
20
27
  column: abColumn,
21
- });
28
+ adaptableApi: adapatableApi,
29
+ userName: adapatableApi.optionsApi.getUserName(),
30
+ adaptableId: adapatableApi.optionsApi.getAdaptableId(),
31
+ };
32
+ const badge = api.styledColumnApi.internalApi.getApplicableBadge(styledColumn, predicateDefHandlerContext);
22
33
  const isGrouped = params.node.group;
23
34
  const includeGrouped = Boolean(styledColumn.IncludeGroupedRows);
24
35
  const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
@@ -32,24 +43,12 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
32
43
  this.eGui.innerHTML = formattedValue;
33
44
  return;
34
45
  }
35
- let icon = badge.Icon;
36
- if (icon && 'name' in icon && icon.size === undefined) {
37
- icon.size = 14;
38
- }
39
- const userInterfaceOptions = (_d = api.optionsApi.getAdaptableOptions()) === null || _d === void 0 ? void 0 : _d.userInterfaceOptions;
40
- const customDefinedIcons = (_e = userInterfaceOptions.customIcons) !== null && _e !== void 0 ? _e : [];
41
- let customIcon = badge.Icon && 'name' in badge.Icon
42
- ? api.userInterfaceApi.getCustomIconDefinition(badge.Icon.name)
43
- : null;
44
- if (customIcon) {
45
- icon = customIcon;
46
- }
47
- this.unmountReactRoot = api.internalApi.getAdaptableInstance().renderReactRoot((0, Badge_1.Badge)({
46
+ this.unmountReactRoot = api.internalApi.getAdaptableInstance().renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)((0, Badge_1.Badge)({
48
47
  adaptableStyle: badge.Style,
49
48
  children: formattedValue,
50
- icon,
51
- iconPosition: (_f = badge.IconPosition) !== null && _f !== void 0 ? _f : 'start',
52
- }), this.eGui);
49
+ icon: badge.Icon,
50
+ iconPosition: (_d = badge.IconPosition) !== null && _d !== void 0 ? _d : 'start',
51
+ }), adaptable), this.eGui);
53
52
  }
54
53
  getGui() {
55
54
  return this.eGui;
@@ -30,7 +30,7 @@ const getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
30
30
  CheckboxRenderer.prototype.checkedHandler = function (e) {
31
31
  let checked = e.target.checked;
32
32
  this.params.node.setDataValue(columnId, checked);
33
- api.styledColumnApi.fireCheckboxColumnClickedEvent(columnId, this.params.node.data, api.gridApi.getPrimaryKeyValueForRowNode(this.params.node), checked);
33
+ api.styledColumnApi.internalApi.fireCheckboxColumnClickedEvent(columnId, this.params.node.data, api.gridApi.getPrimaryKeyValueForRowNode(this.params.node), checked);
34
34
  };
35
35
  CheckboxRenderer.prototype.suppressEditEvent = function (event) {
36
36
  if (event.target === this.eGui) {
@@ -221,7 +221,7 @@ class agGridHelper {
221
221
  }
222
222
  }
223
223
  // lets set this here one as the function cannot change the result so dont need to run it each time
224
- let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.searchOptions.excludeColumnFromQuickSearch;
224
+ let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.quickSearchOptions.excludeColumnFromQuickSearch;
225
225
  if (excludeColumnFromQuickSearch) {
226
226
  if (excludeColumnFromQuickSearch(abColumn)) {
227
227
  abColumn.isExcludedFromQuickSearch = true;
@@ -494,6 +494,8 @@ class agGridHelper {
494
494
  return 'Date';
495
495
  case 'abColDefObject':
496
496
  return 'Object';
497
+ case 'abColDefStringArray':
498
+ return 'StringArray';
497
499
  case 'abColDefNumberArray':
498
500
  return 'NumberArray';
499
501
  case 'abColDefTupleNumberArray':
@@ -540,7 +542,7 @@ class agGridHelper {
540
542
  }
541
543
  }
542
544
  // if they have selected to clear searches on startup then do it
543
- if (this.adaptable.adaptableOptions.searchOptions.clearSearchesOnStartUp) {
545
+ if (this.adaptable.adaptableOptions.quickSearchOptions.clearSearchesOnStartUp) {
544
546
  if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.adaptable.api.quickSearchApi.getQuickSearchState().QuickSearchText) ||
545
547
  StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.adaptable.api.queryApi.getCurrentQuery()) ||
546
548
  ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.adaptable.api.dataSetApi.getDataSets())) {
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
6
6
  const icons_1 = require("../components/icons");
7
7
  const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
8
- const AdaptableIconComponent_1 = require("../components/AdaptableIconComponent");
8
+ const Icon_1 = require("../components/Icon");
9
9
  // tslint:disable-next-line: class-name
10
10
  class agGridMenuHelper {
11
11
  constructor(adaptable, gridOptions) {
@@ -168,11 +168,18 @@ class agGridMenuHelper {
168
168
  };
169
169
  }
170
170
  mapAdaptableIconToAgGridIcon(adaptableIcon, style) {
171
- if ((0, AdaptableIconComponent_1.isAdaptableElementIcon)(adaptableIcon)) {
172
- return adaptableIcon.element;
171
+ const icon = this.adaptable.api.userInterfaceApi.internalApi.prepareAdaptableIconDef(adaptableIcon);
172
+ if ((0, Icon_1.isAdaptableElementIcon)(icon)) {
173
+ let element = icon.element;
174
+ if (typeof element === 'string') {
175
+ return element;
176
+ }
177
+ // THe element neets to be cloned.
178
+ // when it is used in more than one plce the element is removed from the DOM
179
+ return element.cloneNode(true);
173
180
  }
174
181
  else {
175
- return (0, icons_1.iconToString)(adaptableIcon, {
182
+ return (0, icons_1.iconToString)(icon, {
176
183
  fill: 'var(--ab-color-text-on-primary)',
177
184
  });
178
185
  }
@@ -9,6 +9,7 @@ export declare const attachColumnTypes: (gridOptions: GridOptions) => {
9
9
  abColDefDate: import("@ag-grid-community/core").ColDef<any, any>;
10
10
  abColDefObject: import("@ag-grid-community/core").ColDef<any, any>;
11
11
  abColDefCustom: import("@ag-grid-community/core").ColDef<any, any>;
12
+ abColDefStringArray: import("@ag-grid-community/core").ColDef<any, any>;
12
13
  abColDefNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
13
14
  abColDefTupleNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
14
15
  abColDefObjectNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.attachColumnTypes = void 0;
4
4
  const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
5
5
  const attachColumnTypes = (gridOptions) => {
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
7
7
  gridOptions.columnTypes = (_a = gridOptions.columnTypes) !== null && _a !== void 0 ? _a : {};
8
8
  return Object.assign(gridOptions.columnTypes, {
9
9
  [GeneralConstants_1.AB_SPECIAL_COLUMN]: {},
@@ -13,9 +13,10 @@ const attachColumnTypes = (gridOptions) => {
13
13
  abColDefDate: (_e = gridOptions.columnTypes.abColDefDate) !== null && _e !== void 0 ? _e : {},
14
14
  abColDefObject: (_f = gridOptions.columnTypes.abColDefObject) !== null && _f !== void 0 ? _f : {},
15
15
  abColDefCustom: (_g = gridOptions.columnTypes.abColDefCustom) !== null && _g !== void 0 ? _g : {},
16
- abColDefNumberArray: (_h = gridOptions.columnTypes.abColDefNumberArray) !== null && _h !== void 0 ? _h : {},
17
- abColDefTupleNumberArray: (_j = gridOptions.columnTypes.abColDefTupleNumberArray) !== null && _j !== void 0 ? _j : {},
18
- abColDefObjectNumberArray: (_k = gridOptions.columnTypes.abColDefObjectNumberArray) !== null && _k !== void 0 ? _k : {},
16
+ abColDefStringArray: (_h = gridOptions.columnTypes.abColDefStringArray) !== null && _h !== void 0 ? _h : {},
17
+ abColDefNumberArray: (_j = gridOptions.columnTypes.abColDefNumberArray) !== null && _j !== void 0 ? _j : {},
18
+ abColDefTupleNumberArray: (_k = gridOptions.columnTypes.abColDefTupleNumberArray) !== null && _k !== void 0 ? _k : {},
19
+ abColDefObjectNumberArray: (_l = gridOptions.columnTypes.abColDefObjectNumberArray) !== null && _l !== void 0 ? _l : {},
19
20
  });
20
21
  };
21
22
  exports.attachColumnTypes = attachColumnTypes;
@@ -20,7 +20,7 @@ function getStartValue(params) {
20
20
  return '';
21
21
  }
22
22
  if (params.eventKey && isValidChar(params.eventKey)) {
23
- return params.eventKey;
23
+ return Number(params.eventKey);
24
24
  }
25
25
  return params.value;
26
26
  }
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { AdaptableElementIcon, AdaptableCustomIcon, AdaptableIcon, AdaptableSystemIcon } from '../../PredefinedConfig/Common/AdaptableIcon';
3
+ export interface IconComponentProps {
4
+ icon: AdaptableIcon;
5
+ iconClassName?: string;
6
+ }
7
+ export declare const IconComponent: (props: IconComponentProps) => JSX.Element;
8
+ export declare const isAdaptableSystemIcon: (icon: unknown) => icon is AdaptableSystemIcon;
9
+ export declare const isAdaptableCustomIcon: (icon: unknown) => icon is AdaptableCustomIcon;
10
+ export declare const isAdaptableElementIcon: (icon: unknown) => icon is AdaptableElementIcon;
11
+ export declare const isAdaptableIcon: (icon: unknown) => icon is AdaptableIcon;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isAdaptableIcon = exports.isAdaptableElementIcon = exports.isAdaptableExternalIcon = exports.isAdaptableInternalIcon = exports.AdaptableIconComponent = void 0;
3
+ exports.isAdaptableIcon = exports.isAdaptableElementIcon = exports.isAdaptableCustomIcon = exports.isAdaptableSystemIcon = exports.IconComponent = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const icons_1 = tslib_1.__importStar(require("../icons"));
7
7
  const join_1 = tslib_1.__importDefault(require("../utils/join"));
8
8
  const react_1 = require("react");
9
- const AdaptableIconComponent = (props) => {
9
+ const IconComponent = (props) => {
10
10
  var _a, _b, _c, _d, _e;
11
11
  const { icon, iconClassName } = props;
12
12
  if (!icon) {
@@ -38,10 +38,10 @@ const AdaptableIconComponent = (props) => {
38
38
  }
39
39
  };
40
40
  }, [icon]);
41
- if ((0, exports.isAdaptableInternalIcon)(icon) && icon.name in icons_1.default) {
41
+ if ((0, exports.isAdaptableSystemIcon)(icon) && icon.name in icons_1.default) {
42
42
  return (React.createElement(icons_1.Icon, { name: icon.name, size: icon.size, style: icon.style, className: className }));
43
43
  }
44
- if ((0, exports.isAdaptableExternalIcon)(icon)) {
44
+ if ((0, exports.isAdaptableCustomIcon)(icon)) {
45
45
  let width = (_b = (_a = icon.style) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 'var(--ab-cmp-icon__width)';
46
46
  let height = (_d = (_c = icon.style) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 'var(--ab-cmp-icon__height)';
47
47
  const iconStyle = (_e = icon.style) !== null && _e !== void 0 ? _e : {};
@@ -52,15 +52,15 @@ const AdaptableIconComponent = (props) => {
52
52
  }
53
53
  return null;
54
54
  };
55
- exports.AdaptableIconComponent = AdaptableIconComponent;
56
- const isAdaptableInternalIcon = (icon) => {
55
+ exports.IconComponent = IconComponent;
56
+ const isAdaptableSystemIcon = (icon) => {
57
57
  return typeof (icon === null || icon === void 0 ? void 0 : icon.name) === 'string';
58
58
  };
59
- exports.isAdaptableInternalIcon = isAdaptableInternalIcon;
60
- const isAdaptableExternalIcon = (icon) => {
59
+ exports.isAdaptableSystemIcon = isAdaptableSystemIcon;
60
+ const isAdaptableCustomIcon = (icon) => {
61
61
  return typeof (icon === null || icon === void 0 ? void 0 : icon.src) === 'string';
62
62
  };
63
- exports.isAdaptableExternalIcon = isAdaptableExternalIcon;
63
+ exports.isAdaptableCustomIcon = isAdaptableCustomIcon;
64
64
  const isAdaptableElementIcon = (icon) => {
65
65
  return ((typeof HTMLElement === 'function' &&
66
66
  (icon === null || icon === void 0 ? void 0 : icon.element) instanceof HTMLElement) ||
@@ -68,6 +68,6 @@ const isAdaptableElementIcon = (icon) => {
68
68
  };
69
69
  exports.isAdaptableElementIcon = isAdaptableElementIcon;
70
70
  const isAdaptableIcon = (icon) => {
71
- return ((0, exports.isAdaptableInternalIcon)(icon) || (0, exports.isAdaptableExternalIcon)(icon) || (0, exports.isAdaptableElementIcon)(icon));
71
+ return ((0, exports.isAdaptableSystemIcon)(icon) || (0, exports.isAdaptableCustomIcon)(icon) || (0, exports.isAdaptableElementIcon)(icon));
72
72
  };
73
73
  exports.isAdaptableIcon = isAdaptableIcon;
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const AdaptableInput_1 = tslib_1.__importDefault(require("../../View/Components/AdaptableInput"));
8
- const AdaptableIconComponent_1 = require("../AdaptableIconComponent");
8
+ const Icon_1 = require("../Icon");
9
9
  const icons_1 = tslib_1.__importStar(require("../icons"));
10
10
  const OverlayTrigger_1 = tslib_1.__importDefault(require("../OverlayTrigger"));
11
11
  const SimpleButton_1 = tslib_1.__importDefault(require("../SimpleButton"));
@@ -27,7 +27,7 @@ const IconSelector = (props) => {
27
27
  });
28
28
  const customIconsElements = (_a = props.customIcons) === null || _a === void 0 ? void 0 : _a.map((def) => {
29
29
  return (react_1.default.createElement(IconButton, { key: def.name, active: false, onClick: () => props.onChange(def.name) },
30
- react_1.default.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { key: def.name, icon: def.icon })));
30
+ react_1.default.createElement(Icon_1.IconComponent, { key: def.name, icon: def.icon })));
31
31
  });
32
32
  const popup = (react_1.default.createElement(rebass_1.Box, { className: "ab-IconSelector__Popup" },
33
33
  react_1.default.createElement(rebass_1.Box, { mb: 2 },
@@ -44,7 +44,7 @@ const IconSelector = (props) => {
44
44
  else {
45
45
  const icon = (_b = props.customIcons) === null || _b === void 0 ? void 0 : _b.find((def) => def.name === props.value);
46
46
  if (icon)
47
- value = react_1.default.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: icon.icon });
47
+ value = react_1.default.createElement(Icon_1.IconComponent, { icon: icon.icon });
48
48
  }
49
49
  return (react_1.default.createElement(rebass_1.Flex, { className: "ab-IconSelector" },
50
50
  react_1.default.createElement(OverlayTrigger_1.default, { preventPortalEventPropagation: false, render: () => popup, showEvent: "mouseenter", hideEvent: "mouseleave", hideDelay: 300 },
@@ -8,21 +8,21 @@ const join_1 = tslib_1.__importDefault(require("../utils/join"));
8
8
  const icons_1 = tslib_1.__importDefault(require("../icons"));
9
9
  const Tooltip_1 = tslib_1.__importDefault(require("../Tooltip"));
10
10
  const theme_1 = tslib_1.__importDefault(require("../../theme"));
11
- const AdaptableIconComponent_1 = require("../AdaptableIconComponent");
11
+ const Icon_1 = require("../Icon");
12
12
  exports.baseClassName = 'ab-SimpleButton';
13
13
  const SimpleButton = React.forwardRef((props, theRef) => {
14
14
  var _a, _b;
15
15
  let { children, disabled, variant = 'outlined', tone = 'neutral', iconPosition = 'start', iconSize, className, icon, tooltip, accessLevel: accessLevel, type } = props, buttonProps = tslib_1.__rest(props, ["children", "disabled", "variant", "tone", "iconPosition", "iconSize", "className", "icon", "tooltip", "accessLevel", "type"]);
16
- let adaptableInternalIcon;
17
- if ((0, AdaptableIconComponent_1.isAdaptableInternalIcon)(icon)) {
18
- adaptableInternalIcon = icon;
16
+ let adaptableSystemIcon;
17
+ if ((0, Icon_1.isAdaptableSystemIcon)(icon)) {
18
+ adaptableSystemIcon = icon;
19
19
  }
20
20
  if (typeof icon === 'string' && icons_1.default[icon]) {
21
- adaptableInternalIcon = { name: icon };
21
+ adaptableSystemIcon = { name: icon };
22
22
  }
23
- if (adaptableInternalIcon) {
23
+ if (adaptableSystemIcon) {
24
24
  const iconProps = {
25
- icon: adaptableInternalIcon,
25
+ icon: adaptableSystemIcon,
26
26
  };
27
27
  if (iconSize) {
28
28
  iconProps.icon = Object.assign(Object.assign({}, iconProps.icon), { size: iconSize });
@@ -30,10 +30,10 @@ const SimpleButton = React.forwardRef((props, theRef) => {
30
30
  if (typeof buttonProps.color === 'string') {
31
31
  iconProps.icon = Object.assign(Object.assign({}, iconProps.icon), { style: { color: buttonProps.color } });
32
32
  }
33
- icon = React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, Object.assign({}, iconProps));
33
+ icon = React.createElement(Icon_1.IconComponent, Object.assign({}, iconProps));
34
34
  }
35
- if ((0, AdaptableIconComponent_1.isAdaptableExternalIcon)(icon) || (0, AdaptableIconComponent_1.isAdaptableElementIcon)(icon)) {
36
- icon = React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: icon });
35
+ if ((0, Icon_1.isAdaptableCustomIcon)(icon) || (0, Icon_1.isAdaptableElementIcon)(icon)) {
36
+ icon = React.createElement(Icon_1.IconComponent, { icon: icon });
37
37
  }
38
38
  if (icon) {
39
39
  children =
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { AdaptableInternalIconName } from '../../types';
2
+ import { AdaptableSystemIconName } from '../../types';
3
3
  export declare type ToggleProps = {
4
4
  onPressedChange: (pressed: boolean) => void;
5
5
  pressed?: boolean;
6
- icon?: AdaptableInternalIconName;
6
+ icon?: AdaptableSystemIconName;
7
7
  };
8
8
  export declare const Toggle: React.FunctionComponent<React.PropsWithChildren<ToggleProps>>;
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Toggle = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const AdaptableIconComponent_1 = require("../AdaptableIconComponent");
6
+ const Icon_1 = require("../Icon");
7
7
  const join_1 = tslib_1.__importDefault(require("../utils/join"));
8
8
  const Toggle = (_a) => {
9
9
  var { onPressedChange, pressed, icon, children } = _a, rest = tslib_1.__rest(_a, ["onPressedChange", "pressed", "icon", "children"]);
10
10
  const baseClassName = 'ab-Toggle';
11
11
  return (React.createElement("button", Object.assign({}, rest, { className: (0, join_1.default)(baseClassName, pressed && `${baseClassName}--pressed`), onClick: () => onPressedChange(!pressed) }),
12
- icon && React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: { name: icon } }),
12
+ icon && React.createElement(Icon_1.IconComponent, { icon: { name: icon } }),
13
13
  children));
14
14
  };
15
15
  exports.Toggle = Toggle;
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import { CSSProperties } from 'react';
3
3
  import { IconProps } from './DefaultIcon';
4
- import { AdaptableExternalIcon, AdaptableInternalIcon, AdaptableInternalIconName } from '../../PredefinedConfig/Common/AdaptableIcon';
5
- declare const allIcons: Record<AdaptableInternalIconName, React.FunctionComponent<IconProps>>;
4
+ import { AdaptableCustomIcon, AdaptableSystemIcon, AdaptableSystemIconName } from '../../PredefinedConfig/Common/AdaptableIcon';
5
+ declare const allIcons: Record<AdaptableSystemIconName, React.FunctionComponent<IconProps>>;
6
6
  export declare const Icon: ({ name, style, className, tabIndex, ...props }: {
7
7
  style?: React.CSSProperties;
8
- name: AdaptableInternalIconName;
8
+ name: AdaptableSystemIconName;
9
9
  size?: number;
10
10
  className?: string;
11
11
  tabIndex?: number;
12
12
  props?: React.SVGProps<SVGElement>;
13
13
  }) => JSX.Element;
14
- export declare const iconToString: (icon: AdaptableInternalIcon | AdaptableExternalIcon, style?: CSSProperties) => string;
14
+ export declare const iconToString: (icon: AdaptableSystemIcon | AdaptableCustomIcon, style?: CSSProperties) => string;
15
15
  export default allIcons;
@@ -144,7 +144,7 @@ const instrument_1 = tslib_1.__importDefault(require("./instrument"));
144
144
  const analysis_1 = tslib_1.__importDefault(require("./analysis"));
145
145
  const visibility_1 = tslib_1.__importDefault(require("./visibility"));
146
146
  const visibility_off_1 = tslib_1.__importDefault(require("./visibility-off"));
147
- const AdaptableIconComponent_1 = require("../AdaptableIconComponent");
147
+ const Icon_1 = require("../Icon");
148
148
  const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
149
149
  const allIcons = {
150
150
  search: query_1.default,
@@ -187,8 +187,8 @@ const allIcons = {
187
187
  assignment: state_management_1.default,
188
188
  clipboard: tool_panel_1.default,
189
189
  'traffic-lights': system_status_1.default,
190
- 'add': add_row_1.default,
191
- 'downloaded': updated_row_1.default,
190
+ add: add_row_1.default,
191
+ downloaded: updated_row_1.default,
192
192
  // others
193
193
  edit: edit_1.default,
194
194
  undo: undo_1.default,
@@ -226,7 +226,7 @@ const allIcons = {
226
226
  'sort-desc': sort_desc_1.default,
227
227
  logout: logout_1.default,
228
228
  'import-export': import_export_1.default,
229
- 'paperclip': attach_file_1.default,
229
+ paperclip: attach_file_1.default,
230
230
  info: info_1.default,
231
231
  'cloud-upload': cloud_upload_1.default,
232
232
  upload: upload_1.default,
@@ -265,7 +265,7 @@ const allIcons = {
265
265
  'not-contains': not_contains_1.default,
266
266
  contains: contains_1.default,
267
267
  regex: regex_1.default,
268
- 'target': track_changes_1.default,
268
+ target: track_changes_1.default,
269
269
  menu: menu_1.default,
270
270
  statusbar: statusbar_1.default,
271
271
  dashboard: dashboard_1.default,
@@ -307,7 +307,7 @@ const iconToString = (icon, style) => {
307
307
  if (!icon) {
308
308
  return;
309
309
  }
310
- return ReactDOMServer.renderToString(React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: Object.assign(Object.assign({}, icon), { style: Object.assign(Object.assign({}, icon.style), style) }) }));
310
+ return ReactDOMServer.renderToString(React.createElement(Icon_1.IconComponent, { icon: Object.assign(Object.assign({}, icon), { style: Object.assign(Object.assign({}, icon.style), style) }) }));
311
311
  };
312
312
  exports.iconToString = iconToString;
313
313
  exports.default = allIcons;