@adaptabletools/adaptable 21.0.12 → 21.1.0-canary.1

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 (66) hide show
  1. package/base.css +1811 -2336
  2. package/base.css.map +1 -1
  3. package/index.css +1768 -1413
  4. package/index.css.map +1 -1
  5. package/package.json +3 -3
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  7. package/src/AdaptableOptions/FilterOptions.d.ts +7 -0
  8. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -3
  9. package/src/AdaptableState/Common/AdaptableColumn.d.ts +1 -1
  10. package/src/AdaptableState/Common/AdaptablePredicate.d.ts +12 -0
  11. package/src/AdaptableState/Common/AdaptablePredicate.js +132 -18
  12. package/src/AdaptableState/Selection/GridCell.d.ts +10 -0
  13. package/src/Api/Implementation/ExportApiImpl.js +2 -8
  14. package/src/Api/Implementation/PredicateApiImpl.d.ts +3 -1
  15. package/src/Api/Implementation/PredicateApiImpl.js +25 -2
  16. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -1
  17. package/src/Api/Internal/AdaptableInternalApi.js +6 -0
  18. package/src/Api/Internal/PredicateInternalApi.d.ts +3 -1
  19. package/src/Api/Internal/PredicateInternalApi.js +14 -0
  20. package/src/Api/PredicateApi.d.ts +1 -1
  21. package/src/Redux/Store/AdaptableStore.js +111 -3
  22. package/src/Utilities/Helpers/Helper.js +26 -2
  23. package/src/Utilities/Hooks/index.d.ts +4 -0
  24. package/src/Utilities/Hooks/index.js +4 -0
  25. package/src/Utilities/Hooks/useAdaptableColumn.d.ts +2 -0
  26. package/src/Utilities/Hooks/useAdaptableColumn.js +6 -0
  27. package/src/Utilities/Hooks/useAdaptableOptions.d.ts +2 -0
  28. package/src/Utilities/Hooks/useAdaptableOptions.js +5 -0
  29. package/src/Utilities/Hooks/useAdaptableState.d.ts +3 -0
  30. package/src/Utilities/Hooks/useAdaptableState.js +39 -0
  31. package/src/Utilities/Services/ModuleService.js +1 -1
  32. package/src/Utilities/adaptableQlUtils.js +3 -0
  33. package/src/View/AdaptableComputedCSSVarsContext.d.ts +12 -0
  34. package/src/View/AdaptableComputedCSSVarsContext.js +25 -0
  35. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +1 -1
  36. package/src/View/Components/ColumnFilter/FloatingFilter.js +5 -1
  37. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -1
  38. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +34 -9
  39. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +1 -0
  40. package/src/View/Components/FilterForm/ListBoxFilterForm.js +93 -16
  41. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  42. package/src/View/renderWithAdaptableContext.js +3 -1
  43. package/src/agGrid/AdaptableAgGrid.d.ts +3 -1
  44. package/src/agGrid/AdaptableAgGrid.js +361 -24
  45. package/src/agGrid/AdaptableFilterHandler.d.ts +3 -1
  46. package/src/agGrid/AdaptableFilterHandler.js +16 -12
  47. package/src/agGrid/AgGridAdapter.js +9 -5
  48. package/src/agGrid/AgGridColumnAdapter.js +14 -12
  49. package/src/components/OverlayTrigger/index.js +1 -1
  50. package/src/components/Select/Select.js +22 -22
  51. package/src/components/Tree/TreeDropdown/index.d.ts +27 -0
  52. package/src/components/Tree/TreeDropdown/index.js +250 -0
  53. package/src/components/Tree/TreeList/index.d.ts +25 -0
  54. package/src/components/Tree/TreeList/index.js +35 -0
  55. package/src/devTools/DevToolsTracks.d.ts +31 -0
  56. package/src/devTools/DevToolsTracks.js +31 -0
  57. package/src/devTools/PerfMarker.d.ts +12 -0
  58. package/src/devTools/PerfMarker.js +1 -0
  59. package/src/devTools/index.d.ts +102 -0
  60. package/src/devTools/index.js +159 -0
  61. package/src/env.js +2 -2
  62. package/src/layout-manager/src/index.d.ts +2 -0
  63. package/src/layout-manager/src/index.js +24 -0
  64. package/src/metamodel/adaptable.metamodel.d.ts +6 -0
  65. package/src/metamodel/adaptable.metamodel.js +1 -1
  66. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -0,0 +1,102 @@
1
+ import { PerfMarker, PerfMarkerDetails } from './PerfMarker';
2
+ declare const AVAILABLE_COLORS: readonly ["primary", "primary-light", "primary-dark", "secondary", "secondary-light", "secondary-dark", "tertiary", "tertiary-light", "tertiary-dark"];
3
+ type DevToolsColor = (typeof AVAILABLE_COLORS)[number];
4
+ export type DevToolsMarkerDetails = {
5
+ label: string;
6
+ track: string;
7
+ trackGroup?: string;
8
+ color?: DevToolsColor;
9
+ details?: PerfMarkerDetails;
10
+ tooltip?: string;
11
+ startTs?: DOMHighResTimeStamp;
12
+ endTs?: DOMHighResTimeStamp;
13
+ };
14
+ type HasRequiredProps<T> = T extends Record<string, never> ? false : {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? never : K;
16
+ }[keyof T] extends never ? false : true;
17
+ type EndMethod<T extends Omit<DevToolsMarkerDetails, 'track' | 'label'>> = HasRequiredProps<T> extends true ? (markerDetails: T) => DevToolsMarker : (markerDetails?: T) => DevToolsMarker;
18
+ export declare class DevToolsMarker implements PerfMarker {
19
+ readonly adaptableId: string;
20
+ static create(adaptableId: string): DevToolsMarker;
21
+ private markerDetails;
22
+ private stopped;
23
+ private constructor();
24
+ start: (startDetails?: {
25
+ details?: DevToolsMarkerDetails['details'];
26
+ }) => this;
27
+ get startTimestamp(): number;
28
+ get track(): {
29
+ readonly Init: {
30
+ start: DevToolsMarker['start'];
31
+ end: (markerDetails: Omit<DevToolsMarkerDetails, "track"> & {
32
+ label: "Init" | "InitStore" | "LoadStore" | "InitAGGrid";
33
+ }) => DevToolsMarker;
34
+ label: {
35
+ readonly Init: {
36
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
37
+ start: DevToolsMarker['start'];
38
+ };
39
+ readonly InitStore: {
40
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
41
+ start: DevToolsMarker['start'];
42
+ };
43
+ readonly LoadStore: {
44
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
45
+ start: DevToolsMarker['start'];
46
+ };
47
+ readonly InitAGGrid: {
48
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
49
+ start: DevToolsMarker['start'];
50
+ };
51
+ };
52
+ };
53
+ readonly LayoutManager: {
54
+ start: DevToolsMarker['start'];
55
+ end: (markerDetails: Omit<DevToolsMarkerDetails, "track"> & {
56
+ label: "SetLayout" | "ApplyPivotLayout" | "ApplyTableLayout";
57
+ }) => DevToolsMarker;
58
+ label: {
59
+ readonly SetLayout: {
60
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
61
+ start: DevToolsMarker['start'];
62
+ };
63
+ readonly ApplyPivotLayout: {
64
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
65
+ start: DevToolsMarker['start'];
66
+ };
67
+ readonly ApplyTableLayout: {
68
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
69
+ start: DevToolsMarker['start'];
70
+ };
71
+ };
72
+ };
73
+ readonly Runtime: {
74
+ start: DevToolsMarker['start'];
75
+ end: (markerDetails: Omit<DevToolsMarkerDetails, "track"> & {
76
+ label: "SetLayout";
77
+ }) => DevToolsMarker;
78
+ label: {
79
+ readonly SetLayout: {
80
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
81
+ start: DevToolsMarker['start'];
82
+ };
83
+ };
84
+ };
85
+ readonly Redux: {
86
+ start: DevToolsMarker['start'];
87
+ end: (markerDetails: Omit<DevToolsMarkerDetails, "track"> & {
88
+ label: "Action";
89
+ }) => DevToolsMarker;
90
+ label: {
91
+ readonly Action: {
92
+ end: EndMethod<Omit<DevToolsMarkerDetails, 'track' | 'label'>>;
93
+ start: DevToolsMarker['start'];
94
+ };
95
+ };
96
+ };
97
+ };
98
+ end: (markerDetails?: Partial<DevToolsMarkerDetails>) => this;
99
+ }
100
+ export declare function areAdaptableProfileTracksEnabled(adaptableId: string | undefined): boolean;
101
+ export declare function getMarker(adaptableId: string): DevToolsMarker;
102
+ export type { PerfMarker };
@@ -0,0 +1,159 @@
1
+ import { debug } from '@infinite-table/infinite-react';
2
+ import { DevToolsTracks } from './DevToolsTracks';
3
+ const AVAILABLE_COLORS = [
4
+ 'primary',
5
+ 'primary-light',
6
+ 'primary-dark',
7
+ 'secondary',
8
+ 'secondary-light',
9
+ 'secondary-dark',
10
+ 'tertiary',
11
+ 'tertiary-light',
12
+ 'tertiary-dark',
13
+ // 'error',
14
+ ];
15
+ const colorMap = new Map();
16
+ function getColor(identifier) {
17
+ if (colorMap.has(identifier)) {
18
+ return colorMap.get(identifier);
19
+ }
20
+ const color = AVAILABLE_COLORS[colorMap.size % AVAILABLE_COLORS.length];
21
+ colorMap.set(identifier, color);
22
+ return color;
23
+ }
24
+ export class DevToolsMarker {
25
+ static create(adaptableId) {
26
+ return new DevToolsMarker(adaptableId);
27
+ }
28
+ constructor(adaptableId) {
29
+ this.adaptableId = adaptableId;
30
+ this.markerDetails = {
31
+ label: '',
32
+ track: '',
33
+ trackGroup: undefined,
34
+ color: undefined,
35
+ details: [],
36
+ tooltip: undefined,
37
+ };
38
+ this.stopped = false;
39
+ this.start = (startDetails) => {
40
+ if (this.markerDetails.startTs) {
41
+ return this;
42
+ }
43
+ const start = performance.now();
44
+ this.markerDetails.details = startDetails?.details ?? [];
45
+ this.markerDetails.startTs = start;
46
+ return this;
47
+ };
48
+ this.end = (markerDetails = {}) => {
49
+ if (this.stopped) {
50
+ return this;
51
+ }
52
+ this.stopped = true;
53
+ const start = markerDetails.startTs ?? this.markerDetails.startTs;
54
+ const end = markerDetails.endTs ?? this.markerDetails.endTs ?? performance.now();
55
+ let color = markerDetails.color || this.markerDetails.color || '';
56
+ const trackGroup = markerDetails.trackGroup ||
57
+ this.markerDetails.trackGroup ||
58
+ `AdapTable (${this.adaptableId})`;
59
+ const details = [...(this.markerDetails.details || []), ...(markerDetails.details || [])];
60
+ const tooltip = markerDetails.tooltip || this.markerDetails.tooltip;
61
+ const label = markerDetails.label || this.markerDetails.label || 'Unknown';
62
+ const track = markerDetails.track || this.markerDetails.track || 'Unknown';
63
+ if (!color) {
64
+ const identifier = `${trackGroup}:${track}:${label}`;
65
+ color = getColor(identifier);
66
+ }
67
+ performance.measure(label, {
68
+ start,
69
+ end,
70
+ detail: {
71
+ devtools: {
72
+ dataType: 'track-entry',
73
+ trackGroup,
74
+ track,
75
+ color: color || 'primary',
76
+ properties: details.length > 0 ? details.map((detail) => [detail.name, detail.value]) : undefined,
77
+ tooltipText: tooltip,
78
+ },
79
+ },
80
+ });
81
+ return this;
82
+ };
83
+ this.adaptableId = adaptableId;
84
+ }
85
+ get startTimestamp() {
86
+ return this.markerDetails.startTs;
87
+ }
88
+ get track() {
89
+ const self = this;
90
+ return Object.keys(DevToolsTracks).reduce((acc, track) => {
91
+ const trackObj = {
92
+ start: self.start,
93
+ end: (markerDetails) => {
94
+ return self.end({
95
+ ...markerDetails,
96
+ track: DevToolsTracks[track].track,
97
+ label: markerDetails.label,
98
+ });
99
+ },
100
+ get label() {
101
+ const currentTrack = DevToolsTracks[track];
102
+ return Object.keys(currentTrack.labels).reduce((labelAcc, label) => {
103
+ const labelObj = {
104
+ start: self.start,
105
+ end: (markerDetails) => {
106
+ return self.end({
107
+ ...markerDetails,
108
+ track: currentTrack.track,
109
+ label: currentTrack.labels[label],
110
+ });
111
+ },
112
+ };
113
+ Object.defineProperty(labelAcc, label, {
114
+ get: () => {
115
+ self.markerDetails.label =
116
+ currentTrack.labels[label];
117
+ return labelObj;
118
+ },
119
+ });
120
+ return labelAcc;
121
+ }, {});
122
+ },
123
+ };
124
+ Object.defineProperty(acc, track, {
125
+ get: () => {
126
+ const currentTrack = DevToolsTracks[track];
127
+ self.markerDetails.track = currentTrack.track;
128
+ return trackObj;
129
+ },
130
+ });
131
+ return acc;
132
+ }, {});
133
+ }
134
+ }
135
+ export function areAdaptableProfileTracksEnabled(adaptableId) {
136
+ const trakcsSupported = typeof performance !== 'undefined' &&
137
+ typeof performance.now === 'function' &&
138
+ typeof performance.measure === 'function';
139
+ if (!trakcsSupported) {
140
+ return false;
141
+ }
142
+ if (typeof localStorage !== 'undefined' &&
143
+ debug.isChannelEnabled(adaptableId ? `Adaptable:${adaptableId}:perf` : 'Adaptable:*:perf', typeof localStorage !== 'undefined' ? localStorage.debug || '' : '')) {
144
+ return true;
145
+ }
146
+ if (typeof localStorage !== 'undefined' && localStorage.adaptableProfileTracks == 'true') {
147
+ return true;
148
+ }
149
+ return false;
150
+ }
151
+ export function getMarker(adaptableId) {
152
+ const enabled = areAdaptableProfileTracksEnabled(adaptableId);
153
+ const marker = DevToolsMarker.create(adaptableId);
154
+ if (!enabled) {
155
+ marker.start = () => marker;
156
+ marker.end = () => marker;
157
+ }
158
+ return marker;
159
+ }
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  NEXT_PUBLIC_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: 1762861055223 || Date.now(),
4
- VERSION: "21.0.12" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1763374295002 || Date.now(),
4
+ VERSION: "21.1.0-canary.1" || '--current-version--',
5
5
  };
@@ -25,6 +25,7 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
25
25
  private setGridOption_default;
26
26
  private suppressGlobalAgGridEventListener;
27
27
  private supressGlobalAgGridEventTimeoutId;
28
+ private layoutManagerDebugId;
28
29
  constructor(options: LayoutManagerOptions);
29
30
  destroy(): void;
30
31
  private setupEvents;
@@ -65,6 +66,7 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
65
66
  private suspendAgGridListener;
66
67
  private resumeAgGridListener;
67
68
  private applyLayout;
69
+ private getLayoutDetailsAsString;
68
70
  applyColumnDefsChanges(layout: TableLayoutModel | PivotLayoutModel): boolean;
69
71
  private applyColumnSizingColumnDefsChanges;
70
72
  private applyTableLayout;
@@ -9,6 +9,7 @@ import { destructurePivotColumnId } from './destructurePivotColumnId';
9
9
  import { isPivotAggTotalColumn } from './isPivotAggTotalColumn';
10
10
  import { isPivotGrandTotal } from './isPivotGrandTotal';
11
11
  import { isPivotColumnTotal } from './isPivotColumnTotal';
12
+ import { getMarker } from '../../devTools';
12
13
  export const PIVOT_ANY_TOTAL_COL_TYPE = 'pivotAnyTotal';
13
14
  export const PIVOT_GRAND_TOTAL_COL_TYPE = 'pivotGrandTotal';
14
15
  export const PIVOT_COLUMN_TOTAL_COL_TYPE = 'pivotColumnTotal';
@@ -324,6 +325,7 @@ export class LayoutManager extends LMEmitter {
324
325
  }
325
326
  setOptions(options) {
326
327
  this.gridApi = options.gridApi;
328
+ this.layoutManagerDebugId = options.debugId;
327
329
  }
328
330
  getLayoutModelFromGrid() {
329
331
  return this.isInPivotMode()
@@ -722,6 +724,7 @@ export class LayoutManager extends LMEmitter {
722
724
  ColumnGroupValues,
723
725
  GrandTotalRow: this.gridApi.getGridOption('grandTotalRow'),
724
726
  SuppressAggFuncInHeader: this.gridApi.getGridOption('suppressAggFuncInHeader'),
727
+ RowGroupDisplayType: this.gridApi.getGridOption('groupDisplayType') === 'multipleColumns' ? 'multi' : 'single',
725
728
  });
726
729
  return layout;
727
730
  }
@@ -1081,10 +1084,14 @@ export class LayoutManager extends LMEmitter {
1081
1084
  this.applyColumnDefsChanges(layout);
1082
1085
  if (isPivotLayoutModel(layout)) {
1083
1086
  try {
1087
+ const marker = getMarker(this.layoutManagerDebugId).track.LayoutManager.label.ApplyPivotLayout.start();
1084
1088
  const perfApplyPivot = this.beginPerf('applyLayout:pivot');
1085
1089
  this.gridApi.setGridOption('pivotMode', true);
1086
1090
  this.applyPivotLayout(layout, options);
1087
1091
  perfApplyPivot.end();
1092
+ marker.end({
1093
+ details: this.getLayoutDetailsAsString(layout),
1094
+ });
1088
1095
  }
1089
1096
  finally {
1090
1097
  resume();
@@ -1092,17 +1099,34 @@ export class LayoutManager extends LMEmitter {
1092
1099
  return;
1093
1100
  }
1094
1101
  try {
1102
+ const marker = getMarker(this.layoutManagerDebugId).track.LayoutManager.label.ApplyTableLayout.start();
1095
1103
  const perfApplyTable = this.beginPerf('applyLayout:table');
1096
1104
  if (pivotMode) {
1097
1105
  this.gridApi.setGridOption('pivotMode', false);
1098
1106
  }
1099
1107
  this.applyTableLayout(layout, options);
1100
1108
  perfApplyTable.end();
1109
+ marker.end({
1110
+ details: this.getLayoutDetailsAsString(layout),
1111
+ });
1101
1112
  }
1102
1113
  finally {
1103
1114
  resume();
1104
1115
  }
1105
1116
  }
1117
+ getLayoutDetailsAsString(layout) {
1118
+ return Object.keys(layout)
1119
+ .map((key) => {
1120
+ if (key.startsWith('Ignore_')) {
1121
+ return null;
1122
+ }
1123
+ return {
1124
+ name: key,
1125
+ value: JSON.stringify(layout[key], null, 2),
1126
+ };
1127
+ })
1128
+ .filter(Boolean);
1129
+ }
1106
1130
  applyColumnDefsChanges(layout) {
1107
1131
  return this.applyColumnSizingColumnDefsChanges(layout);
1108
1132
  }
@@ -4813,6 +4813,12 @@ export declare const ADAPTABLE_METAMODEL: {
4813
4813
  desc: string;
4814
4814
  isOpt: boolean;
4815
4815
  ref?: undefined;
4816
+ } | {
4817
+ name: string;
4818
+ kind: string;
4819
+ desc: string;
4820
+ isOpt: boolean;
4821
+ ref: string;
4816
4822
  })[];
4817
4823
  };
4818
4824
  PredicateDefInput: {