@zeedhi/vuetify 3.1.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 +30 -19
- package/dist/zd-vuetify.min.css +2 -2
- package/dist/zd-vuetify.min.js +15 -17
- package/dist/zd-vuetify.mjs +678 -368
- package/package.json +3 -3
- package/src/components/zd-checkbox/ZdCheckbox.vue +4 -0
- package/src/components/zd-component/ZdComponent.ts +15 -13
- package/src/components/zd-date-input/ZdDateInput.ts +1 -0
- package/src/components/zd-grid-editable/ZdGridEditable.ts +16 -13
- package/src/components/zd-select/ZdSelect.ts +18 -1
- package/src/components/zd-select/ZdSelect.vue +3 -2
- package/src/components/zd-select-multiple/ZdSelectMultiple.ts +21 -3
- package/src/components/zd-select-multiple/ZdSelectMultiple.vue +10 -1
- 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 +3 -1
- package/src/components/zd-tabs/ZdTabs.ts +96 -2
- package/src/components/zd-tabs/ZdTabs.vue +46 -17
- package/src/components/zd-text-input/ZdTextInput.ts +6 -0
- package/src/components/zd-text-input/ZdTextInput.vue +1 -1
- package/src/components/zd-textarea/ZdTextarea.vue +1 -0
- package/src/components/zd-tooltip/ZdTooltip.vue +2 -1
- package/src/composables/gridColumns.ts +11 -6
- package/types/components/zd-alert/ZdAlert.d.ts +299 -299
- package/types/components/zd-badge/ZdBadge.d.ts +159 -159
- package/types/components/zd-breadcrumbs/ZdBreadcrumbs.d.ts +168 -168
- package/types/components/zd-button/ZdButton.d.ts +159 -159
- package/types/components/zd-button-group/ZdButtonGroup.d.ts +168 -168
- package/types/components/zd-card/ZdCard.d.ts +159 -159
- package/types/components/zd-carousel/ZdCarousel.d.ts +476 -476
- package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.d.ts +599 -599
- package/types/components/zd-chip/ZdChip.d.ts +159 -159
- package/types/components/zd-code-viewer/ZdCodeViewer.d.ts +168 -168
- package/types/components/zd-col/ZdCol.d.ts +168 -168
- package/types/components/zd-collapse-card/ZdCollapseCard.d.ts +374 -374
- package/types/components/zd-container/ZdContainer.d.ts +168 -168
- package/types/components/zd-currency/ZdCurrency.d.ts +595 -595
- package/types/components/zd-date-range/ZdDateRange.d.ts +600 -597
- package/types/components/zd-divider/ZdDivider.d.ts +168 -168
- package/types/components/zd-dropdown/ZdDropdown.d.ts +252 -252
- package/types/components/zd-footer/ZdFooter.d.ts +420 -420
- package/types/components/zd-frame-page/ZdFramePage.d.ts +160 -160
- package/types/components/zd-grid/ZdGrid.d.ts +2976 -2976
- package/types/components/zd-grid/composables/grid-instance.d.ts +1351 -1351
- package/types/components/zd-grid/footer/ZdGridFooter.d.ts +1351 -1351
- package/types/components/zd-grid/toolbar/ZdGridToolbar.d.ts +1351 -1351
- package/types/components/zd-grid-editable/ZdGridEditable.d.ts +2977 -2979
- package/types/components/zd-grid-editable/cell/ZdGridEditableCell.d.ts +271 -271
- package/types/components/zd-header/ZdHeader.d.ts +412 -412
- package/types/components/zd-image/ZdImage.d.ts +168 -168
- package/types/components/zd-increment/ZdIncrement.d.ts +595 -595
- package/types/components/zd-iterable/ZdIterableNoData.d.ts +1351 -1351
- package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.d.ts +472 -472
- package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.d.ts +481 -481
- package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.d.ts +1080 -1080
- package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.d.ts +481 -481
- package/types/components/zd-iterable-component-render/ZdIterableComponentRender.d.ts +816 -816
- package/types/components/zd-layout/ZdLayout.d.ts +168 -168
- package/types/components/zd-list/ZdList.d.ts +447 -447
- package/types/components/zd-list/ZdListGroup.d.ts +560 -560
- package/types/components/zd-list/ZdListItem.d.ts +280 -280
- package/types/components/zd-login/ZdLogin.d.ts +336 -336
- package/types/components/zd-login/ZdLoginButton.d.ts +526 -526
- package/types/components/zd-main/ZdMain.d.ts +168 -168
- package/types/components/zd-master-detail/ZdMasterDetail.d.ts +167 -167
- package/types/components/zd-menu/ZdMenu.d.ts +3060 -1068
- package/types/components/zd-menu/ZdMenuButton.d.ts +159 -159
- package/types/components/zd-menu/ZdMenuGroup.d.ts +5205 -1000
- package/types/components/zd-menu/ZdMenuLink.d.ts +8943 -1529
- package/types/components/zd-menu/ZdMenuSeparator.d.ts +168 -168
- package/types/components/zd-modal/ZdModalCloseButton.d.ts +159 -159
- package/types/components/zd-month/ZdMonth.d.ts +598 -597
- package/types/components/zd-number-input/ZdNumberInput.d.ts +596 -596
- package/types/components/zd-password/ZdPassword.d.ts +595 -595
- package/types/components/zd-progress/ZdProgress.d.ts +252 -252
- package/types/components/zd-row/ZdRow.d.ts +168 -168
- package/types/components/zd-switch/ZdSwitch.d.ts +595 -595
- package/types/components/zd-table/ZdTable.d.ts +313 -313
- package/types/components/zd-tabs/ZdTab.d.ts +144 -150
- package/types/components/zd-tabs/ZdTabItem.d.ts +6 -6
- package/types/components/zd-tabs/ZdTabs.d.ts +330 -311
- package/types/components/zd-tag/ZdTag.d.ts +168 -168
- package/types/components/zd-text/ZdText.d.ts +168 -168
- package/types/components/zd-time/ZdTime.d.ts +595 -595
- package/types/components/zd-tooltip/ZdTooltip.d.ts +168 -168
- package/types/components/zd-tree/ZdTree.d.ts +591 -591
- package/types/components/zd-tree-grid/ZdTreeGrid.d.ts +1485 -1485
- package/types/composables/gridColumns.d.ts +140 -140
package/dist/zd-vuetify.mjs
CHANGED
|
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { Icons, AlertService, Alert, Badge, Breadcrumbs, ButtonGroup, Button, Card, Carousel as Carousel$1, Form, Input, CheckboxMultiple, Checkbox, Chip, CodeViewer, Col, CollapseCard, Container, TextInput, NumberInput, AutoNumeric, Currency, DateInput, DateRange, DialogService, Divider, Dropdown, Footer, ChildNotFoundError, Frame, FramePage, Grid, GridEditable, Toggleable, Header, Icon as Icon$1, Image, Increment, IterableComponentRender, IterableColumnsButton, IterablePageInfo, Select, IterablePageSize, IterablePagination, Search, Layout, List, ListItem, ListGroup, Loading, LoadingService, Login, LoginButton, Main, MasterDetail, Menu, MenuButton, MenuGroup, MenuLink, MenuSeparator, ModalService, ModalCloseButton, Month, Password, Progress, Radio, Row, SelectMultiple, SvgMap, Switch, Table, Tab, Tabs, Tag, Text, Textarea, Time, Tooltip, TreeGrid, Tree, initTheme } from "@zeedhi/common";
|
|
5
5
|
import { Config, Event as Event$1, Mask, Utils, DateHelper, I18n, InstanceNotFoundError, FormatterParserProvider, KeyMap, Metadata, dayjs, ViewService } from "@zeedhi/core";
|
|
6
|
-
import { defineComponent, h, ref, computed, onMounted, onBeforeUnmount, watchEffect, resolveComponent,
|
|
6
|
+
import { defineComponent, h, ref, computed, onMounted, onBeforeUnmount, watchEffect, resolveComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, withDirectives, createCommentVNode, Fragment, renderList, createBlock, normalizeStyle, withModifiers, renderSlot, toDisplayString, createTextVNode, withCtx, vShow, unref, resolveDynamicComponent, mergeProps, createVNode, render, useTemplateRef, getCurrentInstance, reactive, watch, inject, provide, onBeforeMount, onUnmounted, nextTick, toHandlers, createSlots, shallowReactive, toRefs, useId, onUpdated, cloneVNode, withKeys, normalizeProps, guardReactiveProps, useSlots, resolveDirective, isMemoSame } from "vue";
|
|
7
7
|
import { useTheme, useDisplay, createVuetify } from "vuetify";
|
|
8
8
|
import * as components$1 from "vuetify/components";
|
|
9
9
|
import * as directives from "vuetify/directives";
|
|
@@ -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}`),
|
|
@@ -7256,6 +7259,10 @@ function useTextInput$1(instance, ctx, root2) {
|
|
|
7256
7259
|
(_a = rootElement.value) == null ? void 0 : _a.getElementsByTagName("input")[0].blur();
|
|
7257
7260
|
});
|
|
7258
7261
|
};
|
|
7262
|
+
const clearInput = () => {
|
|
7263
|
+
inputScope.input();
|
|
7264
|
+
inputScope.change();
|
|
7265
|
+
};
|
|
7259
7266
|
const getIconClickEvents = () => {
|
|
7260
7267
|
const events = {};
|
|
7261
7268
|
if (instance.events.appendIconClick) {
|
|
@@ -7290,6 +7297,7 @@ function useTextInput$1(instance, ctx, root2) {
|
|
|
7290
7297
|
appendOuterIconClick,
|
|
7291
7298
|
prependOuterIconClick,
|
|
7292
7299
|
setBlur,
|
|
7300
|
+
clearInput,
|
|
7293
7301
|
getIconClickEvents
|
|
7294
7302
|
};
|
|
7295
7303
|
}
|
|
@@ -7636,6 +7644,7 @@ const dateInputComponent = defineComponent({
|
|
|
7636
7644
|
instance.showDatePicker = false;
|
|
7637
7645
|
}
|
|
7638
7646
|
instance.validate();
|
|
7647
|
+
instance.change();
|
|
7639
7648
|
};
|
|
7640
7649
|
const helperValuesOptionClick = (helper) => {
|
|
7641
7650
|
const value = DateHelper.getValue(helper, instance.dateFormat);
|
|
@@ -8478,12 +8487,12 @@ const _hoisted_1$y = {
|
|
|
8478
8487
|
key: 0,
|
|
8479
8488
|
class: "zd-footer-slot-left"
|
|
8480
8489
|
};
|
|
8481
|
-
const _hoisted_2$
|
|
8490
|
+
const _hoisted_2$i = {
|
|
8482
8491
|
key: 1,
|
|
8483
8492
|
class: "zd-footer-slot-center",
|
|
8484
8493
|
ref: "centerSlot"
|
|
8485
8494
|
};
|
|
8486
|
-
const _hoisted_3$
|
|
8495
|
+
const _hoisted_3$8 = {
|
|
8487
8496
|
key: 2,
|
|
8488
8497
|
class: "zd-footer-slot-right"
|
|
8489
8498
|
};
|
|
@@ -8532,7 +8541,7 @@ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8532
8541
|
}), 128)) : createCommentVNode("", true),
|
|
8533
8542
|
renderSlot(_ctx.$slots, "leftSlot")
|
|
8534
8543
|
])) : createCommentVNode("", true),
|
|
8535
|
-
_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, [
|
|
8536
8545
|
!_ctx.$slots.centerSlot ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.instance.centerSlot, (child) => {
|
|
8537
8546
|
return openBlock(), createBlock(resolveDynamicComponent(child.component), mergeProps({ ref_for: true }, child, {
|
|
8538
8547
|
key: child.name,
|
|
@@ -8541,7 +8550,7 @@ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8541
8550
|
}), 128)) : createCommentVNode("", true),
|
|
8542
8551
|
renderSlot(_ctx.$slots, "centerSlot")
|
|
8543
8552
|
], 512)) : createCommentVNode("", true),
|
|
8544
|
-
_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, [
|
|
8545
8554
|
!_ctx.$slots.rightSlot ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.instance.rightSlot, (child) => {
|
|
8546
8555
|
return openBlock(), createBlock(resolveDynamicComponent(child.component), mergeProps({ ref_for: true }, child, {
|
|
8547
8556
|
key: child.name,
|
|
@@ -8951,90 +8960,109 @@ function useCellSelection({
|
|
|
8951
8960
|
};
|
|
8952
8961
|
}
|
|
8953
8962
|
/**!
|
|
8954
|
-
* Sortable 1.15.
|
|
8963
|
+
* Sortable 1.15.6
|
|
8955
8964
|
* @author RubaXa <trash@rubaxa.org>
|
|
8956
8965
|
* @author owenm <owen23355@gmail.com>
|
|
8957
8966
|
* @license MIT
|
|
8958
8967
|
*/
|
|
8959
|
-
function
|
|
8960
|
-
|
|
8961
|
-
value: t,
|
|
8962
|
-
enumerable: true,
|
|
8963
|
-
configurable: true,
|
|
8964
|
-
writable: true
|
|
8965
|
-
}) : e[r] = t, e;
|
|
8966
|
-
}
|
|
8967
|
-
function _extends() {
|
|
8968
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
8969
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
8970
|
-
var t = arguments[e];
|
|
8971
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
8972
|
-
}
|
|
8973
|
-
return n;
|
|
8974
|
-
}, _extends.apply(null, arguments);
|
|
8975
|
-
}
|
|
8976
|
-
function ownKeys(e, r) {
|
|
8977
|
-
var t = Object.keys(e);
|
|
8968
|
+
function ownKeys(object, enumerableOnly) {
|
|
8969
|
+
var keys = Object.keys(object);
|
|
8978
8970
|
if (Object.getOwnPropertySymbols) {
|
|
8979
|
-
var
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8971
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
8972
|
+
if (enumerableOnly) {
|
|
8973
|
+
symbols = symbols.filter(function(sym) {
|
|
8974
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
8975
|
+
});
|
|
8976
|
+
}
|
|
8977
|
+
keys.push.apply(keys, symbols);
|
|
8983
8978
|
}
|
|
8984
|
-
return
|
|
8979
|
+
return keys;
|
|
8985
8980
|
}
|
|
8986
|
-
function _objectSpread2(
|
|
8987
|
-
for (var
|
|
8988
|
-
var
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
})
|
|
8981
|
+
function _objectSpread2(target) {
|
|
8982
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
8983
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
8984
|
+
if (i % 2) {
|
|
8985
|
+
ownKeys(Object(source), true).forEach(function(key) {
|
|
8986
|
+
_defineProperty(target, key, source[key]);
|
|
8987
|
+
});
|
|
8988
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
8989
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8990
|
+
} else {
|
|
8991
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
8992
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8993
|
+
});
|
|
8994
|
+
}
|
|
8994
8995
|
}
|
|
8995
|
-
return
|
|
8996
|
+
return target;
|
|
8996
8997
|
}
|
|
8997
|
-
function
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
8998
|
+
function _typeof(obj) {
|
|
8999
|
+
"@babel/helpers - typeof";
|
|
9000
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
9001
|
+
_typeof = function(obj2) {
|
|
9002
|
+
return typeof obj2;
|
|
9003
|
+
};
|
|
9004
|
+
} else {
|
|
9005
|
+
_typeof = function(obj2) {
|
|
9006
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
9007
|
+
};
|
|
9003
9008
|
}
|
|
9004
|
-
return
|
|
9009
|
+
return _typeof(obj);
|
|
9005
9010
|
}
|
|
9006
|
-
function
|
|
9007
|
-
if (
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9011
|
+
function _defineProperty(obj, key, value) {
|
|
9012
|
+
if (key in obj) {
|
|
9013
|
+
Object.defineProperty(obj, key, {
|
|
9014
|
+
value,
|
|
9015
|
+
enumerable: true,
|
|
9016
|
+
configurable: true,
|
|
9017
|
+
writable: true
|
|
9018
|
+
});
|
|
9019
|
+
} else {
|
|
9020
|
+
obj[key] = value;
|
|
9021
|
+
}
|
|
9022
|
+
return obj;
|
|
9014
9023
|
}
|
|
9015
|
-
function
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
+
function _extends() {
|
|
9025
|
+
_extends = Object.assign || function(target) {
|
|
9026
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
9027
|
+
var source = arguments[i];
|
|
9028
|
+
for (var key in source) {
|
|
9029
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9030
|
+
target[key] = source[key];
|
|
9031
|
+
}
|
|
9032
|
+
}
|
|
9033
|
+
}
|
|
9034
|
+
return target;
|
|
9035
|
+
};
|
|
9036
|
+
return _extends.apply(this, arguments);
|
|
9024
9037
|
}
|
|
9025
|
-
function
|
|
9026
|
-
|
|
9027
|
-
|
|
9038
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
9039
|
+
if (source == null) return {};
|
|
9040
|
+
var target = {};
|
|
9041
|
+
var sourceKeys = Object.keys(source);
|
|
9042
|
+
var key, i;
|
|
9043
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
9044
|
+
key = sourceKeys[i];
|
|
9045
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
9046
|
+
target[key] = source[key];
|
|
9047
|
+
}
|
|
9048
|
+
return target;
|
|
9028
9049
|
}
|
|
9029
|
-
function
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9050
|
+
function _objectWithoutProperties(source, excluded) {
|
|
9051
|
+
if (source == null) return {};
|
|
9052
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
9053
|
+
var key, i;
|
|
9054
|
+
if (Object.getOwnPropertySymbols) {
|
|
9055
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
9056
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
9057
|
+
key = sourceSymbolKeys[i];
|
|
9058
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
9059
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
9060
|
+
target[key] = source[key];
|
|
9061
|
+
}
|
|
9062
|
+
}
|
|
9063
|
+
return target;
|
|
9036
9064
|
}
|
|
9037
|
-
var version = "1.15.
|
|
9065
|
+
var version = "1.15.6";
|
|
9038
9066
|
function userAgent(pattern) {
|
|
9039
9067
|
if (typeof window !== "undefined" && window.navigator) {
|
|
9040
9068
|
return !!/* @__PURE__ */ navigator.userAgent.match(pattern);
|
|
@@ -9075,7 +9103,7 @@ function matches(el, selector) {
|
|
|
9075
9103
|
return false;
|
|
9076
9104
|
}
|
|
9077
9105
|
function getParentOrHost(el) {
|
|
9078
|
-
return el.host && el !== document && el.host.nodeType
|
|
9106
|
+
return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
|
|
9079
9107
|
}
|
|
9080
9108
|
function closest(el, selector, ctx, includeCTX) {
|
|
9081
9109
|
if (el) {
|
|
@@ -10560,11 +10588,8 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
10560
10588
|
_nulling: function _nulling() {
|
|
10561
10589
|
pluginEvent2("nulling", this);
|
|
10562
10590
|
rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
if (el.contains(checkEl)) {
|
|
10566
|
-
checkEl.checked = true;
|
|
10567
|
-
}
|
|
10591
|
+
savedInputChecked.forEach(function(el) {
|
|
10592
|
+
el.checked = true;
|
|
10568
10593
|
});
|
|
10569
10594
|
savedInputChecked.length = lastDx = lastDy = 0;
|
|
10570
10595
|
},
|
|
@@ -11445,12 +11470,16 @@ function useGridColumns({
|
|
|
11445
11470
|
const setViewGetWidth = () => {
|
|
11446
11471
|
instance.columns.forEach((column) => {
|
|
11447
11472
|
column.setViewGetWidth(() => {
|
|
11448
|
-
const index2 = instance.columns.filter((col) => col.isVisible).findIndex((col) => col.name === column.name);
|
|
11449
11473
|
const el = rootEl2.value;
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11474
|
+
if (!el) return 0;
|
|
11475
|
+
const headerColumns = Array.from(el.querySelectorAll("table thead tr th[column-name]"));
|
|
11476
|
+
const namedColumnEl = headerColumns.find((col) => col.getAttribute("column-name") === column.name);
|
|
11477
|
+
if (namedColumnEl) {
|
|
11478
|
+
return parseFloat(getComputedStyle(namedColumnEl).width) || namedColumnEl.clientWidth || 0;
|
|
11479
|
+
}
|
|
11480
|
+
const index2 = instance.columns.filter((col) => col.isVisible).findIndex((col) => col.name === column.name);
|
|
11481
|
+
const indexedColumnEl = el.querySelector(`table thead tr th[index='${index2}']`);
|
|
11482
|
+
return (indexedColumnEl == null ? void 0 : indexedColumnEl.clientWidth) || 0;
|
|
11454
11483
|
});
|
|
11455
11484
|
});
|
|
11456
11485
|
};
|
|
@@ -12159,6 +12188,133 @@ function useGridInstance$1({
|
|
|
12159
12188
|
shouldRender
|
|
12160
12189
|
};
|
|
12161
12190
|
}
|
|
12191
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
12192
|
+
var NAN = 0 / 0;
|
|
12193
|
+
var symbolTag = "[object Symbol]";
|
|
12194
|
+
var reTrim = /^\s+|\s+$/g;
|
|
12195
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
12196
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
12197
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
12198
|
+
var freeParseInt = parseInt;
|
|
12199
|
+
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
12200
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
12201
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
12202
|
+
var objectProto = Object.prototype;
|
|
12203
|
+
var objectToString = objectProto.toString;
|
|
12204
|
+
var nativeMax = Math.max, nativeMin = Math.min;
|
|
12205
|
+
var now = function() {
|
|
12206
|
+
return root.Date.now();
|
|
12207
|
+
};
|
|
12208
|
+
function debounce(func, wait, options) {
|
|
12209
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
12210
|
+
if (typeof func != "function") {
|
|
12211
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
12212
|
+
}
|
|
12213
|
+
wait = toNumber(wait) || 0;
|
|
12214
|
+
if (isObject(options)) {
|
|
12215
|
+
leading = !!options.leading;
|
|
12216
|
+
maxing = "maxWait" in options;
|
|
12217
|
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
12218
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
12219
|
+
}
|
|
12220
|
+
function invokeFunc(time) {
|
|
12221
|
+
var args = lastArgs, thisArg = lastThis;
|
|
12222
|
+
lastArgs = lastThis = void 0;
|
|
12223
|
+
lastInvokeTime = time;
|
|
12224
|
+
result = func.apply(thisArg, args);
|
|
12225
|
+
return result;
|
|
12226
|
+
}
|
|
12227
|
+
function leadingEdge(time) {
|
|
12228
|
+
lastInvokeTime = time;
|
|
12229
|
+
timerId = setTimeout(timerExpired, wait);
|
|
12230
|
+
return leading ? invokeFunc(time) : result;
|
|
12231
|
+
}
|
|
12232
|
+
function remainingWait(time) {
|
|
12233
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall;
|
|
12234
|
+
return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2;
|
|
12235
|
+
}
|
|
12236
|
+
function shouldInvoke(time) {
|
|
12237
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
12238
|
+
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
12239
|
+
}
|
|
12240
|
+
function timerExpired() {
|
|
12241
|
+
var time = now();
|
|
12242
|
+
if (shouldInvoke(time)) {
|
|
12243
|
+
return trailingEdge(time);
|
|
12244
|
+
}
|
|
12245
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
12246
|
+
}
|
|
12247
|
+
function trailingEdge(time) {
|
|
12248
|
+
timerId = void 0;
|
|
12249
|
+
if (trailing && lastArgs) {
|
|
12250
|
+
return invokeFunc(time);
|
|
12251
|
+
}
|
|
12252
|
+
lastArgs = lastThis = void 0;
|
|
12253
|
+
return result;
|
|
12254
|
+
}
|
|
12255
|
+
function cancel() {
|
|
12256
|
+
if (timerId !== void 0) {
|
|
12257
|
+
clearTimeout(timerId);
|
|
12258
|
+
}
|
|
12259
|
+
lastInvokeTime = 0;
|
|
12260
|
+
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
12261
|
+
}
|
|
12262
|
+
function flush() {
|
|
12263
|
+
return timerId === void 0 ? result : trailingEdge(now());
|
|
12264
|
+
}
|
|
12265
|
+
function debounced() {
|
|
12266
|
+
var time = now(), isInvoking = shouldInvoke(time);
|
|
12267
|
+
lastArgs = arguments;
|
|
12268
|
+
lastThis = this;
|
|
12269
|
+
lastCallTime = time;
|
|
12270
|
+
if (isInvoking) {
|
|
12271
|
+
if (timerId === void 0) {
|
|
12272
|
+
return leadingEdge(lastCallTime);
|
|
12273
|
+
}
|
|
12274
|
+
if (maxing) {
|
|
12275
|
+
timerId = setTimeout(timerExpired, wait);
|
|
12276
|
+
return invokeFunc(lastCallTime);
|
|
12277
|
+
}
|
|
12278
|
+
}
|
|
12279
|
+
if (timerId === void 0) {
|
|
12280
|
+
timerId = setTimeout(timerExpired, wait);
|
|
12281
|
+
}
|
|
12282
|
+
return result;
|
|
12283
|
+
}
|
|
12284
|
+
debounced.cancel = cancel;
|
|
12285
|
+
debounced.flush = flush;
|
|
12286
|
+
return debounced;
|
|
12287
|
+
}
|
|
12288
|
+
function isObject(value) {
|
|
12289
|
+
var type = typeof value;
|
|
12290
|
+
return !!value && (type == "object" || type == "function");
|
|
12291
|
+
}
|
|
12292
|
+
function isObjectLike(value) {
|
|
12293
|
+
return !!value && typeof value == "object";
|
|
12294
|
+
}
|
|
12295
|
+
function isSymbol(value) {
|
|
12296
|
+
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
12297
|
+
}
|
|
12298
|
+
function toNumber(value) {
|
|
12299
|
+
if (typeof value == "number") {
|
|
12300
|
+
return value;
|
|
12301
|
+
}
|
|
12302
|
+
if (isSymbol(value)) {
|
|
12303
|
+
return NAN;
|
|
12304
|
+
}
|
|
12305
|
+
if (isObject(value)) {
|
|
12306
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
12307
|
+
value = isObject(other) ? other + "" : other;
|
|
12308
|
+
}
|
|
12309
|
+
if (typeof value != "string") {
|
|
12310
|
+
return value === 0 ? value : +value;
|
|
12311
|
+
}
|
|
12312
|
+
value = value.replace(reTrim, "");
|
|
12313
|
+
var isBinary = reIsBinary.test(value);
|
|
12314
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
12315
|
+
}
|
|
12316
|
+
var lodash_debounce = debounce;
|
|
12317
|
+
const debounce$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_debounce);
|
|
12162
12318
|
const ZdGridEditableProps$1 = buildProps({
|
|
12163
12319
|
...ZdGridProps$1,
|
|
12164
12320
|
doubleClickEdit: {
|
|
@@ -12215,20 +12371,21 @@ function useGridEditableInstance$1({
|
|
|
12215
12371
|
if (isEditing({ row, column })) return;
|
|
12216
12372
|
const key = instance.getRowKey(row);
|
|
12217
12373
|
editingCell.value = { key, column: column.name };
|
|
12218
|
-
|
|
12219
|
-
const key2 = instance.getRowKey(row);
|
|
12220
|
-
try {
|
|
12221
|
-
const component2 = instance.getComponent(String(key2), column.name);
|
|
12222
|
-
component2 == null ? void 0 : component2.setFocus();
|
|
12223
|
-
if (component2 instanceof Toggleable) {
|
|
12224
|
-
component2.toggleValue();
|
|
12225
|
-
component2.change();
|
|
12226
|
-
}
|
|
12227
|
-
} catch (e) {
|
|
12228
|
-
if (!(e instanceof InstanceNotFoundError)) throw e;
|
|
12229
|
-
}
|
|
12230
|
-
});
|
|
12374
|
+
checkToggleComponent(row, column);
|
|
12231
12375
|
};
|
|
12376
|
+
const checkToggleComponent = debounce$1((row, column) => {
|
|
12377
|
+
const key = instance.getRowKey(row);
|
|
12378
|
+
try {
|
|
12379
|
+
const component2 = instance.getComponent(String(key), column.name);
|
|
12380
|
+
component2 == null ? void 0 : component2.setFocus();
|
|
12381
|
+
if (component2 instanceof Toggleable) {
|
|
12382
|
+
component2.toggleValue();
|
|
12383
|
+
component2.change();
|
|
12384
|
+
}
|
|
12385
|
+
} catch (e) {
|
|
12386
|
+
if (!(e instanceof InstanceNotFoundError)) throw e;
|
|
12387
|
+
}
|
|
12388
|
+
});
|
|
12232
12389
|
const viewEnterEdit = (key, columnName) => {
|
|
12233
12390
|
editingCell.value = { key, column: columnName };
|
|
12234
12391
|
const row = instance.findRow(key);
|
|
@@ -12334,7 +12491,7 @@ const gridEditableComponent = defineComponent({
|
|
|
12334
12491
|
}
|
|
12335
12492
|
});
|
|
12336
12493
|
const _hoisted_1$w = ["colspan"];
|
|
12337
|
-
const _hoisted_2$
|
|
12494
|
+
const _hoisted_2$h = ["colspan"];
|
|
12338
12495
|
function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12339
12496
|
const _component_zd_grid_toolbar = resolveComponent("zd-grid-toolbar");
|
|
12340
12497
|
const _component_zd_grid_header_row = resolveComponent("zd-grid-header-row");
|
|
@@ -12455,7 +12612,7 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12455
12612
|
createElementVNode("td", {
|
|
12456
12613
|
colspan: headers.length,
|
|
12457
12614
|
style: normalizeStyle(`padding-top:${_ctx.scrollData.endHeight}px`)
|
|
12458
|
-
}, null, 12, _hoisted_2$
|
|
12615
|
+
}, null, 12, _hoisted_2$h)
|
|
12459
12616
|
])
|
|
12460
12617
|
]),
|
|
12461
12618
|
key: "1"
|
|
@@ -12632,13 +12789,13 @@ const _sfc_main$s = defineComponent({
|
|
|
12632
12789
|
}
|
|
12633
12790
|
});
|
|
12634
12791
|
const _hoisted_1$v = ["tabindex"];
|
|
12635
|
-
const _hoisted_2$
|
|
12792
|
+
const _hoisted_2$g = {
|
|
12636
12793
|
key: 0,
|
|
12637
12794
|
class: /* @__PURE__ */ normalizeClass([
|
|
12638
12795
|
"zd-grid-editable__cell-content"
|
|
12639
12796
|
])
|
|
12640
12797
|
};
|
|
12641
|
-
const _hoisted_3$
|
|
12798
|
+
const _hoisted_3$7 = {
|
|
12642
12799
|
key: 1,
|
|
12643
12800
|
class: "zd-grid__edit-icon"
|
|
12644
12801
|
};
|
|
@@ -12686,13 +12843,13 @@ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12686
12843
|
onDblclick: _cache[6] || (_cache[6] = (...args) => _ctx.dblclick && _ctx.dblclick(...args))
|
|
12687
12844
|
}, [
|
|
12688
12845
|
renderSlot(_ctx.$slots, "prepend"),
|
|
12689
|
-
_ctx.column.type !== "action" ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
12846
|
+
_ctx.column.type !== "action" ? (openBlock(), createElementBlock("span", _hoisted_2$g, [
|
|
12690
12847
|
_ctx.column.loading ? (openBlock(), createBlock(_component_v_skeleton_loader, {
|
|
12691
12848
|
key: 0,
|
|
12692
12849
|
loading: "",
|
|
12693
12850
|
type: "text"
|
|
12694
12851
|
})) : createCommentVNode("", true),
|
|
12695
|
-
_ctx.editable && _ctx.edited ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
12852
|
+
_ctx.editable && _ctx.edited ? (openBlock(), createElementBlock("span", _hoisted_3$7, [
|
|
12696
12853
|
_ctx.valid ? (openBlock(), createBlock(_component_v_icon, {
|
|
12697
12854
|
key: 0,
|
|
12698
12855
|
color: "primary"
|
|
@@ -13163,7 +13320,7 @@ function useGridInstance({
|
|
|
13163
13320
|
};
|
|
13164
13321
|
}
|
|
13165
13322
|
const _hoisted_1$u = ["colspan"];
|
|
13166
|
-
const _hoisted_2$
|
|
13323
|
+
const _hoisted_2$f = ["colspan"];
|
|
13167
13324
|
function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13168
13325
|
const _component_zd_grid_toolbar = resolveComponent("zd-grid-toolbar");
|
|
13169
13326
|
const _component_zd_grid_header_row = resolveComponent("zd-grid-header-row");
|
|
@@ -13283,7 +13440,7 @@ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13283
13440
|
createElementVNode("td", {
|
|
13284
13441
|
colspan: headers.length,
|
|
13285
13442
|
style: normalizeStyle(`padding-top:${_ctx.scrollData.endHeight}px`)
|
|
13286
|
-
}, null, 12, _hoisted_2$
|
|
13443
|
+
}, null, 12, _hoisted_2$f)
|
|
13287
13444
|
])
|
|
13288
13445
|
]),
|
|
13289
13446
|
key: "1"
|
|
@@ -14227,7 +14384,7 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14227
14384
|
}, null, 8, ["disabled", "isSelected", "cellSelection", "isCurrent"])) : createCommentVNode("", true),
|
|
14228
14385
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (column, index2, ___, _cached) => {
|
|
14229
14386
|
const _memo = [_ctx.row, column, _ctx.fixedLeft, _ctx.fixedRight, _ctx.cellSelection, _ctx.isCurrent({ row: _ctx.row, column })];
|
|
14230
|
-
if (_cached && _cached.
|
|
14387
|
+
if (_cached && _cached.key === column.name && isMemoSame(_cached, _memo)) return _cached;
|
|
14231
14388
|
const _item = (openBlock(), createBlock(_component_zd_grid_cell, {
|
|
14232
14389
|
key: column.name,
|
|
14233
14390
|
row: _ctx.row,
|
|
@@ -14275,7 +14432,7 @@ const _sfc_main$f = defineComponent({
|
|
|
14275
14432
|
}
|
|
14276
14433
|
});
|
|
14277
14434
|
const _hoisted_1$m = ["id"];
|
|
14278
|
-
const _hoisted_2$
|
|
14435
|
+
const _hoisted_2$e = { class: "zd-grid__toolbar-content" };
|
|
14279
14436
|
function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14280
14437
|
return _ctx.instance.toolbarSlot.length || _ctx.hasDefaultSlot ? (openBlock(), createElementBlock("div", {
|
|
14281
14438
|
key: 0,
|
|
@@ -14283,7 +14440,7 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14283
14440
|
ref: "header",
|
|
14284
14441
|
class: "zd-grid__toolbar"
|
|
14285
14442
|
}, [
|
|
14286
|
-
createElementVNode("div", _hoisted_2$
|
|
14443
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
14287
14444
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.toolbarSlot, (child) => {
|
|
14288
14445
|
return openBlock(), createBlock(resolveDynamicComponent(child.component), mergeProps({
|
|
14289
14446
|
key: child.name,
|
|
@@ -14387,12 +14544,12 @@ const _hoisted_1$l = {
|
|
|
14387
14544
|
key: 0,
|
|
14388
14545
|
class: "zd-header-slot-left"
|
|
14389
14546
|
};
|
|
14390
|
-
const _hoisted_2$
|
|
14547
|
+
const _hoisted_2$d = {
|
|
14391
14548
|
key: 1,
|
|
14392
14549
|
class: "zd-header-slot-center",
|
|
14393
14550
|
ref: "centerSlot"
|
|
14394
14551
|
};
|
|
14395
|
-
const _hoisted_3$
|
|
14552
|
+
const _hoisted_3$6 = {
|
|
14396
14553
|
key: 2,
|
|
14397
14554
|
class: "zd-header-slot-right"
|
|
14398
14555
|
};
|
|
@@ -14447,7 +14604,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14447
14604
|
}), 128)) : createCommentVNode("", true),
|
|
14448
14605
|
renderSlot(_ctx.$slots, "leftSlot")
|
|
14449
14606
|
])) : createCommentVNode("", true),
|
|
14450
|
-
_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, [
|
|
14451
14608
|
!_ctx.$slots.centerSlot ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.instance.centerSlot, (child, index2) => {
|
|
14452
14609
|
return openBlock(), createElementBlock("span", {
|
|
14453
14610
|
key: child.name,
|
|
@@ -14458,7 +14615,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14458
14615
|
}), 128)) : createCommentVNode("", true),
|
|
14459
14616
|
renderSlot(_ctx.$slots, "centerSlot")
|
|
14460
14617
|
], 512)) : createCommentVNode("", true),
|
|
14461
|
-
_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, [
|
|
14462
14619
|
!_ctx.$slots.rightSlot ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.instance.rightSlot, (child, index2) => {
|
|
14463
14620
|
return openBlock(), createElementBlock("span", {
|
|
14464
14621
|
key: child.name,
|
|
@@ -14835,11 +14992,11 @@ const iterableComponentRender = defineComponent({
|
|
|
14835
14992
|
}
|
|
14836
14993
|
});
|
|
14837
14994
|
const _hoisted_1$j = ["id"];
|
|
14838
|
-
const _hoisted_2$
|
|
14995
|
+
const _hoisted_2$c = {
|
|
14839
14996
|
key: 0,
|
|
14840
14997
|
class: "zd-iterable-toolbar"
|
|
14841
14998
|
};
|
|
14842
|
-
const _hoisted_3$
|
|
14999
|
+
const _hoisted_3$5 = { class: "zd-iterable-toolbar-slot" };
|
|
14843
15000
|
const _hoisted_4$2 = { class: "zd-iterable-content" };
|
|
14844
15001
|
const _hoisted_5$2 = { class: "zd-display-flex zd-flex-wrap" };
|
|
14845
15002
|
const _hoisted_6$2 = {
|
|
@@ -14867,8 +15024,8 @@ function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14867
15024
|
..._ctx.$styleObject(_ctx.instance.cssStyle)
|
|
14868
15025
|
})
|
|
14869
15026
|
}, [
|
|
14870
|
-
_ctx.instance.toolbarSlot.length || !!_ctx.$slots.toolbarSlot ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
14871
|
-
createElementVNode("div", _hoisted_3$
|
|
15027
|
+
_ctx.instance.toolbarSlot.length || !!_ctx.$slots.toolbarSlot ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
|
|
15028
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
14872
15029
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.toolbarSlot, (child) => {
|
|
14873
15030
|
return openBlock(), createBlock(resolveDynamicComponent(child.component), mergeProps({
|
|
14874
15031
|
key: child.name,
|
|
@@ -14955,7 +15112,7 @@ const _sfc_main$d = defineComponent({
|
|
|
14955
15112
|
}
|
|
14956
15113
|
});
|
|
14957
15114
|
const _hoisted_1$i = ["id"];
|
|
14958
|
-
const _hoisted_2$
|
|
15115
|
+
const _hoisted_2$b = {
|
|
14959
15116
|
key: 1,
|
|
14960
15117
|
class: "error--text"
|
|
14961
15118
|
};
|
|
@@ -14971,7 +15128,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14971
15128
|
parent: _ctx.instance
|
|
14972
15129
|
}, { ref_for: true }, child), null, 16, ["parent"]);
|
|
14973
15130
|
}), 128)) : createCommentVNode("", true),
|
|
14974
|
-
_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)
|
|
14975
15132
|
], 64)) : !_ctx.instance.datasource.data.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14976
15133
|
_ctx.instance.datasource.search ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
14977
15134
|
renderSlot(_ctx.$slots, "noResultSlot"),
|
|
@@ -15282,6 +15439,11 @@ function useSelect$1(instance, ctx, root2) {
|
|
|
15282
15439
|
const rootElement = getRootElement(root2);
|
|
15283
15440
|
instance.keydown(event, rootElement.value);
|
|
15284
15441
|
};
|
|
15442
|
+
const selectClear = () => {
|
|
15443
|
+
if (!instance.autocomplete) {
|
|
15444
|
+
textInputScope.input();
|
|
15445
|
+
}
|
|
15446
|
+
};
|
|
15285
15447
|
const autoSelectFirst = computed(() => instance.autoSelection && items.value.length === 1);
|
|
15286
15448
|
const menuClass = computed(() => {
|
|
15287
15449
|
const align = instance.reverse ? "right" : instance.align;
|
|
@@ -15306,6 +15468,7 @@ function useSelect$1(instance, ctx, root2) {
|
|
|
15306
15468
|
selectChange,
|
|
15307
15469
|
selectInput,
|
|
15308
15470
|
selectKeydown,
|
|
15471
|
+
selectClear,
|
|
15309
15472
|
hasItemBeforeSlot,
|
|
15310
15473
|
hasItemAfterSlot,
|
|
15311
15474
|
onLoadMoreIntersect,
|
|
@@ -15891,7 +16054,7 @@ const _hoisted_1$g = {
|
|
|
15891
16054
|
key: 0,
|
|
15892
16055
|
class: "v-list-item__icon"
|
|
15893
16056
|
};
|
|
15894
|
-
const _hoisted_2$
|
|
16057
|
+
const _hoisted_2$a = {
|
|
15895
16058
|
key: 0,
|
|
15896
16059
|
class: "v-list-item__icon"
|
|
15897
16060
|
};
|
|
@@ -15926,7 +16089,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15926
16089
|
])) : createCommentVNode("", true)
|
|
15927
16090
|
]),
|
|
15928
16091
|
append: withCtx(() => [
|
|
15929
|
-
_ctx.instance.rightField || _ctx.instance.appendIcon ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
16092
|
+
_ctx.instance.rightField || _ctx.instance.appendIcon ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
|
|
15930
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 }, {
|
|
15931
16094
|
default: withCtx(() => [
|
|
15932
16095
|
createTextVNode(toDisplayString(_ctx.$getIcon(_ctx.instance.appendIcon)), 1)
|
|
@@ -16001,11 +16164,11 @@ const _hoisted_1$f = {
|
|
|
16001
16164
|
ref: "root",
|
|
16002
16165
|
class: "test"
|
|
16003
16166
|
};
|
|
16004
|
-
const _hoisted_2$
|
|
16167
|
+
const _hoisted_2$9 = {
|
|
16005
16168
|
key: 0,
|
|
16006
16169
|
class: "center-div"
|
|
16007
16170
|
};
|
|
16008
|
-
const _hoisted_3$
|
|
16171
|
+
const _hoisted_3$4 = ["innerHTML"];
|
|
16009
16172
|
function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16010
16173
|
const _component_v_progress_circular = resolveComponent("v-progress-circular");
|
|
16011
16174
|
const _component_v_img = resolveComponent("v-img");
|
|
@@ -16023,7 +16186,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16023
16186
|
theme: _ctx.loading.theme
|
|
16024
16187
|
}, {
|
|
16025
16188
|
default: withCtx(() => [
|
|
16026
|
-
_ctx.loading.isVisible ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
16189
|
+
_ctx.loading.isVisible ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
|
|
16027
16190
|
!_ctx.image ? (openBlock(), createBlock(_component_v_progress_circular, {
|
|
16028
16191
|
key: 0,
|
|
16029
16192
|
indeterminate: "",
|
|
@@ -16040,7 +16203,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16040
16203
|
innerHTML: _ctx.$sanitize(_ctx.$t(_ctx.loading.text)),
|
|
16041
16204
|
class: "zd-loading__text",
|
|
16042
16205
|
style: normalizeStyle("color: " + _ctx.textColor + ";")
|
|
16043
|
-
}, null, 12, _hoisted_3$
|
|
16206
|
+
}, null, 12, _hoisted_3$4)
|
|
16044
16207
|
])) : createCommentVNode("", true)
|
|
16045
16208
|
]),
|
|
16046
16209
|
_: 1
|
|
@@ -16113,8 +16276,8 @@ const loginComponent = defineComponent({
|
|
|
16113
16276
|
}
|
|
16114
16277
|
});
|
|
16115
16278
|
const _hoisted_1$e = ["id", "name"];
|
|
16116
|
-
const _hoisted_2$
|
|
16117
|
-
const _hoisted_3$
|
|
16279
|
+
const _hoisted_2$8 = { class: "zd-login-toolbar" };
|
|
16280
|
+
const _hoisted_3$3 = ["src"];
|
|
16118
16281
|
const _hoisted_4$1 = { class: "zd-login-message" };
|
|
16119
16282
|
const _hoisted_5$1 = {
|
|
16120
16283
|
key: 0,
|
|
@@ -16159,11 +16322,11 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16159
16322
|
light: _ctx.instance.light
|
|
16160
16323
|
}, {
|
|
16161
16324
|
default: withCtx(() => [
|
|
16162
|
-
createElementVNode("div", _hoisted_2$
|
|
16325
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
16163
16326
|
createElementVNode("img", {
|
|
16164
16327
|
class: "zd-login-logo",
|
|
16165
16328
|
src: _ctx.instance.logo
|
|
16166
|
-
}, null, 8, _hoisted_3$
|
|
16329
|
+
}, null, 8, _hoisted_3$3),
|
|
16167
16330
|
createElementVNode("div", _hoisted_4$1, toDisplayString(_ctx.$t(_ctx.instance.logoMessage)), 1)
|
|
16168
16331
|
]),
|
|
16169
16332
|
createVNode(_component_v_form, null, {
|
|
@@ -16384,133 +16547,6 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16384
16547
|
]);
|
|
16385
16548
|
}
|
|
16386
16549
|
const ZdMasterDetail = /* @__PURE__ */ _export_sfc(masterDetailComponent, [["render", _sfc_render$y]]);
|
|
16387
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
16388
|
-
var NAN = 0 / 0;
|
|
16389
|
-
var symbolTag = "[object Symbol]";
|
|
16390
|
-
var reTrim = /^\s+|\s+$/g;
|
|
16391
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
16392
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
16393
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
16394
|
-
var freeParseInt = parseInt;
|
|
16395
|
-
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
16396
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
16397
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
16398
|
-
var objectProto = Object.prototype;
|
|
16399
|
-
var objectToString = objectProto.toString;
|
|
16400
|
-
var nativeMax = Math.max, nativeMin = Math.min;
|
|
16401
|
-
var now = function() {
|
|
16402
|
-
return root.Date.now();
|
|
16403
|
-
};
|
|
16404
|
-
function debounce(func, wait, options) {
|
|
16405
|
-
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
16406
|
-
if (typeof func != "function") {
|
|
16407
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
16408
|
-
}
|
|
16409
|
-
wait = toNumber(wait) || 0;
|
|
16410
|
-
if (isObject(options)) {
|
|
16411
|
-
leading = !!options.leading;
|
|
16412
|
-
maxing = "maxWait" in options;
|
|
16413
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
16414
|
-
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
16415
|
-
}
|
|
16416
|
-
function invokeFunc(time) {
|
|
16417
|
-
var args = lastArgs, thisArg = lastThis;
|
|
16418
|
-
lastArgs = lastThis = void 0;
|
|
16419
|
-
lastInvokeTime = time;
|
|
16420
|
-
result = func.apply(thisArg, args);
|
|
16421
|
-
return result;
|
|
16422
|
-
}
|
|
16423
|
-
function leadingEdge(time) {
|
|
16424
|
-
lastInvokeTime = time;
|
|
16425
|
-
timerId = setTimeout(timerExpired, wait);
|
|
16426
|
-
return leading ? invokeFunc(time) : result;
|
|
16427
|
-
}
|
|
16428
|
-
function remainingWait(time) {
|
|
16429
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall;
|
|
16430
|
-
return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2;
|
|
16431
|
-
}
|
|
16432
|
-
function shouldInvoke(time) {
|
|
16433
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
16434
|
-
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
16435
|
-
}
|
|
16436
|
-
function timerExpired() {
|
|
16437
|
-
var time = now();
|
|
16438
|
-
if (shouldInvoke(time)) {
|
|
16439
|
-
return trailingEdge(time);
|
|
16440
|
-
}
|
|
16441
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
16442
|
-
}
|
|
16443
|
-
function trailingEdge(time) {
|
|
16444
|
-
timerId = void 0;
|
|
16445
|
-
if (trailing && lastArgs) {
|
|
16446
|
-
return invokeFunc(time);
|
|
16447
|
-
}
|
|
16448
|
-
lastArgs = lastThis = void 0;
|
|
16449
|
-
return result;
|
|
16450
|
-
}
|
|
16451
|
-
function cancel() {
|
|
16452
|
-
if (timerId !== void 0) {
|
|
16453
|
-
clearTimeout(timerId);
|
|
16454
|
-
}
|
|
16455
|
-
lastInvokeTime = 0;
|
|
16456
|
-
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
16457
|
-
}
|
|
16458
|
-
function flush() {
|
|
16459
|
-
return timerId === void 0 ? result : trailingEdge(now());
|
|
16460
|
-
}
|
|
16461
|
-
function debounced() {
|
|
16462
|
-
var time = now(), isInvoking = shouldInvoke(time);
|
|
16463
|
-
lastArgs = arguments;
|
|
16464
|
-
lastThis = this;
|
|
16465
|
-
lastCallTime = time;
|
|
16466
|
-
if (isInvoking) {
|
|
16467
|
-
if (timerId === void 0) {
|
|
16468
|
-
return leadingEdge(lastCallTime);
|
|
16469
|
-
}
|
|
16470
|
-
if (maxing) {
|
|
16471
|
-
timerId = setTimeout(timerExpired, wait);
|
|
16472
|
-
return invokeFunc(lastCallTime);
|
|
16473
|
-
}
|
|
16474
|
-
}
|
|
16475
|
-
if (timerId === void 0) {
|
|
16476
|
-
timerId = setTimeout(timerExpired, wait);
|
|
16477
|
-
}
|
|
16478
|
-
return result;
|
|
16479
|
-
}
|
|
16480
|
-
debounced.cancel = cancel;
|
|
16481
|
-
debounced.flush = flush;
|
|
16482
|
-
return debounced;
|
|
16483
|
-
}
|
|
16484
|
-
function isObject(value) {
|
|
16485
|
-
var type = typeof value;
|
|
16486
|
-
return !!value && (type == "object" || type == "function");
|
|
16487
|
-
}
|
|
16488
|
-
function isObjectLike(value) {
|
|
16489
|
-
return !!value && typeof value == "object";
|
|
16490
|
-
}
|
|
16491
|
-
function isSymbol(value) {
|
|
16492
|
-
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
16493
|
-
}
|
|
16494
|
-
function toNumber(value) {
|
|
16495
|
-
if (typeof value == "number") {
|
|
16496
|
-
return value;
|
|
16497
|
-
}
|
|
16498
|
-
if (isSymbol(value)) {
|
|
16499
|
-
return NAN;
|
|
16500
|
-
}
|
|
16501
|
-
if (isObject(value)) {
|
|
16502
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
16503
|
-
value = isObject(other) ? other + "" : other;
|
|
16504
|
-
}
|
|
16505
|
-
if (typeof value != "string") {
|
|
16506
|
-
return value === 0 ? value : +value;
|
|
16507
|
-
}
|
|
16508
|
-
value = value.replace(reTrim, "");
|
|
16509
|
-
var isBinary = reIsBinary.test(value);
|
|
16510
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
16511
|
-
}
|
|
16512
|
-
var lodash_debounce = debounce;
|
|
16513
|
-
const debounce$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_debounce);
|
|
16514
16550
|
const ZdMenuProps$1 = buildProps({
|
|
16515
16551
|
...ZdComponentRenderProps,
|
|
16516
16552
|
app: {
|
|
@@ -16780,7 +16816,7 @@ const menuComponent = defineComponent({
|
|
|
16780
16816
|
}
|
|
16781
16817
|
});
|
|
16782
16818
|
const _hoisted_1$c = ["id"];
|
|
16783
|
-
const _hoisted_2$
|
|
16819
|
+
const _hoisted_2$7 = {
|
|
16784
16820
|
key: 0,
|
|
16785
16821
|
class: "zd-menu-top-slot"
|
|
16786
16822
|
};
|
|
@@ -16839,7 +16875,7 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16839
16875
|
theme: _ctx.menuTheme
|
|
16840
16876
|
}, {
|
|
16841
16877
|
default: withCtx(() => [
|
|
16842
|
-
_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, [
|
|
16843
16879
|
_ctx.instance.showSearch ? (openBlock(), createBlock(_component_zd_text_input, normalizeProps(mergeProps({ key: 0 }, _ctx.searchInputProps)), null, 16)) : createCommentVNode("", true),
|
|
16844
16880
|
!_ctx.$slots.topSlot ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.instance.topSlot, (item, i) => {
|
|
16845
16881
|
return openBlock(), createBlock(resolveDynamicComponent(item.component), mergeProps({
|
|
@@ -17861,6 +17897,7 @@ defineComponent({
|
|
|
17861
17897
|
instance.showDatePicker = false;
|
|
17862
17898
|
}
|
|
17863
17899
|
instance.validate();
|
|
17900
|
+
instance.change();
|
|
17864
17901
|
};
|
|
17865
17902
|
const helperValuesOptionClick = (helper) => {
|
|
17866
17903
|
const value = DateHelper.getValue(helper, instance.dateFormat);
|
|
@@ -18596,7 +18633,7 @@ const selectMultipleComponent = defineComponent({
|
|
|
18596
18633
|
};
|
|
18597
18634
|
const removeItem = (item) => {
|
|
18598
18635
|
const rootValue = root2.value;
|
|
18599
|
-
rootValue.select(item
|
|
18636
|
+
rootValue.select(item, false);
|
|
18600
18637
|
};
|
|
18601
18638
|
const selectChange = (value, event) => {
|
|
18602
18639
|
const input = getRootElement(root2);
|
|
@@ -18606,6 +18643,19 @@ const selectMultipleComponent = defineComponent({
|
|
|
18606
18643
|
input.value
|
|
18607
18644
|
);
|
|
18608
18645
|
};
|
|
18646
|
+
const selectClear = () => {
|
|
18647
|
+
const input = getRootElement(root2);
|
|
18648
|
+
const hasSelectedValue = Array.isArray(instance.value) && instance.value.length > 0;
|
|
18649
|
+
const hasSearchText = !!instance.search;
|
|
18650
|
+
if (hasSelectedValue) {
|
|
18651
|
+
instance.selectChange([], void 0, input.value);
|
|
18652
|
+
}
|
|
18653
|
+
if (hasSearchText) {
|
|
18654
|
+
selectScope.selectInput("");
|
|
18655
|
+
} else {
|
|
18656
|
+
instance.search = "";
|
|
18657
|
+
}
|
|
18658
|
+
};
|
|
18609
18659
|
let observer;
|
|
18610
18660
|
onMounted(() => {
|
|
18611
18661
|
const componentRef = getRootElement(root2);
|
|
@@ -18637,6 +18687,7 @@ const selectMultipleComponent = defineComponent({
|
|
|
18637
18687
|
selectClick,
|
|
18638
18688
|
selectBlur,
|
|
18639
18689
|
selectChange,
|
|
18690
|
+
selectClear,
|
|
18640
18691
|
formattedDataDiscreteText,
|
|
18641
18692
|
ajustSize,
|
|
18642
18693
|
onLoadMoreIntersect,
|
|
@@ -18647,11 +18698,12 @@ const selectMultipleComponent = defineComponent({
|
|
|
18647
18698
|
}
|
|
18648
18699
|
});
|
|
18649
18700
|
const _hoisted_1$a = { class: "chip-text" };
|
|
18650
|
-
const _hoisted_2$
|
|
18701
|
+
const _hoisted_2$6 = {
|
|
18651
18702
|
key: 1,
|
|
18652
18703
|
class: "more-items grey--text caption"
|
|
18653
18704
|
};
|
|
18654
18705
|
function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18706
|
+
const _component_v_icon = resolveComponent("v-icon");
|
|
18655
18707
|
const _component_v_checkbox_btn = resolveComponent("v-checkbox-btn");
|
|
18656
18708
|
const _component_v_list_item_title = resolveComponent("v-list-item-title");
|
|
18657
18709
|
const _component_v_list_item = resolveComponent("v-list-item");
|
|
@@ -18736,6 +18788,14 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18736
18788
|
onKeyup: _cache[19] || (_cache[19] = ($event) => _ctx.instance.keyup($event)),
|
|
18737
18789
|
onKeydown: _cache[20] || (_cache[20] = ($event) => _ctx.instance.keydown($event))
|
|
18738
18790
|
}, toHandlers(_ctx.getIconClickEvents())), createSlots({
|
|
18791
|
+
clear: withCtx(({ props }) => [
|
|
18792
|
+
createVNode(_component_v_icon, {
|
|
18793
|
+
tabindex: props.tabindex,
|
|
18794
|
+
onFocus: props.onFocus,
|
|
18795
|
+
onBlur: props.onBlur,
|
|
18796
|
+
onClick: _ctx.selectClear
|
|
18797
|
+
}, null, 8, ["tabindex", "onFocus", "onBlur", "onClick"])
|
|
18798
|
+
]),
|
|
18739
18799
|
item: withCtx(({ item, props }) => [
|
|
18740
18800
|
createVNode(_component_v_list_item, mergeProps({
|
|
18741
18801
|
class: "zd-select__menu-item zd-select-multiple__menu-item",
|
|
@@ -18786,7 +18846,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18786
18846
|
]),
|
|
18787
18847
|
_: 2
|
|
18788
18848
|
}, 1032, ["size", "disabled", "density", "onClick:close"])) : createCommentVNode("", true),
|
|
18789
|
-
_ctx.isMoreVisible(index2) ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
18849
|
+
_ctx.isMoreVisible(index2) ? (openBlock(), createElementBlock("span", _hoisted_2$6, toDisplayString(_ctx.moreItemsText), 1)) : createCommentVNode("", true)
|
|
18790
18850
|
]),
|
|
18791
18851
|
"append-item": withCtx(() => [
|
|
18792
18852
|
_ctx.instance.itemAfterSlot.length || _ctx.hasItemAfterSlot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -19075,6 +19135,11 @@ function useSelect(instance, ctx, root2) {
|
|
|
19075
19135
|
const rootElement = getRootElement(root2);
|
|
19076
19136
|
instance.keydown(event, rootElement.value);
|
|
19077
19137
|
};
|
|
19138
|
+
const selectClear = () => {
|
|
19139
|
+
if (!instance.autocomplete) {
|
|
19140
|
+
textInputScope.input();
|
|
19141
|
+
}
|
|
19142
|
+
};
|
|
19078
19143
|
const autoSelectFirst = computed(() => instance.autoSelection && items.value.length === 1);
|
|
19079
19144
|
const menuClass = computed(() => {
|
|
19080
19145
|
const align = instance.reverse ? "right" : instance.align;
|
|
@@ -19099,6 +19164,7 @@ function useSelect(instance, ctx, root2) {
|
|
|
19099
19164
|
selectChange,
|
|
19100
19165
|
selectInput,
|
|
19101
19166
|
selectKeydown,
|
|
19167
|
+
selectClear,
|
|
19102
19168
|
hasItemBeforeSlot,
|
|
19103
19169
|
hasItemAfterSlot,
|
|
19104
19170
|
onLoadMoreIntersect,
|
|
@@ -19176,11 +19242,12 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19176
19242
|
onMouseenter: _cache[2] || (_cache[2] = ($event) => _ctx.mouseenter($event)),
|
|
19177
19243
|
onMouseleave: _cache[3] || (_cache[3] = ($event) => _ctx.mouseleave($event)),
|
|
19178
19244
|
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.click($event)),
|
|
19179
|
-
|
|
19180
|
-
|
|
19181
|
-
|
|
19182
|
-
|
|
19183
|
-
|
|
19245
|
+
"onClick:clear": _cache[6] || (_cache[6] = ($event) => _ctx.selectClear()),
|
|
19246
|
+
onBlur: _cache[7] || (_cache[7] = ($event) => _ctx.blur($event)),
|
|
19247
|
+
onFocus: _cache[8] || (_cache[8] = ($event) => _ctx.focus($event)),
|
|
19248
|
+
"onUpdate:search": _cache[9] || (_cache[9] = ($event) => _ctx.selectInput($event)),
|
|
19249
|
+
onKeyup: _cache[10] || (_cache[10] = ($event) => _ctx.instance.keyup($event)),
|
|
19250
|
+
onKeydown: _cache[11] || (_cache[11] = ($event) => _ctx.selectKeydown($event))
|
|
19184
19251
|
}, toHandlers(_ctx.getIconClickEvents())), createSlots({
|
|
19185
19252
|
item: withCtx(({ item, props }) => [
|
|
19186
19253
|
createVNode(_component_v_list_item, mergeProps({
|
|
@@ -19475,7 +19542,7 @@ const _sfc_main$5 = defineComponent({
|
|
|
19475
19542
|
}
|
|
19476
19543
|
});
|
|
19477
19544
|
const _hoisted_1$9 = ["id", "name"];
|
|
19478
|
-
const _hoisted_2$
|
|
19545
|
+
const _hoisted_2$5 = {
|
|
19479
19546
|
class: "zd-svg-map__container",
|
|
19480
19547
|
ref: "container"
|
|
19481
19548
|
};
|
|
@@ -19509,7 +19576,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19509
19576
|
onMouseenter: _cache[1] || (_cache[1] = ($event) => _ctx.mouseenter($event)),
|
|
19510
19577
|
onMouseleave: _cache[2] || (_cache[2] = ($event) => _ctx.mouseleave($event))
|
|
19511
19578
|
}, [
|
|
19512
|
-
createElementVNode("div", _hoisted_2$
|
|
19579
|
+
createElementVNode("div", _hoisted_2$5, null, 512),
|
|
19513
19580
|
_ctx.instance.tooltipData && _ctx.tooltipContent ? withDirectives((openBlock(), createBlock(_component_v_card, {
|
|
19514
19581
|
key: 0,
|
|
19515
19582
|
class: "zd-svg-map__tooltip",
|
|
@@ -19651,8 +19718,8 @@ const tableComponent = defineComponent({
|
|
|
19651
19718
|
}
|
|
19652
19719
|
});
|
|
19653
19720
|
const _hoisted_1$8 = ["id"];
|
|
19654
|
-
const _hoisted_2$
|
|
19655
|
-
const _hoisted_3$
|
|
19721
|
+
const _hoisted_2$4 = { key: 1 };
|
|
19722
|
+
const _hoisted_3$2 = ["innerHTML"];
|
|
19656
19723
|
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19657
19724
|
return openBlock(), createElementBlock("div", {
|
|
19658
19725
|
ref: "root",
|
|
@@ -19678,7 +19745,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19678
19745
|
key: 0,
|
|
19679
19746
|
class: normalizeClass(["zd-table-caption", `text-${_ctx.instance.caption.align}`])
|
|
19680
19747
|
}, toDisplayString(_ctx.$t(_ctx.instance.caption.label)), 3)) : createCommentVNode("", true),
|
|
19681
|
-
_ctx.instance.showTableHead ? (openBlock(), createElementBlock("thead", _hoisted_2$
|
|
19748
|
+
_ctx.instance.showTableHead ? (openBlock(), createElementBlock("thead", _hoisted_2$4, [
|
|
19682
19749
|
createElementVNode("tr", null, [
|
|
19683
19750
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.columns, (column, index2) => {
|
|
19684
19751
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -19702,7 +19769,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19702
19769
|
key: index2,
|
|
19703
19770
|
class: normalizeClass([`text-${column.align}`]),
|
|
19704
19771
|
style: normalizeStyle(`min-width: ${column.minWidth}; max-width: ${column.maxWidth};`)
|
|
19705
|
-
}, null, 14, _hoisted_3$
|
|
19772
|
+
}, null, 14, _hoisted_3$2)) : createCommentVNode("", true)
|
|
19706
19773
|
], 64);
|
|
19707
19774
|
}), 256))
|
|
19708
19775
|
]);
|
|
@@ -19723,9 +19790,6 @@ const ZdTabProps$1 = buildProps({
|
|
|
19723
19790
|
tabTitle: {
|
|
19724
19791
|
type: [String]
|
|
19725
19792
|
},
|
|
19726
|
-
tabName: {
|
|
19727
|
-
type: [String]
|
|
19728
|
-
},
|
|
19729
19793
|
color: {
|
|
19730
19794
|
type: [String],
|
|
19731
19795
|
default: "primary"
|
|
@@ -19772,15 +19836,41 @@ const tabComponent = defineComponent({
|
|
|
19772
19836
|
const { instance, root: root2 } = useCreateInstance(props, ctx, Tab, ZdTabProps$1);
|
|
19773
19837
|
const { density } = useDensity({ instance });
|
|
19774
19838
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root2);
|
|
19839
|
+
const isDragging = ref(false);
|
|
19775
19840
|
const clickTab = (event) => {
|
|
19776
19841
|
ctx.emit("click", event);
|
|
19777
19842
|
};
|
|
19778
19843
|
const keydown = (event) => {
|
|
19779
19844
|
ctx.emit("keydown", event);
|
|
19780
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
|
+
};
|
|
19781
19869
|
return {
|
|
19782
19870
|
instance,
|
|
19783
19871
|
root: root2,
|
|
19872
|
+
density,
|
|
19873
|
+
sortable,
|
|
19784
19874
|
click,
|
|
19785
19875
|
focus,
|
|
19786
19876
|
blur,
|
|
@@ -19789,7 +19879,8 @@ const tabComponent = defineComponent({
|
|
|
19789
19879
|
// methods
|
|
19790
19880
|
clickTab,
|
|
19791
19881
|
keydown,
|
|
19792
|
-
|
|
19882
|
+
handleDragStart,
|
|
19883
|
+
handleDragEnd
|
|
19793
19884
|
};
|
|
19794
19885
|
}
|
|
19795
19886
|
});
|
|
@@ -19799,9 +19890,11 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19799
19890
|
return withDirectives((openBlock(), createBlock(_component_v_tab, {
|
|
19800
19891
|
id: _ctx.instance.name,
|
|
19801
19892
|
ref: "root",
|
|
19802
|
-
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
|
+
}]),
|
|
19803
19896
|
style: normalizeStyle(_ctx.$styleObject(_ctx.instance.cssStyle)),
|
|
19804
|
-
name: _ctx.instance.
|
|
19897
|
+
name: _ctx.instance.tabTitle,
|
|
19805
19898
|
disabled: _ctx.instance.disabled,
|
|
19806
19899
|
theme: _ctx.instance.theme,
|
|
19807
19900
|
color: _ctx.instance.color,
|
|
@@ -19811,25 +19904,28 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19811
19904
|
iconName: _ctx.instance.iconName,
|
|
19812
19905
|
rounded: _ctx.instance.rounded,
|
|
19813
19906
|
"selected-class": "v-tab--selected " + _ctx.instance.selectedClass,
|
|
19814
|
-
value: _ctx.instance.value,
|
|
19907
|
+
value: _ctx.instance.name || _ctx.instance.value,
|
|
19815
19908
|
variant: _ctx.instance.variant,
|
|
19816
19909
|
width: _ctx.instance.width,
|
|
19910
|
+
draggable: _ctx.sortable,
|
|
19817
19911
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.clickTab($event)),
|
|
19818
|
-
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
|
|
19819
19915
|
}, {
|
|
19820
19916
|
default: withCtx(() => [
|
|
19821
19917
|
createElementVNode("span", _hoisted_1$7, toDisplayString(_ctx.$t(_ctx.instance.tabTitle)), 1)
|
|
19822
19918
|
]),
|
|
19823
19919
|
_: 1
|
|
19824
|
-
}, 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"])), [
|
|
19825
19921
|
[vShow, _ctx.instance.isVisible]
|
|
19826
19922
|
]);
|
|
19827
19923
|
}
|
|
19828
19924
|
const ZdTab = /* @__PURE__ */ _export_sfc(tabComponent, [["render", _sfc_render$e]]);
|
|
19829
19925
|
const ZdTabItemProps$1 = buildProps({
|
|
19830
19926
|
...ZdComponentRenderProps,
|
|
19831
|
-
|
|
19832
|
-
type: [
|
|
19927
|
+
value: {
|
|
19928
|
+
type: [String]
|
|
19833
19929
|
},
|
|
19834
19930
|
lazyLoad: {
|
|
19835
19931
|
type: [Boolean]
|
|
@@ -19844,7 +19940,9 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19844
19940
|
const _component_v_tabs_window_item = resolveComponent("v-tabs-window-item");
|
|
19845
19941
|
return withDirectives((openBlock(), createBlock(_component_v_tabs_window_item, {
|
|
19846
19942
|
class: "zd-tabs-tab-item",
|
|
19847
|
-
value: _ctx.
|
|
19943
|
+
value: _ctx.value,
|
|
19944
|
+
transition: false,
|
|
19945
|
+
"reverse-transition": false
|
|
19848
19946
|
}, {
|
|
19849
19947
|
default: withCtx(() => [
|
|
19850
19948
|
createVNode(_component_v_container, { fluid: "" }, {
|
|
@@ -19904,6 +20002,10 @@ const ZdTabsProps$1 = buildProps({
|
|
|
19904
20002
|
},
|
|
19905
20003
|
max: {
|
|
19906
20004
|
type: [Number, String]
|
|
20005
|
+
},
|
|
20006
|
+
sortable: {
|
|
20007
|
+
type: [Boolean, String],
|
|
20008
|
+
default: false
|
|
19907
20009
|
}
|
|
19908
20010
|
});
|
|
19909
20011
|
const tabsComponent = defineComponent({
|
|
@@ -19912,22 +20014,93 @@ const tabsComponent = defineComponent({
|
|
|
19912
20014
|
setup(props, ctx) {
|
|
19913
20015
|
const { instance, root: root2 } = useCreateInstance(props, ctx, Tabs, ZdTabsProps$1);
|
|
19914
20016
|
const { density } = useDensity({ instance });
|
|
20017
|
+
const rootElement = getRootElement(root2);
|
|
19915
20018
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root2);
|
|
20019
|
+
const isDragOver = ref(false);
|
|
20020
|
+
const dragOverIndex = ref(-1);
|
|
19916
20021
|
const change = () => {
|
|
19917
|
-
const
|
|
19918
|
-
instance.change(new Event("change"),
|
|
20022
|
+
const rootElement2 = getRootElement(root2);
|
|
20023
|
+
instance.change(new Event("change"), rootElement2.value);
|
|
19919
20024
|
};
|
|
19920
20025
|
const keydown = (event, index2) => {
|
|
19921
|
-
const
|
|
19922
|
-
instance.beforeChange(event, index2,
|
|
20026
|
+
const rootElement2 = getRootElement(root2);
|
|
20027
|
+
instance.beforeChange(event, index2, rootElement2.value);
|
|
19923
20028
|
};
|
|
19924
20029
|
const clickTab = (event, index2) => {
|
|
19925
|
-
const
|
|
19926
|
-
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()}`));
|
|
19927
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;
|
|
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
|
+
});
|
|
19928
20098
|
return {
|
|
19929
20099
|
instance,
|
|
19930
20100
|
root: root2,
|
|
20101
|
+
dragOverIndex,
|
|
20102
|
+
density,
|
|
20103
|
+
activeTabName,
|
|
19931
20104
|
click,
|
|
19932
20105
|
focus,
|
|
19933
20106
|
blur,
|
|
@@ -19936,11 +20109,22 @@ const tabsComponent = defineComponent({
|
|
|
19936
20109
|
clickTab,
|
|
19937
20110
|
keydown,
|
|
19938
20111
|
change,
|
|
19939
|
-
|
|
20112
|
+
handleDragOver,
|
|
20113
|
+
handleDrop,
|
|
20114
|
+
handleDragEnter,
|
|
20115
|
+
handleDragLeave
|
|
19940
20116
|
};
|
|
19941
20117
|
}
|
|
19942
20118
|
});
|
|
19943
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
|
+
};
|
|
19944
20128
|
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19945
20129
|
const _component_zd_tab = resolveComponent("zd-tab");
|
|
19946
20130
|
const _component_v_tabs = resolveComponent("v-tabs");
|
|
@@ -19955,12 +20139,16 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19955
20139
|
height: _ctx.instance.height,
|
|
19956
20140
|
maxHeight: _ctx.instance.maxHeight,
|
|
19957
20141
|
minHeight: _ctx.instance.minHeight
|
|
19958
|
-
})
|
|
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))
|
|
19959
20147
|
}, [
|
|
19960
20148
|
createVNode(_component_v_tabs, {
|
|
19961
|
-
modelValue: _ctx.
|
|
20149
|
+
modelValue: _ctx.activeTabName,
|
|
19962
20150
|
"onUpdate:modelValue": [
|
|
19963
|
-
_cache[0] || (_cache[0] = ($event) => _ctx.
|
|
20151
|
+
_cache[0] || (_cache[0] = ($event) => _ctx.activeTabName = $event),
|
|
19964
20152
|
_ctx.change
|
|
19965
20153
|
],
|
|
19966
20154
|
"show-arrows": "",
|
|
@@ -19975,44 +20163,43 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19975
20163
|
}, {
|
|
19976
20164
|
default: withCtx(() => [
|
|
19977
20165
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.tabs, (tab, index2) => {
|
|
19978
|
-
return openBlock(),
|
|
20166
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
19979
20167
|
key: tab.name
|
|
19980
|
-
},
|
|
19981
|
-
|
|
19982
|
-
|
|
19983
|
-
|
|
19984
|
-
|
|
19985
|
-
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
|
|
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)
|
|
19990
20181
|
]),
|
|
19991
20182
|
_: 1
|
|
19992
20183
|
}, 8, ["modelValue", "onUpdate:modelValue", "theme", "color", "bg-color", "density", "direction", "disabled", "grow", "max"]),
|
|
19993
|
-
createVNode(_component_v_window, {
|
|
19994
|
-
modelValue: _ctx.instance.activeTab,
|
|
19995
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.instance.activeTab = $event)
|
|
19996
|
-
}, {
|
|
20184
|
+
createVNode(_component_v_window, { "model-value": _ctx.activeTabName }, {
|
|
19997
20185
|
default: withCtx(() => [
|
|
19998
20186
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.instance.tabs, (tab, index2) => {
|
|
19999
20187
|
return withDirectives((openBlock(), createBlock(_component_zd_tab_item, mergeProps({
|
|
20000
20188
|
key: tab.name,
|
|
20001
|
-
value:
|
|
20189
|
+
value: tab.name,
|
|
20002
20190
|
children: tab.children
|
|
20003
20191
|
}, { ref_for: true }, {
|
|
20004
|
-
index: index2,
|
|
20005
20192
|
name: _ctx.instance.name + "-tab-item-" + index2,
|
|
20006
20193
|
lazyLoad: tab.lazyLoad
|
|
20007
20194
|
}), null, 16, ["value", "children"])), [
|
|
20008
|
-
[vShow, tab.isVisible &&
|
|
20195
|
+
[vShow, tab.isVisible && tab.name === _ctx.activeTabName]
|
|
20009
20196
|
]);
|
|
20010
20197
|
}), 128)),
|
|
20011
20198
|
renderSlot(_ctx.$slots, "tabItems")
|
|
20012
20199
|
]),
|
|
20013
20200
|
_: 3
|
|
20014
|
-
}, 8, ["
|
|
20015
|
-
],
|
|
20201
|
+
}, 8, ["model-value"])
|
|
20202
|
+
], 46, _hoisted_1$6)), [
|
|
20016
20203
|
[vShow, _ctx.instance.isVisible]
|
|
20017
20204
|
]);
|
|
20018
20205
|
}
|
|
@@ -20198,6 +20385,10 @@ function useTextInput(instance, ctx, root2) {
|
|
|
20198
20385
|
(_a = rootElement.value) == null ? void 0 : _a.getElementsByTagName("input")[0].blur();
|
|
20199
20386
|
});
|
|
20200
20387
|
};
|
|
20388
|
+
const clearInput = () => {
|
|
20389
|
+
inputScope.input();
|
|
20390
|
+
inputScope.change();
|
|
20391
|
+
};
|
|
20201
20392
|
const getIconClickEvents = () => {
|
|
20202
20393
|
const events = {};
|
|
20203
20394
|
if (instance.events.appendIconClick) {
|
|
@@ -20232,6 +20423,7 @@ function useTextInput(instance, ctx, root2) {
|
|
|
20232
20423
|
appendOuterIconClick,
|
|
20233
20424
|
prependOuterIconClick,
|
|
20234
20425
|
setBlur,
|
|
20426
|
+
clearInput,
|
|
20235
20427
|
getIconClickEvents
|
|
20236
20428
|
};
|
|
20237
20429
|
}
|
|
@@ -20278,7 +20470,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20278
20470
|
onChange: _cache[7] || (_cache[7] = ($event) => _ctx.change()),
|
|
20279
20471
|
onKeyup: _cache[8] || (_cache[8] = ($event) => _ctx.keyup($event)),
|
|
20280
20472
|
onKeydown: _cache[9] || (_cache[9] = ($event) => _ctx.keydown($event)),
|
|
20281
|
-
"onClick:clear": _cache[10] || (_cache[10] = ($event) => _ctx.
|
|
20473
|
+
"onClick:clear": _cache[10] || (_cache[10] = ($event) => _ctx.clearInput()),
|
|
20282
20474
|
"hide-details": _ctx.instance.autoHintDetails ? "auto" : false,
|
|
20283
20475
|
tabindex: _ctx.instance.tabStop ? "" : "-1"
|
|
20284
20476
|
}, {
|
|
@@ -20495,7 +20687,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20495
20687
|
onInput: _cache[5] || (_cache[5] = ($event) => _ctx.input()),
|
|
20496
20688
|
onKeydown: _cache[6] || (_cache[6] = ($event) => _ctx.keydown($event)),
|
|
20497
20689
|
onChange: _cache[7] || (_cache[7] = ($event) => _ctx.change($event)),
|
|
20498
|
-
|
|
20690
|
+
"onClick:clear": _cache[8] || (_cache[8] = ($event) => _ctx.clearInput()),
|
|
20691
|
+
onBlur: _cache[9] || (_cache[9] = ($event) => _ctx.blur($event))
|
|
20499
20692
|
}, {
|
|
20500
20693
|
"append-inner-icon": !_ctx.instance.suffix ? _ctx.$getIcon(_ctx.instance.appendIcon) : "",
|
|
20501
20694
|
"append-icon": _ctx.$getIcon(_ctx.instance.appendOuterIcon),
|
|
@@ -21413,7 +21606,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
21413
21606
|
}, null, 8, ["disabled", "isSelected", "cellSelection", "isCurrent", "indeterminate"])) : createCommentVNode("", true),
|
|
21414
21607
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (column, i, ___, _cached) => {
|
|
21415
21608
|
const _memo = [_ctx.row, column, _ctx.fixedLeft, _ctx.fixedRight, _ctx.cellSelection, _ctx.isCurrent({ row: _ctx.row, column })];
|
|
21416
|
-
if (_cached && _cached.
|
|
21609
|
+
if (_cached && _cached.key === column.name && isMemoSame(_cached, _memo)) return _cached;
|
|
21417
21610
|
const _item = (openBlock(), createBlock(_component_zd_tree_grid_cell, {
|
|
21418
21611
|
key: column.name,
|
|
21419
21612
|
row: _ctx.row,
|
|
@@ -23526,9 +23719,6 @@ const ZdTabProps = buildProps({
|
|
|
23526
23719
|
tabTitle: {
|
|
23527
23720
|
type: [String]
|
|
23528
23721
|
},
|
|
23529
|
-
tabName: {
|
|
23530
|
-
type: [String]
|
|
23531
|
-
},
|
|
23532
23722
|
color: {
|
|
23533
23723
|
type: [String],
|
|
23534
23724
|
default: "primary"
|
|
@@ -23575,15 +23765,41 @@ defineComponent({
|
|
|
23575
23765
|
const { instance, root: root2 } = useCreateInstance(props, ctx, Tab, ZdTabProps);
|
|
23576
23766
|
const { density } = useDensity({ instance });
|
|
23577
23767
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root2);
|
|
23768
|
+
const isDragging = ref(false);
|
|
23578
23769
|
const clickTab = (event) => {
|
|
23579
23770
|
ctx.emit("click", event);
|
|
23580
23771
|
};
|
|
23581
23772
|
const keydown = (event) => {
|
|
23582
23773
|
ctx.emit("keydown", event);
|
|
23583
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
|
+
};
|
|
23584
23798
|
return {
|
|
23585
23799
|
instance,
|
|
23586
23800
|
root: root2,
|
|
23801
|
+
density,
|
|
23802
|
+
sortable,
|
|
23587
23803
|
click,
|
|
23588
23804
|
focus,
|
|
23589
23805
|
blur,
|
|
@@ -23592,14 +23808,15 @@ defineComponent({
|
|
|
23592
23808
|
// methods
|
|
23593
23809
|
clickTab,
|
|
23594
23810
|
keydown,
|
|
23595
|
-
|
|
23811
|
+
handleDragStart,
|
|
23812
|
+
handleDragEnd
|
|
23596
23813
|
};
|
|
23597
23814
|
}
|
|
23598
23815
|
});
|
|
23599
23816
|
const ZdTabItemProps = buildProps({
|
|
23600
23817
|
...ZdComponentRenderProps,
|
|
23601
|
-
|
|
23602
|
-
type: [
|
|
23818
|
+
value: {
|
|
23819
|
+
type: [String]
|
|
23603
23820
|
},
|
|
23604
23821
|
lazyLoad: {
|
|
23605
23822
|
type: [Boolean]
|
|
@@ -23647,6 +23864,10 @@ const ZdTabsProps = buildProps({
|
|
|
23647
23864
|
},
|
|
23648
23865
|
max: {
|
|
23649
23866
|
type: [Number, String]
|
|
23867
|
+
},
|
|
23868
|
+
sortable: {
|
|
23869
|
+
type: [Boolean, String],
|
|
23870
|
+
default: false
|
|
23650
23871
|
}
|
|
23651
23872
|
});
|
|
23652
23873
|
defineComponent({
|
|
@@ -23655,22 +23876,93 @@ defineComponent({
|
|
|
23655
23876
|
setup(props, ctx) {
|
|
23656
23877
|
const { instance, root: root2 } = useCreateInstance(props, ctx, Tabs, ZdTabsProps);
|
|
23657
23878
|
const { density } = useDensity({ instance });
|
|
23879
|
+
const rootElement = getRootElement(root2);
|
|
23658
23880
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root2);
|
|
23881
|
+
const isDragOver = ref(false);
|
|
23882
|
+
const dragOverIndex = ref(-1);
|
|
23659
23883
|
const change = () => {
|
|
23660
|
-
const
|
|
23661
|
-
instance.change(new Event("change"),
|
|
23884
|
+
const rootElement2 = getRootElement(root2);
|
|
23885
|
+
instance.change(new Event("change"), rootElement2.value);
|
|
23662
23886
|
};
|
|
23663
23887
|
const keydown = (event, index2) => {
|
|
23664
|
-
const
|
|
23665
|
-
instance.beforeChange(event, index2,
|
|
23888
|
+
const rootElement2 = getRootElement(root2);
|
|
23889
|
+
instance.beforeChange(event, index2, rootElement2.value);
|
|
23666
23890
|
};
|
|
23667
23891
|
const clickTab = (event, index2) => {
|
|
23668
|
-
const
|
|
23669
|
-
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();
|
|
23670
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;
|
|
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
|
+
});
|
|
23671
23960
|
return {
|
|
23672
23961
|
instance,
|
|
23673
23962
|
root: root2,
|
|
23963
|
+
dragOverIndex,
|
|
23964
|
+
density,
|
|
23965
|
+
activeTabName,
|
|
23674
23966
|
click,
|
|
23675
23967
|
focus,
|
|
23676
23968
|
blur,
|
|
@@ -23679,7 +23971,10 @@ defineComponent({
|
|
|
23679
23971
|
clickTab,
|
|
23680
23972
|
keydown,
|
|
23681
23973
|
change,
|
|
23682
|
-
|
|
23974
|
+
handleDragOver,
|
|
23975
|
+
handleDrop,
|
|
23976
|
+
handleDragEnter,
|
|
23977
|
+
handleDragLeave
|
|
23683
23978
|
};
|
|
23684
23979
|
}
|
|
23685
23980
|
});
|
|
@@ -24423,7 +24718,7 @@ defineComponent({
|
|
|
24423
24718
|
};
|
|
24424
24719
|
const removeItem = (item) => {
|
|
24425
24720
|
const rootValue = root2.value;
|
|
24426
|
-
rootValue.select(item
|
|
24721
|
+
rootValue.select(item, false);
|
|
24427
24722
|
};
|
|
24428
24723
|
const selectChange = (value, event) => {
|
|
24429
24724
|
const input = getRootElement(root2);
|
|
@@ -24433,6 +24728,19 @@ defineComponent({
|
|
|
24433
24728
|
input.value
|
|
24434
24729
|
);
|
|
24435
24730
|
};
|
|
24731
|
+
const selectClear = () => {
|
|
24732
|
+
const input = getRootElement(root2);
|
|
24733
|
+
const hasSelectedValue = Array.isArray(instance.value) && instance.value.length > 0;
|
|
24734
|
+
const hasSearchText = !!instance.search;
|
|
24735
|
+
if (hasSelectedValue) {
|
|
24736
|
+
instance.selectChange([], void 0, input.value);
|
|
24737
|
+
}
|
|
24738
|
+
if (hasSearchText) {
|
|
24739
|
+
selectScope.selectInput("");
|
|
24740
|
+
} else {
|
|
24741
|
+
instance.search = "";
|
|
24742
|
+
}
|
|
24743
|
+
};
|
|
24436
24744
|
let observer;
|
|
24437
24745
|
onMounted(() => {
|
|
24438
24746
|
const componentRef = getRootElement(root2);
|
|
@@ -24464,6 +24772,7 @@ defineComponent({
|
|
|
24464
24772
|
selectClick,
|
|
24465
24773
|
selectBlur,
|
|
24466
24774
|
selectChange,
|
|
24775
|
+
selectClear,
|
|
24467
24776
|
formattedDataDiscreteText,
|
|
24468
24777
|
ajustSize,
|
|
24469
24778
|
onLoadMoreIntersect,
|
|
@@ -24859,20 +25168,21 @@ function useGridEditableInstance({
|
|
|
24859
25168
|
if (isEditing({ row, column })) return;
|
|
24860
25169
|
const key = instance.getRowKey(row);
|
|
24861
25170
|
editingCell.value = { key, column: column.name };
|
|
24862
|
-
|
|
24863
|
-
const key2 = instance.getRowKey(row);
|
|
24864
|
-
try {
|
|
24865
|
-
const component2 = instance.getComponent(String(key2), column.name);
|
|
24866
|
-
component2 == null ? void 0 : component2.setFocus();
|
|
24867
|
-
if (component2 instanceof Toggleable) {
|
|
24868
|
-
component2.toggleValue();
|
|
24869
|
-
component2.change();
|
|
24870
|
-
}
|
|
24871
|
-
} catch (e) {
|
|
24872
|
-
if (!(e instanceof InstanceNotFoundError)) throw e;
|
|
24873
|
-
}
|
|
24874
|
-
});
|
|
25171
|
+
checkToggleComponent(row, column);
|
|
24875
25172
|
};
|
|
25173
|
+
const checkToggleComponent = debounce$1((row, column) => {
|
|
25174
|
+
const key = instance.getRowKey(row);
|
|
25175
|
+
try {
|
|
25176
|
+
const component2 = instance.getComponent(String(key), column.name);
|
|
25177
|
+
component2 == null ? void 0 : component2.setFocus();
|
|
25178
|
+
if (component2 instanceof Toggleable) {
|
|
25179
|
+
component2.toggleValue();
|
|
25180
|
+
component2.change();
|
|
25181
|
+
}
|
|
25182
|
+
} catch (e) {
|
|
25183
|
+
if (!(e instanceof InstanceNotFoundError)) throw e;
|
|
25184
|
+
}
|
|
25185
|
+
});
|
|
24876
25186
|
const viewEnterEdit = (key, columnName) => {
|
|
24877
25187
|
editingCell.value = { key, column: columnName };
|
|
24878
25188
|
const row = instance.findRow(key);
|