@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
package/api/index.d.ts ADDED
@@ -0,0 +1,60 @@
1
+ export interface DictItem {
2
+ id: string;
3
+ dictId: string;
4
+ label: string;
5
+ dictType: string;
6
+ description: string;
7
+ sortOrder: number;
8
+ createBy: string;
9
+ updateBy: string;
10
+ createTime: string;
11
+ updateTime: string;
12
+ remarks: null;
13
+ delFlag: string;
14
+ value: string;
15
+ }
16
+ export interface ConfigOptions {
17
+ privilege?: {
18
+ processButtons?: (buttons: Array<string | Record<string, string>>) => Array<string | Record<string, boolean>>;
19
+ hasAuthority?: (privilege: string) => boolean;
20
+ };
21
+ dict?: {
22
+ getDictTreeByType?: (type: string, options: {
23
+ idAsValue?: boolean;
24
+ labelAsValue?: boolean;
25
+ }) => Promise<{
26
+ data: {
27
+ data: DictItem[];
28
+ };
29
+ }>;
30
+ remote?: (type: string) => Promise<{
31
+ data: {
32
+ data: DictItem[];
33
+ };
34
+ }>;
35
+ };
36
+ tableView?: {
37
+ reload?: () => void;
38
+ };
39
+ toolbar?: {
40
+ goBack?: (path: string) => void;
41
+ };
42
+ }
43
+ export declare const processButtons: (buttons: Array<string | Record<string, string>>) => (string | Record<string, boolean>)[] | undefined;
44
+ export declare const hasAuthority: (str: string) => boolean | undefined;
45
+ export declare const goBack: (path: string) => void | undefined;
46
+ export declare const reloadTable: () => void | undefined;
47
+ export declare const getDictTreeByType: (type: string, options: {
48
+ idAsValue?: boolean;
49
+ labelAsValue?: boolean;
50
+ }) => Promise<{
51
+ data: {
52
+ data: DictItem[];
53
+ };
54
+ }> | undefined;
55
+ export declare const remote: (type: string) => Promise<{
56
+ data: {
57
+ data: DictItem[];
58
+ };
59
+ }> | undefined;
60
+ export declare const config: (options: ConfigOptions) => void;
package/api/index.mjs ADDED
@@ -0,0 +1,42 @@
1
+ import { isObject as e, isString as t } from "@web-utils/core";
2
+ import { mergeWith as n } from "@web-utils/integrations/lodash";
3
+ //#region src/api/index.ts
4
+ var r = { privilege: {
5
+ processButtons(n) {
6
+ return n.map((n) => {
7
+ if (e(n)) {
8
+ let e = n, r = {};
9
+ for (let n in e) t(e[n]) && (r[n] = a(e[n]) ?? !0);
10
+ return r;
11
+ }
12
+ return n;
13
+ });
14
+ },
15
+ hasAuthority(e) {
16
+ return !0;
17
+ }
18
+ } }, i = (e) => {
19
+ var t, n;
20
+ return (t = r.privilege) == null || (n = t.processButtons) == null ? void 0 : n.call(t, e);
21
+ }, a = (e) => {
22
+ var t, n;
23
+ return (t = r.privilege) == null || (n = t.hasAuthority) == null ? void 0 : n.call(t, e);
24
+ }, o = (e) => {
25
+ var t, n;
26
+ return (t = r.toolbar) == null || (n = t.goBack) == null ? void 0 : n.call(t, e);
27
+ }, s = () => {
28
+ var e, t;
29
+ return (e = r.tableView) == null || (t = e.reload) == null ? void 0 : t.call(e);
30
+ }, c = (e, t) => {
31
+ var n, i;
32
+ return (n = r.dict) == null || (i = n.getDictTreeByType) == null ? void 0 : i.call(n, e, t);
33
+ }, l = (e) => {
34
+ var t, n;
35
+ return (t = r.dict) == null || (n = t.remote) == null ? void 0 : n.call(t, e);
36
+ }, u = (e) => {
37
+ n(r, e, (e, t) => {
38
+ if (typeof t == "function") return t;
39
+ });
40
+ };
41
+ //#endregion
42
+ export { u as config, c as getDictTreeByType, o as goBack, a as hasAuthority, i as processButtons, s as reloadTable, l as remote };
@@ -0,0 +1,60 @@
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ type: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ size: StringConstructor;
7
+ icon: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ nativeType: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ loading: BooleanConstructor;
16
+ disabled: BooleanConstructor;
17
+ plain: BooleanConstructor;
18
+ autofocus: BooleanConstructor;
19
+ round: BooleanConstructor;
20
+ text: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ }>, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
25
+ [key: string]: any;
26
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
27
+ type: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ size: StringConstructor;
32
+ icon: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ nativeType: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ loading: BooleanConstructor;
41
+ disabled: BooleanConstructor;
42
+ plain: BooleanConstructor;
43
+ autofocus: BooleanConstructor;
44
+ round: BooleanConstructor;
45
+ text: {
46
+ type: StringConstructor;
47
+ default: string;
48
+ };
49
+ }>> & Readonly<{}>, {
50
+ loading: boolean;
51
+ disabled: boolean;
52
+ plain: boolean;
53
+ autofocus: boolean;
54
+ round: boolean;
55
+ type: string;
56
+ icon: string;
57
+ nativeType: string;
58
+ text: string;
59
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
60
+ export default _default;
@@ -0,0 +1,49 @@
1
+ import { isFunction as e } from "@web-utils/core";
2
+ import { h as t, ref as n, resolveComponent as r } from "vue";
3
+ //#region src/components/button/AwesomeButton.vue
4
+ var i = {
5
+ name: "AwesomeButton",
6
+ inheritAttrs: !1,
7
+ props: {
8
+ type: {
9
+ type: String,
10
+ default: "primary"
11
+ },
12
+ size: String,
13
+ icon: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ nativeType: {
18
+ type: String,
19
+ default: "button"
20
+ },
21
+ loading: Boolean,
22
+ disabled: Boolean,
23
+ plain: Boolean,
24
+ autofocus: Boolean,
25
+ round: Boolean,
26
+ text: {
27
+ type: String,
28
+ default: ""
29
+ }
30
+ },
31
+ setup(i, { attrs: a, slots: o }) {
32
+ let s = r("ElButton"), { text: c, ...l } = i, { onClick: u, ...d } = a, f = n(!1), p = async (t) => {
33
+ if (f.value = !0, e(u)) try {
34
+ await u(t);
35
+ } catch (e) {
36
+ console.error(e);
37
+ }
38
+ f.value = !1;
39
+ };
40
+ return () => t(s, {
41
+ ...d,
42
+ ...l,
43
+ disabled: f.value,
44
+ onClick: p
45
+ }, { default: o.default || (() => c) });
46
+ }
47
+ };
48
+ //#endregion
49
+ export { i as default };
package/base.css ADDED
@@ -0,0 +1 @@
1
+ :root{--el-disabled-text-color:#606266;--border-color:#d7dae0}.border-bottom{border-bottom:1px solid #d7dae0}.clear-fix:after{clear:both;visibility:hidden;content:" ";height:0;display:block}.flex-row{flex-direction:row;flex-shrink:0;display:flex}.flex-row.vertical-center{align-items:center}.flex-row.vertical-start{align-items:flex-start}.flex-row.horizon-center{justify-content:center}.text-center{text-align:center}.flex-column{flex-direction:column;display:flex}.flex-column.vertical-center{justify-content:center}.flex-column.horizon-center{align-items:center}.flex-item,.flex-item-relative{flex:auto}.flex-item-relative{position:relative}.flex-item-relative .flex-content{position:absolute;top:0;bottom:0;left:0;right:0}.flex-not-shrink{flex-shrink:0}
@@ -0,0 +1,8 @@
1
+ //#region \0plugin-vue:export-helper
2
+ var e = (e, t) => {
3
+ let n = e.__vccOpts || e;
4
+ for (let [e, r] of t) n[e] = r;
5
+ return n;
6
+ };
7
+ //#endregion
8
+ export { e as t };
@@ -0,0 +1,198 @@
1
+ import { i as e, n as t } from "./Cj59E77g.mjs";
2
+ import { n, t as r } from "./CSyJ-vEx.mjs";
3
+ import { useDictionary as i } from "../hook/useDictionary.mjs";
4
+ import { findTreeChildren as a, isArray as o, isString as s, setParent as c } from "@web-utils/core";
5
+ import { computed as l, createVNode as u, mergeProps as d } from "vue";
6
+ import { cloneDeep as f } from "@web-utils/integrations/lodash";
7
+ import { ElCascader as p } from "element-plus/es";
8
+ //#region src/components/form/props/cascader.ts
9
+ var m = {
10
+ ...n,
11
+ ...r,
12
+ modelValue: [
13
+ String,
14
+ Number,
15
+ Array
16
+ ],
17
+ options: Array,
18
+ props: Object,
19
+ size: String,
20
+ placeholder: String,
21
+ disabled: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ clearable: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ clearIcon: [String, Object],
30
+ showAllLevels: {
31
+ type: Boolean,
32
+ default: !0
33
+ },
34
+ collapseTags: {
35
+ type: Boolean,
36
+ default: !1
37
+ },
38
+ collapseTagsTooltip: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ maxCollapseTagsTooltipHeight: [String, Number],
43
+ separator: {
44
+ type: String,
45
+ default: "/"
46
+ },
47
+ filterable: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ filterMethod: Function,
52
+ debounce: {
53
+ type: Number,
54
+ default: 300
55
+ },
56
+ beforeFilter: Function,
57
+ popperClass: {
58
+ type: String,
59
+ default: ""
60
+ },
61
+ popperStyle: [String, Object],
62
+ teleported: {
63
+ type: Boolean,
64
+ default: !0
65
+ },
66
+ effect: {
67
+ type: String,
68
+ default: "light"
69
+ },
70
+ tagType: {
71
+ type: String,
72
+ default: "info"
73
+ },
74
+ tagEffect: {
75
+ type: String,
76
+ default: "light"
77
+ },
78
+ validateEvent: {
79
+ type: Boolean,
80
+ default: !0
81
+ },
82
+ maxCollapseTags: {
83
+ type: Number,
84
+ default: 1
85
+ },
86
+ emptyValues: Array,
87
+ valueOnClear: [
88
+ String,
89
+ Number,
90
+ Boolean,
91
+ Function
92
+ ],
93
+ persistent: {
94
+ type: Boolean,
95
+ default: !0
96
+ },
97
+ fallbackPlacements: {
98
+ type: Array,
99
+ default: () => [
100
+ "bottom-start",
101
+ "top-start",
102
+ "right",
103
+ "left"
104
+ ]
105
+ },
106
+ placement: {
107
+ type: String,
108
+ default: "bottom-start"
109
+ },
110
+ popperAppendToBody: {
111
+ type: Boolean,
112
+ default: !0
113
+ },
114
+ showCheckedStrategy: {
115
+ type: String,
116
+ default: "child"
117
+ },
118
+ readonly: Boolean,
119
+ last: Boolean,
120
+ checkStrictly: Boolean,
121
+ labelKey: {
122
+ type: String,
123
+ default: "label"
124
+ },
125
+ valueKey: {
126
+ type: String,
127
+ default: "value"
128
+ },
129
+ emitPath: {
130
+ type: Boolean,
131
+ default: !0
132
+ },
133
+ join: {
134
+ type: Boolean,
135
+ default: !0
136
+ },
137
+ idAsValue: {
138
+ type: Boolean,
139
+ default: !0
140
+ },
141
+ labelAsValue: Boolean,
142
+ treeDict: {
143
+ type: Boolean,
144
+ default: !0
145
+ },
146
+ dictType: String
147
+ }, h = {
148
+ modelValue: !0,
149
+ readonly: !0,
150
+ disabled: !0,
151
+ props: !0
152
+ }, g = (e) => n[e] === void 0 && h[e] !== !0, _ = {
153
+ name: "FormCascader",
154
+ props: { ...m },
155
+ emits: { ...t },
156
+ setup(t, { emit: n, slots: r, attrs: m }) {
157
+ let { emitInput: h, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = e(t, {
158
+ emit: n,
159
+ slots: r,
160
+ attrs: m,
161
+ predicate: g
162
+ }), { dictItems: S } = i(t), C = l(() => {
163
+ if (t.dictType) return S.value;
164
+ if (t.options) {
165
+ let e = f(t.options);
166
+ return t.last && c(e), e;
167
+ } else return [];
168
+ }), w = l(() => {
169
+ if (t.join) return o(t.modelValue) ? t.modelValue : s(t.modelValue) ? t.modelValue.split(t.separator) : [];
170
+ if (t.last) {
171
+ let [e] = a(C.value, (e) => e[t.valueKey] === t.modelValue), n = [];
172
+ for (; e;) n.push(e[t.valueKey]), e = e.parent;
173
+ return n.reverse();
174
+ }
175
+ return t.modelValue;
176
+ }), T = (e) => {
177
+ t.join && o(e) ? h(e.join(t.separator)) : h(t.last ? e[e.length - 1] : e);
178
+ };
179
+ return () => _({ vNodes: u(p, d(b.value, x.value, {
180
+ style: "width: 100%",
181
+ class: { "is-readonly": t.readonly },
182
+ "model-value": w.value,
183
+ options: C.value,
184
+ props: {
185
+ checkStrictly: t.checkStrictly,
186
+ label: t.labelKey,
187
+ value: t.valueKey,
188
+ emitPath: t.emitPath,
189
+ expandTrigger: "hover"
190
+ },
191
+ disabled: y.value,
192
+ placeholder: v.value,
193
+ "onUpdate:modelValue": T
194
+ }), null) });
195
+ }
196
+ };
197
+ //#endregion
198
+ export { _ as t };
@@ -0,0 +1,106 @@
1
+ import { i as e, n as t } from "./Cj59E77g.mjs";
2
+ import { n } from "./CSyJ-vEx.mjs";
3
+ import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
+ import { ElSwitch as o } from "element-plus/es";
5
+ //#region src/components/form/props/switch.ts
6
+ var s = {
7
+ ...n,
8
+ modelValue: [
9
+ Boolean,
10
+ String,
11
+ Number
12
+ ],
13
+ loading: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ size: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ width: [Number, String],
22
+ inlinePrompt: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ activeIcon: [String, Object],
27
+ inactiveIcon: [String, Object],
28
+ activeActionIcon: [String, Object],
29
+ inactiveActionIcon: [String, Object],
30
+ activeText: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ inactiveText: {
35
+ type: String,
36
+ default: ""
37
+ },
38
+ activeValue: {
39
+ type: [
40
+ Boolean,
41
+ String,
42
+ Number
43
+ ],
44
+ default: "Y"
45
+ },
46
+ inactiveValue: {
47
+ type: [
48
+ Boolean,
49
+ String,
50
+ Number
51
+ ],
52
+ default: "N"
53
+ },
54
+ name: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ validateEvent: {
59
+ type: Boolean,
60
+ default: !0
61
+ },
62
+ beforeChange: Function,
63
+ id: String,
64
+ tabindex: [String, Number],
65
+ ariaLabel: String,
66
+ activeColor: {
67
+ type: String,
68
+ default: ""
69
+ },
70
+ inactiveColor: {
71
+ type: String,
72
+ default: ""
73
+ },
74
+ borderColor: {
75
+ type: String,
76
+ default: ""
77
+ }
78
+ }, c = {
79
+ disabled: !0,
80
+ modelValue: !0
81
+ }, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
82
+ name: "FormSwitch",
83
+ inheritAttrs: !1,
84
+ props: { ...s },
85
+ emits: { ...t },
86
+ setup(t, { emit: n, slots: s, attrs: c }) {
87
+ let u = a(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = e(t, {
88
+ emit: n,
89
+ attrs: c,
90
+ slots: s,
91
+ predicate: l
92
+ });
93
+ return () => d({ vNodes: r(o, i(p.value, m.value, {
94
+ modelValue: u.value,
95
+ "onUpdate:modelValue": (e) => u.value = e,
96
+ disabled: f.value
97
+ }), {
98
+ "active-action": s["active-action"],
99
+ "inactive-action": s["inactive-action"],
100
+ active: s.active,
101
+ inactive: s.inactive
102
+ }) });
103
+ }
104
+ };
105
+ //#endregion
106
+ export { u as t };
@@ -0,0 +1,89 @@
1
+ import { i as e, n as t } from "./Cj59E77g.mjs";
2
+ import { n } from "./CSyJ-vEx.mjs";
3
+ import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
+ import { ElCheckbox as o } from "element-plus/es";
5
+ //#region src/components/form/props/checkbox.ts
6
+ var s = {
7
+ ...n,
8
+ modelValue: [
9
+ String,
10
+ Number,
11
+ Boolean
12
+ ],
13
+ value: [
14
+ String,
15
+ Number,
16
+ Boolean,
17
+ Object
18
+ ],
19
+ labelValue: [
20
+ String,
21
+ Number,
22
+ Boolean,
23
+ Object
24
+ ],
25
+ trueValue: {
26
+ type: [String, Number],
27
+ default: "1"
28
+ },
29
+ falseValue: {
30
+ type: [String, Number],
31
+ default: "0"
32
+ },
33
+ border: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ size: String,
38
+ name: String,
39
+ checked: {
40
+ type: Boolean,
41
+ default: !1
42
+ },
43
+ indeterminate: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ validateEvent: {
48
+ type: Boolean,
49
+ default: !0
50
+ },
51
+ tabindex: [String, Number],
52
+ id: String,
53
+ ariaControls: String,
54
+ ariaLabel: String,
55
+ trueLabel: {
56
+ type: [String, Number],
57
+ default: "1"
58
+ },
59
+ falseLabel: {
60
+ type: [String, Number],
61
+ default: "0"
62
+ },
63
+ controls: String
64
+ }, c = {
65
+ modelValue: !0,
66
+ disabled: !0,
67
+ labelValue: !0
68
+ }, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
69
+ name: "FormCheckbox",
70
+ inheritAttrs: !1,
71
+ props: { ...s },
72
+ emits: { ...t },
73
+ setup(t, { emit: n, slots: s, attrs: c }) {
74
+ let u = a(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = e(t, {
75
+ emit: n,
76
+ slots: s,
77
+ attrs: c,
78
+ predicate: l
79
+ });
80
+ return () => d({ vNodes: r(o, i(m.value, p.value, {
81
+ label: t.labelValue,
82
+ modelValue: u.value,
83
+ "onUpdate:modelValue": (e) => u.value = e,
84
+ disabled: f.value
85
+ }), { default: s.default }) });
86
+ }
87
+ };
88
+ //#endregion
89
+ export { u as t };