@gct-paas/excel 0.1.39-beta.0 → 0.1.40-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AntdIcon-DCIaV352.js +1108 -0
- package/dist/{BaseComponent-BO75HbkD.js → BaseComponent-BTolXjlE.js} +4 -3
- package/dist/{VueVideoPlayer-C49th9G_.js → VueVideoPlayer-Dvf7Ya7H.js} +2 -2
- package/dist/{align-editor-CpscpDxA.js → align-editor-jp0NsOnT.js} +1 -1
- package/dist/{barcode-design-CKbMreUi.js → barcode-design-ClfdoOKn.js} +3 -2
- package/dist/base/index.es.js +168 -30
- package/dist/{diagonal-design-DEz3_fE8.js → diagonal-design-Br0xpyqC.js} +3 -2
- package/dist/{dynamic-table-action-DFnvJWw-.js → dynamic-table-action-C-HIKtZG.js} +115 -27
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BDkKB_4N.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BHExrYFJ.js} +14 -9
- package/dist/{edit.utils-CXmmCnxE-evcsspEJ.js → edit.utils-CXmmCnxE-D4-n_eOM.js} +1 -1
- package/dist/excel.css +94 -13
- package/dist/{exceljs.min-CXjktZ33.js → exceljs.min-BH63KI8s.js} +2 -2
- package/dist/{font-editor-DAcmrW2A.js → font-editor-QSpu9bjJ.js} +3 -3
- package/dist/{image-design-BnDK5Jwf.js → image-design-ySQAmnTF.js} +2 -2
- package/dist/{index-Dn7Za3rP.js → index-2FWN7Q91.js} +3 -2
- package/dist/{index-KnPqm-JT.js → index-4_qe7Eco.js} +3 -2
- package/dist/{index-BRV9V8ld.js → index-8yhxxqYM.js} +2 -1
- package/dist/{index-C8AH07MC.js → index-B3mCVcXB.js} +3 -2
- package/dist/{index-BlFNgjr-.js → index-B6Bs-q34.js} +3 -2
- package/dist/{index-DRF0yT-Y.js → index-BHiNdrGr.js} +3 -2
- package/dist/{index-kQi_q492.js → index-BJ6ZaX-f.js} +3 -2
- package/dist/{index-D72ZxU1B.js → index-BJQd1G0r.js} +4 -3
- package/dist/{index-D1m06PsY.js → index-BOaDYNtp.js} +3 -2
- package/dist/{index-DWPgvBzt.js → index-BXXvFDgt.js} +2 -1
- package/dist/{index-BVCrUywZ.js → index-BxEjRF0o.js} +3 -2
- package/dist/{index-CeoXayAy.js → index-C2RMbM6E.js} +3 -2
- package/dist/{index-IAfu2tPO.js → index-C7DwXZ-K.js} +2 -1
- package/dist/{index-BlZQjpdp.js → index-CMOvPSr6.js} +3 -2
- package/dist/{index-DALo6h-z.js → index-CN-rY-3F.js} +2 -1
- package/dist/{index-DUgFd0ON.js → index-COx1-SPe.js} +3 -2
- package/dist/{index-vOd76hbp.js → index-CTO4kNz9.js} +2 -1
- package/dist/{index-H2lP-HBC.js → index-CUrMIr2v.js} +3 -2
- package/dist/{index-B0o6GTve.js → index-Ca8q7yXC.js} +3 -2
- package/dist/{index-BJj0R1JE.js → index-Cb-I6DkL.js} +2 -1
- package/dist/{index-CQ9v7Q0g.js → index-Cf7KwZfa.js} +5 -4
- package/dist/{index-BNjowwSy.js → index-CvDQjwre.js} +2 -1
- package/dist/{index-BRKs8S7h.js → index-D3IdoYWe.js} +3 -2
- package/dist/{index-ywxJkkJ_.js → index-D9zBCWpE.js} +3 -2
- package/dist/{index-BvYfYS4D.js → index-DYxskDRv.js} +4 -3
- package/dist/{index-DScv6Lhe.js → index-DZGqXE3S.js} +4 -3
- package/dist/{index-BA3994iB.js → index-DbPA5PUX.js} +2 -1
- package/dist/{index-BH4YqNzS.js → index-FSCxAVGq.js} +3 -2
- package/dist/{index-4-w7U148.js → index-QTmeSdj9.js} +3 -2
- package/dist/{index-D06X_Sz7.js → index-Qf8D5LdT.js} +4 -3
- package/dist/{index-qKN7-uGo.js → index-dhaw5vxN.js} +3 -2
- package/dist/{index-CNBwsBrN.js → index-ibQys99q.js} +2 -1
- package/dist/{index-D9SThznm.js → index-nBc_3R3r.js} +2 -1
- package/dist/{index-CCNBotX0.js → index-oOLbaFI8.js} +10324 -10186
- package/dist/{index-CXBwY7ba.js → index-uVpJOLb3.js} +2 -2
- package/dist/index.es.js +4 -2
- package/dist/{mb-render-jAsNtPqY.js → mb-render-BRejJNP-.js} +1 -1
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-CqKkoSRa.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-QX4lxsni.js} +5 -1034
- package/dist/{pagination-design-6xxPBIk-.js → pagination-design-pTh3Fqbz.js} +3 -2
- package/dist/paper-widget-design-CBI-8vTV.js +4 -0
- package/dist/{print-runtime-instance-D8QAHAsd.js → print-runtime-instance-CBUjws4D.js} +1 -1
- package/dist/{print-snapshot-renderer-BDrHYena.js → print-snapshot-renderer-s0IhY_T_.js} +3 -3
- package/dist/{qrcode-design-CBDd-S2d.js → qrcode-design-CnKOb-s9.js} +1 -1
- package/dist/{revo-grid.entry-Bygattd8.js → revo-grid.entry-BqbaKcyR.js} +1 -1
- package/dist/{revogr-attribution_7.entry-BqzhD1hP.js → revogr-attribution_7.entry-jmN78nkb.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-Wr7KhnJ_.js → revogr-clipboard_3.entry-eK74i7_f.js} +2 -2
- package/dist/{revogr-data_4.entry-CrFW39f1.js → revogr-data_4.entry-D2lAUBEM.js} +2 -2
- package/dist/{revogr-filter-panel.entry-9khS41SL.js → revogr-filter-panel.entry-C-1WXBDy.js} +1 -1
- package/dist/seal-design-CMJBAfIN.js +4 -0
- package/dist/{serialnumber-design-eXgfrjw9.js → serialnumber-design-DEYD9ku_.js} +1 -1
- package/dist/shared/index.es.js +2 -2
- package/dist/{single-field-drop-1eS6_6ko.js → single-field-drop-Bd3PcWQF.js} +3 -3
- package/dist/{size-editor-OEPrJU0W.js → size-editor-DiZ8E2R6.js} +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +1 -0
- package/dist/src/nocode-base/src/hooks/render-page/runtime-data-sources.d.ts +45 -0
- package/dist/src/nocode-base/src/hooks/render-page/types.d.ts +3 -0
- package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +39 -0
- package/dist/src/nocode-base/src/hooks/useRuntimeInstanceServices.d.ts +21 -0
- package/dist/src/nocode-base/src/runtime/conversions/v1-runtime.d.ts +1 -1
- package/dist/src/nocode-base/src/runtime/runtime-context.d.ts +2 -0
- package/dist/src/nocode-base/src/runtime/runtime-field-state.d.ts +5 -2
- package/dist/src/nocode-base/src/runtime/runtime-instance-registry.d.ts +5 -5
- package/dist/src/nocode-base/src/types/common/base.d.ts +2 -0
- package/dist/src/online-form/src/components/device/device-select.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +133 -9
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +62 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +6 -0
- package/dist/src/online-form/src/views/designer/types/index.d.ts +5 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-media.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/render/__components__/_field_/seal/index.d.ts +1 -0
- package/dist/{sub-table-factory-D8KUikPE.js → sub-table-factory-B6HdlZ7-.js} +2 -2
- package/dist/{text-design-BkvEuU7u.js → text-design-D2IwsbOW.js} +3 -2
- package/dist/{throttle-Cpk1LoGk-DxTostCa.js → throttle-Cpk1LoGk-DRpYOKiV.js} +1 -1
- package/dist/{timediff-design-BFf9WtJn.js → timediff-design-Cq3SADlb.js} +2 -1
- package/dist/{trace-like-wrapper-SPo5HVCt.js → trace-like-wrapper-Qmczl-Hz.js} +3 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-BzVvcoTa.js → value-editor.vue_vue_type_style_index_0_lang-UXPOa0Wv.js} +3 -2
- package/dist/web-render/index.es.js +4 -3
- package/dist/{widget-barcode-B_aUPEfd.js → widget-barcode-C7wO0SFO.js} +5 -4
- package/dist/{widget-diagonal-D32J64HV.js → widget-diagonal-Cbuv8o5A.js} +5 -4
- package/dist/{widget-image-BOOWwiSe.js → widget-image-4AeqjwGp.js} +5 -5
- package/dist/{widget-line-xVHcCE1_.js → widget-line--RgXiyvO.js} +3 -2
- package/dist/{widget-pagination-B0Bq_gL5.js → widget-pagination-jr6bVWPW.js} +6 -5
- package/dist/{widget-power-TNCB2u1G.js → widget-power-ptilZfAF.js} +5 -4
- package/dist/{widget-qrcode-gVSwYuKp.js → widget-qrcode-DH-1741M.js} +4 -3
- package/dist/{widget-rangelimit-BO7Z_5N9.js → widget-rangelimit-B4yv3Qw3.js} +4 -4
- package/dist/{widget-serialnumber-BX83djNf.js → widget-serialnumber-AZ2IUJTg.js} +1 -1
- package/dist/{widget-text-CIqov_wj.js → widget-text-CW0A1n16.js} +5 -5
- package/dist/{widget-timediff-kFxxm2hM.js → widget-timediff-C3xTGqfj.js} +3 -2
- package/package.json +2 -2
- package/dist/paper-widget-design-CUk1634i.js +0 -4
- package/dist/seal-design-DNrW57Za.js +0 -4
- package/dist/use-namespace-BxkK4ofX.js +0 -77
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as normalizeFieldWidth } from "./dynamic-table-action-
|
|
1
|
+
import { n as normalizeFieldWidth } from "./dynamic-table-action-C-HIKtZG.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-
|
|
3
|
+
import { F as FIELD_TYPE } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BHExrYFJ.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,
|
|
@@ -45,7 +45,8 @@ class BaseComponent {
|
|
|
45
45
|
cmpWidth: String(normalizeFieldWidth(data.info?.compWidth)),
|
|
46
46
|
cmpHeight: get(data.info, "compHeight", 30),
|
|
47
47
|
size: get(data.info, "fontSize", 12),
|
|
48
|
-
componentDependency: get(data.info, "componentDependency", void 0)
|
|
48
|
+
componentDependency: get(data.info, "componentDependency", void 0),
|
|
49
|
+
valueChangeDataSourceKeys: get(data.info, "valueChangeDataSourceKeys", void 0)
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
52
|
getCommonStyle(data) {
|
|
@@ -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-
|
|
3
|
-
import { r as require$$0 } from "./index-
|
|
2
|
+
import { M as commonjsGlobal, N as getDefaultExportFromCjs } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BHExrYFJ.js";
|
|
3
|
+
import { r as require$$0 } from "./index-uVpJOLb3.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 { a8 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-
|
|
2
|
+
import { a8 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BHExrYFJ.js";
|
|
3
3
|
const _hoisted_1 = { class: "align-group-box" };
|
|
4
4
|
const _hoisted_2 = ["onClick"];
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,8 +1,9 @@
|
|
|
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-
|
|
4
|
-
import { Q as PaperWidgeValueType, a8 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-
|
|
3
|
+
import { u as useSpreadSheet, h as useModelFields, l as loadBwip } from "./index-oOLbaFI8.js";
|
|
4
|
+
import { Q as PaperWidgeValueType, a8 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BHExrYFJ.js";
|
|
5
5
|
import "dayjs";
|
|
6
|
+
import "@gct-paas/form-base";
|
|
6
7
|
import "ant-design-vue";
|
|
7
8
|
const _hoisted_1 = { class: "wrapper" };
|
|
8
9
|
const _hoisted_2 = {
|
package/dist/base/index.es.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { E as api, $ as PlatformEnum, F as FIELD_TYPE, bi as getRowId, bj as findRuntimeTableRow, b8 as RenderModeEnum, C as ComponentTypeEnum, bv as assembleRules, bw as isAttachFieldActive, aI as Dependency_ENUM, bk as calculateFormula, aH as ASSIGNMENTSTRATEGY_ENUM, R as getParseFormulaVarInfos, bx as fetchHistoryConsume, by as isBomGranted, aW as renderUtils, bu as uuid2, bz as parseFrontConfig, aL as CheckDsTypeEnum, aF as transformUtils, bA as baseDataUtils, bB as initializeSealFields, Y as FormTypeEnum, bC as normalizeToArray, bD as safeParseArray, bE as BpmnNodeTypeEnum, bF as mergeByMultiKey, a8 as _export_sfc, bG as evaluateInspectionDecisionRule, bH as areValidationCommentsEqual, bI as useNocodeEmitter, bJ as commonUtils, aJ as EntityModelCategoryEnum } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-
|
|
2
|
-
import { aO, aQ, a$, a1, bK, bL, B, bM, y, ai, bN, bO, bP, bh, bQ, aT, ay, aP, aM, aN, bR, aj, an, bS, bT, aG, a3, ah, az, aR, a0, al, L, bU, bV, O, p, P, aa, o, Q, A, bW, bX, ax, aw, a6, a2, a4, a5, a7, f, bY, am, aq, ak, bZ, b_, b$, c0, bg, c1, c2, c3, c4, c5, c6, c7, c8, bl, c9, ca, aZ, cb, b0, b1, cc, cd, ce, cf, cg, ch, ci, cj, ck, aY, cl, b2, be, cm, cn, co, ao, t, aS, cp, cq, bm, a_ } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-
|
|
3
|
-
import { L as getRuntimeDataFieldId, x as parseRuntimeFieldPath, O as buildRuntimeFieldPath, P as resolveRuntimeFieldProps, Q as resolveRuntimeFieldState, T as getRuntimeDependencyOutputKey, U as isRowAddedInCurrentFormChange, l as MaterialConsumptionPatternEnum, V as MaterialConsumeTableController, W as setFormulaParamsConfig, X as normalizeRuntime, F as createRuntimeInstanceContext, R as RuntimeFormStateStore, Y as RuntimeSheetService, g as getBusinessFieldKey, Z as validateObjectBomQtyOnSubmit, $ as closeValidatorPopovers, a0 as enrichFormChangeRowDetails, N as NCB_PROVIDE, G as RuntimeInstanceRegistry, a1 as useMaterialBalance, a2 as collectFormChangeFieldLocations, a3 as nextFormChangeRowViewHistoryId } from "../dynamic-table-action-
|
|
4
|
-
import { B as B2, a4 as a42, b, _, a5 as a52, J, a6 as a62, K, E, a7 as a72, a8, a9, aa as aa2, ab, ac, M, ad, ae, af, ag, ah as ah2, ai as ai2, aj as aj2, ak as ak2, q, al as al2, k, am as am2, c, an as an2, ao as ao2, ap, aq as aq2, j, t as t2, ar, as, at, au, d, w, a, av, aw as aw2, ax as ax2, ay as ay2, az as az2, aA, m, r, aB, o as o2, h, aC, s, aD, z, A as A2, u, p as p2, C, f as f2, i, y as y2, e, v } from "../dynamic-table-action-
|
|
5
|
-
import { toRaw, watch, toRef, computed, defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, ref, provide, onUnmounted,
|
|
6
|
-
import { cloneDeep, defaults, isEmpty, merge } from "lodash-es";
|
|
1
|
+
import { E as api, $ as PlatformEnum, F as FIELD_TYPE, bi as getRowId, bj as findRuntimeTableRow, b8 as RenderModeEnum, C as ComponentTypeEnum, bv as assembleRules, bw as isAttachFieldActive, aI as Dependency_ENUM, bk as calculateFormula, aH as ASSIGNMENTSTRATEGY_ENUM, R as getParseFormulaVarInfos, bx as fetchHistoryConsume, by as isBomGranted, aW as renderUtils, bu as uuid2, bz as parseFrontConfig, aL as CheckDsTypeEnum, aF as transformUtils, bA as baseDataUtils, bB as initializeSealFields, Y as FormTypeEnum, bC as normalizeToArray, bD as safeParseArray, bE as BpmnNodeTypeEnum, bF as mergeByMultiKey, a8 as _export_sfc, bG as evaluateInspectionDecisionRule, bH as areValidationCommentsEqual, bI as useNocodeEmitter, bJ as commonUtils, aJ as EntityModelCategoryEnum } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BHExrYFJ.js";
|
|
2
|
+
import { aO, aQ, a$, a1, bK, bL, B, bM, y, ai, bN, bO, bP, bh, bQ, aT, ay, aP, aM, aN, bR, aj, an, bS, bT, aG, a3, ah, az, aR, a0, al, L, bU, bV, O, p, P, aa, o, Q, A, bW, bX, ax, aw, a6, a2, a4, a5, a7, f, bY, am, aq, ak, bZ, b_, b$, c0, bg, c1, c2, c3, c4, c5, c6, c7, c8, bl, c9, ca, aZ, cb, b0, b1, cc, cd, ce, cf, cg, ch, ci, cj, ck, aY, cl, b2, be, cm, cn, co, ao, t, aS, cp, cq, bm, a_ } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BHExrYFJ.js";
|
|
3
|
+
import { L as getRuntimeDataFieldId, x as parseRuntimeFieldPath, O as buildRuntimeFieldPath, P as resolveRuntimeFieldProps, Q as resolveRuntimeFieldState, T as getRuntimeDependencyOutputKey, U as isRowAddedInCurrentFormChange, l as MaterialConsumptionPatternEnum, V as MaterialConsumeTableController, W as setFormulaParamsConfig, X as normalizeRuntime, F as createRuntimeInstanceContext, R as RuntimeFormStateStore, Y as RuntimeSheetService, g as getBusinessFieldKey, Z as validateObjectBomQtyOnSubmit, $ as closeValidatorPopovers, a0 as enrichFormChangeRowDetails, N as NCB_PROVIDE, G as RuntimeInstanceRegistry, a1 as useMaterialBalance, a2 as collectFormChangeFieldLocations, a3 as nextFormChangeRowViewHistoryId } from "../dynamic-table-action-C-HIKtZG.js";
|
|
4
|
+
import { B as B2, a4 as a42, b, _, a5 as a52, J, a6 as a62, K, E, a7 as a72, a8, a9, aa as aa2, ab, ac, M, ad, ae, af, ag, ah as ah2, ai as ai2, aj as aj2, ak as ak2, q, al as al2, k, am as am2, c, an as an2, ao as ao2, ap, aq as aq2, j, t as t2, ar, as, at, au, d, w, a, av, aw as aw2, ax as ax2, ay as ay2, az as az2, aA, m, r, aB, o as o2, h, aC, s, aD, z, A as A2, u, p as p2, C, f as f2, i, y as y2, e, v } from "../dynamic-table-action-C-HIKtZG.js";
|
|
5
|
+
import { toRaw, watch, toRef, computed, defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, shallowRef, markRaw, ref, provide, onUnmounted, reactive, onBeforeUnmount } from "vue";
|
|
6
|
+
import { cloneDeep, defaults, isEmpty, merge, get } from "lodash-es";
|
|
7
7
|
import "dayjs";
|
|
8
|
-
import { S as SubTableCoreFactory, R as RuntimeInstanceController } from "../sub-table-factory-
|
|
9
|
-
import { A as A3, D, M as M2, a as a10, P as P2, b as b3, c as c10, d as d2, e as e2, W, f as f3, g, h as h2 } from "../sub-table-factory-
|
|
10
|
-
import {
|
|
8
|
+
import { S as SubTableCoreFactory, R as RuntimeInstanceController } from "../sub-table-factory-B6HdlZ7-.js";
|
|
9
|
+
import { A as A3, D, M as M2, a as a10, P as P2, b as b3, c as c10, d as d2, e as e2, W, f as f3, g, h as h2 } from "../sub-table-factory-B6HdlZ7-.js";
|
|
10
|
+
import { createDataSourceManager, getLegacyFieldFillTargets, createFieldFillRuntime, isFieldFillTargetProtected, buildDataSourceContext } from "@gct-paas/form-base";
|
|
11
|
+
import { B as B3, F, M as M3, a as a11, u as u2 } from "../mb-render-BRejJNP-.js";
|
|
11
12
|
const InstanceStatusValues = {
|
|
12
13
|
/** 作废状态 */
|
|
13
14
|
ABANDON: "ABANDON",
|
|
@@ -501,7 +502,8 @@ class RuntimeRuleCompiler {
|
|
|
501
502
|
props,
|
|
502
503
|
widget.id,
|
|
503
504
|
entry.row,
|
|
504
|
-
entry.parentRow
|
|
505
|
+
entry.parentRow,
|
|
506
|
+
this.basicInfo.formChangeStatus
|
|
505
507
|
);
|
|
506
508
|
const state = resolveRuntimeFieldState(effectiveProps, this.basicInfo);
|
|
507
509
|
const rules = assembleRules({
|
|
@@ -601,7 +603,8 @@ class RuntimeRuleCompiler {
|
|
|
601
603
|
props,
|
|
602
604
|
widget.id,
|
|
603
605
|
entry.row,
|
|
604
|
-
entry.parentRow
|
|
606
|
+
entry.parentRow,
|
|
607
|
+
this.basicInfo.formChangeStatus
|
|
605
608
|
);
|
|
606
609
|
return [
|
|
607
610
|
entry.key,
|
|
@@ -1070,27 +1073,23 @@ function mergeCheckTableConfig(current, next) {
|
|
|
1070
1073
|
if (!Object.keys(result.byTable ?? {}).length) delete result.byTable;
|
|
1071
1074
|
return result;
|
|
1072
1075
|
}
|
|
1073
|
-
function
|
|
1076
|
+
function collectDuplicateFieldWarnings(locations, sheetTitleMap) {
|
|
1074
1077
|
const fieldLocationMap = /* @__PURE__ */ new Map();
|
|
1075
1078
|
locations.forEach((location) => {
|
|
1076
1079
|
if (!location.placement) return;
|
|
1077
1080
|
const fieldKey = getBusinessFieldKey(location);
|
|
1078
|
-
const
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
)}」和「${sheetTitleMap.get(location.sheetId)}」中重复使用`
|
|
1091
|
-
);
|
|
1092
|
-
}
|
|
1093
|
-
fieldLocationMap.set(fieldKey, location);
|
|
1081
|
+
const entries = fieldLocationMap.get(fieldKey) ?? [];
|
|
1082
|
+
entries.push(location);
|
|
1083
|
+
fieldLocationMap.set(fieldKey, entries);
|
|
1084
|
+
});
|
|
1085
|
+
return Array.from(fieldLocationMap.values()).filter((entries) => entries.length > 1).map((entries) => {
|
|
1086
|
+
const first = entries[0];
|
|
1087
|
+
const modelKey = first.subModelKey ?? first.modelKey;
|
|
1088
|
+
const fieldName = modelKey ? `${modelKey}.${first.fieldId}` : first.fieldId;
|
|
1089
|
+
const sheets = Array.from(
|
|
1090
|
+
new Set(entries.map((entry) => `「${sheetTitleMap.get(entry.sheetId) ?? entry.sheetId}」`))
|
|
1091
|
+
);
|
|
1092
|
+
return `字段「${fieldName}」在工作表${sheets.join("、")}有 ${entries.length} 个填报位置`;
|
|
1094
1093
|
});
|
|
1095
1094
|
}
|
|
1096
1095
|
function assertUniqueSubTableOwnership(sheets) {
|
|
@@ -1186,7 +1185,7 @@ function createRuntimeInstanceInitializer(props, payload, getConsumeData) {
|
|
|
1186
1185
|
sheetEntries.flatMap((entry) => entry.subTableInfo),
|
|
1187
1186
|
(item) => `${item.field}:${item.key}:${item.subType ?? ""}`
|
|
1188
1187
|
);
|
|
1189
|
-
|
|
1188
|
+
runtimeContext.duplicateFieldWarnings = collectDuplicateFieldWarnings(
|
|
1190
1189
|
fieldInfoMap.fieldLocations,
|
|
1191
1190
|
new Map(sheetEntries.map((entry) => [entry.sheet.sheetId, entry.sheet.title]))
|
|
1192
1191
|
);
|
|
@@ -2109,6 +2108,135 @@ function createRuntimeValidationBinding(runtimeRegistry, getInfo, platformType)
|
|
|
2109
2108
|
prepareInitialView
|
|
2110
2109
|
};
|
|
2111
2110
|
}
|
|
2111
|
+
function createRuntimeDataSourceBinding(registry, payload) {
|
|
2112
|
+
const dataSourceManagerMap = shallowRef({});
|
|
2113
|
+
async function bindDataSources(record, info, selfInfo) {
|
|
2114
|
+
if (payload.isMockReport || !["instance", "batchInstance"].includes(payload.factoryType)) return;
|
|
2115
|
+
const isDetail = () => typeof payload.isDetailPage === "function" ? payload.isDetailPage() : payload.isDetailPage;
|
|
2116
|
+
if (isDetail()) return;
|
|
2117
|
+
const { context, formState } = record;
|
|
2118
|
+
const { uniqueId, formConfig } = context;
|
|
2119
|
+
const canExecute = () => registry.get(uniqueId) === record && info.renderModeType === RenderModeEnum.FormMode && !isDetail();
|
|
2120
|
+
const getContext = () => buildDataSourceContext({ parameters: info.paramsConfig ?? {}, instance: selfInfo });
|
|
2121
|
+
let fieldFillRuntime;
|
|
2122
|
+
const manager = markRaw(
|
|
2123
|
+
createDataSourceManager({
|
|
2124
|
+
canExecute,
|
|
2125
|
+
initializeOnEnable: false,
|
|
2126
|
+
sources: formConfig.dataSources ?? [],
|
|
2127
|
+
onManualLoad: (key) => fieldFillRuntime?.reapplyDataSource(key),
|
|
2128
|
+
getContext,
|
|
2129
|
+
getInstanceId: () => info.key,
|
|
2130
|
+
getForm: () => formState.state,
|
|
2131
|
+
adapters: payload.dataSourceAdapters
|
|
2132
|
+
})
|
|
2133
|
+
);
|
|
2134
|
+
let taskSequence = 0;
|
|
2135
|
+
async function track(execute) {
|
|
2136
|
+
const result = await record.asyncTasks.run(
|
|
2137
|
+
`data-source:${uniqueId}:${++taskSequence}`,
|
|
2138
|
+
async () => {
|
|
2139
|
+
try {
|
|
2140
|
+
return { ok: true, value: await execute() };
|
|
2141
|
+
} catch (error) {
|
|
2142
|
+
return { ok: false, error };
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
);
|
|
2146
|
+
if (!result) throw new Error(`数源实例已释放:${uniqueId}`);
|
|
2147
|
+
if (!result.ok) throw result.error;
|
|
2148
|
+
return result.value;
|
|
2149
|
+
}
|
|
2150
|
+
const exposedManager = markRaw({
|
|
2151
|
+
...manager,
|
|
2152
|
+
query: (...args) => track(() => manager.query(...args)),
|
|
2153
|
+
reload: (...args) => track(() => manager.reload(...args)),
|
|
2154
|
+
reloadAll: () => track(() => manager.reloadAll()),
|
|
2155
|
+
queryOnValueChange: (...args) => track(() => manager.queryOnValueChange(...args)),
|
|
2156
|
+
initialize: () => track(() => manager.initialize())
|
|
2157
|
+
});
|
|
2158
|
+
const protectedTargets = getLegacyFieldFillTargets(formConfig);
|
|
2159
|
+
const targets = /* @__PURE__ */ new Map();
|
|
2160
|
+
for (const { widget } of record.fields.allWidgets()) {
|
|
2161
|
+
const config = widget.props;
|
|
2162
|
+
const fieldKey = config.field;
|
|
2163
|
+
if (!config.subFieldKey && !config.subModelKey && fieldKey) {
|
|
2164
|
+
targets.set(fieldKey, {
|
|
2165
|
+
field: config.isFieldModel ? config.fieldLink || fieldKey : fieldKey,
|
|
2166
|
+
isFieldModel: !!config.isFieldModel
|
|
2167
|
+
});
|
|
2168
|
+
if (config.componentDependency?.configDependency?.assignment?.expression) {
|
|
2169
|
+
protectedTargets.add(fieldKey);
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
if (config.enableAutofill !== false) {
|
|
2173
|
+
for (const rule of config.autofillRules ?? []) {
|
|
2174
|
+
if (!rule.toSubModel && rule.toField) protectedTargets.add(rule.toField);
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2178
|
+
fieldFillRuntime = markRaw(
|
|
2179
|
+
createFieldFillRuntime({
|
|
2180
|
+
preserveExistingValues: true,
|
|
2181
|
+
fills: formConfig.fieldFills ?? [],
|
|
2182
|
+
manager,
|
|
2183
|
+
getContext,
|
|
2184
|
+
getForm: () => formState.state,
|
|
2185
|
+
getFormField: (key) => {
|
|
2186
|
+
const target = targets.get(key);
|
|
2187
|
+
return target?.isFieldModel ? formState.state._OPCT?.[target.field] : get(formState.state, key);
|
|
2188
|
+
},
|
|
2189
|
+
hasTargetField: (key) => targets.has(key),
|
|
2190
|
+
canWrite: (key) => canExecute() && targets.has(key) && !isFieldFillTargetProtected(key, protectedTargets, (field) => {
|
|
2191
|
+
const target = targets.get(field);
|
|
2192
|
+
return target?.isFieldModel ? `_OPCT.${target.field}` : target?.field ?? field;
|
|
2193
|
+
}),
|
|
2194
|
+
setField: (key, value) => {
|
|
2195
|
+
if (registry.get(uniqueId) !== record) throw new Error(`字段填充实例已释放:${uniqueId}`);
|
|
2196
|
+
const target = targets.get(key);
|
|
2197
|
+
if (target.isFieldModel) {
|
|
2198
|
+
if (!formState.state._OPCT) formState.setField("_OPCT", { _DICT: {} }, "async");
|
|
2199
|
+
formState.setObjectField(
|
|
2200
|
+
formState.state._OPCT,
|
|
2201
|
+
target.field,
|
|
2202
|
+
value,
|
|
2203
|
+
"async",
|
|
2204
|
+
`_OPCT.${target.field}`
|
|
2205
|
+
);
|
|
2206
|
+
} else {
|
|
2207
|
+
formState.setField(target.field, value, "async");
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
})
|
|
2211
|
+
);
|
|
2212
|
+
let initializationStarted = false;
|
|
2213
|
+
async function initializeOnce() {
|
|
2214
|
+
if (initializationStarted || !canExecute()) return;
|
|
2215
|
+
initializationStarted = true;
|
|
2216
|
+
try {
|
|
2217
|
+
await exposedManager.initialize();
|
|
2218
|
+
} catch (error) {
|
|
2219
|
+
initializationStarted = false;
|
|
2220
|
+
throw error;
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
const stopModeWatch = watch(canExecute, (enabled) => {
|
|
2224
|
+
if (enabled) void initializeOnce().catch(() => void 0);
|
|
2225
|
+
}, { flush: "sync" });
|
|
2226
|
+
record.dataSourceManager = exposedManager;
|
|
2227
|
+
dataSourceManagerMap.value = { ...dataSourceManagerMap.value, [uniqueId]: exposedManager };
|
|
2228
|
+
registry.registerDisposable(uniqueId, () => {
|
|
2229
|
+
stopModeWatch();
|
|
2230
|
+
record.dataSourceManager = void 0;
|
|
2231
|
+
fieldFillRuntime?.dispose();
|
|
2232
|
+
manager.dispose();
|
|
2233
|
+
const { [uniqueId]: _2, ...rest } = dataSourceManagerMap.value;
|
|
2234
|
+
dataSourceManagerMap.value = rest;
|
|
2235
|
+
});
|
|
2236
|
+
await initializeOnce();
|
|
2237
|
+
}
|
|
2238
|
+
return { dataSourceManagerMap, bindDataSources };
|
|
2239
|
+
}
|
|
2112
2240
|
function createRuntimeAnnotationBinding(runtimeRegistry, basicInfoList, props, payload, updateRenderModeType) {
|
|
2113
2241
|
const normalizeAnnotationLocation = (uniqueId, path, sheetId) => {
|
|
2114
2242
|
const record = runtimeRegistry.require(uniqueId);
|
|
@@ -2213,6 +2341,10 @@ function useRenderPageFactory(props, payload) {
|
|
|
2213
2341
|
const finisher = ref(0);
|
|
2214
2342
|
const runtimeRegistry = new RuntimeInstanceRegistry();
|
|
2215
2343
|
provide(NCB_PROVIDE.RUNTIME_INSTANCE_REGISTRY, runtimeRegistry);
|
|
2344
|
+
const { dataSourceManagerMap, bindDataSources } = createRuntimeDataSourceBinding(
|
|
2345
|
+
runtimeRegistry,
|
|
2346
|
+
payload
|
|
2347
|
+
);
|
|
2216
2348
|
const basicInfoList = ref([]);
|
|
2217
2349
|
const selfInfoList = ref([]);
|
|
2218
2350
|
const { getConsumeData } = useMaterialBalance();
|
|
@@ -2258,6 +2390,7 @@ function useRenderPageFactory(props, payload) {
|
|
|
2258
2390
|
install: async (prepared, isCurrent) => {
|
|
2259
2391
|
clear();
|
|
2260
2392
|
const installed = [];
|
|
2393
|
+
const dataSourceBindings = [];
|
|
2261
2394
|
const installedSelfInfos = /* @__PURE__ */ new Set();
|
|
2262
2395
|
try {
|
|
2263
2396
|
for (const res of prepared) {
|
|
@@ -2286,14 +2419,18 @@ function useRenderPageFactory(props, payload) {
|
|
|
2286
2419
|
basicInfoList.value.push(res.basicInfo);
|
|
2287
2420
|
selfInfoList.value.push(res.selfInfo);
|
|
2288
2421
|
installedSelfInfos.add(selfInfoList.value[selfInfoList.value.length - 1]);
|
|
2289
|
-
|
|
2422
|
+
const reactiveInfo = reactive(res.basicInfo);
|
|
2423
|
+
record.ruleCompiler = markRaw(new RuntimeRuleCompiler(record, reactiveInfo));
|
|
2290
2424
|
bindRuntimeValidation(uniqueId);
|
|
2291
2425
|
bindFormValidationSync(uniqueId);
|
|
2292
2426
|
record.fieldInitializer = markRaw(
|
|
2293
2427
|
new RuntimeFieldInitializer(record, res.basicInfo, res.selfInfo)
|
|
2294
2428
|
);
|
|
2295
2429
|
bindRuntimeBusinessServices(runtimeRegistry, record, res.selfInfo.dataStatus);
|
|
2430
|
+
dataSourceBindings.push(bindDataSources(record, reactiveInfo, res.selfInfo));
|
|
2296
2431
|
}
|
|
2432
|
+
await Promise.all(dataSourceBindings);
|
|
2433
|
+
if (!isCurrent()) return;
|
|
2297
2434
|
await Promise.all(installed.map(prepareInitialView));
|
|
2298
2435
|
if (!isCurrent()) return;
|
|
2299
2436
|
const selfId = Array.isArray(props.selfId) ? props.selfId[0] : props.selfId;
|
|
@@ -2360,6 +2497,7 @@ function useRenderPageFactory(props, payload) {
|
|
|
2360
2497
|
clear();
|
|
2361
2498
|
});
|
|
2362
2499
|
return {
|
|
2500
|
+
dataSourceManagerMap,
|
|
2363
2501
|
counter,
|
|
2364
2502
|
finisher,
|
|
2365
2503
|
loading,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock } from "vue";
|
|
2
|
-
import { h as useModelFields, D as Diagonal } from "./index-
|
|
3
|
-
import { ao as resolveDiagonalVertex, a8 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-
|
|
2
|
+
import { h as useModelFields, D as Diagonal } from "./index-oOLbaFI8.js";
|
|
3
|
+
import { ao as resolveDiagonalVertex, a8 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BHExrYFJ.js";
|
|
4
4
|
import "lodash-es";
|
|
5
5
|
import "dayjs";
|
|
6
|
+
import "@gct-paas/form-base";
|
|
6
7
|
import "ant-design-vue";
|
|
7
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
9
|
__name: "diagonal-design",
|