@dazhicheng/ui 1.5.202 → 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 +3 -3
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import "axios";
|
|
2
|
+
import "element-plus";
|
|
3
|
+
import { isFunction as a } from "../../../../../packages/utils/src/is.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
import { clnm as d } 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
|
+
function c(r, t, o) {
|
|
13
|
+
return r || !!t || !!o;
|
|
4
14
|
}
|
|
5
|
-
function
|
|
6
|
-
const { dynamicRules:
|
|
7
|
-
return { rules:
|
|
15
|
+
function A(r, t) {
|
|
16
|
+
const { dynamicRules: o, dynamicDisabled: i, props: s } = t, m = r.rules ?? o ?? s.rules, e = r.formItemClass || s.formItemClass, l = a(e) ? e() : e, p = r.wrapperClass, n = c(i, !!r.disabled, !!s.disabled);
|
|
17
|
+
return { rules: m, formItemClass: d("col-span-1", l), disabled: n, wrapperClass: p };
|
|
8
18
|
}
|
|
9
19
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
20
|
+
c as getMergedDisabled,
|
|
21
|
+
A as resolveArrayItemState
|
|
12
22
|
};
|
|
@@ -1,51 +1,63 @@
|
|
|
1
1
|
import { ref as u, computed as C, watch as I } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import "axios";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import { isFunction as o, isBoolean as d } 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 "../../../../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";
|
|
3
15
|
import { get as S } from "es-toolkit/compat";
|
|
4
16
|
import { useFormValues as W } from "vee-validate";
|
|
5
17
|
import { injectRenderFormProps as j } from "./context.js";
|
|
6
|
-
function x(a,
|
|
7
|
-
if (
|
|
8
|
-
const h =
|
|
18
|
+
function x(a, r) {
|
|
19
|
+
if (r.startsWith("[") && r.endsWith("]")) {
|
|
20
|
+
const h = r.slice(1, -1);
|
|
9
21
|
return a[h];
|
|
10
22
|
}
|
|
11
|
-
return S(a,
|
|
23
|
+
return S(a, r);
|
|
12
24
|
}
|
|
13
|
-
function
|
|
25
|
+
function Y(a) {
|
|
14
26
|
var F;
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
27
|
+
const r = W(), e = j().form;
|
|
28
|
+
if (!r)
|
|
17
29
|
throw new Error("useDependencies should be used within <TtForm>");
|
|
18
|
-
const s = u(!0), l = u(!1),
|
|
19
|
-
var
|
|
20
|
-
return (((
|
|
30
|
+
const s = u(!0), l = u(!1), m = u(!0), c = u(!1), w = u({}), g = u(), b = C(() => {
|
|
31
|
+
var t;
|
|
32
|
+
return (((t = a()) == null ? void 0 : t.triggerFields) ?? []).map((n) => x(r.value, n));
|
|
21
33
|
}), q = () => {
|
|
22
|
-
l.value = !1, s.value = !0,
|
|
34
|
+
l.value = !1, s.value = !0, m.value = !0, c.value = !1, g.value = void 0, w.value = {};
|
|
23
35
|
};
|
|
24
36
|
return I(
|
|
25
37
|
[b, a],
|
|
26
|
-
async ([B,
|
|
38
|
+
async ([B, t]) => {
|
|
27
39
|
var V;
|
|
28
|
-
if (!
|
|
40
|
+
if (!t || !((V = t == null ? void 0 : t.triggerFields) != null && V.length))
|
|
29
41
|
return;
|
|
30
42
|
q();
|
|
31
|
-
const { componentProps:
|
|
32
|
-
if (o(
|
|
33
|
-
if (s.value = !!await
|
|
34
|
-
} else if (p
|
|
43
|
+
const { componentProps: n, disabled: f, if: p, required: y, rules: P, show: v, trigger: R } = t, i = r.value;
|
|
44
|
+
if (o(p)) {
|
|
45
|
+
if (s.value = !!await p(i, e), !s.value) return;
|
|
46
|
+
} else if (d(p) && (s.value = p, !s.value))
|
|
35
47
|
return;
|
|
36
|
-
o(
|
|
48
|
+
o(v) ? m.value = !!await v(i, e) : d(v) && (m.value = v), o(n) && (w.value = await n(i, e)), o(P) && (g.value = await P(i, e)), o(f) ? l.value = !!await f(i, e) : d(f) && (l.value = f), o(y) && (c.value = !!await y(i, e)), o(R) && await R(i, e);
|
|
37
49
|
},
|
|
38
50
|
{ deep: !0, immediate: ((F = a()) == null ? void 0 : F.immediate) ?? !0 }
|
|
39
51
|
), {
|
|
40
|
-
dynamicComponentProps:
|
|
41
|
-
dynamicRules:
|
|
52
|
+
dynamicComponentProps: w,
|
|
53
|
+
dynamicRules: g,
|
|
42
54
|
isDisabled: l,
|
|
43
55
|
isIf: s,
|
|
44
|
-
isRequired:
|
|
45
|
-
isShow:
|
|
56
|
+
isRequired: c,
|
|
57
|
+
isShow: m
|
|
46
58
|
};
|
|
47
59
|
}
|
|
48
60
|
export {
|
|
49
|
-
|
|
61
|
+
Y as default,
|
|
50
62
|
x as resolveValueByFieldName
|
|
51
63
|
};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { defineComponent as ee, useSlots as oe, computed as n, createBlock as C, openBlock as p, resolveDynamicComponent as D, normalizeProps as re, guardReactiveProps as te, withCtx as g, createElementVNode as le, normalizeClass as y, createElementBlock as f, renderSlot as d, Fragment as v, renderList as M, unref as b, mergeProps as R, createSlots as se } from "vue";
|
|
2
2
|
import "../components/Slot.js";
|
|
3
|
-
import
|
|
3
|
+
import "axios";
|
|
4
|
+
import "element-plus";
|
|
5
|
+
import { isString as ne, isFunction as ae } from "../../../../packages/utils/src/is.js";
|
|
6
|
+
import { clnm as w } from "../../../../packages/utils/src/tool.js";
|
|
7
|
+
import { mergeWithArrayOverride as pe } from "../../../../packages/utils/src/merge.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";
|
|
13
|
+
import "lodash-es";
|
|
4
14
|
import { Form as me } from "vee-validate";
|
|
5
15
|
import "../../../tt-form-item-error-tooltip/index.js";
|
|
6
16
|
import "../../../tt-icon/index.js";
|
|
7
17
|
import "@vueuse/core";
|
|
8
|
-
import "element-plus";
|
|
9
18
|
/* empty css */
|
|
10
19
|
import "../form/RenderContent.vue.js";
|
|
11
20
|
import { provideFormRenderProps as ie } from "./context.js";
|
|
@@ -13,8 +22,9 @@ import { useExpandable as ue } from "./expandable.js";
|
|
|
13
22
|
import { FORM_RENDER_DEFAULT_WRAPPER_CLASS as fe, getFormRootWrapperClass as de } from "./rootWrapperClass.js";
|
|
14
23
|
import { FieldRenderer as ce } from "./FormFieldContact.js";
|
|
15
24
|
import { getBaseRules as Ce, getDefaultValueInZodStack as ge } from "./helper.js";
|
|
16
|
-
import
|
|
17
|
-
|
|
25
|
+
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";
|
|
26
|
+
import { useDesign as ye } from "../../../../packages/hooks/src/useDesign.js";
|
|
27
|
+
const je = /* @__PURE__ */ ee({
|
|
18
28
|
name: "FormRender",
|
|
19
29
|
__name: "form",
|
|
20
30
|
props: {
|
|
@@ -90,7 +100,7 @@ const De = /* @__PURE__ */ ee({
|
|
|
90
100
|
labelWidth: $ = 70,
|
|
91
101
|
modelPropName: x = "",
|
|
92
102
|
wrapperClass: X = ""
|
|
93
|
-
} =
|
|
103
|
+
} = pe(r.commonConfig, r.globalCommonConfig);
|
|
94
104
|
let L = 0;
|
|
95
105
|
return (r.schema || []).map((t) => {
|
|
96
106
|
if (i(t)) return t;
|
|
@@ -114,7 +124,7 @@ const De = /* @__PURE__ */ ee({
|
|
|
114
124
|
const O = h.value, Y = r.showCollapseButton && H.value && O ? O <= L : !1;
|
|
115
125
|
L++;
|
|
116
126
|
let c = t.formItemClass;
|
|
117
|
-
if (
|
|
127
|
+
if (ae(t.formItemClass))
|
|
118
128
|
try {
|
|
119
129
|
c = t.formItemClass();
|
|
120
130
|
} catch {
|
|
@@ -192,5 +202,5 @@ const De = /* @__PURE__ */ ee({
|
|
|
192
202
|
}
|
|
193
203
|
});
|
|
194
204
|
export {
|
|
195
|
-
|
|
205
|
+
je as default
|
|
196
206
|
};
|
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import "axios";
|
|
2
|
+
import "element-plus";
|
|
3
|
+
import { isObject as f, isString as n } from "../../../../packages/utils/src/is.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
import "xe-utils";
|
|
6
|
+
import "dayjs";
|
|
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";
|
|
5
15
|
function r(e) {
|
|
6
|
-
|
|
16
|
+
return !e || n(e) ? null : "innerType" in e.def ? r(e.def.innerType) : "schema" in e.def ? r(e.def.schema) : e;
|
|
17
|
+
}
|
|
18
|
+
function i(e) {
|
|
19
|
+
if (!e || n(e))
|
|
7
20
|
return;
|
|
8
|
-
const
|
|
9
|
-
if (
|
|
10
|
-
if ("innerType" in
|
|
11
|
-
return
|
|
12
|
-
if ("schema" in
|
|
13
|
-
return
|
|
21
|
+
const t = e;
|
|
22
|
+
if (t.def.type === "default") return t.def.defaultValue;
|
|
23
|
+
if ("innerType" in t.def)
|
|
24
|
+
return i(t.def.innerType);
|
|
25
|
+
if ("schema" in t.def)
|
|
26
|
+
return i(t.def.schema);
|
|
14
27
|
}
|
|
15
|
-
function
|
|
16
|
-
return !e || !
|
|
28
|
+
function k(e) {
|
|
29
|
+
return !e || !f(e) ? !1 : Reflect.has(e, "target") && Reflect.has(e, "stopPropagation");
|
|
17
30
|
}
|
|
18
31
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
r as getBaseRules,
|
|
33
|
+
i as getDefaultValueInZodStack,
|
|
34
|
+
k as isEventObjectLike
|
|
22
35
|
};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import "axios";
|
|
2
|
+
import "element-plus";
|
|
3
|
+
import "dayjs";
|
|
4
|
+
import "vue";
|
|
5
|
+
import { clnm as m } 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
|
+
const s = "grid-cols-1 sm:grid-cols-2 md:grid-cols-3";
|
|
13
|
+
function E(r) {
|
|
14
|
+
const { layout: p, compact: t, wrapperClass: i } = r, o = ["flex"];
|
|
15
|
+
return p === "inline" ? o.push("flex-wrap gap-x-2") : o.push(t ? "gap-x-2" : "gap-x-4", "flex-col grid"), m(...o, i ?? s);
|
|
6
16
|
}
|
|
7
17
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
18
|
+
s as FORM_RENDER_DEFAULT_WRAPPER_CLASS,
|
|
19
|
+
E as getFormRootWrapperClass
|
|
10
20
|
};
|
|
@@ -8,8 +8,19 @@ import { set as A, get as w, has as T, cloneDeep as E } from "lodash-es";
|
|
|
8
8
|
import { asFieldArrayContext as H } from "./types/forms.js";
|
|
9
9
|
import { childArrayPath as P, normalizeArrayFieldPath as g, collectArrayFieldPathAliases as C } from "./utils/array-path.js";
|
|
10
10
|
import { Store as j } from "@tanstack/vue-store";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import "axios";
|
|
12
|
+
import "element-plus";
|
|
13
|
+
import { isFunction as S, isObject as v, isDayjsObject as N, isDate as M } from "../../../packages/utils/src/is.js";
|
|
14
|
+
import { bindMethods as Y } from "../../../packages/utils/src/tool.js";
|
|
15
|
+
import { mergeWithArrayOverride as V } from "../../../packages/utils/src/merge.js";
|
|
16
|
+
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
17
|
+
import { StateHandler as z } from "../../../packages/utils/src/stateHandler.js";
|
|
18
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
19
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
20
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
21
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
22
|
+
import { isFormSchema as I, shouldSeedAppendedFieldValue as B, resolveSchemaFieldInitialValue as k, resolveArrayFieldInitialValueWithRuntime as U, resolveParentItemPathFromArrayPath as W } from "./useFormContext.js";
|
|
23
|
+
import { createDefu as q } from "../../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js";
|
|
13
24
|
function x() {
|
|
14
25
|
return {
|
|
15
26
|
actionWrapperClass: "",
|
|
@@ -43,7 +54,7 @@ function D(u, t = "YYYY-MM-DD") {
|
|
|
43
54
|
return String(u ?? "");
|
|
44
55
|
}
|
|
45
56
|
}
|
|
46
|
-
class
|
|
57
|
+
class ye {
|
|
47
58
|
constructor(t = {}) {
|
|
48
59
|
// private api: Pick<TtFormProps, 'handleReset' | 'handleSubmit'>;
|
|
49
60
|
h(this, "form", {});
|
|
@@ -173,13 +184,13 @@ class ie {
|
|
|
173
184
|
if (!e || !Array.isArray(e))
|
|
174
185
|
return;
|
|
175
186
|
const r = (i, n = ",") => {
|
|
176
|
-
this.processFields(i, n, t, (a,
|
|
187
|
+
this.processFields(i, n, t, (a, o) => {
|
|
177
188
|
if (Array.isArray(a))
|
|
178
|
-
return a.join(
|
|
189
|
+
return a.join(o);
|
|
179
190
|
if (typeof a == "string") {
|
|
180
191
|
if (a === "")
|
|
181
192
|
return [];
|
|
182
|
-
const c =
|
|
193
|
+
const c = o.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
|
|
183
194
|
return a.split(new RegExp(c));
|
|
184
195
|
} else
|
|
185
196
|
return a;
|
|
@@ -202,19 +213,19 @@ class ie {
|
|
|
202
213
|
h(this, "handleRangeTimeValue", (t) => {
|
|
203
214
|
var s;
|
|
204
215
|
const e = { ...t }, r = (s = this.state) == null ? void 0 : s.fieldMappingTime;
|
|
205
|
-
return this.handleMultiFields(e), !r || !Array.isArray(r) || r.forEach(([i, [n, a],
|
|
216
|
+
return this.handleMultiFields(e), !r || !Array.isArray(r) || r.forEach(([i, [n, a], o = "YYYY-MM-DD"]) => {
|
|
206
217
|
if (n && a && e[i] === null && (Reflect.deleteProperty(e, n), Reflect.deleteProperty(e, a)), !e[i]) {
|
|
207
218
|
Reflect.deleteProperty(e, i);
|
|
208
219
|
return;
|
|
209
220
|
}
|
|
210
|
-
const [c,
|
|
211
|
-
if (
|
|
212
|
-
e[n] = c, e[a] =
|
|
213
|
-
else if (S(
|
|
214
|
-
e[n] =
|
|
221
|
+
const [c, l] = e[i];
|
|
222
|
+
if (o === null)
|
|
223
|
+
e[n] = c, e[a] = l;
|
|
224
|
+
else if (S(o))
|
|
225
|
+
e[n] = o(c, n), e[a] = o(l, a);
|
|
215
226
|
else {
|
|
216
|
-
const [m, d] = Array.isArray(
|
|
217
|
-
e[n] = c ? D(c, m) : void 0, e[a] =
|
|
227
|
+
const [m, d] = Array.isArray(o) ? o : [o, o];
|
|
228
|
+
e[n] = c ? D(c, m) : void 0, e[a] = l ? D(l, d) : void 0;
|
|
218
229
|
}
|
|
219
230
|
Reflect.deleteProperty(e, i);
|
|
220
231
|
}), e;
|
|
@@ -236,7 +247,7 @@ class ie {
|
|
|
236
247
|
this.prevState = this.state, this.state = this.store.state, this.updateState();
|
|
237
248
|
}
|
|
238
249
|
}
|
|
239
|
-
), this.state = this.store.state, this.stateHandler = new
|
|
250
|
+
), this.state = this.store.state, this.stateHandler = new z(), Y(this);
|
|
240
251
|
}
|
|
241
252
|
/**
|
|
242
253
|
* 获取字段组件实例
|
|
@@ -282,7 +293,7 @@ class ie {
|
|
|
282
293
|
return i === "merge" ? (n) => (e.push(n), r) : i === "submitAllForm" ? async (n = !0) => {
|
|
283
294
|
try {
|
|
284
295
|
const a = await Promise.all(
|
|
285
|
-
e.map(async (
|
|
296
|
+
e.map(async (o) => (await o.validate()).valid ? F(await o.getValues() || {}) : void 0)
|
|
286
297
|
);
|
|
287
298
|
return n ? Object.assign({}, ...a) : a;
|
|
288
299
|
} catch {
|
|
@@ -306,9 +317,9 @@ class ie {
|
|
|
306
317
|
return;
|
|
307
318
|
const e = this.form.values, r = {};
|
|
308
319
|
for (const i of t) {
|
|
309
|
-
if (!I(i) || !
|
|
320
|
+
if (!I(i) || !B(e, i))
|
|
310
321
|
continue;
|
|
311
|
-
const n =
|
|
322
|
+
const n = k(i);
|
|
312
323
|
n !== void 0 && (r[i.fieldName] = n);
|
|
313
324
|
}
|
|
314
325
|
Object.keys(r).length > 0 && await this.setValues(r, !0, !1);
|
|
@@ -331,9 +342,9 @@ class ie {
|
|
|
331
342
|
const r = [...((i = this.state) == null ? void 0 : i.schema) ?? []], s = (e == null ? void 0 : e.before) ?? (e == null ? void 0 : e.after);
|
|
332
343
|
if (s) {
|
|
333
344
|
const n = {};
|
|
334
|
-
r.forEach((
|
|
335
|
-
const
|
|
336
|
-
A(n,
|
|
345
|
+
r.forEach((o, c) => {
|
|
346
|
+
const l = o.fieldName;
|
|
347
|
+
A(n, l, c);
|
|
337
348
|
});
|
|
338
349
|
const a = w(n, s);
|
|
339
350
|
if (typeof a == "number") {
|
|
@@ -420,13 +431,13 @@ class ie {
|
|
|
420
431
|
s.setValues(i, r);
|
|
421
432
|
return;
|
|
422
433
|
}
|
|
423
|
-
const n = this.getFieldNamesForSetValuesFilter(), a = new Set(n),
|
|
434
|
+
const n = this.getFieldNamesForSetValuesFilter(), a = new Set(n), o = { ...s.values };
|
|
424
435
|
for (const d of n)
|
|
425
|
-
T(
|
|
436
|
+
T(o, d) || A(o, d, void 0);
|
|
426
437
|
const c = {};
|
|
427
438
|
for (const d of n)
|
|
428
439
|
a.has(d) && T(i, d) && A(c, d, w(i, d));
|
|
429
|
-
const
|
|
440
|
+
const l = q((d, f, p) => (f in d && (d[f] = !Array.isArray(d[f]) && v(d[f]) && !N(d[f]) && !M(d[f]) ? l(p, d[f]) : p), !0)), m = l(c, o);
|
|
430
441
|
s.setValues(m, r);
|
|
431
442
|
}
|
|
432
443
|
async submitForm(t) {
|
|
@@ -447,9 +458,9 @@ class ie {
|
|
|
447
458
|
const s = [...((n = this.state) == null ? void 0 : n.schema) ?? []], i = {};
|
|
448
459
|
e.forEach((a) => {
|
|
449
460
|
a.fieldName && (i[a.fieldName] = a);
|
|
450
|
-
}), s.forEach((a,
|
|
461
|
+
}), s.forEach((a, o) => {
|
|
451
462
|
const c = i[a.fieldName];
|
|
452
|
-
c && (s[
|
|
463
|
+
c && (s[o] = V(c, a));
|
|
453
464
|
}), this.setState({ schema: s });
|
|
454
465
|
}
|
|
455
466
|
async validate(t) {
|
|
@@ -500,8 +511,8 @@ class ie {
|
|
|
500
511
|
if (i == null || i === "" || i === 0)
|
|
501
512
|
return !1;
|
|
502
513
|
if (N(i)) {
|
|
503
|
-
const
|
|
504
|
-
return ((a =
|
|
514
|
+
const o = i;
|
|
515
|
+
return ((a = o.isValid) == null ? void 0 : a.call(o)) !== !1;
|
|
505
516
|
}
|
|
506
517
|
return M(i) ? !Number.isNaN(i.getTime()) : R(i).isValid();
|
|
507
518
|
};
|
|
@@ -524,16 +535,16 @@ class ie {
|
|
|
524
535
|
for (const n of e) {
|
|
525
536
|
if (!Array.isArray(n) || n.length < 2)
|
|
526
537
|
continue;
|
|
527
|
-
const a = n[0],
|
|
528
|
-
if (typeof a != "string" || !a || !Array.isArray(
|
|
538
|
+
const a = n[0], o = n[1], c = n[2];
|
|
539
|
+
if (typeof a != "string" || !a || !Array.isArray(o) || o.length < 2)
|
|
529
540
|
continue;
|
|
530
|
-
const [
|
|
531
|
-
if (typeof
|
|
541
|
+
const [l, m] = o;
|
|
542
|
+
if (typeof l != "string" || typeof m != "string" || !r.has(a) || this.isValidRangeTimePair(s[a]))
|
|
532
543
|
continue;
|
|
533
|
-
const d = Object.prototype.hasOwnProperty.call(s,
|
|
544
|
+
const d = Object.prototype.hasOwnProperty.call(s, l), f = Object.prototype.hasOwnProperty.call(s, m);
|
|
534
545
|
if (!d && !f)
|
|
535
546
|
continue;
|
|
536
|
-
const p = s[
|
|
547
|
+
const p = s[l], _ = s[m];
|
|
537
548
|
if (!(this.isSplitTimeEmptyValue(p) && this.isSplitTimeEmptyValue(_))) {
|
|
538
549
|
if (c === null)
|
|
539
550
|
s[a] = [p, _];
|
|
@@ -542,7 +553,7 @@ class ie {
|
|
|
542
553
|
continue;
|
|
543
554
|
s[a] = [this.normalizeRangeValue(p), this.normalizeRangeValue(_)];
|
|
544
555
|
}
|
|
545
|
-
Reflect.deleteProperty(s,
|
|
556
|
+
Reflect.deleteProperty(s, l), Reflect.deleteProperty(s, m);
|
|
546
557
|
}
|
|
547
558
|
}
|
|
548
559
|
return s;
|
|
@@ -561,13 +572,13 @@ class ie {
|
|
|
561
572
|
* @param {string[]} removedFieldNames 已从 schema 中移除的字段名
|
|
562
573
|
*/
|
|
563
574
|
onRemovedSchemaFields(t) {
|
|
564
|
-
var e, r, s, i, n, a,
|
|
565
|
-
for (const
|
|
566
|
-
(r = (e = this.form) == null ? void 0 : e.resetField) == null || r.call(e,
|
|
575
|
+
var e, r, s, i, n, a, o, c;
|
|
576
|
+
for (const l of t)
|
|
577
|
+
(r = (e = this.form) == null ? void 0 : e.resetField) == null || r.call(e, l, {
|
|
567
578
|
value: void 0,
|
|
568
579
|
touched: !1,
|
|
569
580
|
errors: []
|
|
570
|
-
}), (i = (s = this.form) == null ? void 0 : s.setFieldValue) == null || i.call(s,
|
|
581
|
+
}), (i = (s = this.form) == null ? void 0 : s.setFieldValue) == null || i.call(s, l, void 0), (a = (n = this.form) == null ? void 0 : n.setFieldError) == null || a.call(n, l, void 0), (c = (o = this.form) == null ? void 0 : o.setFieldTouched) == null || c.call(o, l, !1);
|
|
571
582
|
}
|
|
572
583
|
/**
|
|
573
584
|
* store 更新后对比前后 `schema` 的 fieldName 集合,对已从 schema 中移除的字段清空 vee-validate 值与错误,
|
|
@@ -579,15 +590,15 @@ class ie {
|
|
|
579
590
|
for (const a of t) {
|
|
580
591
|
if (!Reflect.has(a, "fieldName"))
|
|
581
592
|
continue;
|
|
582
|
-
const
|
|
583
|
-
typeof
|
|
593
|
+
const o = a.fieldName;
|
|
594
|
+
typeof o == "string" && o.length > 0 && r.add(o);
|
|
584
595
|
}
|
|
585
596
|
const s = [];
|
|
586
597
|
for (const a of e) {
|
|
587
598
|
if (!Reflect.has(a, "fieldName"))
|
|
588
599
|
continue;
|
|
589
|
-
const
|
|
590
|
-
typeof
|
|
600
|
+
const o = a.fieldName;
|
|
601
|
+
typeof o != "string" || !o.length || r.has(o) || s.push(o);
|
|
591
602
|
}
|
|
592
603
|
s.length && this.onRemovedSchemaFields(s);
|
|
593
604
|
}
|
|
@@ -661,16 +672,16 @@ class ie {
|
|
|
661
672
|
const s = this._getArrayFieldSchema(t);
|
|
662
673
|
if (!s)
|
|
663
674
|
return;
|
|
664
|
-
const i = this._resolveArrayFieldPath(t), n = this._getArrayFieldActions(t), a = (n == null ? void 0 : n.fields.length) ?? 0,
|
|
675
|
+
const i = this._resolveArrayFieldPath(t), n = this._getArrayFieldActions(t), a = (n == null ? void 0 : n.fields.length) ?? 0, o = (r == null ? void 0 : r.index) ?? a, c = (r == null ? void 0 : r.arrayLength) ?? a + 1, l = U(s, {
|
|
665
676
|
arrayPath: i,
|
|
666
|
-
parentItemPath:
|
|
677
|
+
parentItemPath: W(i),
|
|
667
678
|
form: this.form.values,
|
|
668
679
|
arrayAction: this.arrayAction,
|
|
669
680
|
row: v(e) ? e : void 0,
|
|
670
|
-
index:
|
|
681
|
+
index: o,
|
|
671
682
|
arrayLength: c
|
|
672
683
|
});
|
|
673
|
-
return Array.isArray(
|
|
684
|
+
return Array.isArray(l) ? E(l[0]) : E(l);
|
|
674
685
|
}
|
|
675
686
|
/**
|
|
676
687
|
* @description 合并数组新增项值,优先使用 schema 默认值补齐
|
|
@@ -784,7 +795,7 @@ class ie {
|
|
|
784
795
|
}
|
|
785
796
|
}
|
|
786
797
|
export {
|
|
787
|
-
|
|
798
|
+
ye as FormApi,
|
|
788
799
|
C as collectArrayFieldPathAliases,
|
|
789
800
|
g as normalizeArrayFieldPath
|
|
790
801
|
};
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { defineComponent as te, useSlots as re, provide as C, computed as s, useTemplateRef as ne, ref as le, createElementBlock as k, openBlock as T, Fragment as L, createBlock as V, createCommentVNode as ae, createElementVNode as K, mergeProps as A, unref as y, withModifiers as se, normalizeClass as ie, normalizeStyle as ce, renderList as D, createSlots as ue, withCtx as me, renderSlot as pe, h as fe, nextTick as ve } from "vue";
|
|
2
2
|
import { TtNavAnchor as de } from "../../../tt-nav-anchor/index.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
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";
|
|
4
|
+
import { useDesign as ge } from "../../../../packages/hooks/src/useDesign.js";
|
|
5
|
+
import "axios";
|
|
6
|
+
import "element-plus";
|
|
7
|
+
import { isFunction as he } from "../../../../packages/utils/src/is.js";
|
|
8
|
+
import "xe-utils";
|
|
9
|
+
import "dayjs";
|
|
10
|
+
import "dayjs/plugin/utc";
|
|
11
|
+
import "dayjs/plugin/timezone";
|
|
12
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
13
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
14
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
15
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
16
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
17
|
+
import "lodash-es";
|
|
5
18
|
import { DEFAULT_FORM_COMMON_CONFIG as Ce, COMPONENT_BIND_EVENT_MAP as Te, COMPONENT_MAP as ye } from "../config.js";
|
|
6
19
|
import { provideFormRenderProps as Ee } from "../form-render/context.js";
|
|
7
20
|
import { useForwardPriorityValues as _e } from "../hooks/useForwardPriorityValues.js";
|
|
@@ -11,7 +24,7 @@ import Ae from "./GroupSection.vue2.js";
|
|
|
11
24
|
import { VIRTUAL_ERROR_CACHE_KEY as Fe, RENDER_SCHEDULER_KEY as Be, createRenderScheduler as Me, GROUP_VISIBILITY_CALLBACK_KEY as be, HIDDEN_GROUP_KEYS_KEY as Oe } from "./lazyContext.js";
|
|
12
25
|
import { getSchemaKey as He, isGroupSchema as Ne } from "./utils.js";
|
|
13
26
|
import { getFormRootWrapperClass as Ie } from "../form-render/rootWrapperClass.js";
|
|
14
|
-
const Pe = 5, Ge = 500,
|
|
27
|
+
const Pe = 5, Ge = 500, co = /* @__PURE__ */ te({
|
|
15
28
|
name: "TtVirtualGroupForm",
|
|
16
29
|
inheritAttrs: !1,
|
|
17
30
|
__name: "GroupForm",
|
|
@@ -219,5 +232,5 @@ const Pe = 5, Ge = 500, Je = /* @__PURE__ */ te({
|
|
|
219
232
|
}
|
|
220
233
|
});
|
|
221
234
|
export {
|
|
222
|
-
|
|
235
|
+
co as default
|
|
223
236
|
};
|