@gct-paas/excel 0.1.39-beta.30 → 0.1.39-beta.32

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 (91) hide show
  1. package/dist/{BaseComponent-BkwxLOiM.js → BaseComponent-BZ7vpBcD.js} +2 -2
  2. package/dist/{VueVideoPlayer-DmZ_P4Cp.js → VueVideoPlayer-CTtss6-e.js} +2 -2
  3. package/dist/{align-editor-C1Fj-34U.js → align-editor-0EJDQ9xk.js} +1 -1
  4. package/dist/{barcode-design-D90bLWOL.js → barcode-design-CU6ykxXr.js} +2 -2
  5. package/dist/base/index.es.js +170 -170
  6. package/dist/{diagonal-design-YbEx-5SA.js → diagonal-design-bgZAeLZP.js} +2 -2
  7. package/dist/{dynamic-table-action-DXlLVZZF.js → dynamic-table-action-BvHth2cC.js} +679 -123
  8. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DlcK-wt_.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-vRTNdchM.js} +503 -1083
  9. package/dist/{edit.utils-CXmmCnxE-BMWwEMfe.js → edit.utils-CXmmCnxE-Cj0XviBc.js} +1 -1
  10. package/dist/excel.css +68 -17
  11. package/dist/{exceljs.min-B-mYUB0l.js → exceljs.min-Cr5txU5w.js} +2 -2
  12. package/dist/{font-editor-D0dV4bEL.js → font-editor-BIEWxnat.js} +3 -3
  13. package/dist/{image-design-DkQBDv9K.js → image-design-AOi1nT_M.js} +2 -2
  14. package/dist/{index-BEkX75av.js → index-0cS2b0oE.js} +2 -2
  15. package/dist/{index-Dgs95dud.js → index-2SyQ6xAT.js} +1 -1
  16. package/dist/{index-BYpPubsS.js → index-B1JboJFx.js} +1 -1
  17. package/dist/{index-D9BcQ25Q.js → index-B4aDuWy4.js} +2 -2
  18. package/dist/{index-w1Oz-JSm.js → index-BFhX3ACB.js} +1 -1
  19. package/dist/{index-CrnlU1jr.js → index-BOo6MotZ.js} +3 -3
  20. package/dist/{index-8GDKkzhT.js → index-BRirBsMg.js} +2 -2
  21. package/dist/{index-DlfthBvr.js → index-BYOG-n0c.js} +2 -2
  22. package/dist/{index-CaKVMIWJ.js → index-BeFJ_RCt.js} +1 -1
  23. package/dist/{index-jfKiyRsE.js → index-Bk8rU908.js} +1776 -1695
  24. package/dist/{index-Zr4W3H4i.js → index-BzgVexIB.js} +2 -2
  25. package/dist/{index-lSMZmF7U.js → index-C5rtaFud.js} +2 -2
  26. package/dist/{index-VBBgqHqv.js → index-C7veczU_.js} +3 -3
  27. package/dist/{index-DWrIPK_U.js → index-CDhZoiEf.js} +1 -1
  28. package/dist/{index-B-hm9GED.js → index-CTLIQVKX.js} +2 -2
  29. package/dist/{index-CfLLsSW6.js → index-CX4Pp6kw.js} +2 -2
  30. package/dist/{index-rDv1Pb8y.js → index-CZD5cYIe.js} +2 -2
  31. package/dist/{index-CHv965Bj.js → index-CfS4Vi7D.js} +3 -2
  32. package/dist/{index-BPvsxMaD.js → index-Cfe2Q-hG.js} +1 -1
  33. package/dist/{index-ulVZgzRz.js → index-Cip1bDDj.js} +2 -2
  34. package/dist/{index-DzmKXFwH.js → index-CkgcA21r.js} +2 -2
  35. package/dist/{index-DOGxYpwq.js → index-Cld2wf77.js} +1 -1
  36. package/dist/{index-DsS5smhd.js → index-CwSEWCP8.js} +3 -3
  37. package/dist/{index-DZYpzeZM.js → index-D-8Q9FIL.js} +3 -3
  38. package/dist/{index-K9yUIBxc.js → index-D9GxA4Uy.js} +4 -4
  39. package/dist/{index-D19ggbiC.js → index-DThgFjEo.js} +2 -2
  40. package/dist/{index-CVPJGks5.js → index-DzchEThV.js} +2 -2
  41. package/dist/{index-Boj1Babg.js → index-Ezicwad7.js} +2 -2
  42. package/dist/{index-C0gB21qk.js → index-LJlRgrPE.js} +2 -2
  43. package/dist/{index-BgL2ciTw.js → index-SXIZsVts.js} +1 -1
  44. package/dist/{index-CiyvJops.js → index-chIttzzx.js} +2 -2
  45. package/dist/{index-CNSt1kk7.js → index-g5NmWlup.js} +2 -2
  46. package/dist/{index-V3FsjgC2.js → index-n97S5YRD.js} +1 -1
  47. package/dist/{index-BKmJ_uM2.js → index-nl7I1bLi.js} +1 -1
  48. package/dist/{index-DyLoooUC.js → index-sbz8PAuq.js} +2 -2
  49. package/dist/index.es.js +2 -2
  50. package/dist/{mb-render-Dc2J-VKn.js → mb-render-FUO_-FXR.js} +1 -1
  51. package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-D60Qjkgq.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-DOYhOffQ.js} +1 -1
  52. package/dist/{pagination-design-J5Xr1H6H.js → pagination-design-BXWK58mU.js} +2 -2
  53. package/dist/paper-widget-design-DGRbbkYV.js +4 -0
  54. package/dist/{print-runtime-instance-CkGherFi.js → print-runtime-instance-CwdH93fy.js} +1 -1
  55. package/dist/{print-snapshot-renderer-BxrmKmGQ.js → print-snapshot-renderer-CzlFqiSh.js} +3 -3
  56. package/dist/{qrcode-design-DJciYm3W.js → qrcode-design-8A5a_F1s.js} +1 -1
  57. package/dist/{revo-grid.entry-D2XU7yfg.js → revo-grid.entry-DKvA7bUR.js} +1 -1
  58. package/dist/{revogr-attribution_7.entry-DiKuD6Oj.js → revogr-attribution_7.entry-C2PtJ_Tj.js} +3 -3
  59. package/dist/{revogr-clipboard_3.entry-BaU8s-5o.js → revogr-clipboard_3.entry-BM7_JY0U.js} +2 -2
  60. package/dist/{revogr-data_4.entry-D6AqE208.js → revogr-data_4.entry-CdMQPL7I.js} +2 -2
  61. package/dist/{revogr-filter-panel.entry-B0-_hrSZ.js → revogr-filter-panel.entry-BJiGVhcw.js} +1 -1
  62. package/dist/seal-design-BFQUgxHz.js +4 -0
  63. package/dist/{serialnumber-design-BfeGFYY4.js → serialnumber-design-QaDIsxYT.js} +1 -1
  64. package/dist/shared/index.es.js +22 -22
  65. package/dist/{single-field-drop-wg47buz7.js → single-field-drop-C-Af1KzB.js} +2 -2
  66. package/dist/{size-editor-hnWquuM2.js → size-editor-BV0KrQ37.js} +1 -1
  67. package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +11 -0
  68. package/dist/src/online-form/src/views/designer/modules/base/designer-wrapper.vue.d.ts +1 -0
  69. package/dist/src/online-form/src/views/designer/modules/duplicate-field-notice.vue.d.ts +2 -0
  70. package/dist/src/online-form/src/views/designer/types/sheets.d.ts +2 -0
  71. package/dist/{sub-table-factory-DCjl5fld.js → sub-table-factory-b8fCKT0z.js} +2 -2
  72. package/dist/{text-design-BQqBHcG3.js → text-design-C35O7YR4.js} +2 -2
  73. package/dist/{throttle-Cpk1LoGk-C-bCLTWf.js → throttle-Cpk1LoGk-HQvkISS4.js} +1 -1
  74. package/dist/{timediff-design-DzNFXX0B.js → timediff-design-CKjl56qS.js} +1 -1
  75. package/dist/{trace-like-wrapper-BO9GpUUT.js → trace-like-wrapper-CvZpyPlh.js} +2 -2
  76. package/dist/{value-editor.vue_vue_type_style_index_0_lang-NrJ6BC4L.js → value-editor.vue_vue_type_style_index_0_lang-Bk7ZLZxh.js} +2 -2
  77. package/dist/web-render/index.es.js +3 -3
  78. package/dist/{widget-barcode-CqFwMMNr.js → widget-barcode-CNkIguP5.js} +4 -4
  79. package/dist/{widget-diagonal-Bv7rOoCE.js → widget-diagonal-Mi9aX6hU.js} +3 -3
  80. package/dist/{widget-image-C7uAoxCn.js → widget-image-i2JtNBbz.js} +5 -5
  81. package/dist/{widget-line-DjEbtHhc.js → widget-line-OIsUSKiO.js} +2 -2
  82. package/dist/{widget-pagination-Dc4pC9a8.js → widget-pagination--EyLbrPC.js} +5 -5
  83. package/dist/{widget-power-9LyPBlNG.js → widget-power-FPby3ucD.js} +3 -3
  84. package/dist/{widget-qrcode-wY0Htp8v.js → widget-qrcode-D5P4cW3m.js} +3 -3
  85. package/dist/{widget-rangelimit-CT9yqbbL.js → widget-rangelimit-DdwIzSFH.js} +3 -3
  86. package/dist/{widget-serialnumber-CChK8wrF.js → widget-serialnumber-C-T8DI3m.js} +1 -1
  87. package/dist/{widget-text-mWwms2HC.js → widget-text-BHlQYZUH.js} +5 -5
  88. package/dist/{widget-timediff-GSd_w8qO.js → widget-timediff--QTyT_AT.js} +2 -2
  89. package/package.json +2 -2
  90. package/dist/paper-widget-design-mppU2AMx.js +0 -4
  91. package/dist/seal-design-FsL7H3e7.js +0 -4
@@ -1,10 +1,10 @@
1
1
  import { reactive, toRaw, computed, watch, onScopeDispose, inject, h, shallowReactive, markRaw, ref, nextTick, toRef, provide, defineComponent, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, Fragment, renderList, onUnmounted, isVNode, onMounted, onBeforeMount, resolveComponent, createBlock, withCtx, createTextVNode } from "vue";
2
- import { ai as CellWidgetViewState, F as FIELD_TYPE, b9 as RenderModeEnum, Y as FormTypeEnum, bF as BpmnNodeTypeEnum, cw as getFieldPlaceholder, bW as MobileFillTypeEnum, C as ComponentTypeEnum, $ as PlatformEnum, cx as isReferenceOptionActive, E as api, bv as uuid2, c4 as calcUtils, bk as findRuntimeTableRow, c8 as ensureTableRowKeys, c1 as bindRuntimeTableColumns, bj as getRowId, cy as FRONT_ROW_KEY, cn as isTableRowKeyMatch, bx as isAttachFieldActive, cz as filterRulesByTrigger, cA as isEmptyValue$1, c5 as decodeTableCellRowKey, c7 as ensureFrontRowKey, b1 as getParseRuleInfo, aF as transformUtils, aY as materialCheck, aZ as getLotLockedReason, a_ as validateReinspectionDate, bo as FormulaRuleFieldKeyEnum, f as SubTableType, b2 as getParseRuleValue, cB as buildError, H as CreateType, bm as findRuntimeParentRow, aI as Dependency_ENUM, aH as ASSIGNMENTSTRATEGY_ENUM, bK as commonUtils, aM as DeviceLink, a8 as _export_sfc, ch as getRenderedRuntimeTableCell, y as CellType, cr as relocateDeletedRowsToEnd, cC as resetTableRowIdentity, J as useModal, cD as q, cE as QUICK_FILL_ALLOWED_FIELDS, cF as groupFixedTableRows, cG as processQuickFillRows, cH as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DlcK-wt_.js";
3
- import { cloneDeep, isEmpty, has, pickBy, isNil, mergeWith, omit, last, pick, merge } from "lodash-es";
2
+ import { af as CellWidgetViewState, F as FIELD_TYPE, b4 as RenderModeEnum, X as FormTypeEnum, bs as BpmnNodeTypeEnum, ch as getFieldPlaceholder, bI as MobileFillTypeEnum, C as ComponentTypeEnum, bc as findRuntimeTableRow, aT as renderUtils, _ as PlatformEnum, E as api, bl as uuid2, bS as calcUtils, bW as ensureTableRowKeys, bP as bindRuntimeTableColumns, bb as getRowId, ci as FRONT_ROW_KEY, c9 as isTableRowKeyMatch, au as RangeCompareOp, at as RangeValidateMode, bT as decodeTableCellRowKey, bV as ensureFrontRowKey, a_ as getParseRuleInfo, aC as transformUtils, aV as materialCheck, aW as getLotLockedReason, aX as validateReinspectionDate, bf as FormulaRuleFieldKeyEnum, f as SubTableType, a$ as getParseRuleValue, H as CreateType, bd as findRuntimeParentRow, aF as Dependency_ENUM, aE as ASSIGNMENTSTRATEGY_ENUM, bw as commonUtils, aJ as DeviceLink, a7 as _export_sfc, c3 as getRenderedRuntimeTableCell, y as CellType, cj as resetTableRowIdentity, J as useModal, ck as q, cl as QUICK_FILL_ALLOWED_FIELDS, cm as groupFixedTableRows, cn as processQuickFillRows, co as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-vRTNdchM.js";
4
3
  import dayjs from "dayjs";
4
+ import { cloneDeep, isEmpty, has, isNil, pickBy, mergeWith, omit, last, pick, merge } from "lodash-es";
5
5
  import { a as useNamespace, I as Icon } from "./AntdIcon-DCIaV352.js";
6
6
  import { Modal, message } from "ant-design-vue";
7
- import { u as useFormModel } from "./mb-render-Dc2J-VKn.js";
7
+ import { u as useFormModel } from "./mb-render-FUO_-FXR.js";
8
8
  var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
9
9
  MaterialConsumptionPatternEnum2["RECORD"] = "record";
10
10
  MaterialConsumptionPatternEnum2["BOM"] = "bom";
@@ -703,6 +703,49 @@ function getSubTableQuickFillInfo(subTableFieldId, mobileTdIdGroups) {
703
703
  if (!subTableFieldId) return;
704
704
  return assignWidgetInfo(MobileFillTypeEnum.SUB_TABLE, { rowSubFieldKey: subTableFieldId });
705
705
  }
706
+ function getCurrentFormData(_rule, options) {
707
+ if (!_rule._subtableFieldId) return options?.formData;
708
+ return findRuntimeTableRow(options?.formData?.[_rule._subtableFieldId], _rule._rowKey);
709
+ }
710
+ function isSameOptionValue(current, expected) {
711
+ if (typeof expected === "boolean") {
712
+ return renderUtils.getBoolValue(current) === expected;
713
+ }
714
+ if (current === void 0 || current === null || current === "") {
715
+ return false;
716
+ }
717
+ return String(current) === String(expected);
718
+ }
719
+ function isAttachFieldActive(attach, formData) {
720
+ if (attach?.parent && !isAttachFieldActive(attach.parent, formData)) return false;
721
+ if (!attach?.belongFieldId || isNil(attach.optionValue)) {
722
+ return true;
723
+ }
724
+ const row = attach.subtableFieldId ? findRuntimeTableRow(formData?.[attach.subtableFieldId], attach.rowKey) : formData;
725
+ if (attach.subtableFieldId && (!attach.rowKey || !row || row === formData)) {
726
+ return false;
727
+ }
728
+ const raw = row?.[attach.belongFieldId];
729
+ if (attach.multiple) {
730
+ const current = renderUtils.getValue(raw, true);
731
+ if (!Array.isArray(current)) return false;
732
+ return current.some((v) => isSameOptionValue(v, attach.optionValue));
733
+ }
734
+ return isSameOptionValue(raw, attach.optionValue);
735
+ }
736
+ function isReferenceOptionActive(referenceInfo, rowFormData) {
737
+ if (!referenceInfo?.belongFieldId || isNil(referenceInfo.optionValue)) {
738
+ return true;
739
+ }
740
+ return isAttachFieldActive(
741
+ {
742
+ belongFieldId: referenceInfo.belongFieldId,
743
+ optionValue: referenceInfo.optionValue,
744
+ multiple: referenceInfo.multiple
745
+ },
746
+ rowFormData
747
+ );
748
+ }
706
749
  function fieldChromeStyles(state) {
707
750
  const required4 = state === "required";
708
751
  const disabled = state === "disabled";
@@ -2086,7 +2129,7 @@ function format(template) {
2086
2129
  function isNativeStringType(type4) {
2087
2130
  return type4 === "string" || type4 === "url" || type4 === "hex" || type4 === "email" || type4 === "date" || type4 === "pattern";
2088
2131
  }
2089
- function isEmptyValue(value, type4) {
2132
+ function isEmptyValue$1(value, type4) {
2090
2133
  if (value === void 0 || value === null) {
2091
2134
  return true;
2092
2135
  }
@@ -2245,7 +2288,7 @@ function deepMerge(target, source) {
2245
2288
  return target;
2246
2289
  }
2247
2290
  var required$1 = function required(rule, value, source, errors, options, type4) {
2248
- if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type4 || rule.type))) {
2291
+ if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue$1(value, type4 || rule.type))) {
2249
2292
  errors.push(format(options.messages.required, rule.fullField));
2250
2293
  }
2251
2294
  };
@@ -2432,11 +2475,11 @@ var string = function string2(rule, value, callback, source, options) {
2432
2475
  var errors = [];
2433
2476
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2434
2477
  if (validate) {
2435
- if (isEmptyValue(value, "string") && !rule.required) {
2478
+ if (isEmptyValue$1(value, "string") && !rule.required) {
2436
2479
  return callback();
2437
2480
  }
2438
2481
  rules.required(rule, value, source, errors, options, "string");
2439
- if (!isEmptyValue(value, "string")) {
2482
+ if (!isEmptyValue$1(value, "string")) {
2440
2483
  rules.type(rule, value, source, errors, options);
2441
2484
  rules.range(rule, value, source, errors, options);
2442
2485
  rules.pattern(rule, value, source, errors, options);
@@ -2451,7 +2494,7 @@ var method2 = function method3(rule, value, callback, source, options) {
2451
2494
  var errors = [];
2452
2495
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2453
2496
  if (validate) {
2454
- if (isEmptyValue(value) && !rule.required) {
2497
+ if (isEmptyValue$1(value) && !rule.required) {
2455
2498
  return callback();
2456
2499
  }
2457
2500
  rules.required(rule, value, source, errors, options);
@@ -2468,7 +2511,7 @@ var number2 = function number3(rule, value, callback, source, options) {
2468
2511
  if (value === "") {
2469
2512
  value = void 0;
2470
2513
  }
2471
- if (isEmptyValue(value) && !rule.required) {
2514
+ if (isEmptyValue$1(value) && !rule.required) {
2472
2515
  return callback();
2473
2516
  }
2474
2517
  rules.required(rule, value, source, errors, options);
@@ -2483,7 +2526,7 @@ var _boolean = function _boolean2(rule, value, callback, source, options) {
2483
2526
  var errors = [];
2484
2527
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2485
2528
  if (validate) {
2486
- if (isEmptyValue(value) && !rule.required) {
2529
+ if (isEmptyValue$1(value) && !rule.required) {
2487
2530
  return callback();
2488
2531
  }
2489
2532
  rules.required(rule, value, source, errors, options);
@@ -2497,11 +2540,11 @@ var regexp2 = function regexp3(rule, value, callback, source, options) {
2497
2540
  var errors = [];
2498
2541
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2499
2542
  if (validate) {
2500
- if (isEmptyValue(value) && !rule.required) {
2543
+ if (isEmptyValue$1(value) && !rule.required) {
2501
2544
  return callback();
2502
2545
  }
2503
2546
  rules.required(rule, value, source, errors, options);
2504
- if (!isEmptyValue(value)) {
2547
+ if (!isEmptyValue$1(value)) {
2505
2548
  rules.type(rule, value, source, errors, options);
2506
2549
  }
2507
2550
  }
@@ -2511,7 +2554,7 @@ var integer2 = function integer3(rule, value, callback, source, options) {
2511
2554
  var errors = [];
2512
2555
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2513
2556
  if (validate) {
2514
- if (isEmptyValue(value) && !rule.required) {
2557
+ if (isEmptyValue$1(value) && !rule.required) {
2515
2558
  return callback();
2516
2559
  }
2517
2560
  rules.required(rule, value, source, errors, options);
@@ -2526,7 +2569,7 @@ var floatFn = function floatFn2(rule, value, callback, source, options) {
2526
2569
  var errors = [];
2527
2570
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2528
2571
  if (validate) {
2529
- if (isEmptyValue(value) && !rule.required) {
2572
+ if (isEmptyValue$1(value) && !rule.required) {
2530
2573
  return callback();
2531
2574
  }
2532
2575
  rules.required(rule, value, source, errors, options);
@@ -2556,7 +2599,7 @@ var object2 = function object3(rule, value, callback, source, options) {
2556
2599
  var errors = [];
2557
2600
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2558
2601
  if (validate) {
2559
- if (isEmptyValue(value) && !rule.required) {
2602
+ if (isEmptyValue$1(value) && !rule.required) {
2560
2603
  return callback();
2561
2604
  }
2562
2605
  rules.required(rule, value, source, errors, options);
@@ -2571,7 +2614,7 @@ var enumerable2 = function enumerable3(rule, value, callback, source, options) {
2571
2614
  var errors = [];
2572
2615
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2573
2616
  if (validate) {
2574
- if (isEmptyValue(value) && !rule.required) {
2617
+ if (isEmptyValue$1(value) && !rule.required) {
2575
2618
  return callback();
2576
2619
  }
2577
2620
  rules.required(rule, value, source, errors, options);
@@ -2585,11 +2628,11 @@ var pattern2 = function pattern3(rule, value, callback, source, options) {
2585
2628
  var errors = [];
2586
2629
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2587
2630
  if (validate) {
2588
- if (isEmptyValue(value, "string") && !rule.required) {
2631
+ if (isEmptyValue$1(value, "string") && !rule.required) {
2589
2632
  return callback();
2590
2633
  }
2591
2634
  rules.required(rule, value, source, errors, options);
2592
- if (!isEmptyValue(value, "string")) {
2635
+ if (!isEmptyValue$1(value, "string")) {
2593
2636
  rules.pattern(rule, value, source, errors, options);
2594
2637
  }
2595
2638
  }
@@ -2599,11 +2642,11 @@ var date2 = function date3(rule, value, callback, source, options) {
2599
2642
  var errors = [];
2600
2643
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2601
2644
  if (validate) {
2602
- if (isEmptyValue(value, "date") && !rule.required) {
2645
+ if (isEmptyValue$1(value, "date") && !rule.required) {
2603
2646
  return callback();
2604
2647
  }
2605
2648
  rules.required(rule, value, source, errors, options);
2606
- if (!isEmptyValue(value, "date")) {
2649
+ if (!isEmptyValue$1(value, "date")) {
2607
2650
  var dateObject;
2608
2651
  if (value instanceof Date) {
2609
2652
  dateObject = value;
@@ -2629,11 +2672,11 @@ var type2 = function type3(rule, value, callback, source, options) {
2629
2672
  var errors = [];
2630
2673
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2631
2674
  if (validate) {
2632
- if (isEmptyValue(value, ruleType) && !rule.required) {
2675
+ if (isEmptyValue$1(value, ruleType) && !rule.required) {
2633
2676
  return callback();
2634
2677
  }
2635
2678
  rules.required(rule, value, source, errors, options, ruleType);
2636
- if (!isEmptyValue(value, ruleType)) {
2679
+ if (!isEmptyValue$1(value, ruleType)) {
2637
2680
  rules.type(rule, value, source, errors, options);
2638
2681
  }
2639
2682
  }
@@ -2643,7 +2686,7 @@ var any = function any2(rule, value, callback, source, options) {
2643
2686
  var errors = [];
2644
2687
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2645
2688
  if (validate) {
2646
- if (isEmptyValue(value) && !rule.required) {
2689
+ if (isEmptyValue$1(value) && !rule.required) {
2647
2690
  return callback();
2648
2691
  }
2649
2692
  rules.required(rule, value, source, errors, options);
@@ -2980,6 +3023,504 @@ Schema.register = function register(type4, validator) {
2980
3023
  Schema.warning = warning;
2981
3024
  Schema.messages = messages;
2982
3025
  Schema.validators = validators;
3026
+ const stampKeys = [
3027
+ "sealId",
3028
+ "sealName",
3029
+ "sealType",
3030
+ "sealImage",
3031
+ "sealUserId",
3032
+ "sealUserName",
3033
+ "sealUserTime"
3034
+ ];
3035
+ function isSealPosition(value) {
3036
+ if (!value || typeof value !== "object") return false;
3037
+ const p = value;
3038
+ return typeof p.sheetId === "string" && !!p.sheetId && Number.isInteger(p.pageIndex) && p.pageIndex >= 0 && Number.isFinite(p.leftMm) && p.leftMm >= 0 && Number.isFinite(p.topMm) && p.topMm >= 0;
3039
+ }
3040
+ function readSealValue(raw, fallback) {
3041
+ let parsed = {};
3042
+ try {
3043
+ const value = typeof raw === "string" ? JSON.parse(raw || "{}") : raw;
3044
+ if (value && typeof value === "object" && !Array.isArray(value)) parsed = value;
3045
+ } catch {
3046
+ }
3047
+ const stamp = Object.fromEntries(
3048
+ stampKeys.map((key) => [key, typeof parsed[key] === "string" ? parsed[key] : ""])
3049
+ );
3050
+ return {
3051
+ ...stamp,
3052
+ sealPosition: { ...isSealPosition(parsed.sealPosition) ? parsed.sealPosition : fallback }
3053
+ };
3054
+ }
3055
+ function isSealStamped(raw) {
3056
+ try {
3057
+ const value = typeof raw === "string" ? JSON.parse(raw || "{}") : raw;
3058
+ return !!value && typeof value.sealId === "string" && !!value.sealId && typeof value.sealImage === "string" && !!value.sealImage;
3059
+ } catch {
3060
+ return false;
3061
+ }
3062
+ }
3063
+ function isValidSealValue(raw) {
3064
+ try {
3065
+ const value = typeof raw === "string" ? JSON.parse(raw || "{}") : raw;
3066
+ return !!value && stampKeys.every((key) => typeof value[key] === "string") && isSealPosition(value.sealPosition) && (stampKeys.every((key) => !value[key]) || stampKeys.every((key) => !!value[key]));
3067
+ } catch {
3068
+ return false;
3069
+ }
3070
+ }
3071
+ function moveSealValue(raw, fallback, position) {
3072
+ return JSON.stringify({ ...readSealValue(raw, fallback), sealPosition: { ...position } });
3073
+ }
3074
+ function stampSealValue(raw, fallback, stamp) {
3075
+ const current = readSealValue(raw, fallback);
3076
+ const next = readSealValue({ ...stamp, sealPosition: current.sealPosition }, fallback);
3077
+ return JSON.stringify(next);
3078
+ }
3079
+ function clearSealValue(raw, fallback) {
3080
+ return JSON.stringify(
3081
+ readSealValue({ sealPosition: readSealValue(raw, fallback).sealPosition }, fallback)
3082
+ );
3083
+ }
3084
+ function normalizeSealDiameter(value) {
3085
+ const diameter = Number(value);
3086
+ return Number.isFinite(diameter) && diameter > 0 ? Math.min(diameter, 200) : 42;
3087
+ }
3088
+ function clampSealPosition(position, widthMm, heightMm, diameterMm) {
3089
+ return {
3090
+ ...position,
3091
+ leftMm: Math.max(0, Math.min(position.leftMm, Math.max(0, widthMm - diameterMm))),
3092
+ topMm: Math.max(0, Math.min(position.topMm, Math.max(0, heightMm - diameterMm)))
3093
+ };
3094
+ }
3095
+ function initializeSealFields(fields, formData) {
3096
+ for (const { props } of fields) {
3097
+ if (!props.field || props.isFieldModel || props.subFieldKey) continue;
3098
+ const raw = formData[props.field];
3099
+ if (raw == null || raw === "") {
3100
+ formData[props.field] = JSON.stringify(readSealValue("", props.sealPosition));
3101
+ continue;
3102
+ }
3103
+ try {
3104
+ const parsed = typeof raw === "string" ? JSON.parse(raw) : raw;
3105
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) continue;
3106
+ if (!isSealPosition(parsed.sealPosition)) {
3107
+ formData[props.field] = JSON.stringify({
3108
+ ...parsed,
3109
+ sealPosition: { ...props.sealPosition }
3110
+ });
3111
+ } else if (typeof raw !== "string") {
3112
+ formData[props.field] = JSON.stringify(parsed);
3113
+ }
3114
+ } catch {
3115
+ }
3116
+ }
3117
+ }
3118
+ const { identify, calculate: calculate$1 } = {
3119
+ identify: (expression) => window.NocodeAdapter.utils?.formulaIdentify?.(expression) ?? [],
3120
+ calculate: (expression, data) => window.NocodeAdapter.utils?.formulaCalculate?.(expression, data)
3121
+ };
3122
+ const getFieldDataValue = (parseInfo, formData) => {
3123
+ const getTextValue = (processedKey, value) => {
3124
+ const textValue = value ?? formData?.[processedKey] ?? "";
3125
+ return Array.isArray(textValue) ? textValue.join() : textValue;
3126
+ };
3127
+ const { type: type4, processed, hashValue } = parseInfo;
3128
+ if (type4 === "hash") {
3129
+ const tableData = toRaw(formData?.[hashValue] || []);
3130
+ return tableData.filter((d) => !d.deleted_).map((row) => getTextValue(processed, row?.[processed])).filter((i) => !isNil(i));
3131
+ }
3132
+ return getTextValue(processed, formData?.[processed]);
3133
+ };
3134
+ const parseFormulaVar = (formulaVar) => {
3135
+ const result = {
3136
+ original: formulaVar,
3137
+ type: "",
3138
+ processed: "",
3139
+ hashValue: "",
3140
+ dataType: ""
3141
+ };
3142
+ if (/^\$([^$]+)\$\.(.+)$/.test(formulaVar)) {
3143
+ const match = formulaVar.match(/^\$([^$]+)\$\.(.+)$/);
3144
+ result.type = "hash";
3145
+ result.processed = match[2];
3146
+ result.hashValue = match[1];
3147
+ result.dataType = "globType";
3148
+ } else if (/^_\.(.+)$/.test(formulaVar)) {
3149
+ const match = formulaVar.match(/^_\.(.+)$/);
3150
+ result.type = "underscore";
3151
+ result.processed = match[1];
3152
+ result.dataType = "currentRowType";
3153
+ } else {
3154
+ result.type = "plain";
3155
+ result.processed = formulaVar;
3156
+ result.dataType = "globType";
3157
+ }
3158
+ return result;
3159
+ };
3160
+ const getParseFormulaVarInfos = (expr) => {
3161
+ const rowArgs = expr ? identify(expr) : [];
3162
+ return {
3163
+ rowArgs,
3164
+ parseInfos: rowArgs.map((curr) => parseFormulaVar(curr))
3165
+ };
3166
+ };
3167
+ const calculateFormula = async (expr, formData, instanceFormState) => {
3168
+ const rowArgs = identify(expr);
3169
+ const formulaData = isEmpty(rowArgs) ? {} : rowArgs.reduce((total, curr) => {
3170
+ const parseInfo = parseFormulaVar(curr);
3171
+ total[curr] = getFieldDataValue(
3172
+ parseInfo,
3173
+ parseInfo.dataType === "currentRowType" ? formData : instanceFormState
3174
+ );
3175
+ return total;
3176
+ }, {});
3177
+ return calculate$1(expr, formulaData);
3178
+ };
3179
+ const isEmptyValue = (value) => {
3180
+ return value === void 0 || value === null || typeof value === "string" && value.trim() === "" || Array.isArray(value) && value.length === 0;
3181
+ };
3182
+ const compareByOp = (left, right, op) => {
3183
+ switch (op) {
3184
+ case RangeCompareOp.LT:
3185
+ return left < right;
3186
+ case RangeCompareOp.LE:
3187
+ return left <= right;
3188
+ case RangeCompareOp.GT:
3189
+ return left > right;
3190
+ case RangeCompareOp.GE:
3191
+ default:
3192
+ return left >= right;
3193
+ }
3194
+ };
3195
+ const rangeCompareMessage = (op, val) => {
3196
+ switch (op) {
3197
+ case RangeCompareOp.LT:
3198
+ return $t("sys.fieldValueNotGreaterOrEqual", { val });
3199
+ case RangeCompareOp.LE:
3200
+ return $t("sys.fieldValueNoMoreThan", { val });
3201
+ case RangeCompareOp.GT:
3202
+ return $t("sys.fieldValueNotLessOrEqual", { val });
3203
+ case RangeCompareOp.GE:
3204
+ default:
3205
+ return $t("sys.fieldValueNotLessThan", { val });
3206
+ }
3207
+ };
3208
+ const toUnixTimestamp = (input) => {
3209
+ if (isNil(input) || input === "") return null;
3210
+ const asNumber = typeof input === "number" || typeof input === "string" && /^-?\d+(\.\d+)?$/.test(input.trim());
3211
+ if (asNumber) {
3212
+ const n = Number(input);
3213
+ if (Number.isNaN(n)) return null;
3214
+ const parsed2 = n > 1e12 ? dayjs(n) : dayjs.unix(n);
3215
+ return parsed2.isValid() ? parsed2.unix() : null;
3216
+ }
3217
+ const parsed = dayjs(input);
3218
+ return parsed.isValid() ? parsed.unix() : null;
3219
+ };
3220
+ const buildError = (validatorInfo, message2) => JSON.stringify({ ...validatorInfo, message: message2 });
3221
+ function areValidationCommentsEqual(left, right) {
3222
+ const serialize = (comments) => JSON.stringify(
3223
+ comments,
3224
+ (_key, value) => value && typeof value === "object" && "message" in value ? { ...value, message: value.message } : value
3225
+ );
3226
+ return serialize(left) === serialize(right);
3227
+ }
3228
+ const createRule = (validator, message2, trigger = "change") => ({
3229
+ required: true,
3230
+ validator,
3231
+ message: message2,
3232
+ trigger
3233
+ });
3234
+ function relocateDeletedRowsToEnd(rows = []) {
3235
+ const active = [];
3236
+ const deleted = [];
3237
+ for (const row of rows) {
3238
+ if (row?.deleted_) deleted.push(row);
3239
+ else active.push(row);
3240
+ }
3241
+ return [...active, ...deleted];
3242
+ }
3243
+ function filterRulesByTrigger(rules2, trigger) {
3244
+ return rules2.filter((rule) => {
3245
+ const ruleTrigger = rule.trigger;
3246
+ if (!ruleTrigger) return trigger === "change";
3247
+ if (trigger === "blur") {
3248
+ return ruleTrigger === "blur" || ruleTrigger === "change";
3249
+ }
3250
+ return ruleTrigger === trigger;
3251
+ });
3252
+ }
3253
+ function assembleRules(input) {
3254
+ const { showRequired, fieldType, validatorInfo, props } = input;
3255
+ const {
3256
+ minlength,
3257
+ maxlength,
3258
+ regex,
3259
+ regexHint,
3260
+ validateTrue,
3261
+ validateFalse,
3262
+ enableRangeValidate,
3263
+ maxValidateMode,
3264
+ minValidateMode,
3265
+ maxCompareOp,
3266
+ minCompareOp,
3267
+ minValue,
3268
+ maxValue,
3269
+ minFormulaExpr,
3270
+ maxFormulaExpr,
3271
+ minDate,
3272
+ maxDate,
3273
+ minDateFormulaExpr,
3274
+ maxDateFormulaExpr,
3275
+ maxDateValidateMode,
3276
+ minDateValidateMode
3277
+ } = props;
3278
+ const resolvedMaxCompareOp = maxCompareOp ?? RangeCompareOp.LE;
3279
+ const resolvedMinCompareOp = minCompareOp ?? RangeCompareOp.GE;
3280
+ const RuleProps = [];
3281
+ if (props.bizType === FIELD_TYPE.SEAL) {
3282
+ if (showRequired) {
3283
+ RuleProps.push(
3284
+ createRule(
3285
+ (_rule, value) => isSealStamped(value),
3286
+ buildError(
3287
+ { ...validatorInfo, validationCode: "seal-required" },
3288
+ $t("sys.fieldRequired")
3289
+ ),
3290
+ "manual"
3291
+ )
3292
+ );
3293
+ }
3294
+ RuleProps.push(createRule((_rule, value) => isEmptyValue(value) || isValidSealValue(value), buildError(validatorInfo, $t("sys.seal.invalid"))));
3295
+ return RuleProps;
3296
+ }
3297
+ if (showRequired) {
3298
+ RuleProps.push(
3299
+ createRule(
3300
+ (_rule, value) => !isEmptyValue(value),
3301
+ buildError(validatorInfo, $t("sys.fieldRequired")),
3302
+ "manual"
3303
+ )
3304
+ );
3305
+ }
3306
+ if (!isNil(minlength)) {
3307
+ RuleProps.push(
3308
+ createRule((_rule, value) => {
3309
+ if (isEmptyValue(value)) return true;
3310
+ return String(value).length >= minlength;
3311
+ }, buildError(validatorInfo, $t("sys.fieldLengthNotLessThan", { len: minlength })))
3312
+ );
3313
+ }
3314
+ const effectiveMaxlength = isNil(maxlength) && fieldType === FIELD_TYPE.TEXT ? 1024 : maxlength;
3315
+ if (!isNil(effectiveMaxlength)) {
3316
+ RuleProps.push(
3317
+ createRule((_rule, value) => {
3318
+ if (isEmptyValue(value)) return true;
3319
+ return String(value).length <= effectiveMaxlength;
3320
+ }, buildError(validatorInfo, $t("sys.fieldLengthNoMoreThan", { len: effectiveMaxlength })))
3321
+ );
3322
+ }
3323
+ if (regex) {
3324
+ RuleProps.push(
3325
+ createRule((_rule, value) => {
3326
+ if (isEmptyValue(value)) return true;
3327
+ return new RegExp(regex).test(value);
3328
+ }, buildError(validatorInfo, regexHint ?? $t("sys.fieldFormatError")))
3329
+ );
3330
+ }
3331
+ if (validateTrue) {
3332
+ RuleProps.push({
3333
+ required: true,
3334
+ trigger: "manual",
3335
+ validator: (_rule, value) => value === true,
3336
+ message: buildError(validatorInfo, $t("sys.fieldValueNeedTrue"))
3337
+ });
3338
+ }
3339
+ if (validateFalse) {
3340
+ RuleProps.push({
3341
+ required: true,
3342
+ trigger: "manual",
3343
+ validator: (_rule, value) => value === false,
3344
+ message: buildError(validatorInfo, $t("sys.fieldValueNeedFalse"))
3345
+ });
3346
+ }
3347
+ if (!enableRangeValidate) {
3348
+ return RuleProps;
3349
+ }
3350
+ if (minValidateMode === RangeValidateMode.Fixed_Number && !isEmptyValue(minValue)) {
3351
+ RuleProps.push(
3352
+ createRule((_rule, value) => {
3353
+ if (isEmptyValue(value)) return true;
3354
+ return compareByOp(Number(value), Number(minValue), resolvedMinCompareOp);
3355
+ }, buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, minValue)))
3356
+ );
3357
+ }
3358
+ if (minValidateMode === RangeValidateMode.Variable_Validate && minFormulaExpr) {
3359
+ RuleProps.push({
3360
+ required: true,
3361
+ trigger: "change",
3362
+ validator: async (_rule, value, _callback, _source, options) => {
3363
+ const currentFormData = getCurrentFormData(_rule, options);
3364
+ const formulaValue = await calculateFormula(
3365
+ minFormulaExpr,
3366
+ currentFormData,
3367
+ options?.formData
3368
+ );
3369
+ if (isEmptyValue(formulaValue)) {
3370
+ return Promise.resolve();
3371
+ }
3372
+ const parsedMin = parseFloat(formulaValue);
3373
+ if (!isNaN(parsedMin)) {
3374
+ if (isEmptyValue(value)) {
3375
+ return Promise.resolve();
3376
+ }
3377
+ if (!compareByOp(Number(value), parsedMin, resolvedMinCompareOp)) {
3378
+ return Promise.reject(
3379
+ new Error(
3380
+ buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, parsedMin))
3381
+ )
3382
+ );
3383
+ }
3384
+ }
3385
+ return Promise.resolve();
3386
+ }
3387
+ });
3388
+ }
3389
+ if (maxValidateMode === RangeValidateMode.Fixed_Number && !isEmptyValue(maxValue)) {
3390
+ RuleProps.push(
3391
+ createRule((_rule, value) => {
3392
+ if (isEmptyValue(value)) return true;
3393
+ return compareByOp(Number(value), Number(maxValue), resolvedMaxCompareOp);
3394
+ }, buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, maxValue)))
3395
+ );
3396
+ }
3397
+ if (maxValidateMode === RangeValidateMode.Variable_Validate && maxFormulaExpr) {
3398
+ RuleProps.push({
3399
+ required: true,
3400
+ trigger: "change",
3401
+ validator: async (_rule, value, _callback, _source, options) => {
3402
+ const currentFormData = getCurrentFormData(_rule, options);
3403
+ const formulaValue = await calculateFormula(
3404
+ maxFormulaExpr,
3405
+ currentFormData,
3406
+ options?.formData
3407
+ );
3408
+ if (isEmptyValue(formulaValue)) {
3409
+ return Promise.resolve();
3410
+ }
3411
+ const parsedMax = parseFloat(formulaValue);
3412
+ if (!isNaN(parsedMax)) {
3413
+ if (isEmptyValue(value)) {
3414
+ return Promise.resolve();
3415
+ }
3416
+ if (!compareByOp(Number(value), parsedMax, resolvedMaxCompareOp)) {
3417
+ return Promise.reject(
3418
+ new Error(
3419
+ buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, parsedMax))
3420
+ )
3421
+ );
3422
+ }
3423
+ }
3424
+ return Promise.resolve();
3425
+ }
3426
+ });
3427
+ }
3428
+ if (minDateValidateMode === RangeValidateMode.Fixed_Number && minDate) {
3429
+ RuleProps.push(
3430
+ createRule((_rule, value) => {
3431
+ if (isEmptyValue(value)) return true;
3432
+ const inputTime = dayjs(value).unix();
3433
+ const minTimestamp = dayjs(minDate).unix();
3434
+ if (!dayjs(value).isValid() || !dayjs(minDate).isValid()) return true;
3435
+ return compareByOp(inputTime, minTimestamp, resolvedMinCompareOp);
3436
+ }, buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, minDate)))
3437
+ );
3438
+ }
3439
+ if (maxDateValidateMode === RangeValidateMode.Fixed_Number && maxDate) {
3440
+ RuleProps.push(
3441
+ createRule((_rule, value) => {
3442
+ if (isEmptyValue(value)) return true;
3443
+ const inputTime = dayjs(value).unix();
3444
+ const maxTimestamp = dayjs(maxDate).unix();
3445
+ if (!dayjs(value).isValid() || !dayjs(maxDate).isValid()) return true;
3446
+ return compareByOp(inputTime, maxTimestamp, resolvedMaxCompareOp);
3447
+ }, buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, maxDate)))
3448
+ );
3449
+ }
3450
+ if (minDateValidateMode === RangeValidateMode.Variable_Validate && minDateFormulaExpr) {
3451
+ RuleProps.push({
3452
+ required: true,
3453
+ trigger: "change",
3454
+ validator: async (_rule, value, _callback, _source, options) => {
3455
+ const currentFormData = getCurrentFormData(_rule, options);
3456
+ const formulaValue = await calculateFormula(
3457
+ minDateFormulaExpr,
3458
+ currentFormData,
3459
+ options?.formData
3460
+ );
3461
+ const limitTime = toUnixTimestamp(formulaValue);
3462
+ if (limitTime !== null) {
3463
+ if (isEmptyValue(value)) {
3464
+ return Promise.resolve();
3465
+ }
3466
+ if (!dayjs(value).isValid()) {
3467
+ return Promise.resolve();
3468
+ }
3469
+ const inputTime = dayjs(value).unix();
3470
+ const fmt = fieldType === FIELD_TYPE.DATE_TIME ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
3471
+ if (!compareByOp(inputTime, limitTime, resolvedMinCompareOp)) {
3472
+ return Promise.reject(
3473
+ new Error(
3474
+ buildError(
3475
+ validatorInfo,
3476
+ rangeCompareMessage(resolvedMinCompareOp, dayjs.unix(limitTime).format(fmt))
3477
+ )
3478
+ )
3479
+ );
3480
+ }
3481
+ }
3482
+ return Promise.resolve();
3483
+ }
3484
+ });
3485
+ }
3486
+ if (maxDateValidateMode === RangeValidateMode.Variable_Validate && maxDateFormulaExpr) {
3487
+ RuleProps.push({
3488
+ required: true,
3489
+ trigger: "change",
3490
+ validator: async (_rule, value, _callback, _source, options) => {
3491
+ const currentFormData = getCurrentFormData(_rule, options);
3492
+ const formulaValue = await calculateFormula(
3493
+ maxDateFormulaExpr,
3494
+ currentFormData,
3495
+ options?.formData
3496
+ );
3497
+ const limitTime = toUnixTimestamp(formulaValue);
3498
+ if (limitTime !== null) {
3499
+ if (isEmptyValue(value)) {
3500
+ return Promise.resolve();
3501
+ }
3502
+ if (!dayjs(value).isValid()) {
3503
+ return Promise.resolve();
3504
+ }
3505
+ const inputTime = dayjs(value).unix();
3506
+ const fmt = fieldType === FIELD_TYPE.DATE_TIME ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
3507
+ if (!compareByOp(inputTime, limitTime, resolvedMaxCompareOp)) {
3508
+ return Promise.reject(
3509
+ new Error(
3510
+ buildError(
3511
+ validatorInfo,
3512
+ rangeCompareMessage(resolvedMaxCompareOp, dayjs.unix(limitTime).format(fmt))
3513
+ )
3514
+ )
3515
+ );
3516
+ }
3517
+ }
3518
+ return Promise.resolve();
3519
+ }
3520
+ });
3521
+ }
3522
+ return RuleProps;
3523
+ }
2983
3524
  function resolveKeepExceptionHighlight(formValue, fieldValue) {
2984
3525
  if (typeof fieldValue === "boolean") {
2985
3526
  return fieldValue;
@@ -3105,7 +3646,7 @@ function clearResolvedManualErrors(map, resolvePayload) {
3105
3646
  if (!payload) continue;
3106
3647
  const hasManual = filterRulesByTrigger(payload.rules, "manual").length > 0;
3107
3648
  const hasLive = filterRulesByTrigger(payload.rules, "change").length > 0;
3108
- if (hasManual && !hasLive && !isEmptyValue$1(payload.value)) {
3649
+ if (hasManual && !hasLive && !isEmptyValue(payload.value)) {
3109
3650
  delete next[path];
3110
3651
  }
3111
3652
  }
@@ -3119,7 +3660,7 @@ function mergeLiveValidation(current, liveResult, livePaths, resolvePayload) {
3119
3660
  continue;
3120
3661
  }
3121
3662
  const payload = resolvePayload(path);
3122
- const keepManualComment = !!payload && filterRulesByTrigger(payload.rules, "manual").length > 0 && isEmptyValue$1(payload.value) && !!base[path]?.length;
3663
+ const keepManualComment = !!payload && filterRulesByTrigger(payload.rules, "manual").length > 0 && isEmptyValue(payload.value) && !!base[path]?.length;
3123
3664
  if (!keepManualComment) {
3124
3665
  delete base[path];
3125
3666
  }
@@ -3162,7 +3703,7 @@ function mergeDisplayValidation(current, displayResult, ruleKeys, validatedPaths
3162
3703
  next[path] = displayResult[path];
3163
3704
  } else {
3164
3705
  const payload = resolvePayload(path);
3165
- const keepManualComment = !!payload && filterRulesByTrigger(payload.rules, "manual").length > 0 && isEmptyValue$1(payload.value) && !!next[path]?.length;
3706
+ const keepManualComment = !!payload && filterRulesByTrigger(payload.rules, "manual").length > 0 && isEmptyValue(payload.value) && !!next[path]?.length;
3166
3707
  if (!keepManualComment) delete next[path];
3167
3708
  }
3168
3709
  }
@@ -10338,112 +10879,127 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10338
10879
  });
10339
10880
  const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53d7e66c"]]);
10340
10881
  export {
10341
- RuntimeSheetService as $,
10342
- useStyles as A,
10882
+ _sfc_main$5 as $,
10883
+ getObjectBomProductQuery as A,
10343
10884
  BorderTD as B,
10344
- useDependency as C,
10885
+ normalizeHistoricalAutofillRow as C,
10345
10886
  DEFAULT_BOOLEAN_FIELD_WIDTH as D,
10346
10887
  EMPTY_PRODUCT_VERSION_ID as E,
10347
- useFieldPresentation as F,
10348
- useRuntimeEditorFlusher as G,
10349
- createRuntimeInstanceContext as H,
10350
- RuntimeInstanceRegistry as I,
10351
- RequiredQtyCalcRule as J,
10352
- registerFormulaFuncs as K,
10353
- DocumentPaper as L,
10888
+ readSealValue as F,
10889
+ isSealStamped as G,
10890
+ stampSealValue as H,
10891
+ isValidSealValue as I,
10892
+ clearSealValue as J,
10893
+ parseRuntimeFieldPath as K,
10894
+ calculateFormula as L,
10354
10895
  MAX_RUNTIME_SHEETS as M,
10355
10896
  NCB_PROVIDE as N,
10356
- DynamicTableAction as O,
10357
- getRuntimeDataFieldId as P,
10358
- buildRuntimeFieldPath as Q,
10359
- RuntimeFormStateStore as R,
10360
- ScanParamType as S,
10361
- resolveRuntimeFieldProps as T,
10362
- resolveRuntimeFieldState as U,
10363
- getRuntimeDependencyOutputKey as V,
10364
- isRowAddedInCurrentFormChange as W,
10365
- MaterialConsumeTableController as X,
10366
- setFormulaParamsConfig as Y,
10367
- normalizeRuntime as Z,
10368
- _sfc_main$5 as _,
10897
+ useStyles as O,
10898
+ useDependency as P,
10899
+ useFieldPresentation as Q,
10900
+ useRuntimeEditorFlusher as R,
10901
+ RuntimeFormStateStore as S,
10902
+ createRuntimeInstanceContext as T,
10903
+ RuntimeInstanceRegistry as U,
10904
+ ScanParamType as V,
10905
+ RequiredQtyCalcRule as W,
10906
+ registerFormulaFuncs as X,
10907
+ moveSealValue as Y,
10908
+ DocumentPaper as Z,
10909
+ DynamicTableAction as _,
10369
10910
  MAX_RUNTIME_SHEET_TITLE_LENGTH as a,
10370
- validateObjectBomQtyOnSubmit as a0,
10371
- closeValidatorPopovers as a1,
10372
- enrichFormChangeRowDetails as a2,
10373
- useMaterialBalance as a3,
10374
- collectFormChangeFieldLocations as a4,
10375
- nextFormChangeRowViewHistoryId as a5,
10376
- DeviceConnector as a6,
10377
- DocumentLoading as a7,
10378
- DynamicQuickFillModal as a8,
10379
- FixedQuickFillModal as a9,
10380
- recordSubtableRowDelete as aA,
10381
- resolveAnnotationFieldLocation as aB,
10382
- resolveFormChangeRowUi as aC,
10383
- resolveRowFormChangeMark as aD,
10384
- setSelectMobileTdId as aE,
10385
- stripLegacyFormConfigFromPaper as aF,
10386
- SubTableActionMenuTypeEnum as aG,
10387
- getMenuByAction as aH,
10388
- SubTableActionEnum as aI,
10389
- resolveScanFillData as aJ,
10390
- getInsertSubMenu as aK,
10391
- resolveScanAdjustType as aL,
10392
- resolveScanQty as aM,
10393
- toDateOnly as aN,
10394
- hasSubtableBusinessData as aO,
10395
- getCopySubMenu as aP,
10396
- resolveScanParsedValue as aQ,
10397
- isProductBatchEmptyRow as aR,
10398
- FormTmplConfigController as aa,
10399
- LEGACY_RUNTIME_FORM_CONFIG_KEYS as ab,
10400
- LEGACY_RUNTIME_SHEET_ID as ac,
10401
- LEGACY_RUNTIME_SHEET_TITLE as ad,
10402
- MCDataUtil as ae,
10403
- OCR_MODEL_PRECISION_ENUM_KEY as af,
10404
- RuntimeAsyncTaskCoordinator as ag,
10405
- RuntimeDependencyService as ah,
10406
- RuntimeFieldRegistry as ai,
10407
- RuntimeInstanceEventBus as aj,
10408
- RuntimePersistenceCoordinator as ak,
10409
- RuntimeValidationService as al,
10410
- SubTableCore as am,
10411
- buildFormChangeDisplayRows as an,
10412
- convertV1Runtime as ao,
10413
- detailsHaveFormChangeRowOps as ap,
10414
- extractFormChangeRowDetails as aq,
10415
- getFormChangeRowKey as ar,
10416
- getFormChangeRowOp as as,
10417
- getSubTableQuickFillInfo as at,
10418
- isAnnLocationSelected as au,
10419
- isBlank as av,
10420
- isFormChangeGhostRow as aw,
10421
- normalizeHistoricalFieldConfig as ax,
10422
- pickObjectFieldKeys as ay,
10423
- recordSubtableRowAdd as az,
10911
+ resolveScanQty as a$,
10912
+ getRuntimeDataFieldId as a0,
10913
+ buildRuntimeFieldPath as a1,
10914
+ resolveRuntimeFieldProps as a2,
10915
+ resolveRuntimeFieldState as a3,
10916
+ assembleRules as a4,
10917
+ isAttachFieldActive as a5,
10918
+ getRuntimeDependencyOutputKey as a6,
10919
+ isRowAddedInCurrentFormChange as a7,
10920
+ MaterialConsumeTableController as a8,
10921
+ setFormulaParamsConfig as a9,
10922
+ SubTableCore as aA,
10923
+ buildFormChangeDisplayRows as aB,
10924
+ convertV1Runtime as aC,
10925
+ detailsHaveFormChangeRowOps as aD,
10926
+ extractFormChangeRowDetails as aE,
10927
+ getFormChangeRowKey as aF,
10928
+ getFormChangeRowOp as aG,
10929
+ getSubTableQuickFillInfo as aH,
10930
+ isAnnLocationSelected as aI,
10931
+ isBlank as aJ,
10932
+ isFormChangeGhostRow as aK,
10933
+ normalizeHistoricalFieldConfig as aL,
10934
+ pickObjectFieldKeys as aM,
10935
+ recordSubtableRowAdd as aN,
10936
+ recordSubtableRowDelete as aO,
10937
+ relocateDeletedRowsToEnd as aP,
10938
+ resolveAnnotationFieldLocation as aQ,
10939
+ resolveFormChangeRowUi as aR,
10940
+ resolveRowFormChangeMark as aS,
10941
+ setSelectMobileTdId as aT,
10942
+ stripLegacyFormConfigFromPaper as aU,
10943
+ SubTableActionMenuTypeEnum as aV,
10944
+ getMenuByAction as aW,
10945
+ SubTableActionEnum as aX,
10946
+ resolveScanFillData as aY,
10947
+ getInsertSubMenu as aZ,
10948
+ resolveScanAdjustType as a_,
10949
+ normalizeRuntime as aa,
10950
+ initializeSealFields as ab,
10951
+ RuntimeSheetService as ac,
10952
+ validateObjectBomQtyOnSubmit as ad,
10953
+ areValidationCommentsEqual as ae,
10954
+ closeValidatorPopovers as af,
10955
+ enrichFormChangeRowDetails as ag,
10956
+ useMaterialBalance as ah,
10957
+ collectFormChangeFieldLocations as ai,
10958
+ nextFormChangeRowViewHistoryId as aj,
10959
+ DeviceConnector as ak,
10960
+ DocumentLoading as al,
10961
+ DynamicQuickFillModal as am,
10962
+ FixedQuickFillModal as an,
10963
+ FormTmplConfigController as ao,
10964
+ LEGACY_RUNTIME_FORM_CONFIG_KEYS as ap,
10965
+ LEGACY_RUNTIME_SHEET_ID as aq,
10966
+ LEGACY_RUNTIME_SHEET_TITLE as ar,
10967
+ MCDataUtil as as,
10968
+ OCR_MODEL_PRECISION_ENUM_KEY as at,
10969
+ RuntimeAsyncTaskCoordinator as au,
10970
+ RuntimeDependencyService as av,
10971
+ RuntimeFieldRegistry as aw,
10972
+ RuntimeInstanceEventBus as ax,
10973
+ RuntimePersistenceCoordinator as ay,
10974
+ RuntimeValidationService as az,
10424
10975
  MULTI_SHEET_SCHEMA_VERSION as b,
10425
- createRuntimeDocumentV2 as c,
10426
- normalizeHistoricalBusinessRow as d,
10427
- DeviceLinkTmplUtil as e,
10428
- normalizeAIOcrTmpl as f,
10429
- getBusinessFieldKey as g,
10430
- useWidgetStaticAttrs as h,
10431
- useRuntimeInstanceServices as i,
10432
- setSelectAnnotationId as j,
10433
- useRuntimeRowState as k,
10434
- getObjectBomMaterialLotQuery as l,
10435
- buildObjectLotExtraQuery as m,
10436
- normalizeFieldWidth as n,
10437
- MaterialConsumptionPatternEnum as o,
10438
- resolveObjectBomEntry as p,
10439
- runWithFillProduct as q,
10976
+ toDateOnly as b0,
10977
+ hasSubtableBusinessData as b1,
10978
+ getCopySubMenu as b2,
10979
+ resolveScanParsedValue as b3,
10980
+ isProductBatchEmptyRow as b4,
10981
+ getBusinessFieldKey as c,
10982
+ createRuntimeDocumentV2 as d,
10983
+ clampSealPosition as e,
10984
+ normalizeFieldWidth as f,
10985
+ getParseFormulaVarInfos as g,
10986
+ normalizeHistoricalBusinessRow as h,
10987
+ DeviceLinkTmplUtil as i,
10988
+ normalizeAIOcrTmpl as j,
10989
+ useWidgetStaticAttrs as k,
10990
+ useRuntimeInstanceServices as l,
10991
+ setSelectAnnotationId as m,
10992
+ normalizeSealDiameter as n,
10993
+ useRuntimeRowState as o,
10994
+ getObjectBomMaterialLotQuery as p,
10995
+ buildObjectLotExtraQuery as q,
10440
10996
  resolveObjectFieldKeys as r,
10441
10997
  setSelectValidatorId as s,
10442
- useNocodeFormWidget as t,
10998
+ MaterialConsumptionPatternEnum as t,
10443
10999
  useFormTmplConfig as u,
10444
11000
  validateObjectBomForScan as v,
10445
- applyConsumeObjectTraceChange as w,
10446
- getObjectBomProductQuery as x,
10447
- normalizeHistoricalAutofillRow as y,
10448
- parseRuntimeFieldPath as z
11001
+ resolveObjectBomEntry as w,
11002
+ runWithFillProduct as x,
11003
+ useNocodeFormWidget as y,
11004
+ applyConsumeObjectTraceChange as z
10449
11005
  };