@web-utils/form-ui 1.0.0-beta4 → 1.0.0-beta40

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 (189) hide show
  1. package/api/index.d.ts +60 -0
  2. package/api/index.mjs +42 -0
  3. package/awesome-button/index.d.ts +60 -0
  4. package/awesome-button/index.mjs +49 -0
  5. package/base.css +1 -0
  6. package/chunks/B1MSrc6f.mjs +8 -0
  7. package/chunks/B3ajWLh3.mjs +198 -0
  8. package/chunks/BH_JJ8Xh.mjs +106 -0
  9. package/chunks/BWBHzD5N.mjs +89 -0
  10. package/chunks/Bd1UFJic.mjs +660 -0
  11. package/chunks/Bm5eiSmT.mjs +79 -0
  12. package/chunks/BsCS7SB5.mjs +141 -0
  13. package/chunks/BufIRDd0.mjs +185 -0
  14. package/chunks/C1AgOUe_.mjs +172 -0
  15. package/chunks/C3Uo82-I.mjs +35 -0
  16. package/chunks/C9dGL28n.mjs +56 -0
  17. package/chunks/CFOGMFgo.mjs +150 -0
  18. package/chunks/CLPSCSsy.mjs +603 -0
  19. package/chunks/CSyJ-vEx.mjs +17 -0
  20. package/chunks/CTKmEf2M.mjs +93 -0
  21. package/chunks/CWfUPCtS.mjs +1360 -0
  22. package/chunks/CXvGoZKJ.mjs +198 -0
  23. package/chunks/Cab-ZjRx.mjs +164 -0
  24. package/chunks/ChmDDqoZ2.mjs +478 -0
  25. package/chunks/Cj59E77g.mjs +230 -0
  26. package/chunks/CqTcEefA.mjs +93 -0
  27. package/chunks/Ct5bDJ50.mjs +38 -0
  28. package/chunks/CuG2Q-PM.mjs +100 -0
  29. package/chunks/D8UVq1t1.mjs +176 -0
  30. package/chunks/DDmQcNm6.mjs +93 -0
  31. package/chunks/DF9fJMQS.mjs +105 -0
  32. package/chunks/DJe97Fgi.mjs +107 -0
  33. package/chunks/DXYgAmil.mjs +317 -0
  34. package/chunks/DhtHh0jk.mjs +87 -0
  35. package/chunks/DiJyms_r.mjs +100 -0
  36. package/chunks/Ds_Tpa_M.mjs +83 -0
  37. package/chunks/TvNHGVAP.mjs +25 -0
  38. package/chunks/XCGWTz41.mjs +25 -0
  39. package/chunks/XqRTtFfp.mjs +166 -0
  40. package/chunks/cmuHpsX6.mjs +109 -0
  41. package/chunks/o6VhYAN52.mjs +207 -0
  42. package/chunks/pdwFQpA8.mjs +57 -0
  43. package/chunks/taicx2sd.mjs +25 -0
  44. package/confirm-button/index.d.ts +113 -0
  45. package/confirm-button/index.mjs +35 -0
  46. package/confirmable/index.d.ts +84 -0
  47. package/confirmable/index.mjs +8 -0
  48. package/constants/index.d.ts +53 -0
  49. package/constants/index.mjs +4 -0
  50. package/editable-tree/index.d.ts +254 -0
  51. package/editable-tree/index.mjs +2 -0
  52. package/editable-tree/style.css +1 -0
  53. package/element-dialog/index.d.ts +337 -16
  54. package/element-dialog/index.mjs +2 -91
  55. package/empty-view/index.d.ts +2 -2
  56. package/empty-view/index.mjs +1 -1
  57. package/flex-scroll-area/index.d.ts +1 -1
  58. package/flex-scroll-area/index.mjs +1 -1
  59. package/form-advice/index.mjs +13 -12
  60. package/form-button/index.d.ts +114 -0
  61. package/form-button/index.mjs +36 -0
  62. package/form-card/index.d.ts +14 -0
  63. package/form-card/index.mjs +18 -0
  64. package/form-cascader/index.d.ts +472 -0
  65. package/form-cascader/index.mjs +2 -0
  66. package/form-check-box-group/index.d.ts +289 -18
  67. package/form-check-box-group/index.mjs +1 -1
  68. package/form-check-box-group/style.css +1 -0
  69. package/form-checkbox/index.d.ts +236 -16
  70. package/form-checkbox/index.mjs +1 -1
  71. package/form-date-picker/index.d.ts +390 -19
  72. package/form-date-picker/index.mjs +1 -1
  73. package/form-holder/index.d.ts +87 -20
  74. package/form-holder/index.mjs +1 -1
  75. package/form-holder/style.css +1 -1
  76. package/form-image/index.d.ts +145 -13
  77. package/form-image/index.mjs +1 -1
  78. package/form-input/index.d.ts +301 -20
  79. package/form-input/index.mjs +1 -1
  80. package/form-input/style.css +1 -0
  81. package/form-input-cron-expression/index.d.ts +217 -0
  82. package/form-input-cron-expression/index.mjs +2 -0
  83. package/form-input-cron-expression/style.css +1 -0
  84. package/form-input-email/index.d.ts +307 -16
  85. package/form-input-email/index.mjs +1 -1
  86. package/form-input-id-card/index.d.ts +307 -16
  87. package/form-input-id-card/index.mjs +1 -1
  88. package/form-input-number/index.d.ts +246 -18
  89. package/form-input-number/index.mjs +1 -1
  90. package/form-input-phone-number/index.d.ts +307 -16
  91. package/form-input-phone-number/index.mjs +1 -1
  92. package/form-input-tag/index.d.ts +263 -1
  93. package/form-input-tag/index.mjs +1 -3
  94. package/form-input-time/index.d.ts +434 -1
  95. package/form-input-time/index.mjs +1 -3
  96. package/form-item-config-provider/index.d.ts +22 -0
  97. package/form-item-config-provider/index.mjs +24 -0
  98. package/form-item-group/index.d.ts +91 -17
  99. package/form-item-group/index.mjs +2 -78
  100. package/form-item-group/style.css +1 -1
  101. package/form-item-x/index.d.ts +141 -11
  102. package/form-item-x/index.mjs +1 -1
  103. package/form-item-x/style.css +1 -0
  104. package/form-radio-group/index.d.ts +303 -16
  105. package/form-radio-group/index.mjs +1 -1
  106. package/form-rate/index.d.ts +254 -14
  107. package/form-rate/index.mjs +1 -1
  108. package/form-red-table/index.mjs +27 -26
  109. package/form-row/index.d.ts +2 -2
  110. package/form-row/index.mjs +1 -1
  111. package/form-select/index.d.ts +537 -18
  112. package/form-select/index.mjs +1 -1
  113. package/form-slider/index.d.ts +283 -16
  114. package/form-slider/index.mjs +1 -1
  115. package/form-switch/index.d.ts +272 -14
  116. package/form-switch/index.mjs +1 -1
  117. package/form-text/index.d.ts +165 -13
  118. package/form-text/index.mjs +1 -1
  119. package/form-textarea/index.d.ts +351 -0
  120. package/form-textarea/index.mjs +2 -0
  121. package/form-time-select/index.d.ts +319 -0
  122. package/form-time-select/index.mjs +2 -0
  123. package/form-view/index.mjs +1 -1
  124. package/helper/dictionary.d.ts +15 -0
  125. package/helper/dictionary.mjs +97 -0
  126. package/hook/useDictionary.d.ts +60 -0
  127. package/hook/useDictionary.mjs +15 -0
  128. package/hook/useVisibilityChange.d.ts +4 -0
  129. package/hook/useVisibilityChange.mjs +14 -0
  130. package/iframe-window/index.d.ts +9 -0
  131. package/iframe-window/index.mjs +37 -0
  132. package/iframe-window/style.css +1 -0
  133. package/index.d.ts +52 -36
  134. package/index.mjs +54 -61
  135. package/package.json +10 -5
  136. package/pageable-table/index.d.ts +398 -0
  137. package/pageable-table/index.mjs +2 -0
  138. package/pageable-table/style.css +1 -0
  139. package/resize-observer/index.d.ts +8 -0
  140. package/resize-observer/index.mjs +40 -0
  141. package/resize-observer/style.css +1 -0
  142. package/resolver/index.mjs +29 -0
  143. package/table-column/index.d.ts +160 -0
  144. package/table-column/index.mjs +2 -0
  145. package/table-column/style.css +1 -0
  146. package/table-column-def/index.d.ts +85 -0
  147. package/table-column-def/index.mjs +11 -0
  148. package/table-view/index.d.ts +340 -1
  149. package/table-view/index.mjs +453 -6
  150. package/table-view/style.css +1 -0
  151. package/toolbar/index.d.ts +128 -1
  152. package/toolbar/index.mjs +1 -8
  153. package/toolbar/style.css +1 -0
  154. package/toolbar-button/index.d.ts +188 -1
  155. package/toolbar-button/index.mjs +1 -8
  156. package/vue-cron/index.d.ts +191 -0
  157. package/vue-cron/index.mjs +2 -0
  158. package/vue-cron/style.css +1 -0
  159. package/web-types.json +1 -1
  160. package/x-input-tag/index.d.ts +2 -0
  161. package/x-input-tag/index.mjs +227 -0
  162. package/x-input-tag/style.css +1 -0
  163. package/year-calendar/index.d.ts +99 -0
  164. package/year-calendar/index.mjs +2 -0
  165. package/year-calendar/style.css +1 -0
  166. package/chunks/B4M_TFeR.mjs +0 -152
  167. package/chunks/B5BIQCcK.mjs +0 -149
  168. package/chunks/BHNKrW1j.mjs +0 -61
  169. package/chunks/BO9jWhBl.mjs +0 -46
  170. package/chunks/BZ8aOa78.mjs +0 -35
  171. package/chunks/Bsz7y4Xp.mjs +0 -73
  172. package/chunks/Bxj372sF.mjs +0 -53
  173. package/chunks/C33EmJN8.mjs +0 -32
  174. package/chunks/C6Li3-l7.mjs +0 -28
  175. package/chunks/CBcdalMX.mjs +0 -35
  176. package/chunks/CdRsyF0n.mjs +0 -43
  177. package/chunks/ClNahmiU.mjs +0 -23
  178. package/chunks/CstztYMu.mjs +0 -28
  179. package/chunks/DC9b53M6.mjs +0 -32
  180. package/chunks/DDVAgRED.mjs +0 -36
  181. package/chunks/DpJQABVD.mjs +0 -91
  182. package/chunks/ZsLNWI9x.mjs +0 -46
  183. package/chunks/jn_iQrVZ.mjs +0 -28
  184. package/constants.d.ts +0 -1
  185. package/constants.mjs +0 -4
  186. package/input/style.css +0 -1
  187. package/resolver.mjs +0 -79
  188. package/utils/style.css +0 -1
  189. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -0,0 +1,198 @@
1
+ import { i as e, n as t } from "./Cj59E77g.mjs";
2
+ import { n } from "./CSyJ-vEx.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 { toDate as s } from "@web-utils/integrations/dayjs";
6
+ //#region src/components/form/props/date.ts
7
+ var c = {
8
+ ...n,
9
+ modelValue: [
10
+ Number,
11
+ String,
12
+ Date,
13
+ Array
14
+ ],
15
+ readonly: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ size: String,
20
+ editable: {
21
+ type: Boolean,
22
+ default: !0
23
+ },
24
+ clearable: {
25
+ type: Boolean,
26
+ default: !0
27
+ },
28
+ placeholder: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ startPlaceholder: {
33
+ type: String,
34
+ default: "开始日期"
35
+ },
36
+ endPlaceholder: {
37
+ type: String,
38
+ default: "结束日期"
39
+ },
40
+ type: {
41
+ type: String,
42
+ default: "date"
43
+ },
44
+ format: {
45
+ type: String,
46
+ default: "YYYY-MM-DD"
47
+ },
48
+ popperClass: String,
49
+ popperStyle: [String, Object],
50
+ popperOptions: {
51
+ type: Object,
52
+ default: () => ({})
53
+ },
54
+ rangeSeparator: {
55
+ type: String,
56
+ default: "至"
57
+ },
58
+ defaultValue: Object,
59
+ defaultTime: Object,
60
+ valueFormat: String,
61
+ id: [String, Array],
62
+ name: {
63
+ type: [String, Array],
64
+ default: ""
65
+ },
66
+ unlinkPanels: {
67
+ type: Boolean,
68
+ default: !1
69
+ },
70
+ prefixIcon: [String, Object],
71
+ clearIcon: [String, Object],
72
+ validateEvent: {
73
+ type: Boolean,
74
+ default: !0
75
+ },
76
+ disabledDate: Function,
77
+ shortcuts: {
78
+ type: Array,
79
+ default: () => []
80
+ },
81
+ cellClassName: Function,
82
+ teleported: {
83
+ type: Boolean,
84
+ default: !0
85
+ },
86
+ emptyValues: Array,
87
+ valueOnClear: [
88
+ String,
89
+ Number,
90
+ Boolean,
91
+ Function
92
+ ],
93
+ fallbackPlacements: {
94
+ type: Array,
95
+ default: () => [
96
+ "bottom",
97
+ "top",
98
+ "right",
99
+ "left"
100
+ ]
101
+ },
102
+ placement: {
103
+ type: String,
104
+ default: "bottom"
105
+ },
106
+ showFooter: {
107
+ type: Boolean,
108
+ default: !0
109
+ },
110
+ showConfirm: {
111
+ type: Boolean,
112
+ default: !0
113
+ },
114
+ showWeekNumber: {
115
+ type: Boolean,
116
+ default: !1
117
+ },
118
+ automaticDropdown: {
119
+ type: Boolean,
120
+ default: !0
121
+ },
122
+ split: {
123
+ type: Boolean,
124
+ default: !0
125
+ },
126
+ startDate: String,
127
+ endDate: String,
128
+ start: String,
129
+ end: String,
130
+ year: Boolean,
131
+ month: Boolean,
132
+ dates: Boolean,
133
+ week: Boolean,
134
+ dateTime: Boolean,
135
+ dateTimeRange: Boolean,
136
+ dateRange: Boolean,
137
+ monthRange: Boolean,
138
+ miniDate: String,
139
+ maxDate: String
140
+ }, l = {
141
+ modelValue: !0,
142
+ name: !0,
143
+ disabled: !0,
144
+ emptyValues: !0,
145
+ type: !0,
146
+ valueOnClear: !0
147
+ }, u = (e) => n[e] === void 0 && l[e] !== !0, d = {
148
+ name: "FormDatePicker",
149
+ inheritAttrs: !1,
150
+ props: { ...c },
151
+ emits: {
152
+ ...t,
153
+ "update:startDate": null,
154
+ "update:endDate": null
155
+ },
156
+ setup(t, { emit: n, slots: c, attrs: l }) {
157
+ let { emitInput: d, render: f, placeholder: p, disabled: m, listeners: h, inputProps: g } = e(t, {
158
+ emit: n,
159
+ slots: c,
160
+ attrs: l,
161
+ predicate: u,
162
+ messagePrefix: "请选择"
163
+ }), _ = 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(() => {
164
+ if (t.miniDate) {
165
+ let e = s(t.miniDate);
166
+ return e.setDate(e.getDate() - 1), e;
167
+ } else return null;
168
+ }), x = r(() => t.maxDate ? s(t.maxDate) : null), S = (e) => {
169
+ if (!b.value && !x.value) return !1;
170
+ let t = e.getTime();
171
+ 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;
172
+ }, C = (e, t) => {
173
+ n("update:startDate", e), n("update:endDate", t);
174
+ }, w = (e) => {
175
+ _.value && t.split ? e ? C(e[0], e[1]) : C(null, null) : d(e);
176
+ }, 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);
177
+ return () => f({ vNodes: i(o, a(h.value, g.value, {
178
+ style: "width: 100%",
179
+ type: y.value,
180
+ modelValue: T.value,
181
+ disabled: m.value,
182
+ placeholder: p.value,
183
+ format: D.value,
184
+ disabledDate: S,
185
+ "value-format": E.value,
186
+ "onUpdate:modelValue": w
187
+ }), {
188
+ default: c.default,
189
+ "range-separator": c["range-separator"],
190
+ "pre-month": c["pre-month"],
191
+ "next-month": c["next-month"],
192
+ "pre-year": c["pre-year"],
193
+ "next-year": c["next-year"]
194
+ }) });
195
+ }
196
+ };
197
+ //#endregion
198
+ export { d as t };
@@ -0,0 +1,164 @@
1
+ import { u as e } from "./cmuHpsX6.mjs";
2
+ import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, getCurrentInstance as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, toHandlers as h, unref as g, useModel as _, useTemplateRef as v, withCtx as y, withModifiers as b } from "vue";
3
+ import { ElDialog as x } from "element-plus/es";
4
+ //#region src/components/dialog/props.ts
5
+ var S = {
6
+ modelValue: {
7
+ type: Boolean,
8
+ default: !1
9
+ },
10
+ title: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ width: [String, Number],
15
+ fullscreen: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ top: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ modal: {
24
+ type: Boolean,
25
+ default: !0
26
+ },
27
+ modalPenetrable: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ modalClass: String,
32
+ headerClass: String,
33
+ bodyClass: String,
34
+ footerClass: String,
35
+ appendToBody: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ appendTo: [String, Object],
40
+ lockScroll: {
41
+ type: Boolean,
42
+ default: !0
43
+ },
44
+ openDelay: {
45
+ type: Number,
46
+ default: 0
47
+ },
48
+ closeDelay: {
49
+ type: Number,
50
+ default: 0
51
+ },
52
+ closeOnClickModal: { type: Boolean },
53
+ closeOnPressEscape: {
54
+ type: Boolean,
55
+ default: !0
56
+ },
57
+ showClose: {
58
+ type: Boolean,
59
+ default: !0
60
+ },
61
+ beforeClose: Function,
62
+ draggable: {
63
+ type: Boolean,
64
+ default: !0
65
+ },
66
+ overflow: {
67
+ type: Boolean,
68
+ default: !1
69
+ },
70
+ center: {
71
+ type: Boolean,
72
+ default: !1
73
+ },
74
+ alignCenter: {
75
+ type: Boolean,
76
+ default: !1
77
+ },
78
+ destroyOnClose: {
79
+ type: Boolean,
80
+ default: !1
81
+ },
82
+ closeIcon: [String, Object],
83
+ zIndex: Number,
84
+ headerAriaLevel: {
85
+ type: String,
86
+ default: "2"
87
+ },
88
+ transition: [String, Object],
89
+ customClass: {
90
+ type: String,
91
+ default: ""
92
+ },
93
+ height: String,
94
+ embed: Boolean,
95
+ showFullscreen: Boolean,
96
+ showFullScreen: Boolean
97
+ }, C = {
98
+ embed: !0,
99
+ height: !0,
100
+ showFullscreen: !0,
101
+ showFullScreen: !0,
102
+ fullscreen: !0,
103
+ showClose: !0
104
+ }, w = (e) => C[e] !== !0, T = { class: "dialog-title" }, E = { class: "dialog-header-buttons" }, D = {
105
+ __name: "ElementDialog",
106
+ props: /* @__PURE__ */ c({ ...S }, {
107
+ modelValue: {
108
+ type: Boolean,
109
+ default: !1
110
+ },
111
+ modelModifiers: {}
112
+ }),
113
+ emits: /* @__PURE__ */ c({ "toggle-fullscreen": null }, ["update:modelValue"]),
114
+ setup(c, { expose: S, emit: C }) {
115
+ let D = _(c, "modelValue"), O = c, k = C, { autoBindProps: A, listeners: j } = e(O, {
116
+ predicate: w,
117
+ removeOn: !0
118
+ }), M = v("dialog"), N = f(O.fullscreen), P = () => {
119
+ N.value = !N.value, k("toggle-fullscreen", N.value);
120
+ }, F = t(() => N.value ? "100%" : O.height), I = s(), L = () => {
121
+ O.embed ? (I.parent.emit("update:visible", !1), I.parent.emit("update:modelValue", !1)) : M.value.handleClose();
122
+ };
123
+ return S({
124
+ close: L,
125
+ hide: L
126
+ }), (e, t) => {
127
+ let s = x;
128
+ return d(), n(s, l({
129
+ ref: "dialog",
130
+ modelValue: D.value,
131
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => D.value = e)
132
+ }, g(A), {
133
+ "show-close": !1,
134
+ fullscreen: g(N),
135
+ style: { "--dialog-body-height": g(F) }
136
+ }, h(g(j))), o({
137
+ header: y(() => [r(" @slot 对话框标题的内容;会替换标题部分,但会移除关闭按钮 "), p(e.$slots, "header", {}, () => [a("div", T, m(e.title), 1), a("div", E, [e.showFullscreen || e.showFullScreen ? (d(), i("i", {
138
+ key: 0,
139
+ class: u(["dialog-header-button", {
140
+ "el-icon-full-screen": !e.fullscreen,
141
+ "el-icon-copy-document": e.fullscreen
142
+ }]),
143
+ onClick: b(P, ["stop"])
144
+ }, null, 2)) : r("v-if", !0), e.showClose ? (d(), i("i", {
145
+ key: 1,
146
+ class: "dialog-header-button el-icon-close",
147
+ onClick: b(L, ["stop"])
148
+ })) : r("v-if", !0)])])]),
149
+ default: y(() => [r(" @slot 对话框的默认内容 "), p(e.$slots, "default")]),
150
+ _: 2
151
+ }, [e.$slots.footer ? {
152
+ name: "footer",
153
+ fn: y(() => [r(" @slot Dialog 按钮操作区的内容 "), p(e.$slots, "footer", { close: L })]),
154
+ key: "0"
155
+ } : void 0]), 1040, [
156
+ "modelValue",
157
+ "fullscreen",
158
+ "style"
159
+ ]);
160
+ };
161
+ }
162
+ };
163
+ //#endregion
164
+ export { D as t };