@adaptabletools/adaptable-cjs 22.1.0 → 22.1.1-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 (142) hide show
  1. package/index.css +8 -9
  2. package/package.json +1 -1
  3. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
  4. package/src/AdaptableOptions/AdaptableOptions.d.ts +2 -21
  5. package/src/AdaptableOptions/AlertOptions.d.ts +0 -5
  6. package/src/AdaptableOptions/CellSummaryOptions.d.ts +2 -0
  7. package/src/AdaptableOptions/ChartingOptions.d.ts +2 -0
  8. package/src/AdaptableOptions/ColumnOptions.d.ts +0 -2
  9. package/src/AdaptableOptions/CommentOptions.d.ts +6 -0
  10. package/src/AdaptableOptions/ContainerOptions.d.ts +0 -6
  11. package/src/AdaptableOptions/DashboardOptions.d.ts +0 -2
  12. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +0 -2
  13. package/src/AdaptableOptions/DataSetOptions.d.ts +2 -0
  14. package/src/AdaptableOptions/DefaultAdaptableOptions.js +34 -2
  15. package/src/AdaptableOptions/EditOptions.d.ts +0 -1
  16. package/src/AdaptableOptions/EntitlementOptions.d.ts +0 -2
  17. package/src/AdaptableOptions/ExportOptions.d.ts +1 -7
  18. package/src/AdaptableOptions/ExpressionOptions.d.ts +0 -18
  19. package/src/AdaptableOptions/Fdc3Options.d.ts +5 -1
  20. package/src/AdaptableOptions/FilterOptions.d.ts +3 -18
  21. package/src/AdaptableOptions/NoteOptions.d.ts +6 -0
  22. package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -10
  23. package/src/AdaptableOptions/PredicateOptions.d.ts +12 -1
  24. package/src/AdaptableOptions/QuickSearchOptions.d.ts +0 -4
  25. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +15 -5
  26. package/src/AdaptableOptions/TeamSharingOptions.d.ts +0 -4
  27. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -1
  28. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -7
  29. package/src/AdaptableState/Common/AdaptableFormat.d.ts +9 -0
  30. package/src/AdaptableState/Common/AdaptableFormatPresets.d.ts +31 -0
  31. package/src/AdaptableState/Common/AdaptableFormatPresets.js +186 -0
  32. package/src/AdaptableState/Common/Menu.d.ts +1 -1
  33. package/src/AdaptableState/Common/Menu.js +2 -0
  34. package/src/AdaptableState/FormatColumnState.d.ts +6 -3
  35. package/src/Api/EventApi.d.ts +6 -6
  36. package/src/Api/Implementation/EntitlementApiImpl.js +5 -4
  37. package/src/Api/Implementation/FormatColumnApiImpl.js +8 -3
  38. package/src/Api/Implementation/GridApiImpl.js +1 -12
  39. package/src/Api/Internal/FormatColumnInternalApi.js +4 -2
  40. package/src/Api/Internal/LayoutInternalApi.js +5 -2
  41. package/src/Redux/Store/AdaptableStore.js +4 -4
  42. package/src/Strategy/AdaptableModuleBase.js +8 -7
  43. package/src/Strategy/AlertModule.d.ts +1 -1
  44. package/src/Strategy/BulkUpdateModule.d.ts +1 -1
  45. package/src/Strategy/BulkUpdateModule.js +2 -1
  46. package/src/Strategy/CalculatedColumnModule.d.ts +1 -1
  47. package/src/Strategy/CellSummaryModule.d.ts +1 -1
  48. package/src/Strategy/CellSummaryModule.js +2 -1
  49. package/src/Strategy/ColumnFilterModule.js +2 -1
  50. package/src/Strategy/ColumnInfoModule.d.ts +1 -1
  51. package/src/Strategy/ColumnInfoModule.js +2 -1
  52. package/src/Strategy/CommentModule.d.ts +1 -1
  53. package/src/Strategy/CommentModule.js +12 -2
  54. package/src/Strategy/ExportModule.d.ts +1 -1
  55. package/src/Strategy/Fdc3Module.d.ts +1 -1
  56. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  57. package/src/Strategy/GridFilterModule.js +2 -1
  58. package/src/Strategy/GridInfoModule.d.ts +1 -1
  59. package/src/Strategy/GridInfoModule.js +2 -1
  60. package/src/Strategy/LayoutModule.d.ts +1 -1
  61. package/src/Strategy/NamedQueryModule.js +0 -16
  62. package/src/Strategy/NoteModule.d.ts +1 -1
  63. package/src/Strategy/NoteModule.js +16 -3
  64. package/src/Strategy/PlusMinusModule.js +8 -2
  65. package/src/Strategy/ScheduleModule.js +5 -4
  66. package/src/Strategy/SettingsPanelModule.d.ts +1 -1
  67. package/src/Strategy/ShortcutModule.js +5 -4
  68. package/src/Strategy/SmartEditModule.d.ts +1 -1
  69. package/src/Strategy/SmartEditModule.js +4 -4
  70. package/src/Strategy/SystemStatusModule.d.ts +1 -1
  71. package/src/Utilities/Constants/GeneralConstants.d.ts +4 -0
  72. package/src/Utilities/Constants/GeneralConstants.js +5 -1
  73. package/src/Utilities/Extensions/NumberExtensions.d.ts +2 -0
  74. package/src/Utilities/Extensions/NumberExtensions.js +9 -0
  75. package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
  76. package/src/Utilities/Helpers/FormatHelper.js +26 -15
  77. package/src/Utilities/Services/AnnotationsService.js +10 -1
  78. package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -1
  79. package/src/Utilities/Services/MetamodelService.d.ts +0 -2
  80. package/src/Utilities/Services/MetamodelService.js +6 -12
  81. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +7 -6
  82. package/src/View/Alert/AlertEmptyView.js +2 -1
  83. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
  84. package/src/View/CellSummary/CellSummaryViewPanel.js +2 -1
  85. package/src/View/Comments/CommentsEditor.js +2 -1
  86. package/src/View/Comments/CommentsPopup.js +3 -1
  87. package/src/View/Components/Buttons/ButtonBase/index.js +3 -2
  88. package/src/View/Components/Buttons/EntityListActionButtons.js +7 -6
  89. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +2 -1
  90. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +3 -2
  91. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +4 -1
  92. package/src/View/Components/Panels/PanelDashboard/index.js +2 -1
  93. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -2
  94. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -1
  95. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
  96. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -1
  97. package/src/View/Dashboard/CustomDashboardButton.js +3 -2
  98. package/src/View/Dashboard/Dashboard.js +3 -2
  99. package/src/View/Dashboard/DashboardPopup.js +3 -2
  100. package/src/View/Dashboard/PinnedToolbarsSelector.js +2 -1
  101. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
  102. package/src/View/Export/ExportViewPanel.js +3 -1
  103. package/src/View/Filter/FilterViewPanel.js +2 -1
  104. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +137 -181
  105. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +20 -8
  106. package/src/View/GridFilter/GridFilterPopupUI/index.d.ts +3 -2
  107. package/src/View/GridFilter/GridFilterPopupUI/index.js +2 -1
  108. package/src/View/GridFilter/GridFilterViewPanel.js +3 -2
  109. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +179 -6
  110. package/src/View/Layout/LayoutCloneButton.js +2 -1
  111. package/src/View/Layout/LayoutViewPanel.js +3 -1
  112. package/src/View/Layout/TransposedPopup.js +2 -1
  113. package/src/View/Note/NotePopup.js +3 -1
  114. package/src/View/SmartEdit/SmartEditViewPanel.js +2 -1
  115. package/src/View/StateManagement/StateManagementViewPanel.js +3 -1
  116. package/src/View/StatusBar/StatusBarPopup.js +2 -1
  117. package/src/View/Theme/ThemeEditor.js +2 -1
  118. package/src/View/Theme/ThemePopup.js +2 -1
  119. package/src/View/Theme/ThemeSelector.js +3 -1
  120. package/src/View/Theme/ThemeViewPanel.js +3 -1
  121. package/src/View/Wizard/OnePageWizards.js +3 -2
  122. package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
  123. package/src/agGrid/AdaptableAgGrid.js +7 -29
  124. package/src/agGrid/AgGridAdapter.js +1 -1
  125. package/src/agGrid/AgGridColumnAdapter.js +11 -4
  126. package/src/agGrid/AgGridExportAdapter.js +4 -2
  127. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +2 -1
  128. package/src/components/Dashboard/Dashboard.js +2 -1
  129. package/src/components/Dashboard/DashboardToolbar.js +2 -1
  130. package/src/components/Datepicker/index.js +2 -1
  131. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -1
  132. package/src/components/Select/Select.js +4 -3
  133. package/src/components/SimpleButton/index.js +3 -2
  134. package/src/env.js +2 -2
  135. package/src/metamodel/adaptable-metamodel-model.d.ts +0 -2
  136. package/src/metamodel/adaptable.metamodel.d.ts +10 -197
  137. package/src/metamodel/adaptable.metamodel.js +1 -1
  138. package/src/types.d.ts +2 -0
  139. package/src/types.js +5 -1
  140. package/themes/dark.css +3 -1
  141. package/tsconfig.cjs.tsbuildinfo +1 -1
  142. package/index.css.map +0 -1
@@ -11,6 +11,7 @@ const Panel_1 = tslib_1.__importDefault(require("../../../components/Panel"));
11
11
  const Tabs_1 = require("../../../components/Tabs");
12
12
  const PopupPanel_1 = require("../../Components/Popups/AdaptablePopup/PopupPanel");
13
13
  const AdaptableObjectsSummary_1 = require("./AdaptableObjectsSummary");
14
+ const DefaultAdaptableOptions_1 = require("../../../AdaptableOptions/DefaultAdaptableOptions");
14
15
  const clsx_1 = tslib_1.__importDefault(require("clsx"));
15
16
  const adaptableVersion = EnvVars_1.ADAPTABLE_VERSION;
16
17
  const agGridVersion = AgGridModulesAdapter_1.AG_GRID_VERSION;
@@ -40,6 +41,7 @@ const GridInfoPopup = (props) => {
40
41
  if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
41
42
  keyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
42
43
  }
44
+ keyValuePairs.push({ Key: 'License Key', Value: api.optionsApi.getAdaptableOptions().licenseKey });
43
45
  keyValuePairs.push({ Key: 'Sorted Columns', Value: ArrayExtensions_1.default.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None' });
44
46
  keyValuePairs.push({ Key: 'Column Filters', Value: columnFilterDescription });
45
47
  keyValuePairs.push({ Key: 'Grid Filter', Value: gridFilterExpression });
@@ -72,17 +74,188 @@ const GridInfoPopup = (props) => {
72
74
  Key: { field: 'Key', header: 'Property', defaultFlex: 1 },
73
75
  Value: { field: 'Value', header: 'Value', defaultFlex: 3 },
74
76
  };
77
+ // Variant used by the Grid Options tab — the Value column allows newlines
78
+ // in the rendered string (preserved via `white-space: pre-line`), so a
79
+ // nested *Options object can show one `"key": value` per line.
80
+ const optionsColumnsMap = {
81
+ Key: { field: 'Key', header: 'Property', defaultFlex: 1 },
82
+ Value: {
83
+ field: 'Value',
84
+ header: 'Value',
85
+ defaultFlex: 3,
86
+ render: ({ value }) => (React.createElement("span", { style: {
87
+ whiteSpace: 'pre-wrap',
88
+ wordBreak: 'break-word',
89
+ overflowWrap: 'anywhere',
90
+ display: 'block',
91
+ lineHeight: '18px',
92
+ paddingTop: 4,
93
+ paddingBottom: 4,
94
+ } }, String(value ?? ''))),
95
+ },
96
+ };
97
+ // ---- Grid Options tab: build one InfiniteTableGrid section per non-empty
98
+ // ---- options group on the AdaptableOptions object.
99
+ const titleCase = (camel) => camel
100
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
101
+ .replace(/^./, (c) => c.toUpperCase())
102
+ .replace(/\s./g, (c) => c.toUpperCase());
103
+ // Renders a single primitive / function / array / nested-object value
104
+ // (used for the inner key:value pairs when expanding a nested options
105
+ // object). Short objects/arrays stay on one line; longer ones get
106
+ // pretty-printed across multiple lines so they don't blow past the cell.
107
+ const ONE_LINE_MAX = 60;
108
+ const fnReplacer = (_k, val) => typeof val === 'function' ? '[Function]' : val;
109
+ const formatValuePart = (v) => {
110
+ if (typeof v === 'function')
111
+ return '[Function]';
112
+ if (v === undefined)
113
+ return 'undefined';
114
+ if (v === null)
115
+ return 'null';
116
+ if (typeof v === 'string')
117
+ return JSON.stringify(v);
118
+ if (Array.isArray(v) || typeof v === 'object') {
119
+ try {
120
+ const oneLine = JSON.stringify(v, fnReplacer);
121
+ if (oneLine !== undefined && oneLine.length <= ONE_LINE_MAX)
122
+ return oneLine;
123
+ return JSON.stringify(v, fnReplacer, 2);
124
+ }
125
+ catch {
126
+ return String(v);
127
+ }
128
+ }
129
+ return String(v);
130
+ };
131
+ const displayValue = (v) => {
132
+ if (typeof v === 'function')
133
+ return '[Function]';
134
+ if (v === undefined)
135
+ return '(undefined)';
136
+ if (v === null)
137
+ return '(null)';
138
+ if (Array.isArray(v)) {
139
+ // Top-level array values (e.g. `colorPalette`, `systemFilterPredicates`).
140
+ // Short arrays stay on one line; longer ones get pretty-printed across
141
+ // multiple lines so they don't blow past the cell.
142
+ return formatValuePart(v);
143
+ }
144
+ if (typeof v === 'object') {
145
+ // Nested options-style object → render as one `key: value` per line.
146
+ // `undefined` entries are filtered out so empty defaults don't show up.
147
+ const entries = Object.entries(v).filter(([, val]) => val !== undefined);
148
+ if (entries.length === 0)
149
+ return '{}';
150
+ return entries.map(([k, val]) => `${k}: ${formatValuePart(val)}`).join('\n');
151
+ }
152
+ return String(v);
153
+ };
154
+ const gridOptionsSections = (() => {
155
+ const opts = api.optionsApi.getAdaptableOptions();
156
+ const defaults = (0, DefaultAdaptableOptions_1.getDefaultAdaptableOptions)();
157
+ const baseRows = [];
158
+ const groupSections = [];
159
+ // A function value should only be displayed when it has been explicitly
160
+ // provided by the user. AdapTable ships a handful of identity-function
161
+ // defaults (e.g. `stateOptions.applyState`) that are not interesting to
162
+ // surface here — we suppress those by reference-comparing against the
163
+ // values returned from `getDefaultAdaptableOptions()`.
164
+ const isUserProvidedFunction = (groupKey, propKey, fn) => {
165
+ if (typeof fn !== 'function')
166
+ return false;
167
+ const defaultGroup = defaults[groupKey];
168
+ if (!defaultGroup || typeof defaultGroup !== 'object')
169
+ return true;
170
+ return defaultGroup[propKey] !== fn;
171
+ };
172
+ Object.keys(opts).forEach((key) => {
173
+ if (key === 'licenseKey' || key === 'initialState')
174
+ return;
175
+ const value = opts[key];
176
+ if (value == null)
177
+ return;
178
+ if (typeof value === 'object' && !Array.isArray(value)) {
179
+ const rows = Object.keys(value)
180
+ .filter((sk) => {
181
+ const sv = value[sk];
182
+ // skip empties (undefined / null)
183
+ if (sv == null)
184
+ return false;
185
+ // suppress AdapTable's default callback implementations — keep
186
+ // only user-provided overrides
187
+ if (typeof sv === 'function' && !isUserProvidedFunction(key, sk, sv)) {
188
+ return false;
189
+ }
190
+ return true;
191
+ })
192
+ .map((sk) => ({ Key: sk, Value: displayValue(value[sk]) }));
193
+ if (rows.length === 0)
194
+ return;
195
+ groupSections.push({ title: titleCase(key), rows });
196
+ }
197
+ else {
198
+ // top-level function defaults aren't a concern (none exist on the
199
+ // root of `AdaptableOptions`), but apply the same rule for safety
200
+ if (typeof value === 'function' && defaults[key] === value)
201
+ return;
202
+ baseRows.push({ Key: key, Value: displayValue(value) });
203
+ }
204
+ });
205
+ const sections = [];
206
+ if (baseRows.length > 0)
207
+ sections.push({ title: 'Base Properties', rows: baseRows });
208
+ sections.push(...groupSections);
209
+ return sections;
210
+ })();
211
+ // Variable row height for Grid Options sections — counts the number of
212
+ // lines in the formatted value string (including visual wraps for very
213
+ // long unbroken lines) and grows the row to fit.
214
+ const VALUE_CHARS_PER_LINE = 70; // rough estimate at the Value column width
215
+ const visualLineCount = (text) => {
216
+ if (!text)
217
+ return 1;
218
+ return text
219
+ .split('\n')
220
+ .reduce((acc, line) => acc + Math.max(1, Math.ceil(line.length / VALUE_CHARS_PER_LINE)), 0);
221
+ };
222
+ const calculateRowHeight = (row) => {
223
+ const lines = visualLineCount(String(row?.Value ?? ''));
224
+ if (lines <= 1)
225
+ return 32;
226
+ return lines * 18 + 12;
227
+ };
228
+ const sectionHeight = (rows) => {
229
+ const total = rows.reduce((acc, r) => acc + calculateRowHeight(r), 0);
230
+ // 40px header, capped so a single huge group can't dominate the popup
231
+ return Math.min(total + 40, 400);
232
+ };
233
+ // Which tabs the user has opted in to. Falls back to all three (matching
234
+ // the default in `DefaultAdaptableOptions`) when the option isn't set.
235
+ const enabledTabs = api.optionsApi.getSettingsPanelOptions()?.gridInfoTabs ??
236
+ ['Grid Options', 'Grid Summary', 'Grid State'];
237
+ const showSummary = enabledTabs.includes('Grid Summary');
238
+ const showState = enabledTabs.includes('Grid State');
239
+ const showOptions = enabledTabs.includes('Grid Options');
75
240
  const baseClassName = 'ab-GridInfo';
76
241
  return (React.createElement(PopupPanel_1.PopupPanel, { className: (0, clsx_1.default)(baseClassName), headerText: 'Grid Info', glyphicon: 'info', scrollable: false },
77
242
  React.createElement(Panel_1.default, { className: "twa:flex-1 twa:border-none twa:shadow-md twa:overflow-hidden" },
78
243
  React.createElement(Panel_1.default.FlexBody, null,
79
244
  React.createElement(Tabs_1.Tabs, { className: "twa:flex-1 twa:min-h-0" },
80
- React.createElement(Tabs_1.Tabs.Tab, null, "Grid Summary"),
81
- React.createElement(Tabs_1.Tabs.Tab, null, "Grid State"),
82
- React.createElement(Tabs_1.Tabs.Content, null,
245
+ showSummary ? React.createElement(Tabs_1.Tabs.Tab, null, "Grid Summary") : null,
246
+ showState ? React.createElement(Tabs_1.Tabs.Tab, null, "Grid State") : null,
247
+ showOptions ? React.createElement(Tabs_1.Tabs.Tab, null, "Grid Options") : null,
248
+ showSummary ? (React.createElement(Tabs_1.Tabs.Content, null,
83
249
  React.createElement(InfiniteTable_1.DataSource, { data: keyValuePairs, primaryKey: "Key" },
84
- React.createElement(InfiniteTable_1.InfiniteTableGrid, { domProps: domProps, columns: columnsMap }))),
85
- React.createElement(Tabs_1.Tabs.Content, null,
86
- React.createElement(AdaptableObjectsSummary_1.AdaptableObjectsSummary, { className: "twa:min-h-0 twa:overflow-auto twa:p-2" })))))));
250
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { domProps: domProps, columns: columnsMap })))) : null,
251
+ showState ? (React.createElement(Tabs_1.Tabs.Content, null,
252
+ React.createElement(AdaptableObjectsSummary_1.AdaptableObjectsSummary, { className: "twa:min-h-0 twa:overflow-auto twa:p-2" }))) : null,
253
+ showOptions ? (React.createElement(Tabs_1.Tabs.Content, null,
254
+ React.createElement("div", { className: "twa:min-h-0 twa:overflow-auto twa:p-2 twa:flex twa:flex-col twa:gap-4" }, gridOptionsSections.map((section) => (React.createElement("div", { key: section.title },
255
+ React.createElement("h4", { className: "twa:font-semibold twa:mb-1" }, section.title),
256
+ React.createElement(InfiniteTable_1.DataSource, { data: section.rows, primaryKey: "Key" },
257
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { domProps: {
258
+ style: { height: sectionHeight(section.rows), width: '100%' },
259
+ }, rowHeight: (rowInfo) => calculateRowHeight(rowInfo.data), columns: optionsColumnsMap })))))))) : null)))));
87
260
  };
88
261
  exports.GridInfoPopup = GridInfoPopup;
@@ -6,9 +6,10 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
7
7
  const AdaptableContext_1 = require("../AdaptableContext");
8
8
  const isPivotLayout_1 = require("../../Utilities/isPivotLayout");
9
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
9
10
  const LayoutCloneButton = ({ data, accessLevel }) => {
10
11
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
11
- const isDisabled = accessLevel === 'ReadOnly';
12
+ const isDisabled = accessLevel === GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
12
13
  const handleClick = React.useCallback(() => {
13
14
  adaptable.api.layoutApi.showLayoutEditor(data.Name, (0, isPivotLayout_1.isPivotLayout)(data) ? 'pivot' : 'table', 'Clone');
14
15
  }, []);
@@ -45,7 +45,9 @@ const LayoutViewPanelComponent = (props) => {
45
45
  return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Layout__wrap`, flexWrap: viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
46
46
  React.createElement(Flex_1.Flex, { style: layoutSelectStyle, className: "twa:flex-1" },
47
47
  React.createElement(Select_1.Select, { "aria-label": 'Select Layout', disabled: isErrorLayout, style: { width: '100%' }, options: availableLayoutOptions, className: `ab-${elementType}__Layout__select`, value: layoutEntity ? layoutEntity.Name : null, onChange: (layout) => onSelectLayout(layout) })),
48
- React.createElement(Flex_1.Flex, { flexDirection: "row", className: (0, join_1.default)(accessLevel === 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Layout__wrap`) },
48
+ React.createElement(Flex_1.Flex, { flexDirection: "row", className: (0, join_1.default)(accessLevel === GeneralConstants.ACCESS_LEVEL_READ_ONLY
49
+ ? GeneralConstants.READ_ONLY_STYLE
50
+ : '', `ab-${elementType}__Layout__wrap`) },
49
51
  React.createElement(ButtonEdit_1.ButtonEdit, { disabled: isErrorLayout, onClick: () => api.layoutApi.showLayoutEditor(layoutEntity.Name), tooltip: GeneralConstants_1.LAYOUT_EDIT_TOOLTIP, className: `ab-${elementType}__Layout__edit`, accessLevel: entityAccessLevel }),
50
52
  React.createElement(ButtonClone_1.ButtonClone, { disabled: isErrorLayout, onClick: () => api.layoutApi.showLayoutEditor(layoutEntity.Name, (0, isPivotLayout_1.isPivotLayout)(layoutEntity) ? 'pivot' : 'table', 'Clone'), tooltip: GeneralConstants_1.LAYOUT_CLONE_TOOLTIP, className: `ab-${elementType}__Layout__clone`, tone: "neutral", variant: "text", children: null, accessLevel: cloneAccessLevel }),
51
53
  React.createElement(DropdownButton_1.default, { variant: "text", tooltip: GeneralConstants_1.LAYOUT_NEW_TABLE_OR_PIVOT_TOOLTIP, columns: ['label'], "data-name": "new", items: [
@@ -9,6 +9,7 @@ const AdaptableContext_1 = require("../AdaptableContext");
9
9
  const ColumnSelector_1 = require("../Components/Selectors/ColumnSelector");
10
10
  const AdaptableAgGrid_1 = require("../../agGrid/AdaptableAgGrid");
11
11
  const Flex_1 = require("../../components/Flex");
12
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
12
13
  const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
13
14
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
14
15
  const ADAPTABLE_CONTAINER_ID = 'transposed-adaptable-container';
@@ -27,7 +28,7 @@ function buildTransposedAdaptableOptions({ hostOptions, transposedRowsAndColumns
27
28
  adaptableContainer: ADAPTABLE_CONTAINER_ID,
28
29
  agGridContainer: AG_GRID_CONTAINER_ID,
29
30
  },
30
- entitlementOptions: { defaultAccessLevel: 'Hidden' },
31
+ entitlementOptions: { defaultAccessLevel: GeneralConstants_1.ACCESS_LEVEL_HIDDEN },
31
32
  initialState: {
32
33
  Layout: {
33
34
  Revision: Date.now(),
@@ -11,6 +11,7 @@ const AdaptableButton_1 = require("../Components/AdaptableButton");
11
11
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
12
12
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
13
13
  const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
14
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
14
15
  const tableDOMProps = {
15
16
  style: {
16
17
  height: '100%',
@@ -35,7 +36,8 @@ const NotePopup = (props) => {
35
36
  ? adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId)
36
37
  : StringExtensions_1.default.Humanize(adaptable.adaptableOptions.primaryKey);
37
38
  const allNotes = (0, react_redux_1.useSelector)((state) => (0, NoteRedux_1.GetAllNotesSelector)(state.Note));
38
- const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
39
+ const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') ===
40
+ GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
39
41
  const formatDate = (date, format) => {
40
42
  return FormatHelper_1.default.DateFormatter(date, { Pattern: format });
41
43
  };
@@ -10,6 +10,7 @@ const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions"
10
10
  const PreviewResultsPanel_1 = require("../Components/PreviewResultsPanel");
11
11
  const EnumExtensions_1 = require("../../Utilities/Extensions/EnumExtensions");
12
12
  const Input_1 = tslib_1.__importDefault(require("../../components/Input"));
13
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
13
14
  const ButtonApply_1 = require("../Components/Buttons/ButtonApply");
14
15
  const AdaptablePopover_1 = require("../AdaptablePopover");
15
16
  const UIHelper_1 = require("../UIHelper");
@@ -66,7 +67,7 @@ class SmartEditViewPanelComponent extends React.Component {
66
67
  color: statusColour,
67
68
  fill: 'currentColor',
68
69
  };
69
- let shouldDisable = this.props.accessLevel == 'ReadOnly' ||
70
+ let shouldDisable = this.props.accessLevel == GeneralConstants_1.ACCESS_LEVEL_READ_ONLY ||
70
71
  !this.props.IsValidSelection ||
71
72
  this.props.api.layoutApi.isCurrentLayoutPivot() == true;
72
73
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
@@ -12,7 +12,9 @@ const Flex_1 = require("../../components/Flex");
12
12
  const StateManagementViewPanel = (props) => {
13
13
  const isToolbar = props.viewType === 'Toolbar';
14
14
  const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
15
- return (React.createElement(Flex_1.Flex, { flexDirection: isToolbar ? 'row' : 'column', className: (0, join_1.default)(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__StateManagement__wrap twa:min-h-input`) },
15
+ return (React.createElement(Flex_1.Flex, { flexDirection: isToolbar ? 'row' : 'column', className: (0, join_1.default)(props.accessLevel == GeneralConstants.ACCESS_LEVEL_READ_ONLY
16
+ ? GeneralConstants.READ_ONLY_STYLE
17
+ : '', `ab-${elementType}__StateManagement__wrap twa:min-h-input`) },
16
18
  React.createElement(Flex_1.Flex, { flexDirection: "row" },
17
19
  React.createElement(LoadButton_1.LoadButton, { tooltip: "Load Initial Adaptable State", variant: "text", icon: "upload", onLoad: (json) => props.api.stateApi.reloadInitialState(json), accessLevel: props.accessLevel }, !isToolbar && 'Load'),
18
20
  React.createElement(ClearButton_1.ClearButton, { icon: "delete", tooltip: "Clear User State", variant: "text", onClick: () => props.api.stateApi.reloadInitialState(), accessLevel: props.accessLevel }, !isToolbar && 'Clear')),
@@ -10,6 +10,7 @@ const Types_1 = require("../../AdaptableState/Common/Types");
10
10
  const StatusBarRedux_1 = require("../../Redux/ActionsReducers/StatusBarRedux");
11
11
  const AdaptableContext_1 = require("../AdaptableContext");
12
12
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
13
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
13
14
  const StatusBarPopup = (props) => {
14
15
  const statusPanels = (0, react_redux_1.useSelector)(StatusBarRedux_1.getStatusPanelsSelector);
15
16
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -36,7 +37,7 @@ const StatusBarPopup = (props) => {
36
37
  const module = adaptable.ModuleService.getModuleById(panel);
37
38
  return { Id: panel, Title: module.moduleInfo.FriendlyName };
38
39
  });
39
- const disabled = props.accessLevel === 'ReadOnly';
40
+ const disabled = props.accessLevel === GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
40
41
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() }, statusPanels.length ? (React.createElement(ModuleManager_1.ModuleManager, { permittedActions: {
41
42
  createTab: false,
42
43
  dragAndDropTab: false,
@@ -12,6 +12,7 @@ const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
12
12
  const ThemeField_1 = require("./ThemeField");
13
13
  const VariantSelector_1 = require("./VariantSelector");
14
14
  const AdaptableHelper_1 = require("../../Utilities/Helpers/AdaptableHelper");
15
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
15
16
  const Flex_1 = require("../../components/Flex");
16
17
  const fields = [
17
18
  {
@@ -57,7 +58,7 @@ const ThemeEditor = (props) => {
57
58
  return adaptable.api.themeApi.getCurrentThemeObject();
58
59
  });
59
60
  const currentThemeAccessLevel = (0, AdaptableHelper_1.getAccessLevelForObject)(currentThemeObject, props.accessLevel);
60
- const currentThemeIsReadOnly = currentThemeAccessLevel !== 'Full';
61
+ const currentThemeIsReadOnly = currentThemeAccessLevel !== GeneralConstants_1.ACCESS_LEVEL_FULL;
61
62
  // THEME variables
62
63
  const themeVariables = currentThemeObject?.CSSVariables;
63
64
  const valuesFromTheme = fields.reduce((acc, field) => {
@@ -10,6 +10,7 @@ const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout")
10
10
  const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
11
11
  const ThemeEditor_1 = require("./ThemeEditor");
12
12
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
13
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
13
14
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
14
15
  const icons_1 = require("../../components/icons");
15
16
  const ThemeSelector_1 = require("./ThemeSelector");
@@ -19,7 +20,7 @@ class ThemePopupComponent extends React.Component {
19
20
  const isCustomTheme = this.props.api.themeApi
20
21
  .getUserThemes()
21
22
  .some((theme) => theme.Name === this.props.CurrentTheme);
22
- const disabled = this.props.accessLevel === 'ReadOnly';
23
+ const disabled = this.props.accessLevel === GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
23
24
  const newButton = (React.createElement(DropdownButton_1.default, { className: "twa:ml-2", disabled: disabled, tone: "accent", variant: "raised", columns: ['label'], items: [
24
25
  {
25
26
  label: 'Dark',
@@ -6,6 +6,7 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const Select_1 = require("../../components/Select");
8
8
  const ThemeRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ThemeRedux"));
9
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
9
10
  const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
10
11
  const AdaptableContext_1 = require("../AdaptableContext");
11
12
  const ThemeSelector = (props) => {
@@ -13,7 +14,8 @@ const ThemeSelector = (props) => {
13
14
  const dispatch = (0, react_redux_1.useDispatch)();
14
15
  const availableThemes = adaptable.api.themeApi.getThemes();
15
16
  const currentTheme = (0, react_redux_1.useSelector)((state) => state.Theme.CurrentTheme);
16
- const disabled = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants_1.ThemeModuleId) === 'ReadOnly';
17
+ const disabled = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants_1.ThemeModuleId) ===
18
+ GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
17
19
  const optionThemes = availableThemes.map((theme) => {
18
20
  if (typeof theme === 'string') {
19
21
  // protection against old state, which could be string
@@ -8,7 +8,9 @@ const GeneralConstants = tslib_1.__importStar(require("../../Utilities/Constants
8
8
  const ThemeSelector_1 = require("./ThemeSelector");
9
9
  const ThemeViewPanelControl = (props) => {
10
10
  const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
11
- return (React.createElement("div", { className: (0, join_1.default)(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Theme__wrap`) },
11
+ return (React.createElement("div", { className: (0, join_1.default)(props.accessLevel == GeneralConstants.ACCESS_LEVEL_READ_ONLY
12
+ ? GeneralConstants.READ_ONLY_STYLE
13
+ : '', `ab-${elementType}__Theme__wrap`) },
12
14
  React.createElement(ThemeSelector_1.ThemeSelector, null)));
13
15
  };
14
16
  exports.ThemeViewPanelControl = ThemeViewPanelControl;
@@ -10,6 +10,7 @@ const Dialog_1 = tslib_1.__importDefault(require("../../components/Dialog"));
10
10
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
11
11
  const useProperty_1 = tslib_1.__importDefault(require("../../components/utils/useProperty"));
12
12
  const isMacLike_1 = require("../../Utilities/isMacLike");
13
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
13
14
  const KeyHint_1 = require("../KeyHint");
14
15
  const icons_1 = require("../../components/icons");
15
16
  const ResizeObserver_1 = require("../../components/ResizeObserver");
@@ -184,9 +185,9 @@ const OnePageWizard = (props) => {
184
185
  "to navigate")),
185
186
  React.createElement(Flex_1.Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:min-h-0 twa:min-w-0 twa:flex-1" }, renderSection(currentSection))),
186
187
  React.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2" },
187
- React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: 'Full' }, props.closeText ?? 'CLOSE'),
188
+ React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL }, props.closeText ?? 'CLOSE'),
188
189
  React.createElement(KeyHint_1.KeyHint, { className: "twa:ml-2" }, "Esc"),
189
190
  React.createElement(Flex_1.Box, { className: "ab-OnePageWizard__error twa:text-2 twa:mr-3 twa:flex-1 twa:text-error twa:text-end" }, firstErrorMessage),
190
- React.createElement(SimpleButton_1.default, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: 'Full' }, props.finishText ?? 'Finish')))))));
191
+ React.createElement(SimpleButton_1.default, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL }, props.finishText ?? 'Finish')))))));
191
192
  };
192
193
  exports.OnePageWizard = OnePageWizard;
@@ -26,7 +26,7 @@ import { RenderReactRootFn } from '../renderReactRoot';
26
26
  import { AgGridOptionsService } from './AgGridOptionsService';
27
27
  import { AgGridColumnAdapter } from './AgGridColumnAdapter';
28
28
  import { RowFormService } from '../Utilities/Services/RowFormService';
29
- import { GridCellWithChildren, GridCellWithCount } from '../AdaptableState/Selection/GridCell';
29
+ import { CellUpdateRequest, GridCellWithChildren, GridCellWithCount } from '../AdaptableState/Selection/GridCell';
30
30
  import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
31
31
  import { AgGridExportAdapter } from './AgGridExportAdapter';
32
32
  import { PivotLayoutModel, TableLayoutModel } from '../layout-manager/src/LayoutManagerModel';
@@ -300,7 +300,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
300
300
  getRowNodesForPrimaryKeys(primaryKeyValues: any[]): any[];
301
301
  getRowNodeByIndex(index: number): IRowNode;
302
302
  getAgGridStatusPanels(): StatusPanelDef[];
303
- setDataValue(value: any, column: AdaptableColumn, primaryKeyValue: any, rowNode?: IRowNode): void;
303
+ updateCell(cellUpdateRequest: CellUpdateRequest): void;
304
304
  forAllRowNodesDo(func: (rowNode: IRowNode, rowIndex: number) => void, config?: {
305
305
  includeGroupRows?: boolean;
306
306
  filterFn?: (rowNode: IRowNode) => boolean;
@@ -3305,38 +3305,16 @@ class AdaptableAgGrid {
3305
3305
  getAgGridStatusPanels() {
3306
3306
  return this.agGridAdapter.getGridOption('statusBar')?.statusPanels ?? [];
3307
3307
  }
3308
- setDataValue(value, column, primaryKeyValue, rowNode) {
3308
+ updateCell(cellUpdateRequest) {
3309
3309
  // note: because we use RowNode.setDataValue() this will cause Validation to fire
3310
3310
  // see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
3311
- let newValue;
3312
- let dataType = column.dataType;
3313
- newValue = dataType == 'number' ? Number(value) : value;
3314
- if (dataType == undefined) {
3315
- return; // no point continuing as probably a wrong column
3316
- }
3317
- if (rowNode) {
3318
- rowNode.setDataValue(column.columnId, newValue);
3319
- }
3320
- else {
3321
- if (this.useRowNodeLookUp) {
3322
- const rowNode = this.agGridAdapter.getAgGridApi().getRowNode(primaryKeyValue);
3323
- if (rowNode != null) {
3324
- rowNode.setDataValue(column.columnId, newValue);
3325
- }
3326
- }
3327
- else {
3328
- let isUpdated = false;
3329
- // prefer not to use this method but if we do then at least we can prevent further lookups once we find
3330
- this.agGridAdapter.getAgGridApi().forEachNode((rowNode) => {
3331
- if (!isUpdated) {
3332
- if (primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
3333
- rowNode.setDataValue(column.columnId, newValue);
3334
- isUpdated = true;
3335
- }
3336
- }
3337
- });
3338
- }
3311
+ const rowNode = cellUpdateRequest.rowNode ?? this.getRowNodeForPrimaryKey(cellUpdateRequest.primaryKeyValue);
3312
+ if (!rowNode) {
3313
+ this.logger.warn(`updateCell() - rowNode not found for primaryKeyValue: ${cellUpdateRequest.primaryKeyValue}`);
3314
+ return;
3339
3315
  }
3316
+ // update the row node and set it as an edit (for AG Grid Cell Change Detection)
3317
+ rowNode.setDataValue(cellUpdateRequest.columnId, cellUpdateRequest.newValue, 'edit');
3340
3318
  }
3341
3319
  forAllRowNodesDo(func, config) {
3342
3320
  this.agGridAdapter.getAgGridApi().forEachNode((rowNode, rowIndex) => {
@@ -750,7 +750,7 @@ class AgGridAdapter {
750
750
  }
751
751
  isColumnFilterable(colDef) {
752
752
  // follow agGrid logic which is that ONLY filterable if explicitly set
753
- if (this.adaptableApi.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants.ColumnFilterModuleId) == 'Hidden') {
753
+ if (this.adaptableApi.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants.ColumnFilterModuleId) == GeneralConstants_1.ACCESS_LEVEL_HIDDEN) {
754
754
  return false;
755
755
  }
756
756
  return colDef != null && colDef.filter != null && colDef.filter != false;
@@ -4,6 +4,7 @@ exports.AgGridColumnAdapter = void 0;
4
4
  exports.getEditorForColumnDataType = getEditorForColumnDataType;
5
5
  const tslib_1 = require("tslib");
6
6
  const kebabCase_1 = tslib_1.__importDefault(require("../Utilities/utils/kebabCase"));
7
+ const AdaptableFormatPresets_1 = require("../AdaptableState/Common/AdaptableFormatPresets");
7
8
  const merge_1 = tslib_1.__importDefault(require("../Utilities/utils/merge"));
8
9
  const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
9
10
  const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
@@ -735,8 +736,14 @@ class AgGridColumnAdapter {
735
736
  // ALL FormatColumns are conditional and NONE of them are relevant for this row
736
737
  return value;
737
738
  }
738
- const formatterOptions = mostRelevantFormatColumn.DisplayFormat.Options;
739
- if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'NumberFormatter') {
739
+ // Resolve once: a preset name (e.g. 'Dollar') is materialised
740
+ // into the concrete AdaptableFormat for this render call.
741
+ const resolvedDisplayFormat = (0, AdaptableFormatPresets_1.resolveDisplayFormat)(mostRelevantFormatColumn.DisplayFormat);
742
+ if (!resolvedDisplayFormat) {
743
+ return value;
744
+ }
745
+ const formatterOptions = resolvedDisplayFormat.Options;
746
+ if (resolvedDisplayFormat.Formatter === 'NumberFormatter') {
740
747
  // change the Number format - if the scope allows it
741
748
  if (this.adaptableApi.columnScopeApi.isColumnInNumericScope(abColumn, mostRelevantFormatColumn.Scope)) {
742
749
  let cellValue = params.value;
@@ -748,7 +755,7 @@ class AgGridColumnAdapter {
748
755
  return this.adaptableApi.formatColumnApi.internalApi.getNumberFormattedValue(cellValue, params.node, abColumn, formatterOptions);
749
756
  }
750
757
  }
751
- if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'DateFormatter') {
758
+ if (resolvedDisplayFormat.Formatter === 'DateFormatter') {
752
759
  // change the Date format - if the scope allows it
753
760
  if (this.adaptableApi.columnScopeApi.isColumnInDateScope(abColumn, mostRelevantFormatColumn.Scope)) {
754
761
  let cellValue = params.value;
@@ -760,7 +767,7 @@ class AgGridColumnAdapter {
760
767
  return this.adaptableApi.formatColumnApi.internalApi.getDateFormattedValue(cellValue, params.node, abColumn, formatterOptions);
761
768
  }
762
769
  }
763
- if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'StringFormatter') {
770
+ if (resolvedDisplayFormat.Formatter === 'StringFormatter') {
764
771
  // change the String format - if the scope allows it
765
772
  if (this.adaptableApi.columnScopeApi.isColumnInTextScope(abColumn, mostRelevantFormatColumn.Scope)) {
766
773
  let cellValue = params.value;
@@ -4,6 +4,7 @@ exports.AgGridExportAdapter = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
6
6
  const udsv_1 = require("udsv");
7
+ const AdaptableFormatPresets_1 = require("../AdaptableState/Common/AdaptableFormatPresets");
7
8
  const Uuid_1 = require("../AdaptableState/Uuid");
8
9
  const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
9
10
  const ModuleConstants_1 = require("../Utilities/Constants/ModuleConstants");
@@ -643,9 +644,10 @@ class AgGridExportAdapter {
643
644
  const abColumn = getAdaptableColumnWithColumnId(column.getColId());
644
645
  if (!dateFormatPattern) {
645
646
  const mostRelevantFormatColumn = this.adaptableApi.formatColumnApi.internalApi.getMostRelevantFormatColumnForColumn(getFormatColumnsWithDisplayFormatForColumn(column.getColId()), abColumn, { node, value: rawValue });
647
+ const resolvedDisplayFormat = (0, AdaptableFormatPresets_1.resolveDisplayFormat)(mostRelevantFormatColumn?.DisplayFormat);
646
648
  dateFormatPattern =
647
- mostRelevantFormatColumn?.DisplayFormat?.Formatter === 'DateFormatter' &&
648
- mostRelevantFormatColumn?.DisplayFormat?.Options?.Pattern;
649
+ resolvedDisplayFormat?.Formatter === 'DateFormatter' &&
650
+ resolvedDisplayFormat?.Options?.Pattern;
649
651
  }
650
652
  if (dateFormatPattern) {
651
653
  const customDateFormatPattern = typeof dateFormatPattern === 'function'
@@ -7,6 +7,7 @@ const React = tslib_1.__importStar(require("react"));
7
7
  const useRerender_1 = require("../../components/utils/useRerender");
8
8
  const renderWithAdaptableContext_1 = require("../../View/renderWithAdaptableContext");
9
9
  const LayoutRedux_1 = require("../../Redux/ActionsReducers/LayoutRedux");
10
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
10
11
  const ActionButtons = (props) => {
11
12
  const { buttons, adaptableApi, context, rerender } = props;
12
13
  return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
@@ -34,7 +35,7 @@ const ActionButtons = (props) => {
34
35
  button.icon?.name ??
35
36
  button.tooltip ??
36
37
  `${index + 1}`;
37
- return (React.createElement(SimpleButton_1.default, { key: button.Uuid, "data-name": `action-button-${identifier}`, variant: buttonStyle?.variant ?? 'text', disabled: disabled, tooltip: buttonTooltip, icon: buttonIcon, tone: buttonStyle?.tone ?? 'none', onClick: handleClick, className: buttonStyle?.className, accessLevel: 'Full' }, buttonLabel));
38
+ return (React.createElement(SimpleButton_1.default, { key: button.Uuid, "data-name": `action-button-${identifier}`, variant: buttonStyle?.variant ?? 'text', disabled: disabled, tooltip: buttonTooltip, icon: buttonIcon, tone: buttonStyle?.tone ?? 'none', onClick: handleClick, className: buttonStyle?.className, accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL }, buttonLabel));
38
39
  })));
39
40
  };
40
41
  const ReactActionColumnRenderer = (props) => {
@@ -8,6 +8,7 @@ const join_1 = tslib_1.__importDefault(require("../utils/join"));
8
8
  const useProperty_1 = tslib_1.__importDefault(require("../utils/useProperty"));
9
9
  const DashboardToolbar_1 = require("./DashboardToolbar");
10
10
  const DropdownButton_1 = tslib_1.__importDefault(require("../DropdownButton"));
11
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
11
12
  function Dashboard(props) {
12
13
  const { title, children, left, right, onShowDashboardPopup } = props;
13
14
  const [activeTabIndex, setActiveTabIndex] = (0, useProperty_1.default)(props, 'activeTabIndex', 0);
@@ -68,7 +69,7 @@ function Dashboard(props) {
68
69
  !floating && renderTabs()),
69
70
  floating ? (React.createElement("div", { className: "ab-Dashboard__title", ref: handleRef, key: "title-drag", style: { cursor: 'move' } }, title)) : (React.createElement("div", { className: "ab-Dashboard__title", key: "title" }, title)),
70
71
  React.createElement("div", { className: "ab-Dashboard__header-right" }, right)));
71
- const renderHomeToolbar = () => (React.createElement(DashboardToolbar_1.DashboardToolbar, { onConfigure: onShowDashboardPopup, className: "ab-Dashboard__home-toolbar", title: title, tooltip: `Configure Dashboard`, showConfigure: true, showClose: false, accessLevel: 'Full' },
72
+ const renderHomeToolbar = () => (React.createElement(DashboardToolbar_1.DashboardToolbar, { onConfigure: onShowDashboardPopup, className: "ab-Dashboard__home-toolbar", title: title, tooltip: `Configure Dashboard`, showConfigure: true, showClose: false, accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL },
72
73
  left,
73
74
  right,
74
75
  children && children.length > 1,
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const SimpleButton_1 = tslib_1.__importDefault(require("../SimpleButton"));
7
7
  const join_1 = tslib_1.__importDefault(require("../utils/join"));
8
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
8
9
  const Flex_1 = require("../Flex");
9
10
  function DashboardToolbar(props) {
10
11
  return (React.createElement("div", { className: (0, join_1.default)('ab-Dashboard__toolbar', props.className) },
@@ -12,5 +13,5 @@ function DashboardToolbar(props) {
12
13
  React.createElement(Flex_1.Flex, { className: "ab-Dashboard__toolbar-title twa:items-center twa:justify-center twa:px-2 twa:pb-1 twa:opacity-70", flexDirection: "row" },
13
14
  React.createElement("span", { className: "twa:text-2" }, props.title),
14
15
  props.showConfigure && (React.createElement(SimpleButton_1.default, { "aria-label": `Configure ${props.title}`, icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
15
- props.showClose && (React.createElement(SimpleButton_1.default, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose?.() })))));
16
+ props.showClose && (React.createElement(SimpleButton_1.default, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == GeneralConstants_1.ACCESS_LEVEL_READ_ONLY, "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose?.() })))));
16
17
  }