@uzum-tech/ui 2.4.3 → 2.4.4

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 (52) hide show
  1. package/dist/index.js +160 -44
  2. package/dist/index.mjs +160 -44
  3. package/dist/index.prod.js +2 -2
  4. package/dist/index.prod.mjs +3 -3
  5. package/es/components.d.ts +21 -0
  6. package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +2 -2
  7. package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.mjs +1 -1
  8. package/es/data-table/src/DataTable.mjs +16 -13
  9. package/es/data-table/src/interface.d.ts +153 -151
  10. package/es/data-table/src/interface.mjs +7 -7
  11. package/es/data-table/src/use-column-settings.mjs +4 -1
  12. package/es/data-table/src/use-resizable.d.ts +2 -0
  13. package/es/data-table/src/use-resizable.mjs +9 -1
  14. package/es/locales/common/ruRU.mjs +1 -1
  15. package/es/upload/src/Upload.d.ts +21 -0
  16. package/es/upload/src/Upload.mjs +7 -1
  17. package/es/upload/src/UploadFile.d.ts +6 -0
  18. package/es/upload/src/UploadFile.mjs +12 -8
  19. package/es/upload/src/UploadFileList.mjs +3 -2
  20. package/es/upload/src/UploadProgress.d.ts +6 -0
  21. package/es/upload/src/interface.d.ts +10 -1
  22. package/es/upload/src/styles/index.cssr.mjs +84 -1
  23. package/es/upload/src/useUploadActionsRender.mjs +10 -5
  24. package/es/upload/styles/light.d.ts +6 -0
  25. package/es/upload/styles/light.mjs +4 -0
  26. package/es/version.d.ts +1 -1
  27. package/es/version.mjs +1 -1
  28. package/lib/components.d.ts +21 -0
  29. package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +2 -2
  30. package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.js +1 -1
  31. package/lib/data-table/src/DataTable.js +14 -13
  32. package/lib/data-table/src/interface.d.ts +153 -151
  33. package/lib/data-table/src/interface.js +7 -7
  34. package/lib/data-table/src/use-column-settings.js +6 -1
  35. package/lib/data-table/src/use-resizable.d.ts +2 -0
  36. package/lib/data-table/src/use-resizable.js +9 -1
  37. package/lib/locales/common/ruRU.js +1 -1
  38. package/lib/upload/src/Upload.d.ts +21 -0
  39. package/lib/upload/src/Upload.js +5 -2
  40. package/lib/upload/src/UploadFile.d.ts +6 -0
  41. package/lib/upload/src/UploadFile.js +19 -11
  42. package/lib/upload/src/UploadFileList.js +5 -1
  43. package/lib/upload/src/UploadProgress.d.ts +6 -0
  44. package/lib/upload/src/interface.d.ts +10 -1
  45. package/lib/upload/src/styles/index.cssr.js +84 -1
  46. package/lib/upload/src/useUploadActionsRender.js +17 -7
  47. package/lib/upload/styles/light.d.ts +6 -0
  48. package/lib/upload/styles/light.js +4 -1
  49. package/lib/version.d.ts +1 -1
  50. package/lib/version.js +1 -1
  51. package/package.json +1 -1
  52. package/web-types.json +13 -10
package/dist/index.js CHANGED
@@ -11554,7 +11554,7 @@
11554
11554
  uncheckTableAll: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435",
11555
11555
  confirm: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C",
11556
11556
  clear: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
11557
- columnSettingsTitle: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",
11557
+ columnSettingsTitle: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",
11558
11558
  columnSettingsButton: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",
11559
11559
  columnSettingsSubtitle: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u043E\u043B\u043E\u043D\u043A\u0438 \u0438 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0435 \u0438\u0445 \u043F\u043E\u0440\u044F\u0434\u043E\u043A",
11560
11560
  columnSettingsSelectAll: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435",
@@ -52345,6 +52345,7 @@
52345
52345
  fontBodyMedium,
52346
52346
  lineHeightBodyMedium,
52347
52347
  borderRadiusLarge,
52348
+ borderRadiusSmall,
52348
52349
  containerSecondary,
52349
52350
  brandPrimary300,
52350
52351
  brandPrimary500
@@ -52377,6 +52378,9 @@
52377
52378
  widthSmall: "140px",
52378
52379
  widthMedium: "auto",
52379
52380
  widthLarge: "auto",
52381
+ previewCardWidth: "80px",
52382
+ previewCardHeight: "72px",
52383
+ previewCardBorderRadius: borderRadiusSmall,
52380
52384
  containerSecondary,
52381
52385
  brandPrimary300,
52382
52386
  elementsQuaternary
@@ -52518,6 +52522,10 @@
52518
52522
  grid-template-columns: repeat(auto-fill, 238px);
52519
52523
  grid-gap: 8px;
52520
52524
  margin-top: 0;
52525
+ `), cM("preview-card-grid", `
52526
+ display: grid;
52527
+ grid-template-columns: repeat(auto-fill, var(--u-upload-preview-card-width));
52528
+ grid-gap: 8px;
52521
52529
  `), cB("upload-file", `
52522
52530
  display: block;
52523
52531
  box-sizing: border-box;
@@ -52536,6 +52544,11 @@
52536
52544
  `), cE("action", `
52537
52545
  opacity: 1;
52538
52546
  z-index: 10;
52547
+ `)])]), cM("preview-card-type", [cB("upload-file-info", [cE("preview", `
52548
+ filter: blur(3px);
52549
+ `), cE("action", `
52550
+ opacity: 1;
52551
+ z-index: 10;
52539
52552
  `)])])]), cM("text-type", `
52540
52553
  border: var(--u-item-border-image-card);
52541
52554
  margin-bottom: 12px;
@@ -52620,6 +52633,8 @@
52620
52633
  background-color: var(--u-item-color-hover-error);
52621
52634
  `), cB("upload-file-info", [cE("name", "color: var(--u-item-text-color-error);"), cE("thumbnail", "color: var(--u-item-text-color-error);")]), cM("image-card-type", `
52622
52635
  border: var(--u-item-border-image-card-error);
52636
+ `), cM("preview-card-type", `
52637
+ border: var(--u-item-border-image-card-error);
52623
52638
  `)]), cM("with-url", `
52624
52639
  cursor: pointer;
52625
52640
  `, [cB("upload-file-info", [cE("name", `
@@ -52776,7 +52791,79 @@
52776
52791
  `), c$1(":nth-child(3)", `
52777
52792
  font-size: 12px;
52778
52793
  color: var(--u-item-text-color-success);
52779
- `)])])])]), cB("upload-file-input", `
52794
+ `)])]), cM("preview-card-type", `
52795
+ position: relative;
52796
+ width: var(--u-upload-preview-card-width);
52797
+ height: var(--u-upload-preview-card-height);
52798
+ border: var(--u-item-border-image-card);
52799
+ border-radius: var(--u-upload-preview-card-border-radius);
52800
+ background-color: var(--u-upload-info-bg-color);
52801
+ overflow: hidden;
52802
+ transition: border-color .3s var(--u-bezier), background-color .3s var(--u-bezier);
52803
+ `, [cB("upload-file-overlay", `
52804
+ border-radius: inherit;
52805
+ `), cB("upload-file-info", `
52806
+ padding-top: 0;
52807
+ padding-bottom: 0;
52808
+ width: 100%;
52809
+ height: 100%;
52810
+ justify-content: center;
52811
+ `, [cE("thumbnail", `
52812
+ width: 100%;
52813
+ height: 100%;
52814
+ cursor: pointer;
52815
+ `, [cM("icon", `
52816
+ display: flex;
52817
+ align-items: flex-start;
52818
+ justify-content: center;
52819
+ background-color: transparent;
52820
+ border-radius: 0;
52821
+ margin-right: 0;
52822
+ width: 100%;
52823
+ height: 100%;
52824
+ `)]), cE("preview", `
52825
+ flex-shrink: 0;
52826
+ width: 56px;
52827
+ height: 67px;
52828
+ margin-top: 16px;
52829
+ border-radius: 7px;
52830
+ transition: filter .2s var(--u-bezier);
52831
+ `, [cB("upload-file-info__preview--ext", `
52832
+ font-size: 8px;
52833
+ line-height: 10px;
52834
+ font-weight: 700;
52835
+ top: 6px;
52836
+ left: 6px;
52837
+ `), cB("upload-file-info__preview--content", `
52838
+ top: 29px;
52839
+ left: 6px;
52840
+ width: 43px;
52841
+ height: 3px;
52842
+ border-radius: 2px;
52843
+ `, [c$1("&::before", `
52844
+ top: -6px;
52845
+ width: 43px;
52846
+ height: 3px;
52847
+ border-radius: 2px;
52848
+ `), c$1("&::after", `
52849
+ top: 6px;
52850
+ width: 24px;
52851
+ height: 3px;
52852
+ border-radius: 2px;
52853
+ `)])]), cE("action", `
52854
+ padding-top: 0;
52855
+ padding-bottom: 0;
52856
+ z-index: 2;
52857
+ `, [cB("button", `
52858
+ width: 24px;
52859
+ height: 24px;
52860
+ min-width: 24px;
52861
+ padding: 0;
52862
+ border-radius: 50%;
52863
+ box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.08);
52864
+ `, [cB("base-icon", `
52865
+ font-size: 16px;
52866
+ `)])])])])])]), cB("upload-file-input", `
52780
52867
  display: block;
52781
52868
  width: 0;
52782
52869
  height: 0;
@@ -57472,8 +57559,13 @@
57472
57559
  return i === -1 || i === name.length - 1 ? "" : name.slice(i + 1);
57473
57560
  };
57474
57561
  const isImageType = ["image", "image-card"].includes(listType);
57562
+ const isPreviewCardType = listType === "preview-card";
57475
57563
  const fileExt = getExt(file.name);
57476
57564
  const capitalizedExt = capitalizeFirstLetter(fileExt);
57565
+ const showRetry = showRetryButton && !disabled;
57566
+ const showDownload = showDownloadButton && !isPreviewCardType;
57567
+ const showRemoveOrCancel = (showRemoveButton || showCancelButton) && !disabled && !(isPreviewCardType && showRetry);
57568
+ const showPreview = showPreviewButton && !(isPreviewCardType && (showRetry || showRemoveOrCancel));
57477
57569
  const fallbackIcon = vue.h(
57478
57570
  "div",
57479
57571
  {
@@ -57510,11 +57602,11 @@
57510
57602
  {
57511
57603
  class: [
57512
57604
  `${clsPrefix}-upload-file-info__action`,
57513
- `${clsPrefix}-upload-file--${isImageType ? "image-card" : "text"}-type`
57605
+ `${clsPrefix}-upload-file--${isImageType ? "image-card" : isPreviewCardType ? "preview-card" : "text"}-type`
57514
57606
  ]
57515
57607
  },
57516
57608
  [
57517
- showPreviewButton && vue.h(
57609
+ showPreview && vue.h(
57518
57610
  Button,
57519
57611
  {
57520
57612
  key: "preview",
@@ -57529,7 +57621,7 @@
57529
57621
  icon: () => vue.h(UBaseIcon, { clsPrefix }, { default: () => vue.h(EyeIcon) })
57530
57622
  }
57531
57623
  ),
57532
- (showRemoveButton || showCancelButton) && !disabled && vue.h(
57624
+ showRemoveOrCancel && vue.h(
57533
57625
  Button,
57534
57626
  {
57535
57627
  key: "cancelOrTrash",
@@ -57558,7 +57650,7 @@
57558
57650
  )
57559
57651
  }
57560
57652
  ),
57561
- showRetryButton && !disabled && vue.h(
57653
+ showRetry && vue.h(
57562
57654
  Button,
57563
57655
  {
57564
57656
  key: "retry",
@@ -57573,7 +57665,7 @@
57573
57665
  icon: () => vue.h(UBaseIcon, { clsPrefix }, { default: () => vue.h(RetryIcon) })
57574
57666
  }
57575
57667
  ),
57576
- showDownloadButton && vue.h(
57668
+ showDownload && vue.h(
57577
57669
  Button,
57578
57670
  {
57579
57671
  key: "download",
@@ -57596,7 +57688,8 @@
57596
57688
  const buttonThemeOverrides = {
57597
57689
  paddingMedium: "0 3px",
57598
57690
  heightMedium: "24px",
57599
- iconSizeMedium: "18px"
57691
+ iconSizeMedium: "18px",
57692
+ textColor: "#101010"
57600
57693
  };
57601
57694
  var UUploadFile = vue.defineComponent({
57602
57695
  name: "UploadFile",
@@ -57672,7 +57765,7 @@
57672
57765
  } = props;
57673
57766
  if (!["finished"].includes(status))
57674
57767
  return false;
57675
- if (listType === "preview-list") {
57768
+ if (listType === "preview-list" || listType === "preview-card") {
57676
57769
  return UUpload.isFilePreviewable(props.file);
57677
57770
  }
57678
57771
  return !!mergedThumbnailUrlRef.value && listType === "image-card";
@@ -57754,7 +57847,7 @@
57754
57847
  } = UUpload;
57755
57848
  if (onPreview) {
57756
57849
  onPreview(props.file);
57757
- } else if (props.listType === "preview-list") {
57850
+ } else if (props.listType === "preview-list" || props.listType === "preview-card") {
57758
57851
  UUpload.openFilePreview(props.file);
57759
57852
  } else if (props.listType === "image-card") {
57760
57853
  const { value } = imageRef;
@@ -57828,10 +57921,11 @@
57828
57921
  _USpin,
57829
57922
  {
57830
57923
  color: "tertiary",
57831
- description: this.localeRef.uploading,
57924
+ size: listType === "preview-card" ? 24 : void 0,
57925
+ description: listType === "preview-card" ? void 0 : this.localeRef.uploading,
57832
57926
  show: this.showProgress,
57833
57927
  class: [
57834
- !this.vertical && !imageCardTypes.includes(listType) && `${clsPrefix}-upload-file-loader--default`
57928
+ !this.vertical && !imageCardTypes.includes(listType) && listType !== "preview-card" && `${clsPrefix}-upload-file-loader--default`
57835
57929
  ]
57836
57930
  },
57837
57931
  {
@@ -57842,8 +57936,9 @@
57842
57936
  `${clsPrefix}-upload-file`,
57843
57937
  `${clsPrefix}-upload-file--${this.progressStatus}-status`,
57844
57938
  file.url && file.status !== "error" && imageCardTypes.includes(listType) && `${clsPrefix}-upload-file--with-url`,
57845
- `${clsPrefix}-upload-file--${listType === "image" || listType === "image-card" ? "image-card" : "text"}-type`,
57846
- listType === "preview-list" && `${clsPrefix}-upload-file--preview-list-type`
57939
+ listType !== "preview-card" && `${clsPrefix}-upload-file--${listType === "image" || listType === "image-card" ? "image-card" : "text"}-type`,
57940
+ listType === "preview-list" && `${clsPrefix}-upload-file--preview-list-type`,
57941
+ listType === "preview-card" && `${clsPrefix}-upload-file--preview-card-type`
57847
57942
  ]
57848
57943
  },
57849
57944
  /* @__PURE__ */ vue.h(
@@ -57854,8 +57949,8 @@
57854
57949
  imageCardTypes.includes(listType) && `${clsPrefix}-upload-file-info--vertical`
57855
57950
  ]
57856
57951
  },
57857
- icon,
57858
- /* @__PURE__ */ vue.h("div", { class: `${clsPrefix}-upload-file-info__name` }, /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-title"] ? this.$slots["upload-file-title"]({ file }) : file.name), /* @__PURE__ */ vue.h("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-subtitle"] ? this.$slots["upload-file-subtitle"]({ file }) : ""))),
57952
+ listType === "preview-card" ? vue.cloneVNode(icon, { onClick: this.handlePreviewClick }) : icon,
57953
+ listType !== "preview-card" && /* @__PURE__ */ vue.h("div", { class: `${clsPrefix}-upload-file-info__name` }, /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-title"] ? this.$slots["upload-file-title"]({ file }) : file.name), /* @__PURE__ */ vue.h("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-subtitle"] ? this.$slots["upload-file-subtitle"]({ file }) : ""))),
57859
57954
  actionsNode
57860
57955
  ),
57861
57956
  this.showProgress && /* @__PURE__ */ vue.h("div", { class: `${clsPrefix}-upload-file-overlay` })
@@ -58022,6 +58117,9 @@
58022
58117
  const isPreviewListTypeRef = vue.computed(
58023
58118
  () => listTypeRef.value === "preview-list"
58024
58119
  );
58120
+ const isPreviewCardTypeRef = vue.computed(
58121
+ () => listTypeRef.value === "preview-card"
58122
+ );
58025
58123
  const renderFileList = () => mergedFileListRef.value.map((file) => /* @__PURE__ */ vue.h(
58026
58124
  UUploadFile,
58027
58125
  {
@@ -58059,6 +58157,7 @@
58059
58157
  class: [
58060
58158
  `${mergedClsPrefix}-upload-file-list`,
58061
58159
  isImageCardTypeRef.value && `${mergedClsPrefix}-upload-file-list--grid`,
58160
+ isPreviewCardTypeRef.value && `${mergedClsPrefix}-upload-file-list--preview-card-grid`,
58062
58161
  fileListClassRef.value,
58063
58162
  abstract ? themeClassRef?.value : void 0
58064
58163
  ],
@@ -58068,7 +58167,7 @@
58068
58167
  ]
58069
58168
  },
58070
58169
  renderUploadFileList(),
58071
- isPreviewListTypeRef.value && renderPreview(),
58170
+ (isPreviewListTypeRef.value || isPreviewCardTypeRef.value) && renderPreview(),
58072
58171
  showTriggerRef.value && !maxReachedRef.value && isImageCardTypeRef.value && /* @__PURE__ */ vue.h(_UUploadTrigger, null, slots)
58073
58172
  );
58074
58173
  };
@@ -58627,6 +58726,9 @@
58627
58726
  containerSecondary,
58628
58727
  brandPrimary300,
58629
58728
  elementsQuaternary,
58729
+ previewCardWidth,
58730
+ previewCardHeight,
58731
+ previewCardBorderRadius,
58630
58732
  [createKey$1("width", size)]: width
58631
58733
  }
58632
58734
  } = themeRef.value;
@@ -58658,7 +58760,10 @@
58658
58760
  "--u-upload-dragger-width": width,
58659
58761
  "--u-upload-info-bg-color": containerSecondary,
58660
58762
  "--u-upload-preview-color": brandPrimary300,
58661
- "--u-upload-empty-border-color": elementsQuaternary
58763
+ "--u-upload-empty-border-color": elementsQuaternary,
58764
+ "--u-upload-preview-card-width": previewCardWidth,
58765
+ "--u-upload-preview-card-height": previewCardHeight,
58766
+ "--u-upload-preview-card-border-radius": previewCardBorderRadius
58662
58767
  };
58663
58768
  });
58664
58769
  const themeClassHandle = inlineThemeDisabled ? useThemeClass(
@@ -106488,7 +106593,7 @@ img.ProseMirror-separator {
106488
106593
  {
106489
106594
  class: `${mergedClsPrefixRef.value}-data-table-column-settings__item-title`
106490
106595
  },
106491
- () => row.title
106596
+ () => typeof row.title === "function" ? row.title() : row.title
106492
106597
  )
106493
106598
  ]
106494
106599
  );
@@ -106677,12 +106782,6 @@ img.ProseMirror-separator {
106677
106782
  }
106678
106783
  });
106679
106784
 
106680
- var TableColumnType = /* @__PURE__ */(TableColumnType2 => {
106681
- TableColumnType2["SELECTION"] = "selection";
106682
- TableColumnType2["EXPAND"] = "expand";
106683
- TableColumnType2["DRAGGABLE"] = "draggable";
106684
- return TableColumnType2;
106685
- })(TableColumnType || {});
106686
106785
  const dataTableProps = {
106687
106786
  ...useTheme.props,
106688
106787
  onUnstableColumnResize: Function,
@@ -106824,6 +106923,12 @@ img.ProseMirror-separator {
106824
106923
  onCheckedRowKeysChange: [Function, Array]
106825
106924
  };
106826
106925
  const dataTableInjectionKey = createInjectionKey("u-data-table");
106926
+ var TableColumnType = /* @__PURE__ */(TableColumnType2 => {
106927
+ TableColumnType2["SELECTION"] = "selection";
106928
+ TableColumnType2["EXPAND"] = "expand";
106929
+ TableColumnType2["DRAGGABLE"] = "draggable";
106930
+ return TableColumnType2;
106931
+ })(TableColumnType || {});
106827
106932
 
106828
106933
  function renderBodyEmpty(deps) {
106829
106934
  const {
@@ -110663,7 +110768,10 @@ img.ProseMirror-separator {
110663
110768
  return column.visible !== false;
110664
110769
  }
110665
110770
  function toColumnTitle(column) {
110666
- return typeof column.title === "string" ? column.title : String(column.key);
110771
+ if (column.settingsTitle !== void 0) return column.settingsTitle;
110772
+ const title = column.title;
110773
+ if (typeof title === "function") return () => title(column);
110774
+ return title ?? String(column.key);
110667
110775
  }
110668
110776
  function calcColumnsScrollX(columns, getResizableWidth) {
110669
110777
  let total = 0;
@@ -110922,26 +111030,34 @@ img.ProseMirror-separator {
110922
111030
 
110923
111031
  function useResizable() {
110924
111032
  const resizableWidthsRef = vue.ref({});
111033
+ const preferredWidthsRef = vue.ref({});
110925
111034
  function getResizableWidth(key) {
110926
111035
  return resizableWidthsRef.value[key];
110927
111036
  }
110928
111037
  function doUpdateResizableWidth(column, width) {
110929
111038
  if ("key" in column) {
111039
+ preferredWidthsRef.value[column.key] = width;
110930
111040
  resizableWidthsRef.value[column.key] = width;
110931
111041
  }
110932
111042
  }
110933
111043
  function setResizableWidths(widths) {
110934
111044
  resizableWidthsRef.value = widths;
110935
111045
  }
111046
+ function setPreferredWidths(widths) {
111047
+ preferredWidthsRef.value = widths;
111048
+ }
110936
111049
  function clearResizableWidth() {
111050
+ preferredWidthsRef.value = {};
110937
111051
  resizableWidthsRef.value = {};
110938
111052
  }
110939
111053
  return {
110940
111054
  getResizableWidth,
110941
111055
  doUpdateResizableWidth,
110942
111056
  setResizableWidths,
111057
+ setPreferredWidths,
110943
111058
  clearResizableWidth,
110944
- resizableWidthsRef
111059
+ resizableWidthsRef,
111060
+ preferredWidthsRef
110945
111061
  };
110946
111062
  }
110947
111063
 
@@ -111987,15 +112103,15 @@ img.ProseMirror-separator {
111987
112103
  clearResizableWidth,
111988
112104
  doUpdateResizableWidth,
111989
112105
  setResizableWidths,
111990
- resizableWidthsRef
112106
+ setPreferredWidths,
112107
+ resizableWidthsRef,
112108
+ preferredWidthsRef
111991
112109
  } = useResizable();
111992
112110
  if (props.localStorageKey && props.resizableStorage !== false) {
111993
112111
  const storedWidths = loadTableState(props.localStorageKey)?.columnWidths;
111994
112112
  if (storedWidths && Object.keys(storedWidths).length > 0) {
111995
- resizableWidthsRef.value = {
111996
- ...resizableWidthsRef.value,
111997
- ...storedWidths
111998
- };
112113
+ setPreferredWidths({ ...storedWidths });
112114
+ setResizableWidths({ ...storedWidths });
111999
112115
  }
112000
112116
  }
112001
112117
  const {
@@ -112154,7 +112270,7 @@ img.ProseMirror-separator {
112154
112270
  vue.watch(
112155
112271
  () => props.localStorageKey ? {
112156
112272
  key: props.localStorageKey,
112157
- columnWidths: resizableWidthsRef.value,
112273
+ columnWidths: preferredWidthsRef.value,
112158
112274
  columnsConfig: columnsConfigRef.value,
112159
112275
  page: mergedPaginationRef.value?.page,
112160
112276
  pageSize: mergedPaginationRef.value?.pageSize,
@@ -112229,23 +112345,23 @@ img.ProseMirror-separator {
112229
112345
  systemMaxWidth: props.resizableMaxWidth
112230
112346
  };
112231
112347
  });
112232
- function buildNonFixedModeWidthMap(currentWidths, resizableColumns) {
112348
+ function buildNonFixedModeWidthMap(preferredWidths, resizableColumns) {
112233
112349
  const { systemMinWidth, systemMaxWidth } = widthConstraintSignalRef.value;
112234
112350
  return {
112235
112351
  keys: resizableColumns.map((column) => column.key),
112236
112352
  widthMap: sanitizeColumnWidthMap(resizableColumns, {
112237
112353
  systemMinWidth,
112238
112354
  systemMaxWidth,
112239
- source: currentWidths
112355
+ source: preferredWidths
112240
112356
  })
112241
112357
  };
112242
112358
  }
112243
- function buildFixedModeWidthMap(visibleLeafColumns, currentWidths) {
112359
+ function buildFixedModeWidthMap(visibleLeafColumns, sourceWidths) {
112244
112360
  const { systemMinWidth, systemMaxWidth } = widthConstraintSignalRef.value;
112245
112361
  const preferredWidths = sanitizeColumnWidthMap(visibleLeafColumns, {
112246
112362
  systemMinWidth,
112247
112363
  systemMaxWidth,
112248
- source: currentWidths
112364
+ source: sourceWidths
112249
112365
  });
112250
112366
  const containerWidth = containerWidthSignalRef.value;
112251
112367
  if (containerWidth === void 0) {
@@ -112271,16 +112387,16 @@ img.ProseMirror-separator {
112271
112387
  }
112272
112388
  function reconcileResizableWidths(_reason) {
112273
112389
  const visibleLeafColumns = visibleLeafColumnsSignalRef.value;
112274
- const currentWidths = resizableWidthsRef.value;
112390
+ const preferredWidths = preferredWidthsRef.value;
112275
112391
  if (!visibleLeafColumns.length || !resizableColumnPresentRef.value) {
112276
- if (Object.keys(currentWidths).length) {
112277
- clearResizableWidth();
112392
+ if (Object.keys(resizableWidthsRef.value).length) {
112393
+ setResizableWidths({});
112278
112394
  }
112279
112395
  return;
112280
112396
  }
112281
112397
  if (modeSignalRef.value !== "fixed") {
112282
112398
  const { widthMap, keys } = buildNonFixedModeWidthMap(
112283
- currentWidths,
112399
+ preferredWidths,
112284
112400
  resizableColumnsSignalRef.value
112285
112401
  );
112286
112402
  syncResizableWidths(widthMap, keys);
@@ -112289,7 +112405,7 @@ img.ProseMirror-separator {
112289
112405
  const visibleLeafKeys = visibleLeafColumns.map((column) => column.key);
112290
112406
  const nextWidths = buildFixedModeWidthMap(
112291
112407
  visibleLeafColumns,
112292
- currentWidths
112408
+ preferredWidths
112293
112409
  );
112294
112410
  syncResizableWidths(nextWidths, visibleLeafKeys);
112295
112411
  }
@@ -112320,7 +112436,7 @@ img.ProseMirror-separator {
112320
112436
  }
112321
112437
  );
112322
112438
  vue.watch(
112323
- () => resizableWidthsRef.value,
112439
+ () => preferredWidthsRef.value,
112324
112440
  () => {
112325
112441
  reconcileResizableWidths();
112326
112442
  },
@@ -154907,7 +155023,7 @@ ${icon.label}`.toLowerCase()
154907
155023
  });
154908
155024
  }
154909
155025
 
154910
- var version = "2.4.3";
155026
+ var version = "2.4.4";
154911
155027
 
154912
155028
  function create({
154913
155029
  componentPrefix = "U",