@web-utils/component 3.7.0 → 3.7.1

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.
@@ -1,6 +1,6 @@
1
- import { fastClone as l } from "@web-utils/core";
2
- import { a, g as r } from "./utils.DRcxC1Fb.mjs";
3
- import { n as o } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
1
+ import { fastClone as o } from "@web-utils/core";
2
+ import { a as l, g as r } from "./utils.DRcxC1Fb.mjs";
3
+ import { n as m } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
4
  const c = {
5
5
  name: "ElementBaseInfo",
6
6
  inject: {
@@ -19,6 +19,7 @@ const c = {
19
19
  data() {
20
20
  return {
21
21
  skipExpression: "",
22
+ requiredComment: null,
22
23
  businessObject: {},
23
24
  attrs: {
24
25
  commentInForm: null,
@@ -34,15 +35,17 @@ const c = {
34
35
  },
35
36
  methods: {
36
37
  init(n) {
37
- const e = this.bpmnInstances.elementRegistry.filter((t) => t.type === "bpmn:UserTask");
38
- this.nodes = e.map(({ businessObject: { id: t, name: i } }) => ({ label: i, value: t }));
38
+ const e = this.bpmnInstances.elementRegistry.filter((i) => i.type === "bpmn:UserTask");
39
+ this.nodes = e.map(({ businessObject: { id: i, name: a } }) => ({ label: a, value: i }));
39
40
  const { businessObject: s } = this.element;
40
- if (n ? (this.businessObject = l(s), this.businessObject.$type === "bpmn:SubProcess" && this.$set(this.businessObject, "isExpanded", this.element.di.isExpanded)) : this.businessObject = {}, this.businessObject.$type === "bpmn:UserTask")
41
- for (const t in this.attrs) {
42
- let i = r(s, `${this.prefix}:${t}`);
43
- t === "commentNodeIds" && (i = i ? i.split(",") : []), this.attrs[t] = i;
41
+ if (n ? (this.businessObject = o(s), this.businessObject.$type === "bpmn:SubProcess" && this.$set(this.businessObject, "isExpanded", this.element.di.isExpanded)) : this.businessObject = {}, this.businessObject.$type === "bpmn:UserTask")
42
+ for (const i in this.attrs) {
43
+ let a = r(s, `${this.prefix}:${i}`);
44
+ i === "commentNodeIds" && (a = a ? a.split(",") : []), this.attrs[i] = a;
44
45
  }
45
46
  this.skipExpression = r(s, `${this.prefix}:skipExpression`);
47
+ let t = r(s, `${this.prefix}:requiredComment`);
48
+ t || (t = "Y"), this.requiredComment = t;
46
49
  },
47
50
  updateBaseInfo(n) {
48
51
  const { modeling: e } = this.bpmnInstances;
@@ -60,14 +63,16 @@ const c = {
60
63
  e.updateProperties(this.element, { [n]: this.businessObject[n] });
61
64
  },
62
65
  updateProp(n, e) {
63
- if (n === "commentInForm" && !e)
64
- for (const s in this.attrs)
65
- s !== "commentInForm" && (this.attrs[s] = null, a(this.bpmnInstances, this.element, `${this.prefix}:${s}`, this.attrs[s]));
66
- n === "commentNodeIds" ? e = e != null && e.length ? e.join(",") : null : e = e || null, a(this.bpmnInstances, this.element, `${this.prefix}:${n}`, e);
66
+ if (n === "commentInForm") {
67
+ if (!e)
68
+ for (const s in this.attrs)
69
+ s !== "commentInForm" && (this.attrs[s] = null, l(this.bpmnInstances, this.element, `${this.prefix}:${s}`, this.attrs[s]));
70
+ } else n === "commentNodeIds" ? e = e != null && e.length ? e.join(",") : null : e = e || null;
71
+ l(this.bpmnInstances, this.element, `${this.prefix}:${n}`, e);
67
72
  }
68
73
  }
69
74
  };
70
- var m = function() {
75
+ var u = function() {
71
76
  var e = this, s = e._self._c;
72
77
  return s("div", { staticClass: "panel-tab__content" }, [s("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(t) {
73
78
  t.preventDefault();
@@ -81,7 +86,9 @@ var m = function() {
81
86
  e.$set(e.businessObject, "name", t);
82
87
  }, expression: "businessObject.name" } })], 1), e.businessObject.$type === "bpmn:UserTask" ? [s("ElFormItem", { attrs: { label: "跳过表达式" } }, [s("ElInput", { attrs: { clearable: "" }, on: { input: (t) => e.updateProp("skipExpression", t) }, model: { value: e.skipExpression, callback: function(t) {
83
88
  e.skipExpression = t;
84
- }, expression: "skipExpression" } })], 1), s("ElFormItem", { attrs: { label: "意见在表单" } }, [s("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: (t) => e.updateProp("commentInForm", t) }, model: { value: e.attrs.commentInForm, callback: function(t) {
89
+ }, expression: "skipExpression" } })], 1), s("ElFormItem", { attrs: { label: "意见必填" } }, [s("ElSwitch", { attrs: { "active-text": "是", "active-value": "Y", "inactive-text": "否", "inactive-value": "N" }, on: { input: (t) => e.updateProp("requiredComment", t) }, model: { value: e.requiredComment, callback: function(t) {
90
+ e.requiredComment = t;
91
+ }, expression: "requiredComment" } })], 1), s("ElFormItem", { attrs: { label: "意见在表单" } }, [s("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: (t) => e.updateProp("commentInForm", t) }, model: { value: e.attrs.commentInForm, callback: function(t) {
85
92
  e.$set(e.attrs, "commentInForm", t);
86
93
  }, expression: "attrs.commentInForm" } })], 1), e.attrs.commentInForm ? [s("ElFormItem", { attrs: { label: "意见名称" } }, [s("ElInput", { attrs: { clearable: "" }, on: { input: (t) => e.updateProp("commentLabel", t) }, model: { value: e.attrs.commentLabel, callback: function(t) {
87
94
  e.$set(e.attrs, "commentLabel", t);
@@ -104,15 +111,15 @@ var m = function() {
104
111
  } }, model: { value: e.businessObject.isExpanded, callback: function(t) {
105
112
  e.$set(e.businessObject, "isExpanded", t);
106
113
  }, expression: "businessObject.isExpanded" } })], 1) : e._e()], 2)], 1);
107
- }, b = [], u = /* @__PURE__ */ o(
114
+ }, b = [], p = /* @__PURE__ */ m(
108
115
  c,
109
- m,
116
+ u,
110
117
  b,
111
118
  !1,
112
119
  null,
113
120
  null
114
121
  );
115
- const E = u.exports;
122
+ const E = p.exports;
116
123
  export {
117
124
  E as default
118
125
  };
@@ -493,7 +493,7 @@ const je = {
493
493
  ElementMultiInstance: () => import("../chunks/ElementMultiInstance.3Z28ewuh.mjs"),
494
494
  ElementTask: () => import("../chunks/ElementTaskConfig.MBbkLrth.mjs"),
495
495
  ElementOtherConfig: () => import("../chunks/ElementOtherConfig.B1NfMTYh.mjs"),
496
- ElementBaseInfo: () => import("../chunks/ElementBaseInfo.jv89Vjy1.mjs")
496
+ ElementBaseInfo: () => import("../chunks/ElementBaseInfo.ZADwixb5.mjs")
497
497
  },
498
498
  provide() {
499
499
  return {
@@ -970,6 +970,11 @@ const Ye = {
970
970
  name: "commentLabel",
971
971
  isAttr: !0,
972
972
  type: "String"
973
+ },
974
+ {
975
+ name: "requiredComment",
976
+ isAttr: !0,
977
+ type: "String"
973
978
  }
974
979
  ], ae = {
975
980
  name: "Camunda",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "3.7.0",
4
+ "version": "3.7.1",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@web-utils/component",
5
- "version": "3.7.0",
5
+ "version": "3.7.1",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",