@web-utils/form-ui 1.0.0-beta5 → 1.0.0-beta50

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 (208) 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 -1
  6. package/chunks/6yfBZFOB.mjs +56 -0
  7. package/chunks/B-zqRAXo.mjs +69 -0
  8. package/chunks/B1IPSTA6.mjs +198 -0
  9. package/chunks/B9gA65rt2.mjs +38 -0
  10. package/chunks/BA2KEptL.mjs +172 -0
  11. package/chunks/BBERmTup.mjs +83 -0
  12. package/chunks/BUGCiCnl.mjs +83 -0
  13. package/chunks/BbSPWDDZ.mjs +100 -0
  14. package/chunks/BfxDxIg0.mjs +106 -0
  15. package/chunks/BqWvBF14.mjs +35 -0
  16. package/chunks/BsZgAJX_2.mjs +81 -0
  17. package/chunks/BtcjAHE6.mjs +317 -0
  18. package/chunks/ByHz4mmh.mjs +87 -0
  19. package/chunks/C2zgFLYO.mjs +185 -0
  20. package/chunks/CAd1zK9Q.mjs +25 -0
  21. package/chunks/CJdkjadi.mjs +17 -0
  22. package/chunks/CabldOLo.mjs +157 -0
  23. package/chunks/CkOD-_VV.mjs +8 -0
  24. package/chunks/Cln3RBAD.mjs +660 -0
  25. package/chunks/CqoVAnxC2.mjs +93 -0
  26. package/chunks/CuAoMR3n.mjs +105 -0
  27. package/chunks/CxTg0r4n.mjs +166 -0
  28. package/chunks/D0Zg2CV0.mjs +57 -0
  29. package/chunks/DA7oGHSX.mjs +141 -0
  30. package/chunks/DOP3aBxf.mjs +93 -0
  31. package/chunks/DOZRzqlo.mjs +37 -0
  32. package/chunks/D_qiRmiE.mjs +230 -0
  33. package/chunks/DcTVYqeJ.mjs +113 -0
  34. package/chunks/Dkd5BC98.mjs +198 -0
  35. package/chunks/GI8krYU82.mjs +478 -0
  36. package/chunks/V2p-PCpL.mjs +176 -0
  37. package/chunks/bFbPPcdq.mjs +25 -0
  38. package/chunks/cqIZWDHo.mjs +614 -0
  39. package/chunks/eae6huQB.mjs +25 -0
  40. package/chunks/gCeDFHo1.mjs +32 -0
  41. package/chunks/gLPy4Sus.mjs +164 -0
  42. package/chunks/hlha6Bhc.mjs +107 -0
  43. package/chunks/hzaYr6Ud2.mjs +207 -0
  44. package/chunks/kflKDW4T2.mjs +146 -0
  45. package/chunks/pIzhYsBe.mjs +93 -0
  46. package/chunks/vXQf89tS.mjs +1361 -0
  47. package/chunks/wXeqV-_7.mjs +89 -0
  48. package/chunks/zwXzk9ff2.mjs +568 -0
  49. package/confirm-button/index.d.ts +115 -0
  50. package/confirm-button/index.mjs +35 -0
  51. package/confirmable/index.d.ts +86 -0
  52. package/confirmable/index.mjs +8 -0
  53. package/constants/index.d.ts +53 -0
  54. package/constants/index.mjs +4 -0
  55. package/dict-render/index.d.ts +28 -0
  56. package/dict-render/index.mjs +2 -0
  57. package/editable-tree/index.d.ts +254 -0
  58. package/editable-tree/index.mjs +2 -0
  59. package/editable-tree/style.css +1 -0
  60. package/element-dialog/index.d.ts +337 -16
  61. package/element-dialog/index.mjs +2 -91
  62. package/element-resize-observer/index.d.ts +8 -0
  63. package/element-resize-observer/index.mjs +40 -0
  64. package/element-resize-observer/style.css +1 -0
  65. package/empty-view/index.d.ts +2 -2
  66. package/empty-view/index.mjs +1 -1
  67. package/flex-scroll-area/index.d.ts +1 -1
  68. package/flex-scroll-area/index.mjs +1 -1
  69. package/form-advice/index.mjs +13 -12
  70. package/form-button/index.d.ts +116 -0
  71. package/form-button/index.mjs +36 -0
  72. package/form-card/index.d.ts +14 -0
  73. package/form-card/index.mjs +18 -0
  74. package/form-cascader/index.d.ts +472 -0
  75. package/form-cascader/index.mjs +2 -0
  76. package/form-checkbox/index.d.ts +236 -16
  77. package/form-checkbox/index.mjs +1 -1
  78. package/form-checkbox-group/index.d.ts +364 -0
  79. package/form-checkbox-group/index.mjs +2 -0
  80. package/form-checkbox-group/style.css +1 -0
  81. package/form-date-picker/index.d.ts +390 -19
  82. package/form-date-picker/index.mjs +1 -1
  83. package/form-holder/index.d.ts +87 -20
  84. package/form-holder/index.mjs +1 -1
  85. package/form-holder/style.css +1 -1
  86. package/form-image/index.d.ts +145 -13
  87. package/form-image/index.mjs +1 -1
  88. package/form-input/index.d.ts +301 -20
  89. package/form-input/index.mjs +1 -1
  90. package/form-input/style.css +1 -0
  91. package/form-input-cron-expression/index.d.ts +217 -0
  92. package/form-input-cron-expression/index.mjs +2 -0
  93. package/form-input-cron-expression/style.css +1 -0
  94. package/form-input-email/index.d.ts +307 -16
  95. package/form-input-email/index.mjs +1 -1
  96. package/form-input-id-card/index.d.ts +307 -16
  97. package/form-input-id-card/index.mjs +1 -1
  98. package/form-input-number/index.d.ts +246 -18
  99. package/form-input-number/index.mjs +1 -1
  100. package/form-input-phone-number/index.d.ts +307 -16
  101. package/form-input-phone-number/index.mjs +1 -1
  102. package/form-input-tag/index.d.ts +263 -1
  103. package/form-input-tag/index.mjs +1 -3
  104. package/form-input-time/index.d.ts +434 -1
  105. package/form-input-time/index.mjs +1 -3
  106. package/form-item-config-provider/index.d.ts +22 -0
  107. package/form-item-config-provider/index.mjs +24 -0
  108. package/form-item-group/index.d.ts +91 -17
  109. package/form-item-group/index.mjs +2 -78
  110. package/form-item-group/style.css +1 -1
  111. package/form-item-x/index.d.ts +141 -11
  112. package/form-item-x/index.mjs +1 -1
  113. package/form-item-x/style.css +1 -0
  114. package/form-radio-group/index.d.ts +303 -16
  115. package/form-radio-group/index.mjs +1 -1
  116. package/form-rate/index.d.ts +254 -14
  117. package/form-rate/index.mjs +1 -1
  118. package/form-red-table/index.mjs +27 -26
  119. package/form-row/index.d.ts +2 -2
  120. package/form-row/index.mjs +1 -1
  121. package/form-select/index.d.ts +537 -18
  122. package/form-select/index.mjs +1 -1
  123. package/form-slider/index.d.ts +283 -16
  124. package/form-slider/index.mjs +1 -1
  125. package/form-switch/index.d.ts +272 -14
  126. package/form-switch/index.mjs +1 -1
  127. package/form-table/index.d.ts +269 -0
  128. package/form-table/index.mjs +2 -0
  129. package/form-table-plus/index.d.ts +266 -0
  130. package/form-table-plus/index.mjs +2 -0
  131. package/form-text/index.d.ts +165 -13
  132. package/form-text/index.mjs +1 -1
  133. package/form-textarea/index.d.ts +351 -0
  134. package/form-textarea/index.mjs +2 -0
  135. package/form-time-select/index.d.ts +319 -0
  136. package/form-time-select/index.mjs +2 -0
  137. package/form-view/index.mjs +1 -1
  138. package/helper/dictionary.d.ts +15 -0
  139. package/helper/dictionary.mjs +97 -0
  140. package/hook/useDictionary.d.ts +60 -0
  141. package/hook/useDictionary.mjs +15 -0
  142. package/hook/useVisibilityChange.d.ts +4 -0
  143. package/hook/useVisibilityChange.mjs +14 -0
  144. package/iframe-window/index.d.ts +9 -0
  145. package/iframe-window/index.mjs +37 -0
  146. package/iframe-window/style.css +1 -0
  147. package/index.css +2 -0
  148. package/index.d.ts +57 -36
  149. package/index.mjs +59 -61
  150. package/package.json +10 -5
  151. package/pageable-table/index.d.ts +398 -0
  152. package/pageable-table/index.mjs +2 -0
  153. package/pageable-table/style.css +1 -0
  154. package/resolver/index.mjs +29 -0
  155. package/sub-table/index.d.ts +100 -0
  156. package/sub-table/index.mjs +472 -0
  157. package/sub-table/style.css +1 -0
  158. package/sub-table-plus/index.d.ts +97 -0
  159. package/sub-table-plus/index.mjs +2 -0
  160. package/sub-table-plus/style.css +1 -0
  161. package/table-column/index.d.ts +160 -0
  162. package/table-column/index.mjs +2 -0
  163. package/table-column/style.css +1 -0
  164. package/table-column-def/index.d.ts +95 -0
  165. package/table-column-def/index.mjs +11 -0
  166. package/table-view/index.d.ts +340 -1
  167. package/table-view/index.mjs +454 -6
  168. package/table-view/style.css +1 -0
  169. package/toolbar/index.d.ts +128 -1
  170. package/toolbar/index.mjs +1 -8
  171. package/toolbar/style.css +1 -0
  172. package/toolbar-button/index.d.ts +188 -1
  173. package/toolbar-button/index.mjs +1 -8
  174. package/vue-cron/index.d.ts +191 -0
  175. package/vue-cron/index.mjs +2 -0
  176. package/vue-cron/style.css +1 -0
  177. package/web-types.json +1 -1
  178. package/x-input-tag/index.d.ts +2 -0
  179. package/x-input-tag/index.mjs +228 -0
  180. package/x-input-tag/style.css +1 -0
  181. package/year-calendar/index.d.ts +99 -0
  182. package/year-calendar/index.mjs +2 -0
  183. package/year-calendar/style.css +1 -0
  184. package/chunks/B4M_TFeR.mjs +0 -152
  185. package/chunks/B5BIQCcK.mjs +0 -149
  186. package/chunks/BHNKrW1j.mjs +0 -61
  187. package/chunks/BO9jWhBl.mjs +0 -46
  188. package/chunks/BZ8aOa78.mjs +0 -35
  189. package/chunks/Bsz7y4Xp.mjs +0 -73
  190. package/chunks/Bxj372sF.mjs +0 -53
  191. package/chunks/C33EmJN8.mjs +0 -32
  192. package/chunks/C6Li3-l7.mjs +0 -28
  193. package/chunks/CBcdalMX.mjs +0 -35
  194. package/chunks/CdRsyF0n.mjs +0 -43
  195. package/chunks/ClNahmiU.mjs +0 -23
  196. package/chunks/CstztYMu.mjs +0 -28
  197. package/chunks/DC9b53M6.mjs +0 -32
  198. package/chunks/DDVAgRED.mjs +0 -36
  199. package/chunks/DpJQABVD.mjs +0 -91
  200. package/chunks/ZsLNWI9x.mjs +0 -46
  201. package/chunks/jn_iQrVZ.mjs +0 -28
  202. package/constants.d.ts +0 -1
  203. package/constants.mjs +0 -4
  204. package/form-check-box-group/index.d.ts +0 -93
  205. package/form-check-box-group/index.mjs +0 -2
  206. package/input/style.css +0 -1
  207. package/resolver.mjs +0 -79
  208. /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 CHANGED
@@ -1 +1 @@
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,56 @@
1
+ import { i as e, n as t } from "./D_qiRmiE.mjs";
2
+ import { n, t as r } from "./CJdkjadi.mjs";
3
+ import i from "../x-input-tag/index.mjs";
4
+ import { createVNode as a, mergeProps as o } from "vue";
5
+ //#region src/components/form/props/input-tag.ts
6
+ var s = {
7
+ ...n,
8
+ ...r,
9
+ modelValue: [Array, String],
10
+ arrayMode: {
11
+ type: Boolean,
12
+ default: !0
13
+ },
14
+ objectMode: {
15
+ type: Boolean,
16
+ default: !0
17
+ },
18
+ separator: {
19
+ type: String,
20
+ default: ","
21
+ },
22
+ boundarySelector: {
23
+ type: String,
24
+ default: ".form-scroller"
25
+ },
26
+ query: Function,
27
+ type: {
28
+ type: String,
29
+ default: "标签"
30
+ }
31
+ }, c = {
32
+ disabled: !0,
33
+ modelValue: !0
34
+ }, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
35
+ name: "FormInputTag",
36
+ inheritAttrs: !1,
37
+ props: { ...s },
38
+ emits: { ...t },
39
+ setup(t, { emit: n, slots: r, attrs: s }) {
40
+ let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
41
+ emit: n,
42
+ slots: r,
43
+ attrs: s,
44
+ predicate: l
45
+ });
46
+ return () => u({ vNodes: a(i, o(p.value, m.value, {
47
+ style: "width: 100%",
48
+ modelValue: t.modelValue,
49
+ disabled: f.value,
50
+ "onUpdate:modelValue": c,
51
+ placeholder: d.value
52
+ }), null) });
53
+ }
54
+ };
55
+ //#endregion
56
+ export { u as t };
@@ -0,0 +1,69 @@
1
+ import { a as e } from "./DcTVYqeJ.mjs";
2
+ import { t } from "./DOZRzqlo.mjs";
3
+ import { tableViewContextKey as n } from "../constants/index.mjs";
4
+ import { t as r } from "./BBERmTup.mjs";
5
+ import { createVNode as i, inject as a, mergeProps as o } from "vue";
6
+ import { ElTableColumn as s } from "element-plus/es";
7
+ //#region src/components/table/TableColumn.vue?vue&type=script&lang.jsx
8
+ var c = {
9
+ selection: !0,
10
+ "single-selection": !0,
11
+ index: !0,
12
+ expand: !0
13
+ }, l = (e, t, n, r, i) => {
14
+ var a;
15
+ let o = (e == null || (a = e.$parent) == null ? void 0 : a.rowDbClick) || (e == null ? void 0 : e.rowDbClick);
16
+ o == null || o(t, n, r, i);
17
+ }, u = (e) => {
18
+ let t = e.target;
19
+ for (; t && t.tagName.toUpperCase() !== "HTML";) {
20
+ if (t.tagName.toUpperCase() === "TD") return t;
21
+ t = t.parentNode;
22
+ }
23
+ return null;
24
+ }, d = () => {}, f = (t) => !e(t).length, p = {
25
+ name: "TableColumn",
26
+ props: { ...r },
27
+ setup(e, { slots: r, attrs: p }) {
28
+ let m = a(n, null);
29
+ return () => {
30
+ let { clickable: n, cellClick: a, ...h } = e, g, _ = c[e.type];
31
+ if (!_) {
32
+ let o = n || p.onClick || a;
33
+ (o || e.dictType || e.options) && (g = (n) => {
34
+ var s;
35
+ let { row: c, column: h } = n, g = o ? (e) => {
36
+ let t = u(e);
37
+ if (p.onClick || a) {
38
+ var n;
39
+ (n = p.onClick) == null || n.call(p, c, h, c, h, t, e), a == null || a(c, h, c, h, t, e);
40
+ } else l(m, c, h, t, e);
41
+ } : d, _ = r == null || (s = r.default) == null ? void 0 : s.call(r, n);
42
+ return f(_) && (_ = null), (e.dictType || e.options) && !_ ? i(t, {
43
+ class: { "is-clickable": o },
44
+ onClick: g,
45
+ row: c,
46
+ column: h,
47
+ dictType: e.dictType,
48
+ treeDict: e.treeDict,
49
+ idAsValue: e.idAsValue,
50
+ labelAsValue: e.labelAsValue,
51
+ options: e.options
52
+ }, null) : o ? i("span", {
53
+ class: "is-clickable",
54
+ onClick: g
55
+ }, [_ || (c == null ? void 0 : c[h == null ? void 0 : h.property])]) : _;
56
+ });
57
+ }
58
+ return i(s, o(h, {
59
+ key: p.filterable,
60
+ showOverflowTooltip: _ ? !1 : h.showOverflowTooltip
61
+ }), {
62
+ ...r,
63
+ default: g || r.default
64
+ });
65
+ };
66
+ }
67
+ };
68
+ //#endregion
69
+ export { p as t };
@@ -0,0 +1,198 @@
1
+ import { i as e, n as t } from "./D_qiRmiE.mjs";
2
+ import { n } from "./CJdkjadi.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,38 @@
1
+ import { f as e } from "./DcTVYqeJ.mjs";
2
+ import { o as t, r as n } from "./D_qiRmiE.mjs";
3
+ import { n as r } from "./CJdkjadi.mjs";
4
+ import { createVNode as i, mergeProps as a } from "vue";
5
+ import { ElText as o } from "element-plus/es";
6
+ //#region src/components/form/props/text.ts
7
+ var s = {
8
+ ...r,
9
+ type: String,
10
+ size: {
11
+ type: String,
12
+ default: "default"
13
+ },
14
+ truncated: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ lineClamp: [String, Number],
19
+ tag: {
20
+ type: String,
21
+ default: "span"
22
+ },
23
+ text: String
24
+ }, c = { modelValue: !0 }, l = (e) => r[e] === void 0 && c[e] !== !0, u = {
25
+ name: "FormText",
26
+ inheritAttrs: !1,
27
+ props: { ...s },
28
+ setup(r, { slots: s, attrs: c }) {
29
+ let u = t(r, { attrs: c }), d = e(r, l);
30
+ return () => n(r, {
31
+ vNodes: i(o, a(d.value, c), { default: s.default || (() => r.text) }),
32
+ formItemProps: u,
33
+ slots: s
34
+ });
35
+ }
36
+ };
37
+ //#endregion
38
+ export { u as t };