ids-enterprise-wc 1.15.9-patch.19 → 1.15.9-patch.20

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 (27) hide show
  1. package/chunks/{ids-chunk-AOCK6PF3-full.js → ids-chunk-IZWNCK4C-full.js} +32 -5
  2. package/chunks/{ids-chunk-AOCK6PF3-full.js.map → ids-chunk-IZWNCK4C-full.js.map} +2 -2
  3. package/chunks/{ids-chunk-EDQ2YH35-full.js → ids-chunk-MHSSTALO-full.js} +3 -3
  4. package/chunks/{ids-chunk-AKBAXNZI-full.js → ids-chunk-TRPOCB4F-full.js} +32 -5
  5. package/chunks/ids-chunk-TRPOCB4F-full.js.map +7 -0
  6. package/components/ids-accordion/ids-accordion.css +77 -141
  7. package/components/ids-calendar/ids-calendar.css +190 -265
  8. package/components/ids-checkbox/ids-checkbox.css +7 -580
  9. package/components/ids-data-grid/ids-data-grid-editors.js +1 -1
  10. package/components/ids-data-grid/ids-data-grid-formatters.js +1 -1
  11. package/components/ids-data-grid/ids-data-grid.js +3 -3
  12. package/components/ids-date-picker/ids-date-picker.css +389 -31
  13. package/components/ids-hierarchy/ids-hierarchy.css +14 -117
  14. package/components/ids-hyperlink/ids-hyperlink.css +15 -188
  15. package/components/ids-layout-flex/ids-layout-flex.css +6 -69
  16. package/components/ids-menu/ids-menu.css +17 -11
  17. package/components/ids-modal/ids-modal.css +94 -23
  18. package/components/ids-pager/ids-pager.css +28 -25
  19. package/components/ids-tabs/ids-tabs.css +11 -336
  20. package/components/ids-toolbar/ids-toolbar.css +12 -122
  21. package/custom-elements.json +54 -0
  22. package/enterprise-wc.all.iife.js +59 -8
  23. package/enterprise-wc.all.iife.js.map +2 -2
  24. package/enterprise-wc.js +3 -3
  25. package/package.json +1 -1
  26. package/chunks/ids-chunk-AKBAXNZI-full.js.map +0 -7
  27. /package/chunks/{ids-chunk-EDQ2YH35-full.js.map → ids-chunk-MHSSTALO-full.js.map} +0 -0
@@ -72464,11 +72464,32 @@ ids-input::part(container) {
72464
72464
  }
72465
72465
  /** Formats date data as a date string in the desired format */
72466
72466
  date(rowData, columnData, index, api) {
72467
- let value = this.#extractValue(rowData, columnData.field);
72468
- value = api.localeAPI?.formatDate(value, columnData.formatOptions) ?? value.toString();
72467
+ const rawValue = this.#extractValue(rowData, columnData.field);
72468
+ let value = api.localeAPI?.formatDate(rawValue, columnData.formatOptions) ?? rawValue?.toString();
72469
+ if (value === rawValue) {
72470
+ value = this.#reformatFromEditorFormat(rawValue, columnData, api) ?? value;
72471
+ }
72469
72472
  const icon = columnData.editor?.type === "datepicker" ? `<ids-icon icon="schedule" class="editor-cell-icon ${columnData.editor?.showEditorIcons ? "show-cell-icon-always" : ""}"></ids-icon>` : "";
72470
72473
  return `<span class="text-ellipsis">${value}</span>${icon}`;
72471
72474
  }
72475
+ /**
72476
+ * Reformats a value stored in the editor's internal format into the column's
72477
+ * display format. Returns undefined when the value cannot be parsed with the
72478
+ * editor format (so callers can fall back to the raw string).
72479
+ * @param {unknown} value the raw cell value
72480
+ * @param {IdsDataGridColumn} columnData the column configuration
72481
+ * @param {IdsDataGrid} api the data grid instance
72482
+ * @returns {string | undefined} the reformatted display value, if any
72483
+ */
72484
+ #reformatFromEditorFormat(value, columnData, api) {
72485
+ const editorFormat = columnData.editor?.editorSettings?.format;
72486
+ const displayFormat = columnData.formatOptions?.format;
72487
+ if (!editorFormat || !displayFormat || editorFormat === displayFormat) return void 0;
72488
+ if (typeof value !== "string" || value.trim() === "" || !/\d/.test(value)) return void 0;
72489
+ const parsed = api.localeAPI?.parseDate(value, { dateFormat: editorFormat });
72490
+ if (!parsed || !isValidDate(parsed)) return void 0;
72491
+ return api.localeAPI?.formatDate(parsed, { dateFormat: displayFormat });
72492
+ }
72472
72493
  /** Formats adds search-list to cells that have lookup editor associated with them */
72473
72494
  lookup(rowData, columnData) {
72474
72495
  const value = this.#extractValue(rowData, columnData.field);
@@ -72477,8 +72498,11 @@ ids-input::part(container) {
72477
72498
  }
72478
72499
  /** Formats date data as a time string in the desired format */
72479
72500
  time(rowData, columnData, index, api) {
72480
- let value = this.#extractValue(rowData, columnData.field);
72481
- value = api.localeAPI?.formatDate(value, columnData.formatOptions || { timeStyle: "short" }) ?? value.toString();
72501
+ const rawValue = this.#extractValue(rowData, columnData.field);
72502
+ let value = api.localeAPI?.formatDate(rawValue, columnData.formatOptions || { timeStyle: "short" }) ?? rawValue?.toString();
72503
+ if (value === rawValue) {
72504
+ value = this.#reformatFromEditorFormat(rawValue, columnData, api) ?? value;
72505
+ }
72482
72506
  const icon = columnData.editor?.type === "timepicker" ? `<ids-icon icon="clock" class="editor-cell-icon ${columnData.editor?.showEditorIcons ? "show-cell-icon-always" : ""}"></ids-icon>` : "";
72483
72507
  return `<span class="text-ellipsis">${value}</span>${icon}`;
72484
72508
  }
@@ -77853,11 +77877,31 @@ ids-trigger-button[slot=trigger-end] {
77853
77877
  applyEditorSettings(component, cell?.column.editor?.editorSettings);
77854
77878
  return component;
77855
77879
  }
77880
+ /**
77881
+ * Resolves the date format used for the value the user sees while editing.
77882
+ * Falls back to the editor format, then the locale default, so grids that
77883
+ * only configure `editorSettings.format` keep their previous behavior.
77884
+ * @param {IdsDataGridCell} cell the editing cell
77885
+ * @returns {string | undefined} the display date format, if any
77886
+ */
77887
+ #displayFormat(cell) {
77888
+ const formatOptionsFormat = cell?.column?.formatOptions?.format;
77889
+ const editorFormat = cell?.column?.editor?.editorSettings?.format;
77890
+ return formatOptionsFormat || editorFormat || void 0;
77891
+ }
77856
77892
  #update(cell, dateString) {
77857
- const inputDate = cell?.dataGrid.localeAPI.parseDate(
77893
+ const displayFormat = this.#displayFormat(cell);
77894
+ const editorFormat = cell?.column?.editor?.editorSettings?.format || void 0;
77895
+ let inputDate = cell?.dataGrid.localeAPI.parseDate(
77858
77896
  dateString,
77859
- { dateFormat: cell?.column?.editor?.editorSettings?.format || void 0 }
77897
+ { dateFormat: displayFormat }
77860
77898
  );
77899
+ if ((!inputDate || !isValidDate(inputDate)) && editorFormat && editorFormat !== displayFormat) {
77900
+ inputDate = cell?.dataGrid.localeAPI.parseDate(
77901
+ dateString,
77902
+ { dateFormat: editorFormat }
77903
+ );
77904
+ }
77861
77905
  if (!dateString || !isValidDate(inputDate)) {
77862
77906
  this.#displayValue = dateString;
77863
77907
  this.#value = void 0;
@@ -77876,7 +77920,7 @@ ids-trigger-button[slot=trigger-end] {
77876
77920
  } else {
77877
77921
  this.#value = inputDate;
77878
77922
  }
77879
- this.#displayValue = cell.dataGrid.localeAPI.formatDate(this.#value, cell.column?.editor?.editorSettings);
77923
+ this.#displayValue = cell.dataGrid.localeAPI.formatDate(this.#value, { dateFormat: displayFormat });
77880
77924
  }
77881
77925
  #stopPropagation(evt) {
77882
77926
  const isOpen = this.input?.popup?.hidden === false;
@@ -77894,8 +77938,15 @@ ids-trigger-button[slot=trigger-end] {
77894
77938
  }
77895
77939
  save(cell) {
77896
77940
  this.#update(cell, cell?.value);
77941
+ const editorFormat = cell?.column?.editor?.editorSettings?.format || void 0;
77942
+ let dateValue;
77943
+ if (editorFormat && this.#value instanceof Date) {
77944
+ dateValue = cell.dataGrid.localeAPI.formatDate(this.#value, { dateFormat: editorFormat });
77945
+ } else {
77946
+ dateValue = this.#value?.toISOString();
77947
+ }
77897
77948
  return {
77898
- value: this.#value?.toISOString() ?? "",
77949
+ value: (dateValue || this.#displayValue) ?? "",
77899
77950
  dirtyCheckValue: this.#displayValue
77900
77951
  };
77901
77952
  }