@gct-paas/excel 0.1.39-beta.47 → 0.1.39-beta.49

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 (97) hide show
  1. package/dist/{BaseComponent-B4z-0IvX.js → BaseComponent-C1h429zs.js} +2 -2
  2. package/dist/{VueVideoPlayer-CsiWnQT8.js → VueVideoPlayer-Ca23ED7v.js} +2 -2
  3. package/dist/{align-editor-CRjMBiv1.js → align-editor-6c2LC6xc.js} +1 -1
  4. package/dist/{barcode-design-CkIF3AdC.js → barcode-design-C_xO0jor.js} +2 -2
  5. package/dist/base/index.es.js +109 -62
  6. package/dist/{diagonal-design-CBGnh101.js → diagonal-design-BFxBAG3i.js} +2 -2
  7. package/dist/{dynamic-table-action-ZAmTIvcp.js → dynamic-table-action-DFabTKVv.js} +119 -82
  8. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DTkBFPUl.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang--M6ES58_.js} +382 -368
  9. package/dist/{edit.utils-CXmmCnxE-Be_Jj92u.js → edit.utils-CXmmCnxE-CW2WVjJi.js} +1 -1
  10. package/dist/excel.css +2 -2
  11. package/dist/{exceljs.min-BdYR3omv.js → exceljs.min-vOmepi6j.js} +2 -2
  12. package/dist/{font-editor-C40nR0g-.js → font-editor-CNA-69tk.js} +3 -3
  13. package/dist/{image-design-CjDaoN6i.js → image-design-DAMqKfR4.js} +2 -2
  14. package/dist/{index-C3YwX02a.js → index-2SkzLFoC.js} +2 -2
  15. package/dist/{index-BYLb70Wd.js → index-5B4uB3JL.js} +2 -2
  16. package/dist/{index-CAeGCpqZ.js → index-6CT_4Jha.js} +1 -1
  17. package/dist/{index-KGWuZtk7.js → index-B-wN9cvQ.js} +2 -2
  18. package/dist/{index-BJh9up1X.js → index-BEVtkZps.js} +1 -1
  19. package/dist/{index-BMTx6T5g.js → index-BH2VaJgM.js} +3 -3
  20. package/dist/{index-YqLRgg7Y.js → index-BJ7AkCbB.js} +2 -2
  21. package/dist/{index-CSl64wAM.js → index-BJFbn7eK.js} +3 -3
  22. package/dist/{index-DPrC3u3G.js → index-BV8-rI9q.js} +3 -3
  23. package/dist/{index-BQMXQ1X0.js → index-BVR1UCrj.js} +2 -2
  24. package/dist/{index-6v9F3V5a.js → index-BVYi3rfK.js} +3 -3
  25. package/dist/{index-Cl-nmu1E.js → index-Bnn8D9vx.js} +1 -1
  26. package/dist/{index-BJOhGaZ4.js → index-Bq_rp1rw.js} +2 -2
  27. package/dist/{index-BTUEzj0j.js → index-BrB6jgrE.js} +2 -2
  28. package/dist/{index-DxBNlXoA.js → index-BxIQyIEM.js} +2 -2
  29. package/dist/{index-DrzUn5zx.js → index-CHQfSnNJ.js} +1 -1
  30. package/dist/{index-jzjOcKYl.js → index-CSHFxbHp.js} +2 -2
  31. package/dist/{index-r-T7O_NL.js → index-Ce9iZFsC.js} +2 -2
  32. package/dist/{index-9bqJP9tH.js → index-ChioR7wt.js} +2 -2
  33. package/dist/{index-CbkZXECS.js → index-Cxjc25sU.js} +3 -3
  34. package/dist/{index-CLFvRsjI.js → index-D-dP3cGJ.js} +2 -2
  35. package/dist/{index-BhwTs4qO.js → index-D1bnU20t.js} +2 -2
  36. package/dist/{index-CwFhzKly.js → index-DAVD3o_T.js} +2 -2
  37. package/dist/{index-DHtjlchw.js → index-DNNqAs8a.js} +168 -149
  38. package/dist/{index-C1Ew74_3.js → index-DOyoMEXD.js} +1 -1
  39. package/dist/{index-CRyXfD1E.js → index-DRu1a_M6.js} +2 -2
  40. package/dist/{index-C8ZmRWFO.js → index-DZ_chfLG.js} +4 -4
  41. package/dist/{index-Dp514iQN.js → index-DjHFRe8n.js} +3 -3
  42. package/dist/{index-CJNVJa0j.js → index-DloaUH4l.js} +2 -2
  43. package/dist/{index-CMBdCQdv.js → index-Es4YDRo8.js} +1 -1
  44. package/dist/{index-BTYJa5FX.js → index-LgYJM2d4.js} +1 -1
  45. package/dist/{index-DGEWt4fq.js → index-ZSXgrukM.js} +1 -1
  46. package/dist/{index-DXJ2ZLjB.js → index-h65oY0wv.js} +1 -1
  47. package/dist/{index-e2fj0ZUQ.js → index-vYnnD6AY.js} +1 -1
  48. package/dist/{index-BJg7lRhl.js → index-zmFqYyCW.js} +2 -2
  49. package/dist/index.es.js +2 -2
  50. package/dist/{mb-render-C7bYBZNr.js → mb-render-HYBbL4je.js} +1 -1
  51. package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-Bj9EoXh1.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-NbLtIf54.js} +1 -1
  52. package/dist/{pagination-design-DvuhHy_g.js → pagination-design-C33n_knS.js} +2 -2
  53. package/dist/paper-widget-design-BSEiISrR.js +4 -0
  54. package/dist/{print-runtime-instance-CjKnPN_O.js → print-runtime-instance-DKxmOdjq.js} +1 -1
  55. package/dist/{print-snapshot-renderer-Cjtv_a17.js → print-snapshot-renderer-DplvMCOJ.js} +3 -3
  56. package/dist/{qrcode-design-Bmz1I857.js → qrcode-design-CSsYRa59.js} +1 -1
  57. package/dist/{revo-grid.entry-BORGM9ol.js → revo-grid.entry-Be97ST99.js} +1 -1
  58. package/dist/{revogr-attribution_7.entry-Bbt9xrbj.js → revogr-attribution_7.entry-DY55EHUK.js} +3 -3
  59. package/dist/{revogr-clipboard_3.entry-BALlsgGo.js → revogr-clipboard_3.entry-BBOcVxnm.js} +2 -2
  60. package/dist/{revogr-data_4.entry-C5gCRtZO.js → revogr-data_4.entry-BbfKmCSr.js} +2 -2
  61. package/dist/{revogr-filter-panel.entry-0bOrAEF0.js → revogr-filter-panel.entry-CQgUZAYK.js} +1 -1
  62. package/dist/seal-design-C1pRzFqT.js +4 -0
  63. package/dist/{serialnumber-design-DqpV7rjc.js → serialnumber-design-B_Vr6PTs.js} +1 -1
  64. package/dist/shared/index.es.js +6 -6
  65. package/dist/{single-field-drop-DME3ih-W.js → single-field-drop-DDCsNS3W.js} +2 -2
  66. package/dist/{size-editor-BwDIwzDh.js → size-editor-BQqwHGX-.js} +1 -1
  67. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +3 -1
  68. package/dist/src/nocode-base/src/hooks/material-consume/types.d.ts +2 -0
  69. package/dist/src/nocode-base/src/runtime/formula-utils.d.ts +2 -0
  70. package/dist/src/nocode-base/src/runtime/runtime-form-state-store.d.ts +6 -2
  71. package/dist/src/nocode-base/src/runtime/table-row-identity.d.ts +2 -0
  72. package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +12 -0
  73. package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +9 -1
  74. package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/hooks/useObjectInit.d.ts +1 -0
  75. package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +6 -0
  76. package/dist/src/online-form/src/views/designer/types/index.d.ts +2 -0
  77. package/dist/{sub-table-factory-9_e9NXAk.js → sub-table-factory-BpyB5OlC.js} +2 -2
  78. package/dist/{text-design-CCgUDgoT.js → text-design-6ExcVDYW.js} +2 -2
  79. package/dist/{throttle-Cpk1LoGk-DEt1jg2L.js → throttle-Cpk1LoGk-Bg_Bed1e.js} +1 -1
  80. package/dist/{timediff-design-DDss5fNj.js → timediff-design-BEVJAK71.js} +1 -1
  81. package/dist/{trace-like-wrapper-BUq72oS3.js → trace-like-wrapper-CBpVK8U6.js} +2 -2
  82. package/dist/{value-editor.vue_vue_type_style_index_0_lang-WNhb31ms.js → value-editor.vue_vue_type_style_index_0_lang-mSchVPf0.js} +2 -2
  83. package/dist/web-render/index.es.js +3 -3
  84. package/dist/{widget-barcode-BZnKdE1G.js → widget-barcode-BMA-mWsJ.js} +4 -4
  85. package/dist/{widget-diagonal-BklDdpSM.js → widget-diagonal-DA3UW7np.js} +3 -3
  86. package/dist/{widget-image-C_UvhchS.js → widget-image-aDBxxk8w.js} +5 -5
  87. package/dist/{widget-line-DY28Dncn.js → widget-line-BxocSAh7.js} +2 -2
  88. package/dist/{widget-pagination-CfYnms-D.js → widget-pagination-Colzk2mT.js} +5 -5
  89. package/dist/{widget-power-CoFnc1vr.js → widget-power-Cbet700Q.js} +3 -3
  90. package/dist/{widget-qrcode-CKMRpndx.js → widget-qrcode-DgjnrEVt.js} +3 -3
  91. package/dist/{widget-rangelimit-yZ0Omj6J.js → widget-rangelimit-B9vhV0nA.js} +3 -3
  92. package/dist/{widget-serialnumber-SYVYekOJ.js → widget-serialnumber-D8EJ1fV-.js} +1 -1
  93. package/dist/{widget-text-D6vtAr4i.js → widget-text-D-vER3xP.js} +5 -5
  94. package/dist/{widget-timediff-FSvEPH5s.js → widget-timediff-gbfqYExJ.js} +2 -2
  95. package/package.json +1 -1
  96. package/dist/paper-widget-design-CAz9s6te.js +0 -4
  97. package/dist/seal-design-BDuIghlX.js +0 -4
@@ -1,6 +1,6 @@
1
- import { h as normalizeFieldWidth } from "./dynamic-table-action-ZAmTIvcp.js";
1
+ import { h as normalizeFieldWidth } from "./dynamic-table-action-DFabTKVv.js";
2
2
  import { get, pick } from "lodash-es";
3
- import { F as FIELD_TYPE } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DTkBFPUl.js";
3
+ import { F as FIELD_TYPE } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang--M6ES58_.js";
4
4
  import { f as fontStyleAttrs } from "./config.enum-B8UZQTON.js";
5
5
  const DESIGNER_DEFAULT_TYPES = /* @__PURE__ */ new Set([
6
6
  FIELD_TYPE.DEVICE,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, toRaw, shallowRef, computed, ref, readonly, onMounted, watch, normalizeClass, onBeforeUnmount, h as h$1, watchEffect, unref, createVNode, reactive } from "vue";
2
- import { M as commonjsGlobal, N as getDefaultExportFromCjs } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DTkBFPUl.js";
3
- import { r as require$$0 } from "./index-KGWuZtk7.js";
2
+ import { M as commonjsGlobal, N as getDefaultExportFromCjs } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang--M6ES58_.js";
3
+ import { r as require$$0 } from "./index-B-wN9cvQ.js";
4
4
  var window_1;
5
5
  var hasRequiredWindow;
6
6
  function requireWindow() {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString } from "vue";
2
- import { a7 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DTkBFPUl.js";
2
+ import { a7 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang--M6ES58_.js";
3
3
  const _hoisted_1 = { class: "align-group-box" };
4
4
  const _hoisted_2 = ["onClick"];
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, createElementVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { pick } from "lodash-es";
3
- import { u as useSpreadSheet, h as useModelFields, l as loadBwip } from "./index-DHtjlchw.js";
4
- import { Q as PaperWidgeValueType, a7 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DTkBFPUl.js";
3
+ import { u as useSpreadSheet, h as useModelFields, l as loadBwip } from "./index-DNNqAs8a.js";
4
+ import { Q as PaperWidgeValueType, a7 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang--M6ES58_.js";
5
5
  import "dayjs";
6
6
  import "ant-design-vue";
7
7
  const _hoisted_1 = { class: "wrapper" };
@@ -1,13 +1,13 @@
1
- import { E as api, _ as PlatformEnum, F as FIELD_TYPE, bc as getRowId, bd as findRuntimeTableRow, b5 as RenderModeEnum, C as ComponentTypeEnum, aF as Dependency_ENUM, aE as ASSIGNMENTSTRATEGY_ENUM, bn as fetchHistoryConsume, bo as isBomGranted, aT as renderUtils, bm as uuid2, bp as parseFrontConfig, aI as CheckDsTypeEnum, aC as transformUtils, bq as baseDataUtils, X as FormTypeEnum, br as normalizeToArray, bs as safeParseArray, bt as BpmnNodeTypeEnum, bu as mergeByMultiKey, a7 as _export_sfc, bv as evaluateInspectionDecisionRule, bw as useNocodeEmitter, bx as commonUtils, aG as EntityModelCategoryEnum } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DTkBFPUl.js";
2
- import { aL, aN, a_, a0, by, bz, B, bA, y, af, bB, bC, bD, bb, bE, aQ, av, aM, aJ, aK, bF, ag, ak, bG, bH, aD, a2, ae, aw, aO, $, ai, L, bI, bJ, bK, O, p, P, a9, o, Q, A, bL, bM, au, at, a5, a1, a3, a4, a6, f, bN, aj, an, ah, bO, bP, bQ, bR, ba, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, be, c0, c1, aW, c2, a$, b0, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, aV, cd, b1, b8, ce, cf, al, t, aP, cg, ch, bf, aX } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DTkBFPUl.js";
3
- import { a2 as getRuntimeDataFieldId, O as parseRuntimeFieldPath, a3 as buildRuntimeFieldPath, a4 as resolveRuntimeFieldProps, a5 as resolveRuntimeFieldState, a6 as assembleRules, a7 as isAttachFieldActive, P as calculateFormula, a8 as getRuntimeDependencyOutputKey, a9 as isRowAddedInCurrentFormChange, c as getParseFormulaVarInfos, w as MaterialConsumptionPatternEnum, aa as MaterialConsumeTableController, ab as setFormulaParamsConfig, ac as normalizeRuntime, V as createRuntimeInstanceContext, ad as initializeSealFields, U as RuntimeFormStateStore, ae as RuntimeSheetService, g as getBusinessFieldKey, af as validateObjectBomQtyOnSubmit, ag as areValidationCommentsEqual, ah as closeValidatorPopovers, ai as enrichFormChangeRowDetails, N as NCB_PROVIDE, W as RuntimeInstanceRegistry, aj as useMaterialBalance, ak as collectFormChangeFieldLocations, al as nextFormChangeRowViewHistoryId } from "../dynamic-table-action-ZAmTIvcp.js";
4
- import { B as B2, am, k, a1 as a12, an as an2, $ as $2, ao, a0 as a02, F, ap, aq, ar, as, at as at2, M, a, au as au2, b, av as av2, aw as aw2, ax, ay, az, aA, aB, aC, C, aD as aD2, t as t2, aE, d, aF, aG, aH, aI, r, E, aJ as aJ2, aK as aK2, aL as aL2, aM as aM2, l, G, j, aN as aN2, aO as aO2, aP as aP2, aQ as aQ2, aR, aS, aT, y as y2, v, aU, z, p as p2, aV as aV2, s, aW as aW2, R, S, u, A as A2, T, o as o2, q, Q as Q2, m, x } from "../dynamic-table-action-ZAmTIvcp.js";
1
+ import { E as api, _ as PlatformEnum, F as FIELD_TYPE, bc as getRowId, bd as findRuntimeTableRow, b5 as RenderModeEnum, C as ComponentTypeEnum, aF as Dependency_ENUM, aE as ASSIGNMENTSTRATEGY_ENUM, bn as fetchHistoryConsume, bo as isBomGranted, aT as renderUtils, bm as uuid2, bp as parseFrontConfig, aI as CheckDsTypeEnum, aC as transformUtils, bq as baseDataUtils, X as FormTypeEnum, br as normalizeToArray, bs as safeParseArray, bt as BpmnNodeTypeEnum, bu as mergeByMultiKey, a7 as _export_sfc, bv as evaluateInspectionDecisionRule, bw as useNocodeEmitter, bx as commonUtils, aG as EntityModelCategoryEnum } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang--M6ES58_.js";
2
+ import { aL, aN, a_, a0, by, bz, B, bA, y, af, bB, bC, bD, bb, bE, aQ, av, aM, aJ, aK, bF, ag, ak, bG, bH, aD, a2, ae, aw, aO, $, ai, L, bI, bJ, bK, O, p, P, a9, o, Q, A, bL, bM, au, at, a5, a1, a3, a4, a6, f, bN, aj, an, ah, bO, bP, bQ, bR, ba, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, be, c0, c1, aW, c2, a$, b0, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, aV, cd, b1, b8, ce, cf, al, t, cg, aP, ch, ci, bf, aX } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang--M6ES58_.js";
3
+ import { a2 as getRuntimeDataFieldId, O as parseRuntimeFieldPath, a3 as buildRuntimeFieldPath, a4 as resolveRuntimeFieldProps, a5 as resolveRuntimeFieldState, a6 as assembleRules, a7 as isAttachFieldActive, P as calculateFormula, a8 as getRuntimeDependencyOutputKey, a9 as isRowAddedInCurrentFormChange, aa as resolveFormulaData, c as getParseFormulaVarInfos, w as MaterialConsumptionPatternEnum, ab as MaterialConsumeTableController, ac as setFormulaParamsConfig, ad as normalizeRuntime, V as createRuntimeInstanceContext, ae as initializeSealFields, U as RuntimeFormStateStore, af as RuntimeSheetService, g as getBusinessFieldKey, ag as validateObjectBomQtyOnSubmit, ah as areValidationCommentsEqual, ai as closeValidatorPopovers, aj as enrichFormChangeRowDetails, N as NCB_PROVIDE, W as RuntimeInstanceRegistry, ak as useMaterialBalance, al as collectFormChangeFieldLocations, am as nextFormChangeRowViewHistoryId } from "../dynamic-table-action-DFabTKVv.js";
4
+ import { B as B2, an as an2, k, a1 as a12, ao, $ as $2, ap, a0 as a02, F, aq, ar, as, at as at2, au as au2, M, a, av as av2, b, aw as aw2, ax, ay, az, aA, aB, aC, aD as aD2, C, aE, t as t2, aF, d, aG, aH, aI, aJ as aJ2, r, E, aK as aK2, aL as aL2, aM as aM2, aN as aN2, l, G, j, aO as aO2, aP as aP2, aQ as aQ2, aR, aS, aT, aU, y as y2, v, aV as aV2, z, p as p2, aW as aW2, s, aX as aX2, R, S, u, A as A2, T, o as o2, q, Q as Q2, m, x } from "../dynamic-table-action-DFabTKVv.js";
5
5
  import { toRaw, watch, toRef, computed, defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, ref, provide, onUnmounted, markRaw, reactive, onBeforeUnmount } from "vue";
6
- import { cloneDeep, defaults, isEmpty, merge } from "lodash-es";
6
+ import { isEqual, cloneDeep, defaults, isEmpty, merge } from "lodash-es";
7
7
  import "dayjs";
8
- import { S as SubTableCoreFactory, R as RuntimeInstanceController } from "../sub-table-factory-9_e9NXAk.js";
9
- import { A as A3, D, M as M2, a as a7, P as P2, b as b2, c, d as d2, e, W, f as f2, g, h } from "../sub-table-factory-9_e9NXAk.js";
10
- import { B as B3, F as F2, M as M3, a as a8, u as u2 } from "../mb-render-C7bYBZNr.js";
8
+ import { S as SubTableCoreFactory, R as RuntimeInstanceController } from "../sub-table-factory-BpyB5OlC.js";
9
+ import { A as A3, D, M as M2, a as a7, P as P2, b as b2, c, d as d2, e, W, f as f2, g, h } from "../sub-table-factory-BpyB5OlC.js";
10
+ import { B as B3, F as F2, M as M3, a as a8, u as u2 } from "../mb-render-HYBbL4je.js";
11
11
  const InstanceStatusValues = {
12
12
  /** 作废状态 */
13
13
  ABANDON: "ABANDON",
@@ -385,7 +385,7 @@ function getSourceFields(record, expression, currentSubtable) {
385
385
  });
386
386
  }
387
387
  function isEmptyValue(value) {
388
- return value === void 0 || value === null || value === "";
388
+ return value === void 0 || value === null || typeof value === "string" && value.trim() === "" || Array.isArray(value) && value.length === 0;
389
389
  }
390
390
  function getRulePaths(record, props, targetFieldId, modelKey, scopeFieldId = targetFieldId) {
391
391
  const subtableField = props.subFieldKey;
@@ -691,13 +691,30 @@ class RuntimeRuleCompiler {
691
691
  const expression = assignment?.expression || props.formulaExpr;
692
692
  if (!expression || !targetFieldId) return;
693
693
  const strategy = assignment?.strategy ?? ASSIGNMENTSTRATEGY_ENUM.alwaysCover;
694
- if (!isLegacyFormula && strategy === ASSIGNMENTSTRATEGY_ENUM.notCoveredForever) {
695
- listRuntimeFieldRows(this.record, subFieldKey, scopeFieldId).forEach((target) => {
696
- const row = this.getWritableRow(target.row, props);
697
- if (isEmptyValue(row[targetFieldId])) return;
698
- const path = formState.getFieldPath(row, targetFieldId);
694
+ let assignmentStates = /* @__PURE__ */ new WeakMap();
695
+ const readInputs = (target) => cloneDeep(resolveFormulaData(expression, target.row, formState.state));
696
+ const rememberTarget = (target, inputs) => {
697
+ const row = props.isFieldModel ? target.row._OPCT : target.row;
698
+ const path = formState.getFieldPath(row ?? target.row, targetFieldId);
699
+ assignmentStates.set(toRaw(target.row), { inputs, path });
700
+ if (strategy === ASSIGNMENTSTRATEGY_ENUM.notCoveredForever && !isEmptyValue(row?.[targetFieldId]))
699
701
  formState.markUserModified(path);
700
- });
702
+ };
703
+ const resetAssignmentState = () => {
704
+ assignmentStates = /* @__PURE__ */ new WeakMap();
705
+ listRuntimeFieldRows(this.record, subFieldKey, scopeFieldId).forEach(
706
+ (target) => rememberTarget(target, readInputs(target))
707
+ );
708
+ };
709
+ if (!isLegacyFormula) {
710
+ resetAssignmentState();
711
+ this.unregisters.push(
712
+ formState.subscribe((change) => {
713
+ if (change.source !== "restore" || change.restoreScope === "fields" || change.paths.every((path) => path.endsWith("_lb_")))
714
+ return;
715
+ resetAssignmentState();
716
+ })
717
+ );
701
718
  }
702
719
  this.unregisters.push(
703
720
  dependencies.register({
@@ -706,20 +723,42 @@ class RuntimeRuleCompiler {
706
723
  sheetId,
707
724
  sourceFields: getSourceFields(this.record, expression, subFieldKey),
708
725
  structureFields,
709
- run: async (change, execution) => {
726
+ run: async (_change, execution) => {
710
727
  if (this.disposed) return;
711
- if (!isLegacyFormula && change.revision === 0 && change.source === "system") return;
712
728
  if (!this.canWriteFormulas()) return;
713
729
  const results = await Promise.all(
714
730
  listRuntimeFieldRows(this.record, subFieldKey, scopeFieldId).map(async (target) => {
715
731
  const row = this.getWritableRow(target.row, props);
716
732
  const path = formState.getFieldPath(row, targetFieldId);
717
- if (!isLegacyFormula && strategy !== ASSIGNMENTSTRATEGY_ENUM.alwaysCover && formState.isUserModified(path))
733
+ const inputs = isLegacyFormula ? void 0 : readInputs(target);
734
+ const previous = assignmentStates.get(toRaw(target.row));
735
+ if (!isLegacyFormula) {
736
+ if (!previous) rememberTarget(target);
737
+ else if (previous.path !== path && formState.isUserModified(previous.path)) {
738
+ formState.markUserModified(path);
739
+ formState.clearUserModified(previous.path);
740
+ }
741
+ }
742
+ if (!isLegacyFormula && strategy !== ASSIGNMENTSTRATEGY_ENUM.alwaysCover && formState.isUserModified(path)) {
743
+ assignmentStates.set(toRaw(target.row), { inputs, path });
744
+ return;
745
+ }
746
+ if (!isLegacyFormula && previous?.inputs && !previous.pending && isEqual(previous.inputs, inputs))
718
747
  return;
719
- const result = await calculateFormula(expression, row, formState.state);
720
- const empty = isEmptyValue(result) || typeof result === "string" && result.trim() === "" || Array.isArray(result) && result.length === 0;
748
+ if (!isLegacyFormula)
749
+ assignmentStates.set(toRaw(target.row), {
750
+ inputs: previous?.inputs,
751
+ path,
752
+ pending: true
753
+ });
754
+ const result = await calculateFormula(
755
+ expression,
756
+ isLegacyFormula ? row : target.row,
757
+ formState.state
758
+ );
759
+ const empty = isEmptyValue(result);
721
760
  const value = isLegacyFormula ? empty ? null : Number(result) : formatDateCompliance(result, props.newSpecificConfig?.mappingType);
722
- return { target, row, path, value };
761
+ return { target, row, path, value, inputs };
723
762
  })
724
763
  );
725
764
  if (!this.canWriteFormulas() || !execution.isCurrent()) return;
@@ -727,7 +766,9 @@ class RuntimeRuleCompiler {
727
766
  "formula",
728
767
  () => results.forEach((result) => {
729
768
  if (!result) return;
730
- const { target, row, path, value } = result;
769
+ const { target, row, path, value, inputs } = result;
770
+ if (!isLegacyFormula)
771
+ assignmentStates.set(toRaw(target.row), { inputs, path });
731
772
  if (!isLegacyFormula && strategy !== ASSIGNMENTSTRATEGY_ENUM.alwaysCover && formState.isUserModified(path))
732
773
  return;
733
774
  if (Object.is(row[targetFieldId], value)) return;
@@ -745,7 +786,12 @@ class RuntimeRuleCompiler {
745
786
  }
746
787
  getWritableRow(row, props) {
747
788
  if (!props.isFieldModel) return row;
748
- if (!row._OPCT) this.record.formState.setObjectField(row, "_OPCT", { _DICT: {} }, "restore");
789
+ if (!row._OPCT)
790
+ this.record.formState.transaction(
791
+ "restore",
792
+ () => this.record.formState.setObjectField(row, "_OPCT", { _DICT: {} }, "restore"),
793
+ { restoreScope: "fields" }
794
+ );
749
795
  return row._OPCT;
750
796
  }
751
797
  /** 公式变更记录也属于实例生命周期,未打开的 Sheet 不再漏记。 */
@@ -3408,7 +3454,7 @@ export {
3408
3454
  aQ as DateFormat,
3409
3455
  av as DecimalDisplayMode,
3410
3456
  aM as DenoiseMethodOptions,
3411
- am as DeviceConnector,
3457
+ an2 as DeviceConnector,
3412
3458
  aJ as DeviceLink,
3413
3459
  k as DeviceLinkTmplUtil,
3414
3460
  aK as DeviceParamsTypeTitle,
@@ -3417,9 +3463,9 @@ export {
3417
3463
  ag as DiagonalDirection,
3418
3464
  ak as DiagonalVertex,
3419
3465
  a12 as DocumentLayout,
3420
- an2 as DocumentLoading,
3466
+ ao as DocumentLoading,
3421
3467
  $2 as DocumentPaper,
3422
- ao as DynamicQuickFillModal,
3468
+ ap as DynamicQuickFillModal,
3423
3469
  a02 as DynamicTableAction,
3424
3470
  bG as EBR_PROVIDE_ENUM,
3425
3471
  bH as EFieldBizTypeEnum,
@@ -3428,18 +3474,18 @@ export {
3428
3474
  a2 as FallbackSignTypeEnum,
3429
3475
  ae as FieldSysVarDefaultValueEnum,
3430
3476
  FillingTypeEnum,
3431
- ap as FixedQuickFillModal,
3477
+ aq as FixedQuickFillModal,
3432
3478
  FormAnnotationController,
3433
3479
  F2 as FormModelController,
3434
3480
  FormTmplBomController,
3435
- aq as FormTmplConfigController,
3481
+ ar as FormTmplConfigController,
3436
3482
  FormTypeEnum,
3437
3483
  aw as ImageDisplayModeEnum,
3438
3484
  InstanceStatusValues,
3439
3485
  aO as JoinModelTypeEum,
3440
- ar as LEGACY_RUNTIME_FORM_CONFIG_KEYS,
3441
- as as LEGACY_RUNTIME_SHEET_ID,
3442
- at2 as LEGACY_RUNTIME_SHEET_TITLE,
3486
+ as as LEGACY_RUNTIME_FORM_CONFIG_KEYS,
3487
+ at2 as LEGACY_RUNTIME_SHEET_ID,
3488
+ au2 as LEGACY_RUNTIME_SHEET_TITLE,
3443
3489
  $ as LabelPosition,
3444
3490
  ai as LineDirection,
3445
3491
  L as LineType,
@@ -3447,7 +3493,7 @@ export {
3447
3493
  M as MAX_RUNTIME_SHEETS,
3448
3494
  a as MAX_RUNTIME_SHEET_TITLE_LENGTH,
3449
3495
  M3 as MBRender,
3450
- au2 as MCDataUtil,
3496
+ av2 as MCDataUtil,
3451
3497
  a8 as MCRender,
3452
3498
  b as MULTI_SHEET_SCHEMA_VERSION,
3453
3499
  MaterialConsumeTableController,
@@ -3457,7 +3503,7 @@ export {
3457
3503
  a7 as MaterialSubstitutionTableCore,
3458
3504
  bJ as MobileFillTypeEnum,
3459
3505
  NCB_PROVIDE,
3460
- av2 as OCR_MODEL_PRECISION_ENUM_KEY,
3506
+ aw2 as OCR_MODEL_PRECISION_ENUM_KEY,
3461
3507
  bK as OfficeTypeEnum,
3462
3508
  O as Orientation,
3463
3509
  p as PageSizeEnum,
@@ -3475,17 +3521,17 @@ export {
3475
3521
  au as RangeCompareOp,
3476
3522
  at as RangeValidateMode,
3477
3523
  RenderModeEnum,
3478
- aw2 as RuntimeAsyncTaskCoordinator,
3479
- ax as RuntimeDependencyService,
3480
- ay as RuntimeFieldRegistry,
3524
+ ax as RuntimeAsyncTaskCoordinator,
3525
+ ay as RuntimeDependencyService,
3526
+ az as RuntimeFieldRegistry,
3481
3527
  RuntimeFormStateStore,
3482
3528
  RuntimeInstanceController,
3483
- az as RuntimeInstanceEventBus,
3529
+ aA as RuntimeInstanceEventBus,
3484
3530
  RuntimeInstanceRegistry,
3485
- aA as RuntimePersistenceCoordinator,
3531
+ aB as RuntimePersistenceCoordinator,
3486
3532
  RuntimeRuleCompiler,
3487
3533
  RuntimeSheetService,
3488
- aB as RuntimeValidationService,
3534
+ aC as RuntimeValidationService,
3489
3535
  a5 as SignShowTypeEnum,
3490
3536
  a1 as SignatureImageDirectionEnum,
3491
3537
  a3 as SignatureNumberTypeEnum,
@@ -3493,7 +3539,7 @@ export {
3493
3539
  a6 as SignatureTypeEnum,
3494
3540
  d2 as SterilizeBatchTableCore,
3495
3541
  e as StocktakeTableCore,
3496
- aC as SubTableCore,
3542
+ aD2 as SubTableCore,
3497
3543
  SubTableCoreFactory,
3498
3544
  f as SubTableType,
3499
3545
  bN as SummaryApproveHisTypeEnum,
@@ -3511,7 +3557,7 @@ export {
3511
3557
  bQ as bindRuntimeTableColumns,
3512
3558
  bR as buildDeviceBaseQuery,
3513
3559
  ba as buildDeviceFilterQuery,
3514
- aD2 as buildFormChangeDisplayRows,
3560
+ aE as buildFormChangeDisplayRows,
3515
3561
  t2 as buildObjectLotExtraQuery,
3516
3562
  buildRuntimeFieldPath,
3517
3563
  bS as calcFillData,
@@ -3521,16 +3567,16 @@ export {
3521
3567
  collectFormChangeFieldLocations,
3522
3568
  commonUtils,
3523
3569
  convertHistoricalAnnotationLocation,
3524
- aE as convertV1Runtime,
3570
+ aF as convertV1Runtime,
3525
3571
  d as createRuntimeDocumentV2,
3526
3572
  createRuntimeInstanceContext,
3527
3573
  bU as decodeTableCellRowKey,
3528
- aF as detailsHaveFormChangeRowOps,
3574
+ aG as detailsHaveFormChangeRowOps,
3529
3575
  bV as encodeTableCellRowKey,
3530
3576
  enrichFormChangeRowDetails,
3531
3577
  bW as ensureFrontRowKey,
3532
3578
  bX as ensureTableRowKeys,
3533
- aG as extractFormChangeRowDetails,
3579
+ aH as extractFormChangeRowDetails,
3534
3580
  bY as extractKeywordFromQueryData,
3535
3581
  bZ as fetchCheckDsDataForTable,
3536
3582
  b_ as fetchCustomCheckDsData,
@@ -3545,8 +3591,8 @@ export {
3545
3591
  getAppInfo,
3546
3592
  getBusinessFieldKey,
3547
3593
  c1 as getCheckTableSnapshotKey,
3548
- aH as getFormChangeRowKey,
3549
- aI as getFormChangeRowOp,
3594
+ aI as getFormChangeRowKey,
3595
+ aJ2 as getFormChangeRowOp,
3550
3596
  aW as getLotLockedReason,
3551
3597
  r as getObjectBomMaterialLotQuery,
3552
3598
  E as getObjectBomProductQuery,
@@ -3558,18 +3604,18 @@ export {
3558
3604
  c4 as getRenderedRuntimeTableCell,
3559
3605
  getRuntimeDataFieldId,
3560
3606
  getRuntimeDependencyOutputKey,
3561
- aJ2 as getSubTableQuickFillInfo,
3607
+ aK2 as getSubTableQuickFillInfo,
3562
3608
  getSuiteKey,
3563
3609
  c5 as handleOldConfig,
3564
3610
  c6 as hasAnyCheckTableSnapshot,
3565
3611
  c7 as hasByTableCheckTableSnapshot,
3566
3612
  c8 as hasSharedCheckTableSnapshot,
3567
- aK2 as isAnnLocationSelected,
3568
- aL2 as isBlank,
3613
+ aL2 as isAnnLocationSelected,
3614
+ aM2 as isBlank,
3569
3615
  isBomGranted,
3570
3616
  isEdhrSuite,
3571
3617
  isEqmSuite,
3572
- aM2 as isFormChangeGhostRow,
3618
+ aN2 as isFormChangeGhostRow,
3573
3619
  c9 as isMedProSuite,
3574
3620
  isRowAddedInCurrentFormChange,
3575
3621
  ca as isTableRowKeyMatch,
@@ -3581,35 +3627,36 @@ export {
3581
3627
  l as normalizeAIOcrTmpl,
3582
3628
  G as normalizeHistoricalAutofillRow,
3583
3629
  j as normalizeHistoricalBusinessRow,
3584
- aN2 as normalizeHistoricalFieldConfig,
3630
+ aO2 as normalizeHistoricalFieldConfig,
3585
3631
  b1 as normalizeRefLoaderResult,
3586
3632
  normalizeRuntime,
3587
3633
  parseFrontConfig,
3588
3634
  parseRuntimeFieldPath,
3589
3635
  parseUdi,
3590
- aO2 as pickObjectFieldKeys,
3591
- aP2 as recordSubtableRowAdd,
3592
- aQ2 as recordSubtableRowDelete,
3636
+ aP2 as pickObjectFieldKeys,
3637
+ aQ2 as recordSubtableRowAdd,
3638
+ aR as recordSubtableRowDelete,
3593
3639
  b8 as refUtils,
3594
- aR as relocateDeletedRowsToEnd,
3640
+ aS as relocateDeletedRowsToEnd,
3595
3641
  renderUtils,
3596
3642
  ce as requestMedProCheckDsData,
3597
3643
  cf as requestNonMedProCheckDsData,
3598
- aS as resolveAnnotationFieldLocation,
3644
+ aT as resolveAnnotationFieldLocation,
3599
3645
  al as resolveDiagonalVertex,
3600
3646
  t as resolveFieldRenderComponent,
3601
- aT as resolveFormChangeRowUi,
3647
+ aU as resolveFormChangeRowUi,
3602
3648
  y2 as resolveObjectBomEntry,
3603
3649
  v as resolveObjectFieldKeys,
3604
- aU as resolveRowFormChangeMark,
3650
+ aV2 as resolveRowFormChangeMark,
3605
3651
  resolveUdiQuery,
3606
3652
  z as runWithFillProduct,
3607
3653
  p2 as setSelectAnnotationId,
3608
- aV2 as setSelectMobileTdId,
3654
+ aW2 as setSelectMobileTdId,
3609
3655
  s as setSelectValidatorId,
3656
+ cg as splitRuntimeDataPath,
3610
3657
  aP as sqlUtils,
3611
- cg as stockCheck,
3612
- aW2 as stripLegacyFormConfigFromPaper,
3658
+ ch as stockCheck,
3659
+ aX2 as stripLegacyFormConfigFromPaper,
3613
3660
  transformUtils,
3614
3661
  R as useDependency,
3615
3662
  useEbrWikiFactoryV2,
@@ -3619,7 +3666,7 @@ export {
3619
3666
  useMaterialBalance,
3620
3667
  useNocodeEmitter,
3621
3668
  A2 as useNocodeFormWidget,
3622
- ch as useOnlineFormActionButton,
3669
+ ci as useOnlineFormActionButton,
3623
3670
  bf as useOnlineFormTransformField2Component,
3624
3671
  useRenderPageFactory,
3625
3672
  T as useRuntimeEditorFlusher,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createBlock } from "vue";
2
- import { h as useModelFields, D as Diagonal } from "./index-DHtjlchw.js";
3
- import { al as resolveDiagonalVertex, a7 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DTkBFPUl.js";
2
+ import { h as useModelFields, D as Diagonal } from "./index-DNNqAs8a.js";
3
+ import { al as resolveDiagonalVertex, a7 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang--M6ES58_.js";
4
4
  import "lodash-es";
5
5
  import "dayjs";
6
6
  import "ant-design-vue";