@adaptabletools/adaptable 18.1.14 → 19.0.0-canary.0

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 (160) hide show
  1. package/package.json +2 -2
  2. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -5
  3. package/src/AdaptableOptions/AlertOptions.d.ts +2 -1
  4. package/src/AdaptableOptions/ChartingOptions.d.ts +5 -1
  5. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +5 -1
  6. package/src/AdaptableOptions/DashboardOptions.d.ts +5 -1
  7. package/src/AdaptableOptions/FlashingCellOptions.d.ts +5 -1
  8. package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
  9. package/src/AdaptableOptions/NotificationsOptions.d.ts +6 -2
  10. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +5 -1
  11. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  12. package/src/Api/ChartingApi.d.ts +2 -2
  13. package/src/Api/ColumnApi.d.ts +6 -0
  14. package/src/Api/ConfigApi.d.ts +22 -2
  15. package/src/Api/Events/LiveDataChanged.d.ts +1 -1
  16. package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -1
  17. package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
  18. package/src/Api/Implementation/ChartingApiImpl.js +2 -2
  19. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  20. package/src/Api/Implementation/ColumnApiImpl.js +3 -0
  21. package/src/Api/Implementation/ConfigApiImpl.d.ts +4 -1
  22. package/src/Api/Implementation/ConfigApiImpl.js +16 -1
  23. package/src/Api/Implementation/EntitlementApiImpl.d.ts +4 -1
  24. package/src/Api/Implementation/EntitlementApiImpl.js +31 -6
  25. package/src/Api/Implementation/ExportApiImpl.js +5 -7
  26. package/src/Api/Implementation/GridApiImpl.js +1 -1
  27. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  28. package/src/Api/Implementation/LayoutApiImpl.js +61 -0
  29. package/src/Api/Implementation/TeamSharingApiImpl.js +2 -6
  30. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -6
  31. package/src/Api/Internal/AdaptableInternalApi.js +5 -11
  32. package/src/Api/Internal/EntitlementInternalApi.d.ts +4 -0
  33. package/src/Api/Internal/EntitlementInternalApi.js +11 -0
  34. package/src/Api/Internal/ExportInternalApi.d.ts +33 -8
  35. package/src/Api/Internal/ExportInternalApi.js +576 -5
  36. package/src/Api/Internal/NamedQueryInternalApi.d.ts +0 -1
  37. package/src/Api/Internal/NamedQueryInternalApi.js +0 -4
  38. package/src/Api/LayoutApi.d.ts +7 -0
  39. package/src/PredefinedConfig/AdaptableState.d.ts +0 -5
  40. package/src/PredefinedConfig/Common/ExtendedLayoutInfo.d.ts +12 -0
  41. package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +2 -1
  42. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  43. package/src/Redux/ActionsReducers/GridRedux.d.ts +6 -6
  44. package/src/Redux/ActionsReducers/GridRedux.js +8 -8
  45. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
  46. package/src/Redux/ActionsReducers/LayoutRedux.js +9 -9
  47. package/src/Redux/ActionsReducers/NamedQueryRedux.d.ts +1 -1
  48. package/src/Redux/ActionsReducers/NamedQueryRedux.js +1 -1
  49. package/src/Redux/ActionsReducers/PluginsRedux.d.ts +2 -2
  50. package/src/Redux/ActionsReducers/PluginsRedux.js +2 -2
  51. package/src/Redux/Store/AdaptableReduxMerger.js +3 -3
  52. package/src/Redux/Store/AdaptableStore.js +2 -4
  53. package/src/Strategy/AdaptableModuleBase.js +1 -2
  54. package/src/Strategy/ColumnFilterModule.js +1 -2
  55. package/src/Strategy/ExportModule.js +17 -44
  56. package/src/Strategy/FlashingCellModule.js +2 -10
  57. package/src/Strategy/ScheduleModule.js +4 -6
  58. package/src/Strategy/SmartEditModule.js +1 -7
  59. package/src/Strategy/TeamSharingModule.js +2 -2
  60. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +1 -1
  61. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +1 -3
  62. package/src/Utilities/Constants/FilterConstants.d.ts +10 -0
  63. package/src/Utilities/Constants/FilterConstants.js +8 -0
  64. package/src/Utilities/Constants/GeneralConstants.d.ts +41 -4
  65. package/src/Utilities/Constants/GeneralConstants.js +42 -3
  66. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -2
  67. package/src/Utilities/Defaults/DefaultSettingsPanel.js +0 -5
  68. package/src/Utilities/Extensions/ArrayExtensions.d.ts +14 -0
  69. package/src/Utilities/Extensions/ArrayExtensions.js +65 -0
  70. package/src/Utilities/Extensions/EnumExtensions.d.ts +0 -4
  71. package/src/Utilities/Extensions/EnumExtensions.js +2 -12
  72. package/src/Utilities/Helpers/AdaptableHelper.d.ts +4 -10
  73. package/src/Utilities/Helpers/AdaptableHelper.js +7 -59
  74. package/src/Utilities/Helpers/FormatHelper.d.ts +9 -0
  75. package/src/Utilities/Helpers/FormatHelper.js +26 -14
  76. package/src/Utilities/Helpers/Helper.d.ts +0 -10
  77. package/src/Utilities/Helpers/Helper.js +0 -70
  78. package/src/Utilities/Services/ChartingService.d.ts +2 -2
  79. package/src/Utilities/Services/ChartingService.js +5 -11
  80. package/src/Utilities/Services/ModuleService.js +35 -31
  81. package/src/Utilities/Services/RowEditService.js +1 -6
  82. package/src/Utilities/Services/RowSummaryService.js +2 -2
  83. package/src/Utilities/Services/ValidationService.js +2 -16
  84. package/src/View/Alert/AlertEmptyView.js +1 -2
  85. package/src/View/Charting/ChartingStatusBarPopover.js +1 -2
  86. package/src/View/Charting/useChartingElements.js +1 -1
  87. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +2 -6
  88. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -4
  89. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -12
  90. package/src/View/Components/ModuleValueSelector/index.js +2 -2
  91. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -5
  92. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -3
  93. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -1
  94. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -7
  95. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +6 -12
  96. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +3 -23
  97. package/src/View/Components/ToolPanel/ToolPanelPopup.js +4 -5
  98. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -3
  99. package/src/View/Components/ValueSelector/index.js +2 -2
  100. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +2 -2
  101. package/src/View/Dashboard/CustomDashboardButton.js +1 -6
  102. package/src/View/Dashboard/CustomToolbar.js +2 -9
  103. package/src/View/Dashboard/Dashboard.js +2 -4
  104. package/src/View/Dashboard/DashboardPopup.js +1 -3
  105. package/src/View/Dashboard/DashboardToolbarFactory.js +1 -2
  106. package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -2
  107. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -3
  108. package/src/View/Export/ExportViewPanel.js +2 -4
  109. package/src/View/Export/Wizard/ReportSummaryWizard.js +2 -6
  110. package/src/View/GridFilter/GridFilterExpressionEditor.js +2 -2
  111. package/src/View/GridFilter/useGridFilterExpressionEditor.js +2 -6
  112. package/src/View/Layout/LayoutViewPanel.js +1 -1
  113. package/src/View/Layout/PivotDetailsPopoup.js +1 -7
  114. package/src/View/Layout/SaveLayoutButton.js +1 -3
  115. package/src/View/Layout/Wizard/sections/AggregationsSection.js +2 -2
  116. package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -2
  117. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
  118. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
  119. package/src/View/Layout/Wizard/sections/RowSummarySection.js +2 -2
  120. package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
  121. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +3 -3
  122. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  123. package/src/View/SystemStatus/SystemStatusPopup.js +1 -1
  124. package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
  125. package/src/agGrid/ActionColumnRenderer.js +8 -22
  126. package/src/agGrid/AdaptableAgGrid.d.ts +6 -7
  127. package/src/agGrid/AdaptableAgGrid.js +165 -146
  128. package/src/agGrid/AgGridAdapter.d.ts +0 -1
  129. package/src/agGrid/AgGridAdapter.js +8 -11
  130. package/src/agGrid/AgGridColumnAdapter.d.ts +3 -1
  131. package/src/agGrid/AgGridColumnAdapter.js +40 -14
  132. package/src/agGrid/BadgeRenderer.js +4 -22
  133. package/src/agGrid/FloatingFilterWrapper.js +21 -0
  134. package/src/agGrid/buildSortedColumnStateForLayout.d.ts +1 -1
  135. package/src/agGrid/buildSortedColumnStateForLayout.js +2 -2
  136. package/src/agGrid/defaultAdaptableOptions.js +35 -30
  137. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -15
  138. package/src/env.js +2 -2
  139. package/src/metamodel/adaptable.metamodel.d.ts +89 -8
  140. package/src/metamodel/adaptable.metamodel.js +1 -1
  141. package/src/types.d.ts +10 -9
  142. package/tsconfig.esm.tsbuildinfo +1 -1
  143. package/src/Redux/ActionsReducers/QueryRedux.d.ts +0 -10
  144. package/src/Redux/ActionsReducers/QueryRedux.js +0 -20
  145. package/src/Utilities/Helpers/FormatContentHelper.d.ts +0 -22
  146. package/src/Utilities/Helpers/FormatContentHelper.js +0 -34
  147. package/src/Utilities/Services/EntitlementService.d.ts +0 -14
  148. package/src/Utilities/Services/EntitlementService.js +0 -63
  149. package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -10
  150. package/src/Utilities/Services/Interface/IReportService.d.ts +0 -27
  151. package/src/Utilities/Services/Interface/IReportService.js +0 -1
  152. package/src/Utilities/Services/ReportService.d.ts +0 -41
  153. package/src/Utilities/Services/ReportService.js +0 -603
  154. package/src/Utilities/isAdaptableObject.d.ts +0 -2
  155. package/src/Utilities/isAdaptableObject.js +0 -4
  156. package/src/Utilities/reorder.d.ts +0 -1
  157. package/src/Utilities/reorder.js +0 -13
  158. package/src/Utilities/sortWithOrder.d.ts +0 -11
  159. package/src/Utilities/sortWithOrder.js +0 -50
  160. /package/src/{Utilities/Services/Interface/IEntitlementService.js → PredefinedConfig/Common/ExtendedLayoutInfo.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "18.1.14",
3
+ "version": "19.0.0-canary.0",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -63,7 +63,7 @@
63
63
  "react-toastify": "9.1.3"
64
64
  },
65
65
  "peerDependencies": {
66
- "@ag-grid-community/core": ">=31.3.1"
66
+ "@ag-grid-community/core": ">=32.1.0"
67
67
  },
68
68
  "publishTimestamp": 0,
69
69
  "type": "module",
@@ -15,11 +15,9 @@ import { AdaptableMenuItem, AdaptableOptions, AdaptablePlugin, AdaptableState, C
15
15
  import { ICalculatedColumnExpressionService } from '../Utilities/Services/Interface/ICalculatedColumnExpressionService';
16
16
  import { IDataService } from '../Utilities/Services/Interface/IDataService';
17
17
  import { CellPopupService } from '../Utilities/Services/CellPopupService';
18
- import { IReportService } from '../Utilities/Services/Interface/IReportService';
19
18
  import { IValidationService } from '../Utilities/Services/Interface/IValidationService';
20
19
  import { IModuleService } from '../Utilities/Services/Interface/IModuleService';
21
20
  import { ContextMenuContext } from '../PredefinedConfig/Common/Menu';
22
- import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
23
21
  import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
24
22
  import { IAlertService } from '../Utilities/Services/Interface/IAlertService';
25
23
  import { ITeamSharingService } from '../Utilities/Services/Interface/ITeamSharingService';
@@ -63,6 +61,7 @@ export interface IAdaptable {
63
61
  variant: AdaptableVariant;
64
62
  isReady: boolean;
65
63
  isDestroyed: boolean;
64
+ isAgGridInitialising: boolean;
66
65
  api: AdaptableApi;
67
66
  adaptableOptions: AdaptableOptions;
68
67
  adaptableStore: IAdaptableStore;
@@ -81,9 +80,7 @@ export interface IAdaptable {
81
80
  DataService: IDataService;
82
81
  ValidationService: IValidationService;
83
82
  CalculatedColumnExpressionService: ICalculatedColumnExpressionService;
84
- ReportService: IReportService;
85
83
  ModuleService: IModuleService;
86
- EntitlementService: IEntitlementService;
87
84
  QueryLanguageService: IQueryLanguageService;
88
85
  AlertService: IAlertService;
89
86
  TeamSharingService: ITeamSharingService;
@@ -270,5 +267,6 @@ export interface IAdaptable {
270
267
  canExportToExcel(): boolean;
271
268
  exportToExcel(reportData: ReportData, fileName: string): void;
272
269
  exportVisualDataToExcel(): void;
273
- normalizeAdaptableState(state: AdaptableState, gridOptions: GridOptions): AdaptableState;
270
+ normalizeAdaptableState(state: AdaptableState, options: NormalizeAdaptableStateOptions): AdaptableState;
274
271
  }
272
+ export type NormalizeAdaptableStateOptions = Pick<GridOptions, 'rowModelType' | 'treeData' | 'columnDefs' | 'autoGroupColumnDef'>;
@@ -49,7 +49,7 @@ export interface AlertOptions<TData = any> {
49
49
  * @defaultValue 'rawValue'
50
50
  * @gridInfoItem
51
51
  */
52
- dataChangeDetectionPolicy?: 'rawValue' | 'formattedValue';
52
+ dataChangeDetectionPolicy?: DataChangeDetectionPolicy;
53
53
  /**
54
54
  * Function providing Header to display in Alert; if empty, AdapTable provides dynamically
55
55
  */
@@ -68,6 +68,7 @@ export interface AlertOptions<TData = any> {
68
68
  */
69
69
  showMissingPrimaryKeyAlert?: boolean;
70
70
  }
71
+ export type DataChangeDetectionPolicy = 'rawValue' | 'formattedValue';
71
72
  /**
72
73
  * Handles a Form Button Action
73
74
  */
@@ -9,7 +9,7 @@ export interface ChartingOptions {
9
9
  * @defaultValue 'none'
10
10
  * @noCodeItem
11
11
  */
12
- saveStrategy?: 'auto' | 'manual' | 'none';
12
+ saveChartBehaviour?: SaveChartBehaviour;
13
13
  /**
14
14
  * Locations to display saved Charts
15
15
  */
@@ -81,3 +81,7 @@ export interface ExternalChartingContext<T = unknown> extends BaseContext {
81
81
  */
82
82
  container?: ChartContainer;
83
83
  }
84
+ /**
85
+ * How Charts are saved
86
+ */
87
+ export type SaveChartBehaviour = 'auto' | 'manual' | 'none';
@@ -142,7 +142,7 @@ export interface QuickFilterOptions<TData = any> {
142
142
  * @gridInfoItem
143
143
  * @noCodeItem
144
144
  */
145
- quickFilterTrigger?: 'mouseenter' | 'click';
145
+ quickFilterTrigger?: FilterTrigger;
146
146
  /**
147
147
  * Sets a height for Quick Filter Bar (if not provided AG Grid's default is used)
148
148
  *
@@ -305,3 +305,7 @@ export interface ValuesFilterPredicateContext<TData = any> extends BaseContext {
305
305
  * Predicate used in Column Values Filter
306
306
  */
307
307
  export type ColumnValuesFilterPredicate = TypeHint<string, SystemFilterPredicateIds>;
308
+ /**
309
+ * What triggers the dropdown
310
+ */
311
+ export type FilterTrigger = 'mouseenter' | 'click';
@@ -36,7 +36,7 @@ export interface DashboardOptions {
36
36
  * @defaultValue 'right'
37
37
  * @noCodeItem
38
38
  */
39
- buttonsLocation?: 'left' | 'right';
39
+ buttonsLocation?: DashboardButtonsLocation;
40
40
  }
41
41
  /**
42
42
  * Custom Toolbar (which AdapTable will manage) enabling devs to populate Dashboard with bepoke content
@@ -89,3 +89,7 @@ export interface CustomToolbarButtonContext extends DashboardButtonContext {
89
89
  */
90
90
  customToolbar: CustomToolbar;
91
91
  }
92
+ /**
93
+ * Where Dashboard Buttons are displayed
94
+ */
95
+ export type DashboardButtonsLocation = 'left' | 'right';
@@ -7,7 +7,7 @@ export interface FlashingCellOptions {
7
7
  * Should a cell or whole row flash
8
8
  * @defaultValue 'cell'
9
9
  */
10
- defaultFlashTarget?: 'row' | 'cell';
10
+ defaultFlashTarget?: FlashTarget;
11
11
  /**
12
12
  * Style for 'Down' value changes
13
13
  * @defaultValue Red BackColour
@@ -29,3 +29,7 @@ export interface FlashingCellOptions {
29
29
  */
30
30
  defaultFlashDuration?: number | 'always';
31
31
  }
32
+ /**
33
+ * Where a Flash can happen
34
+ */
35
+ export type FlashTarget = 'row' | 'cell';
@@ -20,7 +20,7 @@ export interface LayoutOptions {
20
20
  * @defaultValue 'closed'
21
21
  * @gridInfoItem
22
22
  */
23
- displayRowGroups?: 'dynamic' | 'expanded' | 'closed';
23
+ displayRowGroups?: DisplayRowGroups;
24
24
  /**
25
25
  * Layouts save whenever Grid's column / sort info changes; if false, a Save button will display
26
26
  *
@@ -146,3 +146,7 @@ export interface PivotPreviewColumnsContext extends BaseContext {
146
146
  */
147
147
  columnId: string;
148
148
  }
149
+ /**
150
+ * How Row Groups are displayed
151
+ */
152
+ export type DisplayRowGroups = 'dynamic' | 'expanded' | 'closed';
@@ -16,7 +16,7 @@ export interface NotificationsOptions {
16
16
  * @defaultValue 'BottomRight'
17
17
  * @gridInfoItem
18
18
  */
19
- position?: TOAST_POSITIONS;
19
+ position?: ToastPositions;
20
20
  /**
21
21
  * How long (in ms) Notifications display for
22
22
  *
@@ -83,4 +83,8 @@ export interface NotificationsOptions {
83
83
  /**
84
84
  * Different positions offered by Notifications
85
85
  */
86
- export type TOAST_POSITIONS = 'TopRight' | 'TopCenter' | 'TopLeft' | 'BottomRight' | 'BottomCenter' | 'BottomLeft';
86
+ export type ToastPositions = 'TopRight' | 'TopCenter' | 'TopLeft' | 'BottomRight' | 'BottomCenter' | 'BottomLeft';
87
+ /**
88
+ * Different transitions offered by Notifications
89
+ */
90
+ export type ToastTransitions = 'Bounce' | 'Slide' | 'Zoom' | 'Flip';
@@ -62,7 +62,7 @@ export interface SettingsPanelOptions {
62
62
  *
63
63
  * @defaultValue 'window'
64
64
  */
65
- popupType?: 'modal' | 'window';
65
+ popupType?: PopupType;
66
66
  /**
67
67
  * Custom Settings Panels provided by developers at design-time
68
68
  */
@@ -89,3 +89,7 @@ export interface CustomSettingsPanel {
89
89
  */
90
90
  frameworkComponent?: AdaptableFrameworkComponent;
91
91
  }
92
+ /**
93
+ * Type of Popup
94
+ */
95
+ export type PopupType = 'modal' | 'window';
@@ -100,7 +100,7 @@ export interface UserInterfaceOptions<TData = any> {
100
100
  */
101
101
  disableDeleteConfirmation?: boolean;
102
102
  /**
103
- * Alternative names to use for Adaptable Modules in toolbars and menus
103
+ * Alternative names to use for Adaptable Modules in the UI
104
104
  *
105
105
  * @defaultValue null
106
106
  */
@@ -100,10 +100,10 @@ export interface ChartingApi {
100
100
  *
101
101
  * @param chartDef external chart definition
102
102
  * @param options
103
- * @param options.saveStrategy whether to ask the user to provide a name for the chart
103
+ * @param options.saveChartBehaviour whether to ask the user to provide a name for the chart
104
104
  */
105
105
  addExternalChartDefinition(chartDef: ExternalChartDefinition, options?: {
106
- saveStrategy: 'auto' | 'manual';
106
+ saveChartBehaviour: 'auto' | 'manual';
107
107
  }): void;
108
108
  /**
109
109
  * Edit existing external chart definition
@@ -295,6 +295,12 @@ export interface ColumnApi {
295
295
  * @param columnId Column to Check
296
296
  */
297
297
  getDistinctDisplayValuesForColumn(columnId: string): any[];
298
+ /**
299
+ * Sets a new Caption / Header for a Column (only for current Layout)
300
+ * @param columnId Column to Update
301
+ * @param caption New Caption to display
302
+ */
303
+ setColumnCaption(columnId: string, caption: string): void;
298
304
  }
299
305
  /**
300
306
  * Configuration of an AG Grid Column, used for runtime updating of ColDefs
@@ -15,7 +15,7 @@ import { AdaptablePersistentState, AdaptableState } from '../PredefinedConfig/Ad
15
15
  import { FreeTextColumnState } from '../PredefinedConfig/FreeTextColumnState';
16
16
  import { ToolPanelState } from '../PredefinedConfig/ToolPanelState';
17
17
  import { AdaptableStateKey, AdaptableModule } from '../PredefinedConfig/Common/Types';
18
- import { AdaptableSearchState, AdaptableSortState, NamedQueryState, PredefinedConfig, ScheduleState, NoteState } from '../types';
18
+ import { AdaptableSearchState, AdaptableSortState, NamedQueryState, PredefinedConfig, ScheduleState, NoteState, ChartingState, FlashingCellState, StatusBarState, StyledColumnState } from '../types';
19
19
  /**
20
20
  * Range of functions to access Predefined Config and Adaptable State
21
21
  */
@@ -38,7 +38,7 @@ export interface ConfigApi {
38
38
  */
39
39
  getPredefinedConfig(): PredefinedConfig | any;
40
40
  /**
41
- * Reloads either existing or supplied Predefined Config; clears persistent state by calling `StateOptions.clearState()` function for remote storage removal
41
+ * Reloads existing or supplied Predefined Config; clears persistent state by calling `StateOptions.clearState` function for remote storage removal
42
42
  * @param newPredefinedConfig optional Config to load
43
43
  */
44
44
  reloadPredefinedConfig(newPredefinedConfig?: PredefinedConfig): void;
@@ -109,6 +109,11 @@ export interface ConfigApi {
109
109
  * @param returnJson return as JSON rather than object
110
110
  */
111
111
  getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;
112
+ /**
113
+ * Returns Charting section of Adaptable State
114
+ * @param returnJson return as JSON rather than object
115
+ */
116
+ getChartingState(returnJson?: boolean): ChartingState;
112
117
  /**
113
118
  * Returns Note section of Adaptable State
114
119
  * @param returnJson return as JSON rather than object
@@ -129,6 +134,11 @@ export interface ConfigApi {
129
134
  * @param returnJson return as JSON rather than object
130
135
  */
131
136
  getExportState(returnJson?: boolean): ExportState;
137
+ /**
138
+ * Returns Flashing Cell section of Adaptable State
139
+ * @param returnJson return as JSON rather than object
140
+ */
141
+ getFlashingCellState(returnJson?: boolean): FlashingCellState;
132
142
  /**
133
143
  * Returns Format Column section of Adaptable State
134
144
  * @param returnJson return as JSON rather than object
@@ -169,6 +179,16 @@ export interface ConfigApi {
169
179
  * @param returnJson return as JSON rather than object
170
180
  */
171
181
  getShortcutState(returnJson?: boolean): ShortcutState;
182
+ /**
183
+ * Returns StatusBar section of Adaptable State
184
+ * @param returnJson return as JSON rather than object
185
+ */
186
+ getStatusBarState(returnJson?: boolean): StatusBarState;
187
+ /**
188
+ * Returns StyledColumn section of Adaptable State
189
+ * @param returnJson return as JSON rather than object
190
+ */
191
+ getStyledColumnState(returnJson?: boolean): StyledColumnState;
172
192
  /**
173
193
  * Returns Theme section of Adaptable State
174
194
  * @param returnJson return as JSON rather than object
@@ -11,7 +11,7 @@ export interface LiveDataChangedInfo extends BaseEventInfo {
11
11
  /**
12
12
  * What triggered the event to fire
13
13
  */
14
- liveDataTrigger: 'Connected' | 'Disconnected' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated';
14
+ liveDataTrigger: 'Connected' | 'Disconnected' | 'SnapshotSent' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated';
15
15
  /**
16
16
  * The Report which is currently live - only used if the Trigger is LiveData related
17
17
  */
@@ -100,7 +100,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
100
100
  commentApi: CommentApi;
101
101
  private destroyed;
102
102
  constructor(adaptable: IAdaptable);
103
- get agGridApi(): import("@ag-grid-community/core/dist/types/src/gridApi").GridApi<any>;
103
+ get agGridApi(): import("@ag-grid-community/core/dist/types/src/api/gridApi").GridApi<any>;
104
104
  /**
105
105
  * This is only meant to be called by the Adaptable instance.
106
106
  */
@@ -32,7 +32,7 @@ export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
32
32
  setChartReadOnly(chartDefinition: ChartDefinition): void;
33
33
  setChartEditable(chartDefinition: ChartDefinition): void;
34
34
  addExternalChartDefinition(chartDefinition: ExternalChartDefinition, options: {
35
- saveStrategy: 'auto' | 'manual';
35
+ saveChartBehaviour: 'auto' | 'manual';
36
36
  }): void;
37
37
  editExternalChartDefinition(chartDefinition: ExternalChartDefinition): void;
38
38
  deleteExternalChartDefinition(chartDefinition: ExternalChartDefinition): void;
@@ -113,8 +113,8 @@ export class ChartingApiImpl extends ApiBase {
113
113
  }
114
114
  addExternalChartDefinition(chartDefinition, options) {
115
115
  var _a, _b, _c;
116
- const saveStrategy = (_a = options === null || options === void 0 ? void 0 : options.saveStrategy) !== null && _a !== void 0 ? _a : 'manual';
117
- if (saveStrategy === 'auto') {
116
+ const saveChartBehaviour = (_a = options === null || options === void 0 ? void 0 : options.saveChartBehaviour) !== null && _a !== void 0 ? _a : 'manual';
117
+ if (saveChartBehaviour === 'auto') {
118
118
  this.dispatchAction(ChartingRedux.ChartingAddExternalChart(Object.assign(Object.assign({}, chartDefinition), { Name: (_b = chartDefinition.Name) !== null && _b !== void 0 ? _b : this.internalApi.getUniqueChartName() })));
119
119
  }
120
120
  else {
@@ -73,4 +73,5 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
73
73
  updateColumnConfigurations(columnConfigs: ColumnConfig[]): void;
74
74
  setColumnDefinitions(columnDefinitions: (ColDef | ColGroupDef)[]): void;
75
75
  getDistinctDisplayValuesForColumn(columnId: string): any[];
76
+ setColumnCaption(columnId: string, caption: string): void;
76
77
  }
@@ -396,4 +396,7 @@ export class ColumnApiImpl extends ApiBase {
396
396
  getDistinctDisplayValuesForColumn(columnId) {
397
397
  return this.getAdaptableApi().gridApi.internalApi.getDistinctDisplayValuesForColumn(columnId);
398
398
  }
399
+ setColumnCaption(columnId, caption) {
400
+ return this.getAdaptableApi().layoutApi.setColumnCaption(columnId, caption);
401
+ }
399
402
  }
@@ -17,7 +17,7 @@ import { FreeTextColumnState } from '../../PredefinedConfig/FreeTextColumnState'
17
17
  import { ToolPanelState } from '../../PredefinedConfig/ToolPanelState';
18
18
  import { ConfigApi } from '../ConfigApi';
19
19
  import { AdaptableModule, AdaptableStateKey } from '../../PredefinedConfig/Common/Types';
20
- import { AdaptableOptions, AdaptableSearchState, AdaptableSortState, NamedQueryState, ScheduleState } from '../../types';
20
+ import { AdaptableOptions, AdaptableSearchState, AdaptableSortState, FlashingCellState, NamedQueryState, ScheduleState, StatusBarState, StyledColumnState } from '../../types';
21
21
  import { PredefinedConfig } from '../../PredefinedConfig/PredefinedConfig';
22
22
  import { ChartingState } from '../../PredefinedConfig/ChartingState';
23
23
  import { NoteState } from '../../PredefinedConfig/NoteState';
@@ -55,12 +55,15 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
55
55
  getExportState(returnJson?: boolean): ExportState;
56
56
  getFreeTextColumnState(returnJson?: boolean): FreeTextColumnState;
57
57
  getFormatColumnState(returnJson?: boolean): FormatColumnState;
58
+ getFlashingCellState(returnJson?: boolean): FlashingCellState;
58
59
  getLayoutState(returnJson?: boolean): LayoutState;
59
60
  getPlusMinusState(returnJson?: boolean): PlusMinusState;
60
61
  getNamedQueryState(returnJson?: boolean): NamedQueryState;
61
62
  getQuickSearchState(returnJson?: boolean): QuickSearchState;
62
63
  getScheduleState(returnJson?: boolean): ScheduleState;
63
64
  getShortcutState(returnJson?: boolean): ShortcutState;
65
+ getStatusBarState(returnJson?: boolean): StatusBarState;
66
+ getStyledColumnState(returnJson?: boolean): StyledColumnState;
64
67
  getThemeState(returnJson?: boolean): ThemeState;
65
68
  getToolPanelState(returnJson?: boolean): ToolPanelState;
66
69
  dispatchStateReadyAction(module: AdaptableModule): void;
@@ -132,7 +132,13 @@ export class ConfigApiImpl extends ApiBase {
132
132
  adaptableStateKey,
133
133
  predefinedConfig,
134
134
  postLoadHook: (state) => {
135
- return this.adaptable.normalizeAdaptableState(state, this.adaptable.agGridAdapter.getLiveGridOptions());
135
+ const agGridOptions = {
136
+ columnDefs: this.adaptable.agGridAdapter.getGridOption('columnDefs'),
137
+ autoGroupColumnDef: this.adaptable.agGridAdapter.getGridOption('autoGroupColumnDef'),
138
+ rowModelType: this.adaptable.agGridAdapter.getGridOption('rowModelType'),
139
+ treeData: this.adaptable.agGridAdapter.getGridOption('treeData'),
140
+ };
141
+ return this.adaptable.normalizeAdaptableState(state, agGridOptions);
136
142
  },
137
143
  });
138
144
  promise
@@ -281,6 +287,9 @@ export class ConfigApiImpl extends ApiBase {
281
287
  getFormatColumnState(returnJson = false) {
282
288
  return this.getUserStateByStateKey('FormatColumn', returnJson);
283
289
  }
290
+ getFlashingCellState(returnJson = false) {
291
+ return this.getUserStateByStateKey('FlashingCell', returnJson);
292
+ }
284
293
  getLayoutState(returnJson = false) {
285
294
  return this.getUserStateByStateKey('Layout', returnJson);
286
295
  }
@@ -299,6 +308,12 @@ export class ConfigApiImpl extends ApiBase {
299
308
  getShortcutState(returnJson = false) {
300
309
  return this.getUserStateByStateKey('Shortcut', returnJson);
301
310
  }
311
+ getStatusBarState(returnJson = false) {
312
+ return this.getUserStateByStateKey('StatusBar', returnJson);
313
+ }
314
+ getStyledColumnState(returnJson = false) {
315
+ return this.getUserStateByStateKey('StyledColumn', returnJson);
316
+ }
302
317
  getThemeState(returnJson = false) {
303
318
  return this.getUserStateByStateKey('Theme', returnJson);
304
319
  }
@@ -1,8 +1,11 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { EntitlementApi } from '../EntitlementApi';
3
3
  import { AccessLevel, AdaptableModule, AdaptableObject } from '../../types';
4
+ import { EntitlementInternalApi } from '../Internal/EntitlementInternalApi';
5
+ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
4
6
  export declare class EntitlementApiImpl extends ApiBase implements EntitlementApi {
5
- private getEntitlementService;
7
+ internalApi: EntitlementInternalApi;
8
+ constructor(adaptable: IAdaptable);
6
9
  getEntitlementAccessLevelForModule(adaptableModule: AdaptableModule): AccessLevel;
7
10
  isObjectReadonly(object: AdaptableObject): boolean;
8
11
  isModuleHiddenEntitlement(adaptableModule: AdaptableModule): boolean;
@@ -1,21 +1,46 @@
1
1
  import { ApiBase } from './ApiBase';
2
+ import { EntitlementInternalApi } from '../Internal/EntitlementInternalApi';
2
3
  export class EntitlementApiImpl extends ApiBase {
3
- getEntitlementService() {
4
- return this.getAdaptableApi().internalApi.getEntitlementService();
4
+ constructor(adaptable) {
5
+ super(adaptable);
6
+ this.internalApi = new EntitlementInternalApi(adaptable);
5
7
  }
6
8
  getEntitlementAccessLevelForModule(adaptableModule) {
7
- return this.getEntitlementService().getEntitlementAccessLevelForModule(adaptableModule);
9
+ let entitlementOptions = this.getEntitlementOptions();
10
+ if (entitlementOptions) {
11
+ const defaultAccessLevelContext = this.getAdaptableApi().internalApi.buildBaseContext();
12
+ const defaultAccessLevel = typeof entitlementOptions.defaultAccessLevel === 'function'
13
+ ? entitlementOptions.defaultAccessLevel(defaultAccessLevelContext)
14
+ : entitlementOptions.defaultAccessLevel;
15
+ const moduleEntitlements = entitlementOptions.moduleEntitlements;
16
+ if (moduleEntitlements) {
17
+ if (typeof moduleEntitlements === 'function') {
18
+ const entitlementContext = Object.assign(Object.assign({ adaptableModule }, this.getAdaptableApi().internalApi.buildBaseContext()), { defaultAccessLevel });
19
+ const dynamicModuleEntitlement = moduleEntitlements(entitlementContext);
20
+ return dynamicModuleEntitlement !== null && dynamicModuleEntitlement !== void 0 ? dynamicModuleEntitlement : defaultAccessLevel;
21
+ }
22
+ else {
23
+ const entitlement = moduleEntitlements.find((f) => f.adaptableModule === adaptableModule);
24
+ if (entitlement) {
25
+ return entitlement.accessLevel;
26
+ }
27
+ }
28
+ }
29
+ // if still here then return their default Access Level
30
+ return defaultAccessLevel;
31
+ }
32
+ return 'Full';
8
33
  }
9
34
  isObjectReadonly(object) {
10
35
  return object.IsReadOnly;
11
36
  }
12
37
  isModuleHiddenEntitlement(adaptableModule) {
13
- return this.getEntitlementService().isModuleHiddenEntitlement(adaptableModule);
38
+ return this.getEntitlementAccessLevelForModule(adaptableModule) == 'Hidden';
14
39
  }
15
40
  isModuleFullEntitlement(adaptableModule) {
16
- return this.getEntitlementService().isModuleFullEntitlement(adaptableModule);
41
+ return this.getEntitlementAccessLevelForModule(adaptableModule) == 'Full';
17
42
  }
18
43
  isModuleReadOnlyEntitlement(adaptableModule) {
19
- return this.getEntitlementService().isModuleReadOnlyEntitlement(adaptableModule);
44
+ return this.getEntitlementAccessLevelForModule(adaptableModule) == 'ReadOnly';
20
45
  }
21
46
  }
@@ -22,8 +22,8 @@ export class ExportApiImpl extends ApiBase {
22
22
  }
23
23
  getReportByName(reportName) {
24
24
  // if system report then create
25
- if (this.adaptable.ReportService.IsSystemReport(reportName)) {
26
- return this.adaptable.ReportService.CreateSystemReport(reportName);
25
+ if (this.internalApi.isSystemReport(reportName)) {
26
+ return this.internalApi.createSystemReport(reportName);
27
27
  }
28
28
  else {
29
29
  return this.getReports().find((r) => r.Name == reportName);
@@ -44,14 +44,12 @@ export class ExportApiImpl extends ApiBase {
44
44
  return currentDestination && this.getDestinationByName(currentDestination);
45
45
  }
46
46
  getAvailableSystemReports() {
47
- return this.getExportOptions().systemReportNames.filter((s) => this.getAdaptableApi().internalApi.getReportService().IsSystemReportActive(s));
47
+ return this.getExportOptions().systemReportNames.filter((s) => this.internalApi.isSystemReportActive(s));
48
48
  }
49
49
  getAvailableExportDestinations() {
50
50
  let systemDestinations = [];
51
51
  this.getExportOptions().systemExportDestinations.forEach((exportDestination) => {
52
- if (this.getAdaptableApi()
53
- .internalApi.getReportService()
54
- .IsSystemExportDestinationActive(exportDestination)) {
52
+ if (this.internalApi.isSystemExportDestinationActive(exportDestination)) {
55
53
  systemDestinations.push(exportDestination);
56
54
  }
57
55
  });
@@ -143,7 +141,7 @@ export class ExportApiImpl extends ApiBase {
143
141
  this.logWarn(`Report '${reportName}' not found!`);
144
142
  return undefined;
145
143
  }
146
- return this.getAdaptableApi().internalApi.getReportService().getReportData(report);
144
+ return this.internalApi.getReportData(report);
147
145
  }
148
146
  isColumnExportable(adaptableColumn) {
149
147
  const isExportableFn = this.getExportOptions().isColumnExportable;
@@ -380,7 +380,7 @@ export class GridApiImpl extends ApiBase {
380
380
  }
381
381
  isSummaryNode(rowNode) {
382
382
  var _a;
383
- return (_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) === null || _a === void 0 ? void 0 : _a[ROW_SUMMARY_ROW_ID];
383
+ return !!((_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) === null || _a === void 0 ? void 0 : _a[ROW_SUMMARY_ROW_ID]);
384
384
  }
385
385
  isQuickFilterAvailable() {
386
386
  return this.adaptable.isQuickFilterAvailable();
@@ -6,6 +6,7 @@ import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
6
6
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
7
7
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
8
8
  import { LayoutInternalApi } from '../Internal/LayoutInternalApi';
9
+ import { ExtendedLayoutInfo } from '../../PredefinedConfig/Common/ExtendedLayoutInfo';
9
10
  export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
10
11
  internalApi: LayoutInternalApi;
11
12
  constructor(adaptable: IAdaptable);
@@ -22,6 +23,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
22
23
  getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
23
24
  getCurrentLayoutName(): string;
24
25
  getLayoutByName(layoutName: string): Layout | null;
26
+ getExtendedLayoutByName(layoutName: string): ExtendedLayoutInfo | undefined;
25
27
  getLayouts(): Layout[];
26
28
  getLayoutById(id: Layout['Uuid']): Layout;
27
29
  saveCurrentLayout(): void;
@@ -74,6 +74,67 @@ export class LayoutApiImpl extends ApiBase {
74
74
  }
75
75
  }
76
76
  }
77
+ getExtendedLayoutByName(layoutName) {
78
+ const layout = this.getLayoutByName(layoutName);
79
+ if (!layout) {
80
+ return undefined;
81
+ }
82
+ const config = {
83
+ includeLayoutNotAssociatedObjects: true,
84
+ associatedWithLayout: layoutName,
85
+ };
86
+ // cannot see a better way than to go through this module by module...
87
+ let extensions = [];
88
+ this.getAlertApi()
89
+ .getAlertDefinitions(config)
90
+ .forEach((obj) => {
91
+ extensions.push({ Module: 'Alert', Object: obj });
92
+ });
93
+ this.getCustomSortApi()
94
+ .getCustomSorts(config)
95
+ .forEach((obj) => {
96
+ extensions.push({ Module: 'CustomSort', Object: obj });
97
+ });
98
+ this.getFlashingCellApi()
99
+ .getFlashingCellDefinitions(config)
100
+ .forEach((obj) => {
101
+ extensions.push({ Module: 'FlashingCell', Object: obj });
102
+ });
103
+ this.getFormatColumnApi()
104
+ .getFormatColumns(config)
105
+ .forEach((obj) => {
106
+ extensions.push({ Module: 'FormatColumn', Object: obj });
107
+ });
108
+ this.getPlusMinusApi()
109
+ .getAllPlusMinus(config)
110
+ .forEach((obj) => {
111
+ extensions.push({ Module: 'PlusMinus', Object: obj });
112
+ });
113
+ this.getScheduleApi()
114
+ .getReminderSchedules(config)
115
+ .forEach((obj) => {
116
+ extensions.push({ Module: 'Schedule', Object: obj });
117
+ });
118
+ this.getScheduleApi()
119
+ .getReportSchedules(config)
120
+ .forEach((obj) => {
121
+ extensions.push({ Module: 'Schedule', Object: obj });
122
+ });
123
+ this.getShortcutApi()
124
+ .getShortcuts(config)
125
+ .forEach((obj) => {
126
+ extensions.push({ Module: 'Shortcut', Object: obj });
127
+ });
128
+ this.getStyledColumnApi()
129
+ .getStyledColumns(config)
130
+ .forEach((obj) => {
131
+ extensions.push({ Module: 'StyledColumn', Object: obj });
132
+ });
133
+ return {
134
+ Layout: layout,
135
+ Extensions: extensions,
136
+ };
137
+ }
77
138
  getLayouts() {
78
139
  var _a;
79
140
  return (_a = this.getAdaptableState().Layout.Layouts) !== null && _a !== void 0 ? _a : [];
@@ -43,17 +43,13 @@ export class TeamSharingApiImpl extends ApiBase {
43
43
  }
44
44
  isTeamSharingAvailable() {
45
45
  var _a, _b, _c;
46
- return (!this.getAdaptableApi()
47
- .internalApi.getEntitlementService()
48
- .isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) &&
46
+ return (!this.getAdaptableApi().entitlementApi.isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) &&
49
47
  ((_a = this.adaptable.adaptableOptions.teamSharingOptions) === null || _a === void 0 ? void 0 : _a.enableTeamSharing) &&
50
48
  !!((_b = this.adaptable.adaptableOptions.teamSharingOptions) === null || _b === void 0 ? void 0 : _b.loadSharedEntities) &&
51
49
  !!((_c = this.adaptable.adaptableOptions.teamSharingOptions) === null || _c === void 0 ? void 0 : _c.persistSharedEntities));
52
50
  }
53
51
  hasTeamSharingFullRights() {
54
- return this.getAdaptableApi()
55
- .internalApi.getEntitlementService()
56
- .isModuleFullEntitlement(ModuleConstants.TeamSharingModuleId);
52
+ return this.getAdaptableApi().entitlementApi.isModuleFullEntitlement(ModuleConstants.TeamSharingModuleId);
57
53
  }
58
54
  checkForUpdates() {
59
55
  this.dispatchAction(TeamSharingCheckForUpdates());