@adaptabletools/adaptable 23.0.22 → 23.1.0-canary.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 (42) hide show
  1. package/package.json +3 -2
  2. package/src/AdaptableInterfaces/IAdaptable.d.ts +37 -1
  3. package/src/AdaptableOptions/ColumnMenuOptions.d.ts +1 -1
  4. package/src/AdaptableOptions/ContextMenuOptions.d.ts +1 -1
  5. package/src/AdaptableOptions/FilterOptions.d.ts +22 -6
  6. package/src/Api/Internal/FormatColumnInternalApi.d.ts +12 -2
  7. package/src/Api/Internal/FormatColumnInternalApi.js +4 -0
  8. package/src/Redux/Store/AdaptableStore.js +20 -6
  9. package/src/Strategy/LayoutModule.js +4 -1
  10. package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.d.ts +2 -0
  11. package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.js +13 -10
  12. package/src/Utilities/Hooks/useAdaptableOptions.d.ts +1 -1
  13. package/src/Utilities/Services/AnnotationsService.js +8 -8
  14. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.d.ts +3 -9
  15. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +10 -6
  16. package/src/View/Components/PredicateEditor/PredicateEditor.js +8 -4
  17. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +18 -8
  18. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +2 -2
  19. package/src/View/Wizard/OnePageWizards.d.ts +1 -1
  20. package/src/agGrid/AdaptableAgGrid.d.ts +71 -10
  21. package/src/agGrid/AdaptableAgGrid.js +125 -88
  22. package/src/agGrid/AgGridAdapter.d.ts +33 -1
  23. package/src/agGrid/AgGridAdapter.js +91 -0
  24. package/src/agGrid/AgGridColumnAdapter.d.ts +68 -1
  25. package/src/agGrid/AgGridColumnAdapter.js +191 -73
  26. package/src/agGrid/AgGridMenuAdapter.d.ts +8 -2
  27. package/src/agGrid/AgGridMenuAdapter.js +17 -4
  28. package/src/agGrid/AgGridModulesAdapter.js +6 -1
  29. package/src/agGrid/AgGridThemeAdapter.d.ts +17 -0
  30. package/src/agGrid/AgGridThemeAdapter.js +37 -6
  31. package/src/agGrid/gridRefreshScope.d.ts +20 -0
  32. package/src/agGrid/gridRefreshScope.js +39 -0
  33. package/src/components/Radio/index.d.ts +2 -2
  34. package/src/devTools/DevToolsTracks.d.ts +6 -0
  35. package/src/devTools/DevToolsTracks.js +6 -0
  36. package/src/devTools/index.d.ts +25 -1
  37. package/src/env.js +2 -2
  38. package/src/layout-manager/src/index.d.ts +9 -0
  39. package/src/layout-manager/src/index.js +38 -17
  40. package/src/parser/src/types.d.ts +3 -1
  41. package/src/types.d.ts +1 -1
  42. package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "23.0.22",
3
+ "version": "23.1.0-canary.1",
4
4
  "description": "Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -68,7 +68,8 @@
68
68
  "uuid": "9.0.1"
69
69
  },
70
70
  "peerDependencies": {
71
- "ag-grid-enterprise": ">=35.3.0"
71
+ "ag-grid-enterprise": ">=36.1.0",
72
+ "ag-stack": ">=36.1.0"
72
73
  },
73
74
  "publishTimestamp": 0,
74
75
  "type": "module",
@@ -48,6 +48,36 @@ export interface AgGridConfig {
48
48
  modules: Module[];
49
49
  }
50
50
  export type AdaptableVariant = 'vanilla' | 'react' | 'angular' | 'vue';
51
+ /**
52
+ * #narrow_column_model_refresh
53
+ *
54
+ * What has to be refreshed in AG Grid after a column-model pass (`updateColumnModelAndRefreshGrid()`),
55
+ * ie. after `setupColumns()` re-installed the Adaptable colDef callbacks.
56
+ *
57
+ * Whatever changed in a colDef VALUE (eg. a new `cellRenderer`, `comparator` or `valueFormatter`) is
58
+ * already taken care of by AG Grid: `AgColumn.setColDef()` (see #col_def_commit) force-refreshes the
59
+ * rendered cells and header of the changed column. The scope only has to cover state read by the
60
+ * #stable_col_def_callbacks at render time, which AG Grid cannot know about.
61
+ */
62
+ export interface GridRefreshScope {
63
+ /**
64
+ * Destroy & recreate the rendered rows (`redrawRows()`).
65
+ * Only needed when a ROW-level definition may have changed: `getRowStyle` / `getRowClass` (Alert row
66
+ * highlights), row height, full-width rows. Cancels cell editing; implies `cells`.
67
+ */
68
+ rows?: boolean;
69
+ /**
70
+ * Re-run the cell-level callbacks (`cellStyle`, `cellClass`, `valueFormatter`, `cellRenderer` params)
71
+ * on the rendered cells (`refreshCells({ force: true })`). Keeps focus, selection and in-progress edits.
72
+ */
73
+ cells?: boolean;
74
+ /**
75
+ * Recreate the header cells (`refreshHeader()`).
76
+ * Only needed when a header-level callback (`headerStyle` / `headerClass` / `headerValueGetter`) reads
77
+ * state that changed, ie. Format Columns targeting the column header.
78
+ */
79
+ header?: boolean;
80
+ }
51
81
  /**
52
82
  * The only interface for Adaptable
53
83
  *
@@ -280,7 +310,13 @@ export interface IAdaptable {
280
310
  expandRowGroupsForValues(columnValues: any[]): void;
281
311
  getAdaptableContainerElement(): HTMLElement | null;
282
312
  getAgGridContainerElement(): HTMLElement | null;
283
- updateColumnModelAndRefreshGrid(): void;
313
+ /**
314
+ * Re-derives the Adaptable column state, sets up all columns again and refreshes AG Grid.
315
+ * @param refreshScope what to refresh after the columns were set up (see #narrow_column_model_refresh);
316
+ * defaults to a full refresh (rows + header)
317
+ */
318
+ updateColumnModelAndRefreshGrid(refreshScope?: GridRefreshScope): void;
319
+ refreshSortIfColumnsSorted(): void;
284
320
  getAgGridColumnForColumnId(columnId: string): Column;
285
321
  getMinMaxCachedValueForColumn(column: AdaptableColumn, aggregation: 'min' | 'max' | 'avg' | 'median'): number | undefined;
286
322
  destroy(config?: DestroyConfig): void;
@@ -125,4 +125,4 @@ export interface UserColumnMenuItem {
125
125
  /**
126
126
  * Defines AG Grid Column Menu Items
127
127
  */
128
- export type AgGridColumnMenuItemType = 'sortAscending' | 'sortDescending' | 'sortUnSort' | 'columnFilter' | 'columnChooser' | 'pinSubMenu' | 'valueAggSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll' | 'separator';
128
+ export type AgGridColumnMenuItemType = 'sortAscending' | 'sortDescending' | 'sortUnSort' | 'columnFilter' | 'columnChooser' | 'pinSubMenu' | 'valueAggSubMenu' | 'showValuesAsSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll' | 'calculatedColumn' | 'editCalculatedColumn' | 'removeCalculatedColumn' | 'editColumnName' | 'separator';
@@ -120,7 +120,7 @@ export interface UserContextMenuItem {
120
120
  /**
121
121
  * Defines AG Grid Context Menu Items
122
122
  */
123
- export type AgGridContextMenuItemType = 'autoSizeAll' | 'expandAll' | 'contractAll' | 'copy' | 'copyWithHeaders' | 'copyWithGroupHeaders' | 'cut' | 'paste' | 'resetColumns' | 'export' | 'csvExport' | 'excelExport' | 'chartRange' | 'pivotChart' | 'separator';
123
+ export type AgGridContextMenuItemType = 'autoSizeAll' | 'expandAll' | 'contractAll' | 'copy' | 'copyWithHeaders' | 'copyWithGroupHeaders' | 'cut' | 'paste' | 'resetColumns' | 'export' | 'csvExport' | 'excelExport' | 'chartRange' | 'pivotChart' | 'calculatedColumn' | 'editCalculatedColumn' | 'removeCalculatedColumn' | 'editColumnName' | 'showValuesAsSubMenu' | 'separator';
124
124
  /**
125
125
  * The Context Menu provided by AadapTable by default
126
126
  */
@@ -209,8 +209,7 @@ export interface InFilterValueResult {
209
209
  /**
210
210
  * Custom text for the collapsed IN Filter input.
211
211
  *
212
- * Receives the currently selected items (and their count) and must return a
213
- * string.
212
+ * Receives an {@link InFilterLabelContext} and must return a string.
214
213
  *
215
214
  * When omitted, the input shows the selected count (e.g. `(3)`) followed by the
216
215
  * selected labels joined with a comma. When provided, it fully replaces that
@@ -220,10 +219,27 @@ export interface InFilterValueResult {
220
219
  * is one entry in `selectedValues`: its `value` is the full leaf path and its
221
220
  * `label` the joined path label. `selectedCount` is the number of selected leaves.
222
221
  */
223
- renderInputValues?: (params: {
224
- selectedValues: InFilterValue[];
225
- selectedCount: number;
226
- }) => string;
222
+ inFilterLabel?: (context: InFilterLabelContext) => string;
223
+ }
224
+ /**
225
+ * Context passed to {@link InFilterValueResult.inFilterLabel} when customising
226
+ * the collapsed IN Filter label.
227
+ */
228
+ export interface InFilterLabelContext extends BaseContext {
229
+ /**
230
+ * Currently selected items, in selection order.
231
+ *
232
+ * For tree-shaped filters (group columns and date columns), each selected leaf
233
+ * is one entry: its `value` is the full leaf path and its `label` the joined
234
+ * path label.
235
+ */
236
+ selectedValues: InFilterValue[];
237
+ /**
238
+ * Number of selected items.
239
+ *
240
+ * For tree-shaped filters, this is the number of selected leaves (not parent nodes).
241
+ */
242
+ selectedCount: number;
227
243
  }
228
244
  /**
229
245
  * Information about items in the IN Column Filter
@@ -7,6 +7,13 @@ export declare class FormatColumnInternalApi extends ApiBase {
7
7
  * Column-model update alone can leave visible cells stale until scroll.
8
8
  */
9
9
  refreshFormatColumnPresentation(formatColumns: FormatColumn | FormatColumn[] | undefined): void;
10
+ /**
11
+ * see #narrow_column_model_refresh
12
+ * Whether ANY Format Column in state (suspended or not, in any layout) targets the column header -
13
+ * ie. whether the `headerStyle` / `headerClass` / header name callbacks read Format Column state at all.
14
+ * When none does, a Format Column change cannot alter the rendered header, so it does not have to be refreshed.
15
+ */
16
+ hasFormatColumnsTargetingHeader(): boolean;
10
17
  /**
11
18
  * Retrieves all Format Columns in Adaptable State with the `Style` property set
12
19
  * @returns format columns
@@ -83,8 +90,11 @@ export declare class FormatColumnInternalApi extends ApiBase {
83
90
  * Checks if format column is relevant for a given cell (intersection of given AdaptableColumn and RowNode)
84
91
  *
85
92
  * @param formatColumn
86
- * @param column
87
- * @param params
93
+ * @param column - the column the Format Column is scoped to
94
+ * @param rowNode
95
+ * @param cellValue
96
+ * @param pivotResultColumn - set when the cell belongs to a pivot result column, so that a Rule Expression
97
+ * written against the base column reads the pivot result cell value (see #derived_pivot_cell_style)
88
98
  */
89
99
  formatColumnShouldRenderInCell(formatColumn: FormatColumn, column: AdaptableColumn, rowNode: IRowNode, cellValue: any, pivotResultColumn?: Column): boolean;
90
100
  /**
@@ -49,6 +49,10 @@ export class FormatColumnInternalApi extends ApiBase {
49
49
  this.getGridApi().refreshColumns([...columnIds]);
50
50
  }
51
51
  }
52
+ hasFormatColumnsTargetingHeader() {
53
+ const headerTarget = 'columnHeader';
54
+ return (this.getFormatColumnApi().getFormatColumnState()?.FormatColumns ?? []).some((formatColumn) => formatColumn?.Target === headerTarget);
55
+ }
52
56
  getAllFormatColumnWithStyle(config) {
53
57
  return this.getFormatColumnApi()
54
58
  .getFormatColumns(config)
@@ -464,7 +464,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
464
464
  }
465
465
  });
466
466
  }
467
- adaptable.updateColumnModelAndRefreshGrid();
467
+ adaptable.updateColumnModelAndRefreshGrid({ rows: true });
468
468
  let module = (adaptable.adaptableModules.get(ModuleConstants.AlertModuleId));
469
469
  if (module) {
470
470
  module.checkListenToCellDataChanged();
@@ -480,7 +480,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
480
480
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_UNSUSPEND_ALL:
481
481
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_SUSPEND_ALL: {
482
482
  const returnAction = next(action);
483
- adaptable.updateColumnModelAndRefreshGrid();
483
+ adaptable.updateColumnModelAndRefreshGrid({ cells: true });
484
484
  let module = (adaptable.adaptableModules.get(ModuleConstants.FlashingCellModuleId));
485
485
  if (module) {
486
486
  module.checkListenToCellDataChanged();
@@ -542,7 +542,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
542
542
  if (StringExtensions.IsNotNullOrEmpty(adaptable.api.quickSearchApi.getQuickSearchValue())) {
543
543
  adaptable.refreshAgGridFind();
544
544
  }
545
- adaptable.updateColumnModelAndRefreshGrid();
545
+ adaptable.updateColumnModelAndRefreshGrid({ cells: true });
546
546
  return returnAction;
547
547
  }
548
548
  case FormatColumnRedux.FORMAT_COLUMN_ADD_BATCH:
@@ -555,14 +555,27 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
555
555
  case FormatColumnRedux.FORMAT_COLUMN_SUSPEND:
556
556
  case FormatColumnRedux.FORMAT_COLUMN_UNSUSPEND:
557
557
  case FormatColumnRedux.FORMAT_COLUMN_SUSPEND_ALL:
558
- case FormatColumnRedux.FORMAT_COLUMN_UNSUSPEND_ALL:
558
+ case FormatColumnRedux.FORMAT_COLUMN_UNSUSPEND_ALL: {
559
+ const hadHeaderFormatColumns = adaptable.api.formatColumnApi.internalApi.hasFormatColumnsTargetingHeader();
560
+ const returnAction = next(action);
561
+ const hasHeaderFormatColumns = adaptable.api.formatColumnApi.internalApi.hasFormatColumnsTargetingHeader();
562
+ adaptable.updateColumnModelAndRefreshGrid({
563
+ cells: true,
564
+ header: hadHeaderFormatColumns || hasHeaderFormatColumns,
565
+ });
566
+ return returnAction;
567
+ }
559
568
  case StyledColumnRedux.STYLED_COLUMN_ADD:
560
569
  case StyledColumnRedux.STYLED_COLUMN_EDIT:
561
570
  case StyledColumnRedux.STYLED_COLUMN_DELETE:
562
571
  case StyledColumnRedux.STYLED_COLUMN_SUSPEND:
563
572
  case StyledColumnRedux.STYLED_COLUMN_UNSUSPEND:
564
573
  case StyledColumnRedux.STYLED_COLUMN_SUSPEND_ALL:
565
- case StyledColumnRedux.STYLED_COLUMN_UNSUSPEND_ALL:
574
+ case StyledColumnRedux.STYLED_COLUMN_UNSUSPEND_ALL: {
575
+ const returnAction = next(action);
576
+ adaptable.updateColumnModelAndRefreshGrid({ cells: true });
577
+ return returnAction;
578
+ }
566
579
  case CustomSortRedux.CUSTOM_SORT_ADD:
567
580
  case CustomSortRedux.CUSTOM_SORT_EDIT:
568
581
  case CustomSortRedux.CUSTOM_SORT_DELETE:
@@ -571,7 +584,8 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
571
584
  case CustomSortRedux.CUSTOM_SORT_SUSPEND_ALL:
572
585
  case CustomSortRedux.CUSTOM_SORT_UNSUSPEND_ALL: {
573
586
  const returnAction = next(action);
574
- adaptable.updateColumnModelAndRefreshGrid();
587
+ adaptable.updateColumnModelAndRefreshGrid({});
588
+ adaptable.refreshSortIfColumnsSorted();
575
589
  return returnAction;
576
590
  }
577
591
  case QuickSearchRedux.QUICK_SEARCH_RUN: {
@@ -361,7 +361,10 @@ export class LayoutModule extends AdaptableModuleBase {
361
361
  .getModuleService()
362
362
  .getModuleById('Shortcut')
363
363
  .checkListenToKeyDown();
364
- this.api.internalApi.getAdaptableInstance().updateColumnModelAndRefreshGrid();
364
+ this.api.internalApi.getAdaptableInstance().updateColumnModelAndRefreshGrid({
365
+ cells: true,
366
+ header: this.api.formatColumnApi.internalApi.hasFormatColumnsTargetingHeader(),
367
+ });
365
368
  }
366
369
  getReferencedNamedQueryNames(layout) {
367
370
  if (!layout.GridFilter?.Expression) {
@@ -1,4 +1,6 @@
1
1
  import type { AgSparklineOptions } from 'ag-charts-types';
2
+ /** AG Charts 14 colours may be a CSS string or a theme colour-ref object. */
3
+ export declare const cssColorToString: (color: unknown) => string | undefined;
2
4
  /**
3
5
  * AG Charts sparklines do not resolve Adaptable `var(--ab-color-*)` tokens.
4
6
  * Resolve palette / theme CSS variables to concrete colours at render time so
@@ -1,7 +1,10 @@
1
1
  import { getVariableColor } from '../StyleHelper';
2
+ export const cssColorToString = (color) => {
3
+ return typeof color === 'string' ? color : undefined;
4
+ };
2
5
  const resolveCssColor = (color) => {
3
- if (color == null || color === '') {
4
- return color;
6
+ if (typeof color !== 'string' || color === '') {
7
+ return typeof color === 'string' ? color : undefined;
5
8
  }
6
9
  const resolved = getVariableColor(color);
7
10
  return resolved || color;
@@ -11,23 +14,23 @@ const resolveHighlightStyle = (style) => {
11
14
  return style;
12
15
  }
13
16
  const resolved = { ...style };
14
- if (style.fill != null) {
17
+ if (typeof style.fill === 'string') {
15
18
  resolved.fill = resolveCssColor(style.fill);
16
19
  }
17
- if (style.stroke != null) {
20
+ if (typeof style.stroke === 'string') {
18
21
  resolved.stroke = resolveCssColor(style.stroke);
19
22
  }
20
23
  return resolved;
21
24
  };
22
25
  export function resolveSparklineOptionsForRender(options) {
23
26
  const resolved = { ...options };
24
- if ('fill' in options && options.fill != null) {
27
+ if ('fill' in options && typeof options.fill === 'string') {
25
28
  resolved.fill = resolveCssColor(options.fill);
26
29
  }
27
- if (options.stroke != null) {
30
+ if (typeof options.stroke === 'string') {
28
31
  resolved.stroke = resolveCssColor(options.stroke);
29
32
  }
30
- if (options.background?.fill != null) {
33
+ if (typeof options.background?.fill === 'string') {
31
34
  resolved.background = {
32
35
  ...options.background,
33
36
  fill: resolveCssColor(options.background.fill),
@@ -35,10 +38,10 @@ export function resolveSparklineOptionsForRender(options) {
35
38
  }
36
39
  if ('marker' in options && options.marker) {
37
40
  const marker = { ...options.marker };
38
- if (marker.fill != null) {
41
+ if (typeof marker.fill === 'string') {
39
42
  marker.fill = resolveCssColor(marker.fill);
40
43
  }
41
- if (marker.stroke != null) {
44
+ if (typeof marker.stroke === 'string') {
42
45
  marker.stroke = resolveCssColor(marker.stroke);
43
46
  }
44
47
  resolved.marker = marker;
@@ -50,7 +53,7 @@ export function resolveSparklineOptionsForRender(options) {
50
53
  highlightedSeries: resolveHighlightStyle(options.highlight.highlightedSeries),
51
54
  };
52
55
  }
53
- if (options.axis && typeof options.axis === 'object' && options.axis.stroke != null) {
56
+ if (options.axis && typeof options.axis === 'object' && typeof options.axis.stroke === 'string') {
54
57
  resolved.axis = {
55
58
  ...options.axis,
56
59
  stroke: resolveCssColor(options.axis.stroke),
@@ -1,2 +1,2 @@
1
1
  import { AdaptableOptions } from '../../types';
2
- export declare const useAdaptableOptions: <T = AdaptableOptions<any, Record<string, any>>>(fn?: (adaptableOptions: AdaptableOptions) => T) => T;
2
+ export declare const useAdaptableOptions: <T = AdaptableOptions>(fn?: (adaptableOptions: AdaptableOptions) => T) => T;
@@ -61,16 +61,16 @@ export class AnnotationsService {
61
61
  if (!target?.classList?.contains?.('ag-cell')) {
62
62
  return null;
63
63
  }
64
- try {
65
- const PrimaryKeyValue = target.parentElement.getAttribute('row-id');
66
- return {
67
- PrimaryKeyValue,
68
- ColumnId: target.getAttribute('col-id'),
69
- };
70
- }
71
- catch (e) {
64
+ const rowElement = target.closest('[row-id]');
65
+ const PrimaryKeyValue = rowElement?.getAttribute('row-id');
66
+ const ColumnId = target.getAttribute('col-id');
67
+ if (PrimaryKeyValue == null || ColumnId == null) {
72
68
  return null;
73
69
  }
70
+ return {
71
+ PrimaryKeyValue,
72
+ ColumnId,
73
+ };
74
74
  }
75
75
  handleMouseEnter(event) {
76
76
  const editMode = this.getEditMode();
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ColumnValuesSelectProps } from '../../FilterForm/ListBoxFilterForm';
3
- import { InFilterValue } from '../../../../types';
3
+ import { InFilterLabelContext } from '../../../../types';
4
4
  /** Suggested page size passed to `customInFilterValues` as `context.limit`. */
5
5
  export declare const IN_FILTER_VALUES_PAGE_SIZE = 1000;
6
6
  export interface FloatingFilterValuesProps {
@@ -32,10 +32,7 @@ export declare function useDistinctFilterColumnValues(options: {
32
32
  skipDefaultSearch: boolean;
33
33
  searchValueUsedInFilterValue: boolean;
34
34
  hasMore: boolean;
35
- renderInputValues?: (params: {
36
- selectedValues: InFilterValue[];
37
- selectedCount: number;
38
- }) => string;
35
+ inFilterLabel?: (context: InFilterLabelContext) => string;
39
36
  };
40
37
  setQuickFilterValues: React.Dispatch<React.SetStateAction<{
41
38
  values: {
@@ -46,10 +43,7 @@ export declare function useDistinctFilterColumnValues(options: {
46
43
  skipDefaultSearch: boolean;
47
44
  searchValueUsedInFilterValue: boolean;
48
45
  hasMore: boolean;
49
- renderInputValues?: (params: {
50
- selectedValues: InFilterValue[];
51
- selectedCount: number;
52
- }) => string;
46
+ inFilterLabel?: (context: InFilterLabelContext) => string;
53
47
  }>>;
54
48
  triggerValuesLoad: (options?: {
55
49
  usePrevious: boolean;
@@ -118,7 +118,7 @@ export function useDistinctFilterColumnValues(options) {
118
118
  skipDefaultSearch: !!result.skipDefaultSearch,
119
119
  searchValueUsedInFilterValue: prev.searchValueUsedInFilterValue || searchValueUsedInFilterValue,
120
120
  hasMore: !!result.hasMore,
121
- renderInputValues: result.renderInputValues,
121
+ inFilterLabel: result.inFilterLabel,
122
122
  dataLoadIsComplete: true,
123
123
  }));
124
124
  })
@@ -172,7 +172,7 @@ export function useDistinctFilterColumnValues(options) {
172
172
  skipDefaultSearch: !!distinctFilterDisplayValues.skipDefaultSearch,
173
173
  searchValueUsedInFilterValue,
174
174
  hasMore: !!distinctFilterDisplayValues.hasMore,
175
- renderInputValues: distinctFilterDisplayValues.renderInputValues,
175
+ inFilterLabel: distinctFilterDisplayValues.inFilterLabel,
176
176
  });
177
177
  lastRequestedOffsetRef.current = 0;
178
178
  setIsDistinctColumnValuesLoading(false);
@@ -337,10 +337,14 @@ export const FloatingFilterValues = (props) => {
337
337
  triggerValuesLoad();
338
338
  }
339
339
  }, []);
340
- const { skipDefaultSearch, renderInputValues } = quickFilterValues;
341
- const renderComboboxInputValues = React.useMemo(() => renderInputValues
342
- ? (items) => renderInputValues({ selectedValues: items, selectedCount: items.length })
343
- : undefined, [renderInputValues]);
340
+ const { skipDefaultSearch, inFilterLabel } = quickFilterValues;
341
+ const renderComboboxInputValues = React.useMemo(() => inFilterLabel
342
+ ? (items) => inFilterLabel({
343
+ ...api.internalApi.buildBaseContext(),
344
+ selectedValues: items,
345
+ selectedCount: items.length,
346
+ })
347
+ : undefined, [api, inFilterLabel]);
344
348
  if (props.columnId === AG_GRID_GROUPED_COLUMN) {
345
349
  if (Array.isArray(props.value) && !props.value.every((value) => Array.isArray(value))) {
346
350
  logOnce(`All the inputs for the IN predicate for the column "${props.columnId}" need to be arrays. Example:
@@ -64,10 +64,14 @@ export const PredicateEditor = (props) => {
64
64
  triggerValuesLoad();
65
65
  }
66
66
  }, []);
67
- const { skipDefaultSearch, renderInputValues } = quickFilterValues;
68
- const renderComboboxInputValues = React.useMemo(() => renderInputValues
69
- ? (items) => renderInputValues({ selectedValues: items, selectedCount: items.length })
70
- : undefined, [renderInputValues]);
67
+ const { skipDefaultSearch, inFilterLabel } = quickFilterValues;
68
+ const renderComboboxInputValues = React.useMemo(() => inFilterLabel
69
+ ? (items) => inFilterLabel({
70
+ ...adaptable.api.internalApi.buildBaseContext(),
71
+ selectedValues: items,
72
+ selectedCount: items.length,
73
+ })
74
+ : undefined, [adaptable.api, inFilterLabel]);
71
75
  return (_jsxs(Box, { className: baseClassName, children: [_jsxs(Flex, { alignItems: "center", className: "twa:justify-stretch", children: [icon && _jsx(Tag, { className: "twa:mr-2", children: icon }), _jsx(SingleSelect, { items: predicateDefsOptions, "data-name": "select-predicate", placeholder: "Select Rule", value: props.predicate?.PredicateId ?? null, onValueChange: (value) => {
72
76
  const option = predicateDefsOptions.find((x) => x.value === value);
73
77
  props.onChange({
@@ -10,6 +10,7 @@ import { ColorPicker } from '../../../components/ColorPicker';
10
10
  import { CheckBox } from '../../../components/CheckBox';
11
11
  import { Box, Flex } from '../../../components/Flex';
12
12
  import { getCellBoxStyleSummaryItems, StyledColumnCellStyleEditor, } from './StyledColumnSliceStyleEditors';
13
+ import { cssColorToString } from '../../../Utilities/Helpers/StyledColumns/SparklineStyleHelper';
13
14
  import { Card } from '../../../components/Card';
14
15
  import ErrorBox from '../../../components/ErrorBox';
15
16
  const STYLE_FORM_SIZES = ['200px', '1fr'];
@@ -193,9 +194,18 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
193
194
  delete next.theme;
194
195
  onChange(next);
195
196
  };
197
+ const getPaddingOptions = () => {
198
+ const padding = sparklineOptions.padding;
199
+ if (padding == null) {
200
+ return {};
201
+ }
202
+ if (typeof padding === 'number') {
203
+ return { top: padding, right: padding, bottom: padding, left: padding };
204
+ }
205
+ return padding;
206
+ };
196
207
  const handlePaddingChange = (key, value) => {
197
- const currentPadding = sparklineOptions.padding || {};
198
- handleChange('padding', { ...currentPadding, [key]: value });
208
+ handleChange('padding', { ...getPaddingOptions(), [key]: value });
199
209
  };
200
210
  const themes = [
201
211
  { value: SPARKLINE_CUSTOM_COLOURS_THEME, label: 'Custom colours' },
@@ -212,9 +222,9 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
212
222
  { value: 'ag-financial', label: 'Financial' },
213
223
  { value: 'ag-financial-dark', label: 'Financial Dark' },
214
224
  ];
215
- return (_jsxs(FormLayout, { children: [sparklineOptions.type !== 'line' && (_jsx(FormRow, { label: "Fill", children: _jsxs(Box, { children: [_jsx(ColorPicker, { title: "The colour for filling shapes", api: api, value: sparklineOptions.fill, onChange: (color) => applySeriesColour({ fill: color }) }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Bar, column, and area body colour." })] }) })), _jsx(FormRow, { label: "Stroke", children: _jsxs(Box, { children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { title: "The colour for the stroke", api: api, value: sparklineOptions.stroke, onChange: (color) => applySeriesColour({ stroke: color }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { title: "The width of the stroke in pixels", type: "number", className: "twa:w-[70px]", min: 0, value: sparklineOptions.strokeWidth ?? '', onChange: (e) => handleChange('strokeWidth', Number(e.target.value)) })] }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: sparklineOptions.type === 'line'
225
+ return (_jsxs(FormLayout, { children: [sparklineOptions.type !== 'line' && (_jsx(FormRow, { label: "Fill", children: _jsxs(Box, { children: [_jsx(ColorPicker, { title: "The colour for filling shapes", api: api, value: cssColorToString(sparklineOptions.fill) ?? '', onChange: (color) => applySeriesColour({ fill: color }) }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Bar, column, and area body colour." })] }) })), _jsx(FormRow, { label: "Stroke", children: _jsxs(Box, { children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { title: "The colour for the stroke", api: api, value: cssColorToString(sparklineOptions.stroke) ?? '', onChange: (color) => applySeriesColour({ stroke: color }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { title: "The width of the stroke in pixels", type: "number", className: "twa:w-[70px]", min: 0, value: sparklineOptions.strokeWidth ?? '', onChange: (e) => handleChange('strokeWidth', Number(e.target.value)) })] }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: sparklineOptions.type === 'line'
216
226
  ? 'Line colour. Marker colours are in the Markers card.'
217
- : 'Outline colour — increase width to see it on bars and columns.' })] }) }), _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Top" }), _jsx(AdaptableInput, { type: "number", min: 0, value: sparklineOptions.padding?.top ?? '', onChange: (e) => handlePaddingChange('top', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the top of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Right" }), _jsx(AdaptableInput, { type: "number", min: 0, value: sparklineOptions.padding?.right ?? '', onChange: (e) => handlePaddingChange('right', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the right of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Bottom" }), _jsx(AdaptableInput, { type: "number", min: 0, value: sparklineOptions.padding?.bottom ?? '', onChange: (e) => handlePaddingChange('bottom', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the bottom of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Left" }), _jsx(AdaptableInput, { type: "number", min: 0, value: sparklineOptions.padding?.left ?? '', onChange: (e) => handlePaddingChange('left', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the left of the chart area" })] }) }), _jsx(FormRow, { label: "Line Dash", children: _jsx(AdaptableInput, { title: "Length of dashes and gaps in pixels (comma-separated values, e.g. '3,6,9')", value: sparklineOptions.lineDash?.join(',') ?? '', onChange: (e) => {
227
+ : 'Outline colour — increase width to see it on bars and columns.' })] }) }), _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Top" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().top ?? '', onChange: (e) => handlePaddingChange('top', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the top of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Right" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().right ?? '', onChange: (e) => handlePaddingChange('right', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the right of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Bottom" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().bottom ?? '', onChange: (e) => handlePaddingChange('bottom', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the bottom of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Left" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().left ?? '', onChange: (e) => handlePaddingChange('left', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the left of the chart area" })] }) }), _jsx(FormRow, { label: "Line Dash", children: _jsx(AdaptableInput, { title: "Length of dashes and gaps in pixels (comma-separated values, e.g. '3,6,9')", value: sparklineOptions.lineDash?.join(',') ?? '', onChange: (e) => {
218
228
  const value = e.target.value;
219
229
  const dashArray = value
220
230
  ? value
@@ -226,7 +236,7 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
226
236
  } }) }), _jsx(FormRow, { label: "Line Dash Offset", children: _jsx(AdaptableInput, { title: "The offset of the line dash pattern in pixels", type: "number", min: 0, value: sparklineOptions.lineDashOffset ?? '', onChange: (e) => handleChange('lineDashOffset', Number(e.target.value)) }) }), _jsx(FormRow, { label: "Background", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: sparklineOptions.background?.visible ?? false, onChange: (visible) => handleChange('background', {
227
237
  ...sparklineOptions.background,
228
238
  visible,
229
- }) }), _jsx(Box, { className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: !sparklineOptions.background?.visible, title: "The colour of the chart background", api: api, value: sparklineOptions.background?.fill, onChange: (fill) => handleChange('background', {
239
+ }) }), _jsx(Box, { className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: !sparklineOptions.background?.visible, title: "The colour of the chart background", api: api, value: cssColorToString(sparklineOptions.background?.fill) ?? '', onChange: (fill) => handleChange('background', {
230
240
  ...sparklineOptions.background,
231
241
  fill,
232
242
  }) }) })] }) }), typeof sparklineOptions.theme !== 'object' && (_jsx(FormRow, { label: "Theme", children: _jsxs(Box, { children: [_jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: sparklineOptions.theme ?? SPARKLINE_CUSTOM_COLOURS_THEME, onValueChange: (themeName) => {
@@ -263,7 +273,7 @@ const SparklineAxisOptions = ({ options, onChange, }) => {
263
273
  { value: 'time', label: 'Time' },
264
274
  ];
265
275
  const isAxisEnabled = sparklineOptions.axis?.visible ?? false;
266
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Axis", children: _jsx(CheckBox, { checked: isAxisEnabled, onChange: (visible) => handleChange({ visible }) }) }), _jsx(FormRow, { label: "Axis Type", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isAxisEnabled, value: sparklineOptions.axis.type, onValueChange: (type) => handleChange({ type }), items: axisTypes }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { disabled: !isAxisEnabled, title: "The colour of the axis line", api: api, value: sparklineOptions.axis?.stroke, onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, className: "twa:w-[70px]", title: "The width in pixels of the axis line", type: "number", min: 0, value: sparklineOptions.axis?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }) })] }) }), _jsx(FormRow, { label: "Reverse Scale", children: _jsx(CheckBox, { disabled: !isAxisEnabled, checked: sparklineOptions.axis?.reverse, onChange: (reverse) => handleChange({ reverse }) }) }), sparklineOptions.axis.type === 'category' && (_jsx(_Fragment, { children: _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Inner" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The size of the gap between categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingInner ?? '', onChange: (e) => handleChange({ paddingInner: Number(e.target.value) }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Outer" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The padding on the outside of first and last categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingOuter ?? '', onChange: (e) => handleChange({ paddingOuter: Number(e.target.value) }) })] }) }) }))] }));
276
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Axis", children: _jsx(CheckBox, { checked: isAxisEnabled, onChange: (visible) => handleChange({ visible }) }) }), _jsx(FormRow, { label: "Axis Type", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isAxisEnabled, value: sparklineOptions.axis.type, onValueChange: (type) => handleChange({ type }), items: axisTypes }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { disabled: !isAxisEnabled, title: "The colour of the axis line", api: api, value: cssColorToString(sparklineOptions.axis?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, className: "twa:w-[70px]", title: "The width in pixels of the axis line", type: "number", min: 0, value: sparklineOptions.axis?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }) })] }) }), _jsx(FormRow, { label: "Reverse Scale", children: _jsx(CheckBox, { disabled: !isAxisEnabled, checked: sparklineOptions.axis?.reverse, onChange: (reverse) => handleChange({ reverse }) }) }), sparklineOptions.axis.type === 'category' && (_jsx(_Fragment, { children: _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Inner" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The size of the gap between categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingInner ?? '', onChange: (e) => handleChange({ paddingInner: Number(e.target.value) }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Outer" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The padding on the outside of first and last categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingOuter ?? '', onChange: (e) => handleChange({ paddingOuter: Number(e.target.value) }) })] }) }) }))] }));
267
277
  };
268
278
  const SparklineTooltipOptions = ({ options, onChange, }) => {
269
279
  const sparklineOptions = options;
@@ -331,7 +341,7 @@ const SparklineMarkerOptions = ({ options, onChange }) => {
331
341
  { value: 'triangle', label: 'Triangle' },
332
342
  ];
333
343
  const isMarkerEnabled = sparklineOptions.marker?.enabled ?? false;
334
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Markers", children: _jsx(CheckBox, { checked: isMarkerEnabled, onChange: (enabled) => handleChange({ enabled }) }) }), _jsx(FormRow, { label: "Marker Size", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { disabled: !isMarkerEnabled, type: "number", className: "twa:w-full", min: 1, value: sparklineOptions.marker?.size ?? '', onChange: (e) => handleChange({ size: Number(e.target.value) }), title: "The size in pixels of the markers" }) }) }), _jsx(FormRow, { label: "Marker Shape", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isMarkerEnabled, value: sparklineOptions.marker?.shape, onValueChange: (shape) => handleChange({ shape: shape }), items: markerShapes }) }) }), _jsx(FormRow, { label: "Fill", children: _jsx(ColorPicker, { disabled: !isMarkerEnabled, title: "The colour for filling markers", api: api, value: sparklineOptions.marker?.fill, onChange: (fill) => handleChange({ fill }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { disabled: !isMarkerEnabled, title: "The colour for the marker stroke", api: api, value: sparklineOptions.marker?.stroke, onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isMarkerEnabled, className: "twa:w-[70px]", type: "number", min: 0, value: sparklineOptions.marker?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }), title: "The width of the marker stroke in pixels" })] }) })] }));
344
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Markers", children: _jsx(CheckBox, { checked: isMarkerEnabled, onChange: (enabled) => handleChange({ enabled }) }) }), _jsx(FormRow, { label: "Marker Size", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { disabled: !isMarkerEnabled, type: "number", className: "twa:w-full", min: 1, value: sparklineOptions.marker?.size ?? '', onChange: (e) => handleChange({ size: Number(e.target.value) }), title: "The size in pixels of the markers" }) }) }), _jsx(FormRow, { label: "Marker Shape", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isMarkerEnabled, value: sparklineOptions.marker?.shape, onValueChange: (shape) => handleChange({ shape: shape }), items: markerShapes }) }) }), _jsx(FormRow, { label: "Fill", children: _jsx(ColorPicker, { disabled: !isMarkerEnabled, title: "The colour for filling markers", api: api, value: sparklineOptions.marker?.fill, onChange: (fill) => handleChange({ fill }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { disabled: !isMarkerEnabled, title: "The colour for the marker stroke", api: api, value: cssColorToString(sparklineOptions.marker?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isMarkerEnabled, className: "twa:w-[70px]", type: "number", min: 0, value: sparklineOptions.marker?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }), title: "The width of the marker stroke in pixels" })] }) })] }));
335
345
  };
336
346
  const SparklineHighlightOptions = ({ options, onChange, }) => {
337
347
  const { api } = useOnePageAdaptableWizardContext();
@@ -369,5 +379,5 @@ const SparklineHighlightOptions = ({ options, onChange, }) => {
369
379
  },
370
380
  });
371
381
  };
372
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Item Fill", children: _jsx(ColorPicker, { title: "The colour for filling highlighted items", api: api, value: highlightOptions?.highlightedItem?.fill, onChange: (fill) => handleItemChange({ fill }) }) }), _jsx(FormRow, { label: "Item Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { title: "The colour for the highlighted item stroke", api: api, value: highlightOptions?.highlightedItem?.stroke, onChange: (stroke) => handleItemChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedItem?.strokeWidth ?? '', onChange: (e) => handleItemChange({ strokeWidth: Number(e.target.value) }), title: "The width of the highlighted item stroke in pixels" })] }) }), _jsx(FormRow, { label: "Series", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: highlightOptions?.enabled ?? false, onChange: (enabled) => handleBaseChange({ enabled }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Stroke Width" }), _jsx(AdaptableInput, { disabled: !highlightOptions?.enabled, className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedSeries?.strokeWidth ?? '', onChange: (e) => handleSeriesChange({ strokeWidth: Number(e.target.value) }), title: "The stroke width when markers are hovered or tooltip is shown" })] }) })] }));
382
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Item Fill", children: _jsx(ColorPicker, { title: "The colour for filling highlighted items", api: api, value: highlightOptions?.highlightedItem?.fill, onChange: (fill) => handleItemChange({ fill }) }) }), _jsx(FormRow, { label: "Item Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { title: "The colour for the highlighted item stroke", api: api, value: cssColorToString(highlightOptions?.highlightedItem?.stroke) ?? '', onChange: (stroke) => handleItemChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedItem?.strokeWidth ?? '', onChange: (e) => handleItemChange({ strokeWidth: Number(e.target.value) }), title: "The width of the highlighted item stroke in pixels" })] }) }), _jsx(FormRow, { label: "Series", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: highlightOptions?.enabled ?? false, onChange: (enabled) => handleBaseChange({ enabled }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Stroke Width" }), _jsx(AdaptableInput, { disabled: !highlightOptions?.enabled, className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedSeries?.strokeWidth ?? '', onChange: (e) => handleSeriesChange({ strokeWidth: Number(e.target.value) }), title: "The stroke width when markers are hovered or tooltip is shown" })] }) })] }));
373
383
  };
@@ -65,6 +65,6 @@ export interface OnePageAdaptableWizardProps<ENTITY> {
65
65
  */
66
66
  headerPreview?: React.ReactNode;
67
67
  }
68
- export declare const OnePageAdaptableWizard: <ENTITY extends unknown>(props: OnePageAdaptableWizardProps<ENTITY>) => React.JSX.Element;
69
- export declare const OnePageWizardSummary: <ENTITY extends unknown>() => React.JSX.Element;
68
+ export declare const OnePageAdaptableWizard: <ENTITY extends any>(props: OnePageAdaptableWizardProps<ENTITY>) => React.JSX.Element;
69
+ export declare const OnePageWizardSummary: <ENTITY extends any>() => React.JSX.Element;
70
70
  export {};
@@ -50,5 +50,5 @@ export interface OnePageWizardProps<ENTITY> {
50
50
  */
51
51
  headerPreview?: React.ReactNode;
52
52
  }
53
- export declare const OnePageWizard: <ENTITY extends unknown>(props: OnePageWizardProps<ENTITY>) => React.JSX.Element;
53
+ export declare const OnePageWizard: <ENTITY extends any>(props: OnePageWizardProps<ENTITY>) => React.JSX.Element;
54
54
  export {};