@zeedhi/vuetify 3.2.0 → 3.3.0
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/zd-vuetify.css +25 -2
- package/dist/zd-vuetify.min.css +2 -2
- package/dist/zd-vuetify.min.js +12 -12
- package/dist/zd-vuetify.mjs +346 -123
- package/package.json +3 -3
- package/src/components/zd-component/ZdComponent.ts +15 -13
- package/src/components/zd-tabs/ZdTab.ts +40 -6
- package/src/components/zd-tabs/ZdTab.vue +16 -3
- package/src/components/zd-tabs/ZdTabItem.ts +2 -2
- package/src/components/zd-tabs/ZdTabItem.vue +1 -1
- package/src/components/zd-tabs/ZdTabs.ts +96 -2
- package/src/components/zd-tabs/ZdTabs.vue +46 -17
- package/types/components/tek-grid/TekGrid.d.ts +7258 -0
- package/types/components/tek-grid/TekGrid.ts.d.ts +7258 -0
- package/types/components/tek-grid/column-filter/TekGridColumnFilter.d.ts +129 -0
- package/types/components/tek-grid/column-filter/TekGridColumnFilter.ts.d.ts +129 -0
- package/types/components/tek-grid/column-header/TekGridHeaderRow.d.ts +225 -0
- package/types/components/tek-grid/column-header/TekGridHeaderRow.ts.d.ts +225 -0
- package/types/components/tek-grid/columns-button/TekGridColumnsButton.d.ts +2432 -0
- package/types/components/tek-grid/columns-button/TekGridColumnsButton.ts.d.ts +2432 -0
- package/types/components/tek-grid/columns-button/TekGridColumnsOptionsController.d.ts +65 -0
- package/types/components/tek-grid/columns-button/TekGridColumnsOptionsModal.d.ts +9 -0
- package/types/components/tek-grid/filter-button/TekGridFilterButton.d.ts +2920 -0
- package/types/components/tek-grid/filter-button/TekGridFilterButton.ts.d.ts +2920 -0
- package/types/components/tek-grid/indentation/TekGridIndentation.d.ts +32 -0
- package/types/components/tek-grid/indentation/TekGridIndentation.ts.d.ts +32 -0
- package/types/components/tek-grid/layout-options/TekGridLayoutOptions.d.ts +1892 -0
- package/types/components/tek-grid/layout-options/TekGridLayoutOptions.ts.d.ts +1892 -0
- package/types/components/tek-grid/row/TekGridFooterRow.d.ts +90 -0
- package/types/components/tek-grid/row/TekGridFooterRow.ts.d.ts +90 -0
- package/types/components/tek-grid/row/TekGridGroupRow.d.ts +87 -0
- package/types/components/tek-grid/row/TekGridGroupRow.ts.d.ts +87 -0
- package/types/components/tooltip-overflow/ZdTooltipOverflow.ts.d.ts +50 -0
- package/types/components/zd-activator-wrapper/ZdActivatorWrapper.ts.d.ts +25 -0
- package/types/components/zd-alert/ZdAlert.ts.d.ts +884 -0
- package/types/components/zd-badge/ZdBadge.ts.d.ts +624 -0
- package/types/components/zd-breadcrumbs/ZdBreadcrumbs.ts.d.ts +697 -0
- package/types/components/zd-button/ZdButton.ts.d.ts +1158 -0
- package/types/components/zd-button-group/ZdButtonGroup.ts.d.ts +785 -0
- package/types/components/zd-card/ZdCard.ts.d.ts +1028 -0
- package/types/components/zd-carousel/ZdCarousel.ts.d.ts +2007 -0
- package/types/components/zd-checkbox/ZdCheckbox.ts.d.ts +642 -0
- package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.ts.d.ts +2010 -0
- package/types/components/zd-chip/ZdChip.ts.d.ts +1256 -0
- package/types/components/zd-code-viewer/ZdCodeViewer.ts.d.ts +791 -0
- package/types/components/zd-col/ZdCol.ts.d.ts +741 -0
- package/types/components/zd-collapse-card/ZdCollapseCard.ts.d.ts +1583 -0
- package/types/components/zd-container/ZdContainer.ts.d.ts +722 -0
- package/types/components/zd-currency/ZdCurrency.ts.d.ts +2024 -0
- package/types/components/zd-date-input/ZdDateInput.ts.d.ts +960 -0
- package/types/components/zd-dialog/ZdDialog.ts.d.ts +262 -0
- package/types/components/zd-divider/ZdDivider.ts.d.ts +623 -0
- package/types/components/zd-dropdown/ZdDropdown.ts.d.ts +836 -0
- package/types/components/zd-footer/ZdFooter.ts.d.ts +1262 -0
- package/types/components/zd-form/ZdForm.ts.d.ts +118 -0
- package/types/components/zd-frame/ZdFrame.ts.d.ts +138 -0
- package/types/components/zd-frame-page/ZdFramePage.ts.d.ts +805 -0
- package/types/components/zd-grid/ZdGrid.ts.d.ts +7304 -0
- package/types/components/zd-grid/cell/ZdGridAction.ts.d.ts +14 -0
- package/types/components/zd-grid/cell/ZdGridCell.ts.d.ts +68 -0
- package/types/components/zd-grid/cell/ZdGridCellContent.ts.d.ts +58 -0
- package/types/components/zd-grid/cell/ZdGridCheckbox.ts.d.ts +53 -0
- package/types/components/zd-grid/column-header/ZdGridColumnHeader.ts.d.ts +112 -0
- package/types/components/zd-grid/column-header/ZdGridHeaderIcon.ts.d.ts +46 -0
- package/types/components/zd-grid/column-header/ZdGridHeaderRow.ts.d.ts +165 -0
- package/types/components/zd-grid/column-header/ZdGridSort.ts.d.ts +47 -0
- package/types/components/zd-grid/footer/ZdGridFooter.ts.d.ts +2087 -0
- package/types/components/zd-grid/helper/ZdGridHelper.ts.d.ts +16 -0
- package/types/components/zd-grid/row/TableRow.ts.d.ts +34 -0
- package/types/components/zd-grid/row/ZdGridRow.ts.d.ts +105 -0
- package/types/components/zd-grid/toolbar/ZdGridToolbar.ts.d.ts +2086 -0
- package/types/components/zd-grid-editable/ZdGridEditable.ts.d.ts +8663 -0
- package/types/components/zd-grid-editable/cell/ZdGridEditableCell.ts.d.ts +637 -0
- package/types/components/zd-grid-editable/row/ZdGridEditableRow.ts.d.ts +126 -0
- package/types/components/zd-header/ZdHeader.ts.d.ts +1320 -0
- package/types/components/zd-icon/ZdIcon.ts.d.ts +383 -0
- package/types/components/zd-image/ZdImage.ts.d.ts +753 -0
- package/types/components/zd-increment/ZdIncrement.ts.d.ts +2069 -0
- package/types/components/zd-iterable/ZdIterableNoData.ts.d.ts +2089 -0
- package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.ts.d.ts +1645 -0
- package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.ts.d.ts +1081 -0
- package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.ts.d.ts +2763 -0
- package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.ts.d.ts +1627 -0
- package/types/components/zd-iterable/zd-search/ZdSearch.ts.d.ts +766 -0
- package/types/components/zd-iterable-component-render/ZdIterableComponentRender.ts.d.ts +2484 -0
- package/types/components/zd-layout/ZdLayout.ts.d.ts +647 -0
- package/types/components/zd-list/ZdList.ts.d.ts +1140 -0
- package/types/components/zd-list/ZdListGroup.ts.d.ts +1332 -0
- package/types/components/zd-list/ZdListItem.ts.d.ts +848 -0
- package/types/components/zd-loading/ZdLoading.ts.d.ts +350 -0
- package/types/components/zd-login/ZdLogin.ts.d.ts +1072 -0
- package/types/components/zd-login/ZdLoginButton.ts.d.ts +1910 -0
- package/types/components/zd-main/ZdMain.ts.d.ts +619 -0
- package/types/components/zd-master-detail/ZdMasterDetail.ts.d.ts +684 -0
- package/types/components/zd-menu/ZdMenu.ts.d.ts +4484 -0
- package/types/components/zd-menu/ZdMenuButton.ts.d.ts +1142 -0
- package/types/components/zd-menu/ZdMenuGroup.ts.d.ts +6286 -0
- package/types/components/zd-menu/ZdMenuLink.ts.d.ts +10437 -0
- package/types/components/zd-menu/ZdMenuSeparator.ts.d.ts +600 -0
- package/types/components/zd-modal/ZdModal.ts.d.ts +10 -0
- package/types/components/zd-modal/ZdModalCloseButton.ts.d.ts +1137 -0
- package/types/components/zd-month/ZdMonth.ts.d.ts +2217 -0
- package/types/components/zd-number-input/ZdNumberInput.ts.d.ts +2021 -0
- package/types/components/zd-password/ZdPassword.ts.d.ts +2014 -0
- package/types/components/zd-progress/ZdProgress.ts.d.ts +859 -0
- package/types/components/zd-radio/ZdRadio.ts.d.ts +682 -0
- package/types/components/zd-row/ZdRow.ts.d.ts +734 -0
- package/types/components/zd-select/ZdSelect.ts.d.ts +313 -0
- package/types/components/zd-select-multiple/ZdSelectMultiple.ts.d.ts +333 -0
- package/types/components/zd-svg-map/ZdSvgMap.ts.d.ts +414 -0
- package/types/components/zd-switch/ZdSwitch.ts.d.ts +1918 -0
- package/types/components/zd-table/ZdTable.ts.d.ts +1092 -0
- package/types/components/zd-tabs/ZdTab.d.ts +4 -10
- package/types/components/zd-tabs/ZdTab.ts.d.ts +674 -0
- package/types/components/zd-tabs/ZdTabItem.d.ts +6 -6
- package/types/components/zd-tabs/ZdTabItem.ts.d.ts +268 -0
- package/types/components/zd-tabs/ZdTabs.d.ts +20 -1
- package/types/components/zd-tabs/ZdTabs.ts.d.ts +929 -0
- package/types/components/zd-tag/ZdTag.ts.d.ts +613 -0
- package/types/components/zd-text/ZdText.ts.d.ts +670 -0
- package/types/components/zd-text-input/ZdTextInput.ts.d.ts +746 -0
- package/types/components/zd-textarea/ZdTextarea.ts.d.ts +877 -0
- package/types/components/zd-time/ZdTime.ts.d.ts +2224 -0
- package/types/components/zd-tooltip/ZdTooltip.ts.d.ts +781 -0
- package/types/components/zd-tree/ZdTree.ts.d.ts +1878 -0
- package/types/components/zd-tree/ZdTreeAfterTitle.ts.d.ts +26 -0
- package/types/components/zd-tree/ZdTreeCheckbox.ts.d.ts +74 -0
- package/types/components/zd-tree-grid/ZdTreeGrid.ts.d.ts +4178 -0
- package/types/components/zd-tree-grid/cell/ZdTreeGridCell.ts.d.ts +92 -0
- package/types/components/zd-tree-grid/row/ZdTreeGridRow.ts.d.ts +124 -0
- package/types/composables/useTableLayout.d.ts +25 -0
- package/types/utils/isArrayOperation.d.ts +2 -0
package/dist/zd-vuetify.mjs
CHANGED
|
@@ -1316,7 +1316,7 @@ function useCreateInstance(props, ctx, ObjectClass, propsDefs = {}, checkParentT
|
|
|
1316
1316
|
explicitlyPassedProps[key] = props[key];
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
explicitlyPassedProps.
|
|
1319
|
+
delete explicitlyPassedProps.instanceObject;
|
|
1320
1320
|
const events = getInstanceEvents([props.events, props.instanceObject.events]);
|
|
1321
1321
|
const factoredEvents = Event$1.factory(events);
|
|
1322
1322
|
instanceObj = Object.assign(props.instanceObject, ctx.attrs, explicitlyPassedProps, {
|
|
@@ -1340,17 +1340,20 @@ function useCreateInstance(props, ctx, ObjectClass, propsDefs = {}, checkParentT
|
|
|
1340
1340
|
});
|
|
1341
1341
|
}
|
|
1342
1342
|
const instance = reactive(instanceObj);
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
(
|
|
1349
|
-
(
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1343
|
+
if (!createdFromObject) {
|
|
1344
|
+
Object.keys(props).forEach((key) => {
|
|
1345
|
+
var _a;
|
|
1346
|
+
if (!(key in instance)) return;
|
|
1347
|
+
if (typeof props[key] === "function") return;
|
|
1348
|
+
if (((_a = propsDefs[key]) == null ? void 0 : _a.watch) === false) return;
|
|
1349
|
+
watch(
|
|
1350
|
+
() => props[key],
|
|
1351
|
+
(value) => {
|
|
1352
|
+
instance[key] = value;
|
|
1353
|
+
}
|
|
1354
|
+
);
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1354
1357
|
addChild({ instance, props });
|
|
1355
1358
|
if (!createdFromObject) instance.onCreated();
|
|
1356
1359
|
useComponentLifeCycles(instance, createdFromObject, root2);
|
|
@@ -1514,7 +1517,7 @@ const alertComponent = defineComponent({
|
|
|
1514
1517
|
}
|
|
1515
1518
|
});
|
|
1516
1519
|
const _hoisted_1$F = { class: "zd-alert-wrapper" };
|
|
1517
|
-
const _hoisted_2$
|
|
1520
|
+
const _hoisted_2$m = ["innerHTML"];
|
|
1518
1521
|
function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1519
1522
|
const _component_v_btn = resolveComponent("v-btn");
|
|
1520
1523
|
const _component_v_snackbar = resolveComponent("v-snackbar");
|
|
@@ -1555,7 +1558,7 @@ function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1555
1558
|
default: withCtx(() => [
|
|
1556
1559
|
createElementVNode("span", {
|
|
1557
1560
|
innerHTML: _ctx.$sanitize(_ctx.$t(alert.text))
|
|
1558
|
-
}, null, 8, _hoisted_2$
|
|
1561
|
+
}, null, 8, _hoisted_2$m),
|
|
1559
1562
|
(openBlock(true), createElementBlock(Fragment, null, renderList(alert.buttonsSlot, (btn, buttonIndex) => {
|
|
1560
1563
|
return openBlock(), createBlock(resolveDynamicComponent(btn.component), mergeProps({
|
|
1561
1564
|
class: "zd-alert-buttons",
|
|
@@ -4165,8 +4168,8 @@ const carouselComponent = defineComponent({
|
|
|
4165
4168
|
}
|
|
4166
4169
|
});
|
|
4167
4170
|
const _hoisted_1$C = ["id"];
|
|
4168
|
-
const _hoisted_2$
|
|
4169
|
-
const _hoisted_3$
|
|
4171
|
+
const _hoisted_2$l = { class: "prev-button" };
|
|
4172
|
+
const _hoisted_3$a = { class: "next-button" };
|
|
4170
4173
|
const _hoisted_4$5 = {
|
|
4171
4174
|
key: 2,
|
|
4172
4175
|
class: "progress-bar"
|
|
@@ -4230,7 +4233,7 @@ function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4230
4233
|
addons: withCtx(() => [
|
|
4231
4234
|
createVNode(_component_Navigation, null, {
|
|
4232
4235
|
prev: withCtx(() => [
|
|
4233
|
-
withDirectives(createElementVNode("div", _hoisted_2$
|
|
4236
|
+
withDirectives(createElementVNode("div", _hoisted_2$l, [
|
|
4234
4237
|
renderSlot(_ctx.$slots, "prevButton", {}, () => [
|
|
4235
4238
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.instance.prevButton.component), normalizeProps(guardReactiveProps(_ctx.instance.prevButton)), null, 16))
|
|
4236
4239
|
])
|
|
@@ -4239,7 +4242,7 @@ function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4239
4242
|
])
|
|
4240
4243
|
]),
|
|
4241
4244
|
next: withCtx(() => [
|
|
4242
|
-
withDirectives(createElementVNode("div", _hoisted_3$
|
|
4245
|
+
withDirectives(createElementVNode("div", _hoisted_3$a, [
|
|
4243
4246
|
renderSlot(_ctx.$slots, "nextButton", {}, () => [
|
|
4244
4247
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.instance.nextButton.component), normalizeProps(guardReactiveProps(_ctx.instance.nextButton)), null, 16))
|
|
4245
4248
|
])
|
|
@@ -4505,7 +4508,7 @@ const _sfc_main$u = defineComponent({
|
|
|
4505
4508
|
}
|
|
4506
4509
|
});
|
|
4507
4510
|
const _hoisted_1$B = ["id"];
|
|
4508
|
-
const _hoisted_2$
|
|
4511
|
+
const _hoisted_2$k = { class: "zd-checkbox-label" };
|
|
4509
4512
|
function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4510
4513
|
var _a;
|
|
4511
4514
|
const _component_v_checkbox = resolveComponent("v-checkbox");
|
|
@@ -4520,7 +4523,7 @@ function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4520
4523
|
}
|
|
4521
4524
|
])
|
|
4522
4525
|
}, [
|
|
4523
|
-
createElementVNode("div", _hoisted_2$
|
|
4526
|
+
createElementVNode("div", _hoisted_2$k, toDisplayString(_ctx.$t(_ctx.instance.label)), 1),
|
|
4524
4527
|
createElementVNode("div", {
|
|
4525
4528
|
class: normalizeClass({
|
|
4526
4529
|
"zd-checkbox-horizontal": !_ctx.instance.vertical,
|
|
@@ -6580,12 +6583,12 @@ const codeViewerComponent = defineComponent({
|
|
|
6580
6583
|
}
|
|
6581
6584
|
});
|
|
6582
6585
|
const _hoisted_1$z = ["id"];
|
|
6583
|
-
const _hoisted_2$
|
|
6586
|
+
const _hoisted_2$j = {
|
|
6584
6587
|
key: 0,
|
|
6585
6588
|
class: "zd-code-viewer-line-numbers",
|
|
6586
6589
|
"aria-hidden": "true"
|
|
6587
6590
|
};
|
|
6588
|
-
const _hoisted_3$
|
|
6591
|
+
const _hoisted_3$9 = { class: "zd-code-viewer-code" };
|
|
6589
6592
|
const _hoisted_4$4 = ["innerHTML"];
|
|
6590
6593
|
const _hoisted_5$4 = { class: "zd-code-viewer-clipboard-button" };
|
|
6591
6594
|
function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -6615,7 +6618,7 @@ function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6615
6618
|
createElementVNode("div", {
|
|
6616
6619
|
class: normalizeClass(["zd-code-viewer-container", { "line-numbers": _ctx.instance.showLineNumbers }])
|
|
6617
6620
|
}, [
|
|
6618
|
-
_ctx.instance.showLineNumbers ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
6621
|
+
_ctx.instance.showLineNumbers ? (openBlock(), createElementBlock("div", _hoisted_2$j, [
|
|
6619
6622
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.lineNumbersCount, (line) => {
|
|
6620
6623
|
return openBlock(), createElementBlock("div", {
|
|
6621
6624
|
class: "zd-code-viewer-line-number token comment",
|
|
@@ -6623,7 +6626,7 @@ function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6623
6626
|
}, toDisplayString(line), 1);
|
|
6624
6627
|
}), 128))
|
|
6625
6628
|
])) : createCommentVNode("", true),
|
|
6626
|
-
createElementVNode("div", _hoisted_3$
|
|
6629
|
+
createElementVNode("div", _hoisted_3$9, [
|
|
6627
6630
|
createElementVNode("pre", {
|
|
6628
6631
|
innerHTML: _ctx.$sanitize(_ctx.instance.getHighlightedCode()),
|
|
6629
6632
|
class: normalizeClass(`language-${_ctx.instance.language}`),
|
|
@@ -8484,12 +8487,12 @@ const _hoisted_1$y = {
|
|
|
8484
8487
|
key: 0,
|
|
8485
8488
|
class: "zd-footer-slot-left"
|
|
8486
8489
|
};
|
|
8487
|
-
const _hoisted_2$
|
|
8490
|
+
const _hoisted_2$i = {
|
|
8488
8491
|
key: 1,
|
|
8489
8492
|
class: "zd-footer-slot-center",
|
|
8490
8493
|
ref: "centerSlot"
|
|
8491
8494
|
};
|
|
8492
|
-
const _hoisted_3$
|
|
8495
|
+
const _hoisted_3$8 = {
|
|
8493
8496
|
key: 2,
|
|
8494
8497
|
class: "zd-footer-slot-right"
|
|
8495
8498
|
};
|
|
@@ -8538,7 +8541,7 @@ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8538
8541
|
}), 128)) : createCommentVNode("", true),
|
|
8539
8542
|
renderSlot(_ctx.$slots, "leftSlot")
|
|
8540
8543
|
])) : createCommentVNode("", true),
|
|
8541
|
-
_ctx.instance.centerSlot.length || !!_ctx.$slots.centerSlot ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
8544
|
+
_ctx.instance.centerSlot.length || !!_ctx.$slots.centerSlot ? (openBlock(), createElementBlock("span", _hoisted_2$i, [
|
|
8542
8545
|
!_ctx.$slots.centerSlot ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.instance.centerSlot, (child) => {
|
|
8543
8546
|
return openBlock(), createBlock(resolveDynamicComponent(child.component), mergeProps({ ref_for: true }, child, {
|
|
8544
8547
|
key: child.name,
|
|
@@ -8547,7 +8550,7 @@ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8547
8550
|
}), 128)) : createCommentVNode("", true),
|
|
8548
8551
|
renderSlot(_ctx.$slots, "centerSlot")
|
|
8549
8552
|
], 512)) : createCommentVNode("", true),
|
|
8550
|
-
_ctx.instance.rightSlot.length || !!_ctx.$slots.rightSlot ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
8553
|
+
_ctx.instance.rightSlot.length || !!_ctx.$slots.rightSlot ? (openBlock(), createElementBlock("span", _hoisted_3$8, [
|
|
8551
8554
|
!_ctx.$slots.rightSlot ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.instance.rightSlot, (child) => {
|
|
8552
8555
|
return openBlock(), createBlock(resolveDynamicComponent(child.component), mergeProps({ ref_for: true }, child, {
|
|
8553
8556
|
key: child.name,
|
|
@@ -12488,7 +12491,7 @@ const gridEditableComponent = defineComponent({
|
|
|
12488
12491
|
}
|
|
12489
12492
|
});
|
|
12490
12493
|
const _hoisted_1$w = ["colspan"];
|
|
12491
|
-
const _hoisted_2$
|
|
12494
|
+
const _hoisted_2$h = ["colspan"];
|
|
12492
12495
|
function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12493
12496
|
const _component_zd_grid_toolbar = resolveComponent("zd-grid-toolbar");
|
|
12494
12497
|
const _component_zd_grid_header_row = resolveComponent("zd-grid-header-row");
|
|
@@ -12609,7 +12612,7 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12609
12612
|
createElementVNode("td", {
|
|
12610
12613
|
colspan: headers.length,
|
|
12611
12614
|
style: normalizeStyle(`padding-top:${_ctx.scrollData.endHeight}px`)
|
|
12612
|
-
}, null, 12, _hoisted_2$
|
|
12615
|
+
}, null, 12, _hoisted_2$h)
|
|
12613
12616
|
])
|
|
12614
12617
|
]),
|
|
12615
12618
|
key: "1"
|
|
@@ -12786,13 +12789,13 @@ const _sfc_main$s = defineComponent({
|
|
|
12786
12789
|
}
|
|
12787
12790
|
});
|
|
12788
12791
|
const _hoisted_1$v = ["tabindex"];
|
|
12789
|
-
const _hoisted_2$
|
|
12792
|
+
const _hoisted_2$g = {
|
|
12790
12793
|
key: 0,
|
|
12791
12794
|
class: /* @__PURE__ */ normalizeClass([
|
|
12792
12795
|
"zd-grid-editable__cell-content"
|
|
12793
12796
|
])
|
|
12794
12797
|
};
|
|
12795
|
-
const _hoisted_3$
|
|
12798
|
+
const _hoisted_3$7 = {
|
|
12796
12799
|
key: 1,
|
|
12797
12800
|
class: "zd-grid__edit-icon"
|
|
12798
12801
|
};
|
|
@@ -12840,13 +12843,13 @@ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12840
12843
|
onDblclick: _cache[6] || (_cache[6] = (...args) => _ctx.dblclick && _ctx.dblclick(...args))
|
|
12841
12844
|
}, [
|
|
12842
12845
|
renderSlot(_ctx.$slots, "prepend"),
|
|
12843
|
-
_ctx.column.type !== "action" ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
12846
|
+
_ctx.column.type !== "action" ? (openBlock(), createElementBlock("span", _hoisted_2$g, [
|
|
12844
12847
|
_ctx.column.loading ? (openBlock(), createBlock(_component_v_skeleton_loader, {
|
|
12845
12848
|
key: 0,
|
|
12846
12849
|
loading: "",
|
|
12847
12850
|
type: "text"
|
|
12848
12851
|
})) : createCommentVNode("", true),
|
|
12849
|
-
_ctx.editable && _ctx.edited ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
12852
|
+
_ctx.editable && _ctx.edited ? (openBlock(), createElementBlock("span", _hoisted_3$7, [
|
|
12850
12853
|
_ctx.valid ? (openBlock(), createBlock(_component_v_icon, {
|
|
12851
12854
|
key: 0,
|
|
12852
12855
|
color: "primary"
|
|
@@ -13317,7 +13320,7 @@ function useGridInstance({
|
|
|
13317
13320
|
};
|
|
13318
13321
|
}
|
|
13319
13322
|
const _hoisted_1$u = ["colspan"];
|
|
13320
|
-
const _hoisted_2$
|
|
13323
|
+
const _hoisted_2$f = ["colspan"];
|
|
13321
13324
|
function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13322
13325
|
const _component_zd_grid_toolbar = resolveComponent("zd-grid-toolbar");
|
|
13323
13326
|
const _component_zd_grid_header_row = resolveComponent("zd-grid-header-row");
|
|
@@ -13437,7 +13440,7 @@ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13437
13440
|
createElementVNode("td", {
|
|
13438
13441
|
colspan: headers.length,
|
|
13439
13442
|
style: normalizeStyle(`padding-top:${_ctx.scrollData.endHeight}px`)
|
|
13440
|
-
}, null, 12, _hoisted_2$
|
|
13443
|
+
}, null, 12, _hoisted_2$f)
|
|
13441
13444
|
])
|
|
13442
13445
|
]),
|
|
13443
13446
|
key: "1"
|
|
@@ -14429,7 +14432,7 @@ const _sfc_main$f = defineComponent({
|
|
|
14429
14432
|
}
|
|
14430
14433
|
});
|
|
14431
14434
|
const _hoisted_1$m = ["id"];
|
|
14432
|
-
const _hoisted_2$
|
|
14435
|
+
const _hoisted_2$e = { class: "zd-grid__toolbar-content" };
|
|
14433
14436
|
function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14434
14437
|
return _ctx.instance.toolbarSlot.length || _ctx.hasDefaultSlot ? (openBlock(), createElementBlock("div", {
|
|
14435
14438
|
key: 0,
|
|
@@ -14437,7 +14440,7 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14437
14440
|
ref: "header",
|
|
14438
14441
|
class: "zd-grid__toolbar"
|
|
14439
14442
|
}, [
|
|
14440
|
-
createElementVNode("div", _hoisted_2$
|
|
14443
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
14441
14444
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.toolbarSlot, (child) => {
|
|
14442
14445
|
return openBlock(), createBlock(resolveDynamicComponent(child.component), mergeProps({
|
|
14443
14446
|
key: child.name,
|
|
@@ -14541,12 +14544,12 @@ const _hoisted_1$l = {
|
|
|
14541
14544
|
key: 0,
|
|
14542
14545
|
class: "zd-header-slot-left"
|
|
14543
14546
|
};
|
|
14544
|
-
const _hoisted_2$
|
|
14547
|
+
const _hoisted_2$d = {
|
|
14545
14548
|
key: 1,
|
|
14546
14549
|
class: "zd-header-slot-center",
|
|
14547
14550
|
ref: "centerSlot"
|
|
14548
14551
|
};
|
|
14549
|
-
const _hoisted_3$
|
|
14552
|
+
const _hoisted_3$6 = {
|
|
14550
14553
|
key: 2,
|
|
14551
14554
|
class: "zd-header-slot-right"
|
|
14552
14555
|
};
|
|
@@ -14601,7 +14604,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14601
14604
|
}), 128)) : createCommentVNode("", true),
|
|
14602
14605
|
renderSlot(_ctx.$slots, "leftSlot")
|
|
14603
14606
|
])) : createCommentVNode("", true),
|
|
14604
|
-
_ctx.instance.centerSlot.length || !!_ctx.$slots.centerSlot ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
14607
|
+
_ctx.instance.centerSlot.length || !!_ctx.$slots.centerSlot ? (openBlock(), createElementBlock("span", _hoisted_2$d, [
|
|
14605
14608
|
!_ctx.$slots.centerSlot ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.instance.centerSlot, (child, index2) => {
|
|
14606
14609
|
return openBlock(), createElementBlock("span", {
|
|
14607
14610
|
key: child.name,
|
|
@@ -14612,7 +14615,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14612
14615
|
}), 128)) : createCommentVNode("", true),
|
|
14613
14616
|
renderSlot(_ctx.$slots, "centerSlot")
|
|
14614
14617
|
], 512)) : createCommentVNode("", true),
|
|
14615
|
-
_ctx.instance.rightSlot.length || !!_ctx.$slots.rightSlot ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
14618
|
+
_ctx.instance.rightSlot.length || !!_ctx.$slots.rightSlot ? (openBlock(), createElementBlock("span", _hoisted_3$6, [
|
|
14616
14619
|
!_ctx.$slots.rightSlot ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.instance.rightSlot, (child, index2) => {
|
|
14617
14620
|
return openBlock(), createElementBlock("span", {
|
|
14618
14621
|
key: child.name,
|
|
@@ -14989,11 +14992,11 @@ const iterableComponentRender = defineComponent({
|
|
|
14989
14992
|
}
|
|
14990
14993
|
});
|
|
14991
14994
|
const _hoisted_1$j = ["id"];
|
|
14992
|
-
const _hoisted_2$
|
|
14995
|
+
const _hoisted_2$c = {
|
|
14993
14996
|
key: 0,
|
|
14994
14997
|
class: "zd-iterable-toolbar"
|
|
14995
14998
|
};
|
|
14996
|
-
const _hoisted_3$
|
|
14999
|
+
const _hoisted_3$5 = { class: "zd-iterable-toolbar-slot" };
|
|
14997
15000
|
const _hoisted_4$2 = { class: "zd-iterable-content" };
|
|
14998
15001
|
const _hoisted_5$2 = { class: "zd-display-flex zd-flex-wrap" };
|
|
14999
15002
|
const _hoisted_6$2 = {
|
|
@@ -15021,8 +15024,8 @@ function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15021
15024
|
..._ctx.$styleObject(_ctx.instance.cssStyle)
|
|
15022
15025
|
})
|
|
15023
15026
|
}, [
|
|
15024
|
-
_ctx.instance.toolbarSlot.length || !!_ctx.$slots.toolbarSlot ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
15025
|
-
createElementVNode("div", _hoisted_3$
|
|
15027
|
+
_ctx.instance.toolbarSlot.length || !!_ctx.$slots.toolbarSlot ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
|
|
15028
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
15026
15029
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.toolbarSlot, (child) => {
|
|
15027
15030
|
return openBlock(), createBlock(resolveDynamicComponent(child.component), mergeProps({
|
|
15028
15031
|
key: child.name,
|
|
@@ -15109,7 +15112,7 @@ const _sfc_main$d = defineComponent({
|
|
|
15109
15112
|
}
|
|
15110
15113
|
});
|
|
15111
15114
|
const _hoisted_1$i = ["id"];
|
|
15112
|
-
const _hoisted_2$
|
|
15115
|
+
const _hoisted_2$b = {
|
|
15113
15116
|
key: 1,
|
|
15114
15117
|
class: "error--text"
|
|
15115
15118
|
};
|
|
@@ -15125,7 +15128,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15125
15128
|
parent: _ctx.instance
|
|
15126
15129
|
}, { ref_for: true }, child), null, 16, ["parent"]);
|
|
15127
15130
|
}), 128)) : createCommentVNode("", true),
|
|
15128
|
-
_ctx.instance.errorSlot.length === 0 && !_ctx.hasErrorSlot ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
15131
|
+
_ctx.instance.errorSlot.length === 0 && !_ctx.hasErrorSlot ? (openBlock(), createElementBlock("span", _hoisted_2$b, toDisplayString(_ctx.$t(_ctx.instance.datasource.error)), 1)) : createCommentVNode("", true)
|
|
15129
15132
|
], 64)) : !_ctx.instance.datasource.data.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
15130
15133
|
_ctx.instance.datasource.search ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
15131
15134
|
renderSlot(_ctx.$slots, "noResultSlot"),
|
|
@@ -16051,7 +16054,7 @@ const _hoisted_1$g = {
|
|
|
16051
16054
|
key: 0,
|
|
16052
16055
|
class: "v-list-item__icon"
|
|
16053
16056
|
};
|
|
16054
|
-
const _hoisted_2$
|
|
16057
|
+
const _hoisted_2$a = {
|
|
16055
16058
|
key: 0,
|
|
16056
16059
|
class: "v-list-item__icon"
|
|
16057
16060
|
};
|
|
@@ -16086,7 +16089,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16086
16089
|
])) : createCommentVNode("", true)
|
|
16087
16090
|
]),
|
|
16088
16091
|
append: withCtx(() => [
|
|
16089
|
-
_ctx.instance.rightField || _ctx.instance.appendIcon ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
16092
|
+
_ctx.instance.rightField || _ctx.instance.appendIcon ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
|
|
16090
16093
|
_ctx.instance.rightField ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.instance.rightField.component), mergeProps({ key: 0 }, _ctx.instance.rightField, { parent: _ctx.instance }), null, 16, ["parent"])) : _ctx.instance.appendIcon ? (openBlock(), createBlock(_component_v_icon, { key: 1 }, {
|
|
16091
16094
|
default: withCtx(() => [
|
|
16092
16095
|
createTextVNode(toDisplayString(_ctx.$getIcon(_ctx.instance.appendIcon)), 1)
|
|
@@ -16161,11 +16164,11 @@ const _hoisted_1$f = {
|
|
|
16161
16164
|
ref: "root",
|
|
16162
16165
|
class: "test"
|
|
16163
16166
|
};
|
|
16164
|
-
const _hoisted_2$
|
|
16167
|
+
const _hoisted_2$9 = {
|
|
16165
16168
|
key: 0,
|
|
16166
16169
|
class: "center-div"
|
|
16167
16170
|
};
|
|
16168
|
-
const _hoisted_3$
|
|
16171
|
+
const _hoisted_3$4 = ["innerHTML"];
|
|
16169
16172
|
function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16170
16173
|
const _component_v_progress_circular = resolveComponent("v-progress-circular");
|
|
16171
16174
|
const _component_v_img = resolveComponent("v-img");
|
|
@@ -16183,7 +16186,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16183
16186
|
theme: _ctx.loading.theme
|
|
16184
16187
|
}, {
|
|
16185
16188
|
default: withCtx(() => [
|
|
16186
|
-
_ctx.loading.isVisible ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
16189
|
+
_ctx.loading.isVisible ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
|
|
16187
16190
|
!_ctx.image ? (openBlock(), createBlock(_component_v_progress_circular, {
|
|
16188
16191
|
key: 0,
|
|
16189
16192
|
indeterminate: "",
|
|
@@ -16200,7 +16203,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16200
16203
|
innerHTML: _ctx.$sanitize(_ctx.$t(_ctx.loading.text)),
|
|
16201
16204
|
class: "zd-loading__text",
|
|
16202
16205
|
style: normalizeStyle("color: " + _ctx.textColor + ";")
|
|
16203
|
-
}, null, 12, _hoisted_3$
|
|
16206
|
+
}, null, 12, _hoisted_3$4)
|
|
16204
16207
|
])) : createCommentVNode("", true)
|
|
16205
16208
|
]),
|
|
16206
16209
|
_: 1
|
|
@@ -16273,8 +16276,8 @@ const loginComponent = defineComponent({
|
|
|
16273
16276
|
}
|
|
16274
16277
|
});
|
|
16275
16278
|
const _hoisted_1$e = ["id", "name"];
|
|
16276
|
-
const _hoisted_2$
|
|
16277
|
-
const _hoisted_3$
|
|
16279
|
+
const _hoisted_2$8 = { class: "zd-login-toolbar" };
|
|
16280
|
+
const _hoisted_3$3 = ["src"];
|
|
16278
16281
|
const _hoisted_4$1 = { class: "zd-login-message" };
|
|
16279
16282
|
const _hoisted_5$1 = {
|
|
16280
16283
|
key: 0,
|
|
@@ -16319,11 +16322,11 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16319
16322
|
light: _ctx.instance.light
|
|
16320
16323
|
}, {
|
|
16321
16324
|
default: withCtx(() => [
|
|
16322
|
-
createElementVNode("div", _hoisted_2$
|
|
16325
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
16323
16326
|
createElementVNode("img", {
|
|
16324
16327
|
class: "zd-login-logo",
|
|
16325
16328
|
src: _ctx.instance.logo
|
|
16326
|
-
}, null, 8, _hoisted_3$
|
|
16329
|
+
}, null, 8, _hoisted_3$3),
|
|
16327
16330
|
createElementVNode("div", _hoisted_4$1, toDisplayString(_ctx.$t(_ctx.instance.logoMessage)), 1)
|
|
16328
16331
|
]),
|
|
16329
16332
|
createVNode(_component_v_form, null, {
|
|
@@ -16813,7 +16816,7 @@ const menuComponent = defineComponent({
|
|
|
16813
16816
|
}
|
|
16814
16817
|
});
|
|
16815
16818
|
const _hoisted_1$c = ["id"];
|
|
16816
|
-
const _hoisted_2$
|
|
16819
|
+
const _hoisted_2$7 = {
|
|
16817
16820
|
key: 0,
|
|
16818
16821
|
class: "zd-menu-top-slot"
|
|
16819
16822
|
};
|
|
@@ -16872,7 +16875,7 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16872
16875
|
theme: _ctx.menuTheme
|
|
16873
16876
|
}, {
|
|
16874
16877
|
default: withCtx(() => [
|
|
16875
|
-
_ctx.instance.topSlot.length || _ctx.instance.showSearch || !!_ctx.$slots.topSlot ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$
|
|
16878
|
+
_ctx.instance.topSlot.length || _ctx.instance.showSearch || !!_ctx.$slots.topSlot ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$7, [
|
|
16876
16879
|
_ctx.instance.showSearch ? (openBlock(), createBlock(_component_zd_text_input, normalizeProps(mergeProps({ key: 0 }, _ctx.searchInputProps)), null, 16)) : createCommentVNode("", true),
|
|
16877
16880
|
!_ctx.$slots.topSlot ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.instance.topSlot, (item, i) => {
|
|
16878
16881
|
return openBlock(), createBlock(resolveDynamicComponent(item.component), mergeProps({
|
|
@@ -18695,7 +18698,7 @@ const selectMultipleComponent = defineComponent({
|
|
|
18695
18698
|
}
|
|
18696
18699
|
});
|
|
18697
18700
|
const _hoisted_1$a = { class: "chip-text" };
|
|
18698
|
-
const _hoisted_2$
|
|
18701
|
+
const _hoisted_2$6 = {
|
|
18699
18702
|
key: 1,
|
|
18700
18703
|
class: "more-items grey--text caption"
|
|
18701
18704
|
};
|
|
@@ -18843,7 +18846,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18843
18846
|
]),
|
|
18844
18847
|
_: 2
|
|
18845
18848
|
}, 1032, ["size", "disabled", "density", "onClick:close"])) : createCommentVNode("", true),
|
|
18846
|
-
_ctx.isMoreVisible(index2) ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
18849
|
+
_ctx.isMoreVisible(index2) ? (openBlock(), createElementBlock("span", _hoisted_2$6, toDisplayString(_ctx.moreItemsText), 1)) : createCommentVNode("", true)
|
|
18847
18850
|
]),
|
|
18848
18851
|
"append-item": withCtx(() => [
|
|
18849
18852
|
_ctx.instance.itemAfterSlot.length || _ctx.hasItemAfterSlot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -19539,7 +19542,7 @@ const _sfc_main$5 = defineComponent({
|
|
|
19539
19542
|
}
|
|
19540
19543
|
});
|
|
19541
19544
|
const _hoisted_1$9 = ["id", "name"];
|
|
19542
|
-
const _hoisted_2$
|
|
19545
|
+
const _hoisted_2$5 = {
|
|
19543
19546
|
class: "zd-svg-map__container",
|
|
19544
19547
|
ref: "container"
|
|
19545
19548
|
};
|
|
@@ -19573,7 +19576,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19573
19576
|
onMouseenter: _cache[1] || (_cache[1] = ($event) => _ctx.mouseenter($event)),
|
|
19574
19577
|
onMouseleave: _cache[2] || (_cache[2] = ($event) => _ctx.mouseleave($event))
|
|
19575
19578
|
}, [
|
|
19576
|
-
createElementVNode("div", _hoisted_2$
|
|
19579
|
+
createElementVNode("div", _hoisted_2$5, null, 512),
|
|
19577
19580
|
_ctx.instance.tooltipData && _ctx.tooltipContent ? withDirectives((openBlock(), createBlock(_component_v_card, {
|
|
19578
19581
|
key: 0,
|
|
19579
19582
|
class: "zd-svg-map__tooltip",
|
|
@@ -19715,8 +19718,8 @@ const tableComponent = defineComponent({
|
|
|
19715
19718
|
}
|
|
19716
19719
|
});
|
|
19717
19720
|
const _hoisted_1$8 = ["id"];
|
|
19718
|
-
const _hoisted_2$
|
|
19719
|
-
const _hoisted_3$
|
|
19721
|
+
const _hoisted_2$4 = { key: 1 };
|
|
19722
|
+
const _hoisted_3$2 = ["innerHTML"];
|
|
19720
19723
|
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19721
19724
|
return openBlock(), createElementBlock("div", {
|
|
19722
19725
|
ref: "root",
|
|
@@ -19742,7 +19745,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19742
19745
|
key: 0,
|
|
19743
19746
|
class: normalizeClass(["zd-table-caption", `text-${_ctx.instance.caption.align}`])
|
|
19744
19747
|
}, toDisplayString(_ctx.$t(_ctx.instance.caption.label)), 3)) : createCommentVNode("", true),
|
|
19745
|
-
_ctx.instance.showTableHead ? (openBlock(), createElementBlock("thead", _hoisted_2$
|
|
19748
|
+
_ctx.instance.showTableHead ? (openBlock(), createElementBlock("thead", _hoisted_2$4, [
|
|
19746
19749
|
createElementVNode("tr", null, [
|
|
19747
19750
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.columns, (column, index2) => {
|
|
19748
19751
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -19766,7 +19769,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19766
19769
|
key: index2,
|
|
19767
19770
|
class: normalizeClass([`text-${column.align}`]),
|
|
19768
19771
|
style: normalizeStyle(`min-width: ${column.minWidth}; max-width: ${column.maxWidth};`)
|
|
19769
|
-
}, null, 14, _hoisted_3$
|
|
19772
|
+
}, null, 14, _hoisted_3$2)) : createCommentVNode("", true)
|
|
19770
19773
|
], 64);
|
|
19771
19774
|
}), 256))
|
|
19772
19775
|
]);
|
|
@@ -19787,9 +19790,6 @@ const ZdTabProps$1 = buildProps({
|
|
|
19787
19790
|
tabTitle: {
|
|
19788
19791
|
type: [String]
|
|
19789
19792
|
},
|
|
19790
|
-
tabName: {
|
|
19791
|
-
type: [String]
|
|
19792
|
-
},
|
|
19793
19793
|
color: {
|
|
19794
19794
|
type: [String],
|
|
19795
19795
|
default: "primary"
|
|
@@ -19836,15 +19836,41 @@ const tabComponent = defineComponent({
|
|
|
19836
19836
|
const { instance, root: root2 } = useCreateInstance(props, ctx, Tab, ZdTabProps$1);
|
|
19837
19837
|
const { density } = useDensity({ instance });
|
|
19838
19838
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root2);
|
|
19839
|
+
const isDragging = ref(false);
|
|
19839
19840
|
const clickTab = (event) => {
|
|
19840
19841
|
ctx.emit("click", event);
|
|
19841
19842
|
};
|
|
19842
19843
|
const keydown = (event) => {
|
|
19843
19844
|
ctx.emit("keydown", event);
|
|
19844
19845
|
};
|
|
19846
|
+
const sortable = computed(() => {
|
|
19847
|
+
var _a;
|
|
19848
|
+
return (_a = instance.parent) == null ? void 0 : _a.sortable;
|
|
19849
|
+
});
|
|
19850
|
+
const handleDragStart = (event) => {
|
|
19851
|
+
if (!sortable.value) {
|
|
19852
|
+
event.preventDefault();
|
|
19853
|
+
return;
|
|
19854
|
+
}
|
|
19855
|
+
if (event.dataTransfer) {
|
|
19856
|
+
event.dataTransfer.effectAllowed = "move";
|
|
19857
|
+
event.dataTransfer.setData("text/plain", "");
|
|
19858
|
+
const tabsInstance = instance.parent;
|
|
19859
|
+
const sourceIndex = tabsInstance.tabs.findIndex((tab) => tab.name === instance.name);
|
|
19860
|
+
event.dataTransfer.setData(`application/x-zd-tabs-owner-${tabsInstance.name.toLowerCase()}`, "");
|
|
19861
|
+
event.dataTransfer.setData("application/x-zd-tab-index", String(sourceIndex));
|
|
19862
|
+
}
|
|
19863
|
+
isDragging.value = true;
|
|
19864
|
+
event.stopPropagation();
|
|
19865
|
+
};
|
|
19866
|
+
const handleDragEnd = () => {
|
|
19867
|
+
isDragging.value = false;
|
|
19868
|
+
};
|
|
19845
19869
|
return {
|
|
19846
19870
|
instance,
|
|
19847
19871
|
root: root2,
|
|
19872
|
+
density,
|
|
19873
|
+
sortable,
|
|
19848
19874
|
click,
|
|
19849
19875
|
focus,
|
|
19850
19876
|
blur,
|
|
@@ -19853,7 +19879,8 @@ const tabComponent = defineComponent({
|
|
|
19853
19879
|
// methods
|
|
19854
19880
|
clickTab,
|
|
19855
19881
|
keydown,
|
|
19856
|
-
|
|
19882
|
+
handleDragStart,
|
|
19883
|
+
handleDragEnd
|
|
19857
19884
|
};
|
|
19858
19885
|
}
|
|
19859
19886
|
});
|
|
@@ -19863,9 +19890,11 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19863
19890
|
return withDirectives((openBlock(), createBlock(_component_v_tab, {
|
|
19864
19891
|
id: _ctx.instance.name,
|
|
19865
19892
|
ref: "root",
|
|
19866
|
-
class: normalizeClass(["zd-tabs-tab", _ctx.instance.cssClass
|
|
19893
|
+
class: normalizeClass(["zd-tabs-tab", _ctx.instance.cssClass, {
|
|
19894
|
+
"zd-tabs-tab-sortable": _ctx.sortable
|
|
19895
|
+
}]),
|
|
19867
19896
|
style: normalizeStyle(_ctx.$styleObject(_ctx.instance.cssStyle)),
|
|
19868
|
-
name: _ctx.instance.
|
|
19897
|
+
name: _ctx.instance.tabTitle,
|
|
19869
19898
|
disabled: _ctx.instance.disabled,
|
|
19870
19899
|
theme: _ctx.instance.theme,
|
|
19871
19900
|
color: _ctx.instance.color,
|
|
@@ -19875,25 +19904,28 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19875
19904
|
iconName: _ctx.instance.iconName,
|
|
19876
19905
|
rounded: _ctx.instance.rounded,
|
|
19877
19906
|
"selected-class": "v-tab--selected " + _ctx.instance.selectedClass,
|
|
19878
|
-
value: _ctx.instance.value,
|
|
19907
|
+
value: _ctx.instance.name || _ctx.instance.value,
|
|
19879
19908
|
variant: _ctx.instance.variant,
|
|
19880
19909
|
width: _ctx.instance.width,
|
|
19910
|
+
draggable: _ctx.sortable,
|
|
19881
19911
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.clickTab($event)),
|
|
19882
|
-
onKeydown: _cache[1] || (_cache[1] = ($event) => _ctx.keydown($event))
|
|
19912
|
+
onKeydown: _cache[1] || (_cache[1] = ($event) => _ctx.keydown($event)),
|
|
19913
|
+
onDragstart: _ctx.handleDragStart,
|
|
19914
|
+
onDragend: _ctx.handleDragEnd
|
|
19883
19915
|
}, {
|
|
19884
19916
|
default: withCtx(() => [
|
|
19885
19917
|
createElementVNode("span", _hoisted_1$7, toDisplayString(_ctx.$t(_ctx.instance.tabTitle)), 1)
|
|
19886
19918
|
]),
|
|
19887
19919
|
_: 1
|
|
19888
|
-
}, 8, ["id", "class", "style", "name", "disabled", "theme", "color", "density", "direction", "fixed", "iconName", "rounded", "selected-class", "value", "variant", "width"])), [
|
|
19920
|
+
}, 8, ["id", "class", "style", "name", "disabled", "theme", "color", "density", "direction", "fixed", "iconName", "rounded", "selected-class", "value", "variant", "width", "draggable", "onDragstart", "onDragend"])), [
|
|
19889
19921
|
[vShow, _ctx.instance.isVisible]
|
|
19890
19922
|
]);
|
|
19891
19923
|
}
|
|
19892
19924
|
const ZdTab = /* @__PURE__ */ _export_sfc(tabComponent, [["render", _sfc_render$e]]);
|
|
19893
19925
|
const ZdTabItemProps$1 = buildProps({
|
|
19894
19926
|
...ZdComponentRenderProps,
|
|
19895
|
-
|
|
19896
|
-
type: [
|
|
19927
|
+
value: {
|
|
19928
|
+
type: [String]
|
|
19897
19929
|
},
|
|
19898
19930
|
lazyLoad: {
|
|
19899
19931
|
type: [Boolean]
|
|
@@ -19908,7 +19940,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19908
19940
|
const _component_v_tabs_window_item = resolveComponent("v-tabs-window-item");
|
|
19909
19941
|
return withDirectives((openBlock(), createBlock(_component_v_tabs_window_item, {
|
|
19910
19942
|
class: "zd-tabs-tab-item",
|
|
19911
|
-
value: _ctx.
|
|
19943
|
+
value: _ctx.value,
|
|
19912
19944
|
transition: false,
|
|
19913
19945
|
"reverse-transition": false
|
|
19914
19946
|
}, {
|
|
@@ -19970,6 +20002,10 @@ const ZdTabsProps$1 = buildProps({
|
|
|
19970
20002
|
},
|
|
19971
20003
|
max: {
|
|
19972
20004
|
type: [Number, String]
|
|
20005
|
+
},
|
|
20006
|
+
sortable: {
|
|
20007
|
+
type: [Boolean, String],
|
|
20008
|
+
default: false
|
|
19973
20009
|
}
|
|
19974
20010
|
});
|
|
19975
20011
|
const tabsComponent = defineComponent({
|
|
@@ -19978,22 +20014,93 @@ const tabsComponent = defineComponent({
|
|
|
19978
20014
|
setup(props, ctx) {
|
|
19979
20015
|
const { instance, root: root2 } = useCreateInstance(props, ctx, Tabs, ZdTabsProps$1);
|
|
19980
20016
|
const { density } = useDensity({ instance });
|
|
20017
|
+
const rootElement = getRootElement(root2);
|
|
19981
20018
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root2);
|
|
20019
|
+
const isDragOver = ref(false);
|
|
20020
|
+
const dragOverIndex = ref(-1);
|
|
19982
20021
|
const change = () => {
|
|
19983
|
-
const
|
|
19984
|
-
instance.change(new Event("change"),
|
|
20022
|
+
const rootElement2 = getRootElement(root2);
|
|
20023
|
+
instance.change(new Event("change"), rootElement2.value);
|
|
19985
20024
|
};
|
|
19986
20025
|
const keydown = (event, index2) => {
|
|
19987
|
-
const
|
|
19988
|
-
instance.beforeChange(event, index2,
|
|
20026
|
+
const rootElement2 = getRootElement(root2);
|
|
20027
|
+
instance.beforeChange(event, index2, rootElement2.value);
|
|
19989
20028
|
};
|
|
19990
20029
|
const clickTab = (event, index2) => {
|
|
19991
|
-
const
|
|
19992
|
-
instance.beforeChange(event, index2,
|
|
20030
|
+
const rootElement2 = getRootElement(root2);
|
|
20031
|
+
instance.beforeChange(event, index2, rootElement2.value);
|
|
20032
|
+
};
|
|
20033
|
+
const isTabOK = (event) => {
|
|
20034
|
+
var _a;
|
|
20035
|
+
return !!((_a = event.dataTransfer) == null ? void 0 : _a.types.includes(`application/x-zd-tabs-owner-${instance.name.toLowerCase()}`));
|
|
20036
|
+
};
|
|
20037
|
+
const getTabsBarRect = () => {
|
|
20038
|
+
var _a, _b;
|
|
20039
|
+
return (_b = (_a = rootElement.value) == null ? void 0 : _a.querySelector(".v-tabs")) == null ? void 0 : _b.getBoundingClientRect();
|
|
20040
|
+
};
|
|
20041
|
+
const handleDragOver = (event) => {
|
|
20042
|
+
event.preventDefault();
|
|
20043
|
+
if (!isTabOK(event)) {
|
|
20044
|
+
dragOverIndex.value = -1;
|
|
20045
|
+
return;
|
|
20046
|
+
}
|
|
20047
|
+
const tabsRect = getTabsBarRect();
|
|
20048
|
+
if (!tabsRect) return;
|
|
20049
|
+
if (event.clientY < tabsRect.top - 10 || event.clientY > tabsRect.bottom + 10) {
|
|
20050
|
+
dragOverIndex.value = -1;
|
|
20051
|
+
return;
|
|
20052
|
+
}
|
|
20053
|
+
const tabs = rootElement.value.querySelectorAll(".zd-tabs-tab");
|
|
20054
|
+
let targetIndex = instance.tabs.length;
|
|
20055
|
+
tabs.forEach((tabEl, index2) => {
|
|
20056
|
+
const rect = tabEl.getBoundingClientRect();
|
|
20057
|
+
if (event.clientX < rect.left + rect.width / 2) {
|
|
20058
|
+
targetIndex = Math.min(targetIndex, index2);
|
|
20059
|
+
}
|
|
20060
|
+
});
|
|
20061
|
+
dragOverIndex.value = targetIndex;
|
|
20062
|
+
event.stopPropagation();
|
|
20063
|
+
};
|
|
20064
|
+
const handleDrop = (event) => {
|
|
20065
|
+
var _a;
|
|
20066
|
+
event.preventDefault();
|
|
20067
|
+
if (!isTabOK(event) || dragOverIndex.value === -1) return;
|
|
20068
|
+
event.stopPropagation();
|
|
20069
|
+
const sourceIndex = Number((_a = event.dataTransfer) == null ? void 0 : _a.getData("application/x-zd-tab-index"));
|
|
20070
|
+
instance.moveTab(sourceIndex, dragOverIndex.value);
|
|
20071
|
+
isDragOver.value = false;
|
|
20072
|
+
dragOverIndex.value = -1;
|
|
20073
|
+
};
|
|
20074
|
+
const handleDragEnter = (event) => {
|
|
20075
|
+
event.preventDefault();
|
|
20076
|
+
if (!isTabOK(event)) {
|
|
20077
|
+
isDragOver.value = false;
|
|
20078
|
+
dragOverIndex.value = -1;
|
|
20079
|
+
return;
|
|
20080
|
+
}
|
|
20081
|
+
isDragOver.value = true;
|
|
19993
20082
|
};
|
|
20083
|
+
const handleDragLeave = (event) => {
|
|
20084
|
+
if (rootElement.value && event.relatedTarget && rootElement.value.contains(event.relatedTarget)) return;
|
|
20085
|
+
isDragOver.value = false;
|
|
20086
|
+
dragOverIndex.value = -1;
|
|
20087
|
+
};
|
|
20088
|
+
const activeTabName = computed({
|
|
20089
|
+
get: () => {
|
|
20090
|
+
var _a;
|
|
20091
|
+
return (_a = instance.tabs[instance.activeTab]) == null ? void 0 : _a.name;
|
|
20092
|
+
},
|
|
20093
|
+
set: (name) => {
|
|
20094
|
+
const index2 = instance.tabs.findIndex((tab) => tab.name === name);
|
|
20095
|
+
if (index2 !== -1) instance.activeTab = index2;
|
|
20096
|
+
}
|
|
20097
|
+
});
|
|
19994
20098
|
return {
|
|
19995
20099
|
instance,
|
|
19996
20100
|
root: root2,
|
|
20101
|
+
dragOverIndex,
|
|
20102
|
+
density,
|
|
20103
|
+
activeTabName,
|
|
19997
20104
|
click,
|
|
19998
20105
|
focus,
|
|
19999
20106
|
blur,
|
|
@@ -20002,11 +20109,22 @@ const tabsComponent = defineComponent({
|
|
|
20002
20109
|
clickTab,
|
|
20003
20110
|
keydown,
|
|
20004
20111
|
change,
|
|
20005
|
-
|
|
20112
|
+
handleDragOver,
|
|
20113
|
+
handleDrop,
|
|
20114
|
+
handleDragEnter,
|
|
20115
|
+
handleDragLeave
|
|
20006
20116
|
};
|
|
20007
20117
|
}
|
|
20008
20118
|
});
|
|
20009
20119
|
const _hoisted_1$6 = ["id", "name"];
|
|
20120
|
+
const _hoisted_2$3 = {
|
|
20121
|
+
key: 0,
|
|
20122
|
+
class: "zd-tabs-sortable-drop-indicator"
|
|
20123
|
+
};
|
|
20124
|
+
const _hoisted_3$1 = {
|
|
20125
|
+
key: 0,
|
|
20126
|
+
class: "zd-tabs-sortable-drop-indicator"
|
|
20127
|
+
};
|
|
20010
20128
|
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
20011
20129
|
const _component_zd_tab = resolveComponent("zd-tab");
|
|
20012
20130
|
const _component_v_tabs = resolveComponent("v-tabs");
|
|
@@ -20021,12 +20139,16 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20021
20139
|
height: _ctx.instance.height,
|
|
20022
20140
|
maxHeight: _ctx.instance.maxHeight,
|
|
20023
20141
|
minHeight: _ctx.instance.minHeight
|
|
20024
|
-
})
|
|
20142
|
+
}),
|
|
20143
|
+
onDragenter: _cache[1] || (_cache[1] = (...args) => _ctx.handleDragEnter && _ctx.handleDragEnter(...args)),
|
|
20144
|
+
onDragleave: _cache[2] || (_cache[2] = (...args) => _ctx.handleDragLeave && _ctx.handleDragLeave(...args)),
|
|
20145
|
+
onDragover: _cache[3] || (_cache[3] = (...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args)),
|
|
20146
|
+
onDrop: _cache[4] || (_cache[4] = (...args) => _ctx.handleDrop && _ctx.handleDrop(...args))
|
|
20025
20147
|
}, [
|
|
20026
20148
|
createVNode(_component_v_tabs, {
|
|
20027
|
-
modelValue: _ctx.
|
|
20149
|
+
modelValue: _ctx.activeTabName,
|
|
20028
20150
|
"onUpdate:modelValue": [
|
|
20029
|
-
_cache[0] || (_cache[0] = ($event) => _ctx.
|
|
20151
|
+
_cache[0] || (_cache[0] = ($event) => _ctx.activeTabName = $event),
|
|
20030
20152
|
_ctx.change
|
|
20031
20153
|
],
|
|
20032
20154
|
"show-arrows": "",
|
|
@@ -20041,44 +20163,43 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20041
20163
|
}, {
|
|
20042
20164
|
default: withCtx(() => [
|
|
20043
20165
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.tabs, (tab, index2) => {
|
|
20044
|
-
return openBlock(),
|
|
20166
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
20045
20167
|
key: tab.name
|
|
20046
|
-
},
|
|
20047
|
-
|
|
20048
|
-
|
|
20049
|
-
|
|
20050
|
-
|
|
20051
|
-
|
|
20052
|
-
|
|
20053
|
-
|
|
20054
|
-
|
|
20055
|
-
|
|
20168
|
+
}, [
|
|
20169
|
+
_ctx.dragOverIndex === index2 ? (openBlock(), createElementBlock("span", _hoisted_2$3)) : createCommentVNode("", true),
|
|
20170
|
+
createVNode(_component_zd_tab, mergeProps({ ref_for: true }, {
|
|
20171
|
+
...tab,
|
|
20172
|
+
name: tab.name,
|
|
20173
|
+
dense: tab.dense || _ctx.instance.dense
|
|
20174
|
+
}, {
|
|
20175
|
+
onClick: ($event) => _ctx.clickTab($event, index2),
|
|
20176
|
+
onKeydown: ($event) => _ctx.keydown($event, index2)
|
|
20177
|
+
}), null, 16, ["onClick", "onKeydown"])
|
|
20178
|
+
], 64);
|
|
20179
|
+
}), 128)),
|
|
20180
|
+
_ctx.dragOverIndex === _ctx.instance.tabs.length ? (openBlock(), createElementBlock("span", _hoisted_3$1)) : createCommentVNode("", true)
|
|
20056
20181
|
]),
|
|
20057
20182
|
_: 1
|
|
20058
20183
|
}, 8, ["modelValue", "onUpdate:modelValue", "theme", "color", "bg-color", "density", "direction", "disabled", "grow", "max"]),
|
|
20059
|
-
createVNode(_component_v_window, {
|
|
20060
|
-
modelValue: _ctx.instance.activeTab,
|
|
20061
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.instance.activeTab = $event)
|
|
20062
|
-
}, {
|
|
20184
|
+
createVNode(_component_v_window, { "model-value": _ctx.activeTabName }, {
|
|
20063
20185
|
default: withCtx(() => [
|
|
20064
20186
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.tabs, (tab, index2) => {
|
|
20065
20187
|
return withDirectives((openBlock(), createBlock(_component_zd_tab_item, mergeProps({
|
|
20066
20188
|
key: tab.name,
|
|
20067
|
-
value:
|
|
20189
|
+
value: tab.name,
|
|
20068
20190
|
children: tab.children
|
|
20069
20191
|
}, { ref_for: true }, {
|
|
20070
|
-
index: index2,
|
|
20071
20192
|
name: _ctx.instance.name + "-tab-item-" + index2,
|
|
20072
20193
|
lazyLoad: tab.lazyLoad
|
|
20073
20194
|
}), null, 16, ["value", "children"])), [
|
|
20074
|
-
[vShow, tab.isVisible &&
|
|
20195
|
+
[vShow, tab.isVisible && tab.name === _ctx.activeTabName]
|
|
20075
20196
|
]);
|
|
20076
20197
|
}), 128)),
|
|
20077
20198
|
renderSlot(_ctx.$slots, "tabItems")
|
|
20078
20199
|
]),
|
|
20079
20200
|
_: 3
|
|
20080
|
-
}, 8, ["
|
|
20081
|
-
],
|
|
20201
|
+
}, 8, ["model-value"])
|
|
20202
|
+
], 46, _hoisted_1$6)), [
|
|
20082
20203
|
[vShow, _ctx.instance.isVisible]
|
|
20083
20204
|
]);
|
|
20084
20205
|
}
|
|
@@ -23598,9 +23719,6 @@ const ZdTabProps = buildProps({
|
|
|
23598
23719
|
tabTitle: {
|
|
23599
23720
|
type: [String]
|
|
23600
23721
|
},
|
|
23601
|
-
tabName: {
|
|
23602
|
-
type: [String]
|
|
23603
|
-
},
|
|
23604
23722
|
color: {
|
|
23605
23723
|
type: [String],
|
|
23606
23724
|
default: "primary"
|
|
@@ -23647,15 +23765,41 @@ defineComponent({
|
|
|
23647
23765
|
const { instance, root: root2 } = useCreateInstance(props, ctx, Tab, ZdTabProps);
|
|
23648
23766
|
const { density } = useDensity({ instance });
|
|
23649
23767
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root2);
|
|
23768
|
+
const isDragging = ref(false);
|
|
23650
23769
|
const clickTab = (event) => {
|
|
23651
23770
|
ctx.emit("click", event);
|
|
23652
23771
|
};
|
|
23653
23772
|
const keydown = (event) => {
|
|
23654
23773
|
ctx.emit("keydown", event);
|
|
23655
23774
|
};
|
|
23775
|
+
const sortable = computed(() => {
|
|
23776
|
+
var _a;
|
|
23777
|
+
return (_a = instance.parent) == null ? void 0 : _a.sortable;
|
|
23778
|
+
});
|
|
23779
|
+
const handleDragStart = (event) => {
|
|
23780
|
+
if (!sortable.value) {
|
|
23781
|
+
event.preventDefault();
|
|
23782
|
+
return;
|
|
23783
|
+
}
|
|
23784
|
+
if (event.dataTransfer) {
|
|
23785
|
+
event.dataTransfer.effectAllowed = "move";
|
|
23786
|
+
event.dataTransfer.setData("text/plain", "");
|
|
23787
|
+
const tabsInstance = instance.parent;
|
|
23788
|
+
const sourceIndex = tabsInstance.tabs.findIndex((tab) => tab.name === instance.name);
|
|
23789
|
+
event.dataTransfer.setData(`application/x-zd-tabs-owner-${tabsInstance.name.toLowerCase()}`, "");
|
|
23790
|
+
event.dataTransfer.setData("application/x-zd-tab-index", String(sourceIndex));
|
|
23791
|
+
}
|
|
23792
|
+
isDragging.value = true;
|
|
23793
|
+
event.stopPropagation();
|
|
23794
|
+
};
|
|
23795
|
+
const handleDragEnd = () => {
|
|
23796
|
+
isDragging.value = false;
|
|
23797
|
+
};
|
|
23656
23798
|
return {
|
|
23657
23799
|
instance,
|
|
23658
23800
|
root: root2,
|
|
23801
|
+
density,
|
|
23802
|
+
sortable,
|
|
23659
23803
|
click,
|
|
23660
23804
|
focus,
|
|
23661
23805
|
blur,
|
|
@@ -23664,14 +23808,15 @@ defineComponent({
|
|
|
23664
23808
|
// methods
|
|
23665
23809
|
clickTab,
|
|
23666
23810
|
keydown,
|
|
23667
|
-
|
|
23811
|
+
handleDragStart,
|
|
23812
|
+
handleDragEnd
|
|
23668
23813
|
};
|
|
23669
23814
|
}
|
|
23670
23815
|
});
|
|
23671
23816
|
const ZdTabItemProps = buildProps({
|
|
23672
23817
|
...ZdComponentRenderProps,
|
|
23673
|
-
|
|
23674
|
-
type: [
|
|
23818
|
+
value: {
|
|
23819
|
+
type: [String]
|
|
23675
23820
|
},
|
|
23676
23821
|
lazyLoad: {
|
|
23677
23822
|
type: [Boolean]
|
|
@@ -23719,6 +23864,10 @@ const ZdTabsProps = buildProps({
|
|
|
23719
23864
|
},
|
|
23720
23865
|
max: {
|
|
23721
23866
|
type: [Number, String]
|
|
23867
|
+
},
|
|
23868
|
+
sortable: {
|
|
23869
|
+
type: [Boolean, String],
|
|
23870
|
+
default: false
|
|
23722
23871
|
}
|
|
23723
23872
|
});
|
|
23724
23873
|
defineComponent({
|
|
@@ -23727,22 +23876,93 @@ defineComponent({
|
|
|
23727
23876
|
setup(props, ctx) {
|
|
23728
23877
|
const { instance, root: root2 } = useCreateInstance(props, ctx, Tabs, ZdTabsProps);
|
|
23729
23878
|
const { density } = useDensity({ instance });
|
|
23879
|
+
const rootElement = getRootElement(root2);
|
|
23730
23880
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root2);
|
|
23881
|
+
const isDragOver = ref(false);
|
|
23882
|
+
const dragOverIndex = ref(-1);
|
|
23731
23883
|
const change = () => {
|
|
23732
|
-
const
|
|
23733
|
-
instance.change(new Event("change"),
|
|
23884
|
+
const rootElement2 = getRootElement(root2);
|
|
23885
|
+
instance.change(new Event("change"), rootElement2.value);
|
|
23734
23886
|
};
|
|
23735
23887
|
const keydown = (event, index2) => {
|
|
23736
|
-
const
|
|
23737
|
-
instance.beforeChange(event, index2,
|
|
23888
|
+
const rootElement2 = getRootElement(root2);
|
|
23889
|
+
instance.beforeChange(event, index2, rootElement2.value);
|
|
23738
23890
|
};
|
|
23739
23891
|
const clickTab = (event, index2) => {
|
|
23740
|
-
const
|
|
23741
|
-
instance.beforeChange(event, index2,
|
|
23892
|
+
const rootElement2 = getRootElement(root2);
|
|
23893
|
+
instance.beforeChange(event, index2, rootElement2.value);
|
|
23894
|
+
};
|
|
23895
|
+
const isTabOK = (event) => {
|
|
23896
|
+
var _a;
|
|
23897
|
+
return !!((_a = event.dataTransfer) == null ? void 0 : _a.types.includes(`application/x-zd-tabs-owner-${instance.name.toLowerCase()}`));
|
|
23898
|
+
};
|
|
23899
|
+
const getTabsBarRect = () => {
|
|
23900
|
+
var _a, _b;
|
|
23901
|
+
return (_b = (_a = rootElement.value) == null ? void 0 : _a.querySelector(".v-tabs")) == null ? void 0 : _b.getBoundingClientRect();
|
|
23902
|
+
};
|
|
23903
|
+
const handleDragOver = (event) => {
|
|
23904
|
+
event.preventDefault();
|
|
23905
|
+
if (!isTabOK(event)) {
|
|
23906
|
+
dragOverIndex.value = -1;
|
|
23907
|
+
return;
|
|
23908
|
+
}
|
|
23909
|
+
const tabsRect = getTabsBarRect();
|
|
23910
|
+
if (!tabsRect) return;
|
|
23911
|
+
if (event.clientY < tabsRect.top - 10 || event.clientY > tabsRect.bottom + 10) {
|
|
23912
|
+
dragOverIndex.value = -1;
|
|
23913
|
+
return;
|
|
23914
|
+
}
|
|
23915
|
+
const tabs = rootElement.value.querySelectorAll(".zd-tabs-tab");
|
|
23916
|
+
let targetIndex = instance.tabs.length;
|
|
23917
|
+
tabs.forEach((tabEl, index2) => {
|
|
23918
|
+
const rect = tabEl.getBoundingClientRect();
|
|
23919
|
+
if (event.clientX < rect.left + rect.width / 2) {
|
|
23920
|
+
targetIndex = Math.min(targetIndex, index2);
|
|
23921
|
+
}
|
|
23922
|
+
});
|
|
23923
|
+
dragOverIndex.value = targetIndex;
|
|
23924
|
+
event.stopPropagation();
|
|
23925
|
+
};
|
|
23926
|
+
const handleDrop = (event) => {
|
|
23927
|
+
var _a;
|
|
23928
|
+
event.preventDefault();
|
|
23929
|
+
if (!isTabOK(event) || dragOverIndex.value === -1) return;
|
|
23930
|
+
event.stopPropagation();
|
|
23931
|
+
const sourceIndex = Number((_a = event.dataTransfer) == null ? void 0 : _a.getData("application/x-zd-tab-index"));
|
|
23932
|
+
instance.moveTab(sourceIndex, dragOverIndex.value);
|
|
23933
|
+
isDragOver.value = false;
|
|
23934
|
+
dragOverIndex.value = -1;
|
|
23935
|
+
};
|
|
23936
|
+
const handleDragEnter = (event) => {
|
|
23937
|
+
event.preventDefault();
|
|
23938
|
+
if (!isTabOK(event)) {
|
|
23939
|
+
isDragOver.value = false;
|
|
23940
|
+
dragOverIndex.value = -1;
|
|
23941
|
+
return;
|
|
23942
|
+
}
|
|
23943
|
+
isDragOver.value = true;
|
|
23944
|
+
};
|
|
23945
|
+
const handleDragLeave = (event) => {
|
|
23946
|
+
if (rootElement.value && event.relatedTarget && rootElement.value.contains(event.relatedTarget)) return;
|
|
23947
|
+
isDragOver.value = false;
|
|
23948
|
+
dragOverIndex.value = -1;
|
|
23742
23949
|
};
|
|
23950
|
+
const activeTabName = computed({
|
|
23951
|
+
get: () => {
|
|
23952
|
+
var _a;
|
|
23953
|
+
return (_a = instance.tabs[instance.activeTab]) == null ? void 0 : _a.name;
|
|
23954
|
+
},
|
|
23955
|
+
set: (name) => {
|
|
23956
|
+
const index2 = instance.tabs.findIndex((tab) => tab.name === name);
|
|
23957
|
+
if (index2 !== -1) instance.activeTab = index2;
|
|
23958
|
+
}
|
|
23959
|
+
});
|
|
23743
23960
|
return {
|
|
23744
23961
|
instance,
|
|
23745
23962
|
root: root2,
|
|
23963
|
+
dragOverIndex,
|
|
23964
|
+
density,
|
|
23965
|
+
activeTabName,
|
|
23746
23966
|
click,
|
|
23747
23967
|
focus,
|
|
23748
23968
|
blur,
|
|
@@ -23751,7 +23971,10 @@ defineComponent({
|
|
|
23751
23971
|
clickTab,
|
|
23752
23972
|
keydown,
|
|
23753
23973
|
change,
|
|
23754
|
-
|
|
23974
|
+
handleDragOver,
|
|
23975
|
+
handleDrop,
|
|
23976
|
+
handleDragEnter,
|
|
23977
|
+
handleDragLeave
|
|
23755
23978
|
};
|
|
23756
23979
|
}
|
|
23757
23980
|
});
|