@web-utils/form-ui 1.0.0-beta32 → 1.0.0-beta34

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/{Cby3mvvZ.mjs → 6whKG2aW.mjs} +4 -2
  2. package/chunks/B0QAMGEk.mjs +149 -0
  3. package/chunks/{C4bM8miy.mjs → BINk6iM9.mjs} +4 -3
  4. package/chunks/{Cc3EJjbV.mjs → BMybeJeX.mjs} +2 -2
  5. package/chunks/{BgDYHgyH.mjs → BOnjsuaF.mjs} +4 -1
  6. package/chunks/BQvDsDYm.mjs +199 -0
  7. package/chunks/BRCCvDXx.mjs +339 -0
  8. package/chunks/BX-cVxlK.mjs +102 -0
  9. package/chunks/{B99alfW4.mjs → BnDWAjBA.mjs} +2 -2
  10. package/chunks/BrhuWxfn.mjs +168 -0
  11. package/chunks/{bnRb5PUB.mjs → Bsff-xFB.mjs} +7 -5
  12. package/chunks/{Cy-4nmyC.mjs → Bx4hMd0g.mjs} +6 -4
  13. package/chunks/{BmZieBZW.mjs → ByS9PiXt.mjs} +4 -2
  14. package/chunks/{C9J3j0PX.mjs → C5jtjhYS.mjs} +2 -0
  15. package/chunks/CK4RBjb4.mjs +660 -0
  16. package/chunks/{CsfgUCe9.mjs → CMMPk7_3.mjs} +1 -1
  17. package/chunks/{C44-CFi-.mjs → CO4Fyzj-.mjs} +13 -4
  18. package/chunks/{Cgl-hCE5.mjs → COdSAAp_.mjs} +2 -2
  19. package/chunks/CRf0wnBc.mjs +181 -0
  20. package/chunks/{Ci1XxmdE.mjs → CYgTbmSw.mjs} +5 -3
  21. package/chunks/{4ZuVpQf6.mjs → CnAEuI_c.mjs} +1 -1
  22. package/chunks/DPO-hveW.mjs +233 -0
  23. package/chunks/{C3a15Ful.mjs → DSJFPBdn.mjs} +4 -2
  24. package/chunks/{D1EOkWJ7.mjs → DfMmYJVy.mjs} +2 -2
  25. package/chunks/{Dt6gY213.mjs → Dlemc_K8.mjs} +8 -5
  26. package/chunks/{DazglPJZ.mjs → DukJJ_BZ.mjs} +3 -1
  27. package/chunks/KZeDzvm6.mjs +115 -0
  28. package/chunks/{CugRu2Ka.mjs → PRSE4n97.mjs} +5 -3
  29. package/chunks/{D1G2MMMx.mjs → b5HOxD60.mjs} +13 -4
  30. package/chunks/{BV_P9a8o.mjs → bTej_00x.mjs} +4 -2
  31. package/chunks/{JhyiXnbd.mjs → ierlNKc4.mjs} +10 -4
  32. package/editable-tree/index.d.ts +254 -0
  33. package/editable-tree/index.mjs +2 -0
  34. package/editable-tree/style.css +1 -0
  35. package/element-dialog/index.d.ts +6 -6
  36. package/element-dialog/index.mjs +1 -1
  37. package/form-cascader/index.d.ts +5 -5
  38. package/form-cascader/index.mjs +1 -1
  39. package/form-check-box-group/index.d.ts +78 -7
  40. package/form-check-box-group/index.mjs +1 -1
  41. package/form-check-box-group/style.css +1 -0
  42. package/form-checkbox/index.d.ts +4 -2
  43. package/form-checkbox/index.mjs +1 -1
  44. package/form-date-picker/index.d.ts +63 -11
  45. package/form-date-picker/index.mjs +1 -1
  46. package/form-holder/index.mjs +1 -1
  47. package/form-image/index.mjs +1 -1
  48. package/form-input/index.d.ts +3 -3
  49. package/form-input/index.mjs +1 -1
  50. package/form-input-cron-expression/index.mjs +1 -1
  51. package/form-input-email/index.d.ts +3 -3
  52. package/form-input-email/index.mjs +1 -1
  53. package/form-input-id-card/index.d.ts +3 -3
  54. package/form-input-id-card/index.mjs +1 -1
  55. package/form-input-number/index.d.ts +5 -3
  56. package/form-input-number/index.mjs +1 -1
  57. package/form-input-phone-number/index.d.ts +3 -3
  58. package/form-input-phone-number/index.mjs +1 -1
  59. package/form-item-group/index.d.ts +0 -2
  60. package/form-item-group/index.mjs +1 -1
  61. package/form-item-group/style.css +1 -1
  62. package/form-item-x/index.mjs +1 -1
  63. package/form-item-x/style.css +1 -1
  64. package/form-radio-group/index.d.ts +91 -4
  65. package/form-radio-group/index.mjs +1 -1
  66. package/form-rate/index.mjs +1 -1
  67. package/form-row/index.mjs +1 -1
  68. package/form-select/index.d.ts +82 -10
  69. package/form-select/index.mjs +1 -1
  70. package/form-slider/index.d.ts +2 -2
  71. package/form-slider/index.mjs +1 -1
  72. package/form-switch/index.d.ts +4 -4
  73. package/form-switch/index.mjs +1 -1
  74. package/form-text/index.mjs +1 -1
  75. package/helper/dictionary.mjs +7 -7
  76. package/iframe-window/index.mjs +1 -1
  77. package/index.d.ts +2 -1
  78. package/index.mjs +47 -46
  79. package/month-calendar/index.d.ts +1 -1
  80. package/package.json +1 -1
  81. package/pageable-table/index.d.ts +4 -4
  82. package/pageable-table/index.mjs +1 -1
  83. package/resize-observer/index.mjs +1 -1
  84. package/table-column/index.d.ts +4 -4
  85. package/table-column/index.mjs +1 -1
  86. package/table-column-def/index.mjs +1 -1
  87. package/table-view/index.d.ts +340 -1
  88. package/table-view/index.mjs +458 -6
  89. package/table-view/style.css +1 -0
  90. package/toolbar/index.mjs +1 -1
  91. package/toolbar-button/index.d.ts +136 -24
  92. package/toolbar-button/index.mjs +1 -1
  93. package/vue-cron/index.mjs +1 -1
  94. package/web-types.json +1 -1
  95. package/x-input-tag/index.mjs +6 -1
  96. package/year-calendar/index.mjs +1 -1
  97. package/chunks/BQ77eAb3.mjs +0 -71
  98. package/chunks/Br4i8stg.mjs +0 -222
  99. package/chunks/DO8dVGef.mjs +0 -98
  100. package/chunks/DtAYXPvz.mjs +0 -108
  101. package/chunks/S64sNmuR.mjs +0 -226
  102. package/chunks/dM-icPM8.mjs +0 -107
  103. package/chunks/pxFLMMUm.mjs +0 -110
  104. package/chunks/q1SlJP1y.mjs +0 -171
  105. /package/chunks/{CkFapoKt.mjs → B1MSrc6f.mjs} +0 -0
  106. /package/chunks/{BV_N8p9t.mjs → DiE4GJtU.mjs} +0 -0
@@ -1,10 +1,12 @@
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 "./DPO-hveW.mjs";
2
+ import { n, t as r } from "./CMMPk7_3.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";
6
6
  import { cloneDeep as f } from "@web-utils/integrations/lodash";
7
7
  import { ElCascader as p } from "element-plus/es";
8
+ import "element-plus/es/components/base/style/css";
9
+ import "element-plus/es/components/cascader/style/css";
8
10
  //#region src/components/form/props/cascader.ts
9
11
  var m = {
10
12
  ...n,
@@ -0,0 +1,149 @@
1
+ import { i as e, n as t } from "./DPO-hveW.mjs";
2
+ import { n } from "./CMMPk7_3.mjs";
3
+ import { useDictionary as r } from "../hook/useDictionary.mjs";
4
+ import { computed as i, createVNode as a, isVNode as o, mergeProps as s, useModel as c } from "vue";
5
+ import { ElRadio as l, ElRadioButton as u, ElRadioGroup as d } from "element-plus/es";
6
+ import "element-plus/es/components/base/style/css";
7
+ import "element-plus/es/components/radio-group/style/css";
8
+ import "element-plus/es/components/radio/style/css";
9
+ import "element-plus/es/components/radio-button/style/css";
10
+ //#region src/components/form/props/radio-group.ts
11
+ var f = {
12
+ ...n,
13
+ modelValue: [
14
+ String,
15
+ Number,
16
+ Boolean
17
+ ],
18
+ size: {
19
+ type: String,
20
+ default: "default"
21
+ },
22
+ validateEvent: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ textColor: {
27
+ type: String,
28
+ default: "#ffffff"
29
+ },
30
+ fill: {
31
+ type: String,
32
+ default: "#409eff"
33
+ },
34
+ ariaLabel: String,
35
+ name: String,
36
+ id: String,
37
+ options: {
38
+ type: Array,
39
+ default: () => []
40
+ },
41
+ props: {
42
+ type: Object,
43
+ default: () => ({
44
+ value: "value",
45
+ label: "label",
46
+ disabled: "disabled"
47
+ })
48
+ },
49
+ type: {
50
+ type: String,
51
+ default: "radio"
52
+ },
53
+ border: Boolean,
54
+ gender: Boolean,
55
+ overFlow: Boolean,
56
+ confirm: Boolean,
57
+ trigger: {
58
+ type: String,
59
+ default: "change"
60
+ },
61
+ labelProp: {
62
+ type: String,
63
+ default: "name"
64
+ },
65
+ valueProp: {
66
+ type: String,
67
+ default: "code"
68
+ },
69
+ english: Boolean,
70
+ chinese: Boolean,
71
+ typing: Boolean,
72
+ classic: {
73
+ type: Boolean,
74
+ default: !0
75
+ },
76
+ fillRow: Boolean,
77
+ ellipsis: Boolean,
78
+ inline: Boolean,
79
+ allowCancel: Boolean,
80
+ radioType: {
81
+ type: String,
82
+ default: "radio"
83
+ },
84
+ dictType: String
85
+ }, p = {
86
+ modelValue: !0,
87
+ disabled: !0,
88
+ type: !0,
89
+ options: !0
90
+ }, m = ["change"], h = (e) => n[e] === void 0 && p[e] !== !0;
91
+ //#endregion
92
+ //#region src/components/form/FormRadioGroup.vue?vue&type=script&lang.jsx
93
+ function g(e) {
94
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !o(e);
95
+ }
96
+ //#endregion
97
+ //#region src/components/form/FormRadioGroup.vue
98
+ var _ = {
99
+ name: "FormRadioGroup",
100
+ inheritAttrs: !1,
101
+ props: { ...f },
102
+ emits: {
103
+ ...t,
104
+ change: null
105
+ },
106
+ setup(t, { emit: n, slots: o, attrs: f }) {
107
+ let p = c(t, "modelValue"), { render: _, disabled: v, autoBind: y } = e(t, {
108
+ emit: n,
109
+ slots: o,
110
+ attrs: f,
111
+ events: m,
112
+ predicate: h,
113
+ messagePrefix: "请选择"
114
+ }), b = i(() => t.classic ? "label" : t.labelProp), x = i(() => t.classic ? "value" : t.valueProp), { dictItems: S } = r(t), C = i(() => t.dictType ? S.value : t.gender ? [{
115
+ [b.value]: "男",
116
+ [x.value]: t.chinese ? "男" : t.typing ? 1 : "1"
117
+ }, {
118
+ [b.value]: "女",
119
+ [x.value]: t.chinese ? "女" : t.typing ? 2 : "2"
120
+ }] : t.confirm ? [{
121
+ [b.value]: "是",
122
+ [x.value]: t.chinese ? "是" : t.english ? "Y" : t.typing ? 1 : "1"
123
+ }, {
124
+ [b.value]: "否",
125
+ [x.value]: t.chinese ? "否" : t.english ? "N" : t.typing ? 0 : "0"
126
+ }] : t.options);
127
+ return () => _({ vNodes: a(d, s(y.value, {
128
+ modelValue: p.value,
129
+ "onUpdate:modelValue": (e) => p.value = e,
130
+ disabled: v.value
131
+ }), {
132
+ ...o,
133
+ default: o.default || (() => {
134
+ var e;
135
+ return (e = C.value) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" || t.radioType === "button" ? a(u, {
136
+ key: e,
137
+ value: e,
138
+ disabled: r
139
+ }, g(n) ? n : { default: () => [n] }) : a(l, {
140
+ key: e,
141
+ value: e,
142
+ disabled: r
143
+ }, g(n) ? n : { default: () => [n] }));
144
+ })
145
+ }) });
146
+ }
147
+ };
148
+ //#endregion
149
+ export { _ as t };
@@ -1,8 +1,10 @@
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 "./DPO-hveW.mjs";
2
+ import { n as r, t as i } from "./CMMPk7_3.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";
6
+ import "element-plus/es/components/base/style/css";
7
+ import "element-plus/es/components/input/style/css";
6
8
  //#region src/utils/form-validate.ts
7
9
  var d = (e, t, n) => t && !/^[A-Za-z0-9\u4e00-\u9fa5_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(t) ? n(/* @__PURE__ */ Error("invalid")) : n();
8
10
  function f(e, t, n) {
@@ -74,7 +76,6 @@ var p = {
74
76
  default: !0
75
77
  },
76
78
  inputStyle: [String, Object],
77
- label: String,
78
79
  inputmode: String,
79
80
  countGraphemes: Function,
80
81
  prepend: String,
@@ -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 "./DPO-hveW.mjs";
2
+ import { n as t, t as n } from "./BINk6iM9.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,10 +1,13 @@
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";
5
5
  import { animate as a } from "@web-utils/core";
6
6
  import { computed as o, createVNode as s, inject as c, mergeProps as l, nextTick as u, provide as d, reactive as f, toRef as p, useTemplateRef as m } from "vue";
7
7
  import { ElForm as h, ElRow as g } from "element-plus/es";
8
+ import "element-plus/es/components/base/style/css";
9
+ import "element-plus/es/components/row/style/css";
10
+ import "element-plus/es/components/form/style/css";
8
11
  //#region src/components/form/props/form.ts
9
12
  var _ = {
10
13
  model: Object,
@@ -0,0 +1,199 @@
1
+ import { i as e, n as t } from "./DPO-hveW.mjs";
2
+ import { n } from "./CMMPk7_3.mjs";
3
+ import { computed as r, createVNode as i, mergeProps as a } from "vue";
4
+ import { ElDatePicker as o } from "element-plus/es";
5
+ import "element-plus/es/components/base/style/css";
6
+ import "element-plus/es/components/date-picker/style/css";
7
+ import { toDate as s } from "@web-utils/integrations/dayjs";
8
+ //#region src/components/form/props/date.ts
9
+ var c = {
10
+ ...n,
11
+ modelValue: [
12
+ Number,
13
+ String,
14
+ Date,
15
+ Array
16
+ ],
17
+ readonly: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ size: String,
22
+ editable: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ clearable: {
27
+ type: Boolean,
28
+ default: !0
29
+ },
30
+ placeholder: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ startPlaceholder: {
35
+ type: String,
36
+ default: "开始日期"
37
+ },
38
+ endPlaceholder: {
39
+ type: String,
40
+ default: "结束日期"
41
+ },
42
+ type: {
43
+ type: String,
44
+ default: "date"
45
+ },
46
+ format: {
47
+ type: String,
48
+ default: "YYYY-MM-DD"
49
+ },
50
+ popperClass: String,
51
+ popperStyle: [String, Object],
52
+ popperOptions: {
53
+ type: Object,
54
+ default: () => ({})
55
+ },
56
+ rangeSeparator: {
57
+ type: String,
58
+ default: "至"
59
+ },
60
+ defaultValue: Object,
61
+ defaultTime: Object,
62
+ valueFormat: String,
63
+ id: [String, Array],
64
+ name: {
65
+ type: [String, Array],
66
+ default: ""
67
+ },
68
+ unlinkPanels: {
69
+ type: Boolean,
70
+ default: !1
71
+ },
72
+ prefixIcon: [String, Object],
73
+ clearIcon: [String, Object],
74
+ validateEvent: {
75
+ type: Boolean,
76
+ default: !0
77
+ },
78
+ disabledDate: Function,
79
+ shortcuts: {
80
+ type: Array,
81
+ default: () => []
82
+ },
83
+ cellClassName: Function,
84
+ teleported: {
85
+ type: Boolean,
86
+ default: !0
87
+ },
88
+ emptyValues: Array,
89
+ valueOnClear: [
90
+ String,
91
+ Number,
92
+ Boolean,
93
+ Function
94
+ ],
95
+ fallbackPlacements: {
96
+ type: Array,
97
+ default: () => [
98
+ "bottom",
99
+ "top",
100
+ "right",
101
+ "left"
102
+ ]
103
+ },
104
+ placement: {
105
+ type: String,
106
+ default: "bottom"
107
+ },
108
+ showFooter: {
109
+ type: Boolean,
110
+ default: !0
111
+ },
112
+ showConfirm: {
113
+ type: Boolean,
114
+ default: !0
115
+ },
116
+ showWeekNumber: {
117
+ type: Boolean,
118
+ default: !1
119
+ },
120
+ automaticDropdown: {
121
+ type: Boolean,
122
+ default: !0
123
+ },
124
+ split: {
125
+ type: Boolean,
126
+ default: !0
127
+ },
128
+ startDate: String,
129
+ endDate: String,
130
+ start: String,
131
+ end: String,
132
+ year: Boolean,
133
+ month: Boolean,
134
+ dates: Boolean,
135
+ week: Boolean,
136
+ dateTime: Boolean,
137
+ dateTimeRange: Boolean,
138
+ dateRange: Boolean,
139
+ monthRange: Boolean,
140
+ miniDate: String,
141
+ maxDate: String
142
+ }, l = {
143
+ modelValue: !0,
144
+ name: !0,
145
+ emptyValues: !0,
146
+ type: !0,
147
+ valueOnClear: !0
148
+ }, u = ["change"], d = (e) => n[e] === void 0 && l[e] !== !0, f = {
149
+ name: "FormDatePicker",
150
+ inheritAttrs: !1,
151
+ props: { ...c },
152
+ emits: {
153
+ ...t,
154
+ "update:startDate": null,
155
+ "update:endDate": null
156
+ },
157
+ setup(t, { emit: n, slots: c, attrs: l }) {
158
+ let { emitInput: f, render: p, placeholder: m, disabled: h, autoBind: g } = e(t, {
159
+ emit: n,
160
+ slots: c,
161
+ attrs: l,
162
+ events: u,
163
+ predicate: d,
164
+ messagePrefix: "请选择"
165
+ }), _ = r(() => t.dateTimeRange || t.dateRange || t.monthRange), v = r(() => t.year ? "YYYY" : t.month || t.monthRange ? "YYYY-MM" : t.week ? "YYYY 第 WW 周" : t.dateTime || t.dateTimeRange ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD"), y = r(() => t.year ? "year" : t.month ? "month" : t.dates ? "dates" : t.week ? "week" : t.dateTime ? "datetime" : t.dateTimeRange ? "datetimerange" : t.dateRange ? "daterange" : t.monthRange ? "monthrange" : "date"), b = r(() => {
166
+ if (t.miniDate) {
167
+ let e = s(t.miniDate);
168
+ return e.setDate(e.getDate() - 1), e;
169
+ } else return null;
170
+ }), x = r(() => t.maxDate ? s(t.maxDate) : null), S = (e) => {
171
+ if (!b.value && !x.value) return !1;
172
+ let t = e.getTime();
173
+ return b.value && !x.value ? t <= b.value.getTime() : !b.value && x.value ? t >= x.value.getTime() : b.value && x.value ? !(t > b.value.getTime() && t <= x.value.getTime()) : !1;
174
+ }, C = (e, t) => {
175
+ n("update:startDate", e), n("update:endDate", t);
176
+ }, w = (e) => {
177
+ _.value && t.split ? e ? C(e[0], e[1]) : C(null, null) : f(e);
178
+ }, T = r(() => _.value && t.split ? [t.startDate, t.endDate] : t.modelValue), E = r(() => t.week ? "YYYY-MM-DD" : t.valueFormat || v.value), D = r(() => t.format || v.value);
179
+ return () => p({ vNodes: i(o, a({ style: "width: 100%" }, g.value, {
180
+ type: y.value,
181
+ modelValue: T.value,
182
+ disabled: h.value,
183
+ placeholder: m.value,
184
+ format: D.value,
185
+ disabledDate: S,
186
+ "value-format": E.value,
187
+ "onUpdate:modelValue": w
188
+ }), {
189
+ default: c.default,
190
+ "range-separator": c["range-separator"],
191
+ "pre-month": c["pre-month"],
192
+ "next-month": c["next-month"],
193
+ "pre-year": c["pre-year"],
194
+ "next-year": c["next-year"]
195
+ }) });
196
+ }
197
+ };
198
+ //#endregion
199
+ export { f as t };