@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.
Files changed (98) hide show
  1. package/dist/{BaseComponent-ClKLQPlb.js → BaseComponent-EzX32ZdY.js} +2 -2
  2. package/dist/{VueVideoPlayer-D7buOU3g.js → VueVideoPlayer-BuuQaqyI.js} +2 -2
  3. package/dist/{align-editor-BM2D1Kjn.js → align-editor-DWHHVeY1.js} +1 -1
  4. package/dist/{barcode-design-D8H2Bg9b.js → barcode-design-B0WcJSEI.js} +2 -2
  5. package/dist/base/index.es.js +246 -207
  6. package/dist/{diagonal-design-Ca9DW4R9.js → diagonal-design-D6uOJZmP.js} +2 -2
  7. package/dist/{dynamic-table-action-DPgnmGmu.js → dynamic-table-action-D-ub6KoK.js} +164 -232
  8. 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
  9. package/dist/{edit.utils-CXmmCnxE-ogCEEMW7.js → edit.utils-CXmmCnxE-CXdATd1V.js} +1 -1
  10. package/dist/excel.css +32 -23
  11. package/dist/{exceljs.min-BzSfyOeP.js → exceljs.min-BXhhaToT.js} +2 -2
  12. package/dist/{font-editor-tmQsLM86.js → font-editor-_HTdKFX6.js} +3 -3
  13. package/dist/{image-design-oRvqavKb.js → image-design-4Ee8rZqa.js} +2 -2
  14. package/dist/{index-DUrJEPXQ.js → index-7AmrbQlC.js} +2 -2
  15. package/dist/{index-C4v0H4FC.js → index-8ZnBcx1k.js} +3 -3
  16. package/dist/{index-CI051jjs.js → index-B4LuUmbW.js} +2 -2
  17. package/dist/{index-DS7TSyjT.js → index-BCCIwSnM.js} +1 -1
  18. package/dist/{index-IlasHrys.js → index-BHJxBByd.js} +1 -1
  19. package/dist/{index-3K7-At9-.js → index-BLf1U1A9.js} +3 -3
  20. package/dist/{index-cBtITF-e.js → index-BYq7x5n6.js} +1 -1
  21. package/dist/{index-CKyxWh-q.js → index-B_DPnVrC.js} +2 -2
  22. package/dist/{index-C8-IDtVr.js → index-Bbyb-owd.js} +2 -2
  23. package/dist/{index-1GK0_6yB.js → index-BlMiHVOC.js} +1 -1
  24. package/dist/{index-C4txo2fg.js → index-BnOOLcX1.js} +2 -2
  25. package/dist/{index-B3_1mcU-.js → index-Bnt54Sc6.js} +2 -2
  26. package/dist/{index-CHTrEvG1.js → index-CH_C9ijO.js} +2 -2
  27. package/dist/{index-Coz70NtU.js → index-CMdXdyvs.js} +2 -2
  28. package/dist/{index-DAuoR0-c.js → index-CQ0_Kx1_.js} +2 -2
  29. package/dist/{index-zJwCoxly.js → index-Cb7Fh_E2.js} +2 -2
  30. package/dist/{index-DvXsENIM.js → index-CtVFTmHZ.js} +3 -3
  31. package/dist/{index-BVJENFMM.js → index-D3KiKYMR.js} +1 -1
  32. package/dist/{index-CMKlsuD6.js → index-D87CVHA-.js} +2 -2
  33. package/dist/{index-D0PRNLPd.js → index-DM0OEvdI.js} +1 -1
  34. package/dist/{index-DLRVgGXr.js → index-DPTR_QJn.js} +1 -1
  35. package/dist/{index-sEcLP8dk.js → index-DVzaxa5k.js} +2 -2
  36. package/dist/{index-B_CDhpav.js → index-DcXbL-0o.js} +4 -4
  37. package/dist/{index-nhC91wtN.js → index-Dn0qfALy.js} +3 -3
  38. package/dist/{index-AU7rrK9g.js → index-Dnz3YPDV.js} +2 -2
  39. package/dist/{index-BMUAwQmf.js → index-DoWp9uDw.js} +2 -2
  40. package/dist/{index-61ZlwI2f.js → index-Dstr-PNj.js} +2 -2
  41. package/dist/{index-eyK5xPX3.js → index-DzqaKW6e.js} +2 -2
  42. package/dist/{index-D1KO6u1Z.js → index-GoAXo3fT.js} +227 -184
  43. package/dist/{index-ZxBcNN-g.js → index-Jy2tofdo.js} +3 -3
  44. package/dist/{index-ZHmmTlG-.js → index-KRo2-iQv.js} +3 -3
  45. package/dist/{index-CcC1xcOH.js → index-KuhYPy5i.js} +1 -1
  46. package/dist/{index-C5Bdrx4J.js → index-YlEOHde0.js} +1 -1
  47. package/dist/{index-DbuDWYlA.js → index-toqlO_-B.js} +1 -1
  48. package/dist/index.es.js +2 -2
  49. 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
  50. package/dist/{pagination-design-Bh5sF0VU.js → pagination-design-DANnqQdI.js} +2 -2
  51. package/dist/paper-widget-design-BrE7Bb4V.js +4 -0
  52. package/dist/{print-runtime-instance-19OA8Ubq.js → print-runtime-instance-PabaORE2.js} +1 -1
  53. package/dist/{print-snapshot-renderer-D5OUO3Sx.js → print-snapshot-renderer-DQr2G7Hv.js} +3 -3
  54. package/dist/{qrcode-design-CkwIXxb_.js → qrcode-design-BEA1JchI.js} +1 -1
  55. package/dist/{revo-grid.entry-CJ1rhBKH.js → revo-grid.entry-Bj-4xHie.js} +1 -1
  56. package/dist/{revogr-attribution_7.entry-Ba9MJ5p9.js → revogr-attribution_7.entry-NvaozwYj.js} +3 -3
  57. package/dist/{revogr-clipboard_3.entry--neB-vq8.js → revogr-clipboard_3.entry-CkRbECsx.js} +2 -2
  58. package/dist/{revogr-data_4.entry-BcmetTvO.js → revogr-data_4.entry-Dbbd8Mpz.js} +2 -2
  59. package/dist/{revogr-filter-panel.entry-jp8iD-xn.js → revogr-filter-panel.entry-lcMbXUNb.js} +1 -1
  60. package/dist/seal-design-CX-ZxOn3.js +4 -0
  61. package/dist/{serialnumber-design-LzvbjC79.js → serialnumber-design-B608oYcy.js} +1 -1
  62. package/dist/shared/index.es.js +25 -25
  63. package/dist/{single-field-drop-CEbaTw0-.js → single-field-drop-CkUP3H7u.js} +2 -2
  64. package/dist/{size-editor-CaFqQHeU.js → size-editor-Bl-lUcdU.js} +1 -1
  65. package/dist/src/nocode-base/src/hooks/render-page/initialize-runtime.d.ts +3 -0
  66. package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +3 -0
  67. package/dist/src/nocode-base/src/interface/render.d.ts +2 -1
  68. package/dist/src/nocode-base/src/interface/transform.d.ts +3 -0
  69. package/dist/src/nocode-base/src/runtime/designer-default-values.d.ts +23 -0
  70. package/dist/src/nocode-base/src/runtime/formula-utils.d.ts +2 -0
  71. package/dist/src/nocode-base/src/runtime/runtime-default-value-validation.d.ts +23 -0
  72. package/dist/src/nocode-base/src/runtime/runtime-form-state-store.d.ts +6 -2
  73. package/dist/src/nocode-base/src/runtime/runtime-instance-registry.d.ts +3 -0
  74. package/dist/src/nocode-base/src/runtime/table-row-identity.d.ts +2 -0
  75. package/dist/src/nocode-base/src/types/common/base.d.ts +4 -2
  76. package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +4 -3
  77. package/dist/src/online-form/src/views/designer/types/index.d.ts +3 -1
  78. package/dist/src/shared/enum/field-type.d.ts +1 -1
  79. package/dist/{sub-table-factory-_1c-Dsu_.js → sub-table-factory-GzYKYE9t.js} +2 -2
  80. package/dist/{text-design-D5QIq5aE.js → text-design-V3TQuLps.js} +2 -2
  81. package/dist/{throttle-Cpk1LoGk-BMfNVrvD.js → throttle-Cpk1LoGk-CFMeLNb-.js} +1 -1
  82. package/dist/{timediff-design-B9m-zonK.js → timediff-design-DRum3zZt.js} +1 -1
  83. package/dist/{trace-like-wrapper-C_NJVd6e.js → trace-like-wrapper-D1Gzs1mF.js} +2 -2
  84. 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
  85. package/dist/{widget-barcode-CDMJo5uk.js → widget-barcode-CNrl2NxY.js} +4 -4
  86. package/dist/{widget-diagonal-D9AC_qNv.js → widget-diagonal-CqjD1SwW.js} +3 -3
  87. package/dist/{widget-image-DMiIjg8J.js → widget-image-Xjl5W2Fp.js} +4 -4
  88. package/dist/{widget-line-BwSO-GKu.js → widget-line-BUVVnwrU.js} +2 -2
  89. package/dist/{widget-pagination-Buo5s7Xq.js → widget-pagination-DjMXWioI.js} +5 -5
  90. package/dist/{widget-power-D8HtIVO2.js → widget-power-Dck9H8a9.js} +3 -3
  91. package/dist/{widget-qrcode-XEY9m1Dj.js → widget-qrcode-Cu8BwE24.js} +3 -3
  92. package/dist/{widget-rangelimit-C9j1s6Md.js → widget-rangelimit-DLxebCKf.js} +3 -3
  93. package/dist/{widget-serialnumber-B_IA4_De.js → widget-serialnumber-DecFCGS0.js} +1 -1
  94. package/dist/{widget-text-Bp0FEZa1.js → widget-text-DV3yKKsx.js} +5 -5
  95. package/dist/{widget-timediff-BlYRlDYp.js → widget-timediff-BIwewJ39.js} +2 -2
  96. package/package.json +2 -2
  97. package/dist/paper-widget-design-DZrP96jp.js +0 -4
  98. package/dist/seal-design-DX7PP65G.js +0 -4
@@ -1,6 +1,6 @@
1
- import { has, isEmpty, keyBy, pick, isNil, mapKeys, cloneDeep, flatMap, omit, merge, pickBy, isObject as isObject$1, omitBy, defaults, groupBy, isEqual, get as get$1, last, first } from "lodash-es";
1
+ import { has, keyBy, pick, isNil, isEmpty, mapKeys, cloneDeep, flatMap, omit, merge, pickBy, isObject as isObject$1, omitBy, defaults, groupBy, isEqual, get as get$1, last, first } from "lodash-es";
2
+ import { computed, toRaw, defineComponent, ref, onMounted, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, vShow, createVNode, render as render$1, watch, inject, nextTick as nextTick$1, h as h$1, defineAsyncComponent, getCurrentInstance } from "vue";
2
3
  import dayjs from "dayjs";
3
- import { computed, defineComponent, ref, onMounted, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, vShow, createVNode, render as render$1, toRaw, inject, nextTick as nextTick$1, h as h$1, defineAsyncComponent, getCurrentInstance } from "vue";
4
4
  import { api as api$1 } from "@gct-paas/api";
5
5
  var PlatformEnum = /* @__PURE__ */ ((PlatformEnum2) => {
6
6
  PlatformEnum2["INTEGRATION_PAAS_DP"] = "INTEGRATION_PAAS_DP";
@@ -4274,6 +4274,285 @@ function resolveDesignPanelFeatures(tableType) {
4274
4274
  showConfigSection
4275
4275
  };
4276
4276
  }
4277
+ const uuid2 = (len, radix) => {
4278
+ const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
4279
+ let uuid = [], i2;
4280
+ radix = radix || chars.length;
4281
+ if (len) {
4282
+ for (i2 = 0; i2 < len; i2++) uuid[i2] = chars[0 | Math.random() * radix];
4283
+ } else {
4284
+ let r;
4285
+ uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
4286
+ uuid[14] = "4";
4287
+ for (i2 = 0; i2 < 36; i2++) {
4288
+ if (!uuid[i2]) {
4289
+ r = 0 | Math.random() * 16;
4290
+ uuid[i2] = chars[i2 == 19 ? r & 3 | 8 : r];
4291
+ }
4292
+ }
4293
+ }
4294
+ return uuid.join("");
4295
+ };
4296
+ const normalizeToArray = (val) => Array.isArray(val) ? val.filter((v) => !isNil(v)) : !isNil(val) ? [val] : [];
4297
+ const safeParseArray = (str) => {
4298
+ try {
4299
+ if (!str) return [];
4300
+ const v = JSON.parse(str);
4301
+ return Array.isArray(v) ? v : [];
4302
+ } catch {
4303
+ return [];
4304
+ }
4305
+ };
4306
+ const mergeByMultiKey = (A, B, {
4307
+ keyFields = ["type", "isCustom"],
4308
+ fieldsToMerge = ["alias", "enable"],
4309
+ isAllowMerge = true,
4310
+ isConcat = false
4311
+ } = {}) => {
4312
+ if (!Array.isArray(A)) return [];
4313
+ if (!isAllowMerge || !Array.isArray(B) || B.length === 0) return [...A];
4314
+ if (isConcat && Array.isArray(A) && A.length === 0) return [...B];
4315
+ const keyFn = (item) => keyFields.map((k) => {
4316
+ const v = item?.[k];
4317
+ if (typeof v === "boolean") return String(v);
4318
+ return v == null ? "" : String(v);
4319
+ }).join("::");
4320
+ const bMap = keyBy(B, keyFn);
4321
+ const result = A.map((a) => {
4322
+ const info = bMap[keyFn(a)];
4323
+ return info ? { ...a, ...pick(info, fieldsToMerge) } : { ...a };
4324
+ });
4325
+ return result;
4326
+ };
4327
+ const CLIENT_ROW_UID_KEY = "__gct_rv_uid";
4328
+ const FRONT_ROW_KEY = "front_row_key_";
4329
+ function ensureFrontRowKey(row) {
4330
+ if (!row) return "";
4331
+ const existing = row[FRONT_ROW_KEY];
4332
+ if (existing != null && String(existing).trim() !== "") return String(existing);
4333
+ const uid = Array.isArray(row._2DTABLE_) && row.group_ != null && String(row.group_).trim() !== "" ? `group:${row.group_}` : `r_${Date.now()}_${uuid2(8)}`;
4334
+ row[FRONT_ROW_KEY] = uid;
4335
+ return uid;
4336
+ }
4337
+ const getRowId = (row) => ensureFrontRowKey(row);
4338
+ function ensureTableRowKeys(rows) {
4339
+ if (!Array.isArray(rows)) return;
4340
+ rows.forEach((row) => {
4341
+ if (!row || typeof row !== "object" || Array.isArray(row)) return;
4342
+ ensureFrontRowKey(row);
4343
+ ensureTableRowKeys(row._2DTABLE_);
4344
+ });
4345
+ }
4346
+ function resetTableRowIdentity(row) {
4347
+ delete row.id_;
4348
+ delete row[FRONT_ROW_KEY];
4349
+ if (Array.isArray(row._2DTABLE_) && row.group_ != null) row.group_ = `dyn${uuid2(16)}`;
4350
+ ensureFrontRowKey(row);
4351
+ if (Array.isArray(row._2DTABLE_)) row._2DTABLE_.forEach(resetTableRowIdentity);
4352
+ }
4353
+ const RUNTIME_COLUMN_ROW_KEY = "_column_row_key_";
4354
+ const MAX_FRONT_ROW_KEY_LENGTH = 255;
4355
+ const TABLE_2D_ROW_KEY_PREFIX = "2d1.";
4356
+ function encodeBase64Url(value) {
4357
+ return btoa(
4358
+ Array.from(new TextEncoder().encode(value), (byte) => String.fromCharCode(byte)).join("")
4359
+ ).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
4360
+ }
4361
+ function decodeBase64Url(value) {
4362
+ const base64 = value.replace(/-/g, "+").replace(/_/g, "/");
4363
+ const padded = base64 + "=".repeat((4 - base64.length % 4) % 4);
4364
+ return new TextDecoder().decode(Uint8Array.from(atob(padded), (char) => char.charCodeAt(0)));
4365
+ }
4366
+ function decodeTableCellRowKey(rowKey) {
4367
+ if (typeof rowKey !== "string" || !rowKey.startsWith(TABLE_2D_ROW_KEY_PREFIX)) return void 0;
4368
+ try {
4369
+ const parsed = JSON.parse(decodeBase64Url(rowKey.slice(TABLE_2D_ROW_KEY_PREFIX.length)));
4370
+ if (!Array.isArray(parsed) || parsed.length !== 2 || parsed.some((item) => typeof item !== "string" || item === ""))
4371
+ return void 0;
4372
+ return { cellRowKey: parsed[0], columnRowKey: parsed[1] };
4373
+ } catch {
4374
+ return void 0;
4375
+ }
4376
+ }
4377
+ function encodeTableCellRowKey(cellRowKey, columnRowKey) {
4378
+ const decoded = decodeTableCellRowKey(cellRowKey);
4379
+ const originalCellRowKey = decoded?.cellRowKey ?? String(cellRowKey ?? "");
4380
+ const persistedColumnRowKey = String(columnRowKey ?? "");
4381
+ if (!originalCellRowKey || !persistedColumnRowKey)
4382
+ throw new Error("二维表子行或关联列缺少 front_row_key_");
4383
+ if (decoded?.columnRowKey === persistedColumnRowKey) return String(cellRowKey);
4384
+ const encoded = `${TABLE_2D_ROW_KEY_PREFIX}${encodeBase64Url(
4385
+ JSON.stringify([originalCellRowKey, persistedColumnRowKey])
4386
+ )}`;
4387
+ if (encoded.length > MAX_FRONT_ROW_KEY_LENGTH)
4388
+ throw new Error(`二维表内置关联键长度超过 ${MAX_FRONT_ROW_KEY_LENGTH},不能提交`);
4389
+ return encoded;
4390
+ }
4391
+ function isTableRowKeyMatch(rowKey, expected) {
4392
+ if (rowKey == null || expected == null) return false;
4393
+ const actual = String(rowKey);
4394
+ const target = String(expected);
4395
+ return actual === target || decodeTableCellRowKey(actual)?.cellRowKey === target;
4396
+ }
4397
+ function splitRuntimeDataPath(path) {
4398
+ const parts = path.split(".");
4399
+ const result = [];
4400
+ for (let index2 = 0; index2 < parts.length; index2++) {
4401
+ const part = parts[index2];
4402
+ const candidate = `${part}.${parts[index2 + 1] ?? ""}`;
4403
+ if (part === "2d1" && decodeTableCellRowKey(candidate)) {
4404
+ result.push(candidate);
4405
+ index2++;
4406
+ } else result.push(part);
4407
+ }
4408
+ return result;
4409
+ }
4410
+ function findRuntimeTableRow(rows, rowKey) {
4411
+ if (!rowKey || !Array.isArray(rows)) return void 0;
4412
+ for (const row of rows) {
4413
+ if (!row || row.deleted_) continue;
4414
+ if (isTableRowKeyMatch(row[FRONT_ROW_KEY], rowKey)) return row;
4415
+ const child = findRuntimeTableRow(row._2DTABLE_, rowKey);
4416
+ if (child) return child;
4417
+ }
4418
+ return void 0;
4419
+ }
4420
+ function findRuntimeParentRow(rows, rowKey) {
4421
+ if (!rowKey || !Array.isArray(rows)) return void 0;
4422
+ return rows.find(
4423
+ (row) => !row?.deleted_ && (isTableRowKeyMatch(row[FRONT_ROW_KEY], rowKey) || row._2DTABLE_?.some(
4424
+ (child) => !child?.deleted_ && isTableRowKeyMatch(child[FRONT_ROW_KEY], rowKey)
4425
+ ))
4426
+ );
4427
+ }
4428
+ function findRuntimeTableCell(parent, columnRowKey) {
4429
+ if (!columnRowKey || !Array.isArray(parent?._2DTABLE_)) return void 0;
4430
+ return parent._2DTABLE_.find(
4431
+ (child) => !child?.deleted_ && child[RUNTIME_COLUMN_ROW_KEY] === columnRowKey
4432
+ );
4433
+ }
4434
+ function getRenderedRuntimeTableCell(state, info, parent, displayColumn) {
4435
+ if (!info?.colSubFieldKey) {
4436
+ return parent?._2DTABLE_?.at(displayColumn);
4437
+ }
4438
+ const column = state[info.colSubFieldKey]?.at(displayColumn);
4439
+ return column ? findRuntimeTableCell(parent, ensureFrontRowKey(column)) : void 0;
4440
+ }
4441
+ function bindRuntimeTableColumns(state, relations) {
4442
+ const expandedTables = /* @__PURE__ */ new Set();
4443
+ for (const info of relations) {
4444
+ const rows = state[info.rowSubFieldKey];
4445
+ const columns = info.colSubFieldKey ? state[info.colSubFieldKey] : void 0;
4446
+ if (!Array.isArray(rows) || !Array.isArray(columns)) continue;
4447
+ ensureTableRowKeys(columns);
4448
+ for (const parent of rows) {
4449
+ if (!Array.isArray(parent?._2DTABLE_)) continue;
4450
+ ensureTableRowKeys([parent]);
4451
+ const existingKeys = parent._2DTABLE_.map((child) => child[RUNTIME_COLUMN_ROW_KEY]).filter(Boolean);
4452
+ const bound = new Set(existingKeys);
4453
+ if (bound.size !== existingKeys.length)
4454
+ throw new Error(`二维表「${info.rowSubFieldKey}」存在重复的关联列行键`);
4455
+ const available = columns.filter(
4456
+ (column) => !column.deleted_ && !bound.has(ensureFrontRowKey(column))
4457
+ );
4458
+ for (const child of parent._2DTABLE_) {
4459
+ if (child[RUNTIME_COLUMN_ROW_KEY]) continue;
4460
+ const persistedIdentity = decodeTableCellRowKey(child[FRONT_ROW_KEY]);
4461
+ const reference = info.rowRefFieldKey ? child[info.rowRefFieldKey] : void 0;
4462
+ let businessColumn;
4463
+ if (reference != null && reference !== "" && info.colRefFieldKey) {
4464
+ const matches = columns.filter(
4465
+ (candidate) => String(candidate[info.colRefFieldKey]) === String(reference)
4466
+ );
4467
+ if (matches.length !== 1)
4468
+ throw new Error(
4469
+ `二维表「${info.rowSubFieldKey}」的关联列引用「${reference}」无法唯一匹配`
4470
+ );
4471
+ businessColumn = matches[0];
4472
+ }
4473
+ const persistedColumn = persistedIdentity ? columns.find(
4474
+ (candidate) => ensureFrontRowKey(candidate) === persistedIdentity.columnRowKey
4475
+ ) : void 0;
4476
+ if (persistedIdentity && !persistedColumn)
4477
+ throw new Error(
4478
+ `二维表「${info.rowSubFieldKey}」子行「${child[FRONT_ROW_KEY]}」的内置关联列不存在`
4479
+ );
4480
+ if (businessColumn && persistedColumn && businessColumn !== persistedColumn)
4481
+ throw new Error(
4482
+ `二维表「${info.rowSubFieldKey}」子行「${child[FRONT_ROW_KEY]}」的业务引用与内置关联冲突`
4483
+ );
4484
+ const column = businessColumn ?? persistedColumn ?? available.shift();
4485
+ if (!column) throw new Error(`二维表「${info.rowSubFieldKey}」缺少可绑定的关联列行`);
4486
+ const columnKey = ensureFrontRowKey(column);
4487
+ if (bound.has(columnKey))
4488
+ throw new Error(`二维表「${info.rowSubFieldKey}」重复绑定关联列行「${columnKey}」`);
4489
+ toRaw(child)[RUNTIME_COLUMN_ROW_KEY] = columnKey;
4490
+ bound.add(columnKey);
4491
+ const availablePosition = available.indexOf(column);
4492
+ if (availablePosition >= 0) available.splice(availablePosition, 1);
4493
+ }
4494
+ if (!parent.deleted_) {
4495
+ for (const column of available) {
4496
+ const child = {
4497
+ _DICT: {},
4498
+ _OPCT: {},
4499
+ _MCTABLE: {},
4500
+ [RUNTIME_COLUMN_ROW_KEY]: ensureFrontRowKey(column)
4501
+ };
4502
+ ensureFrontRowKey(child);
4503
+ parent._2DTABLE_.push(child);
4504
+ expandedTables.add(info.rowSubFieldKey);
4505
+ }
4506
+ }
4507
+ }
4508
+ }
4509
+ return Array.from(expandedTables);
4510
+ }
4511
+ function getRuntimeDataFieldId(props = {}) {
4512
+ return props.field ? props.isFieldModel ? props.fieldLink ?? "" : props.field : "";
4513
+ }
4514
+ function getBusinessFieldKey(field) {
4515
+ return [field.subModelKey ?? field.modelKey ?? "", field.fieldId ?? ""].join(":");
4516
+ }
4517
+ const FIELD_POSITION_PREFIX = "runtime_field_";
4518
+ function buildRuntimeFieldPath(position) {
4519
+ if (!position.fieldId) throw new Error("运行时字段位置缺少 fieldId");
4520
+ if (position.subFieldKey && !position.rowKey) throw new Error("子表字段位置缺少 front_row_key_");
4521
+ const serialized = JSON.stringify([
4522
+ position.modelKey ?? "",
4523
+ position.subModelKey ?? "",
4524
+ position.subFieldKey ?? "",
4525
+ position.rowKey ?? "",
4526
+ position.fieldId
4527
+ ]);
4528
+ return FIELD_POSITION_PREFIX + btoa(
4529
+ Array.from(new TextEncoder().encode(serialized), (byte) => String.fromCharCode(byte)).join(
4530
+ ""
4531
+ )
4532
+ ).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
4533
+ }
4534
+ function parseRuntimeFieldPath(path) {
4535
+ if (!path.startsWith(FIELD_POSITION_PREFIX)) return void 0;
4536
+ try {
4537
+ const encoded = path.slice(FIELD_POSITION_PREFIX.length).replace(/-/g, "+").replace(/_/g, "/");
4538
+ const parts = JSON.parse(
4539
+ new TextDecoder().decode(Uint8Array.from(atob(encoded), (char) => char.charCodeAt(0)))
4540
+ );
4541
+ if (!Array.isArray(parts) || parts.length !== 5 || parts.some((part) => typeof part !== "string"))
4542
+ return void 0;
4543
+ const [modelKey, subModelKey, subFieldKey, rowKey, fieldId] = parts;
4544
+ if (!fieldId || subFieldKey && !rowKey) return void 0;
4545
+ return {
4546
+ modelKey: modelKey || void 0,
4547
+ subModelKey: subModelKey || void 0,
4548
+ subFieldKey: subFieldKey || void 0,
4549
+ rowKey: rowKey || void 0,
4550
+ fieldId
4551
+ };
4552
+ } catch {
4553
+ return void 0;
4554
+ }
4555
+ }
4277
4556
  const manifest$1h = {
4278
4557
  type: FIELD_TYPE.MATERIAL_CONTAINER,
4279
4558
  design: "fw:auto-complete",
@@ -5571,82 +5850,6 @@ function toPx(length, element) {
5571
5850
  return unit == "px" ? val : pxPerUnit(unit, element) * val;
5572
5851
  }
5573
5852
  var src = toPx;
5574
- const uuid2 = (len, radix) => {
5575
- const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
5576
- let uuid = [], i2;
5577
- radix = radix || chars.length;
5578
- if (len) {
5579
- for (i2 = 0; i2 < len; i2++) uuid[i2] = chars[0 | Math.random() * radix];
5580
- } else {
5581
- let r;
5582
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
5583
- uuid[14] = "4";
5584
- for (i2 = 0; i2 < 36; i2++) {
5585
- if (!uuid[i2]) {
5586
- r = 0 | Math.random() * 16;
5587
- uuid[i2] = chars[i2 == 19 ? r & 3 | 8 : r];
5588
- }
5589
- }
5590
- }
5591
- return uuid.join("");
5592
- };
5593
- const normalizeToArray = (val) => Array.isArray(val) ? val.filter((v) => !isNil(v)) : !isNil(val) ? [val] : [];
5594
- const safeParseArray = (str) => {
5595
- try {
5596
- if (!str) return [];
5597
- const v = JSON.parse(str);
5598
- return Array.isArray(v) ? v : [];
5599
- } catch {
5600
- return [];
5601
- }
5602
- };
5603
- const mergeByMultiKey = (A, B, {
5604
- keyFields = ["type", "isCustom"],
5605
- fieldsToMerge = ["alias", "enable"],
5606
- isAllowMerge = true,
5607
- isConcat = false
5608
- } = {}) => {
5609
- if (!Array.isArray(A)) return [];
5610
- if (!isAllowMerge || !Array.isArray(B) || B.length === 0) return [...A];
5611
- if (isConcat && Array.isArray(A) && A.length === 0) return [...B];
5612
- const keyFn = (item) => keyFields.map((k) => {
5613
- const v = item?.[k];
5614
- if (typeof v === "boolean") return String(v);
5615
- return v == null ? "" : String(v);
5616
- }).join("::");
5617
- const bMap = keyBy(B, keyFn);
5618
- const result = A.map((a) => {
5619
- const info = bMap[keyFn(a)];
5620
- return info ? { ...a, ...pick(info, fieldsToMerge) } : { ...a };
5621
- });
5622
- return result;
5623
- };
5624
- const CLIENT_ROW_UID_KEY = "__gct_rv_uid";
5625
- const FRONT_ROW_KEY = "front_row_key_";
5626
- function ensureFrontRowKey(row) {
5627
- if (!row) return "";
5628
- const existing = row[FRONT_ROW_KEY];
5629
- if (existing != null && String(existing).trim() !== "") return String(existing);
5630
- const uid = Array.isArray(row._2DTABLE_) && row.group_ != null && String(row.group_).trim() !== "" ? `group:${row.group_}` : `r_${Date.now()}_${uuid2(8)}`;
5631
- row[FRONT_ROW_KEY] = uid;
5632
- return uid;
5633
- }
5634
- const getRowId = (row) => ensureFrontRowKey(row);
5635
- function ensureTableRowKeys(rows) {
5636
- if (!Array.isArray(rows)) return;
5637
- rows.forEach((row) => {
5638
- if (!row || typeof row !== "object" || Array.isArray(row)) return;
5639
- ensureFrontRowKey(row);
5640
- ensureTableRowKeys(row._2DTABLE_);
5641
- });
5642
- }
5643
- function resetTableRowIdentity(row) {
5644
- delete row.id_;
5645
- delete row[FRONT_ROW_KEY];
5646
- if (Array.isArray(row._2DTABLE_) && row.group_ != null) row.group_ = `dyn${uuid2(16)}`;
5647
- ensureFrontRowKey(row);
5648
- if (Array.isArray(row._2DTABLE_)) row._2DTABLE_.forEach(resetTableRowIdentity);
5649
- }
5650
5853
  var Syntax;
5651
5854
  (function(Syntax2) {
5652
5855
  Syntax2["AssignmentExpression"] = "AssignmentExpression";
@@ -59825,151 +60028,6 @@ async function requestNonMedProCheckDsData(payload) {
59825
60028
  }
59826
60029
  return Object.keys(byTable).length > 0 ? { byTable } : void 0;
59827
60030
  }
59828
- const RUNTIME_COLUMN_ROW_KEY = "_column_row_key_";
59829
- const MAX_FRONT_ROW_KEY_LENGTH = 255;
59830
- const TABLE_2D_ROW_KEY_PREFIX = "2d1.";
59831
- function encodeBase64Url(value) {
59832
- return btoa(
59833
- Array.from(new TextEncoder().encode(value), (byte) => String.fromCharCode(byte)).join("")
59834
- ).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
59835
- }
59836
- function decodeBase64Url(value) {
59837
- const base64 = value.replace(/-/g, "+").replace(/_/g, "/");
59838
- const padded = base64 + "=".repeat((4 - base64.length % 4) % 4);
59839
- return new TextDecoder().decode(Uint8Array.from(atob(padded), (char) => char.charCodeAt(0)));
59840
- }
59841
- function decodeTableCellRowKey(rowKey) {
59842
- if (typeof rowKey !== "string" || !rowKey.startsWith(TABLE_2D_ROW_KEY_PREFIX)) return void 0;
59843
- try {
59844
- const parsed = JSON.parse(decodeBase64Url(rowKey.slice(TABLE_2D_ROW_KEY_PREFIX.length)));
59845
- if (!Array.isArray(parsed) || parsed.length !== 2 || parsed.some((item) => typeof item !== "string" || item === ""))
59846
- return void 0;
59847
- return { cellRowKey: parsed[0], columnRowKey: parsed[1] };
59848
- } catch {
59849
- return void 0;
59850
- }
59851
- }
59852
- function encodeTableCellRowKey(cellRowKey, columnRowKey) {
59853
- const decoded = decodeTableCellRowKey(cellRowKey);
59854
- const originalCellRowKey = decoded?.cellRowKey ?? String(cellRowKey ?? "");
59855
- const persistedColumnRowKey = String(columnRowKey ?? "");
59856
- if (!originalCellRowKey || !persistedColumnRowKey)
59857
- throw new Error("二维表子行或关联列缺少 front_row_key_");
59858
- if (decoded?.columnRowKey === persistedColumnRowKey) return String(cellRowKey);
59859
- const encoded = `${TABLE_2D_ROW_KEY_PREFIX}${encodeBase64Url(
59860
- JSON.stringify([originalCellRowKey, persistedColumnRowKey])
59861
- )}`;
59862
- if (encoded.length > MAX_FRONT_ROW_KEY_LENGTH)
59863
- throw new Error(`二维表内置关联键长度超过 ${MAX_FRONT_ROW_KEY_LENGTH},不能提交`);
59864
- return encoded;
59865
- }
59866
- function isTableRowKeyMatch(rowKey, expected) {
59867
- if (rowKey == null || expected == null) return false;
59868
- const actual = String(rowKey);
59869
- const target = String(expected);
59870
- return actual === target || decodeTableCellRowKey(actual)?.cellRowKey === target;
59871
- }
59872
- function findRuntimeTableRow(rows, rowKey) {
59873
- if (!rowKey || !Array.isArray(rows)) return void 0;
59874
- for (const row of rows) {
59875
- if (!row || row.deleted_) continue;
59876
- if (isTableRowKeyMatch(row[FRONT_ROW_KEY], rowKey)) return row;
59877
- const child = findRuntimeTableRow(row._2DTABLE_, rowKey);
59878
- if (child) return child;
59879
- }
59880
- return void 0;
59881
- }
59882
- function findRuntimeParentRow(rows, rowKey) {
59883
- if (!rowKey || !Array.isArray(rows)) return void 0;
59884
- return rows.find(
59885
- (row) => !row?.deleted_ && (isTableRowKeyMatch(row[FRONT_ROW_KEY], rowKey) || row._2DTABLE_?.some(
59886
- (child) => !child?.deleted_ && isTableRowKeyMatch(child[FRONT_ROW_KEY], rowKey)
59887
- ))
59888
- );
59889
- }
59890
- function findRuntimeTableCell(parent, columnRowKey) {
59891
- if (!columnRowKey || !Array.isArray(parent?._2DTABLE_)) return void 0;
59892
- return parent._2DTABLE_.find(
59893
- (child) => !child?.deleted_ && child[RUNTIME_COLUMN_ROW_KEY] === columnRowKey
59894
- );
59895
- }
59896
- function getRenderedRuntimeTableCell(state, info, parent, displayColumn) {
59897
- if (!info?.colSubFieldKey) {
59898
- return parent?._2DTABLE_?.at(displayColumn);
59899
- }
59900
- const column = state[info.colSubFieldKey]?.at(displayColumn);
59901
- return column ? findRuntimeTableCell(parent, ensureFrontRowKey(column)) : void 0;
59902
- }
59903
- function bindRuntimeTableColumns(state, relations) {
59904
- const expandedTables = /* @__PURE__ */ new Set();
59905
- for (const info of relations) {
59906
- const rows = state[info.rowSubFieldKey];
59907
- const columns = info.colSubFieldKey ? state[info.colSubFieldKey] : void 0;
59908
- if (!Array.isArray(rows) || !Array.isArray(columns)) continue;
59909
- ensureTableRowKeys(columns);
59910
- for (const parent of rows) {
59911
- if (!Array.isArray(parent?._2DTABLE_)) continue;
59912
- ensureTableRowKeys([parent]);
59913
- const existingKeys = parent._2DTABLE_.map((child) => child[RUNTIME_COLUMN_ROW_KEY]).filter(Boolean);
59914
- const bound = new Set(existingKeys);
59915
- if (bound.size !== existingKeys.length)
59916
- throw new Error(`二维表「${info.rowSubFieldKey}」存在重复的关联列行键`);
59917
- const available = columns.filter(
59918
- (column) => !column.deleted_ && !bound.has(ensureFrontRowKey(column))
59919
- );
59920
- for (const child of parent._2DTABLE_) {
59921
- if (child[RUNTIME_COLUMN_ROW_KEY]) continue;
59922
- const persistedIdentity = decodeTableCellRowKey(child[FRONT_ROW_KEY]);
59923
- const reference = info.rowRefFieldKey ? child[info.rowRefFieldKey] : void 0;
59924
- let businessColumn;
59925
- if (reference != null && reference !== "" && info.colRefFieldKey) {
59926
- const matches = columns.filter(
59927
- (candidate) => String(candidate[info.colRefFieldKey]) === String(reference)
59928
- );
59929
- if (matches.length !== 1)
59930
- throw new Error(
59931
- `二维表「${info.rowSubFieldKey}」的关联列引用「${reference}」无法唯一匹配`
59932
- );
59933
- businessColumn = matches[0];
59934
- }
59935
- const persistedColumn = persistedIdentity ? columns.find(
59936
- (candidate) => ensureFrontRowKey(candidate) === persistedIdentity.columnRowKey
59937
- ) : void 0;
59938
- if (persistedIdentity && !persistedColumn)
59939
- throw new Error(
59940
- `二维表「${info.rowSubFieldKey}」子行「${child[FRONT_ROW_KEY]}」的内置关联列不存在`
59941
- );
59942
- if (businessColumn && persistedColumn && businessColumn !== persistedColumn)
59943
- throw new Error(
59944
- `二维表「${info.rowSubFieldKey}」子行「${child[FRONT_ROW_KEY]}」的业务引用与内置关联冲突`
59945
- );
59946
- const column = businessColumn ?? persistedColumn ?? available.shift();
59947
- if (!column) throw new Error(`二维表「${info.rowSubFieldKey}」缺少可绑定的关联列行`);
59948
- const columnKey = ensureFrontRowKey(column);
59949
- if (bound.has(columnKey))
59950
- throw new Error(`二维表「${info.rowSubFieldKey}」重复绑定关联列行「${columnKey}」`);
59951
- toRaw(child)[RUNTIME_COLUMN_ROW_KEY] = columnKey;
59952
- bound.add(columnKey);
59953
- const availablePosition = available.indexOf(column);
59954
- if (availablePosition >= 0) available.splice(availablePosition, 1);
59955
- }
59956
- if (!parent.deleted_) {
59957
- for (const column of available) {
59958
- const child = {
59959
- _DICT: {},
59960
- _OPCT: {},
59961
- _MCTABLE: {},
59962
- [RUNTIME_COLUMN_ROW_KEY]: ensureFrontRowKey(column)
59963
- };
59964
- ensureFrontRowKey(child);
59965
- parent._2DTABLE_.push(child);
59966
- expandedTables.add(info.rowSubFieldKey);
59967
- }
59968
- }
59969
- }
59970
- }
59971
- return Array.from(expandedTables);
59972
- }
59973
60031
  const DEFAULT_FROM_STATE = {
59974
60032
  _DICT: {},
59975
60033
  //翻译的字段
@@ -60326,6 +60384,11 @@ const transformUtils = {
60326
60384
  formConfig,
60327
60385
  dataCenters
60328
60386
  });
60387
+ for (const field of Object.keys(objectInitialValuesData)) {
60388
+ if (objectInitialValuesData[field] !== void 0) {
60389
+ delete payload.defaultValueOrigins?.values.gct_main?.[field];
60390
+ }
60391
+ }
60329
60392
  merge(
60330
60393
  formState,
60331
60394
  renderUtils.getDefaultValueInfo({ defaultDataMap, key: "gct_main" }),
@@ -60666,8 +60729,10 @@ const transformUtils = {
60666
60729
  if (!isDataProcessed) {
60667
60730
  if (viewMode === RenderModeEnum.FormMode) {
60668
60731
  merge(formState, payload.defaultData);
60732
+ payload.defaultValueOrigins?.capture(formState);
60669
60733
  }
60670
60734
  if (!isEmpty(payload.paramData)) {
60735
+ payload.defaultValueOrigins?.excludeOverrides(formState, payload.paramData);
60671
60736
  const paramData = cloneDeep(payload.paramData);
60672
60737
  subTableInfo?.forEach((subInfo) => {
60673
60738
  const defaultRows = formState[subInfo.field];
@@ -60698,10 +60763,13 @@ const transformUtils = {
60698
60763
  return mergeKeys.includes(key);
60699
60764
  };
60700
60765
  payload.customData.forEach((fromData2DataSource) => {
60701
- merge(formState, pickBy(fromData2DataSource, shouldKeepField));
60766
+ const data = pickBy(fromData2DataSource, shouldKeepField);
60767
+ payload.defaultValueOrigins?.excludeOverrides(formState, data);
60768
+ merge(formState, data);
60702
60769
  });
60703
60770
  }
60704
60771
  if (!isEmpty(payload.initEventData)) {
60772
+ payload.defaultValueOrigins?.excludeOverrides(formState, payload.initEventData);
60705
60773
  merge(formState, payload.initEventData);
60706
60774
  }
60707
60775
  if (!isEmpty(payload.materialConsumeData)) {
@@ -60731,7 +60799,9 @@ const transformUtils = {
60731
60799
  return acc;
60732
60800
  }, {});
60733
60801
  };
60734
- merge(formState, transformSourceData(filterInterFaceData(), interfaceData.dict));
60802
+ const data = transformSourceData(filterInterFaceData(), interfaceData.dict);
60803
+ payload.defaultValueOrigins?.excludeOverrides(formState, data);
60804
+ merge(formState, data);
60735
60805
  }
60736
60806
  subTableInfo?.forEach((sInfo) => setSubTableFormState(viewMode, sInfo, formState));
60737
60807
  Object.entries(payload?.balanceTableDataMaps ?? {}).forEach(([key, data]) => {
@@ -60790,6 +60860,7 @@ const transformUtils = {
60790
60860
  Object.assign(rowData, subDefaultData);
60791
60861
  }
60792
60862
  ensureFrontRowKey(rowData);
60863
+ payload.defaultValueOrigins?.captureRow(rowData, payload.subFieldId, payload.quickFillData);
60793
60864
  return rowData;
60794
60865
  },
60795
60866
  /** 数据转成真实提交数据(二维表要平铺);layout 是所有 Sheet 的业务表汇总索引。 */
@@ -63083,6 +63154,7 @@ const renderUtils = {
63083
63154
  /** 获取默认值集合 */
63084
63155
  getDefaultValueMapByField: ({
63085
63156
  defaultValueFields,
63157
+ onDesignerDefault = void 0,
63086
63158
  objectProductDefaults = /* @__PURE__ */ new WeakMap(),
63087
63159
  mainMaterialNo = void 0,
63088
63160
  mainRelatedLotNo = void 0,
@@ -63108,12 +63180,17 @@ const renderUtils = {
63108
63180
  }) => {
63109
63181
  const defaultDataMap = /* @__PURE__ */ new Map();
63110
63182
  const configuredDefaultFields = /* @__PURE__ */ new WeakSet();
63183
+ const designerDefaultFields = /* @__PURE__ */ new WeakSet();
63184
+ const designerDefault = (field) => {
63185
+ if (!isNil(field.defaultValue) && field.defaultValue !== "") designerDefaultFields.add(field);
63186
+ return field.defaultValue;
63187
+ };
63111
63188
  const pickDesignerDefault = (field, businessValue) => {
63112
63189
  const configured = field.defaultValue;
63113
63190
  if (isNil(configured) || configured === "") return businessValue;
63114
63191
  if (field.subFieldKey || field.subModelKey || isNil(businessValue) || businessValue === "") {
63115
63192
  configuredDefaultFields.add(field);
63116
- return configured;
63193
+ return designerDefault(field);
63117
63194
  }
63118
63195
  return businessValue;
63119
63196
  };
@@ -63169,13 +63246,13 @@ const renderUtils = {
63169
63246
  case FIELD_TYPE.RELATED_LOT_NO:
63170
63247
  return mainRelatedLotNo;
63171
63248
  case FIELD_TYPE.PRODUCT:
63172
- return pickDesignerDefault(field, mainProductName || void 0) ?? defaultValue;
63249
+ return pickDesignerDefault(field, mainProductName || void 0) ?? designerDefault(field);
63173
63250
  case FIELD_TYPE.ROUTING_OPERATION:
63174
63251
  return pickDesignerDefault(field, mainRoutingOperation);
63175
63252
  case FIELD_TYPE.MFG_ORDER:
63176
63253
  return mainMfgOrderId;
63177
63254
  default:
63178
- return defaultValue;
63255
+ return designerDefault(field);
63179
63256
  }
63180
63257
  };
63181
63258
  const assignValue = (key, id, value) => {
@@ -63185,7 +63262,9 @@ const renderUtils = {
63185
63262
  defaultValueFields.forEach((field) => {
63186
63263
  const { subFieldKey, fieldId, fieldType, autofillRules, enableAutofill, bizType } = field;
63187
63264
  const key = subFieldKey || "gct_main";
63188
- assignValue(key, fieldId, getDefaultValue(field));
63265
+ const value = getDefaultValue(field);
63266
+ assignValue(key, fieldId, value);
63267
+ if (designerDefaultFields.has(field)) onDesignerDefault?.(field, value);
63189
63268
  if (bizType === FIELD_TYPE.STERILIZATION_CONTAINER || fieldType === FIELD_TYPE.STERILIZATION_CONTAINER) {
63190
63269
  assignValue(key, `${fieldId}_id_`, mainSterilizationLotId);
63191
63270
  }
@@ -65072,6 +65151,341 @@ function resolveFieldRenderComponent(props) {
65072
65151
  }
65073
65152
  return resolveRenderComponent(props.bizType, props.fieldType);
65074
65153
  }
65154
+ function getCurrentFormData(_rule, options) {
65155
+ if (!_rule._subtableFieldId) return options?.formData;
65156
+ return findRuntimeTableRow(options?.formData?.[_rule._subtableFieldId], _rule._rowKey);
65157
+ }
65158
+ function isSameOptionValue(current, expected) {
65159
+ if (typeof expected === "boolean") {
65160
+ return renderUtils.getBoolValue(current) === expected;
65161
+ }
65162
+ if (current === void 0 || current === null || current === "") {
65163
+ return false;
65164
+ }
65165
+ return String(current) === String(expected);
65166
+ }
65167
+ function isAttachFieldActive(attach, formData) {
65168
+ if (attach?.parent && !isAttachFieldActive(attach.parent, formData)) return false;
65169
+ if (!attach?.belongFieldId || isNil(attach.optionValue)) {
65170
+ return true;
65171
+ }
65172
+ const row = attach.subtableFieldId ? findRuntimeTableRow(formData?.[attach.subtableFieldId], attach.rowKey) : formData;
65173
+ if (attach.subtableFieldId && (!attach.rowKey || !row || row === formData)) {
65174
+ return false;
65175
+ }
65176
+ const raw = row?.[attach.belongFieldId];
65177
+ if (attach.multiple) {
65178
+ const current = renderUtils.getValue(raw, true);
65179
+ if (!Array.isArray(current)) return false;
65180
+ return current.some((v) => isSameOptionValue(v, attach.optionValue));
65181
+ }
65182
+ return isSameOptionValue(raw, attach.optionValue);
65183
+ }
65184
+ function isReferenceOptionActive(referenceInfo, rowFormData) {
65185
+ if (!referenceInfo?.belongFieldId || isNil(referenceInfo.optionValue)) {
65186
+ return true;
65187
+ }
65188
+ return isAttachFieldActive(
65189
+ {
65190
+ belongFieldId: referenceInfo.belongFieldId,
65191
+ optionValue: referenceInfo.optionValue,
65192
+ multiple: referenceInfo.multiple
65193
+ },
65194
+ rowFormData
65195
+ );
65196
+ }
65197
+ function listRuntimeFieldRows(record, subFieldKey, targetFieldId) {
65198
+ if (!subFieldKey) {
65199
+ return [{ row: record.formState.state }];
65200
+ }
65201
+ const value = record.formState.state[subFieldKey];
65202
+ const table2DInfo = [
65203
+ ...record.context.businessIndex.subTable2DList,
65204
+ ...record.context.businessIndex.checkTable2DList
65205
+ ].find((item) => item.rowSubFieldKey === subFieldKey);
65206
+ const isChild = table2DInfo && (table2DInfo.crossFieldKeys ?? []).includes(targetFieldId);
65207
+ return Array.isArray(value) ? value.flatMap((row) => {
65208
+ if (row?.deleted_) return [];
65209
+ if (!isChild) return [{ row }];
65210
+ return (Array.isArray(row._2DTABLE_) ? row._2DTABLE_ : []).flatMap(
65211
+ (child) => child?.deleted_ ? [] : [{ row: child, parentRow: row }]
65212
+ );
65213
+ }) : [];
65214
+ }
65215
+ function canClearDesignerDefaults(status) {
65216
+ if (status.dataStatus === "STASH") return false;
65217
+ if (status.instanceStatus) return status.instanceStatus === "UNFILLED";
65218
+ return !status.dataStatus || status.dataStatus === "UNFILLED";
65219
+ }
65220
+ class DesignerDefaultValues {
65221
+ values = {};
65222
+ applied = /* @__PURE__ */ new Map();
65223
+ appliedRows;
65224
+ add(subFieldKey, field, value) {
65225
+ if (value === void 0 || value === null || value === "") return;
65226
+ (this.values[subFieldKey || "gct_main"] ??= {})[field] = value;
65227
+ }
65228
+ key(row, subFieldKey, field) {
65229
+ return JSON.stringify([subFieldKey || "", subFieldKey ? row[FRONT_ROW_KEY] : "", field]);
65230
+ }
65231
+ captureRow(row, subFieldKey, overrides) {
65232
+ for (const [field, value] of Object.entries(this.values[subFieldKey || "gct_main"] ?? {})) {
65233
+ if (Object.is(row[field], value) && overrides?.[field] === void 0) {
65234
+ const key = this.key(row, subFieldKey, field);
65235
+ this.applied.set(key, value);
65236
+ this.appliedRows?.set(key, toRaw(row));
65237
+ }
65238
+ }
65239
+ row._2DTABLE_?.forEach(
65240
+ (child) => this.captureRow(child, subFieldKey, overrides)
65241
+ );
65242
+ }
65243
+ capture(state) {
65244
+ this.captureRow(state);
65245
+ for (const key of Object.keys(this.values)) {
65246
+ if (key === "gct_main") continue;
65247
+ state[key]?.forEach((row) => this.captureRow(row, key));
65248
+ }
65249
+ }
65250
+ /** 转换及合并结束后绑定真实运行时对象,替换成同 ID、同值的新行也不再算旧默认值。 */
65251
+ bindRuntimeRows(state) {
65252
+ const rows = /* @__PURE__ */ new Map();
65253
+ const bindRow = (row, subFieldKey) => {
65254
+ for (const field of Object.keys(this.values[subFieldKey || "gct_main"] ?? {})) {
65255
+ const key = this.key(row, subFieldKey, field);
65256
+ if (this.applied.has(key) && Object.is(this.applied.get(key), row[field])) {
65257
+ rows.set(key, toRaw(row));
65258
+ }
65259
+ }
65260
+ row._2DTABLE_?.forEach((child) => bindRow(child, subFieldKey));
65261
+ };
65262
+ bindRow(state);
65263
+ for (const key of Object.keys(this.values)) {
65264
+ if (key !== "gct_main") state[key]?.forEach((row) => bindRow(row, key));
65265
+ }
65266
+ this.appliedRows = rows;
65267
+ }
65268
+ has(row, subFieldKey, field) {
65269
+ const key = this.key(row, subFieldKey, field);
65270
+ return this.owns(row, subFieldKey, field) && Object.is(this.applied.get(key), row[field]);
65271
+ }
65272
+ owns(row, subFieldKey, field) {
65273
+ const key = this.key(row, subFieldKey, field);
65274
+ return this.applied.has(key) && (!this.appliedRows || this.appliedRows.get(key) === toRaw(row));
65275
+ }
65276
+ revoke(row, subFieldKey, field) {
65277
+ const key = this.key(row, subFieldKey, field);
65278
+ this.applied.delete(key);
65279
+ this.appliedRows?.delete(key);
65280
+ }
65281
+ /** 后续数据源显式提供同一个值也算覆盖,不能仅比较最终值是否相等。 */
65282
+ excludeOverrides(target, source, subFieldKey) {
65283
+ if (!source || typeof source !== "object") return;
65284
+ if (Array.isArray(target)) {
65285
+ const rows = Array.isArray(source) ? source : source.data;
65286
+ if (Array.isArray(rows)) {
65287
+ rows.forEach((row, index2) => {
65288
+ if (target[index2]) this.excludeOverrides(target[index2], row, subFieldKey);
65289
+ });
65290
+ }
65291
+ return;
65292
+ }
65293
+ for (const [field, value] of Object.entries(source)) {
65294
+ if (value === void 0) continue;
65295
+ this.revoke(target, subFieldKey, field);
65296
+ if (target[field] && typeof value === "object") {
65297
+ this.excludeOverrides(target[field], value, field === "_2DTABLE_" ? subFieldKey : field);
65298
+ }
65299
+ }
65300
+ }
65301
+ clear() {
65302
+ this.applied.clear();
65303
+ this.appliedRows?.clear();
65304
+ }
65305
+ }
65306
+ const STATUS_QUERY_OPTIONS = { errorMessageMode: "none", timeout: 8e3 };
65307
+ const REFERENCE_TYPES = /* @__PURE__ */ new Set([
65308
+ FIELD_TYPE.DEVICE,
65309
+ FIELD_TYPE.PRODUCT,
65310
+ FIELD_TYPE.MODEL_RELATION,
65311
+ FIELD_TYPE.E_SOP,
65312
+ FIELD_TYPE.SHOPFLOOR,
65313
+ FIELD_TYPE.WAREHOUSE,
65314
+ FIELD_TYPE.TARGET_WAREHOUSE,
65315
+ FIELD_TYPE.ROUTING_OPERATION,
65316
+ FIELD_TYPE.REF,
65317
+ FIELD_TYPE.REF_MULTI,
65318
+ FIELD_TYPE.RDO_REF,
65319
+ FIELD_TYPE.DEVICE_REF,
65320
+ FIELD_TYPE.DEVICE_REF_MULTI,
65321
+ FIELD_TYPE.NOT_GOOD_REASON,
65322
+ FIELD_TYPE.NOT_GOOD_GROUP,
65323
+ FIELD_TYPE.SCRAP_REASON,
65324
+ FIELD_TYPE.SCRAP_GROUP
65325
+ ]);
65326
+ function getInvalidDefaultReason(result, props) {
65327
+ const data = result?.data;
65328
+ if (!data || typeof data !== "object" || Array.isArray(data)) return;
65329
+ if (data.deleted_ === true) return "引用记录已删除(deleted_ = true)";
65330
+ if (data.operating_state_ === false) return "引用记录已停用(operating_state_ = false)";
65331
+ const isDevice = props.refModelKey === "em_device" || [props.fieldType, props.bizType].some(
65332
+ (type) => [FIELD_TYPE.DEVICE, FIELD_TYPE.DEVICE_REF, FIELD_TYPE.DEVICE_REF_MULTI].includes(type)
65333
+ );
65334
+ if (isDevice && typeof data.state_ === "string" && data.state_ !== "" && data.state_ !== DeviceStatus.IN_USE)
65335
+ return `设备不在使用中(state_ = ${data.state_})`;
65336
+ }
65337
+ class RuntimeDefaultValueValidation {
65338
+ constructor(record, info, defaults2) {
65339
+ this.record = record;
65340
+ this.info = info;
65341
+ this.defaults = defaults2;
65342
+ defaults2.bindRuntimeRows(record.formState.state);
65343
+ this.stops = [
65344
+ record.formState.subscribe((change) => {
65345
+ if (change.paths.includes("*")) defaults2.clear();
65346
+ for (const target of this.targets()) {
65347
+ if (!defaults2.has(target.row, target.props.subFieldKey, target.field) || change.paths.includes(record.formState.getFieldPath(target.row, target.field))) {
65348
+ defaults2.revoke(target.row, target.props.subFieldKey, target.field);
65349
+ }
65350
+ }
65351
+ this.schedule();
65352
+ }),
65353
+ watch(
65354
+ () => [
65355
+ info.renderModeType,
65356
+ info.annSwitchStatus,
65357
+ info.instanceStatus,
65358
+ info.dataStatus,
65359
+ info.formChangeStatus
65360
+ ],
65361
+ () => this.schedule()
65362
+ )
65363
+ ];
65364
+ }
65365
+ record;
65366
+ info;
65367
+ defaults;
65368
+ disposed = false;
65369
+ scheduled = false;
65370
+ /** 同一实例中,相同引用记录的查询结果可供不同 Sheet 和行复用。 */
65371
+ requests = /* @__PURE__ */ new Map();
65372
+ stops;
65373
+ targets() {
65374
+ return this.record.fields.allWidgets().flatMap(({ widget, referenceInfo }) => {
65375
+ const props = widget.props;
65376
+ const field = getRuntimeDataFieldId(props);
65377
+ if (!field || props.isFieldModel || this.defaults.values[props.subFieldKey || "gct_main"]?.[field] === void 0 || ![props.fieldType, props.bizType].some((type) => REFERENCE_TYPES.has(type)))
65378
+ return [];
65379
+ return listRuntimeFieldRows(
65380
+ this.record,
65381
+ props.subFieldKey,
65382
+ referenceInfo?.scopeFieldId ?? field
65383
+ ).filter(({ row }) => this.defaults.owns(row, props.subFieldKey, field)).map(({ row }) => {
65384
+ const rowKey = props.subFieldKey ? getRowId(row) : void 0;
65385
+ const attach = (reference) => reference ? {
65386
+ ...reference,
65387
+ subtableFieldId: props.subFieldKey,
65388
+ rowKey,
65389
+ parent: attach(reference.parent)
65390
+ } : void 0;
65391
+ return {
65392
+ props,
65393
+ field,
65394
+ row,
65395
+ rowKey,
65396
+ attach: attach(referenceInfo),
65397
+ isRdo: widget.component === ComponentTypeEnum.RdoSelect || [props.fieldType, props.bizType].some(
65398
+ (type) => [FIELD_TYPE.PRODUCT, FIELD_TYPE.E_SOP, FIELD_TYPE.RDO_REF].includes(type)
65399
+ )
65400
+ };
65401
+ });
65402
+ });
65403
+ }
65404
+ async queryDefault(props, id, isRdo) {
65405
+ const modelKey = props.refModelKey;
65406
+ if (!modelKey || !id) return;
65407
+ const bsKey = isRdo ? "biz_get_rdo_data_by_id" : "biz_get_ndo_data_by_id";
65408
+ const key = JSON.stringify([bsKey, modelKey, id]);
65409
+ let task = this.requests.get(key);
65410
+ if (!task) {
65411
+ task = api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey(
65412
+ { modelCategory: "entity", modelKey: "em_custom_field_model", bsKey },
65413
+ { id, modelKey },
65414
+ STATUS_QUERY_OPTIONS
65415
+ ).catch(() => void 0);
65416
+ this.requests.set(key, task);
65417
+ }
65418
+ return task;
65419
+ }
65420
+ /** 后台检查不加入页面准备、草稿或提交的等待链路。 */
65421
+ requestCheck() {
65422
+ this.schedule();
65423
+ }
65424
+ schedule() {
65425
+ if (this.disposed || this.scheduled) return;
65426
+ this.scheduled = true;
65427
+ queueMicrotask(() => {
65428
+ this.scheduled = false;
65429
+ void this.initialize().catch((error) => console.error("默认值状态检查失败", error));
65430
+ });
65431
+ }
65432
+ isEnabled() {
65433
+ return !this.disposed && canClearDesignerDefaults(this.info) && !this.info.formChangeStatus && this.info.renderModeType === RenderModeEnum.FormMode && !this.info.annSwitchStatus && !this.info.renderPurpose && this.info.platformType !== PlatformEnum.INTEGRATION_PAAS_DP;
65434
+ }
65435
+ async initialize() {
65436
+ if (this.disposed) return;
65437
+ const targets = this.isEnabled() ? this.targets().filter(
65438
+ (target) => this.defaults.has(target.row, target.props.subFieldKey, target.field) && isAttachFieldActive(target.attach, this.record.formState.state)
65439
+ ) : [];
65440
+ await Promise.all(
65441
+ targets.map(async (target) => {
65442
+ const previous = target.row[target.field];
65443
+ const value = String(previous);
65444
+ const ids = [FIELD_TYPE.REF_MULTI, FIELD_TYPE.DEVICE_REF_MULTI].includes(
65445
+ target.props.fieldType
65446
+ ) ? value.split(",").filter(Boolean) : [value];
65447
+ const results = await Promise.all(
65448
+ ids.map((id) => this.queryDefault(target.props, id, target.isRdo))
65449
+ );
65450
+ const invalidReferences = results.flatMap((result, index2) => {
65451
+ const reason = getInvalidDefaultReason(result, target.props);
65452
+ return reason ? [{ id: ids[index2], reason }] : [];
65453
+ });
65454
+ if (!invalidReferences.length) return;
65455
+ const currentRow = target.props.subFieldKey ? findRuntimeTableRow(
65456
+ this.record.formState.state[target.props.subFieldKey],
65457
+ target.rowKey
65458
+ ) : this.record.formState.state;
65459
+ if (!this.isEnabled() || !currentRow || toRaw(currentRow) !== toRaw(target.row) || !Object.is(currentRow[target.field], previous) || !this.defaults.has(currentRow, target.props.subFieldKey, target.field) || this.record.formState.isUserModified(
65460
+ this.record.formState.getFieldPath(currentRow, target.field)
65461
+ ) || !isAttachFieldActive(target.attach, this.record.formState.state))
65462
+ return;
65463
+ this.record.formState.setObjectField(currentRow, target.field, null, "system");
65464
+ console.info(
65465
+ `[默认值清空] ${[...new Set(invalidReferences.map(({ reason }) => reason))].join(";")}`,
65466
+ {
65467
+ uniqueId: this.record.context.uniqueId,
65468
+ instanceStatus: this.info.instanceStatus,
65469
+ dataStatus: this.info.dataStatus,
65470
+ modelKey: target.props.modelKey ?? this.info.modelKey,
65471
+ refModelKey: target.props.refModelKey,
65472
+ field: target.field,
65473
+ fieldName: target.props.newSpecificConfig?.newFieldName,
65474
+ subFieldKey: target.props.subFieldKey,
65475
+ rowKey: target.rowKey,
65476
+ previousValue: previous,
65477
+ invalidReferences
65478
+ }
65479
+ );
65480
+ })
65481
+ );
65482
+ }
65483
+ dispose() {
65484
+ this.disposed = true;
65485
+ this.stops.forEach((stop) => stop());
65486
+ this.requests.clear();
65487
+ }
65488
+ }
65075
65489
  const getApi$1 = api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey;
65076
65490
  const postApi = api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey;
65077
65491
  async function materialCheck(params) {
@@ -68199,27 +68613,27 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
68199
68613
  case "revo-grid":
68200
68614
  return import(
68201
68615
  /* webpackMode: "lazy" */
68202
- "./revo-grid.entry-CJ1rhBKH.js"
68616
+ "./revo-grid.entry-Bj-4xHie.js"
68203
68617
  ).then(processMod, consoleError);
68204
68618
  case "revogr-filter-panel":
68205
68619
  return import(
68206
68620
  /* webpackMode: "lazy" */
68207
- "./revogr-filter-panel.entry-jp8iD-xn.js"
68621
+ "./revogr-filter-panel.entry-lcMbXUNb.js"
68208
68622
  ).then(processMod, consoleError);
68209
68623
  case "revogr-attribution_7":
68210
68624
  return import(
68211
68625
  /* webpackMode: "lazy" */
68212
- "./revogr-attribution_7.entry-Ba9MJ5p9.js"
68626
+ "./revogr-attribution_7.entry-NvaozwYj.js"
68213
68627
  ).then(processMod, consoleError);
68214
68628
  case "revogr-clipboard_3":
68215
68629
  return import(
68216
68630
  /* webpackMode: "lazy" */
68217
- "./revogr-clipboard_3.entry--neB-vq8.js"
68631
+ "./revogr-clipboard_3.entry-CkRbECsx.js"
68218
68632
  ).then(processMod, consoleError);
68219
68633
  case "revogr-data_4":
68220
68634
  return import(
68221
68635
  /* webpackMode: "lazy" */
68222
- "./revogr-data_4.entry-BcmetTvO.js"
68636
+ "./revogr-data_4.entry-Dbbd8Mpz.js"
68223
68637
  ).then(processMod, consoleError);
68224
68638
  }
68225
68639
  }
@@ -78455,7 +78869,7 @@ function groupFixedTableRows(rows, options) {
78455
78869
  return result;
78456
78870
  }
78457
78871
  export {
78458
- FieldDefaultValueTypeEnum as $,
78872
+ UniqueConstraintType as $,
78459
78873
  estraverse as A,
78460
78874
  BwipCodeType as B,
78461
78875
  ComponentTypeEnum as C,
@@ -78468,320 +78882,331 @@ export {
78468
78882
  isDynamicCellSubTable as J,
78469
78883
  ParamModelTypeEnum as K,
78470
78884
  LineType as L,
78471
- FieldTypeToJs as M,
78472
- CreateType as N,
78885
+ getBusinessFieldKey as M,
78886
+ FieldTypeToJs as N,
78473
78887
  Orientation as O,
78474
78888
  PaginationFormat as P,
78475
- uuid2$1 as Q,
78476
- useModal as R,
78889
+ CreateType as Q,
78890
+ uuid2$1 as R,
78477
78891
  SUB_TABLE_PANEL_TYPE_NAME as S,
78478
78892
  TRACE_FIELD_TYPES as T,
78479
- requireEstraverse as U,
78480
- commonjsGlobal as V,
78481
- getDefaultExportFromCjs as W,
78482
- PaperWidgeValueType as X,
78483
- onlineFormMasterModelTypeEnum as Y,
78484
- WAREHOUSE_FIELD_TYPES as Z,
78485
- UniqueConstraintType as _,
78893
+ useModal as U,
78894
+ requireEstraverse as V,
78895
+ commonjsGlobal as W,
78896
+ getDefaultExportFromCjs as X,
78897
+ PaperWidgeValueType as Y,
78898
+ onlineFormMasterModelTypeEnum as Z,
78899
+ WAREHOUSE_FIELD_TYPES as _,
78486
78900
  getProfile as a,
78487
- withRequestCache as a$,
78488
- FormTypeEnum as a0,
78489
- mitt as a1,
78490
- isDateObjectField as a2,
78491
- PlatformEnum as a3,
78492
- LabelPosition as a4,
78493
- BooleanShowMode as a5,
78494
- SignatureImageDirectionEnum as a6,
78495
- FallbackSignTypeEnum as a7,
78496
- SignatureNumberTypeEnum as a8,
78497
- SignatureTimeTypeEnum as a9,
78498
- RangeCompareOp as aA,
78499
- getExclusiveBusinessTypeTokens as aB,
78500
- getSubTableTypeByRefModelType as aC,
78501
- findFieldMain as aD,
78502
- DecimalDisplayMode as aE,
78503
- ImageDisplayModeEnum as aF,
78504
- FormDesignEnum as aG,
78505
- BASIC_FIELD_TYPES as aH,
78506
- buildDeviceFilterQuery as aI,
78507
- refUtils as aJ,
78508
- getAllTableProfiles as aK,
78509
- getAugmentedNamespace as aL,
78510
- transformUtils as aM,
78511
- EmptySymbol as aN,
78512
- ASSIGNMENTSTRATEGY_ENUM as aO,
78513
- Dependency_ENUM as aP,
78514
- EntityModelCategoryEnum as aQ,
78515
- resolveLotDisplayLabel as aR,
78516
- CheckDsTypeEnum as aS,
78517
- DeviceLink as aT,
78518
- DeviceParamsTypeTitle as aU,
78519
- AITooltips as aV,
78520
- DenoiseMethodOptions as aW,
78521
- BinarizeMethodOptions as aX,
78522
- JoinModelTypeEum as aY,
78523
- sqlUtils as aZ,
78524
- DateFormat as a_,
78525
- SignShowTypeEnum as aa,
78526
- SignatureTypeEnum as ab,
78527
- useNamespace as ac,
78528
- _export_sfc as ad,
78529
- normalizeFieldType as ae,
78530
- PaperSizeMap as af,
78531
- getFieldMain as ag,
78532
- buildUUID as ah,
78533
- FieldIconMap as ai,
78534
- BigNumber as aj,
78535
- FieldSysVarDefaultValueEnum as ak,
78536
- CellWidgetViewState as al,
78537
- DiagonalDirection as am,
78538
- WidgetImageSizeMode as an,
78539
- LineDirection as ao,
78540
- TimeDiffFormat as ap,
78541
- DiagonalVertex as aq,
78542
- resolveDiagonalVertex as ar,
78543
- getThemeColorByTableType as as,
78544
- ViewTypeEnum as at,
78545
- isDynamicSubTablePanelType as au,
78546
- isFixedSubTablePanelType as av,
78547
- ExpressionModeEnum as aw,
78548
- ReturnTypeEnum as ax,
78549
- ExpressionTabEnum as ay,
78550
- RangeValidateMode as az,
78901
+ DateFormat as a$,
78902
+ FieldDefaultValueTypeEnum as a0,
78903
+ FormTypeEnum as a1,
78904
+ mitt as a2,
78905
+ isDateObjectField as a3,
78906
+ PlatformEnum as a4,
78907
+ LabelPosition as a5,
78908
+ BooleanShowMode as a6,
78909
+ SignatureImageDirectionEnum as a7,
78910
+ FallbackSignTypeEnum as a8,
78911
+ SignatureNumberTypeEnum as a9,
78912
+ RangeValidateMode as aA,
78913
+ RangeCompareOp as aB,
78914
+ getExclusiveBusinessTypeTokens as aC,
78915
+ getSubTableTypeByRefModelType as aD,
78916
+ findFieldMain as aE,
78917
+ DecimalDisplayMode as aF,
78918
+ ImageDisplayModeEnum as aG,
78919
+ FormDesignEnum as aH,
78920
+ BASIC_FIELD_TYPES as aI,
78921
+ buildDeviceFilterQuery as aJ,
78922
+ refUtils as aK,
78923
+ getAllTableProfiles as aL,
78924
+ getAugmentedNamespace as aM,
78925
+ transformUtils as aN,
78926
+ EmptySymbol as aO,
78927
+ ASSIGNMENTSTRATEGY_ENUM as aP,
78928
+ Dependency_ENUM as aQ,
78929
+ EntityModelCategoryEnum as aR,
78930
+ resolveLotDisplayLabel as aS,
78931
+ CheckDsTypeEnum as aT,
78932
+ DeviceLink as aU,
78933
+ DeviceParamsTypeTitle as aV,
78934
+ AITooltips as aW,
78935
+ DenoiseMethodOptions as aX,
78936
+ BinarizeMethodOptions as aY,
78937
+ JoinModelTypeEum as aZ,
78938
+ sqlUtils as a_,
78939
+ SignatureTimeTypeEnum as aa,
78940
+ SignShowTypeEnum as ab,
78941
+ SignatureTypeEnum as ac,
78942
+ useNamespace as ad,
78943
+ _export_sfc as ae,
78944
+ normalizeFieldType as af,
78945
+ PaperSizeMap as ag,
78946
+ getFieldMain as ah,
78947
+ buildUUID as ai,
78948
+ FieldIconMap as aj,
78949
+ BigNumber as ak,
78950
+ FieldSysVarDefaultValueEnum as al,
78951
+ CellWidgetViewState as am,
78952
+ DiagonalDirection as an,
78953
+ WidgetImageSizeMode as ao,
78954
+ LineDirection as ap,
78955
+ TimeDiffFormat as aq,
78956
+ DiagonalVertex as ar,
78957
+ resolveDiagonalVertex as as,
78958
+ getThemeColorByTableType as at,
78959
+ ViewTypeEnum as au,
78960
+ isDynamicSubTablePanelType as av,
78961
+ isFixedSubTablePanelType as aw,
78962
+ ExpressionModeEnum as ax,
78963
+ ReturnTypeEnum as ay,
78964
+ ExpressionTabEnum as az,
78551
78965
  isBusinessSubTableProfile as b,
78552
- calcFillData as b$,
78553
- LOT_CONTAINER_ROLE as b0,
78554
- buildLotSnListQuery as b1,
78555
- renderUtils as b2,
78556
- resolveLotRecordByValue as b3,
78557
- materialCheck as b4,
78558
- getLotLockedReason as b5,
78559
- validateReinspectionDate as b6,
78560
- buildMaterialLotListQuery as b7,
78561
- ProductionIdentificationTypeEnum as b8,
78562
- BindCmpStyleEnum as b9,
78563
- normalizeToArray as bA,
78564
- safeParseArray as bB,
78565
- BpmnNodeTypeEnum as bC,
78566
- mergeByMultiKey as bD,
78567
- evaluateInspectionDecisionRule as bE,
78568
- useNocodeEmitter as bF,
78569
- commonUtils as bG,
78570
- BpmnSignatureTypeEnum as bH,
78571
- ButtonTypeEnum as bI,
78572
- CHECK_TABLE_MEDPRO_PROTOCOL_KEY as bJ,
78573
- CodeRunner as bK,
78574
- Config_Fields as bL,
78575
- ControlStatusEnum as bM,
78576
- DEVICE_SEARCH_API as bN,
78577
- DeviceStatus as bO,
78578
- EBR_PROVIDE_ENUM as bP,
78579
- EFieldBizTypeEnum as bQ,
78580
- MAX_FRONT_ROW_KEY_LENGTH as bR,
78581
- MobileFillTypeEnum as bS,
78582
- OfficeTypeEnum as bT,
78583
- PosEnum as bU,
78584
- RUNTIME_COLUMN_ROW_KEY as bV,
78585
- SummaryApproveHisTypeEnum as bW,
78586
- applyCheckDsDataToRuntime as bX,
78587
- applyMedProCheckDsDataToRuntime as bY,
78588
- bindRuntimeTableColumns as bZ,
78589
- buildDeviceBaseQuery as b_,
78590
- getParseRuleInfo as ba,
78591
- getParseRuleValue as bb,
78592
- normalizeRefLoaderResult as bc,
78593
- STOCKTAKE_DIMENSION as bd,
78594
- F$8 as be,
78595
- resolveStocktakeSelectApi as bf,
78596
- normalizeProductionContainerOptions as bg,
78597
- buildProductionLotListQuery as bh,
78598
- buildInspectionLotListQuery as bi,
78599
- DEVICE_GROUP_QUERY_KEY as bj,
78600
- getRowId as bk,
78601
- findRuntimeTableRow as bl,
78602
- RenderModeEnum as bm,
78603
- findRuntimeParentRow as bn,
78604
- useOnlineFormTransformField2Component as bo,
78605
- FormulaRuleFieldKeyEnum as bp,
78606
- formulaRuleFieldDict as bq,
78607
- resolveDesignPanelFeatures as br,
78608
- BIZ_TABLE_CONFIG_SEED_TYPES as bs,
78609
- STOCKTAKE_DIMENSION_OPTIONS as bt,
78610
- isRepeatingSubTablePanelType as bu,
78611
- uuid2 as bv,
78612
- fetchHistoryConsume as bw,
78613
- isBomGranted as bx,
78614
- parseFrontConfig as by,
78615
- baseDataUtils as bz,
78966
+ OfficeTypeEnum as b$,
78967
+ withRequestCache as b0,
78968
+ LOT_CONTAINER_ROLE as b1,
78969
+ buildLotSnListQuery as b2,
78970
+ renderUtils as b3,
78971
+ resolveLotRecordByValue as b4,
78972
+ materialCheck as b5,
78973
+ getLotLockedReason as b6,
78974
+ validateReinspectionDate as b7,
78975
+ buildMaterialLotListQuery as b8,
78976
+ ProductionIdentificationTypeEnum as b9,
78977
+ buildRuntimeFieldPath as bA,
78978
+ isAttachFieldActive as bB,
78979
+ fetchHistoryConsume as bC,
78980
+ isBomGranted as bD,
78981
+ parseFrontConfig as bE,
78982
+ DesignerDefaultValues as bF,
78983
+ baseDataUtils as bG,
78984
+ normalizeToArray as bH,
78985
+ safeParseArray as bI,
78986
+ BpmnNodeTypeEnum as bJ,
78987
+ mergeByMultiKey as bK,
78988
+ evaluateInspectionDecisionRule as bL,
78989
+ RuntimeDefaultValueValidation as bM,
78990
+ useNocodeEmitter as bN,
78991
+ commonUtils as bO,
78992
+ BpmnSignatureTypeEnum as bP,
78993
+ ButtonTypeEnum as bQ,
78994
+ CHECK_TABLE_MEDPRO_PROTOCOL_KEY as bR,
78995
+ CodeRunner as bS,
78996
+ Config_Fields as bT,
78997
+ ControlStatusEnum as bU,
78998
+ DEVICE_SEARCH_API as bV,
78999
+ DeviceStatus as bW,
79000
+ EBR_PROVIDE_ENUM as bX,
79001
+ EFieldBizTypeEnum as bY,
79002
+ MAX_FRONT_ROW_KEY_LENGTH as bZ,
79003
+ MobileFillTypeEnum as b_,
79004
+ BindCmpStyleEnum as ba,
79005
+ getParseRuleInfo as bb,
79006
+ getParseRuleValue as bc,
79007
+ normalizeRefLoaderResult as bd,
79008
+ STOCKTAKE_DIMENSION as be,
79009
+ F$8 as bf,
79010
+ resolveStocktakeSelectApi as bg,
79011
+ normalizeProductionContainerOptions as bh,
79012
+ buildProductionLotListQuery as bi,
79013
+ buildInspectionLotListQuery as bj,
79014
+ DEVICE_GROUP_QUERY_KEY as bk,
79015
+ parseRuntimeFieldPath as bl,
79016
+ getRowId as bm,
79017
+ findRuntimeTableRow as bn,
79018
+ RenderModeEnum as bo,
79019
+ findRuntimeParentRow as bp,
79020
+ useOnlineFormTransformField2Component as bq,
79021
+ FormulaRuleFieldKeyEnum as br,
79022
+ formulaRuleFieldDict as bs,
79023
+ resolveDesignPanelFeatures as bt,
79024
+ BIZ_TABLE_CONFIG_SEED_TYPES as bu,
79025
+ STOCKTAKE_DIMENSION_OPTIONS as bv,
79026
+ isRepeatingSubTablePanelType as bw,
79027
+ uuid2 as bx,
79028
+ getRuntimeDataFieldId as by,
79029
+ listRuntimeFieldRows as bz,
78616
79030
  getProfileByTableType as c,
78617
- F as c$,
78618
- calcUtils as c0,
78619
- decodeTableCellRowKey as c1,
78620
- encodeTableCellRowKey as c2,
78621
- ensureFrontRowKey as c3,
78622
- ensureTableRowKeys as c4,
78623
- extractKeywordFromQueryData as c5,
78624
- fetchCheckDsDataForTable as c6,
78625
- fetchCustomCheckDsData as c7,
78626
- fetchMedProCheckDsData as c8,
78627
- findRuntimeTableCell as c9,
78628
- EntityModelTypeEnum as cA,
78629
- RecordNoGenerateEnum as cB,
78630
- TagTypeEnum as cC,
78631
- F$3 as cD,
78632
- FILL_FROM_TARGET_PRODUCT_OPTION as cE,
78633
- F$6 as cF,
78634
- SCAN_ROW_CONTENT_FIELDS as cG,
78635
- F$7 as cH,
78636
- runRowHandler as cI,
78637
- F$a as cJ,
78638
- F$9 as cK,
78639
- FILL_FROM_SOURCE_PRODUCT_OPTION as cL,
78640
- FILL_FROM_TARGET_MATERIAL_NO_OPTION as cM,
78641
- FILL_FROM_INVENTORY_OPTION$2 as cN,
78642
- FILL_FROM_PART_OPTION as cO,
78643
- FILL_FROM_INVENTORY_OPTION$3 as cP,
78644
- TABLE_TYPE$b as cQ,
78645
- FILL_FROM_INVENTORY_OPTION$1 as cR,
78646
- INVENTORY_BASE_FIELDS as cS,
78647
- resolveGroupByWarehouse as cT,
78648
- AUTO_LOAD_READONLY_SELECT_FIELDS as cU,
78649
- buildFillFromInventoryOption as cV,
78650
- resolveStocktakeInventoryApi as cW,
78651
- F$5 as cX,
78652
- FILL_FROM_INVENTORY_OPTION as cY,
78653
- LOCKED_INPUT_FIELDS as cZ,
78654
- composeProductionLotListQuery as c_,
78655
- getCheckTableSnapshotKey as ca,
78656
- getParseRuleConfig as cb,
78657
- getReinspectionDate as cc,
78658
- getRenderedRuntimeTableCell as cd,
78659
- handleOldConfig as ce,
78660
- hasAnyCheckTableSnapshot as cf,
78661
- hasByTableCheckTableSnapshot as cg,
78662
- hasSharedCheckTableSnapshot as ch,
78663
- isMedProSuite as ci,
78664
- isTableRowKeyMatch as cj,
78665
- jsonSchemaUtils as ck,
78666
- judgeUnique as cl,
78667
- migrateDiagonalDirectionToVertex as cm,
78668
- requestMedProCheckDsData as cn,
78669
- requestNonMedProCheckDsData as co,
78670
- stockCheck as cp,
78671
- useOnlineFormActionButton as cq,
78672
- getFieldPlaceholder as cr,
78673
- FRONT_ROW_KEY as cs,
78674
- resetTableRowIdentity as ct,
78675
- q as cu,
78676
- QUICK_FILL_ALLOWED_FIELDS as cv,
78677
- groupFixedTableRows as cw,
78678
- processQuickFillRows as cx,
78679
- getIsGroupEmpty as cy,
78680
- CardControlEnum as cz,
79031
+ TABLE_TYPE$b as c$,
79032
+ PosEnum as c0,
79033
+ RUNTIME_COLUMN_ROW_KEY as c1,
79034
+ SummaryApproveHisTypeEnum as c2,
79035
+ applyCheckDsDataToRuntime as c3,
79036
+ applyMedProCheckDsDataToRuntime as c4,
79037
+ bindRuntimeTableColumns as c5,
79038
+ buildDeviceBaseQuery as c6,
79039
+ calcFillData as c7,
79040
+ calcUtils as c8,
79041
+ decodeTableCellRowKey as c9,
79042
+ getFieldPlaceholder as cA,
79043
+ isReferenceOptionActive as cB,
79044
+ FRONT_ROW_KEY as cC,
79045
+ getCurrentFormData as cD,
79046
+ resetTableRowIdentity as cE,
79047
+ q as cF,
79048
+ QUICK_FILL_ALLOWED_FIELDS as cG,
79049
+ groupFixedTableRows as cH,
79050
+ processQuickFillRows as cI,
79051
+ getIsGroupEmpty as cJ,
79052
+ CardControlEnum as cK,
79053
+ EntityModelTypeEnum as cL,
79054
+ RecordNoGenerateEnum as cM,
79055
+ TagTypeEnum as cN,
79056
+ F$3 as cO,
79057
+ FILL_FROM_TARGET_PRODUCT_OPTION as cP,
79058
+ F$6 as cQ,
79059
+ SCAN_ROW_CONTENT_FIELDS as cR,
79060
+ F$7 as cS,
79061
+ runRowHandler as cT,
79062
+ F$a as cU,
79063
+ F$9 as cV,
79064
+ FILL_FROM_SOURCE_PRODUCT_OPTION as cW,
79065
+ FILL_FROM_TARGET_MATERIAL_NO_OPTION as cX,
79066
+ FILL_FROM_INVENTORY_OPTION$2 as cY,
79067
+ FILL_FROM_PART_OPTION as cZ,
79068
+ FILL_FROM_INVENTORY_OPTION$3 as c_,
79069
+ encodeTableCellRowKey as ca,
79070
+ ensureFrontRowKey as cb,
79071
+ ensureTableRowKeys as cc,
79072
+ extractKeywordFromQueryData as cd,
79073
+ fetchCheckDsDataForTable as ce,
79074
+ fetchCustomCheckDsData as cf,
79075
+ fetchMedProCheckDsData as cg,
79076
+ findRuntimeTableCell as ch,
79077
+ getCheckTableSnapshotKey as ci,
79078
+ getParseRuleConfig as cj,
79079
+ getReinspectionDate as ck,
79080
+ getRenderedRuntimeTableCell as cl,
79081
+ handleOldConfig as cm,
79082
+ hasAnyCheckTableSnapshot as cn,
79083
+ hasByTableCheckTableSnapshot as co,
79084
+ hasSharedCheckTableSnapshot as cp,
79085
+ isMedProSuite as cq,
79086
+ isTableRowKeyMatch as cr,
79087
+ jsonSchemaUtils as cs,
79088
+ judgeUnique as ct,
79089
+ migrateDiagonalDirectionToVertex as cu,
79090
+ requestMedProCheckDsData as cv,
79091
+ requestNonMedProCheckDsData as cw,
79092
+ splitRuntimeDataPath as cx,
79093
+ stockCheck as cy,
79094
+ useOnlineFormActionButton as cz,
78681
79095
  getBusinessProfileByRefModelType as d,
78682
- getCellEditor as d$,
78683
- isProductManuallyEditable as d0,
78684
- applyFillFromMfgOrderOption as d1,
78685
- applyFillFromOption as d2,
78686
- applyFillFromProductOption as d3,
78687
- mergeQueryFilters as d4,
78688
- composeMaterialLotListQuery as d5,
78689
- MATERIAL_CONTAINER_ID as d6,
78690
- F$c as d7,
78691
- PRODUCT_QUICK_SEARCH_FIELDS as d8,
78692
- PRODUCT_QUICK_SEARCH_EXP as d9,
78693
- reduce as dA,
78694
- columnTypes as dB,
78695
- debounce$1 as dC,
78696
- RESIZE_INTERVAL as dD,
78697
- DimensionStore as dE,
78698
- gatherTrimmedItems as dF,
78699
- getColumnSizes as dG,
78700
- getItemByIndex as dH,
78701
- DataStore as dI,
78702
- getSourceItem as dJ,
78703
- getSourceItemVirtualIndexByProp as dK,
78704
- getColumnType as dL,
78705
- setSourceByPhysicalIndex as dM,
78706
- setSourceByVirtualIndex as dN,
78707
- SelectionStore as dO,
78708
- cropCellToMax as dP,
78709
- nextCell as dQ,
78710
- isRowType as dR,
78711
- ViewportStore as dS,
78712
- AndOrButton as dT,
78713
- ReorderButton as dU,
78714
- TrashButton as dV,
78715
- isFilterBtn as dW,
78716
- ColumnService as dX,
78717
- MOBILE_CLASS as dY,
78718
- SELECTION_BORDER_CLASS as dZ,
78719
- getCellData as d_,
78720
- isProductManuallyEditable$1 as da,
78721
- applyFillFromMaterialNoOption as db,
78722
- applyFillFromProductOption$1 as dc,
78723
- F$b as dd,
78724
- FILL_FROM_INVENTORY_OPTION$4 as de,
78725
- registerInstance as df,
78726
- createEvent as dg,
78727
- getColumnByProp as dh,
78728
- timeout as di,
78729
- getVisibleSourceItem as dj,
78730
- getColumns as dk,
78731
- rowTypes as dl,
78732
- GroupingRowPlugin as dm,
78733
- StretchColumn as dn,
78734
- isStretchPlugin as dp,
78735
- AutoSizeColumnPlugin as dq,
78736
- FilterPlugin as dr,
78737
- ExportFilePlugin as ds,
78738
- SortingPlugin as dt,
78739
- ColumnMovePlugin as du,
78740
- ThemeService as dv,
78741
- h as dw,
78742
- Host as dx,
78743
- getElement as dy,
78744
- BasePlugin as dz,
79096
+ nextCell as d$,
79097
+ FILL_FROM_INVENTORY_OPTION$1 as d0,
79098
+ INVENTORY_BASE_FIELDS as d1,
79099
+ resolveGroupByWarehouse as d2,
79100
+ AUTO_LOAD_READONLY_SELECT_FIELDS as d3,
79101
+ buildFillFromInventoryOption as d4,
79102
+ resolveStocktakeInventoryApi as d5,
79103
+ F$5 as d6,
79104
+ FILL_FROM_INVENTORY_OPTION as d7,
79105
+ LOCKED_INPUT_FIELDS as d8,
79106
+ composeProductionLotListQuery as d9,
79107
+ isStretchPlugin as dA,
79108
+ AutoSizeColumnPlugin as dB,
79109
+ FilterPlugin as dC,
79110
+ ExportFilePlugin as dD,
79111
+ SortingPlugin as dE,
79112
+ ColumnMovePlugin as dF,
79113
+ ThemeService as dG,
79114
+ h as dH,
79115
+ Host as dI,
79116
+ getElement as dJ,
79117
+ BasePlugin as dK,
79118
+ reduce as dL,
79119
+ columnTypes as dM,
79120
+ debounce$1 as dN,
79121
+ RESIZE_INTERVAL as dO,
79122
+ DimensionStore as dP,
79123
+ gatherTrimmedItems as dQ,
79124
+ getColumnSizes as dR,
79125
+ getItemByIndex as dS,
79126
+ DataStore as dT,
79127
+ getSourceItem as dU,
79128
+ getSourceItemVirtualIndexByProp as dV,
79129
+ getColumnType as dW,
79130
+ setSourceByPhysicalIndex as dX,
79131
+ setSourceByVirtualIndex as dY,
79132
+ SelectionStore as dZ,
79133
+ cropCellToMax as d_,
79134
+ F as da,
79135
+ isProductManuallyEditable as db,
79136
+ applyFillFromMfgOrderOption as dc,
79137
+ applyFillFromOption as dd,
79138
+ applyFillFromProductOption as de,
79139
+ mergeQueryFilters as df,
79140
+ composeMaterialLotListQuery as dg,
79141
+ MATERIAL_CONTAINER_ID as dh,
79142
+ F$c as di,
79143
+ PRODUCT_QUICK_SEARCH_FIELDS as dj,
79144
+ PRODUCT_QUICK_SEARCH_EXP as dk,
79145
+ isProductManuallyEditable$1 as dl,
79146
+ applyFillFromMaterialNoOption as dm,
79147
+ applyFillFromProductOption$1 as dn,
79148
+ F$b as dp,
79149
+ FILL_FROM_INVENTORY_OPTION$4 as dq,
79150
+ registerInstance as dr,
79151
+ createEvent as ds,
79152
+ getColumnByProp as dt,
79153
+ timeout as du,
79154
+ getVisibleSourceItem as dv,
79155
+ getColumns as dw,
79156
+ rowTypes as dx,
79157
+ GroupingRowPlugin as dy,
79158
+ StretchColumn as dz,
78745
79159
  expandAutofillTemplates as e,
78746
- getRange as e0,
78747
- isRangeSingleCell as e1,
78748
- codesLetter as e2,
78749
- calculateRowHeaderSize as e3,
78750
- ROW_HEADER_TYPE as e4,
78751
- getScrollbarSize as e5,
78752
- FOCUS_CLASS as e6,
78753
- CELL_HANDLER_CLASS as e7,
78754
- TMP_SELECTION_BG_CLASS as e8,
78755
- getItemByPosition as e9,
78756
- FilterButton as eA,
78757
- HeaderCellRenderer as eB,
78758
- HEADER_CLASS as eC,
78759
- EDIT_INPUT_WR as ea,
78760
- keyValues as eb,
78761
- isObject as ec,
78762
- DRAGG_TEXT as ed,
78763
- PSEUDO_GROUP_ITEM as ee,
78764
- GROUP_EXPANDED as ef,
78765
- GROUP_DEPTH as eg,
78766
- GROUP_EXPAND_BTN as eh,
78767
- DATA_ROW as ei,
78768
- isGroupingColumn as ej,
78769
- GROUP_COLUMN_PROP as ek,
78770
- getCellRaw as el,
78771
- DATA_COL as em,
78772
- CELL_CLASS as en,
78773
- Build as eo,
78774
- isRowDragService as ep,
78775
- DRAG_ICON_CLASS as eq,
78776
- DRAGGABLE_CLASS as er,
78777
- getCellDataParsed as es,
78778
- GROUP_EXPAND_EVENT as et,
78779
- isGrouping as eu,
78780
- HEADER_ROW_CLASS as ev,
78781
- HEADER_ACTUAL_ROW_CLASS as ew,
78782
- ROW_FOCUSED_CLASS as ex,
78783
- HEADER_SORTABLE_CLASS as ey,
78784
- MIN_COL_SIZE as ez,
79160
+ isRowType as e0,
79161
+ ViewportStore as e1,
79162
+ AndOrButton as e2,
79163
+ ReorderButton as e3,
79164
+ TrashButton as e4,
79165
+ isFilterBtn as e5,
79166
+ ColumnService as e6,
79167
+ MOBILE_CLASS as e7,
79168
+ SELECTION_BORDER_CLASS as e8,
79169
+ getCellData as e9,
79170
+ isRowDragService as eA,
79171
+ DRAG_ICON_CLASS as eB,
79172
+ DRAGGABLE_CLASS as eC,
79173
+ getCellDataParsed as eD,
79174
+ GROUP_EXPAND_EVENT as eE,
79175
+ isGrouping as eF,
79176
+ HEADER_ROW_CLASS as eG,
79177
+ HEADER_ACTUAL_ROW_CLASS as eH,
79178
+ ROW_FOCUSED_CLASS as eI,
79179
+ HEADER_SORTABLE_CLASS as eJ,
79180
+ MIN_COL_SIZE as eK,
79181
+ FilterButton as eL,
79182
+ HeaderCellRenderer as eM,
79183
+ HEADER_CLASS as eN,
79184
+ getCellEditor as ea,
79185
+ getRange as eb,
79186
+ isRangeSingleCell as ec,
79187
+ codesLetter as ed,
79188
+ calculateRowHeaderSize as ee,
79189
+ ROW_HEADER_TYPE as ef,
79190
+ getScrollbarSize as eg,
79191
+ FOCUS_CLASS as eh,
79192
+ CELL_HANDLER_CLASS as ei,
79193
+ TMP_SELECTION_BG_CLASS as ej,
79194
+ getItemByPosition as ek,
79195
+ EDIT_INPUT_WR as el,
79196
+ keyValues as em,
79197
+ isObject as en,
79198
+ DRAGG_TEXT as eo,
79199
+ PSEUDO_GROUP_ITEM as ep,
79200
+ GROUP_EXPANDED as eq,
79201
+ GROUP_DEPTH as er,
79202
+ GROUP_EXPAND_BTN as es,
79203
+ DATA_ROW as et,
79204
+ isGroupingColumn as eu,
79205
+ GROUP_COLUMN_PROP as ev,
79206
+ getCellRaw as ew,
79207
+ DATA_COL as ex,
79208
+ CELL_CLASS as ey,
79209
+ Build as ez,
78785
79210
  resolveAutofillToField as f,
78786
79211
  getAllDataProfiles as g,
78787
79212
  SubTableType as h,