@web-utils/form-ui 1.0.0-beta16 → 1.0.0-beta18

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 (102) hide show
  1. package/base.css +1 -1
  2. package/chunks/53gSZ624.mjs +41 -0
  3. package/chunks/7Desvoh-.mjs +222 -0
  4. package/chunks/7vQ29mMd.mjs +53 -0
  5. package/chunks/8ORg8rrN.mjs +108 -0
  6. package/chunks/B4LDPAZu.mjs +98 -0
  7. package/chunks/B5B9au3z.mjs +180 -0
  8. package/chunks/BVzpe2oN.mjs +76 -0
  9. package/chunks/Bb5BT11-.mjs +26 -0
  10. package/chunks/Bh_CMUlo.mjs +12 -0
  11. package/chunks/Bj5l6sFx.mjs +73 -0
  12. package/chunks/BsbfEk0E.mjs +26 -0
  13. package/chunks/C1DlzLpD.mjs +222 -0
  14. package/chunks/CFwUzdTu.mjs +95 -0
  15. package/chunks/CKw_uzPc.mjs +108 -0
  16. package/chunks/D2WviyxF.mjs +166 -0
  17. package/chunks/D9GcEl6r.mjs +8 -0
  18. package/chunks/DCKxvrCR.mjs +189 -0
  19. package/chunks/DH1_fmkX.mjs +26 -0
  20. package/chunks/DUDm42gn.mjs +100 -0
  21. package/chunks/DgbDpRQg.mjs +51 -0
  22. package/chunks/DkqF25wT.mjs +106 -0
  23. package/chunks/DynLjTwi.mjs +17 -0
  24. package/chunks/Q9EsFJ4H.mjs +88 -0
  25. package/chunks/wfL1FAwc.mjs +1360 -0
  26. package/constants.d.ts +26 -1
  27. package/constants.mjs +2 -2
  28. package/element-dialog/index.d.ts +58 -15
  29. package/element-dialog/index.mjs +2 -94
  30. package/form-cascader/index.d.ts +2 -0
  31. package/form-cascader/index.mjs +10 -0
  32. package/form-check-box-group/index.d.ts +196 -22
  33. package/form-check-box-group/index.mjs +1 -1
  34. package/form-checkbox/index.d.ts +188 -24
  35. package/form-checkbox/index.mjs +1 -1
  36. package/form-date-picker/index.d.ts +307 -20
  37. package/form-date-picker/index.mjs +1 -1
  38. package/form-holder/index.d.ts +92 -21
  39. package/form-holder/index.mjs +1 -1
  40. package/form-holder/style.css +1 -1
  41. package/form-image/index.d.ts +138 -20
  42. package/form-image/index.mjs +1 -1
  43. package/form-input/index.d.ts +281 -40
  44. package/form-input/index.mjs +1 -1
  45. package/form-input-cron-expression/index.d.ts +215 -0
  46. package/form-input-cron-expression/index.mjs +2 -0
  47. package/form-input-cron-expression/style.css +1 -0
  48. package/form-input-email/index.d.ts +279 -21
  49. package/form-input-email/index.mjs +1 -1
  50. package/form-input-id-card/index.d.ts +279 -21
  51. package/form-input-id-card/index.mjs +1 -1
  52. package/form-input-number/index.d.ts +228 -24
  53. package/form-input-number/index.mjs +1 -1
  54. package/form-input-phone-number/index.d.ts +279 -21
  55. package/form-input-phone-number/index.mjs +1 -1
  56. package/form-item-config-provider/index.d.ts +3 -1
  57. package/form-item-config-provider/index.mjs +1 -1
  58. package/form-item-group/index.mjs +46 -30
  59. package/form-item-x/index.d.ts +124 -15
  60. package/form-item-x/index.mjs +1 -1
  61. package/form-radio-group/index.d.ts +196 -22
  62. package/form-radio-group/index.mjs +1 -1
  63. package/form-rate/index.d.ts +232 -18
  64. package/form-rate/index.mjs +1 -1
  65. package/form-row/index.mjs +1 -1
  66. package/form-select/index.d.ts +455 -22
  67. package/form-select/index.mjs +1 -1
  68. package/form-slider/index.d.ts +261 -18
  69. package/form-slider/index.mjs +1 -1
  70. package/form-switch/index.d.ts +238 -20
  71. package/form-switch/index.mjs +1 -1
  72. package/form-text/index.d.ts +144 -20
  73. package/form-text/index.mjs +1 -1
  74. package/index.d.ts +4 -1
  75. package/index.mjs +37 -60
  76. package/month-calendar/index.mjs +312 -2
  77. package/month-calendar/style.css +1 -1
  78. package/package.json +3 -1
  79. package/vue-cron/index.d.ts +191 -0
  80. package/vue-cron/index.mjs +2 -0
  81. package/vue-cron/style.css +1 -0
  82. package/web-types.json +1 -1
  83. package/year-calendar/index.mjs +2 -1
  84. package/chunks/B5BIQCcK.mjs +0 -149
  85. package/chunks/BDhGvPmU.mjs +0 -32
  86. package/chunks/BXOvvlL2.mjs +0 -35
  87. package/chunks/C6tYoDfK.mjs +0 -43
  88. package/chunks/CAYDWMXC.mjs +0 -47
  89. package/chunks/CXHvVx2H.mjs +0 -54
  90. package/chunks/CykRgGj0.mjs +0 -90
  91. package/chunks/D4SiGR5u.mjs +0 -28
  92. package/chunks/DAEpRn3D.mjs +0 -28
  93. package/chunks/DK2YoEOD.mjs +0 -167
  94. package/chunks/DL4ovOwO.mjs +0 -36
  95. package/chunks/DXrQ5tWJ.mjs +0 -35
  96. package/chunks/Xww4oyW1.mjs +0 -47
  97. package/chunks/ciEWoJ1U.mjs +0 -23
  98. package/chunks/dwnrVqcq.mjs +0 -315
  99. package/chunks/jpMiw_3M.mjs +0 -74
  100. package/chunks/vlkluoXb.mjs +0 -32
  101. package/chunks/wo0ekOcp.mjs +0 -28
  102. /package/chunks/{CI_28Uw4.mjs → 98bTmBOR.mjs} +0 -0
@@ -1,36 +0,0 @@
1
- import { n as e, o as t, r as n } from "./DK2YoEOD.mjs";
2
- import { ElSwitch as r } from "element-plus/es";
3
- import { createVNode as i, isVNode as a } from "vue";
4
- //#region src/components/form/FormSwitch.vue?vue&type=script&lang.jsx
5
- function o(e) {
6
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
7
- }
8
- //#endregion
9
- //#region src/components/form/FormSwitch.vue
10
- var s = {
11
- name: "FormSwitch",
12
- inheritAttrs: !1,
13
- props: {
14
- ...n,
15
- modelValue: [
16
- Boolean,
17
- String,
18
- Number
19
- ]
20
- },
21
- emits: { ...e },
22
- setup(e, { emit: n, slots: a }) {
23
- let { emitInput: s, render: c, disabled: l } = t(e, {
24
- emit: n,
25
- slots: a
26
- });
27
- return () => c({ vNodes: i(r, {
28
- modelValue: e.modelValue,
29
- clearable: !0,
30
- disabled: l.value,
31
- "onUpdate:modelValue": s
32
- }, o(a) ? a : { default: () => [a] }) });
33
- }
34
- };
35
- //#endregion
36
- export { s as t };
@@ -1,35 +0,0 @@
1
- import { n as e, o as t, r as n } from "./DK2YoEOD.mjs";
2
- import { ElCheckbox as r } from "element-plus/es";
3
- import { createVNode as i } from "vue";
4
- //#endregion
5
- //#region src/components/form/FormCheckbox.vue
6
- var a = {
7
- name: "FormCheckbox",
8
- inheritAttrs: !1,
9
- props: {
10
- ...n,
11
- modelValue: [
12
- String,
13
- Number,
14
- Boolean
15
- ],
16
- value: String,
17
- label: String
18
- },
19
- emits: { ...e },
20
- setup(e, { emit: n, slots: a }) {
21
- let { emitInput: o, render: s, disabled: c } = t(e, {
22
- emit: n,
23
- slots: a
24
- });
25
- return () => s({ vNodes: i(r, {
26
- modelValue: e.modelValue,
27
- value: e.value,
28
- label: e.label,
29
- disabled: c.value,
30
- "onUpdate:modelValue": o
31
- }, { default: a.default }) });
32
- }
33
- };
34
- //#endregion
35
- export { a as t };
@@ -1,47 +0,0 @@
1
- import { n as e, o as t, r as n } from "./DK2YoEOD.mjs";
2
- import { ElOption as r, ElSelect as i } from "element-plus/es";
3
- import { createVNode as a } from "vue";
4
- //#endregion
5
- //#region src/components/form/FormSelect.vue
6
- var o = {
7
- name: "FormSelect",
8
- inheritAttrs: !1,
9
- props: {
10
- ...n,
11
- modelValue: String,
12
- options: [
13
- String,
14
- Number,
15
- Boolean,
16
- Object,
17
- Array
18
- ]
19
- },
20
- emits: { ...e },
21
- setup(e, { emit: n, slots: o }) {
22
- let { emitInput: s, render: c, placeholder: l, disabled: u } = t(e, {
23
- emit: n,
24
- slots: o,
25
- messagePrefix: "请选择"
26
- });
27
- return () => c({ vNodes: a(i, {
28
- modelValue: e.modelValue,
29
- clearable: !0,
30
- disabled: u.value,
31
- "onUpdate:modelValue": s,
32
- placeholder: l.value
33
- }, {
34
- ...o,
35
- default: o.default || (() => {
36
- var t;
37
- return (t = e.options) == null ? void 0 : t.map(({ value: e, label: t }) => a(r, {
38
- key: e,
39
- label: t,
40
- value: e
41
- }, null));
42
- })
43
- }) });
44
- }
45
- };
46
- //#endregion
47
- export { o as t };
@@ -1,23 +0,0 @@
1
- import { c as e, i as t, r as n } from "./DK2YoEOD.mjs";
2
- import { ElText as r } from "element-plus/es";
3
- import { createVNode as i } from "vue";
4
- //#endregion
5
- //#region src/components/form/FormText.vue
6
- var a = {
7
- name: "FormText",
8
- inheritAttrs: !1,
9
- props: {
10
- ...n,
11
- text: String
12
- },
13
- setup(n, { slots: a }) {
14
- let o = e(n);
15
- return () => t(n, {
16
- vNodes: i(r, null, { default: a.default || (() => n.text) }),
17
- formItemProps: o,
18
- slots: a
19
- });
20
- }
21
- };
22
- //#endregion
23
- export { a as t };
@@ -1,315 +0,0 @@
1
- import { Fragment as e, createElementBlock as t, createElementVNode as n, normalizeClass as r, normalizeStyle as i, openBlock as a, renderList as o, toDisplayString as s, withModifiers as c } from "vue";
2
- import l from "dayjs";
3
- //#region \0plugin-vue:export-helper
4
- var u = (e, t) => {
5
- let n = e.__vccOpts || e;
6
- for (let [e, r] of t) n[e] = r;
7
- return n;
8
- }, d = {
9
- name: "MonthCalendar",
10
- props: {
11
- activeDates: {
12
- type: Array,
13
- default: () => []
14
- },
15
- month: {
16
- type: [String, Number],
17
- default: () => l().month() + 1
18
- },
19
- year: {
20
- type: [String, Number],
21
- default: () => l().year()
22
- },
23
- lang: {
24
- type: String,
25
- default: "en"
26
- },
27
- activeClass: {
28
- type: String,
29
- default: () => ""
30
- },
31
- prefixClass: {
32
- type: String,
33
- default: () => "calendar--active"
34
- }
35
- },
36
- emits: ["toggleDate", "monthClickEvent"],
37
- data() {
38
- return {
39
- showDays: [],
40
- isMouseDown: !1
41
- };
42
- },
43
- computed: {
44
- weekTitleFontSizeAdjustLang() {
45
- return {
46
- tw: "16px",
47
- en: "14px",
48
- pt: "14px",
49
- de: "14px",
50
- es: "14px",
51
- pl: "12px",
52
- ru: "14px"
53
- }[this.lang];
54
- },
55
- monthTitle() {
56
- return {
57
- tw: [
58
- "一月",
59
- "二月",
60
- "三月",
61
- "四月",
62
- "五月",
63
- "六月",
64
- "七月",
65
- "八月",
66
- "九月",
67
- "十月",
68
- "十一月",
69
- "十二月"
70
- ],
71
- en: [
72
- "January",
73
- "February",
74
- "March",
75
- "April",
76
- "May",
77
- "June",
78
- "July",
79
- "August",
80
- "September",
81
- "October",
82
- "November",
83
- "December"
84
- ],
85
- pt: [
86
- "Janeiro",
87
- "Fevereiro",
88
- "Março",
89
- "Abril",
90
- "Maio",
91
- "Junho",
92
- "Julho",
93
- "Agosto",
94
- "Setembro",
95
- "Outubro",
96
- "Novembro",
97
- "Dezembro"
98
- ],
99
- de: [
100
- "Januar",
101
- "Februar",
102
- "März",
103
- "April",
104
- "Mai",
105
- "Juni",
106
- "Juli",
107
- "August",
108
- "September",
109
- "Oktober",
110
- "November",
111
- "Dezember"
112
- ],
113
- es: [
114
- "Enero",
115
- "Febrero",
116
- "Marzo",
117
- "Abril",
118
- "Mayo",
119
- "Junio",
120
- "Julio",
121
- "Agosto",
122
- "Septiembre",
123
- "Octubre",
124
- "Noviembre",
125
- "Diciembre"
126
- ],
127
- pl: [
128
- "Styczeń",
129
- "Luty",
130
- "Marzec",
131
- "Kwiecień",
132
- "Maj",
133
- "Czerwiec",
134
- "Lipiec",
135
- "Sierpień",
136
- "Wrzesień",
137
- "Październik",
138
- "Listopad",
139
- "Grudzień"
140
- ],
141
- ru: [
142
- "Январь",
143
- "Февраль",
144
- "Март",
145
- "Апрель",
146
- "Май",
147
- "Июнь",
148
- "Июль",
149
- "Август",
150
- "Сентябрь",
151
- "Октябрь",
152
- "Ноябрь",
153
- "Декабрь"
154
- ]
155
- }[this.lang][this.month - 1];
156
- }
157
- },
158
- watch: {
159
- year(e) {
160
- this.initCalendar();
161
- },
162
- activeDates(e, t) {
163
- this.initCalendar();
164
- }
165
- },
166
- created() {
167
- this.initCalendar();
168
- },
169
- methods: {
170
- initCalendar() {
171
- if (!this.year || !this.month) return [];
172
- let e = l().set("date", 1).set("year", this.year).set("month", this.month - 1), t = e.startOf("month").day() - 1;
173
- t < 0 && (t += 7);
174
- let n = e.endOf("month").date(), r = t >= 5 ? 6 : 5, i = 0;
175
- this.showDays = Array.from(Array(r * 7).keys()).map((e) => ({
176
- value: t <= e ? i++ % n + 1 : "",
177
- active: !1,
178
- isOtherMonth: t > e || i > n
179
- })), this.activeDates.forEach((e) => {
180
- let n;
181
- typeof e == "string" ? n = {
182
- date: e,
183
- className: this.activeClass
184
- } : typeof e == "object" && (n = e);
185
- let r = l(n.date);
186
- if (r.year() !== this.year) return;
187
- let i = r.date(), a = Math.floor(i / 7), o = i % 7 - 1 + t + 7 * a;
188
- this.showDays[o].active = !0, this.showDays[o].className = n.className;
189
- });
190
- },
191
- showDayTitle(e) {
192
- return {
193
- tw: [
194
- "一",
195
- "二",
196
- "三",
197
- "四",
198
- "五",
199
- "六",
200
- "日"
201
- ],
202
- en: [
203
- "Mo",
204
- "Tu",
205
- "We",
206
- "Th",
207
- "Fr",
208
- "Sa",
209
- "Su"
210
- ],
211
- pt: [
212
- "2ª",
213
- "3ª",
214
- "4ª",
215
- "5ª",
216
- "6ª",
217
- "Sa",
218
- "Do"
219
- ],
220
- de: [
221
- "Mo",
222
- "Di",
223
- "Mi",
224
- "Do",
225
- "Fr",
226
- "Sa",
227
- "So"
228
- ],
229
- es: [
230
- "Lu",
231
- "Ma",
232
- "Mi",
233
- "Ju",
234
- "Vi",
235
- "Sá",
236
- "Do"
237
- ],
238
- pl: [
239
- "Pon",
240
- "Wt",
241
- "Śr",
242
- "Czw",
243
- "Pt",
244
- "Sob",
245
- "Nie"
246
- ],
247
- ru: [
248
- "Пн",
249
- "Вт",
250
- "Ср",
251
- "Чт",
252
- "Пт",
253
- "Сб",
254
- "Вс"
255
- ]
256
- }[this.lang][e];
257
- },
258
- toggleDay(e) {
259
- e.isOtherMonth || this.$emit("toggleDate", {
260
- month: this.month,
261
- date: e.value,
262
- selected: !e.active,
263
- className: this.activeClass
264
- });
265
- },
266
- dragDay(e) {
267
- this.isMouseDown && this.toggleDay(e);
268
- },
269
- mouseDown(e) {
270
- this.toggleDay(e), this.isMouseDown = !0;
271
- },
272
- mouseUp() {
273
- this.isMouseDown = !1;
274
- },
275
- classList(e) {
276
- let t = {
277
- "calendar__day--otherMonth": e.isOtherMonth,
278
- [this.prefixClass]: e.active
279
- };
280
- return e.active && (t[e.className] = !0), t;
281
- },
282
- monthClickEvent(e) {
283
- let t = {
284
- monthTitle: this.monthTitle,
285
- month: this.month,
286
- year: e
287
- };
288
- this.$emit("monthClickEvent", t);
289
- }
290
- }
291
- }, f = { class: "c-wrapper" }, p = { class: "calendar__body" }, m = ["onMouseover", "onMousedown"];
292
- function h(l, u, d, h, g, _) {
293
- return a(), t("div", f, [n("div", {
294
- class: "calendar",
295
- onMouseup: u[1] || (u[1] = (...e) => _.mouseUp && _.mouseUp(...e)),
296
- onMouseleave: u[2] || (u[2] = c((...e) => _.mouseUp && _.mouseUp(...e), ["stop"]))
297
- }, [n("div", {
298
- class: "calendar__title",
299
- onClick: u[0] || (u[0] = (e) => _.monthClickEvent(d.year))
300
- }, s(_.monthTitle), 1), n("div", p, [(a(), t(e, null, o(7, (e, t) => n("div", {
301
- key: `title${e}`,
302
- class: "calendar__day day__weektitle",
303
- style: i({ fontSize: _.weekTitleFontSizeAdjustLang })
304
- }, s(_.showDayTitle(t)), 5)), 64)), (a(!0), t(e, null, o(g.showDays, (e, i) => (a(), t("div", {
305
- key: `day${i}`,
306
- class: "calendar__day"
307
- }, [n("div", {
308
- class: r(["day", _.classList(e)]),
309
- onMouseover: (t) => _.dragDay(e),
310
- onMousedown: (t) => _.mouseDown(e)
311
- }, s(e.value), 43, m)]))), 128))])], 32)]);
312
- }
313
- var g = /* @__PURE__ */ u(d, [["render", h], ["__scopeId", "data-v-458fd3a6"]]);
314
- //#endregion
315
- export { u as n, g as t };
@@ -1,74 +0,0 @@
1
- import { n as e, o as t, r as n } from "./DK2YoEOD.mjs";
2
- import { ElDatePicker as r } from "element-plus/es";
3
- import { computed as i, createVNode as a } from "vue";
4
- //#endregion
5
- //#region src/components/form/FormDatePicker.vue
6
- var o = {
7
- name: "FormDatePicker",
8
- inheritAttrs: !1,
9
- props: {
10
- ...n,
11
- modelValue: [
12
- String,
13
- Number,
14
- Date,
15
- Array
16
- ],
17
- type: {
18
- type: String,
19
- default: "date"
20
- },
21
- unlinkPanels: {
22
- type: Boolean,
23
- default: !0
24
- },
25
- split: Boolean,
26
- startDate: String,
27
- endDate: String
28
- },
29
- emits: {
30
- ...e,
31
- "update:startDate": null,
32
- "update:endDate": null
33
- },
34
- setup(e, { emit: n, slots: o }) {
35
- let { emitInput: s, render: c, placeholder: l, disabled: u } = t(e, {
36
- emit: n,
37
- slots: o,
38
- messagePrefix: "请选择"
39
- }), d = i(() => {
40
- switch (e.type) {
41
- case "date":
42
- case "daterange": return "YYYY-MM-DD";
43
- case "datetime":
44
- case "datetimerange": return "YYYY-MM-DD HH:mm:ss";
45
- default: return "";
46
- }
47
- }), f = i(() => e.split && e.type.indexOf("range") > -1), p = (e, t) => {
48
- n("update:startDate", e), n("update:endDate", t);
49
- }, m = (e) => {
50
- f.value ? e ? p(e[0], e[1]) : p(null, null) : s(e);
51
- }, h = i(() => f.value ? [e.startDate, e.endDate] : e.modelValue);
52
- return () => c({ vNodes: a(r, {
53
- style: "width: 100%",
54
- clearable: !0,
55
- modelValue: h.value,
56
- type: e.type,
57
- unlinkPanels: e.unlinkPanels,
58
- disabled: u.value,
59
- "onUpdate:modelValue": m,
60
- format: d.value,
61
- "value-format": d.value,
62
- placeholder: l.value
63
- }, {
64
- default: o.default,
65
- "range-separator": o["range-separator"],
66
- "pre-month": o["pre-month"],
67
- "next-month": o["next-month"],
68
- "pre-year": o["pre-year"],
69
- "next-year": o["next-year"]
70
- }) });
71
- }
72
- };
73
- //#endregion
74
- export { o as t };
@@ -1,32 +0,0 @@
1
- import { n as e, o as t, r as n } from "./DK2YoEOD.mjs";
2
- import { ElSlider as r } from "element-plus/es";
3
- import { createVNode as i, isVNode as a } from "vue";
4
- //#region src/components/form/FormSlider.vue?vue&type=script&lang.jsx
5
- function o(e) {
6
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
7
- }
8
- //#endregion
9
- //#region src/components/form/FormSlider.vue
10
- var s = {
11
- name: "FormSlider",
12
- inheritAttrs: !1,
13
- props: {
14
- ...n,
15
- modelValue: [Number, Array]
16
- },
17
- emits: { ...e },
18
- setup(e, { emit: n, slots: a }) {
19
- let { emitInput: s, render: c, disabled: l } = t(e, {
20
- emit: n,
21
- slots: a
22
- });
23
- return () => c({ vNodes: i(r, {
24
- modelValue: e.modelValue,
25
- clearable: !0,
26
- disabled: l.value,
27
- "onUpdate:modelValue": s
28
- }, o(a) ? a : { default: () => [a] }) });
29
- }
30
- };
31
- //#endregion
32
- export { s as t };
@@ -1,28 +0,0 @@
1
- import { a as e, n as t, r as n } from "./DK2YoEOD.mjs";
2
- import { t as r } from "./CykRgGj0.mjs";
3
- import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
4
- //#region src/components/form/FormInputPhoneNumber.vue?vue&type=script&lang.jsx
5
- function s(e) {
6
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
7
- }
8
- //#endregion
9
- //#region src/components/form/FormInputPhoneNumber.vue
10
- var c = {
11
- name: "FormInputPhoneNumber",
12
- inheritAttrs: !1,
13
- props: {
14
- ...n,
15
- modelValue: String
16
- },
17
- emits: { ...t },
18
- setup(t, { emit: n, slots: a }) {
19
- let c = (t) => e(n, t);
20
- return () => i(r, o(t, {
21
- modelValue: t.modelValue,
22
- type: "phone",
23
- "onUpdate:modelValue": c
24
- }), s(a) ? a : { default: () => [a] });
25
- }
26
- };
27
- //#endregion
28
- export { c as t };
File without changes