@adaptabletools/adaptable 15.0.0-canary.0 → 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 (108) hide show
  1. package/bundle.cjs.js +247 -262
  2. package/package.json +2 -2
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +42 -42
  6. package/src/AdaptableOptions/ActionOptions.d.ts +31 -31
  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 +25 -25
  21. package/src/Api/ChartingApi.d.ts +22 -18
  22. package/src/Api/ColumnApi.d.ts +3 -3
  23. package/src/Api/EventApi.d.ts +13 -1
  24. package/src/Api/Events/ActionRowSubmitted.d.ts +8 -8
  25. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  26. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  27. package/src/Api/FilterApi.d.ts +2 -2
  28. package/src/Api/FinanceApi.d.ts +9 -9
  29. package/src/Api/FormatColumnApi.d.ts +6 -6
  30. package/src/Api/FreeTextColumnApi.d.ts +3 -3
  31. package/src/Api/GridApi.d.ts +30 -30
  32. package/src/Api/Implementation/ChartingApiImpl.d.ts +2 -1
  33. package/src/Api/Implementation/ChartingApiImpl.js +4 -1
  34. package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -4
  35. package/src/Api/Implementation/FilterApiImpl.d.ts +2 -2
  36. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -6
  37. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +3 -3
  38. package/src/Api/Implementation/GridApiImpl.d.ts +29 -29
  39. package/src/Api/Implementation/ThemeApiImpl.d.ts +4 -0
  40. package/src/Api/Implementation/ThemeApiImpl.js +14 -0
  41. package/src/Api/Internal/ActionInternalApi.d.ts +3 -3
  42. package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -3
  43. package/src/Api/Internal/AlertInternalApi.d.ts +3 -3
  44. package/src/Api/Internal/FilterInternalApi.d.ts +2 -2
  45. package/src/Api/Internal/FormatColumnInternalApi.d.ts +7 -7
  46. package/src/Api/Internal/GridInternalApi.d.ts +4 -4
  47. package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -3
  48. package/src/Api/OptionsApi.d.ts +1 -1
  49. package/src/Api/ThemeApi.d.ts +18 -0
  50. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +7 -7
  51. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +2 -2
  52. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +5 -6
  53. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
  54. package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +5 -5
  55. package/src/PredefinedConfig/Common/CellSummary.d.ts +4 -4
  56. package/src/PredefinedConfig/Common/Menu.d.ts +9 -9
  57. package/src/PredefinedConfig/Selection/GridCell.d.ts +4 -4
  58. package/src/PredefinedConfig/Selection/GridRow.d.ts +4 -4
  59. package/src/PredefinedConfig/Selection/SelectedCellInfo.d.ts +3 -3
  60. package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +2 -2
  61. package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
  62. package/src/PredefinedConfig/StatusBarState.js +1 -1
  63. package/src/PredefinedConfig/SystemState.d.ts +1 -2
  64. package/src/PredefinedConfig/ThemeState.d.ts +4 -0
  65. package/src/Redux/ActionsReducers/GridRedux.d.ts +5 -5
  66. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +27 -0
  67. package/src/Redux/ActionsReducers/ThemeRedux.js +63 -1
  68. package/src/Strategy/ExportModule.js +1 -1
  69. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  70. package/src/Utilities/Constants/GeneralConstants.js +3 -2
  71. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
  72. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  73. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -3
  74. package/src/Utilities/Interface/Preview.d.ts +2 -2
  75. package/src/Utilities/ObjectFactory.d.ts +5 -3
  76. package/src/Utilities/ObjectFactory.js +10 -1
  77. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +2 -2
  78. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -2
  79. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
  80. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +3 -3
  81. package/src/Utilities/Services/Interface/IReportService.d.ts +3 -3
  82. package/src/Utilities/Services/Interface/IThemeService.d.ts +3 -0
  83. package/src/Utilities/Services/Interface/IThemeService.js +2 -0
  84. package/src/Utilities/Services/MetamodelService.d.ts +2 -0
  85. package/src/Utilities/Services/MetamodelService.js +26 -19
  86. package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
  87. package/src/Utilities/Services/ReportService.d.ts +4 -4
  88. package/src/Utilities/Services/ThemeService.d.ts +12 -0
  89. package/src/Utilities/Services/ThemeService.js +49 -0
  90. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +5 -5
  91. package/src/View/Charting/ShowChartButton.js +2 -1
  92. package/src/View/Charting/useChartingElements.js +2 -1
  93. package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
  94. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  95. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +2 -2
  96. package/src/View/Theme/ThemeEditor.d.ts +7 -0
  97. package/src/View/Theme/ThemeEditor.js +186 -0
  98. package/src/View/Theme/ThemePopup.d.ts +3 -0
  99. package/src/View/Theme/ThemePopup.js +30 -6
  100. package/src/agGrid/ActionColumnRenderer.js +1 -0
  101. package/src/agGrid/Adaptable.d.ts +42 -41
  102. package/src/agGrid/Adaptable.js +20 -27
  103. package/src/agGrid/createAgStatusPanelComponent.js +1 -1
  104. package/src/metamodel/adaptable-metamodel-model.d.ts +9 -9
  105. package/src/metamodel/adaptable.metamodel.d.ts +1698 -3141
  106. package/src/metamodel/adaptable.metamodel.js +1 -1
  107. package/version.d.ts +1 -1
  108. package/version.js +1 -1
@@ -16,6 +16,18 @@ export declare const THEME_SELECT = "THEME_SELECT";
16
16
  * @ReduxAction Theme Module is ready
17
17
  */
18
18
  export declare const THEME_READY = "THEME_READY";
19
+ /**
20
+ * @ReduxAction Theme Module is edited
21
+ */
22
+ export declare const THEME_EDIT = "THEME_EDIT";
23
+ /**
24
+ * @ReduxAction A new theme is added
25
+ */
26
+ export declare const THEME_ADD = "THEME_ADD";
27
+ /**
28
+ * @ReduxAction A theme is deleted
29
+ */
30
+ export declare const THEME_DELETE = "THEME_DELETE";
19
31
  export interface ThemeSetSystemThemesAction extends Redux.Action {
20
32
  SystemThemes: AdaptableTheme[];
21
33
  }
@@ -28,8 +40,23 @@ export interface ThemeSelectAction extends Redux.Action {
28
40
  export interface ThemeReadyAction extends Redux.Action {
29
41
  themeState: ThemeState;
30
42
  }
43
+ export interface ThemeReadyAction extends Redux.Action {
44
+ themeState: ThemeState;
45
+ }
46
+ export interface ThemeEditAction extends Redux.Action {
47
+ theme: AdaptableTheme;
48
+ }
49
+ export interface ThemeAddUserThemeAction extends Redux.Action {
50
+ theme: AdaptableTheme;
51
+ }
52
+ export interface ThemeDeleteUserThemeAction extends Redux.Action {
53
+ theme: AdaptableTheme;
54
+ }
31
55
  export declare const ThemeSetSystemThemes: (SystemThemes: AdaptableTheme[]) => ThemeSetSystemThemesAction;
32
56
  export declare const ThemeSetUserThemes: (UserThemes: AdaptableTheme[]) => ThemeSetUserThemesAction;
33
57
  export declare const ThemeSelect: (Theme: string) => ThemeSelectAction;
34
58
  export declare const ThemeReady: (themeState: ThemeState) => ThemeReadyAction;
59
+ export declare const ThemeEdit: (theme: AdaptableTheme) => ThemeEditAction;
60
+ export declare const ThemeAdd: (theme: AdaptableTheme) => ThemeAddUserThemeAction;
61
+ export declare const ThemeDelete: (theme: AdaptableTheme) => ThemeDeleteUserThemeAction;
35
62
  export declare const ThemeReducer: Redux.Reducer<ThemeState>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ThemeReducer = exports.ThemeReady = exports.ThemeSelect = exports.ThemeSetUserThemes = exports.ThemeSetSystemThemes = exports.THEME_READY = exports.THEME_SELECT = exports.THEME_SET_USER_THEMES = exports.THEME_SET_SYSTEM_THEMES = void 0;
3
+ exports.ThemeReducer = exports.ThemeDelete = exports.ThemeAdd = exports.ThemeEdit = exports.ThemeReady = exports.ThemeSelect = exports.ThemeSetUserThemes = exports.ThemeSetSystemThemes = exports.THEME_DELETE = exports.THEME_ADD = exports.THEME_EDIT = exports.THEME_READY = exports.THEME_SELECT = exports.THEME_SET_USER_THEMES = exports.THEME_SET_SYSTEM_THEMES = void 0;
4
4
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
5
5
  /**
6
6
  * @ReduxAction System Themes have been set
@@ -18,6 +18,18 @@ exports.THEME_SELECT = 'THEME_SELECT';
18
18
  * @ReduxAction Theme Module is ready
19
19
  */
20
20
  exports.THEME_READY = 'THEME_READY';
21
+ /**
22
+ * @ReduxAction Theme Module is edited
23
+ */
24
+ exports.THEME_EDIT = 'THEME_EDIT';
25
+ /**
26
+ * @ReduxAction A new theme is added
27
+ */
28
+ exports.THEME_ADD = 'THEME_ADD';
29
+ /**
30
+ * @ReduxAction A theme is deleted
31
+ */
32
+ exports.THEME_DELETE = 'THEME_DELETE';
21
33
  const ThemeSetSystemThemes = (SystemThemes) => ({
22
34
  type: exports.THEME_SET_SYSTEM_THEMES,
23
35
  SystemThemes,
@@ -38,6 +50,21 @@ const ThemeReady = (themeState) => ({
38
50
  themeState,
39
51
  });
40
52
  exports.ThemeReady = ThemeReady;
53
+ const ThemeEdit = (theme) => ({
54
+ type: exports.THEME_EDIT,
55
+ theme,
56
+ });
57
+ exports.ThemeEdit = ThemeEdit;
58
+ const ThemeAdd = (theme) => ({
59
+ type: exports.THEME_ADD,
60
+ theme,
61
+ });
62
+ exports.ThemeAdd = ThemeAdd;
63
+ const ThemeDelete = (theme) => ({
64
+ type: exports.THEME_DELETE,
65
+ theme,
66
+ });
67
+ exports.ThemeDelete = ThemeDelete;
41
68
  const initialState = {
42
69
  CurrentTheme: GeneralConstants_1.THEME_DEFAULT_CURRENT_THEME,
43
70
  SystemThemes: GeneralConstants_1.SYSTEM_THEMES,
@@ -57,6 +84,41 @@ const ThemeReducer = (state = initialState, action) => {
57
84
  return Object.assign({}, state, {
58
85
  CurrentTheme: action.Theme,
59
86
  });
87
+ case exports.THEME_EDIT:
88
+ let newThemes = null;
89
+ // find by UUID, or by name
90
+ const themeToBeReplaced = action.theme;
91
+ let replaceIndex = state.UserThemes.findIndex((theme) => themeToBeReplaced.Uuid === theme.Uuid);
92
+ // try by name
93
+ if (replaceIndex === -1) {
94
+ replaceIndex = state.UserThemes.findIndex((theme) => themeToBeReplaced.Name === theme.Name);
95
+ }
96
+ // fond one, either by name or by uuid
97
+ if (replaceIndex !== -1) {
98
+ newThemes = [...state.UserThemes];
99
+ newThemes[replaceIndex] = themeToBeReplaced;
100
+ }
101
+ if (newThemes === null) {
102
+ return state;
103
+ }
104
+ // if name changed, need to update the current name
105
+ let currentTheme = state.CurrentTheme;
106
+ if (currentTheme !== themeToBeReplaced.Name) {
107
+ // need to update the current theme if it name has changed
108
+ currentTheme = themeToBeReplaced.Name;
109
+ }
110
+ return Object.assign({}, state, {
111
+ CurrentTheme: currentTheme,
112
+ UserThemes: newThemes,
113
+ });
114
+ case exports.THEME_ADD:
115
+ return Object.assign({}, state, {
116
+ UserThemes: [...state.UserThemes, action.theme],
117
+ });
118
+ case exports.THEME_DELETE:
119
+ return Object.assign({}, state, {
120
+ UserThemes: state.UserThemes.filter((theme) => theme.Uuid !== action.theme.Uuid),
121
+ });
60
122
  default:
61
123
  return state;
62
124
  }
@@ -110,7 +110,7 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
110
110
  switch (exportDestination) {
111
111
  case Enums_1.ExportDestination.Excel:
112
112
  if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
113
- // WYSIWYG is fully delegated to the ag-grid excel export
113
+ // WYSIWYG is fully delegated to the AG Grid excel export
114
114
  this.api.exportApi.exportVisualDataToExcel();
115
115
  }
116
116
  else {
@@ -26,6 +26,7 @@ export declare const AB_SPECIAL_COLUMN: AdaptableColumnType;
26
26
  export declare const HALF_SECOND: number;
27
27
  export declare const AG_GRID_GROUPED_COLUMN: string;
28
28
  export declare const AG_GRID_PIVOT_COLUMN: string;
29
+ export declare const AG_GRID_CHART_WINDOW = "AG Grid Window";
29
30
  export declare const ADAPTABLE_ROW_ACTION_BUTTONS = "adaptableRowActionButtons";
30
31
  export declare const ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = "(ActionRowButtons)";
31
32
  export declare const DEFAULT_DATE_FORMAT_PATTERN = "dd-MM-yyyy";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = exports.ADAPTABLE_ROW_ACTION_BUTTONS = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
4
- exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = void 0;
3
+ exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = exports.ADAPTABLE_ROW_ACTION_BUTTONS = exports.AG_GRID_CHART_WINDOW = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
4
+ exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = void 0;
5
5
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
6
6
  const UIHelper_1 = require("../../View/UIHelper");
7
7
  exports.AUTOGENERATED_PK_COLUMN = '__ADAPTABLE_PK__';
@@ -29,6 +29,7 @@ exports.AB_SPECIAL_COLUMN = 'abSpecialColumn';
29
29
  exports.HALF_SECOND = 500;
30
30
  exports.AG_GRID_GROUPED_COLUMN = 'ag-Grid-AutoColumn';
31
31
  exports.AG_GRID_PIVOT_COLUMN = 'pivot_';
32
+ exports.AG_GRID_CHART_WINDOW = 'AG Grid Window';
32
33
  exports.ADAPTABLE_ROW_ACTION_BUTTONS = 'adaptableRowActionButtons';
33
34
  exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = '(ActionRowButtons)';
34
35
  exports.DEFAULT_DATE_FORMAT_PATTERN = 'dd-MM-yyyy';
@@ -276,6 +276,6 @@ exports.DefaultAdaptableOptions = {
276
276
  },
277
277
  chartingOptions: {
278
278
  saveStrategy: 'none',
279
- agGridContainerName: 'Ag Grid Window',
279
+ agGridContainerName: GeneralConstants.AG_GRID_CHART_WINDOW,
280
280
  },
281
281
  };
@@ -24,9 +24,9 @@ exports.DEFAULT_NAVIGATION_ITEMS = [
24
24
  'SystemStatus',
25
25
  '-',
26
26
  'FormatColumn',
27
+ 'StyledColumn',
27
28
  'FlashingCell',
28
29
  'Theme',
29
- 'StyledColumn',
30
30
  '-',
31
31
  'QuickSearch',
32
32
  'Query',
@@ -37,8 +37,8 @@ exports.DEFAULT_NAVIGATION_ITEMS = [
37
37
  'Shortcut',
38
38
  'DataChangeHistory',
39
39
  '-',
40
+ 'Charting',
40
41
  'Schedule',
41
42
  'StateManagement',
42
43
  'TeamSharing',
43
- 'Charting',
44
44
  ];
@@ -1,6 +1,6 @@
1
1
  import { ExpressionFunction } from '../../parser/src/types';
2
2
  import { BaseParameter } from './expressionFunctionUtils';
3
- import { RowNode } from '@ag-grid-community/core';
3
+ import { IRowNode } from '@ag-grid-community/core';
4
4
  import { AggregateParams } from './scalarAggregationHelper';
5
5
  /**
6
6
  * List of all the AggregatedScalar Functions available in AdaptableQL
@@ -22,12 +22,12 @@ export interface WeightParameter extends BaseParameter<'operand', 'WEIGHT'> {
22
22
  }
23
23
  export interface AggregatedScalarExpressionEvaluation {
24
24
  aggregationParams: AggregateParams<any, string | number>;
25
- rowValueGetter?: (rowNode: RowNode, aggregatedValue: any) => string | number | Date | boolean;
25
+ rowValueGetter?: (rowNode: IRowNode, aggregatedValue: any) => string | number | Date | boolean;
26
26
  context?: {
27
27
  weightParam?: WeightParameter;
28
28
  };
29
29
  sortByColumn?: string;
30
- rowFilterFn?: (rowNode: RowNode) => boolean;
30
+ rowFilterFn?: (rowNode: IRowNode) => boolean;
31
31
  }
32
32
  export interface CumulatedAggregationValue {
33
33
  currentValue: number;
@@ -1,5 +1,5 @@
1
1
  import { AlertDefinition } from '../../PredefinedConfig/AlertState';
2
- import { RowNode } from '@ag-grid-community/core';
2
+ import { IRowNode } from '@ag-grid-community/core';
3
3
  import { AdaptableColumn } from '../../../types';
4
4
  export interface PreviewInfo {
5
5
  column: AdaptableColumn;
@@ -14,5 +14,5 @@ export interface PreviewResult {
14
14
  initialValue: number;
15
15
  computedValue: number;
16
16
  validationRules: AlertDefinition[];
17
- rowNode: RowNode;
17
+ rowNode: IRowNode;
18
18
  }
@@ -23,8 +23,8 @@ import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessag
23
23
  import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatusMessageInfo';
24
24
  import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
25
25
  import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
26
- import { ChartDefinition, ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
27
- import { RowNode } from '@ag-grid-community/core';
26
+ import { AdaptableTheme, ChartDefinition, ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
27
+ import { IRowNode } from '@ag-grid-community/core';
28
28
  import { AdaptableApi } from '../../types';
29
29
  import { ToastOptions } from '../components/Toastify';
30
30
  import { StyledColumn } from '../PredefinedConfig/StyledColumnState';
@@ -65,7 +65,8 @@ export declare function CreateEmptyCellSummmary(): CellSummmary;
65
65
  export declare function CreateColumnFilter(ColumnId: string, PredicateId: SystemFilterPredicateId, Inputs: any[]): ColumnFilter;
66
66
  export declare function CreateEmptyStyledColumn(): StyledColumn;
67
67
  export declare function CreateEmptyChartDefinition(chartDefinition?: ChartDefinition): ChartDefinition;
68
- export declare function CreateCustomDisplayFormatterContext(value: any, node: RowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
68
+ export declare function CreateCustomDisplayFormatterContext(value: any, node: IRowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
69
+ export declare function CreateEmptyTheme(name?: string): AdaptableTheme;
69
70
  export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
70
71
  onClose?: VoidFunction;
71
72
  containerId: string;
@@ -110,5 +111,6 @@ export declare const ObjectFactory: {
110
111
  CreateCustomDisplayFormatterContext: typeof CreateCustomDisplayFormatterContext;
111
112
  CreateEmptyStyledColumn: typeof CreateEmptyStyledColumn;
112
113
  CreateEmptyChartDefinition: typeof CreateEmptyChartDefinition;
114
+ CreateEmptyTheme: typeof CreateEmptyTheme;
113
115
  };
114
116
  export default ObjectFactory;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateServerReport = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
3
+ exports.ObjectFactory = exports.CreateToastOptions = exports.CreateEmptyTheme = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateServerReport = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
4
4
  const Enums_1 = require("../PredefinedConfig/Common/Enums");
5
5
  const GeneralConstants_1 = require("./Constants/GeneralConstants");
6
6
  const Uuid_1 = require("../PredefinedConfig/Uuid");
@@ -379,6 +379,14 @@ function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
379
379
  };
380
380
  }
381
381
  exports.CreateCustomDisplayFormatterContext = CreateCustomDisplayFormatterContext;
382
+ function CreateEmptyTheme(name) {
383
+ return {
384
+ Uuid: (0, Uuid_1.createUuid)(),
385
+ Name: name || 'Custom Theme',
386
+ Description: name || 'Custom Theme',
387
+ };
388
+ }
389
+ exports.CreateEmptyTheme = CreateEmptyTheme;
382
390
  function CreateToastOptions(notificationsOptions, { onClose, containerId }, overides) {
383
391
  var _a;
384
392
  const adaptableToastPosition = notificationsOptions.position;
@@ -471,5 +479,6 @@ exports.ObjectFactory = {
471
479
  CreateCustomDisplayFormatterContext,
472
480
  CreateEmptyStyledColumn,
473
481
  CreateEmptyChartDefinition,
482
+ CreateEmptyTheme,
474
483
  };
475
484
  exports.default = exports.ObjectFactory;
@@ -1,7 +1,7 @@
1
1
  import { AggregatedScalarExpressionEvaluation } from '../ExpressionFunctions/aggregatedScalarExpressionFunctions';
2
2
  import { AdaptableApi } from '../../Api/AdaptableApi';
3
3
  import { AdaptableModule as ModuleConstants } from '../../PredefinedConfig/Common/Types';
4
- import { RowNode } from '@ag-grid-community/core';
4
+ import { IRowNode } from '@ag-grid-community/core';
5
5
  import { XOR } from '../Extensions/TypeExtensions';
6
6
  export declare class AggregatedScalarLiveValue {
7
7
  private source;
@@ -17,7 +17,7 @@ export declare class AggregatedScalarLiveValue {
17
17
  aggregatedScalarExpressionEvaluation: AggregatedScalarExpressionEvaluation;
18
18
  }>, requestingModule: ModuleConstants, adaptableApi: AdaptableApi);
19
19
  refresh(): void;
20
- getAggregatedValueForRow(rowNode: RowNode): any;
20
+ getAggregatedValueForRow(rowNode: IRowNode): any;
21
21
  getAllAggregationValues(): number[];
22
22
  private getAggregationValue;
23
23
  private getGlobalAggregatedValue;
@@ -1,5 +1,5 @@
1
1
  import { ICalculatedColumnExpressionService } from './Interface/ICalculatedColumnExpressionService';
2
- import { RowNode } from '@ag-grid-community/core';
2
+ import { IRowNode } from '@ag-grid-community/core';
3
3
  import { AdaptableCalculatedColumnQuery, CalculatedColumn, CalculatedColumnSettings } from '../../PredefinedConfig/CalculatedColumnState';
4
4
  import { AdaptableApi } from '../../../types';
5
5
  export declare class CalculatedColumnExpressionService implements ICalculatedColumnExpressionService {
@@ -9,7 +9,7 @@ export declare class CalculatedColumnExpressionService implements ICalculatedCol
9
9
  destroy(): void;
10
10
  getCalculatedColumnDataType(calculatedColumnQuery: AdaptableCalculatedColumnQuery): CalculatedColumnSettings['DataType'];
11
11
  isCalculatedColumnQueryValid(calculatedColumnQuery: AdaptableCalculatedColumnQuery): boolean;
12
- evaluateCalculatedColumnQuery(calculatedColumn: CalculatedColumn, rowNode: RowNode): any;
12
+ evaluateCalculatedColumnQuery(calculatedColumn: CalculatedColumn, rowNode: IRowNode): any;
13
13
  createAggregatedScalarLiveValue(calculatedColumn: CalculatedColumn): void;
14
14
  destroyAggregatedScalarLiveValue(calculatedColumn: CalculatedColumn): void;
15
15
  }
@@ -1,9 +1,9 @@
1
1
  import { IAdaptableService } from './IAdaptableService';
2
- import { RowNode } from '@ag-grid-community/core';
2
+ import { IRowNode } from '@ag-grid-community/core';
3
3
  import { AdaptableCalculatedColumnQuery, CalculatedColumn, CalculatedColumnSettings } from '../../../PredefinedConfig/CalculatedColumnState';
4
4
  export interface ICalculatedColumnExpressionService extends IAdaptableService {
5
5
  isCalculatedColumnQueryValid(calculatedColumnQuery: AdaptableCalculatedColumnQuery): boolean;
6
- evaluateCalculatedColumnQuery(calculatedColumn: CalculatedColumn, rowNode: RowNode): any;
6
+ evaluateCalculatedColumnQuery(calculatedColumn: CalculatedColumn, rowNode: IRowNode): any;
7
7
  getCalculatedColumnDataType(calculatedColumnQuery: AdaptableCalculatedColumnQuery): CalculatedColumnSettings['DataType'];
8
8
  createAggregatedScalarLiveValue(calculatedColumn: CalculatedColumn): void;
9
9
  destroyAggregatedScalarLiveValue(calculatedColumn: CalculatedColumn): void;
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { IAdaptableService } from './IAdaptableService';
3
- import { RowNode } from '@ag-grid-community/core';
3
+ import { IRowNode } from '@ag-grid-community/core';
4
4
  import { CellDataChangedInfo } from '../../../PredefinedConfig/Common/CellDataChangedInfo';
5
5
  import { AdaptableModule } from '../../../PredefinedConfig/Common/Types';
6
6
  import { AggregatedScalarFunctionName, ScalarAggregationParameter } from '../../ExpressionFunctions/aggregatedScalarExpressionFunctions';
@@ -10,8 +10,8 @@ import { ScalarFunctionName } from '../../ExpressionFunctions/scalarExpressionFu
10
10
  import { ObservableFunctionName } from '../../ExpressionFunctions/observableExpressionFunctions';
11
11
  import { ExpressionFunctionMap } from '../../../parser/src/types';
12
12
  export interface IQueryLanguageService extends IAdaptableService {
13
- evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: RowNode): boolean;
14
- evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: RowNode): any;
13
+ evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): boolean;
14
+ evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any;
15
15
  evaluateObservableExpression(expression: string, module: AdaptableModule): Observable<CellDataChangedInfo>;
16
16
  evaluateAggregatedBooleanExpression(expression: string, module: AdaptableModule): BooleanAggregationParameter;
17
17
  evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule): ScalarAggregationParameter;
@@ -1,7 +1,7 @@
1
1
  import { Report, ReportData, SystemReportName } from '../../../PredefinedConfig/ExportState';
2
2
  import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
3
3
  import { IAdaptableService } from './IAdaptableService';
4
- import { ExcelStyle, RowNode } from '@ag-grid-community/core';
4
+ import { ExcelStyle, IRowNode } from '@ag-grid-community/core';
5
5
  import { SystemExportDestination } from '../../../types';
6
6
  export interface IReportService extends IAdaptableService {
7
7
  resetExcelStyleMemoization(): void;
@@ -22,7 +22,7 @@ export interface IReportService extends IAdaptableService {
22
22
  getReportData(report: Report, includePrimaryKey?: boolean): ReportData;
23
23
  getReportDataAsArray(report: Report, includePrimaryKey?: boolean): any[][];
24
24
  convertReportDataToArray(reportData: ReportData): any[][];
25
- getCellExportValueFromRowNode(rowNode: RowNode, columnId: string): any;
26
- getCellExportValueFromRawValue(rowNode: RowNode, rawValue: any, columnId: string): any;
25
+ getCellExportValueFromRowNode(rowNode: IRowNode, columnId: string): any;
26
+ getCellExportValueFromRawValue(rowNode: IRowNode, rawValue: any, columnId: string): any;
27
27
  getReportFileName(reportName: string): string;
28
28
  }
@@ -0,0 +1,3 @@
1
+ import { IAdaptableService } from './IAdaptableService';
2
+ export interface IThemeService extends IAdaptableService {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -14,4 +14,6 @@ export declare class MetamodelService implements IMetamodelService {
14
14
  private getAdaptableOptionsDefaultValues;
15
15
  private getAdaptableMetamodel;
16
16
  private getAdaptableOptionsMetamodel;
17
+ private extractUiLabel;
18
+ private formatCamelCaseToHumanText;
17
19
  }
@@ -7,14 +7,7 @@ const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions")
7
7
  const LoggingHelper_1 = require("../Helpers/LoggingHelper");
8
8
  const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
9
9
  const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
10
- const supportedMetamodelTypes = [
11
- 'string',
12
- 'number',
13
- 'boolean',
14
- 'array',
15
- 'function',
16
- 'REFERENCE',
17
- ];
10
+ const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
18
11
  class MetamodelService {
19
12
  constructor(getAdaptableOptions) {
20
13
  this.gridInfoOptions = new Map();
@@ -57,23 +50,23 @@ class MetamodelService {
57
50
  validateOptionsObject(validationErrors, optionsObjectName, optionsObject, optionsObjectMetamodel, optionsObjectDefaultValues) {
58
51
  Object.entries(optionsObject).forEach(([optionKey, optionValue]) => {
59
52
  var _a;
60
- const optionMetamodel = (_a = optionsObjectMetamodel === null || optionsObjectMetamodel === void 0 ? void 0 : optionsObjectMetamodel.properties) === null || _a === void 0 ? void 0 : _a.find((metamodelProperty) => metamodelProperty.name === optionKey);
53
+ const optionMetamodel = (_a = optionsObjectMetamodel === null || optionsObjectMetamodel === void 0 ? void 0 : optionsObjectMetamodel.props) === null || _a === void 0 ? void 0 : _a.find((metamodelProperty) => metamodelProperty.name === optionKey);
61
54
  if (!optionMetamodel) {
62
55
  validationErrors.push(`${optionsObjectName}.${optionKey} (value=${optionValue}) :: unknown/unsupported property, will be ignored`);
63
56
  return;
64
57
  }
65
58
  // let's try to validate the type of the provided value
66
59
  const expectedOptionsValueType = this.getExpectedOptionsValueType(optionMetamodel);
67
- const providedOptionsValueType = Array.isArray(optionValue) ? 'array' : typeof optionValue;
60
+ const providedOptionsValueType = Array.isArray(optionValue) ? 'a' : typeof optionValue;
68
61
  if (!expectedOptionsValueType) {
69
62
  return;
70
63
  }
71
64
  // if it's a REFERENCE, we try to go (recursively) deeper
72
- if (expectedOptionsValueType === 'REFERENCE') {
73
- const referenceObjectName = optionMetamodel.reference;
65
+ if (expectedOptionsValueType === 'R') {
66
+ const referenceObjectName = optionMetamodel.ref;
74
67
  const referenceObject = optionsObject[optionKey];
75
68
  const referenceObjectMetamodel = this.getAdaptableMetamodel()[referenceObjectName];
76
- if (referenceObject && (referenceObjectMetamodel === null || referenceObjectMetamodel === void 0 ? void 0 : referenceObjectMetamodel.kind) === 'Interface') {
69
+ if (referenceObject && (referenceObjectMetamodel === null || referenceObjectMetamodel === void 0 ? void 0 : referenceObjectMetamodel.kind) === 'I') {
77
70
  this.validateOptionsObject(validationErrors, referenceObjectName, referenceObject, referenceObjectMetamodel, optionsObjectDefaultValues === null || optionsObjectDefaultValues === void 0 ? void 0 : optionsObjectDefaultValues[optionKey]);
78
71
  }
79
72
  }
@@ -107,10 +100,10 @@ class MetamodelService {
107
100
  items: baseOptionsItems,
108
101
  });
109
102
  // map containers
110
- adaptableOptionsMetamodel.properties
103
+ adaptableOptionsMetamodel.props
111
104
  .filter((optionItem) => optionItem.gridInfo === 'container')
112
105
  .forEach((containerOptionItem) => {
113
- const containerMetamodelName = containerOptionItem.reference;
106
+ const containerMetamodelName = containerOptionItem.ref;
114
107
  const adaptableOptionsName = containerOptionItem.name;
115
108
  const containerOptionsMetamodel = adaptableMetamodel[containerMetamodelName];
116
109
  // @ts-ignore
@@ -125,21 +118,21 @@ class MetamodelService {
125
118
  }
126
119
  const optionItems = this.mapGridInfoContainerItems(containerOptionsMetamodel, containerOptionsValues, containerOptionsDefaultValues, filterItemProperty);
127
120
  gridInfoOptions.set(containerOptionItem.name, {
128
- containerLabel: containerOptionItem.uiLabel,
121
+ containerLabel: this.extractUiLabel(containerOptionItem),
129
122
  items: optionItems,
130
123
  });
131
124
  });
132
125
  return gridInfoOptions;
133
126
  }
134
127
  mapGridInfoContainerItems(optionItemContainer, adaptableOptionsValues, defaultAdaptableOptionsValues, filter = (itemProperty) => itemProperty.gridInfo === 'item') {
135
- return optionItemContainer.properties.filter(filter).map((itemProperty) => {
128
+ return optionItemContainer.props.filter(filter).map((itemProperty) => {
136
129
  return {
137
130
  name: itemProperty.name,
138
131
  value: adaptableOptionsValues === null || adaptableOptionsValues === void 0 ? void 0 : adaptableOptionsValues[itemProperty.name],
139
132
  defaultValue: defaultAdaptableOptionsValues[itemProperty.name],
140
133
  kind: itemProperty.kind,
141
- description: StringExtensions_1.default.UnescapeHtmlEntities(itemProperty.description),
142
- uiLabel: itemProperty.uiLabel,
134
+ description: StringExtensions_1.default.UnescapeHtmlEntities(itemProperty.desc),
135
+ uiLabel: this.extractUiLabel(itemProperty),
143
136
  };
144
137
  });
145
138
  }
@@ -152,5 +145,19 @@ class MetamodelService {
152
145
  getAdaptableOptionsMetamodel() {
153
146
  return this.getAdaptableMetamodel()['AdaptableOptions'];
154
147
  }
148
+ extractUiLabel(item) {
149
+ return item.uiLabel || this.formatCamelCaseToHumanText(item.name);
150
+ }
151
+ formatCamelCaseToHumanText(camelCase) {
152
+ if (!camelCase || camelCase == null) {
153
+ return null;
154
+ }
155
+ const rex = /([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g;
156
+ const words = camelCase.replace(rex, '$1$4 $2$3$5').replace('.', ' ').split(' ');
157
+ return words
158
+ .map((word) => word.substring(0, 1).toUpperCase() +
159
+ (word.length > 1 ? word.substring(1, word.length) : ''))
160
+ .join(' ');
161
+ }
155
162
  }
156
163
  exports.MetamodelService = MetamodelService;
@@ -1,7 +1,7 @@
1
1
  import { IQueryLanguageService, ModuleExpressionFunctionsMap } from './Interface/IQueryLanguageService';
2
2
  import { Observable } from 'rxjs';
3
3
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
4
- import { RowNode } from '@ag-grid-community/core';
4
+ import { IRowNode } from '@ag-grid-community/core';
5
5
  import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
6
6
  import { ScalarAggregationParameter } from '../ExpressionFunctions/aggregatedScalarExpressionFunctions';
7
7
  import { AdaptableApi } from '../../../types';
@@ -15,7 +15,7 @@ export declare class QueryLanguageService implements IQueryLanguageService {
15
15
  private cacheModuleSpecificExpressionFunctions;
16
16
  constructor(adaptableApi: AdaptableApi);
17
17
  evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any): any;
18
- evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: RowNode): any;
18
+ evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any;
19
19
  evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule): ScalarAggregationParameter;
20
20
  evaluateObservableExpression(reactiveExpression: string, module: AdaptableModule): Observable<CellDataChangedInfo>;
21
21
  evaluateAggregatedBooleanExpression(aggregationExpression: string, module: AdaptableModule): BooleanAggregationParameter;
@@ -1,7 +1,7 @@
1
1
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
2
2
  import { Report, ReportData, SystemReportName } from '../../PredefinedConfig/ExportState';
3
3
  import { IReportService } from './Interface/IReportService';
4
- import { ExcelStyle, RowNode } from '@ag-grid-community/core';
4
+ import { ExcelStyle, IRowNode } from '@ag-grid-community/core';
5
5
  import { SystemExportDestination } from '../../AdaptableOptions/ExportOptions';
6
6
  import { AdaptableApi } from '../../../types';
7
7
  export declare class ReportService implements IReportService {
@@ -27,10 +27,10 @@ export declare class ReportService implements IReportService {
27
27
  getReportData(report: Report, includePrimaryKey?: boolean): ReportData;
28
28
  getReportDataAsArray(report: Report, includePrimaryKey?: boolean): any[][];
29
29
  convertReportDataToArray(reportData: ReportData): any[][];
30
- getRowObjectForColumnIds(rowNode: RowNode, columnIds: string[]): Record<string, any>;
30
+ getRowObjectForColumnIds(rowNode: IRowNode, columnIds: string[]): Record<string, any>;
31
31
  PublishLiveLiveDataChangedEvent(reportDestination: 'ipushpull' | 'Glue42', liveDataTrigger: 'Connected' | 'Disconnected' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated', liveReport?: any): void;
32
- getCellExportValueFromRowNode(rowNode: RowNode, columnId: string): any;
33
- getCellExportValueFromRawValue(rowNode: RowNode, cellRawValue: any, columnId: string): any;
32
+ getCellExportValueFromRowNode(rowNode: IRowNode, columnId: string): any;
33
+ getCellExportValueFromRawValue(rowNode: IRowNode, cellRawValue: any, columnId: string): any;
34
34
  getReportFileName(reportName: string): string;
35
35
  destroy(): void;
36
36
  private getCustomExportDateFormat;
@@ -0,0 +1,12 @@
1
+ import { AdaptableApi, AdaptableTheme } from '../../types';
2
+ import { IThemeService } from './Interface/IThemeService';
3
+ export declare class ThemeService implements IThemeService {
4
+ private api;
5
+ private unsubscribe;
6
+ private styleSheetObject;
7
+ constructor(api: AdaptableApi);
8
+ subscribe(): void;
9
+ onThemeChanged: () => void;
10
+ applyNewThemeVariables(theme: AdaptableTheme): void;
11
+ destroy(): void;
12
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThemeService = void 0;
4
+ class ThemeService {
5
+ constructor(api) {
6
+ var _a;
7
+ this.unsubscribe = () => { };
8
+ this.onThemeChanged = () => {
9
+ const currentTheme = this.api.themeApi.getCurrentThemeObject();
10
+ this.applyNewThemeVariables(currentTheme);
11
+ };
12
+ this.api = api;
13
+ this.subscribe();
14
+ if (!this.styleSheetObject) {
15
+ this.styleSheetObject = new CSSStyleSheet();
16
+ // ts does not know about adoptedStyleSheets
17
+ document.adoptedStyleSheets = [
18
+ ...((_a = document.adoptedStyleSheets) !== null && _a !== void 0 ? _a : []),
19
+ this.styleSheetObject,
20
+ ];
21
+ }
22
+ }
23
+ subscribe() {
24
+ const themeChangedUnsubscribe = this.api.eventApi.on('ThemeChanged', this.onThemeChanged);
25
+ const themeEditedUnsubscribe = this.api.eventApi.on('ThemeEdited', this.onThemeChanged);
26
+ this.unsubscribe = () => {
27
+ themeChangedUnsubscribe();
28
+ themeEditedUnsubscribe();
29
+ };
30
+ }
31
+ applyNewThemeVariables(theme) {
32
+ var _a;
33
+ const variables = (_a = theme.CSSVariables) !== null && _a !== void 0 ? _a : {};
34
+ let str = ':root {';
35
+ for (const [key, value] of Object.entries(variables)) {
36
+ if (key.includes('--')) {
37
+ str += `${key}: ${value};`;
38
+ }
39
+ }
40
+ str += '}';
41
+ this.styleSheetObject.replaceSync(str);
42
+ }
43
+ destroy() {
44
+ this.api = null;
45
+ this.unsubscribe();
46
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
47
+ }
48
+ }
49
+ exports.ThemeService = ThemeService;