@adaptabletools/adaptable-cjs 22.0.0-canary.6 → 22.0.0-canary.8

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 (150) hide show
  1. package/index.css +63 -74
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -6
  5. package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
  6. package/src/AdaptableState/AdaptableState.d.ts +2 -0
  7. package/src/AdaptableState/AlertState.d.ts +1 -2
  8. package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
  9. package/src/AdaptableState/Common/AdaptableObject.d.ts +4 -0
  10. package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
  11. package/src/AdaptableState/Common/AdaptableRowContext.js +2 -0
  12. package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
  13. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +7 -0
  14. package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
  15. package/src/AdaptableState/Common/NamedObject.js +2 -0
  16. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  17. package/src/AdaptableState/Common/Schedule.d.ts +2 -2
  18. package/src/AdaptableState/Common/SuspendableObject.d.ts +10 -0
  19. package/src/AdaptableState/Common/SuspendableObject.js +2 -0
  20. package/src/AdaptableState/Common/TransposeConfig.d.ts +11 -9
  21. package/src/AdaptableState/CustomSortState.d.ts +1 -1
  22. package/src/AdaptableState/FormatColumnState.d.ts +1 -1
  23. package/src/AdaptableState/InitialState.d.ts +9 -0
  24. package/src/AdaptableState/LayoutState.d.ts +2 -3
  25. package/src/AdaptableState/PlusMinusState.d.ts +1 -1
  26. package/src/AdaptableState/ShortcutState.d.ts +1 -1
  27. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  28. package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
  29. package/src/AdaptableState/UserInterfaceState.js +2 -0
  30. package/src/Api/AlertApi.d.ts +6 -0
  31. package/src/Api/CustomSortApi.d.ts +6 -0
  32. package/src/Api/FlashingCellApi.d.ts +6 -0
  33. package/src/Api/FormatColumnApi.d.ts +10 -4
  34. package/src/Api/GridApi.d.ts +5 -9
  35. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
  36. package/src/Api/Implementation/AlertApiImpl.js +5 -6
  37. package/src/Api/Implementation/ChartingApiImpl.js +2 -2
  38. package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -0
  39. package/src/Api/Implementation/CustomSortApiImpl.js +3 -0
  40. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
  41. package/src/Api/Implementation/FlashingCellApiImpl.js +3 -0
  42. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
  43. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -5
  44. package/src/Api/Implementation/GridApiImpl.d.ts +2 -6
  45. package/src/Api/Implementation/GridApiImpl.js +9 -9
  46. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
  47. package/src/Api/Implementation/LayoutApiImpl.js +4 -1
  48. package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
  49. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
  50. package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
  51. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
  52. package/src/Api/Implementation/ScheduleApiImpl.js +3 -0
  53. package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
  54. package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
  55. package/src/Api/Implementation/SystemStatusApiImpl.js +6 -9
  56. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
  57. package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -0
  58. package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
  59. package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
  60. package/src/Api/Internal/LayoutInternalApi.js +1 -1
  61. package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
  62. package/src/Api/LayoutApi.d.ts +6 -0
  63. package/src/Api/PlusMinusApi.d.ts +6 -0
  64. package/src/Api/ScheduleApi.d.ts +6 -0
  65. package/src/Api/ShortcutApi.d.ts +6 -0
  66. package/src/Api/UserInterfaceApi.d.ts +17 -0
  67. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
  68. package/src/Redux/ActionsReducers/FormatColumnRedux.js +17 -1
  69. package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
  70. package/src/Redux/ActionsReducers/UserInterfaceRedux.js +26 -0
  71. package/src/Redux/Store/AdaptableStore.js +45 -16
  72. package/src/Strategy/BulkUpdateModule.js +8 -8
  73. package/src/Strategy/PlusMinusModule.js +1 -1
  74. package/src/Strategy/QuickSearchModule.js +1 -1
  75. package/src/Strategy/SettingsPanelModule.js +11 -7
  76. package/src/Strategy/SmartEditModule.js +10 -10
  77. package/src/Utilities/Services/DataService.js +1 -1
  78. package/src/Utilities/Services/Fdc3Service.js +4 -4
  79. package/src/Utilities/Services/ModuleService.js +1 -3
  80. package/src/Utilities/Services/ThemeService.js +2 -6
  81. package/src/Utilities/Services/ValidationService.js +1 -1
  82. package/src/Utilities/logDeprecation.js +3 -4
  83. package/src/Utilities/resolveContainerElement.d.ts +23 -0
  84. package/src/Utilities/resolveContainerElement.js +47 -0
  85. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  86. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
  87. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
  88. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  89. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
  90. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
  91. package/src/View/Components/CellPopup/index.js +1 -1
  92. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  93. package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
  94. package/src/View/Components/NewScopeComponent.js +3 -3
  95. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
  96. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
  97. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
  98. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
  99. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
  100. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +35 -0
  101. package/src/View/Components/WizardSummaryPage.js +1 -1
  102. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
  103. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
  104. package/src/View/Dashboard/CustomToolbar.js +1 -1
  105. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
  106. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  107. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  108. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
  109. package/src/View/Layout/LayoutViewPanel.js +1 -1
  110. package/src/View/Layout/TransposedPopup.js +144 -138
  111. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  112. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  113. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  114. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
  115. package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
  116. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
  117. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -5
  118. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +1 -1
  119. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
  120. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +11 -11
  121. package/src/View/StateManagement/handleExportState.js +1 -1
  122. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  123. package/src/View/UIHelper.d.ts +2 -1
  124. package/src/View/UIHelper.js +8 -14
  125. package/src/agGrid/Adaptable.js +11 -11
  126. package/src/agGrid/AdaptableAgGrid.d.ts +12 -8
  127. package/src/agGrid/AdaptableAgGrid.js +150 -82
  128. package/src/agGrid/AgGridAdapter.js +8 -8
  129. package/src/agGrid/AgGridColumnAdapter.js +1 -1
  130. package/src/agGrid/AgGridExportAdapter.js +5 -5
  131. package/src/agGrid/AgGridFloatingFilterAdapter.js +1 -1
  132. package/src/agGrid/AgGridMenuAdapter.js +9 -1
  133. package/src/agGrid/AgGridThemeAdapter.js +2 -2
  134. package/src/components/CheckBox/index.js +1 -1
  135. package/src/components/Dropdown/Arrows.js +1 -1
  136. package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
  137. package/src/components/FormLayout/index.js +1 -1
  138. package/src/components/OverlayTrigger/index.js +1 -1
  139. package/src/components/Select/Select.js +1 -1
  140. package/src/components/Tree/TreeDropdown/index.js +1 -1
  141. package/src/env.js +2 -2
  142. package/src/metamodel/adaptable.metamodel.d.ts +62 -0
  143. package/src/metamodel/adaptable.metamodel.js +1 -1
  144. package/src/migration/AdaptableUpgradeHelper.js +2 -2
  145. package/src/migration/VersionUpgrade17.js +4 -4
  146. package/src/migration/VersionUpgrade20.js +4 -4
  147. package/src/types.d.ts +5 -2
  148. package/themes/dark.css +30 -29
  149. package/themes/light.css +4 -2
  150. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -47,8 +47,8 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
47
47
  return {
48
48
  Alert: {
49
49
  alertType: 'generic',
50
- header: 'Smart Edit Error',
51
- message: 'Cannot edit while Grid is in Pivot Mode.',
50
+ header: 'Smart Edit',
51
+ message: 'Editing is not available in Pivot Mode.',
52
52
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
53
53
  },
54
54
  };
@@ -57,8 +57,8 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
57
57
  return {
58
58
  Alert: {
59
59
  alertType: 'generic',
60
- header: 'Smart Edit Error',
61
- message: 'No cells are selected.\nPlease select some cells.',
60
+ header: 'Smart Edit',
61
+ message: 'No cells selected. Please select one or more cells to continue.',
62
62
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
63
63
  },
64
64
  };
@@ -67,8 +67,8 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
67
67
  return {
68
68
  Alert: {
69
69
  alertType: 'generic',
70
- header: 'Smart Edit Error',
71
- message: 'Smart Edit only supports single column edit.\nPlease adjust cell selection.',
70
+ header: 'Smart Edit',
71
+ message: 'Smart Edit supports editing a single column at a time. Please adjust your selection.',
72
72
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
73
73
  },
74
74
  };
@@ -79,8 +79,8 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
79
79
  return {
80
80
  Alert: {
81
81
  alertType: 'generic',
82
- header: 'Smart Edit Error',
83
- message: 'Smart Edit only supports editing of numeric columns.\nPlease adjust the cell selection.',
82
+ header: 'Smart Edit',
83
+ message: 'Smart Edit only applies to numeric columns. Please adjust your selection.',
84
84
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
85
85
  },
86
86
  };
@@ -91,8 +91,8 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
91
91
  return {
92
92
  Alert: {
93
93
  alertType: 'generic',
94
- header: 'Smart Edit Error',
95
- message: 'Smart Edit is not permitted on readonly cells.\nPlease adjust the cell selection.',
94
+ header: 'Smart Edit',
95
+ message: 'Smart Edit is not available for read-only cells. Please adjust your selection.',
96
96
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
97
97
  },
98
98
  };
@@ -68,7 +68,7 @@ class DataService {
68
68
  // why 2 and not 3 or 1? no good reason, only seems like a reasonable waiting time :)
69
69
  const UNDO_WAIT = 2000;
70
70
  const timeoutId = setTimeout(() => {
71
- this.adaptable.logger.warn(`Undo change was NOT handled, this should NOT happen: PK(${change.primaryKeyValue}) Col(${change.column}) RevertedValue(${change.newValue}) NewValue(${change.oldValue})`);
71
+ this.adaptable.logger.warn(`Undo change was not handled within timeout: column="${change.column}", primaryKey="${change.primaryKeyValue}", from=${change.newValue} to=${change.oldValue}.`);
72
72
  this.extractUndoChange(change);
73
73
  }, UNDO_WAIT);
74
74
  this.undoChangeTimers.set(undoChangeKey, timeoutId);
@@ -81,7 +81,7 @@ class Fdc3Service {
81
81
  getDesktopAgent() {
82
82
  if (globalThis.fdc3 == null && !this.loggedAgentError) {
83
83
  this.loggedAgentError = true;
84
- this.adaptableApi.consoleError('FDC3 Desktop Agent not found. This should be provided by the wrapper application.');
84
+ this.adaptableApi.consoleError('FDC3 Desktop Agent not found. The host application must provide the FDC3 agent on globalThis.fdc3.');
85
85
  }
86
86
  return globalThis.fdc3;
87
87
  }
@@ -164,11 +164,11 @@ class Fdc3Service {
164
164
  if (!this.getFdc3Options().enableLogging) {
165
165
  return;
166
166
  }
167
- this.adaptableApi.consoleLog(`FDC3::${type} - `, params.join(' : '));
167
+ this.adaptableApi.consoleLog(`FDC3 ${type}: ${params.join(' : ')}`);
168
168
  }
169
169
  logFdc3Error(error) {
170
- this.adaptableApi.consoleError(`FDC3 error`, error);
171
- this.adaptableApi.alertApi.showAlertError('FDC3 Error', 'See console for details');
170
+ this.adaptableApi.consoleError('FDC3 operation failed.', error);
171
+ this.adaptableApi.alertApi.showAlertError('FDC3', 'An error occurred. See the browser console for details.');
172
172
  }
173
173
  getFdc3Api() {
174
174
  return this.adaptableApi.fdc3Api;
@@ -36,9 +36,7 @@ class ModuleService {
36
36
  const registeredAgGridModuleNames = agGridModulesAdapter.getAgGridRegisteredModuleNames();
37
37
  const missingAgGridModuleNames = mandatoryAgGridModuleNames.filter((moduleName) => !registeredAgGridModuleNames.includes(moduleName));
38
38
  if (missingAgGridModuleNames.length) {
39
- this.adaptableApi.consoleError(`AdapTable requires the following AG Grid modules to be registered: ${missingAgGridModuleNames.join(', ')}.
40
-
41
- See for more information: ${DocumentationLinkConstants_1.AgGridRequiredModulesDocsLink}`);
39
+ this.adaptableApi.consoleError(`Adaptable requires these AG Grid modules: ${missingAgGridModuleNames.join(', ')}. Please register them. See: ${DocumentationLinkConstants_1.AgGridRequiredModulesDocsLink}`);
42
40
  }
43
41
  // log optional missing AG Grid dependencies for all modules
44
42
  this.getModuleCollection().forEach((adaptableModule) => {
@@ -73,15 +73,11 @@ class ThemeService {
73
73
  return val;
74
74
  });
75
75
  if (abLoaded !== '777') {
76
- logger.consoleError('Please import Adaptable styles from "@adaptabletools/adaptable/index.css"');
76
+ logger.consoleError('Adaptable styles not detected. Please import "@adaptabletools/adaptable/index.css".');
77
77
  }
78
78
  const isCustomUserTheme = !this.api.themeApi.internalApi.isSystemTheme(themeName);
79
79
  if (!isCustomUserTheme && abThemeLoaded !== themeName) {
80
- logger.consoleWarn(`Theme "${themeName}" doesn't seem to be loaded! Make sure you import the css file for the "${themeName}" theme!
81
-
82
- If it's an AdapTable system theme, try
83
-
84
- import "@adaptabletools/adaptable/themes/${themeName}.css"`);
80
+ logger.consoleWarn(`Theme "${themeName}" does not appear to be loaded. Ensure the CSS file is imported, e.g.: import "@adaptabletools/adaptable/themes/${themeName}.css".`);
85
81
  }
86
82
  }
87
83
  // prefers-color-scheme
@@ -57,7 +57,7 @@ class ValidationService {
57
57
  let alert = {
58
58
  alertType: 'cellChanged',
59
59
  header: 'Alert',
60
- message: 'Perform Edit Alert Fired',
60
+ message: 'A validation rule was triggered for this edit.',
61
61
  alertDefinition: failedRules[0],
62
62
  cellDataChangedInfo: cellDataChangedInfo,
63
63
  };
@@ -14,16 +14,15 @@ const doOnce = (func, key) => {
14
14
  };
15
15
  const logDeprecation = (logger, typeName, oldProp, newProp, message) => {
16
16
  const newPropMsg = newProp ? `Please use '${typeName}.${newProp}()' instead. ` : '';
17
- doOnce(() => logger.consoleWarn(`'${typeName}.${oldProp}()' is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
17
+ doOnce(() => logger.consoleWarn(`${typeName}.${oldProp}() is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
18
18
  };
19
19
  exports.logDeprecation = logDeprecation;
20
20
  const logDeprecationExternal = (logger, oldTypeName, oldProp, newTypeName, newProp, message) => {
21
21
  const newPropMsg = newProp ? `Please use '${newTypeName}.${newProp}()' instead. ` : '';
22
- doOnce(() => logger.consoleWarn(`'${oldTypeName}.${oldProp}()' is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
22
+ doOnce(() => logger.consoleWarn(`${oldTypeName}.${oldProp}() is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
23
23
  };
24
24
  exports.logDeprecationExternal = logDeprecationExternal;
25
25
  const logDeprecationInternal = (logger, typeName, oldProp) => {
26
- doOnce(() => logger.consoleWarn(`'${typeName}.${oldProp}()' is deprecated. The method will be removed in the next major release.
27
- Please contact support if you need the missing functionality.`), `Deprecated_${oldProp}`);
26
+ doOnce(() => logger.consoleWarn(`${typeName}.${oldProp}() is deprecated and will be removed in the next major release. Contact support if you need this functionality.`), `Deprecated_${oldProp}`);
28
27
  };
29
28
  exports.logDeprecationInternal = logDeprecationInternal;
@@ -0,0 +1,23 @@
1
+ import type { AdaptableContainerValue, ContainerContext, InitContainerContext } from '../AdaptableOptions/ContainerOptions';
2
+ /**
3
+ * The union type representing any container option value (static or function).
4
+ */
5
+ type AnyContainerOption = AdaptableContainerValue | ((context: any) => AdaptableContainerValue);
6
+ /**
7
+ * Resolves a container option value to an `HTMLElement`.
8
+ *
9
+ * Resolution order:
10
+ * 1. If `container` is `null`/`undefined`, returns `null`.
11
+ * 2. If `container` is a function, it is called with the provided `context` and the result is resolved.
12
+ * 3. If the value is an `HTMLElement`, it is returned directly.
13
+ * 4. If the value is an `AdaptableCSSSelector` (`{ selector: string }`), `document.querySelectorAll` is used.
14
+ * If multiple elements match, the first is returned and a console warning is logged.
15
+ * 5. If the value is a `string`, it is treated as an element ID and `document.getElementById` is used.
16
+ *
17
+ * @param container - The container reference to resolve.
18
+ * @param context - Optional context passed to the function form of the container.
19
+ * @param doc - The document to query against (defaults to `globalThis.document`).
20
+ * @returns The resolved `HTMLElement`, or `null` if not found.
21
+ */
22
+ export declare function resolveContainerElement(container: AnyContainerOption | undefined | null, context?: ContainerContext | InitContainerContext, doc?: Document): HTMLElement | null;
23
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveContainerElement = resolveContainerElement;
4
+ /**
5
+ * Resolves a container option value to an `HTMLElement`.
6
+ *
7
+ * Resolution order:
8
+ * 1. If `container` is `null`/`undefined`, returns `null`.
9
+ * 2. If `container` is a function, it is called with the provided `context` and the result is resolved.
10
+ * 3. If the value is an `HTMLElement`, it is returned directly.
11
+ * 4. If the value is an `AdaptableCSSSelector` (`{ selector: string }`), `document.querySelectorAll` is used.
12
+ * If multiple elements match, the first is returned and a console warning is logged.
13
+ * 5. If the value is a `string`, it is treated as an element ID and `document.getElementById` is used.
14
+ *
15
+ * @param container - The container reference to resolve.
16
+ * @param context - Optional context passed to the function form of the container.
17
+ * @param doc - The document to query against (defaults to `globalThis.document`).
18
+ * @returns The resolved `HTMLElement`, or `null` if not found.
19
+ */
20
+ function resolveContainerElement(container, context, doc = globalThis.document) {
21
+ if (container == null) {
22
+ return null;
23
+ }
24
+ // Unwrap function form — pass context if the container is a function
25
+ const value = typeof container === 'function' ? container(context) : container;
26
+ // Guard against null/undefined returned by a callback (e.g. document.getElementById(...))
27
+ if (value == null) {
28
+ return null;
29
+ }
30
+ // Direct HTMLElement reference
31
+ if (value instanceof HTMLElement) {
32
+ return value;
33
+ }
34
+ // CSS Selector object
35
+ if (typeof value === 'object' && 'selector' in value) {
36
+ const matches = doc.querySelectorAll(value.selector);
37
+ if (matches.length > 1) {
38
+ console.warn(`[AdapTable] CSS selector "${value.selector}" matched ${matches.length} elements. Using the first match. Consider using a more specific selector.`);
39
+ }
40
+ return matches[0] ?? null;
41
+ }
42
+ // String element ID
43
+ if (typeof value === 'string') {
44
+ return doc.getElementById(value);
45
+ }
46
+ return null;
47
+ }
@@ -7,7 +7,7 @@ const isValidAlertRules = (alert, api, context) => {
7
7
  !alert.Rule.BooleanExpression &&
8
8
  !alert.Rule.ObservableExpression &&
9
9
  !alert.Rule.AggregatedBooleanExpression) {
10
- return 'No Rule defined for Alert';
10
+ return 'A rule is required for the Alert.';
11
11
  }
12
12
  const isRuleValid = (0, Utilities_1.isAdaptableRuleValid)(alert, api, context);
13
13
  if (typeof isRuleValid === 'string') {
@@ -26,11 +26,11 @@ exports.renderCalculatedColumnDefinitionSummary = renderCalculatedColumnDefiniti
26
26
  const isValidCalculatedColumnDefinition = (data, api) => {
27
27
  const columns = api.columnApi.getColumns();
28
28
  if (!data.ColumnId) {
29
- return 'Column Id cannot be empty';
29
+ return 'A Column ID is required.';
30
30
  }
31
31
  const columnsWithSameIdCount = columns.filter((c) => c.columnId === data.ColumnId).length;
32
32
  const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
33
- return hasAlreadyExistingId ? 'A Column already exists with that id' : true;
33
+ return hasAlreadyExistingId ? 'A column with this ID already exists.' : true;
34
34
  };
35
35
  exports.isValidCalculatedColumnDefinition = isValidCalculatedColumnDefinition;
36
36
  const CalculatedColumnDefinitionWizardSection = (props) => {
@@ -22,11 +22,11 @@ const isValidCalculatedColumnExpression = (data, api) => {
22
22
  const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
23
23
  const expression = api.expressionApi.getAdaptableQueryExpression(data.Query)?.trim();
24
24
  if (!expression) {
25
- return 'Calculated Column Expression cannot be empty';
25
+ return 'An expression is required for the Calculated Column.';
26
26
  }
27
27
  const isValid = calculatedColumnExpressionService.isCalculatedColumnQueryValid(data.Query);
28
28
  if (!isValid) {
29
- return 'Calculated Column Expression is not valid';
29
+ return 'The Calculated Column expression is not valid.';
30
30
  }
31
31
  return true;
32
32
  };
@@ -21,7 +21,7 @@ const renderCalculatedColumnSettingsSummary = (data) => {
21
21
  exports.renderCalculatedColumnSettingsSummary = renderCalculatedColumnSettingsSummary;
22
22
  const isValidCalculatedColumnSettings = (data) => {
23
23
  if (!data.CalculatedColumnSettings?.DataType) {
24
- return 'No data type is specified and it could not be inferred from the defined expression';
24
+ return 'A data type is required. It could not be inferred from the expression.';
25
25
  }
26
26
  return true;
27
27
  };
@@ -9,12 +9,12 @@ const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLa
9
9
  const AdaptableInput_1 = tslib_1.__importDefault(require("../../../Components/AdaptableInput"));
10
10
  const isSettingsValid = (chartDefinition, api) => {
11
11
  if (!chartDefinition.Name) {
12
- return 'Name is mandatory';
12
+ return 'A name is required.';
13
13
  }
14
14
  const allChartDefinitions = api.chartingApi.getChartDefinitions();
15
15
  if (allChartDefinitions.some((chartDefinitionLoopItem) => chartDefinitionLoopItem.Uuid !== chartDefinition.Uuid &&
16
16
  chartDefinitionLoopItem.Name === chartDefinition.Name)) {
17
- return 'There is already a chart with this name';
17
+ return 'A Chart with this name already exists.';
18
18
  }
19
19
  return true;
20
20
  };
@@ -7,12 +7,12 @@ const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLa
7
7
  const AdaptableInput_1 = tslib_1.__importDefault(require("../../../Components/AdaptableInput"));
8
8
  const isSettingsValid = (chartDefinition, api) => {
9
9
  if (!chartDefinition.Name) {
10
- return 'Name is mandatory';
10
+ return 'A name is required.';
11
11
  }
12
12
  const allChartDefinitions = api.chartingApi.getExternalChartDefinitions();
13
13
  if (allChartDefinitions.some((chartDefinitionLoopItem) => chartDefinitionLoopItem.Uuid !== chartDefinition.Uuid &&
14
14
  chartDefinitionLoopItem.Name === chartDefinition.Name)) {
15
- return 'There is already a chart with this name';
15
+ return 'A Chart with this name already exists.';
16
16
  }
17
17
  return true;
18
18
  };
@@ -36,7 +36,7 @@ exports.CellPopup = React.forwardRef((props, ref) => {
36
36
  const cellSelector = `[row-id="${props.primaryKeyValue}"] [col-id="${props.columnId}"]`;
37
37
  const alignTo = document.querySelector(cellSelector);
38
38
  if (!alignTo) {
39
- adaptable.logger.consoleError(`Could not find cell with selector ${cellSelector} to show popup`);
39
+ adaptable.logger.consoleError(`Cell not found for selector "${cellSelector}". Unable to display popup.`);
40
40
  return;
41
41
  }
42
42
  const showOverlayOptions = {
@@ -97,7 +97,7 @@ const ColumnFilterInput = (props) => {
97
97
  return (React.createElement(AdaptableInput_1.default, { style: filterType === 'floating'
98
98
  ? {
99
99
  width: '100%',
100
- padding: 'var(--ab-space-1)',
100
+ padding: 'var(--ab-base-space)',
101
101
  borderRadius: 0,
102
102
  border: 'none',
103
103
  }
@@ -4,28 +4,28 @@ exports.isAdaptableRuleValid = void 0;
4
4
  const isAdaptableRuleValid = (abObject, api, context) => {
5
5
  if (abObject?.Rule?.Predicates?.length) {
6
6
  if (!api.predicateApi.isEveryPredicateValid(abObject?.Rule?.Predicates)) {
7
- return `The Predicate${abObject?.Rule?.Predicates?.length === 1 ? ' is' : 's are'} not valid`;
7
+ return `The predicate${abObject?.Rule?.Predicates?.length === 1 ? ' is' : 's are'} not valid.`;
8
8
  }
9
9
  }
10
10
  if (abObject?.Rule?.BooleanExpression) {
11
11
  if (!api.expressionApi.isValidBooleanExpression(abObject?.Rule?.BooleanExpression, context.moduleInfo.ModuleName)) {
12
- return 'The Expression is not a valid Boolean Expression';
12
+ return 'The Boolean expression is not valid.';
13
13
  }
14
14
  }
15
15
  if (abObject?.Rule?.ObservableExpression) {
16
16
  if (!api.expressionApi.isValidObservableExpression(abObject?.Rule?.ObservableExpression, context.moduleInfo.ModuleName)) {
17
- return 'The Expression is not a valid Observable Expression';
17
+ return 'The Observable expression is not valid.';
18
18
  }
19
19
  }
20
20
  if (abObject?.Rule?.AggregatedBooleanExpression) {
21
21
  if (!api.expressionApi.isValidAggregatedBooleanExpression(abObject?.Rule?.AggregatedBooleanExpression, context.moduleInfo.ModuleName)) {
22
- return 'The Expression is not a valid Aggregated Boolean Expression';
22
+ return 'The Aggregated Boolean expression is not valid.';
23
23
  }
24
24
  }
25
25
  if (abObject?.Rule?.Predicates?.length) {
26
26
  const isAPredicateWithInvalidColumnId = abObject?.Rule?.Predicates?.some((predicate) => predicate.ColumnId !== undefined && predicate.ColumnId === '');
27
27
  if (isAPredicateWithInvalidColumnId) {
28
- return 'Predicates with custom scope need a valid column';
28
+ return 'Predicates with a custom scope require a valid column.';
29
29
  }
30
30
  }
31
31
  return true;
@@ -18,13 +18,13 @@ const Tag_1 = require("../../components/Tag/Tag");
18
18
  const isScopeValid = ({ Scope }) => {
19
19
  const result = [];
20
20
  if (!Scope) {
21
- return 'No scope specified or scope is empty';
21
+ return 'A scope is required.';
22
22
  }
23
23
  if (Scope && 'ColumnIds' in Scope && Scope.ColumnIds.length === 0) {
24
- result.push('No Columns selected in Scope');
24
+ result.push('Please select at least one column for the scope.');
25
25
  }
26
26
  if (Scope && 'DataTypes' in Scope && Scope.DataTypes.length === 0) {
27
- result.push('No Data Types selected in Scope');
27
+ result.push('Please select at least one data type for the scope.');
28
28
  }
29
29
  return result.length ? result.join(', ') : true;
30
30
  };
@@ -13,6 +13,7 @@ const AdaptablePopupBody_1 = require("./AdaptablePopupBody");
13
13
  const AdaptableContext_1 = require("../../../AdaptableContext");
14
14
  const CustomSettingsPanelView_1 = require("./CustomSettingsPanelView");
15
15
  const useMenuItems_1 = require("./useMenuItems");
16
+ const resolveContainerElement_1 = require("../../../../Utilities/resolveContainerElement");
16
17
  const AdaptablePopupDialog_1 = require("./AdaptablePopupDialog");
17
18
  const Flex_1 = require("../../../../components/Flex");
18
19
  const AdaptablePopup = (props) => {
@@ -21,7 +22,7 @@ const AdaptablePopup = (props) => {
21
22
  const settingsPanelTitle = adaptable.ModuleService.getModuleFriendlyName('SettingsPanel');
22
23
  const menuItems = (0, useMenuItems_1.useMenuItems)();
23
24
  const isWindowModal = settingsPanelOptions.popupType === 'window';
24
- const modalContainer = adaptable.adaptableOptions?.containerOptions?.modalContainer;
25
+ const modalContainer = (0, resolveContainerElement_1.resolveContainerElement)(adaptable.adaptableOptions?.containerOptions?.modalContainer, props.api.internalApi.buildBaseContext());
25
26
  let friendlyName = null;
26
27
  /**
27
28
  * This means that it is not rendered in the context of Settings Panel
@@ -7,7 +7,7 @@ const UIHelper_1 = require("../../../UIHelper");
7
7
  const AdaptableViewFactory_1 = require("../../../AdaptableViewFactory");
8
8
  const AdaptablePopupModuleView_1 = require("./AdaptablePopupModuleView");
9
9
  const AdaptablePopupBody = (props) => {
10
- const modalContainer = UIHelper_1.UIHelper.getModalContainer(props.api.optionsApi.getAdaptableOptions(), document);
10
+ const modalContainer = UIHelper_1.UIHelper.getModalContainer(props.api.optionsApi.getAdaptableOptions(), document, props.api.internalApi.buildBaseContext());
11
11
  const moduleName = props.module.moduleInfo.ModuleName;
12
12
  const accessLevel = props.api.entitlementApi.getEntitlementAccessLevelForModule(moduleName);
13
13
  const moduleInfo = props.api.internalApi.getModuleService().getModuleInfoByModule(moduleName);
@@ -7,6 +7,6 @@ export declare const AdaptablePopupDialog: React.FunctionComponent<React.PropsWi
7
7
  isWindowModal: boolean;
8
8
  onHide: () => void;
9
9
  style?: React.CSSProperties;
10
- modalContainer?: string | HTMLElement;
10
+ modalContainer?: HTMLElement;
11
11
  dataName?: string;
12
12
  }>>;
@@ -47,14 +47,7 @@ const PopupDialog = (props) => {
47
47
  const AdaptablePopupDialog = (props) => {
48
48
  const { isActionModule, style, friendlyName, baseClassName, className, children, onHide, isWindowModal, modalContainer, } = props;
49
49
  if (modalContainer) {
50
- let ref = null;
51
- if (typeof modalContainer === 'string') {
52
- ref = globalThis.document.querySelector(modalContainer);
53
- }
54
- else {
55
- ref = modalContainer;
56
- }
57
- return (0, react_dom_1.createPortal)(React.createElement(Dialog_1.default, { "data-name": props.dataName, modal: false, fixed: false, onDismiss: onHide, className: className }, children), ref);
50
+ return (0, react_dom_1.createPortal)(React.createElement(Dialog_1.default, { "data-name": props.dataName, modal: false, fixed: false, onDismiss: onHide, className: className }, children), modalContainer);
58
51
  }
59
52
  if (isWindowModal) {
60
53
  const settingsPanelOptionsKey = isActionModule ? `action-${friendlyName}` : 'settings';
@@ -55,7 +55,7 @@ const AdaptablePopupConfirmation = (props) => {
55
55
  setDisableDeleteConfirmation(!disableDeleteConfirmation);
56
56
  } }, "Do not show this again")),
57
57
  props.showInputBox && (React.createElement(Flex_1.Box, { className: "twa:p-2", "data-name": "body" },
58
- React.createElement("p", null, "Please enter a comment to confirm"),
58
+ React.createElement("p", null, "Please enter a comment to confirm."),
59
59
  React.createElement(Input_1.default, { className: "twa:mt-2 twa:w-full", value: promptText, type: "string", placeholder: "Enter text", onChange: (e) => changeContent(e) }))),
60
60
  React.createElement(Flex_1.Flex, { className: "twa:mt-3 twa:p-2", "data-name": "footer", justifyContent: "space-between" },
61
61
  props.cancelButtonText != null ? (React.createElement(SimpleButton_1.default, { "data-name": "cancel", tone: "neutral", variant: "raised", onClick: () => onCancelForm() }, props.cancelButtonText)) : (React.createElement("div", null)),
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WindowPopups = exports.CUSTOM_WINDOW_FACTORY_ID = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
+ const react_dom_1 = require("react-dom");
6
7
  const react_redux_1 = require("react-redux");
7
8
  const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
8
9
  const PopupRedux_1 = require("../../../../Redux/ActionsReducers/PopupRedux");
10
+ const resolveContainerElement_1 = require("../../../../Utilities/resolveContainerElement");
9
11
  const AdaptableContext_1 = require("../../../AdaptableContext");
10
12
  const ExternalRenderer_1 = require("../../ExternalRenderer");
11
13
  const PanelWithImage_1 = require("../../Panels/PanelWithImage");
@@ -15,6 +17,32 @@ const NoopComponent = () => {
15
17
  return React.createElement(React.Fragment, null);
16
18
  };
17
19
  exports.CUSTOM_WINDOW_FACTORY_ID = 'CUSTOM_WINDOW_FACTORY_ID';
20
+ /**
21
+ * Portals children into a target container element.
22
+ * Monitors the container with a MutationObserver — if the container is removed
23
+ * from the DOM, `onContainerRemoved` is called so callers can clean up React/Redux state.
24
+ */
25
+ const ContainerPortal = ({ container, onContainerRemoved, children }) => {
26
+ React.useEffect(() => {
27
+ // If the container is already detached, clean up immediately
28
+ if (!document.contains(container)) {
29
+ onContainerRemoved();
30
+ return;
31
+ }
32
+ const observer = new MutationObserver(() => {
33
+ if (!document.contains(container)) {
34
+ onContainerRemoved();
35
+ observer.disconnect();
36
+ }
37
+ });
38
+ // Observe the entire document body for subtree removals
39
+ observer.observe(document.body, { childList: true, subtree: true });
40
+ return () => {
41
+ observer.disconnect();
42
+ };
43
+ }, [container, onContainerRemoved]);
44
+ return (0, react_dom_1.createPortal)(children, container);
45
+ };
18
46
  const WindowPopups = () => {
19
47
  const [windowModalSettings, setWindowModalSettings] = React.useState({});
20
48
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -41,6 +69,13 @@ const WindowPopups = () => {
41
69
  Component = Component ?? NoopComponent;
42
70
  componentNode = (React.createElement(Component, { api: adaptable.api, onDismiss: handleDismiss, popupProps: restPopupProps }));
43
71
  }
72
+ // Transposed View: portal into custom container if configured
73
+ if (windowItem.FactoryId === windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW) {
74
+ const transposedContainer = (0, resolveContainerElement_1.resolveContainerElement)(adaptable.adaptableOptions?.containerOptions?.transposedViewContainer, adaptable.api.internalApi.buildBaseContext());
75
+ if (transposedContainer) {
76
+ return (React.createElement(ContainerPortal, { key: windowItem.Id, container: transposedContainer, onContainerRemoved: handleDismiss }, componentNode));
77
+ }
78
+ }
44
79
  return (React.createElement(Dialog_1.default, { "data-name": windowItem.Id, className: "ab-Window-Modal twa:h-full twa:p-0", key: windowItem.Id, windowModal: true, windowModalProps: {
45
80
  ...windowModalProps,
46
81
  onChange: (settings) => {
@@ -13,7 +13,7 @@ const tableDOMProps = {
13
13
  className: 'ab-WizardSummary__list',
14
14
  style: {
15
15
  height: '100%',
16
- margin: 'var(--ab-space-2)',
16
+ margin: 'calc(var(--ab-base-space) * 2)',
17
17
  },
18
18
  };
19
19
  const WizardSummaryPage = (props) => {
@@ -23,13 +23,13 @@ const renderCustomSortColumn = (data) => {
23
23
  exports.renderCustomSortColumn = renderCustomSortColumn;
24
24
  const isValidCustomSortColumn = (data, allCustomSorts) => {
25
25
  if (!data.Name) {
26
- return 'Custom Sort Name cannot be blank';
26
+ return 'A name is required.';
27
27
  }
28
28
  if (allCustomSorts.some((customSort) => customSort.Name === data.Name && customSort.Uuid !== data.Uuid)) {
29
- return 'A Custom Sort already exists with that name';
29
+ return 'A Custom Sort with this name already exists.';
30
30
  }
31
31
  if (!data.ColumnId) {
32
- return 'You have to select a Column for Custom Sort';
32
+ return 'Please select a column for the Custom Sort.';
33
33
  }
34
34
  return true;
35
35
  };
@@ -15,7 +15,7 @@ const DateHelper_1 = require("../../../Utilities/Helpers/DateHelper");
15
15
  const Tag_1 = require("../../../components/Tag");
16
16
  const isValidCustomSortOrder = (data) => {
17
17
  if (!data.SortedValues || !data.SortedValues.length) {
18
- return 'You have to specify at least one value for Custom Sort order';
18
+ return 'At least one value is required for the Custom Sort order.';
19
19
  }
20
20
  return true;
21
21
  };
@@ -79,7 +79,7 @@ const CustomToolbarCmp = (props) => {
79
79
  const disabled = button.disabled && button.disabled(button, dashboardContext);
80
80
  let buttonVariant = buttonStyle && buttonStyle.variant ? buttonStyle.variant : 'outlined';
81
81
  let buttonTone = buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'neutral';
82
- return (React.createElement(AdaptableButton_1.AdaptableButtonComponent, { style: { marginLeft: index ? 'var(--ab-space-1)' : 0 }, key: index, disabled: disabled, tooltip: buttonTooltip, icon: buttonIcon, variant: buttonVariant, tone: buttonTone, className: buttonStyle?.className || '', onClick: () => {
82
+ return (React.createElement(AdaptableButton_1.AdaptableButtonComponent, { style: { marginLeft: index ? 'var(--ab-base-space)' : 0 }, key: index, disabled: disabled, tooltip: buttonTooltip, icon: buttonIcon, variant: buttonVariant, tone: buttonTone, className: buttonStyle?.className || '', onClick: () => {
83
83
  button.onClick ? button.onClick(button, dashboardContext) : null;
84
84
  setTimeout(() => {
85
85
  // mutate state to force a re-rendering
@@ -31,7 +31,7 @@ const DataChangeHistoryViewPanelControl = (props) => {
31
31
  const enabled = changeHistoryMode === 'ACTIVE';
32
32
  const disabled = changeHistoryMode === 'INACTIVE';
33
33
  const suspended = changeHistoryMode === 'SUSPENDED';
34
- const gap = props.gap ?? 'var(--ab-space-1)';
34
+ const gap = props.gap ?? 'var(--ab-base-space)';
35
35
  const buttonsPaddingY = props.buttonsPaddingY ?? 2;
36
36
  const buttonPanel = (React.createElement(Flex_1.Flex, { className: "ab-DataChangeHistoryPanel--button-panel", style: { gap: gap, paddingBlock: buttonsPaddingY } },
37
37
  disabled && (React.createElement(ButtonPlay_1.ButtonPlay, { "aria-label": "Enable Data Change History", className: "ab-DataChangeHistoryPanel--button-activate", "data-name": 'data-change-history--button-activate', tooltip: '', onClick: () => onChangeHistoryEnable() })),
@@ -4,7 +4,7 @@ exports.isValidFlashingCellRules = void 0;
4
4
  const Utilities_1 = require("../../Components/EntityRulesEditor/Utilities");
5
5
  const isValidFlashingCellRules = (flashingCell, api, context) => {
6
6
  if (!flashingCell.Rule?.Predicates?.length && !flashingCell.Rule.BooleanExpression) {
7
- return 'No Rule defined for Flashing Cell';
7
+ return 'A rule is required for the Flashing Cell.';
8
8
  }
9
9
  const isRuleValid = (0, Utilities_1.isAdaptableRuleValid)(flashingCell, api, context);
10
10
  if (typeof isRuleValid === 'string') {
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { FreeTextColumn } from '../../../AdaptableState/FreeTextColumnState';
3
3
  import { AdaptableApi } from '../../../Api/AdaptableApi';
4
4
  export declare const renderFreeTextColumnSummary: (data: FreeTextColumn) => React.JSX.Element;
5
- export declare const isValidFreeTextColumn: (data: FreeTextColumn, api: AdaptableApi) => true | "Column Id cannot be empty" | "A Column already exists with that id" | "No data type specified for column";
5
+ export declare const isValidFreeTextColumn: (data: FreeTextColumn, api: AdaptableApi) => true | "A Column ID is required." | "A column with this ID already exists." | "A data type is required for the column.";
6
6
  export type FreeTextColumnSettingsWizardSectionProps = {
7
7
  onChange: (data: FreeTextColumn) => void;
8
8
  isEdit: boolean;
@@ -45,15 +45,15 @@ exports.renderFreeTextColumnSummary = renderFreeTextColumnSummary;
45
45
  const isValidFreeTextColumn = (data, api) => {
46
46
  const columns = api.columnApi.getUIAvailableColumns();
47
47
  if (!data.ColumnId) {
48
- return 'Column Id cannot be empty';
48
+ return 'A Column ID is required.';
49
49
  }
50
50
  const columnsWithSameIdCount = columns.filter((c) => c.columnId === data.ColumnId).length;
51
51
  const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
52
52
  if (hasAlreadyExistingId) {
53
- return 'A Column already exists with that id';
53
+ return 'A column with this ID already exists.';
54
54
  }
55
55
  if (!data.FreeTextColumnSettings.DataType) {
56
- return 'No data type specified for column';
56
+ return 'A data type is required for the column.';
57
57
  }
58
58
  return true;
59
59
  };