@adaptabletools/adaptable 12.0.0-canary.5 → 12.0.0-canary.6

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 (40) hide show
  1. package/bundle.cjs.js +24 -24
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableOptions/LayoutOptions.d.ts +7 -7
  6. package/src/Api/Events/ActionRowSubmitted.d.ts +24 -0
  7. package/src/Api/Implementation/AlertApiImpl.d.ts +2 -4
  8. package/src/Api/Implementation/AlertApiImpl.js +2 -3
  9. package/src/Api/Implementation/ApiBase.d.ts +12 -1
  10. package/src/Api/Implementation/ApiBase.js +7 -0
  11. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -4
  12. package/src/Api/Implementation/ConditionalStyleApiImpl.js +2 -3
  13. package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -4
  14. package/src/Api/Implementation/CustomSortApiImpl.js +2 -3
  15. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -4
  16. package/src/Api/Implementation/FlashingCellApiImpl.js +2 -3
  17. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -4
  18. package/src/Api/Implementation/FormatColumnApiImpl.js +2 -3
  19. package/src/Api/Implementation/InternalApiImpl.d.ts +1 -1
  20. package/src/Api/Implementation/InternalApiImpl.js +5 -4
  21. package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
  22. package/src/Api/Implementation/LayoutApiImpl.js +0 -6
  23. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -4
  24. package/src/Api/Implementation/PlusMinusApiImpl.js +2 -3
  25. package/src/Api/Implementation/ScheduleApiImpl.d.ts +6 -16
  26. package/src/Api/Implementation/ScheduleApiImpl.js +10 -16
  27. package/src/Api/Implementation/ShortcutApiImpl.d.ts +2 -4
  28. package/src/Api/Implementation/ShortcutApiImpl.js +2 -3
  29. package/src/Api/InternalApi.d.ts +1 -1
  30. package/src/Api/LayoutApi.d.ts +1 -6
  31. package/src/Redux/Store/AdaptableStore.js +3 -0
  32. package/src/Strategy/Interface/IModule.d.ts +2 -1
  33. package/src/Strategy/LayoutModule.d.ts +2 -1
  34. package/src/Strategy/LayoutModule.js +51 -1
  35. package/src/View/GridInfo/GridInfoPopup.js +3 -1
  36. package/src/metamodel/adaptable.metamodel.d.ts +81 -0
  37. package/src/metamodel/adaptable.metamodel.js +1 -1
  38. package/src/types.d.ts +2 -1
  39. package/version.d.ts +1 -1
  40. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "12.0.0-canary.5",
3
+ "version": "12.0.0-canary.6",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +1,2 @@
1
- declare const _default: 1655288118527;
1
+ declare const _default: 1655383572755;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1655288118527;
3
+ exports.default = 1655383572755;
@@ -67,23 +67,23 @@ export interface LayoutOptions {
67
67
  }
68
68
  export interface LayoutTagOptions {
69
69
  /**
70
- * Automatically generate an Object Tag for each Layout
70
+ * Automatically generate an AdaptableObjectTag for each Layout
71
71
  *
72
72
  * @defaultValue false
73
73
  */
74
74
  autoGenerateTagsForLayouts?: boolean | ((context: AutoGenerateTagsForLayoutsContext) => AdaptableObjectTag[]);
75
75
  /**
76
- * Checks if the provided Adaptable Object is available in the given Layout
76
+ * Automatically assumes that any `LayoutAssociatedObject` is available in the current Layout if it has a tag with the Layouts name (or no tags at all)
77
77
  *
78
- * @defaultValue undefined
78
+ * @defaultValue false
79
79
  */
80
- isObjectAvailableInLayout?: (context: LayoutAvailableContext) => boolean;
80
+ autoCheckTagsForLayouts?: boolean;
81
81
  /**
82
- * Automatically checks if Adaptable Objects Tags are available in current Layout
82
+ * Checks if the provided Adaptable Object is available in the given Layout
83
83
  *
84
- * @defaultValue false
84
+ * @defaultValue undefined
85
85
  */
86
- autoCheckTagsForLayouts?: boolean;
86
+ isObjectAvailableInLayout?: (context: LayoutAvailableContext) => boolean;
87
87
  }
88
88
  /**
89
89
  * Customize how Layouts are displayed in Settings Panel
@@ -13,22 +13,46 @@ export declare type ActionRowType = 'rowCreated' | 'rowEdited' | 'rowDeleted';
13
13
  * Info passed into ActionRowSubmitted Event for Created Rows
14
14
  */
15
15
  export interface CreatedActionRowInfo extends BaseEventInfo {
16
+ /**
17
+ * Specifies its a Created Action Row
18
+ */
16
19
  type: 'rowCreated';
20
+ /**
21
+ * Data entered in the Form
22
+ */
17
23
  formData: AdaptableFormData;
24
+ /**
25
+ * Node being cloned
26
+ */
18
27
  clonedRowNode?: RowNode;
19
28
  }
20
29
  /**
21
30
  * Info passed into ActionRowSubmitted Event for Edited Rows
22
31
  */
23
32
  export interface EditedActionRowInfo extends BaseEventInfo {
33
+ /**
34
+ * Specifies its an Edited Action Row
35
+ */
24
36
  type: 'rowEdited';
37
+ /**
38
+ * Data entered in the Form
39
+ */
25
40
  formData: AdaptableFormData;
41
+ /**
42
+ * Node being edited
43
+ */
26
44
  rowNode: RowNode;
27
45
  }
28
46
  /**
29
47
  * Info passed into ActionRowSubmitted Event for Deleted Rows
30
48
  */
31
49
  export interface DeletedActionRowInfo extends BaseEventInfo {
50
+ /**
51
+ * Specifies its a Deleted Action Row
52
+ */
32
53
  type: 'rowDeleted';
54
+ /**
55
+ * Node being deleted
56
+ */
33
57
  rowNode: RowNode;
34
58
  }
@@ -1,4 +1,4 @@
1
- import { ApiBase } from './ApiBase';
1
+ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
2
2
  import { AlertApi } from '../AlertApi';
3
3
  import { AlertState, AlertDefinition, AlertProperties, AdaptableAlertAction, AlertButton } from '../../PredefinedConfig/AlertState';
4
4
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
@@ -12,9 +12,7 @@ import { GridDataChangedInfo } from '../Events/GridDataChanged';
12
12
  export declare class AlertApiImpl extends ApiBase implements AlertApi {
13
13
  getAlertState(): AlertState;
14
14
  getAdaptableFormByName(name: string): AdaptableForm<AlertFormContext> | undefined;
15
- getAlertDefinitions(config?: {
16
- includeLayoutNotAssociatedObjects?: boolean;
17
- }): AlertDefinition[];
15
+ getAlertDefinitions(config?: LayoutAssociatedObjectLoadConfig): AlertDefinition[];
18
16
  getAlertDefinitionById(id: AlertDefinition['Uuid']): AlertDefinition;
19
17
  getNonReactiveAlertDefinitions(): AlertDefinition[];
20
18
  getActiveNonReactiveAlertDefinitions(): AlertDefinition[];
@@ -21,9 +21,8 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
21
21
  return (_a = alertForms.find((f) => f.name === name)) === null || _a === void 0 ? void 0 : _a.form;
22
22
  }
23
23
  getAlertDefinitions(config) {
24
- var _a, _b;
25
- return ((_b = (_a = this.getAlertState().AlertDefinitions) === null || _a === void 0 ? void 0 : _a.filter((alertDefinition) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
26
- this.adaptable.api.internalApi.isObjectAvailableInLayout(alertDefinition, 'Alert'))) !== null && _b !== void 0 ? _b : []);
24
+ var _a;
25
+ return ((_a = this.handleLayoutAssociatedObjects(this.getAlertState().AlertDefinitions, 'Alert', config)) !== null && _a !== void 0 ? _a : []);
27
26
  }
28
27
  getAlertDefinitionById(id) {
29
28
  return this.getAlertDefinitions().find((alert) => (alert === null || alert === void 0 ? void 0 : alert.Uuid) === id);
@@ -7,7 +7,7 @@ import { ModuleInfo } from '../../Strategy/Interface/IModule';
7
7
  import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
8
8
  import { AdaptableApi } from '../AdaptableApi';
9
9
  import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
10
- import { ActionOptions, ContainerOptions, DashboardOptions, EditOptions, FilterOptions, GeneralOptions, LayoutOptions, MenuOptions, SearchOptions, StateOptions, TeamSharingOptions, UserInterfaceOptions } from '../../types';
10
+ import { ActionOptions, ContainerOptions, DashboardOptions, EditOptions, FilterOptions, GeneralOptions, LayoutAssociatedObject, LayoutOptions, MenuOptions, SearchOptions, StateOptions, TeamSharingOptions, UserInterfaceOptions } from '../../types';
11
11
  import { NotificationsOptions } from '../../AdaptableOptions/NotificationsOptions';
12
12
  import { ToolPanelOptions } from '../../AdaptableOptions/ToolPanelOptions';
13
13
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
@@ -31,6 +31,10 @@ export declare abstract class ApiBase {
31
31
  */
32
32
  protected checkItemExists(item: any, name: string, type: string): boolean;
33
33
  protected checkArrayExists(array: any): boolean;
34
+ protected handleLayoutAssociatedObjects<T extends LayoutAssociatedObject>(associatedObjects: T[], module: AdaptableModule, config?: {
35
+ includeLayoutNotAssociatedObjects?: boolean;
36
+ associatedWithLayout?: string;
37
+ }): T[];
34
38
  /**
35
39
  * Base api Helper method that dispatches a *Redux Action* to the Store
36
40
  * @param action the Redux Action to be dispatched
@@ -68,3 +72,10 @@ export declare abstract class ApiBase {
68
72
  protected getAdaptableApi(): AdaptableApi;
69
73
  destroy(): void;
70
74
  }
75
+ /**
76
+ * Configuration for API methods which load `LayoutAssociatedObject`
77
+ */
78
+ export interface LayoutAssociatedObjectLoadConfig {
79
+ includeLayoutNotAssociatedObjects?: boolean;
80
+ associatedWithLayout?: string;
81
+ }
@@ -37,6 +37,13 @@ class ApiBase {
37
37
  }
38
38
  return true;
39
39
  }
40
+ handleLayoutAssociatedObjects(associatedObjects = [], module, config) {
41
+ const associatedLayout = (config === null || config === void 0 ? void 0 : config.associatedWithLayout)
42
+ ? this.adaptable.api.layoutApi.getLayoutByName(config.associatedWithLayout)
43
+ : this.getAdaptableApi().layoutApi.getCurrentLayout();
44
+ return associatedObjects.filter((associatedObject) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
45
+ this.adaptable.api.internalApi.isObjectAvailableInLayout(associatedObject, module, associatedLayout));
46
+ }
40
47
  /**
41
48
  * Base api Helper method that dispatches a *Redux Action* to the Store
42
49
  * @param action the Redux Action to be dispatched
@@ -1,13 +1,11 @@
1
- import { ApiBase } from './ApiBase';
1
+ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
2
2
  import { ConditionalStyleApi } from '../ConditionalStyleApi';
3
3
  import { ConditionalStyleState, ConditionalStyle } from '../../PredefinedConfig/ConditionalStyleState';
4
4
  import { AdaptableColumn, AdaptableScope } from '../../types';
5
5
  import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
6
6
  export declare class ConditionalStyleApiImpl extends ApiBase implements ConditionalStyleApi {
7
7
  getConditionalStyleState(): ConditionalStyleState;
8
- getAllConditionalStyle(config?: {
9
- includeLayoutNotAssociatedObjects?: boolean;
10
- }): ConditionalStyle[];
8
+ getAllConditionalStyle(config?: LayoutAssociatedObjectLoadConfig): ConditionalStyle[];
11
9
  getAllActiveConditionalStyle(): ConditionalStyle[];
12
10
  getConditionalStyleById(id: ConditionalStyle['Uuid']): ConditionalStyle;
13
11
  getAllSuspendedConditionalStyle(): ConditionalStyle[];
@@ -10,9 +10,8 @@ class ConditionalStyleApiImpl extends ApiBase_1.ApiBase {
10
10
  return this.getAdaptableState().ConditionalStyle;
11
11
  }
12
12
  getAllConditionalStyle(config) {
13
- var _a, _b;
14
- return ((_b = (_a = this.getConditionalStyleState().ConditionalStyles) === null || _a === void 0 ? void 0 : _a.filter((conditionalStyle) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
- this.adaptable.api.internalApi.isObjectAvailableInLayout(conditionalStyle, 'ConditionalStyle'))) !== null && _b !== void 0 ? _b : []);
13
+ var _a;
14
+ return ((_a = this.handleLayoutAssociatedObjects(this.getConditionalStyleState().ConditionalStyles, 'ConditionalStyle', config)) !== null && _a !== void 0 ? _a : []);
16
15
  }
17
16
  getAllActiveConditionalStyle() {
18
17
  return this.getAllConditionalStyle().filter((style) => !style.IsSuspended);
@@ -1,11 +1,9 @@
1
- import { ApiBase } from './ApiBase';
1
+ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
2
2
  import { CustomSortApi } from '../CustomSortApi';
3
3
  import { CustomSortState, CustomSort } from '../../PredefinedConfig/CustomSortState';
4
4
  export declare class CustomSortApiImpl extends ApiBase implements CustomSortApi {
5
5
  getCustomSortState(): CustomSortState;
6
- getAllCustomSort(config?: {
7
- includeLayoutNotAssociatedObjects?: boolean;
8
- }): CustomSort[];
6
+ getAllCustomSort(config?: LayoutAssociatedObjectLoadConfig): CustomSort[];
9
7
  getCustomSortById(id: CustomSort['Uuid']): CustomSort;
10
8
  getAllActiveCustomSort(): CustomSort[];
11
9
  getAllSuspendedCustomSort(): CustomSort[];
@@ -10,9 +10,8 @@ class CustomSortApiImpl extends ApiBase_1.ApiBase {
10
10
  return this.getAdaptableState().CustomSort;
11
11
  }
12
12
  getAllCustomSort(config) {
13
- var _a, _b;
14
- return ((_b = (_a = this.getCustomSortState().CustomSorts) === null || _a === void 0 ? void 0 : _a.filter((customSort) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
- this.adaptable.api.internalApi.isObjectAvailableInLayout(customSort, 'CustomSort'))) !== null && _b !== void 0 ? _b : []);
13
+ var _a;
14
+ return ((_a = this.handleLayoutAssociatedObjects(this.getCustomSortState().CustomSorts, 'CustomSort', config)) !== null && _a !== void 0 ? _a : []);
16
15
  }
17
16
  getCustomSortById(id) {
18
17
  return this.getAllCustomSort().find((customSort) => customSort.Uuid === id);
@@ -1,4 +1,4 @@
1
- import { ApiBase } from './ApiBase';
1
+ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
2
2
  import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFlashingCell';
3
3
  import { FlashingCellApi } from '../FlashingCellApi';
4
4
  import { FlashingCellDefinition, FlashingCellState } from '../../PredefinedConfig/FlashingCellState';
@@ -6,9 +6,7 @@ import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePr
6
6
  import { AdaptableScope } from '../../PredefinedConfig/Common/AdaptableScope';
7
7
  export declare class FlashingCellApiImpl extends ApiBase implements FlashingCellApi {
8
8
  getFlashingCellState(): FlashingCellState;
9
- getFlashingCellDefinitions(config?: {
10
- includeLayoutNotAssociatedObjects?: boolean;
11
- }): FlashingCellDefinition[];
9
+ getFlashingCellDefinitions(config?: LayoutAssociatedObjectLoadConfig): FlashingCellDefinition[];
12
10
  mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
13
11
  getFlashingCellDefinitionById(id: FlashingCellDefinition['Uuid']): FlashingCellDefinition;
14
12
  getActiveFlashingCellDefinitions(): FlashingCellDefinition[];
@@ -10,9 +10,8 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
10
10
  return this.getAdaptableState().FlashingCell;
11
11
  }
12
12
  getFlashingCellDefinitions(config) {
13
- var _a, _b;
14
- const flashingCellDefinitions = (_b = (_a = this.getFlashingCellState().FlashingCellDefinitions) === null || _a === void 0 ? void 0 : _a.filter((flashingCellDefinition) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
- this.adaptable.api.internalApi.isObjectAvailableInLayout(flashingCellDefinition, 'FlashingCell'))) !== null && _b !== void 0 ? _b : [];
13
+ var _a;
14
+ const flashingCellDefinitions = (_a = this.handleLayoutAssociatedObjects(this.getFlashingCellState().FlashingCellDefinitions, 'FlashingCell', config)) !== null && _a !== void 0 ? _a : [];
16
15
  return flashingCellDefinitions.map((flashingCellDefinition) => {
17
16
  return this.mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition);
18
17
  });
@@ -1,5 +1,5 @@
1
1
  import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
2
- import { ApiBase } from './ApiBase';
2
+ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
3
3
  import { FormatColumnApi } from '../FormatColumnApi';
4
4
  import { FormatColumnState, FormatColumn, ColumnStyle, ColumnComparison } from '../../PredefinedConfig/FormatColumnState';
5
5
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
@@ -7,9 +7,7 @@ import { RowNode } from '@ag-grid-community/all-modules';
7
7
  import { AdaptableFormat } from '../../types';
8
8
  export declare class FormatColumnApiImpl extends ApiBase implements FormatColumnApi {
9
9
  getFormatColumnState(): FormatColumnState;
10
- getAllFormatColumn(config?: {
11
- includeLayoutNotAssociatedObjects?: boolean;
12
- }): FormatColumn[];
10
+ getAllFormatColumn(config?: LayoutAssociatedObjectLoadConfig): FormatColumn[];
13
11
  getFormatColumnById(id: FormatColumn['Uuid']): FormatColumn;
14
12
  getAllActiveFormatColumn(): FormatColumn[];
15
13
  getAllSuspendedFormatColumn(): FormatColumn[];
@@ -14,9 +14,8 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
14
14
  return this.getAdaptableState().FormatColumn;
15
15
  }
16
16
  getAllFormatColumn(config) {
17
- var _a, _b;
18
- return ((_b = (_a = this.getFormatColumnState().FormatColumns) === null || _a === void 0 ? void 0 : _a.filter((formatColumn) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
19
- this.adaptable.api.internalApi.isObjectAvailableInLayout(formatColumn, 'FormatColumn'))) !== null && _b !== void 0 ? _b : []);
17
+ var _a;
18
+ return ((_a = this.handleLayoutAssociatedObjects(this.getFormatColumnState().FormatColumns, 'FormatColumn', config)) !== null && _a !== void 0 ? _a : []);
20
19
  }
21
20
  getFormatColumnById(id) {
22
21
  return this.getAllFormatColumn().find((formatColumn) => formatColumn.Uuid === id);
@@ -127,7 +127,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
127
127
  hideProgressIndicator(): void;
128
128
  getCorrectEnglishVariant(wordToSpell: string): string;
129
129
  hasLayoutSpecificObjects(): boolean;
130
- isObjectAvailableInLayout(object: LayoutAssociatedObject, module: AdaptableModule): boolean;
130
+ isObjectAvailableInLayout(object: LayoutAssociatedObject, module: AdaptableModule, layout: Layout): boolean;
131
131
  showLayoutNotAssociatedObjects(): boolean;
132
132
  shouldDisplayTagSections(): boolean;
133
133
  getAvailableTags(): AdaptableObjectTag[] | undefined;
@@ -121,7 +121,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
121
121
  ? toFlashingAlert(forPrimaryKey[columnId])
122
122
  : toFlashingAlert(forPrimaryKey[SystemRedux_1.FLASHING_CELL_ROW_KEY]);
123
123
  if ((adaptableFlashingCell === null || adaptableFlashingCell === void 0 ? void 0 : adaptableFlashingCell.flashingCellDefinition) &&
124
- !this.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell')) {
124
+ !this.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getAdaptableApi().layoutApi.getCurrentLayout())) {
125
125
  return;
126
126
  }
127
127
  return adaptableFlashingCell;
@@ -494,18 +494,19 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
494
494
  }
495
495
  return false;
496
496
  }
497
- isObjectAvailableInLayout(object, module) {
497
+ isObjectAvailableInLayout(object, module, layout) {
498
+ var _a;
498
499
  if (!this.hasLayoutSpecificObjects()) {
499
500
  return true;
500
501
  }
501
502
  const layoutTagOptions = this.getAdaptableOptions().layoutOptions.layoutTagOptions;
502
503
  if ((layoutTagOptions === null || layoutTagOptions === void 0 ? void 0 : layoutTagOptions.autoCheckTagsForLayouts) == true) {
503
- return this.getAdaptableApi().layoutApi.isObjectAvailableInCurrentLayout(object);
504
+ return ArrayExtensions_1.default.IsNullOrEmpty(object.Tags) ? true : (_a = object.Tags) === null || _a === void 0 ? void 0 : _a.includes(layout.Name);
504
505
  }
505
506
  const context = {
506
507
  adaptableObject: object,
507
508
  module,
508
- layout: this.getAdaptableApi().layoutApi.getCurrentLayout(),
509
+ layout,
509
510
  adaptableApi: this.getAdaptableApi(),
510
511
  };
511
512
  return layoutTagOptions === null || layoutTagOptions === void 0 ? void 0 : layoutTagOptions.isObjectAvailableInLayout(context);
@@ -3,7 +3,6 @@ import { LayoutApi } from '../LayoutApi';
3
3
  import { LayoutState, Layout } from '../../PredefinedConfig/LayoutState';
4
4
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
5
5
  import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
6
- import { LayoutAssociatedObject } from '../../types';
7
6
  export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
8
7
  getLayoutState(): LayoutState;
9
8
  shouldAutoSaveLayout: (layout?: Layout) => boolean;
@@ -41,7 +40,6 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
41
40
  isDefaultLayout(layout: Layout): boolean;
42
41
  isCurrentLayoutDefault(): boolean;
43
42
  areExpandedRowGroupsSavedInLayouts(): boolean;
44
- isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
45
43
  removeColumnFromCurrentLayout(columnId: string): void;
46
44
  removeColumnFromAllLayouts(columnId: string): void;
47
45
  removeColumnFromLayout(columnId: string, layoutName: string): void;
@@ -315,12 +315,6 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
315
315
  return (this.getLayoutOptions().includeExpandedRowGroups ||
316
316
  this.getLayoutOptions().displayRowGroups === 'dynamic');
317
317
  }
318
- isObjectAvailableInCurrentLayout(adaptableObject) {
319
- var _a;
320
- return ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(adaptableObject.Tags)
321
- ? true
322
- : (_a = adaptableObject.Tags) === null || _a === void 0 ? void 0 : _a.map((tag) => tag).includes(this.getCurrentLayoutName());
323
- }
324
318
  removeColumnFromCurrentLayout(columnId) {
325
319
  this.removeColumnFromLayout(columnId, this.getCurrentLayoutName());
326
320
  }
@@ -1,12 +1,10 @@
1
- import { ApiBase } from './ApiBase';
1
+ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
2
2
  import { PlusMinusState, PlusMinusNudge } from '../../PredefinedConfig/PlusMinusState';
3
3
  import { PlusMinusApi } from '../PlusMinusApi';
4
4
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
5
5
  export declare class PlusMinusApiImpl extends ApiBase implements PlusMinusApi {
6
6
  getPlusMinusState(): PlusMinusState;
7
- getAllPlusMinus(config?: {
8
- includeLayoutNotAssociatedObjects?: boolean;
9
- }): PlusMinusNudge[];
7
+ getAllPlusMinus(config?: LayoutAssociatedObjectLoadConfig): PlusMinusNudge[];
10
8
  getPlusMinusById(id: PlusMinusNudge['Uuid']): PlusMinusNudge;
11
9
  getAllActivePlusMinus(): PlusMinusNudge[];
12
10
  getAllSuspendedPlusMinus(): PlusMinusNudge[];
@@ -10,9 +10,8 @@ class PlusMinusApiImpl extends ApiBase_1.ApiBase {
10
10
  return this.getAdaptableState().PlusMinus;
11
11
  }
12
12
  getAllPlusMinus(config) {
13
- var _a, _b;
14
- const layoutSpecificPlusMinusNudges = (_b = (_a = this.getPlusMinusState().PlusMinusNudges) === null || _a === void 0 ? void 0 : _a.filter((plusMinusNudge) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
- this.adaptable.api.internalApi.isObjectAvailableInLayout(plusMinusNudge, 'PlusMinus'))) !== null && _b !== void 0 ? _b : [];
13
+ var _a;
14
+ const layoutSpecificPlusMinusNudges = (_a = this.handleLayoutAssociatedObjects(this.getPlusMinusState().PlusMinusNudges, 'PlusMinus', config)) !== null && _a !== void 0 ? _a : [];
16
15
  return layoutSpecificPlusMinusNudges.filter((plusMinusNudge) => plusMinusNudge.Rule == undefined || plusMinusNudge.Rule.BooleanExpression != undefined);
17
16
  }
18
17
  getPlusMinusById(id) {
@@ -1,4 +1,4 @@
1
- import { ApiBase } from './ApiBase';
1
+ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
2
2
  import { ScheduleApi } from '../ScheduleApi';
3
3
  import { BaseSchedule } from '../../PredefinedConfig/Common/Schedule';
4
4
  import { ReportSchedule } from '../../PredefinedConfig/ExportState';
@@ -9,9 +9,7 @@ import { ReminderSchedule, ScheduleState } from '../../PredefinedConfig/Schedule
9
9
  export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
10
10
  getScheduleState(): ScheduleState;
11
11
  getAllSchedule(): BaseSchedule[];
12
- getAllReminderSchedule(config?: {
13
- includeLayoutNotAssociatedObjects?: boolean;
14
- }): ReminderSchedule[];
12
+ getAllReminderSchedule(config?: LayoutAssociatedObjectLoadConfig): ReminderSchedule[];
15
13
  getScheduleById(id: BaseSchedule['Uuid']): BaseSchedule;
16
14
  getAllActiveReminderSchedule(): ReminderSchedule[];
17
15
  getAllSuspendedReminderSchedule(): ReminderSchedule[];
@@ -20,9 +18,7 @@ export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
20
18
  editReminderSchedule(schedule: ReminderSchedule): ReminderSchedule;
21
19
  suspendReminderSchedule(schedule: ReminderSchedule): ReminderSchedule;
22
20
  unSuspendReminderSchedule(schedule: ReminderSchedule): ReminderSchedule;
23
- getAllReportSchedule(config?: {
24
- includeLayoutNotAssociatedObjects?: boolean;
25
- }): ReportSchedule[];
21
+ getAllReportSchedule(config?: LayoutAssociatedObjectLoadConfig): ReportSchedule[];
26
22
  getAllActiveReportSchedule(): ReportSchedule[];
27
23
  getAllSuspendedReportSchedule(): ReportSchedule[];
28
24
  addReportSchedule(schedule: ReportSchedule): ReportSchedule;
@@ -30,9 +26,7 @@ export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
30
26
  deleteReportSchedule(schedule: ReportSchedule): void;
31
27
  suspendReportSchedule(schedule: ReportSchedule): ReportSchedule;
32
28
  unSuspendReportSchedule(schedule: ReportSchedule): ReportSchedule;
33
- getAllIPushPullSchedule(config?: {
34
- includeLayoutNotAssociatedObjects?: boolean;
35
- }): IPushPullSchedule[];
29
+ getAllIPushPullSchedule(config?: LayoutAssociatedObjectLoadConfig): IPushPullSchedule[];
36
30
  getAllActiveIPushPullSchedule(): IPushPullSchedule[];
37
31
  getAllSuspendedIPushPullSchedule(): IPushPullSchedule[];
38
32
  addIPushPullSchedule(schedule: IPushPullSchedule): IPushPullSchedule;
@@ -40,9 +34,7 @@ export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
40
34
  deleteIPushPullSchedule(schedule: IPushPullSchedule): void;
41
35
  suspendIPushPullSchedule(schedule: IPushPullSchedule): IPushPullSchedule;
42
36
  unSuspendIPushPullSchedule(schedule: IPushPullSchedule): IPushPullSchedule;
43
- getAllGlue42Schedule(config?: {
44
- includeLayoutNotAssociatedObjects?: boolean;
45
- }): Glue42Schedule[];
37
+ getAllGlue42Schedule(config?: LayoutAssociatedObjectLoadConfig): Glue42Schedule[];
46
38
  getAllActiveGlue42Schedule(): Glue42Schedule[];
47
39
  getAllSuspendedGlue42Schedule(): Glue42Schedule[];
48
40
  addGlue42Schedule(schedule: Glue42Schedule): Glue42Schedule;
@@ -50,9 +42,7 @@ export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
50
42
  deleteGlue42Schedule(schedule: Glue42Schedule): void;
51
43
  suspendGlue42Schedule(schedule: Glue42Schedule): Glue42Schedule;
52
44
  unSuspendGlue42Schedule(schedule: Glue42Schedule): Glue42Schedule;
53
- getAllOpenFinSchedule(config?: {
54
- includeLayoutNotAssociatedObjects?: boolean;
55
- }): OpenFinSchedule[];
45
+ getAllOpenFinSchedule(config?: LayoutAssociatedObjectLoadConfig): OpenFinSchedule[];
56
46
  getAllActiveOpenFinSchedule(): OpenFinSchedule[];
57
47
  getAllSuspendedOpenFinSchedule(): OpenFinSchedule[];
58
48
  addOpenFinSchedule(schedule: OpenFinSchedule): OpenFinSchedule;
@@ -19,9 +19,8 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
19
19
  return allSchedules;
20
20
  }
21
21
  getAllReminderSchedule(config) {
22
- var _a, _b;
23
- return ((_b = (_a = this.getScheduleState().Reminders) === null || _a === void 0 ? void 0 : _a.filter((schedule) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
24
- this.adaptable.api.internalApi.isObjectAvailableInLayout(schedule, 'Schedule'))) !== null && _b !== void 0 ? _b : []);
22
+ var _a;
23
+ return ((_a = this.handleLayoutAssociatedObjects(this.getScheduleState().Reminders, 'Schedule', config)) !== null && _a !== void 0 ? _a : []);
25
24
  }
26
25
  getScheduleById(id) {
27
26
  return this.getAllSchedule().find((schedule) => (schedule === null || schedule === void 0 ? void 0 : schedule.Uuid) === id);
@@ -52,10 +51,8 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
52
51
  return this.getScheduleById(schedule.Uuid);
53
52
  }
54
53
  getAllReportSchedule(config) {
55
- var _a, _b;
56
- return ((_b = (_a = this.adaptable.api.exportApi
57
- .getReportSchedules()) === null || _a === void 0 ? void 0 : _a.filter((schedule) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
58
- this.adaptable.api.internalApi.isObjectAvailableInLayout(schedule, 'Schedule'))) !== null && _b !== void 0 ? _b : []);
54
+ var _a;
55
+ return ((_a = this.handleLayoutAssociatedObjects(this.adaptable.api.exportApi.getReportSchedules(), 'Schedule', config)) !== null && _a !== void 0 ? _a : []);
59
56
  }
60
57
  getAllActiveReportSchedule() {
61
58
  return this.getAllReportSchedule().filter((schedule) => !schedule.IsSuspended);
@@ -83,10 +80,9 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
83
80
  return this.getScheduleById(schedule.Uuid);
84
81
  }
85
82
  getAllIPushPullSchedule(config) {
86
- var _a, _b;
83
+ var _a;
87
84
  const ippApi = this.adaptable.api.pluginsApi.getipushpullPluginApi();
88
- return ((_b = (_a = ippApi === null || ippApi === void 0 ? void 0 : ippApi.getIPushPullSchedules()) === null || _a === void 0 ? void 0 : _a.filter((schedule) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
89
- this.adaptable.api.internalApi.isObjectAvailableInLayout(schedule, 'Schedule'))) !== null && _b !== void 0 ? _b : []);
85
+ return ((_a = this.handleLayoutAssociatedObjects(ippApi === null || ippApi === void 0 ? void 0 : ippApi.getIPushPullSchedules(), 'Schedule', config)) !== null && _a !== void 0 ? _a : []);
90
86
  }
91
87
  getAllActiveIPushPullSchedule() {
92
88
  return this.getAllIPushPullSchedule().filter((schedule) => !schedule.IsSuspended);
@@ -114,10 +110,9 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
114
110
  return this.getScheduleById(schedule.Uuid);
115
111
  }
116
112
  getAllGlue42Schedule(config) {
117
- var _a, _b;
113
+ var _a;
118
114
  const glue42Api = this.adaptable.api.pluginsApi.getGlue42PluginApi();
119
- return ((_b = (_a = glue42Api === null || glue42Api === void 0 ? void 0 : glue42Api.getGlue42Schedules()) === null || _a === void 0 ? void 0 : _a.filter((schedule) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
120
- this.adaptable.api.internalApi.isObjectAvailableInLayout(schedule, 'Schedule'))) !== null && _b !== void 0 ? _b : []);
115
+ return ((_a = this.handleLayoutAssociatedObjects(glue42Api === null || glue42Api === void 0 ? void 0 : glue42Api.getGlue42Schedules(), 'Schedule', config)) !== null && _a !== void 0 ? _a : []);
121
116
  }
122
117
  getAllActiveGlue42Schedule() {
123
118
  return this.getAllGlue42Schedule().filter((schedule) => !schedule.IsSuspended);
@@ -145,10 +140,9 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
145
140
  return this.getScheduleById(schedule.Uuid);
146
141
  }
147
142
  getAllOpenFinSchedule(config) {
148
- var _a, _b;
143
+ var _a;
149
144
  const openFinApi = this.adaptable.api.pluginsApi.getOpenFinPluginApi();
150
- return ((_b = (_a = openFinApi === null || openFinApi === void 0 ? void 0 : openFinApi.getOpenFinSchedules()) === null || _a === void 0 ? void 0 : _a.filter((schedule) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
151
- this.adaptable.api.internalApi.isObjectAvailableInLayout(schedule, 'Schedule'))) !== null && _b !== void 0 ? _b : []);
145
+ return ((_a = this.handleLayoutAssociatedObjects(openFinApi === null || openFinApi === void 0 ? void 0 : openFinApi.getOpenFinSchedules(), 'Schedule', config)) !== null && _a !== void 0 ? _a : []);
152
146
  }
153
147
  getAllActiveOpenFinSchedule() {
154
148
  return this.getAllOpenFinSchedule().filter((schedule) => !schedule.IsSuspended);
@@ -1,11 +1,9 @@
1
- import { ApiBase } from './ApiBase';
1
+ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
2
2
  import { ShortcutApi } from '../ShortcutApi';
3
3
  import { ShortcutState, Shortcut } from '../../PredefinedConfig/ShortcutState';
4
4
  export declare class ShortcutApiImpl extends ApiBase implements ShortcutApi {
5
5
  getShortcutState(): ShortcutState;
6
- getAllShortcut(config?: {
7
- includeLayoutNotAssociatedObjects?: boolean;
8
- }): Shortcut[];
6
+ getAllShortcut(config?: LayoutAssociatedObjectLoadConfig): Shortcut[];
9
7
  getShortcutById(id: Shortcut['Uuid']): Shortcut;
10
8
  getAllActiveShortcut(): Shortcut[];
11
9
  getAllSuspendedShortcut(): Shortcut[];
@@ -10,9 +10,8 @@ class ShortcutApiImpl extends ApiBase_1.ApiBase {
10
10
  return this.getAdaptableState().Shortcut;
11
11
  }
12
12
  getAllShortcut(config) {
13
- var _a, _b;
14
- return ((_b = (_a = this.getShortcutState().Shortcuts) === null || _a === void 0 ? void 0 : _a.filter((shortcut) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
- this.adaptable.api.internalApi.isObjectAvailableInLayout(shortcut, 'Shortcut'))) !== null && _b !== void 0 ? _b : []);
13
+ var _a;
14
+ return ((_a = this.handleLayoutAssociatedObjects(this.getShortcutState().Shortcuts, 'Shortcut', config)) !== null && _a !== void 0 ? _a : []);
16
15
  }
17
16
  getShortcutById(id) {
18
17
  return this.getAllShortcut().find((shortcut) => (shortcut === null || shortcut === void 0 ? void 0 : shortcut.Uuid) === id);
@@ -126,7 +126,7 @@ export interface InternalApi {
126
126
  initializeDataChangeHistory(): void;
127
127
  isTextComparisonCaseSensitive(): boolean;
128
128
  hasLayoutSpecificObjects(): boolean;
129
- isObjectAvailableInLayout(object: LayoutAssociatedObject, module: AdaptableModule): boolean;
129
+ isObjectAvailableInLayout(object: LayoutAssociatedObject, module: AdaptableModule, layout: Layout): boolean;
130
130
  showLayoutNotAssociatedObjects(): boolean;
131
131
  executeWithProgressIndicator(label: string, executeFn: () => unknown): void;
132
132
  hideProgressIndicator(): void;
@@ -1,4 +1,4 @@
1
- import { AdaptableColumn, ColumnSort, LayoutAssociatedObject } from '../../types';
1
+ import { AdaptableColumn, ColumnSort } from '../../types';
2
2
  import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
3
3
  /**
4
4
  * Provides run-time access to the Layout Module and associated state
@@ -182,11 +182,6 @@ export interface LayoutApi {
182
182
  * Returns true if Layouts will contain Expanded Row Groups information
183
183
  */
184
184
  areExpandedRowGroupsSavedInLayouts(): boolean;
185
- /**
186
- * Does an object's Tags include the Current Layout
187
- * @param adaptableObject object to check
188
- */
189
- isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
190
185
  /**
191
186
  * Removes a Column from the Current Layout
192
187
  * @param columnId Column to remove
@@ -215,6 +215,9 @@ class AdaptableStore {
215
215
  const composeEnhancers = (x) => x;
216
216
  const persistedReducer = (state, action) => {
217
217
  var _a, _b;
218
+ if (adaptable.isDestroyed) {
219
+ return state;
220
+ }
218
221
  const init = state === undefined;
219
222
  const newState = rootReducer(state, action);
220
223
  // ideally the reducer should be pure,
@@ -11,6 +11,7 @@ import { AdaptableOnePageWizardProps } from '../../View/Wizard/Interface/IAdapta
11
11
  import * as Redux from 'redux';
12
12
  import { SuspendableObject } from '../../../types';
13
13
  import { StatusBarPanelProps } from '../../View/StatusBar/StatusBarPanel';
14
+ import { StrictExtract } from '../../Utilities/Extensions/TypeExtensions';
14
15
  export interface ModuleInfo {
15
16
  ModuleName: AdaptableModule;
16
17
  FriendlyName: string;
@@ -21,7 +22,7 @@ export interface ModuleInfo {
21
22
  }
22
23
  export declare type TeamSharingReferences = TeamSharingReference[];
23
24
  export declare type TeamSharingReference = {
24
- Module: Extract<AdaptableModule, 'CalculatedColumn' | 'FreeTextColumn' | 'Query'>;
25
+ Module: StrictExtract<AdaptableModule, 'CalculatedColumn' | 'FreeTextColumn' | 'Query' | 'Alert' | 'ConditionalStyle' | 'CustomSort' | 'FlashingCell' | 'FormatColumn' | 'PlusMinus' | 'Shortcut' | 'Schedule'>;
25
26
  Reference: AdaptableObject;
26
27
  };
27
28
  export interface AdaptableObjectItemView {