@adaptabletools/adaptable 12.0.0 → 12.0.2

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 (161) hide show
  1. package/base.css +6 -19
  2. package/bundle.cjs.js +129 -129
  3. package/index.css +7 -23
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -2
  8. package/src/AdaptableOptions/ActionOptions.d.ts +1 -1
  9. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -1
  10. package/src/AdaptableOptions/StateOptions.d.ts +9 -23
  11. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +34 -1
  12. package/src/Api/ChartingApi.d.ts +19 -2
  13. package/src/Api/FilterApi.d.ts +7 -2
  14. package/src/Api/FormatColumnApi.d.ts +6 -6
  15. package/src/Api/GridApi.d.ts +1 -1
  16. package/src/Api/Implementation/ChartingApiImpl.d.ts +6 -0
  17. package/src/Api/Implementation/ChartingApiImpl.js +17 -0
  18. package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -0
  19. package/src/Api/Implementation/ConfigApiImpl.js +11 -0
  20. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -0
  21. package/src/Api/Implementation/FilterApiImpl.js +5 -0
  22. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +3 -3
  23. package/src/Api/Implementation/FormatColumnApiImpl.js +13 -11
  24. package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
  25. package/src/Api/Implementation/GridApiImpl.js +2 -2
  26. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -1
  27. package/src/Api/Implementation/InternalApiImpl.js +16 -3
  28. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -0
  29. package/src/Api/Implementation/TeamSharingApiImpl.js +5 -0
  30. package/src/Api/InternalApi.d.ts +4 -1
  31. package/src/Api/TeamSharingApi.d.ts +4 -0
  32. package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
  33. package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -5
  34. package/src/PredefinedConfig/ChartingState.d.ts +20 -0
  35. package/src/PredefinedConfig/ChartingState.js +2 -0
  36. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +27 -6
  37. package/src/PredefinedConfig/Common/AdaptablePredicate.js +2 -2
  38. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  39. package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -0
  40. package/src/PredefinedConfig/Selection/GridCellRange.d.ts +19 -0
  41. package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
  42. package/src/Redux/ActionsReducers/ChartingRedux.d.ts +23 -0
  43. package/src/Redux/ActionsReducers/ChartingRedux.js +38 -0
  44. package/src/Redux/ActionsReducers/LayoutRedux.js +3 -0
  45. package/src/Redux/Store/AdaptableStore.js +2 -0
  46. package/src/Strategy/AdaptableModuleBase.d.ts +10 -5
  47. package/src/Strategy/AdaptableModuleBase.js +6 -0
  48. package/src/Strategy/AlertModule.d.ts +2 -8
  49. package/src/Strategy/AlertModule.js +6 -3
  50. package/src/Strategy/ChartingModule.js +1 -1
  51. package/src/Strategy/DashboardModule.js +1 -0
  52. package/src/Strategy/ExportModule.js +1 -0
  53. package/src/Strategy/FlashingCellModule.js +3 -3
  54. package/src/Strategy/FormatColumnModule.js +3 -3
  55. package/src/Strategy/GridInfoModule.js +2 -0
  56. package/src/Strategy/Interface/IModule.d.ts +16 -4
  57. package/src/Strategy/LayoutModule.js +2 -0
  58. package/src/Strategy/TeamSharingModule.d.ts +11 -1
  59. package/src/Strategy/TeamSharingModule.js +104 -0
  60. package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
  61. package/src/Utilities/Helpers/FormatHelper.js +6 -2
  62. package/src/Utilities/MenuItem.d.ts +4 -4
  63. package/src/Utilities/ObjectFactory.d.ts +5 -1
  64. package/src/Utilities/ObjectFactory.js +11 -1
  65. package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
  66. package/src/Utilities/Services/ReportService.d.ts +1 -1
  67. package/src/Utilities/Services/ReportService.js +5 -5
  68. package/src/Utilities/Services/TeamSharingService.js +0 -2
  69. package/src/View/AdaptableViewFactory.js +0 -2
  70. package/src/View/Alert/ActiveAlertsPanelItemLabel.d.ts +5 -0
  71. package/src/View/Alert/ActiveAlertsPanelItemLabel.js +22 -0
  72. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +4 -11
  73. package/src/View/ColorPicker.d.ts +1 -1
  74. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  75. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +8 -4
  76. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +13 -1
  77. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +23 -15
  78. package/src/View/Components/Buttons/ButtonDelete.js +3 -3
  79. package/src/View/Components/Buttons/ButtonPause.js +11 -1
  80. package/src/View/Components/FilterForm/QuickFilterForm.js +23 -2
  81. package/src/View/Components/Panels/PanelWithButton.d.ts +2 -1
  82. package/src/View/Components/Panels/PanelWithImage.d.ts +3 -2
  83. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +4 -0
  84. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +1 -1
  85. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -11
  86. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -11
  87. package/src/View/Dashboard/CustomDashboardButton.js +2 -15
  88. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -11
  89. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +13 -9
  90. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +6 -0
  91. package/src/View/GridInfo/GridInfoPopup.js +1 -1
  92. package/src/View/Layout/LayoutEditorStandalonePopup.js +3 -1
  93. package/src/View/Layout/LayoutPopup.d.ts +1 -1
  94. package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
  95. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +2 -27
  96. package/src/View/TeamSharing/SharedEntityDependencies.d.ts +8 -0
  97. package/src/View/TeamSharing/SharedEntityDependencies.js +27 -0
  98. package/src/View/TeamSharing/SharedEntityObjectView.d.ts +9 -0
  99. package/src/View/TeamSharing/SharedEntityObjectView.js +84 -0
  100. package/src/View/TeamSharing/TeamSharingApplyButton.d.ts +6 -0
  101. package/src/View/TeamSharing/TeamSharingApplyButton.js +15 -0
  102. package/src/View/UIHelper.d.ts +2 -2
  103. package/src/agGrid/ActionColumnRenderer.js +5 -11
  104. package/src/agGrid/Adaptable.d.ts +5 -27
  105. package/src/agGrid/Adaptable.js +87 -72
  106. package/src/agGrid/agGridMenuHelper.d.ts +1 -0
  107. package/src/agGrid/agGridMenuHelper.js +15 -4
  108. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +6 -12
  109. package/src/components/AdaptableIconComponent/index.d.ts +2 -1
  110. package/src/components/AdaptableIconComponent/index.js +36 -3
  111. package/src/components/Datepicker/index.d.ts +1 -1
  112. package/src/components/Input/index.d.ts +1 -1
  113. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  114. package/src/components/PopupWithFooter.d.ts +1 -1
  115. package/src/components/SimpleButton/index.js +1 -1
  116. package/src/components/Textarea/index.d.ts +1 -1
  117. package/src/components/icons/{color-drop.d.ts → ends-with.d.ts} +0 -0
  118. package/src/components/icons/{format-letter-ends-with.js → ends-with.js} +0 -0
  119. package/src/components/icons/{filter-outline.d.ts → filter.d.ts} +0 -0
  120. package/src/components/icons/{filter-outline.js → filter.js} +0 -0
  121. package/src/components/icons/index.d.ts +5 -7
  122. package/src/components/icons/index.js +7 -21
  123. package/src/components/icons/{format-letter-ends-with.d.ts → starts-with.d.ts} +0 -0
  124. package/src/components/icons/{format-letter-starts-with.js → starts-with.js} +0 -0
  125. package/src/metamodel/adaptable.metamodel.d.ts +150 -1
  126. package/src/metamodel/adaptable.metamodel.js +1 -1
  127. package/src/types.d.ts +4 -2
  128. package/version.d.ts +1 -1
  129. package/version.js +1 -1
  130. package/src/View/Alert/AlertSharedEntity.d.ts +0 -5
  131. package/src/View/Alert/AlertSharedEntity.js +0 -19
  132. package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.d.ts +0 -5
  133. package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +0 -20
  134. package/src/View/ConditionalStyle/ConditionalStyleSharedEntity.d.ts +0 -5
  135. package/src/View/ConditionalStyle/ConditionalStyleSharedEntity.js +0 -23
  136. package/src/View/CustomSort/CustomSortSharedEntity.d.ts +0 -6
  137. package/src/View/CustomSort/CustomSortSharedEntity.js +0 -24
  138. package/src/View/Export/ExportSharedEntity.d.ts +0 -5
  139. package/src/View/Export/ExportSharedEntity.js +0 -16
  140. package/src/View/Filter/FilterSharedEntity.d.ts +0 -5
  141. package/src/View/Filter/FilterSharedEntity.js +0 -15
  142. package/src/View/FormatColumn/FormatColumnSharedEntity.d.ts +0 -5
  143. package/src/View/FormatColumn/FormatColumnSharedEntity.js +0 -18
  144. package/src/View/FreeTextColumn/FreeTextColumnSharedEntity.d.ts +0 -5
  145. package/src/View/FreeTextColumn/FreeTextColumnSharedEntity.js +0 -24
  146. package/src/View/Layout/LayoutSharedEntity.d.ts +0 -5
  147. package/src/View/Layout/LayoutSharedEntity.js +0 -15
  148. package/src/View/PlusMinus/PlusMinusSharedEntity.d.ts +0 -5
  149. package/src/View/PlusMinus/PlusMinusSharedEntity.js +0 -21
  150. package/src/View/Query/NamedQuerySharedEntity.d.ts +0 -5
  151. package/src/View/Query/NamedQuerySharedEntity.js +0 -19
  152. package/src/View/Shortcut/ShortcutSharedEntity.d.ts +0 -5
  153. package/src/View/Shortcut/ShortcutSharedEntity.js +0 -19
  154. package/src/View/TeamSharing/TeamSharingPopup.d.ts +0 -23
  155. package/src/View/TeamSharing/TeamSharingPopup.js +0 -163
  156. package/src/agGrid/rowEditIcons.d.ts +0 -5
  157. package/src/agGrid/rowEditIcons.js +0 -10
  158. package/src/components/icons/color-drop.js +0 -7
  159. package/src/components/icons/format-letter-starts-with.d.ts +0 -3
  160. package/src/components/icons/pause-red.d.ts +0 -3
  161. package/src/components/icons/pause-red.js +0 -7
package/index.css CHANGED
@@ -2649,7 +2649,7 @@ template {
2649
2649
  --ab-cmp-adaptable-object-compact-list__header__padding: var(--ab-space-2);
2650
2650
  --ab-cmp-adaptable-object-compact-list__header__margin-bottom: var(--ab-space-1);
2651
2651
  --ab-cmp-adaptable-object-compact-list__header__font-size: var(--ab-font-size-4);
2652
- --ab-cmp-adaptable-object-compact-list-item-name__width: 80px;
2652
+ --ab-cmp-adaptable-object-compact-list-item-name__width: 95px;
2653
2653
  --ab-cmp-adaptable-object-compact-list-item-name__padding: var(--ab-space-1);
2654
2654
  --ab-cmp-adaptable-object-compact-list-item-name__margin-right: var(--ab-space-1);
2655
2655
  --ab-cmp-adaptable-object-compact-list-item-name__font-size: var(--ab-font-size-4); }
@@ -2672,6 +2672,10 @@ template {
2672
2672
  --ab-cmp-adaptable-statusbar__font-weight: 400;
2673
2673
  --ab-cmp-adaptable-statusbar__border: 1px solid var(--ab-color-primary); }
2674
2674
 
2675
+ :root {
2676
+ --ab-cmp-adaptable-shared-entity-shared-object__border: 2px solid var(--ab-color-primary);
2677
+ --ab-cmp-adaptable-shared-entity-shared-object__nesting-color: var(--ab-color-primary); }
2678
+
2675
2679
  .ab-Radio-input:focus + svg rect {
2676
2680
  stroke: var(--ab-color-accent);
2677
2681
  stroke-width: 2; }
@@ -4113,28 +4117,8 @@ button.ab-StatusBar__SubPanel:hover {
4113
4117
  background-color: var(--ab-cmp-adaptable-statusbar-sub-panel-icon__background-color-hover);
4114
4118
  cursor: pointer; }
4115
4119
 
4116
- .ab-StatusBar {
4117
- display: flex;
4118
- border-right: var(--ab-cmp-adaptable-statusbar__border);
4119
- border-left: var(--ab-cmp-adaptable-statusbar__border); }
4120
-
4121
- .ab-StatusBar__SubPanel {
4122
- padding: var(--ab-cmp-adaptable-statusbar-sub-panel__padding);
4123
- border: 0;
4124
- background: none;
4125
- font-weight: 400;
4126
- border-right: var(--ab-cmp-adaptable-statusbar__border); }
4127
-
4128
- .ab-StatusBar__SubPanel:last-child {
4129
- border-right: 0; }
4130
-
4131
- .ab-StatusBar__SubPanel,
4132
- .ab-StatusBar__SubPanel .ab-SimpleButton {
4133
- color: var(--ab-cmp-adaptable-statusbar__color); }
4134
-
4135
- button.ab-StatusBar__SubPanel:hover {
4136
- background-color: var(--ab-cmp-adaptable-statusbar-sub-panel-icon__background-color-hover);
4137
- cursor: pointer; }
4120
+ .ab-Shared-Entity-Shared-Object {
4121
+ border: var(--ab-cmp-adaptable-shared-entity-shared-object__border); }
4138
4122
 
4139
4123
  .ab-alert--error {
4140
4124
  background: var(--ab-color-error); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "12.0.0",
3
+ "version": "12.0.2",
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: 1655715935913;
1
+ declare const _default: 1656835883968;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1655715935913;
3
+ exports.default = 1656835883968;
@@ -1,4 +1,4 @@
1
- import { Column, GridOptions, RowNode } from '@ag-grid-community/all-modules';
1
+ import { ChartModel, ChartRef, Column, GridOptions, RowNode } from '@ag-grid-community/all-modules';
2
2
  import { AdaptableApi } from '../Api/AdaptableApi';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
@@ -160,7 +160,7 @@ export interface IAdaptable {
160
160
  getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
161
161
  getRawValueFromRowNode(rowNode: RowNode, columnId: string): any;
162
162
  getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): string | undefined;
163
- getDisplayValueFromRawValue(columnId: string, rawValue: any): string | undefined;
163
+ getDisplayValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
164
164
  getDataRowFromRowNode(rowNode: RowNode): any;
165
165
  getRowNodesForPrimaryKeys(primaryKeyValues: any[]): RowNode[];
166
166
  getRowNodeForPrimaryKey(primaryKeyValue: any): RowNode;
@@ -243,4 +243,6 @@ export interface IAdaptable {
243
243
  skipSetupColumns?: boolean;
244
244
  }): void;
245
245
  getAgGridColumnForColumnId(columnId: string): Column;
246
+ showCharts(charts: ChartModel[]): ChartRef[];
247
+ getChartModels(): ChartModel[];
246
248
  }
@@ -131,7 +131,7 @@ export interface ActionRowFormOptions {
131
131
  /**
132
132
  * Custom form buttons provider. If provided, the custom implementation is responsible for firing the 'ActionRowSubmitted' and/or invoking the 'onFormSubmit' callback (if necessary).
133
133
  */
134
- formButtons?: AdaptableButton<FormContext>[];
134
+ formButtons?: AdaptableButton<ActionRowContext>[];
135
135
  /**
136
136
  * Function which is invoked when the form in an Action Row is submitted via a standard button (provided by AdapTable). This is not invoked when custom form buttons are provided!
137
137
  *
@@ -13,7 +13,7 @@ export interface AdaptableQLOptions {
13
13
  */
14
14
  caseSensitiveTextComparisons?: boolean;
15
15
  /**
16
- * Which searching and filtering options should take place on server
16
+ * Which searching and filtering Modules should take place on server
17
17
  *
18
18
  * @defaultValue undefined
19
19
  * @gridInfoItem
@@ -3,30 +3,22 @@ import { AdaptableState } from '../PredefinedConfig/AdaptableState';
3
3
  * Options related to Adaptable State hydration/dehydration - allows users to intercept state persistence and state loading with custom functionality
4
4
  */
5
5
  export interface StateOptions {
6
- /**
7
- * Allows the customization of state persistence
8
- *
9
- * @defaultValue persists state to local storage
10
- */
11
- persistState?: AdaptablePersistStateFunction;
12
6
  /**
13
7
  * Allows the customization of Adaptable State loading
14
- *
15
- * @defaultValue loads state from local storage
16
8
  */
17
9
  loadState?: AdaptableLoadStateFunction;
10
+ /**
11
+ * Allows hooking into Adaptable State hydration
12
+ */
13
+ applyState?: (state: any) => any;
18
14
  /**
19
15
  * Allows the customization of the Adaptable State that is going to be persisted
20
- *
21
- * @defaultValue undefined
22
16
  */
23
17
  saveState?: AdaptableSaveStateFunction;
24
18
  /**
25
- * Allows hooking into Adaptable State hydration
26
- *
27
- * @defaultValue undefined
19
+ * Allows the customization of Adaptable State persistence
28
20
  */
29
- applyState?: (state: any) => any;
21
+ persistState?: AdaptablePersistStateFunction;
30
22
  /**
31
23
  * Allows clearing of remote Adaptable State
32
24
  *
@@ -49,9 +41,7 @@ export declare type AdaptableStateFunctionConfig = {
49
41
  url?: string;
50
42
  };
51
43
  /**
52
- * Allows the customization of state persistence.
53
- *
54
- * Used by the `persistState` function property in StateOptions
44
+ * Allows customization of state persistence - used `persistState` function in StateOptions
55
45
  *
56
46
  * @example
57
47
  * ```
@@ -73,17 +63,13 @@ export interface AdaptableClearStateFunction {
73
63
  ({ adaptableId, adaptableStateKey, userName, url }: AdaptableStateFunctionConfig): Promise<any>;
74
64
  }
75
65
  /**
76
- * Allows the customization of state persistence.
77
- *
78
- * Used by the `saveState` function property in StateOptions
66
+ * Allows the customization state persistence - used by `saveState` function in StateOptions
79
67
  */
80
68
  export interface AdaptableSaveStateFunction {
81
69
  (state: AdaptableState, { adaptableId, adaptableStateKey, userName, url }: AdaptableStateFunctionConfig): any;
82
70
  }
83
71
  /**
84
- * Allows the customization of state loading.
85
- *
86
- * Userd by the `loadState` function property in StateOptions
72
+ * Allows customization of state loading - used by `loadState` function in StateOptions
87
73
  */
88
74
  export interface AdaptableLoadStateFunction {
89
75
  (config: AdaptableStateFunctionConfig): Promise<any>;
@@ -5,6 +5,7 @@ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
5
5
  import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
6
6
  import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
7
7
  import { BaseContext, GridCell } from '../../types';
8
+ import { RowNode } from '@ag-grid-community/all-modules';
8
9
  /**
9
10
  * Options for managing the User Interface of AdapTable
10
11
  */
@@ -182,9 +183,41 @@ export declare type GridInfoSections = GridInfoSection[];
182
183
  export declare type GridInfoSection = 'GridSummary' | 'AdaptableOptions' | 'ColumnInfo' | 'AdaptableObjectsSummary';
183
184
  export interface ObjectTagsContext extends BaseContext {
184
185
  }
186
+ /**
187
+ * Provides Custom Display Formats
188
+ */
185
189
  export declare type CustomDisplayFormatter = {
190
+ /**
191
+ * Id of the Formatted
192
+ */
186
193
  id: string;
194
+ /**
195
+ * Description
196
+ */
187
197
  label?: string;
188
- handler: (value: any) => any;
198
+ /**
199
+ * Function used to perform the Custom Display Format
200
+ */
201
+ handler: (customDisplayFormatterContext: CustomDisplayFormatterContext) => any;
202
+ /**
203
+ * Where the Custom Display Format can be applied
204
+ */
189
205
  scope: AdaptableScope;
190
206
  };
207
+ /**
208
+ * Context used in handler of CustomDisplayFormatter
209
+ */
210
+ export interface CustomDisplayFormatterContext extends BaseContext {
211
+ /**
212
+ * Column where Custom Display Format will apply
213
+ */
214
+ adaptableColumn: AdaptableColumn;
215
+ /**
216
+ * Non-formatted Cell Value
217
+ */
218
+ cellValue: any;
219
+ /**
220
+ * Node where Custom Display Format will apply
221
+ */
222
+ rowNode: RowNode;
223
+ }
@@ -1,9 +1,26 @@
1
+ import { ChartModel, ChartRef } from '@ag-grid-community/all-modules';
1
2
  /**
2
- * Provides run-time access to Charting Module and state
3
+ * Provides run-time access to Charting Module and related State
3
4
  */
4
5
  export interface ChartingApi {
5
6
  /**
6
- * Whether this Adaptable instance has Charting functions available.
7
+ * Whether AdapTable's charting functionality is available
7
8
  */
8
9
  isChartingEnabled(): boolean;
10
+ /**
11
+ * Retrieves current user-generated Charts
12
+ */
13
+ getCurrentCharts(): ChartModel[];
14
+ /**
15
+ * Retrieves persisted Charts from Adaptable State
16
+ */
17
+ getPersistedCharts(): ChartModel[];
18
+ /**
19
+ * Saves all current Charts into Adaptable State
20
+ */
21
+ saveCurrentCharts(): void;
22
+ /**
23
+ * Displays all persisted Charts
24
+ */
25
+ showPersistedCharts(): ChartRef[];
9
26
  }
@@ -42,10 +42,15 @@ export interface FilterApi {
42
42
  */
43
43
  isQuickFilterVisible(): boolean;
44
44
  /**
45
- * Retrieves all the Column Filters in the Column Filter State (of Predefined Config)
45
+ * Retrieves all Column Filters in currently applied Layout
46
46
  * @returns column filters
47
47
  */
48
48
  getColumnFilters(): ColumnFilter[];
49
+ /**
50
+ * Retrieves all Column Filters in a given Layout
51
+ * @param layoutName Layout to retrieve Column Filters for
52
+ */
53
+ getColumnFiltersForLayout(layoutName: string): ColumnFilter[];
49
54
  /**
50
55
  * Sets Column Filters - will replace filters for existing column and leave other column filters in place
51
56
  * @param columnFilters Column Filters to set
@@ -72,7 +77,7 @@ export interface FilterApi {
72
77
  */
73
78
  clearColumnFilters(): void;
74
79
  /**
75
- * Clears existing Column Filters and then sets the new ones
80
+ * Clears existing Column Filters and sets new ones
76
81
  * @param columnFilters Column Filters to set
77
82
  */
78
83
  clearAndSetColumnFilter(columnFilters: ColumnFilter[]): void;
@@ -181,22 +181,22 @@ export interface FormatColumnApi {
181
181
  /**
182
182
  * Format value according to format options.
183
183
  *
184
- * @param value value to format
184
+ * @param customDisplayFormatterContext context that includes value to format
185
185
  * @param options formatter options
186
186
  */
187
- getNumberFormattedValue(value: any, options: AdaptableFormat['Options']): any;
187
+ getNumberFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): any;
188
188
  /**
189
189
  * Format value according to format options.
190
190
  *
191
- * @param value value to format
191
+ * @param value context that includes value to format
192
192
  * @param options formatter options
193
193
  */
194
- getStringFormattedValue(value: any, options: AdaptableFormat['Options']): string;
194
+ getStringFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
195
195
  /**
196
196
  * Format value according to format options.
197
197
  *
198
- * @param value value to format
198
+ * @param customDisplayFormatterContext context that includes value to format
199
199
  * @param options formatter options
200
200
  */
201
- getDateFormattedValue(value: any, options: AdaptableFormat['Options']): string;
201
+ getDateFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
202
202
  }
@@ -262,7 +262,7 @@ export interface GridApi {
262
262
  * @param columnId ColumnId to lookup
263
263
  * @param rawValue Raw Value
264
264
  */
265
- getFormattedValueFromRawValue(columnId: string, rawValue: any): string | undefined;
265
+ getFormattedValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
266
266
  /**
267
267
  * Retrieves Display Value for Cell in given Row and Column
268
268
  * @param rowNode Row to use
@@ -1,5 +1,11 @@
1
+ import { ChartModel } from '@ag-grid-community/core';
1
2
  import { ChartingApi } from '../ChartingApi';
2
3
  import { ApiBase } from './ApiBase';
4
+ import { ChartRef } from '@ag-grid-community/all-modules';
3
5
  export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
4
6
  isChartingEnabled(): boolean;
7
+ getCurrentCharts(): ChartModel[];
8
+ saveCurrentCharts(): void;
9
+ getPersistedCharts(): ChartModel[];
10
+ showPersistedCharts(): ChartRef[];
5
11
  }
@@ -1,10 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChartingApiImpl = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const ApiBase_1 = require("./ApiBase");
6
+ const ChartingRedux = tslib_1.__importStar(require("./../../Redux/ActionsReducers/ChartingRedux"));
7
+ const ChartingRedux_1 = require("./../../Redux/ActionsReducers/ChartingRedux");
5
8
  class ChartingApiImpl extends ApiBase_1.ApiBase {
6
9
  isChartingEnabled() {
7
10
  return this.adaptable.canGenerateCharts();
8
11
  }
12
+ getCurrentCharts() {
13
+ return this.adaptable.getChartModels();
14
+ }
15
+ saveCurrentCharts() {
16
+ const currentCharts = this.getCurrentCharts();
17
+ this.dispatchAction(ChartingRedux.ChartingSetChartModels(currentCharts));
18
+ }
19
+ getPersistedCharts() {
20
+ return ChartingRedux_1.ChartingGetChartModels(this.getAdaptableState()).map((chart) => chart.model);
21
+ }
22
+ showPersistedCharts() {
23
+ const persistedCharts = this.getPersistedCharts();
24
+ return this.adaptable.showCharts(persistedCharts);
25
+ }
9
26
  }
10
27
  exports.ChartingApiImpl = ChartingApiImpl;
@@ -22,6 +22,7 @@ import { AdaptableSearchState, ScheduleState } from '../../types';
22
22
  import { AdaptableSortState } from '../Events/SearchChanged';
23
23
  import { QueryState } from '../../PredefinedConfig/QueryState';
24
24
  import { PredefinedConfig } from '../../PredefinedConfig/PredefinedConfig';
25
+ import { ChartingState } from '../../PredefinedConfig/ChartingState';
25
26
  export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
26
27
  configInit(): void;
27
28
  copyAllStateToClipboard(): void;
@@ -47,6 +48,7 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
47
48
  getAlertState(returnJson?: boolean): AlertState;
48
49
  getApplicationState(returnJson?: boolean): ApplicationState;
49
50
  getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;
51
+ getChartingState(returnJson?: boolean): ChartingState;
50
52
  getConditionalStyleState(returnJson?: boolean): ConditionalStyleState;
51
53
  getCustomSortState(returnJson?: boolean): CustomSortState;
52
54
  getDashboardState(returnJson?: boolean): DashboardState;
@@ -11,6 +11,7 @@ const DashboardRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers
11
11
  const AlertRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/AlertRedux"));
12
12
  const BulkUpdateRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/BulkUpdateRedux"));
13
13
  const CalculatedColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CalculatedColumnRedux"));
14
+ const ChartingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ChartingRedux"));
14
15
  const ConditionalStyleRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ConditionalStyleRedux"));
15
16
  const CustomSortRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CustomSortRedux"));
16
17
  const ExportRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ExportRedux"));
@@ -154,6 +155,10 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
154
155
  return returnJson
155
156
  ? JSON.stringify(this.getAdaptableState().CalculatedColumn)
156
157
  : this.getAdaptableState().CalculatedColumn;
158
+ case 'Charting':
159
+ return returnJson
160
+ ? JSON.stringify(this.getAdaptableState().Charting)
161
+ : this.getAdaptableState().Charting;
157
162
  case 'ConditionalStyle':
158
163
  return returnJson
159
164
  ? JSON.stringify(this.getAdaptableState().ConditionalStyle)
@@ -231,6 +236,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
231
236
  getCalculatedColumnState(returnJson = false) {
232
237
  return this.getUserStateByStateKey('CalculatedColumn', returnJson);
233
238
  }
239
+ getChartingState(returnJson = false) {
240
+ return this.getUserStateByStateKey('Charting', returnJson);
241
+ }
234
242
  getConditionalStyleState(returnJson = false) {
235
243
  return this.getUserStateByStateKey('ConditionalStyle', returnJson);
236
244
  }
@@ -284,6 +292,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
284
292
  case 'CalculatedColumn':
285
293
  this.dispatchAction(CalculatedColumnRedux.CalculatedColumnReady(this.getCalculatedColumnState()));
286
294
  break;
295
+ case 'Charting':
296
+ this.dispatchAction(ChartingRedux.ChartingReady(this.getChartingState()));
297
+ break;
287
298
  case 'ConditionalStyle':
288
299
  this.dispatchAction(ConditionalStyleRedux.ConditionalStyleReady(this.getConditionalStyleState()));
289
300
  break;
@@ -15,6 +15,7 @@ export declare class FilterApiImpl extends ApiBase implements FilterApi {
15
15
  isQuickFilterAvailable(): boolean;
16
16
  isQuickFilterVisible(): boolean;
17
17
  getColumnFilters(): ColumnFilter[];
18
+ getColumnFiltersForLayout(layoutName: string): ColumnFilter[];
18
19
  setColumnFilter(columnFilters: ColumnFilter[]): ColumnFilter[] | null;
19
20
  clearColumnFilter(columnFilter: ColumnFilter): void;
20
21
  clearColumnFilterByColumns(columns: string[]): void;
@@ -47,6 +47,11 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
47
47
  const currentLayout = this.adaptable.api.layoutApi.getCurrentLayout();
48
48
  return (_a = currentLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
49
49
  }
50
+ getColumnFiltersForLayout(layoutName) {
51
+ var _a;
52
+ const layout = this.adaptable.api.layoutApi.getLayoutByName(layoutName);
53
+ return (_a = layout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
54
+ }
50
55
  setColumnFilter(columnFilters) {
51
56
  columnFilters.forEach((columnFilter) => {
52
57
  if (!columnFilter.Predicate) {
@@ -45,7 +45,7 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
45
45
  isCheckBoxStyleFormatColumn(column: AdaptableColumn): boolean;
46
46
  fireCheckboxColumnClickedEvent(columnId: string, rowData: any, primaryKeyValue: any, isChecked: boolean): void;
47
47
  private applyCustomFormatters;
48
- getNumberFormattedValue(value: any, options: AdaptableFormat['Options']): string;
49
- getStringFormattedValue(value: any, options: AdaptableFormat['Options']): string;
50
- getDateFormattedValue(value: any, options: AdaptableFormat['Options']): string;
48
+ getNumberFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
49
+ getStringFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
50
+ getDateFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
51
51
  }
@@ -9,6 +9,7 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exten
9
9
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
10
10
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
11
11
  const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
12
+ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
12
13
  class FormatColumnApiImpl extends ApiBase_1.ApiBase {
13
14
  getFormatColumnState() {
14
15
  return this.getAdaptableState().FormatColumn;
@@ -273,7 +274,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
273
274
  };
274
275
  this.adaptable.api.eventApi.emit('CheckboxColumnClicked', checkboxColumnClickedInfo);
275
276
  }
276
- applyCustomFormatters(value, options) {
277
+ applyCustomFormatters(value, node, abColumn, options) {
277
278
  var _a, _b, _c;
278
279
  const columnCustomFormatters = (_a = options === null || options === void 0 ? void 0 : options.CustomDisplayFormats) !== null && _a !== void 0 ? _a : [];
279
280
  if (!(columnCustomFormatters === null || columnCustomFormatters === void 0 ? void 0 : columnCustomFormatters.length)) {
@@ -283,23 +284,24 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
283
284
  const customFormattersFromOptions = (_c = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.userInterfaceOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters) !== null && _c !== void 0 ? _c : [];
284
285
  // formatters are applied in the order they are defined in the options
285
286
  const customFormatters = customFormattersFromOptions.filter((customFormatterOption) => columnCustomFormatters.includes(customFormatterOption.id));
286
- return customFormatters.reduce((acc, formatter) => {
287
+ const customDisplayFormatterContext = ObjectFactory_1.default.CreateCustomDisplayFormatterContext(value, node, abColumn, this.getAdaptableApi());
288
+ return customFormatters.reduce((context, formatter) => {
287
289
  if (formatter && formatter.handler) {
288
- return formatter.handler(acc);
290
+ return formatter.handler(context);
289
291
  }
290
- return acc;
291
- }, value);
292
+ return context.cellValue;
293
+ }, customDisplayFormatterContext);
292
294
  }
293
- getNumberFormattedValue(value, options) {
294
- let preparedValue = this.applyCustomFormatters(value, options);
295
+ getNumberFormattedValue(value, node, abColumn, options) {
296
+ const preparedValue = this.applyCustomFormatters(value, node, abColumn, options);
295
297
  return FormatHelper_1.default.NumberFormatter(preparedValue, options);
296
298
  }
297
- getStringFormattedValue(value, options) {
298
- let preparedValue = this.applyCustomFormatters(value, options);
299
+ getStringFormattedValue(value, node, abColumn, options) {
300
+ const preparedValue = this.applyCustomFormatters(value, node, abColumn, options);
299
301
  return FormatHelper_1.default.StringFormatter(preparedValue, options);
300
302
  }
301
- getDateFormattedValue(value, options) {
302
- let preparedValue = this.applyCustomFormatters(value, options);
303
+ getDateFormattedValue(value, node, abColumn, options) {
304
+ const preparedValue = this.applyCustomFormatters(value, node, abColumn, options);
303
305
  return FormatHelper_1.default.DateFormatter(preparedValue, options);
304
306
  }
305
307
  }
@@ -65,7 +65,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
65
65
  getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
66
66
  getRawValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
67
67
  getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
68
- getFormattedValueFromRawValue(columnId: string, rawValue: any): string | undefined;
68
+ getFormattedValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
69
69
  getNormalisedValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
70
70
  getRowNodesForPrimaryKeys(primaryKeyValues: any[]): RowNode[];
71
71
  getRowNodeForPrimaryKey(primaryKeyValue: any): RowNode;
@@ -200,8 +200,8 @@ class GridApiImpl extends ApiBase_1.ApiBase {
200
200
  getDisplayValueFromRowNode(rowNode, columnId) {
201
201
  return this.adaptable.getDisplayValueFromRowNode(rowNode, columnId);
202
202
  }
203
- getFormattedValueFromRawValue(columnId, rawValue) {
204
- return this.adaptable.getDisplayValueFromRawValue(columnId, rawValue);
203
+ getFormattedValueFromRawValue(rowNode, columnId, rawValue) {
204
+ return this.adaptable.getDisplayValueFromRawValue(rowNode, columnId, rawValue);
205
205
  }
206
206
  getNormalisedValueFromRowNode(rowNode, columnId) {
207
207
  const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
@@ -114,7 +114,10 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
114
114
  getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
115
115
  getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
116
116
  getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
117
- getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
117
+ getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext, defaultWidthHeight?: {
118
+ height: number | string;
119
+ width: number | string;
120
+ }): AdaptableIcon | undefined;
118
121
  isDocumentationLinksDisplayed(): boolean;
119
122
  getQueryPreviewData(): any;
120
123
  getLocalTeamSharingEntities(): SharedEntity[];
@@ -16,6 +16,7 @@ const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
16
16
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
17
17
  const AdaptableAlert_1 = require("../../PredefinedConfig/Common/AdaptableAlert");
18
18
  const waitForCondition_1 = require("../../Utilities/waitForCondition");
19
+ const AdaptableIconComponent_1 = require("../../components/AdaptableIconComponent");
19
20
  class InternalApiImpl extends ApiBase_1.ApiBase {
20
21
  getSystemState() {
21
22
  return this.getAdaptableState().System;
@@ -360,16 +361,28 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
360
361
  return button.buttonStyle;
361
362
  }
362
363
  }
363
- getIconForButton(button, context) {
364
+ getIconForButton(button, context, defaultWidthHeight) {
365
+ var _a, _b;
364
366
  if (!button.icon) {
365
367
  return;
366
368
  }
369
+ let buttonIcon;
367
370
  if (button.icon != null && typeof button.icon === 'function') {
368
- return button.icon(button, context);
371
+ buttonIcon = button.icon(button, context);
369
372
  }
370
373
  else {
371
- return button.icon;
374
+ buttonIcon = button.icon;
375
+ }
376
+ if (!buttonIcon) {
377
+ return;
378
+ }
379
+ if (AdaptableIconComponent_1.isAdaptableInternalIcon(buttonIcon) || AdaptableIconComponent_1.isAdaptableExternalIcon(buttonIcon)) {
380
+ const defaultIconWidth = (_a = defaultWidthHeight === null || defaultWidthHeight === void 0 ? void 0 : defaultWidthHeight.width) !== null && _a !== void 0 ? _a : 'var(--ab-cmp-simple-button__width)';
381
+ const defaultIconHeight = (_b = defaultWidthHeight === null || defaultWidthHeight === void 0 ? void 0 : defaultWidthHeight.height) !== null && _b !== void 0 ? _b : 'var(--ab-cmp-simple-button__height)';
382
+ const buttonIconStyle = Object.assign({}, { width: defaultIconWidth, height: defaultIconHeight }, buttonIcon.style);
383
+ buttonIcon.style = buttonIconStyle;
372
384
  }
385
+ return buttonIcon;
373
386
  }
374
387
  isDocumentationLinksDisplayed() {
375
388
  return this.adaptable.adaptableOptions.userInterfaceOptions.showDocumentationLinks;
@@ -15,5 +15,6 @@ export declare class TeamSharingApiImpl extends ApiBase implements TeamSharingAp
15
15
  importSharedEntry(sharedEntity: SharedEntity): void;
16
16
  private getTeamSharingState;
17
17
  getLoadedSharedEntities(): SharedEntity[];
18
+ getSharedEntryDependencies(sharedEntity: SharedEntity): SharedEntity[];
18
19
  triggerLoadingTeamSharingEntries(): void;
19
20
  }
@@ -78,6 +78,11 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
78
78
  getLoadedSharedEntities() {
79
79
  return this.getTeamSharingState().SharedEntities;
80
80
  }
81
+ getSharedEntryDependencies(sharedEntity) {
82
+ var _a;
83
+ const allEntities = this.getLoadedSharedEntities();
84
+ return ((_a = sharedEntity === null || sharedEntity === void 0 ? void 0 : sharedEntity.EntityDependencyIds) !== null && _a !== void 0 ? _a : []).map((id) => allEntities.find((entity) => entity.Uuid === id));
85
+ }
81
86
  triggerLoadingTeamSharingEntries() {
82
87
  this.adaptable.api.internalApi.dispatchReduxAction(TeamSharingRedux.TeamSharingGet());
83
88
  }
@@ -117,7 +117,10 @@ export interface InternalApi {
117
117
  getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
118
118
  getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
119
119
  getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
120
- getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
120
+ getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext, defaultWidthHeight?: {
121
+ height: number | string;
122
+ width: number | string;
123
+ }): AdaptableIcon | undefined;
121
124
  dispatchReduxAction(action: Action): void;
122
125
  waitForTeamSharingImportEnd(): Promise<boolean>;
123
126
  getLocalTeamSharingEntities(): SharedEntity[];
@@ -69,4 +69,8 @@ export interface TeamSharingApi {
69
69
  * By default shared entries are loaded when the Team Sharing popup is visible.
70
70
  */
71
71
  triggerLoadingTeamSharingEntries(): void;
72
+ /**
73
+ * Retrieves shared entry dependencies.
74
+ */
75
+ getSharedEntryDependencies(sharedEntry: SharedEntity): SharedEntity[];
72
76
  }