@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.
- package/dist/index.js +160 -44
- package/dist/index.mjs +160 -44
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +3 -3
- package/es/components.d.ts +21 -0
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +2 -2
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.mjs +1 -1
- package/es/data-table/src/DataTable.mjs +16 -13
- package/es/data-table/src/interface.d.ts +153 -151
- package/es/data-table/src/interface.mjs +7 -7
- package/es/data-table/src/use-column-settings.mjs +4 -1
- package/es/data-table/src/use-resizable.d.ts +2 -0
- package/es/data-table/src/use-resizable.mjs +9 -1
- package/es/locales/common/ruRU.mjs +1 -1
- package/es/upload/src/Upload.d.ts +21 -0
- package/es/upload/src/Upload.mjs +7 -1
- package/es/upload/src/UploadFile.d.ts +6 -0
- package/es/upload/src/UploadFile.mjs +12 -8
- package/es/upload/src/UploadFileList.mjs +3 -2
- package/es/upload/src/UploadProgress.d.ts +6 -0
- package/es/upload/src/interface.d.ts +10 -1
- package/es/upload/src/styles/index.cssr.mjs +84 -1
- package/es/upload/src/useUploadActionsRender.mjs +10 -5
- package/es/upload/styles/light.d.ts +6 -0
- package/es/upload/styles/light.mjs +4 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/components.d.ts +21 -0
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +2 -2
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.js +1 -1
- package/lib/data-table/src/DataTable.js +14 -13
- package/lib/data-table/src/interface.d.ts +153 -151
- package/lib/data-table/src/interface.js +7 -7
- package/lib/data-table/src/use-column-settings.js +6 -1
- package/lib/data-table/src/use-resizable.d.ts +2 -0
- package/lib/data-table/src/use-resizable.js +9 -1
- package/lib/locales/common/ruRU.js +1 -1
- package/lib/upload/src/Upload.d.ts +21 -0
- package/lib/upload/src/Upload.js +5 -2
- package/lib/upload/src/UploadFile.d.ts +6 -0
- package/lib/upload/src/UploadFile.js +19 -11
- package/lib/upload/src/UploadFileList.js +5 -1
- package/lib/upload/src/UploadProgress.d.ts +6 -0
- package/lib/upload/src/interface.d.ts +10 -1
- package/lib/upload/src/styles/index.cssr.js +84 -1
- package/lib/upload/src/useUploadActionsRender.js +17 -7
- package/lib/upload/styles/light.d.ts +6 -0
- package/lib/upload/styles/light.js +4 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +13 -10
package/dist/index.mjs
CHANGED
|
@@ -11550,7 +11550,7 @@ const ruRu = {
|
|
|
11550
11550
|
uncheckTableAll: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435",
|
|
11551
11551
|
confirm: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C",
|
|
11552
11552
|
clear: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
|
|
11553
|
-
columnSettingsTitle: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\
|
|
11553
|
+
columnSettingsTitle: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",
|
|
11554
11554
|
columnSettingsButton: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",
|
|
11555
11555
|
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",
|
|
11556
11556
|
columnSettingsSelectAll: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435",
|
|
@@ -52341,6 +52341,7 @@ function self$13(vars) {
|
|
|
52341
52341
|
fontBodyMedium,
|
|
52342
52342
|
lineHeightBodyMedium,
|
|
52343
52343
|
borderRadiusLarge,
|
|
52344
|
+
borderRadiusSmall,
|
|
52344
52345
|
containerSecondary,
|
|
52345
52346
|
brandPrimary300,
|
|
52346
52347
|
brandPrimary500
|
|
@@ -52373,6 +52374,9 @@ function self$13(vars) {
|
|
|
52373
52374
|
widthSmall: "140px",
|
|
52374
52375
|
widthMedium: "auto",
|
|
52375
52376
|
widthLarge: "auto",
|
|
52377
|
+
previewCardWidth: "80px",
|
|
52378
|
+
previewCardHeight: "72px",
|
|
52379
|
+
previewCardBorderRadius: borderRadiusSmall,
|
|
52376
52380
|
containerSecondary,
|
|
52377
52381
|
brandPrimary300,
|
|
52378
52382
|
elementsQuaternary
|
|
@@ -52514,6 +52518,10 @@ var style$1k = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-in
|
|
|
52514
52518
|
grid-template-columns: repeat(auto-fill, 238px);
|
|
52515
52519
|
grid-gap: 8px;
|
|
52516
52520
|
margin-top: 0;
|
|
52521
|
+
`), cM("preview-card-grid", `
|
|
52522
|
+
display: grid;
|
|
52523
|
+
grid-template-columns: repeat(auto-fill, var(--u-upload-preview-card-width));
|
|
52524
|
+
grid-gap: 8px;
|
|
52517
52525
|
`), cB("upload-file", `
|
|
52518
52526
|
display: block;
|
|
52519
52527
|
box-sizing: border-box;
|
|
@@ -52532,6 +52540,11 @@ var style$1k = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-in
|
|
|
52532
52540
|
`), cE("action", `
|
|
52533
52541
|
opacity: 1;
|
|
52534
52542
|
z-index: 10;
|
|
52543
|
+
`)])]), cM("preview-card-type", [cB("upload-file-info", [cE("preview", `
|
|
52544
|
+
filter: blur(3px);
|
|
52545
|
+
`), cE("action", `
|
|
52546
|
+
opacity: 1;
|
|
52547
|
+
z-index: 10;
|
|
52535
52548
|
`)])])]), cM("text-type", `
|
|
52536
52549
|
border: var(--u-item-border-image-card);
|
|
52537
52550
|
margin-bottom: 12px;
|
|
@@ -52616,6 +52629,8 @@ var style$1k = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-in
|
|
|
52616
52629
|
background-color: var(--u-item-color-hover-error);
|
|
52617
52630
|
`), 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", `
|
|
52618
52631
|
border: var(--u-item-border-image-card-error);
|
|
52632
|
+
`), cM("preview-card-type", `
|
|
52633
|
+
border: var(--u-item-border-image-card-error);
|
|
52619
52634
|
`)]), cM("with-url", `
|
|
52620
52635
|
cursor: pointer;
|
|
52621
52636
|
`, [cB("upload-file-info", [cE("name", `
|
|
@@ -52772,7 +52787,79 @@ var style$1k = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-in
|
|
|
52772
52787
|
`), c$1(":nth-child(3)", `
|
|
52773
52788
|
font-size: 12px;
|
|
52774
52789
|
color: var(--u-item-text-color-success);
|
|
52775
|
-
`)])])
|
|
52790
|
+
`)])]), cM("preview-card-type", `
|
|
52791
|
+
position: relative;
|
|
52792
|
+
width: var(--u-upload-preview-card-width);
|
|
52793
|
+
height: var(--u-upload-preview-card-height);
|
|
52794
|
+
border: var(--u-item-border-image-card);
|
|
52795
|
+
border-radius: var(--u-upload-preview-card-border-radius);
|
|
52796
|
+
background-color: var(--u-upload-info-bg-color);
|
|
52797
|
+
overflow: hidden;
|
|
52798
|
+
transition: border-color .3s var(--u-bezier), background-color .3s var(--u-bezier);
|
|
52799
|
+
`, [cB("upload-file-overlay", `
|
|
52800
|
+
border-radius: inherit;
|
|
52801
|
+
`), cB("upload-file-info", `
|
|
52802
|
+
padding-top: 0;
|
|
52803
|
+
padding-bottom: 0;
|
|
52804
|
+
width: 100%;
|
|
52805
|
+
height: 100%;
|
|
52806
|
+
justify-content: center;
|
|
52807
|
+
`, [cE("thumbnail", `
|
|
52808
|
+
width: 100%;
|
|
52809
|
+
height: 100%;
|
|
52810
|
+
cursor: pointer;
|
|
52811
|
+
`, [cM("icon", `
|
|
52812
|
+
display: flex;
|
|
52813
|
+
align-items: flex-start;
|
|
52814
|
+
justify-content: center;
|
|
52815
|
+
background-color: transparent;
|
|
52816
|
+
border-radius: 0;
|
|
52817
|
+
margin-right: 0;
|
|
52818
|
+
width: 100%;
|
|
52819
|
+
height: 100%;
|
|
52820
|
+
`)]), cE("preview", `
|
|
52821
|
+
flex-shrink: 0;
|
|
52822
|
+
width: 56px;
|
|
52823
|
+
height: 67px;
|
|
52824
|
+
margin-top: 16px;
|
|
52825
|
+
border-radius: 7px;
|
|
52826
|
+
transition: filter .2s var(--u-bezier);
|
|
52827
|
+
`, [cB("upload-file-info__preview--ext", `
|
|
52828
|
+
font-size: 8px;
|
|
52829
|
+
line-height: 10px;
|
|
52830
|
+
font-weight: 700;
|
|
52831
|
+
top: 6px;
|
|
52832
|
+
left: 6px;
|
|
52833
|
+
`), cB("upload-file-info__preview--content", `
|
|
52834
|
+
top: 29px;
|
|
52835
|
+
left: 6px;
|
|
52836
|
+
width: 43px;
|
|
52837
|
+
height: 3px;
|
|
52838
|
+
border-radius: 2px;
|
|
52839
|
+
`, [c$1("&::before", `
|
|
52840
|
+
top: -6px;
|
|
52841
|
+
width: 43px;
|
|
52842
|
+
height: 3px;
|
|
52843
|
+
border-radius: 2px;
|
|
52844
|
+
`), c$1("&::after", `
|
|
52845
|
+
top: 6px;
|
|
52846
|
+
width: 24px;
|
|
52847
|
+
height: 3px;
|
|
52848
|
+
border-radius: 2px;
|
|
52849
|
+
`)])]), cE("action", `
|
|
52850
|
+
padding-top: 0;
|
|
52851
|
+
padding-bottom: 0;
|
|
52852
|
+
z-index: 2;
|
|
52853
|
+
`, [cB("button", `
|
|
52854
|
+
width: 24px;
|
|
52855
|
+
height: 24px;
|
|
52856
|
+
min-width: 24px;
|
|
52857
|
+
padding: 0;
|
|
52858
|
+
border-radius: 50%;
|
|
52859
|
+
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.08);
|
|
52860
|
+
`, [cB("base-icon", `
|
|
52861
|
+
font-size: 16px;
|
|
52862
|
+
`)])])])])])]), cB("upload-file-input", `
|
|
52776
52863
|
display: block;
|
|
52777
52864
|
width: 0;
|
|
52778
52865
|
height: 0;
|
|
@@ -57468,8 +57555,13 @@ function useUploadActionsRender(options) {
|
|
|
57468
57555
|
return i === -1 || i === name.length - 1 ? "" : name.slice(i + 1);
|
|
57469
57556
|
};
|
|
57470
57557
|
const isImageType = ["image", "image-card"].includes(listType);
|
|
57558
|
+
const isPreviewCardType = listType === "preview-card";
|
|
57471
57559
|
const fileExt = getExt(file.name);
|
|
57472
57560
|
const capitalizedExt = capitalizeFirstLetter(fileExt);
|
|
57561
|
+
const showRetry = showRetryButton && !disabled;
|
|
57562
|
+
const showDownload = showDownloadButton && !isPreviewCardType;
|
|
57563
|
+
const showRemoveOrCancel = (showRemoveButton || showCancelButton) && !disabled && !(isPreviewCardType && showRetry);
|
|
57564
|
+
const showPreview = showPreviewButton && !(isPreviewCardType && (showRetry || showRemoveOrCancel));
|
|
57473
57565
|
const fallbackIcon = h$1(
|
|
57474
57566
|
"div",
|
|
57475
57567
|
{
|
|
@@ -57506,11 +57598,11 @@ function useUploadActionsRender(options) {
|
|
|
57506
57598
|
{
|
|
57507
57599
|
class: [
|
|
57508
57600
|
`${clsPrefix}-upload-file-info__action`,
|
|
57509
|
-
`${clsPrefix}-upload-file--${isImageType ? "image-card" : "text"}-type`
|
|
57601
|
+
`${clsPrefix}-upload-file--${isImageType ? "image-card" : isPreviewCardType ? "preview-card" : "text"}-type`
|
|
57510
57602
|
]
|
|
57511
57603
|
},
|
|
57512
57604
|
[
|
|
57513
|
-
|
|
57605
|
+
showPreview && h$1(
|
|
57514
57606
|
Button,
|
|
57515
57607
|
{
|
|
57516
57608
|
key: "preview",
|
|
@@ -57525,7 +57617,7 @@ function useUploadActionsRender(options) {
|
|
|
57525
57617
|
icon: () => h$1(UBaseIcon, { clsPrefix }, { default: () => h$1(EyeIcon) })
|
|
57526
57618
|
}
|
|
57527
57619
|
),
|
|
57528
|
-
|
|
57620
|
+
showRemoveOrCancel && h$1(
|
|
57529
57621
|
Button,
|
|
57530
57622
|
{
|
|
57531
57623
|
key: "cancelOrTrash",
|
|
@@ -57554,7 +57646,7 @@ function useUploadActionsRender(options) {
|
|
|
57554
57646
|
)
|
|
57555
57647
|
}
|
|
57556
57648
|
),
|
|
57557
|
-
|
|
57649
|
+
showRetry && h$1(
|
|
57558
57650
|
Button,
|
|
57559
57651
|
{
|
|
57560
57652
|
key: "retry",
|
|
@@ -57569,7 +57661,7 @@ function useUploadActionsRender(options) {
|
|
|
57569
57661
|
icon: () => h$1(UBaseIcon, { clsPrefix }, { default: () => h$1(RetryIcon) })
|
|
57570
57662
|
}
|
|
57571
57663
|
),
|
|
57572
|
-
|
|
57664
|
+
showDownload && h$1(
|
|
57573
57665
|
Button,
|
|
57574
57666
|
{
|
|
57575
57667
|
key: "download",
|
|
@@ -57592,7 +57684,8 @@ function useUploadActionsRender(options) {
|
|
|
57592
57684
|
const buttonThemeOverrides = {
|
|
57593
57685
|
paddingMedium: "0 3px",
|
|
57594
57686
|
heightMedium: "24px",
|
|
57595
|
-
iconSizeMedium: "18px"
|
|
57687
|
+
iconSizeMedium: "18px",
|
|
57688
|
+
textColor: "#101010"
|
|
57596
57689
|
};
|
|
57597
57690
|
var UUploadFile = defineComponent({
|
|
57598
57691
|
name: "UploadFile",
|
|
@@ -57668,7 +57761,7 @@ var UUploadFile = defineComponent({
|
|
|
57668
57761
|
} = props;
|
|
57669
57762
|
if (!["finished"].includes(status))
|
|
57670
57763
|
return false;
|
|
57671
|
-
if (listType === "preview-list") {
|
|
57764
|
+
if (listType === "preview-list" || listType === "preview-card") {
|
|
57672
57765
|
return UUpload.isFilePreviewable(props.file);
|
|
57673
57766
|
}
|
|
57674
57767
|
return !!mergedThumbnailUrlRef.value && listType === "image-card";
|
|
@@ -57750,7 +57843,7 @@ var UUploadFile = defineComponent({
|
|
|
57750
57843
|
} = UUpload;
|
|
57751
57844
|
if (onPreview) {
|
|
57752
57845
|
onPreview(props.file);
|
|
57753
|
-
} else if (props.listType === "preview-list") {
|
|
57846
|
+
} else if (props.listType === "preview-list" || props.listType === "preview-card") {
|
|
57754
57847
|
UUpload.openFilePreview(props.file);
|
|
57755
57848
|
} else if (props.listType === "image-card") {
|
|
57756
57849
|
const { value } = imageRef;
|
|
@@ -57824,10 +57917,11 @@ var UUploadFile = defineComponent({
|
|
|
57824
57917
|
_USpin,
|
|
57825
57918
|
{
|
|
57826
57919
|
color: "tertiary",
|
|
57827
|
-
|
|
57920
|
+
size: listType === "preview-card" ? 24 : void 0,
|
|
57921
|
+
description: listType === "preview-card" ? void 0 : this.localeRef.uploading,
|
|
57828
57922
|
show: this.showProgress,
|
|
57829
57923
|
class: [
|
|
57830
|
-
!this.vertical && !imageCardTypes.includes(listType) && `${clsPrefix}-upload-file-loader--default`
|
|
57924
|
+
!this.vertical && !imageCardTypes.includes(listType) && listType !== "preview-card" && `${clsPrefix}-upload-file-loader--default`
|
|
57831
57925
|
]
|
|
57832
57926
|
},
|
|
57833
57927
|
{
|
|
@@ -57838,8 +57932,9 @@ var UUploadFile = defineComponent({
|
|
|
57838
57932
|
`${clsPrefix}-upload-file`,
|
|
57839
57933
|
`${clsPrefix}-upload-file--${this.progressStatus}-status`,
|
|
57840
57934
|
file.url && file.status !== "error" && imageCardTypes.includes(listType) && `${clsPrefix}-upload-file--with-url`,
|
|
57841
|
-
`${clsPrefix}-upload-file--${listType === "image" || listType === "image-card" ? "image-card" : "text"}-type`,
|
|
57842
|
-
listType === "preview-list" && `${clsPrefix}-upload-file--preview-list-type
|
|
57935
|
+
listType !== "preview-card" && `${clsPrefix}-upload-file--${listType === "image" || listType === "image-card" ? "image-card" : "text"}-type`,
|
|
57936
|
+
listType === "preview-list" && `${clsPrefix}-upload-file--preview-list-type`,
|
|
57937
|
+
listType === "preview-card" && `${clsPrefix}-upload-file--preview-card-type`
|
|
57843
57938
|
]
|
|
57844
57939
|
},
|
|
57845
57940
|
/* @__PURE__ */ h$1(
|
|
@@ -57850,8 +57945,8 @@ var UUploadFile = defineComponent({
|
|
|
57850
57945
|
imageCardTypes.includes(listType) && `${clsPrefix}-upload-file-info--vertical`
|
|
57851
57946
|
]
|
|
57852
57947
|
},
|
|
57853
|
-
icon,
|
|
57854
|
-
/* @__PURE__ */ h$1("div", { class: `${clsPrefix}-upload-file-info__name` }, /* @__PURE__ */ h$1(Fragment$1, null, /* @__PURE__ */ h$1("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-title"] ? this.$slots["upload-file-title"]({ file }) : file.name), /* @__PURE__ */ h$1("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-subtitle"] ? this.$slots["upload-file-subtitle"]({ file }) : ""))),
|
|
57948
|
+
listType === "preview-card" ? cloneVNode(icon, { onClick: this.handlePreviewClick }) : icon,
|
|
57949
|
+
listType !== "preview-card" && /* @__PURE__ */ h$1("div", { class: `${clsPrefix}-upload-file-info__name` }, /* @__PURE__ */ h$1(Fragment$1, null, /* @__PURE__ */ h$1("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-title"] ? this.$slots["upload-file-title"]({ file }) : file.name), /* @__PURE__ */ h$1("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-subtitle"] ? this.$slots["upload-file-subtitle"]({ file }) : ""))),
|
|
57855
57950
|
actionsNode
|
|
57856
57951
|
),
|
|
57857
57952
|
this.showProgress && /* @__PURE__ */ h$1("div", { class: `${clsPrefix}-upload-file-overlay` })
|
|
@@ -58018,6 +58113,9 @@ var _UUploadFileList = defineComponent({
|
|
|
58018
58113
|
const isPreviewListTypeRef = computed(
|
|
58019
58114
|
() => listTypeRef.value === "preview-list"
|
|
58020
58115
|
);
|
|
58116
|
+
const isPreviewCardTypeRef = computed(
|
|
58117
|
+
() => listTypeRef.value === "preview-card"
|
|
58118
|
+
);
|
|
58021
58119
|
const renderFileList = () => mergedFileListRef.value.map((file) => /* @__PURE__ */ h$1(
|
|
58022
58120
|
UUploadFile,
|
|
58023
58121
|
{
|
|
@@ -58055,6 +58153,7 @@ var _UUploadFileList = defineComponent({
|
|
|
58055
58153
|
class: [
|
|
58056
58154
|
`${mergedClsPrefix}-upload-file-list`,
|
|
58057
58155
|
isImageCardTypeRef.value && `${mergedClsPrefix}-upload-file-list--grid`,
|
|
58156
|
+
isPreviewCardTypeRef.value && `${mergedClsPrefix}-upload-file-list--preview-card-grid`,
|
|
58058
58157
|
fileListClassRef.value,
|
|
58059
58158
|
abstract ? themeClassRef?.value : void 0
|
|
58060
58159
|
],
|
|
@@ -58064,7 +58163,7 @@ var _UUploadFileList = defineComponent({
|
|
|
58064
58163
|
]
|
|
58065
58164
|
},
|
|
58066
58165
|
renderUploadFileList(),
|
|
58067
|
-
isPreviewListTypeRef.value && renderPreview(),
|
|
58166
|
+
(isPreviewListTypeRef.value || isPreviewCardTypeRef.value) && renderPreview(),
|
|
58068
58167
|
showTriggerRef.value && !maxReachedRef.value && isImageCardTypeRef.value && /* @__PURE__ */ h$1(_UUploadTrigger, null, slots)
|
|
58069
58168
|
);
|
|
58070
58169
|
};
|
|
@@ -58623,6 +58722,9 @@ var _UUpload = defineComponent({
|
|
|
58623
58722
|
containerSecondary,
|
|
58624
58723
|
brandPrimary300,
|
|
58625
58724
|
elementsQuaternary,
|
|
58725
|
+
previewCardWidth,
|
|
58726
|
+
previewCardHeight,
|
|
58727
|
+
previewCardBorderRadius,
|
|
58626
58728
|
[createKey$1("width", size)]: width
|
|
58627
58729
|
}
|
|
58628
58730
|
} = themeRef.value;
|
|
@@ -58654,7 +58756,10 @@ var _UUpload = defineComponent({
|
|
|
58654
58756
|
"--u-upload-dragger-width": width,
|
|
58655
58757
|
"--u-upload-info-bg-color": containerSecondary,
|
|
58656
58758
|
"--u-upload-preview-color": brandPrimary300,
|
|
58657
|
-
"--u-upload-empty-border-color": elementsQuaternary
|
|
58759
|
+
"--u-upload-empty-border-color": elementsQuaternary,
|
|
58760
|
+
"--u-upload-preview-card-width": previewCardWidth,
|
|
58761
|
+
"--u-upload-preview-card-height": previewCardHeight,
|
|
58762
|
+
"--u-upload-preview-card-border-radius": previewCardBorderRadius
|
|
58658
58763
|
};
|
|
58659
58764
|
});
|
|
58660
58765
|
const themeClassHandle = inlineThemeDisabled ? useThemeClass(
|
|
@@ -106484,7 +106589,7 @@ var ColumnSettingsDrawer = defineComponent({
|
|
|
106484
106589
|
{
|
|
106485
106590
|
class: `${mergedClsPrefixRef.value}-data-table-column-settings__item-title`
|
|
106486
106591
|
},
|
|
106487
|
-
() => row.title
|
|
106592
|
+
() => typeof row.title === "function" ? row.title() : row.title
|
|
106488
106593
|
)
|
|
106489
106594
|
]
|
|
106490
106595
|
);
|
|
@@ -106673,12 +106778,6 @@ var ColumnSettingsDrawer = defineComponent({
|
|
|
106673
106778
|
}
|
|
106674
106779
|
});
|
|
106675
106780
|
|
|
106676
|
-
var TableColumnType = /* @__PURE__ */(TableColumnType2 => {
|
|
106677
|
-
TableColumnType2["SELECTION"] = "selection";
|
|
106678
|
-
TableColumnType2["EXPAND"] = "expand";
|
|
106679
|
-
TableColumnType2["DRAGGABLE"] = "draggable";
|
|
106680
|
-
return TableColumnType2;
|
|
106681
|
-
})(TableColumnType || {});
|
|
106682
106781
|
const dataTableProps = {
|
|
106683
106782
|
...useTheme.props,
|
|
106684
106783
|
onUnstableColumnResize: Function,
|
|
@@ -106820,6 +106919,12 @@ const dataTableProps = {
|
|
|
106820
106919
|
onCheckedRowKeysChange: [Function, Array]
|
|
106821
106920
|
};
|
|
106822
106921
|
const dataTableInjectionKey = createInjectionKey("u-data-table");
|
|
106922
|
+
var TableColumnType = /* @__PURE__ */(TableColumnType2 => {
|
|
106923
|
+
TableColumnType2["SELECTION"] = "selection";
|
|
106924
|
+
TableColumnType2["EXPAND"] = "expand";
|
|
106925
|
+
TableColumnType2["DRAGGABLE"] = "draggable";
|
|
106926
|
+
return TableColumnType2;
|
|
106927
|
+
})(TableColumnType || {});
|
|
106823
106928
|
|
|
106824
106929
|
function renderBodyEmpty(deps) {
|
|
106825
106930
|
const {
|
|
@@ -110659,7 +110764,10 @@ function isConfigurableColumn(column) {
|
|
|
110659
110764
|
return column.visible !== false;
|
|
110660
110765
|
}
|
|
110661
110766
|
function toColumnTitle(column) {
|
|
110662
|
-
|
|
110767
|
+
if (column.settingsTitle !== void 0) return column.settingsTitle;
|
|
110768
|
+
const title = column.title;
|
|
110769
|
+
if (typeof title === "function") return () => title(column);
|
|
110770
|
+
return title ?? String(column.key);
|
|
110663
110771
|
}
|
|
110664
110772
|
function calcColumnsScrollX(columns, getResizableWidth) {
|
|
110665
110773
|
let total = 0;
|
|
@@ -110918,26 +111026,34 @@ function useGroupHeader(props, getResizableWidth) {
|
|
|
110918
111026
|
|
|
110919
111027
|
function useResizable() {
|
|
110920
111028
|
const resizableWidthsRef = ref({});
|
|
111029
|
+
const preferredWidthsRef = ref({});
|
|
110921
111030
|
function getResizableWidth(key) {
|
|
110922
111031
|
return resizableWidthsRef.value[key];
|
|
110923
111032
|
}
|
|
110924
111033
|
function doUpdateResizableWidth(column, width) {
|
|
110925
111034
|
if ("key" in column) {
|
|
111035
|
+
preferredWidthsRef.value[column.key] = width;
|
|
110926
111036
|
resizableWidthsRef.value[column.key] = width;
|
|
110927
111037
|
}
|
|
110928
111038
|
}
|
|
110929
111039
|
function setResizableWidths(widths) {
|
|
110930
111040
|
resizableWidthsRef.value = widths;
|
|
110931
111041
|
}
|
|
111042
|
+
function setPreferredWidths(widths) {
|
|
111043
|
+
preferredWidthsRef.value = widths;
|
|
111044
|
+
}
|
|
110932
111045
|
function clearResizableWidth() {
|
|
111046
|
+
preferredWidthsRef.value = {};
|
|
110933
111047
|
resizableWidthsRef.value = {};
|
|
110934
111048
|
}
|
|
110935
111049
|
return {
|
|
110936
111050
|
getResizableWidth,
|
|
110937
111051
|
doUpdateResizableWidth,
|
|
110938
111052
|
setResizableWidths,
|
|
111053
|
+
setPreferredWidths,
|
|
110939
111054
|
clearResizableWidth,
|
|
110940
|
-
resizableWidthsRef
|
|
111055
|
+
resizableWidthsRef,
|
|
111056
|
+
preferredWidthsRef
|
|
110941
111057
|
};
|
|
110942
111058
|
}
|
|
110943
111059
|
|
|
@@ -111983,15 +112099,15 @@ var _UDataTable = defineComponent({
|
|
|
111983
112099
|
clearResizableWidth,
|
|
111984
112100
|
doUpdateResizableWidth,
|
|
111985
112101
|
setResizableWidths,
|
|
111986
|
-
|
|
112102
|
+
setPreferredWidths,
|
|
112103
|
+
resizableWidthsRef,
|
|
112104
|
+
preferredWidthsRef
|
|
111987
112105
|
} = useResizable();
|
|
111988
112106
|
if (props.localStorageKey && props.resizableStorage !== false) {
|
|
111989
112107
|
const storedWidths = loadTableState(props.localStorageKey)?.columnWidths;
|
|
111990
112108
|
if (storedWidths && Object.keys(storedWidths).length > 0) {
|
|
111991
|
-
|
|
111992
|
-
|
|
111993
|
-
...storedWidths
|
|
111994
|
-
};
|
|
112109
|
+
setPreferredWidths({ ...storedWidths });
|
|
112110
|
+
setResizableWidths({ ...storedWidths });
|
|
111995
112111
|
}
|
|
111996
112112
|
}
|
|
111997
112113
|
const {
|
|
@@ -112150,7 +112266,7 @@ var _UDataTable = defineComponent({
|
|
|
112150
112266
|
watch(
|
|
112151
112267
|
() => props.localStorageKey ? {
|
|
112152
112268
|
key: props.localStorageKey,
|
|
112153
|
-
columnWidths:
|
|
112269
|
+
columnWidths: preferredWidthsRef.value,
|
|
112154
112270
|
columnsConfig: columnsConfigRef.value,
|
|
112155
112271
|
page: mergedPaginationRef.value?.page,
|
|
112156
112272
|
pageSize: mergedPaginationRef.value?.pageSize,
|
|
@@ -112225,23 +112341,23 @@ var _UDataTable = defineComponent({
|
|
|
112225
112341
|
systemMaxWidth: props.resizableMaxWidth
|
|
112226
112342
|
};
|
|
112227
112343
|
});
|
|
112228
|
-
function buildNonFixedModeWidthMap(
|
|
112344
|
+
function buildNonFixedModeWidthMap(preferredWidths, resizableColumns) {
|
|
112229
112345
|
const { systemMinWidth, systemMaxWidth } = widthConstraintSignalRef.value;
|
|
112230
112346
|
return {
|
|
112231
112347
|
keys: resizableColumns.map((column) => column.key),
|
|
112232
112348
|
widthMap: sanitizeColumnWidthMap(resizableColumns, {
|
|
112233
112349
|
systemMinWidth,
|
|
112234
112350
|
systemMaxWidth,
|
|
112235
|
-
source:
|
|
112351
|
+
source: preferredWidths
|
|
112236
112352
|
})
|
|
112237
112353
|
};
|
|
112238
112354
|
}
|
|
112239
|
-
function buildFixedModeWidthMap(visibleLeafColumns,
|
|
112355
|
+
function buildFixedModeWidthMap(visibleLeafColumns, sourceWidths) {
|
|
112240
112356
|
const { systemMinWidth, systemMaxWidth } = widthConstraintSignalRef.value;
|
|
112241
112357
|
const preferredWidths = sanitizeColumnWidthMap(visibleLeafColumns, {
|
|
112242
112358
|
systemMinWidth,
|
|
112243
112359
|
systemMaxWidth,
|
|
112244
|
-
source:
|
|
112360
|
+
source: sourceWidths
|
|
112245
112361
|
});
|
|
112246
112362
|
const containerWidth = containerWidthSignalRef.value;
|
|
112247
112363
|
if (containerWidth === void 0) {
|
|
@@ -112267,16 +112383,16 @@ var _UDataTable = defineComponent({
|
|
|
112267
112383
|
}
|
|
112268
112384
|
function reconcileResizableWidths(_reason) {
|
|
112269
112385
|
const visibleLeafColumns = visibleLeafColumnsSignalRef.value;
|
|
112270
|
-
const
|
|
112386
|
+
const preferredWidths = preferredWidthsRef.value;
|
|
112271
112387
|
if (!visibleLeafColumns.length || !resizableColumnPresentRef.value) {
|
|
112272
|
-
if (Object.keys(
|
|
112273
|
-
|
|
112388
|
+
if (Object.keys(resizableWidthsRef.value).length) {
|
|
112389
|
+
setResizableWidths({});
|
|
112274
112390
|
}
|
|
112275
112391
|
return;
|
|
112276
112392
|
}
|
|
112277
112393
|
if (modeSignalRef.value !== "fixed") {
|
|
112278
112394
|
const { widthMap, keys } = buildNonFixedModeWidthMap(
|
|
112279
|
-
|
|
112395
|
+
preferredWidths,
|
|
112280
112396
|
resizableColumnsSignalRef.value
|
|
112281
112397
|
);
|
|
112282
112398
|
syncResizableWidths(widthMap, keys);
|
|
@@ -112285,7 +112401,7 @@ var _UDataTable = defineComponent({
|
|
|
112285
112401
|
const visibleLeafKeys = visibleLeafColumns.map((column) => column.key);
|
|
112286
112402
|
const nextWidths = buildFixedModeWidthMap(
|
|
112287
112403
|
visibleLeafColumns,
|
|
112288
|
-
|
|
112404
|
+
preferredWidths
|
|
112289
112405
|
);
|
|
112290
112406
|
syncResizableWidths(nextWidths, visibleLeafKeys);
|
|
112291
112407
|
}
|
|
@@ -112316,7 +112432,7 @@ var _UDataTable = defineComponent({
|
|
|
112316
112432
|
}
|
|
112317
112433
|
);
|
|
112318
112434
|
watch(
|
|
112319
|
-
() =>
|
|
112435
|
+
() => preferredWidthsRef.value,
|
|
112320
112436
|
() => {
|
|
112321
112437
|
reconcileResizableWidths();
|
|
112322
112438
|
},
|
|
@@ -154903,7 +155019,7 @@ function useThemeVars() {
|
|
|
154903
155019
|
});
|
|
154904
155020
|
}
|
|
154905
155021
|
|
|
154906
|
-
var version = "2.4.
|
|
155022
|
+
var version = "2.4.4";
|
|
154907
155023
|
|
|
154908
155024
|
function create({
|
|
154909
155025
|
componentPrefix = "U",
|