@web-utils/component 4.0.14 → 4.0.15

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 (168) hide show
  1. package/address-input/index.mjs +15 -13
  2. package/card/index.mjs +20 -18
  3. package/carousel/index.mjs +12 -10
  4. package/chat/index.mjs +56 -45
  5. package/chunk-file-uploader/index.mjs +378 -36
  6. package/chunk-file-uploader/style.css +1 -1
  7. package/chunks/{ElementTaskConfig.Bko0kgTp.mjs → ElementTaskConfig.AvBOzAni.mjs} +63 -55
  8. package/chunks/FormItem.Bhsy_O2B.mjs +372 -0
  9. package/chunks/FyForm.DriwCJ7b.mjs +765 -0
  10. package/chunks/SignalAndMessage.BpjOoKhK.mjs +92 -0
  11. package/chunks/SubTablePlus.BH0IIv3X.mjs +270 -0
  12. package/chunks/TableColumn.BzivvXMF.mjs +337 -0
  13. package/chunks/{confirmable-mixin.B2TtLAdk.mjs → confirmable-mixin.BFZb6pcK.mjs} +1 -1
  14. package/chunks/{dataformat.CpqOeGBl.mjs → dataformat.DJoNBlmI.mjs} +6 -6
  15. package/chunks/{dic.Dkl-leRW.mjs → dic.BinnDitI.mjs} +9 -9
  16. package/chunks/{event.9aDS6jcw.mjs → event.DSlcqYHL.mjs} +2 -2
  17. package/chunks/{form-input.CvFdwlEV.mjs → form-input.BtS_J5a2.mjs} +2 -2
  18. package/chunks/{index.9OxHjTIE.mjs → index.CIfe3UB3.mjs} +2 -2
  19. package/chunks/{index.B2TRddqf.mjs → index.Cn7aq-Et.mjs} +8 -8
  20. package/chunks/{init.DAsXSoLW.mjs → init.xOlFpTyZ.mjs} +2 -2
  21. package/chunks/{util.DqFv_pWg.mjs → util.DI42t5GU.mjs} +22 -22
  22. package/color-picker/index.mjs +101 -22
  23. package/confirm-button/index.mjs +1 -1
  24. package/confirmable/index.mjs +1 -1
  25. package/data-box/index.mjs +15 -12
  26. package/data-card/index.mjs +12 -10
  27. package/data-card-text/index.mjs +12 -10
  28. package/data-display/index.mjs +17 -15
  29. package/data-icons/index.mjs +16 -13
  30. package/data-imgtext/index.mjs +18 -15
  31. package/data-operatext/index.mjs +16 -14
  32. package/data-panel/index.mjs +16 -13
  33. package/data-pay/index.mjs +20 -16
  34. package/data-price/index.mjs +16 -14
  35. package/data-progress/index.mjs +17 -13
  36. package/data-rotate/index.mjs +15 -12
  37. package/data-table-picker/index.mjs +18 -15
  38. package/data-tabs/index.mjs +15 -12
  39. package/dialog-form/index.mjs +18 -16
  40. package/dynamic-table/index.mjs +30 -25
  41. package/editable-progress/index.mjs +11 -9
  42. package/editable-tree/index.mjs +56 -52
  43. package/egd-collapse-item/index.mjs +9 -9
  44. package/element-dialog/index.mjs +23 -22
  45. package/flex-column/index.mjs +1 -1
  46. package/flex-item/index.mjs +1 -1
  47. package/flex-row/index.mjs +1 -1
  48. package/flow/index.mjs +11 -10
  49. package/flow-designer/index.mjs +1973 -699
  50. package/flow-designer/style.css +1 -1
  51. package/flow-node/index.mjs +1 -1
  52. package/flow-viewer/index.mjs +9 -9
  53. package/form-block/index.mjs +34 -32
  54. package/form-cascader/index.mjs +24 -23
  55. package/form-checkbox/index.mjs +17 -16
  56. package/form-checkbox-group/index.mjs +23 -20
  57. package/form-date-picker/index.mjs +20 -18
  58. package/form-holder/index.mjs +14 -13
  59. package/form-input/index.mjs +15 -14
  60. package/form-input-cron-expression/index.mjs +22 -19
  61. package/form-input-email/index.mjs +16 -15
  62. package/form-input-id-card/index.mjs +13 -12
  63. package/form-input-number/index.mjs +17 -16
  64. package/form-input-phone-number/index.mjs +22 -21
  65. package/form-input-tag/index.mjs +15 -14
  66. package/form-input-time/index.mjs +15 -14
  67. package/form-item/index.mjs +3 -140
  68. package/form-item-group/index.mjs +31 -28
  69. package/form-radio-group/index.mjs +28 -27
  70. package/form-select/index.mjs +23 -21
  71. package/form-switch/index.mjs +17 -16
  72. package/form-table/index.mjs +17 -16
  73. package/form-table-plus/index.mjs +22 -21
  74. package/form-textarea/index.mjs +16 -15
  75. package/form-tree-select/index.mjs +15 -14
  76. package/form-tree-select-multiple/index.mjs +15 -14
  77. package/form-view/index.mjs +39 -35
  78. package/fy-array/index.mjs +37 -33
  79. package/fy-cascader/index.mjs +17 -16
  80. package/fy-checkbox/index.mjs +13 -11
  81. package/fy-code/index.mjs +10 -10
  82. package/fy-curd/index.mjs +1147 -1123
  83. package/fy-date/index.mjs +11 -10
  84. package/fy-draggable/index.mjs +10 -9
  85. package/fy-dynamic/index.mjs +25 -22
  86. package/fy-empty/index.mjs +1 -1
  87. package/fy-form/index.mjs +15 -638
  88. package/fy-form-design/index.mjs +1165 -1127
  89. package/fy-input/index.mjs +14 -12
  90. package/fy-input-color/index.mjs +15 -13
  91. package/fy-input-icon/index.mjs +23 -20
  92. package/fy-input-map/index.mjs +31 -28
  93. package/fy-input-number/index.mjs +10 -9
  94. package/fy-input-table/index.mjs +22 -18
  95. package/fy-input-tree/index.mjs +37 -33
  96. package/fy-progress/index.mjs +10 -9
  97. package/fy-radio/index.mjs +16 -15
  98. package/fy-rate/index.mjs +11 -10
  99. package/fy-select/index.mjs +29 -25
  100. package/fy-slider/index.mjs +12 -11
  101. package/fy-switch/index.mjs +10 -9
  102. package/fy-tabs/index.mjs +17 -15
  103. package/fy-time/index.mjs +1 -1
  104. package/fy-title/index.mjs +1 -1
  105. package/fy-tree/index.mjs +24 -18
  106. package/fy-u-editor/index.mjs +1 -1
  107. package/fy-upload/index.mjs +76 -74
  108. package/guide-steps/index.mjs +13 -11
  109. package/iframe-window/index.mjs +10 -9
  110. package/image-cropper/index.mjs +30 -28
  111. package/image-preview/index.mjs +14 -12
  112. package/index.mjs +72 -72
  113. package/input-number/index.mjs +14 -13
  114. package/input-number-range/index.mjs +12 -11
  115. package/license/index.mjs +1 -1
  116. package/login/index.mjs +26 -21
  117. package/nav-bar/index.mjs +10 -9
  118. package/notice/index.mjs +10 -9
  119. package/package.json +1 -1
  120. package/page-index/index.mjs +13 -12
  121. package/page-index-top/index.mjs +28 -23
  122. package/page-skeleton/index.mjs +14 -14
  123. package/page-skeleton-new/index.mjs +9 -8
  124. package/pageable-table/index.mjs +182 -172
  125. package/pageable-view/index.mjs +16 -15
  126. package/picker-table-view/index.mjs +58 -49
  127. package/present-view/index.mjs +39 -35
  128. package/record-video/index.mjs +1 -1
  129. package/resize-observer/index.mjs +1 -1
  130. package/search/index.mjs +22 -20
  131. package/search-popover/index.mjs +1 -1
  132. package/sign/index.mjs +1 -1
  133. package/skeleton-panel/index.mjs +10 -9
  134. package/split-pane/index.mjs +37 -36
  135. package/static-pageable-table/index.mjs +13 -11
  136. package/sub-table/index.mjs +49 -36
  137. package/sub-table-plus/index.mjs +18 -229
  138. package/swiper/index.mjs +12 -11
  139. package/table-column/index.mjs +3 -223
  140. package/table-view/index.mjs +60 -52
  141. package/tabs-view/index.mjs +19 -17
  142. package/tag-render/index.mjs +18 -16
  143. package/text-ellipsis/index.mjs +10 -9
  144. package/toolbar/index.mjs +14 -13
  145. package/toolbar-button/index.mjs +14 -13
  146. package/verify/index.mjs +1 -1
  147. package/vue-cron/index.mjs +267 -259
  148. package/watermark/index.mjs +1 -1
  149. package/web-types.json +1 -1
  150. package/x-input-tag/index.mjs +24 -21
  151. package/chunks/ElementBaseInfo.ZADwixb5.mjs +0 -125
  152. package/chunks/ElementForm.CQ3PN5qj.mjs +0 -223
  153. package/chunks/ElementListeners.De_PRuIm.mjs +0 -215
  154. package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +0 -181
  155. package/chunks/ElementOtherConfig.B1NfMTYh.mjs +0 -60
  156. package/chunks/ElementProperties.CosfDrlW.mjs +0 -112
  157. package/chunks/FlowCondition.Y6qEYi1T.mjs +0 -102
  158. package/chunks/FormTemp.BQxO5IQq.mjs +0 -123
  159. package/chunks/SignalAndMessage.Bb5PFX0N.mjs +0 -85
  160. package/chunks/UserTaskListeners.Bv3BDfEI.mjs +0 -169
  161. package/chunks/core.0Exl13Mz.mjs +0 -54
  162. package/chunks/dictionary.DGt59Ir7.mjs +0 -68
  163. package/chunks/form-item.LWjePsPa.mjs +0 -233
  164. package/chunks/sub-table-plus-props.BVsD71hT.mjs +0 -30
  165. package/chunks/utilSelf.Csq1766E.mjs +0 -48
  166. package/chunks/utils.DRcxC1Fb.mjs +0 -60
  167. package/element-listeners/style.css +0 -1
  168. package/element-multi-instance/style.css +0 -1
@@ -1,102 +0,0 @@
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
- };
@@ -1,123 +0,0 @@
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
- };
@@ -1,85 +0,0 @@
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
- };
@@ -1,169 +0,0 @@
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,54 +0,0 @@
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,68 +0,0 @@
1
- import { a as g, b as l } from "./core.0Exl13Mz.mjs";
2
- import { getDictTreeByType as d, remote as w } from "../configComponents.mjs";
3
- const $ = {}, h = {}, m = {}, b = (t, i = !0, { options: r, treeDict: o, idAsValue: n, labelAsValue: c } = {}) => {
4
- let e = t;
5
- o && (e = `${t}-${n}-${c}${r ? "-options" : ""}`);
6
- const a = $[e];
7
- return i && a ? a : o ? K(t, i, { idAsValue: n, labelAsValue: c }) : C(t, i);
8
- }, C = (t, i = !0) => {
9
- if (m[t])
10
- return m[t];
11
- const r = new Promise((o, n) => {
12
- i && $[t] ? o($[t]) : w(t).then((c) => {
13
- let e = c.data.data;
14
- if (i) {
15
- const a = {};
16
- e.forEach(({ label: f, value: s }) => {
17
- a[s] = Object.freeze({ label: f, value: s });
18
- }), h[t] = a, e = Object.freeze(e), $[t] = e;
19
- }
20
- m[t] = null, o(e);
21
- }).catch((c) => {
22
- m[t] = null, n(c);
23
- });
24
- });
25
- return m[t] = r, r;
26
- }, K = (t, i = !0, { idAsValue: r, labelAsValue: o } = {}) => {
27
- const n = `${t}-${r}-${o}`;
28
- if (m[n])
29
- return m[n];
30
- const c = new Promise((e, a) => {
31
- i && $[n] ? e($[n]) : d(t, { idAsValue: r, labelAsValue: o }).then((f) => {
32
- const s = f.data.data;
33
- i && ($[n] = s, $[`${n}-options`] = g(s), h[n] = l(s)), m[n] = null, e(s);
34
- }).catch((f) => {
35
- m[n] = null, a(f);
36
- });
37
- });
38
- return m[n] = c, c;
39
- }, O = async (t, i, r = !0, { treeDict: o, idAsValue: n, labelAsValue: c } = {}) => {
40
- let e = t;
41
- o && (e = `${t}-${n}-${c}`);
42
- const a = h[e];
43
- let f;
44
- if (r && a)
45
- f = a[i];
46
- else {
47
- let s = await b(t, r, { treeDict: o, idAsValue: n, labelAsValue: c });
48
- if (r)
49
- f = h[e][i];
50
- else {
51
- o && (s = g(s));
52
- for (let u = 0; u < s.length; u++) {
53
- const D = s[u];
54
- if (D.value === i) {
55
- f = D;
56
- break;
57
- }
58
- }
59
- }
60
- }
61
- return f;
62
- }, z = async (t, i, r = !0, { treeDict: o, idAsValue: n, labelAsValue: c } = {}) => {
63
- var e;
64
- return ((e = await O(t, i, r, { treeDict: o, idAsValue: n, labelAsValue: c })) == null ? void 0 : e.label) || i || "";
65
- };
66
- export {
67
- z as g
68
- };