lyflowchart 1.0.101 → 1.0.103

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.
package/dist/index.js CHANGED
@@ -33139,6 +33139,11 @@ var Rk = c({
33139
33139
  type: Object,
33140
33140
  required: !1,
33141
33141
  default: {}
33142
+ },
33143
+ globalOptions: {
33144
+ type: Array,
33145
+ required: !1,
33146
+ default: []
33142
33147
  }
33143
33148
  },
33144
33149
  components: {
@@ -33188,7 +33193,7 @@ var Rk = c({
33188
33193
  label: e?.[t?.labelKey],
33189
33194
  value: e?.[t?.valueKey]
33190
33195
  }));
33191
- f.value[e.field_name] = i, ue.success("获取数据成功");
33196
+ p.value[e.field_name] = i, ue.success("获取数据成功");
33192
33197
  } else if (t.type == "remotetreeselectpro") {
33193
33198
  e.labelKey = t.labelKey, e.valueKey = t.valueKey;
33194
33199
  let n = _k(), r;
@@ -33200,7 +33205,7 @@ var Rk = c({
33200
33205
  label: e?.[t?.labelKey],
33201
33206
  value: e?.[t?.valueKey]
33202
33207
  }));
33203
- f.value[e.field_name] = i, ue.success("获取数据成功");
33208
+ p.value[e.field_name] = i, ue.success("获取数据成功");
33204
33209
  } else if (t.type == "remotecascaderpro") {
33205
33210
  e.value = [], e.labelKey = t.labelKey, e.valueKey = t.valueKey;
33206
33211
  let n = _k(), r;
@@ -33212,9 +33217,9 @@ var Rk = c({
33212
33217
  label: e?.[t?.labelKey],
33213
33218
  value: e?.[t?.valueKey]
33214
33219
  }));
33215
- f.value[e.field_name] = i, ue.success("获取数据成功");
33220
+ p.value[e.field_name] = i, ue.success("获取数据成功");
33216
33221
  } else t.type == "cascader" ? (e.value = [], e.labelKey = t.labelKey, e.valueKey = t.valueKey) : t.type == "checkbox" && (e.value = []);
33217
- }, u = v([]), d = v([]), f = v({}), p = () => {
33222
+ }, u = v([]), d = v([]), f = v([]), p = v({}), m = () => {
33218
33223
  a.value = { body: null }, r = n.element.source, i = n.element.businessObject.sourceRef;
33219
33224
  let e = i, t = n.element.id;
33220
33225
  if (e && e.default && e.default.id === t) a.value.type = "default";
@@ -33234,11 +33239,11 @@ var Rk = c({
33234
33239
  else u.value.length = 0;
33235
33240
  }
33236
33241
  }
33237
- }, m = (e) => {
33242
+ }, h = (e) => {
33238
33243
  if (e === "condition") {
33239
33244
  a.value.conditionType = "expression";
33240
33245
  let e = n.moddle.create("bpmn:FormalExpression");
33241
- n.modeling.updateProperties(n.element, { conditionExpression: e }), y(d.value, {}, "");
33246
+ n.modeling.updateProperties(n.element, { conditionExpression: e }), b(f.value, {}, "");
33242
33247
  return;
33243
33248
  }
33244
33249
  if (e === "default") {
@@ -33246,7 +33251,7 @@ var Rk = c({
33246
33251
  return;
33247
33252
  }
33248
33253
  a.value.conditionType = null, n.modeling.updateProperties(n.element, { conditionExpression: void 0 });
33249
- }, h = () => {
33254
+ }, g = () => {
33250
33255
  let { conditionType: e, scriptType: t, body: r, resource: i, language: o } = a.value, s = null;
33251
33256
  e === "expression" ? s = n.moddle.create("bpmn:FormalExpression", { body: r }) : e === "script" && (t === "inlineScript" ? (a.value.resource = "", s = n.moddle.create("bpmn:FormalExpression", {
33252
33257
  body: r,
@@ -33255,7 +33260,7 @@ var Rk = c({
33255
33260
  resource: i,
33256
33261
  language: o
33257
33262
  }))), s && (n.modeling.updateProperties(n.element, { conditionExpression: s }), n.modeling.updateProperties(n.element, { "custom:conditionGroup": JSON.stringify(u.value) }));
33258
- }, g = (e, t, n) => {
33263
+ }, _ = (e, t, n) => {
33259
33264
  let r = (e) => e.replace(/'/g, "\\'"), i = Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
33260
33265
  if (t == "eq") {
33261
33266
  if (i.length === 0) return "false";
@@ -33268,7 +33273,7 @@ var Rk = c({
33268
33273
  return `${e} == null or ${e}.size() != ${i.length} or !(${t})`;
33269
33274
  }
33270
33275
  return t == "in" ? i.length === 0 ? "false" : `${e} != null and (${i.map((t) => `${e}.contains('${r(t)}')`).join(" or ")})` : t == "notin" ? i.length === 0 ? "false" : `${e} == null or !(${i.map((t) => `${e}.contains('${r(t)}')`).join(" or ")})` : "false";
33271
- }, _ = t(() => {
33276
+ }, y = t(() => {
33272
33277
  function e(e) {
33273
33278
  return typeof e == "string" ? `"${String(e).replace(/"/g, "\\\"")}"` : typeof e == "boolean" ? String(e).toLowerCase() : String(e);
33274
33279
  }
@@ -33278,8 +33283,8 @@ var Rk = c({
33278
33283
  if (r == "lte") return `${n}<=${e(i)}`;
33279
33284
  if (r == "gt") return `${n}>${e(i)}`;
33280
33285
  if (r == "gte") return `${n}>=${e(i)}`;
33281
- if (r == "eq") return a == "cascader" ? g(n, r, i) : `${n}==${e(i)}`;
33282
- if (r == "not_eq") return a == "cascader" ? g(n, r, i) : `${n}!=${e(i)}`;
33286
+ if (r == "eq") return a == "cascader" ? _(n, r, i) : `${n}==${e(i)}`;
33287
+ if (r == "not_eq") return a == "cascader" ? _(n, r, i) : `${n}!=${e(i)}`;
33283
33288
  if (r == "between") {
33284
33289
  if (!Array.isArray(i)) return "true";
33285
33290
  let [r, a] = i;
@@ -33291,12 +33296,12 @@ var Rk = c({
33291
33296
  return t.type == "timepicker" || t.type == "datepicker" ? `(${n}<${e(r)} || ${n}>${e(a)})` : `(${n}<${r} || ${n}>${a})`;
33292
33297
  }
33293
33298
  if (r == "in") {
33294
- if (a == "cascader") return g(n, r, i);
33299
+ if (a == "cascader") return _(n, r, i);
33295
33300
  let t;
33296
33301
  return t = typeof i == "string" ? i == "" ? [] : [i] : typeof i == "boolean" || typeof i == "number" ? [i] : i, !t || t.length === 0 ? "${true}" : `${t.map((t) => `${n}==${e(t)}`).join(" && ")}`;
33297
33302
  }
33298
33303
  if (r == "notin") {
33299
- if (a == "cascader") return g(n, r, i);
33304
+ if (a == "cascader") return _(n, r, i);
33300
33305
  let t;
33301
33306
  return t = typeof i == "string" ? i == "" ? [] : [i] : typeof i == "boolean" || typeof i == "number" ? [i] : i, !t || t.length === 0 ? "${true}" : `${t.map((t) => `${n}!=${e(t)}`).join(" && ")}`;
33302
33307
  }
@@ -33352,10 +33357,10 @@ var Rk = c({
33352
33357
  }).filter(Boolean);
33353
33358
  return n.length === 0 ? "" : `\${${n.join(" || ")}}`;
33354
33359
  });
33355
- C(_, (e) => {
33356
- a.value.body = e, h();
33360
+ C(y, (e) => {
33361
+ a.value.body = e, g();
33357
33362
  });
33358
- function y(e, t, n = "==") {
33363
+ function b(e, t, n = "==") {
33359
33364
  let r = [];
33360
33365
  return e.forEach((e) => {
33361
33366
  e.children.forEach((e) => {
@@ -33371,7 +33376,7 @@ var Rk = c({
33371
33376
  });
33372
33377
  }), r.map((e) => ({ conditions: [e] }));
33373
33378
  }
33374
- let b = () => {
33379
+ let x = () => {
33375
33380
  u.value.push({ conditions: [{
33376
33381
  format: "",
33377
33382
  field_name: "",
@@ -33381,7 +33386,7 @@ var Rk = c({
33381
33386
  type: null,
33382
33387
  key: crypto.randomUUID()
33383
33388
  }] });
33384
- }, x = (e) => {
33389
+ }, S = (e) => {
33385
33390
  u.value[e].conditions.push({
33386
33391
  format: "",
33387
33392
  field_name: "",
@@ -33391,46 +33396,150 @@ var Rk = c({
33391
33396
  type: null,
33392
33397
  key: crypto.randomUUID()
33393
33398
  });
33394
- }, S = (e) => {
33399
+ }, w = (e) => {
33395
33400
  u.value.splice(e, 1);
33396
- }, w = (e, t) => {
33401
+ }, T = (e, t) => {
33397
33402
  u.value[e].conditions.splice(t, 1), u.value[e].conditions.length == 0 && u.value.splice(e, 1);
33398
- }, T = (e) => {
33403
+ }, E = (e) => {
33399
33404
  console.log("value", e);
33400
- }, E = () => {}, D = () => {
33401
- e.formData?.dynamicFieldList && (d.value = JSON.parse(JSON.stringify(e.formData.dynamicFieldList))), e.formData?.options && (f.value = JSON.parse(JSON.stringify(e.formData.options))), o.value.length = 0, s.value.length = 0, d.value.forEach((e) => {
33405
+ }, D = () => {}, O = (e, t, n) => [
33406
+ "date",
33407
+ "start_date",
33408
+ "end_date"
33409
+ ].includes(e.key) ? {
33410
+ type: "datepicker",
33411
+ label: n,
33412
+ disabled: !1,
33413
+ placeholder: "请选择日期时间选择器",
33414
+ allowClear: !0,
33415
+ showTime: !1,
33416
+ format: "YYYY-MM-DD",
33417
+ valueFormat: "YYYY-MM-DD",
33418
+ name: `${t}`,
33419
+ key: "0b59bfe00b3699ca807b2650b98fd5e2",
33420
+ required: !1,
33421
+ span: 24,
33422
+ pull: 0,
33423
+ push: 0,
33424
+ offset: 0,
33425
+ is_show_field: !0
33426
+ } : ["id"].includes(e.key) ? {
33427
+ type: "number",
33428
+ label: n,
33429
+ disabled: !1,
33430
+ inputType: "number",
33431
+ formatter: null,
33432
+ max: null,
33433
+ min: null,
33434
+ precision: null,
33435
+ step: 1,
33436
+ addonAfter: null,
33437
+ addonBefore: null,
33438
+ prefix: null,
33439
+ prefixIcon: null,
33440
+ suffixIcon: null,
33441
+ addonBeforeIcon: null,
33442
+ addonAfterIcon: null,
33443
+ placeholder: `请填写${e.label}`,
33444
+ name: `${t}`,
33445
+ key: "380684ef6d2b1650a2ae0d85e7250a88",
33446
+ required: !1,
33447
+ span: 24,
33448
+ pull: 0,
33449
+ push: 0,
33450
+ offset: 0,
33451
+ is_show_field: !0
33452
+ } : ["id"].includes(e.key) ? {
33453
+ type: "number",
33454
+ label: n,
33455
+ disabled: !1,
33456
+ inputType: "number",
33457
+ formatter: null,
33458
+ max: null,
33459
+ min: null,
33460
+ precision: null,
33461
+ step: 1,
33462
+ addonAfter: null,
33463
+ addonBefore: null,
33464
+ prefix: null,
33465
+ prefixIcon: null,
33466
+ suffixIcon: null,
33467
+ addonBeforeIcon: null,
33468
+ addonAfterIcon: null,
33469
+ placeholder: `请填写${e.label}`,
33470
+ name: `${t}`,
33471
+ key: `${t}`,
33472
+ required: !1,
33473
+ span: 24,
33474
+ pull: 0,
33475
+ push: 0,
33476
+ offset: 0,
33477
+ is_show_field: !0
33478
+ } : {
33479
+ addonAfter: null,
33480
+ addonAfterIcon: null,
33481
+ addonBefore: null,
33482
+ addonBeforeIcon: null,
33483
+ allowClear: !0,
33484
+ disabled: !1,
33485
+ inputType: "text",
33486
+ key: `${t}`,
33487
+ label: n,
33488
+ name: `${t}`,
33489
+ offset: 0,
33490
+ placeholder: `请填写${e.label}`,
33491
+ prefix: null,
33492
+ prefixIcon: null,
33493
+ pull: 0,
33494
+ push: 0,
33495
+ span: 24,
33496
+ suffix: null,
33497
+ suffixIcon: null,
33498
+ type: "input",
33499
+ required: !1,
33500
+ is_show_field: !0
33501
+ }, k = () => {
33502
+ f.value.length = 0, e.formData?.dynamicFieldList && (f.value = JSON.parse(JSON.stringify(e.formData.dynamicFieldList))), e.globalOptions && (d.value = JSON.parse(JSON.stringify(e.globalOptions))), e.formData?.options && (p.value = JSON.parse(JSON.stringify(e.formData.options))), o.value.length = 0, s.value.length = 0, f.value.forEach((e) => {
33402
33503
  e.children.forEach((e) => {
33403
33504
  o.value.push({ ...e }), s.value.push({
33404
33505
  label: e.label,
33405
33506
  value: e.name
33406
33507
  });
33407
33508
  });
33509
+ }), d.value.forEach((e) => {
33510
+ e.children && e.children.forEach((t) => {
33511
+ let n = `globalData__${e.key}__${t.key}`, r = `${e.label}-${t.label}`, i = O(t, n, r);
33512
+ o.value.push({ ...i }), s.value.push({
33513
+ label: r,
33514
+ value: n
33515
+ });
33516
+ });
33408
33517
  });
33409
33518
  };
33410
33519
  return C(() => e.id, (e) => {
33411
- LO.isNotBlank(e) && (D(), p());
33520
+ LO.isNotBlank(e) && (k(), m());
33412
33521
  }, { immediate: !0 }), C(() => e.formData, () => {
33413
- D(), p();
33522
+ k(), m();
33414
33523
  }, { deep: !0 }), {
33415
33524
  operatorNameMap: lk,
33416
33525
  FieldTypeOperatorMap: ck,
33417
33526
  bpmnFormData: a,
33418
- expression: _,
33527
+ expression: y,
33419
33528
  conditionGroups: u,
33420
- options: f,
33529
+ options: p,
33421
33530
  binaryOpMap: uk,
33422
33531
  formItemKeyList: o,
33423
33532
  columnNameList: s,
33424
33533
  field_name: v(""),
33425
- updateFlowType: m,
33426
- handleAddConditionGroup: b,
33427
- handleAddGroupItem: x,
33428
- handleDeleteConditionItem: w,
33534
+ updateFlowType: h,
33535
+ handleAddConditionGroup: x,
33536
+ handleAddGroupItem: S,
33537
+ handleDeleteConditionItem: T,
33429
33538
  handleChangeFieldName: l,
33430
33539
  handleChangeOperator: c,
33431
- handleInputChange: T,
33432
- handleUpdate: E,
33433
- handleDeleteCondition: S
33540
+ handleInputChange: E,
33541
+ handleUpdate: D,
33542
+ handleDeleteCondition: w
33434
33543
  };
33435
33544
  }
33436
33545
  });
@@ -33523,12 +33632,12 @@ function zk(t, c, l, u, d, f) {
33523
33632
  value: l.field_name,
33524
33633
  "onUpdate:value": (e) => l.field_name = e,
33525
33634
  columnNameList: t.columnNameList,
33526
- onChange: (e) => t.handleChangeFieldName(l)
33635
+ onSelect: (e) => t.handleChangeFieldName(l)
33527
33636
  }, null, 8, [
33528
33637
  "value",
33529
33638
  "onUpdate:value",
33530
33639
  "columnNameList",
33531
- "onChange"
33640
+ "onSelect"
33532
33641
  ])]),
33533
33642
  _: 2
33534
33643
  }, 1024)]),
@@ -34043,7 +34152,7 @@ function zk(t, c, l, u, d, f) {
34043
34152
  _: 1
34044
34153
  })]);
34045
34154
  }
34046
- var Bk = /* @__PURE__ */ BO(Rk, [["render", zk], ["__scopeId", "data-v-43cc8fe7"]]), Vk = {
34155
+ var Bk = /* @__PURE__ */ BO(Rk, [["render", zk], ["__scopeId", "data-v-0f395304"]]), Vk = {
34047
34156
  "Activate the global connect tool": "激活全局连接工具",
34048
34157
  "Append {type}": "添加 {type}",
34049
34158
  "Append Task": "添加任务",
@@ -34299,11 +34408,18 @@ function Uk(e) {
34299
34408
  //#region src/components/Process/designer.vue?vue&type=script&lang.ts
34300
34409
  var Wk = c({
34301
34410
  name: "Designer",
34302
- props: { formData: {
34303
- type: Object,
34304
- required: !1,
34305
- default: {}
34306
- } },
34411
+ props: {
34412
+ formData: {
34413
+ type: Object,
34414
+ required: !1,
34415
+ default: {}
34416
+ },
34417
+ globalOptions: {
34418
+ type: Array,
34419
+ required: !1,
34420
+ default: []
34421
+ }
34422
+ },
34307
34423
  components: {
34308
34424
  CommonPanel: HO,
34309
34425
  UserTaskPanel: sk,
@@ -34380,15 +34496,20 @@ function Kk(e, t, o, c, l, u) {
34380
34496
  }, {
34381
34497
  default: w(() => [s(m, {
34382
34498
  id: e.elementId,
34383
- formData: e.formData
34384
- }, null, 8, ["id", "formData"])]),
34499
+ formData: e.formData,
34500
+ globalOptions: e.globalOptions
34501
+ }, null, 8, [
34502
+ "id",
34503
+ "formData",
34504
+ "globalOptions"
34505
+ ])]),
34385
34506
  _: 1
34386
34507
  })) : r("", !0)
34387
34508
  ]),
34388
34509
  _: 1
34389
34510
  }, 8, ["activeKey"])]);
34390
34511
  }
34391
- var qk = /* @__PURE__ */ BO(Wk, [["render", Kk], ["__scopeId", "data-v-b1917958"]]);
34512
+ var qk = /* @__PURE__ */ BO(Wk, [["render", Kk], ["__scopeId", "data-v-fcdd90e8"]]);
34392
34513
  //#endregion
34393
34514
  //#region src/components/Process/customPanel/customTranslate.js
34394
34515
  function Jk(e, t) {
@@ -36578,6 +36699,11 @@ var lj = c({
36578
36699
  type: Object,
36579
36700
  required: !1,
36580
36701
  default: {}
36702
+ },
36703
+ globalOptions: {
36704
+ type: Array,
36705
+ required: !1,
36706
+ default: []
36581
36707
  }
36582
36708
  },
36583
36709
  components: {
@@ -36876,10 +37002,11 @@ function yj(e, t, c, l, u, f) {
36876
37002
  _: 1
36877
37003
  })])])]), a("div", pj, [a("div", mj, [a("div", hj, [a("div", gj, null, 512)]), a("div", _j, [a("div", vj, [e.loadCanvas ? (h(), n(v, {
36878
37004
  key: 0,
36879
- "form-data": e.formData
36880
- }, null, 8, ["form-data"])) : r("", !0)])])])])], 2);
37005
+ "form-data": e.formData,
37006
+ "global-options": e.globalOptions
37007
+ }, null, 8, ["form-data", "global-options"])) : r("", !0)])])])])], 2);
36881
37008
  }
36882
- var bj = /* @__PURE__ */ BO(lj, [["render", yj], ["__scopeId", "data-v-cab3d400"]]), xj = /* @__PURE__ */ ye((/* @__PURE__ */ _e(((e, t) => {
37009
+ var bj = /* @__PURE__ */ BO(lj, [["render", yj], ["__scopeId", "data-v-7814709c"]]), xj = /* @__PURE__ */ ye((/* @__PURE__ */ _e(((e, t) => {
36883
37010
  function n(e) {
36884
37011
  var t = " ";
36885
37012
  if (isNaN(parseInt(e))) t = e;
@@ -37028,6 +37155,11 @@ var bj = /* @__PURE__ */ BO(lj, [["render", yj], ["__scopeId", "data-v-cab3d400"
37028
37155
  type: Object,
37029
37156
  required: !1,
37030
37157
  default: {}
37158
+ },
37159
+ globalOptions: {
37160
+ type: Array,
37161
+ required: !1,
37162
+ default: []
37031
37163
  }
37032
37164
  },
37033
37165
  components: { bpmnModeler: bj },
@@ -37126,6 +37258,7 @@ function Dj(e, t, n, r, o, c) {
37126
37258
  "process-id": e.processId,
37127
37259
  "process-name": e.processName,
37128
37260
  "form-data": e.formData,
37261
+ "global-options": e.globalOptions,
37129
37262
  onSave: e.save,
37130
37263
  onShowXML: e.showXML,
37131
37264
  onXmlChanged: e.onXmlChanged
@@ -37148,6 +37281,7 @@ function Dj(e, t, n, r, o, c) {
37148
37281
  "process-id",
37149
37282
  "process-name",
37150
37283
  "form-data",
37284
+ "global-options",
37151
37285
  "onSave",
37152
37286
  "onShowXML",
37153
37287
  "onXmlChanged"
@@ -37167,7 +37301,7 @@ function Dj(e, t, n, r, o, c) {
37167
37301
  "onAfterOpenChange"
37168
37302
  ])]);
37169
37303
  }
37170
- var Oj = /* @__PURE__ */ BO(Cj, [["render", Dj], ["__scopeId", "data-v-004c58c3"]]), kj = /* @__PURE__ */ ye((/* @__PURE__ */ _e(((e, t) => {
37304
+ var Oj = /* @__PURE__ */ BO(Cj, [["render", Dj], ["__scopeId", "data-v-135f56ce"]]), kj = /* @__PURE__ */ ye((/* @__PURE__ */ _e(((e, t) => {
37171
37305
  typeof Object.create == "function" ? t.exports = function(e, t) {
37172
37306
  t && (e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: {
37173
37307
  value: e,