@linzjs/step-ag-grid 29.7.0 → 29.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -143,6 +143,18 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
143
143
  overflow-x: auto;
144
144
  }
145
145
 
146
+ .ag-icon-filter {
147
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232A292C'%3E%3Cpath d='M6 12.984v-1.969h12v1.969zM3 6h18v2.016H3zm6.984 12v-2.016h4.031V18z'/%3E%3C/svg%3E") !important;
148
+ background-repeat: no-repeat;
149
+ background-position: center;
150
+ background-size: contain;
151
+ background-color: transparent;
152
+
153
+ &::before {
154
+ content: none !important;
155
+ }
156
+ }
157
+
146
158
  .ag-header-group-cell {
147
159
  text-transform: uppercase;
148
160
  font-size: 12px;
@@ -265,4 +277,4 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
265
277
  .ag-header-cell {
266
278
  font-size: 14px;
267
279
  }
268
- }
280
+ }
package/dist/index.css CHANGED
@@ -571,6 +571,16 @@ div.ag-ltr div.ag-header-cell-resize {
571
571
  fill: #EA6A2E;
572
572
  }
573
573
 
574
+ .AgGridGenericCellRenderer-ic_error_Icon {
575
+ margin-right: 4px;
576
+ fill: #cc0000;
577
+ }
578
+
579
+ .AgGridGenericCellRenderer-ic_error_outlineIcon {
580
+ margin-right: 4px;
581
+ fill: #cc0000;
582
+ }
583
+
574
584
  .GridIcon-disabled {
575
585
  fill: #beb9b4 !important;
576
586
  }
@@ -19,6 +19,7 @@ export interface ColDefT<TData extends GridBaseRow, ValueType = any> extends Col
19
19
  originalCellRenderer?: any;
20
20
  editAction?: (selectedRows: TData[]) => void;
21
21
  shortcutKeys?: Record<string, () => void>;
22
+ error?: (props: ICellRendererParams<TData, ValueType>) => ReactElement | string | false | null | undefined;
22
23
  warning?: (props: ICellRendererParams<TData, ValueType>) => ReactElement | string | false | null | undefined;
23
24
  info?: (props: ICellRendererParams<TData, ValueType>) => ReactElement | string | false | null | undefined;
24
25
  };
@@ -10,6 +10,7 @@ export interface GenericCellRendererParams<TData extends GridBaseRow> {
10
10
  rightHoverElement?: ReactElement | undefined;
11
11
  editAction?: (selectedRows: TData[]) => void;
12
12
  shortcutKeys?: Record<string, ((params: SuppressKeyboardEventParams) => boolean | void) | undefined>;
13
+ error?: (props: ICellRendererParams<TData>) => string | string[] | boolean | null | undefined;
13
14
  warning?: (props: ICellRendererParams<TData>) => string | string[] | boolean | null | undefined;
14
15
  info?: (props: ICellRendererParams<TData>) => string | string[] | boolean | null | undefined;
15
16
  }
@@ -3454,17 +3454,22 @@ const GridCellRenderer = (props) => {
3454
3454
  const { checkUpdating } = React.useContext(GridUpdatingContext);
3455
3455
  const colDef = props.colDef;
3456
3456
  const rendererParams = colDef.cellRendererParams;
3457
+ const errorFn = rendererParams?.error;
3458
+ let errorText = props.data !== undefined && errorFn ? errorFn(props) : undefined;
3457
3459
  const warningFn = rendererParams?.warning;
3458
3460
  let warningText = props.data !== undefined && warningFn ? warningFn(props) : undefined;
3459
3461
  const infoFn = rendererParams?.info;
3460
3462
  let infoText = props.data !== undefined && infoFn ? infoFn(props) : undefined;
3463
+ if (Array.isArray(errorText)) {
3464
+ errorText = errorText.join('\n');
3465
+ }
3461
3466
  if (Array.isArray(warningText)) {
3462
3467
  warningText = warningText.join('\n');
3463
3468
  }
3464
3469
  if (Array.isArray(infoText)) {
3465
3470
  infoText = infoText.join('\n');
3466
3471
  }
3467
- return checkUpdating(colDef.field ?? colDef.colId ?? '', props.data.id) ? (jsxRuntime.jsx(GridLoadableCell, {})) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!!warningText && (jsxRuntime.jsx(GridIcon, { icon: 'ic_warning_outline', title: typeof warningText === 'string' ? warningText : 'Warning' })), !!infoText && jsxRuntime.jsx(GridIcon, { icon: 'ic_info_outline', title: typeof infoText === 'string' ? infoText : 'Info' }), jsxRuntime.jsx("div", { className: 'GridCell-container', children: colDef.cellRendererParams?.originalCellRenderer ? (jsxRuntime.jsx(colDef.cellRendererParams.originalCellRenderer, { ...props })) : (jsxRuntime.jsx("span", { title: props.valueFormatted ?? undefined, children: props.valueFormatted || '–' })) }), fnOrVar(colDef.editable, props) && rendererParams?.rightHoverElement && (jsxRuntime.jsx("div", { className: 'GridCell-hoverRight', children: rendererParams?.rightHoverElement }))] }));
3472
+ return checkUpdating(colDef.field ?? colDef.colId ?? '', props.data.id) ? (jsxRuntime.jsx(GridLoadableCell, {})) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!!errorText && (jsxRuntime.jsx(GridIcon, { icon: 'ic_error_outline', title: typeof errorText === 'string' ? errorText : 'Error' })), !!warningText && (jsxRuntime.jsx(GridIcon, { icon: 'ic_warning_outline', title: typeof warningText === 'string' ? warningText : 'Warning' })), !!infoText && jsxRuntime.jsx(GridIcon, { icon: 'ic_info_outline', title: typeof infoText === 'string' ? infoText : 'Info' }), jsxRuntime.jsx("div", { className: 'GridCell-container', children: colDef.cellRendererParams?.originalCellRenderer ? (jsxRuntime.jsx(colDef.cellRendererParams.originalCellRenderer, { ...props })) : (jsxRuntime.jsx("span", { title: props.valueFormatted ?? undefined, children: props.valueFormatted || '–' })) }), fnOrVar(colDef.editable, props) && rendererParams?.rightHoverElement && (jsxRuntime.jsx("div", { className: 'GridCell-hoverRight', children: rendererParams?.rightHoverElement }))] }));
3468
3473
  };
3469
3474
  const suppressCellKeyboardEvents = (e) => {
3470
3475
  const shortcutKeys = e.colDef.cellRendererParams?.shortcutKeys ?? {};
@@ -3626,7 +3631,7 @@ function styleInject(css, ref) {
3626
3631
  }
3627
3632
  }
3628
3633
 
3629
- var css_248z$3 = ".GridFilterColsMultiSelect{background:#fff;font-family:Open Sans,system-ui,sans-serif;font-style:normal;font-weight:600;padding:8px}.GridFilterColsMultiSelect .LuiCheckboxInput-item,.GridFilterColsMultiSelect .LuiCheckboxInput-selectAll{color:#2a292c;font-size:16px;font-style:SemiBold;font-weight:600;letter-spacing:0;line-height:20px;line-height:24px;margin-bottom:0}";
3634
+ var css_248z$3 = ".GridFilterColsMultiSelect{background:#fff;font-family:Open Sans,system-ui,sans-serif;font-style:normal;font-weight:600;padding:8px}.GridFilterColsMultiSelect .LuiSelect-label-text{color:#6b6966;display:inline-block}.GridFilterColsMultiSelect .LuiCheckboxInput-item,.GridFilterColsMultiSelect .LuiCheckboxInput-selectAll{color:#2a292c;font-size:16px;font-weight:600;letter-spacing:0;line-height:20px;line-height:24px;margin-bottom:0}";
3630
3635
  styleInject(css_248z$3);
3631
3636
 
3632
3637
  const FilterUI = ({ allValues, selected, labels, labelFormatter, onToggleAll, onToggleOne, }) => {
@@ -3667,6 +3672,7 @@ class GridFilterColumnsMultiSelect {
3667
3672
  this.labels = { ...params.labels };
3668
3673
  this.labelFormatter = params.labelFormatter;
3669
3674
  this.allValues = this.loadFieldValues();
3675
+ this.selectedValues = new Set(this.allValues);
3670
3676
  this.gui = document.createElement('div');
3671
3677
  this.reactRoot = client.createRoot(this.gui);
3672
3678
  this.render();