@dazhicheng/ui 1.5.203 → 1.5.204
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/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
- package/dist/_virtual/_commonjsHelpers.js +24 -0
- package/dist/_virtual/aes.js +4 -0
- package/dist/_virtual/cipher-core.js +4 -0
- package/dist/_virtual/core.js +4 -0
- package/dist/_virtual/enc-base64.js +4 -0
- package/dist/_virtual/enc-utf8.js +4 -0
- package/dist/_virtual/evpkdf.js +4 -0
- package/dist/_virtual/hmac.js +4 -0
- package/dist/_virtual/md5.js +4 -0
- package/dist/_virtual/mode-ecb.js +4 -0
- package/dist/_virtual/pad-pkcs7.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/components/tt-api-component/index.js +17 -4
- package/dist/components/tt-api-component/index.vue2.js +24 -13
- package/dist/components/tt-area/TtArea.vue3.js +24 -13
- package/dist/components/tt-button/index.js +18 -5
- package/dist/components/tt-button/index.vue2.js +27 -16
- package/dist/components/tt-checkbox/index.js +17 -4
- package/dist/components/tt-checkbox/index.vue.js +38 -28
- package/dist/components/tt-drawer/index.js +17 -7
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +48 -36
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +39 -26
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +23 -10
- package/dist/components/tt-drawer/src/props.js +22 -9
- package/dist/components/tt-drawer/src/utils/drawer-api.js +42 -33
- package/dist/components/tt-empty/index.js +28 -18
- package/dist/components/tt-form/index.js +22 -14
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +23 -14
- package/dist/components/tt-form/src/components/FormActions.vue2.js +42 -32
- package/dist/components/tt-form/src/form/FormDescription.vue.js +19 -10
- package/dist/components/tt-form/src/form/FormItem.vue.js +18 -9
- package/dist/components/tt-form/src/form/FormLabel.vue.js +18 -9
- package/dist/components/tt-form/src/form/RenderContent.vue.js +25 -13
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +62 -55
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +36 -28
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +64 -56
- package/dist/components/tt-form/src/form-render/array-register/utils.js +18 -8
- package/dist/components/tt-form/src/form-render/dependencies.js +36 -24
- package/dist/components/tt-form/src/form-render/form.vue2.js +17 -7
- package/dist/components/tt-form/src/form-render/helper.js +29 -16
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +17 -7
- package/dist/components/tt-form/src/formApi.js +59 -48
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +17 -4
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +67 -57
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +55 -46
- package/dist/components/tt-form/src/group-form/groupFormApi.js +21 -10
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +27 -17
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +32 -23
- package/dist/components/tt-form/src/index.vue2.js +53 -45
- package/dist/components/tt-form/src/useFormContext.js +74 -62
- package/dist/components/tt-form-item-error-tooltip/index.js +18 -5
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +32 -21
- package/dist/components/tt-icon/index.js +20 -7
- package/dist/components/tt-image/index.js +19 -6
- package/dist/components/tt-image/src/components/ImageViewer.js +27 -17
- package/dist/components/tt-loading/index.js +16 -4
- package/dist/components/tt-loading/src/directive.js +34 -22
- package/dist/components/tt-log/index.js +17 -4
- package/dist/components/tt-log/index.vue.js +21 -8
- package/dist/components/tt-modal/index.js +16 -5
- package/dist/components/tt-modal/src/RenderModal.vue.js +163 -151
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +38 -28
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +24 -11
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +36 -23
- package/dist/components/tt-modal/src/props.js +22 -9
- package/dist/components/tt-modal/src/utils/modal-api.js +39 -29
- package/dist/components/tt-modal-form/index.vue.js +44 -36
- package/dist/components/tt-nav-anchor/index.js +17 -4
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +69 -57
- package/dist/components/tt-panel-select/index.js +17 -4
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +51 -40
- package/dist/components/tt-panel-select/src/index.vue.js +35 -24
- package/dist/components/tt-select/index.js +17 -4
- package/dist/components/tt-select/src/Select.vue.js +79 -68
- package/dist/components/tt-select/src/components/SelectTable.vue.js +41 -30
- package/dist/components/tt-select/src/components/Table.vue.js +86 -76
- package/dist/components/tt-select/src/hooks/useDataSource.js +59 -49
- package/dist/components/tt-select/src/hooks/useSelect.js +46 -38
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +123 -112
- package/dist/components/tt-table/index.js +19 -12
- package/dist/components/tt-table/src/Table.vue.js +82 -71
- package/dist/components/tt-table/src/TableForm.vue.js +77 -65
- package/dist/components/tt-table/src/components/TableAction.vue.js +49 -39
- package/dist/components/tt-table/src/components/TableButtons.js +73 -60
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +14 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +36 -25
- package/dist/components/tt-table/src/hooks/useColumns.js +72 -65
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +43 -31
- package/dist/components/tt-table/src/hooks/useDataSource.js +50 -42
- package/dist/components/tt-table/src/hooks/usePagination.js +36 -25
- package/dist/components/tt-table/src/props.js +55 -42
- package/dist/components/tt-table/src/utils/table-api.js +33 -22
- package/dist/components/tt-table/src/utils/table-form-api.js +35 -24
- package/dist/components/tt-text/index.js +17 -4
- package/dist/components/tt-upload/index.js +19 -6
- package/dist/components/tt-upload/src/TtUpload.vue.js +77 -66
- package/dist/directives/disabled-tip/index.js +37 -26
- package/dist/hooks/useFormSchemasLink.js +90 -79
- package/dist/hooks/useScreenshotOss.js +49 -35
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +64 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +545 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +508 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +81 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js +10 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +71 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +84 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +72 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +22 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js +11 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +50 -0
- package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js +1024 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +32 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js +11 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js +92 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js +34 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js +52 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js +43 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js +47 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js +122 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js +30 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js +24 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js +106 -0
- package/dist/node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js +16 -0
- package/dist/node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js +21 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2922 -0
- package/dist/node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js +93 -0
- package/dist/packages/hooks/src/propTypes.js +17 -0
- package/dist/packages/hooks/src/tools.js +6 -0
- package/dist/packages/hooks/src/useDebounce.js +32 -0
- package/dist/packages/hooks/src/useDesign.js +12 -0
- package/dist/packages/hooks/src/useElementScreenshot.js +136 -0
- package/dist/packages/hooks/src/useIsScroll.js +12 -0
- package/dist/packages/hooks/src/usePriorityValue.js +45 -0
- package/dist/packages/utils/src/calc.js +14 -0
- package/dist/packages/utils/src/check.js +10 -0
- package/dist/packages/utils/src/install.js +11 -0
- package/dist/packages/utils/src/is.js +64 -0
- package/dist/packages/utils/src/merge.js +13 -0
- package/dist/packages/utils/src/stateHandler.js +33 -0
- package/dist/packages/utils/src/string.js +6 -0
- package/dist/packages/utils/src/testid-helper.js +14 -0
- package/dist/packages/utils/src/tool.js +181 -0
- package/dist/plugins/default/renderCellContent.js +39 -28
- package/dist/plugins/vxeTable/switchStatus.js +37 -26
- package/package.json +1 -1
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import "axios";
|
|
2
|
+
import "element-plus";
|
|
3
|
+
import { isString as x } from "../../../../packages/utils/src/is.js";
|
|
4
|
+
import { ref as A, computed as i, toValue as E, watch as z, nextTick as T } from "vue";
|
|
5
|
+
import { calcWordsWidth as L } from "../../../../packages/utils/src/tool.js";
|
|
6
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
7
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
8
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
9
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
10
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
11
|
+
import "lodash-es";
|
|
12
|
+
import { useResizeObserver as F } from "@vueuse/core";
|
|
13
|
+
function I(r) {
|
|
14
|
+
const n = A(1), a = ["ElSelect", "ElSelectV2"], u = () => r.value.component, s = () => E(r.value.componentProps), p = () => r.value.selectWrapRef, b = () => r.value.selectRef, m = i(() => {
|
|
15
|
+
const t = u();
|
|
16
|
+
return x(t) && a.includes(t);
|
|
17
|
+
}), f = i(() => {
|
|
9
18
|
var o;
|
|
10
|
-
const t =
|
|
11
|
-
return t === "TtApiComponent" &&
|
|
12
|
-
}), R =
|
|
13
|
-
const t =
|
|
14
|
-
if (
|
|
19
|
+
const t = u(), e = s();
|
|
20
|
+
return t === "TtApiComponent" && a.includes((o = e == null ? void 0 : e.component) == null ? void 0 : o.name);
|
|
21
|
+
}), R = i(() => {
|
|
22
|
+
const t = s();
|
|
23
|
+
if (m.value || f.value) {
|
|
15
24
|
const e = {
|
|
16
25
|
clearable: !0,
|
|
17
26
|
filterable: !0
|
|
@@ -21,16 +30,16 @@ function _(c) {
|
|
|
21
30
|
return {};
|
|
22
31
|
});
|
|
23
32
|
function v() {
|
|
24
|
-
var e, o, l,
|
|
33
|
+
var e, o, l, c;
|
|
25
34
|
const t = b();
|
|
26
|
-
if (m.value)
|
|
27
|
-
return (l = (o = (e = t.value) == null ? void 0 : e.getComponentRef) == null ? void 0 : o.call(e)) == null ? void 0 : l.selectedLabel;
|
|
28
35
|
if (f.value)
|
|
29
|
-
return (
|
|
36
|
+
return (l = (o = (e = t.value) == null ? void 0 : e.getComponentRef) == null ? void 0 : o.call(e)) == null ? void 0 : l.selectedLabel;
|
|
37
|
+
if (m.value)
|
|
38
|
+
return (c = t.value) == null ? void 0 : c.selectedLabel;
|
|
30
39
|
}
|
|
31
40
|
function g() {
|
|
32
41
|
var h;
|
|
33
|
-
if (!((h =
|
|
42
|
+
if (!((h = s()) != null && h.multiple)) {
|
|
34
43
|
n.value = 1;
|
|
35
44
|
return;
|
|
36
45
|
}
|
|
@@ -53,29 +62,29 @@ function _(c) {
|
|
|
53
62
|
n.value = 1;
|
|
54
63
|
return;
|
|
55
64
|
}
|
|
56
|
-
const l = window.getComputedStyle(o),
|
|
65
|
+
const l = window.getComputedStyle(o), c = l.fontFamily, W = l.fontSize, d = o.clientWidth - 48;
|
|
57
66
|
if (d <= 0) {
|
|
58
67
|
n.value = 1;
|
|
59
68
|
return;
|
|
60
69
|
}
|
|
61
70
|
let S = 0, C = 0;
|
|
62
71
|
t.slice(0).forEach((w) => {
|
|
63
|
-
const y =
|
|
72
|
+
const y = L(w, W, c) + 32 + 4;
|
|
64
73
|
S + y < d && (S += y, C += 1);
|
|
65
74
|
}), n.value = Math.max(1, C);
|
|
66
75
|
}
|
|
67
|
-
return
|
|
76
|
+
return z(
|
|
68
77
|
v,
|
|
69
78
|
async () => {
|
|
70
79
|
await T(), g();
|
|
71
80
|
},
|
|
72
81
|
{ flush: "post", deep: !0 }
|
|
73
|
-
),
|
|
82
|
+
), F(p(), async () => {
|
|
74
83
|
await T(), g();
|
|
75
84
|
}), {
|
|
76
85
|
selectComponentProps: R
|
|
77
86
|
};
|
|
78
87
|
}
|
|
79
88
|
export {
|
|
80
|
-
|
|
89
|
+
I as useSelectCollapseOptions
|
|
81
90
|
};
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { defineComponent as P, ref as N, onMounted as S, nextTick as $, watch as k, createBlock as A, openBlock as B, unref as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as P, ref as N, onMounted as S, nextTick as $, watch as k, createBlock as A, openBlock as B, unref as a, mergeProps as x, withKeys as L, createSlots as I, withCtx as m, renderSlot as u, normalizeProps as c, guardReactiveProps as f, createCommentVNode as K, renderList as U } from "vue";
|
|
2
|
+
import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
3
|
+
import { useDesign as z } from "../../../packages/hooks/src/useDesign.js";
|
|
4
|
+
import "axios";
|
|
5
|
+
import "element-plus";
|
|
6
|
+
import "dayjs";
|
|
7
|
+
import { cloneDeep as q } from "../../../packages/utils/src/tool.js";
|
|
8
|
+
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
9
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
10
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
11
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
12
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
4
13
|
import { get as M, isEqual as G, set as H } from "lodash-es";
|
|
5
14
|
import { useForwardPriorityValues as W } from "./hooks/useForwardPriorityValues.js";
|
|
6
15
|
import { useDebounceFn as j } from "@vueuse/core";
|
|
@@ -11,7 +20,6 @@ import "./components/Slot.js";
|
|
|
11
20
|
import "vee-validate";
|
|
12
21
|
import "../../tt-form-item-error-tooltip/index.js";
|
|
13
22
|
import "../../tt-icon/index.js";
|
|
14
|
-
import "element-plus";
|
|
15
23
|
/* empty css */
|
|
16
24
|
import "./form/RenderContent.vue.js";
|
|
17
25
|
import "@vee-validate/zod";
|
|
@@ -20,7 +28,7 @@ import "es-toolkit/compat";
|
|
|
20
28
|
import "../../tt-text/index.js";
|
|
21
29
|
import te from "./form-render/form.vue2.js";
|
|
22
30
|
/* empty css */
|
|
23
|
-
const
|
|
31
|
+
const Pe = /* @__PURE__ */ P({
|
|
24
32
|
name: "TtForm",
|
|
25
33
|
__name: "index",
|
|
26
34
|
props: {
|
|
@@ -56,12 +64,12 @@ const Me = /* @__PURE__ */ P({
|
|
|
56
64
|
const C = N(), { prefixCls: _ } = z("form-plus"), d = O, o = (w = (g = d.formApi) == null ? void 0 : g.useStore) == null ? void 0 : w.call(g), t = W(d, o), v = /* @__PURE__ */ new Map(), { delegatedSlots: E, form: h } = Z(t);
|
|
57
65
|
ee([t, h]), oe(v), (F = (y = d.formApi) == null ? void 0 : y.mount) == null || F.call(y, h, v);
|
|
58
66
|
const T = (e) => {
|
|
59
|
-
var
|
|
60
|
-
(
|
|
67
|
+
var s, n, r;
|
|
68
|
+
(s = d.formApi) == null || s.setState({ collapsed: e }), (r = (n = t.value).handleCollapsedChange) == null || r.call(n, e);
|
|
61
69
|
};
|
|
62
70
|
function R(e) {
|
|
63
|
-
var
|
|
64
|
-
!(o != null && o.value.submitOnEnter) || !((
|
|
71
|
+
var s, n;
|
|
72
|
+
!(o != null && o.value.submitOnEnter) || !((s = t.value.formApi) != null && s.isMounted) || e.target instanceof HTMLTextAreaElement || (e.preventDefault(), (n = t.value.formApi) == null || n.validateAndSubmitForm());
|
|
65
73
|
}
|
|
66
74
|
const V = j(async () => {
|
|
67
75
|
var e;
|
|
@@ -71,17 +79,17 @@ const Me = /* @__PURE__ */ P({
|
|
|
71
79
|
await $(), k(
|
|
72
80
|
() => h.values,
|
|
73
81
|
async (e) => {
|
|
74
|
-
var
|
|
82
|
+
var s, n;
|
|
75
83
|
if (t.value.handleValuesChange) {
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
G(
|
|
82
|
-
}),
|
|
84
|
+
const r = (s = o == null ? void 0 : o.value.schema) == null ? void 0 : s.map((p) => p.fieldName);
|
|
85
|
+
if (r && r.length > 0) {
|
|
86
|
+
const p = [];
|
|
87
|
+
if (r.forEach((i) => {
|
|
88
|
+
const l = M(e, i), D = M(b, i);
|
|
89
|
+
G(l, D) || (p.push(i), H(b, i, l));
|
|
90
|
+
}), p.length > 0) {
|
|
83
91
|
const i = await ((n = t.value.formApi) == null ? void 0 : n.getValues());
|
|
84
|
-
t.value.handleValuesChange(q(i ?? {}),
|
|
92
|
+
t.value.handleValuesChange(q(i ?? {}), p);
|
|
85
93
|
}
|
|
86
94
|
}
|
|
87
95
|
}
|
|
@@ -89,41 +97,41 @@ const Me = /* @__PURE__ */ P({
|
|
|
89
97
|
},
|
|
90
98
|
{ deep: !0 }
|
|
91
99
|
);
|
|
92
|
-
}), (e,
|
|
100
|
+
}), (e, s) => {
|
|
93
101
|
var n;
|
|
94
|
-
return B(), A(
|
|
102
|
+
return B(), A(a(te), x({
|
|
95
103
|
ref_key: "formRef",
|
|
96
104
|
ref: C
|
|
97
|
-
},
|
|
98
|
-
class:
|
|
99
|
-
collapsed: (n =
|
|
100
|
-
"component-bind-event-map":
|
|
101
|
-
"component-map":
|
|
102
|
-
form:
|
|
103
|
-
"global-common-config":
|
|
105
|
+
}, a(t), {
|
|
106
|
+
class: a(_),
|
|
107
|
+
collapsed: (n = a(o)) == null ? void 0 : n.collapsed,
|
|
108
|
+
"component-bind-event-map": a(Y),
|
|
109
|
+
"component-map": a(X),
|
|
110
|
+
form: a(h),
|
|
111
|
+
"global-common-config": a(Q),
|
|
104
112
|
onKeydown: L(R, ["enter"])
|
|
105
113
|
}), I({
|
|
106
|
-
default: m((
|
|
107
|
-
u(e.$slots, "default", c(f(
|
|
108
|
-
var
|
|
114
|
+
default: m((r) => [
|
|
115
|
+
u(e.$slots, "default", c(f(r)), () => {
|
|
116
|
+
var p, i;
|
|
109
117
|
return [
|
|
110
|
-
|
|
118
|
+
a(t).showDefaultActions ? (B(), A(J, {
|
|
111
119
|
key: 0,
|
|
112
|
-
"model-value": (
|
|
120
|
+
"model-value": (p = a(o)) == null ? void 0 : p.collapsed,
|
|
113
121
|
"wrapper-ref": (i = C.value) == null ? void 0 : i.wrapperRef,
|
|
114
122
|
"onUpdate:modelValue": T
|
|
115
123
|
}, {
|
|
116
|
-
"reset-before": m((
|
|
117
|
-
u(e.$slots, "reset-before", c(f(
|
|
124
|
+
"reset-before": m((l) => [
|
|
125
|
+
u(e.$slots, "reset-before", c(f(l)))
|
|
118
126
|
]),
|
|
119
|
-
"submit-before": m((
|
|
120
|
-
u(e.$slots, "submit-before", c(f(
|
|
127
|
+
"submit-before": m((l) => [
|
|
128
|
+
u(e.$slots, "submit-before", c(f(l)))
|
|
121
129
|
]),
|
|
122
|
-
"expand-before": m((
|
|
123
|
-
u(e.$slots, "expand-before", c(f(
|
|
130
|
+
"expand-before": m((l) => [
|
|
131
|
+
u(e.$slots, "expand-before", c(f(l)))
|
|
124
132
|
]),
|
|
125
|
-
"expand-after": m((
|
|
126
|
-
u(e.$slots, "expand-after", c(f(
|
|
133
|
+
"expand-after": m((l) => [
|
|
134
|
+
u(e.$slots, "expand-after", c(f(l)))
|
|
127
135
|
]),
|
|
128
136
|
_: 3
|
|
129
137
|
}, 8, ["model-value", "wrapper-ref"])) : K("", !0)
|
|
@@ -132,10 +140,10 @@ const Me = /* @__PURE__ */ P({
|
|
|
132
140
|
]),
|
|
133
141
|
_: 2
|
|
134
142
|
}, [
|
|
135
|
-
U(
|
|
136
|
-
name:
|
|
137
|
-
fn: m((
|
|
138
|
-
u(e.$slots,
|
|
143
|
+
U(a(E), (r) => ({
|
|
144
|
+
name: r,
|
|
145
|
+
fn: m((p) => [
|
|
146
|
+
u(e.$slots, r, c(f(p)))
|
|
139
147
|
])
|
|
140
148
|
}))
|
|
141
149
|
]), 1040, ["class", "collapsed", "component-bind-event-map", "component-map", "form", "global-common-config"]);
|
|
@@ -143,5 +151,5 @@ const Me = /* @__PURE__ */ P({
|
|
|
143
151
|
}
|
|
144
152
|
});
|
|
145
153
|
export {
|
|
146
|
-
|
|
154
|
+
Pe as default
|
|
147
155
|
};
|
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
import { useSlots as O, computed as j, unref as L, toRaw as P } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
2
|
+
import "axios";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import { isFunction as $, isString as A, isObject as k } from "../../../packages/utils/src/is.js";
|
|
5
|
+
import "xe-utils";
|
|
6
|
+
import "dayjs";
|
|
7
|
+
import "dayjs/plugin/utc";
|
|
8
|
+
import "dayjs/plugin/timezone";
|
|
9
|
+
import { mergeWithArrayOverride as S } from "../../../packages/utils/src/merge.js";
|
|
10
|
+
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
11
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
12
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
|
+
import { get as R, cloneDeep as v, has as C } from "lodash-es";
|
|
16
|
+
import { childArrayPath as w, normalizeArrayFieldPath as h } from "./utils/array-path.js";
|
|
5
17
|
import { set as g } from "es-toolkit/compat";
|
|
6
|
-
import { createContext as
|
|
18
|
+
import { createContext as x } from "./shared/createContext.js";
|
|
7
19
|
import { useForm as H } from "vee-validate";
|
|
8
|
-
import { object as
|
|
9
|
-
import { getDefaultsForSchema as
|
|
20
|
+
import { object as p, ZodString as W, ZodNumber as z, ZodObject as Z, ZodIntersection as _ } from "zod";
|
|
21
|
+
import { getDefaultsForSchema as I } from "./shared/zod-defaults.js";
|
|
10
22
|
function K(e) {
|
|
11
23
|
if (!e || !k(e))
|
|
12
24
|
return !1;
|
|
13
25
|
const r = e;
|
|
14
26
|
return A(r.fieldName) && "component" in r;
|
|
15
27
|
}
|
|
16
|
-
const [
|
|
28
|
+
const [ge, pe] = x("TtFormProps"), [Ie, Ne] = x("ComponentRefMap");
|
|
17
29
|
function T(e) {
|
|
18
30
|
if (Reflect.has(e, "defaultValue"))
|
|
19
31
|
return e.defaultValue;
|
|
20
32
|
if (e.rules && !A(e.rules))
|
|
21
33
|
return m(P(e.rules));
|
|
22
34
|
}
|
|
23
|
-
function
|
|
35
|
+
function F(e) {
|
|
24
36
|
const r = e.lastIndexOf(".");
|
|
25
37
|
return r === -1 ? void 0 : e.slice(0, r);
|
|
26
38
|
}
|
|
@@ -28,7 +40,7 @@ function E(e) {
|
|
|
28
40
|
if (e)
|
|
29
41
|
return new Proxy(e, {
|
|
30
42
|
get(r, t) {
|
|
31
|
-
return
|
|
43
|
+
return R(e, t);
|
|
32
44
|
},
|
|
33
45
|
set() {
|
|
34
46
|
return !0;
|
|
@@ -41,7 +53,7 @@ function E(e) {
|
|
|
41
53
|
}
|
|
42
54
|
});
|
|
43
55
|
}
|
|
44
|
-
function
|
|
56
|
+
function N(e, r) {
|
|
45
57
|
return {
|
|
46
58
|
path: e,
|
|
47
59
|
get: () => r == null ? void 0 : r.get(e),
|
|
@@ -61,7 +73,7 @@ function V(e, r) {
|
|
|
61
73
|
},
|
|
62
74
|
swap: () => {
|
|
63
75
|
},
|
|
64
|
-
at: (t, a) =>
|
|
76
|
+
at: (t, a) => N(w(e, t, a), r)
|
|
65
77
|
};
|
|
66
78
|
}
|
|
67
79
|
function U(e) {
|
|
@@ -84,15 +96,15 @@ function U(e) {
|
|
|
84
96
|
},
|
|
85
97
|
swap: () => {
|
|
86
98
|
},
|
|
87
|
-
at: (r, t, a) =>
|
|
88
|
-
|
|
99
|
+
at: (r, t, a) => N(
|
|
100
|
+
w(r, t, a),
|
|
89
101
|
e
|
|
90
102
|
)
|
|
91
103
|
};
|
|
92
104
|
}
|
|
93
105
|
function q(e) {
|
|
94
106
|
var i;
|
|
95
|
-
const r = e, t = r.safeMutations ? U(e.arrayAction) : e.arrayAction, a = r.safeMutations ?
|
|
107
|
+
const r = e, t = r.safeMutations ? U(e.arrayAction) : e.arrayAction, a = r.safeMutations ? N(e.arrayPath, e.arrayAction) : e.arrayHandle ?? ((i = e.arrayAction) == null ? void 0 : i.at(e.arrayPath));
|
|
96
108
|
return {
|
|
97
109
|
arrayPath: e.arrayPath,
|
|
98
110
|
itemPath: e.itemPath,
|
|
@@ -115,7 +127,7 @@ function B(e, r) {
|
|
|
115
127
|
for (const n of e)
|
|
116
128
|
if (n.fieldName) {
|
|
117
129
|
if (n.useArraySchema) {
|
|
118
|
-
const f =
|
|
130
|
+
const f = V(n, {
|
|
119
131
|
arrayPath: h(`${r.itemPath}.${n.fieldName}`),
|
|
120
132
|
parentItemPath: r.itemPath,
|
|
121
133
|
form: r.form,
|
|
@@ -128,11 +140,11 @@ function B(e, r) {
|
|
|
128
140
|
if (Reflect.has(n, "defaultValue"))
|
|
129
141
|
t[n.fieldName] = v(n.defaultValue);
|
|
130
142
|
else if (n.rules && !A(n.rules)) {
|
|
131
|
-
const f = P(n.rules),
|
|
132
|
-
a[n.fieldName] = f,
|
|
143
|
+
const f = P(n.rules), u = m(f);
|
|
144
|
+
a[n.fieldName] = f, u !== void 0 && (t[n.fieldName] = u);
|
|
133
145
|
}
|
|
134
146
|
}
|
|
135
|
-
const i =
|
|
147
|
+
const i = I(p(a));
|
|
136
148
|
for (const n in i)
|
|
137
149
|
n in t || (t[n] = i[n]);
|
|
138
150
|
return t;
|
|
@@ -147,7 +159,7 @@ function D(e) {
|
|
|
147
159
|
return i(n.entry, t, n);
|
|
148
160
|
}
|
|
149
161
|
function G(e, r, t) {
|
|
150
|
-
const a = h(`${t.itemPath}.${e.fieldName}`), i =
|
|
162
|
+
const a = h(`${t.itemPath}.${e.fieldName}`), i = V(e, {
|
|
151
163
|
arrayPath: a,
|
|
152
164
|
parentItemPath: t.itemPath,
|
|
153
165
|
form: t.form,
|
|
@@ -155,9 +167,9 @@ function G(e, r, t) {
|
|
|
155
167
|
safeMutations: t.safeMutations
|
|
156
168
|
}), n = Array.isArray(i) ? i : [{}], f = Array.isArray(r) ? r : [];
|
|
157
169
|
return r === void 0 ? i : Array.isArray(r) && f.length === 0 ? [] : f.map((l, s) => {
|
|
158
|
-
const
|
|
170
|
+
const o = { ...s < n.length ? v(n[s]) : {}, ...l }, c = {
|
|
159
171
|
item: e,
|
|
160
|
-
row:
|
|
172
|
+
row: o,
|
|
161
173
|
index: s,
|
|
162
174
|
arrayLength: f.length,
|
|
163
175
|
arrayPath: a,
|
|
@@ -167,7 +179,7 @@ function G(e, r, t) {
|
|
|
167
179
|
arrayAction: t.arrayAction,
|
|
168
180
|
safeMutations: t.safeMutations
|
|
169
181
|
}, d = D(c);
|
|
170
|
-
return b(
|
|
182
|
+
return b(o, d, c);
|
|
171
183
|
});
|
|
172
184
|
}
|
|
173
185
|
function b(e, r, t) {
|
|
@@ -176,30 +188,30 @@ function b(e, r, t) {
|
|
|
176
188
|
!i.fieldName || !i.useArraySchema || (a[i.fieldName] = G(i, a[i.fieldName], t));
|
|
177
189
|
return a;
|
|
178
190
|
}
|
|
179
|
-
function
|
|
191
|
+
function V(e, r) {
|
|
180
192
|
if (!e.useArraySchema)
|
|
181
193
|
return;
|
|
182
194
|
const t = T(e);
|
|
183
195
|
let a;
|
|
184
196
|
return Array.isArray(t) ? a = v(t) : t !== void 0 ? a = [v(t)] : a = [{}], r.row && a.length === 1 && (a = [
|
|
185
|
-
|
|
197
|
+
S(r.row, a[0])
|
|
186
198
|
]), e.arraySchema ? a.map((n, f) => {
|
|
187
|
-
const
|
|
199
|
+
const u = a.length === 1 && r.index !== void 0 ? r.index : f, l = r.arrayLength ?? a.length, s = {
|
|
188
200
|
item: e,
|
|
189
201
|
row: n,
|
|
190
|
-
index:
|
|
202
|
+
index: u,
|
|
191
203
|
arrayLength: l,
|
|
192
204
|
arrayPath: r.arrayPath,
|
|
193
|
-
itemPath: h(`${r.arrayPath}[${
|
|
205
|
+
itemPath: h(`${r.arrayPath}[${u}]`),
|
|
194
206
|
parentItemPath: r.parentItemPath,
|
|
195
207
|
form: r.form,
|
|
196
208
|
arrayAction: r.arrayAction,
|
|
197
209
|
arrayHandle: r.arrayHandle,
|
|
198
210
|
safeMutations: r.safeMutations ?? !0
|
|
199
|
-
}, y = D(s),
|
|
211
|
+
}, y = D(s), o = B(y, s);
|
|
200
212
|
return b(
|
|
201
213
|
{
|
|
202
|
-
...v(
|
|
214
|
+
...v(o),
|
|
203
215
|
...n
|
|
204
216
|
},
|
|
205
217
|
y,
|
|
@@ -208,7 +220,7 @@ function S(e, r) {
|
|
|
208
220
|
}) : a;
|
|
209
221
|
}
|
|
210
222
|
function M(e, r) {
|
|
211
|
-
return
|
|
223
|
+
return V(e, {
|
|
212
224
|
...r,
|
|
213
225
|
safeMutations: !0
|
|
214
226
|
});
|
|
@@ -216,7 +228,7 @@ function M(e, r) {
|
|
|
216
228
|
function J(e) {
|
|
217
229
|
return M(e, {
|
|
218
230
|
arrayPath: h(e.fieldName),
|
|
219
|
-
parentItemPath:
|
|
231
|
+
parentItemPath: F(h(e.fieldName))
|
|
220
232
|
});
|
|
221
233
|
}
|
|
222
234
|
function Q(e) {
|
|
@@ -229,13 +241,13 @@ function Q(e) {
|
|
|
229
241
|
const r = P(e.rules), t = m(r);
|
|
230
242
|
if (t !== void 0)
|
|
231
243
|
return t;
|
|
232
|
-
const a =
|
|
244
|
+
const a = I(p({ [e.fieldName]: r }));
|
|
233
245
|
if (e.fieldName in a)
|
|
234
246
|
return a[e.fieldName];
|
|
235
247
|
}
|
|
236
248
|
}
|
|
237
249
|
}
|
|
238
|
-
function
|
|
250
|
+
function Ve(e, r) {
|
|
239
251
|
if (!r.fieldName)
|
|
240
252
|
return !1;
|
|
241
253
|
const t = Q(r);
|
|
@@ -244,7 +256,7 @@ function ce(e, r) {
|
|
|
244
256
|
const a = r.fieldName;
|
|
245
257
|
if (!C(e, a))
|
|
246
258
|
return !0;
|
|
247
|
-
const i =
|
|
259
|
+
const i = R(e, a);
|
|
248
260
|
return i == null ? !0 : r.useArraySchema && Array.isArray(i) ? !(i.length > 0 || Array.isArray(t) && t.length === 0) : !1;
|
|
249
261
|
}
|
|
250
262
|
function m(e) {
|
|
@@ -263,39 +275,39 @@ function m(e) {
|
|
|
263
275
|
} else
|
|
264
276
|
return;
|
|
265
277
|
}
|
|
266
|
-
function
|
|
278
|
+
function Se(e) {
|
|
267
279
|
var f;
|
|
268
280
|
const r = O(), t = n(), a = H({
|
|
269
281
|
...(f = Object.keys(t)) != null && f.length ? { initialValues: t } : {}
|
|
270
282
|
}), i = j(() => {
|
|
271
|
-
const
|
|
283
|
+
const u = [];
|
|
272
284
|
for (const l of Object.keys(r))
|
|
273
|
-
l !== "default" &&
|
|
274
|
-
return
|
|
285
|
+
l !== "default" && u.push(l);
|
|
286
|
+
return u;
|
|
275
287
|
});
|
|
276
288
|
function n() {
|
|
277
|
-
const
|
|
278
|
-
(L(e).schema || []).forEach((
|
|
279
|
-
if (K(
|
|
280
|
-
if (
|
|
281
|
-
const c = h(
|
|
289
|
+
const u = {}, l = {};
|
|
290
|
+
(L(e).schema || []).forEach((o) => {
|
|
291
|
+
if (K(o)) {
|
|
292
|
+
if (o.useArraySchema) {
|
|
293
|
+
const c = h(o.fieldName), d = M(o, {
|
|
282
294
|
arrayPath: c,
|
|
283
|
-
parentItemPath:
|
|
284
|
-
form:
|
|
295
|
+
parentItemPath: F(c),
|
|
296
|
+
form: u
|
|
285
297
|
});
|
|
286
|
-
d !== void 0 && g(
|
|
287
|
-
} else if (Reflect.has(
|
|
288
|
-
g(
|
|
289
|
-
else if (
|
|
290
|
-
const c = P(
|
|
291
|
-
l[
|
|
298
|
+
d !== void 0 && g(u, o.fieldName, d);
|
|
299
|
+
} else if (Reflect.has(o, "defaultValue"))
|
|
300
|
+
g(u, o.fieldName, o.defaultValue);
|
|
301
|
+
else if (o.rules && !A(o.rules)) {
|
|
302
|
+
const c = P(o.rules), d = m(c);
|
|
303
|
+
l[o.fieldName] = c, d !== void 0 && (u[o.fieldName] = d);
|
|
292
304
|
}
|
|
293
305
|
}
|
|
294
306
|
});
|
|
295
|
-
const s =
|
|
296
|
-
for (const
|
|
297
|
-
g(y,
|
|
298
|
-
return
|
|
307
|
+
const s = I(p(l)), y = {};
|
|
308
|
+
for (const o in s)
|
|
309
|
+
g(y, o, s[o]);
|
|
310
|
+
return S(u, y);
|
|
299
311
|
}
|
|
300
312
|
return {
|
|
301
313
|
delegatedSlots: i,
|
|
@@ -304,17 +316,17 @@ function de(e) {
|
|
|
304
316
|
}
|
|
305
317
|
export {
|
|
306
318
|
q as createArraySchemaContext,
|
|
307
|
-
|
|
308
|
-
|
|
319
|
+
Ie as injectComponentRefMap,
|
|
320
|
+
ge as injectFormProps,
|
|
309
321
|
K as isFormSchema,
|
|
310
|
-
|
|
311
|
-
|
|
322
|
+
Ne as provideComponentRefMap,
|
|
323
|
+
pe as provideFormProps,
|
|
312
324
|
J as resolveArrayFieldInitialValue,
|
|
313
325
|
M as resolveArrayFieldInitialValueWithRuntime,
|
|
314
326
|
D as resolveArraySchemasForRuntime,
|
|
315
|
-
|
|
327
|
+
F as resolveParentItemPathFromArrayPath,
|
|
316
328
|
Q as resolveSchemaFieldInitialValue,
|
|
317
329
|
T as resolveSchemaItemDefaultValue,
|
|
318
|
-
|
|
319
|
-
|
|
330
|
+
Ve as shouldSeedAppendedFieldValue,
|
|
331
|
+
Se as useFormInitial
|
|
320
332
|
};
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "axios";
|
|
2
|
+
import "element-plus";
|
|
3
|
+
import "dayjs";
|
|
4
|
+
import "vue";
|
|
5
|
+
import { withInstall as o } from "../../packages/utils/src/install.js";
|
|
6
|
+
import "xe-utils";
|
|
7
|
+
import "dayjs/plugin/utc";
|
|
8
|
+
import "dayjs/plugin/timezone";
|
|
9
|
+
import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
10
|
+
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
11
|
+
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
12
|
+
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
13
|
+
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
14
|
+
import "lodash-es";
|
|
2
15
|
import t from "./index.vue.js";
|
|
3
16
|
/* empty css */
|
|
4
|
-
const
|
|
17
|
+
const h = o(t), u = o(t);
|
|
5
18
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
19
|
+
u as TtErrorTooltip,
|
|
20
|
+
h as TtFormItemErrorTooltip,
|
|
21
|
+
h as default
|
|
9
22
|
};
|