@adaptabletools/adaptable-cjs 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 +15 -0
  34. package/src/Api/Internal/ExportInternalApi.d.ts +33 -8
  35. package/src/Api/Internal/ExportInternalApi.js +577 -5
  36. package/src/Api/Internal/NamedQueryInternalApi.d.ts +0 -1
  37. package/src/Api/Internal/NamedQueryInternalApi.js +0 -5
  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 +11 -11
  45. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
  46. package/src/Redux/ActionsReducers/LayoutRedux.js +10 -10
  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 +3 -3
  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 +11 -0
  64. package/src/Utilities/Constants/GeneralConstants.d.ts +41 -4
  65. package/src/Utilities/Constants/GeneralConstants.js +44 -5
  66. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -2
  67. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -6
  68. package/src/Utilities/Extensions/ArrayExtensions.d.ts +14 -0
  69. package/src/Utilities/Extensions/ArrayExtensions.js +68 -1
  70. package/src/Utilities/Extensions/EnumExtensions.d.ts +0 -4
  71. package/src/Utilities/Extensions/EnumExtensions.js +3 -15
  72. package/src/Utilities/Helpers/AdaptableHelper.d.ts +4 -10
  73. package/src/Utilities/Helpers/AdaptableHelper.js +10 -64
  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 +1 -76
  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 +164 -145
  128. package/src/agGrid/AgGridAdapter.d.ts +0 -1
  129. package/src/agGrid/AgGridAdapter.js +7 -10
  130. package/src/agGrid/AgGridColumnAdapter.d.ts +3 -1
  131. package/src/agGrid/AgGridColumnAdapter.js +39 -13
  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.cjs.tsbuildinfo +1 -1
  143. package/src/Redux/ActionsReducers/QueryRedux.d.ts +0 -10
  144. package/src/Redux/ActionsReducers/QueryRedux.js +0 -25
  145. package/src/Utilities/Helpers/FormatContentHelper.d.ts +0 -22
  146. package/src/Utilities/Helpers/FormatContentHelper.js +0 -39
  147. package/src/Utilities/Services/EntitlementService.d.ts +0 -14
  148. package/src/Utilities/Services/EntitlementService.js +0 -67
  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 -2
  152. package/src/Utilities/Services/ReportService.d.ts +0 -41
  153. package/src/Utilities/Services/ReportService.js +0 -608
  154. package/src/Utilities/isAdaptableObject.d.ts +0 -2
  155. package/src/Utilities/isAdaptableObject.js +0 -8
  156. package/src/Utilities/reorder.d.ts +0 -1
  157. package/src/Utilities/reorder.js +0 -17
  158. package/src/Utilities/sortWithOrder.d.ts +0 -11
  159. package/src/Utilities/sortWithOrder.js +0 -54
  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-cjs",
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",
@@ -64,7 +64,7 @@
64
64
  "react-toastify": "9.1.3"
65
65
  },
66
66
  "peerDependencies": {
67
- "ag-grid-community": ">=31.3.1"
67
+ "ag-grid-community": ">=32.1.0"
68
68
  },
69
69
  "publishTimestamp": 0
70
70
  }
@@ -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;
@@ -117,8 +117,8 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
117
117
  }
118
118
  addExternalChartDefinition(chartDefinition, options) {
119
119
  var _a, _b, _c;
120
- const saveStrategy = (_a = options === null || options === void 0 ? void 0 : options.saveStrategy) !== null && _a !== void 0 ? _a : 'manual';
121
- if (saveStrategy === 'auto') {
120
+ const saveChartBehaviour = (_a = options === null || options === void 0 ? void 0 : options.saveChartBehaviour) !== null && _a !== void 0 ? _a : 'manual';
121
+ if (saveChartBehaviour === 'auto') {
122
122
  this.dispatchAction(ChartingRedux.ChartingAddExternalChart(Object.assign(Object.assign({}, chartDefinition), { Name: (_b = chartDefinition.Name) !== null && _b !== void 0 ? _b : this.internalApi.getUniqueChartName() })));
123
123
  }
124
124
  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
  }
@@ -402,5 +402,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
402
402
  getDistinctDisplayValuesForColumn(columnId) {
403
403
  return this.getAdaptableApi().gridApi.internalApi.getDistinctDisplayValuesForColumn(columnId);
404
404
  }
405
+ setColumnCaption(columnId, caption) {
406
+ return this.getAdaptableApi().layoutApi.setColumnCaption(columnId, caption);
407
+ }
405
408
  }
406
409
  exports.ColumnApiImpl = ColumnApiImpl;
@@ -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;
@@ -136,7 +136,13 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
136
136
  adaptableStateKey,
137
137
  predefinedConfig,
138
138
  postLoadHook: (state) => {
139
- return this.adaptable.normalizeAdaptableState(state, this.adaptable.agGridAdapter.getLiveGridOptions());
139
+ const agGridOptions = {
140
+ columnDefs: this.adaptable.agGridAdapter.getGridOption('columnDefs'),
141
+ autoGroupColumnDef: this.adaptable.agGridAdapter.getGridOption('autoGroupColumnDef'),
142
+ rowModelType: this.adaptable.agGridAdapter.getGridOption('rowModelType'),
143
+ treeData: this.adaptable.agGridAdapter.getGridOption('treeData'),
144
+ };
145
+ return this.adaptable.normalizeAdaptableState(state, agGridOptions);
140
146
  },
141
147
  });
142
148
  promise
@@ -285,6 +291,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
285
291
  getFormatColumnState(returnJson = false) {
286
292
  return this.getUserStateByStateKey('FormatColumn', returnJson);
287
293
  }
294
+ getFlashingCellState(returnJson = false) {
295
+ return this.getUserStateByStateKey('FlashingCell', returnJson);
296
+ }
288
297
  getLayoutState(returnJson = false) {
289
298
  return this.getUserStateByStateKey('Layout', returnJson);
290
299
  }
@@ -303,6 +312,12 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
303
312
  getShortcutState(returnJson = false) {
304
313
  return this.getUserStateByStateKey('Shortcut', returnJson);
305
314
  }
315
+ getStatusBarState(returnJson = false) {
316
+ return this.getUserStateByStateKey('StatusBar', returnJson);
317
+ }
318
+ getStyledColumnState(returnJson = false) {
319
+ return this.getUserStateByStateKey('StyledColumn', returnJson);
320
+ }
306
321
  getThemeState(returnJson = false) {
307
322
  return this.getUserStateByStateKey('Theme', returnJson);
308
323
  }
@@ -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;
@@ -2,24 +2,49 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EntitlementApiImpl = void 0;
4
4
  const ApiBase_1 = require("./ApiBase");
5
+ const EntitlementInternalApi_1 = require("../Internal/EntitlementInternalApi");
5
6
  class EntitlementApiImpl extends ApiBase_1.ApiBase {
6
- getEntitlementService() {
7
- return this.getAdaptableApi().internalApi.getEntitlementService();
7
+ constructor(adaptable) {
8
+ super(adaptable);
9
+ this.internalApi = new EntitlementInternalApi_1.EntitlementInternalApi(adaptable);
8
10
  }
9
11
  getEntitlementAccessLevelForModule(adaptableModule) {
10
- return this.getEntitlementService().getEntitlementAccessLevelForModule(adaptableModule);
12
+ let entitlementOptions = this.getEntitlementOptions();
13
+ if (entitlementOptions) {
14
+ const defaultAccessLevelContext = this.getAdaptableApi().internalApi.buildBaseContext();
15
+ const defaultAccessLevel = typeof entitlementOptions.defaultAccessLevel === 'function'
16
+ ? entitlementOptions.defaultAccessLevel(defaultAccessLevelContext)
17
+ : entitlementOptions.defaultAccessLevel;
18
+ const moduleEntitlements = entitlementOptions.moduleEntitlements;
19
+ if (moduleEntitlements) {
20
+ if (typeof moduleEntitlements === 'function') {
21
+ const entitlementContext = Object.assign(Object.assign({ adaptableModule }, this.getAdaptableApi().internalApi.buildBaseContext()), { defaultAccessLevel });
22
+ const dynamicModuleEntitlement = moduleEntitlements(entitlementContext);
23
+ return dynamicModuleEntitlement !== null && dynamicModuleEntitlement !== void 0 ? dynamicModuleEntitlement : defaultAccessLevel;
24
+ }
25
+ else {
26
+ const entitlement = moduleEntitlements.find((f) => f.adaptableModule === adaptableModule);
27
+ if (entitlement) {
28
+ return entitlement.accessLevel;
29
+ }
30
+ }
31
+ }
32
+ // if still here then return their default Access Level
33
+ return defaultAccessLevel;
34
+ }
35
+ return 'Full';
11
36
  }
12
37
  isObjectReadonly(object) {
13
38
  return object.IsReadOnly;
14
39
  }
15
40
  isModuleHiddenEntitlement(adaptableModule) {
16
- return this.getEntitlementService().isModuleHiddenEntitlement(adaptableModule);
41
+ return this.getEntitlementAccessLevelForModule(adaptableModule) == 'Hidden';
17
42
  }
18
43
  isModuleFullEntitlement(adaptableModule) {
19
- return this.getEntitlementService().isModuleFullEntitlement(adaptableModule);
44
+ return this.getEntitlementAccessLevelForModule(adaptableModule) == 'Full';
20
45
  }
21
46
  isModuleReadOnlyEntitlement(adaptableModule) {
22
- return this.getEntitlementService().isModuleReadOnlyEntitlement(adaptableModule);
47
+ return this.getEntitlementAccessLevelForModule(adaptableModule) == 'ReadOnly';
23
48
  }
24
49
  }
25
50
  exports.EntitlementApiImpl = EntitlementApiImpl;
@@ -26,8 +26,8 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
26
26
  }
27
27
  getReportByName(reportName) {
28
28
  // if system report then create
29
- if (this.adaptable.ReportService.IsSystemReport(reportName)) {
30
- return this.adaptable.ReportService.CreateSystemReport(reportName);
29
+ if (this.internalApi.isSystemReport(reportName)) {
30
+ return this.internalApi.createSystemReport(reportName);
31
31
  }
32
32
  else {
33
33
  return this.getReports().find((r) => r.Name == reportName);
@@ -48,14 +48,12 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
48
48
  return currentDestination && this.getDestinationByName(currentDestination);
49
49
  }
50
50
  getAvailableSystemReports() {
51
- return this.getExportOptions().systemReportNames.filter((s) => this.getAdaptableApi().internalApi.getReportService().IsSystemReportActive(s));
51
+ return this.getExportOptions().systemReportNames.filter((s) => this.internalApi.isSystemReportActive(s));
52
52
  }
53
53
  getAvailableExportDestinations() {
54
54
  let systemDestinations = [];
55
55
  this.getExportOptions().systemExportDestinations.forEach((exportDestination) => {
56
- if (this.getAdaptableApi()
57
- .internalApi.getReportService()
58
- .IsSystemExportDestinationActive(exportDestination)) {
56
+ if (this.internalApi.isSystemExportDestinationActive(exportDestination)) {
59
57
  systemDestinations.push(exportDestination);
60
58
  }
61
59
  });
@@ -147,7 +145,7 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
147
145
  this.logWarn(`Report '${reportName}' not found!`);
148
146
  return undefined;
149
147
  }
150
- return this.getAdaptableApi().internalApi.getReportService().getReportData(report);
148
+ return this.internalApi.getReportData(report);
151
149
  }
152
150
  isColumnExportable(adaptableColumn) {
153
151
  const isExportableFn = this.getExportOptions().isColumnExportable;
@@ -384,7 +384,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
384
384
  }
385
385
  isSummaryNode(rowNode) {
386
386
  var _a;
387
- return (_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) === null || _a === void 0 ? void 0 : _a[RowSummary_1.ROW_SUMMARY_ROW_ID];
387
+ return !!((_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) === null || _a === void 0 ? void 0 : _a[RowSummary_1.ROW_SUMMARY_ROW_ID]);
388
388
  }
389
389
  isQuickFilterAvailable() {
390
390
  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;
@@ -78,6 +78,67 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
78
78
  }
79
79
  }
80
80
  }
81
+ getExtendedLayoutByName(layoutName) {
82
+ const layout = this.getLayoutByName(layoutName);
83
+ if (!layout) {
84
+ return undefined;
85
+ }
86
+ const config = {
87
+ includeLayoutNotAssociatedObjects: true,
88
+ associatedWithLayout: layoutName,
89
+ };
90
+ // cannot see a better way than to go through this module by module...
91
+ let extensions = [];
92
+ this.getAlertApi()
93
+ .getAlertDefinitions(config)
94
+ .forEach((obj) => {
95
+ extensions.push({ Module: 'Alert', Object: obj });
96
+ });
97
+ this.getCustomSortApi()
98
+ .getCustomSorts(config)
99
+ .forEach((obj) => {
100
+ extensions.push({ Module: 'CustomSort', Object: obj });
101
+ });
102
+ this.getFlashingCellApi()
103
+ .getFlashingCellDefinitions(config)
104
+ .forEach((obj) => {
105
+ extensions.push({ Module: 'FlashingCell', Object: obj });
106
+ });
107
+ this.getFormatColumnApi()
108
+ .getFormatColumns(config)
109
+ .forEach((obj) => {
110
+ extensions.push({ Module: 'FormatColumn', Object: obj });
111
+ });
112
+ this.getPlusMinusApi()
113
+ .getAllPlusMinus(config)
114
+ .forEach((obj) => {
115
+ extensions.push({ Module: 'PlusMinus', Object: obj });
116
+ });
117
+ this.getScheduleApi()
118
+ .getReminderSchedules(config)
119
+ .forEach((obj) => {
120
+ extensions.push({ Module: 'Schedule', Object: obj });
121
+ });
122
+ this.getScheduleApi()
123
+ .getReportSchedules(config)
124
+ .forEach((obj) => {
125
+ extensions.push({ Module: 'Schedule', Object: obj });
126
+ });
127
+ this.getShortcutApi()
128
+ .getShortcuts(config)
129
+ .forEach((obj) => {
130
+ extensions.push({ Module: 'Shortcut', Object: obj });
131
+ });
132
+ this.getStyledColumnApi()
133
+ .getStyledColumns(config)
134
+ .forEach((obj) => {
135
+ extensions.push({ Module: 'StyledColumn', Object: obj });
136
+ });
137
+ return {
138
+ Layout: layout,
139
+ Extensions: extensions,
140
+ };
141
+ }
81
142
  getLayouts() {
82
143
  var _a;
83
144
  return (_a = this.getAdaptableState().Layout.Layouts) !== null && _a !== void 0 ? _a : [];
@@ -47,17 +47,13 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
47
47
  }
48
48
  isTeamSharingAvailable() {
49
49
  var _a, _b, _c;
50
- return (!this.getAdaptableApi()
51
- .internalApi.getEntitlementService()
52
- .isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) &&
50
+ return (!this.getAdaptableApi().entitlementApi.isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) &&
53
51
  ((_a = this.adaptable.adaptableOptions.teamSharingOptions) === null || _a === void 0 ? void 0 : _a.enableTeamSharing) &&
54
52
  !!((_b = this.adaptable.adaptableOptions.teamSharingOptions) === null || _b === void 0 ? void 0 : _b.loadSharedEntities) &&
55
53
  !!((_c = this.adaptable.adaptableOptions.teamSharingOptions) === null || _c === void 0 ? void 0 : _c.persistSharedEntities));
56
54
  }
57
55
  hasTeamSharingFullRights() {
58
- return this.getAdaptableApi()
59
- .internalApi.getEntitlementService()
60
- .isModuleFullEntitlement(ModuleConstants.TeamSharingModuleId);
56
+ return this.getAdaptableApi().entitlementApi.isModuleFullEntitlement(ModuleConstants.TeamSharingModuleId);
61
57
  }
62
58
  checkForUpdates() {
63
59
  this.dispatchAction((0, TeamSharingRedux_1.TeamSharingCheckForUpdates)());