@kunpeng-io/bpmn-js-properties-panel 2026.11.1 → 2026.11.2

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.
@@ -3503,19 +3503,25 @@
3503
3503
  * @typedef { import('@kunpeng-io/properties-panel').EntryDefinition } Entry
3504
3504
  */
3505
3505
  /**
3506
- * 加签配置(仅用户任务):勾选即在 extensionElements 写入 kunpeng:AddSign
3507
- * (声明即允许,首期无子属性;级联等配置属二期)。
3506
+ * 加签配置(仅用户任务):勾选即在 extensionElements 写入 kunpeng:AddSign(声明即允许);
3507
+ * 启用后可配 maxDepth(级联深度上限,1=禁止级联加签,缺省 1)。
3508
3508
  *
3509
3509
  * @returns {Array<Entry>} entries
3510
3510
  */
3511
3511
  function AddSignProps(props) {
3512
3512
  const { element } = props;
3513
3513
  if (!(0, _kunpeng_io_bpmn_js.is)(element, "bpmn:UserTask")) return [];
3514
- return [{
3514
+ const entries = [{
3515
3515
  id: "addSignEnabled",
3516
3516
  component: AddSignEnabled,
3517
3517
  isEdited: _kunpeng_io_properties_panel.isCheckboxEntryEdited
3518
3518
  }];
3519
+ if (getAddSign(element)) entries.push({
3520
+ id: "addSignMaxDepth",
3521
+ component: AddSignMaxDepth,
3522
+ isEdited: _kunpeng_io_properties_panel.isNumberFieldEntryEdited
3523
+ });
3524
+ return entries;
3519
3525
  }
3520
3526
  function AddSignEnabled(props) {
3521
3527
  const { element } = props;
@@ -3572,6 +3578,37 @@
3572
3578
  setValue
3573
3579
  });
3574
3580
  }
3581
+ function AddSignMaxDepth(props) {
3582
+ const { element } = props;
3583
+ const commandStack = useService("commandStack");
3584
+ const translate = useService("translate");
3585
+ const getValue = () => {
3586
+ const addSign = getAddSign(element);
3587
+ return addSign ? addSign.get("maxDepth") ?? 1 : 1;
3588
+ };
3589
+ const setValue = (value) => {
3590
+ const addSign = getAddSign(element);
3591
+ if (!addSign) return;
3592
+ commandStack.execute("element.updateModdleProperties", {
3593
+ element,
3594
+ moddleElement: addSign,
3595
+ properties: { maxDepth: value }
3596
+ });
3597
+ };
3598
+ const validate = (value) => {
3599
+ if (value == null || value === "" || Number(value) < 1) return translate("Max depth must be >= 1 (1 = no cascade)");
3600
+ };
3601
+ return (0, _kunpeng_io_properties_panel.NumberFieldEntry)({
3602
+ element,
3603
+ id: "addSignMaxDepth",
3604
+ label: translate("Add sign max depth"),
3605
+ min: 1,
3606
+ step: 1,
3607
+ getValue,
3608
+ setValue,
3609
+ validate
3610
+ });
3611
+ }
3575
3612
  function getAddSign(element) {
3576
3613
  return getExtensionElementsList((0, _kunpeng_io_bpmn_js.getBusinessObject)(element), "kunpeng:AddSign")[0];
3577
3614
  }