@web-utils/component 4.0.0 → 4.0.2

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 (172) hide show
  1. package/awesome-button/index.mjs +25 -55
  2. package/base.css +1 -1
  3. package/card/style.css +1 -1
  4. package/carousel/style.css +1 -1
  5. package/chat/style.css +1 -1
  6. package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
  7. package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
  8. package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
  9. package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
  10. package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
  11. package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
  12. package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
  13. package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
  14. package/chunks/configComponents.BDhlZU8F.mjs +23 -0
  15. package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
  16. package/chunks/core.DJEgjQW6.mjs +54 -0
  17. package/chunks/dictionary.DqiP9x2m.mjs +25 -0
  18. package/chunks/dictionary.DsN-2ukC.mjs +70 -0
  19. package/chunks/form-input.B8z37eqj.mjs +31 -0
  20. package/chunks/form-item.D-H-wCPE.mjs +233 -0
  21. package/chunks/form-validate.CVarNHKX.mjs +12 -0
  22. package/chunks/helper.BiMLcEEk.mjs +41 -0
  23. package/chunks/index.9OxHjTIE.mjs +16 -0
  24. package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
  25. package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
  26. package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
  27. package/chunks/utilSelf.Csq1766E.mjs +48 -0
  28. package/color-picker/index.mjs +19 -37
  29. package/comment/style.css +1 -1
  30. package/confirm-button/index.mjs +1 -1
  31. package/confirmable/index.mjs +1 -1
  32. package/context-menu/style.css +1 -1
  33. package/count-up/index.mjs +13 -24
  34. package/custom-scrollbar/index.mjs +1 -2
  35. package/data-operatext/style.css +1 -1
  36. package/data-panel/style.css +1 -1
  37. package/data-pay/style.css +1 -1
  38. package/data-price/style.css +1 -1
  39. package/data-rotate/style.css +1 -1
  40. package/data-table-picker/index.mjs +1 -1
  41. package/data-tabs/style.css +1 -1
  42. package/dialog-form/index.mjs +16 -28
  43. package/dynamic-table/style.css +1 -1
  44. package/easy-popup/index.mjs +22 -40
  45. package/easy-popup/style.css +1 -1
  46. package/editable-tree/index.mjs +203 -250
  47. package/editable-tree/style.css +1 -1
  48. package/element-dialog/index.mjs +30 -52
  49. package/element-dialog/style.css +1 -1
  50. package/flex-column/index.mjs +13 -25
  51. package/flex-item/index.mjs +15 -27
  52. package/flex-row/index.mjs +13 -25
  53. package/flow-designer/index.mjs +343 -374
  54. package/flow-designer/style.css +1 -1
  55. package/flow-viewer/index.mjs +64 -91
  56. package/form-block/index.mjs +33 -26
  57. package/form-card/index.mjs +25 -0
  58. package/form-cascader/index.mjs +70 -67
  59. package/form-checkbox/index.mjs +71 -0
  60. package/form-checkbox-group/index.mjs +33 -53
  61. package/form-date-picker/index.mjs +44 -73
  62. package/form-holder/index.mjs +54 -40
  63. package/form-holder/style.css +1 -0
  64. package/form-input/index.mjs +62 -40
  65. package/form-input-cron-expression/index.mjs +77 -0
  66. package/form-input-cron-expression/style.css +1 -0
  67. package/form-input-email/index.mjs +21 -33
  68. package/form-input-id-card/index.mjs +25 -38
  69. package/form-input-number/index.mjs +39 -42
  70. package/form-input-number/style.css +1 -1
  71. package/form-input-phone-number/index.mjs +26 -37
  72. package/form-input-tag/index.mjs +32 -34
  73. package/form-input-time/index.mjs +22 -37
  74. package/form-item/index.mjs +109 -101
  75. package/form-item/style.css +1 -1
  76. package/form-item-config-provider/index.mjs +18 -10
  77. package/form-item-group/index.mjs +73 -69
  78. package/form-item-group/style.css +1 -1
  79. package/form-radio-group/index.mjs +41 -36
  80. package/form-radio-group/style.css +1 -1
  81. package/form-select/index.mjs +142 -75
  82. package/form-select/style.css +1 -0
  83. package/form-switch/index.mjs +29 -34
  84. package/form-table/index.mjs +85 -0
  85. package/form-table-plus/index.mjs +109 -0
  86. package/form-textarea/index.mjs +23 -35
  87. package/form-tree-select/index.mjs +72 -0
  88. package/form-tree-select/style.css +1 -0
  89. package/form-tree-select-multiple/index.mjs +78 -0
  90. package/form-view/index.mjs +37 -69
  91. package/form-view/style.css +1 -1
  92. package/fy-curd/index.mjs +131 -140
  93. package/fy-curd/style.css +1 -1
  94. package/fy-draggable/index.mjs +16 -26
  95. package/fy-draggable/style.css +1 -1
  96. package/fy-dynamic/index.mjs +48 -57
  97. package/fy-empty/style.css +1 -1
  98. package/fy-form/style.css +1 -1
  99. package/fy-form-design/index.mjs +314 -339
  100. package/fy-form-design/style.css +1 -1
  101. package/fy-input-map/index.mjs +40 -50
  102. package/fy-input-map/style.css +1 -1
  103. package/fy-input-table/index.mjs +31 -41
  104. package/fy-u-editor/index.mjs +77 -103
  105. package/fy-upload/style.css +1 -1
  106. package/highlight-j-s/style.css +1 -1
  107. package/image-cropper/index.mjs +14 -65
  108. package/image-preview/index.mjs +17 -45
  109. package/image-preview/style.css +1 -1
  110. package/image-viewer/style.css +1 -1
  111. package/index.mjs +666 -496
  112. package/input-number/index.mjs +64 -9
  113. package/keyboard/style.css +1 -1
  114. package/monaco-editor/index.mjs +43 -71
  115. package/name-avatar/style.css +1 -1
  116. package/package.json +5 -4
  117. package/page-index/index.mjs +30 -54
  118. package/page-index-top/index.mjs +25 -47
  119. package/pageable-table/index.mjs +385 -218
  120. package/pageable-table/style.css +1 -1
  121. package/pageable-view/index.mjs +56 -95
  122. package/photo-swipe/index.mjs +51 -74
  123. package/picker-table-view/index.mjs +117 -0
  124. package/present-view/index.mjs +43 -77
  125. package/present-view/style.css +1 -1
  126. package/resize-observer/index.mjs +1 -1
  127. package/resize-observer/style.css +1 -1
  128. package/search/style.css +1 -1
  129. package/search-popover/index.mjs +28 -48
  130. package/search-popover/style.css +1 -1
  131. package/sign/index.mjs +1 -1
  132. package/sign-panel/style.css +1 -1
  133. package/skeleton-panel/index.mjs +38 -0
  134. package/skeleton-panel/style.css +1 -0
  135. package/split-pane/index.mjs +31 -49
  136. package/split-pane/style.css +1 -1
  137. package/sub-table/index.mjs +206 -0
  138. package/sub-table/style.css +1 -0
  139. package/sub-table-plus/index.mjs +231 -0
  140. package/sub-table-plus/style.css +1 -0
  141. package/swiper/index.mjs +18 -38
  142. package/swiper/style.css +1 -1
  143. package/tab/index.mjs +1 -1
  144. package/tab/style.css +1 -1
  145. package/tab-item/index.mjs +2 -2
  146. package/table-column/index.mjs +166 -37
  147. package/table-column/style.css +1 -0
  148. package/table-view/index.mjs +177 -132
  149. package/table-view/style.css +1 -1
  150. package/tabs-view/index.mjs +104 -0
  151. package/tabs-view/style.css +1 -0
  152. package/tag-render/index.mjs +13 -24
  153. package/toolbar/index.mjs +115 -58
  154. package/toolbar/style.css +1 -1
  155. package/toolbar-button/index.mjs +92 -48
  156. package/vue-cron/index.mjs +47 -65
  157. package/vue-qr-code/index.mjs +14 -32
  158. package/vue-quill-editor/index.mjs +13 -24
  159. package/vue-tags-input/index.mjs +10 -21
  160. package/vue-tree-select/index.mjs +352 -393
  161. package/vue-tree-select/style.css +1 -1
  162. package/vue-video-player/index.mjs +34 -63
  163. package/watermark/index.mjs +21 -31
  164. package/web-types.json +9240 -3840
  165. package/x-input-tag/index.mjs +29 -61
  166. package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
  167. package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
  168. package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
  169. package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
  170. package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
  171. package/toolbar-button/style.css +0 -1
  172. /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
@@ -1,36 +1,8 @@
1
- var b = Object.defineProperty, h = Object.defineProperties;
2
- var v = Object.getOwnPropertyDescriptors;
3
- var c = Object.getOwnPropertySymbols;
4
- var y = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
5
- var u = (r, e, t) => e in r ? b(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, d = (r, e) => {
6
- for (var t in e || (e = {}))
7
- y.call(e, t) && u(r, t, e[t]);
8
- if (c)
9
- for (var t of c(e))
10
- E.call(e, t) && u(r, t, e[t]);
11
- return r;
12
- }, F = (r, e) => h(r, v(e));
13
- var n = (r, e, t) => new Promise((i, s) => {
14
- var l = (o) => {
15
- try {
16
- m(t.next(o));
17
- } catch (p) {
18
- s(p);
19
- }
20
- }, a = (o) => {
21
- try {
22
- m(t.throw(o));
23
- } catch (p) {
24
- s(p);
25
- }
26
- }, m = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(l, a);
27
- m((t = t.apply(r, e)).next());
28
- });
29
- import { c as x, u as f } from "./utils.DRcxC1Fb.mjs";
30
- import { i as g, a as L, f as T, l as k, e as _ } from "./utilSelf.CRqpl0Cz.mjs";
31
- import { fastClone as I } from "@web-utils/core";
32
- import { n as w } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
33
- const O = {
1
+ import { c as o, u as n } from "./utils.DRcxC1Fb.mjs";
2
+ import { i as a, a as m, f as p, l as c, e as u } from "./utilSelf.Csq1766E.mjs";
3
+ import { fastClone as d } from "@web-utils/core";
4
+ import { n as F } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const f = {
34
6
  name: "UserTaskListeners",
35
7
  inject: {
36
8
  prefix: "prefix",
@@ -44,11 +16,11 @@ const O = {
44
16
  data() {
45
17
  return {
46
18
  elementListenersList: [],
47
- listenerEventTypeObject: _,
48
- listenerTypeObject: k,
19
+ listenerEventTypeObject: u,
20
+ listenerTypeObject: c,
49
21
  listenerFormModelVisible: !1,
50
22
  listenerForm: {},
51
- fieldTypeObject: T,
23
+ fieldTypeObject: p,
52
24
  fieldsListOfListener: [],
53
25
  listenerFieldFormModelVisible: !1,
54
26
  // 监听器 注入字段表单弹窗 显示状态
@@ -63,69 +35,56 @@ const O = {
63
35
  watch: {
64
36
  id: {
65
37
  immediate: !0,
66
- handler(r) {
67
- return n(this, null, function* () {
68
- r && (yield this.$nextTick(), this.resetListenersList());
69
- });
38
+ async handler(r) {
39
+ r && (await this.$nextTick(), this.resetListenersList());
70
40
  }
71
41
  }
72
42
  },
73
43
  methods: {
74
44
  resetListenersList() {
75
- var r, e, t, i;
76
- this.otherExtensionList = [], this.bpmnElementListeners = (i = (t = (e = (r = this.element.businessObject) == null ? void 0 : r.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((s) => s.$type === `${this.prefix}:TaskListener`)) != null ? i : [], this.elementListenersList = this.bpmnElementListeners.map((s) => L(s));
45
+ var r, e, t;
46
+ this.otherExtensionList = [], this.bpmnElementListeners = ((t = (e = (r = this.element.businessObject) == null ? void 0 : r.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((i) => i.$type === `${this.prefix}:TaskListener`)) ?? [], this.elementListenersList = this.bpmnElementListeners.map((i) => m(i));
77
47
  },
78
- openListenerForm(r, e) {
79
- return n(this, null, function* () {
80
- var t;
81
- r ? (this.listenerForm = g(r), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), r && r.fields ? this.fieldsListOfListener = r.fields.map((i) => F(d({}, i), {
82
- fieldType: i.string ? "string" : "expression"
83
- })) : (this.fieldsListOfListener = [], this.$set(this.listenerForm, "fields", [])), this.listenerFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
84
- });
48
+ async openListenerForm(r, e) {
49
+ var t;
50
+ r ? (this.listenerForm = a(r), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), r && r.fields ? this.fieldsListOfListener = r.fields.map((i) => ({
51
+ ...i,
52
+ fieldType: i.string ? "string" : "expression"
53
+ })) : (this.fieldsListOfListener = [], this.$set(this.listenerForm, "fields", [])), this.listenerFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
85
54
  },
86
55
  // 移除监听器
87
- removeListener(r, e) {
88
- return n(this, null, function* () {
89
- try {
90
- yield this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), f(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
91
- } catch (t) {
92
- }
93
- });
56
+ async removeListener(r, e) {
57
+ try {
58
+ await this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), n(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
59
+ } catch {
60
+ }
94
61
  },
95
62
  // 保存监听器
96
- saveListenerConfig() {
97
- return n(this, null, function* () {
98
- var t, i, s, l;
99
- if (!(yield this.$refs.listenerFormRef.validate())) return;
100
- const e = x(this.bpmnInstances, this.listenerForm, !0, this.prefix);
101
- this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = (l = (s = (i = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : i.values) == null ? void 0 : s.filter((a) => a.$type !== `${this.prefix}:TaskListener`)) != null ? l : [], f(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
102
- });
63
+ async saveListenerConfig() {
64
+ var t, i, s;
65
+ if (!await this.$refs.listenerFormRef.validate()) return;
66
+ const e = o(this.bpmnInstances, this.listenerForm, !0, this.prefix);
67
+ this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = ((s = (i = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : i.values) == null ? void 0 : s.filter((l) => l.$type !== `${this.prefix}:TaskListener`)) ?? [], n(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
103
68
  },
104
69
  // 打开监听器字段编辑弹窗
105
- openListenerFieldForm(r, e) {
106
- return n(this, null, function* () {
107
- var t;
108
- this.listenerFieldForm = r ? I(r) : {}, this.editingListenerFieldIndex = r ? e : -1, this.listenerFieldFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
109
- });
70
+ async openListenerFieldForm(r, e) {
71
+ var t;
72
+ this.listenerFieldForm = r ? d(r) : {}, this.editingListenerFieldIndex = r ? e : -1, this.listenerFieldFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
110
73
  },
111
74
  // 保存监听器注入字段
112
- saveListenerFiled() {
113
- return n(this, null, function* () {
114
- (yield this.$refs.listenerFieldFormRef.validate()) && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, yield this.$nextTick(), this.listenerFieldForm = {});
115
- });
75
+ async saveListenerFiled() {
76
+ await this.$refs.listenerFieldFormRef.validate() && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, await this.$nextTick(), this.listenerFieldForm = {});
116
77
  },
117
78
  // 移除监听器字段
118
- removeListenerField(r, e) {
119
- return n(this, null, function* () {
120
- try {
121
- yield this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
122
- } catch (t) {
123
- }
124
- });
79
+ async removeListenerField(r, e) {
80
+ try {
81
+ await this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
82
+ } catch {
83
+ }
125
84
  }
126
85
  }
127
86
  };
128
- var $ = function() {
87
+ var b = function() {
129
88
  var e = this, t = e._self._c;
130
89
  return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.listenerEventTypeObject[i.event] } }), t("ElTableColumn", { attrs: { label: "事件id", "min-width": "80px", prop: "id", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.listenerTypeObject[i.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
131
90
  return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(l) {
@@ -196,15 +155,15 @@ var $ = function() {
196
155
  }, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(i) {
197
156
  e.$set(e.listenerFieldForm, "expression", i);
198
157
  }, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
199
- }, S = [], j = /* @__PURE__ */ w(
200
- O,
201
- $,
202
- S,
158
+ }, h = [], v = /* @__PURE__ */ F(
159
+ f,
160
+ b,
161
+ h,
203
162
  !1,
204
163
  null,
205
164
  null
206
165
  );
207
- const M = j.exports;
166
+ const L = v.exports;
208
167
  export {
209
- M as default
168
+ L as default
210
169
  };
@@ -0,0 +1,23 @@
1
+ import { isObject as u, isString as c } from "@web-utils/core";
2
+ const g = {
3
+ privilege: {
4
+ processButtons(e) {
5
+ return e.map((t) => {
6
+ var r, n;
7
+ if (u(t)) {
8
+ const o = t, s = {};
9
+ for (const i in o)
10
+ c(o[i]) && (s[i] = (n = (r = g.privilege) == null ? void 0 : r.hasAuthority) == null ? void 0 : n.call(r, o[i]));
11
+ return s;
12
+ }
13
+ return t;
14
+ });
15
+ },
16
+ hasAuthority(e) {
17
+ return !0;
18
+ }
19
+ }
20
+ };
21
+ export {
22
+ g
23
+ };
@@ -0,0 +1,85 @@
1
+ import d from "element-ui/lib/loading";
2
+ import y from "element-ui/lib/message-box";
3
+ import { isFunction as a } from "@web-utils/core";
4
+ async function v(t, e, n) {
5
+ const { stop: r, prevent: o, message: f, loadable: l, loadingText: x, confirmable: b, confirmType: T, confirmText: S, confirmTitle: w } = e;
6
+ r && t.stopPropagation(), o && t.preventDefault();
7
+ const { before: c, click: u, cancel: s, after: g } = n;
8
+ if (a(u))
9
+ try {
10
+ let i = !0;
11
+ if (a(c) && (i = await c(t)), i === !1)
12
+ return;
13
+ b && await (y.confirm || y.default.confirm)(f || S, {
14
+ type: T,
15
+ title: w
16
+ });
17
+ let m;
18
+ l && (m = (d.service || d.default.service)({
19
+ background: "rgba(0,0,0,0.3)",
20
+ text: x
21
+ }));
22
+ let p;
23
+ try {
24
+ p = await u(t);
25
+ } catch {
26
+ }
27
+ l && m.close(), a(g) && await g(t, p);
28
+ } catch (i) {
29
+ a(s) && await s(i);
30
+ }
31
+ }
32
+ const C = {
33
+ functional: !0,
34
+ props: {
35
+ stop: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ prevent: {
40
+ type: Boolean,
41
+ default: !0
42
+ },
43
+ text: {
44
+ type: String,
45
+ default: ""
46
+ },
47
+ message: String,
48
+ confirmable: {
49
+ type: Boolean,
50
+ default: !0
51
+ },
52
+ confirmText: {
53
+ type: String,
54
+ default: "你确定要删除该记录吗?"
55
+ },
56
+ confirmType: {
57
+ type: String,
58
+ default: "warning"
59
+ },
60
+ confirmTitle: String,
61
+ loadable: Boolean,
62
+ loadingText: {
63
+ type: String,
64
+ default: "正在处理中请稍候..."
65
+ },
66
+ tag: {
67
+ type: String,
68
+ default: "i"
69
+ }
70
+ },
71
+ render(t, { props: e, data: n, children: r, listeners: o }) {
72
+ return t(
73
+ e.tag,
74
+ {
75
+ ...n,
76
+ on: { click: (f) => v(f, e, o) },
77
+ props: e
78
+ },
79
+ r || e.text
80
+ );
81
+ }
82
+ };
83
+ export {
84
+ C as c
85
+ };
@@ -0,0 +1,54 @@
1
+ import { hyphenate as f } from "@web-utils/core";
2
+ const a = (n) => {
3
+ const t = {};
4
+ for (const o in n)
5
+ t[f(o)] = n[o];
6
+ return t;
7
+ }, h = (n, t = "id", o = "label") => {
8
+ const i = [];
9
+ function e(s, c) {
10
+ if (!s) return;
11
+ const r = [...c, { [t]: s[t], [o]: s[o] }];
12
+ if (!s.children || s.children.length === 0) {
13
+ i.push(r);
14
+ return;
15
+ }
16
+ s.children.forEach((l) => {
17
+ e(l, r);
18
+ });
19
+ }
20
+ return n.forEach((s) => e(s, [])), i;
21
+ }, u = (n) => {
22
+ const t = [];
23
+ return n && (isArray(n) ? n.forEach((o) => {
24
+ isArray(o) ? t.push(...u(o)) : o && t.push(o);
25
+ }) : n && t.push(n)), t;
26
+ }, b = (n, t = "id", o = "label") => {
27
+ const i = [];
28
+ return h(n).forEach((e) => {
29
+ const s = [], c = [];
30
+ for (let r = 0; r < e.length; r++)
31
+ s.push(e[r][t]), c.push(e[r][o]);
32
+ i.push({
33
+ value: s.join("/"),
34
+ label: c.join("/")
35
+ });
36
+ }), i;
37
+ }, j = (n, t = "id", o = "label") => {
38
+ const i = {};
39
+ return h(n).forEach((e) => {
40
+ const s = [], c = [];
41
+ for (let r = 0; r < e.length; r++)
42
+ s.push(e[r][t]), c.push(e[r][o]);
43
+ i[s.join("/")] = {
44
+ value: s.join("/"),
45
+ label: c.join("/")
46
+ };
47
+ }), i;
48
+ };
49
+ export {
50
+ j as a,
51
+ a as b,
52
+ u as f,
53
+ b as t
54
+ };
@@ -0,0 +1,25 @@
1
+ const e = () => [], i = {
2
+ props: {
3
+ dictType: String
4
+ },
5
+ data() {
6
+ return {
7
+ dictItems: []
8
+ };
9
+ },
10
+ watch: {
11
+ dictType: {
12
+ immediate: !0,
13
+ async handler(t) {
14
+ t ? this.dictItems = await e(t, !0, {
15
+ treeDict: this.treeDict,
16
+ idAsValue: this.idAsValue,
17
+ labelAsValue: this.labelAsValue
18
+ }) : this.dictItems = [];
19
+ }
20
+ }
21
+ }
22
+ };
23
+ export {
24
+ i as d
25
+ };
@@ -0,0 +1,70 @@
1
+ import { t as u, a as l } from "./core.DJEgjQW6.mjs";
2
+ import { g as h } from "./configComponents.BDhlZU8F.mjs";
3
+ const d = {}, D = {}, $ = {}, T = (t, c = !0, { options: o, treeDict: n, idAsValue: i, labelAsValue: r } = {}) => {
4
+ let e = t;
5
+ n && (e = `${t}-${i}-${r}${o ? "-options" : ""}`);
6
+ const a = d[e];
7
+ return c && a ? a : n ? C(t, c, { idAsValue: i, labelAsValue: r }) : w(t, c);
8
+ }, w = (t, c = !0) => {
9
+ if ($[t])
10
+ return $[t];
11
+ const o = new Promise((n, i) => {
12
+ var r, e;
13
+ c && d[t] ? n(d[t]) : ((e = (r = h) == null ? void 0 : r.dict) != null && e.remote && n([]), h.dict.remote(t).then((a) => {
14
+ let s = a.data.data;
15
+ if (c) {
16
+ const f = {};
17
+ s.forEach(({ label: g, value: m }) => {
18
+ f[m] = Object.freeze({ label: g, value: m });
19
+ }), D[t] = f, s = Object.freeze(s), d[t] = s;
20
+ }
21
+ $[t] = null, n(s);
22
+ }).catch((a) => {
23
+ $[t] = null, i(a);
24
+ }));
25
+ });
26
+ return $[t] = o, o;
27
+ }, C = (t, c = !0, { idAsValue: o, labelAsValue: n } = {}) => {
28
+ const i = `${t}-${o}-${n}`;
29
+ if ($[i])
30
+ return $[i];
31
+ const r = new Promise((e, a) => {
32
+ var s, f;
33
+ c && d[i] ? e(d[i]) : ((f = (s = h) == null ? void 0 : s.dict) != null && f.getDictTreeByType && e([]), h.dict.getDictTreeByType(t, { idAsValue: o, labelAsValue: n }).then((g) => {
34
+ const m = g.data.data;
35
+ c && (d[i] = m, d[`${i}-options`] = u(m), D[i] = l(m)), $[i] = null, e(m);
36
+ }).catch((g) => {
37
+ $[i] = null, a(g);
38
+ }));
39
+ });
40
+ return $[i] = r, r;
41
+ }, b = async (t, c, o = !0, { treeDict: n, idAsValue: i, labelAsValue: r } = {}) => {
42
+ let e = t;
43
+ n && (e = `${t}-${i}-${r}`);
44
+ const a = D[e];
45
+ let s;
46
+ if (o && a)
47
+ s = a[c];
48
+ else {
49
+ let f = await T(t, o, { treeDict: n, idAsValue: i, labelAsValue: r });
50
+ if (o)
51
+ s = D[e][c];
52
+ else {
53
+ n && (f = u(f));
54
+ for (let g = 0; g < f.length; g++) {
55
+ const m = f[g];
56
+ if (m.value === c) {
57
+ s = m;
58
+ break;
59
+ }
60
+ }
61
+ }
62
+ }
63
+ return s;
64
+ }, j = async (t, c, o = !0, { treeDict: n, idAsValue: i, labelAsValue: r } = {}) => {
65
+ var e;
66
+ return ((e = await b(t, c, o, { treeDict: n, idAsValue: i, labelAsValue: r })) == null ? void 0 : e.label) || c || "";
67
+ };
68
+ export {
69
+ j as g
70
+ };
@@ -0,0 +1,31 @@
1
+ import { f as r } from "./form-item.D-H-wCPE.mjs";
2
+ import { c as t } from "./index.d3MV3Wq2.mjs";
3
+ const o = {
4
+ name: "FormInput",
5
+ mixins: [r],
6
+ props: {
7
+ value: [Boolean, String, Array, Number, Object, Date],
8
+ readonly: Boolean,
9
+ disabled: Boolean
10
+ },
11
+ inject: {
12
+ formView: {
13
+ default: {}
14
+ }
15
+ },
16
+ computed: {
17
+ computePlaceholder() {
18
+ return this.formView.printing ? null : this.placeholder === !0 ? this.message : this.placeholder;
19
+ },
20
+ listeners() {
21
+ return t(this.$listeners, "input", !1);
22
+ },
23
+ inputDisabled() {
24
+ var e;
25
+ return (e = this.formHolder.enabledFields) != null && e.includes(this.prop) ? !1 : this.disabled || (this.elForm || {}).disabled;
26
+ }
27
+ }
28
+ };
29
+ export {
30
+ o as f
31
+ };