@gct-paas/excel 0.1.17 → 0.1.18

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 (192) hide show
  1. package/dist/{BaseComponent-DJNL1tGs.js → BaseComponent-xTm5lvAr.js} +1 -0
  2. package/dist/{VueVideoPlayer-Db7qcsRE.js → VueVideoPlayer-D3u-ZHom.js} +2 -2
  3. package/dist/{agg-design-BjqRVeg1.js → agg-design-D7CkIPCA.js} +1 -1
  4. package/dist/{agg-props-CrdosdGr.js → agg-props-DNNO9ucx.js} +1 -1
  5. package/dist/{agg-style-CfZoOE-b.js → agg-style-v_94dzX8.js} +1 -1
  6. package/dist/{align-editor-BaNT0jhx.js → align-editor-COpCDpFf.js} +1 -1
  7. package/dist/{attach-fields-editor-CThobu8X.js → attach-fields-editor-o_7W-2sr.js} +2 -2
  8. package/dist/{barcode-design-CHjIeaiJ.js → barcode-design-CvsGGAio.js} +2 -2
  9. package/dist/base/index.es.js +347 -53
  10. package/dist/{base-font-editor-BiSPxwVH.js → base-font-editor-BmC423aB.js} +2 -2
  11. package/dist/{boolean-design-BYAdX-h5.js → boolean-design-Hc8Es5l1.js} +2 -2
  12. package/dist/{boolean-props-jKvjhdlG.js → boolean-props-CGamLGXA.js} +3 -3
  13. package/dist/{boolean-style-RsMRzVBL.js → boolean-style-m-WuSO6S.js} +4 -4
  14. package/dist/{cell-upload-JxFLM1bV.js → cell-upload-CiXVE0Ii.js} +2 -2
  15. package/dist/date-range-editor-BZkhUU-x.js +470 -0
  16. package/dist/{date-time-design-Du8pmDo-.js → date-time-design-B_oFOcft.js} +1 -1
  17. package/dist/date-time-props-hGnSGQKc.js +105 -0
  18. package/dist/{date-time-style-DSEnmxAE.js → date-time-style-CGKG8i3K.js} +1 -1
  19. package/dist/{decimal-design-C2GbzP9k.js → decimal-design-B5Artgk6.js} +1 -1
  20. package/dist/{decimal-display-mode-CagizhJW.js → decimal-display-mode-C4XUezoP.js} +2 -2
  21. package/dist/{decimal-props-CGLqWy8I.js → decimal-props-Q37uOcWl.js} +4 -4
  22. package/dist/{decimal-style-6j22QKYO.js → decimal-style-C2CnGPVG.js} +1 -1
  23. package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-C5K6qhB-.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-DTnbLBVW.js} +109 -39
  24. package/dist/{diagonal-design-Cq3oxdHe.js → diagonal-design-CyUvkcvp.js} +2 -2
  25. package/dist/{document-quick-fillin.vue_vue_type_style_index_0_scoped_a18386ab_lang-Bbu6cwRC.js → document-quick-fillin.vue_vue_type_style_index_0_scoped_a18386ab_lang-DKTGEH4Q.js} +2295 -1388
  26. package/dist/{document-sub-table-action-rz6gyez5.js → document-sub-table-action-Cy6Rd8OS.js} +384 -193
  27. package/dist/{double-design-CyXEqcV7.js → double-design-D_ipWcRm.js} +1 -1
  28. package/dist/{double-props-DaJoio1W.js → double-props-D4FGbfe2.js} +4 -4
  29. package/dist/{double-style-B4lIth-J.js → double-style-BbD_6_Os.js} +1 -1
  30. package/dist/{edit.utils-CXmmCnxE-DW8ClKe9.js → edit.utils-CXmmCnxE-BK4QnSP-.js} +1 -1
  31. package/dist/{enum-design-DSx09tOO.js → enum-design-lOufLU6Z.js} +2 -2
  32. package/dist/{enum-props-CJNuQLJ_.js → enum-props-brKRP5Uz.js} +4 -4
  33. package/dist/{enum-style-5N5xmgRJ.js → enum-style-BQQHkDUD.js} +2 -2
  34. package/dist/excel.css +943 -440
  35. package/dist/{exceljs.min-D9gV8q6H.js → exceljs.min-CUwGyNAf.js} +2 -2
  36. package/dist/{expression-design-BJDbafot.js → expression-design-BPEci3dg.js} +1 -1
  37. package/dist/{expression-props-BpHbrsle.js → expression-props-Cvg-9V-B.js} +1 -1
  38. package/dist/{expression-style-qPh81w7Q.js → expression-style-Dv3Hl8lm.js} +1 -1
  39. package/dist/{file-design-B7si04Bi.js → file-design-BIzi6cpq.js} +1 -1
  40. package/dist/{file-props-DTtOnHQy.js → file-props-oV2U7bpO.js} +2 -2
  41. package/dist/{file-style-C6KW_szu.js → file-style-CZrxokgP.js} +1 -1
  42. package/dist/{font-editor-DgGgvmB2.js → font-editor-B41KgpWJ.js} +3 -3
  43. package/dist/{form-annotation-controller-CoABDD4X.js → form-annotation-controller-CdNmJKv-.js} +79 -23
  44. package/dist/{image-design-B92Xkcf-.js → image-design-C3FEtW6i.js} +2 -2
  45. package/dist/{image-design-CCfpT4Rp.js → image-design-DMfBfSkD.js} +2 -2
  46. package/dist/{image-props-DZgfzMta.js → image-props-DPibJk7n.js} +1 -1
  47. package/dist/{image-style-DX6Q_gF4.js → image-style-DLudd5Vt.js} +1 -1
  48. package/dist/{index-Bnbl3VER.js → index-B1CG-75q.js} +2 -2
  49. package/dist/{index-tbaOl7Nd.js → index-B1r6-Uxf.js} +1 -1
  50. package/dist/{index-bvhV6lsn.js → index-B7lz2J6V.js} +14 -7
  51. package/dist/{index-DRd2oRK1.js → index-B8ey1U_N.js} +2 -2
  52. package/dist/{index-BXMOCfWv.js → index-B8wKNUsK.js} +2 -2
  53. package/dist/{index-DzIKEtWw.js → index-BOis3jsA.js} +1 -1
  54. package/dist/{index-BYl8cK0A.js → index-BZ1jj7Nu.js} +1 -1
  55. package/dist/{index-DsASTvC2.js → index-BgZkpQKh.js} +1 -1
  56. package/dist/{index-Bg-x1hF6.js → index-BiNVmD5v.js} +2 -2
  57. package/dist/{index-BEBKoAOg.js → index-Bppcm2iQ.js} +2 -2
  58. package/dist/{index-Dsj3FuVs.js → index-Bvjplnz_.js} +2 -2
  59. package/dist/{index-DgHRTRH5.js → index-C5bYd42n.js} +2 -2
  60. package/dist/{index-BzhFcvnJ.js → index-CUIGN7Rt.js} +2 -2
  61. package/dist/{index-B2iip4UC.js → index-Cjz0GLDq.js} +2 -2
  62. package/dist/{index-DOFSbVSN.js → index-CkYbgRrH.js} +1 -1
  63. package/dist/{index-BB5uSbo3.js → index-Cn_c3-eW.js} +1 -1
  64. package/dist/{index-Be7TFwwX.js → index-Cp7mC3Qt.js} +4 -2
  65. package/dist/{index-DFgGQBCZ.js → index-CtiiIgjs.js} +2 -2
  66. package/dist/{index-D6diRqWG.js → index-D0YZX_c7.js} +2 -2
  67. package/dist/{index-DRKvAxuA.js → index-D7fFpHaN.js} +1 -1
  68. package/dist/{index-C8qPy1oW.js → index-DAqYc474.js} +2 -2
  69. package/dist/{index-p-Q3DQmv.js → index-DDpNgyvD.js} +3 -3
  70. package/dist/{index-IUYnmIJe.js → index-DFoELlwd.js} +1 -1
  71. package/dist/{index-DJISlRXi.js → index-DHVK-P9J.js} +4 -2
  72. package/dist/{index-BhzF0Rp3.js → index-DH_EZe8p.js} +4 -3
  73. package/dist/{index-CIoB2iny.js → index-DJIzgsog.js} +1 -1
  74. package/dist/{index-Doxcf2Zs.js → index-DPQkm6_v.js} +2 -2
  75. package/dist/{index-CtTSTTkq.js → index-DsNRjyQD.js} +2 -2
  76. package/dist/{index-Da7W9uBC.js → index-I_FRG0Ho.js} +2 -2
  77. package/dist/{index-CmaPtyCh.js → index-oSIIidoF.js} +4 -2
  78. package/dist/{index-rn6aiccW.js → index-rXMzwu77.js} +3 -3
  79. package/dist/{index-XbgrTOMF.js → index-vZZ5q2xJ.js} +1 -1
  80. package/dist/{index-Cw_YFCZT.js → index-yih5hGsL.js} +1467 -1345
  81. package/dist/index.es.js +6 -5
  82. package/dist/{integer-design-CPzJPZon.js → integer-design-DhkNa9IA.js} +1 -1
  83. package/dist/{integer-props-deCDvNET.js → integer-props-c_aQpjaT.js} +4 -4
  84. package/dist/{integer-style-DwZIRXEW.js → integer-style-CS5v7Bhq.js} +1 -1
  85. package/dist/{mb-render-Bejyn-ep.js → mb-render-Cs7LUxzk.js} +1 -1
  86. package/dist/{number-input-ex-CgwOH18n.js → number-input-ex-CwKIHfk1.js} +1 -1
  87. package/dist/{org-props-BeFVQ-QY.js → org-props-BcbW62Jg.js} +2 -2
  88. package/dist/{org-style-CLVWLtyd.js → org-style-Bk7mgML3.js} +1 -1
  89. package/dist/{pagination-design-CT0EQmxW.js → pagination-design-B1KyJUAG.js} +2 -2
  90. package/dist/paper-widget-design-Cp0ioo8c.js +4 -0
  91. package/dist/{qrcode-design-CjOkp2xa.js → qrcode-design-EafZURDZ.js} +1 -1
  92. package/dist/{ref-autofill-editor-B2KcQvyt.js → ref-autofill-editor-OtclaSqy.js} +2 -2
  93. package/dist/{ref-props-DPnt_pys.js → ref-props-C95McyZp.js} +3 -3
  94. package/dist/{ref-style-D0XKTtP1.js → ref-style-BxdvOF-4.js} +1 -1
  95. package/dist/regex-editor-BGukvOEI.js +796 -0
  96. package/dist/{revo-grid.entry-ztDhASK3.js → revo-grid.entry-BeRVTVKO.js} +1 -1
  97. package/dist/{revogr-attribution_7.entry-BtXV91vv.js → revogr-attribution_7.entry-CHtbU2lV.js} +3 -3
  98. package/dist/{revogr-clipboard_3.entry-DXpq4oNb.js → revogr-clipboard_3.entry-DnvQ-Rl7.js} +2 -2
  99. package/dist/{revogr-data_4.entry-WA1PNcGb.js → revogr-data_4.entry-DLRSuaN8.js} +2 -2
  100. package/dist/{revogr-filter-panel.entry-unpVAD7l.js → revogr-filter-panel.entry-BDkhY-74.js} +1 -1
  101. package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-CqaEwsvS.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-ChESg_eM.js} +2 -2
  102. package/dist/{serialnumber-design-ClArHZWU.js → serialnumber-design-CRaym9J-.js} +1 -1
  103. package/dist/shared/index.es.js +16 -16
  104. package/dist/{signature-design-Cg2Ejj3g.js → signature-design-BJHfLDNV.js} +1 -1
  105. package/dist/{signature-props-CNuLBWtc.js → signature-props-B9hfppHh.js} +3 -3
  106. package/dist/{signature-style-DtlZdeFB.js → signature-style-DM4rqHnN.js} +1 -1
  107. package/dist/{single-field-drop-COLR9RIu.js → single-field-drop-eClQhTSv.js} +2 -2
  108. package/dist/{size-editor-DyGGEX3s.js → size-editor-BjlCmEWf.js} +1 -1
  109. package/dist/src/adapter/index.d.ts +1 -0
  110. package/dist/src/adapter/setup.d.ts +1 -1
  111. package/dist/src/nocode-base/src/_utils_/uuid.d.ts +6 -1
  112. package/dist/src/nocode-base/src/constant/index.d.ts +11 -0
  113. package/dist/src/nocode-base/src/hooks/annotation/collect-annotation-items.d.ts +15 -0
  114. package/dist/src/nocode-base/src/hooks/annotation/form-annotation-controller.d.ts +5 -2
  115. package/dist/src/nocode-base/src/hooks/annotation/form-change-row.d.ts +60 -0
  116. package/dist/src/nocode-base/src/hooks/annotation/index.d.ts +2 -0
  117. package/dist/src/nocode-base/src/hooks/app-info/index.d.ts +2 -2
  118. package/dist/src/nocode-base/src/hooks/index.d.ts +2 -1
  119. package/dist/src/nocode-base/src/hooks/model-relation/index.d.ts +1 -1
  120. package/dist/src/nocode-base/src/hooks/service-util/sn-rule.d.ts +1 -1
  121. package/dist/src/nocode-base/src/hooks/useFormHook.d.ts +1 -1
  122. package/dist/src/nocode-base/src/hooks/useRenderData.d.ts +4 -2
  123. package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +36 -4
  124. package/dist/src/nocode-base/src/hooks/useValidator.d.ts +6 -6
  125. package/dist/src/nocode-base/src/hooks/validation/admission.d.ts +19 -0
  126. package/dist/src/nocode-base/src/hooks/validation/attach.d.ts +24 -0
  127. package/dist/src/nocode-base/src/hooks/validation/createValidateFactory.d.ts +35 -0
  128. package/dist/src/nocode-base/src/hooks/validation/formRulesStore.d.ts +15 -0
  129. package/dist/src/nocode-base/src/hooks/validation/merge.d.ts +24 -0
  130. package/dist/src/nocode-base/src/hooks/validation/runValidation.d.ts +17 -0
  131. package/dist/src/nocode-base/src/hooks/validation/scheduler.d.ts +12 -0
  132. package/dist/src/nocode-base/src/hooks/validation/types.d.ts +44 -0
  133. package/dist/src/nocode-base/src/hooks/validation/useFormValidator.d.ts +39 -0
  134. package/dist/src/nocode-base/src/hooks/validation/utils.d.ts +24 -0
  135. package/dist/src/nocode-base/src/hooks/validation/waitForSettle.d.ts +17 -0
  136. package/dist/src/nocode-base/src/interface/render.d.ts +1 -1
  137. package/dist/src/nocode-base/src/types/common/base.d.ts +14 -2
  138. package/dist/src/nocode-base/src/types/fields/i-datepicker.d.ts +5 -1
  139. package/dist/src/nocode-base/src/types/fields/i-datetimepicker.d.ts +5 -1
  140. package/dist/src/nocode-base/src/types/fields/i-inputdouble.d.ts +5 -1
  141. package/dist/src/nocode-base/src/types/fields/i-inputnumber.d.ts +5 -1
  142. package/dist/src/nocode-base/src/types/fields/i-trace.d.ts +27 -1
  143. package/dist/src/nocode-base/src/types/widgets/i-paper.d.ts +2 -0
  144. package/dist/src/online-form/src/components/version-diff/index/types.d.ts +2 -0
  145. package/dist/src/online-form/src/views/__cell_widgets__/common/keep-exception-highlight-editor/keep-exception-highlight-editor.vue.d.ts +10 -0
  146. package/dist/src/online-form/src/views/__cell_widgets__/common/regex-editor/common-regex-api.d.ts +11 -0
  147. package/dist/src/online-form/src/views/__cell_widgets__/common/regex-editor/editor.d.ts +8 -0
  148. package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +12 -0
  149. package/dist/src/online-form/src/views/designer/hooks/useModelFields.d.ts +1 -1
  150. package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +16 -0
  151. package/dist/src/online-form/src/views/designer/modules/panel/comps/signature-config/field-tree-select.vue.d.ts +2 -2
  152. package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/common/add-builtin-param/add-builtin-param-select.vue.d.ts +2 -2
  153. package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/form-field-tree-select.vue.d.ts +2 -2
  154. package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/material-rdo-select.vue.d.ts +2 -2
  155. package/dist/src/online-form/src/views/designer/types/index.d.ts +2 -0
  156. package/dist/src/online-form/src/views/designer/utils/xlsx-parser.d.ts +3 -0
  157. package/dist/src/online-form/src/views/render/__components__/_common_/widget-component.vue.d.ts +3 -1
  158. package/dist/src/shared/components/DoubleInput/double-input.vue.d.ts +5 -0
  159. package/dist/src/shared/components/rdo-tree-select/rdo-tree-select.vue.d.ts +2 -2
  160. package/dist/src/shared/utils/host-api.d.ts +3 -11
  161. package/dist/{text-design-DjJS6aM4.js → text-design-BGxM7gzI.js} +2 -2
  162. package/dist/{text-design-490okDpw.js → text-design-C3RhersV.js} +2 -2
  163. package/dist/{text-props-Dh4S3iN0.js → text-props-CIpXslMv.js} +21 -252
  164. package/dist/{text-style-BGeNrOMv.js → text-style-BPjaT5Ic.js} +1 -1
  165. package/dist/{throttle-Cpk1LoGk-BWXeZXFZ.js → throttle-Cpk1LoGk-LNQ7rPwu.js} +1 -1
  166. package/dist/{timediff-design-DEh9xNVa.js → timediff-design-DqVuVrmx.js} +1 -1
  167. package/dist/{trace-design-Dk0irY70.js → trace-design-IbjVLAhv.js} +2 -2
  168. package/dist/{trace-props-DRBrPqIq.js → trace-props-C-F_eDG2.js} +53 -16
  169. package/dist/{trace-style-6lXlaJ2o.js → trace-style-DRenZ1n1.js} +1 -1
  170. package/dist/{user-props-yasRJPzM.js → user-props-qQx7HZ7T.js} +2 -2
  171. package/dist/{user-style-dkDUDf63.js → user-style-BPFOx0xn.js} +1 -1
  172. package/dist/{value-editor.vue_vue_type_style_index_0_lang-8rhhfLv7.js → value-editor.vue_vue_type_style_index_0_lang-Crnt5d7x.js} +2 -2
  173. package/dist/{version-select-dvsx-Ifv.js → version-select-BkZzH36D.js} +1 -1
  174. package/dist/web-render/index.es.js +4 -4
  175. package/dist/{widget-barcode-BfzXe5MQ.js → widget-barcode-CPZjarSa.js} +4 -4
  176. package/dist/{widget-diagonal-R5qdvCvE.js → widget-diagonal-DebN3u9t.js} +3 -3
  177. package/dist/{widget-image-C0zAtiuf.js → widget-image-BSMWxm9c.js} +5 -5
  178. package/dist/{widget-line-z4TTPDkL.js → widget-line-CyavTHOV.js} +2 -2
  179. package/dist/{widget-pagination-CeO9pmmu.js → widget-pagination-ZCBdy6HQ.js} +5 -5
  180. package/dist/{widget-power-CP1DLxkZ.js → widget-power-B1NFysHT.js} +3 -3
  181. package/dist/{widget-qrcode-Boz_t9l9.js → widget-qrcode-B0TTSoSK.js} +3 -3
  182. package/dist/{widget-rangelimit-B9kRG_Fa.js → widget-rangelimit-C_ureKDr.js} +3 -3
  183. package/dist/{widget-serialnumber-BBUxx4nB.js → widget-serialnumber-Dq15dHnk.js} +1 -1
  184. package/dist/{widget-text-qvLZssGe.js → widget-text-B9EXKFiM.js} +5 -5
  185. package/dist/{widget-timediff-BBmssjfJ.js → widget-timediff-BhLrQuGb.js} +2 -2
  186. package/package.json +1 -1
  187. package/dist/date-format-editor-BZ89hVjL.js +0 -240
  188. package/dist/date-time-props-BWvuzNXX.js +0 -265
  189. package/dist/paper-widget-design-DKBVqvH3.js +0 -4
  190. package/dist/src/nocode-base/src/hooks/form-model/fetcher.d.ts +0 -40
  191. package/dist/src/nocode-base/src/interface/data.d.ts +0 -47
  192. package/dist/src/nocode-base/src/interface/util.d.ts +0 -108
@@ -1,7 +1,7 @@
1
- import { computed, markRaw, ref, onUnmounted, watch, toRef, reactive, inject, provide, defineComponent, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createVNode, toDisplayString, createCommentVNode, onMounted, onBeforeMount, resolveComponent, createBlock, withCtx, Fragment, renderList, createTextVNode, toRaw } from "vue";
2
- import { cloneDeep, has, merge, defaults, pickBy, isNil, mergeWith, debounce, omit, last, pick } from "lodash-es";
3
- import { e as ComponentTypeEnum, F as FIELD_TYPE, i as api, aM as ButtonTypeEnum, t as FormTypeEnum, aH as safeParseArray, aq as RenderModeEnum, aJ as mergeByMultiKey, aL as BpmnSignatureTypeEnum, aI as BpmnNodeTypeEnum, b7 as stockCheck, ao as getParseRuleInfo, ap as getParseRuleValue, b8 as materialCheck, ay as calcFillData, at as FormulaRuleFieldKeyEnum, b9 as judgeUnique, g as SubTableType, ba as getRowId, ae as useCurrentPageFormState, R as Dependency_ENUM, Q as ASSIGNMENTSTRATEGY_ENUM, aF as uuid2, a3 as DeviceLink, E as useNamespace, _ as _export_sfc, al as NCB_PROVIDE, ab as useWidgetStaticAttrs, b6 as setSelectMobileTdId, h as CellType, aZ as deleteSubtableRow, aA as transformUtils, D as useModal, bb as q, aK as getSubTableQuickFillInfo } from "./document-quick-fillin.vue_vue_type_style_index_0_scoped_a18386ab_lang-Bbu6cwRC.js";
4
- import { u as useFormModel, w as watchDebounced } from "./mb-render-Bejyn-ep.js";
1
+ import { computed, watch, toRaw, onUnmounted, markRaw, ref, toRef, reactive, inject, provide, defineComponent, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createVNode, toDisplayString, isVNode, createCommentVNode, onMounted, onBeforeMount, resolveComponent, createBlock, withCtx, Fragment, renderList, createTextVNode } from "vue";
2
+ import { cloneDeep, has, isNil, merge, defaults, pickBy, mergeWith, omit, last, pick } from "lodash-es";
3
+ import { e as ComponentTypeEnum, F as FIELD_TYPE, i as api, aU as ButtonTypeEnum, t as FormTypeEnum, aO as safeParseArray, aq as RenderModeEnum, aQ as mergeByMultiKey, aT as BpmnSignatureTypeEnum, aP as BpmnNodeTypeEnum, ab as useWidgetStaticAttrs, by as assembleRules, bz as deleteFormRule, bA as setFormRule, aF as requestDisplayValidation, bB as isReferenceOptionActive, bC as validateAllFields, bD as runValidation, bE as stockCheck, am as getParseRuleInfo, an as getParseRuleValue, bF as materialCheck, ax as calcFillData, as as FormulaRuleFieldKeyEnum, bG as judgeUnique, g as SubTableType, ao as useCurrentPageFormState, R as Dependency_ENUM, Q as ASSIGNMENTSTRATEGY_ENUM, aM as uuid2, a3 as DeviceLink, E as useNamespace, _ as _export_sfc, aj as NCB_PROVIDE, b6 as buildFormChangeDisplayRows, aR as getRowId, bw as resolveRowFormChangeMark, bv as resolveFormChangeRowUi, bk as isAnnLocationSelected, bx as setSelectMobileTdId, bl as isFormChangeGhostRow, h as CellType, ad as setSelectAnnotationId, br as recordSubtableRowDelete, b9 as deleteSubtableRow, bs as relocateDeletedRowsToEnd, bH as FRONT_ROW_KEY, az as transformUtils, bj as insertSubtableRows, bq as recordSubtableRowAdd, D as useModal, bI as q, aS as getSubTableQuickFillInfo } from "./document-quick-fillin.vue_vue_type_style_index_0_scoped_a18386ab_lang-DKTGEH4Q.js";
4
+ import { u as useFormModel, w as watchDebounced } from "./mb-render-Cs7LUxzk.js";
5
5
  import dayjs from "dayjs";
6
6
  var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
7
7
  MaterialConsumptionPatternEnum2["RECORD"] = "record";
@@ -625,6 +625,254 @@ const useOnlineFormTransformField2Component = (fieldType) => {
625
625
  }
626
626
  }[fieldType];
627
627
  };
628
+ const constantRequiredStyles = {
629
+ "--required-border-color": "rgb(255, 31, 31, 0.36)",
630
+ "--required-border-hover-color": "rgb(255, 31, 31, 0.86)",
631
+ "--required-background-color": "rgb(255, 31, 31, 0.04)"
632
+ };
633
+ const resetRequiredStyles = {
634
+ "--required-border-color": "#e9e9e9",
635
+ "--required-border-hover-color": "var(--ant-primary-color)",
636
+ "--required-background-color": "transparent"
637
+ };
638
+ const reliableVerticalTextStyles = {
639
+ "writing-mode": "horizontal-tb",
640
+ display: "inline-block",
641
+ width: "1em",
642
+ "line-height": "1.2",
643
+ "white-space": "normal",
644
+ "word-break": "break-all",
645
+ "letter-spacing": "0",
646
+ "text-align": "center"
647
+ };
648
+ const isVerticalLrText = (style) => {
649
+ const mode = style?.writingMode ?? style?.["writing-mode"];
650
+ return mode === "vertical-lr";
651
+ };
652
+ function useValidator(props) {
653
+ const widget = props.widget;
654
+ const {
655
+ showModelName,
656
+ showFieldName,
657
+ modelKey,
658
+ fieldType,
659
+ targetFieldId,
660
+ isFieldModel,
661
+ showRequired,
662
+ showDisabled,
663
+ showDisplayStatus,
664
+ dataRelationShip
665
+ } = useWidgetStaticAttrs(widget);
666
+ const sizeStyles = {
667
+ "--size": `${widget.props.size ?? 12}px`,
668
+ "--cmp-width": `${widget.props.cmpWidth ?? 0}px`,
669
+ "--cmp-height": `${widget.props.cmpHeight ?? 0}px`
670
+ };
671
+ const skipFormItem = computed(() => {
672
+ if (widget.component === ComponentTypeEnum.DynValue) {
673
+ return true;
674
+ }
675
+ return !widget.formItem;
676
+ });
677
+ const blocked = computed(() => {
678
+ return !!showDisabled.value || ["readonly-text", "readonly-component"].includes(showDisplayStatus.value);
679
+ });
680
+ const rules = computed(() => {
681
+ if (skipFormItem.value || !targetFieldId) {
682
+ return [];
683
+ }
684
+ return assembleRules({
685
+ showRequired: !!showRequired.value,
686
+ fieldType,
687
+ validatorInfo: {
688
+ showModelName,
689
+ showModelKey: modelKey,
690
+ showFieldName,
691
+ subFieldKey: widget.props.subFieldKey,
692
+ targetFieldId
693
+ },
694
+ props: widget.props
695
+ });
696
+ });
697
+ const getRules = (ruleList, options) => ruleList.map((item) => ({
698
+ ...item,
699
+ ...options
700
+ }));
701
+ const resolveSubtableColIndex = () => {
702
+ if (!isNil(props.childSubTableDataIndex)) {
703
+ return props.childSubTableDataIndex;
704
+ }
705
+ if (targetFieldId === "value_") {
706
+ if (!isNil(props.realColIndex)) return props.realColIndex;
707
+ if (!isNil(props.realRowIndex)) return 0;
708
+ }
709
+ return void 0;
710
+ };
711
+ const resolveAttachMeta = () => {
712
+ const belongFieldId = props.referenceInfo?.belongFieldId;
713
+ const optionValue = props.referenceInfo?.optionValue;
714
+ if (!belongFieldId || isNil(optionValue)) return null;
715
+ return {
716
+ belongFieldId,
717
+ optionValue,
718
+ multiple: props.referenceInfo?.multiple,
719
+ subtableFieldId: props.subtableFieldId,
720
+ realRowIndex: props.realRowIndex,
721
+ childSubTableDataIndex: resolveSubtableColIndex()
722
+ };
723
+ };
724
+ const resolveRuleEntry = () => {
725
+ const attach = resolveAttachMeta();
726
+ const attachOpts = attach ? {
727
+ _belongFieldId: attach.belongFieldId,
728
+ _optionValue: attach.optionValue,
729
+ _multiple: attach.multiple
730
+ } : {};
731
+ if (props.subtableFieldId) {
732
+ if (!isNil(props.realRowIndex)) {
733
+ const colIdx = resolveSubtableColIndex();
734
+ if (colIdx !== void 0) {
735
+ return {
736
+ key: `${props.subtableFieldId}_${props.realRowIndex}_${targetFieldId}_${colIdx}`,
737
+ options: {
738
+ _subtableFieldId: props.subtableFieldId,
739
+ _realRowIndex: props.realRowIndex,
740
+ _targetFieldId: targetFieldId,
741
+ _childSubTableDataIndex: colIdx,
742
+ ...attachOpts
743
+ },
744
+ attach
745
+ };
746
+ }
747
+ return {
748
+ key: `${props.subtableFieldId}_${props.realRowIndex}_${targetFieldId}`,
749
+ options: {
750
+ _subtableFieldId: props.subtableFieldId,
751
+ _realRowIndex: props.realRowIndex,
752
+ _targetFieldId: targetFieldId,
753
+ ...attachOpts
754
+ },
755
+ attach
756
+ };
757
+ }
758
+ return null;
759
+ }
760
+ return {
761
+ key: targetFieldId,
762
+ options: {
763
+ _targetFieldId: targetFieldId,
764
+ ...attachOpts
765
+ },
766
+ attach
767
+ };
768
+ };
769
+ const instanceId = /* @__PURE__ */ Symbol("validatorInstance");
770
+ let prevRuleKey;
771
+ let prevRuleSignature;
772
+ watch(
773
+ () => [
774
+ rules.value,
775
+ blocked.value,
776
+ widget.props?.keepExceptionHighlight,
777
+ props.realRowIndex,
778
+ props.childSubTableDataIndex,
779
+ props.referenceInfo?.belongFieldId,
780
+ props.referenceInfo?.optionValue,
781
+ props.referenceInfo?.multiple
782
+ ],
783
+ () => {
784
+ if (!targetFieldId || !rules.value) return;
785
+ const entry = resolveRuleEntry();
786
+ if (prevRuleKey && (!entry || entry.key !== prevRuleKey)) {
787
+ deleteFormRule(prevRuleKey, instanceId);
788
+ prevRuleSignature = void 0;
789
+ }
790
+ if (!entry) {
791
+ prevRuleKey = void 0;
792
+ return;
793
+ }
794
+ if (rules.value.length === 0) {
795
+ deleteFormRule(entry.key, instanceId);
796
+ prevRuleKey = void 0;
797
+ prevRuleSignature = void 0;
798
+ return;
799
+ }
800
+ const signature = JSON.stringify({
801
+ key: entry.key,
802
+ blocked: blocked.value,
803
+ keep: widget.props?.keepExceptionHighlight,
804
+ attach: entry.attach,
805
+ // 规则条数 / trigger 变化才重写,避免 deep 无关抖动
806
+ ruleFingerprints: rules.value.map((r) => [r.trigger, r.message])
807
+ });
808
+ if (signature === prevRuleSignature) {
809
+ return;
810
+ }
811
+ setFormRule(
812
+ entry.key,
813
+ getRules(toRaw(rules.value), entry.options),
814
+ {
815
+ blocked: blocked.value,
816
+ keepExceptionHighlight: typeof widget.props?.keepExceptionHighlight === "boolean" ? widget.props.keepExceptionHighlight : void 0,
817
+ attach: entry.attach ?? null
818
+ },
819
+ instanceId
820
+ );
821
+ prevRuleKey = entry.key;
822
+ prevRuleSignature = signature;
823
+ const uniqueId = dataRelationShip?.uniqueId;
824
+ if (uniqueId) {
825
+ requestDisplayValidation(uniqueId);
826
+ }
827
+ },
828
+ {
829
+ immediate: true
830
+ }
831
+ );
832
+ onUnmounted(() => {
833
+ if (prevRuleKey) {
834
+ deleteFormRule(prevRuleKey, instanceId);
835
+ prevRuleKey = void 0;
836
+ }
837
+ });
838
+ const referenceActive = computed(
839
+ () => isReferenceOptionActive(props.referenceInfo, props.formData)
840
+ );
841
+ const widgetStyles = computed(() => {
842
+ if (widget.component === ComponentTypeEnum.DynValue) return {};
843
+ const requiredActive = showRequired.value && !blocked.value && referenceActive.value;
844
+ const isAttachField = !!props.referenceInfo?.belongFieldId;
845
+ return {
846
+ ...sizeStyles,
847
+ ...requiredActive ? constantRequiredStyles : isAttachField ? resetRequiredStyles : {},
848
+ ...isVerticalLrText(widget.style) ? reliableVerticalTextStyles : {}
849
+ };
850
+ });
851
+ return {
852
+ widgetStyles,
853
+ targetFieldId,
854
+ isFieldModel
855
+ };
856
+ }
857
+ const validate = async (formData, paper, uniqueId) => {
858
+ if (uniqueId) {
859
+ const res2 = await validateAllFields(uniqueId);
860
+ if (res2) {
861
+ return {
862
+ isValid: res2.isValid,
863
+ fields: res2.fields,
864
+ uiApplied: true
865
+ };
866
+ }
867
+ }
868
+ const res = await runValidation(formData, paper, { mode: "all" });
869
+ if (!res) return;
870
+ return {
871
+ isValid: res.isValid,
872
+ fields: res.fields,
873
+ uiApplied: false
874
+ };
875
+ };
628
876
  class BomEntryValidator {
629
877
  constructor(bomEntry, enableSequenceLoading, materialNoNum, historyData, mainMaterialNo, mcPattern) {
630
878
  this.bomEntry = bomEntry;
@@ -2240,142 +2488,6 @@ class SubTableCore {
2240
2488
  console.log(this.ctx.widget.props.tableTitle, "处理表单按钮点击事件", params);
2241
2489
  }
2242
2490
  }
2243
- function useFormulaExpWatcher(options) {
2244
- const {
2245
- props,
2246
- currentPageFormState,
2247
- needMinValidateCalc,
2248
- needMaxValidateCalc,
2249
- onCalculateFormula,
2250
- onMinComputed,
2251
- onMaxComputed,
2252
- debounceMs = 200,
2253
- returnType = "string"
2254
- } = options;
2255
- let calcReqId = 0;
2256
- async function computeMinMaxOnce() {
2257
- const myId = ++calcReqId;
2258
- const getValue = (v) => {
2259
- if (returnType === "number") {
2260
- const parsed = v == null ? null : parseFloat(String(v));
2261
- return Number.isFinite(parsed) ? parsed : null;
2262
- }
2263
- return v;
2264
- };
2265
- if (needMinValidateCalc) {
2266
- try {
2267
- const v = await onCalculateFormula("min");
2268
- if (myId !== calcReqId) return;
2269
- onMinComputed?.(getValue(v));
2270
- } catch (e) {
2271
- }
2272
- }
2273
- if (needMaxValidateCalc) {
2274
- try {
2275
- const v = await onCalculateFormula("max");
2276
- if (myId !== calcReqId) return;
2277
- onMaxComputed?.(getValue(v));
2278
- } catch (e) {
2279
- }
2280
- }
2281
- }
2282
- const debouncedCompute = debounce(computeMinMaxOnce, debounceMs);
2283
- const topStops = [];
2284
- const hashRowStops = /* @__PURE__ */ new Map();
2285
- const clearAllStops = () => {
2286
- while (topStops.length) {
2287
- const s = topStops.shift();
2288
- try {
2289
- s && s();
2290
- } catch (e) {
2291
- }
2292
- }
2293
- for (const [, rowMap] of hashRowStops) {
2294
- for (const stop2 of rowMap.values()) {
2295
- try {
2296
- stop2 && stop2();
2297
- } catch (e) {
2298
- }
2299
- }
2300
- }
2301
- hashRowStops.clear();
2302
- debouncedCompute.cancel?.();
2303
- calcReqId++;
2304
- };
2305
- const setupWatchesFromMerged = (parseInfos = []) => {
2306
- if (!needMinValidateCalc && !needMaxValidateCalc) return;
2307
- if (!Array.isArray(parseInfos) || parseInfos.length === 0) {
2308
- debouncedCompute();
2309
- return;
2310
- }
2311
- for (const p of parseInfos) {
2312
- const { type, processed, hashValue } = p;
2313
- if (type === "plain") {
2314
- const stop2 = watch(
2315
- () => currentPageFormState.value?.[processed],
2316
- () => {
2317
- console.log("plain");
2318
- debouncedCompute();
2319
- },
2320
- { immediate: true }
2321
- );
2322
- topStops.push(stop2);
2323
- } else if (type === "underscore") {
2324
- const stop2 = watch(
2325
- () => props.formData?.[processed],
2326
- () => {
2327
- console.log("underscore");
2328
- debouncedCompute();
2329
- },
2330
- { immediate: true }
2331
- );
2332
- topStops.push(stop2);
2333
- } else if (type === "hash") {
2334
- if (!hashRowStops.has(hashValue)) hashRowStops.set(hashValue, /* @__PURE__ */ new Map());
2335
- const rowMap = hashRowStops.get(hashValue);
2336
- const stopLen = watch(
2337
- () => currentPageFormState.value?.[hashValue]?.length ?? 0,
2338
- () => {
2339
- const arr = currentPageFormState.value?.[hashValue];
2340
- for (const row of arr) {
2341
- const rid = `${getRowId(row)}_${processed}`;
2342
- if (!rowMap.has(rid)) {
2343
- const stopPerRow = watch(
2344
- () => [row?.[processed], row?.deleted_],
2345
- () => {
2346
- debouncedCompute();
2347
- },
2348
- { immediate: true }
2349
- );
2350
- rowMap.set(rid, stopPerRow);
2351
- }
2352
- }
2353
- const existingIds = new Set(arr.map(getRowId));
2354
- for (const r of Array.from(rowMap.keys())) {
2355
- if (!existingIds.has(r)) {
2356
- const rid = `${r}_${processed}`;
2357
- const s = rowMap.get(rid);
2358
- s && s();
2359
- rowMap.delete(rid);
2360
- }
2361
- }
2362
- debouncedCompute();
2363
- },
2364
- { immediate: true }
2365
- );
2366
- topStops.push(stopLen);
2367
- }
2368
- }
2369
- debouncedCompute();
2370
- };
2371
- const stop = () => {
2372
- clearAllStops();
2373
- };
2374
- return {
2375
- setupWatchesFromMerged,
2376
- stop
2377
- };
2378
- }
2379
2491
  const identify = (...args) => window.NocodeAdapter.utils?.formulaIdentify?.(...args) ?? [];
2380
2492
  const calculate = (...args) => window.NocodeAdapter.utils?.formulaCalculate?.(...args);
2381
2493
  function useDependency(widget, props) {
@@ -2919,7 +3031,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2919
3031
  };
2920
3032
  }
2921
3033
  });
2922
- const BorderTD = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-d6e21476"]]);
3034
+ const BorderTD = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-5c2388a6"]]);
2923
3035
  const _sfc_main$5 = {};
2924
3036
  const _hoisted_1$4 = { class: "nocode-loading" };
2925
3037
  function _sfc_render(_ctx, _cache) {
@@ -2973,6 +3085,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2973
3085
  };
2974
3086
  }
2975
3087
  });
3088
+ function _isSlot(s) {
3089
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
3090
+ }
2976
3091
  const DocumentSubTable = /* @__PURE__ */ defineComponent({
2977
3092
  name: "NocodeDocumentSubTable",
2978
3093
  props: {
@@ -3014,8 +3129,6 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3014
3129
  }
3015
3130
  },
3016
3131
  setup(props, {
3017
- emit,
3018
- expose,
3019
3132
  slots
3020
3133
  }) {
3021
3134
  const defaultDataMap = inject(NCB_PROVIDE.DEFAULT_FIELD_DATA);
@@ -3059,19 +3172,32 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3059
3172
  });
3060
3173
  const dataInfo = computed(() => {
3061
3174
  const visibleToRealIndexMap = {};
3175
+ const displayToLiveRowIndexMap = {};
3062
3176
  const filterValue = [];
3063
- modelValue.value.forEach((item, realIndex) => {
3177
+ const annRowDetails = dataRelationShip?.annRowDetails;
3178
+ const showRowAnn = !!annRowDetails?.length;
3179
+ const sourceRows = showRowAnn ? buildFormChangeDisplayRows(field, modelValue.value, annRowDetails) : modelValue.value;
3180
+ let liveRowCounter = -1;
3181
+ sourceRows.forEach((item, realIndex) => {
3182
+ if (!showRowAnn && item.deleted_) return;
3183
+ const visibleIndex = filterValue.length;
3184
+ visibleToRealIndexMap[visibleIndex] = realIndex;
3064
3185
  if (!item.deleted_) {
3065
- const visibleIndex = filterValue.length;
3066
- visibleToRealIndexMap[visibleIndex] = realIndex;
3067
- filterValue.push(item);
3186
+ liveRowCounter += 1;
3187
+ displayToLiveRowIndexMap[visibleIndex] = liveRowCounter;
3188
+ } else {
3189
+ displayToLiveRowIndexMap[visibleIndex] = -1;
3068
3190
  }
3191
+ filterValue.push(item);
3069
3192
  });
3193
+ const tableData = showRowAnn && !(props.start > 0) ? filterValue : filterValue.slice(props.start, props.end);
3070
3194
  return {
3071
- tableData: filterValue.slice(props.start, props.end),
3072
- hasSubData: filterValue.length > 1,
3073
- isEndRow: props.end === filterValue.length,
3074
- visibleToRealIndexMap
3195
+ tableData,
3196
+ hasSubData: filterValue.filter((d) => !d.deleted_).length > 1,
3197
+ isEndRow: showRowAnn ? true : props.end === filterValue.length,
3198
+ visibleToRealIndexMap,
3199
+ displayToLiveRowIndexMap,
3200
+ showRowAnn
3075
3201
  };
3076
3202
  });
3077
3203
  const currentFieldDefaultData = computed(() => {
@@ -3081,16 +3207,14 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3081
3207
  if (props.isMobile) {
3082
3208
  return false;
3083
3209
  }
3084
- if (dataRelationShip?.formChangeStatus) {
3085
- return false;
3086
- }
3087
3210
  return showDisplayStatus.value === "edit-component";
3088
3211
  });
3089
- computed(() => showAction.value && quickFill);
3090
3212
  const handleDeleteRow = (rowData, dataIdx) => {
3213
+ recordSubtableRowDelete(dataRelationShip, field, rowData);
3091
3214
  deleteSubtableRow(field, props.start + dataIdx);
3092
- if (rowData.id_ || rowData.group_ && rowData._2DTABLE_.some((item) => item.id_)) {
3215
+ if (rowData.id_ || rowData.group_ && rowData._2DTABLE_?.some((item) => item.id_)) {
3093
3216
  rowData.deleted_ = true;
3217
+ modelValue.value = relocateDeletedRowsToEnd(modelValue.value);
3094
3218
  } else {
3095
3219
  rowData.tempDeleted = true;
3096
3220
  modelValue.value = modelValue.value.filter((d) => !d.tempDeleted);
@@ -3106,7 +3230,7 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3106
3230
  rowData,
3107
3231
  quickFillDatas
3108
3232
  }) => {
3109
- const newRowsData = actionType === "copyRow" ? [cloneDeep(omit(rowData, "id_"))] : Array.from({
3233
+ const newRowsData = actionType === "copyRow" ? [cloneDeep(omit(rowData, ["id_", FRONT_ROW_KEY]))] : Array.from({
3110
3234
  length: rowNum
3111
3235
  }, (_, index2) => transformUtils.addSubTableRowItem({
3112
3236
  defaultData: currentFieldDefaultData.value,
@@ -3127,17 +3251,22 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3127
3251
  insertIndex = realIndex + 1;
3128
3252
  break;
3129
3253
  case "last":
3130
- insertIndex = modelValue.value.length;
3254
+ insertIndex = modelValue.value.reduce((last2, row, i) => !row?.deleted_ ? i : last2, -1) + 1;
3131
3255
  break;
3132
3256
  }
3133
3257
  if (actionType === "currentRow") {
3134
3258
  const firstData = newRowsData.shift();
3135
- merge(rowData, firstData);
3259
+ merge(rowData, omit(firstData, ["id_", FRONT_ROW_KEY]));
3260
+ }
3261
+ if (newRowsData.length > 0) {
3262
+ insertSubtableRows(field, insertIndex, newRowsData.length);
3263
+ modelValue.value.splice(insertIndex, 0, ...newRowsData);
3264
+ modelValue.value = relocateDeletedRowsToEnd(modelValue.value);
3265
+ recordSubtableRowAdd(dataRelationShip, field, newRowsData);
3136
3266
  }
3137
- modelValue.value.splice(insertIndex, 0, ...newRowsData);
3138
3267
  updateCalcCallback?.(dataRelationShip?.uniqueId);
3139
3268
  };
3140
- const handleDefaultClick = (rowData, dataIdx) => {
3269
+ const handleDefaultClick = () => {
3141
3270
  const {
3142
3271
  fieldId
3143
3272
  } = props.subInfo;
@@ -3220,16 +3349,68 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3220
3349
  showDelBtn,
3221
3350
  showActionMenu,
3222
3351
  dataIdx,
3223
- dynHeight
3352
+ dynHeight,
3353
+ showRowWatermark,
3354
+ rowGroupKey
3224
3355
  }) => {
3225
3356
  const menus = subTableCore?.calcSubTableActionMenu({
3226
3357
  rowData,
3227
3358
  showDelBtn
3228
3359
  });
3360
+ const annRowDetails = dataRelationShip?.annRowDetails;
3361
+ const rowMark = dataIdx !== -1 && annRowDetails?.length ? resolveRowFormChangeMark(field, rowData, annRowDetails) : null;
3362
+ const rowUi = resolveFormChangeRowUi(rowData, rowMark);
3363
+ const isRowSelected = isAnnLocationSelected(dataRelationShip?.annSelectId, rowMark?.cellLocation);
3364
+ const trClass = [rowUi.trClass, isRowSelected ? "form-change-row-selected" : ""].filter(Boolean).join(" ");
3365
+ const handleRowAnnClick = (e) => {
3366
+ if (!rowMark) return;
3367
+ if (e.target?.closest?.(".sub-table-action-bar")) return;
3368
+ setSelectAnnotationId(rowMark.cellLocation, dataRelationShip);
3369
+ };
3370
+ const wmHostTdId = rowMark && showRowWatermark ? trData.nextIds.find((tdId) => {
3371
+ let tdInfo = props.widgetCenter[tdId];
3372
+ if (subTableCore) {
3373
+ tdInfo = subTableCore.calcNewTdInfo({
3374
+ oldTdInfo: tdInfo,
3375
+ rowData
3376
+ });
3377
+ }
3378
+ const mergeInfo = props.subInfo.mergeBlock?.[tdId];
3379
+ if (mergeInfo) return true;
3380
+ if (tdInfo.cellHidden) return false;
3381
+ return !!tdInfo.cellValueType;
3382
+ }) : null;
3383
+ const layoutRowWatermark = (el) => {
3384
+ if (!(el instanceof HTMLElement) || !rowGroupKey) return;
3385
+ requestAnimationFrame(() => {
3386
+ const table = el.closest("table");
3387
+ const host = el.offsetParent;
3388
+ if (!table || !host) return;
3389
+ const group = Array.from(table.querySelectorAll("tr[data-fc-row-key]")).filter((tr) => tr.getAttribute("data-fc-row-key") === rowGroupKey);
3390
+ if (!group.length) return;
3391
+ const firstRect = group[0].getBoundingClientRect();
3392
+ const lastRect = group[group.length - 1].getBoundingClientRect();
3393
+ const hostRect = host.getBoundingClientRect();
3394
+ el.style.left = `${firstRect.left - hostRect.left}px`;
3395
+ el.style.top = `${firstRect.top - hostRect.top}px`;
3396
+ el.style.width = `${firstRect.width}px`;
3397
+ el.style.height = `${Math.max(lastRect.bottom - firstRect.top, firstRect.height)}px`;
3398
+ });
3399
+ };
3400
+ const rowWatermark = rowMark && wmHostTdId && rowUi.wmKind ? createVNode("span", {
3401
+ "class": ["form-change-row-wm", rowUi.wmClass],
3402
+ "data-row-key": rowGroupKey,
3403
+ "ref": layoutRowWatermark
3404
+ }, [rowUi.wmText]) : null;
3229
3405
  return createVNode("tr", {
3230
3406
  "key": trKey,
3231
- "height": dynHeight || trData.props.height
3232
- }, [trData.nextIds.map((tdId, tdIdx) => {
3407
+ "height": dynHeight || trData.props.height,
3408
+ "class": trClass || void 0,
3409
+ "data-fc-row-op": rowMark?.op || void 0,
3410
+ "data-fc-row-key": rowMark && rowGroupKey ? rowGroupKey : void 0,
3411
+ "data-fc-wm": rowMark && showRowWatermark ? rowUi.wmKind || void 0 : void 0,
3412
+ "onClick": rowMark ? handleRowAnnClick : void 0
3413
+ }, [trData.nextIds.map((tdId) => {
3233
3414
  let tdInfo = props.widgetCenter[tdId];
3234
3415
  if (subTableCore) {
3235
3416
  tdInfo = subTableCore.calcNewTdInfo({
@@ -3253,6 +3434,7 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3253
3434
  hidden: false
3254
3435
  });
3255
3436
  }
3437
+ const cellWm = tdId === wmHostTdId ? rowWatermark : null;
3256
3438
  if (tdInfo.cellValueType) {
3257
3439
  if (props.isMobile) {
3258
3440
  Object.assign(tdAttrs, {
@@ -3263,10 +3445,13 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3263
3445
  formData: rowData
3264
3446
  };
3265
3447
  if (dataIdx !== -1) {
3448
+ const displayIndex = Number(props.start ?? 0) + dataIdx;
3449
+ const ghost = dataInfo.value.showRowAnn && isFormChangeGhostRow(rowData);
3266
3450
  Object.assign(subWidgetAttrs, {
3267
3451
  subtableFieldId: field,
3268
- realRowIndex: Number(props.start ?? 0) + dataIdx,
3269
- pageRowIndex: dataIdx
3452
+ realRowIndex: ghost ? void 0 : dataInfo.value.showRowAnn ? dataInfo.value.displayToLiveRowIndexMap?.[displayIndex] : displayIndex,
3453
+ pageRowIndex: dataIdx,
3454
+ rowKey: getRowId(rowData)
3270
3455
  });
3271
3456
  }
3272
3457
  if (tdInfo.props.isNewFixedTableInDyn) {
@@ -3281,7 +3466,7 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3281
3466
  }, tdAttrs, {
3282
3467
  "isEmpty": true
3283
3468
  }), {
3284
- default: () => [tdInfo.cellValueType !== CellType.Default || tdInfo.cellWidget.props.value ? slots.widget?.({
3469
+ default: () => [cellWm, tdInfo.cellValueType !== CellType.Default || tdInfo.cellWidget.props.value ? slots.widget?.({
3285
3470
  tdInfo,
3286
3471
  ...subWidgetAttrs
3287
3472
  }) : null]
@@ -3292,7 +3477,9 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3292
3477
  "style": tdInfo.style
3293
3478
  }, tdAttrs, {
3294
3479
  "isEmpty": true
3295
- }), null);
3480
+ }), _isSlot(cellWm) ? cellWm : {
3481
+ default: () => [cellWm]
3482
+ });
3296
3483
  }
3297
3484
  }), showAction.value && showActionMenu ? createVNode("div", {
3298
3485
  "class": "sub-table-action-bar"
@@ -3319,7 +3506,7 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3319
3506
  }, [createVNode("colgroup", null, [colsWidth.map((cw, cwIdx) => createVNode("col", {
3320
3507
  "key": cwIdx,
3321
3508
  "width": cw
3322
- }, null))]), createVNode("tbody", null, [props.subInfo.containerIds.map((trId, trIdx) => {
3509
+ }, null))]), createVNode("tbody", null, [props.subInfo.containerIds.map((trId) => {
3323
3510
  const trInfo = props.widgetCenter[trId];
3324
3511
  if (trInfo.props.identifier !== "dynamicTr") {
3325
3512
  const dynHeight = props.subInfo.dynamicRowHeights?.[trId];
@@ -3331,20 +3518,20 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
3331
3518
  });
3332
3519
  }
3333
3520
  if (trId === lastDynamicId) {
3334
- const lastDataIdx = dataInfo.value.tableData.length - 1;
3335
3521
  return dataInfo.value.tableData.map((data, dataIdx) => {
3522
+ const stableRowKey = getRowId(data);
3336
3523
  return dynamicIds.map((rowId, rowIdx) => {
3337
- const isLast = dataIdx === lastDataIdx && rowIdx === lastDynRowIdx;
3338
3524
  const showDelBtn = dataInfo.value.hasSubData && rowIdx === lastDynRowIdx;
3339
- dataInfo.value.isEndRow && isLast;
3340
3525
  const showActionMenu = rowIdx === lastDynRowIdx;
3341
3526
  const row = props.widgetCenter[rowId];
3342
3527
  const dynHeight = props.subInfo.dynamicRowHeights?.[rowId]?.[dataIdx];
3343
- return renderTr2Td(`${dataIdx}_${rowIdx}`, row, data, {
3528
+ return renderTr2Td(`${stableRowKey}_${rowIdx}`, row, data, {
3344
3529
  showDelBtn,
3345
3530
  showActionMenu,
3346
3531
  dataIdx,
3347
- dynHeight
3532
+ dynHeight,
3533
+ showRowWatermark: rowIdx === 0,
3534
+ rowGroupKey: stableRowKey
3348
3535
  });
3349
3536
  });
3350
3537
  });
@@ -3536,8 +3723,6 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3536
3723
  }
3537
3724
  },
3538
3725
  setup(props, {
3539
- emit,
3540
- expose,
3541
3726
  slots
3542
3727
  }) {
3543
3728
  const defaultDataMap = inject(NCB_PROVIDE.DEFAULT_FIELD_DATA);
@@ -3560,8 +3745,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3560
3745
  colsWidth,
3561
3746
  dynamicIds,
3562
3747
  isRowSubTable2d,
3563
- childInitRowLen,
3564
- quickFill
3748
+ childInitRowLen
3565
3749
  } = reactive(props.widget.props);
3566
3750
  const lastDynRowIdx = dynamicIds.length - 1;
3567
3751
  const lastDynamicId = last(dynamicIds);
@@ -3611,11 +3795,12 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3611
3795
  }
3612
3796
  return showDisplayStatus.value === "edit-component";
3613
3797
  });
3614
- computed(() => showAction.value && quickFill);
3615
3798
  const handleDeleteRow = (rowData, dataIdx) => {
3799
+ recordSubtableRowDelete(dataRelationShip, field, rowData);
3616
3800
  deleteSubtableRow(field, props.start + dataIdx);
3617
- if (rowData.id_ || rowData.group_ && rowData._2DTABLE_.some((item) => item.id_)) {
3801
+ if (rowData.id_ || rowData.group_ && rowData._2DTABLE_?.some((item) => item.id_)) {
3618
3802
  rowData.deleted_ = true;
3803
+ modelValue.value = relocateDeletedRowsToEnd(modelValue.value);
3619
3804
  } else {
3620
3805
  rowData.tempDeleted = true;
3621
3806
  modelValue.value = modelValue.value.filter((d) => !d.tempDeleted);
@@ -3633,7 +3818,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3633
3818
  if (!isFormChange.value && tableController.hasEditingRow()) {
3634
3819
  return;
3635
3820
  }
3636
- const newRowsData = actionType === "copyRow" ? [cloneDeep(omit(rowData, "id_"))] : Array.from({
3821
+ const newRowsData = actionType === "copyRow" ? [cloneDeep(omit(rowData, ["id_", FRONT_ROW_KEY]))] : Array.from({
3637
3822
  length: rowNum
3638
3823
  }, (_, index2) => transformUtils.addSubTableRowItem({
3639
3824
  defaultData: currentFieldDefaultData.value,
@@ -3661,13 +3846,17 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3661
3846
  }
3662
3847
  if (actionType === "currentRow") {
3663
3848
  const firstData = newRowsData.shift();
3664
- merge(rowData, firstData);
3849
+ merge(rowData, omit(firstData, ["id_", FRONT_ROW_KEY]));
3850
+ }
3851
+ if (newRowsData.length > 0) {
3852
+ insertSubtableRows(field, insertIndex, newRowsData.length);
3853
+ modelValue.value.splice(insertIndex, 0, ...newRowsData);
3854
+ modelValue.value = relocateDeletedRowsToEnd(modelValue.value);
3855
+ recordSubtableRowAdd(dataRelationShip, field, newRowsData);
3665
3856
  }
3666
- modelValue.value.splice(insertIndex, 0, ...newRowsData);
3667
3857
  updateCalcCallback?.(dataRelationShip?.uniqueId);
3668
3858
  };
3669
3859
  const handleAction = (action, rowData) => {
3670
- console.log("action", action);
3671
3860
  switch (action) {
3672
3861
  case MaterialConsumeActionType.CONFIRM:
3673
3862
  tableController.confirm(rowData);
@@ -3812,7 +4001,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3812
4001
  return createVNode("tr", {
3813
4002
  "key": trKey,
3814
4003
  "height": dynHeight || trData.props.height
3815
- }, [trData.nextIds.map((tdId, tdIdx) => {
4004
+ }, [trData.nextIds.map((tdId) => {
3816
4005
  const tdInfo = getNewTdInfo(props.widgetCenter[tdId], rowData);
3817
4006
  const tdAttrs = {
3818
4007
  key: tdId,
@@ -3843,7 +4032,8 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3843
4032
  Object.assign(subWidgetAttrs, {
3844
4033
  subtableFieldId: field,
3845
4034
  realRowIndex: Number(props.start ?? 0) + dataIdx,
3846
- pageRowIndex: dataIdx
4035
+ pageRowIndex: dataIdx,
4036
+ rowKey: getRowId(rowData)
3847
4037
  });
3848
4038
  }
3849
4039
  if (tdInfo.props.isNewFixedTableInDyn) {
@@ -3893,7 +4083,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3893
4083
  }, [createVNode("colgroup", null, [colsWidth.map((cw, cwIdx) => createVNode("col", {
3894
4084
  "key": cwIdx,
3895
4085
  "width": cw
3896
- }, null))]), createVNode("tbody", null, [props.subInfo.containerIds.map((trId, trIdx) => {
4086
+ }, null))]), createVNode("tbody", null, [props.subInfo.containerIds.map((trId) => {
3897
4087
  const trInfo = props.widgetCenter[trId];
3898
4088
  console.log("trInfo", trInfo);
3899
4089
  if (trInfo.props.identifier !== "dynamicTr") {
@@ -3908,18 +4098,18 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
3908
4098
  if (trId === lastDynamicId) {
3909
4099
  const lastDataIdx = dataInfo.value.tableData.length - 1;
3910
4100
  return dataInfo.value.tableData.map((data, dataIdx) => {
4101
+ const stableRowKey = getRowId(data);
3911
4102
  return dynamicIds.map((rowId, rowIdx) => {
3912
4103
  const isLastDynRow = rowIdx === lastDynRowIdx;
3913
4104
  const isLast = dataIdx === lastDataIdx && isLastDynRow;
3914
4105
  const showDelBtn = dataInfo.value.hasSubData && isLastDynRow && // 开启了顺序投料时,只有最后一行可以删除
3915
4106
  (tableController.enableSequenceLoading ? isLast : true);
3916
4107
  const showScanBtn = isLast;
3917
- dataInfo.value.isEndRow && isLast;
3918
4108
  const showActionMenu = isLastDynRow;
3919
4109
  const showEditBtn = !isFormChange.value && (tableController.enableSequenceLoading ? isLast : true) && data.is_confirmed_;
3920
4110
  const row = props.widgetCenter[rowId];
3921
4111
  const dynHeight = props.subInfo.dynamicRowHeights?.[rowId]?.[dataIdx];
3922
- return renderTr2Td(`${dataIdx}_${rowIdx}`, row, data, {
4112
+ return renderTr2Td(`${stableRowKey}_${rowIdx}`, row, data, {
3923
4113
  showDelBtn,
3924
4114
  showActionMenu,
3925
4115
  showScanBtn,
@@ -4791,9 +4981,9 @@ export {
4791
4981
  SubTableCore as S,
4792
4982
  _sfc_main$4 as _,
4793
4983
  useFormTmplConfig as a,
4794
- useFormulaExpWatcher as b,
4795
- useStyles as c,
4796
- useDependency as d,
4984
+ useStyles as b,
4985
+ useDependency as c,
4986
+ useValidator as d,
4797
4987
  DocumentPaper as e,
4798
4988
  DocumentSubTableAction as f,
4799
4989
  MaterialConsumeTableController as g,
@@ -4809,5 +4999,6 @@ export {
4809
4999
  DocumentLoading as q,
4810
5000
  MCDataUtil as r,
4811
5001
  useOnlineFormActionButton as s,
4812
- useOnlineFormTransformField2Component as u
5002
+ useOnlineFormTransformField2Component as u,
5003
+ validate as v
4813
5004
  };