@adaptabletools/adaptable-cjs 22.0.0-canary.2 → 22.0.0-canary.4

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 (131) hide show
  1. package/index.css +64 -26
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
  5. package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
  6. package/src/AdaptableOptions/CustomSortOptions.d.ts +5 -0
  7. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
  8. package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
  9. package/src/AdaptableState/AlertState.d.ts +2 -2
  10. package/src/AdaptableState/ChartingState.d.ts +3 -3
  11. package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
  12. package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
  13. package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
  14. package/src/AdaptableState/Common/AdaptableObject.d.ts +25 -2
  15. package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
  16. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  17. package/src/AdaptableState/Common/Schedule.d.ts +3 -4
  18. package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
  19. package/src/AdaptableState/CustomSortState.d.ts +2 -2
  20. package/src/AdaptableState/DashboardState.d.ts +2 -2
  21. package/src/AdaptableState/ExportState.d.ts +2 -2
  22. package/src/AdaptableState/FlashingCellState.d.ts +2 -2
  23. package/src/AdaptableState/FormatColumnState.d.ts +2 -10
  24. package/src/AdaptableState/LayoutState.d.ts +8 -3
  25. package/src/AdaptableState/NamedQueryState.d.ts +2 -2
  26. package/src/AdaptableState/PlusMinusState.d.ts +2 -2
  27. package/src/AdaptableState/ShortcutState.d.ts +2 -2
  28. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  29. package/src/AdaptableState/ThemeState.d.ts +2 -2
  30. package/src/Api/CustomSortApi.d.ts +6 -3
  31. package/src/Api/DataSetApi.d.ts +1 -1
  32. package/src/Api/GridApi.d.ts +3 -3
  33. package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -1
  34. package/src/Api/Implementation/CustomSortApiImpl.js +2 -2
  35. package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
  36. package/src/Api/Implementation/GridApiImpl.js +16 -16
  37. package/src/Api/Implementation/LayoutHelpers.js +7 -0
  38. package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
  39. package/src/Api/Internal/ColumnInternalApi.js +1 -1
  40. package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
  41. package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
  42. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
  43. package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
  44. package/src/Strategy/AlertModule.js +4 -0
  45. package/src/Strategy/CustomSortModule.js +4 -0
  46. package/src/Strategy/FlashingCellModule.js +5 -0
  47. package/src/Strategy/FormatColumnModule.js +4 -0
  48. package/src/Strategy/LayoutModule.js +4 -4
  49. package/src/Strategy/PlusMinusModule.js +4 -0
  50. package/src/Strategy/ScheduleModule.js +4 -0
  51. package/src/Strategy/ShortcutModule.js +4 -0
  52. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
  53. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -2
  54. package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -2
  55. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
  56. package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
  57. package/src/Utilities/Extensions/StringExtensions.js +17 -0
  58. package/src/Utilities/Helpers/FormatHelper.js +9 -2
  59. package/src/Utilities/Helpers/StyleHelper.js +14 -0
  60. package/src/Utilities/ObjectFactory.js +16 -3
  61. package/src/Utilities/Services/AnnotationsService.js +1 -1
  62. package/src/Utilities/Services/ModuleService.js +3 -3
  63. package/src/View/AdaptablePopover/index.d.ts +1 -0
  64. package/src/View/AdaptablePopover/index.js +1 -1
  65. package/src/View/Alert/ActiveAlertsPanel.js +8 -0
  66. package/src/View/Alert/AlertViewPanel.js +13 -9
  67. package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
  68. package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
  69. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
  70. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
  71. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +48 -12
  72. package/src/View/Alert/Wizard/AlertWizard.js +12 -8
  73. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +23 -11
  74. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
  75. package/src/View/CellSummary/CellSummaryViewPanel.js +15 -17
  76. package/src/View/Components/AdaptableDateInput/index.js +1 -1
  77. package/src/View/Components/Buttons/ButtonApply.js +1 -1
  78. package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
  79. package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
  80. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
  81. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +18 -17
  82. package/src/View/Components/StyleComponent.js +20 -1
  83. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  84. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +39 -13
  85. package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
  86. package/src/View/Dashboard/DashboardPopup.js +4 -5
  87. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
  88. package/src/View/Export/ExportDestinationPicker.js +1 -1
  89. package/src/View/Export/ExportStatusBar.js +4 -2
  90. package/src/View/Export/ExportViewPanel.js +25 -18
  91. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
  92. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +36 -15
  93. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +13 -9
  94. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +46 -51
  95. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
  96. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -11
  97. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
  98. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
  99. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +32 -9
  100. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
  101. package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
  102. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
  103. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
  104. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +14 -4
  105. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
  106. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
  107. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +10 -1
  108. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
  109. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
  110. package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
  111. package/src/View/UIHelper.d.ts +2 -0
  112. package/src/View/UIHelper.js +16 -0
  113. package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
  114. package/src/agGrid/AdaptableAgGrid.js +5 -5
  115. package/src/agGrid/AgGridColumnAdapter.js +3 -18
  116. package/src/components/Dashboard/DashboardToolbar.js +1 -1
  117. package/src/components/ExpressionEditor/EditorInput.js +19 -3
  118. package/src/components/Tree/TreeDropdown/index.js +1 -1
  119. package/src/env.js +2 -2
  120. package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
  121. package/src/layout-manager/src/index.js +25 -7
  122. package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
  123. package/src/metamodel/adaptable.metamodel.d.ts +39 -7
  124. package/src/metamodel/adaptable.metamodel.js +1 -1
  125. package/src/migration/AdaptableUpgradeHelper.js +3 -1
  126. package/src/migration/VersionUpgrade22.d.ts +21 -0
  127. package/src/migration/VersionUpgrade22.js +191 -0
  128. package/src/types.d.ts +2 -3
  129. package/tsconfig.cjs.tsbuildinfo +1 -1
  130. package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
  131. package/src/AdaptableState/Common/SuspendableObject.js +0 -2
@@ -45,15 +45,6 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
45
45
  .getFormatColumns(config)
46
46
  .filter((fc) => fc.Style);
47
47
  }
48
- /**
49
- * Retrieves all Format Columns in Adaptable State with the `Style` or the `CellAlignment` property set
50
- * @returns format columns
51
- */
52
- getAllFormatColumnWithStyleAndCellAlignment(config) {
53
- return this.getFormatColumnApi()
54
- .getFormatColumns(config)
55
- .filter((fc) => fc.Style || fc.CellAlignment);
56
- }
57
48
  /**
58
49
  * Retrieves all Format Columns in Adaptable State with `DisplayFormat` property set
59
50
  * @returns format columns
@@ -63,15 +54,6 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
63
54
  .getFormatColumns(config)
64
55
  .filter((fc) => fc.DisplayFormat);
65
56
  }
66
- /**
67
- * Retrieves all Format Columns in Adaptable State with `CellAlignment` property set
68
- * @returns format columns
69
- */
70
- getAllFormatColumnWithCellAlignment(config) {
71
- return this.getFormatColumnApi()
72
- .getFormatColumns(config)
73
- .filter((fc) => fc.CellAlignment);
74
- }
75
57
  /**
76
58
  * Get all FormatColumns which are defined for this column and have a custom AdaptableStyle
77
59
  * @param column
@@ -79,7 +61,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
79
61
  * @returns list of FormatColumn
80
62
  */
81
63
  getFormatColumnsWithStyleForColumn(column, config) {
82
- const formatColumns = this.getAllFormatColumnWithStyleAndCellAlignment()
64
+ const formatColumns = this.getAllFormatColumnWithStyle()
83
65
  .filter((formatColumn) => {
84
66
  // FormatColumn default target is 'cell', so if no target is specified, we assume 'cell'
85
67
  const fcTarget = formatColumn.Target ?? 'cell';
@@ -168,11 +168,11 @@ export declare const getColumnFilterSelector: (state: AdaptableState, columnId:
168
168
  Predicates: import("../../types").ColumnFilterPredicate[];
169
169
  PredicatesOperator?: import("../../types").PredicatesOperator;
170
170
  IsSuspended?: boolean;
171
- Uuid?: import("../../AdaptableState/Uuid").TypeUuid;
172
171
  Source?: "InitialState" | "User";
173
172
  AdaptableVersion?: import("../../types").AdaptableVersion;
174
173
  IsReadOnly?: boolean;
175
174
  Tags?: import("../../types").AdaptableObjectTag[];
176
175
  Metadata?: any;
176
+ Uuid?: import("../../AdaptableState/Uuid").TypeUuid;
177
177
  };
178
178
  export declare const LayoutReducer: Redux.Reducer<LayoutState>;
@@ -51,7 +51,7 @@ const GetNoteSelector = (state, address) => {
51
51
  // happy check
52
52
  return true;
53
53
  }
54
- // Primary keys retreived from the grid dom are always strings, so we must also consider them strings
54
+ // Primary keys retrieved from the grid dom are always strings, so we must also consider them strings
55
55
  if ((typeof address.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
56
56
  (typeof address.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
57
57
  return (note.PrimaryKeyValue.toString() === address.PrimaryKeyValue.toString() &&
@@ -187,6 +187,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
187
187
  const alertType = (0, getAlertType_1.getAlertType)(alert);
188
188
  return {
189
189
  items: [
190
+ {
191
+ name: 'Name',
192
+ values: [alert.Name],
193
+ },
190
194
  (0, getAlertTypeViewItems_1.getAlertTypeViewItems)(alert),
191
195
  alertType === 'DataChange' && {
192
196
  ...(0, getScopeViewItems_1.getScopeViewItems)(alert.Scope, this.api),
@@ -51,6 +51,10 @@ class CustomSortModule extends AdaptableModuleBase_1.AdaptableModuleBase {
51
51
  toView(customSort) {
52
52
  return {
53
53
  items: [
54
+ {
55
+ name: 'Name',
56
+ values: [customSort.Name],
57
+ },
54
58
  (0, getCustomSortColumnViewItems_1.getCustomSortColumnViewItems)(customSort, this.api),
55
59
  (0, getCustomSortSortOrderViewItems_1.getCustomSortSortOrderViewItems)(customSort),
56
60
  (0, getObjectTagsViewItems_1.getObjectTagsViewItems)(customSort, this.api),
@@ -186,6 +186,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
186
186
  }
187
187
  return [
188
188
  this.createMenuItemReduxAction('flashing-cell-add', 'Add Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionAdd({
189
+ Name: `Any Change [${column.columnId}]`,
189
190
  Scope: {
190
191
  ColumnIds: [column.columnId],
191
192
  },
@@ -251,6 +252,10 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
251
252
  toView(flashingCell) {
252
253
  return {
253
254
  items: [
255
+ {
256
+ name: 'Name',
257
+ values: [flashingCell.Name],
258
+ },
254
259
  { ...(0, getScopeViewItems_1.getScopeViewItems)(flashingCell.Scope, this.api), label: 'Trigger' },
255
260
  {
256
261
  ...(0, getRuleViewItems_1.getRuleViewItems)(flashingCell.Rule, this.api),
@@ -86,6 +86,10 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
86
86
  return {
87
87
  abObject: formatColumn,
88
88
  items: [
89
+ {
90
+ name: 'Name',
91
+ values: [formatColumn.Name],
92
+ },
89
93
  (0, getScopeViewItems_1.getScopeViewItems)(formatColumn.Scope, this.api),
90
94
  (0, getFormatColumnSettingsTargetItems_1.getFormatColumnSettingsTargetItems)(formatColumn),
91
95
  formatColumn.Rule && (0, getRuleViewItems_1.getRuleViewItems)(formatColumn.Rule, this.api),
@@ -303,14 +303,14 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
303
303
  }
304
304
  return {
305
305
  items: [
306
- {
307
- name: 'Grid Type',
308
- values: [(0, LayoutHelpers_1.isPivotLayout)(layout) ? 'Pivot' : 'Table'],
309
- },
310
306
  {
311
307
  name: 'Name',
312
308
  values: [layout.Name],
313
309
  },
310
+ {
311
+ name: 'Grid Type',
312
+ values: [(0, LayoutHelpers_1.isPivotLayout)(layout) ? 'Pivot' : 'Table'],
313
+ },
314
314
  /**
315
315
  * Hide pivot columns.
316
316
  *
@@ -204,6 +204,10 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
204
204
  return {
205
205
  abObject: plusMinus,
206
206
  items: [
207
+ {
208
+ name: 'Name',
209
+ values: [plusMinus.Name],
210
+ },
207
211
  {
208
212
  name: 'Target',
209
213
  ...(0, getScopeViewItems_1.getScopeViewItems)(plusMinus.Scope, this.api),
@@ -136,6 +136,10 @@ class ScheduleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
136
136
  return {
137
137
  abObject: schedule,
138
138
  items: [
139
+ {
140
+ name: 'Name',
141
+ values: [schedule.Name],
142
+ },
139
143
  {
140
144
  name: 'Settings',
141
145
  values: (0, ScheduleSettingsSummary_1.getScheduleSettingsValues)(schedule).map((description) => `${description.label}: ${description.value}`),
@@ -86,6 +86,10 @@ class ShortcutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
86
86
  return {
87
87
  abObject: shortcut,
88
88
  items: [
89
+ {
90
+ name: 'Name',
91
+ values: [shortcut.Name],
92
+ },
89
93
  (0, getScopeViewItems_1.getScopeViewItems)(shortcut.Scope, this.api),
90
94
  (0, getShortcutSettingsViewItems_1.getShortcutSettingsViewItems)(shortcut),
91
95
  (0, getObjectTagsViewItems_1.getObjectTagsViewItems)(shortcut, this.api),
@@ -3,9 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFormatColumnSettingsViewItems = void 0;
4
4
  const getFormatColumnSettingsViewItems = (formatColumn) => {
5
5
  let values = [];
6
- if (formatColumn.CellAlignment) {
7
- values.push(`Cell Alignment: ${formatColumn.CellAlignment}`);
8
- }
9
6
  if (formatColumn.RowScope) {
10
7
  if (formatColumn.RowScope.ExcludeDataRows) {
11
8
  values.push('Exclude Data Rows');
@@ -12,7 +12,7 @@ export declare const PredicateDocsLink = "https://www.adaptabletools.com/docs/ad
12
12
  export declare const PrimaryKeyDocsLink = "https://www.adaptabletools.com/docs/getting-started-primary-key";
13
13
  export declare const LicenseDocsLink = "https://www.adaptabletools.com/buy/buying-adaptable-licensing";
14
14
  export declare const AdaptableOptionsDocsLink = "https://www.adaptabletools.com/docs/technical-reference-adaptable-options";
15
- export declare const AgGridModulesDocsLink = "https://www.adaptabletools.com/docs/dev-guide-aggrid-modules-overview";
15
+ export declare const AgGridModulesDocsLink = "https://www.adaptabletools.com/docs/getting-started-aggrid-modules";
16
16
  export declare const AlertMessageDocsLink = "https://www.adaptabletools.com/docs/handbook-alerting-message";
17
17
  export declare const FormatColumnPlaceholderDocsLink = "https://www.adaptabletools.com/docs/handbook-column-formatting-display-format-placeholder";
18
- export declare const AgGridRequiredModulesDocsLink = "https://www.adaptabletools.com/docs/dev-guide-aggrid-modules-overview#mandatory-modules";
18
+ export declare const AgGridRequiredModulesDocsLink = "https://www.adaptabletools.com/docs/getting-started-aggrid-modules#mandatory-modules";
@@ -16,7 +16,7 @@ exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/adaptable-predicate`;
16
16
  exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/getting-started-primary-key`;
17
17
  exports.LicenseDocsLink = `${exports.HOST_URL_ROOT}/buy/buying-adaptable-licensing`;
18
18
  exports.AdaptableOptionsDocsLink = `${exports.HOST_URL_DOCS}/technical-reference-adaptable-options`;
19
- exports.AgGridModulesDocsLink = `${exports.HOST_URL_DOCS}/dev-guide-aggrid-modules-overview`;
19
+ exports.AgGridModulesDocsLink = `${exports.HOST_URL_DOCS}/getting-started-aggrid-modules`;
20
20
  exports.AlertMessageDocsLink = `${exports.HOST_URL_DOCS}/handbook-alerting-message`;
21
21
  exports.FormatColumnPlaceholderDocsLink = `${exports.HOST_URL_DOCS}/handbook-column-formatting-display-format-placeholder`;
22
- exports.AgGridRequiredModulesDocsLink = `${exports.HOST_URL_DOCS}/dev-guide-aggrid-modules-overview#mandatory-modules`;
22
+ exports.AgGridRequiredModulesDocsLink = `${exports.HOST_URL_DOCS}/getting-started-aggrid-modules#mandatory-modules`;
@@ -643,7 +643,7 @@ exports.scalarExpressionFunctions = {
643
643
  }
644
644
  return result;
645
645
  },
646
- description: "Returns the percentage difference between a cell's current value and its previous value.",
646
+ description: "Returns percentage difference between a cell's current value and previous value",
647
647
  signatures: [
648
648
  'PERCENT_CHANGE( [colName], <INCREASE|DECREASE> )',
649
649
  'PERCENT_CHANGE( COL(name: string), <INCREASE|DECREASE> )',
@@ -688,7 +688,7 @@ exports.scalarExpressionFunctions = {
688
688
  }
689
689
  return result;
690
690
  },
691
- description: "Returns the absolute difference between a cell's current value and its previous value.",
691
+ description: "Returns absolute difference between a cell's current value and previous value",
692
692
  signatures: [
693
693
  'ABSOLUTE_CHANGE( [colName] )',
694
694
  'ABSOLUTE_CHANGE( COL(name: string) )',
@@ -720,7 +720,7 @@ exports.scalarExpressionFunctions = {
720
720
  const previousValue = context.dataChangedEvent.oldValue;
721
721
  return currentColumnValue !== previousValue;
722
722
  },
723
- description: "Returns true if a cell's current value is different from its previous value, otherwise false. If no column is provided, it checks if any value has changed.",
723
+ description: "Returns true if cell's current value is different from previous value, otherwise false; if no column is provided, it checks if any value has changed",
724
724
  signatures: ['ANY_CHANGE( [colName] )', 'ANY_CHANGE()'],
725
725
  examples: ['ANY_CHANGE([col1])', 'ANY_CHANGE()'],
726
726
  category: 'changes',
@@ -17,6 +17,7 @@ export declare function Humanize(str: string): string;
17
17
  export declare function ReplaceEmptySpacesWithUnderscore(str?: string): string;
18
18
  export declare function IsNumeric(str: string): boolean;
19
19
  export declare function UnescapeHtmlEntities(str: string): string;
20
+ export declare function ReplaceAllOccurencesExceptLastOne(str: string, searchTerm: string, replacement: string): string;
20
21
  export declare const StringExtensions: {
21
22
  IsNull: typeof IsNull;
22
23
  IsNotNull: typeof IsNotNull;
@@ -37,5 +38,6 @@ export declare const StringExtensions: {
37
38
  ReplaceEmptySpacesWithUnderscore: typeof ReplaceEmptySpacesWithUnderscore;
38
39
  IsNumeric: typeof IsNumeric;
39
40
  UnescapeHtmlEntities: typeof UnescapeHtmlEntities;
41
+ ReplaceAllOccurencesExceptLastOne: typeof ReplaceAllOccurencesExceptLastOne;
40
42
  };
41
43
  export default StringExtensions;
@@ -20,6 +20,7 @@ exports.Humanize = Humanize;
20
20
  exports.ReplaceEmptySpacesWithUnderscore = ReplaceEmptySpacesWithUnderscore;
21
21
  exports.IsNumeric = IsNumeric;
22
22
  exports.UnescapeHtmlEntities = UnescapeHtmlEntities;
23
+ exports.ReplaceAllOccurencesExceptLastOne = ReplaceAllOccurencesExceptLastOne;
23
24
  const tslib_1 = require("tslib");
24
25
  const startCase_1 = tslib_1.__importDefault(require("lodash/startCase"));
25
26
  function IsNull(stringToCheck) {
@@ -115,6 +116,21 @@ function UnescapeHtmlEntities(str) {
115
116
  }
116
117
  return preparedStr;
117
118
  }
119
+ function ReplaceAllOccurencesExceptLastOne(str, searchTerm, replacement) {
120
+ // Find the index of the last occurrence of the search string
121
+ const lastIndex = str.lastIndexOf(searchTerm);
122
+ // If the string is not found, return the original string
123
+ if (lastIndex === -1) {
124
+ return str;
125
+ }
126
+ // Slice the string into two parts: before and after the last occurrence
127
+ const partBeforeLast = str.slice(0, lastIndex);
128
+ const partAfterLast = str.slice(lastIndex);
129
+ // Replace all occurrences in the first part
130
+ const replacedPart = partBeforeLast.replaceAll(searchTerm, replacement);
131
+ // Recombine the modified first part with the untouched second part
132
+ return replacedPart + partAfterLast;
133
+ }
118
134
  exports.StringExtensions = {
119
135
  IsNull,
120
136
  IsNotNull,
@@ -135,5 +151,6 @@ exports.StringExtensions = {
135
151
  ReplaceEmptySpacesWithUnderscore,
136
152
  IsNumeric,
137
153
  UnescapeHtmlEntities,
154
+ ReplaceAllOccurencesExceptLastOne,
138
155
  };
139
156
  exports.default = exports.StringExtensions;
@@ -34,7 +34,6 @@ function NumberFormatter(input, options = {}, rowNode, column, api) {
34
34
  if (isNaN(n)) {
35
35
  return preparedInput.toString();
36
36
  }
37
- const fractionsSepatator = options.FractionSeparator ? options.FractionSeparator : '.';
38
37
  let multiplier = options.Multiplier ? options.Multiplier : 1;
39
38
  if (options.Multiplier !== undefined) {
40
39
  n *= multiplier;
@@ -71,6 +70,7 @@ function NumberFormatter(input, options = {}, rowNode, column, api) {
71
70
  }
72
71
  let s;
73
72
  let digitsToUse;
73
+ const fractionsSepatator = options.FractionSeparator ?? '.';
74
74
  if (options.Truncate || options.Ceiling || options.Round || options.Floor) {
75
75
  digitsToUse = 0;
76
76
  }
@@ -90,7 +90,14 @@ function NumberFormatter(input, options = {}, rowNode, column, api) {
90
90
  s = s.replace(/\./g, options.FractionSeparator);
91
91
  }
92
92
  if (options.IntegerSeparator !== undefined) {
93
- s = s.replace(/\,/g, options.IntegerSeparator);
93
+ // if fraction separator is not a comma then simply replace all instances
94
+ if (options.FractionSeparator !== ',') {
95
+ s = s.replace(/\,/g, options.IntegerSeparator);
96
+ }
97
+ else {
98
+ // otherwise don't replace the last instance
99
+ s = StringExtensions_1.default.ReplaceAllOccurencesExceptLastOne(s, ',', options.IntegerSeparator);
100
+ }
94
101
  }
95
102
  s = (options.Prefix || '') + s + (options.Suffix || '');
96
103
  if (options.Parentheses === true && preparedInput < 0) {
@@ -85,6 +85,20 @@ const convertAdaptableStyleToCSS = (style) => {
85
85
  break;
86
86
  }
87
87
  }
88
+ if (style.Alignment) {
89
+ switch (style.Alignment) {
90
+ case 'Default':
91
+ case 'Left':
92
+ result.textAlign = 'left';
93
+ break;
94
+ case 'Right':
95
+ result.textAlign = 'right';
96
+ break;
97
+ case 'Center':
98
+ result.textAlign = 'center';
99
+ break;
100
+ }
101
+ }
88
102
  // assertion added to comply with the ag-Grid types
89
103
  return result;
90
104
  };
@@ -48,7 +48,7 @@ const Toastify_1 = require("../components/Toastify");
48
48
  const UIHelper_1 = require("../View/UIHelper");
49
49
  const LayoutHelpers_1 = require("../Api/Implementation/LayoutHelpers");
50
50
  function CreateEmptyCustomSort() {
51
- return { Uuid: (0, Uuid_1.createUuid)(), ColumnId: GeneralConstants_1.EMPTY_STRING, SortedValues: [] };
51
+ return { Uuid: (0, Uuid_1.createUuid)(), Name: GeneralConstants_1.EMPTY_STRING, ColumnId: GeneralConstants_1.EMPTY_STRING, SortedValues: [] };
52
52
  }
53
53
  function CreateAdaptableComment(text, api) {
54
54
  const comment = {
@@ -86,6 +86,7 @@ function CreateEmptyNamedQuery(expression) {
86
86
  function CreateEmptyPlusMinusNudge() {
87
87
  return {
88
88
  Uuid: (0, Uuid_1.createUuid)(),
89
+ Name: GeneralConstants_1.EMPTY_STRING,
89
90
  Scope: undefined,
90
91
  Rule: undefined,
91
92
  NudgeValue: ObjectDefaultConstants_1.PLUS_MINUS_DEFAULT_NUDGE_VALUE,
@@ -123,6 +124,7 @@ function CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition, rowDa
123
124
  function CreateEmptyAlertDefinition() {
124
125
  return {
125
126
  Uuid: (0, Uuid_1.createUuid)(),
127
+ Name: GeneralConstants_1.EMPTY_STRING,
126
128
  Scope: { All: true },
127
129
  Rule: {
128
130
  Predicates: [],
@@ -134,6 +136,7 @@ function CreateEmptyAlertDefinition() {
134
136
  function CreateEmptyFlashingCellDefinition() {
135
137
  return {
136
138
  Uuid: (0, Uuid_1.createUuid)(),
139
+ Name: GeneralConstants_1.EMPTY_STRING,
137
140
  Scope: { ColumnIds: [] },
138
141
  Rule: {
139
142
  Predicates: [
@@ -150,6 +153,7 @@ function CreateInternalAlertDefinitionForMessages(messageType, alertProperties)
150
153
  };
151
154
  return {
152
155
  Uuid: (0, Uuid_1.createUuid)(),
156
+ Name: GeneralConstants_1.EMPTY_STRING,
153
157
  Scope: undefined,
154
158
  Rule: {
155
159
  Predicates: [],
@@ -171,6 +175,7 @@ function CreateEmptyReport() {
171
175
  function CreateEmptyBaseSchedule(scheduleType) {
172
176
  return {
173
177
  Uuid: (0, Uuid_1.createUuid)(),
178
+ Name: GeneralConstants_1.EMPTY_STRING,
174
179
  ScheduleType: scheduleType,
175
180
  Schedule: CreateEmptySchedule(),
176
181
  };
@@ -178,6 +183,7 @@ function CreateEmptyBaseSchedule(scheduleType) {
178
183
  function CreateEmptyReminderSchedule() {
179
184
  return {
180
185
  Uuid: (0, Uuid_1.createUuid)(),
186
+ Name: GeneralConstants_1.EMPTY_STRING,
181
187
  ScheduleType: Enums_1.ScheduleType.Reminder,
182
188
  Schedule: CreateEmptySchedule(),
183
189
  Header: GeneralConstants_1.EMPTY_STRING,
@@ -190,6 +196,7 @@ function CreateEmptyReminderSchedule() {
190
196
  function CreateEmptyReportSchedule() {
191
197
  return {
192
198
  Uuid: (0, Uuid_1.createUuid)(),
199
+ Name: GeneralConstants_1.EMPTY_STRING,
193
200
  ScheduleType: Enums_1.ScheduleType.Report,
194
201
  Schedule: CreateEmptySchedule(),
195
202
  ReportName: GeneralConstants_1.EMPTY_STRING,
@@ -214,6 +221,7 @@ function CreateEmptyOpenFinReport() {
214
221
  function CreateEmptyIPushPullSchedule() {
215
222
  return {
216
223
  Uuid: (0, Uuid_1.createUuid)(),
224
+ Name: GeneralConstants_1.EMPTY_STRING,
217
225
  ScheduleType: Enums_1.ScheduleType.ipushpull,
218
226
  Schedule: CreateEmptySchedule(),
219
227
  IPushPullReport: CreateEmptyIPushPullReport(),
@@ -223,6 +231,7 @@ function CreateEmptyIPushPullSchedule() {
223
231
  function CreateEmptyOpenFinSchedule() {
224
232
  return {
225
233
  Uuid: (0, Uuid_1.createUuid)(),
234
+ Name: GeneralConstants_1.EMPTY_STRING,
226
235
  ScheduleType: Enums_1.ScheduleType.OpenFin,
227
236
  Schedule: CreateEmptySchedule(),
228
237
  OpenFinReport: CreateEmptyOpenFinReport(),
@@ -232,6 +241,7 @@ function CreateEmptyOpenFinSchedule() {
232
241
  function CreateIPushPullSchedule(iPushPullReport) {
233
242
  return {
234
243
  Uuid: (0, Uuid_1.createUuid)(),
244
+ Name: GeneralConstants_1.EMPTY_STRING,
235
245
  ScheduleType: Enums_1.ScheduleType.ipushpull,
236
246
  Schedule: CreateEmptySchedule(),
237
247
  IPushPullReport: iPushPullReport,
@@ -241,6 +251,7 @@ function CreateIPushPullSchedule(iPushPullReport) {
241
251
  function CreateReportSchedule(reportName, reportFormat) {
242
252
  return {
243
253
  Uuid: (0, Uuid_1.createUuid)(),
254
+ Name: GeneralConstants_1.EMPTY_STRING,
244
255
  ScheduleType: Enums_1.ScheduleType.Report,
245
256
  Schedule: CreateEmptySchedule(),
246
257
  ReportName: reportName,
@@ -249,7 +260,6 @@ function CreateReportSchedule(reportName, reportFormat) {
249
260
  }
250
261
  function CreateEmptySchedule() {
251
262
  return {
252
- Uuid: (0, Uuid_1.createUuid)(),
253
263
  OneOffDate: undefined,
254
264
  DaysOfWeek: [],
255
265
  Hour: 0,
@@ -259,6 +269,7 @@ function CreateEmptySchedule() {
259
269
  function CreateEmptyShortcut() {
260
270
  return {
261
271
  Uuid: (0, Uuid_1.createUuid)(),
272
+ Name: GeneralConstants_1.EMPTY_STRING,
262
273
  Scope: undefined,
263
274
  ShortcutKey: GeneralConstants_1.EMPTY_STRING,
264
275
  ShortcutValue: undefined,
@@ -267,10 +278,11 @@ function CreateEmptyShortcut() {
267
278
  }
268
279
  function CreateEmptyFormatColumn() {
269
280
  return {
281
+ Uuid: (0, Uuid_1.createUuid)(),
282
+ Name: GeneralConstants_1.EMPTY_STRING,
270
283
  Scope: undefined,
271
284
  Style: CreateEmptyStyle(),
272
285
  DisplayFormat: undefined,
273
- CellAlignment: undefined,
274
286
  RowScope: undefined,
275
287
  Target: 'cell',
276
288
  };
@@ -334,6 +346,7 @@ function CreateEmptyStyle() {
334
346
  FontStyle: undefined,
335
347
  FontSize: undefined,
336
348
  ClassName: undefined,
349
+ Alignment: undefined,
337
350
  };
338
351
  }
339
352
  function CreateSystemStatusMessageInfo(message, type, furtherInfo) {
@@ -32,7 +32,7 @@ class AnnotationsService {
32
32
  if (a?.ColumnId === b?.ColumnId && a?.PrimaryKeyValue === b?.PrimaryKeyValue) {
33
33
  return true;
34
34
  }
35
- // Primary keys retreived from the grid dom are always strings, so we must also consider them strings
35
+ // Primary keys retrieved from the grid dom are always strings, so we must also consider them strings
36
36
  if ((typeof a.PrimaryKeyValue === 'number' && typeof b.PrimaryKeyValue === 'string') ||
37
37
  (typeof b.PrimaryKeyValue === 'string' && typeof a.PrimaryKeyValue === 'number')) {
38
38
  return (a.PrimaryKeyValue.toString() === b.PrimaryKeyValue.toString() && a.ColumnId === b.ColumnId);
@@ -118,13 +118,13 @@ class ModuleService {
118
118
  case 'CalculatedColumn':
119
119
  return url + 'handbook-calculated-column';
120
120
  case 'CellSummary':
121
- return url + 'handbook-summarising';
121
+ return url + 'handbook-summarising-cells';
122
122
  case 'Charting':
123
123
  return url + 'handbook-charts';
124
124
  case 'ColumnFilter':
125
125
  return url + 'handbook-column-filter';
126
126
  case 'ColumnInfo':
127
- return url + 'dev-guide-column-grid-column-info';
127
+ return url + 'dev-guide-columns-column-info';
128
128
  case 'Comment':
129
129
  return url + 'handbook-comments';
130
130
  case 'CustomSort':
@@ -150,7 +150,7 @@ class ModuleService {
150
150
  case 'GridFilter':
151
151
  return url + 'handbook-grid-filter';
152
152
  case 'GridInfo':
153
- return url + 'dev-guide-column-grid-column-info';
153
+ return url + 'dev-guide-support-monitoring';
154
154
  case 'Layout':
155
155
  return url + 'handbook-layouts';
156
156
  case 'NamedQuery':
@@ -17,6 +17,7 @@ export interface AdaptablePopoverProps extends React.ClassAttributes<React.Props
17
17
  popupPadding?: 0 | 2;
18
18
  alignPosition?: OverlayShowParams['alignPosition'];
19
19
  visible?: boolean;
20
+ disabled?: boolean;
20
21
  }
21
22
  export declare class AdaptablePopover extends React.Component<React.PropsWithChildren<AdaptablePopoverProps>, {}> {
22
23
  render(): React.JSX.Element;
@@ -39,7 +39,7 @@ class AdaptablePopover extends React.Component {
39
39
  // showTriangle
40
40
  visible: this.props.visible, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
41
41
  overflow: 'visible',
42
- }, alignPosition: this.props.alignPosition }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, variant: "text", onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
42
+ }, alignPosition: this.props.alignPosition }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, variant: "text", onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText, disabled: this.props.disabled }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
43
43
  this.props.children,
44
44
  showIcon && React.createElement(icons_1.Icon, { name: icon, style: iconStyle }))))));
45
45
  }
@@ -11,6 +11,14 @@ const ActiveAlertsPanel = () => {
11
11
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
12
12
  const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
13
13
  const alerts = (0, react_redux_1.useSelector)((state) => state.Internal.AdaptableAlerts);
14
+ // map the suspended property from the underlying AlertDefinitions
15
+ alerts.forEach((alert) => {
16
+ const liveAlertDef = adaptable.api.alertApi.getAlertDefinitionById(alert.alertDefinition.Uuid);
17
+ if (liveAlertDef) {
18
+ // @ts-ignore theoretically AdaptableAlert is not Suspendable; practically <AdaptableObjectCompactList> expects it
19
+ alert.IsSuspended = liveAlertDef.IsSuspended;
20
+ }
21
+ });
14
22
  return React.createElement(AdaptableObjectCompactList_1.AdaptableObjectCompactList, { abObjects: alerts, module: filterModule });
15
23
  };
16
24
  exports.ActiveAlertsPanel = ActiveAlertsPanel;
@@ -6,10 +6,11 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const InternalRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/InternalRedux"));
8
8
  const AdaptablePopover_1 = require("../AdaptablePopover");
9
- const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
10
9
  const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
11
10
  const ActiveAlertsPanel_1 = require("./ActiveAlertsPanel");
12
11
  const Flex_1 = require("../../components/Flex");
12
+ const ButtonClear_1 = require("../Components/Buttons/ButtonClear");
13
+ const clsx_1 = tslib_1.__importDefault(require("clsx"));
13
14
  class AlertViewPanelComponent extends React.Component {
14
15
  constructor(props) {
15
16
  super(props);
@@ -24,7 +25,6 @@ class AlertViewPanelComponent extends React.Component {
24
25
  }
25
26
  }
26
27
  render() {
27
- const messageType = UIHelper_1.default.getMessageTypeFromAdaptableAlerts(this.props.AdaptableAlerts);
28
28
  const { color: buttonTextColor, background: buttonBackground } = (0, getAlertButtonStyle_1.getAlertButtonStyle)(this.props.AdaptableAlerts);
29
29
  const collapsedText = this.props.AdaptableAlerts.length == 0
30
30
  ? '0 Alerts'
@@ -32,13 +32,17 @@ class AlertViewPanelComponent extends React.Component {
32
32
  ? '1 Alert'
33
33
  : this.props.AdaptableAlerts.length + ' Alerts';
34
34
  const alertsPanel = React.createElement(ActiveAlertsPanel_1.ActiveAlertsPanel, null);
35
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
36
- return (React.createElement(Flex_1.Flex, { alignItems: "stretch", className: `ab-${elementType}__Alert__wrap` },
37
- React.createElement(Flex_1.Flex, { className: `ab-${elementType}__Alert__text twa:rounded-standard twa:mr-2 twa:p-2 text-2`, style: { color: buttonTextColor, backgroundColor: buttonBackground }, alignItems: "center" }, collapsedText),
38
- this.props.AdaptableAlerts.length > 0 && (React.createElement(Flex_1.Flex, { alignItems: "center" },
39
- React.createElement(AdaptablePopover_1.AdaptablePopover, { className: `ab-${elementType}__Alert__info`, headerText: "",
40
- // tooltipText="Alerts"
41
- bodyText: [alertsPanel], MessageType: messageType, useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })))));
35
+ const isToolbar = this.props.viewType === 'Toolbar';
36
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
37
+ return (React.createElement(Flex_1.Flex, { alignItems: "stretch", className: (0, clsx_1.default)(`ab-${elementType}__Alert__wrap twa:gap-1`, {
38
+ 'twa:min-w-[140px] twa:w-[140px]': isToolbar,
39
+ [`twa:flex-1`]: !isToolbar,
40
+ }) },
41
+ React.createElement(Flex_1.Flex, { key: `${buttonTextColor}_${buttonBackground}_${collapsedText}`, className: `ab-${elementType}__Alert__text twa:flex-1 twa:rounded-standard twa:p-2 text-2 twa:items-center twa:justify-center twa:min-h-input`, style: { color: buttonTextColor, backgroundColor: buttonBackground } }, collapsedText),
42
+ this.props.AdaptableAlerts.length > 0 && (React.createElement(Flex_1.Flex, { className: 'twa:gap-1' },
43
+ React.createElement(Flex_1.Flex, { className: "twa:flex twa:box-border" },
44
+ React.createElement(ButtonClear_1.ButtonClear, { "aria-label": 'Clear All Alerts', variant: 'outlined', className: `ab-${elementType}__Alert__clear`, onClick: () => this.props.onDeleteAllAlert(this.state.Alerts), tooltip: "Clear All Alerts", showText: this.props.viewType === 'ToolPanel' }, 'Clear Alerts')),
45
+ React.createElement(AdaptablePopover_1.AdaptablePopover, { className: `ab-${elementType}__Alert__info`, headerText: "Alerts Details", bodyText: [alertsPanel], MessageType: 'Info', useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })))));
42
46
  }
43
47
  }
44
48
  function mapStateToProps(state, ownProps) {
@@ -2,4 +2,5 @@ import { AdaptableAlert } from '../../../../types';
2
2
  export declare const getAlertButtonStyle: (alerts: AdaptableAlert[]) => {
3
3
  color: string;
4
4
  background: string;
5
+ cssClasses: string;
5
6
  };
@@ -8,9 +8,17 @@ const getAlertButtonStyle = (alerts) => {
8
8
  const messageTypeColor = UIHelper_1.default.getColorByMessageType(messageType);
9
9
  const buttonBackground = UIHelper_1.default.getButtonColourForAdaptableAlerts(alerts, messageTypeColor);
10
10
  const buttonTextColor = UIHelper_1.default.getButtonTextColourForArrayandMessageType(alerts, messageType);
11
+ let cssClasses = '';
12
+ if (alerts?.length) {
13
+ const cssMessageType = UIHelper_1.default.getCSSColorByMessageType(messageType);
14
+ cssClasses = cssMessageType
15
+ ? `twa:bg-${cssMessageType} twa:text-text-on-${cssMessageType}`
16
+ : '';
17
+ }
11
18
  return {
12
19
  color: buttonTextColor,
13
20
  background: buttonBackground,
21
+ cssClasses,
14
22
  };
15
23
  };
16
24
  exports.getAlertButtonStyle = getAlertButtonStyle;
@@ -13,10 +13,11 @@ export declare const getDefaultAlertDefinition: (alertDefinition: AlertDefinitio
13
13
  MessageText?: string;
14
14
  AlertProperties?: import("../../../types").AlertProperties;
15
15
  AlertForm?: string | import("../../../types").AlertButtonForm;
16
- IsSuspended?: boolean;
16
+ Name: string;
17
17
  Source?: "InitialState" | "User";
18
18
  AdaptableVersion?: import("../../../types").AdaptableVersion;
19
19
  IsReadOnly?: boolean;
20
20
  Tags?: import("../../../types").AdaptableObjectTag[];
21
21
  Metadata?: any;
22
+ IsSuspended?: boolean;
22
23
  };