@adaptabletools/adaptable-cjs 20.2.0-canary.1 → 20.2.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 (57) hide show
  1. package/base.css +7 -7
  2. package/base.css.map +1 -1
  3. package/index.css +7 -7
  4. package/index.css.map +1 -1
  5. package/package.json +1 -1
  6. package/src/AdaptableOptions/ExportOptions.d.ts +3 -3
  7. package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/StateOptions.d.ts +60 -15
  9. package/src/AdaptableState/FormatColumnState.d.ts +11 -6
  10. package/src/AdaptableState/LayoutState.d.ts +29 -8
  11. package/src/AdaptableState/QuickSearchState.d.ts +3 -3
  12. package/src/Api/Implementation/ColumnApiImpl.js +3 -2
  13. package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +1 -0
  14. package/src/Api/Implementation/SettingsPanelApiImpl.js +8 -3
  15. package/src/Api/Implementation/StateApiImpl.d.ts +1 -0
  16. package/src/Api/Implementation/StateApiImpl.js +6 -5
  17. package/src/Api/Internal/ColumnInternalApi.d.ts +1 -0
  18. package/src/Api/Internal/ColumnInternalApi.js +5 -0
  19. package/src/Api/Internal/FormatColumnInternalApi.js +5 -5
  20. package/src/Api/SettingsPanelApi.d.ts +4 -0
  21. package/src/Api/StateApi.d.ts +9 -0
  22. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +14 -18
  23. package/src/Redux/Store/AdaptableStore.d.ts +2 -0
  24. package/src/Redux/Store/AdaptableStore.js +12 -4
  25. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -0
  26. package/src/Redux/Store/Interface/IStorageEngine.d.ts +4 -4
  27. package/src/Redux/Store/buildAdaptableStateFunctionConfig.d.ts +3 -0
  28. package/src/Redux/Store/buildAdaptableStateFunctionConfig.js +13 -0
  29. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  30. package/src/Utilities/Helpers/StyleHelper.d.ts +1 -1
  31. package/src/Utilities/Helpers/StyleHelper.js +11 -0
  32. package/src/Utilities/Services/ChartingService.js +4 -4
  33. package/src/Utilities/Services/LicenseService/index.js +1 -1
  34. package/src/Utilities/license/decode.js +1 -1
  35. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -3
  36. package/src/View/Charting/useAgChartState.js +1 -1
  37. package/src/View/Components/EntityRulesEditor/index.js +3 -3
  38. package/src/View/Components/ExpressionWizard.js +1 -1
  39. package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
  40. package/src/View/Export/Wizard/ReportRowsWizardSection.js +1 -1
  41. package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
  42. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  43. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
  44. package/src/View/License/LicenseWatermark.js +1 -1
  45. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  46. package/src/View/QuickSearch/QuickSearchInput.js +3 -2
  47. package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
  48. package/src/agGrid/AdaptableAgGrid.js +29 -5
  49. package/src/agGrid/AgGridColumnAdapter.d.ts +1 -0
  50. package/src/agGrid/AgGridColumnAdapter.js +29 -9
  51. package/src/agGrid/AgGridExportAdapter.js +22 -10
  52. package/src/components/WindowModal/useStacking.js +2 -1
  53. package/src/env.js +2 -2
  54. package/src/metamodel/adaptable.metamodel.d.ts +33 -16
  55. package/src/metamodel/adaptable.metamodel.js +1 -1
  56. package/src/types.d.ts +1 -1
  57. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -6,17 +6,22 @@ const ApiBase_1 = require("./ApiBase");
6
6
  const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
7
7
  class SettingsPanelApiImpl extends ApiBase_1.ApiBase {
8
8
  openSettingsPanel(moduleName) {
9
+ if (!moduleName) {
10
+ this.dispatchAction(PopupRedux.PopupShowScreen());
11
+ }
9
12
  const moduleInfo = this.getAdaptableInternalApi()
10
13
  .getModuleService()
11
14
  .getModuleInfoByModule(moduleName);
12
15
  if (!moduleInfo) {
13
- this.logError(`${moduleName} module does not exist`);
14
- return;
16
+ this.logWarn(`${moduleName} module does not exist`);
15
17
  }
16
- this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo.Popup));
18
+ this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo?.Popup));
17
19
  }
18
20
  openCustomSettingsPanel(name) {
19
21
  this.dispatchAction(PopupRedux.PopupShowScreen(null, name));
20
22
  }
23
+ closeSettingsPanel() {
24
+ this.dispatchAction(PopupRedux.PopupHideScreen());
25
+ }
21
26
  }
22
27
  exports.SettingsPanelApiImpl = SettingsPanelApiImpl;
@@ -40,6 +40,7 @@ export declare class StateApiImpl extends ApiBase implements StateApi {
40
40
  flushCurrentState?: boolean;
41
41
  progressIndicatorLabel?: string;
42
42
  }): Promise<void>;
43
+ persistAdaptableState(): Promise<AdaptableState>;
43
44
  getDescriptionForModule(module: AdaptableModule): string;
44
45
  getHelpPageForModule(module: AdaptableModule): string;
45
46
  getUserStateByStateKey(stateKey: AdaptableStateKey, returnJson?: boolean): BaseState | string;
@@ -27,6 +27,7 @@ const SmartEditRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers
27
27
  const ThemeRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ThemeRedux"));
28
28
  const ToolPanelRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ToolPanelRedux"));
29
29
  const logDeprecation_1 = require("../../Utilities/logDeprecation");
30
+ const buildAdaptableStateFunctionConfig_1 = require("../../Redux/Store/buildAdaptableStateFunctionConfig");
30
31
  class StateApiImpl extends ApiBase_1.ApiBase {
31
32
  configInit() {
32
33
  this.dispatchAction((0, AdaptableStore_1.InitState)());
@@ -68,11 +69,7 @@ class StateApiImpl extends ApiBase_1.ApiBase {
68
69
  this.getAdaptableStore()
69
70
  .saveStateNow(this._adaptable)
70
71
  .then(() => {
71
- const promise = clearStateFn({
72
- adaptableId: adaptableOptions.adaptableId,
73
- adaptableStateKey: adaptableOptions.adaptableStateKey,
74
- userName: adaptableOptions.userName,
75
- });
72
+ const promise = clearStateFn((0, buildAdaptableStateFunctionConfig_1.buildAdaptableStateFunctionConfig)(this._adaptable));
76
73
  promise.then(() => {
77
74
  this.setAdaptableStateKey(adaptableOptions.adaptableStateKey, {
78
75
  initialState: newInitialState || adaptableOptions.initialState,
@@ -168,6 +165,10 @@ class StateApiImpl extends ApiBase_1.ApiBase {
168
165
  });
169
166
  });
170
167
  }
168
+ async persistAdaptableState() {
169
+ await this.getAdaptableStore().saveStateNow(this._adaptable);
170
+ return this.getAdaptableStore().getCurrentStorageState();
171
+ }
171
172
  getDescriptionForModule(module) {
172
173
  return this._adaptable.ModuleService.getModuleInfoByModule(module).Description;
173
174
  }
@@ -33,4 +33,5 @@ export declare class ColumnInternalApi extends ApiBase {
33
33
  isSpecialColumn(columnId: string, column?: AdaptableColumn): boolean;
34
34
  getColumnHeaderName(params: HeaderValueGetterParams): string;
35
35
  private buildColumnHeaderContext;
36
+ getQueryableColumnsForUIEditor(): AdaptableColumn[];
36
37
  }
@@ -287,5 +287,10 @@ class ColumnInternalApi extends ApiBase_1.ApiBase {
287
287
  // if nothing matched, we skip this column[group]
288
288
  return 'skip';
289
289
  }
290
+ getQueryableColumnsForUIEditor() {
291
+ return this.getColumnApi()
292
+ .getQueryableColumns()
293
+ .filter((column) => !column.isGeneratedPivotResultColumn && !column.isGeneratedRowGroupColumn);
294
+ }
290
295
  }
291
296
  exports.ColumnInternalApi = ColumnInternalApi;
@@ -177,7 +177,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
177
177
  .filter((predicateDef) => this.getColumnScopeApi().isScopeInScope(scope, predicateDef.columnScope));
178
178
  }
179
179
  formatColumnWithColumnGroupStateShouldRender(formatColumn, column) {
180
- if (!formatColumn.ColumnGroupState) {
180
+ if (!formatColumn.ColumnGroupScope) {
181
181
  return true;
182
182
  }
183
183
  const agGridApi = this.getAdaptableApi().agGridApi;
@@ -199,13 +199,13 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
199
199
  columnGroupLeafColumns.length === 1 &&
200
200
  columnGroupLeafColumns[0] === agGridColumn;
201
201
  if (columnIsTopLevel) {
202
- // for top-level columns don't apply formatColumns that have an explicit ColumnGroupState defined
202
+ // for top-level columns don't apply formatColumns that have an explicit ColumnGroupScope defined
203
203
  return false;
204
204
  }
205
- if (formatColumn.ColumnGroupState === 'Both') {
205
+ if (formatColumn.ColumnGroupScope === 'Both') {
206
206
  return true;
207
207
  }
208
- return formatColumn.ColumnGroupState === columnGroupState;
208
+ return formatColumn.ColumnGroupScope === columnGroupState;
209
209
  }
210
210
  /**
211
211
  * Checks if format column is relevant for a given cell (intersection of given AdaptableColumn and RowNode)
@@ -237,7 +237,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
237
237
  return false;
238
238
  }
239
239
  }
240
- if (formatColumn.ColumnGroupState &&
240
+ if (formatColumn.ColumnGroupScope &&
241
241
  !this.formatColumnWithColumnGroupStateShouldRender(formatColumn, column)) {
242
242
  return false;
243
243
  }
@@ -13,4 +13,8 @@ export interface SettingsPanelApi {
13
13
  * @param name name of Custom Settings Panel to display
14
14
  */
15
15
  openCustomSettingsPanel(name: string): void;
16
+ /**
17
+ * Closes Settings Panel
18
+ */
19
+ closeSettingsPanel(): void;
16
20
  }
@@ -210,4 +210,13 @@ export interface StateApi {
210
210
  * @param module Module which is Ready
211
211
  */
212
212
  dispatchStateReadyAction(module: AdaptableModule): void;
213
+ /**
214
+ * Persists the current Adaptable State to storage.
215
+ *
216
+ * This method first calls StateOption.saveState() to prepare the state
217
+ * and then StateOptions.persistState() to save it to the configured storage.
218
+ *
219
+ * @returns Promise<AdaptableState> - A promise that resolves to the persisted state
220
+ */
221
+ persistAdaptableState(): Promise<AdaptableState>;
213
222
  }
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
6
6
  const AdaptableReduxMerger_1 = require("./AdaptableReduxMerger");
7
7
  const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
8
+ const buildAdaptableStateFunctionConfig_1 = require("./buildAdaptableStateFunctionConfig");
8
9
  const checkStatus = (response) => {
9
10
  const error = new Error(response.statusText);
10
11
  if (response.status >= 200 && response.status < 300) {
@@ -46,12 +47,8 @@ class AdaptableReduxLocalStorageEngine {
46
47
  setStateKey(adaptableStateKey) {
47
48
  this.adaptableStateKey = adaptableStateKey;
48
49
  }
49
- load(initialState = this.initialState) {
50
- return (this.loadState || loadState)({
51
- adaptableId: this.adaptableId,
52
- adaptableStateKey: this.adaptableStateKey,
53
- userName: this.userName,
54
- }).then((parsedJsonState) => {
50
+ load(adaptableInstance, initialState = this.initialState) {
51
+ return (this.loadState || loadState)((0, buildAdaptableStateFunctionConfig_1.buildAdaptableStateFunctionConfig)(adaptableInstance)).then((parsedJsonState) => {
55
52
  // we need to merge the Initial Adaptable State
56
53
  return Promise.resolve(initialState)
57
54
  .then((parsedInitialState) => {
@@ -60,20 +57,19 @@ class AdaptableReduxLocalStorageEngine {
60
57
  .catch((err) => AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`AdaptableId: ${this.adaptableId}`, err));
61
58
  });
62
59
  }
63
- save(state, getState) {
64
- return this.saveNow(state, getState);
60
+ save(adaptableInstance, state, actionName) {
61
+ return this.saveNow(adaptableInstance, state, actionName);
65
62
  }
66
- saveNow(state, getState) {
67
- const config = {
68
- adaptableId: this.adaptableId,
69
- adaptableStateKey: this.adaptableStateKey,
70
- userName: this.userName,
71
- };
72
- let result = state;
73
- if (getState) {
74
- result = getState(state, config);
63
+ saveNow(adaptableInstance, state, actionName) {
64
+ const config = (0, buildAdaptableStateFunctionConfig_1.buildAdaptableStateFunctionConfig)(adaptableInstance);
65
+ config.actionName = actionName;
66
+ config.previousState = adaptableInstance.adaptableStore.getPreviousStorageState() || null;
67
+ let stateObject = structuredClone(state);
68
+ const getTransformedState = adaptableInstance.adaptableOptions.stateOptions.saveState;
69
+ if (getTransformedState) {
70
+ stateObject = getTransformedState(stateObject, config);
75
71
  }
76
- const promise = (this.persistState || persistState)(result, config)?.catch(rejectWithMessage);
72
+ const promise = (this.persistState || persistState)(stateObject, config)?.catch(rejectWithMessage);
77
73
  if (!(promise instanceof Promise)) {
78
74
  AdaptableLogger_1.AdaptableLogger.consoleWarnBase(`AdaptableId: ${this.adaptableId}`, 'stateOptions.persistState should return a promise, it returned', 'Error', promise);
79
75
  }
@@ -26,6 +26,7 @@ export declare class AdaptableStore implements IAdaptableStore {
26
26
  private emitter;
27
27
  private storageEngine;
28
28
  private currentStorageState?;
29
+ private previousStorageState?;
29
30
  private loadStorageInProgress;
30
31
  private loadStateOnStartup;
31
32
  on: (eventName: string, callback: EmitterCallback) => (() => void);
@@ -39,6 +40,7 @@ export declare class AdaptableStore implements IAdaptableStore {
39
40
  constructor(adaptable: IAdaptable);
40
41
  destroy(): void;
41
42
  getCurrentStorageState(): AdaptableState;
43
+ getPreviousStorageState(): AdaptableState;
42
44
  saveStateNow(adaptable: IAdaptable): Promise<any>;
43
45
  loadStore: (config: LoadStoreConfig) => Promise<any>;
44
46
  }
@@ -43,6 +43,7 @@ const TeamSharingRedux = tslib_1.__importStar(require("../ActionsReducers/TeamSh
43
43
  const ThemeRedux = tslib_1.__importStar(require("../ActionsReducers/ThemeRedux"));
44
44
  const ToolPanelRedux = tslib_1.__importStar(require("../ActionsReducers/ToolPanelRedux"));
45
45
  const TeamSharingState_1 = require("../../AdaptableState/TeamSharingState");
46
+ const buildAdaptableStateFunctionConfig_1 = require("./buildAdaptableStateFunctionConfig");
46
47
  exports.INIT_STATE = 'INIT_STATE';
47
48
  exports.LOAD_STATE = 'LOAD_STATE';
48
49
  const NON_PERSIST_ACTIONS = {
@@ -97,10 +98,10 @@ class AdaptableStore {
97
98
  // START STATE LOAD
98
99
  this.loadStorageInProgress = true;
99
100
  return (this.Load = this.storageEngine
100
- .load(initialState)
101
+ .load(adaptable, initialState)
101
102
  .then((storedState) => {
102
103
  if (storedState && this.loadStateOnStartup) {
103
- this.TheStore.dispatch((0, exports.LoadState)(postProcessState(adaptable.adaptableOptions.stateOptions.applyState(storedState))));
104
+ this.TheStore.dispatch((0, exports.LoadState)(postProcessState(adaptable.adaptableOptions.stateOptions.applyState(storedState, (0, buildAdaptableStateFunctionConfig_1.buildAdaptableStateFunctionConfig)(adaptable)))));
104
105
  }
105
106
  })
106
107
  .then(() => {
@@ -224,7 +225,11 @@ class AdaptableStore {
224
225
  delete storageState[key];
225
226
  });
226
227
  this.currentStorageState = storageState;
227
- storageEngine.save(storageState, adaptable.adaptableOptions.stateOptions.saveState);
228
+ this.previousStorageState = { ...state };
229
+ NON_PERSISTENT_STORE_KEYS.forEach((key) => {
230
+ delete this.previousStorageState[key];
231
+ });
232
+ storageEngine.save(adaptable, storageState, action.type);
228
233
  }
229
234
  return finalState;
230
235
  };
@@ -248,10 +253,13 @@ class AdaptableStore {
248
253
  getCurrentStorageState() {
249
254
  return this.currentStorageState;
250
255
  }
256
+ getPreviousStorageState() {
257
+ return this.previousStorageState;
258
+ }
251
259
  saveStateNow(adaptable) {
252
260
  const storageState = this.getCurrentStorageState();
253
261
  if (storageState) {
254
- return this.storageEngine.saveNow(storageState, adaptable.adaptableOptions.stateOptions.saveState);
262
+ return this.storageEngine.saveNow(adaptable, storageState, 'API_CALL_SAVE_STATE');
255
263
  }
256
264
  return Promise.resolve(true);
257
265
  }
@@ -13,6 +13,7 @@ export interface IAdaptableStore {
13
13
  Load: Promise<any>;
14
14
  loadStore: (config: LoadStoreConfig) => Promise<any>;
15
15
  getCurrentStorageState: () => AdaptableState | void;
16
+ getPreviousStorageState: () => AdaptableState | void;
16
17
  saveStateNow: (adaptable: IAdaptable) => Promise<any>;
17
18
  on: (eventName: string, callback: (data?: any) => any) => () => void;
18
19
  onAny: (callback: (eventName: string, data?: any) => any) => () => void;
@@ -1,9 +1,9 @@
1
- import { AdaptableSaveStateFunction } from '../../../AdaptableOptions/StateOptions';
2
1
  import { AdaptableState } from '../../../AdaptableState/AdaptableState';
3
2
  import { InitialState } from '../../../AdaptableState/InitialState';
3
+ import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
4
4
  export default interface IStorageEngine {
5
- load(initialState?: string | InitialState): Promise<any>;
6
- save(state: AdaptableState, getEnhancedState?: AdaptableSaveStateFunction): Promise<any>;
7
- saveNow(state: AdaptableState, getEnhancedState?: AdaptableSaveStateFunction): Promise<any>;
5
+ load(adaptable: IAdaptable, initialState?: string | InitialState): Promise<any>;
6
+ save(adaptable: IAdaptable, state: AdaptableState, actionName: string): Promise<any>;
7
+ saveNow(adaptable: IAdaptable, state: AdaptableState, actionName: string): Promise<any>;
8
8
  setStateKey(stateKey: string): void;
9
9
  }
@@ -0,0 +1,3 @@
1
+ import { AdaptableStateFunctionConfig } from '../../AdaptableOptions/StateOptions';
2
+ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
3
+ export declare function buildAdaptableStateFunctionConfig(adaptable: IAdaptable): AdaptableStateFunctionConfig;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildAdaptableStateFunctionConfig = void 0;
4
+ function buildAdaptableStateFunctionConfig(adaptable) {
5
+ return {
6
+ adaptableId: adaptable.adaptableOptions.adaptableId,
7
+ adaptableStateKey: adaptable.adaptableOptions.adaptableStateKey,
8
+ userName: adaptable.adaptableOptions.userName,
9
+ adaptableApi: adaptable.api,
10
+ adaptableContext: adaptable.api?.optionsApi?.getAdaptableContext(),
11
+ };
12
+ }
13
+ exports.buildAdaptableStateFunctionConfig = buildAdaptableStateFunctionConfig;
@@ -295,7 +295,7 @@ const getDataChangedInfoStub = (context) => {
295
295
  const rowNode = rowNodeStub;
296
296
  if (rowNode) {
297
297
  const primaryKeyValue = context.adaptableApi.gridApi.getPrimaryKeyValueForRowNode(rowNode);
298
- const columnId = context.adaptableApi.columnApi.getQueryableColumns()[0]?.columnId;
298
+ const columnId = context.adaptableApi.columnApi.internalApi.getQueryableColumnsForUIEditor()[0]?.columnId;
299
299
  const oldValue = context.adaptableApi.gridApi.getCellRawValue(primaryKeyValue, columnId);
300
300
  const column = context.adaptableApi.columnApi.getColumnWithColumnId(columnId);
301
301
  const newValue = oldValue;
@@ -1,5 +1,5 @@
1
1
  import { AdaptableStyle } from '../../types';
2
- export declare const AgGridCellStyleProperties: readonly ["backgroundColor", "color", "fontWeight", "fontStyle", "fontSize", "borderColor"];
2
+ export declare const AgGridCellStyleProperties: readonly ["backgroundColor", "color", "fontWeight", "fontStyle", "fontSize", "borderColor", "--ab-dynamic-background-color", "--ab-dynamic-color", "--ab-dynamic-font-weight", "--ab-dynamic-font-style", "--ab-dynamic-font-size", "--ab-dynamic-text-decoration", "--ab-dynamic-border-radius", "--ab-dynamic-border-color"];
3
3
  export declare const normalizeStyleForAgGrid: (style: Record<string, any>) => {
4
4
  [x: string]: any;
5
5
  };
@@ -10,6 +10,17 @@ exports.AgGridCellStyleProperties = [
10
10
  'fontStyle',
11
11
  'fontSize',
12
12
  'borderColor',
13
+ // needed for quick search
14
+ // as otherwise, the currentTextMatchStyle is not removed correctly
15
+ // from the cell when looping through the values, and the cell is no longer the current match
16
+ '--ab-dynamic-background-color',
17
+ '--ab-dynamic-color',
18
+ '--ab-dynamic-font-weight',
19
+ '--ab-dynamic-font-style',
20
+ '--ab-dynamic-font-size',
21
+ '--ab-dynamic-text-decoration',
22
+ '--ab-dynamic-border-radius',
23
+ '--ab-dynamic-border-color',
13
24
  ];
14
25
  // see https://github.com/AdaptableTools/adaptable/issues/2119
15
26
  // since v29 AG Grid ignores style properties with null or undefined values
@@ -10,16 +10,16 @@ class ChartingService {
10
10
  }
11
11
  onChartModelChange(models, eventType, params) {
12
12
  const allChartDefinitions = this.api.chartingApi.getChartDefinitions();
13
- const currentChartModel = models.find((model) => model.chartId === params.chartId);
14
- const currentChartDefinition = allChartDefinitions.find((chartDefinition) => chartDefinition.Model.chartId === params.chartId);
13
+ const currentChartModel = models.find((model) => model?.chartId === params.chartId);
14
+ const currentChartDefinition = allChartDefinitions.find((chartDefinition) => chartDefinition.Model?.chartId === params.chartId);
15
15
  switch (eventType) {
16
16
  case 'chartCreated':
17
17
  const createParams = params;
18
- if (allChartDefinitions.some((chartDefinition) => chartDefinition.Model.chartId === createParams.chartId)) {
18
+ if (allChartDefinitions.some((chartDefinition) => chartDefinition.Model?.chartId === createParams.chartId)) {
19
19
  // chart already exists
20
20
  }
21
21
  else {
22
- const chartModel = models.find((model) => model.chartId === createParams.chartId);
22
+ const chartModel = models.find((model) => model?.chartId === createParams.chartId);
23
23
  this.saveNewChart(chartModel);
24
24
  }
25
25
  break;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("lodash/clamp")),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p||(exports.LicenseValidityType=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",(()=>{requestAnimationFrame((()=>{this.adaptable.isDestroyed||this.init()}))}))}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("lodash/clamp")),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p||(exports.LicenseValidityType=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.decode=exports.fieldsToLicenseDetails=exports.GENERIC_APP_NAME=void 0;const e=require("./hashing"),t=()=>new Error("Invalid License");exports.GENERIC_APP_NAME="GenericAdaptableApp";const r=e=>{const r=e.reduce(((e,t)=>(e.set(t.name,t.value),e)),new Map),o={start:new Date(r.get("StartDate")),end:new Date(r.get("EndDate")),owner:r.get("Owner"),appName:r.get("AppName")||exports.GENERIC_APP_NAME,timestamp:r.get("TS")?Number(r.get("TS")):0,trial:"true"===r.get("Trial"),ref:r.get("Ref")??""};if(!(o.start&&o.end&&o.owner&&"boolean"==typeof o.trial&&o.ref))throw t();return o};exports.fieldsToLicenseDetails=r;const o=r=>{let o="",s=r.split("|").map((e=>{let[t,r]=e.split("=");return"C"===t&&(o=r),{name:t,value:r}}));if(!o)throw t();const a=o.split(",").reverse(),n=a.pop();a.forEach(((r,o)=>{const a=s[o];if((0,e.compute_string)(a.value)!==r)throw t()}));const p=[...s];p.pop();const i=p.map((e=>`${e.name}=${e.value}`)).join("|");if((0,e.compute_string)(i)!==n)throw t();return s=s.map((e=>({...e,value:decodeURI(e.value)}))),(0,exports.fieldsToLicenseDetails)(s)};exports.decode=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.decode=exports.fieldsToLicenseDetails=exports.GENERIC_APP_NAME=void 0;const e=require("./hashing"),t=()=>new Error("Invalid License");exports.GENERIC_APP_NAME="GenericAdaptableApp";const r=e=>{const r=e.reduce((e,t)=>(e.set(t.name,t.value),e),new Map),o={start:new Date(r.get("StartDate")),end:new Date(r.get("EndDate")),owner:r.get("Owner"),appName:r.get("AppName")||exports.GENERIC_APP_NAME,timestamp:r.get("TS")?Number(r.get("TS")):0,trial:"true"===r.get("Trial"),ref:r.get("Ref")??""};if(!(o.start&&o.end&&o.owner&&"boolean"==typeof o.trial&&o.ref))throw t();return o};exports.fieldsToLicenseDetails=r;const o=r=>{let o="",s=r.split("|").map(e=>{let[t,r]=e.split("=");return"C"===t&&(o=r),{name:t,value:r}});if(!o)throw t();const a=o.split(",").reverse(),n=a.pop();a.forEach((r,o)=>{const a=s[o];if((0,e.compute_string)(a.value)!==r)throw t()});const p=[...s];p.pop();const i=p.map(e=>`${e.name}=${e.value}`).join("|");if((0,e.compute_string)(i)!==n)throw t();return s=s.map(e=>({...e,value:decodeURI(e.value)})),(0,exports.fieldsToLicenseDetails)(s)};exports.decode=o;
@@ -58,9 +58,7 @@ const CalculatedColumnExpressionWizardSection = (props) => {
58
58
  return 'quantileAggregatedScalar';
59
59
  }
60
60
  };
61
- const columns = api.columnApi
62
- .getQueryableColumns()
63
- .filter((c) => !c.isGeneratedPivotResultColumn);
61
+ const columns = api.columnApi.internalApi.getQueryableColumnsForUIEditor();
64
62
  return (React.createElement(Tabs_1.Tabs, { autoFocus: false, height: "100%" },
65
63
  React.createElement(Tabs_1.Tabs.Tab, null, (0, StringExtensions_1.Humanize)(props.expressionType)),
66
64
  React.createElement(Tabs_1.Tabs.Content, null, (() => {
@@ -20,7 +20,7 @@ const useAgChartState = (chartDefinition) => {
20
20
  }, [currentChartModels, chartDefinition]);
21
21
  const closeAlreadyOpenedChartsInContainer = (element) => {
22
22
  const chartModelAlreadyInChartContainer = currentChartModels.find((chartModel) => {
23
- const chartRef = adaptable.api.chartingApi.getChartRef(chartModel.chartId);
23
+ const chartRef = adaptable.api.chartingApi.getChartRef(chartModel?.chartId);
24
24
  return chartRef && element.contains(chartRef.chartElement);
25
25
  });
26
26
  if (chartModelAlreadyInChartContainer) {
@@ -152,14 +152,14 @@ const EntityRulesEditor = (props) => {
152
152
  React.createElement(EntityRulePredicatesEditor_1.EntityRulePredicatesEditor, { enablePredicateColumnId: props.enablePredicateColumnId, data: data, descriptions: descriptions, predicateDefs: filteredPredicateDefs, getPredicateDefsForColId: props.getPredicateDefsForColId, onChange: props.onChange }))) : null,
153
153
  showBoolean ? (React.createElement(QueryTab, { showRadio: showRadioButtons, value: "BooleanExpression", type: type, label: "Boolean" })) : null,
154
154
  showBoolean ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "BooleanExpression", value: 'BooleanExpression' }, (() => {
155
- const editor = (React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: data.Rule?.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api, showQueryBuilder: props.showQueryBuilder }));
155
+ const editor = (React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: data.Rule?.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api, showQueryBuilder: props.showQueryBuilder }));
156
156
  return props.showQueryBuilder ? React.createElement(Panel_1.default, null, editor) : editor;
157
157
  })())) : null,
158
158
  showObservable ? (React.createElement(QueryTab, { showRadio: showRadioButtons, value: "ObservableExpression", type: type, label: "Observable" })) : null,
159
159
  showObservable ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "ObservableExpression", value: 'ObservableExpression' },
160
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: data.Rule?.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }))) : null,
160
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: data.Rule?.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }))) : null,
161
161
  showAggregation ? (React.createElement(QueryTab, { showRadio: showRadioButtons, value: "AggregatedBooleanExpression", type: type, label: "Aggregated Boolean" })) : null,
162
162
  showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "AggregatedBooleanExpression", value: 'AggregatedBooleanExpression' },
163
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: data.Rule?.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }))) : null)));
163
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: data.Rule?.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }))) : null)));
164
164
  };
165
165
  exports.EntityRulesEditor = EntityRulesEditor;
@@ -31,7 +31,7 @@ class ExpressionWizard extends React.Component {
31
31
  render() {
32
32
  const initialData = (0, react_1.useMemo)(() => this.props.api.internalApi.getQueryPreviewData(), []);
33
33
  return (React.createElement(React.Fragment, null,
34
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.NamedQueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), fields: this.props.api.expressionApi.internalApi.getAvailableFields(), namedQueries: this.props.api.namedQueryApi.getNamedQueries(), api: this.props.api }),
34
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.NamedQueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: this.props.api.expressionApi.internalApi.getAvailableFields(), namedQueries: this.props.api.namedQueryApi.getNamedQueries(), api: this.props.api }),
35
35
  ' ',
36
36
  React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, marginBottom: 2, marginLeft: 1, alignItems: "center", "data-name": "expression-wizard-save-option" },
37
37
  React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, disabled: !this.isValidExpression(), marginBottom: 2, checked: this.state.saveToNamedQueries, onChange: (checked) => this.setState({
@@ -18,7 +18,7 @@ export interface ModuleParams {
18
18
  value?: any;
19
19
  primaryKeyValues?: any[];
20
20
  maxWidth?: number;
21
- source: 'Toolbar' | 'ModuleMenu' | 'ColumnMenu' | 'ContextMenu' | 'ModuleButton' | 'Other';
21
+ source: 'Toolbar' | 'ModuleMenu' | 'ColumnMenu' | 'ContextMenu' | 'ModuleButton' | 'Other' | 'Api';
22
22
  config?: {
23
23
  [key: string]: any;
24
24
  };
@@ -76,6 +76,6 @@ const ReportRowsWizardSection = (props) => {
76
76
  BooleanExpression,
77
77
  },
78
78
  });
79
- }, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api })))));
79
+ }, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api })))));
80
80
  };
81
81
  exports.ReportRowsWizardSection = ReportRowsWizardSection;
@@ -92,7 +92,7 @@ const GridFilterExpressionEditor = (props) => {
92
92
  },
93
93
  } },
94
94
  React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column" },
95
- React.createElement(ExpressionEditor_1.ExpressionEditor, { ...expressionEditorProps, type: 'boolean', module: ModuleConstants_1.GridFilterModuleId, value: expression, onChange: (expression) => setExpression(expression), initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }),
95
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { ...expressionEditorProps, type: 'boolean', module: ModuleConstants_1.GridFilterModuleId, value: expression, onChange: (expression) => setExpression(expression), initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }),
96
96
  React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, alignItems: "center" },
97
97
  props.onDismiss && (React.createElement(SimpleButton_1.default, { margin: 1, variant: "text", "data-name": "action-close", onClick: () => {
98
98
  props.onDismiss();
@@ -38,7 +38,7 @@ const GridFilterSection = (props) => {
38
38
  Expression: expression,
39
39
  },
40
40
  });
41
- }, initialData: initialData, columns: api.columnApi.getQueryableColumns().filter((c) => !c.isGeneratedPivotResultColumn), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }));
41
+ }, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }));
42
42
  return React.createElement("div", null, expressionEditorContent);
43
43
  };
44
44
  exports.GridFilterSection = GridFilterSection;
@@ -23,8 +23,8 @@ const RowGroupingSectionSummary = () => {
23
23
  React.createElement(Tag_1.Tag, null, "Row Grouping is not available in Tree Grids")));
24
24
  }
25
25
  return (React.createElement(rebass_1.Box, { display: 'flex', flexDirection: 'row' }, layout.RowGroupedColumns?.length ? (layout.RowGroupedColumns.map((columnId) => {
26
- return (React.createElement(rebass_1.Box, { mb: 2, mr: 2 },
27
- React.createElement(Tag_1.Tag, { key: columnId }, adaptable.api.columnApi.getFriendlyNameForColumnId(columnId))));
26
+ return (React.createElement(rebass_1.Box, { key: columnId, mb: 2, mr: 2 },
27
+ React.createElement(Tag_1.Tag, null, adaptable.api.columnApi.getFriendlyNameForColumnId(columnId))));
28
28
  })) : (React.createElement(Tag_1.Tag, null, "No Row Grouping"))));
29
29
  };
30
30
  exports.RowGroupingSectionSummary = RowGroupingSectionSummary;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseWatermark=void 0;const e=require("tslib"),t=e.__importStar(require("react")),r=require("../../components/Logo"),o=require("rebass"),n={border:"1px solid var(--ab-color-error)",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-text-on-defaultbackground)",background:"var(--ab-color-defaultbackground)"},i=e=>{const t=[["display","none"],["opacity","0"],["position","absolute"],["position","fixed"],["position","relative"],["visibility","hidden"]];for(const[r,o]of t)if(e.style[r]===o)return!1;return!0},l=e=>{const l=t.useRef(null);return t.useEffect((()=>{const e=setInterval((()=>{l.current?.isConnected||alert("It is not allowed to remove the Adaptable watermark."),i(l.current)||alert("It is not allowed to modify the Adaptable watermark."),l?.current?.style&&(l.current.style.border=n.border,l.current.style.padding=n.padding,l.current.style.fontWeight=`${n.fontWeight}`,l.current.style.margin=n.margin,l.current.style.fontSize=n.fontSize,l.current.style.color=n.color,l.current.style.background=n.background,l.current.style.display="flex",l.current.style.position="static",l.current.style.opacity="1",l.current.style.visibility="visible")}),5e3);return()=>clearTimeout(e)}),[]),t.createElement(o.Flex,{style:n,ref:l},t.createElement(r.Logo,{style:{marginRight:10}}),t.createElement("div",null,e.children))};exports.LicenseWatermark=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseWatermark=void 0;const e=require("tslib"),t=e.__importStar(require("react")),r=require("../../components/Logo"),o=require("rebass"),n={border:"1px solid var(--ab-color-error)",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-text-on-defaultbackground)",background:"var(--ab-color-defaultbackground)"},i=e=>{const t=[["display","none"],["opacity","0"],["position","absolute"],["position","fixed"],["position","relative"],["visibility","hidden"]];for(const[r,o]of t)if(e.style[r]===o)return!1;return!0},l=e=>{const l=t.useRef(null);return t.useEffect(()=>{const e=setInterval(()=>{l.current?.isConnected||alert("It is not allowed to remove the Adaptable watermark."),i(l.current)||alert("It is not allowed to modify the Adaptable watermark."),l?.current?.style&&(l.current.style.border=n.border,l.current.style.padding=n.padding,l.current.style.fontWeight=`${n.fontWeight}`,l.current.style.margin=n.margin,l.current.style.fontSize=n.fontSize,l.current.style.color=n.color,l.current.style.background=n.background,l.current.style.display="flex",l.current.style.position="static",l.current.style.opacity="1",l.current.style.visibility="visible")},5e3);return()=>clearTimeout(e)},[]),t.createElement(o.Flex,{style:n,ref:l},t.createElement(r.Logo,{style:{marginRight:10}}),t.createElement("div",null,e.children))};exports.LicenseWatermark=l;
@@ -32,6 +32,6 @@ const NamedQueryExpressionWizardSection = (props) => {
32
32
  const initialData = (0, react_1.useMemo)(() => api.internalApi.getQueryPreviewData(), []);
33
33
  return (React.createElement(ExpressionEditor_1.ExpressionEditor, { allowSaveNamedQuery: false, showQueryBuilder: true, type: 'boolean', module: moduleInfo.ModuleName, value: data.BooleanExpression, onChange: (BooleanExpression) => {
34
34
  props.onChange({ ...data, BooleanExpression });
35
- }, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }));
35
+ }, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }));
36
36
  };
37
37
  exports.NamedQueryExpressionWizardSection = NamedQueryExpressionWizardSection;
@@ -16,12 +16,13 @@ const QuickSearchInput = (props) => {
16
16
  const QuickSearchText = (0, react_redux_1.useSelector)((state) => state.QuickSearch.QuickSearchText);
17
17
  const dispatch = (0, react_redux_1.useDispatch)();
18
18
  const onRunQuickSearch = react_1.default.useCallback((newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)), []);
19
+ const isServerSideRowModel = adaptable.api.gridApi.getAgGridRowModelType() === 'serverSide';
19
20
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)({
20
21
  QuickSearchText,
21
22
  onRunQuickSearch,
22
23
  });
23
- return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: (0, join_1.default)('ab-DashboardToolbar__QuickSearch__text', props.className), value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: props.width ?? '10rem' }, actionTools: react_1.default.createElement(rebass_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", flex: 'none' },
24
+ return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: (0, join_1.default)('ab-DashboardToolbar__QuickSearch__text', props.className), value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: props.width ?? '10rem' }, actionTools: isServerSideRowModel ? null : (react_1.default.createElement(rebass_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", flex: 'none' },
24
25
  react_1.default.createElement(SimpleButton_1.default, { "aria-label": 'Previous Match', icon: "arrow-up", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoPreviousMatch() }),
25
- react_1.default.createElement(SimpleButton_1.default, { "aria-label": 'Next Match', icon: "arrow-down", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoNextMatch() })) }));
26
+ react_1.default.createElement(SimpleButton_1.default, { "aria-label": 'Next Match', icon: "arrow-down", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoNextMatch() }))) }));
26
27
  };
27
28
  exports.QuickSearchInput = QuickSearchInput;
@@ -101,6 +101,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
101
101
  private agGridListenerMouseEnter;
102
102
  private agGridListenerMouseLeave;
103
103
  private listenerGlobalSetRowSelection;
104
+ private listenerGlobalChartingChanges;
104
105
  private listenerCellEditingStarted;
105
106
  private listenerFirstDataRendered;
106
107
  private listenerPivotChanged;