@adaptabletools/adaptable-cjs 19.0.0-canary.0 → 19.0.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 (58) hide show
  1. package/README.md +1 -2
  2. package/base.css +1 -1
  3. package/base.css.map +1 -1
  4. package/index.css +1 -1
  5. package/index.css.map +1 -1
  6. package/package.json +1 -1
  7. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
  8. package/src/Api/AlertApi.d.ts +8 -0
  9. package/src/Api/ColumnApi.d.ts +4 -0
  10. package/src/Api/CustomSortApi.d.ts +8 -0
  11. package/src/Api/Events/LiveDataChanged.d.ts +1 -1
  12. package/src/Api/FlashingCellApi.d.ts +25 -12
  13. package/src/Api/FormatColumnApi.d.ts +8 -0
  14. package/src/Api/GridApi.d.ts +0 -20
  15. package/src/Api/Implementation/AlertApiImpl.d.ts +2 -0
  16. package/src/Api/Implementation/AlertApiImpl.js +6 -0
  17. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  18. package/src/Api/Implementation/ColumnApiImpl.js +6 -0
  19. package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -0
  20. package/src/Api/Implementation/CustomSortApiImpl.js +6 -0
  21. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +3 -0
  22. package/src/Api/Implementation/FlashingCellApiImpl.js +9 -0
  23. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -0
  24. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -0
  25. package/src/Api/Implementation/GridApiImpl.d.ts +0 -4
  26. package/src/Api/Implementation/GridApiImpl.js +0 -17
  27. package/src/Api/Implementation/ShortcutApiImpl.d.ts +2 -0
  28. package/src/Api/Implementation/ShortcutApiImpl.js +6 -0
  29. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +2 -0
  30. package/src/Api/Implementation/StyledColumnApiImpl.js +6 -0
  31. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -2
  32. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -9
  33. package/src/Api/Internal/ExportInternalApi.d.ts +3 -3
  34. package/src/Api/Internal/ExportInternalApi.js +17 -13
  35. package/src/Api/Internal/GridFilterInternalApi.d.ts +1 -1
  36. package/src/Api/Internal/GridFilterInternalApi.js +1 -1
  37. package/src/Api/ShortcutApi.d.ts +8 -0
  38. package/src/Api/StyledColumnApi.d.ts +8 -0
  39. package/src/Api/UserInterfaceApi.d.ts +0 -10
  40. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -1
  41. package/src/PredefinedConfig/Common/RowScope.d.ts +1 -1
  42. package/src/PredefinedConfig/FormatColumnState.d.ts +0 -4
  43. package/src/Redux/ActionsReducers/SystemRedux.js +3 -8
  44. package/src/Strategy/DashboardModule.js +11 -7
  45. package/src/View/Dashboard/DashboardPopup.js +4 -3
  46. package/src/View/Dashboard/DashboardViewPanel.js +2 -1
  47. package/src/View/Layout/Wizard/getGridFilterPreview.js +1 -1
  48. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  49. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  50. package/src/agGrid/AdaptableAgGrid.js +4 -3
  51. package/src/agGrid/AgGridColumnAdapter.js +2 -1
  52. package/src/agGrid/AgGridMenuAdapter.js +14 -14
  53. package/src/agGrid/PercentBarRenderer.js +1 -1
  54. package/src/env.js +2 -2
  55. package/src/metamodel/adaptable.metamodel.js +1 -1
  56. package/tsconfig.cjs.tsbuildinfo +1 -1
  57. package/src/PredefinedConfig/QueryState.d.ts +0 -18
  58. package/src/PredefinedConfig/QueryState.js +0 -2
@@ -43,7 +43,7 @@ export interface NumberFormatterOptions extends BaseFormatterOptions {
43
43
  */
44
44
  Suffix?: string;
45
45
  /**
46
- * Replaces cell value with supplied value (that can contain placeholders)
46
+ * Replaces cell value with supplied value (that can contain Template Literals)
47
47
  */
48
48
  Content?: string | number;
49
49
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Defines which types of Rows to exclude when rendering Format Columns, Action Columns, Badges
2
+ * Defines which types of Rows to exclude when rendering Format Columns, Action Columns and Badges
3
3
  */
4
4
  export type RowScope = {
5
5
  /**
@@ -45,10 +45,6 @@ export interface FormatColumn extends SuspendableObject {
45
45
  * Which types of Rows should be formatted (data, grouped, summary)
46
46
  */
47
47
  RowScope?: RowScope;
48
- /**
49
- * @deprecated FormatColumns now apply to Group Rows by default; use RowScope for more control
50
- */
51
- IncludeGroupedRows?: never;
52
48
  }
53
49
  /**
54
50
  * The Format Column Rule - can be either a Predicate or a BooleanExpression
@@ -536,10 +536,8 @@ const SystemReducer = (state = initialState, action) => {
536
536
  });
537
537
  const AdaptableFlashingCellsMap = Object.assign({}, state.AdaptableFlashingCellsMap);
538
538
  AdaptableFlashingCellsMap[FlashingCell.Uuid] = FlashingCell;
539
- return Object.assign({}, state, {
540
- AdaptableFlashingCells: AdaptableFlashingCells,
541
- AdaptableFlashingCellsMap: AdaptableFlashingCellsMap,
542
- });
539
+ return Object.assign(Object.assign({}, state), { AdaptableFlashingCells,
540
+ AdaptableFlashingCellsMap });
543
541
  }
544
542
  case exports.SYSTEM_FLASHING_CELL_DELETE: {
545
543
  const { flashingCell: FlashingCell } = action;
@@ -563,10 +561,7 @@ const SystemReducer = (state = initialState, action) => {
563
561
  return Object.assign(Object.assign({}, state), { AdaptableFlashingCells: AdaptableFlashingCells, AdaptableFlashingCellsMap: AdaptableFlashingCellsMap });
564
562
  }
565
563
  case exports.SYSTEM_FLASHING_CELL_DELETE_ALL: {
566
- return Object.assign({}, state, {
567
- AdaptableFlashingCells: {},
568
- AdaptableFlashingCellsMap: {},
569
- });
564
+ return Object.assign(Object.assign({}, state), { AdaptableFlashingCells: {}, AdaptableFlashingCellsMap: {} });
570
565
  }
571
566
  case exports.SYSTEM_HIGHLIGHT_CELL_ADD: {
572
567
  const actionTypedAdd = action;
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
6
6
  const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
7
7
  const DashboardRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/DashboardRedux"));
8
+ const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
8
9
  class DashboardModule extends AdaptableModuleBase_1.AdaptableModuleBase {
9
10
  constructor(api) {
10
11
  super(ModuleConstants.DashboardModuleId, ModuleConstants.DashboardFriendlyName, 'dashboard', 'DashboardPopup', 'The Dashboard - usually placed above the Grid - is designed to provide quick access to commonly required AdapTable functionalty', api);
@@ -30,22 +31,25 @@ class DashboardModule extends AdaptableModuleBase_1.AdaptableModuleBase {
30
31
  buildMenuItems() {
31
32
  if (this.isModuleAvailable()) {
32
33
  let menuItems = [];
34
+ const dashboardState = this.api.dashboardApi.getDashboardState();
33
35
  if (this.isModuleEditable()) {
34
36
  menuItems.push(this.createMenuItemClickFunction('dashboard-configure', 'Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
35
37
  }
36
- if (this.api.dashboardApi.getDashboardState().IsCollapsed) {
37
- menuItems.push(this.createMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
38
+ if (ArrayExtensions_1.default.IsNotNullOrEmpty(dashboardState.Tabs)) {
39
+ if (dashboardState.IsCollapsed) {
40
+ menuItems.push(this.createMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
41
+ }
42
+ else {
43
+ menuItems.push(this.createMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
44
+ }
38
45
  }
39
- else {
40
- menuItems.push(this.createMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
41
- }
42
- if (this.api.dashboardApi.getDashboardState().IsFloating) {
46
+ if (dashboardState.IsFloating) {
43
47
  menuItems.push(this.createMenuItemReduxAction('dashboard-dock', 'Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
44
48
  }
45
49
  else if (this.api.optionsApi.getDashboardOptions().canFloat) {
46
50
  menuItems.push(this.createMenuItemReduxAction('dashboard-float', 'Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
47
51
  }
48
- if (this.api.dashboardApi.getDashboardState().IsHidden) {
52
+ if (dashboardState.IsHidden) {
49
53
  menuItems.push(this.createMenuItemReduxAction('dashboard-show', 'Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
50
54
  }
51
55
  else {
@@ -76,9 +76,10 @@ class DashboardPopupComponent extends React.Component {
76
76
  React.createElement(CheckBox_1.CheckBox, { "data-name": "hidden", className: `${baseClassName}__settings-option`, checked: this.props.IsHidden, onChange: (checked) => this.props.onSetDashboardHidden(checked) }, "Hidden"))),
77
77
  React.createElement(Panel_1.default, { header: 'Dashboard Contents', style: { borderBottom: '1px solid var(--ab-color-primary)' }, variant: "default", borderRadius: "none", marginTop: 4 },
78
78
  React.createElement(rebass_1.Flex, { className: `${baseClassName}__contents-selector`, flexDirection: "row", padding: 2 },
79
- React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Tabs & Toolbars"),
80
- React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons"),
81
- React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.PinnedToolbars, checked: this.state.DashboardConfigView == DashboardConfigView.PinnedToolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Pinned Toolbars")),
79
+ React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Tabbed Toolbars"),
80
+ React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.PinnedToolbars, checked: this.state.DashboardConfigView == DashboardConfigView.PinnedToolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Pinned Toolbars"),
81
+ ' ',
82
+ React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons")),
82
83
  React.createElement(rebass_1.Box, { className: `${baseClassName}__Module-Selector`, "data-name": this.state.DashboardConfigView === DashboardConfigView.Toolbars
83
84
  ? 'toolbars'
84
85
  : 'buttons', style: { minHeight: 0, flex: '1 1 0' }, padding: 2 },
@@ -7,6 +7,7 @@ const React = tslib_1.__importStar(require("react"));
7
7
  const CheckBox_1 = require("../../components/CheckBox");
8
8
  const react_redux_1 = require("react-redux");
9
9
  const rebass_1 = require("rebass");
10
+ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
10
11
  class DashboardViewPanelComponent extends React.Component {
11
12
  constructor(props) {
12
13
  super(props);
@@ -15,7 +16,7 @@ class DashboardViewPanelComponent extends React.Component {
15
16
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
16
17
  return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Dashboard__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
17
18
  ' ',
18
- React.createElement(CheckBox_1.CheckBox, { className: `ab-${elementType}__Dashboard__collapsed-check`, marginTop: 0, fontSize: 2, padding: 1, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse"),
19
+ ArrayExtensions_1.default.IsNotNullOrEmpty(this.props.api.dashboardApi.getDashboardState().Tabs) && (React.createElement(CheckBox_1.CheckBox, { className: `ab-${elementType}__Dashboard__collapsed-check`, marginTop: 0, fontSize: 2, padding: 1, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse")),
19
20
  '',
20
21
  this.props.api.optionsApi.getDashboardOptions().canFloat && (React.createElement(CheckBox_1.CheckBox, { className: `ab-${elementType}__Dashboard__collapsed-check`, marginTop: 0, fontSize: 2, padding: 1, checked: this.props.IsFloating, onChange: (checked) => this.props.onSetDashboardFloating(checked) }, "Float")),
21
22
  ' ',
@@ -8,7 +8,7 @@ const Tag_1 = require("../../../components/Tag");
8
8
  const getGridFilterViewItems = (layout) => {
9
9
  var _a;
10
10
  return {
11
- name: 'Grid Filters',
11
+ name: 'Grid Filter',
12
12
  view: (React.createElement(Tag_1.Tag, null,
13
13
  React.createElement(ExpressionPreview_1.ExpressionPreview, { query: { BooleanExpression: (_a = layout.GridFilter) === null || _a === void 0 ? void 0 : _a.Expression } }))),
14
14
  };
@@ -190,7 +190,7 @@ const ColumnRow = (props) => {
190
190
  const ColumnsSection = (props) => {
191
191
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
192
192
  const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
193
- const allColumns = adaptable.api.columnApi.getColumns();
193
+ const allColumns = adaptable.api.columnApi.getStandardColumns();
194
194
  const sortedColumns = React.useMemo(() => {
195
195
  return ArrayExtensions_1.default.sortArrayWithOrder(allColumns.map((col) => col.columnId), layout.Columns, { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
196
196
  }, [layout, allColumns]);
@@ -39,7 +39,7 @@ const GridFilterSection = (props) => {
39
39
  props.onChange(Object.assign(Object.assign({}, layout), { GridFilter: Object.assign(Object.assign({}, layout.GridFilter), { Expression: expression }) }));
40
40
  }, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api })));
41
41
  return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
42
- React.createElement(Tabs_1.Tabs.Tab, null, "Grid Filters"),
42
+ React.createElement(Tabs_1.Tabs.Tab, null, "Grid Filter"),
43
43
  React.createElement(Tabs_1.Tabs.Content, null,
44
44
  React.createElement(Panel_1.default, null, expressionEditorContent))));
45
45
  };
@@ -973,12 +973,13 @@ class AdaptableAgGrid {
973
973
  /**
974
974
  * `processPivotResultColDef`
975
975
  */
976
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', () => {
976
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', (original_processPivotResultColDef) => {
977
977
  return (colDef) => {
978
978
  if (this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
979
979
  colDef.floatingFilter = false;
980
980
  colDef.filter = false;
981
981
  }
982
+ original_processPivotResultColDef === null || original_processPivotResultColDef === void 0 ? void 0 : original_processPivotResultColDef(colDef);
982
983
  };
983
984
  });
984
985
  /**
@@ -3220,7 +3221,7 @@ class AdaptableAgGrid {
3220
3221
  rawValue = dateRawValue;
3221
3222
  }
3222
3223
  }
3223
- return this.api.exportApi.internalApi.getCellExportValueFromRawValue(rowNode, rawValue, columnId);
3224
+ return this.api.exportApi.internalApi.getCellExportValueFromRawValue(rowNode, rawValue, columnId, GeneralConstants.VISUAL_DATA_REPORT);
3224
3225
  }
3225
3226
  processCellForExcelExport(rowNode, columnId) {
3226
3227
  if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
@@ -3231,7 +3232,7 @@ class AdaptableAgGrid {
3231
3232
  return isoFormattedDate;
3232
3233
  }
3233
3234
  }
3234
- return this.api.exportApi.internalApi.getCellExportValueFromRowNode(rowNode, columnId);
3235
+ return this.api.exportApi.internalApi.getCellExportValueFromRowNode(rowNode, columnId, GeneralConstants.VISUAL_DATA_REPORT);
3235
3236
  }
3236
3237
  isQuickFilterAvailable() {
3237
3238
  if (this.api.layoutApi.isCurrentLayoutPivot() &&
@@ -701,7 +701,7 @@ class AgGridColumnAdapter {
701
701
  if (styledColumn && !(styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.IsSuspended)) {
702
702
  const styledCellStyle = this.getStyledColumnStyle(styledColumn, gridCell.column, params);
703
703
  // for percentbar we want to merge
704
- if (styledColumn.PercentBarStyle || styledColumn.BadgeStyle) {
704
+ if (styledColumn.PercentBarStyle || styledColumn.BadgeStyle || styledColumn.GradientStyle) {
705
705
  styledColumnStyle = styledCellStyle;
706
706
  }
707
707
  else {
@@ -710,6 +710,7 @@ class AgGridColumnAdapter {
710
710
  }
711
711
  }
712
712
  const activeFormatColumnsWithStyle = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(gridCell.column);
713
+ // background color of styledColumn.GradientStyle has precedence and wins over FormatColumn
713
714
  return Object.assign(Object.assign({}, this.getFormatColumnCellStyle(gridCell.column, activeFormatColumnsWithStyle, params)), styledColumnStyle);
714
715
  }
715
716
  getStyledColumnStyle(styledColumn, abColumn, params) {
@@ -380,11 +380,11 @@ class AgGridMenuAdapter {
380
380
  icon: 'export-data',
381
381
  }));
382
382
  return this.normalizeMenuGroup(this.buildMenuGroupParent('Export', [
383
- ...visualDataExportItems,
384
383
  ...allDataExportItems,
385
384
  ...currentDataExportItems,
386
385
  ...selectedCellsExportItems,
387
386
  ...selectedRowsExportItems,
387
+ ...visualDataExportItems,
388
388
  ], {
389
389
  label: 'Export',
390
390
  icon: 'export',
@@ -475,19 +475,19 @@ class AgGridMenuAdapter {
475
475
  ],
476
476
  };
477
477
  /*
478
- const calculatedColumnMenuItem: AdaptableMenuItem = {
479
- name: 'calculated-column-group',
480
- label: 'Calculated Column',
481
- module: 'CalculatedColumn',
482
- isVisible: true,
483
- icon: {
484
- name: 'columns',
485
- },
486
- subItems: [
487
- ...calculatedColumnMenuItems,
488
- ],
489
- };
490
- */
478
+ const calculatedColumnMenuItem: AdaptableMenuItem = {
479
+ name: 'calculated-column-group',
480
+ label: 'Calculated Column',
481
+ module: 'CalculatedColumn',
482
+ isVisible: true,
483
+ icon: {
484
+ name: 'columns',
485
+ },
486
+ subItems: [
487
+ ...calculatedColumnMenuItems,
488
+ ],
489
+ };
490
+ */
491
491
  const columnMenuItem = {
492
492
  name: 'column-group',
493
493
  label: 'Column',
@@ -67,7 +67,7 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
67
67
  textEl.innerText = (_b = (_a = params.formatValue) === null || _a === void 0 ? void 0 : _a.call(params, params.value)) !== null && _b !== void 0 ? _b : params.value;
68
68
  }
69
69
  if (percentBarStyle.CellText.includes('PercentageValue')) {
70
- textEl.innerText += ' ' + `(${percentageValue.toFixed(0)}%)`;
70
+ textEl.innerText += ' ' + `${percentageValue.toFixed(0)}%`;
71
71
  }
72
72
  switch (percentBarStyle.CellTextPosition) {
73
73
  case 'Above':
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
5
- PUBLISH_TIMESTAMP: 1724333963891 || Date.now(),
6
- VERSION: "19.0.0-canary.0" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1726230101609 || Date.now(),
6
+ VERSION: "19.0.1" || '--current-version--',
7
7
  };