@web-utils/form-ui 1.0.0-beta31 → 1.0.0-beta33

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.
Files changed (106) hide show
  1. package/chunks/{Cc3EJjbV.mjs → 1cDNhlSV.mjs} +2 -2
  2. package/chunks/{C4bM8miy.mjs → A3sHIRQ_.mjs} +2 -3
  3. package/chunks/{Ci1XxmdE.mjs → BLRY0zkF.mjs} +3 -3
  4. package/chunks/{Cby3mvvZ.mjs → BLWwTutr.mjs} +2 -2
  5. package/chunks/{BgDYHgyH.mjs → BTS_zTkz.mjs} +1 -1
  6. package/chunks/BX-cVxlK.mjs +102 -0
  7. package/chunks/BYAy19s4.mjs +113 -0
  8. package/chunks/BmacSnUz.mjs +657 -0
  9. package/chunks/BvsmTC3G.mjs +229 -0
  10. package/chunks/{Dt6gY213.mjs → BwdWZEjT.mjs} +5 -5
  11. package/chunks/{bnRb5PUB.mjs → CGJkMYZ4.mjs} +5 -5
  12. package/chunks/CLn0r4lV.mjs +177 -0
  13. package/chunks/{Cgl-hCE5.mjs → CNskrN5I.mjs} +2 -2
  14. package/chunks/{D1G2MMMx.mjs → CWfUPCtS.mjs} +4 -4
  15. package/chunks/{4ZuVpQf6.mjs → CnAEuI_c.mjs} +1 -1
  16. package/chunks/{Cy-4nmyC.mjs → Cr1vBYne.mjs} +4 -4
  17. package/chunks/{BV_P9a8o.mjs → D5_ctQqL.mjs} +2 -2
  18. package/chunks/{CsfgUCe9.mjs → D7hD-ppq.mjs} +1 -1
  19. package/chunks/DFsI7Y6h.mjs +197 -0
  20. package/chunks/{B99alfW4.mjs → DJKE5P39.mjs} +2 -2
  21. package/chunks/DQKi5eEl.mjs +166 -0
  22. package/chunks/{BmZieBZW.mjs → DQxPzCsy.mjs} +2 -2
  23. package/chunks/DcbnHU8K.mjs +145 -0
  24. package/chunks/{DazglPJZ.mjs → Dgyjc3LT.mjs} +1 -1
  25. package/chunks/{JhyiXnbd.mjs → DistOy_O.mjs} +8 -4
  26. package/chunks/{C44-CFi-.mjs → ZXCLnZFa.mjs} +4 -4
  27. package/chunks/{D1EOkWJ7.mjs → _dm2lLNL.mjs} +2 -2
  28. package/chunks/{CugRu2Ka.mjs → axr9InkL.mjs} +3 -3
  29. package/chunks/{C3a15Ful.mjs → iWQD3xvX.mjs} +2 -2
  30. package/chunks/uYaz9cwr.mjs +336 -0
  31. package/editable-tree/index.d.ts +254 -0
  32. package/editable-tree/index.mjs +2 -0
  33. package/editable-tree/style.css +1 -0
  34. package/element-dialog/index.d.ts +6 -6
  35. package/element-dialog/index.mjs +1 -1
  36. package/form-cascader/index.d.ts +5 -5
  37. package/form-cascader/index.mjs +1 -1
  38. package/form-check-box-group/index.d.ts +78 -7
  39. package/form-check-box-group/index.mjs +1 -1
  40. package/form-check-box-group/style.css +1 -0
  41. package/form-checkbox/index.d.ts +4 -2
  42. package/form-checkbox/index.mjs +1 -1
  43. package/form-date-picker/index.d.ts +63 -11
  44. package/form-date-picker/index.mjs +1 -1
  45. package/form-holder/index.mjs +1 -1
  46. package/form-image/index.mjs +1 -1
  47. package/form-input/index.d.ts +3 -3
  48. package/form-input/index.mjs +1 -1
  49. package/form-input-cron-expression/index.mjs +1 -1
  50. package/form-input-email/index.d.ts +3 -3
  51. package/form-input-email/index.mjs +1 -1
  52. package/form-input-id-card/index.d.ts +3 -3
  53. package/form-input-id-card/index.mjs +1 -1
  54. package/form-input-number/index.d.ts +5 -3
  55. package/form-input-number/index.mjs +1 -1
  56. package/form-input-phone-number/index.d.ts +3 -3
  57. package/form-input-phone-number/index.mjs +1 -1
  58. package/form-item-group/index.d.ts +0 -2
  59. package/form-item-group/index.mjs +1 -1
  60. package/form-item-group/style.css +1 -1
  61. package/form-item-x/index.mjs +1 -1
  62. package/form-item-x/style.css +1 -1
  63. package/form-radio-group/index.d.ts +91 -4
  64. package/form-radio-group/index.mjs +1 -1
  65. package/form-rate/index.mjs +1 -1
  66. package/form-row/index.mjs +1 -1
  67. package/form-select/index.d.ts +82 -10
  68. package/form-select/index.mjs +1 -1
  69. package/form-slider/index.d.ts +2 -2
  70. package/form-slider/index.mjs +1 -1
  71. package/form-switch/index.d.ts +4 -4
  72. package/form-switch/index.mjs +1 -1
  73. package/form-text/index.mjs +1 -1
  74. package/helper/dictionary.mjs +7 -7
  75. package/iframe-window/index.mjs +1 -1
  76. package/index.d.ts +2 -1
  77. package/index.mjs +47 -46
  78. package/month-calendar/index.d.ts +1 -1
  79. package/package.json +1 -1
  80. package/pageable-table/index.d.ts +4 -4
  81. package/pageable-table/index.mjs +1 -1
  82. package/resize-observer/index.mjs +2 -2
  83. package/table-column/index.d.ts +4 -4
  84. package/table-column/index.mjs +1 -1
  85. package/table-column-def/index.mjs +1 -1
  86. package/table-view/index.d.ts +340 -1
  87. package/table-view/index.mjs +452 -6
  88. package/table-view/style.css +1 -0
  89. package/toolbar/index.mjs +1 -1
  90. package/toolbar-button/index.d.ts +136 -24
  91. package/toolbar-button/index.mjs +1 -1
  92. package/vue-cron/index.mjs +1 -1
  93. package/web-types.json +1 -1
  94. package/x-input-tag/index.mjs +1 -1
  95. package/year-calendar/index.mjs +1 -1
  96. package/chunks/BQ77eAb3.mjs +0 -71
  97. package/chunks/Br4i8stg.mjs +0 -222
  98. package/chunks/DO8dVGef.mjs +0 -98
  99. package/chunks/DtAYXPvz.mjs +0 -108
  100. package/chunks/S64sNmuR.mjs +0 -226
  101. package/chunks/dM-icPM8.mjs +0 -107
  102. package/chunks/pxFLMMUm.mjs +0 -110
  103. package/chunks/q1SlJP1y.mjs +0 -171
  104. /package/chunks/{CkFapoKt.mjs → B1MSrc6f.mjs} +0 -0
  105. /package/chunks/{C9J3j0PX.mjs → BW6iY7Q7.mjs} +0 -0
  106. /package/chunks/{BV_N8p9t.mjs → DiE4GJtU.mjs} +0 -0
@@ -1,5 +1,5 @@
1
- import { n as e } from "./Br4i8stg.mjs";
2
- import { n as t, t as n } from "./C4bM8miy.mjs";
1
+ import { n as e } from "./BvsmTC3G.mjs";
2
+ import { n as t, t as n } from "./A3sHIRQ_.mjs";
3
3
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
4
4
  //#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
5
5
  function s(e) {
@@ -1,5 +1,5 @@
1
- import { i as e, n as t, t as n } from "./Br4i8stg.mjs";
2
- import { n as r, t as i } from "./CsfgUCe9.mjs";
1
+ import { i as e, n as t, t as n } from "./BvsmTC3G.mjs";
2
+ import { n as r, t as i } from "./D7hD-ppq.mjs";
3
3
  import { validatePhoneNum as a } from "@web-utils/core";
4
4
  import { computed as o, createVNode as s, mergeProps as c, useModel as l } from "vue";
5
5
  import { ElInput as u } from "element-plus/es";
@@ -74,7 +74,6 @@ var p = {
74
74
  default: !0
75
75
  },
76
76
  inputStyle: [String, Object],
77
- label: String,
78
77
  inputmode: String,
79
78
  countGraphemes: Function,
80
79
  prepend: String,
@@ -1,6 +1,6 @@
1
- import { s as e } from "./BQ77eAb3.mjs";
2
- import { o as t, r as n } from "./Br4i8stg.mjs";
3
- import { n as r } from "./CsfgUCe9.mjs";
1
+ import { u as e } from "./BX-cVxlK.mjs";
2
+ import { o as t, r as n } from "./BvsmTC3G.mjs";
3
+ import { n as r } from "./D7hD-ppq.mjs";
4
4
  import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
5
5
  import { ElImage as s } from "element-plus/es";
6
6
  //#region src/components/form/props/image.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Br4i8stg.mjs";
2
- import { n, t as r } from "./CsfgUCe9.mjs";
1
+ import { i as e, n as t } from "./BvsmTC3G.mjs";
2
+ import { n, t as r } from "./D7hD-ppq.mjs";
3
3
  import { useDictionary as i } from "../hook/useDictionary.mjs";
4
4
  import { findTreeChildren as a, isArray as o, isString as s, setParent as c } from "@web-utils/core";
5
5
  import { computed as l, createVNode as u, mergeProps as d } from "vue";
@@ -1,4 +1,4 @@
1
- import { s as e } from "./BQ77eAb3.mjs";
1
+ import { u as e } from "./BX-cVxlK.mjs";
2
2
  import { formHolderContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
3
3
  import r from "../form-advice/index.mjs";
4
4
  import i from "../form-red-table/index.mjs";
@@ -0,0 +1,102 @@
1
+ import { camelize as e, capitalize as t, copy as n, hyphenate as r, isArray as i, isFunction as a, isString as o, uncapitalize as s } from "@web-utils/core";
2
+ import { computed as c, useAttrs as l } from "vue";
3
+ import { ElMessage as u } from "element-plus";
4
+ //#region src/utils/index.ts
5
+ var d = (e, n, r, i, a = !0) => {
6
+ let o = {};
7
+ if (n) for (let t in e) n(t) && (o[t] = e[t]);
8
+ return a && r && r.forEach((e) => {
9
+ o[`on${t(e)}`] = (...t) => i(e, ...t);
10
+ }), o;
11
+ }, f = ({ removeOn: t = !0, include: n, exclude: r } = {}) => {
12
+ let i = l();
13
+ return c(() => {
14
+ let a = {}, o = {}, c = {}, l = !1;
15
+ (n || r) && (l = !0), n == null || n.forEach((t) => {
16
+ o[e(t)] = !0;
17
+ }), r == null || r.forEach((t) => {
18
+ c[e(t)] = !0;
19
+ });
20
+ for (let e in i) if (e.startsWith("on")) {
21
+ let u = s(e.replace(/^on/, ""));
22
+ if (l && (n && o[u] !== !0 || r && c[u] === !0)) continue;
23
+ t ? a[u] = i[e] : a[e] = i[e];
24
+ }
25
+ return a;
26
+ });
27
+ }, p = (e, { emit: t, events: n, predicate: r }) => c(() => d(e, r, n, t)), m = (e, { withOn: t = !1 } = {}) => {
28
+ let n = {};
29
+ for (let r in e) r.startsWith("on") && (t ? n[r] = e[r] : n[s(r.replace(/^on/, ""))] = e[r]);
30
+ return n;
31
+ }, h = (e, t = "id", n = "label") => {
32
+ let r = [];
33
+ function i(e, a) {
34
+ if (!e) return;
35
+ let o = [...a, {
36
+ [t]: e[t],
37
+ [n]: e[n]
38
+ }];
39
+ if (!e.children || e.children.length === 0) {
40
+ r.push(o);
41
+ return;
42
+ }
43
+ e.children.forEach((e) => {
44
+ i(e, o);
45
+ });
46
+ }
47
+ return e.forEach((e) => i(e, [])), r;
48
+ }, g = (e, t = "id", n = "label") => {
49
+ let r = [];
50
+ return h(e).forEach((e) => {
51
+ let i = [], a = [];
52
+ for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
53
+ r.push({
54
+ value: i.join("/"),
55
+ label: a.join("/")
56
+ });
57
+ }), r;
58
+ }, _ = (e, t = "id", n = "label") => {
59
+ let r = {};
60
+ return h(e).forEach((e) => {
61
+ let i = [], a = [];
62
+ for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
63
+ r[i.join("/")] = {
64
+ value: i.join("/"),
65
+ label: a.join("/")
66
+ };
67
+ }), r;
68
+ };
69
+ function v(e) {
70
+ n(e, () => u.success({
71
+ duration: 1e3,
72
+ message: "复制成功!",
73
+ type: "success"
74
+ }), () => u.error({
75
+ duration: 1e3,
76
+ message: "复制失败!",
77
+ type: "error"
78
+ }));
79
+ }
80
+ var y = (e) => {
81
+ let t = [];
82
+ return e && (i(e) ? e.forEach((e) => {
83
+ i(e) ? t.push(...y(e)) : e && t.push(e);
84
+ }) : e && t.push(e)), t;
85
+ }, b = (e = "", t = {}) => {
86
+ let n = t || {};
87
+ return (e || "").replace(/{(.*?)}/g, (e, t) => {
88
+ if (t.indexOf(":")) {
89
+ let [e, r] = t.split(":");
90
+ return n[e] ? n[e] : r;
91
+ } else return n[t] || "";
92
+ });
93
+ }, x = (e, t) => a(e) ? b(e(t), t) : o(e) ? b(e, t) : null, S = (e) => {
94
+ let t = {};
95
+ for (let n in e) t[r(n)] = e[n];
96
+ return t;
97
+ }, C = (e, t) => {
98
+ for (let n in t) e[n] = t[n];
99
+ return e;
100
+ };
101
+ //#endregion
102
+ export { d as a, S as c, f as d, y as i, g as l, v as n, m as o, x as r, _ as s, C as t, p as u };
@@ -0,0 +1,113 @@
1
+ import { formItemGroupContextKey as e, formViewContextKey as t } from "../constants/index.mjs";
2
+ import n from "../empty-view/index.mjs";
3
+ import { Fragment as r, computed as i, createTextVNode as a, createVNode as o, h as s, inject as c, isVNode as l, onBeforeUnmount as u, onMounted as d, provide as f, reactive as p, ref as m, toRef as h, toRefs as g, useTemplateRef as _, vShow as v, watchEffect as y, withDirectives as b } from "vue";
4
+ import { ElCol as x, ElCollapseTransition as S } from "element-plus";
5
+ import { ElRow as C } from "element-plus/es";
6
+ //#region src/components/form/FormItemGroup.vue?vue&type=script&lang.jsx
7
+ function w(e) {
8
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
9
+ }
10
+ //#endregion
11
+ //#region src/components/form/FormItemGroup.vue
12
+ var T = {
13
+ name: "FormItemGroup",
14
+ props: {
15
+ blockTitle: String,
16
+ tips: String,
17
+ active: Boolean,
18
+ enabled: {
19
+ type: Boolean,
20
+ default: void 0
21
+ },
22
+ disabled: {
23
+ type: Boolean,
24
+ default: void 0
25
+ },
26
+ tag: {
27
+ type: String,
28
+ default: "ElCol"
29
+ },
30
+ span: {
31
+ type: Number,
32
+ default: 24
33
+ },
34
+ block: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ wrapRow: {
39
+ type: Boolean,
40
+ default: !0
41
+ },
42
+ gutter: {
43
+ type: Number,
44
+ default: 20
45
+ },
46
+ collapse: Boolean,
47
+ showTitle: {
48
+ type: Boolean,
49
+ default: !0
50
+ },
51
+ notDispatch: Boolean
52
+ },
53
+ setup(l, { expose: T, slots: E }) {
54
+ let D = c(t, null), O = _("root"), k = m(!0), A = h(() => l.enabled), j = h(() => l.disabled), M = i(() => l.enabled === !0 ? !1 : l.disabled === !0), N = i(() => l.tag === "ElCol"), P = () => k.value = !k.value, F = p({
55
+ el: h(() => N.value ? O.value.$el : O.value),
56
+ disabled: j,
57
+ enabled: A,
58
+ isDisabled: M,
59
+ open: () => {
60
+ k.value = !0;
61
+ },
62
+ expand: k,
63
+ ...g(l)
64
+ });
65
+ return y(() => {
66
+ k.value = !l.collapse;
67
+ }), f(e, F), d(() => {
68
+ if (!l.notDispatch) {
69
+ var e;
70
+ D == null || (e = D.addGroup) == null || e.call(D, F);
71
+ }
72
+ }), u(() => {
73
+ if (!l.notDispatch) {
74
+ var e;
75
+ D == null || (e = D.removeGroup) == null || e.call(D, F);
76
+ }
77
+ }), T(F), () => {
78
+ let e = () => {
79
+ var e;
80
+ return o(r, null, [b(o("div", {
81
+ class: "form-item-group-title",
82
+ onClick: P
83
+ }, [o("span", {
84
+ class: "flex-item",
85
+ style: "flex: 1"
86
+ }, [
87
+ E.title ? E.title() : l.blockTitle,
88
+ E.tips || l.tips ? o("span", { style: "color: #ff0000; font-size: 14px" }, [
89
+ a("("),
90
+ E.tips ? E.tips() : l.tips,
91
+ a(")")
92
+ ]) : null,
93
+ (e = E["title-right"]) == null ? void 0 : e.call(E)
94
+ ]), o("i", { class: k.value ? "el-icon-arrow-down" : "el-icon-arrow-right" }, null)]), [[v, l.showTitle]]), o(S, null, { default: () => {
95
+ let e;
96
+ return E.default ? l.wrapRow ? b(o(C, { gutter: l.gutter }, w(e = E.default()) ? e : { default: () => [e] }), [[v, k.value]]) : b(o("div", null, [E.default()]), [[v, k.value]]) : b(o(n, {
97
+ "font-size": "14px",
98
+ "empty-tips": "暂无信息"
99
+ }, null), [[v, k.value]]);
100
+ } })]);
101
+ }, t = {
102
+ ref: "root",
103
+ class: ["form-item-group", {
104
+ "default-active": l.active,
105
+ "is-disabled": M.value
106
+ }]
107
+ };
108
+ return N.value && (t.span = l.block ? 24 : l.span), s(N.value ? x : "div", t, N.value ? e : e());
109
+ };
110
+ }
111
+ };
112
+ //#endregion
113
+ export { T as t };