@adaptabletools/adaptable 18.0.0-canary.23 → 18.0.0-canary.24

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "18.0.0-canary.23",
3
+ "version": "18.0.0-canary.24",
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",
@@ -29,7 +29,9 @@ export declare abstract class AdaptablePlugin {
29
29
  afterInitOptions(adaptable: IAdaptable, adaptableOptions: AdaptableOptions): void;
30
30
  afterInitApi(adaptable: IAdaptable, api: AdaptableApi): void;
31
31
  afterInitServices(adaptable: IAdaptable): void;
32
+ afterInitialStateLoaded(adaptable: IAdaptable): void;
32
33
  afterInitModules(adaptable: IAdaptable, strategies: Map<AdaptableModule, IModule>): void;
34
+ afterInitStore(adaptable: IAdaptable): void;
33
35
  afterInit(ab: IAdaptable): void;
34
36
  afterSetLayout(adaptable: IAdaptable, layout: Layout): void;
35
37
  onStoreEvent(eventName: string, data: {
@@ -29,7 +29,9 @@ export class AdaptablePlugin {
29
29
  afterInitOptions(adaptable, adaptableOptions) { }
30
30
  afterInitApi(adaptable, api) { }
31
31
  afterInitServices(adaptable) { }
32
+ afterInitialStateLoaded(adaptable) { }
32
33
  afterInitModules(adaptable, strategies) { }
34
+ afterInitStore(adaptable) { }
33
35
  afterInit(ab) { }
34
36
  // hook executed after each layout update (Adaptable.setLayout())
35
37
  afterSetLayout(adaptable, layout) { }
@@ -34,7 +34,7 @@ export interface StateOptions {
34
34
  */
35
35
  debounceStateDelay?: number;
36
36
  /**
37
- * Automatically migrate the state from the previous version of Adaptable to the current version.
37
+ * Automatically migrate State from previous AdapTable version to current one
38
38
  *
39
39
  * @defaultValue true
40
40
  */
@@ -271,4 +271,8 @@ export interface ColumnApi {
271
271
  * @param columnType the columnType to filter by
272
272
  */
273
273
  getColumnsByColumnType(columnType: string): AdaptableColumn[];
274
+ /**
275
+ * Returns all columns currently Row Grouped
276
+ */
277
+ getRowGroupedColumns(): AdaptableColumn[];
274
278
  }
@@ -366,6 +366,10 @@ export interface GridApi {
366
366
  * Whether Grid is currently showing Row Groups
367
367
  */
368
368
  isGridRowGrouped(): boolean;
369
+ /**
370
+ * Whether Grid is currently in Pivot Mode
371
+ */
372
+ isGridInPivotMode(): boolean;
369
373
  /**
370
374
  * Whether given Row Node is a Row Group
371
375
  * @param rowNode Node to check
@@ -67,4 +67,5 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
67
67
  openColumnInfoSettingsPanel(): void;
68
68
  getColumnTypes(): string[];
69
69
  getColumnsByColumnType(columnType: string): AdaptableColumn[];
70
+ getRowGroupedColumns(): AdaptableColumn[];
70
71
  }
@@ -356,4 +356,11 @@ export class ColumnApiImpl extends ApiBase {
356
356
  return ((_a = c.columnTypes) !== null && _a !== void 0 ? _a : []).includes(columnType);
357
357
  });
358
358
  }
359
+ getRowGroupedColumns() {
360
+ var _a;
361
+ return (_a = this.getLayoutApi()
362
+ .getCurrentRowGroupsColumnIds()) === null || _a === void 0 ? void 0 : _a.map((n) => {
363
+ return this.getColumnWithColumnId(n);
364
+ });
365
+ }
359
366
  }
@@ -95,6 +95,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
95
95
  isGridGroupable(): boolean;
96
96
  isGridSelectable(): boolean;
97
97
  isGridRowGrouped(): boolean;
98
+ isGridInPivotMode(): boolean;
98
99
  isGroupRowNode(rowNode: IRowNode): boolean;
99
100
  isQuickFilterAvailable(): boolean;
100
101
  redrawGrid(): void;
@@ -356,6 +356,9 @@ export class GridApiImpl extends ApiBase {
356
356
  isGridRowGrouped() {
357
357
  return this.adaptable.isGridGroupingActive();
358
358
  }
359
+ isGridInPivotMode() {
360
+ return this.getLayoutApi().isCurrentLayoutPivot();
361
+ }
359
362
  isGroupRowNode(rowNode) {
360
363
  return this.adaptable.isGroupRowNode(rowNode);
361
364
  }
@@ -16,6 +16,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
16
16
  [key: string]: boolean;
17
17
  };
18
18
  getCurrentVisibleColumnIds(): string[];
19
+ getCurrentRowGroupsColumnIds(): string[];
19
20
  setLayout(layoutName: string): void;
20
21
  getCurrentLayout(): Layout;
21
22
  getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
@@ -34,6 +34,9 @@ export class LayoutApiImpl extends ApiBase {
34
34
  getCurrentVisibleColumnIds() {
35
35
  return this.getCurrentLayout().Columns;
36
36
  }
37
+ getCurrentRowGroupsColumnIds() {
38
+ return this.getCurrentLayout().RowGroupedColumns;
39
+ }
37
40
  setLayout(layoutName) {
38
41
  if (StringExtensions.IsNotNullOrEmpty(layoutName) &&
39
42
  layoutName !== this.getCurrentLayoutName()) {
@@ -42,6 +42,10 @@ export interface LayoutApi {
42
42
  * Retrieves array of visible ColumnIds in current Layout
43
43
  */
44
44
  getCurrentVisibleColumnIds(): string[];
45
+ /**
46
+ * Retrieves array of visible ColumnIds in current Layout
47
+ */
48
+ getCurrentRowGroupsColumnIds(): string[];
45
49
  /**
46
50
  * Retrieves name of current Layout
47
51
  */
@@ -10,11 +10,11 @@ export type AdaptableContextMenuItemName = (typeof ADAPTABLE_CONTEXT_MENU_ITEMS)
10
10
  /**
11
11
  * List of Shipped Adaptable Column Menu Items
12
12
  */
13
- export declare const ADAPTABLE_COLUMN_MENU_ITEMS: readonly ["calculated-column-edit", "cell-summary-show", "column-filter-bar-hide", "column-filter-bar-show", "column-filter-clear", "column-filter-on-cell-value", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "custom-sort-add", "custom-sort-edit", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "flashing-cell-add", "flashing-cell-delete", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info-show", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid-parent", "layout-select-parent", "layout-select-all", "plus-minus-add", "settings-panel-open", "styled-column-badge-add", "styled-column-badge-edit", "styled-column-gradient-add", "styled-column-gradient-edit", "styled-column-percent-bar-add", "styled-column-percent-bar-edit", "styled-column-sparkline-add", "styled-column-sparkline-edit", "system-status-show", "internal", "parent"];
13
+ export declare const ADAPTABLE_COLUMN_MENU_ITEMS: readonly ["calculated-column-edit", "cell-summary-show", "column-filter-parent", "column-filter-bar-hide", "column-filter-bar-show", "column-filter-clear", "column-filter-on-cell-value", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "custom-sort-add", "custom-sort-edit", "dashboard-parent", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "flashing-cell-add", "flashing-cell-delete", "format-column-parent", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info-show", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid-parent", "layout-select-parent", "layout-select-all", "plus-minus-add", "settings-panel-open", "styled-column-parent", "styled-column-badge-add", "styled-column-badge-edit", "styled-column-gradient-add", "styled-column-gradient-edit", "styled-column-percent-bar-add", "styled-column-percent-bar-edit", "styled-column-sparkline-add", "styled-column-sparkline-edit", "system-status-show", "internal"];
14
14
  /**
15
15
  * List of Shipped Adaptable Context Menu Items
16
16
  */
17
- export declare const ADAPTABLE_CONTEXT_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-filter-on-cell-value", "column-filter-clear", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "comment-add", "comment-remove", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3-broadcast", "fdc3-raise-intent", "flashing-cell-clear", "flashing-row-clear", "grid-info-show", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-edit", "layout-select-all", "note-add", "note-remove", "settings-panel-open", "smart-edit-apply", "system-status-show"];
17
+ export declare const ADAPTABLE_CONTEXT_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-filter-parent", "column-filter-on-cell-value", "column-filter-clear", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "comment-add", "comment-remove", "dashboard-parent", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export-parent", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3-parent", "fdc3-broadcast", "fdc3-raise-intent", "flashing-cell-clear", "flashing-row-clear", "grid-info-show", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-edit", "layout-select-all", "note-add", "note-remove", "settings-panel-open", "smart-edit-apply", "system-status-show"];
18
18
  /**
19
19
  * Menu item used by Adaptable in both Column and Context Menus
20
20
  */
@@ -4,6 +4,7 @@
4
4
  export const ADAPTABLE_COLUMN_MENU_ITEMS = [
5
5
  'calculated-column-edit',
6
6
  'cell-summary-show',
7
+ 'column-filter-parent',
7
8
  'column-filter-bar-hide',
8
9
  'column-filter-bar-show',
9
10
  'column-filter-clear',
@@ -13,6 +14,7 @@ export const ADAPTABLE_COLUMN_MENU_ITEMS = [
13
14
  'column-info-show',
14
15
  'custom-sort-add',
15
16
  'custom-sort-edit',
17
+ 'dashboard-parent',
16
18
  'dashboard-collapse',
17
19
  'dashboard-configure',
18
20
  'dashboard-dock',
@@ -23,6 +25,7 @@ export const ADAPTABLE_COLUMN_MENU_ITEMS = [
23
25
  'data-import',
24
26
  'flashing-cell-add',
25
27
  'flashing-cell-delete',
28
+ 'format-column-parent',
26
29
  'format-column-add',
27
30
  'format-column-edit',
28
31
  'free-text-column-edit',
@@ -38,6 +41,7 @@ export const ADAPTABLE_COLUMN_MENU_ITEMS = [
38
41
  'layout-select-all',
39
42
  'plus-minus-add',
40
43
  'settings-panel-open',
44
+ 'styled-column-parent',
41
45
  'styled-column-badge-add',
42
46
  'styled-column-badge-edit',
43
47
  'styled-column-gradient-add',
@@ -47,8 +51,7 @@ export const ADAPTABLE_COLUMN_MENU_ITEMS = [
47
51
  'styled-column-sparkline-add',
48
52
  'styled-column-sparkline-edit',
49
53
  'system-status-show',
50
- 'internal',
51
- 'parent',
54
+ 'internal', // used by AdapTable in Settings Panel
52
55
  ];
53
56
  /**
54
57
  * List of Shipped Adaptable Context Menu Items
@@ -58,6 +61,7 @@ export const ADAPTABLE_CONTEXT_MENU_ITEMS = [
58
61
  'bulk-update-apply',
59
62
  'calculated-column-edit',
60
63
  'cell-summary-show',
64
+ 'column-filter-parent',
61
65
  'column-filter-on-cell-value',
62
66
  'column-filter-clear',
63
67
  'column-filter-suspend',
@@ -65,6 +69,7 @@ export const ADAPTABLE_CONTEXT_MENU_ITEMS = [
65
69
  'column-info-show',
66
70
  'comment-add',
67
71
  'comment-remove',
72
+ 'dashboard-parent',
68
73
  'dashboard-collapse',
69
74
  'dashboard-configure',
70
75
  'dashboard-dock',
@@ -73,12 +78,14 @@ export const ADAPTABLE_CONTEXT_MENU_ITEMS = [
73
78
  'dashboard-hide',
74
79
  'dashboard-show',
75
80
  'data-import',
81
+ 'export-parent',
76
82
  'export-clipboard',
77
83
  'export-csv',
78
84
  'export-excel',
79
85
  'export-json',
80
86
  'export-table',
81
87
  'export-custom-destination',
88
+ 'fdc3-parent',
82
89
  'fdc3-broadcast',
83
90
  'fdc3-raise-intent',
84
91
  'flashing-cell-clear',
@@ -63,7 +63,7 @@ export class ColumnFilterModule extends AdaptableModuleBase {
63
63
  if (ArrayExtensions.IsNotNullOrEmpty(filterSubMenuItems)) {
64
64
  return [
65
65
  {
66
- name: 'parent',
66
+ name: 'column-filter-parent',
67
67
  label: this.moduleInfo.FriendlyName,
68
68
  isVisible: true,
69
69
  module: this.moduleInfo.ModuleName,
@@ -111,7 +111,7 @@ export class ColumnFilterModule extends AdaptableModuleBase {
111
111
  }));
112
112
  return [
113
113
  {
114
- name: 'parent',
114
+ name: 'column-filter-parent',
115
115
  label: this.moduleInfo.FriendlyName,
116
116
  isVisible: true,
117
117
  module: this.moduleInfo.ModuleName,
@@ -49,7 +49,7 @@ export class DashboardModule extends AdaptableModuleBase {
49
49
  }
50
50
  return [
51
51
  {
52
- name: 'parent',
52
+ name: 'dashboard-parent',
53
53
  label: this.moduleInfo.FriendlyName,
54
54
  isVisible: true,
55
55
  module: this.moduleInfo.ModuleName,
@@ -95,7 +95,7 @@ export class ExportModule extends AdaptableModuleBase {
95
95
  }
96
96
  buildExportMenuItem(label, subItems) {
97
97
  return {
98
- name: 'parent',
98
+ name: 'export-parent',
99
99
  label: label,
100
100
  module: this.moduleInfo.ModuleName,
101
101
  isVisible: true,
@@ -27,7 +27,7 @@ export class Fdc3Module extends AdaptableModuleBase {
27
27
  contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
28
28
  if (contextMenuItems.length > 1) {
29
29
  const groupMenuItem = {
30
- name: 'parent',
30
+ name: 'fdc3-parent',
31
31
  module: this.moduleInfo.ModuleName,
32
32
  label: 'FDC3',
33
33
  icon: {
@@ -62,7 +62,7 @@ export class FormatColumnModule extends AdaptableModuleBase {
62
62
  };
63
63
  const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
64
64
  returnColumnMenuItems.push({
65
- name: 'parent',
65
+ name: 'format-column-parent',
66
66
  label: 'Format Column',
67
67
  module: this.moduleInfo.ModuleName,
68
68
  isVisible: true,
@@ -79,7 +79,7 @@ export class FormatColumnModule extends AdaptableModuleBase {
79
79
  .getModuleInfoByModule('FormatColumn');
80
80
  const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
81
81
  returnColumnMenuItems.push({
82
- name: 'parent',
82
+ name: 'format-column-parent',
83
83
  label: 'Format Column',
84
84
  module: this.moduleInfo.ModuleName,
85
85
  isVisible: true,
@@ -117,7 +117,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
117
117
  defaultCurrentSectionName: 'Style',
118
118
  } }));
119
119
  returnColumnMenuItems.push({
120
- name: 'parent',
120
+ name: 'styled-column-parent',
121
121
  label: 'Create Styled Column',
122
122
  module: this.moduleInfo.ModuleName,
123
123
  isVisible: true,
@@ -52,7 +52,7 @@ export const FilterSection = (props) => {
52
52
  React.createElement(Tabs.Content, null,
53
53
  React.createElement(FormLayout, { mb: 2 },
54
54
  React.createElement(FormRow, { label: "Add Column Filter" },
55
- React.createElement(ColumnSelector, { filterColumn: (column) => column.filterable && !layoutFilters.some((f) => f.ColumnId === column.columnId), placeholder: "Select column to create filter", onChange: (option) => {
55
+ React.createElement(ColumnSelector, { filterColumn: (column) => column.filterable && !layoutFilters.some((f) => f.ColumnId === column.columnId), placeholder: "Select Column to create Filter", onChange: (option) => {
56
56
  props.onChange(Object.assign(Object.assign({}, layout), { ColumnFilters: [
57
57
  ...layoutFilters,
58
58
  {
@@ -15,10 +15,10 @@ const tableDOMProps = {
15
15
  },
16
16
  };
17
17
  export const NotePopup = (props) => {
18
- var _a;
18
+ var _a, _b, _c, _d;
19
19
  const adaptable = useAdaptable();
20
20
  const primaryKeyHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId);
21
- const dateFormat = (_a = adaptable.api.optionsApi.getNoteOptions().dateFormat) !== null && _a !== void 0 ? _a : DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME;
21
+ const dateFormat = (_d = (_c = (_b = (_a = adaptable.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getNoteOptions) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.dateFormat) !== null && _d !== void 0 ? _d : DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME;
22
22
  const allNotes = useSelector((state) => GetAllNotesSelector(state.Note));
23
23
  const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
24
24
  const columnsMap = React.useMemo(() => {
@@ -297,6 +297,7 @@ export class AdaptableAgGrid {
297
297
  this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
298
298
  const perfLoadStore = this.logger.beginPerf(`loadStore()`);
299
299
  this.adaptableStore = this.initAdaptableStore();
300
+ this.forPlugins((plugin) => plugin.afterInitStore(this));
300
301
  await this.adaptableStore.loadStore({
301
302
  adaptable: this,
302
303
  adaptableStateKey: this.adaptableOptions.adaptableStateKey,
@@ -323,8 +324,7 @@ export class AdaptableAgGrid {
323
324
  return Promise.reject('Adaptable was destroyed while loading the store.');
324
325
  // FIXME AFL MIG: is this enough?! talk with the team
325
326
  }
326
- this.forPlugins((plugin) => plugin.afterInitServices(this));
327
- this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
327
+ this.forPlugins((plugin) => plugin.afterInitialStateLoaded(this));
328
328
  // do this now so it sets module entitlements
329
329
  this.EntitlementService.setModulesEntitlements();
330
330
  /**
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1712304058670 || Date.now(),
4
- VERSION: "18.0.0-canary.23" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1712325818168 || Date.now(),
4
+ VERSION: "18.0.0-canary.24" || '--current-version--',
5
5
  };