@web-utils/component 4.0.15 → 4.0.16

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 (169) hide show
  1. package/address-input/index.mjs +13 -15
  2. package/card/index.mjs +18 -20
  3. package/carousel/index.mjs +10 -12
  4. package/chat/index.mjs +45 -56
  5. package/chunk-file-uploader/index.mjs +36 -378
  6. package/chunk-file-uploader/style.css +1 -1
  7. package/chunks/ElementBaseInfo.ZADwixb5.mjs +125 -0
  8. package/chunks/ElementForm.CQ3PN5qj.mjs +223 -0
  9. package/chunks/ElementListeners.De_PRuIm.mjs +215 -0
  10. package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +181 -0
  11. package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
  12. package/chunks/ElementProperties.CosfDrlW.mjs +112 -0
  13. package/chunks/{ElementTaskConfig.AvBOzAni.mjs → ElementTaskConfig.Bko0kgTp.mjs} +55 -63
  14. package/chunks/FlowCondition.Y6qEYi1T.mjs +102 -0
  15. package/chunks/FormTemp.BQxO5IQq.mjs +123 -0
  16. package/chunks/SignalAndMessage.Bb5PFX0N.mjs +85 -0
  17. package/chunks/UserTaskListeners.Bv3BDfEI.mjs +169 -0
  18. package/chunks/{confirmable-mixin.BFZb6pcK.mjs → confirmable-mixin.B2TtLAdk.mjs} +1 -1
  19. package/chunks/core.0Exl13Mz.mjs +54 -0
  20. package/chunks/{dataformat.DJoNBlmI.mjs → dataformat.CpqOeGBl.mjs} +6 -6
  21. package/chunks/{dic.BinnDitI.mjs → dic.Dkl-leRW.mjs} +9 -9
  22. package/chunks/dictionary.DGt59Ir7.mjs +68 -0
  23. package/chunks/{event.DSlcqYHL.mjs → event.9aDS6jcw.mjs} +2 -2
  24. package/chunks/{form-input.BtS_J5a2.mjs → form-input.CvFdwlEV.mjs} +2 -2
  25. package/chunks/form-item.LWjePsPa.mjs +233 -0
  26. package/chunks/{index.CIfe3UB3.mjs → index.9OxHjTIE.mjs} +2 -2
  27. package/chunks/{index.Cn7aq-Et.mjs → index.B2TRddqf.mjs} +8 -8
  28. package/chunks/{init.xOlFpTyZ.mjs → init.DAsXSoLW.mjs} +2 -2
  29. package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
  30. package/chunks/{util.DI42t5GU.mjs → util.DqFv_pWg.mjs} +22 -22
  31. package/chunks/utilSelf.Csq1766E.mjs +48 -0
  32. package/chunks/utils.DRcxC1Fb.mjs +60 -0
  33. package/color-picker/index.mjs +22 -101
  34. package/confirm-button/index.mjs +1 -1
  35. package/confirmable/index.mjs +1 -1
  36. package/data-box/index.mjs +12 -15
  37. package/data-card/index.mjs +10 -12
  38. package/data-card-text/index.mjs +10 -12
  39. package/data-display/index.mjs +15 -17
  40. package/data-icons/index.mjs +13 -16
  41. package/data-imgtext/index.mjs +15 -18
  42. package/data-operatext/index.mjs +14 -16
  43. package/data-panel/index.mjs +13 -16
  44. package/data-pay/index.mjs +16 -20
  45. package/data-price/index.mjs +14 -16
  46. package/data-progress/index.mjs +13 -17
  47. package/data-rotate/index.mjs +12 -15
  48. package/data-table-picker/index.mjs +15 -18
  49. package/data-tabs/index.mjs +12 -15
  50. package/dialog-form/index.mjs +16 -18
  51. package/dynamic-table/index.mjs +25 -30
  52. package/editable-progress/index.mjs +9 -11
  53. package/editable-tree/index.mjs +52 -56
  54. package/egd-collapse-item/index.mjs +9 -9
  55. package/element-dialog/index.mjs +22 -23
  56. package/element-listeners/style.css +1 -0
  57. package/element-multi-instance/style.css +1 -0
  58. package/flex-column/index.mjs +1 -1
  59. package/flex-item/index.mjs +1 -1
  60. package/flex-row/index.mjs +1 -1
  61. package/flow/index.mjs +10 -11
  62. package/flow-designer/index.mjs +699 -1973
  63. package/flow-designer/style.css +1 -1
  64. package/flow-node/index.mjs +1 -1
  65. package/flow-viewer/index.mjs +9 -9
  66. package/form-block/index.mjs +32 -34
  67. package/form-cascader/index.mjs +23 -24
  68. package/form-checkbox/index.mjs +16 -17
  69. package/form-checkbox-group/index.mjs +20 -23
  70. package/form-date-picker/index.mjs +18 -20
  71. package/form-holder/index.mjs +13 -14
  72. package/form-input/index.mjs +14 -15
  73. package/form-input-cron-expression/index.mjs +19 -22
  74. package/form-input-email/index.mjs +15 -16
  75. package/form-input-id-card/index.mjs +12 -13
  76. package/form-input-number/index.mjs +16 -17
  77. package/form-input-phone-number/index.mjs +21 -22
  78. package/form-input-tag/index.mjs +14 -15
  79. package/form-input-time/index.mjs +14 -15
  80. package/form-item/index.mjs +140 -3
  81. package/form-item-group/index.mjs +28 -31
  82. package/form-radio-group/index.mjs +27 -28
  83. package/form-select/index.mjs +21 -23
  84. package/form-switch/index.mjs +16 -17
  85. package/form-table/index.mjs +16 -17
  86. package/form-table-plus/index.mjs +21 -22
  87. package/form-textarea/index.mjs +15 -16
  88. package/form-tree-select/index.mjs +14 -15
  89. package/form-tree-select-multiple/index.mjs +14 -15
  90. package/form-view/index.mjs +35 -39
  91. package/fy-array/index.mjs +33 -37
  92. package/fy-cascader/index.mjs +16 -17
  93. package/fy-checkbox/index.mjs +11 -13
  94. package/fy-code/index.mjs +10 -10
  95. package/fy-curd/index.mjs +1128 -1152
  96. package/fy-date/index.mjs +10 -11
  97. package/fy-draggable/index.mjs +9 -10
  98. package/fy-dynamic/index.mjs +22 -25
  99. package/fy-empty/index.mjs +1 -1
  100. package/fy-form/index.mjs +638 -15
  101. package/fy-form-design/index.mjs +1307 -1345
  102. package/fy-from/crud/zh.d.ts +6 -6
  103. package/fy-input/index.mjs +12 -14
  104. package/fy-input-color/index.mjs +13 -15
  105. package/fy-input-icon/index.mjs +20 -23
  106. package/fy-input-map/index.mjs +28 -31
  107. package/fy-input-number/index.mjs +9 -10
  108. package/fy-input-table/index.mjs +18 -22
  109. package/fy-input-tree/index.mjs +33 -37
  110. package/fy-progress/index.mjs +9 -10
  111. package/fy-radio/index.mjs +15 -16
  112. package/fy-rate/index.mjs +10 -11
  113. package/fy-select/index.mjs +25 -29
  114. package/fy-slider/index.mjs +11 -12
  115. package/fy-switch/index.mjs +9 -10
  116. package/fy-tabs/index.mjs +15 -17
  117. package/fy-time/index.mjs +1 -1
  118. package/fy-title/index.mjs +1 -1
  119. package/fy-tree/index.mjs +18 -24
  120. package/fy-u-editor/index.mjs +1 -1
  121. package/fy-upload/index.mjs +74 -76
  122. package/guide-steps/index.mjs +11 -13
  123. package/iframe-window/index.mjs +9 -10
  124. package/image-cropper/index.mjs +28 -30
  125. package/image-preview/index.mjs +12 -14
  126. package/index.mjs +72 -72
  127. package/input-number/index.mjs +13 -14
  128. package/input-number-range/index.mjs +11 -12
  129. package/license/index.mjs +1 -1
  130. package/login/index.mjs +21 -26
  131. package/nav-bar/index.mjs +9 -10
  132. package/notice/index.mjs +9 -10
  133. package/package.json +1 -1
  134. package/page-index/index.mjs +12 -13
  135. package/page-index-top/index.mjs +23 -28
  136. package/page-skeleton/index.mjs +14 -14
  137. package/page-skeleton-new/index.mjs +8 -9
  138. package/pageable-table/index.mjs +172 -182
  139. package/pageable-view/index.mjs +15 -16
  140. package/picker-table-view/index.mjs +49 -58
  141. package/present-view/index.mjs +35 -39
  142. package/record-video/index.mjs +1 -1
  143. package/resize-observer/index.mjs +1 -1
  144. package/search/index.mjs +20 -22
  145. package/search-popover/index.mjs +1 -1
  146. package/sign/index.mjs +1 -1
  147. package/skeleton-panel/index.mjs +9 -10
  148. package/split-pane/index.mjs +36 -37
  149. package/static-pageable-table/index.mjs +11 -13
  150. package/sub-table/index.mjs +36 -49
  151. package/sub-table-plus/index.mjs +229 -18
  152. package/swiper/index.mjs +11 -12
  153. package/table-column/index.mjs +223 -3
  154. package/table-view/index.mjs +52 -60
  155. package/tabs-view/index.mjs +17 -19
  156. package/tag-render/index.mjs +16 -18
  157. package/text-ellipsis/index.mjs +9 -10
  158. package/toolbar/index.mjs +13 -14
  159. package/toolbar-button/index.mjs +13 -14
  160. package/verify/index.mjs +1 -1
  161. package/vue-cron/index.mjs +259 -267
  162. package/watermark/index.mjs +1 -1
  163. package/web-types.json +1 -1
  164. package/x-input-tag/index.mjs +21 -24
  165. package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
  166. package/chunks/FyForm.DriwCJ7b.mjs +0 -765
  167. package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
  168. package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
  169. package/chunks/TableColumn.BzivvXMF.mjs +0 -337
@@ -0,0 +1,102 @@
1
+ import { n as s } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
2
+ const r = {
3
+ name: "FlowCondition",
4
+ props: {
5
+ id: String,
6
+ element: Object,
7
+ bpmnInstances: Object
8
+ },
9
+ data() {
10
+ return {
11
+ flowConditionForm: {}
12
+ };
13
+ },
14
+ watch: {
15
+ id: {
16
+ immediate: !0,
17
+ async handler() {
18
+ await this.$nextTick(), this.resetFlowCondition();
19
+ }
20
+ }
21
+ },
22
+ beforeDestroy() {
23
+ this.bpmnElementSource = null, this.bpmnElementSourceRef = null;
24
+ },
25
+ methods: {
26
+ resetFlowCondition() {
27
+ if (this.bpmnElementSource = this.element.source, this.bpmnElementSourceRef = this.element.businessObject.sourceRef, this.bpmnElementSourceRef && this.bpmnElementSourceRef.default && this.bpmnElementSourceRef.default.id === this.element.id)
28
+ this.flowConditionForm = { type: "default" };
29
+ else if (!this.element.businessObject.conditionExpression)
30
+ this.flowConditionForm = { type: "normal" };
31
+ else {
32
+ const n = this.element.businessObject.conditionExpression;
33
+ if (this.flowConditionForm = { ...n, type: "condition" }, this.flowConditionForm.resource) {
34
+ this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "externalScript");
35
+ return;
36
+ }
37
+ if (n.language) {
38
+ this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "inlineScript");
39
+ return;
40
+ }
41
+ this.$set(this.flowConditionForm, "conditionType", "expression");
42
+ }
43
+ },
44
+ updateFlowType(n) {
45
+ if (n === "condition") {
46
+ this.flowConditionRef = this.bpmnInstances.moddle.create("bpmn:FormalExpression"), this.bpmnInstances.modeling.updateProperties(this.element, {
47
+ conditionExpression: this.flowConditionRef
48
+ });
49
+ return;
50
+ }
51
+ if (n === "default") {
52
+ this.bpmnInstances.modeling.updateProperties(this.element, {
53
+ conditionExpression: null
54
+ }), this.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
55
+ default: this.element
56
+ });
57
+ return;
58
+ }
59
+ this.bpmnElementSourceRef.default && this.bpmnElementSourceRef.default.id === this.element.id && this.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
60
+ default: null
61
+ }), this.bpmnInstances.modeling.updateProperties(this.element, {
62
+ conditionExpression: null
63
+ });
64
+ },
65
+ updateFlowCondition() {
66
+ const { conditionType: n, scriptType: e, body: o, resource: t, language: l } = this.flowConditionForm;
67
+ let i;
68
+ n === "expression" ? i = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: o }) : e === "inlineScript" ? (i = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: o, language: l }), this.$set(this.flowConditionForm, "resource", "")) : (this.$set(this.flowConditionForm, "body", ""), i = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { resource: t, language: l })), this.bpmnInstances.modeling.updateProperties(this.element, { conditionExpression: i });
69
+ }
70
+ }
71
+ };
72
+ var a = function() {
73
+ var e = this, o = e._self._c;
74
+ return o("div", { staticClass: "panel-tab__content" }, [o("ElForm", { attrs: { model: e.flowConditionForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(t) {
75
+ t.preventDefault();
76
+ } } }, [o("ElFormItem", { attrs: { label: "流转类型" } }, [o("ElSelect", { on: { change: e.updateFlowType }, model: { value: e.flowConditionForm.type, callback: function(t) {
77
+ e.$set(e.flowConditionForm, "type", t);
78
+ }, expression: "flowConditionForm.type" } }, [o("ElOption", { attrs: { label: "普通流转路径", value: "normal" } }), o("ElOption", { attrs: { label: "默认流转路径", value: "default" } }), o("ElOption", { attrs: { label: "条件流转路径", value: "condition" } })], 1)], 1), e.flowConditionForm.type === "condition" ? o("ElFormItem", { key: "condition", attrs: { label: "条件格式" } }, [o("ElSelect", { model: { value: e.flowConditionForm.conditionType, callback: function(t) {
79
+ e.$set(e.flowConditionForm, "conditionType", t);
80
+ }, expression: "flowConditionForm.conditionType" } }, [o("ElOption", { attrs: { label: "表达式", value: "expression" } }), o("ElOption", { attrs: { label: "脚本", value: "script" } })], 1)], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "expression" ? o("ElFormItem", { key: "express", attrs: { label: "表达式" } }, [o("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(t) {
81
+ e.$set(e.flowConditionForm, "body", t);
82
+ }, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "script" ? [o("ElFormItem", { key: "language", attrs: { label: "脚本语言" } }, [o("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.language, callback: function(t) {
83
+ e.$set(e.flowConditionForm, "language", t);
84
+ }, expression: "flowConditionForm.language" } })], 1), o("ElFormItem", { key: "scriptType", attrs: { label: "脚本类型" } }, [o("ElSelect", { model: { value: e.flowConditionForm.scriptType, callback: function(t) {
85
+ e.$set(e.flowConditionForm, "scriptType", t);
86
+ }, expression: "flowConditionForm.scriptType" } }, [o("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), o("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.flowConditionForm.scriptType === "inlineScript" ? o("ElFormItem", { key: "body", attrs: { label: "脚本" } }, [o("ElInput", { attrs: { type: "textarea", clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(t) {
87
+ e.$set(e.flowConditionForm, "body", t);
88
+ }, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.scriptType === "externalScript" ? o("ElFormItem", { key: "resource", attrs: { label: "资源地址" } }, [o("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.resource, callback: function(t) {
89
+ e.$set(e.flowConditionForm, "resource", t);
90
+ }, expression: "flowConditionForm.resource" } })], 1) : e._e()] : e._e()], 2)], 1);
91
+ }, d = [], m = /* @__PURE__ */ s(
92
+ r,
93
+ a,
94
+ d,
95
+ !1,
96
+ null,
97
+ null
98
+ );
99
+ const c = m.exports;
100
+ export {
101
+ c as default
102
+ };
@@ -0,0 +1,123 @@
1
+ import { isBlank as _ } from "@web-utils/core";
2
+ import { formatDate as i } from "@web-utils/integrations/dayjs";
3
+ import { p as h, M as g, A as b, b as c, q as A, e as S, k as d, t as T, h as C, v, u as x } from "./util.DqFv_pWg.mjs";
4
+ import "../fy-u-editor/style.css";
5
+ import { a as D, b as O } from "./dataformat.CpqOeGBl.mjs";
6
+ import { s as j } from "./slot.DXIbhGat.mjs";
7
+ import { n as L } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
8
+ const R = (n = {}, e = {}, s = {}, r = []) => {
9
+ let t = n[e.prop];
10
+ const a = e.type, o = e.separator;
11
+ if (e.bind && (t = h(n, e.bind)), _(t))
12
+ t = "";
13
+ else {
14
+ const f = g.includes(e.type) && e.multiple, y = b.includes(e.type);
15
+ if ((["string", "number"].includes(e.dataType) || f || y) && !Array.isArray(t) && (t = `${t}`.split(o || c), e.dataType === "number" && (t = A(t))), S.includes(a))
16
+ Array.isArray(t) ? t = t.join(o || d) : t = t.split(o || c).join(o || d);
17
+ else if (a === "password")
18
+ t = T(t, "*");
19
+ else if (C.includes(a) && e.format) {
20
+ const m = e.format.replace("dd", "DD").replace("yyyy", "YYYY"), u = i(Date.now(), "YYYY-MM-DD");
21
+ if (a.indexOf("range") !== -1) {
22
+ let p = t[0] || "", l = t[1] || "";
23
+ a === "timerange" && p.length <= 8 && l.length < 8 && (p = `${u} ${p}`, l = `${u} ${l}`), t = [i(p, m), i(l, m)].join(e.separator || "~");
24
+ } else
25
+ a === "time" && t.length <= 8 && (t = `${u} ${t}`), t = i(t, m);
26
+ }
27
+ t = v(r, t, e.props || s.props);
28
+ }
29
+ return e.formatter && typeof e.formatter == "function" && (t = e.formatter(n, n[e.prop], t, e)), t;
30
+ }, Y = {
31
+ name: "FormTemp",
32
+ components: { FyUEditor: () => import("../fy-u-editor/index.mjs") },
33
+ mixins: [j],
34
+ props: {
35
+ value: [String, Object, Number, Boolean, Array],
36
+ columnSlot: {
37
+ type: Array,
38
+ default: () => []
39
+ },
40
+ tableData: {
41
+ type: Object,
42
+ default: () => ({})
43
+ },
44
+ enter: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ type: {
49
+ type: String
50
+ },
51
+ propsHttp: {
52
+ type: Object,
53
+ default: () => ({})
54
+ },
55
+ props: {
56
+ type: Object
57
+ },
58
+ dic: {
59
+ type: Array
60
+ },
61
+ size: {
62
+ type: String
63
+ },
64
+ disabled: {
65
+ type: Boolean
66
+ },
67
+ readonly: {
68
+ type: Boolean
69
+ },
70
+ column: {
71
+ type: Object,
72
+ default: () => ({})
73
+ }
74
+ },
75
+ computed: {
76
+ params() {
77
+ return this.column.params || {};
78
+ },
79
+ event() {
80
+ return this.column.event || {};
81
+ },
82
+ text: {
83
+ get() {
84
+ return this.value;
85
+ },
86
+ set(n) {
87
+ this.$emit("input", n), this.$emit("change", n);
88
+ }
89
+ }
90
+ },
91
+ methods: {
92
+ uploadFun: x,
93
+ getComponent: O,
94
+ getPlaceholder: D,
95
+ enterChange() {
96
+ typeof this.column.enter == "function" ? this.column.enter({ value: this.text, column: this.column }) : this.enter && this.$emit("enter");
97
+ }
98
+ }
99
+ };
100
+ var k = function() {
101
+ var e = this, s = e._self._c;
102
+ return s(e.getComponent(e.column.type, e.column.component), e._g(e._b({ ref: "temp", tag: "Component", attrs: { column: Object.assign(e.column, e.params), dic: e.dic, disabled: e.column.disabled || e.disabled, readonly: e.column.readonly || e.readonly, placeholder: e.getPlaceholder(e.column), props: e.column.props || e.props, "props-http": e.column.propsHttp || e.propsHttp, size: e.column.size || e.size, "table-data": e.tableData, type: e.type || e.column.type, "column-slot": e.columnSlot }, nativeOn: { keyup: function(r) {
103
+ return !r.type.indexOf("key") && e._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : e.enterChange.apply(null, arguments);
104
+ } }, scopedSlots: e._u([e._l(e.columnSlot, function(r) {
105
+ return { key: r, fn: function(t) {
106
+ return [e._t(r, null, null, t)];
107
+ } };
108
+ })], null, !0), model: { value: e.text, callback: function(r) {
109
+ e.text = r;
110
+ }, expression: "text" } }, "Component", Object.assign(e.column, e.uploadFun(e.column)), !1), e.event), [e.params.html ? s("span", { domProps: { innerHTML: e._s(e.params.html) } }) : e._e()]);
111
+ }, F = [], I = /* @__PURE__ */ L(
112
+ Y,
113
+ k,
114
+ F,
115
+ !1,
116
+ null,
117
+ null
118
+ );
119
+ const V = I.exports;
120
+ export {
121
+ V as F,
122
+ R as d
123
+ };
@@ -0,0 +1,85 @@
1
+ import { n as l } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
2
+ const o = {
3
+ name: "SignalAndMessage",
4
+ props: {
5
+ bpmnInstances: Object
6
+ },
7
+ data() {
8
+ return {
9
+ signalList: [],
10
+ messageList: [],
11
+ modelVisible: !1,
12
+ modelType: "",
13
+ modelObjectForm: {}
14
+ };
15
+ },
16
+ computed: {
17
+ modelConfig() {
18
+ return this.modelType === "message" ? { title: "创建消息", idLabel: "消息ID", nameLabel: "消息名称" } : { title: "创建信号", idLabel: "信号ID", nameLabel: "信号名称" };
19
+ }
20
+ },
21
+ mounted() {
22
+ this.initDataList();
23
+ },
24
+ methods: {
25
+ initDataList() {
26
+ this.rootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.messageIdMap = {}, this.signalIdMap = {}, this.messageList = [], this.signalList = [], this.rootElements.forEach((s) => {
27
+ s.$type === "bpmn:Message" && (this.messageIdMap[s.id] = !0, this.messageList.push({ ...s })), s.$type === "bpmn:Signal" && (this.signalIdMap[s.id] = !0, this.signalList.push({ ...s }));
28
+ });
29
+ },
30
+ openModel(s) {
31
+ this.modelType = s, this.modelObjectForm = {}, this.modelVisible = !0;
32
+ },
33
+ addNewObject() {
34
+ if (this.modelType === "message") {
35
+ if (this.messageIdMap[this.modelObjectForm.id])
36
+ return this.$message.error("该消息已存在,请修改id后重新保存");
37
+ const s = this.bpmnInstances.moddle.create("bpmn:Message", this.modelObjectForm);
38
+ this.rootElements.push(s);
39
+ } else {
40
+ if (this.signalIdMap[this.modelObjectForm.id])
41
+ return this.$message.error("该信号已存在,请修改id后重新保存");
42
+ const s = this.bpmnInstances.moddle.create("bpmn:Signal", this.modelObjectForm);
43
+ this.rootElements.push(s);
44
+ }
45
+ this.modelVisible = !1, this.initDataList();
46
+ }
47
+ }
48
+ };
49
+ var a = function() {
50
+ var e = this, t = e._self._c;
51
+ return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "panel-tab__content--title" }, [e._m(0), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
52
+ return e.openModel("message");
53
+ } } }, [e._v("创建新消息")])], 1), t("ElTable", { attrs: { data: e.messageList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "消息ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "消息名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("div", { staticClass: "panel-tab__content--title", staticStyle: { "margin-top": "8px", "padding-top": "8px", "border-top": "1px solid #eee" } }, [e._m(1), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
54
+ return e.openModel("signal");
55
+ } } }, [e._v("创建新信号")])], 1), t("ElTable", { attrs: { data: e.signalList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "信号ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "信号名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.modelVisible, title: e.modelConfig.title, "close-on-click-modal": !1, width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
56
+ e.modelVisible = i;
57
+ } }, scopedSlots: e._u([{ key: "footer", fn: function() {
58
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
59
+ e.modelVisible = !1;
60
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.addNewObject } }, [e._v("保 存")])];
61
+ }, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.modelObjectForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(i) {
62
+ i.preventDefault();
63
+ } } }, [t("ElFormItem", { attrs: { label: e.modelConfig.idLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.id, callback: function(i) {
64
+ e.$set(e.modelObjectForm, "id", i);
65
+ }, expression: "modelObjectForm.id" } })], 1), t("ElFormItem", { attrs: { label: e.modelConfig.nameLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.name, callback: function(i) {
66
+ e.$set(e.modelObjectForm, "name", i);
67
+ }, expression: "modelObjectForm.name" } })], 1)], 1)], 1)], 1);
68
+ }, n = [function() {
69
+ var s = this, e = s._self._c;
70
+ return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), s._v("消息列表")]);
71
+ }, function() {
72
+ var s = this, e = s._self._c;
73
+ return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), s._v("信号列表")]);
74
+ }], m = /* @__PURE__ */ l(
75
+ o,
76
+ a,
77
+ n,
78
+ !1,
79
+ null,
80
+ null
81
+ );
82
+ const d = m.exports;
83
+ export {
84
+ d as default
85
+ };
@@ -0,0 +1,169 @@
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 = {
6
+ name: "UserTaskListeners",
7
+ inject: {
8
+ prefix: "prefix",
9
+ width: "width"
10
+ },
11
+ props: {
12
+ id: String,
13
+ element: Object,
14
+ bpmnInstances: Object
15
+ },
16
+ data() {
17
+ return {
18
+ elementListenersList: [],
19
+ listenerEventTypeObject: u,
20
+ listenerTypeObject: c,
21
+ listenerFormModelVisible: !1,
22
+ listenerForm: {},
23
+ fieldTypeObject: p,
24
+ fieldsListOfListener: [],
25
+ listenerFieldFormModelVisible: !1,
26
+ // 监听器 注入字段表单弹窗 显示状态
27
+ editingListenerIndex: -1,
28
+ // 监听器所在下标,-1 为新增
29
+ editingListenerFieldIndex: -1,
30
+ // 字段所在下标,-1 为新增
31
+ listenerFieldForm: {}
32
+ // 监听器 注入字段 详情表单
33
+ };
34
+ },
35
+ watch: {
36
+ id: {
37
+ immediate: !0,
38
+ async handler(r) {
39
+ r && (await this.$nextTick(), this.resetListenersList());
40
+ }
41
+ }
42
+ },
43
+ methods: {
44
+ resetListenersList() {
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));
47
+ },
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();
54
+ },
55
+ // 移除监听器
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
+ }
61
+ },
62
+ // 保存监听器
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 = {};
68
+ },
69
+ // 打开监听器字段编辑弹窗
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();
73
+ },
74
+ // 保存监听器注入字段
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 = {});
77
+ },
78
+ // 移除监听器字段
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
+ }
84
+ }
85
+ }
86
+ };
87
+ var b = function() {
88
+ var e = this, t = e._self._c;
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 }) {
90
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(l) {
91
+ return e.openListenerForm(i, s);
92
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(l) {
93
+ return e.removeListener(i, s);
94
+ } } }, [e._v("移除")])];
95
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
96
+ return e.openListenerForm(null);
97
+ } } }, [e._v("添加监听器")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.listenerFormModelVisible, title: "任务监听器", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
98
+ e.listenerFormModelVisible = i;
99
+ } } }, [t("ElForm", { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(i) {
100
+ i.preventDefault();
101
+ } } }, [t("ElFormItem", { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.event, callback: function(i) {
102
+ e.$set(e.listenerForm, "event", i);
103
+ }, expression: "listenerForm.event" } }, e._l(Object.keys(e.listenerEventTypeObject), function(i) {
104
+ return t("ElOption", { key: i, attrs: { label: e.listenerEventTypeObject[i], value: i } });
105
+ }), 1)], 1), t("ElFormItem", { attrs: { label: "监听器ID", prop: "id", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.id, callback: function(i) {
106
+ e.$set(e.listenerForm, "id", i);
107
+ }, expression: "listenerForm.id" } })], 1), t("ElFormItem", { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.listenerType, callback: function(i) {
108
+ e.$set(e.listenerForm, "listenerType", i);
109
+ }, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(i) {
110
+ return t("ElOption", { key: i, attrs: { label: e.listenerTypeObject[i], value: i } });
111
+ }), 1)], 1), e.listenerForm.listenerType === "classListener" ? t("ElFormItem", { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(i) {
112
+ e.$set(e.listenerForm, "class", i);
113
+ }, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t("ElFormItem", { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(i) {
114
+ e.$set(e.listenerForm, "expression", i);
115
+ }, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(i) {
116
+ e.$set(e.listenerForm, "delegateExpression", i);
117
+ }, expression: "listenerForm.delegateExpression" } })], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(i) {
118
+ e.$set(e.listenerForm, "scriptFormat", i);
119
+ }, expression: "listenerForm.scriptFormat" } })], 1), t("ElFormItem", { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t("ElSelect", { model: { value: e.listenerForm.scriptType, callback: function(i) {
120
+ e.$set(e.listenerForm, "scriptType", i);
121
+ }, expression: "listenerForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(i) {
122
+ e.$set(e.listenerForm, "value", i);
123
+ }, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t("ElFormItem", { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(i) {
124
+ e.$set(e.listenerForm, "resource", i);
125
+ }, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e(), e.listenerForm.event === "timeout" ? [t("ElFormItem", { key: "eventDefinitionType", attrs: { label: "定时器类型", prop: "eventDefinitionType" } }, [t("ElSelect", { model: { value: e.listenerForm.eventDefinitionType, callback: function(i) {
126
+ e.$set(e.listenerForm, "eventDefinitionType", i);
127
+ }, expression: "listenerForm.eventDefinitionType" } }, [t("ElOption", { attrs: { label: "日期", value: "date" } }), t("ElOption", { attrs: { label: "持续时长", value: "duration" } }), t("ElOption", { attrs: { label: "循环", value: "cycle" } }), t("ElOption", { attrs: { label: "无", value: "null" } })], 1)], 1), e.listenerForm.eventDefinitionType && e.listenerForm.eventDefinitionType !== "null" ? t("ElFormItem", { key: "eventTimeDefinitions", attrs: { label: "定时器", prop: "eventTimeDefinitions", rules: { required: !0, trigger: ["blur", "change"], message: "请填写定时器配置" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.eventTimeDefinitions, callback: function(i) {
128
+ e.$set(e.listenerForm, "eventTimeDefinitions", i);
129
+ }, expression: "listenerForm.eventTimeDefinitions" } })], 1) : e._e()] : e._e()], 2), t("ElDivider"), t("p", { staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
130
+ return e.openListenerFieldForm(null);
131
+ } } }, [e._v("添加字段")])], 1), t("ElTable", { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t("ElTableColumn", { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.fieldTypeObject[i.fieldType] } }), t("ElTableColumn", { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (i) => i.string || i.expression } }), t("ElTableColumn", { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
132
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(l) {
133
+ return e.openListenerFieldForm(i, s);
134
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(l) {
135
+ return e.removeListenerField(i, s);
136
+ } } }, [e._v(" 移除 ")])];
137
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
138
+ e.listenerFormModelVisible = !1;
139
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
140
+ e.listenerFieldFormModelVisible = i;
141
+ } }, scopedSlots: e._u([{ key: "footer", fn: function() {
142
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
143
+ e.listenerFieldFormModelVisible = !1;
144
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
145
+ }, proxy: !0 }]) }, [t("ElForm", { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(i) {
146
+ i.preventDefault();
147
+ } } }, [t("ElFormItem", { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.name, callback: function(i) {
148
+ e.$set(e.listenerFieldForm, "name", i);
149
+ }, expression: "listenerFieldForm.name" } })], 1), t("ElFormItem", { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerFieldForm.fieldType, callback: function(i) {
150
+ e.$set(e.listenerFieldForm, "fieldType", i);
151
+ }, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(i) {
152
+ return t("ElOption", { key: i, attrs: { label: e.fieldTypeObject[i], value: i } });
153
+ }), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t("ElFormItem", { key: "field-string", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(i) {
154
+ e.$set(e.listenerFieldForm, "string", i);
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) {
156
+ e.$set(e.listenerFieldForm, "expression", i);
157
+ }, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
158
+ }, h = [], v = /* @__PURE__ */ F(
159
+ f,
160
+ b,
161
+ h,
162
+ !1,
163
+ null,
164
+ null
165
+ );
166
+ const L = v.exports;
167
+ export {
168
+ L as default
169
+ };
@@ -1,7 +1,7 @@
1
1
  import w from "element-ui/lib/loading";
2
2
  import B from "element-ui/lib/message-box";
3
3
  import { isFunction as a } from "@web-utils/core";
4
- import { g as d } from "./index.Cn7aq-Et.mjs";
4
+ import { g as d } from "./index.B2TRddqf.mjs";
5
5
  async function k(t, e, n) {
6
6
  const { stop: o, prevent: r, message: f, loadable: l, loadingText: y, confirmable: x, confirmType: b, confirmText: T, confirmTitle: S } = e;
7
7
  o && t.stopPropagation(), r && t.preventDefault();
@@ -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
+ b as a,
51
+ j as b,
52
+ u as f,
53
+ a as t
54
+ };
@@ -1,5 +1,5 @@
1
1
  import { isBlank as l } from "@web-utils/core";
2
- import { S as E, K as A, D as I, M as f, A as h, R as T, m as p, b as m, n as L, p as S, f as B, I as _ } from "./util.DI42t5GU.mjs";
2
+ import { S as E, K as A, b as I, M as f, A as h, R as T, c as p, e as m, f as L, g as S, h as B, I as _ } from "./util.DqFv_pWg.mjs";
3
3
  const P = {
4
4
  common: {
5
5
  condition: "条件",
@@ -143,12 +143,12 @@ const v = (e, n = 12, t = !1) => {
143
143
  return l(n) ? E.includes(e.type) ? `${u("tip.select")} ${t}` : `${u("tip.input")} ${t}` : n;
144
144
  };
145
145
  export {
146
- N as a,
147
- R as b,
148
- v as c,
149
- $ as d,
146
+ O as a,
147
+ N as b,
148
+ R as c,
149
+ v as d,
150
150
  M as f,
151
- O as g,
151
+ $ as g,
152
152
  C as i,
153
153
  u as t
154
154
  };
@@ -1,5 +1,5 @@
1
1
  import { isBlank as P } from "@web-utils/core";
2
- import { q as w, r as E } from "./util.DI42t5GU.mjs";
2
+ import { m as w, n as E } from "./util.DqFv_pWg.mjs";
3
3
  const F = (d, r = []) => new Promise((i) => {
4
4
  const c = [], s = [], a = {};
5
5
  d.forEach((t) => {
@@ -44,7 +44,7 @@ const F = (d, r = []) => new Promise((i) => {
44
44
  c(a);
45
45
  });
46
46
  });
47
- }, q = (d) => {
47
+ }, K = (d) => {
48
48
  const r = {}, i = d.dicData || {};
49
49
  return d.column.forEach((c) => {
50
50
  c.dicData && (r[c.prop] = w(c.dicData, c.props, c.dataType));
@@ -100,20 +100,20 @@ const D = (d) => {
100
100
  n && (r = n.dicUrl, c = n.dicMethod, e = n.headers || {}, i = n.dicQuery || {}, t = n.dicFormatter, a = n.props);
101
101
  const g = "key";
102
102
  r = r || "";
103
- let y;
104
- const m = {};
105
- return y = r.match(/[^{}]+(?=})/g) || [], y.forEach((p) => {
103
+ let m;
104
+ const y = {};
105
+ return m = r.match(/[^{}]+(?=})/g) || [], m.forEach((p) => {
106
106
  const f = `{{${p}}}`, h = u[p];
107
107
  p === g ? r = r.replace(f, o) : r = r.replace(f, h);
108
- }), c === "post" && (y = Object.keys(i), y.forEach((p) => {
108
+ }), c === "post" && (m = Object.keys(i), m.forEach((p) => {
109
109
  const f = i[p];
110
- typeof f == "string" && f.match(/\{{|}}/g) ? m[p] = u[f.replace(/\{{|}}/g, "")] : m[p] = f;
110
+ typeof f == "string" && f.match(/\{{|}}/g) ? y[p] = u[f.replace(/\{{|}}/g, "")] : y[p] = f;
111
111
  })), a && (s = (a || {}).res || s), new Promise((p) => {
112
112
  const f = (h) => {
113
113
  let l = [];
114
114
  typeof t == "function" ? l = t(h.data) : l = E(h.data, s), p(l);
115
115
  };
116
- c === "post" ? window.axios.post(r, m, { headers: e }).then((h) => {
116
+ c === "post" ? window.axios.post(r, y, { headers: e }).then((h) => {
117
117
  f(h);
118
118
  }).catch(() => [p([])]) : window.axios.get(r, { params: i, headers: e }).then((h) => {
119
119
  f(h);
@@ -122,7 +122,7 @@ const D = (d) => {
122
122
  };
123
123
  export {
124
124
  U as a,
125
- q as b,
125
+ K as b,
126
126
  F as l,
127
127
  D as s
128
128
  };