@gct-paas/word 0.1.51 → 0.1.52-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/base/dropdown/src/dropdown-basic-select.vue.d.ts +3 -0
  2. package/dist/capabilities/field-manifest/service.d.ts +2 -0
  3. package/dist/capabilities/model-field-runtime/types/field.d.ts +3 -1
  4. package/dist/core/command/types.d.ts +2 -1
  5. package/dist/core/data/post-change-pipeline.d.ts +2 -0
  6. package/dist/core/model/document/wtcRegionRef.d.ts +43 -4
  7. package/dist/core/model/logic/subtable/repeating/RepeatingRegion.d.ts +6 -1
  8. package/dist/domain/active/active-types.d.ts +2 -0
  9. package/dist/domain/field/field-binding.d.ts +4 -1
  10. package/dist/domain/field/field-props-schema-type.d.ts +1 -1
  11. package/dist/domain/field/field-type.d.ts +17 -1
  12. package/dist/domain/field/resolve-field-type.d.ts +7 -0
  13. package/dist/domain/table/_shared/autofill-expander.d.ts +20 -0
  14. package/dist/domain/table/_shared/linkage-engine.d.ts +24 -0
  15. package/dist/domain/table/_shared/region-item-theme.d.ts +6 -0
  16. package/dist/domain/table/_shared/rule-engine.d.ts +8 -0
  17. package/dist/domain/table/_shared/runtime-engine.d.ts +9 -0
  18. package/dist/domain/table/_shared/sub-model-matcher.d.ts +14 -0
  19. package/dist/domain/table/_shared/table-runtime-shared.d.ts +40 -0
  20. package/dist/domain/table/_shared/table-theme.d.ts +12 -0
  21. package/dist/domain/table/business/check-table/index.d.ts +2 -0
  22. package/dist/domain/table/business/check-table/profile.d.ts +3 -0
  23. package/dist/domain/table/business/material-balance/index.d.ts +1 -0
  24. package/dist/domain/table/business/material-balance/profile.d.ts +3 -0
  25. package/dist/domain/table/business/material-consume/index.d.ts +2 -0
  26. package/dist/domain/table/business/material-consume/profile.d.ts +3 -0
  27. package/dist/domain/table/business/warehouse-in-out/fields.d.ts +2 -0
  28. package/dist/domain/table/business/warehouse-in-out/index.d.ts +2 -0
  29. package/dist/domain/table/business/warehouse-in-out/profile.d.ts +2 -0
  30. package/dist/domain/table/business/warehouse-inventory/index.d.ts +1 -0
  31. package/dist/domain/table/business/warehouse-inventory/profile.d.ts +3 -0
  32. package/dist/domain/table/business/warehouse-transfer/index.d.ts +1 -0
  33. package/dist/domain/table/business/warehouse-transfer/profile.d.ts +3 -0
  34. package/dist/domain/table/data/dynamic-table/index.d.ts +2 -0
  35. package/dist/domain/table/data/dynamic-table/profile.d.ts +3 -0
  36. package/dist/domain/table/data/fixed-table/index.d.ts +2 -0
  37. package/dist/domain/table/data/fixed-table/profile.d.ts +3 -0
  38. package/dist/domain/table/data/two-d-table/index.d.ts +2 -0
  39. package/dist/domain/table/data/two-d-table/profile.d.ts +3 -0
  40. package/dist/domain/table/hooks/on-field-attach.d.ts +16 -0
  41. package/dist/domain/table/hooks/on-subtable-create.d.ts +22 -0
  42. package/dist/domain/table/index.d.ts +12 -0
  43. package/dist/domain/table/registry.d.ts +29 -0
  44. package/dist/domain/table/types.d.ts +286 -0
  45. package/dist/index.es.js +2888 -1844
  46. package/dist/runtime/_register_/context/DesignSuiteContext.d.ts +3 -0
  47. package/dist/runtime/canvas/table/utils/index.d.ts +2 -59
  48. package/dist/runtime/designer/ribbon/components/table-ribbon-group.vue.d.ts +2 -0
  49. package/dist/runtime/factories/createDesignWidgetFactory.d.ts +4 -2
  50. package/dist/runtime/renderer/dropdowns/components/tables/columns/business/ref.d.ts +11 -0
  51. package/dist/runtime/renderer/dropdowns/components/tables/utils/quick-search.d.ts +4 -0
  52. package/dist/suites/edhr/manifest/field/logic/ref-manifest.d.ts +2 -0
  53. package/dist/suites/edhr/manifest/field/material/warehouse-manager-manifest.d.ts +2 -0
  54. package/dist/suites/edhr/manifest/field/material/warehouse-receipt-date-manifest.d.ts +2 -0
  55. package/dist/suites/edhr/manifest/field/material/warehouse-receipt-no-manifest.d.ts +2 -0
  56. package/dist/suites/edhr/manifest/field/trace/external-reference-no-manifest.d.ts +2 -0
  57. package/dist/word.css +142 -125
  58. package/package.json +1 -1
@@ -24,6 +24,8 @@ type __VLS_Props = {
24
24
  grouped?: boolean;
25
25
  /** 下拉框宽度 */
26
26
  popperWidth?: number;
27
+ /** 选项列表最大高度 */
28
+ listMaxHeight?: number | string;
27
29
  dropdownExtraProps?: Record<string, any>;
28
30
  };
29
31
  declare function __VLS_template(): {
@@ -72,6 +74,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
72
74
  showCheck: boolean;
73
75
  grouped: boolean;
74
76
  popperWidth: number;
77
+ listMaxHeight: number | string;
75
78
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
76
79
  dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
77
80
  P: {};
@@ -1,9 +1,11 @@
1
1
  import { BaseService } from '../base/BaseService';
2
2
  import { FieldManifestRegistry } from './registry';
3
+ import { FieldTypeSource } from '../../domain/field/resolve-field-type';
3
4
  import { FIELD_TYPE } from '../../domain/field/field-type';
4
5
  import { FieldManifest } from './types';
5
6
  export declare class FieldManifestService extends BaseService<FIELD_TYPE, FieldManifest, FieldManifestRegistry> {
6
7
  constructor(suiteKey: SuiteKey);
7
8
  getManifestBySuite(): FieldManifest[];
8
9
  getManifestByType(fieldType: FIELD_TYPE): FieldManifest | undefined;
10
+ getManifestForField(field: FieldTypeSource): FieldManifest | undefined;
9
11
  }
@@ -10,8 +10,10 @@ export interface FieldMeta {
10
10
  modelKey: ModelKey;
11
11
  /** 字段名称 */
12
12
  name: string;
13
- /** 字段数据类型 */
13
+ /** 字段数据类型(存储类型) */
14
14
  type: FIELD_TYPE;
15
+ /** 业务字段类型 */
16
+ bizType?: FIELD_TYPE;
15
17
  /** 是否必填 */
16
18
  required?: boolean;
17
19
  /** 字段创建类型 */
@@ -3,7 +3,7 @@ import { Doc } from '../view/Doc';
3
3
  import { WidgetMeta } from '../widget/widget-meta';
4
4
  import { WordHighlight } from '../model/types';
5
5
  import { PointerHitResult } from '../cursor/hit/types';
6
- import { SubTableRegionType } from '../model/document/wtcRegionRef';
6
+ import { SubTableLayoutType, SubTableRegionType } from '../model/document/wtcRegionRef';
7
7
  export interface CursorMeta {
8
8
  nodeId: string;
9
9
  offset: number;
@@ -156,6 +156,7 @@ export type CommandPayloadMap = {
156
156
  setRepeating: CommandPayload & {
157
157
  name: string;
158
158
  valuePath: string;
159
+ layoutType?: SubTableLayoutType;
159
160
  };
160
161
  set2DTable: CommandPayload & {
161
162
  name: string;
@@ -19,6 +19,8 @@ export type PostChangePipelineContext = {
19
19
  * 根据模型 key + 字段 key 获取字段 meta
20
20
  */
21
21
  loadFieldByKey: (modelKey: string, key: string) => Promise<FieldMeta | undefined>;
22
+ /** 数据变更并完成 enrich 后的扩展钩子 */
23
+ afterFlush?: (changedPaths: string[], source: EmitSource) => void | Promise<void>;
22
24
  };
23
25
  /**
24
26
  * 数据变更后的处理流水线
@@ -1,24 +1,63 @@
1
- /** 子表主体类型(repeating 在 layout 层映射为 dynamic-table) */
1
+ /**
2
+ * 子表区域与布局类型定义
3
+ *
4
+ * 维护「存储层 region 类型」与「UI/layout 层类型」的映射关系:
5
+ *
6
+ * - Region 类型(SubTableRegionType):写入 runtimeJson / DocModel,如 repeating、bounded
7
+ * - Layout 类型(SubTableLayoutType):设计器面板、Ribbon、主题色等 UI 层使用
8
+ *
9
+ */
10
+ /**
11
+ * 子表主体 region 类型
12
+ *
13
+ * - repeating:动态表
14
+ * - bounded:固定表
15
+ * - 2d-table:二维表
16
+ * - check-table:检验表
17
+ * - material-consume-table:物料消耗表
18
+ *
19
+ * 出入库明细等复用 repeating 存储,layout 层通过 widgetMeta.props.layoutType 区分。
20
+ */
2
21
  export type SubTableRegionType = 'repeating' | 'bounded' | '2d-table' | 'check-table' | 'material-consume-table';
22
+ /** 表头 region 类型 */
3
23
  export type TableHeaderRegionType = 'table-header' | 'sub-table-header';
24
+ /** 所有子表表格 region 类型 */
4
25
  export type TableRegionType = SubTableRegionType | TableHeaderRegionType;
5
- export declare const SUB_TABLE_REGION_TYPES: string[];
6
- export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table';
26
+ /** 子表 region 类型枚举列表 */
27
+ export declare const SUB_TABLE_REGION_TYPES: readonly ["repeating", "bounded", "2d-table", "check-table", "material-consume-table"];
28
+ /**
29
+ * 子表 layout 类型
30
+ * Ribbon 面板、子表主题色均使用此类型;主题配置见 @/domain/table 各 Profile.theme
31
+ */
32
+ export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table' | 'warehouse-in-out-table';
33
+ /** 表头 layout 类型 */
7
34
  export type TableHeaderLayoutType = 'table-header';
35
+ /** 所有子表表格 layout 类型 */
8
36
  export type TableLayoutType = SubTableLayoutType | TableHeaderLayoutType;
9
- /** 子表内数据分组 / 数据关联 */
37
+ /**
38
+ * 子表内部单元格关联类型
39
+ * - bounded-item:固定表 / 检验表内的数据分组
40
+ * - data-group-2d:二维表内的动态关联分组
41
+ */
10
42
  export type SubTableItemType = 'bounded-item' | 'data-group-2d';
43
+ /** 单元格关联的子表 region 引用 */
11
44
  export type WtcSubTableRef = {
12
45
  type: SubTableRegionType;
13
46
  regionId: string;
14
47
  };
48
+ /** 单元格关联的子表内部 item 引用 */
15
49
  export type WtcSubTableItemRef = {
16
50
  type: SubTableItemType;
17
51
  regionId: string;
18
52
  };
53
+ /** 单元格关联的表头 region 引用 */
19
54
  export type WtcHeaderRef = {
20
55
  type: TableHeaderRegionType;
21
56
  regionId: string;
22
57
  };
58
+ /**
59
+ * 将存储层 region 类型转换为 UI layout 类型
60
+ */
23
61
  export declare function tableRegionTypeToLayoutType(type: SubTableRegionType): SubTableLayoutType;
62
+ /** 表头 region 类型转 layout 类型(恒为 table-header) */
24
63
  export declare function headerRegionTypeToLayoutType(type: TableHeaderRegionType): TableHeaderLayoutType;
@@ -1,9 +1,12 @@
1
- import { Wtbl } from '../../../document';
2
1
  import { Region, RegionOptions } from '../../base/Region';
3
2
  import { RegionJson } from '../../../types';
3
+ import { Wtbl } from '../../../document';
4
+ import { SubTableLayoutType } from '../../../document/wtcRegionRef';
4
5
  export type RepeatingWidgetPropsMeta = {
5
6
  /** 快速填报 */
6
7
  quickFill: boolean;
8
+ /** UI layout 类型;默认 dynamic-table,出入库明细等为 warehouse-in-out-table */
9
+ layoutType?: SubTableLayoutType;
7
10
  [key: string]: any;
8
11
  };
9
12
  export type RepeatingWidgetMeta = {
@@ -29,6 +32,8 @@ export declare class RepeatingRegion extends Region {
29
32
  get linkFieldKey(): string;
30
33
  get subValuePath(): string;
31
34
  get linkValuePath(): string;
35
+ /** 设计/渲染层子表类型 */
36
+ get layoutType(): SubTableLayoutType;
32
37
  toJSON(): RepeatingRegionJson;
33
38
  static fromJSON(json: RepeatingRegionJson, table: Wtbl): RepeatingRegion;
34
39
  }
@@ -10,6 +10,8 @@ export type PanelType =
10
10
  | 'panel:data-load'
11
11
  /** 动态表 */
12
12
  | 'panel:dynamic-table'
13
+ /** 出入库明细表 */
14
+ | 'panel:warehouse-in-out-table'
13
15
  /** 二维表 */
14
16
  | 'panel:2d-table'
15
17
  /** 物料消耗表 */
@@ -38,7 +38,10 @@ import { FIELD_TYPE } from './field-type';
38
38
  * $.scrap_material_1_
39
39
  */
40
40
  export interface FieldDataBindingMeta {
41
- /** 字段类型 */
41
+ /**
42
+ * 字段 manifest 类型(拖入时由 bizType ?? type 解析写入)
43
+ * 例:外部参考号字段为 external_reference_no,而非底层存储类型 text
44
+ */
42
45
  fieldType: FIELD_TYPE;
43
46
  /**
44
47
  * 字段链路
@@ -1,5 +1,5 @@
1
1
  /** 字段配置-渲染组件标识 */
2
- export type FieldPropsSchemaKey = 'schema:field-text' | 'schema:field-boolean' | 'schema:field-number' | 'schema:field-datetime' | 'schema:field-user' | 'schema:field-org' | 'schema:field-sign' | 'schema:field-enum' | 'schema:field-file' | 'schema:field-image' | 'schema:field-trace' | 'schema:field-business';
2
+ export type FieldPropsSchemaKey = 'schema:field-text' | 'schema:field-boolean' | 'schema:field-number' | 'schema:field-datetime' | 'schema:field-user' | 'schema:field-org' | 'schema:field-sign' | 'schema:field-enum' | 'schema:field-file' | 'schema:field-image' | 'schema:field-trace' | 'schema:field-business' | 'schema:field-ref';
3
3
  /** 优先级规则 */
4
4
  export interface PriorityRule {
5
5
  type: 'priority';
@@ -303,5 +303,21 @@ export declare enum FIELD_TYPE {
303
303
  /**
304
304
  * 设备多选(MedPro)
305
305
  */
306
- DEVICE_REF_MULTI = "device_ref_multi"
306
+ DEVICE_REF_MULTI = "device_ref_multi",
307
+ /**
308
+ * 外部参考号
309
+ */
310
+ EXTERNAL_REF_NO = "external_reference_no",
311
+ /**
312
+ * 单据编号
313
+ */
314
+ WAREHOUSE_RECEIPT_NO = "warehouse_receipt_no",
315
+ /**
316
+ * 单据日期
317
+ */
318
+ WAREHOUSE_RECEIPT_DATE = "warehouse_receipt_date",
319
+ /**
320
+ * 仓管员
321
+ */
322
+ WAREHOUSE_MANAGER = "warehouse_manager"
307
323
  }
@@ -0,0 +1,7 @@
1
+ import { FieldMeta } from '../../capabilities/model-field-runtime';
2
+ import { FIELD_TYPE } from './field-type';
3
+ export type FieldTypeSource = Pick<FieldMeta, 'type' | 'bizType'>;
4
+ /** manifest / 面板 / 渲染 / icon 查找用的类型 */
5
+ export declare function resolveFieldManifestType(field: FieldTypeSource): FIELD_TYPE;
6
+ /** 数据形态、类型兼容逻辑用的存储类型 */
7
+ export declare function resolveFieldStorageType(field: FieldTypeSource): FIELD_TYPE;
@@ -0,0 +1,20 @@
1
+ import { AutofillRule } from '../../../suites/shared/panel/config/editor/ref-autofill-editor/types';
2
+ import { AutofillTemplate } from '../types';
3
+ /**
4
+ * 关联字段 key 规范化:去掉末尾 `_`,用于生成填充目标字段名
5
+ * @example product_id_ → product_id → product_id_name_
6
+ */
7
+ export declare function normalizeRefFieldKey(fieldKey: string): string;
8
+ interface ExpandAutofillContext {
9
+ /** 拖入的源字段 key,如 product_id_ */
10
+ sourceFieldKey: string;
11
+ /** 目标字段所在模型 key(子表字段为子模型 modelKey) */
12
+ toModelKey?: string;
13
+ /** 是否为子表字段 */
14
+ toSubModel?: number;
15
+ }
16
+ /**
17
+ * 将字段 Profile 中的 autofillTemplates 展开为 widget.props.autofillRules
18
+ */
19
+ export declare function expandAutofillTemplates(templates: AutofillTemplate[], ctx: ExpandAutofillContext): AutofillRule[];
20
+ export {};
@@ -0,0 +1,24 @@
1
+ import { Doc } from '../../../core';
2
+ import { BusinessSubTableRuntimeContext } from './table-runtime-shared';
3
+ import { RuleContext, SelectBehaviorDef } from '../types';
4
+ /** 解析级联上游字段值:行数据 → 隐式主表字段 → 主表同名字段 */
5
+ export declare function resolveLinkFieldValue(doc: Doc, runtimeCtx: BusinessSubTableRuntimeContext, ctx: RuleContext, linkFieldKey: string, select?: SelectBehaviorDef): unknown;
6
+ /** 字段值变更后:重建级联查询参数并清空下游字段 */
7
+ export declare function applyBusinessTableLinkageOnFieldChange(doc: Doc, changedPath: string): void;
8
+ /** 子表插行后:应用级联查询参数 */
9
+ export declare function applyBusinessTableLinkageOnRowInit(doc: Doc, subFieldKey: string, rowIndex: number): void;
10
+ /** 文档初始化后:应用级联查询参数 */
11
+ export declare function applyBusinessTableLinkageOnInit(doc: Doc): void;
12
+ export interface BusinessSelectLinkageResult {
13
+ enabled: boolean;
14
+ linkFieldKey?: string;
15
+ linkValue?: unknown;
16
+ }
17
+ /** 下拉组件运行时解析 Profile 级联配置 */
18
+ export declare function resolveBusinessSelectLinkage(doc: Doc, options: {
19
+ subFieldKey?: string;
20
+ fieldKey?: string;
21
+ runtimeValuePath?: string;
22
+ }): BusinessSelectLinkageResult | null;
23
+ /** 上游字段变更时,同步清空下游字段 */
24
+ export declare function buildLinkageDownstreamClears(doc: Doc, changedPaths: string[]): Record<string, undefined>;
@@ -0,0 +1,6 @@
1
+ import { TableTheme } from '../types';
2
+ /** 子表内部结构 / 表头的主题 */
3
+ export interface RegionItemTheme extends TableTheme {
4
+ label: string;
5
+ }
6
+ export declare const REGION_ITEM_THEME: Record<'table-header' | 'data-group' | 'data-group-2d', RegionItemTheme>;
@@ -0,0 +1,8 @@
1
+ import { Doc } from '../../../core';
2
+ export { collectBusinessSubTableContexts, parseSubtableFieldPath, type BusinessSubTableRuntimeContext, } from './table-runtime-shared';
3
+ /** 字段值变更后:应用 onFieldChange 规则 */
4
+ export declare function applyBusinessTableRulesOnFieldChange(doc: Doc, changedPath: string): void;
5
+ /** 子表插行后:应用 onRowInit + always */
6
+ export declare function applyBusinessTableRulesOnRowInit(doc: Doc, subFieldKey: string, rowIndex: number): void;
7
+ /** 文档初始化后:应用 always + onRowInit 规则 */
8
+ export declare function applyBusinessTableRulesOnInit(doc: Doc): void;
@@ -0,0 +1,9 @@
1
+ import { Doc } from '../../../core';
2
+ export { buildLinkageDownstreamClears, resolveBusinessSelectLinkage, type BusinessSelectLinkageResult, } from './linkage-engine';
3
+ export { collectBusinessSubTableContexts, parseSubtableFieldPath, type BusinessSubTableRuntimeContext, } from './table-runtime-shared';
4
+ /** 文档初始化 */
5
+ export declare function applyBusinessTableRuntimeOnInit(doc: Doc): void;
6
+ /** 子表插行 */
7
+ export declare function applyBusinessTableRuntimeOnRowInit(doc: Doc, subFieldKey: string, rowIndex: number): void;
8
+ /** 字段变更 */
9
+ export declare function applyBusinessTableRuntimeOnFieldChange(doc: Doc, changedPath: string): void;
@@ -0,0 +1,14 @@
1
+ import { FieldMeta } from '../../../capabilities/model-field-runtime';
2
+ import { DropdownOption } from '../../../base';
3
+ /**
4
+ * 生成「选择子模型」下拉选项
5
+ * @param tableTypeOrRibbonAction 表类型或 Ribbon action
6
+ * @param fields 主模型下所有字段
7
+ * @param usedKeys 文档中已占用的子模型 field key(不可重复绑定)
8
+ */
9
+ export declare function getSubModelOptions(tableTypeOrRibbonAction: string, fields: FieldMeta[], usedKeys?: string[]): DropdownOption[];
10
+ /**
11
+ * 创建子表前兜底校验
12
+ * @throws 子模型与表类型不匹配时抛出 Error
13
+ */
14
+ export declare function validateSubModelBinding(tableTypeOrRibbonAction: string, fieldKey: string, fields: FieldMeta[]): void;
@@ -0,0 +1,40 @@
1
+ import { Doc } from '../../../core';
2
+ import { BusinessFieldProfile, BusinessSubTableProfile, RuleContext } from '../types';
3
+ export interface BusinessSubTableRuntimeContext {
4
+ profile: BusinessSubTableProfile;
5
+ subFieldKey: string;
6
+ refModelType: string;
7
+ arrayPath: string;
8
+ }
9
+ /** 解析子表字段路径 `$.subFieldKey[n].fieldKey` */
10
+ export declare function parseSubtableFieldPath(path: string): {
11
+ subFieldKey: string;
12
+ rowIndex: number;
13
+ fieldKey: string;
14
+ } | null;
15
+ /** 解析主表字段路径 `$.fieldKey` */
16
+ export declare function parseMainFieldPath(path: string): string | null;
17
+ type BusinessFieldChange = {
18
+ kind: 'subtable';
19
+ subFieldKey: string;
20
+ rowIndex: number;
21
+ fieldKey: string;
22
+ } | {
23
+ kind: 'main';
24
+ fieldKey: string;
25
+ };
26
+ export declare function parseBusinessFieldChange(changedPath: string): BusinessFieldChange | null;
27
+ /** 收集文档中已配置 layoutType 的业务子表 */
28
+ export declare function collectBusinessSubTableContexts(doc: Doc): BusinessSubTableRuntimeContext[];
29
+ export declare function findBusinessSubTableContext(doc: Doc, subFieldKey: string): BusinessSubTableRuntimeContext | undefined;
30
+ export declare function buildRuleContext(doc: Doc, runtimeCtx: BusinessSubTableRuntimeContext, rowIndex: number, changedFieldKey?: string): RuleContext;
31
+ export declare function getRowCount(doc: Doc, subFieldKey: string): number;
32
+ export declare function resolveFieldKeyFromMatch(fieldProfile: BusinessFieldProfile): string | undefined;
33
+ export declare function findFieldProfile(profile: BusinessSubTableProfile, fieldKey: string): BusinessFieldProfile | undefined;
34
+ export declare function isImplicitLinkFieldChanged(runtimeCtx: BusinessSubTableRuntimeContext, changedFieldKey: string): boolean;
35
+ /** 遍历业务子表行(支持单行或全表) */
36
+ export declare function forEachBusinessTableRow(doc: Doc, runtimeCtx: BusinessSubTableRuntimeContext, options: {
37
+ rowIndex?: number;
38
+ changedFieldKey?: string;
39
+ } | undefined, iteratee: (ctx: RuleContext) => void): void;
40
+ export {};
@@ -0,0 +1,12 @@
1
+ /** 子表主题使用的样式结构 */
2
+ interface TableStyleResult {
3
+ strokeColor: string;
4
+ backgroundColor: string;
5
+ label: string;
6
+ labelBjColor: string;
7
+ }
8
+ /**
9
+ * 获取子表设计态样式
10
+ */
11
+ export declare function getStyleByType(type: string): TableStyleResult;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ export { profile as checkTableProfile } from './profile';
2
+ export * from './profile';
@@ -0,0 +1,3 @@
1
+ import { BusinessSubTableProfile } from '../../types';
2
+ export declare const profile: BusinessSubTableProfile;
3
+ export { profile as checkTableProfile };
@@ -0,0 +1 @@
1
+ export { profile as materialBalanceProfile } from './profile';
@@ -0,0 +1,3 @@
1
+ import { BusinessSubTableProfile } from '../../types';
2
+ export declare const profile: BusinessSubTableProfile;
3
+ export { profile as materialBalanceProfile };
@@ -0,0 +1,2 @@
1
+ export { profile as materialConsumeProfile } from './profile';
2
+ export * from './profile';
@@ -0,0 +1,3 @@
1
+ import { BusinessSubTableProfile } from '../../types';
2
+ export declare const profile: BusinessSubTableProfile;
3
+ export { profile as materialConsumeProfile };
@@ -0,0 +1,2 @@
1
+ import { BusinessFieldProfile } from '../../types';
2
+ export declare const fields: BusinessFieldProfile[];
@@ -0,0 +1,2 @@
1
+ export { profile as warehouseInOutProfile } from './profile';
2
+ export * from './profile';
@@ -0,0 +1,2 @@
1
+ import { BusinessSubTableProfile } from '../../types';
2
+ export declare const profile: BusinessSubTableProfile;
@@ -0,0 +1 @@
1
+ export { profile as warehouseInventoryProfile } from './profile';
@@ -0,0 +1,3 @@
1
+ import { BusinessSubTableProfile } from '../../types';
2
+ export declare const profile: BusinessSubTableProfile;
3
+ export { profile as warehouseInventoryProfile };
@@ -0,0 +1 @@
1
+ export { profile as warehouseTransferProfile } from './profile';
@@ -0,0 +1,3 @@
1
+ import { BusinessSubTableProfile } from '../../types';
2
+ export declare const profile: BusinessSubTableProfile;
3
+ export { profile as warehouseTransferProfile };
@@ -0,0 +1,2 @@
1
+ export { profile as dynamicTableProfile } from './profile';
2
+ export * from './profile';
@@ -0,0 +1,3 @@
1
+ import { DataTableProfile } from '../../types';
2
+ export declare const profile: DataTableProfile;
3
+ export { profile as dynamicTableProfile };
@@ -0,0 +1,2 @@
1
+ export { profile as fixedTableProfile } from './profile';
2
+ export * from './profile';
@@ -0,0 +1,3 @@
1
+ import { DataTableProfile } from '../../types';
2
+ export declare const profile: DataTableProfile;
3
+ export { profile as fixedTableProfile };
@@ -0,0 +1,2 @@
1
+ export { profile as twoDTableProfile } from './profile';
2
+ export * from './profile';
@@ -0,0 +1,3 @@
1
+ import { DataTableProfile } from '../../types';
2
+ export declare const profile: DataTableProfile;
3
+ export { profile as twoDTableProfile };
@@ -0,0 +1,16 @@
1
+ import { FieldMeta } from '../../../capabilities/model-field-runtime';
2
+ import { WidgetMeta } from '../../../core';
3
+ interface ApplyFieldProfileOptions {
4
+ /** 子表分区路径,如 f_crkmx 或 f_ewb:f_link */
5
+ parentFieldKey?: string;
6
+ /** 用于解析业务表 Profile */
7
+ refModelType?: string;
8
+ }
9
+ /**
10
+ * 字段拖入画布时应用业务表字段 Profile
11
+ * - 合并 defaultProps
12
+ * - 应用 locked 属性
13
+ * - 展开 autofillTemplates → autofillRules
14
+ */
15
+ export declare function applyFieldProfileOnAttach(widget: WidgetMeta, field: FieldMeta, options?: ApplyFieldProfileOptions): WidgetMeta;
16
+ export {};
@@ -0,0 +1,22 @@
1
+ import { DocModel } from '../../../core/model/DocModel';
2
+ import { FieldMeta } from '../../../capabilities/model-field-runtime';
3
+ import { SubTableCommand } from '../types';
4
+ /**
5
+ * 从当前文档收集已被子表占用的 master_slave field key
6
+ */
7
+ export declare function collectUsedSubModelKeys(docModel?: DocModel | null): string[];
8
+ interface ConfirmSubTableCreateOptions {
9
+ /** Ribbon 触发的表类型 action */
10
+ ribbonAction: string;
11
+ /** 用户选择的子模型 field key */
12
+ subFieldKey: string;
13
+ fields: FieldMeta[];
14
+ }
15
+ /**
16
+ * 确认创建子表:校验子模型绑定合法性,返回应执行的 Doc 命令
17
+ * @throws 校验失败时抛出 Error
18
+ */
19
+ export declare function confirmSubTableCreate(options: ConfirmSubTableCreateOptions): SubTableCommand;
20
+ /** 解析 Ribbon action 对应的表 Profile */
21
+ export declare function resolveSubTableProfile(ribbonAction: string): import('..').TableProfile | undefined;
22
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 子表配置化模块统一导出
3
+ */
4
+ export * from './types';
5
+ export * from './registry';
6
+ export * from './_shared/sub-model-matcher';
7
+ export * from './_shared/autofill-expander';
8
+ export * from './_shared/region-item-theme';
9
+ export * from './_shared/table-theme';
10
+ export * from './_shared/rule-engine';
11
+ export * from './hooks/on-subtable-create';
12
+ export * from './hooks/on-field-attach';
@@ -0,0 +1,29 @@
1
+ import { DropdownOption, DropdownOptionGroup } from '../../base';
2
+ import { BusinessSubTableProfile, TableProfile } from './types';
3
+ /** 表头(挂在数据表 Ribbon 首位) */
4
+ export declare const TABLE_HEADER_RIBBON_OPTION: DropdownOption;
5
+ /** 所有已注册的子表 Profile */
6
+ declare const ALL_TABLE_PROFILES: TableProfile[];
7
+ /** 按表类型获取 Profile */
8
+ export declare function getProfile(type: string): TableProfile | undefined;
9
+ /** 按 Ribbon 下拉项 value 获取 Profile */
10
+ export declare function getProfileByRibbonAction(ribbonAction: string): TableProfile | undefined;
11
+ /** 按 layoutType 获取 Profile */
12
+ export declare function getProfileByLayoutType(layoutType: string): TableProfile | undefined;
13
+ /** 按 layout 类型获取展示名称 */
14
+ export declare function getTableLabelByLayoutType(layoutType: string): string;
15
+ /**
16
+ * 收集所有已注册业务表的 refModelType
17
+ * 用于判断 master_slave 字段是否属于业务子模型
18
+ */
19
+ export declare function getAllBusinessRefModelTypes(): string[];
20
+ /** 按 refModelType 获取业务表 Profile */
21
+ export declare function getBusinessProfileByRefModelType(refModelType: string): BusinessSubTableProfile | undefined;
22
+ /**
23
+ * 生成 Ribbon「数据表」「业务表」下拉选项
24
+ */
25
+ export declare function getRibbonTableOptions(): {
26
+ dataTables: DropdownOption[];
27
+ businessTables: DropdownOptionGroup[];
28
+ };
29
+ export { ALL_TABLE_PROFILES };