@linzjs/step-ag-grid 30.0.0 → 30.2.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.
@@ -190,6 +190,18 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
190
190
  align-items: center;
191
191
  }
192
192
 
193
+ .ag-cell span.GridCell-dropDownIcon {
194
+ fill: lui.$charcoal;
195
+ max-width: 26px;
196
+ width: 26px;
197
+ visibility: hidden;
198
+ }
199
+
200
+ .ag-cell.ag-cell-inline-editing span.GridCell-dropDownIcon {
201
+ max-width: 24px;
202
+ width: 24px;
203
+ }
204
+
193
205
  .ag-cell .GridCell-editableIcon {
194
206
  fill: lui.$silver;
195
207
  visibility: hidden;
@@ -16,9 +16,13 @@ export declare class GridFilterColumnsMultiSelect implements IFilterComp {
16
16
  private gui;
17
17
  private labelFormatter?;
18
18
  private reactRoot;
19
+ private filterButtonClickListener;
20
+ private filterButton;
21
+ private hasOpened;
19
22
  private normalizeCellValue;
20
23
  private loadFieldValues;
21
24
  init(params: CheckboxMultiFilterParams): void;
25
+ private setupFilterButtonListener;
22
26
  private render;
23
27
  private handleToggleAll;
24
28
  private handleToggleOne;
@@ -62084,6 +62084,9 @@ class GridFilterColumnsMultiSelect {
62084
62084
  gui;
62085
62085
  labelFormatter;
62086
62086
  reactRoot = null;
62087
+ filterButtonClickListener = null;
62088
+ filterButton = null;
62089
+ hasOpened = false;
62087
62090
  normalizeCellValue(value) {
62088
62091
  if (typeof value === 'string')
62089
62092
  return value.trim() === '' ? EMPTY_KEY : value;
@@ -62126,6 +62129,25 @@ class GridFilterColumnsMultiSelect {
62126
62129
  this.gui = document.createElement('div');
62127
62130
  this.reactRoot = client.createRoot(this.gui);
62128
62131
  this.render();
62132
+ this.setupFilterButtonListener();
62133
+ }
62134
+ setupFilterButtonListener() {
62135
+ const columnId = this.params.column.getColId();
62136
+ this.filterButton = document.querySelector(`[col-id="${columnId}"] .ag-header-cell-filter-button`);
62137
+ if (this.filterButton) {
62138
+ this.filterButtonClickListener = (e) => {
62139
+ if (this.hasOpened) {
62140
+ e.stopPropagation();
62141
+ e.preventDefault();
62142
+ this.params.api.hidePopupMenu();
62143
+ this.hasOpened = false;
62144
+ }
62145
+ else {
62146
+ this.hasOpened = true;
62147
+ }
62148
+ };
62149
+ this.filterButton.addEventListener('click', this.filterButtonClickListener, true);
62150
+ }
62129
62151
  }
62130
62152
  render() {
62131
62153
  if (!this.reactRoot)
@@ -62181,6 +62203,11 @@ class GridFilterColumnsMultiSelect {
62181
62203
  this.render();
62182
62204
  }
62183
62205
  destroy() {
62206
+ if (this.filterButtonClickListener && this.filterButton) {
62207
+ this.filterButton.removeEventListener('click', this.filterButtonClickListener, true);
62208
+ this.filterButtonClickListener = null;
62209
+ this.filterButton = null;
62210
+ }
62184
62211
  if (this.reactRoot) {
62185
62212
  this.reactRoot.unmount();
62186
62213
  this.reactRoot = null;
@@ -63795,16 +63822,22 @@ const GridPopoverEditBearingCorrection = (colDef, props) => GridPopoverEditBeari
63795
63822
  },
63796
63823
  });
63797
63824
 
63798
- const GridPopoverEditDropDown = (colDef, props) => GridCell(colDef, {
63799
- editor: GridFormDropDown,
63800
- ...props,
63801
- editorParams: {
63802
- ...props.editorParams,
63803
- className: clsx({
63804
- 'GridPopoverEditDropDown-containerLarge': !props.editorParams?.className?.includes('GridPopoverEditDropDown-container'),
63805
- }, props.editorParams?.className),
63806
- },
63807
- });
63825
+ const GridPopoverEditDropDown = (colDef, props) => {
63826
+ colDef.cellRendererParams = {
63827
+ rightHoverElement: (jsxRuntime.jsx(GridIcon, { icon: 'ic_arrow_drop_down', title: '', className: 'GridCell-editableIcon GridCell-dropDownIcon' })),
63828
+ ...colDef.cellRendererParams,
63829
+ };
63830
+ return GridCell(colDef, {
63831
+ editor: GridFormDropDown,
63832
+ ...props,
63833
+ editorParams: {
63834
+ ...props.editorParams,
63835
+ className: clsx({
63836
+ 'GridPopoverEditDropDown-containerLarge': !props.editorParams?.className?.includes('GridPopoverEditDropDown-container'),
63837
+ }, props.editorParams?.className),
63838
+ },
63839
+ });
63840
+ };
63808
63841
 
63809
63842
  const GridRenderPopoutMenuCell = (props) => {
63810
63843
  const disabled = !fnOrVar(props.colDef?.editable, props);
@@ -63887,8 +63920,14 @@ const GridContextProvider = (props) => {
63887
63920
  const enableMultilineBulkEditRef = React13.useRef(false);
63888
63921
  const idsBeforeUpdate = React13.useRef([]);
63889
63922
  const prePopupFocusedCell = React13.useRef();
63890
- const [externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync] = React13.useState(false);
63923
+ const [externallySelectedItemsAreInSync, _setExternallySelectedItemsAreInSync] = React13.useState(false);
63891
63924
  const externalFilters = React13.useRef([]);
63925
+ // waitForExternallySelectedItemsToBeInSync can't use the state as it won't be updated during function execution
63926
+ const externallySelectedItemsAreInSyncRef = React13.useRef(false);
63927
+ const setExternallySelectedItemsAreInSync = React13.useCallback((cond) => {
63928
+ _setExternallySelectedItemsAreInSync(cond);
63929
+ externallySelectedItemsAreInSyncRef.current = cond;
63930
+ }, [_setExternallySelectedItemsAreInSync]);
63892
63931
  const setQuickFilter = React13.useCallback((filter) => {
63893
63932
  // If we don't clear the focused cell focus switches back to grid when typing in the quick filter input
63894
63933
  gridApi?.clearFocusedCell();
@@ -64235,11 +64274,6 @@ const GridContextProvider = (props) => {
64235
64274
  });
64236
64275
  }
64237
64276
  }, [gridApi]);
64238
- // waitForExternallySelectedItemsToBeInSync can't use the state as it won't be updated during function execution
64239
- const externallySelectedItemsAreInSyncRef = React13.useRef(false);
64240
- React13.useEffect(() => {
64241
- externallySelectedItemsAreInSyncRef.current = externallySelectedItemsAreInSync;
64242
- }, [externallySelectedItemsAreInSync]);
64243
64277
  const waitForExternallySelectedItemsToBeInSync = React13.useCallback(async () => {
64244
64278
  if (!hasExternallySelectedItemsRef.current) {
64245
64279
  externallySelectedItemsAreInSyncRef.current = true;
@@ -64295,7 +64329,7 @@ const GridContextProvider = (props) => {
64295
64329
  finally {
64296
64330
  startCellEditingInProgressRef.current = false;
64297
64331
  }
64298
- }, [anyUpdating, gridApi, prePopupOps, waitForExternallySelectedItemsToBeInSync]);
64332
+ }, [anyUpdating, gridApi, prePopupOps, setExternallySelectedItemsAreInSync, waitForExternallySelectedItemsToBeInSync]);
64299
64333
  const bulkEditingCompleteCallbackRef = React13.useRef();
64300
64334
  const onBulkEditingComplete = React13.useCallback(async () => {
64301
64335
  await bulkEditingCompleteCallbackRef.current?.();