@web-utils/component 3.8.4 → 3.8.6

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,5 +1,5 @@
1
1
  import { fastClone as o } from "@web-utils/core";
2
- import { a as l, g as r } from "./utils.DRcxC1Fb.mjs";
2
+ import { a as l, g as r } from "./utils.DSeiE1pN.mjs";
3
3
  import { n as m } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
4
  const c = {
5
5
  name: "ElementBaseInfo",
@@ -25,7 +25,7 @@ var c = (s, e, t) => new Promise((r, l) => {
25
25
  }, a = (n) => n.done ? r(n.value) : Promise.resolve(n.value).then(o, i);
26
26
  a((t = t.apply(s, e)).next());
27
27
  });
28
- import { c as v, u as f } from "./utils.DRcxC1Fb.mjs";
28
+ import { c as v, u as f } from "./utils.DSeiE1pN.mjs";
29
29
  import { i as y, a as g, f as E, l as x } from "./utilSelf.CRqpl0Cz.mjs";
30
30
  import { fastClone as L, capitalize as _ } from "@web-utils/core";
31
31
  import { n as T } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -1,3 +1,5 @@
1
+ import { b as i, d as u } from "./utils.DSeiE1pN.mjs";
2
+ import "bpmn-js/lib/util/ModelUtil";
1
3
  import { n as g } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
2
4
  const b = {
3
5
  name: "ServiceTaskConfig",
@@ -26,16 +28,15 @@ const b = {
26
28
  id: {
27
29
  immediate: !0,
28
30
  handler() {
29
- var n, e, t, s, i, l, a, r, c, o, f, m, p, d;
31
+ var n, e, t, s, l, a, c, r, o, m, f, p;
30
32
  if (!((e = (n = this.element) == null ? void 0 : n.businessObject) != null && e.delegateExpression) && !((s = (t = this.element) == null ? void 0 : t.businessObject) != null && s.class) && (this.config.async = !0, this.config.exclusive = !0, this.bpmnInstances.modeling.updateProperties(this.element, {
31
33
  async: !0,
32
34
  exclusive: !0,
33
35
  class: void 0,
34
- delegateExpression: void 0,
35
- failedJobRetryTimeCycle: "R3/PT60S"
36
- })), this.config.async = (l = (i = this.element) == null ? void 0 : i.businessObject) == null ? void 0 : l.async, this.config.exclusive = (r = (a = this.element) == null ? void 0 : a.businessObject) == null ? void 0 : r.exclusive, this.config.class = (o = (c = this.element) == null ? void 0 : c.businessObject) == null ? void 0 : o.class, this.config.delegateExpression = (m = (f = this.element) == null ? void 0 : f.businessObject) == null ? void 0 : m.delegateExpression, this.config.failedJobRetryTimeCycle = (d = (p = this.element) == null ? void 0 : p.businessObject) == null ? void 0 : d.failedJobRetryTimeCycle, this.config.failedJobRetryTimeCycle) {
37
- const u = this.config.failedJobRetryTimeCycle.split("/");
38
- this.form.retry = Number(u[0].replace("R", "")) || 3, this.form.interval = u[1].replace("PT", "") || "60S";
36
+ delegateExpression: void 0
37
+ }), i(this.bpmnInstances, this.element, "FailedJobRetryTimeCycle", { body: "R3/PT60S" })), this.config.async = (a = (l = this.element) == null ? void 0 : l.businessObject) == null ? void 0 : a.async, this.config.exclusive = (r = (c = this.element) == null ? void 0 : c.businessObject) == null ? void 0 : r.exclusive, this.config.class = (m = (o = this.element) == null ? void 0 : o.businessObject) == null ? void 0 : m.class, this.config.delegateExpression = (p = (f = this.element) == null ? void 0 : f.businessObject) == null ? void 0 : p.delegateExpression, this.config.failedJobRetryTimeCycle = u(this.element, "FailedJobRetryTimeCycle"), this.config.failedJobRetryTimeCycle) {
38
+ const d = this.config.failedJobRetryTimeCycle.split("/");
39
+ this.form.retry = Number(d[0].replace("R", "")) || 3, this.form.interval = d[1].replace("PT", "") || "60S";
39
40
  }
40
41
  this.form.delegateType = this.config.delegateExpression ? "delegateExpression" : this.config.class ? "class" : "";
41
42
  }
@@ -44,16 +45,12 @@ const b = {
44
45
  methods: {
45
46
  retryInput(n) {
46
47
  const e = n != null ? n : 3, t = this.form.interval || "60S";
47
- this.bpmnInstances.modeling.updateProperties(this.element, {
48
- failedJobRetryTimeCycle: `R${e}/PT${t}`
49
- });
48
+ i(this.bpmnInstances, this.element, "FailedJobRetryTimeCycle", { body: `R${e}/PT${t}` });
50
49
  },
51
50
  intervalInput(n) {
52
51
  var s;
53
52
  const e = (s = this.form.retry) != null ? s : 3, t = n || "60S";
54
- this.bpmnInstances.modeling.updateProperties(this.element, {
55
- failedJobRetryTimeCycle: `R${e}/PT${t}`
56
- });
53
+ i(this.bpmnInstances, this.element, "FailedJobRetryTimeCycle", { body: `R${e}/PT${t}` });
57
54
  },
58
55
  clear() {
59
56
  this.config.class = void 0, this.config.delegateExpression = void 0, this.bpmnInstances.modeling.updateProperties(this.element, {
@@ -106,7 +103,7 @@ var h = function() {
106
103
  null,
107
104
  null
108
105
  );
109
- const E = x.exports;
106
+ const T = x.exports;
110
107
  export {
111
- E as default
108
+ T as default
112
109
  };
@@ -26,7 +26,7 @@ var n = (r, e, t) => new Promise((i, s) => {
26
26
  }, m = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(l, a);
27
27
  m((t = t.apply(r, e)).next());
28
28
  });
29
- import { c as x, u as f } from "./utils.DRcxC1Fb.mjs";
29
+ import { c as x, u as f } from "./utils.DSeiE1pN.mjs";
30
30
  import { i as g, a as L, f as T, l as k, e as _ } from "./utilSelf.CRqpl0Cz.mjs";
31
31
  import { fastClone as I } from "@web-utils/core";
32
32
  import { n as w } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -0,0 +1,78 @@
1
+ import { getBusinessObject as a, is as d } from "bpmn-js/lib/util/ModelUtil";
2
+ function b(t, e, n, r) {
3
+ const i = /* @__PURE__ */ Object.create(null);
4
+ switch (i.event = e.event, n && (i.id = e.id), e.listenerType) {
5
+ case "scriptListener":
6
+ i.script = p(t, e, r);
7
+ break;
8
+ case "expressionListener":
9
+ i.expression = e.expression;
10
+ break;
11
+ case "delegateExpressionListener":
12
+ i.delegateExpression = e.delegateExpression;
13
+ break;
14
+ default:
15
+ i.class = e.class;
16
+ }
17
+ if (e.fields && (i.fields = e.fields.map((s) => m(t, s, r))), n && e.event === "timeout" && e.eventDefinitionType) {
18
+ const s = t.moddle.create("bpmn:FormalExpression", {
19
+ body: e.eventTimeDefinitions
20
+ }), c = t.moddle.create("bpmn:TimerEventDefinition", {
21
+ id: `TimerEventDefinition_${E(8)}`,
22
+ [`time${e.eventDefinitionType.replace(/^\S/, (o) => o.toUpperCase())}`]: s
23
+ });
24
+ i.eventDefinitions = [c];
25
+ }
26
+ return t.moddle.create(`${r}:${n ? "TaskListener" : "ExecutionListener"}`, i);
27
+ }
28
+ function m(t, e, n) {
29
+ const { name: r, fieldType: i, string: s, expression: c } = e, o = i === "string" ? { name: r, string: s } : { name: r, expression: c };
30
+ return t.moddle.create(`${n}:Field`, o);
31
+ }
32
+ function p(t, e, n) {
33
+ const { scriptType: r, scriptFormat: i, value: s, resource: c } = e, o = r === "inlineScript" ? { scriptFormat: i, value: s } : { scriptFormat: i, resource: c };
34
+ return t.moddle.create(`${n}:Script`, o);
35
+ }
36
+ function v(t, e, n) {
37
+ const r = t.moddle.create("bpmn:ExtensionElements", {
38
+ values: n
39
+ });
40
+ t.modeling.updateProperties(e, {
41
+ extensionElements: r
42
+ });
43
+ }
44
+ function E(t = 8, e) {
45
+ let n = "";
46
+ const r = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
47
+ for (let i = t; i > 0; --i)
48
+ n += r[Math.floor(Math.random() * r.length)];
49
+ return n;
50
+ }
51
+ const y = (t, e = "body") => t ? t.get(e) : null, T = (t, e, n = "body", r) => {
52
+ g(t, e, { [n]: r });
53
+ }, g = ({ modeling: t }, e, n) => {
54
+ t.updateProperties(e, n);
55
+ }, $ = ({ moddle: t, modeling: e }, n, r, i, s = "flowable") => {
56
+ const c = a(n), o = `${s}:${r}`, l = c.get("extensionElements") || t.create("bpmn:ExtensionElements");
57
+ l.set(
58
+ "values",
59
+ l.get("values").filter((f) => !d(f, o))
60
+ );
61
+ const u = t.create(o, i);
62
+ l.get("values").push(u), e.updateProperties(n, { extensionElements: l });
63
+ }, D = (t, e, n = "body", r = "flowable") => {
64
+ const i = a(t), s = `${r}:${e}`, c = i.get("extensionElements");
65
+ if (!c)
66
+ return;
67
+ const o = c.get("values").filter((l) => d(l, s))[0];
68
+ if (o)
69
+ return o.get(n);
70
+ };
71
+ export {
72
+ T as a,
73
+ $ as b,
74
+ b as c,
75
+ D as d,
76
+ y as g,
77
+ v as u
78
+ };
@@ -485,17 +485,17 @@ const je = {
485
485
  name: "PropertiesPanel",
486
486
  componentName: "MyPropertiesPanel",
487
487
  components: {
488
- UserTaskListeners: () => import("../chunks/UserTaskListeners.XXe5dC5I.mjs"),
488
+ UserTaskListeners: () => import("../chunks/UserTaskListeners.CbNK8q9L.mjs"),
489
489
  ElementForm: () => import("../chunks/ElementForm.8w6UkiuU.mjs"),
490
490
  ElementProperties: () => import("../chunks/ElementProperties.B2I48muA.mjs"),
491
- ElementListeners: () => import("../chunks/ElementListeners.DOy8wyD2.mjs"),
491
+ ElementListeners: () => import("../chunks/ElementListeners.BSfzIHeg.mjs"),
492
492
  SignalAndMassage: () => import("../chunks/SignalAndMessage.CH6L7cYu.mjs"),
493
493
  FlowCondition: () => import("../chunks/FlowCondition.BfU9kw6h.mjs"),
494
494
  ElementMultiInstance: () => import("../chunks/ElementMultiInstance.3Z28ewuh.mjs"),
495
495
  ElementTaskConfig: () => import("../chunks/ElementTaskConfig.MBbkLrth.mjs"),
496
496
  ElementOtherConfig: () => import("../chunks/ElementOtherConfig.B1NfMTYh.mjs"),
497
- ElementBaseInfo: () => import("../chunks/ElementBaseInfo.ZADwixb5.mjs"),
498
- ServiceTaskConfig: () => import("../chunks/ServiceTaskConfig.BYzwAxGU.mjs")
497
+ ElementBaseInfo: () => import("../chunks/ElementBaseInfo.C6zUSEl6.mjs"),
498
+ ServiceTaskConfig: () => import("../chunks/ServiceTaskConfig.Ds9Cn_h-.mjs")
499
499
  },
500
500
  provide() {
501
501
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "3.8.4",
4
+ "version": "3.8.6",
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.8.4",
5
+ "version": "3.8.6",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",
@@ -1,60 +0,0 @@
1
- function f(t, e, r, n) {
2
- const i = /* @__PURE__ */ Object.create(null);
3
- switch (i.event = e.event, r && (i.id = e.id), e.listenerType) {
4
- case "scriptListener":
5
- i.script = l(t, e, n);
6
- break;
7
- case "expressionListener":
8
- i.expression = e.expression;
9
- break;
10
- case "delegateExpressionListener":
11
- i.delegateExpression = e.delegateExpression;
12
- break;
13
- default:
14
- i.class = e.class;
15
- }
16
- if (e.fields && (i.fields = e.fields.map((s) => a(t, s, n))), r && e.event === "timeout" && e.eventDefinitionType) {
17
- const s = t.moddle.create("bpmn:FormalExpression", {
18
- body: e.eventTimeDefinitions
19
- }), c = t.moddle.create("bpmn:TimerEventDefinition", {
20
- id: `TimerEventDefinition_${d(8)}`,
21
- [`time${e.eventDefinitionType.replace(/^\S/, (o) => o.toUpperCase())}`]: s
22
- });
23
- i.eventDefinitions = [c];
24
- }
25
- return t.moddle.create(`${n}:${r ? "TaskListener" : "ExecutionListener"}`, i);
26
- }
27
- function a(t, e, r) {
28
- const { name: n, fieldType: i, string: s, expression: c } = e, o = i === "string" ? { name: n, string: s } : { name: n, expression: c };
29
- return t.moddle.create(`${r}:Field`, o);
30
- }
31
- function l(t, e, r) {
32
- const { scriptType: n, scriptFormat: i, value: s, resource: c } = e, o = n === "inlineScript" ? { scriptFormat: i, value: s } : { scriptFormat: i, resource: c };
33
- return t.moddle.create(`${r}:Script`, o);
34
- }
35
- function m(t, e, r) {
36
- const n = t.moddle.create("bpmn:ExtensionElements", {
37
- values: r
38
- });
39
- t.modeling.updateProperties(e, {
40
- extensionElements: n
41
- });
42
- }
43
- function d(t = 8, e) {
44
- let r = "";
45
- const n = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
46
- for (let i = t; i > 0; --i)
47
- r += n[Math.floor(Math.random() * n.length)];
48
- return r;
49
- }
50
- const p = (t, e = "body") => t ? t.get(e) : null, E = (t, e, r = "body", n) => {
51
- u(t, e, { [r]: n });
52
- }, u = ({ modeling: t }, e, r) => {
53
- t.updateProperties(e, r);
54
- };
55
- export {
56
- E as a,
57
- f as c,
58
- p as g,
59
- m as u
60
- };