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

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 (99) hide show
  1. package/index.css +0 -3
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableState/AlertState.d.ts +1 -2
  5. package/src/AdaptableState/Common/AdaptableObject.d.ts +4 -0
  6. package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
  7. package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
  8. package/src/AdaptableState/Common/NamedObject.js +2 -0
  9. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  10. package/src/AdaptableState/Common/Schedule.d.ts +2 -2
  11. package/src/AdaptableState/Common/SuspendableObject.d.ts +10 -0
  12. package/src/AdaptableState/Common/SuspendableObject.js +2 -0
  13. package/src/AdaptableState/CustomSortState.d.ts +1 -1
  14. package/src/AdaptableState/FormatColumnState.d.ts +1 -1
  15. package/src/AdaptableState/LayoutState.d.ts +1 -1
  16. package/src/AdaptableState/PlusMinusState.d.ts +1 -1
  17. package/src/AdaptableState/ShortcutState.d.ts +1 -1
  18. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  19. package/src/Api/AlertApi.d.ts +6 -0
  20. package/src/Api/CustomSortApi.d.ts +6 -0
  21. package/src/Api/FlashingCellApi.d.ts +6 -0
  22. package/src/Api/FormatColumnApi.d.ts +10 -4
  23. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
  24. package/src/Api/Implementation/AlertApiImpl.js +3 -0
  25. package/src/Api/Implementation/ChartingApiImpl.js +2 -2
  26. package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -0
  27. package/src/Api/Implementation/CustomSortApiImpl.js +3 -0
  28. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
  29. package/src/Api/Implementation/FlashingCellApiImpl.js +3 -0
  30. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
  31. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -5
  32. package/src/Api/Implementation/LayoutApiImpl.js +1 -1
  33. package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
  34. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
  35. package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
  36. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
  37. package/src/Api/Implementation/ScheduleApiImpl.js +3 -0
  38. package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
  39. package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
  40. package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
  41. package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
  42. package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
  43. package/src/Api/Internal/LayoutInternalApi.js +1 -1
  44. package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
  45. package/src/Api/PlusMinusApi.d.ts +6 -0
  46. package/src/Api/ScheduleApi.d.ts +6 -0
  47. package/src/Api/ShortcutApi.d.ts +6 -0
  48. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
  49. package/src/Redux/ActionsReducers/FormatColumnRedux.js +17 -1
  50. package/src/Redux/Store/AdaptableStore.js +18 -16
  51. package/src/Strategy/BulkUpdateModule.js +8 -8
  52. package/src/Strategy/PlusMinusModule.js +1 -1
  53. package/src/Strategy/QuickSearchModule.js +1 -1
  54. package/src/Strategy/SettingsPanelModule.js +11 -7
  55. package/src/Strategy/SmartEditModule.js +10 -10
  56. package/src/Utilities/Services/DataService.js +1 -1
  57. package/src/Utilities/Services/Fdc3Service.js +4 -4
  58. package/src/Utilities/Services/ModuleService.js +1 -3
  59. package/src/Utilities/Services/ThemeService.js +2 -6
  60. package/src/Utilities/Services/ValidationService.js +1 -1
  61. package/src/Utilities/logDeprecation.js +3 -4
  62. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  63. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
  64. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
  65. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  66. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
  67. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
  68. package/src/View/Components/CellPopup/index.js +1 -1
  69. package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
  70. package/src/View/Components/NewScopeComponent.js +3 -3
  71. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
  72. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
  73. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
  74. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  75. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  76. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
  77. package/src/View/Layout/LayoutViewPanel.js +1 -1
  78. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  79. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  80. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  81. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
  82. package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
  83. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
  84. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -5
  85. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
  86. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +11 -11
  87. package/src/View/StateManagement/handleExportState.js +1 -1
  88. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  89. package/src/agGrid/AdaptableAgGrid.js +38 -51
  90. package/src/agGrid/AgGridAdapter.js +8 -8
  91. package/src/agGrid/AgGridColumnAdapter.js +1 -1
  92. package/src/agGrid/AgGridExportAdapter.js +5 -5
  93. package/src/agGrid/AgGridThemeAdapter.js +2 -2
  94. package/src/components/OverlayTrigger/index.js +1 -1
  95. package/src/env.js +2 -2
  96. package/src/migration/AdaptableUpgradeHelper.js +2 -2
  97. package/src/migration/VersionUpgrade17.js +4 -4
  98. package/src/migration/VersionUpgrade20.js +4 -4
  99. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -126,8 +126,8 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
126
126
  else {
127
127
  const alert = {
128
128
  alertType: 'generic',
129
- header: 'Save chart',
130
- message: 'Do you want to save this Chart?',
129
+ header: 'Save Chart',
130
+ message: 'Would you like to save this chart?',
131
131
  alertDefinition: {
132
132
  ...ObjectFactory_1.default.CreateEmptyAlertDefinition(),
133
133
  MessageType: 'Info',
@@ -11,6 +11,7 @@ export declare class CustomSortApiImpl extends ApiBase implements CustomSortApi
11
11
  getCustomSortState(): CustomSortState;
12
12
  getCustomSorts(config?: LayoutExtendedConfig): CustomSort[];
13
13
  getCustomSortById(id: CustomSort['Uuid'], config?: LayoutExtendedConfig): CustomSort;
14
+ getCustomSortByName(name: string): CustomSort | undefined;
14
15
  getLiveCustomSorts(): CustomSort[];
15
16
  getLiveCustomSortComparers(): ColumnValuesComparer[];
16
17
  getActiveCustomSorts(config?: LayoutExtendedConfig): CustomSort[];
@@ -21,6 +21,9 @@ class CustomSortApiImpl extends ApiBase_1.ApiBase {
21
21
  getCustomSortById(id, config) {
22
22
  return this.getCustomSorts(config).find((customSort) => customSort.Uuid === id);
23
23
  }
24
+ getCustomSortByName(name) {
25
+ return this.getCustomSorts().find((customSort) => customSort.Name === name);
26
+ }
24
27
  getLiveCustomSorts() {
25
28
  let returnVals = [];
26
29
  const sortedColIds = this.getGridApi()
@@ -13,6 +13,7 @@ export declare class FlashingCellApiImpl extends ApiBase implements FlashingCell
13
13
  getFlashingCellState(): FlashingCellState;
14
14
  getFlashingCellDefinitions(config?: LayoutExtendedConfig): FlashingCellDefinition[];
15
15
  getFlashingCellDefinitionById(id: FlashingCellDefinition['Uuid'], config?: LayoutExtendedConfig): FlashingCellDefinition;
16
+ getFlashingCellDefinitionByName(name: string): FlashingCellDefinition | undefined;
16
17
  getActiveFlashingCellDefinitions(config?: LayoutExtendedConfig): FlashingCellDefinition[];
17
18
  getSuspendedFlashingCellDefinitions(config?: LayoutExtendedConfig): FlashingCellDefinition[];
18
19
  getFlashingCellFlashTarget(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition['FlashTarget'];
@@ -23,6 +23,9 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
23
23
  getFlashingCellDefinitionById(id, config) {
24
24
  return this.getFlashingCellDefinitions(config)?.find((fc) => fc?.Uuid === id);
25
25
  }
26
+ getFlashingCellDefinitionByName(name) {
27
+ return this.getFlashingCellDefinitions().find((fc) => fc.Name === name);
28
+ }
26
29
  getActiveFlashingCellDefinitions(config) {
27
30
  return this.getFlashingCellDefinitions(config).filter((fc) => !fc.IsSuspended);
28
31
  }
@@ -1,18 +1,19 @@
1
+ import { AdaptableObjectLookupCriteria, FormatColumnConfig } from '../../../types';
2
+ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
3
+ import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
1
4
  import { AdaptableStyle } from '../../AdaptableState/Common/AdaptableStyle';
2
- import { ApiBase } from './ApiBase';
3
- import { FormatColumnApi } from '../FormatColumnApi';
4
5
  import { FormatColumn, FormatColumnState } from '../../AdaptableState/FormatColumnState';
5
- import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
6
6
  import { AdaptableFormat } from '../../types';
7
- import { AdaptableObjectLookupCriteria, FormatColumnConfig } from '../../../types';
7
+ import { FormatColumnApi } from '../FormatColumnApi';
8
8
  import { FormatColumnInternalApi } from '../Internal/FormatColumnInternalApi';
9
- import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
9
+ import { ApiBase } from './ApiBase';
10
10
  export declare class FormatColumnApiImpl extends ApiBase implements FormatColumnApi {
11
11
  internalApi: FormatColumnInternalApi;
12
12
  constructor(_adaptable: IAdaptable);
13
13
  getFormatColumnState(): FormatColumnState;
14
14
  getFormatColumns(config?: FormatColumnConfig): FormatColumn[];
15
15
  getFormatColumnByUuId(id: FormatColumn['Uuid'], config?: FormatColumnConfig): FormatColumn;
16
+ getFormatColumnByName(name: string): FormatColumn | undefined;
16
17
  getActiveFormatColumns(config?: FormatColumnConfig): FormatColumn[];
17
18
  getDisplayFormatForColumn(column: AdaptableColumn, config?: FormatColumnConfig): AdaptableFormat | undefined;
18
19
  getSuspendedFormatColumns(config?: FormatColumnConfig): FormatColumn[];
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FormatColumnApiImpl = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const FormatColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FormatColumnRedux"));
6
- const ApiBase_1 = require("./ApiBase");
7
6
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
- const FormatColumnInternalApi_1 = require("../Internal/FormatColumnInternalApi");
9
7
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
8
+ const FormatColumnInternalApi_1 = require("../Internal/FormatColumnInternalApi");
9
+ const ApiBase_1 = require("./ApiBase");
10
10
  class FormatColumnApiImpl extends ApiBase_1.ApiBase {
11
11
  internalApi;
12
12
  constructor(_adaptable) {
@@ -22,6 +22,9 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
22
22
  getFormatColumnByUuId(id, config) {
23
23
  return this.getFormatColumns(config).find((formatColumn) => formatColumn.Uuid === id);
24
24
  }
25
+ getFormatColumnByName(name) {
26
+ return this.getFormatColumns().find((formatColumn) => formatColumn.Name === name);
27
+ }
25
28
  getActiveFormatColumns(config) {
26
29
  return this.getFormatColumns(config).filter((formatColumn) => !formatColumn.IsSuspended);
27
30
  }
@@ -42,9 +45,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
42
45
  return this.getFormatColumnByUuId(formatColumn.Uuid);
43
46
  }
44
47
  addFormatColumns(formatColumns) {
45
- formatColumns.forEach((fc) => {
46
- this.addFormatColumn(fc);
47
- });
48
+ this.dispatchAction(FormatColumnRedux.FormatColumnsAdd(formatColumns));
48
49
  return formatColumns?.map((formatColumn) => this.getFormatColumnByUuId(formatColumn.Uuid));
49
50
  }
50
51
  editFormatColumn(formatColumn) {
@@ -407,7 +407,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
407
407
  const currentLayout = this.getCurrentLayout();
408
408
  const customHeader = currentLayout.ColumnHeaders?.[column.columnId] ?? column.friendlyName;
409
409
  this.dispatchAction((0, PopupRedux_1.PopupShowPrompt)({
410
- Header: `Change caption for '${column.friendlyName}'`,
410
+ Header: `Change Caption for "${column.friendlyName}"`,
411
411
  Msg: '',
412
412
  DefaultValue: customHeader,
413
413
  ConfirmActionCreator: (inputText) => {
@@ -30,14 +30,14 @@ class NamedQueryApiImpl extends ApiBase_1.ApiBase {
30
30
  }
31
31
  isValidNamedQuery(namedQuery) {
32
32
  if ((0, StringExtensions_1.IsNullOrEmptyOrWhiteSpace)(namedQuery?.Name)) {
33
- return { valid: false, message: 'Named Query name cannot be blank' };
33
+ return { valid: false, message: 'A name is required for the Named Query.' };
34
34
  }
35
35
  // check that there is no other existing named query with the same name
36
36
  const duplicate = this.getNamedQueries().find((q) => q.Name === namedQuery.Name && q.Uuid !== namedQuery.Uuid);
37
37
  if (duplicate) {
38
38
  return {
39
39
  valid: false,
40
- message: 'A Named Query already exists with that name',
40
+ message: 'A Named Query with this name already exists.',
41
41
  };
42
42
  }
43
43
  return { valid: true, message: '' };
@@ -7,6 +7,7 @@ export declare class PlusMinusApiImpl extends ApiBase implements PlusMinusApi {
7
7
  getPlusMinusState(): PlusMinusState;
8
8
  getAllPlusMinus(config?: LayoutExtendedConfig): PlusMinusNudge[];
9
9
  getPlusMinusById(id: PlusMinusNudge['Uuid'], config?: LayoutExtendedConfig): PlusMinusNudge;
10
+ getPlusMinusNudgeByName(name: string): PlusMinusNudge | undefined;
10
11
  getAllActivePlusMinus(config?: LayoutExtendedConfig): PlusMinusNudge[];
11
12
  getAllSuspendedPlusMinus(config?: LayoutExtendedConfig): PlusMinusNudge[];
12
13
  runPlusMinusNudge(plusMinusNudge: PlusMinusNudge, cellsToUpdate: GridCell[], direction: 'up' | 'down'): void;
@@ -16,6 +16,9 @@ class PlusMinusApiImpl extends ApiBase_1.ApiBase {
16
16
  getPlusMinusById(id, config) {
17
17
  return this.getAllPlusMinus(config).find((plusMinus) => plusMinus?.Uuid === id);
18
18
  }
19
+ getPlusMinusNudgeByName(name) {
20
+ return this.getAllPlusMinus().find((plusMinus) => plusMinus.Name === name);
21
+ }
19
22
  getAllActivePlusMinus(config) {
20
23
  return this.getAllPlusMinus(config).filter((plusMinusNudge) => !plusMinusNudge.IsSuspended);
21
24
  }
@@ -11,6 +11,7 @@ export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
11
11
  constructor(_adaptable: IAdaptable);
12
12
  getScheduleState(): ScheduleState;
13
13
  getSchedules(config?: LayoutExtendedConfig): BaseSchedule[];
14
+ getScheduleByName(name: string): BaseSchedule | undefined;
14
15
  getReminderSchedules(config?: LayoutExtendedConfig): ReminderSchedule[];
15
16
  getScheduleById(id: BaseSchedule['Uuid'], config?: LayoutExtendedConfig): BaseSchedule;
16
17
  getActiveReminderSchedules(config?: LayoutExtendedConfig): ReminderSchedule[];
@@ -20,6 +20,9 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
20
20
  allSchedules.push(...this.getOpenFinSchedules(config));
21
21
  return allSchedules;
22
22
  }
23
+ getScheduleByName(name) {
24
+ return this.getSchedules().find((schedule) => schedule.Name === name);
25
+ }
23
26
  getReminderSchedules(config) {
24
27
  return (this.handleLayoutExtensionObjects(this.getScheduleState().Reminders, 'Schedule', config) ?? []);
25
28
  }
@@ -6,6 +6,7 @@ export declare class ShortcutApiImpl extends ApiBase implements ShortcutApi {
6
6
  getShortcutState(): ShortcutState;
7
7
  getShortcuts(config?: LayoutExtendedConfig): Shortcut[];
8
8
  getShortcutById(id: Shortcut['Uuid'], config?: LayoutExtendedConfig): Shortcut;
9
+ getShortcutByName(name: string): Shortcut | undefined;
9
10
  getActiveShortcuts(config?: LayoutExtendedConfig): Shortcut[];
10
11
  getSuspendedShortcuts(config?: LayoutExtendedConfig): Shortcut[];
11
12
  addShortcut(shortcut: Shortcut): Shortcut;
@@ -15,6 +15,9 @@ class ShortcutApiImpl extends ApiBase_1.ApiBase {
15
15
  getShortcutById(id, config) {
16
16
  return this.getShortcuts(config).find((shortcut) => shortcut?.Uuid === id);
17
17
  }
18
+ getShortcutByName(name) {
19
+ return this.getShortcuts().find((shortcut) => shortcut.Name === name);
20
+ }
18
21
  getActiveShortcuts(config) {
19
22
  return this.getShortcuts(config).filter((shortcut) => !shortcut.IsSuspended);
20
23
  }
@@ -31,16 +31,16 @@ class SystemStatusApiImpl extends ApiBase_1.ApiBase {
31
31
  }
32
32
  switch (messageType) {
33
33
  case 'Success':
34
- alertApi.showAlertSuccess('System Status Success', fullMessage);
34
+ alertApi.showAlertSuccess('System Status', fullMessage);
35
35
  return;
36
36
  case 'Info':
37
- alertApi.showAlertInfo('System Status Info', fullMessage);
37
+ alertApi.showAlertInfo('System Status', fullMessage);
38
38
  return;
39
39
  case 'Warning':
40
- alertApi.showAlertWarning('System Status Warning', fullMessage);
40
+ alertApi.showAlertWarning('System Status', fullMessage);
41
41
  return;
42
42
  case 'Error':
43
- alertApi.showAlertError('System Status Error', fullMessage);
43
+ alertApi.showAlertError('System Status', fullMessage);
44
44
  return;
45
45
  }
46
46
  }
@@ -154,8 +154,8 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
154
154
  if (calculatedColumnReferences.length) {
155
155
  const alert = {
156
156
  alertType: 'generic',
157
- header: 'CalculatedColumn could not be deleted',
158
- message: `It is still referenced in the following modules: ${calculatedColumnReferences.join(', ')}`,
157
+ header: 'Calculated Column',
158
+ message: `This Calculated Column cannot be deleted. It is still referenced by: ${calculatedColumnReferences.join(', ')}.`,
159
159
  alertDefinition: (0, ObjectFactory_1.CreateInternalAlertDefinitionForMessages)('Error'),
160
160
  };
161
161
  this.getAlertApi().displayAdaptableAlertNotification(alert);
@@ -99,8 +99,8 @@ class FreeTextColumnInternalApi extends ApiBase_1.ApiBase {
99
99
  if (freeTextColumnReferences.length) {
100
100
  const alert = {
101
101
  alertType: 'generic',
102
- header: 'FreeTextColumn could not be deleted',
103
- message: `It is still referenced in the following modules: ${freeTextColumnReferences.join(', ')}`,
102
+ header: 'Free Text Column',
103
+ message: `This Free Text Column cannot be deleted. It is still referenced by: ${freeTextColumnReferences.join(', ')}.`,
104
104
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
105
105
  };
106
106
  this.getAlertApi().displayAdaptableAlertNotification(alert);
@@ -96,7 +96,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
96
96
  }
97
97
  setupRowSummaries() {
98
98
  if (!this._adaptable.agGridModulesAdapter.isAgGridModuleRegistered('PinnedRowModule')) {
99
- this.getAdaptableApi().consoleError(`Can NOT set Layout Row Summaries - missing required AG Grid module 'PinnedRowModule'`);
99
+ this.getAdaptableApi().consoleError('Layout Row Summaries require the AG Grid "PinnedRowModule". Please register this module.');
100
100
  return;
101
101
  }
102
102
  const rowSummaries = this.getAdaptableState().Internal?.RowSummary?.rowSummaries ?? [];
@@ -44,8 +44,8 @@ class NamedQueryInternalApi extends ApiBase_1.ApiBase {
44
44
  if (namedQueryReferences.length) {
45
45
  const alert = {
46
46
  alertType: 'generic',
47
- header: 'Named Query could not be deleted',
48
- message: `It is still referenced in the following modules: ${namedQueryReferences.join(', ')}`,
47
+ header: 'Named Query',
48
+ message: `This Named Query cannot be deleted. It is still referenced by: ${namedQueryReferences.join(', ')}.`,
49
49
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
50
50
  };
51
51
  this.getAlertApi().displayAdaptableAlertNotification(alert);
@@ -60,8 +60,8 @@ class NamedQueryInternalApi extends ApiBase_1.ApiBase {
60
60
  if (namedQueryReferences.length) {
61
61
  const alert = {
62
62
  alertType: 'generic',
63
- header: 'Named Query could not be renamed',
64
- message: `It is currently referenced in the following modules: ${namedQueryReferences.join(', ')}`,
63
+ header: 'Named Query',
64
+ message: `This Named Query cannot be renamed. It is currently referenced by: ${namedQueryReferences.join(', ')}.`,
65
65
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
66
66
  };
67
67
  this.getAlertApi().displayAdaptableAlertNotification(alert);
@@ -20,6 +20,12 @@ export interface PlusMinusApi {
20
20
  * @returns plus minus rule
21
21
  */
22
22
  getPlusMinusById(id: PlusMinusNudge['Uuid'], config?: LayoutExtendedConfig): PlusMinusNudge;
23
+ /**
24
+ * Retrieves a Plus Minus Nudge by its Name
25
+ * @param name Name of the Plus Minus Nudge
26
+ * @returns Plus Minus Nudge or undefined if not found
27
+ */
28
+ getPlusMinusNudgeByName(name: string): PlusMinusNudge | undefined;
23
29
  /**
24
30
  * Retrieves all active (not-suspended) Plus Minus Rules in Adaptable State with those with expressions first
25
31
  * @returns plus minus rules
@@ -23,6 +23,12 @@ export interface ScheduleApi {
23
23
  * @returns schedule
24
24
  */
25
25
  getScheduleById(id: BaseSchedule['Uuid'], config?: LayoutExtendedConfig): BaseSchedule;
26
+ /**
27
+ * Retrieves a Schedule by its Name
28
+ * @param name Name of the Schedule
29
+ * @returns Schedule or undefined if not found
30
+ */
31
+ getScheduleByName(name: string): BaseSchedule | undefined;
26
32
  /**
27
33
  * Retrieves all Reminder-based Schedules from Schedule State
28
34
  * @returns reminder schedules
@@ -19,6 +19,12 @@ export interface ShortcutApi {
19
19
  * @returns shortcut
20
20
  */
21
21
  getShortcutById(id: Shortcut['Uuid'], config?: LayoutExtendedConfig): Shortcut;
22
+ /**
23
+ * Retrieves a Shortcut by its Name
24
+ * @param name Name of the Shortcut
25
+ * @returns Shortcut or undefined if not found
26
+ */
27
+ getShortcutByName(name: string): Shortcut | undefined;
22
28
  /**
23
29
  * Gets all active (not-suspended) Shortcuts in Adaptable State
24
30
  * @returns shortcuts
@@ -1,5 +1,9 @@
1
1
  import { FormatColumnState, FormatColumn } from '../../AdaptableState/FormatColumnState';
2
2
  import * as Redux from 'redux';
3
+ /**
4
+ * @ReduxAction Many Format Columns have been added
5
+ */
6
+ export declare const FORMAT_COLUMN_ADD_BATCH = "FORMAT_COLUMN_ADD_BATCH";
3
7
  /**
4
8
  * @ReduxAction A Format Column has been added
5
9
  */
@@ -44,6 +48,9 @@ export declare const FORMAT_COLUMN_UNSUSPEND = "FORMAT_COLUMN_UNSUSPEND";
44
48
  * @ReduxAction FormatColumn Module is unsuspended, or activated
45
49
  */
46
50
  export declare const FORMAT_COLUMN_UNSUSPEND_ALL = "FORMAT_COLUMN_UNSUSPEND_ALL";
51
+ export interface FormatColumnAddBatchAction extends Redux.Action {
52
+ formatColumns: FormatColumn[];
53
+ }
47
54
  export interface FormatColumnAction extends Redux.Action {
48
55
  formatColumn: FormatColumn;
49
56
  }
@@ -70,6 +77,7 @@ export interface FormatColumnUnSuspendAllAction extends Redux.Action {
70
77
  export interface FormatColumnReadyAction extends Redux.Action {
71
78
  formatColumnState: FormatColumnState;
72
79
  }
80
+ export declare const FormatColumnsAdd: (formatColumns: FormatColumn[]) => FormatColumnAddBatchAction;
73
81
  export declare const FormatColumnAdd: (formatColumn: FormatColumn) => FormatColumnAddAction;
74
82
  export declare const FormatColumnEdit: (formatColumn: FormatColumn) => FormatColumnEditAction;
75
83
  export declare const FormatColumnDelete: (formatColumn: FormatColumn) => FormatColumnDeleteAction;
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormatColumnReducer = exports.FormatColumnReady = exports.FormatColumnUnSuspendAll = exports.FormatColumnSuspendAll = exports.FormatColumnUnSuspend = exports.FormatColumnSuspend = exports.FormatColumnMoveDown = exports.FormatColumnMoveUp = exports.FormatColumnDeleteAll = exports.FormatColumnDelete = exports.FormatColumnEdit = exports.FormatColumnAdd = exports.FORMAT_COLUMN_UNSUSPEND_ALL = exports.FORMAT_COLUMN_UNSUSPEND = exports.FORMAT_COLUMN_SUSPEND_ALL = exports.FORMAT_COLUMN_SUSPEND = exports.FORMAT_COLUMN_READY = exports.FORMAT_COLUMN_DELETE_ALL = exports.FORMAT_COLUMN_DELETE = exports.FORMAT_COLUMN_EDIT = exports.FORMAT_COLUMN_MOVE_DOWN = exports.FORMAT_COLUMN_MOVE_UP = exports.FORMAT_COLUMN_ADD = void 0;
3
+ exports.FormatColumnReducer = exports.FormatColumnReady = exports.FormatColumnUnSuspendAll = exports.FormatColumnSuspendAll = exports.FormatColumnUnSuspend = exports.FormatColumnSuspend = exports.FormatColumnMoveDown = exports.FormatColumnMoveUp = exports.FormatColumnDeleteAll = exports.FormatColumnDelete = exports.FormatColumnEdit = exports.FormatColumnAdd = exports.FormatColumnsAdd = exports.FORMAT_COLUMN_UNSUSPEND_ALL = exports.FORMAT_COLUMN_UNSUSPEND = exports.FORMAT_COLUMN_SUSPEND_ALL = exports.FORMAT_COLUMN_SUSPEND = exports.FORMAT_COLUMN_READY = exports.FORMAT_COLUMN_DELETE_ALL = exports.FORMAT_COLUMN_DELETE = exports.FORMAT_COLUMN_EDIT = exports.FORMAT_COLUMN_MOVE_DOWN = exports.FORMAT_COLUMN_MOVE_UP = exports.FORMAT_COLUMN_ADD = exports.FORMAT_COLUMN_ADD_BATCH = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
6
6
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
7
7
  const utils_1 = require("./utils");
8
+ /**
9
+ * @ReduxAction Many Format Columns have been added
10
+ */
11
+ exports.FORMAT_COLUMN_ADD_BATCH = 'FORMAT_COLUMN_ADD_BATCH';
8
12
  /**
9
13
  * @ReduxAction A Format Column has been added
10
14
  */
@@ -49,6 +53,11 @@ exports.FORMAT_COLUMN_UNSUSPEND = 'FORMAT_COLUMN_UNSUSPEND';
49
53
  * @ReduxAction FormatColumn Module is unsuspended, or activated
50
54
  */
51
55
  exports.FORMAT_COLUMN_UNSUSPEND_ALL = 'FORMAT_COLUMN_UNSUSPEND_ALL';
56
+ const FormatColumnsAdd = (formatColumns) => ({
57
+ type: exports.FORMAT_COLUMN_ADD_BATCH,
58
+ formatColumns,
59
+ });
60
+ exports.FormatColumnsAdd = FormatColumnsAdd;
52
61
  const FormatColumnAdd = (formatColumn) => ({
53
62
  type: exports.FORMAT_COLUMN_ADD,
54
63
  formatColumn,
@@ -107,6 +116,13 @@ const initialState = {
107
116
  const FormatColumnReducer = (state = initialState, action) => {
108
117
  let formatColumns;
109
118
  switch (action.type) {
119
+ case exports.FORMAT_COLUMN_ADD_BATCH: {
120
+ const actionFormatColumns = action.formatColumns;
121
+ actionFormatColumns.forEach(AdaptableHelper_1.default.addAdaptableObjectPrimitives);
122
+ formatColumns = [].concat(state.FormatColumns);
123
+ formatColumns.push(...actionFormatColumns);
124
+ return { ...state, FormatColumns: formatColumns };
125
+ }
110
126
  case exports.FORMAT_COLUMN_ADD: {
111
127
  const actionFormatColumn = action.formatColumn;
112
128
  AdaptableHelper_1.default.addAdaptableObjectPrimitives(actionFormatColumn);
@@ -260,7 +260,7 @@ class AdaptableStore {
260
260
  // END STATE LOAD
261
261
  this.loadStorageInProgress = false;
262
262
  }, (e) => {
263
- adaptable.api.consoleError('Failed to load previous Adaptable State : ', e);
263
+ adaptable.api.consoleError('Failed to load saved Adaptable state.', e);
264
264
  //for now i'm still initializing Adaptable even if loading state has failed....
265
265
  //we may revisit that later
266
266
  this.TheStore.dispatch((0, exports.InitState)());
@@ -269,7 +269,7 @@ class AdaptableStore {
269
269
  this.TheStore.dispatch(PopupRedux.PopupShowAlert({
270
270
  alertType: 'generic',
271
271
  header: 'Configuration',
272
- message: 'Error loading your configuration:' + e,
272
+ message: 'Failed to load your configuration: ' + e,
273
273
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
274
274
  }));
275
275
  }));
@@ -588,6 +588,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
588
588
  * Action: We set up all columns again
589
589
  */
590
590
  case QuickSearchRedux.QUICK_SEARCH_SET_CELL_MATCHING_STYLE:
591
+ case FormatColumnRedux.FORMAT_COLUMN_ADD_BATCH:
591
592
  case FormatColumnRedux.FORMAT_COLUMN_ADD:
592
593
  case FormatColumnRedux.FORMAT_COLUMN_EDIT:
593
594
  case FormatColumnRedux.FORMAT_COLUMN_DELETE:
@@ -1320,7 +1321,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1320
1321
  const alert = {
1321
1322
  alertType: 'generic',
1322
1323
  header: 'Team Sharing',
1323
- message: "Couldn't get shared items: " + error.message,
1324
+ message: 'Failed to retrieve shared items: ' + error.message,
1324
1325
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1325
1326
  };
1326
1327
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1390,7 +1391,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1390
1391
  const alert = {
1391
1392
  alertType: 'generic',
1392
1393
  header: 'Team Sharing',
1393
- message: `Couldn't share ${adaptable.ModuleService.getModuleFriendlyName(Module)}, there is already an existing active share for it: ${existingActiveSharedEntity.Description}`,
1394
+ message: `Cannot share ${adaptable.ModuleService.getModuleFriendlyName(Module)} an active share already exists: ${existingActiveSharedEntity.Description}.`,
1394
1395
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1395
1396
  };
1396
1397
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1414,7 +1415,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1414
1415
  const alert = {
1415
1416
  alertType: 'generic',
1416
1417
  header: 'Team Sharing',
1417
- message: `${adaptable.ModuleService.getModuleFriendlyName(Module)} Shared Successfully`,
1418
+ message: `${adaptable.ModuleService.getModuleFriendlyName(Module)} shared successfully.`,
1418
1419
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Success'),
1419
1420
  };
1420
1421
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1425,7 +1426,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1425
1426
  const alert = {
1426
1427
  alertType: 'generic',
1427
1428
  header: 'Team Sharing',
1428
- message: "Couldn't share item: " + error.message,
1429
+ message: 'Failed to share item: ' + error.message,
1429
1430
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1430
1431
  };
1431
1432
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1450,10 +1451,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1450
1451
  if (sharedEntityDependants.length) {
1451
1452
  const alert = {
1452
1453
  alertType: 'generic',
1453
- header: `Cannot remove the shared item as it is referenced in:`,
1454
- message: sharedEntityDependants
1455
- .map((sharedEntity) => `${adaptable.ModuleService.getModuleFriendlyName(sharedEntity.Module)} ${sharedEntity.Description}`)
1456
- .join('\n'),
1454
+ header: 'Team Sharing',
1455
+ message: 'Cannot remove this shared item. It is referenced by: ' +
1456
+ sharedEntityDependants
1457
+ .map((sharedEntity) => `${adaptable.ModuleService.getModuleFriendlyName(sharedEntity.Module)} ${sharedEntity.Description}`)
1458
+ .join(', '),
1457
1459
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Warning'),
1458
1460
  };
1459
1461
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1470,7 +1472,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1470
1472
  const alert = {
1471
1473
  alertType: 'generic',
1472
1474
  header: 'Team Sharing',
1473
- message: "Couldn't remove item: " + error.message,
1475
+ message: 'Failed to remove shared item: ' + error.message,
1474
1476
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1475
1477
  };
1476
1478
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1492,8 +1494,8 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1492
1494
  !adaptable.api.optionsApi.getTeamSharingOptions().suppressOverrideConfigWarning) {
1493
1495
  let confirmation = {
1494
1496
  CancelButtonText: 'Cancel Import',
1495
- Header: 'Overwriting Existing Object',
1496
- Msg: 'This import will overwrite an existing object in your State. Do you wish to continue?',
1497
+ Header: 'Overwrite Existing Item',
1498
+ Msg: 'This import will overwrite an existing item in your configuration. Do you wish to continue?',
1497
1499
  ConfirmButtonText: 'Import',
1498
1500
  CancelAction: null,
1499
1501
  ConfirmAction: processImportAction,
@@ -1539,7 +1541,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1539
1541
  const alert = {
1540
1542
  alertType: 'generic',
1541
1543
  header: 'Team Sharing',
1542
- message: `Item Successfully Imported`,
1544
+ message: 'Item imported successfully.',
1543
1545
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Success'),
1544
1546
  };
1545
1547
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1579,7 +1581,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1579
1581
  const alert = {
1580
1582
  alertType: 'generic',
1581
1583
  header: 'Team Sharing',
1582
- message: "Couldn't update active item: " + error.message,
1584
+ message: 'Failed to update shared item: ' + error.message,
1583
1585
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1584
1586
  };
1585
1587
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1600,7 +1602,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1600
1602
  const alert = {
1601
1603
  alertType: 'generic',
1602
1604
  header: 'Team Sharing',
1603
- message: "Couldn't check for updates: " + error.message,
1605
+ message: 'Failed to check for updates: ' + error.message,
1604
1606
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1605
1607
  };
1606
1608
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -43,8 +43,8 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
43
43
  IsValid: false,
44
44
  Alert: {
45
45
  alertType: 'generic',
46
- header: 'Bulk Update Error',
47
- message: 'Cannot edit while Grid is in Pivot Mode.',
46
+ header: 'Bulk Update',
47
+ message: 'Editing is not available in Pivot Mode.',
48
48
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
49
49
  },
50
50
  };
@@ -54,8 +54,8 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
54
54
  IsValid: false,
55
55
  Alert: {
56
56
  alertType: 'generic',
57
- header: 'Bulk Update Error',
58
- message: 'No cells are selected.\nPlease select some cells.',
57
+ header: 'Bulk Update',
58
+ message: 'No cells selected. Please select one or more cells to continue.',
59
59
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
60
60
  },
61
61
  };
@@ -65,8 +65,8 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
65
65
  IsValid: false,
66
66
  Alert: {
67
67
  alertType: 'generic',
68
- header: 'Bulk Update Error',
69
- message: 'Bulk Update only supports single column edit.\nPlease adjust cell selection.',
68
+ header: 'Bulk Update',
69
+ message: 'Bulk Update supports editing a single column at a time. Please adjust your selection.',
70
70
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
71
71
  },
72
72
  };
@@ -78,8 +78,8 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
78
78
  IsValid: false,
79
79
  Alert: {
80
80
  alertType: 'generic',
81
- header: 'Bulk Update Error',
82
- message: 'Bulk Update is not permitted on readonly cells.\nPlease adjust the cell selection.',
81
+ header: 'Bulk Update',
82
+ message: 'Bulk Update is not available for read-only cells. Please adjust your selection.',
83
83
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
84
84
  },
85
85
  };
@@ -190,7 +190,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
190
190
  failedMessages.push(failedMessage);
191
191
  }
192
192
  });
193
- this.api.alertApi.showAlertError('Nudge(s) failed rule', failedMessages.toString());
193
+ this.api.alertApi.showAlertError('Plus/Minus', 'One or more nudge values were rejected by validation rules: ' + failedMessages.toString());
194
194
  }
195
195
  }
196
196
  getTeamSharingAction() {
@@ -28,7 +28,7 @@ class QuickSearchModule extends AdaptableModuleBase_1.AdaptableModuleBase {
28
28
  // Check for AG Grid QuickFilterModule if running Filter After Quick Search
29
29
  if (api.optionsApi.getQuickSearchOptions().filterGridAfterQuickSearch) {
30
30
  if (!api.internalApi.getAgGridModulesAdapter().isAgGridModuleRegistered('QuickFilterModule')) {
31
- api.consoleError('The AG Grid "GridFilter" Module is required if running Quick Search as Filter; Quick Search will run but no Filters will be applied');
31
+ api.consoleError('Quick Search with filterGridAfterQuickSearch requires the AG Grid "QuickFilterModule". Quick Search will run but grid filters will not be applied.');
32
32
  }
33
33
  }
34
34
  const isServerSideRowModel = agGridApi.getGridOption('rowModelType') === 'serverSide';
@@ -11,15 +11,19 @@ class SettingsPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase {
11
11
  super(ModuleConstants.SettingsPanelModuleId, friendlyName, 'settings', null, 'Manage all Adaptable Settings', api);
12
12
  }
13
13
  createColumnMenuItems(column) {
14
- return [
15
- // To do : get the icon and name from settings in case they have changed?
16
- this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
17
- ];
14
+ if (this.isModuleVisible()) {
15
+ return [
16
+ // To do : get the icon and name from settings in case they have changed?
17
+ this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
18
+ ];
19
+ }
18
20
  }
19
21
  createContextMenuItems(menuContext) {
20
- return [
21
- this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
22
- ];
22
+ if (this.isModuleVisible()) {
23
+ return [
24
+ this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
25
+ ];
26
+ }
23
27
  }
24
28
  createModuleMenuItem(source) {
25
29
  if (this.isModuleVisible()) {