@gct-paas/excel 0.1.40-beta.26 → 0.1.40-beta.28
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/{BaseComponent-ClKLQPlb.js → BaseComponent-EzX32ZdY.js} +2 -2
- package/dist/{VueVideoPlayer-D7buOU3g.js → VueVideoPlayer-BuuQaqyI.js} +2 -2
- package/dist/{align-editor-BM2D1Kjn.js → align-editor-DWHHVeY1.js} +1 -1
- package/dist/{barcode-design-D8H2Bg9b.js → barcode-design-B0WcJSEI.js} +2 -2
- package/dist/base/index.es.js +246 -207
- package/dist/{diagonal-design-Ca9DW4R9.js → diagonal-design-D6uOJZmP.js} +2 -2
- package/dist/{dynamic-table-action-DPgnmGmu.js → dynamic-table-action-D-ub6KoK.js} +164 -232
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BUKMwvFf.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BCLE4joQ.js} +965 -540
- package/dist/{edit.utils-CXmmCnxE-ogCEEMW7.js → edit.utils-CXmmCnxE-CXdATd1V.js} +1 -1
- package/dist/excel.css +32 -23
- package/dist/{exceljs.min-BzSfyOeP.js → exceljs.min-BXhhaToT.js} +2 -2
- package/dist/{font-editor-tmQsLM86.js → font-editor-_HTdKFX6.js} +3 -3
- package/dist/{image-design-oRvqavKb.js → image-design-4Ee8rZqa.js} +2 -2
- package/dist/{index-DUrJEPXQ.js → index-7AmrbQlC.js} +2 -2
- package/dist/{index-C4v0H4FC.js → index-8ZnBcx1k.js} +3 -3
- package/dist/{index-CI051jjs.js → index-B4LuUmbW.js} +2 -2
- package/dist/{index-DS7TSyjT.js → index-BCCIwSnM.js} +1 -1
- package/dist/{index-IlasHrys.js → index-BHJxBByd.js} +1 -1
- package/dist/{index-3K7-At9-.js → index-BLf1U1A9.js} +3 -3
- package/dist/{index-cBtITF-e.js → index-BYq7x5n6.js} +1 -1
- package/dist/{index-CKyxWh-q.js → index-B_DPnVrC.js} +2 -2
- package/dist/{index-C8-IDtVr.js → index-Bbyb-owd.js} +2 -2
- package/dist/{index-1GK0_6yB.js → index-BlMiHVOC.js} +1 -1
- package/dist/{index-C4txo2fg.js → index-BnOOLcX1.js} +2 -2
- package/dist/{index-B3_1mcU-.js → index-Bnt54Sc6.js} +2 -2
- package/dist/{index-CHTrEvG1.js → index-CH_C9ijO.js} +2 -2
- package/dist/{index-Coz70NtU.js → index-CMdXdyvs.js} +2 -2
- package/dist/{index-DAuoR0-c.js → index-CQ0_Kx1_.js} +2 -2
- package/dist/{index-zJwCoxly.js → index-Cb7Fh_E2.js} +2 -2
- package/dist/{index-DvXsENIM.js → index-CtVFTmHZ.js} +3 -3
- package/dist/{index-BVJENFMM.js → index-D3KiKYMR.js} +1 -1
- package/dist/{index-CMKlsuD6.js → index-D87CVHA-.js} +2 -2
- package/dist/{index-D0PRNLPd.js → index-DM0OEvdI.js} +1 -1
- package/dist/{index-DLRVgGXr.js → index-DPTR_QJn.js} +1 -1
- package/dist/{index-sEcLP8dk.js → index-DVzaxa5k.js} +2 -2
- package/dist/{index-B_CDhpav.js → index-DcXbL-0o.js} +4 -4
- package/dist/{index-nhC91wtN.js → index-Dn0qfALy.js} +3 -3
- package/dist/{index-AU7rrK9g.js → index-Dnz3YPDV.js} +2 -2
- package/dist/{index-BMUAwQmf.js → index-DoWp9uDw.js} +2 -2
- package/dist/{index-61ZlwI2f.js → index-Dstr-PNj.js} +2 -2
- package/dist/{index-eyK5xPX3.js → index-DzqaKW6e.js} +2 -2
- package/dist/{index-D1KO6u1Z.js → index-GoAXo3fT.js} +227 -184
- package/dist/{index-ZxBcNN-g.js → index-Jy2tofdo.js} +3 -3
- package/dist/{index-ZHmmTlG-.js → index-KRo2-iQv.js} +3 -3
- package/dist/{index-CcC1xcOH.js → index-KuhYPy5i.js} +1 -1
- package/dist/{index-C5Bdrx4J.js → index-YlEOHde0.js} +1 -1
- package/dist/{index-DbuDWYlA.js → index-toqlO_-B.js} +1 -1
- package/dist/index.es.js +2 -2
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-DhmtOtIs.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-DAAF0eOB.js} +1 -1
- package/dist/{pagination-design-Bh5sF0VU.js → pagination-design-DANnqQdI.js} +2 -2
- package/dist/paper-widget-design-BrE7Bb4V.js +4 -0
- package/dist/{print-runtime-instance-19OA8Ubq.js → print-runtime-instance-PabaORE2.js} +1 -1
- package/dist/{print-snapshot-renderer-D5OUO3Sx.js → print-snapshot-renderer-DQr2G7Hv.js} +3 -3
- package/dist/{qrcode-design-CkwIXxb_.js → qrcode-design-BEA1JchI.js} +1 -1
- package/dist/{revo-grid.entry-CJ1rhBKH.js → revo-grid.entry-Bj-4xHie.js} +1 -1
- package/dist/{revogr-attribution_7.entry-Ba9MJ5p9.js → revogr-attribution_7.entry-NvaozwYj.js} +3 -3
- package/dist/{revogr-clipboard_3.entry--neB-vq8.js → revogr-clipboard_3.entry-CkRbECsx.js} +2 -2
- package/dist/{revogr-data_4.entry-BcmetTvO.js → revogr-data_4.entry-Dbbd8Mpz.js} +2 -2
- package/dist/{revogr-filter-panel.entry-jp8iD-xn.js → revogr-filter-panel.entry-lcMbXUNb.js} +1 -1
- package/dist/seal-design-CX-ZxOn3.js +4 -0
- package/dist/{serialnumber-design-LzvbjC79.js → serialnumber-design-B608oYcy.js} +1 -1
- package/dist/shared/index.es.js +25 -25
- package/dist/{single-field-drop-CEbaTw0-.js → single-field-drop-CkUP3H7u.js} +2 -2
- package/dist/{size-editor-CaFqQHeU.js → size-editor-Bl-lUcdU.js} +1 -1
- package/dist/src/nocode-base/src/hooks/render-page/initialize-runtime.d.ts +3 -0
- package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +3 -0
- package/dist/src/nocode-base/src/interface/render.d.ts +2 -1
- package/dist/src/nocode-base/src/interface/transform.d.ts +3 -0
- package/dist/src/nocode-base/src/runtime/designer-default-values.d.ts +23 -0
- package/dist/src/nocode-base/src/runtime/formula-utils.d.ts +2 -0
- package/dist/src/nocode-base/src/runtime/runtime-default-value-validation.d.ts +23 -0
- package/dist/src/nocode-base/src/runtime/runtime-form-state-store.d.ts +6 -2
- package/dist/src/nocode-base/src/runtime/runtime-instance-registry.d.ts +3 -0
- package/dist/src/nocode-base/src/runtime/table-row-identity.d.ts +2 -0
- package/dist/src/nocode-base/src/types/common/base.d.ts +4 -2
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +4 -3
- package/dist/src/online-form/src/views/designer/types/index.d.ts +3 -1
- package/dist/src/shared/enum/field-type.d.ts +1 -1
- package/dist/{sub-table-factory-_1c-Dsu_.js → sub-table-factory-GzYKYE9t.js} +2 -2
- package/dist/{text-design-D5QIq5aE.js → text-design-V3TQuLps.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-BMfNVrvD.js → throttle-Cpk1LoGk-CFMeLNb-.js} +1 -1
- package/dist/{timediff-design-B9m-zonK.js → timediff-design-DRum3zZt.js} +1 -1
- package/dist/{trace-like-wrapper-C_NJVd6e.js → trace-like-wrapper-D1Gzs1mF.js} +2 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-BpZAIeLC.js → value-editor.vue_vue_type_style_index_0_lang-DoOuCca5.js} +2 -2
- package/dist/{widget-barcode-CDMJo5uk.js → widget-barcode-CNrl2NxY.js} +4 -4
- package/dist/{widget-diagonal-D9AC_qNv.js → widget-diagonal-CqjD1SwW.js} +3 -3
- package/dist/{widget-image-DMiIjg8J.js → widget-image-Xjl5W2Fp.js} +4 -4
- package/dist/{widget-line-BwSO-GKu.js → widget-line-BUVVnwrU.js} +2 -2
- package/dist/{widget-pagination-Buo5s7Xq.js → widget-pagination-DjMXWioI.js} +5 -5
- package/dist/{widget-power-D8HtIVO2.js → widget-power-Dck9H8a9.js} +3 -3
- package/dist/{widget-qrcode-XEY9m1Dj.js → widget-qrcode-Cu8BwE24.js} +3 -3
- package/dist/{widget-rangelimit-C9j1s6Md.js → widget-rangelimit-DLxebCKf.js} +3 -3
- package/dist/{widget-serialnumber-B_IA4_De.js → widget-serialnumber-DecFCGS0.js} +1 -1
- package/dist/{widget-text-Bp0FEZa1.js → widget-text-DV3yKKsx.js} +5 -5
- package/dist/{widget-timediff-BlYRlDYp.js → widget-timediff-BIwewJ39.js} +2 -2
- package/package.json +2 -2
- package/dist/paper-widget-design-DZrP96jp.js +0 -4
- package/dist/seal-design-DX7PP65G.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock } from "vue";
|
|
2
|
-
import { h as useModelFields, D as Diagonal } from "./index-
|
|
3
|
-
import {
|
|
2
|
+
import { h as useModelFields, D as Diagonal } from "./index-GoAXo3fT.js";
|
|
3
|
+
import { as as resolveDiagonalVertex, ae as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BCLE4joQ.js";
|
|
4
4
|
import "lodash-es";
|
|
5
5
|
import "dayjs";
|
|
6
6
|
import "@gct-paas/form-base";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive, toRaw, computed, watch, onScopeDispose, inject, h, shallowReactive, markRaw, ref, toRef, provide, nextTick, defineComponent, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, Fragment, renderList, onUnmounted, isVNode, onMounted, onBeforeMount, resolveComponent, createBlock, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { cx as splitRuntimeDataPath, am as CellWidgetViewState, F as FIELD_TYPE, bo as RenderModeEnum, a1 as FormTypeEnum, bJ as BpmnNodeTypeEnum, by as getRuntimeDataFieldId, cA as getFieldPlaceholder, b_ as MobileFillTypeEnum, C as ComponentTypeEnum, a4 as PlatformEnum, cB as isReferenceOptionActive, p as api, bx as uuid2, c8 as calcUtils, M as getBusinessFieldKey, bn as findRuntimeTableRow, cc as ensureTableRowKeys, c5 as bindRuntimeTableColumns, bm as getRowId, cC as FRONT_ROW_KEY, cr as isTableRowKeyMatch, aB as RangeCompareOp, aA as RangeValidateMode, cD as getCurrentFormData, bB as isAttachFieldActive, bl as parseRuntimeFieldPath, c9 as decodeTableCellRowKey, cb as ensureFrontRowKey, bb as getParseRuleInfo, aN as transformUtils, b5 as materialCheck, b6 as getLotLockedReason, b7 as validateReinspectionDate, br as FormulaRuleFieldKeyEnum, bA as buildRuntimeFieldPath, Q as CreateType, h as SubTableType, bc as getParseRuleValue, bp as findRuntimeParentRow, aQ as Dependency_ENUM, aP as ASSIGNMENTSTRATEGY_ENUM, bO as commonUtils, aU as DeviceLink, ad as useNamespace, ae as _export_sfc, I as Icon, cl as getRenderedRuntimeTableCell, H as CellType, cE as resetTableRowIdentity, U as useModal, cF as q, cG as QUICK_FILL_ALLOWED_FIELDS, cH as groupFixedTableRows, cI as processQuickFillRows, cJ as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BCLE4joQ.js";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import { cloneDeep, isEmpty, isNil, pickBy, mergeWith, omit, last, pick, merge } from "lodash-es";
|
|
5
5
|
import "@gct-paas/form-base";
|
|
@@ -96,8 +96,8 @@ function getRuntimeDependencyOutputKey(widgetId, type4, rowPath) {
|
|
|
96
96
|
return JSON.stringify([widgetId, type4, rowPath]);
|
|
97
97
|
}
|
|
98
98
|
function pathMatches(source, changedPath, structureOnly = false) {
|
|
99
|
-
const expected = source
|
|
100
|
-
const changed = changedPath
|
|
99
|
+
const expected = splitRuntimeDataPath(source);
|
|
100
|
+
const changed = splitRuntimeDataPath(changedPath);
|
|
101
101
|
if (structureOnly && changed.length > expected.length) return false;
|
|
102
102
|
return expected.slice(0, Math.min(expected.length, changed.length)).every((part, index) => part === "*" || part === changed[index]);
|
|
103
103
|
}
|
|
@@ -201,7 +201,8 @@ class RuntimeDependencyService {
|
|
|
201
201
|
schedule(change) {
|
|
202
202
|
if (this.disposed) return;
|
|
203
203
|
const labelsOnly = change.paths.length > 0 && change.paths.every((path) => path.endsWith("_lb_"));
|
|
204
|
-
if (change.source === "restore" &&
|
|
204
|
+
if (change.source === "restore" && change.restoreScope !== "fields" && !labelsOnly)
|
|
205
|
+
change = { ...change, paths: ["*"] };
|
|
205
206
|
this.effects.forEach((effect) => {
|
|
206
207
|
if (this.matches(effect, change.paths)) this.cancelExecution(effect.id);
|
|
207
208
|
});
|
|
@@ -351,51 +352,6 @@ function resolveRuntimeFieldState(props, info) {
|
|
|
351
352
|
keepExceptionHighlight: typeof props.keepExceptionHighlight === "boolean" ? props.keepExceptionHighlight : void 0
|
|
352
353
|
};
|
|
353
354
|
}
|
|
354
|
-
function getRuntimeDataFieldId(props = {}) {
|
|
355
|
-
return props.field ? props.isFieldModel ? props.fieldLink ?? "" : props.field : "";
|
|
356
|
-
}
|
|
357
|
-
function getBusinessFieldKey(field) {
|
|
358
|
-
return [field.subModelKey ?? field.modelKey ?? "", field.fieldId ?? ""].join(":");
|
|
359
|
-
}
|
|
360
|
-
const FIELD_POSITION_PREFIX = "runtime_field_";
|
|
361
|
-
function buildRuntimeFieldPath(position) {
|
|
362
|
-
if (!position.fieldId) throw new Error("运行时字段位置缺少 fieldId");
|
|
363
|
-
if (position.subFieldKey && !position.rowKey) throw new Error("子表字段位置缺少 front_row_key_");
|
|
364
|
-
const serialized = JSON.stringify([
|
|
365
|
-
position.modelKey ?? "",
|
|
366
|
-
position.subModelKey ?? "",
|
|
367
|
-
position.subFieldKey ?? "",
|
|
368
|
-
position.rowKey ?? "",
|
|
369
|
-
position.fieldId
|
|
370
|
-
]);
|
|
371
|
-
return FIELD_POSITION_PREFIX + btoa(
|
|
372
|
-
Array.from(new TextEncoder().encode(serialized), (byte) => String.fromCharCode(byte)).join(
|
|
373
|
-
""
|
|
374
|
-
)
|
|
375
|
-
).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
376
|
-
}
|
|
377
|
-
function parseRuntimeFieldPath(path) {
|
|
378
|
-
if (!path.startsWith(FIELD_POSITION_PREFIX)) return void 0;
|
|
379
|
-
try {
|
|
380
|
-
const encoded = path.slice(FIELD_POSITION_PREFIX.length).replace(/-/g, "+").replace(/_/g, "/");
|
|
381
|
-
const parts = JSON.parse(
|
|
382
|
-
new TextDecoder().decode(Uint8Array.from(atob(encoded), (char) => char.charCodeAt(0)))
|
|
383
|
-
);
|
|
384
|
-
if (!Array.isArray(parts) || parts.length !== 5 || parts.some((part) => typeof part !== "string"))
|
|
385
|
-
return void 0;
|
|
386
|
-
const [modelKey, subModelKey, subFieldKey, rowKey, fieldId] = parts;
|
|
387
|
-
if (!fieldId || subFieldKey && !rowKey) return void 0;
|
|
388
|
-
return {
|
|
389
|
-
modelKey: modelKey || void 0,
|
|
390
|
-
subModelKey: subModelKey || void 0,
|
|
391
|
-
subFieldKey: subFieldKey || void 0,
|
|
392
|
-
rowKey: rowKey || void 0,
|
|
393
|
-
fieldId
|
|
394
|
-
};
|
|
395
|
-
} catch {
|
|
396
|
-
return void 0;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
355
|
function isCellAutoLineBreak(style) {
|
|
400
356
|
const whiteSpace = style?.whiteSpace ?? style?.["white-space"];
|
|
401
357
|
const wordBreak = style?.wordBreak ?? style?.["word-break"];
|
|
@@ -771,49 +727,6 @@ function getSubTableQuickFillInfo(subTableFieldId, mobileTdIdGroups) {
|
|
|
771
727
|
if (!subTableFieldId) return;
|
|
772
728
|
return assignWidgetInfo(MobileFillTypeEnum.SUB_TABLE, { rowSubFieldKey: subTableFieldId });
|
|
773
729
|
}
|
|
774
|
-
function getCurrentFormData(_rule, options) {
|
|
775
|
-
if (!_rule._subtableFieldId) return options?.formData;
|
|
776
|
-
return findRuntimeTableRow(options?.formData?.[_rule._subtableFieldId], _rule._rowKey);
|
|
777
|
-
}
|
|
778
|
-
function isSameOptionValue(current, expected) {
|
|
779
|
-
if (typeof expected === "boolean") {
|
|
780
|
-
return renderUtils.getBoolValue(current) === expected;
|
|
781
|
-
}
|
|
782
|
-
if (current === void 0 || current === null || current === "") {
|
|
783
|
-
return false;
|
|
784
|
-
}
|
|
785
|
-
return String(current) === String(expected);
|
|
786
|
-
}
|
|
787
|
-
function isAttachFieldActive(attach, formData) {
|
|
788
|
-
if (attach?.parent && !isAttachFieldActive(attach.parent, formData)) return false;
|
|
789
|
-
if (!attach?.belongFieldId || isNil(attach.optionValue)) {
|
|
790
|
-
return true;
|
|
791
|
-
}
|
|
792
|
-
const row = attach.subtableFieldId ? findRuntimeTableRow(formData?.[attach.subtableFieldId], attach.rowKey) : formData;
|
|
793
|
-
if (attach.subtableFieldId && (!attach.rowKey || !row || row === formData)) {
|
|
794
|
-
return false;
|
|
795
|
-
}
|
|
796
|
-
const raw = row?.[attach.belongFieldId];
|
|
797
|
-
if (attach.multiple) {
|
|
798
|
-
const current = renderUtils.getValue(raw, true);
|
|
799
|
-
if (!Array.isArray(current)) return false;
|
|
800
|
-
return current.some((v) => isSameOptionValue(v, attach.optionValue));
|
|
801
|
-
}
|
|
802
|
-
return isSameOptionValue(raw, attach.optionValue);
|
|
803
|
-
}
|
|
804
|
-
function isReferenceOptionActive(referenceInfo, rowFormData) {
|
|
805
|
-
if (!referenceInfo?.belongFieldId || isNil(referenceInfo.optionValue)) {
|
|
806
|
-
return true;
|
|
807
|
-
}
|
|
808
|
-
return isAttachFieldActive(
|
|
809
|
-
{
|
|
810
|
-
belongFieldId: referenceInfo.belongFieldId,
|
|
811
|
-
optionValue: referenceInfo.optionValue,
|
|
812
|
-
multiple: referenceInfo.multiple
|
|
813
|
-
},
|
|
814
|
-
rowFormData
|
|
815
|
-
);
|
|
816
|
-
}
|
|
817
730
|
function fieldChromeStyles(state) {
|
|
818
731
|
const required4 = state === "required";
|
|
819
732
|
const disabled = state === "disabled";
|
|
@@ -1580,7 +1493,7 @@ class RuntimeFormStateStore {
|
|
|
1580
1493
|
reactiveState;
|
|
1581
1494
|
/** 每次成功提交一批变更递增一次,保存和提交用它判断快照是否过期。 */
|
|
1582
1495
|
revision = 0;
|
|
1583
|
-
/**
|
|
1496
|
+
/** 是否存在尚未保存的变更;数据恢复及保存回填不会把实例标记为脏。 */
|
|
1584
1497
|
dirty = false;
|
|
1585
1498
|
/** 当前嵌套事务深度;只有最外层事务结束时才递增 revision 并通知订阅方。 */
|
|
1586
1499
|
mutationDepth = 0;
|
|
@@ -1588,6 +1501,7 @@ class RuntimeFormStateStore {
|
|
|
1588
1501
|
pendingPaths = /* @__PURE__ */ new Set();
|
|
1589
1502
|
/** 最外层事务的变更来源,嵌套写入沿用该来源。 */
|
|
1590
1503
|
pendingSource = "system";
|
|
1504
|
+
pendingRestoreScope;
|
|
1591
1505
|
/** 联动、分页失效、自动保存等实例服务登记的变更监听器。 */
|
|
1592
1506
|
subscribers = /* @__PURE__ */ new Set();
|
|
1593
1507
|
/** 用户主动修改过的业务路径,供公式和自动填充执行“不覆盖用户输入”策略。 */
|
|
@@ -1739,10 +1653,12 @@ class RuntimeFormStateStore {
|
|
|
1739
1653
|
/**
|
|
1740
1654
|
* 保存后只回填后端身份元数据,不能用仅含 id_/front_row_key_ 的数组覆盖当前业务行。
|
|
1741
1655
|
* 二维内置复合键可通过原始子行键匹配保存前的本地行。
|
|
1656
|
+
* 保存回填只通知实际变化的字段,不作为整份数据恢复触发全部赋值规则。
|
|
1742
1657
|
*/
|
|
1743
1658
|
patchSavedMetadata(values) {
|
|
1744
|
-
|
|
1745
|
-
|
|
1659
|
+
this.transaction("restore", () => this.mergeSavedMetadata(this.state, values), {
|
|
1660
|
+
restoreScope: "fields"
|
|
1661
|
+
});
|
|
1746
1662
|
}
|
|
1747
1663
|
/**
|
|
1748
1664
|
* 用新对象整体替换实例数据,删除旧对象中多余的顶层字段。
|
|
@@ -1751,20 +1667,23 @@ class RuntimeFormStateStore {
|
|
|
1751
1667
|
replace(values, source = "restore") {
|
|
1752
1668
|
const paths = /* @__PURE__ */ new Set([...Object.keys(this.reactiveState), ...Object.keys(values)]);
|
|
1753
1669
|
this.mutate(Array.from(paths), source, () => {
|
|
1670
|
+
this.userModifiedPaths.clear();
|
|
1754
1671
|
Object.keys(this.reactiveState).forEach((key) => delete this.reactiveState[key]);
|
|
1755
1672
|
this.assignValues(this.reactiveState, values);
|
|
1756
1673
|
normalizeEmptyReferenceLabels(this.reactiveState);
|
|
1757
1674
|
});
|
|
1758
|
-
this.userModifiedPaths.clear();
|
|
1759
1675
|
if (source === "restore") this.dirty = false;
|
|
1760
1676
|
}
|
|
1761
1677
|
/**
|
|
1762
1678
|
* 将多次深层写入合并成一次变更提交。
|
|
1763
1679
|
* 嵌套事务只累计路径,最外层 finally 统一递增 revision 并通知订阅方。
|
|
1764
1680
|
*/
|
|
1765
|
-
transaction(source, callback) {
|
|
1681
|
+
transaction(source, callback, options) {
|
|
1766
1682
|
const outermost = this.mutationDepth === 0;
|
|
1767
|
-
if (outermost)
|
|
1683
|
+
if (outermost) {
|
|
1684
|
+
this.pendingSource = source;
|
|
1685
|
+
this.pendingRestoreScope = source === "restore" ? options?.restoreScope : void 0;
|
|
1686
|
+
}
|
|
1768
1687
|
this.mutationDepth += 1;
|
|
1769
1688
|
try {
|
|
1770
1689
|
return callback(this.state);
|
|
@@ -1774,7 +1693,9 @@ class RuntimeFormStateStore {
|
|
|
1774
1693
|
const paths = Array.from(this.pendingPaths);
|
|
1775
1694
|
this.pendingPaths.clear();
|
|
1776
1695
|
const pendingSource = this.pendingSource;
|
|
1696
|
+
const restoreScope = this.pendingRestoreScope;
|
|
1777
1697
|
this.pendingSource = "system";
|
|
1698
|
+
this.pendingRestoreScope = void 0;
|
|
1778
1699
|
try {
|
|
1779
1700
|
if (paths.some(
|
|
1780
1701
|
(path) => this.tableRelations.some(
|
|
@@ -1787,7 +1708,7 @@ class RuntimeFormStateStore {
|
|
|
1787
1708
|
});
|
|
1788
1709
|
}
|
|
1789
1710
|
} finally {
|
|
1790
|
-
if (paths.length) this.commit(paths, pendingSource);
|
|
1711
|
+
if (paths.length) this.commit(paths, pendingSource, restoreScope);
|
|
1791
1712
|
}
|
|
1792
1713
|
}
|
|
1793
1714
|
}
|
|
@@ -1837,10 +1758,15 @@ class RuntimeFormStateStore {
|
|
|
1837
1758
|
this.userModifiedPaths.clear();
|
|
1838
1759
|
}
|
|
1839
1760
|
/** 提交当前事务积累的路径,更新版本和脏状态,然后同步通知实例服务。 */
|
|
1840
|
-
commit(paths, source) {
|
|
1761
|
+
commit(paths, source, restoreScope) {
|
|
1841
1762
|
this.revision += 1;
|
|
1842
1763
|
if (source !== "restore") this.dirty = true;
|
|
1843
|
-
const change = {
|
|
1764
|
+
const change = {
|
|
1765
|
+
revision: this.revision,
|
|
1766
|
+
paths,
|
|
1767
|
+
source,
|
|
1768
|
+
...restoreScope ? { restoreScope } : {}
|
|
1769
|
+
};
|
|
1844
1770
|
this.subscribers.forEach((subscriber) => subscriber(change));
|
|
1845
1771
|
}
|
|
1846
1772
|
/** 如果值是 Store 创建的 scoped view,返回它实际包装的 Vue 响应式目标。 */
|
|
@@ -1892,7 +1818,8 @@ class RuntimeFormStateStore {
|
|
|
1892
1818
|
if (!target || typeof target !== "object" || Array.isArray(target)) return incoming;
|
|
1893
1819
|
Object.entries(incoming).forEach(([key, value]) => {
|
|
1894
1820
|
const childPath = path ? `${path}.${key}` : key;
|
|
1895
|
-
|
|
1821
|
+
const merged = this.mergeSavedMetadata(target[key], value, childPath);
|
|
1822
|
+
this.setObjectField(target, key, merged, "restore");
|
|
1896
1823
|
});
|
|
1897
1824
|
return target;
|
|
1898
1825
|
}
|
|
@@ -3264,7 +3191,7 @@ const getParseFormulaVarInfos = (expr) => {
|
|
|
3264
3191
|
parseInfos: rowArgs.map((curr) => parseFormulaVar(curr))
|
|
3265
3192
|
};
|
|
3266
3193
|
};
|
|
3267
|
-
const
|
|
3194
|
+
const resolveFormulaData = (expr, formData, instanceFormState) => {
|
|
3268
3195
|
const rowArgs = identify(expr);
|
|
3269
3196
|
const formulaData = isEmpty(rowArgs) ? {} : rowArgs.reduce((total, curr) => {
|
|
3270
3197
|
const parseInfo = parseFormulaVar(curr);
|
|
@@ -3274,8 +3201,9 @@ const calculateFormula = async (expr, formData, instanceFormState) => {
|
|
|
3274
3201
|
);
|
|
3275
3202
|
return total;
|
|
3276
3203
|
}, {});
|
|
3277
|
-
return
|
|
3204
|
+
return formulaData;
|
|
3278
3205
|
};
|
|
3206
|
+
const calculateFormula = async (expr, formData, instanceFormState) => calculate$1(expr, resolveFormulaData(expr, formData, instanceFormState));
|
|
3279
3207
|
const isEmptyValue = (value) => {
|
|
3280
3208
|
return value === void 0 || value === null || typeof value === "string" && value.trim() === "" || Array.isArray(value) && value.length === 0;
|
|
3281
3209
|
};
|
|
@@ -3980,8 +3908,8 @@ class RuntimeValidationService {
|
|
|
3980
3908
|
}
|
|
3981
3909
|
function matchesPattern(pattern4, path) {
|
|
3982
3910
|
if (!pattern4.includes("*")) return pattern4 === path;
|
|
3983
|
-
const expected = pattern4
|
|
3984
|
-
const actual = path
|
|
3911
|
+
const expected = splitRuntimeDataPath(pattern4);
|
|
3912
|
+
const actual = splitRuntimeDataPath(path);
|
|
3985
3913
|
return expected.length === actual.length && expected.every((part, index) => part === "*" || part === actual[index]);
|
|
3986
3914
|
}
|
|
3987
3915
|
class RuntimeFieldRegistry {
|
|
@@ -4500,6 +4428,7 @@ class RuntimeInstanceRegistry {
|
|
|
4500
4428
|
this.disposables.get(uniqueId)?.forEach((dispose) => dispose());
|
|
4501
4429
|
this.disposables.delete(uniqueId);
|
|
4502
4430
|
record.fieldInitializer?.dispose();
|
|
4431
|
+
record.defaultValueValidation?.dispose();
|
|
4503
4432
|
record.ruleCompiler?.dispose();
|
|
4504
4433
|
record.validation.dispose();
|
|
4505
4434
|
record.scriptRunner?.dispose();
|
|
@@ -8247,7 +8176,11 @@ function useDependency(widget, props) {
|
|
|
8247
8176
|
);
|
|
8248
8177
|
if (!controlledFormData.value._OPCT) {
|
|
8249
8178
|
const store = formStateStore.value;
|
|
8250
|
-
store.
|
|
8179
|
+
store.transaction(
|
|
8180
|
+
"restore",
|
|
8181
|
+
() => store.setObjectField(controlledFormData.value, "_OPCT", { _DICT: {} }, "restore"),
|
|
8182
|
+
{ restoreScope: "fields" }
|
|
8183
|
+
);
|
|
8251
8184
|
}
|
|
8252
8185
|
const formRowData = toRef(() => {
|
|
8253
8186
|
if (isFieldModel) {
|
|
@@ -8273,6 +8206,7 @@ function useDependency(widget, props) {
|
|
|
8273
8206
|
if (!store) throw new Error("字段组件缺少实例级 FormStateStore");
|
|
8274
8207
|
const row = store.createScopedView(formRowData.value, formRowPath.value);
|
|
8275
8208
|
const path = store.getFieldPath(row, targetFieldId);
|
|
8209
|
+
if (assignment_expression) store.markUserModified(path);
|
|
8276
8210
|
store.setObjectField(row, targetFieldId, val, "user", path);
|
|
8277
8211
|
if (assignment_expression && strategy === ASSIGNMENTSTRATEGY_ENUM.notCovered && commonUtils.isEmptyValue(val)) {
|
|
8278
8212
|
store.clearUserModified(path);
|
|
@@ -9240,6 +9174,7 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
|
|
|
9240
9174
|
const newRowsData = actionType === "copyRow" ? [cloneDeep(rowData)] : Array.from({
|
|
9241
9175
|
length: rowNum
|
|
9242
9176
|
}, (_, index2) => transformUtils.addSubTableRowItem({
|
|
9177
|
+
defaultValueOrigins: instance.value?.defaultValueValidation?.defaults,
|
|
9243
9178
|
defaultData: currentFieldDefaultData.value,
|
|
9244
9179
|
quickFillData: quickFillDatas?.[index2],
|
|
9245
9180
|
subFieldId: field,
|
|
@@ -9795,6 +9730,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
9795
9730
|
length: rowNum
|
|
9796
9731
|
}, (_, i) => {
|
|
9797
9732
|
const row = transformUtils.addSubTableRowItem({
|
|
9733
|
+
defaultValueOrigins: instance.value?.defaultValueValidation?.defaults,
|
|
9798
9734
|
defaultData: currentFieldDefaultData.value,
|
|
9799
9735
|
quickFillData: quickFillDatas?.[i],
|
|
9800
9736
|
subFieldId: field,
|
|
@@ -11205,139 +11141,135 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11205
11141
|
});
|
|
11206
11142
|
const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8710052f"]]);
|
|
11207
11143
|
export {
|
|
11208
|
-
|
|
11209
|
-
|
|
11144
|
+
RequiredQtyCalcRule as $,
|
|
11145
|
+
validateObjectBomForScan as A,
|
|
11210
11146
|
BorderTD as B,
|
|
11211
|
-
|
|
11147
|
+
resolveObjectBomEntry as C,
|
|
11212
11148
|
DEFAULT_BOOLEAN_FIELD_WIDTH as D,
|
|
11213
|
-
|
|
11149
|
+
runWithFillProduct as E,
|
|
11214
11150
|
FormModelController as F,
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11151
|
+
useNocodeFormWidget as G,
|
|
11152
|
+
applyConsumeObjectTraceChange as H,
|
|
11153
|
+
getObjectBomProductQuery as I,
|
|
11154
|
+
EMPTY_PRODUCT_VERSION_ID as J,
|
|
11155
|
+
normalizeHistoricalAutofillRow as K,
|
|
11156
|
+
readSealValue as L,
|
|
11221
11157
|
MAX_RUNTIME_SHEETS as M,
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11158
|
+
isSealStamped as N,
|
|
11159
|
+
stampSealValue as O,
|
|
11160
|
+
isValidSealValue as P,
|
|
11161
|
+
clearSealValue as Q,
|
|
11162
|
+
NCB_PROVIDE as R,
|
|
11163
|
+
calculateFormula as S,
|
|
11164
|
+
useStyles as T,
|
|
11165
|
+
useDependency as U,
|
|
11166
|
+
useFieldPresentation as V,
|
|
11167
|
+
useRuntimeEditorFlusher as W,
|
|
11168
|
+
RuntimeFormStateStore as X,
|
|
11169
|
+
createRuntimeInstanceContext as Y,
|
|
11170
|
+
RuntimeInstanceRegistry as Z,
|
|
11171
|
+
ScanParamType as _,
|
|
11236
11172
|
MAX_RUNTIME_SHEET_TITLE_LENGTH as a,
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11173
|
+
getMenuByAction as a$,
|
|
11174
|
+
MBRender as a0,
|
|
11175
|
+
MCRender as a1,
|
|
11176
|
+
moveSealValue as a2,
|
|
11177
|
+
DocumentPaper as a3,
|
|
11178
|
+
DynamicTableAction as a4,
|
|
11179
|
+
_sfc_main$5 as a5,
|
|
11180
|
+
resolveRuntimeFieldProps as a6,
|
|
11181
|
+
resolveRuntimeFieldState as a7,
|
|
11182
|
+
assembleRules as a8,
|
|
11183
|
+
getRuntimeDependencyOutputKey as a9,
|
|
11184
|
+
RuntimeDependencyService as aA,
|
|
11185
|
+
RuntimeFieldRegistry as aB,
|
|
11186
|
+
RuntimeInstanceEventBus as aC,
|
|
11187
|
+
RuntimePersistenceCoordinator as aD,
|
|
11188
|
+
RuntimeValidationService as aE,
|
|
11189
|
+
SubTableCore as aF,
|
|
11190
|
+
buildFormChangeDisplayRows as aG,
|
|
11191
|
+
convertV1Runtime as aH,
|
|
11192
|
+
detailsHaveFormChangeRowOps as aI,
|
|
11193
|
+
extractFormChangeRowDetails as aJ,
|
|
11194
|
+
getFormChangeRowKey as aK,
|
|
11195
|
+
getFormChangeRowOp as aL,
|
|
11196
|
+
getSubTableQuickFillInfo as aM,
|
|
11197
|
+
isAnnLocationSelected as aN,
|
|
11198
|
+
isBlank as aO,
|
|
11199
|
+
isFormChangeGhostRow as aP,
|
|
11200
|
+
normalizeHistoricalFieldConfig as aQ,
|
|
11201
|
+
pickObjectFieldKeys as aR,
|
|
11202
|
+
recordSubtableRowAdd as aS,
|
|
11203
|
+
recordSubtableRowDelete as aT,
|
|
11204
|
+
relocateDeletedRowsToEnd as aU,
|
|
11205
|
+
resolveAnnotationFieldLocation as aV,
|
|
11206
|
+
resolveFormChangeRowUi as aW,
|
|
11207
|
+
resolveRowFormChangeMark as aX,
|
|
11208
|
+
setSelectMobileTdId as aY,
|
|
11209
|
+
stripLegacyFormConfigFromPaper as aZ,
|
|
11210
|
+
SubTableActionMenuTypeEnum as a_,
|
|
11211
|
+
isRowAddedInCurrentFormChange as aa,
|
|
11212
|
+
resolveFormulaData as ab,
|
|
11213
|
+
MaterialConsumeTableController as ac,
|
|
11214
|
+
setFormulaParamsConfig as ad,
|
|
11215
|
+
normalizeRuntime as ae,
|
|
11216
|
+
initializeSealFields as af,
|
|
11217
|
+
RuntimeSheetService as ag,
|
|
11218
|
+
validateObjectBomQtyOnSubmit as ah,
|
|
11219
|
+
areValidationCommentsEqual as ai,
|
|
11220
|
+
closeValidatorPopovers as aj,
|
|
11221
|
+
enrichFormChangeRowDetails as ak,
|
|
11222
|
+
useMaterialBalance as al,
|
|
11223
|
+
collectFormChangeFieldLocations as am,
|
|
11224
|
+
nextFormChangeRowViewHistoryId as an,
|
|
11225
|
+
BaseFormModelFetcher as ao,
|
|
11226
|
+
DeviceConnector as ap,
|
|
11227
|
+
DocumentLoading as aq,
|
|
11228
|
+
DynamicQuickFillModal as ar,
|
|
11229
|
+
FixedQuickFillModal as as,
|
|
11230
|
+
FormTmplConfigController as at,
|
|
11231
|
+
LEGACY_RUNTIME_FORM_CONFIG_KEYS as au,
|
|
11232
|
+
LEGACY_RUNTIME_SHEET_ID as av,
|
|
11233
|
+
LEGACY_RUNTIME_SHEET_TITLE as aw,
|
|
11234
|
+
MCDataUtil as ax,
|
|
11235
|
+
OCR_MODEL_PRECISION_ENUM_KEY as ay,
|
|
11236
|
+
RuntimeAsyncTaskCoordinator as az,
|
|
11301
11237
|
bindFormulaCacheInvalidation as b,
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
hasSubtableBusinessData as bd,
|
|
11316
|
-
getCopySubMenu as be,
|
|
11317
|
-
resolveScanParsedValue as bf,
|
|
11318
|
-
isProductBatchEmptyRow as bg,
|
|
11238
|
+
SubTableActionEnum as b0,
|
|
11239
|
+
resolveScanFillData as b1,
|
|
11240
|
+
buildDefaultMapFromProfile as b2,
|
|
11241
|
+
buildFieldStatusFromProfile as b3,
|
|
11242
|
+
getRowHandlersForFieldChange as b4,
|
|
11243
|
+
getInsertSubMenu as b5,
|
|
11244
|
+
resolveScanAdjustType as b6,
|
|
11245
|
+
resolveScanQty as b7,
|
|
11246
|
+
toDateOnly as b8,
|
|
11247
|
+
hasSubtableBusinessData as b9,
|
|
11248
|
+
getCopySubMenu as ba,
|
|
11249
|
+
resolveScanParsedValue as bb,
|
|
11250
|
+
isProductBatchEmptyRow as bc,
|
|
11319
11251
|
currentParamsConfig as c,
|
|
11320
11252
|
MULTI_SHEET_SCHEMA_VERSION as d,
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11253
|
+
createRuntimeDocumentV2 as e,
|
|
11254
|
+
clampSealPosition as f,
|
|
11255
|
+
getParseFormulaVarInfos as g,
|
|
11256
|
+
normalizeSealDiameter as h,
|
|
11257
|
+
normalizeFieldWidth as i,
|
|
11258
|
+
isCellAutoLineBreak as j,
|
|
11259
|
+
useFormTmplConfig as k,
|
|
11260
|
+
findFieldProfile as l,
|
|
11261
|
+
normalizeHistoricalBusinessRow as m,
|
|
11330
11262
|
normalizeGridColumnWidth as n,
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11263
|
+
DeviceLinkTmplUtil as o,
|
|
11264
|
+
normalizeAIOcrTmpl as p,
|
|
11265
|
+
useWidgetStaticAttrs as q,
|
|
11266
|
+
useRuntimeInstanceServices as r,
|
|
11267
|
+
setSelectValidatorId as s,
|
|
11268
|
+
setSelectAnnotationId as t,
|
|
11337
11269
|
useFormModel as u,
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11270
|
+
useRuntimeRowState as v,
|
|
11271
|
+
getObjectBomMaterialLotQuery as w,
|
|
11272
|
+
buildObjectLotExtraQuery as x,
|
|
11273
|
+
resolveObjectFieldKeys as y,
|
|
11274
|
+
MaterialConsumptionPatternEnum as z
|
|
11343
11275
|
};
|