@adaptabletools/adaptable 15.0.0-canary.1 → 15.0.0-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/bundle.cjs.js +210 -210
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
  6. package/src/AdaptableOptions/ActionOptions.d.ts +30 -30
  7. package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -13
  8. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +4 -4
  9. package/src/AdaptableOptions/AlertOptions.d.ts +14 -14
  10. package/src/AdaptableOptions/ChartingOptions.d.ts +2 -3
  11. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -6
  12. package/src/AdaptableOptions/EditOptions.d.ts +8 -8
  13. package/src/AdaptableOptions/ExportOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/ExpressionOptions.d.ts +1 -1
  15. package/src/AdaptableOptions/FilterOptions.d.ts +3 -3
  16. package/src/AdaptableOptions/GeneralOptions.d.ts +9 -9
  17. package/src/AdaptableOptions/MenuOptions.d.ts +3 -3
  18. package/src/AdaptableOptions/PredicateOptions.d.ts +1 -1
  19. package/src/AdaptableOptions/SearchOptions.d.ts +2 -2
  20. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +23 -23
  21. package/src/Api/ChartingApi.d.ts +18 -19
  22. package/src/Api/EventApi.d.ts +13 -1
  23. package/src/Api/Events/ActionRowSubmitted.d.ts +7 -7
  24. package/src/Api/Events/GridDataChanged.d.ts +3 -3
  25. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  26. package/src/Api/GridApi.d.ts +4 -4
  27. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  28. package/src/Api/Implementation/ThemeApiImpl.d.ts +4 -0
  29. package/src/Api/Implementation/ThemeApiImpl.js +14 -0
  30. package/src/Api/OptionsApi.d.ts +1 -1
  31. package/src/Api/ThemeApi.d.ts +18 -0
  32. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +7 -7
  33. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +2 -2
  34. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +4 -4
  35. package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +4 -4
  36. package/src/PredefinedConfig/Common/CellSummary.d.ts +4 -4
  37. package/src/PredefinedConfig/Common/Menu.d.ts +8 -8
  38. package/src/PredefinedConfig/Selection/GridCell.d.ts +3 -3
  39. package/src/PredefinedConfig/Selection/GridRow.d.ts +3 -3
  40. package/src/PredefinedConfig/Selection/SelectedCellInfo.d.ts +3 -3
  41. package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +2 -2
  42. package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
  43. package/src/PredefinedConfig/StatusBarState.js +1 -1
  44. package/src/PredefinedConfig/SystemState.d.ts +1 -2
  45. package/src/PredefinedConfig/ThemeState.d.ts +4 -0
  46. package/src/Redux/ActionsReducers/GridRedux.d.ts +2 -2
  47. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +27 -0
  48. package/src/Redux/ActionsReducers/ThemeRedux.js +63 -1
  49. package/src/Strategy/ExportModule.js +1 -1
  50. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  51. package/src/Utilities/Constants/GeneralConstants.js +3 -2
  52. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
  53. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  54. package/src/Utilities/ObjectFactory.d.ts +3 -1
  55. package/src/Utilities/ObjectFactory.js +10 -1
  56. package/src/Utilities/Services/Interface/IThemeService.d.ts +3 -0
  57. package/src/Utilities/Services/Interface/IThemeService.js +2 -0
  58. package/src/Utilities/Services/MetamodelService.d.ts +2 -0
  59. package/src/Utilities/Services/MetamodelService.js +26 -19
  60. package/src/Utilities/Services/ThemeService.d.ts +12 -0
  61. package/src/Utilities/Services/ThemeService.js +49 -0
  62. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +5 -5
  63. package/src/View/Charting/ShowChartButton.js +2 -1
  64. package/src/View/Charting/useChartingElements.js +2 -1
  65. package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
  66. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  67. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
  68. package/src/View/Theme/ThemeEditor.d.ts +7 -0
  69. package/src/View/Theme/ThemeEditor.js +186 -0
  70. package/src/View/Theme/ThemePopup.d.ts +3 -0
  71. package/src/View/Theme/ThemePopup.js +30 -6
  72. package/src/agGrid/Adaptable.d.ts +3 -2
  73. package/src/agGrid/Adaptable.js +8 -17
  74. package/src/agGrid/createAgStatusPanelComponent.js +1 -1
  75. package/src/metamodel/adaptable-metamodel-model.d.ts +9 -9
  76. package/src/metamodel/adaptable.metamodel.d.ts +1698 -3141
  77. package/src/metamodel/adaptable.metamodel.js +1 -1
  78. package/version.d.ts +1 -1
  79. package/version.js +1 -1
@@ -65,6 +65,7 @@ const weightedAverage_1 = require("./weightedAverage");
65
65
  const AggregationColumns_1 = require("../PredefinedConfig/Common/AggregationColumns");
66
66
  const renderReactRoot_1 = require("../renderReactRoot");
67
67
  const ChartingService_1 = require("../Utilities/Services/ChartingService");
68
+ const ThemeService_1 = require("../Utilities/Services/ThemeService");
68
69
  const tinycolor = require('tinycolor2');
69
70
  const GROUP_PATH_SEPARATOR = '/';
70
71
  // IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
@@ -429,6 +430,7 @@ class Adaptable {
429
430
  // create the services
430
431
  this.LicenseService = this.initLicenseService();
431
432
  this.ChartingService = new ChartingService_1.ChartingService(this.api);
433
+ this.ThemeService = new ThemeService_1.ThemeService(this.api);
432
434
  this.ValidationService = new ValidationService_1.ValidationService(this.api);
433
435
  this.ReportService = new ReportService_1.ReportService(this.api);
434
436
  this.ModuleService = new ModuleService_1.ModuleService(this.api);
@@ -647,7 +649,7 @@ class Adaptable {
647
649
  this.initAgGridContainerFromInitializedAgGrid();
648
650
  return Promise.resolve(true);
649
651
  }, () => {
650
- (0, LoggingHelper_1.ConsoleLogError)(`Could not find any agGrid instance rendered. Could not find reference to ag-grid api. Make sure you pass the same gridOptions object reference both to Adaptable and AgGrid`);
652
+ (0, LoggingHelper_1.ConsoleLogError)(`Could not find any AG Grid instance rendered. Could not find reference to AG Grid api. Make sure you pass the same gridOptions object reference both to Adaptable and AG Grid`);
651
653
  return Promise.reject(false);
652
654
  });
653
655
  }
@@ -1583,7 +1585,7 @@ class Adaptable {
1583
1585
  layout.ColumnSorts = columnSorts;
1584
1586
  layout.RowGroupedColumns = groupedColumns;
1585
1587
  if (Object.keys(aggregatedColumns).length) {
1586
- // ag-grid aggregations are not 1-1 with adaptable column-aggregations
1588
+ // AG Grid aggregations are not 1-1 with adaptable column-aggregations
1587
1589
  layout.AggregationColumns = this.mapAggregationColumnsFromGrid(aggregatedColumns, currentLayout);
1588
1590
  }
1589
1591
  else {
@@ -2149,7 +2151,7 @@ class Adaptable {
2149
2151
  this.gridOptions.api.redrawRows(redrawRowsParams);
2150
2152
  }
2151
2153
  catch (ex) {
2152
- (0, LoggingHelper_1.ConsoleLogError)('ag-grid redrawRows was unable to find some row nodes. Tried to redraw row nodes: ', rowNodes, ex);
2154
+ (0, LoggingHelper_1.ConsoleLogError)('AG Grid redrawRows was unable to find some row nodes. Tried to redraw row nodes: ', rowNodes, ex);
2153
2155
  }
2154
2156
  }
2155
2157
  refreshCells(rowNodes, columns, forceUpdate, suppressFlash = false) {
@@ -2516,18 +2518,7 @@ class Adaptable {
2516
2518
  return justGroupColDefs;
2517
2519
  }
2518
2520
  getFirstRowNode() {
2519
- // Probably a better way but its only used by Calccolumn on creation so not urgent
2520
- let rowNode;
2521
- let foundNode = false;
2522
- this.gridOptions.api.forEachNode((node) => {
2523
- if (!foundNode) {
2524
- if (!node.group) {
2525
- rowNode = node;
2526
- foundNode = true;
2527
- }
2528
- }
2529
- });
2530
- return rowNode;
2521
+ return this.gridOptions.api.getDisplayedRowAtIndex(0);
2531
2522
  }
2532
2523
  getFirstDisplayedRowNode() {
2533
2524
  const firstDisplayedRowIndex = this.gridOptions.api.getFirstDisplayedRow();
@@ -3048,7 +3039,7 @@ class Adaptable {
3048
3039
  const agFilterModel = this.gridOptions.api.getFilterModel();
3049
3040
  (this.gridOptions.columnApi.getColumns() || []).forEach((col) => {
3050
3041
  /**
3051
- * When ag-grid filters are used active state should not be removed for all columns.
3042
+ * When AG Grid filters are used active state should not be removed for all columns.
3052
3043
  * Need to check if the column has a filter model.
3053
3044
  */
3054
3045
  const isColumnInFilterModel = agFilterModel && agFilterModel[col.getColId()];
@@ -3209,7 +3200,7 @@ class Adaptable {
3209
3200
  const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), (typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle)), (!styledColumn
3210
3201
  ? this.getFormatColumnCellStyle(abColumn, activeFormatColumnsWithStyle, params)
3211
3202
  : {})), (styledColumn ? this.getStyledColumnStyle(styledColumn, abColumn, params) : {})), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
3212
- // remove null values, ag-grid 29 fails, it asumes they are strings
3203
+ // remove null values, AG Grid 29 fails, it asumes they are strings
3213
3204
  Object.keys(result).forEach((key) => {
3214
3205
  if (result[key] === null || result[key] === undefined) {
3215
3206
  delete result[key];
@@ -14,7 +14,7 @@ const createAgStatusPanelComponent = (component, adaptable, context) => {
14
14
  }), adaptable);
15
15
  return (React.createElement("div", { className: "ab-StatusBar", ref: (node) => {
16
16
  if (node) {
17
- // in React rendering, ag-grid renders an additional extra div
17
+ // in React rendering, AG Grid renders an additional extra div
18
18
  // around the status panel container, with className of 'ag-react-container'
19
19
  // which needs to be stretched in order to fill the status panel
20
20
  node.parentElement.style.display = 'flex';
@@ -1,19 +1,19 @@
1
1
  export declare type AdaptableMetamodel = Record<string, MetamodelItem>;
2
2
  export interface MetamodelItem {
3
3
  name: string;
4
- kind: 'TypeAlias' | 'Interface' | 'Class';
5
- description: string;
6
- properties?: MetamodelItemProperty[];
4
+ kind: 'A' | 'I' | 'C';
5
+ desc: string;
6
+ props?: MetamodelItemProperty[];
7
7
  }
8
8
  export interface MetamodelItemProperty {
9
9
  name: string;
10
10
  kind: MetamodelItemPropertyKind;
11
- description: string;
12
- uiLabel: string;
13
- reference?: string;
14
- isOptional?: boolean;
15
- defaultValue?: unknown;
11
+ desc: string;
12
+ uiLabel?: string;
13
+ ref?: string;
14
+ isOpt?: boolean;
15
+ defVal?: unknown;
16
16
  gridInfo?: 'item' | 'container';
17
17
  noCode?: 'item' | 'container';
18
18
  }
19
- export declare type MetamodelItemPropertyKind = 'REFERENCE' | 'number' | 'string' | 'boolean' | 'date' | 'function' | 'array' | 'indexType' | 'unknown';
19
+ export declare type MetamodelItemPropertyKind = 'R' | 'n' | 's' | 'b' | 'd' | 'f' | 'a' | 'i' | 'u';