@adaptabletools/adaptable 11.0.0-canary.7 → 11.0.2-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +4 -4
  2. package/base.css +1 -2
  3. package/bundle.cjs.js +75 -75
  4. package/index.css +1 -2
  5. package/package.json +1 -1
  6. package/publishTimestamp.d.ts +1 -1
  7. package/publishTimestamp.js +1 -1
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -2
  9. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +3 -0
  10. package/src/AdaptableOptions/FilterOptions.d.ts +4 -0
  11. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +7 -6
  12. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
  13. package/src/Api/GridApi.d.ts +1 -2
  14. package/src/Api/Implementation/AlertApiImpl.js +1 -2
  15. package/src/Api/Implementation/ColumnApiImpl.js +1 -1
  16. package/src/Api/Implementation/GridApiImpl.js +14 -17
  17. package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
  18. package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
  19. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
  20. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +3 -0
  21. package/src/PredefinedConfig/Common/Types.d.ts +4 -1
  22. package/src/PredefinedConfig/ConditionalStyleState.d.ts +2 -2
  23. package/src/PredefinedConfig/FormatColumnState.d.ts +15 -0
  24. package/src/PredefinedConfig/PlusMinusState.d.ts +1 -1
  25. package/src/PredefinedConfig/ToolPanelState.d.ts +3 -0
  26. package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
  27. package/src/Redux/ActionsReducers/AlertRedux.js +4 -4
  28. package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
  29. package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +4 -4
  30. package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
  31. package/src/Redux/ActionsReducers/CustomSortRedux.js +4 -4
  32. package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +12 -12
  33. package/src/Redux/ActionsReducers/FlashingCellRedux.js +33 -29
  34. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
  35. package/src/Redux/ActionsReducers/FormatColumnRedux.js +4 -4
  36. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
  37. package/src/Redux/ActionsReducers/PlusMinusRedux.js +4 -4
  38. package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
  39. package/src/Redux/ActionsReducers/ScheduleRedux.js +16 -16
  40. package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
  41. package/src/Redux/ActionsReducers/ShortcutRedux.js +4 -4
  42. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  43. package/src/Redux/Store/AdaptableStore.js +20 -20
  44. package/src/Strategy/AlertModule.js +1 -1
  45. package/src/Strategy/FlashingCellModule.js +2 -2
  46. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -1
  47. package/src/Utilities/Constants/DocumentationLinkConstants.js +11 -10
  48. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
  49. package/src/Utilities/Services/ModuleService.js +33 -40
  50. package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
  51. package/src/View/Components/EntityRulesEditor/index.d.ts +1 -1
  52. package/src/View/Components/EntityRulesEditor/index.js +1 -1
  53. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -8
  54. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -2
  55. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  56. package/src/View/Dashboard/DashboardPopup.js +1 -1
  57. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  58. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +1 -1
  59. package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +2 -2
  60. package/src/View/Schedule/Wizard/ScheduleWizard.js +3 -3
  61. package/src/agGrid/Adaptable.d.ts +4 -2
  62. package/src/agGrid/Adaptable.js +83 -42
  63. package/src/agGrid/CheckboxRenderer.d.ts +8 -1
  64. package/src/agGrid/CheckboxRenderer.js +25 -4
  65. package/src/agGrid/agGridHelper.d.ts +1 -1
  66. package/src/agGrid/agGridHelper.js +7 -8
  67. package/src/components/ExpressionEditor/index.js +1 -1
  68. package/src/components/icons/calculated-column.js +2 -1
  69. package/src/metamodel/adaptable.metamodel.d.ts +194 -4
  70. package/src/metamodel/adaptable.metamodel.js +280 -17
  71. package/version.d.ts +1 -1
  72. package/version.js +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCheckboxRendererForColumn = void 0;
4
- exports.getCheckboxRendererForColumn = (columnId, readOnly, api) => {
3
+ exports.CheckboxEditor = exports.getCheckboxRendererForColumn = void 0;
4
+ exports.getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
5
5
  const CheckboxRenderer = function () {
6
6
  return '';
7
7
  };
@@ -10,7 +10,9 @@ exports.getCheckboxRendererForColumn = (columnId, readOnly, api) => {
10
10
  const inputElement = document.createElement('input');
11
11
  inputElement.type = 'checkbox';
12
12
  inputElement.checked = params.value;
13
- inputElement.disabled = readOnly;
13
+ inputElement.disabled =
14
+ isColumnReadOnly ||
15
+ !api.internalApi.getAdaptableInstance().isCellEditable(params.node, params.column);
14
16
  this.checkedHandler = this.checkedHandler.bind(this);
15
17
  inputElement.addEventListener('click', this.checkedHandler);
16
18
  this.eGui = document.createElement('div');
@@ -29,7 +31,26 @@ exports.getCheckboxRendererForColumn = (columnId, readOnly, api) => {
29
31
  return this.eGui;
30
32
  };
31
33
  CheckboxRenderer.prototype.refresh = function () {
32
- return true;
34
+ // by returning FALSE, AG Grid will remove the component from the DOM
35
+ // and (re)create a new component in its place with the new value & disabled state
36
+ return false;
37
+ };
38
+ CheckboxRenderer.prototype.destroy = function () {
39
+ var _a, _b;
40
+ (_b = (_a = this.eGui) === null || _a === void 0 ? void 0 : _a.firstChild) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this.checkedHandler);
33
41
  };
34
42
  return CheckboxRenderer;
35
43
  };
44
+ // this is just a stub editor instance, we just need the `isCancelBeforeStart()` hook
45
+ class CheckboxEditor {
46
+ isCancelBeforeStart() {
47
+ // never show the editor, we edit it via the checkbox input element
48
+ return true;
49
+ }
50
+ init(params) { }
51
+ getGui() {
52
+ return undefined;
53
+ }
54
+ getValue() { }
55
+ }
56
+ exports.CheckboxEditor = CheckboxEditor;
@@ -21,7 +21,7 @@ export declare class agGridHelper {
21
21
  getAgGridDarkThemeName(): string;
22
22
  setUpModules(): Map<AdaptableModule, IModule>;
23
23
  TrySetUpNodeIds(): boolean;
24
- createCheckboxRendererComp(columnId: string, isReadOnly: boolean): ICellRendererFunc | undefined;
24
+ createCheckboxRendererComp(columnId: string, isColumnReadOnly: boolean): ICellRendererFunc | undefined;
25
25
  createNumericStyleRendererFunc(formatColumn: FormatColumn): ICellRendererFunc;
26
26
  getCleanValue(value: string): string | undefined;
27
27
  getRenderedValue(colDef: ColDef, valueToRender: any): any;
@@ -118,8 +118,8 @@ class agGridHelper {
118
118
  };
119
119
  return true;
120
120
  }
121
- createCheckboxRendererComp(columnId, isReadOnly) {
122
- return CheckboxRenderer_1.getCheckboxRendererForColumn(columnId, isReadOnly, this.adaptable.api);
121
+ createCheckboxRendererComp(columnId, isColumnReadOnly) {
122
+ return CheckboxRenderer_1.getCheckboxRendererForColumn(columnId, isColumnReadOnly, this.adaptable.api);
123
123
  }
124
124
  createNumericStyleRendererFunc(formatColumn) {
125
125
  const numericStyle = formatColumn.ColumnStyle;
@@ -331,13 +331,12 @@ class agGridHelper {
331
331
  this.adaptable.api.eventApi.emit('SelectionChanged', selectionChangedInfo);
332
332
  }
333
333
  isColumnReadonly(colDef) {
334
- // currently we do not support the fact that some rows are editable and some are not
335
- // if editable is a function then we return that its not readonly since we assume that some rowNode will be editable
336
- // that's wrong but we ll see if we face the issue later
337
- if (colDef && typeof colDef.editable === 'boolean') {
338
- return !colDef.editable;
334
+ // if the column has conditional/dynamic editability, we assume some rows may be editable
335
+ if (colDef && typeof colDef.editable === 'function') {
336
+ return false;
339
337
  }
340
- return true;
338
+ // otherwise we evaluate the colDef.editable property (columns are NOT editable by default)
339
+ return !colDef.editable;
341
340
  }
342
341
  isColumnSortable(colDef) {
343
342
  if (colDef && colDef.sortable != null) {
@@ -195,5 +195,5 @@ const queryDocumentationLinks = {
195
195
  scalar: DocumentationLinkConstants_1.ScalarQueryDocsLink,
196
196
  observable: DocumentationLinkConstants_1.ObservableQueryDocsLink,
197
197
  aggregatedBoolean: DocumentationLinkConstants_1.AggregatedBooleanQueryDocsLink,
198
- aggregatedScalar: DocumentationLinkConstants_1.AggregatedBooleanQueryDocsLink,
198
+ aggregatedScalar: DocumentationLinkConstants_1.AggregatedScalarQueryDocsLink,
199
199
  };
@@ -4,4 +4,5 @@ const tslib_1 = require("tslib");
4
4
  const React = tslib_1.__importStar(require("react"));
5
5
  const DefaultIcon_1 = tslib_1.__importDefault(require("./DefaultIcon"));
6
6
  exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props),
7
- React.createElement("path", { d: "M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z" })));
7
+ React.createElement("path", { d: "M14.67 14.4337V21.7831H9.33V14.4337H14.67ZM15.67 21.7831L20.9277 21.8072V14.4337H15.67V21.7831ZM8.33 21.7831V2.14458H3V21.7831H8.33Z" }),
8
+ React.createElement("path", { d: "M19.6426 2H10.6466C9.93976 2 9.36145 2.57831 9.36145 3.28514V12.2811C9.36145 12.988 9.93976 13.5663 10.6466 13.5663H19.6426C20.3494 13.5663 20.9277 12.988 20.9277 12.2811V3.28514C20.9277 2.57831 20.3494 2 19.6426 2ZM15.8064 4.60884L16.4876 3.92771L17.3936 4.83373L18.2996 3.92771L18.9807 4.60884L18.0747 5.51486L18.9807 6.42088L18.2996 7.10201L17.3936 6.20241L16.4876 7.10843L15.8064 6.42731L16.7124 5.52128L15.8064 4.60884ZM11.4498 5.03293H14.6627V5.99679H11.4498V5.03293ZM14.8233 10.3534H13.5382V11.6386H12.5743V10.3534H11.2892V9.38956H12.5743V8.10442H13.5382V9.38956H14.8233V10.3534ZM19 11.1566H15.7871V10.1928H19V11.1566ZM19 9.5502H15.7871V8.58635H19V9.5502Z" })));
@@ -320,6 +320,11 @@ export declare const ADAPTABLE_METAMODEL: {
320
320
  kind: string;
321
321
  description: string;
322
322
  };
323
+ AdaptableModule: {
324
+ name: string;
325
+ kind: string;
326
+ description: string;
327
+ };
323
328
  AdaptableObject: {
324
329
  name: string;
325
330
  kind: string;
@@ -459,6 +464,39 @@ export declare const ADAPTABLE_METAMODEL: {
459
464
  reference?: undefined;
460
465
  })[];
461
466
  };
467
+ AdaptableQLOptions: {
468
+ name: string;
469
+ kind: string;
470
+ description: string;
471
+ properties: ({
472
+ name: string;
473
+ kind: string;
474
+ description: string;
475
+ uiLabel: string;
476
+ isOptional: boolean;
477
+ gridInfo: string;
478
+ defaultValue: string;
479
+ reference?: undefined;
480
+ } | {
481
+ name: string;
482
+ kind: string;
483
+ description: string;
484
+ uiLabel: string;
485
+ isOptional: boolean;
486
+ reference: string;
487
+ gridInfo?: undefined;
488
+ defaultValue?: undefined;
489
+ } | {
490
+ name: string;
491
+ kind: string;
492
+ description: string;
493
+ uiLabel: string;
494
+ isOptional: boolean;
495
+ gridInfo: string;
496
+ defaultValue: string;
497
+ reference: string;
498
+ })[];
499
+ };
462
500
  AdaptableReadyInfo: {
463
501
  name: string;
464
502
  kind: string;
@@ -907,6 +945,24 @@ export declare const ADAPTABLE_METAMODEL: {
907
945
  reference: string;
908
946
  }[];
909
947
  };
948
+ CellColorRange: {
949
+ name: string;
950
+ kind: string;
951
+ description: string;
952
+ properties: ({
953
+ name: string;
954
+ kind: string;
955
+ description: string;
956
+ uiLabel: string;
957
+ isOptional?: undefined;
958
+ } | {
959
+ name: string;
960
+ kind: string;
961
+ description: string;
962
+ uiLabel: string;
963
+ isOptional: boolean;
964
+ })[];
965
+ };
910
966
  CellHighlightInfo: {
911
967
  name: string;
912
968
  kind: string;
@@ -1007,6 +1063,17 @@ export declare const ADAPTABLE_METAMODEL: {
1007
1063
  uiLabel: string;
1008
1064
  }[];
1009
1065
  };
1066
+ ColumnComparison: {
1067
+ name: string;
1068
+ kind: string;
1069
+ description: string;
1070
+ properties: {
1071
+ name: string;
1072
+ kind: string;
1073
+ description: string;
1074
+ uiLabel: string;
1075
+ }[];
1076
+ };
1010
1077
  ColumnFilter: {
1011
1078
  name: string;
1012
1079
  kind: string;
@@ -1054,6 +1121,26 @@ export declare const ADAPTABLE_METAMODEL: {
1054
1121
  uiLabel: string;
1055
1122
  }[];
1056
1123
  };
1124
+ ColumnStyle: {
1125
+ name: string;
1126
+ kind: string;
1127
+ description: string;
1128
+ properties: ({
1129
+ name: string;
1130
+ kind: string;
1131
+ description: string;
1132
+ uiLabel: string;
1133
+ isOptional: boolean;
1134
+ reference?: undefined;
1135
+ } | {
1136
+ name: string;
1137
+ kind: string;
1138
+ description: string;
1139
+ uiLabel: string;
1140
+ isOptional: boolean;
1141
+ reference: string;
1142
+ })[];
1143
+ };
1057
1144
  ColumnValuesComparer: {
1058
1145
  name: string;
1059
1146
  kind: string;
@@ -1200,6 +1287,33 @@ export declare const ADAPTABLE_METAMODEL: {
1200
1287
  uiLabel: string;
1201
1288
  }[];
1202
1289
  };
1290
+ CustomSettingsPanel: {
1291
+ name: string;
1292
+ kind: string;
1293
+ description: string;
1294
+ properties: ({
1295
+ name: string;
1296
+ kind: string;
1297
+ description: string;
1298
+ uiLabel: string;
1299
+ isOptional: boolean;
1300
+ reference: string;
1301
+ } | {
1302
+ name: string;
1303
+ kind: string;
1304
+ description: string;
1305
+ uiLabel: string;
1306
+ isOptional?: undefined;
1307
+ reference?: undefined;
1308
+ } | {
1309
+ name: string;
1310
+ kind: string;
1311
+ description: string;
1312
+ uiLabel: string;
1313
+ isOptional: boolean;
1314
+ reference?: undefined;
1315
+ })[];
1316
+ };
1203
1317
  CustomSort: {
1204
1318
  name: string;
1205
1319
  kind: string;
@@ -1307,20 +1421,20 @@ export declare const ADAPTABLE_METAMODEL: {
1307
1421
  description: string;
1308
1422
  uiLabel: string;
1309
1423
  isOptional: boolean;
1310
- reference: string;
1424
+ reference?: undefined;
1311
1425
  } | {
1312
1426
  name: string;
1313
1427
  kind: string;
1314
1428
  description: string;
1315
1429
  uiLabel: string;
1316
- isOptional?: undefined;
1317
- reference?: undefined;
1430
+ isOptional: boolean;
1431
+ reference: string;
1318
1432
  } | {
1319
1433
  name: string;
1320
1434
  kind: string;
1321
1435
  description: string;
1322
1436
  uiLabel: string;
1323
- isOptional: boolean;
1437
+ isOptional?: undefined;
1324
1438
  reference?: undefined;
1325
1439
  })[];
1326
1440
  };
@@ -1884,6 +1998,15 @@ export declare const ADAPTABLE_METAMODEL: {
1884
1998
  defaultValue: string;
1885
1999
  gridInfo?: undefined;
1886
2000
  reference?: undefined;
2001
+ } | {
2002
+ name: string;
2003
+ kind: string;
2004
+ description: string;
2005
+ uiLabel: string;
2006
+ isOptional: boolean;
2007
+ gridInfo?: undefined;
2008
+ defaultValue?: undefined;
2009
+ reference?: undefined;
1887
2010
  } | {
1888
2011
  name: string;
1889
2012
  kind: string;
@@ -2286,6 +2409,26 @@ export declare const ADAPTABLE_METAMODEL: {
2286
2409
  reference?: undefined;
2287
2410
  })[];
2288
2411
  };
2412
+ GradientStyle: {
2413
+ name: string;
2414
+ kind: string;
2415
+ description: string;
2416
+ properties: ({
2417
+ name: string;
2418
+ kind: string;
2419
+ description: string;
2420
+ uiLabel: string;
2421
+ isOptional: boolean;
2422
+ reference?: undefined;
2423
+ } | {
2424
+ name: string;
2425
+ kind: string;
2426
+ description: string;
2427
+ uiLabel: string;
2428
+ isOptional: boolean;
2429
+ reference: string;
2430
+ })[];
2431
+ };
2289
2432
  GridApi: {
2290
2433
  name: string;
2291
2434
  kind: string;
@@ -2710,6 +2853,36 @@ export declare const ADAPTABLE_METAMODEL: {
2710
2853
  kind: string;
2711
2854
  description: string;
2712
2855
  };
2856
+ PercentBarStyle: {
2857
+ name: string;
2858
+ kind: string;
2859
+ description: string;
2860
+ properties: ({
2861
+ name: string;
2862
+ kind: string;
2863
+ description: string;
2864
+ uiLabel: string;
2865
+ isOptional: boolean;
2866
+ defaultValue: string;
2867
+ reference?: undefined;
2868
+ } | {
2869
+ name: string;
2870
+ kind: string;
2871
+ description: string;
2872
+ uiLabel: string;
2873
+ isOptional: boolean;
2874
+ defaultValue?: undefined;
2875
+ reference?: undefined;
2876
+ } | {
2877
+ name: string;
2878
+ kind: string;
2879
+ description: string;
2880
+ uiLabel: string;
2881
+ isOptional: boolean;
2882
+ reference: string;
2883
+ defaultValue?: undefined;
2884
+ })[];
2885
+ };
2713
2886
  PermittedValues: {
2714
2887
  name: string;
2715
2888
  kind: string;
@@ -3220,6 +3393,18 @@ export declare const ADAPTABLE_METAMODEL: {
3220
3393
  reference?: undefined;
3221
3394
  })[];
3222
3395
  };
3396
+ StringFormatterOptions: {
3397
+ name: string;
3398
+ kind: string;
3399
+ description: string;
3400
+ properties: {
3401
+ name: string;
3402
+ kind: string;
3403
+ description: string;
3404
+ uiLabel: string;
3405
+ isOptional: boolean;
3406
+ }[];
3407
+ };
3223
3408
  SuspendableObject: {
3224
3409
  name: string;
3225
3410
  kind: string;
@@ -3455,6 +3640,11 @@ export declare const ADAPTABLE_METAMODEL: {
3455
3640
  reference?: undefined;
3456
3641
  })[];
3457
3642
  };
3643
+ ToolPanelVisibilityMode: {
3644
+ name: string;
3645
+ kind: string;
3646
+ description: string;
3647
+ };
3458
3648
  UserInterfaceApi: {
3459
3649
  name: string;
3460
3650
  kind: string;