@adaptabletools/adaptable 12.0.9 → 12.1.0-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/base.css +231 -120
  2. package/bundle.cjs.js +143 -114
  3. package/index.css +268 -130
  4. package/package.json +3 -3
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
  8. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +1 -2
  9. package/src/Api/ColumnApi.d.ts +5 -0
  10. package/src/Api/FilterApi.d.ts +15 -1
  11. package/src/Api/Implementation/CalculatedColumnApiImpl.js +2 -3
  12. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -0
  13. package/src/Api/Implementation/ColumnApiImpl.js +10 -0
  14. package/src/Api/Implementation/FilterApiImpl.d.ts +6 -1
  15. package/src/Api/Implementation/FilterApiImpl.js +58 -0
  16. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -1
  17. package/src/Api/Implementation/LayoutApiImpl.js +8 -16
  18. package/src/Api/Implementation/ScheduleApiImpl.js +4 -1
  19. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  20. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +7 -2
  21. package/src/PredefinedConfig/LayoutState.d.ts +2 -0
  22. package/src/PredefinedConfig/ScheduleState.d.ts +4 -0
  23. package/src/Redux/Store/AdaptableStore.js +11 -5
  24. package/src/Strategy/AlertModule.js +2 -2
  25. package/src/Strategy/CustomSortModule.js +2 -2
  26. package/src/Strategy/ExportModule.js +2 -2
  27. package/src/Strategy/FlashingCellModule.js +3 -3
  28. package/src/Strategy/FormatColumnModule.js +2 -2
  29. package/src/Strategy/LayoutModule.js +10 -17
  30. package/src/Strategy/ShortcutModule.js +1 -1
  31. package/src/Strategy/Utilities/{getAlertBehaviourViewItems.d.ts → Alert/getAlertBehaviourViewItems.d.ts} +0 -0
  32. package/src/Strategy/Utilities/{getAlertBehaviourViewItems.js → Alert/getAlertBehaviourViewItems.js} +2 -2
  33. package/src/Strategy/Utilities/{getAlertPreviewViewItems.d.ts → Alert/getAlertPreviewViewItems.d.ts} +2 -2
  34. package/src/Strategy/Utilities/{getAlertPreviewViewItems.js → Alert/getAlertPreviewViewItems.js} +2 -2
  35. package/src/Strategy/Utilities/{getCustomSortColumnViewItems.d.ts → CustomSort/getCustomSortColumnViewItems.d.ts} +1 -1
  36. package/src/Strategy/Utilities/{getCustomSortColumnViewItems.js → CustomSort/getCustomSortColumnViewItems.js} +0 -0
  37. package/src/Strategy/Utilities/{getCustomSortSortOrderViewItems.d.ts → CustomSort/getCustomSortSortOrderViewItems.d.ts} +1 -1
  38. package/src/Strategy/Utilities/{getCustomSortSortOrderViewItems.js → CustomSort/getCustomSortSortOrderViewItems.js} +0 -0
  39. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +3 -0
  40. package/src/Strategy/Utilities/{getExportColumnsViewItems.js → Export/getExportColumnsViewItems.js} +0 -0
  41. package/src/Strategy/Utilities/{getExportRowsViewItems.d.ts → Export/getExportRowsViewItems.d.ts} +0 -0
  42. package/src/Strategy/Utilities/{getExportRowsViewItems.js → Export/getExportRowsViewItems.js} +0 -0
  43. package/src/Strategy/Utilities/{getFlashingCellDurationViewItems.d.ts → FlashingCell/getFlashingCellDurationViewItems.d.ts} +1 -1
  44. package/src/Strategy/Utilities/{getFlashingCellDurationViewItems.js → FlashingCell/getFlashingCellDurationViewItems.js} +0 -0
  45. package/src/Strategy/Utilities/{getFlashingCellStyleViewItems.d.ts → FlashingCell/getFlashingCellStyleViewItems.d.ts} +1 -1
  46. package/src/Strategy/Utilities/{getFlashingCellStyleViewItems.js → FlashingCell/getFlashingCellStyleViewItems.js} +1 -1
  47. package/src/Strategy/Utilities/{getFlashingTargetViewItems.d.ts → FlashingCell/getFlashingTargetViewItems.d.ts} +1 -1
  48. package/src/Strategy/Utilities/{getFlashingTargetViewItems.js → FlashingCell/getFlashingTargetViewItems.js} +0 -0
  49. package/src/Strategy/Utilities/{getFormatColumnSettingsViewItems.d.ts → FormatColumn/getFormatColumnSettingsViewItems.d.ts} +1 -1
  50. package/src/Strategy/Utilities/{getFormatColumnSettingsViewItems.js → FormatColumn/getFormatColumnSettingsViewItems.js} +0 -0
  51. package/src/Strategy/Utilities/{getFormatColumnStyleViewItems.d.ts → FormatColumn/getFormatColumnStyleViewItems.d.ts} +0 -0
  52. package/src/Strategy/Utilities/{getFormatColumnStyleViewItems.js → FormatColumn/getFormatColumnStyleViewItems.js} +1 -1
  53. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.d.ts +5 -0
  54. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +24 -0
  55. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +5 -0
  56. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +14 -0
  57. package/src/Strategy/Utilities/{getShortcutSettingsViewItems.d.ts → Shortcut/getShortcutSettingsViewItems.d.ts} +1 -1
  58. package/src/Strategy/Utilities/{getShortcutSettingsViewItems.js → Shortcut/getShortcutSettingsViewItems.js} +0 -0
  59. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +4 -2
  60. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +134 -0
  61. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +1 -1
  62. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -6
  63. package/src/Utilities/ObjectFactory.d.ts +1 -1
  64. package/src/Utilities/ObjectFactory.js +12 -11
  65. package/src/Utilities/Services/CalculatedColumnExpressionService.js +32 -4
  66. package/src/View/AdaptableView.js +2 -2
  67. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +27 -1
  68. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +46 -36
  69. package/src/View/Components/FilterForm/ListBoxFilterForm.js +5 -4
  70. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +4 -2
  71. package/src/View/Components/Popups/AdaptableToaster.js +15 -33
  72. package/src/View/Components/ValueSelector/index.d.ts +10 -1
  73. package/src/View/Components/ValueSelector/index.js +16 -8
  74. package/src/View/FormatColumn/FormatColumnSummary.js +2 -1
  75. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  76. package/src/View/Layout/Wizard/LayoutWizard.d.ts +4 -7
  77. package/src/View/Layout/Wizard/LayoutWizard.js +127 -13
  78. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +8 -0
  79. package/src/View/Layout/Wizard/sections/AggregationsSection.js +102 -0
  80. package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +8 -0
  81. package/src/View/Layout/Wizard/sections/ColumnsSection.js +226 -0
  82. package/src/View/Layout/Wizard/sections/FilterSection.d.ts +8 -0
  83. package/src/View/Layout/Wizard/sections/FilterSection.js +35 -0
  84. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +8 -0
  85. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +39 -0
  86. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +8 -0
  87. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +46 -0
  88. package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +8 -0
  89. package/src/View/Layout/Wizard/sections/SettingsSection.js +51 -0
  90. package/src/View/Layout/Wizard/sections/SortSection.d.ts +8 -0
  91. package/src/View/Layout/Wizard/sections/SortSection.js +69 -0
  92. package/src/View/Layout/Wizard/sections/Utilities.d.ts +2 -0
  93. package/src/View/Layout/Wizard/sections/Utilities.js +5 -0
  94. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +7 -2
  95. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
  96. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
  97. package/src/View/StatusBar/StatusBarPanel.js +1 -1
  98. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
  99. package/src/View/Wizard/OnePageAdaptableWizard.js +3 -3
  100. package/src/View/Wizard/OnePageWizards.d.ts +1 -0
  101. package/src/View/Wizard/OnePageWizards.js +1 -1
  102. package/src/agGrid/Adaptable.d.ts +2 -0
  103. package/src/agGrid/Adaptable.js +33 -9
  104. package/src/agGrid/agGridHelper.js +11 -1
  105. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -0
  106. package/src/components/ExpressionEditor/index.js +1 -1
  107. package/src/components/Tabs/index.js +4 -2
  108. package/src/components/icons/arrow-down-long.d.ts +3 -0
  109. package/src/components/icons/arrow-down-long.js +7 -0
  110. package/src/components/icons/arrow-up-long.d.ts +3 -0
  111. package/src/components/icons/arrow-up-long.js +7 -0
  112. package/src/components/icons/index.js +4 -0
  113. package/src/metamodel/adaptable.metamodel.d.ts +9 -0
  114. package/src/metamodel/adaptable.metamodel.js +1 -1
  115. package/src/types.d.ts +1 -1
  116. package/version.d.ts +1 -1
  117. package/version.js +1 -1
  118. package/src/Strategy/Utilities/getExportColumnsViewItems.d.ts +0 -3
  119. package/src/View/Layout/LayoutEntityRow.d.ts +0 -13
  120. package/src/View/Layout/LayoutEntityRow.js +0 -23
  121. package/src/View/Layout/LayoutPopup.d.ts +0 -32
  122. package/src/View/Layout/LayoutPopup.js +0 -153
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdaptableObjectList = exports.AdaptableObjectListItem = void 0;
3
+ exports.AdaptableObjectList = exports.AdaptableObjectListItem = exports.AdaptableObjectListItemView = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
@@ -15,9 +15,46 @@ const ButtonShare_1 = require("../Buttons/ButtonShare");
15
15
  const SuspendToggleButton_1 = require("../Buttons/SuspendToggleButton/SuspendToggleButton");
16
16
  const ValueSelector_1 = require("../ValueSelector");
17
17
  const ICON_SIZE = 26;
18
- const baseClassName = 'ab-Adaptable-Object-List';
18
+ const LIST_BASE_CLASS_NAME = 'ab-Adaptable-Object-List';
19
+ const ITEM_BASE_CLASS_NAME = `${LIST_BASE_CLASS_NAME}__Item`;
20
+ const AdaptableObjectListItemView = (props) => {
21
+ var _a, _b, _c;
22
+ const baseClassName = ITEM_BASE_CLASS_NAME;
23
+ return (React.createElement(rebass_1.Flex, { "data-name": "adaptable-object-list-item", "data-value": props.abObject.Uuid, as: "li", mb: 3, className: join_1.default(props.className, baseClassName), style: props.style },
24
+ React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__rows` }, (_c = (_b = (_a = props.items).filter) === null || _b === void 0 ? void 0 : _b.call(_a, Boolean)) === null || _c === void 0 ? void 0 : _c.map((tag, index) => {
25
+ var _a;
26
+ let labelEl = tag.label;
27
+ if (typeof tag.label === 'function') {
28
+ labelEl = React.createElement(tag.label, { data: props.abObject });
29
+ }
30
+ labelEl = labelEl !== null && labelEl !== void 0 ? labelEl : tag.name;
31
+ return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index, mb: 2, className: `${baseClassName}__row` },
32
+ React.createElement(rebass_1.Box, { className: `${baseClassName}__label`, mr: 3 },
33
+ labelEl,
34
+ props.showEditButton && (React.createElement(SimpleButton_1.default, { accessLevel: props.accessLevel, className: `${baseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
35
+ props.handleOnEdit(tag.name);
36
+ } }))),
37
+ React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__values` },
38
+ tag.view &&
39
+ React.createElement(tag.view, {
40
+ data: props.abObject,
41
+ }),
42
+ Boolean((tag === null || tag === void 0 ? void 0 : tag.values) && ((_a = tag === null || tag === void 0 ? void 0 : tag.values) === null || _a === void 0 ? void 0 : _a.length)) && (React.createElement(ValueSelector_1.ValueOptionsTags, { style: { marginRight: 0 }, readOnly: true, options: tag.values, value: tag.values, allowWrap: true, toIdentifier: (c) => c, toLabel: (c) => React.createElement(React.Fragment, null, c) })))));
43
+ })),
44
+ props.showActions && (React.createElement(rebass_1.Flex, { flexDirection: "column", className: `${baseClassName}__buttons` },
45
+ React.createElement(rebass_1.Flex, { justifyContent: "end" },
46
+ props.actions,
47
+ props.teamSharingActivated && (React.createElement(ButtonShare_1.ButtonShare, { iconSize: ICON_SIZE, Header: `TeamSharing ${props.entityType}`, accessLevel: props.accessLevel, onShare: props.onShare })),
48
+ props.onDelete && (React.createElement(SimpleButton_1.default, { "data-name": "delete", disabled: props.deleteDisabled, iconSize: ICON_SIZE, tooltip: props.deleteTooltip, icon: "trash", onClick: props.onDelete, variant: "text" })),
49
+ props.deleteAction && (React.createElement(ButtonDelete_1.ButtonDelete, { disabled: props.deleteDisabled, tooltip: props.deleteTooltip, iconSize: ICON_SIZE, ConfirmationMsg: `Are you sure you want to delete this ${props.entityType}?`, ConfirmationTitle: `Delete ${props.entityType}`, ConfirmAction: props.deleteAction, accessLevel: props.accessLevel })),
50
+ props.showEditButton && (React.createElement(ButtonEdit_1.ButtonEdit, { iconSize: ICON_SIZE, disabled: props.editDisabled, accessLevel: props.accessLevel, onClick: () => props.handleOnEdit() }))),
51
+ React.createElement(rebass_1.Box, { flex: 1 }),
52
+ props.suspendedEnabled && (React.createElement(rebass_1.Flex, { justifyContent: "end" },
53
+ React.createElement(SuspendToggleButton_1.SuspendToggleButton, { onSuspend: props.onSuspend, onUnSuspend: props.onUnSuspend, suspendableObject: props.abObject, accessLevel: props.accessLevel })))))));
54
+ };
55
+ exports.AdaptableObjectListItemView = AdaptableObjectListItemView;
19
56
  const AdaptableObjectListItem = (props) => {
20
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
57
+ var _a, _b, _c, _d, _e, _f;
21
58
  const adaptable = AdaptableContext_1.useAdaptable();
22
59
  const dispatch = react_redux_1.useDispatch();
23
60
  const [isEditWizardVisible, setIsEditWizardVisible] = React.useState(false);
@@ -34,8 +71,8 @@ const AdaptableObjectListItem = (props) => {
34
71
  .getEntitlementService()
35
72
  .getEntitlementAccessLevelForModule(props.module.moduleInfo.ModuleName);
36
73
  const accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(props.data.abObject, moduleAccessLevel);
37
- const itemBaseClassName = `${baseClassName}__Item`;
38
- const itemClassName = join_1.default(props.data.className, itemBaseClassName, props.data.abObject.IsSuspended && `${itemBaseClassName}--is-suspended`);
74
+ const itemClassName = join_1.default(props.data.className, ITEM_BASE_CLASS_NAME, props.data.abObject.IsSuspended &&
75
+ `${ITEM_BASE_CLASS_NAME}--is-suspended`);
39
76
  const handleCloseWizard = React.useCallback(() => {
40
77
  setIsEditWizardVisible(false);
41
78
  setWizardStepName(null);
@@ -60,41 +97,14 @@ const AdaptableObjectListItem = (props) => {
60
97
  });
61
98
  const isEditDisabled = !Boolean(EditWizard || viewOptions.onOpenEditPopup);
62
99
  const showActions = !props.hideControls;
63
- return (React.createElement(rebass_1.Flex, { "data-name": "adaptable-object-list-item", "data-value": props.data.abObject.Uuid, as: "li", mb: 3, className: itemClassName, style: props.data.style },
64
- React.createElement(rebass_1.Box, { flex: 1, className: `${itemBaseClassName}__rows` }, (_j = (_h = (_g = props.data.items).filter) === null || _h === void 0 ? void 0 : _h.call(_g, Boolean)) === null || _j === void 0 ? void 0 : _j.map((tag, index) => {
65
- var _a;
66
- let labelEl = tag.label;
67
- if (typeof tag.label === 'function') {
68
- labelEl = React.createElement(tag.label, { data: props.data.abObject });
69
- }
70
- labelEl = labelEl !== null && labelEl !== void 0 ? labelEl : tag.name;
71
- return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index, mb: 2, className: `${itemBaseClassName}__row` },
72
- React.createElement(rebass_1.Box, { className: `${itemBaseClassName}__label`, mr: 3 },
73
- labelEl,
74
- EditWizard && (React.createElement(SimpleButton_1.default, { accessLevel: accessLevel, className: `${itemBaseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
75
- handleOnEdit(tag.name);
76
- } }))),
77
- React.createElement(rebass_1.Box, { flex: 1, className: `${itemBaseClassName}__values` },
78
- tag.view &&
79
- React.createElement(tag.view, {
80
- data: props.data.abObject,
81
- }),
82
- Boolean((tag === null || tag === void 0 ? void 0 : tag.values) && ((_a = tag === null || tag === void 0 ? void 0 : tag.values) === null || _a === void 0 ? void 0 : _a.length)) && (React.createElement(ValueSelector_1.ValueOptionsTags, { style: { marginRight: 0 }, readOnly: true, options: tag.values, value: tag.values, allowWrap: true, toIdentifier: (c) => c, toLabel: (c) => React.createElement(React.Fragment, null, c) })))));
83
- })),
84
- showActions && (React.createElement(rebass_1.Flex, { flexDirection: "column", className: `${itemBaseClassName}__buttons` },
85
- React.createElement(rebass_1.Flex, { justifyContent: "end" },
86
- actions,
87
- teamSharingActivated && (React.createElement(ButtonShare_1.ButtonShare, { iconSize: ICON_SIZE, Header: `TeamSharing ${entityType}`, accessLevel: accessLevel, onShare: (config) => adaptable.api.teamSharingApi.shareEntity(props.data.abObject, props.module.moduleInfo.ModuleName, config) })),
88
- deleteAction && (React.createElement(ButtonDelete_1.ButtonDelete, { disabled: props.deleteDisabled, tooltip: props.deleteTooltip, iconSize: ICON_SIZE, ConfirmationMsg: `Are you sure you want to delete this ${entityType}?`, ConfirmationTitle: `Delete ${entityType}`, ConfirmAction: deleteAction, accessLevel: accessLevel })),
89
- React.createElement(ButtonEdit_1.ButtonEdit, { iconSize: ICON_SIZE, disabled: isEditDisabled, accessLevel: accessLevel, onClick: () => handleOnEdit() })),
90
- React.createElement(rebass_1.Box, { flex: 1 }),
91
- hasSuspend && (React.createElement(rebass_1.Flex, { justifyContent: "end" },
92
- React.createElement(SuspendToggleButton_1.SuspendToggleButton, { onSuspend: () => dispatch(viewOptions.getSuspendAction(props.data.abObject)), onUnSuspend: () => dispatch(viewOptions.getUnSuspendAction(props.data.abObject)), suspendableObject: props.data.abObject, accessLevel: accessLevel }))))),
100
+ const showEditButton = Boolean(EditWizard);
101
+ return (React.createElement(React.Fragment, null,
102
+ React.createElement(exports.AdaptableObjectListItemView, { abObject: props.data.abObject, accessLevel: accessLevel, actions: actions, className: itemClassName, handleOnEdit: handleOnEdit, items: props.data.items, showActions: showActions, showEditButton: showEditButton, style: props.data.style, teamSharingActivated: teamSharingActivated, onShare: (config) => adaptable.api.teamSharingApi.shareEntity(props.data.abObject, props.module.moduleInfo.ModuleName, config), entityType: entityType, deleteAction: deleteAction, deleteDisabled: props.deleteDisabled, deleteTooltip: props.deleteTooltip, editDisabled: isEditDisabled, suspendedEnabled: hasSuspend, onSuspend: () => dispatch(viewOptions.getSuspendAction(props.data.abObject)), onUnSuspend: () => dispatch(viewOptions.getUnSuspendAction(props.data.abObject)) }),
93
103
  isEditWizardVisible && EditWizard && (React.createElement(EditWizard, { defaultCurrentSectionName: wizardStepName, moduleInfo: props.module.moduleInfo, data: props.data.abObject, configEntities: null, onCloseWizard: handleCloseWizard, onFinishWizard: handleCloseWizard }))));
94
104
  };
95
105
  exports.AdaptableObjectListItem = AdaptableObjectListItem;
96
106
  const AdaptableObjectList = (props) => {
97
107
  var _a;
98
- return (React.createElement("ul", { className: baseClassName }, (_a = props === null || props === void 0 ? void 0 : props.items) === null || _a === void 0 ? void 0 : _a.map((item) => (React.createElement(exports.AdaptableObjectListItem, { key: item.abObject.Uuid, data: item, module: props.module })))));
108
+ return (React.createElement("ul", { className: LIST_BASE_CLASS_NAME }, (_a = props === null || props === void 0 ? void 0 : props.items) === null || _a === void 0 ? void 0 : _a.map((item) => (React.createElement(exports.AdaptableObjectListItem, Object.assign({ key: item.abObject.Uuid, data: item, module: props.module }, props.itemProps))))));
99
109
  };
100
110
  exports.AdaptableObjectList = AdaptableObjectList;
@@ -41,14 +41,15 @@ const ListBoxFilterForm = (props) => {
41
41
  }
42
42
  };
43
43
  const columnValuesItemsElements = props.columnDistinctValues.map((distinctValue, index) => {
44
+ var _a, _b, _c;
44
45
  const isActive = UiSelectedColumnValues.indexOf(distinctValue.value) >= 0;
45
- const columnValue = distinctValue.value;
46
- if (StringExtensions_1.StringExtensions.IsNullOrEmpty(columnValue)) {
46
+ const columnLabel = distinctValue.label;
47
+ if (StringExtensions_1.StringExtensions.IsNullOrEmpty(columnLabel)) {
47
48
  return null;
48
49
  }
49
50
  if (!props.suppressClientSideFilter &&
50
51
  StringExtensions_1.StringExtensions.IsNotNullOrEmpty(FilterValue) &&
51
- columnValue.toLocaleLowerCase().indexOf(FilterValue.toLocaleLowerCase()) < 0) {
52
+ ((_c = (_a = columnLabel === null || columnLabel === void 0 ? void 0 : columnLabel.toLocaleLowerCase) === null || _a === void 0 ? void 0 : (_b = _a.call(columnLabel)).indexOf) === null || _c === void 0 ? void 0 : _c.call(_b, FilterValue.toLocaleLowerCase())) < 0) {
52
53
  return null;
53
54
  }
54
55
  if (props.useAgGridStyle) {
@@ -59,7 +60,7 @@ const ListBoxFilterForm = (props) => {
59
60
  onChange: () => onClickItemColumnValue(distinctValue.value),
60
61
  });
61
62
  }
62
- return (React.createElement(ListGroupItem_1.default, { noZebra: props.useAgGridStyle, key: 'columnValue' + index, onClick: () => onClickItemColumnValue(distinctValue.value), active: isActive, value: columnValue }, distinctValue.label));
63
+ return (React.createElement(ListGroupItem_1.default, { noZebra: props.useAgGridStyle, key: 'columnValue' + index, onClick: () => onClickItemColumnValue(distinctValue.value), active: isActive, value: distinctValue.value }, distinctValue.label));
63
64
  });
64
65
  const textClear = (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { autoFocus: true, type: "text", placeholder: "Search Column Values", value: FilterValue, style: {
65
66
  paddingTop: 'var(--ab-space-1)',
@@ -26,8 +26,10 @@ const AdaptablePopupModuleView = (props) => {
26
26
  const moduleViewProperties = props.module.getViewProperties();
27
27
  const EditWizard = (_b = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.getEditWizard) === null || _b === void 0 ? void 0 : _b.call(moduleViewProperties);
28
28
  const [isWizardOpen, setIsWizardOpen] = React.useState(() => {
29
- var _a, _b;
30
- return ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'New' || ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'Edit';
29
+ var _a, _b, _c;
30
+ return (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'New' ||
31
+ ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'Edit' ||
32
+ ((_c = props.popupParams) === null || _c === void 0 ? void 0 : _c.action) === 'Clone');
31
33
  });
32
34
  const handleOpenEditPopup = React.useCallback(() => {
33
35
  if (EditWizard) {
@@ -5,61 +5,43 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
7
7
  const AdaptablePopupAlert_1 = require("./AdaptablePopupAlert");
8
- const react_toastify_1 = require("react-toastify");
9
- const apiInstances = new WeakMap();
10
- const weakMapKeys = new Map();
8
+ const { toast } = require('react-toastify');
11
9
  const showToast = (props) => {
12
10
  // we're doing this hack and not simply using props.api in order not to have a memory
13
11
  // leak where the api is still kept around in memory by the toaster
14
- const adaptableOptions = props.api.internalApi.getAdaptableOptions();
15
- const adaptableId = adaptableOptions.adaptableId;
16
- let weakMapKey = weakMapKeys.get(adaptableId);
17
- if (!weakMapKey) {
18
- weakMapKeys.set(adaptableId, { adaptableId });
19
- }
20
- weakMapKey = weakMapKeys.get(adaptableId);
21
- const off = props.api.eventApi.on('AdaptableDestroy', () => {
22
- react_toastify_1.toast.dismiss(); // remove all toasts
23
- let weakMapKey = weakMapKeys.get(adaptableId);
24
- if (weakMapKey) {
25
- apiInstances.delete(weakMapKey);
26
- weakMapKeys.delete(adaptableId);
27
- }
12
+ let api = props.api;
13
+ const off = api.eventApi.on('AdaptableDestroy', () => {
14
+ toast.dismiss(toastId);
15
+ api = null;
28
16
  });
29
- apiInstances.set(weakMapKey, props.api);
17
+ const adaptableOptions = props.api.internalApi.getAdaptableOptions();
30
18
  const toastProps = ObjectFactory_1.default.CreateToastOptions(adaptableOptions.notificationsOptions, {
31
- containerId: adaptableId,
19
+ containerId: adaptableOptions.adaptableId,
32
20
  onClose: () => {
33
- const weakMapKey = weakMapKeys.get(adaptableId);
34
- const adaptableApi = weakMapKey ? apiInstances.get(weakMapKey) : null;
35
- if (adaptableApi) {
21
+ if (api) {
36
22
  off();
37
- if (!adaptableApi.isDestroyed()) {
38
- adaptableApi.internalApi.hidePopupAlert();
39
- }
40
- else {
41
- apiInstances.delete(weakMapKey);
42
- weakMapKeys.delete(adaptableId);
23
+ if (!api.isDestroyed()) {
24
+ api.internalApi.hidePopupAlert();
43
25
  }
44
26
  }
45
27
  },
46
28
  });
47
29
  const content = (React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, adaptableAlert: props.adaptableAlert, onClose: () => {
48
- react_toastify_1.toast.dismiss(toastId);
30
+ toast.dismiss(toastId);
49
31
  } }));
50
32
  let toastId;
51
33
  switch (props.adaptableAlert.alertDefinition.MessageType) {
52
34
  case 'Info':
53
- toastId = react_toastify_1.toast.info(content, toastProps);
35
+ toastId = toast.info(content, toastProps);
54
36
  break;
55
37
  case 'Error':
56
- toastId = react_toastify_1.toast.error(content, toastProps);
38
+ toastId = toast.error(content, toastProps);
57
39
  break;
58
40
  case 'Success':
59
- toastId = react_toastify_1.toast.success(content, toastProps);
41
+ toastId = toast.success(content, toastProps);
60
42
  break;
61
43
  case 'Warning':
62
- toastId = react_toastify_1.toast.warn(content, toastProps);
44
+ toastId = toast.warn(content, toastProps);
63
45
  break;
64
46
  }
65
47
  };
@@ -5,13 +5,22 @@ export declare type ValueSelectorProps<OPTION_TYPE, ID_TYPE extends number | str
5
5
  value: ID_TYPE[];
6
6
  onChange: (selected: ID_TYPE[], selectedMap: Map<ID_TYPE, OPTION_TYPE>) => void;
7
7
  allowReorder?: boolean | ((option: OPTION_TYPE) => boolean);
8
- filter?: null | ((o: OPTION_TYPE) => boolean);
8
+ filter?: null | ((o: OPTION_TYPE, searchValue: string) => boolean);
9
+ /**
10
+ * To show the filter input, filter needs also to be defined.
11
+ */
12
+ showFilterInput?: boolean;
9
13
  singleSelect?: boolean;
10
14
  toIdentifier: (v: OPTION_TYPE) => ID_TYPE;
11
15
  toLabel: (v: OPTION_TYPE) => string | React.ReactElement;
16
+ /**
17
+ * Used to render list items, this extra prop allows to have different rendering for list & bottom tags.
18
+ */
19
+ toListLabel?: (v: OPTION_TYPE) => string | React.ReactElement;
12
20
  noSelectionLabel?: ReactNode;
13
21
  clearSelectionLabel?: ReactNode;
14
22
  showSelectedOnlyLabel?: ReactNode;
23
+ showSelectedOnlyPosition?: 'floating' | 'top';
15
24
  xSelectedLabel?: (count: number) => ReactNode;
16
25
  selectionBoxPosition?: 'top' | 'bottom';
17
26
  onShowSelectedOnlyChange?: (selectedOnly: boolean) => void;
@@ -13,6 +13,7 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/Simp
13
13
  const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
14
14
  const reorder_1 = require("../../../Utilities/reorder");
15
15
  const Tag_1 = require("../../../components/Tag");
16
+ const AdaptableFormControlTextClear_1 = require("../Forms/AdaptableFormControlTextClear");
16
17
  function useValuesMap({ options, value, toIdentifier, selectedMap, }) {
17
18
  const optionsMap = react_1.useMemo(() => {
18
19
  if (selectedMap) {
@@ -38,7 +39,10 @@ function useValuesMap({ options, value, toIdentifier, selectedMap, }) {
38
39
  return { selectedMap: result, optionsMap };
39
40
  }
40
41
  function ValueSelector(props) {
41
- const { options, value, filter, onChange, allowReorder, singleSelect, toLabel, toIdentifier, noSelectionLabel, clearSelectionLabel, showSelectedOnlyLabel, xSelectedLabel, selectionBoxPosition = 'bottom', onShowSelectedOnlyChange, isOptionDisabled, disabled, } = props;
42
+ var _a;
43
+ const { options, value, filter, onChange, allowReorder, singleSelect, toLabel, toListLabel, toIdentifier, noSelectionLabel, clearSelectionLabel, showSelectedOnlyLabel, showFilterInput, xSelectedLabel, selectionBoxPosition = 'bottom', onShowSelectedOnlyChange, isOptionDisabled, disabled, } = props;
44
+ const [searchInputValue, setSearchInputValue] = React.useState('');
45
+ const preparedToLabel = toListLabel !== null && toListLabel !== void 0 ? toListLabel : toLabel;
42
46
  const [selectedOnly, doSetSelectedOnly] = react_1.useState(false);
43
47
  const setSelectedOnly = react_1.useCallback((selectedOnly) => {
44
48
  doSetSelectedOnly(selectedOnly);
@@ -58,11 +62,11 @@ function ValueSelector(props) {
58
62
  }, [onChange, selectedOnly, selectedMap]);
59
63
  const renderOption = (option, index) => {
60
64
  const identifier = toIdentifier(option);
61
- const label = !allowReorder ? toLabel(option) : null;
65
+ const label = !allowReorder ? preparedToLabel(option) : null;
62
66
  const reorderable = typeof allowReorder === 'function' ? allowReorder(option) : allowReorder;
63
67
  const renderNode = (props, dragHandleProps) => {
64
68
  return (React.createElement(rebass_1.Flex, Object.assign({ alignItems: "center", mt: index ? 1 : 0, key: identifier, backgroundColor: 'primary', padding: 2, "data-index": index, "data-id": identifier, "data-name": "option" }, props, { style: Object.assign({ borderRadius: 'var(--ab__border-radius)' }, props === null || props === void 0 ? void 0 : props.style) }),
65
- React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center" },
69
+ React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "row", alignItems: "center" },
66
70
  reorderable ? (React.createElement(rebass_1.Box, Object.assign({ mr: 3 }, dragHandleProps),
67
71
  React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }))) : null,
68
72
  singleSelect ? (React.createElement(Radio_1.default, { checked: selectedMap.has(identifier), "data-name": identifier, onChange: (checked) => {
@@ -83,7 +87,7 @@ function ValueSelector(props) {
83
87
  }
84
88
  notifyChange();
85
89
  }, checked: selectedMap.has(identifier) }, label)),
86
- React.createElement(rebass_1.Text, { ml: 2 }, allowReorder ? toLabel(option) : null))));
90
+ React.createElement(rebass_1.Text, { flex: 1, ml: 2 }, allowReorder ? preparedToLabel(option) : null))));
87
91
  };
88
92
  return (React.createElement(react_beautiful_dnd_1.Draggable, { key: identifier, index: index, draggableId: `${identifier}`, isDragDisabled: !reorderable }, (draggableProvided) => {
89
93
  return renderNode(Object.assign(Object.assign({ ref: draggableProvided.innerRef }, draggableProvided.draggableProps), { style: draggableProvided.draggableProps.style }), draggableProvided.dragHandleProps);
@@ -108,9 +112,14 @@ function ValueSelector(props) {
108
112
  selectionBox,
109
113
  React.createElement(ValueOptionsTags, { options: options, value: value, selectedMap: selectedMap, toLabel: toLabel, toIdentifier: toIdentifier, onClearOption: notifyChange, readOnly: disabled })));
110
114
  };
115
+ const showOnlySelectedCheckbox = (React.createElement(CheckBox_1.CheckBox, { disabled: !value.length, checked: selectedOnly, onChange: setSelectedOnly }, showSelectedOnlyLabel !== null && showSelectedOnlyLabel !== void 0 ? showSelectedOnlyLabel : 'Show Selected Only'));
116
+ const showSelectedOnlyPosition = (_a = props.showSelectedOnlyPosition) !== null && _a !== void 0 ? _a : 'floating';
111
117
  return (React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 1, className: "ab-ValueSelector", style: {
112
118
  overflow: 'hidden',
113
119
  } },
120
+ React.createElement(rebass_1.Flex, { mb: 1 },
121
+ showFilterInput && filter ? (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Type to search", style: { flex: 1, border: 0, margin: 3 } })) : (React.createElement(rebass_1.Box, { flex: 1 })),
122
+ showSelectedOnlyPosition === 'top' && React.createElement(rebass_1.Box, { ml: 20 }, showOnlySelectedCheckbox)),
114
123
  selectionBoxPosition === 'top' && renderSelectionSection(),
115
124
  React.createElement(react_beautiful_dnd_1.DragDropContext, { onDragEnd: (result) => {
116
125
  const { source, destination } = result;
@@ -136,7 +145,7 @@ function ValueSelector(props) {
136
145
  notifyChange();
137
146
  } },
138
147
  React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 1, style: { overflow: 'auto' } },
139
- React.createElement(rebass_1.Box, { style: {
148
+ showSelectedOnlyPosition === 'floating' && (React.createElement(rebass_1.Box, { style: {
140
149
  position: 'sticky',
141
150
  top: 0,
142
151
  zIndex: 10000,
@@ -147,15 +156,14 @@ function ValueSelector(props) {
147
156
  right: 0,
148
157
  borderRadius: 'var(--ab__border-radius)',
149
158
  overflow: 'hidden',
150
- }, fontSize: 2, backgroundColor: "defaultbackground" },
151
- React.createElement(CheckBox_1.CheckBox, { disabled: !value.length, checked: selectedOnly, onChange: setSelectedOnly }, showSelectedOnlyLabel !== null && showSelectedOnlyLabel !== void 0 ? showSelectedOnlyLabel : 'Show Selected Only'))),
159
+ }, fontSize: 2, backgroundColor: "defaultbackground" }, showOnlySelectedCheckbox))),
152
160
  React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: "droppable" }, (droppableProvided) => {
153
161
  return (React.createElement("div", Object.assign({ ref: droppableProvided.innerRef }, droppableProvided.droppableProps),
154
162
  options
155
163
  .filter((option) => {
156
164
  let result = true;
157
165
  if (filter) {
158
- result = filter(option);
166
+ result = filter(option, searchInputValue);
159
167
  }
160
168
  result =
161
169
  result && (selectedOnly ? selectedMap.has(toIdentifier(option)) : true);
@@ -68,7 +68,8 @@ class FormatColumnSummaryComponent extends React.Component {
68
68
  });
69
69
  }
70
70
  onCloseWizard() {
71
- this.setState({
71
+ var _a;
72
+ (_a = this === null || this === void 0 ? void 0 : this.setState) === null || _a === void 0 ? void 0 : _a.call(this, {
72
73
  editedAdaptableObject: null,
73
74
  wizardStartIndex: 0,
74
75
  wizardStatus: EditableConfigEntityState_1.WizardStatus.None,
@@ -226,7 +226,7 @@ exports.LayoutEditor = React.memo((props) => {
226
226
  const initialHeader = api.columnApi.getFriendlyNameFromColumnId(c.columnId);
227
227
  return (React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "stretch", "data-name": "drag-item", "data-col-id": c.columnId },
228
228
  React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", backgroundColor: "secondary", color: "text-on-secondary" },
229
- React.createElement(rebass_1.Flex, { flex: 1, alignItems: "center" },
229
+ React.createElement(rebass_1.Flex, { alignItems: "center" },
230
230
  React.createElement(rebass_1.Box, { ml: 2, mr: 2 },
231
231
  React.createElement(icons_1.Icon, { name: "drag", size: 30 })),
232
232
  initialHeader,
@@ -1,9 +1,6 @@
1
1
  import * as React from 'react';
2
- import { AdaptableObjectAdaptableWizardProps } from '../../Wizard/Interface/IAdaptableWizard';
3
- import { ColumnSort } from '../../../PredefinedConfig/Common/ColumnSort';
4
- export interface LayoutWizardProps extends AdaptableObjectAdaptableWizardProps<LayoutWizard> {
5
- ColumnSorts: ColumnSort[];
6
- }
7
- export declare class LayoutWizard extends React.Component<LayoutWizardProps, {}> {
8
- render(): JSX.Element;
2
+ import { AdaptableOnePageWizardProps } from '../../Wizard/Interface/IAdaptableWizard';
3
+ import { Layout } from '../../../../types';
4
+ export interface LayoutWizardProps extends AdaptableOnePageWizardProps<Layout> {
9
5
  }
6
+ export declare const LayoutWizard: React.FunctionComponent<LayoutWizardProps>;
@@ -3,18 +3,132 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LayoutWizard = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const AdaptableWizard_1 = require("../../Wizard/AdaptableWizard");
7
- const LayoutEditorWizard_1 = require("./LayoutEditorWizard");
8
- class LayoutWizard extends React.Component {
9
- render() {
10
- let layouts = this.props.configEntities;
11
- return (React.createElement(AdaptableWizard_1.AdaptableWizard, { style: { maxWidth: '', height: '80vh' }, moduleInfo: this.props.moduleInfo, modalContainer: this.props.modalContainer, api: this.props.api, showStepsLegend: false, closeText: "CANCEL", closeTooltip: "Cancel changes and close Layout Editor", steps: [
12
- {
13
- StepName: 'Layout Editor',
14
- Index: 0,
15
- Element: (React.createElement(LayoutEditorWizard_1.LayoutEditorWizard, { api: this.props.api, Layouts: layouts, moduleInfo: this.props.moduleInfo })),
6
+ const react_1 = require("react");
7
+ const LayoutRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/LayoutRedux"));
8
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
+ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
10
+ const Helper_1 = require("../../../Utilities/Helpers/Helper");
11
+ const SettingsSection_1 = require("./sections/SettingsSection");
12
+ const rebass_1 = require("rebass");
13
+ const AdaptableContext_1 = require("../../AdaptableContext");
14
+ const react_redux_1 = require("react-redux");
15
+ const ColumnsSection_1 = require("./sections/ColumnsSection");
16
+ const PivotColumnsSection_1 = require("./sections/PivotColumnsSection");
17
+ const RowGroupingSection_1 = require("./sections/RowGroupingSection");
18
+ const AggregationsSection_1 = require("./sections/AggregationsSection");
19
+ const SortSection_1 = require("./sections/SortSection");
20
+ const FilterSection_1 = require("./sections/FilterSection");
21
+ const LayoutWizard = (props) => {
22
+ var _a, _b;
23
+ const dispatch = react_redux_1.useDispatch();
24
+ const adaptable = AdaptableContext_1.useAdaptable();
25
+ const allLayouts = adaptable.api.layoutApi.getAllLayout();
26
+ const initialLayout = (_a = props.data) !== null && _a !== void 0 ? _a : (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.value;
27
+ const [layout, setLayout] = react_1.useState(() => {
28
+ var _a;
29
+ if (initialLayout) {
30
+ const preparedLayout = Helper_1.cloneObject(initialLayout);
31
+ if (((_a = props === null || props === void 0 ? void 0 : props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Clone') {
32
+ preparedLayout.Name = '';
33
+ }
34
+ return preparedLayout;
35
+ }
36
+ return ObjectFactory_1.default.CreateEmptyLayout({ Name: '' });
37
+ });
38
+ const handleFinish = () => {
39
+ var _a;
40
+ let action = (_a = props === null || props === void 0 ? void 0 : props.popupParams) === null || _a === void 0 ? void 0 : _a.action;
41
+ if (!action) {
42
+ action = initialLayout ? 'Edit' : 'New';
43
+ }
44
+ switch (action) {
45
+ case 'Edit':
46
+ const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
47
+ dispatch(LayoutRedux.LayoutSave(layout));
48
+ if (currentLayout.Uuid === layout.Uuid) {
49
+ dispatch(LayoutRedux.LayoutSelect(layout.Name));
50
+ }
51
+ break;
52
+ case 'Clone':
53
+ const clonedLayout = Object.assign({}, layout);
54
+ delete clonedLayout.Uuid;
55
+ dispatch(LayoutRedux.LayoutAdd(clonedLayout));
56
+ dispatch(LayoutRedux.LayoutSelect(clonedLayout.Name));
57
+ break;
58
+ case 'New':
59
+ dispatch(LayoutRedux.LayoutAdd(layout));
60
+ dispatch(LayoutRedux.LayoutSelect(layout.Name));
61
+ }
62
+ props.onFinishWizard(layout);
63
+ };
64
+ return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { titleContainerStyle: { width: 180 }, defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: layout, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
65
+ {
66
+ title: 'Settings',
67
+ details: 'Configure Layout',
68
+ isValid: () => {
69
+ if (!layout.Name) {
70
+ return 'Layout name cannot be blank';
71
+ }
72
+ if (allLayouts.some((layoutItem) => layoutItem.Name === layout.Name && layoutItem.Uuid !== layout.Uuid)) {
73
+ return 'A Layout already exists with that name';
74
+ }
75
+ return true;
16
76
  },
17
- ], data: this.props.editedAdaptableObject, stepStartIndex: this.props.wizardStartIndex, onHide: () => this.props.onCloseWizard(), onFinish: () => this.props.onFinishWizard(), canFinishWizard: () => this.props.canFinishWizard() }));
18
- }
19
- }
77
+ renderSummary: () => React.createElement(SettingsSection_1.SettingsSectionSummary, null),
78
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
79
+ React.createElement(SettingsSection_1.SettingsSection, { onChange: (newLayout) => setLayout(newLayout) }))),
80
+ },
81
+ {
82
+ title: 'Columns',
83
+ details: 'Select Columns',
84
+ isVisible: () => !(layout === null || layout === void 0 ? void 0 : layout.EnablePivot),
85
+ renderSummary: () => React.createElement(ColumnsSection_1.ColumnsSectionSummary, null),
86
+ render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
87
+ React.createElement(ColumnsSection_1.ColumnsSection, { onChange: setLayout }))),
88
+ },
89
+ {
90
+ title: 'Pivot Columns',
91
+ details: 'Select Pivot Columns',
92
+ isVisible: () => layout === null || layout === void 0 ? void 0 : layout.EnablePivot,
93
+ renderSummary: () => React.createElement(PivotColumnsSection_1.PivotColumnsSectionSummary, null),
94
+ render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
95
+ React.createElement(PivotColumnsSection_1.PivotColumnsSection, { onChange: (newLayout) => setLayout(newLayout) }))),
96
+ },
97
+ {
98
+ title: 'Row Groups',
99
+ details: 'Configure Row Grouping',
100
+ renderSummary: () => React.createElement(RowGroupingSection_1.RowGroupingSectionSummary, null),
101
+ render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
102
+ React.createElement(RowGroupingSection_1.RowGroupingSection, { onChange: setLayout }))),
103
+ },
104
+ {
105
+ title: 'Aggregations',
106
+ details: 'Select Column Aggregations',
107
+ renderSummary: () => React.createElement(AggregationsSection_1.AggregationsSectionSummary, null),
108
+ render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
109
+ React.createElement(AggregationsSection_1.AggregationsSection, { onChange: setLayout }))),
110
+ },
111
+ {
112
+ title: 'Sort',
113
+ renderSummary: () => React.createElement(SortSection_1.SortSectionSummary, null),
114
+ details: 'Configure Column Sorts',
115
+ render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
116
+ React.createElement(SortSection_1.SortSection, { onChange: (newLayout) => setLayout(newLayout) }))),
117
+ },
118
+ {
119
+ title: 'Filters',
120
+ details: 'Column Filters',
121
+ renderSummary: () => React.createElement(FilterSection_1.FilterSectionSummary, null),
122
+ render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
123
+ React.createElement(FilterSection_1.FilterSection, { onChange: (newLayout) => setLayout(newLayout) }))),
124
+ },
125
+ '-',
126
+ {
127
+ details: 'Review your Layout',
128
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
129
+ React.createElement(OnePageAdaptableWizard_1.OnePageWizardSummary, null))),
130
+ title: 'Summary',
131
+ },
132
+ ] }));
133
+ };
20
134
  exports.LayoutWizard = LayoutWizard;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Layout } from '../../../../../types';
3
+ export declare const AggregationsSectionSummary: React.FunctionComponent;
4
+ interface AggregationsSectionProps {
5
+ onChange: (data: Layout) => void;
6
+ }
7
+ export declare const AggregationsSection: React.FunctionComponent<AggregationsSectionProps>;
8
+ export {};