@adaptabletools/adaptable-cjs 22.0.0-canary.3 → 22.0.0-canary.5

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 +58 -29
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
  5. package/src/AdaptableOptions/CustomSortOptions.d.ts +5 -0
  6. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
  7. package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
  8. package/src/AdaptableState/AlertState.d.ts +2 -2
  9. package/src/AdaptableState/ChartingState.d.ts +3 -3
  10. package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
  11. package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
  12. package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
  13. package/src/AdaptableState/Common/AdaptableObject.d.ts +25 -2
  14. package/src/AdaptableState/Common/AdaptableStyle.d.ts +1 -1
  15. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  16. package/src/AdaptableState/Common/Schedule.d.ts +3 -4
  17. package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
  18. package/src/AdaptableState/CustomSortState.d.ts +2 -2
  19. package/src/AdaptableState/DashboardState.d.ts +2 -2
  20. package/src/AdaptableState/ExportState.d.ts +2 -2
  21. package/src/AdaptableState/FlashingCellState.d.ts +2 -2
  22. package/src/AdaptableState/FormatColumnState.d.ts +2 -2
  23. package/src/AdaptableState/LayoutState.d.ts +8 -3
  24. package/src/AdaptableState/NamedQueryState.d.ts +2 -2
  25. package/src/AdaptableState/PlusMinusState.d.ts +2 -2
  26. package/src/AdaptableState/ShortcutState.d.ts +2 -2
  27. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  28. package/src/AdaptableState/ThemeState.d.ts +2 -2
  29. package/src/Api/CustomSortApi.d.ts +6 -3
  30. package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -1
  31. package/src/Api/Implementation/CustomSortApiImpl.js +2 -2
  32. package/src/Api/Implementation/LayoutHelpers.js +7 -0
  33. package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
  34. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
  35. package/src/Strategy/AlertModule.js +4 -0
  36. package/src/Strategy/CustomSortModule.js +4 -0
  37. package/src/Strategy/FlashingCellModule.js +5 -0
  38. package/src/Strategy/FormatColumnModule.js +4 -0
  39. package/src/Strategy/LayoutModule.js +4 -4
  40. package/src/Strategy/PlusMinusModule.js +4 -0
  41. package/src/Strategy/ScheduleModule.js +4 -0
  42. package/src/Strategy/ShortcutModule.js +4 -0
  43. package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
  44. package/src/Utilities/Extensions/StringExtensions.js +17 -0
  45. package/src/Utilities/Helpers/FormatHelper.js +9 -2
  46. package/src/Utilities/ObjectFactory.js +15 -2
  47. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
  48. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
  49. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +48 -12
  50. package/src/View/Alert/Wizard/AlertWizard.js +12 -8
  51. package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
  52. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
  53. package/src/View/Components/StyleComponent.d.ts +1 -0
  54. package/src/View/Components/StyleComponent.js +84 -33
  55. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  56. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +39 -13
  57. package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
  58. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
  59. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
  60. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +36 -15
  61. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +13 -9
  62. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +47 -29
  63. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -11
  64. package/src/View/GridFilter/GridFilterExpressionEditor.js +6 -1
  65. package/src/View/GridFilter/GridFilterViewPanel.js +33 -70
  66. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
  67. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +32 -9
  68. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
  69. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
  70. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
  71. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +12 -2
  72. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
  73. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
  74. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +10 -1
  75. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
  76. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
  77. package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
  78. package/src/components/ColorPicker/ColorPicker.js +5 -4
  79. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  80. package/src/env.js +2 -2
  81. package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
  82. package/src/layout-manager/src/index.js +25 -7
  83. package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
  84. package/src/metamodel/adaptable.metamodel.d.ts +30 -0
  85. package/src/metamodel/adaptable.metamodel.js +1 -1
  86. package/src/migration/AdaptableUpgradeHelper.js +1 -1
  87. package/src/migration/VersionUpgrade22.d.ts +15 -0
  88. package/src/migration/VersionUpgrade22.js +160 -0
  89. package/src/types.d.ts +1 -2
  90. package/tsconfig.cjs.tsbuildinfo +1 -1
  91. package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
  92. package/src/AdaptableState/Common/SuspendableObject.js +0 -2
  93. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +0 -1
  94. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -633
  95. package/src/View/Alert/AlertEntityRow.d.ts +0 -11
  96. package/src/View/Alert/AlertEntityRow.js +0 -33
  97. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
  98. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -63
  99. package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
  100. package/src/View/Components/Buttons/ButtonFunction.js +0 -13
  101. package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
  102. package/src/View/Components/Buttons/ButtonGeneral.js +0 -12
  103. package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
  104. package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -8
  105. package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
  106. package/src/View/Components/Buttons/ButtonShow.js +0 -12
  107. package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
  108. package/src/View/Components/Buttons/ButtonShowChart.js +0 -12
  109. package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
  110. package/src/View/Components/Buttons/ButtonUndo.js +0 -12
  111. package/src/View/Components/ExpressionWizard.d.ts +0 -24
  112. package/src/View/Components/ExpressionWizard.js +0 -82
  113. package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
  114. package/src/View/Components/FilterForm/Waiting.js +0 -19
  115. package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
  116. package/src/View/Components/Panels/PanelFooter.js +0 -14
  117. package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
  118. package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -20
  119. package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
  120. package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -31
  121. package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
  122. package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -50
  123. package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
  124. package/src/View/Components/SharedProps/WizardScopeState.js +0 -2
  125. package/src/View/Components/WizardSummaryRow.d.ts +0 -9
  126. package/src/View/Components/WizardSummaryRow.js +0 -16
  127. package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
  128. package/src/View/CustomSort/CustomSortSummary.js +0 -110
  129. package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
  130. package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -24
  131. package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
  132. package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -73
  133. package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
  134. package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -73
  135. package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
  136. package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -61
  137. package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
  138. package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -40
  139. package/src/View/Filter/FilterSummary.d.ts +0 -18
  140. package/src/View/Filter/FilterSummary.js +0 -53
  141. package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
  142. package/src/View/FormatColumn/FormatColumnSummary.js +0 -95
  143. package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
  144. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -93
  145. package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
  146. package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -99
  147. package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
  148. package/src/View/PlusMinus/PlusMinusSummary.js +0 -100
  149. package/src/View/Wizard/WizardLegend.d.ts +0 -12
  150. package/src/View/Wizard/WizardLegend.js +0 -28
@@ -46,7 +46,7 @@ class AdaptableUpgradeHelper {
46
46
  }
47
47
  getCurrentMajorVersion(version) {
48
48
  // is good enough for now, we just need to make sure we don't forget to update it
49
- return parseInt(version.split('.')[0]) || 20;
49
+ return parseInt(version.split('.')[0]) || 22;
50
50
  }
51
51
  getConsoleLogger() {
52
52
  return {
@@ -2,5 +2,20 @@ import { VersionUpgrade } from './VersionUpgrade';
2
2
  import { AdaptableState } from '../AdaptableState/AdaptableState';
3
3
  export declare class VersionUpgrade22 extends VersionUpgrade {
4
4
  migrateState(state: AdaptableState): AdaptableState;
5
+ private migrateNamedObjectState;
5
6
  private migrateFormatColumnState;
7
+ private patchCustomSortName;
8
+ private patchFlashingCellName;
9
+ private patchFormatColumnName;
10
+ private patchPlusMinusNudgeName;
11
+ private patchShortcutName;
12
+ private patchAlertName;
13
+ private patchScheduleName;
14
+ private scopeToString;
15
+ private hashStrings;
16
+ /**
17
+ * Stringifies an object after removing metadata properties (Uuid, Source, AdaptableVersion)
18
+ * to ensure deterministic hashing regardless of generated values.
19
+ */
20
+ private stringifyWithoutMetadata;
6
21
  }
@@ -2,11 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VersionUpgrade22 = void 0;
4
4
  const VersionUpgrade_1 = require("./VersionUpgrade");
5
+ const AdaptableHelper_1 = require("../Utilities/Helpers/AdaptableHelper");
5
6
  class VersionUpgrade22 extends VersionUpgrade_1.VersionUpgrade {
6
7
  migrateState(state) {
7
8
  this.migrateFormatColumnState(state);
9
+ this.migrateNamedObjectState(state);
8
10
  return state;
9
11
  }
12
+ migrateNamedObjectState(state) {
13
+ this.patchCustomSortName(state.CustomSort);
14
+ this.patchFlashingCellName(state.FlashingCell);
15
+ this.patchFormatColumnName(state.FormatColumn);
16
+ this.patchPlusMinusNudgeName(state.PlusMinus);
17
+ this.patchShortcutName(state.Shortcut);
18
+ this.patchAlertName(state.Alert);
19
+ this.patchScheduleName(state.Schedule);
20
+ }
10
21
  // We have moved CellAlignment (renamed Alignment) from independent property into Style
11
22
  migrateFormatColumnState(state) {
12
23
  const formatColumnState = state.FormatColumn;
@@ -27,5 +38,154 @@ class VersionUpgrade22 extends VersionUpgrade_1.VersionUpgrade {
27
38
  }
28
39
  return state;
29
40
  }
41
+ patchCustomSortName(customSortState) {
42
+ if (!customSortState) {
43
+ return;
44
+ }
45
+ customSortState.CustomSorts?.forEach((customSort) => {
46
+ if (!customSort.Name) {
47
+ const sortedValues = (customSort.SortedValues || []).join();
48
+ customSort.Name = `CustomSort-${customSort.ColumnId}-${this.hashStrings(['CustomSort', customSort.ColumnId, sortedValues])}`;
49
+ }
50
+ });
51
+ }
52
+ patchFlashingCellName(flashingCellState) {
53
+ if (!flashingCellState) {
54
+ return;
55
+ }
56
+ flashingCellState.FlashingCellDefinitions?.forEach((flashingCell) => {
57
+ if (!flashingCell.Name) {
58
+ const scopeStr = this.scopeToString(flashingCell.Scope);
59
+ const ruleStr = flashingCell.Rule?.BooleanExpression || '';
60
+ flashingCell.Name = `FlashingCell-${this.hashStrings(['FlashingCell', scopeStr, ruleStr])}`;
61
+ }
62
+ });
63
+ }
64
+ patchFormatColumnName(formatColumnState) {
65
+ if (!formatColumnState) {
66
+ return;
67
+ }
68
+ formatColumnState.FormatColumns?.forEach((formatColumn) => {
69
+ if (!formatColumn.Name) {
70
+ const scopeStr = this.scopeToString(formatColumn.Scope);
71
+ const styleStr = this.stringifyWithoutMetadata(formatColumn.Style);
72
+ formatColumn.Name = `FormatColumn-${this.hashStrings(['FormatColumn', scopeStr, styleStr])}`;
73
+ }
74
+ });
75
+ }
76
+ patchPlusMinusNudgeName(plusMinusState) {
77
+ if (!plusMinusState) {
78
+ return;
79
+ }
80
+ plusMinusState.PlusMinusNudges?.forEach((nudge) => {
81
+ if (!nudge.Name) {
82
+ const scopeStr = this.scopeToString(nudge.Scope);
83
+ const nudgeValue = String(nudge.NudgeValue ?? '');
84
+ nudge.Name = `PlusMinus-${this.hashStrings(['PlusMinus', scopeStr, nudgeValue])}`;
85
+ }
86
+ });
87
+ }
88
+ patchShortcutName(shortcutState) {
89
+ if (!shortcutState) {
90
+ return;
91
+ }
92
+ shortcutState.Shortcuts?.forEach((shortcut) => {
93
+ if (!shortcut.Name) {
94
+ const key = shortcut.ShortcutKey || '';
95
+ const operation = shortcut.ShortcutOperation || '';
96
+ const value = String(shortcut.ShortcutValue ?? '');
97
+ shortcut.Name = `Shortcut-${key}-${this.hashStrings(['Shortcut', key, operation, value])}`;
98
+ }
99
+ });
100
+ }
101
+ patchAlertName(alertState) {
102
+ if (!alertState) {
103
+ return;
104
+ }
105
+ alertState.AlertDefinitions?.forEach((alert) => {
106
+ if (!alert.Name) {
107
+ const scopeStr = this.scopeToString(alert.Scope);
108
+ const messageType = alert.MessageType || '';
109
+ const ruleStr = this.stringifyWithoutMetadata(alert.Rule);
110
+ alert.Name = `Alert-${messageType}-${this.hashStrings(['Alert', scopeStr, messageType, ruleStr])}`;
111
+ }
112
+ });
113
+ }
114
+ patchScheduleName(scheduleState) {
115
+ if (!scheduleState) {
116
+ return;
117
+ }
118
+ // Patch Reminder Schedules
119
+ scheduleState.Reminders?.forEach((reminder) => {
120
+ if (!reminder.Name) {
121
+ const header = reminder.Header || '';
122
+ const message = reminder.Message || '';
123
+ reminder.Name = `Reminder-${this.hashStrings(['Reminder', header, message])}`;
124
+ }
125
+ });
126
+ // Patch Report Schedules
127
+ scheduleState.ReportSchedules?.forEach((report) => {
128
+ if (!report.Name) {
129
+ const reportName = report.ReportName || '';
130
+ const format = report.ReportFormat || '';
131
+ report.Name = `ReportSchedule-${this.hashStrings(['ReportSchedule', reportName, format])}`;
132
+ }
133
+ });
134
+ // Patch IPushPull Schedules
135
+ scheduleState.IPushPullSchedules?.forEach((ipp) => {
136
+ if (!ipp.Name) {
137
+ const reportName = ipp.IPushPullReport?.ReportName || '';
138
+ const folder = ipp.IPushPullReport?.Folder || '';
139
+ const page = ipp.IPushPullReport?.Page || '';
140
+ ipp.Name = `IPushPullSchedule-${this.hashStrings(['IPushPullSchedule', reportName, folder, page])}`;
141
+ }
142
+ });
143
+ // Patch OpenFin Schedules
144
+ scheduleState.OpenFinSchedules?.forEach((openfin) => {
145
+ if (!openfin.Name) {
146
+ const reportName = openfin.OpenFinReport?.ReportName || '';
147
+ openfin.Name = `OpenFinSchedule-${this.hashStrings(['OpenFinSchedule', reportName])}`;
148
+ }
149
+ });
150
+ }
151
+ scopeToString(scope) {
152
+ if (!scope) {
153
+ return '';
154
+ }
155
+ if ('All' in scope && scope.All) {
156
+ return 'All';
157
+ }
158
+ if ('ColumnIds' in scope && scope.ColumnIds) {
159
+ return scope.ColumnIds.join(',');
160
+ }
161
+ if ('DataTypes' in scope && scope.DataTypes) {
162
+ return scope.DataTypes.join(',');
163
+ }
164
+ if ('ColumnTypes' in scope && scope.ColumnTypes) {
165
+ return scope.ColumnTypes.join(',');
166
+ }
167
+ return '';
168
+ }
169
+ hashStrings(strings) {
170
+ let hash = 0;
171
+ for (const str of strings) {
172
+ for (let i = 0; i < str.length; i++) {
173
+ hash = (hash * 31 + str.charCodeAt(i)) % 9000;
174
+ }
175
+ }
176
+ return hash + 1000;
177
+ }
178
+ /**
179
+ * Stringifies an object after removing metadata properties (Uuid, Source, AdaptableVersion)
180
+ * to ensure deterministic hashing regardless of generated values.
181
+ */
182
+ stringifyWithoutMetadata(obj) {
183
+ if (!obj) {
184
+ return '';
185
+ }
186
+ const cloned = structuredClone(obj);
187
+ (0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInlineDeep)(cloned);
188
+ return JSON.stringify(cloned);
189
+ }
30
190
  }
31
191
  exports.VersionUpgrade22 = VersionUpgrade22;
package/src/types.d.ts CHANGED
@@ -157,8 +157,7 @@ export type { SystemStatusMessageInfo } from './AdaptableState/Common/SystemStat
157
157
  export type { AlternativeModuleName } from './AdaptableState/Common/AlternativeModuleName';
158
158
  export type { AdaptableFormat, DateFormatterOptions, NumberFormatterOptions, StringFormatterOptions, } from './AdaptableState/Common/AdaptableFormat';
159
159
  export type { AdaptableMessageType } from './AdaptableState/Common/AdaptableMessageType';
160
- export type { AdaptableObject, AdaptableObjectTag, AdaptableObjectLookupCriteria, AdaptableVersion, } from './AdaptableState/Common/AdaptableObject';
161
- export type { SuspendableObject } from './AdaptableState/Common/SuspendableObject';
160
+ export type { Identifiable, AdaptableObject, AdaptableObjectTag, AdaptableObjectLookupCriteria, AdaptableVersion, SuspendableObject, NamedObject, } from './AdaptableState/Common/AdaptableObject';
162
161
  export type { AdaptableQuery, AdaptableAggregatedBooleanQuery, AdaptableAggregatedScalarQuery, AdaptableBooleanQuery, AdaptableObservableQuery, AdaptableScalarQuery, } from './AdaptableState/Common/AdaptableQuery';
163
162
  export type { AdaptablePredicate, AdaptableColumnPredicate, AdaptablePredicateDef, PredicateModuleScope, PredicateDefHandlerContext, PredicateDefInput, PredicateDefToStringParams, ColumnFilterDef, } from './AdaptableState/Common/AdaptablePredicate';
164
163
  export type { ColumnScope } from './AdaptableState/Common/ColumnScope';