ids-enterprise-wc 1.15.9-patch.12 → 1.15.9-patch.13

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 (39) hide show
  1. package/chunks/{ids-chunk-EGZI5ZV3-full.js → ids-chunk-6YJ4HIUC-full.js} +16 -1
  2. package/chunks/{ids-chunk-EGZI5ZV3-full.js.map → ids-chunk-6YJ4HIUC-full.js.map} +2 -2
  3. package/chunks/{ids-chunk-MZTBZCHG-full.js → ids-chunk-CVY6XSRY-full.js} +17 -4
  4. package/chunks/ids-chunk-CVY6XSRY-full.js.map +7 -0
  5. package/chunks/{ids-chunk-A5IOTIO6-full.js → ids-chunk-DSWFDICX-full.js} +62 -14
  6. package/chunks/{ids-chunk-A5IOTIO6-full.js.map → ids-chunk-DSWFDICX-full.js.map} +2 -2
  7. package/chunks/{ids-chunk-FV5W3K6S-full.js → ids-chunk-O32SEXUF-full.js} +2 -2
  8. package/chunks/{ids-chunk-5GV6Y3WM-full.js → ids-chunk-OP5EXDDT-full.js} +2 -2
  9. package/components/ids-accordion/ids-accordion.css +93 -9
  10. package/components/ids-app-menu/ids-app-menu.css +23 -132
  11. package/components/ids-button/ids-button.css +392 -43
  12. package/components/ids-calendar/ids-calendar.css +190 -265
  13. package/components/ids-checkbox/ids-checkbox.css +7 -580
  14. package/components/ids-data-grid/ids-data-grid-cell.js +1 -1
  15. package/components/ids-data-grid/ids-data-grid-editors.js +1 -1
  16. package/components/ids-data-grid/ids-data-grid-filters.js +2 -2
  17. package/components/ids-data-grid/ids-data-grid-row.js +2 -2
  18. package/components/ids-data-grid/ids-data-grid.js +5 -5
  19. package/components/ids-hierarchy/ids-hierarchy.css +117 -14
  20. package/components/ids-layout-grid/ids-layout-grid.css +10 -21300
  21. package/components/ids-list-box/ids-list-box.css +66 -98
  22. package/components/ids-list-view/ids-list-view.css +15 -112
  23. package/components/ids-menu/ids-menu.css +335 -11
  24. package/components/ids-modal/ids-modal.css +23 -94
  25. package/components/ids-pager/ids-pager.css +3 -37
  26. package/components/ids-swappable/ids-swappable.css +84 -19
  27. package/components/ids-tabs/ids-tabs.css +264 -470
  28. package/components/ids-tag/ids-tag.css +152 -8
  29. package/components/ids-time-picker/ids-time-picker.css +49 -67
  30. package/components/ids-toolbar/ids-toolbar.css +122 -12
  31. package/custom-elements.json +2769 -2749
  32. package/enterprise-wc.all.iife.js +88 -12
  33. package/enterprise-wc.all.iife.js.map +2 -2
  34. package/enterprise-wc.js +5 -5
  35. package/package.json +1 -1
  36. package/vscode.html-custom-data.json +1 -1
  37. package/chunks/ids-chunk-MZTBZCHG-full.js.map +0 -7
  38. /package/chunks/{ids-chunk-FV5W3K6S-full.js.map → ids-chunk-O32SEXUF-full.js.map} +0 -0
  39. /package/chunks/{ids-chunk-5GV6Y3WM-full.js.map → ids-chunk-OP5EXDDT-full.js.map} +0 -0
@@ -77375,14 +77375,27 @@ ids-trigger-button[slot=trigger-end] {
77375
77375
  this.input.fieldHeight = String(cell?.dataGrid?.rowHeight) === "xxs" ? `xs` : String(cell?.dataGrid?.rowHeight);
77376
77376
  this.input.labelState = "collapsed";
77377
77377
  const value = cell?.innerText;
77378
- cell.innerHTML = "";
77379
- cell?.appendChild(this.input);
77378
+ const treeFieldContainer = cell?.querySelector(".ids-data-grid-tree-field-container");
77379
+ if (treeFieldContainer) {
77380
+ treeFieldContainer.innerHTML = "";
77381
+ treeFieldContainer.appendChild(this.input);
77382
+ } else {
77383
+ cell.innerHTML = "";
77384
+ cell?.appendChild(this.input);
77385
+ }
77380
77386
  this.input.addEventListener("keydown", (e) => applyEditorEndCellEdit(cell, e));
77381
77387
  this.input.value = value;
77382
77388
  if (this.input instanceof IdsInput && cell) {
77383
77389
  if (!isInline) this.input.shadowRoot?.querySelector("input")?.style.setProperty("width", `${cell.offsetWidth - 5}px`);
77384
- applyEditorSettings(this.input, cell?.column.editor?.editorSettings);
77390
+ const settings = { ...cell?.column.editor?.editorSettings };
77391
+ const shouldAutoselect = settings?.autoselect;
77392
+ delete settings.autoselect;
77393
+ applyEditorSettings(this.input, settings);
77385
77394
  applyEditorValidation(this.input, cell?.column.editor?.editorValidation);
77395
+ const nativeInput = this.input.shadowRoot?.querySelector("input");
77396
+ if (shouldAutoselect) {
77397
+ nativeInput?.select();
77398
+ }
77386
77399
  }
77387
77400
  this.input.focus();
77388
77401
  }
@@ -78562,6 +78575,21 @@ ids-trigger-button[slot=trigger-end] {
78562
78575
  * @param {boolean} trigger whether to trigger the beforecelledit event
78563
78576
  */
78564
78577
  startCellEdit(clickEvent, trigger = true) {
78578
+ if (this.dataGrid.virtualScroll && this.rowIndex !== void 0) {
78579
+ const container = this.dataGrid.container;
78580
+ if (container) {
78581
+ const rowHeight = this.dataGrid.virtualScrollSettings?.ROW_HEIGHT || 30;
78582
+ const scrollTop = container.scrollTop || 0;
78583
+ const containerHeight = container.clientHeight || 0;
78584
+ const effectiveRowIndex = this.dataGrid.treeGrid ? this.dataGrid.virtualRows.findIndex((row) => row === this.dataGrid.data[this.rowIndex]) : this.rowIndex;
78585
+ if (effectiveRowIndex === -1) return;
78586
+ const rowTop = effectiveRowIndex * rowHeight;
78587
+ const rowBottom = rowTop + rowHeight;
78588
+ if (rowBottom < scrollTop || rowTop > scrollTop + containerHeight) {
78589
+ return;
78590
+ }
78591
+ }
78592
+ }
78565
78593
  if (this.dataGrid.activeCellEditor instanceof IdsDataGridCell && this.dataGrid.activeCellEditor !== this) {
78566
78594
  this.dataGrid.activeCellEditor.endCellEdit();
78567
78595
  }
@@ -89810,6 +89838,13 @@ ids-icon {
89810
89838
  * @param {boolean} isClear do not keep current data
89811
89839
  */
89812
89840
  updateDatasetAndRefresh(row, data, isClear) {
89841
+ if (this.activeCell.row === row && this.activeCellEditor?.isEditing) {
89842
+ this.commitCellEdit();
89843
+ const committedRow = this.data[row];
89844
+ if (committedRow && isClear) {
89845
+ data = { ...data, ...committedRow };
89846
+ }
89847
+ }
89813
89848
  const existingRow = this.data[row];
89814
89849
  __privateMethod(this, _IdsDataGrid_instances, saveCellOriginalValue_fn).call(this, existingRow, row, data);
89815
89850
  this.updateDataset(row, data, isClear);
@@ -91396,7 +91431,6 @@ ids-icon {
91396
91431
  attachKeyboardListeners_fn9 = function() {
91397
91432
  this.listen(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End"], this, (e) => {
91398
91433
  if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(e.key) && document.activeElement?.nodeName === "IDS-DATA-GRID" && __privateGet(this, _activeCellCache) && __privateGet(this, _activeCellCache)?.hasLeaveViewport) {
91399
- __privateMethod(this, _IdsDataGrid_instances, scrollRowIntoView_fn).call(this, Math.max(__privateGet(this, _activeCellCache).rowIndex - 3, 0));
91400
91434
  e.preventDefault();
91401
91435
  e.stopPropagation();
91402
91436
  const previousActiveRow2 = __privateGet(this, _activeCellCache).rowIndex;
@@ -91416,6 +91450,22 @@ ids-icon {
91416
91450
  }
91417
91451
  const maxCol = this.visibleColumns.length - 1;
91418
91452
  __privateGet(this, _activeCellCache).columnIndex = Math.min(Math.max(__privateGet(this, _activeCellCache).columnIndex + newColIndex, 0), maxCol);
91453
+ if (__privateGet(this, _activeCellCache).rowIndex !== previousActiveRow2) {
91454
+ __privateGet(this, _activeCellCache).wasEditing = false;
91455
+ __privateGet(this, _activeCellCache).currentValue = void 0;
91456
+ }
91457
+ if (this.treeGrid) {
91458
+ const visibleRowIdx = __privateMethod(this, _IdsDataGrid_instances, getVisibleRowIndex_fn).call(this, __privateGet(this, _activeCellCache).rowIndex);
91459
+ if (visibleRowIdx !== -1 && this.container) {
91460
+ const { ROW_HEIGHT } = this.virtualScrollSettings;
91461
+ const headerHeight = this.header?.clientHeight ?? 0;
91462
+ const maxScroll = this.container.scrollHeight - this.container.clientHeight;
91463
+ const targetScrollTop = Math.max(visibleRowIdx * ROW_HEIGHT - headerHeight, 0);
91464
+ this.container.scrollTop = Math.min(targetScrollTop, maxScroll);
91465
+ }
91466
+ } else {
91467
+ __privateMethod(this, _IdsDataGrid_instances, scrollRowIntoView_fn).call(this, Math.max(__privateGet(this, _activeCellCache).rowIndex - 3, 0));
91468
+ }
91419
91469
  if ((this.rowSelection === "mixed" || this.rowSelection === "multiple") && newRowIndex !== 0 && e.shiftKey) {
91420
91470
  const activeRowIndex2 = __privateGet(this, _activeCellCache).rowIndex;
91421
91471
  __privateGet(this, _lastShiftedRow) ?? __privateSet(this, _lastShiftedRow, previousActiveRow2);
@@ -91973,7 +92023,7 @@ ids-icon {
91973
92023
  }
91974
92024
  }
91975
92025
  if (missingRows.length && this.body) {
91976
- this.body.innerHTML += missingRows.join("");
92026
+ this.body.insertAdjacentHTML("beforeend", missingRows.join(""));
91977
92027
  }
91978
92028
  if (missingRows.length === 0 && data.length - 1 > lastRowIndex) {
91979
92029
  __privateMethod(this, _IdsDataGrid_instances, handleVirtualScroll_fn).call(this, ROW_HEIGHT);
@@ -92024,8 +92074,8 @@ ids-icon {
92024
92074
  __privateMethod(this, _IdsDataGrid_instances, calculateColumnsOnscreen_fn).call(this);
92025
92075
  }, 3);
92026
92076
  }
92027
- __privateMethod(this, _IdsDataGrid_instances, restoreActiveCellAfterScroll_fn).call(this);
92028
- __privateMethod(this, _IdsDataGrid_instances, restoreEditedCellsAfterScroll_fn).call(this);
92077
+ __privateMethod(this, _IdsDataGrid_instances, restoreActiveCellAfterScroll_fn).call(this, this.activeCellEditor);
92078
+ __privateMethod(this, _IdsDataGrid_instances, restoreEditedCellsAfterScroll_fn).call(this, this.activeCellEditor);
92029
92079
  }, { capture: true, passive: true });
92030
92080
  let debounceScrollend = null;
92031
92081
  this.offEvent("scrollend.data-grid.virtual-scroll", this.container);
@@ -92034,6 +92084,8 @@ ids-icon {
92034
92084
  if (!this.treeGrid) {
92035
92085
  clearTimeout(debounceScrollend);
92036
92086
  debounceScrollend = setTimeout(() => {
92087
+ const isEditing = this.activeCellEditor || this.activeCell?.node?.classList.contains("is-editing");
92088
+ if (isEditing) return;
92037
92089
  __privateMethod(this, _IdsDataGrid_instances, handleVirtualScroll_fn).call(this, virtualRowHeight);
92038
92090
  }, 500);
92039
92091
  }
@@ -92421,6 +92473,7 @@ ids-icon {
92421
92473
  __privateMethod(this, _IdsDataGrid_instances, saveEditedCellsBeforeScroll_fn).call(this);
92422
92474
  __privateMethod(this, _IdsDataGrid_instances, recycleAllTreeRows_fn).call(this, cursorIndex);
92423
92475
  __privateMethod(this, _IdsDataGrid_instances, restoreEditedCellsAfterScroll_fn).call(this);
92476
+ __privateMethod(this, _IdsDataGrid_instances, restoreActiveCellAfterScroll_fn).call(this);
92424
92477
  return;
92425
92478
  }
92426
92479
  const moveRowsDown = upperLimitIndex - firstDomRowVirtualIndex;
@@ -92458,6 +92511,7 @@ ids-icon {
92458
92511
  __privateMethod(this, _IdsDataGrid_instances, positionVirtualScrollWindow_fn).call(this, firstVisibleRowIndex, virtualRows.length, scrollSettings);
92459
92512
  if (needsRecycling) {
92460
92513
  __privateMethod(this, _IdsDataGrid_instances, restoreEditedCellsAfterScroll_fn).call(this);
92514
+ __privateMethod(this, _IdsDataGrid_instances, restoreActiveCellAfterScroll_fn).call(this);
92461
92515
  }
92462
92516
  };
92463
92517
  recycleTreeRowsDown_fn = function(obj, staleRows) {
@@ -92794,10 +92848,24 @@ ids-icon {
92794
92848
  if (this.activeCell?.node?.isEditing) {
92795
92849
  editedCells.push(this.activeCell?.node);
92796
92850
  const activeCell = this.activeCell.node;
92797
- const currentValue = activeCell.editor?.input?.value || "";
92851
+ const columnId = this.columns[this.activeCell.cell].id;
92852
+ const cellValue = this.data[this.activeCell.row][columnId];
92853
+ const currentValue = activeCell.editor?.input?.value || cellValue || "";
92798
92854
  this.updateActiveCellCache(this.activeCell.row, this.activeCell.cell, currentValue, true);
92799
92855
  __privateGet(this, _activeCellCache).shouldReinstateCell = true;
92800
- this.commitCellEdit();
92856
+ const scrollTop = this.container?.scrollTop || 0;
92857
+ const containerHeight = this.container?.clientHeight || 0;
92858
+ const rowHeight = this.virtualScrollSettings.ROW_HEIGHT;
92859
+ const effectiveRowIndex = __privateMethod(this, _IdsDataGrid_instances, getVisibleRowIndex_fn).call(this, this.activeCell.row);
92860
+ if (effectiveRowIndex === -1) return;
92861
+ const rowTop = effectiveRowIndex * rowHeight;
92862
+ const rowBottom = rowTop + rowHeight;
92863
+ const viewportTop = scrollTop;
92864
+ const viewportBottom = scrollTop + containerHeight;
92865
+ const isInViewport = rowTop >= viewportTop && rowBottom <= viewportBottom;
92866
+ if (!isInViewport) {
92867
+ this.commitCellEdit();
92868
+ }
92801
92869
  }
92802
92870
  for (const dirtyCell of this.dirtyCells) {
92803
92871
  const idsCell = this.cellByIndex(dirtyCell.row, dirtyCell.cell);
@@ -92826,8 +92894,9 @@ ids-icon {
92826
92894
  /**
92827
92895
  * Restore active cell focus and edit state after scroll ends
92828
92896
  * @private
92897
+ * @param {IdsDataGridCell} activeCellEditor optional cell editor to restore
92829
92898
  */
92830
- restoreActiveCellAfterScroll_fn = function() {
92899
+ restoreActiveCellAfterScroll_fn = function(activeCellEditor) {
92831
92900
  if (!__privateGet(this, _activeCellCache) || !__privateGet(this, _activeCellCache)?.shouldReinstateCell) {
92832
92901
  return;
92833
92902
  }
@@ -92862,6 +92931,9 @@ ids-icon {
92862
92931
  if (!cellElement) {
92863
92932
  return;
92864
92933
  }
92934
+ if (activeCellEditor) {
92935
+ return;
92936
+ }
92865
92937
  this.setActiveCell(columnIndex, rowIndex, false, "internal");
92866
92938
  if (wasEditing === true && cellElement.column?.editor) {
92867
92939
  cellElement.startCellEdit();
@@ -92874,10 +92946,11 @@ ids-icon {
92874
92946
  }
92875
92947
  };
92876
92948
  /**
92877
- * Restore edited cell values after DOM recycling
92949
+ * Restore active cell focus and edit state after scroll ends
92878
92950
  * @private
92951
+ * @param {IdsDataGridCell} activeCellEditor optional cell editor to restore
92879
92952
  */
92880
- restoreEditedCellsAfterScroll_fn = function() {
92953
+ restoreEditedCellsAfterScroll_fn = function(activeCellEditor) {
92881
92954
  if (__privateGet(this, _editedCellsCache).size === 0) {
92882
92955
  return;
92883
92956
  }
@@ -92907,6 +92980,9 @@ ids-icon {
92907
92980
  if (!cellElement) {
92908
92981
  return;
92909
92982
  }
92983
+ if (activeCellEditor) {
92984
+ return;
92985
+ }
92910
92986
  if (originalValue !== void 0) {
92911
92987
  cellElement.originalValue = originalValue;
92912
92988
  }