@adaptabletools/adaptable 10.0.1 → 10.0.4-canary.1

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 (191) hide show
  1. package/base.css +68 -26
  2. package/index.css +80 -28
  3. package/package.json +1 -1
  4. package/publishTimestamp.d.ts +1 -1
  5. package/publishTimestamp.js +1 -1
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +12 -2
  7. package/src/AdaptableOptions/FilterOptions.d.ts +14 -7
  8. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
  9. package/src/AdaptableOptions/NotificationsOptions.d.ts +3 -1
  10. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +107 -5
  11. package/src/Api/AlertApi.d.ts +1 -1
  12. package/src/Api/CalculatedColumnApi.d.ts +15 -0
  13. package/src/Api/ColumnApi.d.ts +39 -0
  14. package/src/Api/ConfigApi.d.ts +8 -0
  15. package/src/Api/Events/AdaptableReady.d.ts +2 -6
  16. package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
  17. package/src/Api/Events/AlertFired.d.ts +2 -1
  18. package/src/Api/Events/BaseEventInfo.d.ts +10 -0
  19. package/src/{Utilities/Interface/ProgressIndicator.js → Api/Events/BaseEventInfo.js} +0 -0
  20. package/src/Api/Events/CellChanged.d.ts +2 -1
  21. package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
  22. package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
  23. package/src/Api/Events/DashboardChanged.d.ts +2 -1
  24. package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
  25. package/src/Api/Events/GridDataChanged.d.ts +2 -1
  26. package/src/Api/Events/LayoutChanged.d.ts +2 -1
  27. package/src/Api/Events/LiveDataChanged.d.ts +2 -1
  28. package/src/Api/Events/SearchChanged.d.ts +2 -1
  29. package/src/Api/Events/SelectionChanged.d.ts +2 -1
  30. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
  31. package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
  32. package/src/Api/Events/ThemeChanged.d.ts +2 -1
  33. package/src/Api/GridApi.d.ts +34 -8
  34. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
  35. package/src/Api/Implementation/AlertApiImpl.js +22 -15
  36. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
  37. package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
  38. package/src/Api/Implementation/ColumnApiImpl.d.ts +8 -0
  39. package/src/Api/Implementation/ColumnApiImpl.js +69 -36
  40. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  41. package/src/Api/Implementation/ConfigApiImpl.js +28 -17
  42. package/src/Api/Implementation/DashboardApiImpl.js +2 -1
  43. package/src/Api/Implementation/ExportApiImpl.js +4 -4
  44. package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
  45. package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
  46. package/src/Api/Implementation/GridApiImpl.d.ts +9 -0
  47. package/src/Api/Implementation/GridApiImpl.js +28 -10
  48. package/src/Api/Implementation/InternalApiImpl.d.ts +3 -1
  49. package/src/Api/Implementation/InternalApiImpl.js +20 -4
  50. package/src/Api/Implementation/LayoutApiImpl.js +4 -3
  51. package/src/Api/Implementation/ScopeApiImpl.js +11 -11
  52. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
  53. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
  54. package/src/Api/Implementation/ThemeApiImpl.js +1 -0
  55. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +12 -8
  56. package/src/Api/Implementation/UserInterfaceApiImpl.js +69 -87
  57. package/src/Api/InternalApi.d.ts +3 -1
  58. package/src/Api/UserInterfaceApi.d.ts +16 -6
  59. package/src/PredefinedConfig/AlertState.d.ts +4 -0
  60. package/src/PredefinedConfig/CalculatedColumnState.d.ts +4 -37
  61. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
  62. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +33 -33
  63. package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
  64. package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
  65. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +3 -2
  66. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
  67. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
  68. package/src/PredefinedConfig/Common/SpecialColumnSettings.js +2 -0
  69. package/src/PredefinedConfig/FilterState.d.ts +1 -1
  70. package/src/PredefinedConfig/FreeTextColumnState.d.ts +10 -0
  71. package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
  72. package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
  73. package/src/PredefinedConfig/SystemState.d.ts +4 -1
  74. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  75. package/src/Redux/Store/AdaptableStore.js +7 -3
  76. package/src/Strategy/AdaptableModuleBase.js +8 -8
  77. package/src/Strategy/AlertModule.js +12 -11
  78. package/src/Strategy/BulkUpdateModule.js +5 -5
  79. package/src/Strategy/CalculatedColumnModule.js +1 -1
  80. package/src/Strategy/CellSummaryModule.js +3 -3
  81. package/src/Strategy/ConditionalStyleModule.js +3 -3
  82. package/src/Strategy/CustomSortModule.js +2 -2
  83. package/src/Strategy/ExportModule.d.ts +0 -2
  84. package/src/Strategy/ExportModule.js +59 -62
  85. package/src/Strategy/FilterModule.js +4 -4
  86. package/src/Strategy/FormatColumnModule.js +5 -5
  87. package/src/Strategy/FreeTextColumnModule.js +1 -1
  88. package/src/Strategy/LayoutModule.js +3 -3
  89. package/src/Strategy/PlusMinusModule.js +8 -9
  90. package/src/Strategy/SmartEditModule.js +6 -6
  91. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  92. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
  93. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  94. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  95. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  96. package/src/Utilities/Helpers/DateHelper.d.ts +2 -2
  97. package/src/Utilities/Helpers/DateHelper.js +30 -20
  98. package/src/Utilities/Helpers/PreviewHelper.js +2 -2
  99. package/src/Utilities/ObjectFactory.d.ts +1 -1
  100. package/src/Utilities/ObjectFactory.js +14 -2
  101. package/src/Utilities/Services/DataService.js +5 -5
  102. package/src/Utilities/Services/ReportService.js +13 -12
  103. package/src/Utilities/Services/ValidationService.js +4 -5
  104. package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
  105. package/src/Utilities/runIfNotResolvedIn.js +23 -0
  106. package/src/View/AdaptableView.js +1 -1
  107. package/src/View/Alert/AlertPopup.js +1 -1
  108. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
  109. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  110. package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
  111. package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
  112. package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
  113. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
  114. package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
  115. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
  116. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  117. package/src/View/Components/ColumnSelector/index.js +2 -2
  118. package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
  119. package/src/View/Components/FilterForm/FilterForm.js +53 -32
  120. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +3 -0
  121. package/src/View/Components/FilterForm/ListBoxFilterForm.js +14 -5
  122. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
  123. package/src/View/Components/FilterForm/QuickFilterForm.js +72 -31
  124. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
  125. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
  126. package/src/View/Components/NewScopeComponent.js +1 -1
  127. package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
  128. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  129. package/src/View/Components/PreviewResultsPanel.js +1 -1
  130. package/src/View/Components/RangesComponent.js +2 -2
  131. package/src/View/Components/Selectors/ColumnSelector.js +5 -5
  132. package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
  133. package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
  134. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +7 -7
  135. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  136. package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
  137. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
  138. package/src/View/CustomSort/CustomSortEntityRow.js +2 -2
  139. package/src/View/CustomSort/CustomSortPopup.js +1 -1
  140. package/src/View/CustomSort/CustomSortSummary.js +3 -3
  141. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
  142. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
  143. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
  144. package/src/View/Dashboard/Dashboard.js +2 -3
  145. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +5 -5
  146. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
  147. package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
  148. package/src/View/Filter/FilterSummary.js +2 -2
  149. package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
  150. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  151. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  152. package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
  153. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
  154. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  155. package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
  156. package/src/View/GridInfo/GridInfoPopup.js +4 -1
  157. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
  158. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
  159. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
  160. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
  161. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
  162. package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
  163. package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
  164. package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
  165. package/src/View/Query/QueryViewPanel.js +2 -2
  166. package/src/View/UIHelper.d.ts +2 -0
  167. package/src/View/UIHelper.js +10 -1
  168. package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
  169. package/src/agGrid/ActionColumnRenderer.js +21 -4
  170. package/src/agGrid/Adaptable.d.ts +20 -4
  171. package/src/agGrid/Adaptable.js +249 -102
  172. package/src/agGrid/agGridHelper.js +33 -32
  173. package/src/agGrid/agGridMenuHelper.js +2 -2
  174. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
  175. package/src/components/Dashboard/Dashboard.js +1 -1
  176. package/src/components/DropdownButton/index.js +1 -1
  177. package/src/components/ExpressionEditor/index.js +7 -7
  178. package/src/components/Loader/Loader.d.ts +7 -0
  179. package/src/components/Loader/Loader.js +13 -0
  180. package/src/components/Loader/index.d.ts +2 -0
  181. package/src/components/Loader/index.js +7 -0
  182. package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
  183. package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
  184. package/src/metamodel/adaptable.metamodel.d.ts +125 -16
  185. package/src/metamodel/adaptable.metamodel.js +403 -106
  186. package/src/types.d.ts +4 -3
  187. package/version.d.ts +1 -1
  188. package/version.js +1 -1
  189. package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
  190. package/src/View/Export/ProgressIndicator.d.ts +0 -6
  191. package/src/View/Export/ProgressIndicator.js +0 -25
@@ -215,33 +215,33 @@ class agGridHelper {
215
215
  let ColumnGroup = colsToGroups === null || colsToGroups === void 0 ? void 0 : colsToGroups[ColumnId];
216
216
  const abColumn = {
217
217
  Uuid: Uuid_1.createUuid(),
218
- ColumnId,
219
- FriendlyName,
220
- IsPrimaryKey: ColumnId === pkColumn,
221
- DataType: this.getColumnDataType(vendorColumn, false),
222
- Visible: vendorColumn.isVisible(),
223
- ReadOnly: this.isColumnReadonly(colDef),
224
- ColumnGroup,
225
- Sortable: this.isColumnSortable(colDef),
226
- Filterable: this.isColumnFilterable(colDef),
227
- Groupable: this.isColumnGroupable(colDef),
228
- Pivotable: this.isColumnPivotable(colDef),
229
- Aggregatable: this.isColumnAggregetable(colDef),
230
- AvailableAggregationFunctions: null,
231
- AggregationFunction: null,
232
- Moveable: this.isColumnMoveable(colDef),
233
- Hideable: this.isColumnHideable(colDef),
234
- Queryable: this.isColumnQueryable(colDef, ColumnId),
235
- IsGrouped: this.isColumnGrouped(colDef),
236
- IsFixed: this.isColumnFixed(colDef),
218
+ columnId: ColumnId,
219
+ friendlyName: FriendlyName,
220
+ isPrimaryKey: ColumnId === pkColumn,
221
+ dataType: this.getColumnDataType(vendorColumn, false),
222
+ visible: vendorColumn.isVisible(),
223
+ readOnly: this.isColumnReadonly(colDef),
224
+ columnGroup: ColumnGroup,
225
+ sortable: this.isColumnSortable(colDef),
226
+ filterable: this.isColumnFilterable(colDef),
227
+ groupable: this.isColumnGroupable(colDef),
228
+ pivotable: this.isColumnPivotable(colDef),
229
+ aggregatable: this.isColumnAggregetable(colDef),
230
+ availableAggregationFunctions: null,
231
+ aggregationFunction: null,
232
+ moveable: this.isColumnMoveable(colDef),
233
+ hideable: this.isColumnHideable(colDef),
234
+ queryable: this.isColumnQueryable(colDef, ColumnId),
235
+ isGrouped: this.isColumnGrouped(colDef),
236
+ isFixed: this.isColumnFixed(colDef),
237
237
  //TODO add IsPinned??
238
- IsSparkline: this.adaptable.api.sparklineColumnApi.isSparklineColumn(colId),
239
- IsExcludedFromQuickSearch: false,
238
+ isSparkline: this.adaptable.api.sparklineColumnApi.isSparklineColumn(colId),
239
+ isExcludedFromQuickSearch: false,
240
240
  };
241
- if (abColumn.Aggregatable) {
242
- abColumn.AvailableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
241
+ if (abColumn.aggregatable) {
242
+ abColumn.availableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
243
243
  if (typeof colDef.aggFunc === 'string') {
244
- abColumn.AggregationFunction = colDef.aggFunc;
244
+ abColumn.aggregationFunction = colDef.aggFunc;
245
245
  }
246
246
  }
247
247
  // lets set this here one as the function cannot change the result so dont need to run it each time
@@ -249,7 +249,7 @@ class agGridHelper {
249
249
  .excludeColumnFromQuickSearch;
250
250
  if (excludeColumnFromQuickSearch) {
251
251
  if (excludeColumnFromQuickSearch(abColumn)) {
252
- abColumn.IsExcludedFromQuickSearch = true;
252
+ abColumn.isExcludedFromQuickSearch = true;
253
253
  }
254
254
  }
255
255
  return abColumn;
@@ -322,6 +322,7 @@ class agGridHelper {
322
322
  }
323
323
  fireSelectionChangedEvent() {
324
324
  let selectionChangedInfo = {
325
+ adaptableApi: this.adaptable.api,
325
326
  selectedCellInfo: this.adaptable.api.gridApi.getGridState().SelectedCellInfo,
326
327
  selectedRowInfo: this.adaptable.api.gridApi.getGridState().SelectedRowInfo,
327
328
  };
@@ -435,8 +436,8 @@ class agGridHelper {
435
436
  let dataType = Enums_1.DataType.Unknown;
436
437
  // get the column type if already in store (and not unknown)
437
438
  const existingColumn = this.adaptable.api.columnApi.getColumnFromId(column.getId(), logWarning);
438
- if (existingColumn && existingColumn.DataType != Enums_1.DataType.Unknown) {
439
- return existingColumn.DataType;
439
+ if (existingColumn && existingColumn.dataType != Enums_1.DataType.Unknown) {
440
+ return existingColumn.dataType;
440
441
  }
441
442
  // check for column type
442
443
  const colType = column.getColDef().type;
@@ -574,7 +575,7 @@ class agGridHelper {
574
575
  return function compareItemsOfCustomSort(nodeA, nodeB) {
575
576
  let firstGroupedColumn = adaptable.getFirstGroupedColumn();
576
577
  if (firstGroupedColumn) {
577
- const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.ColumnId, adaptable.api.customSortApi.getCustomSortByColumn(firstGroupedColumn.ColumnId), adaptable.api.internalApi.getCustomSortComparer(firstGroupedColumn));
578
+ const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.columnId, adaptable.api.customSortApi.getCustomSortByColumn(firstGroupedColumn.columnId), adaptable.api.internalApi.getCustomSortComparer(firstGroupedColumn));
578
579
  if (definedColumnComparator) {
579
580
  return definedColumnComparator(nodeA.key, nodeB.key);
580
581
  }
@@ -610,10 +611,10 @@ class agGridHelper {
610
611
  headerFontWeight: headerColStyle.fontWeight,
611
612
  height: Number(headerColStyle.height.replace('px', '')),
612
613
  Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
613
- const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.ColumnId}']`);
614
+ const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.columnId}']`);
614
615
  const headerColumnStyle = window.getComputedStyle(headerColumn || headerFirstCol, null);
615
616
  return {
616
- columnFriendlyName: col.FriendlyName,
617
+ columnFriendlyName: col.friendlyName,
617
618
  width: Number(headerColumnStyle.width.replace('px', '')),
618
619
  textAlign: headerColumnStyle.textAlign,
619
620
  };
@@ -629,10 +630,10 @@ class agGridHelper {
629
630
  fontWeight: firstRowStyle.fontWeight,
630
631
  height: Number(firstRowStyle.height.replace('px', '')),
631
632
  Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
632
- const cellElement = document.querySelector(`.ag-cell[col-id='${col.ColumnId}']`);
633
+ const cellElement = document.querySelector(`.ag-cell[col-id='${col.columnId}']`);
633
634
  const headerColumnStyle = window.getComputedStyle(cellElement || firstRow, null);
634
635
  return {
635
- columnFriendlyName: col.FriendlyName,
636
+ columnFriendlyName: col.friendlyName,
636
637
  width: Number(headerColumnStyle.width.replace('px', '')),
637
638
  textAlign: headerColumnStyle.textAlign,
638
639
  };
@@ -223,12 +223,12 @@ class agGridMenuHelper {
223
223
  let isSelectedCell = false;
224
224
  let clickedCell = undefined;
225
225
  if (adaptableColumn) {
226
- clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.ColumnId);
226
+ clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.columnId);
227
227
  }
228
228
  let selectedCellInfo = this.adaptable.setSelectedCells();
229
229
  if (clickedCell && selectedCellInfo) {
230
230
  let matchedCell = selectedCellInfo.gridCells.find((gc) => gc != null &&
231
- gc.columnId == clickedCell.columnId &&
231
+ gc.column == clickedCell.column &&
232
232
  gc.primaryKeyValue == clickedCell.primaryKeyValue);
233
233
  isSelectedCell = matchedCell != null;
234
234
  if (isSelectedCell) {
@@ -20,9 +20,9 @@ function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabled
20
20
  },
21
21
  };
22
22
  const iconProps = button.icon && Object.assign({}, defaultIconProps, button.icon);
23
- let buttonStyle = api.internalApi.getStyleForButton(button, context ? context : { api: api });
24
- let buttonLabel = api.internalApi.getLabelForButton(button, context ? context : { api: api });
25
- let buttonTooltip = api.internalApi.getTooltipForButton(button, context ? context : { api: api });
23
+ let buttonStyle = api.internalApi.getStyleForButton(button, context ? context : { adaptableApi: api });
24
+ let buttonLabel = api.internalApi.getLabelForButton(button, context ? context : { adaptableApi: api });
25
+ let buttonTooltip = api.internalApi.getTooltipForButton(button, context ? context : { adaptableApi: api });
26
26
  return (React.createElement(SimpleButton_1.default, { autoFocus: index === 0, disabled: disabledButtons[index], key: index, tooltip: buttonTooltip, tone: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _a !== void 0 ? _a : defaultTone, variant: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant, "data-text": buttonLabel, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, marginLeft: index ? 2 : 0, onClick: () => {
27
27
  onClick(button);
28
28
  } },
@@ -44,7 +44,7 @@ function Dashboard(props) {
44
44
  return null;
45
45
  }
46
46
  const activeTabTitle = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[activeTabIndex]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : 'Select Toolbar';
47
- return (React.createElement(DropdownButton_1.default, { ml: 1, items: React.Children.map(children, (child, index) => ({
47
+ return (React.createElement(DropdownButton_1.default, { ml: 1, columns: ['label'], items: React.Children.map(children, (child, index) => ({
48
48
  value: String(index),
49
49
  label: child.props.title,
50
50
  onClick: () => setActiveTabIndex(index),
@@ -17,7 +17,7 @@ const defaultListItemStyle = {
17
17
  padding: 'var(--ab-cmp-dropdownbutton-list-item__padding)',
18
18
  };
19
19
  const DropdownButton = React.forwardRef((props, ref) => {
20
- let { columns, overlayProps, listOffset = 10, collapseOnItemClick = true, focusOnClear = true, idProperty = 'id', isItemDisabled, items, children, listMinWidth = 100, listStyle, listItemStyle, listItemClassName, constrainTo, showClearButton = false, onClear, clearButtonProps } = props, domProps = tslib_1.__rest(props, ["columns", "overlayProps", "listOffset", "collapseOnItemClick", "focusOnClear", "idProperty", "isItemDisabled", "items", "children", "listMinWidth", "listStyle", "listItemStyle", "listItemClassName", "constrainTo", "showClearButton", "onClear", "clearButtonProps"]);
20
+ let { columns, overlayProps, listOffset = 10, collapseOnItemClick = true, focusOnClear = true, idProperty = 'id', isItemDisabled, items, children, listMinWidth = 100, listStyle, listItemStyle, listItemClassName, constrainTo, showClearButton = false, onClear, clearButtonProps, onExpand, onCollapse } = props, domProps = tslib_1.__rest(props, ["columns", "overlayProps", "listOffset", "collapseOnItemClick", "focusOnClear", "idProperty", "isItemDisabled", "items", "children", "listMinWidth", "listStyle", "listItemStyle", "listItemClassName", "constrainTo", "showClearButton", "onClear", "clearButtonProps", "onExpand", "onCollapse"]);
21
21
  isItemDisabled = isItemDisabled || ((item) => item.disabled);
22
22
  if (!columns) {
23
23
  columns = ['icon', 'label'];
@@ -47,7 +47,7 @@ function ExpressionEditor(props) {
47
47
  // currently only boolean and scalar expressions support nested calculated columns (calc cols which reference other calc cols)
48
48
  const queryableColumns = type === 'scalar' || type === 'boolean'
49
49
  ? props.columns
50
- : props.columns.filter((c) => !props.api.columnApi.isCalculatedColumn(c.ColumnId));
50
+ : props.columns.filter((c) => !props.api.columnApi.isCalculatedColumn(c.columnId));
51
51
  const dataTableEditor = (React.createElement(React.Fragment, null,
52
52
  React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start", style: { marginTop: 2 } },
53
53
  React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked), style: {
@@ -56,16 +56,16 @@ function ExpressionEditor(props) {
56
56
  paddingTop: 'var(--ab-space-1)',
57
57
  paddingBottom: 'var(--ab-space-1)',
58
58
  } }, 'Show Column IDs')),
59
- React.createElement(FormLayout_1.default, { className: "ab-ExpressionEditor__columns", gridColumnGap: "var(--ab-space-1)", gridRowGap: "var(--ab-space-1)", sizes: ['auto', '100px'], style: { alignItems: 'stretch' } }, queryableColumns.map((column) => (React.createElement(FormLayout_1.FormRow, { key: column.ColumnId, label: React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
59
+ React.createElement(FormLayout_1.default, { className: "ab-ExpressionEditor__columns", gridColumnGap: "var(--ab-space-1)", gridRowGap: "var(--ab-space-1)", sizes: ['auto', '100px'], style: { alignItems: 'stretch' } }, queryableColumns.map((column) => (React.createElement(FormLayout_1.FormRow, { key: column.columnId, label: React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
60
60
  background: 'var(--ab-color-primary)',
61
61
  cursor: 'grab',
62
62
  marginRight: 'var(--ab-space-1)',
63
- }, data: `[${column.ColumnId}]`, "data-name": "column", icon: "drag" },
64
- React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, showColumnIds ? `[${column.ColumnId}]` : column.FriendlyName)) }, column.DataType === 'Number' ? (React.createElement(Input_1.default, { type: "number", "data-name": "column-input", value: data[column.ColumnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.ColumnId]: Number(e.target.value) })), width: "100%", disabled: column.ReadOnly })) : column.DataType === 'String' ? (React.createElement(Input_1.default, { type: "text", "data-name": "column-input", value: data[column.ColumnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.ColumnId]: e.target.value })), width: "100%", disabled: column.ReadOnly })) : column.DataType === 'Date' ? (React.createElement(AdaptableInput_1.default, { type: "date", "data-name": "column-input", value: data[column.ColumnId] && DateHelper_1.isValueValidDate(data[column.ColumnId])
65
- ? new Date(data[column.ColumnId]).toISOString().substr(0, 10)
63
+ }, data: `[${column.columnId}]`, "data-name": "column", icon: "drag" },
64
+ React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, showColumnIds ? `[${column.columnId}]` : column.friendlyName)) }, column.dataType === 'Number' ? (React.createElement(Input_1.default, { type: "number", "data-name": "column-input", value: data[column.columnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: Number(e.target.value) })), width: "100%", disabled: column.readOnly })) : column.dataType === 'String' ? (React.createElement(Input_1.default, { type: "text", "data-name": "column-input", value: data[column.columnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: e.target.value })), width: "100%", disabled: column.readOnly })) : column.dataType === 'Date' ? (React.createElement(AdaptableInput_1.default, { type: "date", "data-name": "column-input", value: data[column.columnId] && DateHelper_1.isValueValidDate(data[column.columnId])
65
+ ? new Date(data[column.columnId]).toISOString().substr(0, 10)
66
66
  : '', onChange: (e) => {
67
- setData(Object.assign(Object.assign({}, data), { [column.ColumnId]: new Date(e.target.value) }));
68
- }, style: { width: '100%' }, disabled: column.ReadOnly })) : column.DataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", checked: data[column.ColumnId], onChange: (checked) => setData(Object.assign(Object.assign({}, data), { [column.ColumnId]: checked })), disabled: column.ReadOnly })) : null))))));
67
+ setData(Object.assign(Object.assign({}, data), { [column.columnId]: new Date(e.target.value) }));
68
+ }, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", checked: data[column.columnId], onChange: (checked) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: checked })), disabled: column.readOnly })) : null))))));
69
69
  const namedQueries = (React.createElement("div", null, props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: { padding: 3, marginTop: 'var(--ab-space-2)', marginBottom: 'var(--ab-space-2)' }, backgroundColor: "primarylight" },
70
70
  ' ',
71
71
  React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export declare const LoaderSpinner: React.FunctionComponent<{
3
+ style?: React.CSSProperties;
4
+ }>;
5
+ export declare const Loader: React.FunctionComponent<{
6
+ style?: React.CSSProperties;
7
+ }>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Loader = exports.LoaderSpinner = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ exports.LoaderSpinner = (props) => {
7
+ return React.createElement("div", { style: props.style, className: "ab-Loader__Spinner" });
8
+ };
9
+ exports.Loader = (props) => {
10
+ return (React.createElement("div", { style: props.style, className: "ab-Loader" },
11
+ React.createElement(exports.LoaderSpinner, null),
12
+ React.createElement("span", { className: "ab-Loader__text" }, props.children)));
13
+ };
@@ -0,0 +1,2 @@
1
+ export { Loader } from './Loader';
2
+ export { LoaderSpinner } from './Loader';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoaderSpinner = exports.Loader = void 0;
4
+ var Loader_1 = require("./Loader");
5
+ Object.defineProperty(exports, "Loader", { enumerable: true, get: function () { return Loader_1.Loader; } });
6
+ var Loader_2 = require("./Loader");
7
+ Object.defineProperty(exports, "LoaderSpinner", { enumerable: true, get: function () { return Loader_2.LoaderSpinner; } });
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const ProgressIndicator: React.FunctionComponent;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProgressIndicator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_redux_1 = require("react-redux");
7
+ const react_1 = require("react");
8
+ const Loader_1 = require("../Loader");
9
+ const AdaptableContext_1 = require("../../View/AdaptableContext");
10
+ exports.ProgressIndicator = () => {
11
+ const { active, label } = react_redux_1.useSelector((state) => state.System.ProgressIndicator);
12
+ const [visible, setVisible] = react_1.useState(false);
13
+ const [progressIndicatorCoordinates, setProgressIndicatorCoordinates] = react_1.useState({
14
+ top: 0,
15
+ left: 0,
16
+ height: 0,
17
+ width: 0,
18
+ });
19
+ const adaptable = AdaptableContext_1.useAdaptable();
20
+ const adaptableContainerRef = react_1.useRef(adaptable.getAdaptableContainerElement());
21
+ const gridContainerRef = react_1.useRef(adaptable.getGridContainerElement());
22
+ const disableAdaptableGrid = (elemRef, disabled) => {
23
+ const DISABLING_CSS_CLASS = 'ab-wait-for-progress-indicator';
24
+ if (!elemRef.current) {
25
+ return;
26
+ }
27
+ if (disabled) {
28
+ elemRef.current.classList.add(DISABLING_CSS_CLASS);
29
+ }
30
+ else {
31
+ elemRef.current.classList.remove(DISABLING_CSS_CLASS);
32
+ }
33
+ };
34
+ const updateGridContainerCoordinates = () => {
35
+ if (!gridContainerRef.current) {
36
+ return;
37
+ }
38
+ const { top, left, height, width } = gridContainerRef.current.getBoundingClientRect();
39
+ setProgressIndicatorCoordinates({ top, left, height, width });
40
+ };
41
+ react_1.useEffect(() => {
42
+ disableAdaptableGrid(adaptableContainerRef, active);
43
+ disableAdaptableGrid(gridContainerRef, active);
44
+ updateGridContainerCoordinates();
45
+ // without RAF the progress indicator would be rendered instantly, without the 'transition-delay' defined via CSS
46
+ requestAnimationFrame(() => {
47
+ setVisible(active);
48
+ });
49
+ }, [active]);
50
+ return (React.createElement(React.Fragment, null, active && (React.createElement("div", { className: `ab-progress-indicator-wrapper ${visible ? 'ab-progress-indicator-wrapper--visible' : ''}`, style: progressIndicatorCoordinates },
51
+ React.createElement("div", { className: "ab-progress-indicator-body" },
52
+ React.createElement(Loader_1.LoaderSpinner, null),
53
+ React.createElement("span", { style: { marginLeft: 'var(--ab-space-2)' } }, label))))));
54
+ };
@@ -14,12 +14,21 @@ export declare const ADAPTABLE_METAMODEL: {
14
14
  description: string;
15
15
  uiLabel: string;
16
16
  isOptional?: undefined;
17
+ reference?: undefined;
17
18
  } | {
18
19
  name: string;
19
20
  kind: string;
20
21
  description: string;
21
22
  uiLabel: string;
22
23
  isOptional: boolean;
24
+ reference: string;
25
+ } | {
26
+ name: string;
27
+ kind: string;
28
+ description: string;
29
+ uiLabel: string;
30
+ isOptional: boolean;
31
+ reference?: undefined;
23
32
  })[];
24
33
  };
25
34
  ActionColumnButtonContext: {
@@ -40,6 +49,26 @@ export declare const ADAPTABLE_METAMODEL: {
40
49
  reference?: undefined;
41
50
  })[];
42
51
  };
52
+ ActionColumnSettings: {
53
+ name: string;
54
+ kind: string;
55
+ description: string;
56
+ properties: ({
57
+ name: string;
58
+ kind: string;
59
+ description: string;
60
+ uiLabel: string;
61
+ isOptional: boolean;
62
+ defaultValue: string;
63
+ } | {
64
+ name: string;
65
+ kind: string;
66
+ description: string;
67
+ uiLabel: string;
68
+ isOptional: boolean;
69
+ defaultValue?: undefined;
70
+ })[];
71
+ };
43
72
  ActionHandler: {
44
73
  name: string;
45
74
  kind: string;
@@ -415,19 +444,12 @@ export declare const ADAPTABLE_METAMODEL: {
415
444
  name: string;
416
445
  kind: string;
417
446
  description: string;
418
- properties: ({
419
- name: string;
420
- kind: string;
421
- description: string;
422
- uiLabel: string;
423
- reference: string;
424
- } | {
447
+ properties: {
425
448
  name: string;
426
449
  kind: string;
427
450
  description: string;
428
451
  uiLabel: string;
429
- reference?: undefined;
430
- })[];
452
+ }[];
431
453
  };
432
454
  AdaptableScope: {
433
455
  name: string;
@@ -736,6 +758,11 @@ export declare const ADAPTABLE_METAMODEL: {
736
758
  uiLabel: string;
737
759
  }[];
738
760
  };
761
+ BulkUpdatePermittedValues: {
762
+ name: string;
763
+ kind: string;
764
+ description: string;
765
+ };
739
766
  ButtonStyle: {
740
767
  name: string;
741
768
  kind: string;
@@ -804,14 +831,14 @@ export declare const ADAPTABLE_METAMODEL: {
804
831
  description: string;
805
832
  uiLabel: string;
806
833
  isOptional: boolean;
807
- defaultValue: string;
834
+ defaultValue?: undefined;
808
835
  } | {
809
836
  name: string;
810
837
  kind: string;
811
838
  description: string;
812
839
  uiLabel: string;
813
840
  isOptional: boolean;
814
- defaultValue?: undefined;
841
+ defaultValue: string;
815
842
  })[];
816
843
  };
817
844
  CalculatedColumnState: {
@@ -905,6 +932,11 @@ export declare const ADAPTABLE_METAMODEL: {
905
932
  kind: string;
906
933
  description: string;
907
934
  };
935
+ CellValuesList: {
936
+ name: string;
937
+ kind: string;
938
+ description: string;
939
+ };
908
940
  ChartApi: {
909
941
  name: string;
910
942
  kind: string;
@@ -1155,6 +1187,11 @@ export declare const ADAPTABLE_METAMODEL: {
1155
1187
  uiLabel: string;
1156
1188
  }[];
1157
1189
  };
1190
+ CustomSortPermittedValues: {
1191
+ name: string;
1192
+ kind: string;
1193
+ description: string;
1194
+ };
1158
1195
  CustomSortState: {
1159
1196
  name: string;
1160
1197
  kind: string;
@@ -1367,8 +1404,15 @@ export declare const ADAPTABLE_METAMODEL: {
1367
1404
  kind: string;
1368
1405
  description: string;
1369
1406
  uiLabel: string;
1370
- isOptional?: undefined;
1371
1407
  reference?: undefined;
1408
+ isOptional?: undefined;
1409
+ } | {
1410
+ name: string;
1411
+ kind: string;
1412
+ description: string;
1413
+ uiLabel: string;
1414
+ reference: string;
1415
+ isOptional?: undefined;
1372
1416
  } | {
1373
1417
  name: string;
1374
1418
  kind: string;
@@ -1488,6 +1532,11 @@ export declare const ADAPTABLE_METAMODEL: {
1488
1532
  defaultValue: string;
1489
1533
  }[];
1490
1534
  };
1535
+ EditLookUpPermittedValues: {
1536
+ name: string;
1537
+ kind: string;
1538
+ description: string;
1539
+ };
1491
1540
  EditOptions: {
1492
1541
  name: string;
1493
1542
  kind: string;
@@ -1773,6 +1822,18 @@ export declare const ADAPTABLE_METAMODEL: {
1773
1822
  defaultValue?: undefined;
1774
1823
  })[];
1775
1824
  };
1825
+ FilterPermittedValues: {
1826
+ name: string;
1827
+ kind: string;
1828
+ description: string;
1829
+ properties: {
1830
+ name: string;
1831
+ kind: string;
1832
+ description: string;
1833
+ uiLabel: string;
1834
+ isOptional: boolean;
1835
+ }[];
1836
+ };
1776
1837
  FilterState: {
1777
1838
  name: string;
1778
1839
  kind: string;
@@ -1927,6 +1988,7 @@ export declare const ADAPTABLE_METAMODEL: {
1927
1988
  uiLabel: string;
1928
1989
  isOptional?: undefined;
1929
1990
  defaultValue?: undefined;
1991
+ reference?: undefined;
1930
1992
  } | {
1931
1993
  name: string;
1932
1994
  kind: string;
@@ -1934,6 +1996,7 @@ export declare const ADAPTABLE_METAMODEL: {
1934
1996
  uiLabel: string;
1935
1997
  isOptional: boolean;
1936
1998
  defaultValue: string;
1999
+ reference?: undefined;
1937
2000
  } | {
1938
2001
  name: string;
1939
2002
  kind: string;
@@ -1941,6 +2004,15 @@ export declare const ADAPTABLE_METAMODEL: {
1941
2004
  uiLabel: string;
1942
2005
  isOptional: boolean;
1943
2006
  defaultValue?: undefined;
2007
+ reference?: undefined;
2008
+ } | {
2009
+ name: string;
2010
+ kind: string;
2011
+ description: string;
2012
+ uiLabel: string;
2013
+ isOptional: boolean;
2014
+ reference: string;
2015
+ defaultValue?: undefined;
1944
2016
  })[];
1945
2017
  };
1946
2018
  FreeTextColumnApi: {
@@ -1954,6 +2026,11 @@ export declare const ADAPTABLE_METAMODEL: {
1954
2026
  uiLabel: string;
1955
2027
  }[];
1956
2028
  };
2029
+ FreeTextColumnSettings: {
2030
+ name: string;
2031
+ kind: string;
2032
+ description: string;
2033
+ };
1957
2034
  FreeTextColumnState: {
1958
2035
  name: string;
1959
2036
  kind: string;
@@ -2099,22 +2176,22 @@ export declare const ADAPTABLE_METAMODEL: {
2099
2176
  kind: string;
2100
2177
  description: string;
2101
2178
  uiLabel: string;
2179
+ reference: string;
2102
2180
  isOptional?: undefined;
2103
- reference?: undefined;
2104
2181
  } | {
2105
2182
  name: string;
2106
2183
  kind: string;
2107
2184
  description: string;
2108
2185
  uiLabel: string;
2109
- isOptional: boolean;
2110
2186
  reference?: undefined;
2187
+ isOptional?: undefined;
2111
2188
  } | {
2112
2189
  name: string;
2113
2190
  kind: string;
2114
2191
  description: string;
2115
2192
  uiLabel: string;
2116
- reference: string;
2117
- isOptional?: undefined;
2193
+ isOptional: boolean;
2194
+ reference?: undefined;
2118
2195
  })[];
2119
2196
  };
2120
2197
  GridDataChangedInfo: {
@@ -2531,6 +2608,18 @@ export declare const ADAPTABLE_METAMODEL: {
2531
2608
  kind: string;
2532
2609
  description: string;
2533
2610
  };
2611
+ PermittedValues: {
2612
+ name: string;
2613
+ kind: string;
2614
+ description: string;
2615
+ properties: {
2616
+ name: string;
2617
+ kind: string;
2618
+ description: string;
2619
+ uiLabel: string;
2620
+ isOptional: boolean;
2621
+ }[];
2622
+ };
2534
2623
  PluginsApi: {
2535
2624
  name: string;
2536
2625
  kind: string;
@@ -3025,6 +3114,26 @@ export declare const ADAPTABLE_METAMODEL: {
3025
3114
  isOptional: boolean;
3026
3115
  }[];
3027
3116
  };
3117
+ SpecialColumnSettings: {
3118
+ name: string;
3119
+ kind: string;
3120
+ description: string;
3121
+ properties: ({
3122
+ name: string;
3123
+ kind: string;
3124
+ description: string;
3125
+ uiLabel: string;
3126
+ isOptional: boolean;
3127
+ defaultValue: string;
3128
+ } | {
3129
+ name: string;
3130
+ kind: string;
3131
+ description: string;
3132
+ uiLabel: string;
3133
+ isOptional: boolean;
3134
+ defaultValue?: undefined;
3135
+ })[];
3136
+ };
3028
3137
  StateOptions: {
3029
3138
  name: string;
3030
3139
  kind: string;