@adaptabletools/adaptable 12.1.8-canary.1 → 12.2.0-canary.0

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 (84) hide show
  1. package/base.css +116 -22
  2. package/bundle.cjs.js +108 -108
  3. package/index.css +132 -23
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +44 -10
  8. package/src/AdaptableOptions/LayoutOptions.d.ts +10 -1
  9. package/src/AdaptableOptions/StateOptions.d.ts +1 -1
  10. package/src/Api/Implementation/AlertApiImpl.js +1 -2
  11. package/src/Api/Implementation/InternalApiImpl.d.ts +3 -1
  12. package/src/Api/Implementation/InternalApiImpl.js +34 -0
  13. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -0
  14. package/src/Api/Implementation/QueryLanguageApiImpl.js +5 -0
  15. package/src/Api/InternalApi.d.ts +6 -1
  16. package/src/Api/QueryLanguageApi.d.ts +5 -0
  17. package/src/Strategy/BulkUpdateModule.d.ts +1 -1
  18. package/src/Strategy/CalculatedColumnModule.js +1 -1
  19. package/src/Strategy/QueryModule.js +1 -1
  20. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +0 -13
  21. package/src/Strategy/Utilities/getExpressionViewItems.d.ts +3 -4
  22. package/src/Strategy/Utilities/getExpressionViewItems.js +3 -3
  23. package/src/Strategy/Utilities/getRuleViewItems.js +1 -1
  24. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  25. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -0
  26. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  27. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +14 -0
  28. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +2 -0
  29. package/src/Utilities/Services/QueryLanguageService.d.ts +2 -1
  30. package/src/Utilities/Services/QueryLanguageService.js +45 -19
  31. package/src/Utilities/Services/ReportService.js +1 -2
  32. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
  33. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +10 -10
  34. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +3 -0
  35. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +9 -0
  36. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +14 -15
  37. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
  38. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
  39. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +7 -0
  40. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +280 -0
  41. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.d.ts +1 -0
  42. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.js +5 -0
  43. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +1 -1
  44. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +4 -4
  45. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +2 -8
  46. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +1 -1
  47. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -3
  48. package/src/View/AdaptableWizardView/Wizard.js +2 -2
  49. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -1
  50. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -8
  51. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +4 -3
  52. package/src/View/Components/AdaptableObjectCollection/index.d.ts +3 -4
  53. package/src/View/Components/AdaptableObjectCollection/index.js +7 -8
  54. package/src/View/Components/AdaptableObjectRow/index.js +1 -4
  55. package/src/View/Components/EntityRulesEditor/index.js +2 -2
  56. package/src/View/Components/FilterForm/QuickFilterForm.js +9 -1
  57. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -0
  58. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +2 -1
  59. package/src/View/Components/ValueSelector/index.js +8 -19
  60. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  61. package/src/View/Dashboard/DashboardPopup.js +11 -10
  62. package/src/View/Export/ExportViewPanel.js +2 -2
  63. package/src/View/Export/Wizard/ReportRowsWizardSection.js +4 -3
  64. package/src/View/Filter/FilterViewPanel.js +3 -2
  65. package/src/View/GridInfo/AdaptableObjectsSummary.js +5 -3
  66. package/src/View/GridInfo/AdaptableOptionsComponent.js +1 -1
  67. package/src/View/GridInfo/GridInfoPopup.js +6 -7
  68. package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +3 -4
  69. package/src/View/StateManagement/StateManagementPopup.js +18 -19
  70. package/src/agGrid/Adaptable.d.ts +2 -0
  71. package/src/agGrid/Adaptable.js +56 -13
  72. package/src/components/DragAndDropContext/ModuleManager.js +3 -4
  73. package/src/components/DragAndDropContext/TabList.js +9 -30
  74. package/src/components/DragAndDropContext/UnusedPanel.js +1 -7
  75. package/src/components/DropdownButton/index.js +2 -2
  76. package/src/components/EmptyContent/index.js +2 -2
  77. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -0
  78. package/src/components/ExpressionEditor/index.js +24 -14
  79. package/src/metamodel/adaptable.metamodel.d.ts +31 -4
  80. package/src/metamodel/adaptable.metamodel.js +1 -1
  81. package/src/parser/src/types.d.ts +14 -10
  82. package/src/types.d.ts +1 -1
  83. package/version.d.ts +1 -1
  84. package/version.js +1 -1
@@ -42,6 +42,7 @@ function ValueSelector(props) {
42
42
  var _a;
43
43
  const { options, value, filter, onChange, allowReorder, singleSelect, toLabel, toListLabel, toIdentifier, noSelectionLabel, clearSelectionLabel, showSelectedOnlyLabel, showFilterInput, xSelectedLabel, selectionBoxPosition = 'bottom', onShowSelectedOnlyChange, isOptionDisabled, disabled, } = props;
44
44
  const [searchInputValue, setSearchInputValue] = React.useState('');
45
+ const baseClassName = 'ab-ValueSelector';
45
46
  const preparedToLabel = toListLabel !== null && toListLabel !== void 0 ? toListLabel : toLabel;
46
47
  const [selectedOnly, doSetSelectedOnly] = react_1.useState(false);
47
48
  const setSelectedOnly = react_1.useCallback((selectedOnly) => {
@@ -65,7 +66,7 @@ function ValueSelector(props) {
65
66
  const label = !allowReorder ? preparedToLabel(option) : null;
66
67
  const reorderable = typeof allowReorder === 'function' ? allowReorder(option) : allowReorder;
67
68
  const renderNode = (props, dragHandleProps) => {
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) }),
69
+ return (React.createElement(rebass_1.Flex, Object.assign({ className: `${baseClassName}__option`, alignItems: "center", mt: index ? 1 : 0, key: identifier, backgroundColor: 'primary', padding: 2, "data-index": index, "data-id": identifier, "data-name": "option" }, props),
69
70
  React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "row", alignItems: "center" },
70
71
  reorderable ? (React.createElement(rebass_1.Box, Object.assign({ mr: 3 }, dragHandleProps),
71
72
  React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }))) : null,
@@ -94,7 +95,7 @@ function ValueSelector(props) {
94
95
  }));
95
96
  };
96
97
  const renderSelectionSection = () => {
97
- const selectionBox = (React.createElement(rebass_1.Box, { fontSize: 2, style: { whiteSpace: 'nowrap', flex: 'none' } }, !value.length ? (React.createElement(React.Fragment, null, noSelectionLabel !== null && noSelectionLabel !== void 0 ? noSelectionLabel : 'No selected options',
98
+ const selectionBox = (React.createElement(rebass_1.Box, { fontSize: 2 }, !value.length ? (React.createElement(React.Fragment, null, noSelectionLabel !== null && noSelectionLabel !== void 0 ? noSelectionLabel : 'No selected options',
98
99
  !singleSelect ? (React.createElement(SimpleButton_1.default, { px: 1, disabled: disabled, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
99
100
  options.forEach((option) => {
100
101
  selectedMap.set(toIdentifier(option), option);
@@ -108,15 +109,13 @@ function ValueSelector(props) {
108
109
  xSelectedLabel
109
110
  ? xSelectedLabel(value.length)
110
111
  : `Your selected ${value.length} ${value.length > 1 ? 'options' : 'option'}.`))));
111
- return (React.createElement(rebass_1.Box, { mt: selectionBoxPosition === 'bottom' ? 3 : 0, mb: selectionBoxPosition === 'top' ? 3 : 0 },
112
+ return (React.createElement(rebass_1.Box, { className: `${baseClassName}__header`, mt: selectionBoxPosition === 'bottom' ? 3 : 0, mb: selectionBoxPosition === 'top' ? 3 : 0 },
112
113
  selectionBox,
113
114
  React.createElement(ValueOptionsTags, { options: options, value: value, selectedMap: selectedMap, toLabel: toLabel, toIdentifier: toIdentifier, onClearOption: notifyChange, readOnly: disabled })));
114
115
  };
115
116
  const showOnlySelectedCheckbox = (React.createElement(CheckBox_1.CheckBox, { disabled: !value.length, checked: selectedOnly, onChange: setSelectedOnly }, showSelectedOnlyLabel !== null && showSelectedOnlyLabel !== void 0 ? showSelectedOnlyLabel : 'Show Selected Only'));
116
117
  const showSelectedOnlyPosition = (_a = props.showSelectedOnlyPosition) !== null && _a !== void 0 ? _a : 'floating';
117
- return (React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 1, className: "ab-ValueSelector", style: {
118
- overflow: 'hidden',
119
- } },
118
+ return (React.createElement(rebass_1.Flex, { className: baseClassName, flexDirection: "column", flex: 1 },
120
119
  React.createElement(rebass_1.Flex, { mb: 1 },
121
120
  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
121
  showSelectedOnlyPosition === 'top' && React.createElement(rebass_1.Box, { ml: 20 }, showOnlySelectedCheckbox)),
@@ -144,19 +143,9 @@ function ValueSelector(props) {
144
143
  });
145
144
  notifyChange();
146
145
  } },
147
- React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 1, style: { overflow: 'auto' } },
148
- showSelectedOnlyPosition === 'floating' && (React.createElement(rebass_1.Box, { style: {
149
- position: 'sticky',
150
- top: 0,
151
- zIndex: 10000,
152
- } },
153
- React.createElement(rebass_1.Box, { mr: 1, mt: 1, px: 2, "data-name": "show-selected-only", style: {
154
- position: 'absolute',
155
- top: 0,
156
- right: 0,
157
- borderRadius: 'var(--ab__border-radius)',
158
- overflow: 'hidden',
159
- }, fontSize: 2, backgroundColor: "defaultbackground" }, showOnlySelectedCheckbox))),
146
+ React.createElement(rebass_1.Flex, { className: `${baseClassName}__body`, flexDirection: "column", flex: 1, style: { overflow: 'auto' } },
147
+ showSelectedOnlyPosition === 'floating' && (React.createElement(rebass_1.Box, { className: `${baseClassName}__show-selected-only-checkbox` },
148
+ React.createElement(rebass_1.Box, { className: `${baseClassName}__show-selected-only-checkbox__text`, "data-name": "show-selected-only", backgroundColor: "defaultbackground" }, showOnlySelectedCheckbox))),
160
149
  React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: "droppable" }, (droppableProvided) => {
161
150
  return (React.createElement("div", Object.assign({ ref: droppableProvided.innerRef }, droppableProvided.droppableProps),
162
151
  options
@@ -53,7 +53,7 @@ class CustomSortSummaryComponent extends React.Component {
53
53
  else {
54
54
  customSortRow = (React.createElement(ModuleDetail_1.ModuleDetail, { key: this.props.moduleInfo.FriendlyName, item1: React.createElement(ModuleProfile_1.ModuleProfile, { moduleInfo: this.props.moduleInfo }), item2: this.getCustomSortedValues(customSort), configEnity: customSort, moduleInfo: this.props.moduleInfo, onEdit: () => this.onEdit(customSort), showEdit: customSort != undefined, onShare: (config) => this.props.onShare(customSort, config), showShare: this.props.teamSharingActivated, onDelete: CustomSortRedux.CustomSortDelete(customSort), showBold: true, accessLevel: this.props.accessLevel }));
55
55
  }
56
- return (React.createElement("div", null,
56
+ return (React.createElement(React.Fragment, null,
57
57
  customSortRow,
58
58
  this.state.editedAdaptableObject && (React.createElement(CustomSortWizard_1.CustomSortWizard, { isNew: this.state.wizardStatus === EditableConfigEntityState_1.WizardStatus.New, moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.CustomSorts, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard }))));
59
59
  }
@@ -72,18 +72,19 @@ class DashboardPopupComponent extends React.Component {
72
72
  };
73
73
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
74
74
  React.createElement(rebass_1.Flex, { flex: 1, height: "100%", flexDirection: "column" },
75
- areDashboardSettingsVisible && (React.createElement(Panel_1.default, { header: 'Dashboard Views', style: { height: 'auto', overflow: 'visible' }, variant: "default", borderRadius: "none", marginLeft: 2, marginRight: 2 },
76
- React.createElement(rebass_1.Flex, null,
77
- React.createElement(CheckBox_1.CheckBox, { mr: 3, className: `${baseClassName}__Checkbox__collapsed-check`, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse"),
78
- ' ',
79
- this.props.api.internalApi.getAdaptableOptions().dashboardOptions.canFloat && (React.createElement(CheckBox_1.CheckBox, { mr: 3, className: `${baseClassName}__Checkbox__collapsed-check`, checked: this.props.IsFloating, onChange: (checked) => this.props.onSetDashboardFloating(checked) }, "Float")),
80
- ' ',
81
- React.createElement(CheckBox_1.CheckBox, { className: `${baseClassName}__Checkbox__hidden-check`, checked: this.props.IsHidden, onChange: (checked) => this.props.onSetDashboardHidden(checked) }, "Hidden")))),
82
- React.createElement(Panel_1.default, { header: 'Dashboard Contents', style: { borderBottom: '1px solid var(--ab-color-primary)' }, variant: "default", borderRadius: "none", marginTop: 4, marginLeft: 2, marginRight: 2 },
83
- React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2, "data-name": "dashboard-configuration-select" },
75
+ areDashboardSettingsVisible && (React.createElement(Panel_1.default, { header: 'Dashboard Views', style: { height: 'auto', overflow: 'visible' }, variant: "default", borderRadius: "none" },
76
+ React.createElement(CheckBox_1.CheckBox, { mr: 3, "data-name": "collapse", className: `${baseClassName}__settings-option`, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse"),
77
+ ' ',
78
+ this.props.api.internalApi.getAdaptableOptions().dashboardOptions.canFloat && (React.createElement(CheckBox_1.CheckBox, { mr: 3, "data-name": "floating", className: `${baseClassName}__settings-option`, checked: this.props.IsFloating, onChange: (checked) => this.props.onSetDashboardFloating(checked) }, "Float")),
79
+ ' ',
80
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "hidden", className: `${baseClassName}__settings-option`, checked: this.props.IsHidden, onChange: (checked) => this.props.onSetDashboardHidden(checked) }, "Hidden"))),
81
+ React.createElement(Panel_1.default, { header: 'Dashboard Contents', style: { borderBottom: '1px solid var(--ab-color-primary)' }, variant: "default", borderRadius: "none", marginTop: 4 },
82
+ React.createElement(rebass_1.Flex, { className: `${baseClassName}__contents-selector`, flexDirection: "row", padding: 2 },
84
83
  React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Toolbars"),
85
84
  React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons")),
86
- React.createElement(rebass_1.Box, { className: `${baseClassName}__Module-Selector`, style: { minHeight: 0, flex: '1 1 0' }, padding: 2 },
85
+ React.createElement(rebass_1.Box, { className: `${baseClassName}__Module-Selector`, "data-name": this.state.DashboardConfigView === DashboardConfigView.Toolbars
86
+ ? 'toolbars'
87
+ : 'buttons', style: { minHeight: 0, flex: '1 1 0' }, padding: 2 },
87
88
  this.state.DashboardConfigView == DashboardConfigView.Toolbars && (React.createElement(DashboardManager_1.default, { disabled: isDashboardDisabled, availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: this.props.onDashboardSetTabs, api: this.props.api })),
88
89
  this.state.DashboardConfigView == DashboardConfigView.Buttons && (React.createElement(ModuleValueSelector_1.ModuleValueSelector, { disabled: isDashboardDisabled, options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', isOptionDisabled: isModuleCheckboxDisabled, xSelectedLabel: () => `Visible Module Buttons:`, onChange: (selectedValues) => this.props.onDashboardSetModuleButtons(selectedValues) })))))));
89
90
  }
@@ -78,9 +78,9 @@ class ExportViewPanelComponent extends React.Component {
78
78
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
79
79
  return (React.createElement(rebass_1.Flex, { style: { gap: 5 }, flexDirection: "row", className: `ab-${elementType}__Export__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
80
80
  React.createElement(rebass_1.Flex, { flex: 1 },
81
- React.createElement(DropdownButton_1.default, { disabled: allReportNames.length == 0, style: { width: '100%', fontSize: 'small' }, items: reportItems, columns: ['label'], className: `ab-${elementType}__Export__select`, onClear: () => this.onSelectedReportChanged(null), showClearButton: !!currentReport, variant: "outlined", marginRight: 2 }, currentReportId)),
81
+ React.createElement(DropdownButton_1.default, { disabled: allReportNames.length == 0, width: "100%", fontSize: "small", items: reportItems, columns: ['label'], className: `ab-${elementType}__Export__select`, onClear: () => this.onSelectedReportChanged(null), showClearButton: !!currentReport, variant: "outlined", marginRight: 2 }, currentReportId)),
82
82
  React.createElement(rebass_1.Flex, { flex: 1 },
83
- React.createElement(DropdownButton_1.default, { disabled: currentReportId === constants_1.SELECT_REPORT_STRING, style: { width: '100%', fontSize: 'small' }, items: destinationItems, columns: ['label'], className: `ab-${elementType}__Export__export`, onClear: () => this.onSelectedDestinationChanged(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId)),
83
+ React.createElement(DropdownButton_1.default, { disabled: currentReportId === constants_1.SELECT_REPORT_STRING, width: "100%", fontSize: "small", items: destinationItems, columns: ['label'], className: `ab-${elementType}__Export__export`, onClear: () => this.onSelectedDestinationChanged(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId)),
84
84
  React.createElement(rebass_1.Flex, { className: join_1.default(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls`), style: { width: '100%' } },
85
85
  React.createElement(ButtonExport_1.ButtonExport, { onClick: () => onApplyExport(), tooltip: "Export Report", className: `ab-${elementType}__Export__export`, disabled: currentReport == null || currentDestination == null }),
86
86
  React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => this.props.onEditReport(this.props.moduleInfo.Popup), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null || this.props.api.exportApi.isCustomReport(currentReport), accessLevel: accessLevel }),
@@ -19,7 +19,7 @@ const isValidReportRowsQuery = (report) => {
19
19
  };
20
20
  exports.isValidReportRowsQuery = isValidReportRowsQuery;
21
21
  const renderReportRowsSummary = (report) => {
22
- var _a;
22
+ const { api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
23
23
  return (React.createElement(rebass_1.Box, { fontSize: 2 },
24
24
  report.ReportRowScope === 'AllRows' ? (React.createElement(React.Fragment, null,
25
25
  "Include ",
@@ -30,8 +30,9 @@ const renderReportRowsSummary = (report) => {
30
30
  React.createElement("b", null, "only visible Rows"),
31
31
  " in the Report")) : null,
32
32
  report.ReportRowScope === 'ExpressionRows' ? (React.createElement(React.Fragment, null,
33
- "Include Rows matching the query: ",
34
- React.createElement(Tag_1.Tag, null, (_a = report.Query) === null || _a === void 0 ? void 0 : _a.BooleanExpression))) : null));
33
+ "Include Rows matching the query:",
34
+ ' ',
35
+ React.createElement(Tag_1.Tag, null, api.internalApi.getAdaptableQueryExpressionText(report.Query)))) : null));
35
36
  };
36
37
  exports.renderReportRowsSummary = renderReportRowsSummary;
37
38
  const ReportRowsWizardSection = (props) => {
@@ -13,6 +13,7 @@ const CheckBox_1 = require("../../components/CheckBox");
13
13
  const react_redux_1 = require("react-redux");
14
14
  const LayoutRedux_1 = require("../../Redux/ActionsReducers/LayoutRedux");
15
15
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
16
+ const join_1 = tslib_1.__importDefault(require("../../components/utils/join"));
16
17
  class FilterViewPanelComponent extends React.Component {
17
18
  constructor(props) {
18
19
  super(props);
@@ -35,8 +36,8 @@ class FilterViewPanelComponent extends React.Component {
35
36
  return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Filter__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
36
37
  React.createElement(rebass_1.Flex, null,
37
38
  ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.props.ColumnFilters) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popupPadding: 0, className: `ab-${elementType}__Filter__info`, headerText: "", bodyText: [React.createElement(ActiveFiltersPanel_1.ActiveFiltersPanel, null)], useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })),
38
- showClearButton && (React.createElement(ButtonClear_1.ButtonClear, { marginLeft: 1, marginBottom: 0, marginRight: 1, className: `ab-${elementType}__Filter__clear`, onClick: () => this.onClearFilters(), tooltip: "Clear Filters", disabled: this.props.ColumnFilters.length == 0, showText: this.props.viewType === 'ToolPanel' }, this.props.viewType === 'ToolPanel' && 'Clear')),
39
- showSuspendFilterButton && (React.createElement(SimpleButton_1.default, { disabled: !isAtLeastOneFilter, onClick: handleSuspendUnsuspendAll, tone: isAtLeastOneFilterActive ? 'neutral' : 'success', variant: "text", icon: isAtLeastOneFilterActive ? 'pause' : 'play', accessLevel: this.props.accessLevel }))),
39
+ showClearButton && (React.createElement(ButtonClear_1.ButtonClear, { className: `ab-${elementType}__Filter__clear`, marginLeft: 1, marginBottom: 0, marginRight: 1, onClick: () => this.onClearFilters(), tooltip: "Clear Filters", disabled: this.props.ColumnFilters.length == 0, showText: this.props.viewType === 'ToolPanel' }, this.props.viewType === 'ToolPanel' && 'Clear')),
40
+ showSuspendFilterButton && (React.createElement(SimpleButton_1.default, { className: join_1.default(`ab-${elementType}__Filter__suspend-button`, isAtLeastOneFilterActive && `ab-${elementType}__Filter__suspend-all`, !isAtLeastOneFilterActive && `ab-${elementType}__Filter__un-suspend-all`), disabled: !isAtLeastOneFilter, onClick: handleSuspendUnsuspendAll, tone: isAtLeastOneFilterActive ? 'neutral' : 'success', variant: "text", icon: isAtLeastOneFilterActive ? 'pause' : 'play', accessLevel: this.props.accessLevel }))),
40
41
  React.createElement(rebass_1.Flex, { alignItems: "center" }, this.props.api.filterApi.isQuickFilterAvailable() && (React.createElement(CheckBox_1.CheckBox, { className: `ab-${elementType}__Filter__active-check`, disabled: this.props.accessLevel === 'ReadOnly' ||
41
42
  this.props.api.internalApi.isGridInPivotMode(), marginTop: 0, marginBottom: 0, fontSize: 2, padding: 1, checked: this.props.IsQuickFilterVisible, onChange: (checked) => {
42
43
  checked ? this.props.onShowQuickFilterBar() : this.props.onHideQuickFilterBar();
@@ -4,13 +4,15 @@ exports.AdaptableObjectsSummary = 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");
7
+ const rebass_1 = require("rebass");
7
8
  const AdaptableContext_1 = require("../AdaptableContext");
8
9
  const AdaptableObjectList_1 = require("../Components/AdaptableObjectList");
9
10
  const AdaptableObjectsSummary = () => {
10
11
  const state = react_redux_1.useSelector((state) => state);
11
12
  const adaptable = AdaptableContext_1.useAdaptable();
12
13
  const modules = adaptable.ModuleService.getModuleCollection();
13
- return (React.createElement(React.Fragment, null, [...modules].map(([moduleName, module]) => {
14
+ const baseClassName = 'ab-AdaptableObjectsSummary';
15
+ return (React.createElement(rebass_1.Box, { className: baseClassName }, [...modules].map(([moduleName, module]) => {
14
16
  var _a;
15
17
  if (!module.isModuleAvailable()) {
16
18
  return null;
@@ -19,8 +21,8 @@ const AdaptableObjectsSummary = () => {
19
21
  if (!(items === null || items === void 0 ? void 0 : items.length)) {
20
22
  return null;
21
23
  }
22
- return (React.createElement("div", { key: module.moduleInfo.ModuleName },
23
- React.createElement("b", null, module.moduleInfo.FriendlyName),
24
+ return (React.createElement(rebass_1.Box, { "data-name": module.moduleInfo.ModuleName, className: `${baseClassName}__module-list`, key: module.moduleInfo.ModuleName },
25
+ React.createElement("b", { className: `${baseClassName}__header` }, module.moduleInfo.FriendlyName),
24
26
  (items === null || items === void 0 ? void 0 : items.length) && React.createElement(AdaptableObjectList_1.AdaptableObjectList, { items: items, module: module })));
25
27
  })));
26
28
  };
@@ -91,7 +91,7 @@ const OptionContainerComponent = (props) => {
91
91
  onViewModeChange(viewMode === 'expanded' ? 'collapsed' : 'expanded');
92
92
  };
93
93
  const panelButton = viewMode === 'expanded' ? (React.createElement(ButtonMinimise_1.ButtonMinimise, { onClick: () => requestViewModeChange(), tooltip: `Hide ${label}` })) : (React.createElement(ButtonMaximise_1.ButtonMaximise, { onClick: () => requestViewModeChange(), tooltip: `Show ${label}` }));
94
- return (React.createElement(PanelWithButton_1.PanelWithButton, { className: `options-container-${name}`, variant: "default", headerText: label, headerProps: {
94
+ return (React.createElement(PanelWithButton_1.PanelWithButton, { className: `ab-OptionsContainer options-container-${name}`, variant: "default", headerText: label, headerProps: {
95
95
  fontSize: 3,
96
96
  style: {
97
97
  fontWeight: viewMode === 'expanded' ? 800 : 400,
@@ -102,17 +102,16 @@ const GridInfoPopup = (props) => {
102
102
  return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: index, colItems: x });
103
103
  });
104
104
  const showRadioButtons = [showGridSummary, showAdaptableOptions, showColumnInfo, showAdaptableObjects].filter((item) => item).length > 1;
105
- return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Grid Info', glyphicon: 'info' },
106
- React.createElement(rebass_1.Flex, { marginBottom: 2, padding: 3 }, showRadioButtons && (React.createElement(React.Fragment, null,
107
- showGridSummary && (React.createElement(Radio_1.default, { "data-name": "radioButton-GridSummary", marginRight: 3, value: "GridSummary", checked: state.ActiveTab == 'GridSummary', onChange: (_, e) => onShowGridSummaryChanged('GridSummary') }, "Summary")),
105
+ const baseClassName = 'ab-GridInfo';
106
+ return (React.createElement(PopupPanel_1.PopupPanel, { className: baseClassName, headerText: 'Grid Info', glyphicon: 'info' },
107
+ React.createElement(rebass_1.Flex, { className: `${baseClassName}__header`, marginBottom: 2, padding: 3 }, showRadioButtons && (React.createElement(React.Fragment, null,
108
+ showGridSummary && (React.createElement(Radio_1.default, { className: `${baseClassName}__option-radio`, "data-name": "radioButton-GridSummary", marginRight: 3, value: "GridSummary", checked: state.ActiveTab == 'GridSummary', onChange: (_, e) => onShowGridSummaryChanged('GridSummary') }, "Summary")),
108
109
  showAdaptableOptions && (React.createElement(Radio_1.default, { "data-name": "radioButton-AdaptableOptions", marginRight: 3, value: "AdaptableOptions", checked: state.ActiveTab == 'AdaptableOptions', onChange: (_, e) => onShowGridSummaryChanged('AdaptableOptions') }, "Options")),
109
110
  showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", marginRight: 3, value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "Columns")),
110
111
  showAdaptableObjects && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'AdaptableObjectsSummary', onChange: (_, e) => onShowGridSummaryChanged('AdaptableObjectsSummary') }, "Objects"))))),
111
- state.ActiveTab == 'GridSummary' && (React.createElement(rebass_1.Box, { margin: 2 },
112
- React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { colItems: propValueColItems, items: gridSummaries }))),
112
+ state.ActiveTab == 'GridSummary' && (React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { margin: 2, colItems: propValueColItems, items: gridSummaries })),
113
113
  state.ActiveTab == 'AdaptableOptions' && React.createElement(AdaptableOptionsComponent_1.AdaptableOptionsComponent, { api: props.api }),
114
- state.ActiveTab == 'ColumnInfo' && (React.createElement("div", null,
115
- React.createElement(ColumnInfoComponent_1.ColumnInfoComponent, { api: props.api, teamSharingActivated: props.teamSharingActivated, column: state.CurrentColumn }))),
114
+ state.ActiveTab == 'ColumnInfo' && (React.createElement(ColumnInfoComponent_1.ColumnInfoComponent, { api: props.api, teamSharingActivated: props.teamSharingActivated, column: state.CurrentColumn })),
116
115
  state.ActiveTab === 'AdaptableObjectsSummary' && React.createElement(AdaptableObjectsSummary_1.AdaptableObjectsSummary, null)));
117
116
  };
118
117
  exports.GridInfoPopup = GridInfoPopup;
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_1 = require("react");
7
7
  const rebass_1 = require("rebass");
8
8
  const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
9
- const AdaptableContext_1 = require("../../AdaptableContext");
10
9
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
11
10
  const ModuleConstants_1 = require("../../../Utilities/Constants/ModuleConstants");
12
11
  const Tag_1 = require("../../../components/Tag");
@@ -22,14 +21,14 @@ const isValidNamedQueryExpression = (data, api) => {
22
21
  };
23
22
  exports.isValidNamedQueryExpression = isValidNamedQueryExpression;
24
23
  const renderNamedQueryExpressionSummary = (data) => {
24
+ const { api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
25
25
  return (React.createElement(rebass_1.Text, { fontSize: 2 },
26
26
  "Expression: ",
27
- React.createElement(Tag_1.Tag, null, data.BooleanExpression)));
27
+ React.createElement(Tag_1.Tag, null, api.internalApi.getAdaptableQueryExpressionText(data))));
28
28
  };
29
29
  exports.renderNamedQueryExpressionSummary = renderNamedQueryExpressionSummary;
30
30
  const NamedQueryExpressionWizardSection = (props) => {
31
- const { api } = AdaptableContext_1.useAdaptable();
32
- const { data, moduleInfo } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
31
+ const { data, moduleInfo, api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
33
32
  const initialData = react_1.useMemo(() => api.internalApi.getQueryPreviewData(), []);
34
33
  return (React.createElement(ExpressionEditor_1.ExpressionEditor, { allowSaveNamedQuery: false, type: 'boolean', module: moduleInfo.ModuleName, value: data.BooleanExpression, onChange: (BooleanExpression) => {
35
34
  props.onChange(Object.assign(Object.assign({}, data), { BooleanExpression }));
@@ -4,30 +4,29 @@ exports.StateManagementPopup = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
7
- const rebass_1 = require("rebass");
8
7
  const HelpBlock_1 = tslib_1.__importDefault(require("../../components/HelpBlock"));
9
8
  const LoadButton_1 = require("./components/LoadButton");
10
9
  const ClearButton_1 = require("./components/ClearButton");
11
10
  const ExportDropdown_1 = require("./components/ExportDropdown");
12
11
  const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
13
12
  const StateManagementPopup = (props) => {
14
- return (React.createElement(PopupPanel_1.PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
15
- React.createElement(rebass_1.Box, null,
16
- React.createElement(Panel_1.default, { header: 'User State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2 },
17
- React.createElement(HelpBlock_1.default, { marginBottom: 2 }, 'Clear all current user state that has been persisted.'),
18
- React.createElement(HelpBlock_1.default, null, 'This will cause this window to close and any state you have previously created will be lost and the initial Predefined Config will then be reapplied.'),
19
- React.createElement(ClearButton_1.ClearButton, { tone: "error", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onClick: () => props.api.configApi.reloadPredefinedConfig() }, "Clear User State")),
20
- React.createElement(Panel_1.default, { header: 'Load Predefined Config', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2 },
21
- React.createElement(HelpBlock_1.default, { marginTop: 2 }, 'Load Predefined Config (from a .json file). This will cause this window to close.'),
22
- ' ',
23
- React.createElement(LoadButton_1.LoadButton, { tone: "info", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onLoad: (json) => props.api.configApi.reloadPredefinedConfig(json) }, "Load Predefined Config")),
24
- React.createElement(Panel_1.default, { header: 'Export Adaptable State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2 },
25
- React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, 'Exports the currently persisted Adaptable state.'),
26
- ' ',
27
- React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "adaptableState", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'] }, "Select Export Destination")),
28
- React.createElement(Panel_1.default, { header: 'Export Initial Predefined Config', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2 },
29
- React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, 'Exports the Predefined Config which was provided at design time.'),
30
- ' ',
31
- React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "predefinedConfig", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'] }, "Select Export Destination")))));
13
+ const baseClassName = 'ab-ManageState';
14
+ return (React.createElement(PopupPanel_1.PopupPanel, { className: baseClassName, headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
15
+ React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "user-state", header: 'User State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginRight: 2, mb: 2 },
16
+ React.createElement(HelpBlock_1.default, { marginBottom: 2 }, 'Clear all current user state that has been persisted.'),
17
+ React.createElement(HelpBlock_1.default, null, 'This will cause this window to close and any state you have previously created will be lost and the initial Predefined Config will then be reapplied.'),
18
+ React.createElement(ClearButton_1.ClearButton, { tone: "error", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onClick: () => props.api.configApi.reloadPredefinedConfig() }, "Clear User State")),
19
+ React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "predefined-config", header: 'Load Predefined Config', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2, mb: 2 },
20
+ React.createElement(HelpBlock_1.default, { marginTop: 2 }, 'Load Predefined Config (from a .json file). This will cause this window to close.'),
21
+ ' ',
22
+ React.createElement(LoadButton_1.LoadButton, { tone: "info", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onLoad: (json) => props.api.configApi.reloadPredefinedConfig(json) }, "Load Predefined Config")),
23
+ React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "adaptable-state", header: 'Export Adaptable State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2, mb: 2 },
24
+ React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, 'Exports the currently persisted Adaptable state.'),
25
+ ' ',
26
+ React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "adaptableState", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'] }, "Select Export Destination")),
27
+ React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "initial-predefined-config", header: 'Export Initial Predefined Config', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2, mb: 2 },
28
+ React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, 'Exports the Predefined Config which was provided at design time.'),
29
+ ' ',
30
+ React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "predefinedConfig", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'] }, "Select Export Destination"))));
32
31
  };
33
32
  exports.StateManagementPopup = StateManagementPopup;
@@ -265,6 +265,8 @@ export declare class Adaptable implements IAdaptable {
265
265
  setupColumnTooltipValueGetter({ col, colId, abColumn }: ColumnSetupInfo): void;
266
266
  setupColumnQuickFilerText({ col, abColumn }: ColumnSetupInfo): void;
267
267
  setupAllowedAggFuncs({ col, abColumn }: ColumnSetupInfo): void;
268
+ triggerSetupColumnKeyCreator(colId: string): void;
269
+ setupColumnKeyCreator(columnSetupInfo: ColumnSetupInfo): void;
268
270
  setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
269
271
  setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
270
272
  setupColumnFloatingFilter({ col, colDef }: ColumnSetupInfo): void;
@@ -1305,9 +1305,11 @@ class Adaptable {
1305
1305
  }
1306
1306
  newColState.rowGroupIndex =
1307
1307
  groupedColumnsIndexesMap[colId] != null ? groupedColumnsIndexesMap[colId] : null;
1308
- // if (newColState.rowGroupIndex == null) {
1308
+ const previousRowGroup = newColState.rowGroup;
1309
1309
  newColState.rowGroup = newColState.rowGroupIndex != null;
1310
- // }
1310
+ if (!previousRowGroup && newColState.rowGroup) {
1311
+ this.triggerSetupColumnKeyCreator(colId);
1312
+ }
1311
1313
  const normalizePinned = (pinnedValue) => {
1312
1314
  if (typeof pinnedValue === 'string') {
1313
1315
  return pinnedValue;
@@ -2408,7 +2410,6 @@ class Adaptable {
2408
2410
  }
2409
2411
  getColDefsForCalculatedColumns() {
2410
2412
  const defaultCalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn().CalculatedColumnSettings;
2411
- const isExternalEvaluation = !this.api.internalApi.runModuleInAdaptableQL('CalculatedColumn');
2412
2413
  return this.api.calculatedColumnApi.getAllCalculatedColumn().map((calculatedColumn) => {
2413
2414
  const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
2414
2415
  if (!calculatedColumnSettings.DataType) {
@@ -2422,6 +2423,7 @@ class Adaptable {
2422
2423
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
2423
2424
  columnTypes.push(...calculatedColumnSettings.ColumnTypes);
2424
2425
  }
2426
+ const isExternalEvaluation = !this.api.internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', this.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query));
2425
2427
  const newColDef = {
2426
2428
  headerName: calculatedColumn.FriendlyName
2427
2429
  ? calculatedColumn.FriendlyName
@@ -2451,7 +2453,7 @@ class Adaptable {
2451
2453
  if (calculatedColumnSettings.ShowToolTip != null &&
2452
2454
  calculatedColumnSettings.ShowToolTip == true) {
2453
2455
  newColDef.tooltipValueGetter = () => {
2454
- return this.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query);
2456
+ return this.api.internalApi.getAdaptableQueryExpressionText(calculatedColumn.Query);
2455
2457
  };
2456
2458
  }
2457
2459
  if (calculatedColumnSettings.HeaderToolTip) {
@@ -2922,26 +2924,28 @@ class Adaptable {
2922
2924
  (originalIsExternalFilterPresent ? originalIsExternalFilterPresent(params) : false));
2923
2925
  };
2924
2926
  });
2925
- const evaluateQueryOnClient = this.api.internalApi.runModuleInAdaptableQL('Query');
2926
- const evaluateFilterOnClient = this.api.internalApi.runModuleInAdaptableQL('Filter');
2927
2927
  this.setGridOptionsProperty('doesExternalFilterPass', (originalDoesExternalFilterPass) => {
2928
2928
  return (node) => {
2929
2929
  if (this.isDestroyed) {
2930
2930
  return true;
2931
2931
  }
2932
2932
  // first we assess Query (if its running locally)
2933
- if (evaluateQueryOnClient && !this.isGroupRowNode(node)) {
2933
+ if (!this.isGroupRowNode(node)) {
2934
2934
  const currentQuery = this.api.queryApi.getCurrentQuery();
2935
2935
  if (currentQuery) {
2936
- const isCurrentQueryValid = this.api.queryLanguageApi.isValidBooleanExpression(currentQuery, ModuleConstants_1.QueryModuleId, `Invalid CurrentQuery '${currentQuery}'`);
2937
- if (!isCurrentQueryValid ||
2938
- !this.api.internalApi
2939
- .getQueryLanguageService()
2940
- .evaluateBooleanExpression(currentQuery, ModuleConstants_1.QueryModuleId, node)) {
2941
- return false;
2936
+ const evaluateQueryOnClient = this.api.internalApi.evaluateExpressionInAdaptableQL('Query', currentQuery);
2937
+ if (evaluateQueryOnClient) {
2938
+ const isCurrentQueryValid = this.api.queryLanguageApi.isValidBooleanExpression(currentQuery, ModuleConstants_1.QueryModuleId, `Invalid CurrentQuery '${currentQuery}'`);
2939
+ if (!isCurrentQueryValid ||
2940
+ !this.api.internalApi
2941
+ .getQueryLanguageService()
2942
+ .evaluateBooleanExpression(currentQuery, ModuleConstants_1.QueryModuleId, node)) {
2943
+ return false;
2944
+ }
2942
2945
  }
2943
2946
  }
2944
2947
  }
2948
+ const evaluateFilterOnClient = this.api.internalApi.evaluateExpressionInAdaptableQL('Filter');
2945
2949
  try {
2946
2950
  // we then assess filters (if running locally)
2947
2951
  if (evaluateFilterOnClient) {
@@ -3060,6 +3064,7 @@ class Adaptable {
3060
3064
  this.setupColumnHeader(colSetupInfo);
3061
3065
  this.setupColumnQuickFilerText(colSetupInfo);
3062
3066
  this.setupAllowedAggFuncs(colSetupInfo);
3067
+ this.setupColumnKeyCreator(colSetupInfo);
3063
3068
  });
3064
3069
  this.setupRowStyling();
3065
3070
  // setupAggregationColumnHeaders() is executed on every setLayout()
@@ -3320,6 +3325,44 @@ class Adaptable {
3320
3325
  return abColumn.availableAggregationFunctions;
3321
3326
  });
3322
3327
  }
3328
+ triggerSetupColumnKeyCreator(colId) {
3329
+ const col = this.gridOptions.columnApi.getColumn(colId);
3330
+ const colDef = col.getColDef();
3331
+ const abColumn = this.api.columnApi.getColumnFromId(colId);
3332
+ const colSetupInfo = {
3333
+ col,
3334
+ colDef,
3335
+ colId,
3336
+ abColumn,
3337
+ };
3338
+ this.setupColumnKeyCreator(colSetupInfo);
3339
+ }
3340
+ setupColumnKeyCreator(columnSetupInfo) {
3341
+ const { col, abColumn } = columnSetupInfo;
3342
+ const adaptableOptions = this.adaptableOptions;
3343
+ const adaptableApi = this.api;
3344
+ this.setColDefProperty(col, 'keyCreator', (userPropertyValue) => {
3345
+ return (params) => {
3346
+ var _a;
3347
+ if (typeof userPropertyValue === 'function') {
3348
+ return userPropertyValue(params);
3349
+ }
3350
+ const value = params.value;
3351
+ const groupUnbalancedGroupsUnderKey = (_a = adaptableOptions.layoutOptions) === null || _a === void 0 ? void 0 : _a.groupUnbalancedGroupsUnderKey;
3352
+ if (!groupUnbalancedGroupsUnderKey) {
3353
+ return value;
3354
+ }
3355
+ let groupUnbalancedGroupsUnderKeyValue = typeof groupUnbalancedGroupsUnderKey === 'function'
3356
+ ? groupUnbalancedGroupsUnderKey({
3357
+ adaptableApi: adaptableApi,
3358
+ adaptableColumn: abColumn,
3359
+ params,
3360
+ })
3361
+ : groupUnbalancedGroupsUnderKey;
3362
+ return value === null || value === undefined ? groupUnbalancedGroupsUnderKeyValue : value;
3363
+ };
3364
+ });
3365
+ }
3323
3366
  setupColumnHeader({ col, abColumn }) {
3324
3367
  var _a, _b;
3325
3368
  const previousColumnHeader = (_a = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _a === void 0 ? void 0 : _a.headerName;
@@ -73,10 +73,9 @@ const ModuleManager = (props) => {
73
73
  handleToolbarDragEnd(result);
74
74
  } },
75
75
  React.createElement(DragAndDropContext_1.DragAndDropContext.Provider, { value: contextValue },
76
- React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
76
+ React.createElement("div", { className: "ab-ModuleSelector", style: { display: 'flex', flexDirection: 'column' } },
77
77
  React.createElement(UnusedPanel_1.UnusedPanel, { title: unusedPanelTitle, disabled: disabled, items: unusedItems, dragItemText: dragItemText }),
78
- React.createElement(PanelWithButton_1.PanelWithButton, { headerText: tabsTitle, button: contextValue.permittedActions.createTab && (React.createElement(SimpleButton_1.default, { disabled: disabled, onClick: handleTabAdd }, "Add Tab")) },
79
- React.createElement("div", { style: { display: 'flex', flex: 1 } },
80
- React.createElement(TabList_1.TabList, { disabled: disabled, tabs: tabs, onRemoveTab: handleRemoveTab, onRemoveToolbar: handleRemoveToolbar, onChangeTabName: handleChangeTabName })))))));
78
+ React.createElement(PanelWithButton_1.PanelWithButton, { className: "ab-ModuleSelector-UsedPanel", headerText: tabsTitle, button: contextValue.permittedActions.createTab && (React.createElement(SimpleButton_1.default, { disabled: disabled, onClick: handleTabAdd }, "Add Tab")) },
79
+ React.createElement(TabList_1.TabList, { disabled: disabled, tabs: tabs, onRemoveTab: handleRemoveTab, onRemoveToolbar: handleRemoveToolbar, onChangeTabName: handleChangeTabName }))))));
81
80
  };
82
81
  exports.ModuleManager = ModuleManager;
@@ -4,11 +4,12 @@ exports.ToolbarItem = exports.ToolbarList = exports.TabItem = exports.TabList =
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_beautiful_dnd_1 = require("react-beautiful-dnd");
7
+ const rebass_1 = require("rebass");
7
8
  const icons_1 = require("../icons");
8
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../SimpleButton"));
9
10
  const DragAndDropContext_1 = require("./DragAndDropContext");
10
11
  function TabList({ tabs, onRemoveTab, onRemoveToolbar, onChangeTabName, disabled, }) {
11
- return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: "MAIN", type: "TAB", direction: "horizontal" }, (provided) => (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.droppableProps, { style: { display: 'flex' }, "data-name": "dashboard-tabs" }),
12
+ return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: "MAIN", type: "TAB", direction: "horizontal" }, (provided) => (React.createElement("div", Object.assign({}, provided.droppableProps, { className: "ab-ModuleSelector__TabList", ref: provided.innerRef, style: { display: 'flex' }, "data-name": "dashboard-tabs" }),
12
13
  tabs.map((tab, tabIndex) => (React.createElement(TabItem, { disabled: disabled, key: tabIndex, tabIndex: tabIndex, tab: tab, onRemove: () => onRemoveTab(tabIndex), onRemoveToolbar: (toolbarIndex) => onRemoveToolbar(tabIndex, toolbarIndex), onChangeTabName: (tabName) => onChangeTabName(tabIndex, tabName) }))),
13
14
  provided.placeholder))));
14
15
  }
@@ -16,29 +17,15 @@ exports.TabList = TabList;
16
17
  function TabItem({ tab, tabIndex, onRemove, onRemoveToolbar, onChangeTabName, disabled, }) {
17
18
  const context = React.useContext(DragAndDropContext_1.DragAndDropContext);
18
19
  const isDragDisabled = disabled || !context.permittedActions.dragAndDropTab;
19
- return (React.createElement(react_beautiful_dnd_1.Draggable, { isDragDisabled: isDragDisabled, draggableId: String(tabIndex), index: tabIndex }, (provided) => (React.createElement("div", Object.assign({ "data-name": "dashboard-tab", ref: provided.innerRef }, provided.draggableProps, { style: Object.assign(Object.assign({}, (isDragDisabled ? {} : provided.draggableProps.style)), { boxSizing: 'border-box', border: '1px solid var(--ab-color-primarydark)', borderRadius: 'var(--ab__border-radius)', marginRight: 'var(--ab-space-2)', width: 160, display: 'flex', flexDirection: 'column' }) }),
20
- React.createElement("div", { style: {
21
- display: 'flex',
22
- alignItems: 'center',
23
- padding: 'var(--ab-space-1)',
24
- borderBottom: '1px solid var(--ab-color-primarydark)',
25
- } },
20
+ return (React.createElement(react_beautiful_dnd_1.Draggable, { isDragDisabled: isDragDisabled, draggableId: String(tabIndex), index: tabIndex }, (provided) => (React.createElement("div", Object.assign({ className: "ab-ModuleSelector__TabItem", "data-name": "dashboard-tab", ref: provided.innerRef }, provided.draggableProps, { style: Object.assign({}, (isDragDisabled ? {} : provided.draggableProps.style)) }),
21
+ React.createElement("div", { className: "ab-ModuleSelector__TabItem__header" },
26
22
  React.createElement("div", Object.assign({}, (disabled ? {} : provided.dragHandleProps), { style: context.permittedActions.dragAndDropTab
27
23
  ? {}
28
24
  : {
29
25
  display: 'none',
30
26
  } }),
31
27
  React.createElement(icons_1.Icon, { name: "drag" })),
32
- context.permittedActions.editTabName ? (React.createElement("input", { type: "text", disabled: disabled, value: tab.Name, style: {
33
- flex: 1,
34
- width: '100%',
35
- border: 'none',
36
- marginLeft: 'var(--ab-space-1)',
37
- marginRight: 'var(--ab-space-1)',
38
- alignSelf: 'stretch',
39
- background: 'transparent',
40
- color: 'var(--ab-color-text-on-primary)',
41
- }, onChange: (event) => {
28
+ context.permittedActions.editTabName ? (React.createElement("input", { className: "ab-ModuleSelector__TabItem__header-input", type: "text", disabled: disabled, value: tab.Name, onChange: (event) => {
42
29
  onChangeTabName(event.target.value);
43
30
  } })) : (tab.Name),
44
31
  context.permittedActions.deleteTab && (React.createElement(SimpleButton_1.default, { disabled: disabled, icon: "delete", variant: "text", onClick: onRemove }))),
@@ -46,15 +33,7 @@ function TabItem({ tab, tabIndex, onRemove, onRemoveToolbar, onChangeTabName, di
46
33
  }
47
34
  exports.TabItem = TabItem;
48
35
  function ToolbarList({ toolbars, droppableId, onRemove, disabled, }) {
49
- return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableId, type: "TOOLBAR" }, (provided, snapshot) => (React.createElement("div", Object.assign({ ref: provided.innerRef }, (disabled ? {} : provided.droppableProps), { "data-name": "dashboard-toolbar-drop-target", style: {
50
- flex: 1,
51
- padding: 4,
52
- paddingBottom: 0,
53
- background: snapshot.isDraggingOver
54
- ? 'var(--ab-dashboard-tab-drop-target__background)'
55
- : '',
56
- minHeight: 200,
57
- } }),
36
+ return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableId, type: "TOOLBAR" }, (provided, snapshot) => (React.createElement(rebass_1.Box, Object.assign({ className: "ab-ModuleSelector__ToolbarList", ref: provided.innerRef }, (disabled ? {} : provided.droppableProps), { "data-name": "dashboard-toolbar-drop-target", backgroundColor: snapshot.isDraggingOver ? 'var(--ab-dashboard-tab-drop-target__background)' : '' }),
58
37
  toolbars.map((toolbar, toolbarIndex) => (React.createElement(ToolbarItem, { disabled: disabled, key: toolbar, toolbar: toolbar, toolbarIndex: toolbarIndex, onRemove: () => onRemove(toolbarIndex) }))),
59
38
  provided.placeholder))));
60
39
  }
@@ -63,9 +42,9 @@ function ToolbarItem({ toolbar, toolbarIndex, onRemove, disabled, }) {
63
42
  const { availableItems } = React.useContext(DragAndDropContext_1.DragAndDropContext);
64
43
  let currentItem = availableItems.find((t) => t.Id === toolbar);
65
44
  const title = currentItem ? currentItem.Title : toolbar;
66
- return (React.createElement(react_beautiful_dnd_1.Draggable, { isDragDisabled: disabled, draggableId: toolbar, index: toolbarIndex }, (provided, snapshot) => (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: Object.assign(Object.assign({}, provided.draggableProps.style), { display: 'flex', alignItems: 'center', border: '1px solid var(--ab-color-primary)', backgroundColor: snapshot.isDragging
67
- ? 'var(--ab-dashboard-toolbar-drag__background)'
68
- : 'var(--ab-color-primarylight)', paddingLeft: 'var(--ab-space-1)', marginBottom: 'var(--ab-space-1)' }) }),
45
+ return (React.createElement(react_beautiful_dnd_1.Draggable, { isDragDisabled: disabled, draggableId: toolbar, index: toolbarIndex }, (provided, snapshot) => (React.createElement(rebass_1.Flex, Object.assign({ className: "ab-ModuleSelector__ToolbarItem", alignItems: "center", backgroundColor: snapshot.isDragging
46
+ ? 'var(--ab-dashboard-toolbar-drag__background)'
47
+ : 'var(--ab-color-primarylight)', ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: provided.draggableProps.style }),
69
48
  React.createElement("div", { style: { flex: 1 } }, title),
70
49
  React.createElement(SimpleButton_1.default, { disabled: disabled, icon: "clear", variant: "text", padding: 1, onClick: onRemove })))));
71
50
  }
@@ -6,13 +6,7 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_beautiful_dnd_1 = require("react-beautiful-dnd");
7
7
  const DragAndDropContext_1 = require("./DragAndDropContext");
8
8
  function UnusedPanel({ items, disabled, title, dragItemText, }) {
9
- return (React.createElement("div", { "data-name": "unusedpanel-items", style: {
10
- border: '1px solid var(--ab-color-primarydark)',
11
- borderRadius: 'var(--ab__border-radius)',
12
- marginBottom: 'var(--ab-space-2)',
13
- paddingBottom: 'var(--ab-space-1)',
14
- backgroundColor: 'var(--ab-color-defaultbackground)',
15
- } },
9
+ return (React.createElement("div", { className: "ab-ModuleSelector__UnusedPanel", "data-name": "unusedpanel-items" },
16
10
  React.createElement("div", { style: { padding: 'var(--ab-space-2)' } },
17
11
  React.createElement("b", null, title),
18
12
  " (",