@uzum-tech/ui 1.12.17 → 1.12.18
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 +88 -21
- package/dist/index.prod.js +3 -3
- package/es/data-table/src/DataTable.d.ts +2 -0
- package/es/data-table/src/DataTable.js +1 -0
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +3 -2
- package/es/data-table/src/TableParts/Cell.d.ts +2 -0
- package/es/data-table/src/TableParts/Cell.js +62 -9
- package/es/data-table/src/interface.d.ts +2 -0
- package/es/data-table/src/interface.js +1 -1
- package/es/header/src/Header.d.ts +12 -3
- package/es/header/src/Header.js +21 -5
- package/es/header/src/HeaderNavigation.d.ts +3 -1
- package/es/header/src/HeaderNavigation.js +6 -4
- package/es/header/src/interface.d.ts +1 -0
- package/es/header/src/utils.d.ts +1 -1
- package/es/header/src/utils.js +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/data-table/src/DataTable.d.ts +2 -0
- package/lib/data-table/src/DataTable.js +1 -0
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +3 -2
- package/lib/data-table/src/TableParts/Cell.d.ts +2 -0
- package/lib/data-table/src/TableParts/Cell.js +62 -9
- package/lib/data-table/src/interface.d.ts +2 -0
- package/lib/data-table/src/interface.js +1 -1
- package/lib/header/src/Header.d.ts +12 -3
- package/lib/header/src/Header.js +21 -5
- package/lib/header/src/HeaderNavigation.d.ts +3 -1
- package/lib/header/src/HeaderNavigation.js +6 -4
- package/lib/header/src/interface.d.ts +1 -0
- package/lib/header/src/utils.d.ts +1 -1
- package/lib/header/src/utils.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/volar.d.ts +22 -22
- package/web-types.json +31 -2
- package/README.md +0 -73
package/dist/index.js
CHANGED
|
@@ -63971,6 +63971,7 @@
|
|
|
63971
63971
|
},
|
|
63972
63972
|
scrollbarProps: Object,
|
|
63973
63973
|
renderCell: Function,
|
|
63974
|
+
defaultEmptyValue: [String, Function],
|
|
63974
63975
|
renderExpandIcon: Function,
|
|
63975
63976
|
spinProps: {
|
|
63976
63977
|
type: Object,
|
|
@@ -83477,7 +83478,8 @@
|
|
|
83477
83478
|
type: Object,
|
|
83478
83479
|
required: true
|
|
83479
83480
|
},
|
|
83480
|
-
renderCell: Function
|
|
83481
|
+
renderCell: Function,
|
|
83482
|
+
defaultEmptyValue: [String, Function]
|
|
83481
83483
|
},
|
|
83482
83484
|
render() {
|
|
83483
83485
|
const { isSummary, column, row, renderCell } = this;
|
|
@@ -83488,12 +83490,25 @@
|
|
|
83488
83490
|
const isEditable = typeof editable === "function" ? editable(row) : editable;
|
|
83489
83491
|
if (render && !isSummary) {
|
|
83490
83492
|
let cellValue = render(row, this.index);
|
|
83491
|
-
if (
|
|
83492
|
-
|
|
83493
|
-
|
|
83493
|
+
if (cellValue == null || cellValue === false) {
|
|
83494
|
+
const { defaultEmptyValue } = this;
|
|
83495
|
+
if (defaultEmptyValue !== void 0) {
|
|
83496
|
+
if (typeof defaultEmptyValue === "function") {
|
|
83497
|
+
cell = defaultEmptyValue();
|
|
83498
|
+
} else {
|
|
83499
|
+
cell = defaultEmptyValue;
|
|
83500
|
+
}
|
|
83501
|
+
} else {
|
|
83502
|
+
cell = "";
|
|
83503
|
+
}
|
|
83504
|
+
} else {
|
|
83505
|
+
if (mask && cellValue !== null && cellValue !== void 0) {
|
|
83506
|
+
if (typeof cellValue === "string" || typeof cellValue === "number") {
|
|
83507
|
+
cellValue = processMaskedValue(cellValue, mask);
|
|
83508
|
+
}
|
|
83494
83509
|
}
|
|
83510
|
+
cell = cellValue;
|
|
83495
83511
|
}
|
|
83496
|
-
cell = cellValue;
|
|
83497
83512
|
} else if (isEditable && !isSummary) {
|
|
83498
83513
|
const { placeholder } = column;
|
|
83499
83514
|
const rawValue = String(row[key] || "");
|
|
@@ -83603,16 +83618,42 @@
|
|
|
83603
83618
|
if (mask && cellValue !== null && cellValue !== void 0) {
|
|
83604
83619
|
cellValue = processMaskedValue(String(cellValue), mask);
|
|
83605
83620
|
}
|
|
83606
|
-
|
|
83621
|
+
if (cellValue === null || cellValue === void 0 || cellValue === false) {
|
|
83622
|
+
const { defaultEmptyValue } = this;
|
|
83623
|
+
if (defaultEmptyValue !== void 0) {
|
|
83624
|
+
if (typeof defaultEmptyValue === "function") {
|
|
83625
|
+
cell = defaultEmptyValue();
|
|
83626
|
+
} else {
|
|
83627
|
+
cell = defaultEmptyValue;
|
|
83628
|
+
}
|
|
83629
|
+
} else {
|
|
83630
|
+
cell = "";
|
|
83631
|
+
}
|
|
83632
|
+
} else {
|
|
83633
|
+
cell = String(cellValue);
|
|
83634
|
+
}
|
|
83607
83635
|
} else {
|
|
83608
83636
|
let cellValue = renderCell ? renderCell(get(row, key), row, column) : get(row, key);
|
|
83609
83637
|
if (cellValue && typeof cellValue === "object" && "type" in cellValue) {
|
|
83610
83638
|
cell = cellValue;
|
|
83611
83639
|
} else {
|
|
83612
|
-
if (
|
|
83613
|
-
|
|
83640
|
+
if (cellValue === null || cellValue === void 0 || cellValue === false) {
|
|
83641
|
+
const { defaultEmptyValue } = this;
|
|
83642
|
+
if (defaultEmptyValue !== void 0) {
|
|
83643
|
+
if (typeof defaultEmptyValue === "function") {
|
|
83644
|
+
cell = defaultEmptyValue();
|
|
83645
|
+
} else {
|
|
83646
|
+
cell = defaultEmptyValue;
|
|
83647
|
+
}
|
|
83648
|
+
} else {
|
|
83649
|
+
cell = "";
|
|
83650
|
+
}
|
|
83651
|
+
} else {
|
|
83652
|
+
if (mask && cellValue !== null && cellValue !== void 0) {
|
|
83653
|
+
cellValue = processMaskedValue(cellValue, mask);
|
|
83654
|
+
}
|
|
83655
|
+
cell = String(cellValue);
|
|
83614
83656
|
}
|
|
83615
|
-
cell = String(cellValue);
|
|
83616
83657
|
}
|
|
83617
83658
|
}
|
|
83618
83659
|
}
|
|
@@ -83977,6 +84018,7 @@
|
|
|
83977
84018
|
doCheck,
|
|
83978
84019
|
doUncheck,
|
|
83979
84020
|
renderCell,
|
|
84021
|
+
defaultEmptyValueRef,
|
|
83980
84022
|
emptyPropsRef
|
|
83981
84023
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
83982
84024
|
} = vue.inject(dataTableInjectionKey);
|
|
@@ -84252,6 +84294,7 @@
|
|
|
84252
84294
|
handleRadioUpdateChecked,
|
|
84253
84295
|
handleUpdateExpanded,
|
|
84254
84296
|
renderCell,
|
|
84297
|
+
defaultEmptyValueRef,
|
|
84255
84298
|
emptyPropsRef,
|
|
84256
84299
|
...exposedMethods
|
|
84257
84300
|
};
|
|
@@ -84606,6 +84649,7 @@
|
|
|
84606
84649
|
isSummary,
|
|
84607
84650
|
mergedTheme: mergedTheme2,
|
|
84608
84651
|
renderCell: this.renderCell,
|
|
84652
|
+
defaultEmptyValue: this.defaultEmptyValueRef,
|
|
84609
84653
|
onEdit: (value, row2, key) => {
|
|
84610
84654
|
this.$emit("edit", value, row2, key);
|
|
84611
84655
|
}
|
|
@@ -86643,6 +86687,7 @@
|
|
|
86643
86687
|
handleTableBodyScroll,
|
|
86644
86688
|
setHeaderScrollLeft,
|
|
86645
86689
|
renderCell: vue.toRef(props, "renderCell"),
|
|
86690
|
+
defaultEmptyValueRef: vue.toRef(props, "defaultEmptyValue"),
|
|
86646
86691
|
emptyPropsRef: vue.toRef(props, "emptyProps"),
|
|
86647
86692
|
handleEdit
|
|
86648
86693
|
});
|
|
@@ -125267,7 +125312,7 @@
|
|
|
125267
125312
|
}
|
|
125268
125313
|
function resolveTopLevelMenuKey(menuOptions, activeMenuKey) {
|
|
125269
125314
|
if (activeMenuKey === null || activeMenuKey === void 0) return null;
|
|
125270
|
-
for (let index = 0; index < menuOptions.length; index
|
|
125315
|
+
for (let index = 0; index < menuOptions.length; index++) {
|
|
125271
125316
|
const option = menuOptions[index];
|
|
125272
125317
|
const optionKey = getMenuItemKey(option, index);
|
|
125273
125318
|
if (optionKey === activeMenuKey) return optionKey;
|
|
@@ -125317,7 +125362,8 @@
|
|
|
125317
125362
|
default: null
|
|
125318
125363
|
},
|
|
125319
125364
|
"onUpdate:menuValue": [Function, Array],
|
|
125320
|
-
onUpdateMenuValue: [Function, Array]
|
|
125365
|
+
onUpdateMenuValue: [Function, Array],
|
|
125366
|
+
onUpdateActiveMenuKey: Function
|
|
125321
125367
|
};
|
|
125322
125368
|
var HeaderNavigation = vue.defineComponent({
|
|
125323
125369
|
name: "HeaderNavigation",
|
|
@@ -125334,7 +125380,7 @@
|
|
|
125334
125380
|
navRef.value = el;
|
|
125335
125381
|
};
|
|
125336
125382
|
const hoveredKeyRef = vue.ref(null);
|
|
125337
|
-
const activeMenuKeyRef = vue.toRef(props
|
|
125383
|
+
const activeMenuKeyRef = vue.toRef(props, "activeMenuKey");
|
|
125338
125384
|
const tabRefs = vue.ref({});
|
|
125339
125385
|
const indicatorStyleRef = vue.ref({
|
|
125340
125386
|
width: "0px",
|
|
@@ -125376,7 +125422,9 @@
|
|
|
125376
125422
|
if (_onUpdateMenuValue) call(_onUpdateMenuValue, value);
|
|
125377
125423
|
}
|
|
125378
125424
|
function setActiveMenuKey(key = null) {
|
|
125379
|
-
|
|
125425
|
+
if (props.onUpdateActiveMenuKey) {
|
|
125426
|
+
props.onUpdateActiveMenuKey(key);
|
|
125427
|
+
}
|
|
125380
125428
|
}
|
|
125381
125429
|
function handleMenuItemClick(option) {
|
|
125382
125430
|
setActiveMenuKey(option?.key);
|
|
@@ -125422,7 +125470,6 @@
|
|
|
125422
125470
|
setTabRef,
|
|
125423
125471
|
indicatorStyle: indicatorStyleRef,
|
|
125424
125472
|
hoveredKey: hoveredKeyRef,
|
|
125425
|
-
activeMenuKey: activeMenuKeyRef,
|
|
125426
125473
|
setActiveMenuKey,
|
|
125427
125474
|
handleMenuItemClick,
|
|
125428
125475
|
checkedTopMenuKey
|
|
@@ -126620,7 +126667,9 @@
|
|
|
126620
126667
|
},
|
|
126621
126668
|
onSearch: Function,
|
|
126622
126669
|
"onUpdate:menuValue": [Function, Array],
|
|
126623
|
-
onUpdateMenuValue: [Function, Array]
|
|
126670
|
+
onUpdateMenuValue: [Function, Array],
|
|
126671
|
+
"onUpdate:activeMenuKey": [Function, Array],
|
|
126672
|
+
onUpdateActiveMenuKey: [Function, Array]
|
|
126624
126673
|
};
|
|
126625
126674
|
var Header = vue.defineComponent({
|
|
126626
126675
|
name: "Header",
|
|
@@ -126633,7 +126682,8 @@
|
|
|
126633
126682
|
"language-select",
|
|
126634
126683
|
"logo-click",
|
|
126635
126684
|
"mobile-primary-action",
|
|
126636
|
-
"mobile-secondary-action"
|
|
126685
|
+
"mobile-secondary-action",
|
|
126686
|
+
"update:activeMenuKey"
|
|
126637
126687
|
],
|
|
126638
126688
|
setup(props, { emit }) {
|
|
126639
126689
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
@@ -126648,6 +126698,12 @@
|
|
|
126648
126698
|
const isMobileRef = vue.toRef(props, "isMobile");
|
|
126649
126699
|
const mobileMenuVisibleRef = vue.ref(false);
|
|
126650
126700
|
const searchVisibleRef = vue.ref(false);
|
|
126701
|
+
const controlledActiveMenuKeyRef = vue.toRef(props, "activeMenuKey");
|
|
126702
|
+
const uncontrolledActiveMenuKeyRef = vue.ref(null);
|
|
126703
|
+
const mergedActiveMenuKeyRef = useMergedState(
|
|
126704
|
+
controlledActiveMenuKeyRef,
|
|
126705
|
+
uncontrolledActiveMenuKeyRef
|
|
126706
|
+
);
|
|
126651
126707
|
vue.onBeforeMount(() => {
|
|
126652
126708
|
headerMobileMenuStyle.mount({
|
|
126653
126709
|
id: `${mergedClsPrefixRef.value}-header-mobile-menu`,
|
|
@@ -126798,6 +126854,14 @@
|
|
|
126798
126854
|
function handleLogoClick() {
|
|
126799
126855
|
emit("logo-click");
|
|
126800
126856
|
}
|
|
126857
|
+
function handleUpdateActiveMenuKey(value) {
|
|
126858
|
+
uncontrolledActiveMenuKeyRef.value = value;
|
|
126859
|
+
emit("update:activeMenuKey", value);
|
|
126860
|
+
const { onUpdateActiveMenuKey } = props;
|
|
126861
|
+
const { "onUpdate:activeMenuKey": _onUpdateActiveMenuKey } = props;
|
|
126862
|
+
if (onUpdateActiveMenuKey) call(onUpdateActiveMenuKey, value);
|
|
126863
|
+
if (_onUpdateActiveMenuKey) call(_onUpdateActiveMenuKey, value);
|
|
126864
|
+
}
|
|
126801
126865
|
return {
|
|
126802
126866
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
126803
126867
|
cssVars: cssVarsRef,
|
|
@@ -126808,6 +126872,9 @@
|
|
|
126808
126872
|
isMobile: isMobileRef,
|
|
126809
126873
|
mobileMenuVisible: mobileMenuVisibleRef,
|
|
126810
126874
|
searchVisible: searchVisibleRef,
|
|
126875
|
+
menuPaneClass,
|
|
126876
|
+
menuPaneWrapperClass,
|
|
126877
|
+
mergedActiveMenuKey: mergedActiveMenuKeyRef,
|
|
126811
126878
|
handleSelectLang,
|
|
126812
126879
|
handleMenuValueUpdate,
|
|
126813
126880
|
handleSearchClick,
|
|
@@ -126822,8 +126889,7 @@
|
|
|
126822
126889
|
handleMobileMenuItemClick,
|
|
126823
126890
|
handleMobilePrimaryAction,
|
|
126824
126891
|
handleMobileSecondaryAction,
|
|
126825
|
-
|
|
126826
|
-
menuPaneWrapperClass,
|
|
126892
|
+
handleUpdateActiveMenuKey,
|
|
126827
126893
|
onRender: themeClassHandle?.onRender
|
|
126828
126894
|
};
|
|
126829
126895
|
},
|
|
@@ -126870,8 +126936,9 @@
|
|
|
126870
126936
|
mergedClsPrefix,
|
|
126871
126937
|
menuPaneClass: this.menuPaneClass,
|
|
126872
126938
|
menuPaneWrapperClass: this.menuPaneWrapperClass,
|
|
126873
|
-
activeMenuKey: this.
|
|
126874
|
-
onUpdateMenuValue: this.handleMenuValueUpdate
|
|
126939
|
+
activeMenuKey: this.mergedActiveMenuKey,
|
|
126940
|
+
onUpdateMenuValue: this.handleMenuValueUpdate,
|
|
126941
|
+
onUpdateActiveMenuKey: this.handleUpdateActiveMenuKey
|
|
126875
126942
|
}
|
|
126876
126943
|
);
|
|
126877
126944
|
const mobileNode = this.responsive && this.isMobile ? /* @__PURE__ */ vue.h(
|
|
@@ -128660,7 +128727,7 @@
|
|
|
128660
128727
|
watermarkProps: watermarkProps
|
|
128661
128728
|
});
|
|
128662
128729
|
|
|
128663
|
-
var version = "1.12.
|
|
128730
|
+
var version = "1.12.18";
|
|
128664
128731
|
|
|
128665
128732
|
function useExposeProxy(targetRef) {
|
|
128666
128733
|
return new Proxy({}, {
|