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

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 (31) hide show
  1. package/dist/assets/svgs/table/index.d.ts +28 -0
  2. package/dist/capabilities/panel/schema/types.d.ts +1 -0
  3. package/dist/core/data/DataManager.d.ts +8 -0
  4. package/dist/core/data/post-change-pipeline.d.ts +5 -5
  5. package/dist/domain/table/_shared/linkage-engine.d.ts +4 -3
  6. package/dist/domain/table/_shared/rule-engine.d.ts +2 -1
  7. package/dist/domain/table/_shared/runtime-engine.d.ts +4 -1
  8. package/dist/domain/table/_shared/table-runtime-shared.d.ts +5 -0
  9. package/dist/index.es.js +1232 -1371
  10. package/dist/runtime/designer/panel/panel-nav.d.ts +13 -0
  11. package/dist/runtime/designer/ribbon/svg/table/table-svg-icon.vue.d.ts +11 -0
  12. package/dist/suites/edhr/panel-router/index.d.ts +2 -1
  13. package/dist/suites/edhr/panel-schema/2d-table/2d-table.basic.d.ts +1 -14
  14. package/dist/suites/edhr/panel-schema/_shared/create-table-panel-schema.d.ts +3 -0
  15. package/dist/suites/edhr/panel-schema/_shared/data-group-2d-title.d.ts +7 -0
  16. package/dist/suites/edhr/panel-schema/check-table/check-table.basic.d.ts +1 -14
  17. package/dist/suites/edhr/panel-schema/data-group-2d/data-group-2d.basic.d.ts +2 -0
  18. package/dist/suites/edhr/panel-schema/dynamic-table/dynamic-table.basic.d.ts +1 -14
  19. package/dist/suites/edhr/panel-schema/fixed-table/fixed-table.basic.d.ts +1 -14
  20. package/dist/suites/edhr/panel-schema/index.d.ts +7 -70
  21. package/dist/suites/edhr/panel-schema/material-consume-table/material-consume-table.basic.d.ts +1 -14
  22. package/dist/suites/edhr/panel-schema/warehouse-in-out-table/warehouse-in-out-table.basic.d.ts +1 -0
  23. package/dist/suites/shared/hooks/useSubTablePanelBase.d.ts +14 -0
  24. package/dist/suites/shared/panel/modules/sub-table-basic-info.vue.d.ts +31 -0
  25. package/dist/suites/shared/panel/modules/sub-table-grid-info.vue.d.ts +12 -0
  26. package/dist/word.css +73 -173
  27. package/package.json +1 -1
  28. package/dist/suites/edhr/panel-schema/dynamic-table/DynamicTablePanel.vue.d.ts +0 -8
  29. package/dist/suites/edhr/panel-schema/fixed-table/FixedTablePanel.vue.d.ts +0 -8
  30. /package/dist/suites/edhr/panel-schema/{2d-table/_2DTablePanel.vue.d.ts → _shared/BoundedSubTablePanel.vue.d.ts} +0 -0
  31. /package/dist/suites/edhr/panel-schema/{check-table/CheckTablePanel.vue.d.ts → _shared/RepeatingSubTablePanel.vue.d.ts} +0 -0
@@ -0,0 +1,28 @@
1
+ /** Ribbon 主按钮图标 */
2
+ export declare const TABLE_CATEGORY_SVG: {
3
+ readonly dataTable: string;
4
+ readonly businessTable: string;
5
+ };
6
+ /** 数据表下拉项图标(按 tableType) */
7
+ export declare const TABLE_DATA_SVG: {
8
+ readonly 'table-header': string;
9
+ readonly 'dynamic-table': string;
10
+ readonly 'fixed-table': string;
11
+ readonly 'two-d-table': string;
12
+ };
13
+ /** 业务表下拉项图标(按 tableType) */
14
+ export declare const TABLE_BUSINESS_SVG: {
15
+ readonly 'warehouse-in-out': string;
16
+ readonly 'warehouse-inventory': string;
17
+ readonly 'warehouse-transfer': string;
18
+ readonly 'material-consume': string;
19
+ readonly 'material-balance': string;
20
+ readonly 'check-table': string;
21
+ };
22
+ /**
23
+ * Ribbon 下拉项 value → SVG URL
24
+ */
25
+ export declare const TABLE_SVG_BY_RIBBON_ACTION: Record<string, string>;
26
+ export type TableCategorySvgKey = keyof typeof TABLE_CATEGORY_SVG;
27
+ export type TableDataSvgKey = keyof typeof TABLE_DATA_SVG;
28
+ export type TableBusinessSvgKey = keyof typeof TABLE_BUSINESS_SVG;
@@ -8,6 +8,7 @@ export type PanelTitle = string | PanelBreadcrumbItem[];
8
8
  export type PanelTitleContext = {
9
9
  active: ActivePanelData | null;
10
10
  attachFieldTarget: AttachFieldTarget | null;
11
+ widget?: unknown;
11
12
  };
12
13
  export interface PanelSchema {
13
14
  /** schema 唯一 key */
@@ -1,6 +1,14 @@
1
1
  import { Doc } from '../view/Doc';
2
2
  import { PostChangePipelineContext } from './post-change-pipeline';
3
3
  export type EmitSource = 'user' | 'dependency' | 'enrichment' | 'parent';
4
+ /** 单字段变更明细(path 作为 FieldChangeMap 的 key) */
5
+ export interface FieldChangeDetail {
6
+ oldValue: unknown;
7
+ newValue: unknown;
8
+ source: EmitSource;
9
+ }
10
+ /** 本批次字段变更:path → 变更明细 */
11
+ export type FieldChangeMap = Record<string, FieldChangeDetail>;
4
12
  export type Data = Record<string, any>;
5
13
  export type PartialData = Partial<Data>;
6
14
  type JsonPath = string;
@@ -2,7 +2,7 @@ import { FIELD_TYPE } from '../../domain/field/field-type';
2
2
  import { FieldManifest } from '../../capabilities/field-manifest';
3
3
  import { FieldMeta } from '../../capabilities/model-field-runtime';
4
4
  import { Doc } from '../view/Doc';
5
- import { DataManager, EmitSource } from './DataManager';
5
+ import { DataManager, EmitSource, FieldChangeMap } from './DataManager';
6
6
  /**
7
7
  * Pipeline 运行时上下文
8
8
  *
@@ -20,7 +20,7 @@ export type PostChangePipelineContext = {
20
20
  */
21
21
  loadFieldByKey: (modelKey: string, key: string) => Promise<FieldMeta | undefined>;
22
22
  /** 数据变更并完成 enrich 后的扩展钩子 */
23
- afterFlush?: (changedPaths: string[], source: EmitSource) => void | Promise<void>;
23
+ afterFlush?: (changedMap: FieldChangeMap, source: EmitSource) => void | Promise<void>;
24
24
  };
25
25
  /**
26
26
  * 数据变更后的处理流水线
@@ -93,10 +93,10 @@ export declare class PostChangePipeline {
93
93
  /**
94
94
  * 变更后执行流水线
95
95
  *
96
- * @param changedPaths 本次变化的字段路径
97
- * @param source 变更来源
96
+ * @param changedMap 本批次字段变更 path → { oldValue, newValue, source }
97
+ * @param source 批次级变更来源(兼容保留,单字段以 map 内 source 为准)
98
98
  */
99
- flush(changedPaths: string[], source: EmitSource): Promise<void>;
99
+ flush(changedMap: FieldChangeMap, source: EmitSource): Promise<void>;
100
100
  /**
101
101
  * 执行某个 path 对应的 enrichers
102
102
  */
@@ -1,10 +1,11 @@
1
1
  import { Doc } from '../../../core';
2
+ import { FieldChangeDetail } from '../../../core/data/DataManager';
2
3
  import { BusinessSubTableRuntimeContext } from './table-runtime-shared';
3
4
  import { RuleContext, SelectBehaviorDef } from '../types';
4
5
  /** 解析级联上游字段值:行数据 → 隐式主表字段 → 主表同名字段 */
5
6
  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;
7
+ /** 字段值变更后:重建级联查询参数;仅上游值实质变化时清空下游 */
8
+ export declare function applyBusinessTableLinkageOnFieldChange(doc: Doc, changedPath: string, fieldChange?: FieldChangeDetail): void;
8
9
  /** 子表插行后:应用级联查询参数 */
9
10
  export declare function applyBusinessTableLinkageOnRowInit(doc: Doc, subFieldKey: string, rowIndex: number): void;
10
11
  /** 文档初始化后:应用级联查询参数 */
@@ -21,4 +22,4 @@ export declare function resolveBusinessSelectLinkage(doc: Doc, options: {
21
22
  runtimeValuePath?: string;
22
23
  }): BusinessSelectLinkageResult | null;
23
24
  /** 上游字段变更时,同步清空下游字段 */
24
- export declare function buildLinkageDownstreamClears(doc: Doc, changedPaths: string[]): Record<string, undefined>;
25
+ export declare function buildLinkageDownstreamClears(doc: Doc, pendingUpdates: Record<string, unknown>): Record<string, undefined>;
@@ -1,7 +1,8 @@
1
1
  import { Doc } from '../../../core';
2
+ import { FieldChangeDetail } from '../../../core/data/DataManager';
2
3
  export { collectBusinessSubTableContexts, parseSubtableFieldPath, type BusinessSubTableRuntimeContext, } from './table-runtime-shared';
3
4
  /** 字段值变更后:应用 onFieldChange 规则 */
4
- export declare function applyBusinessTableRulesOnFieldChange(doc: Doc, changedPath: string): void;
5
+ export declare function applyBusinessTableRulesOnFieldChange(doc: Doc, changedPath: string, fieldChange?: FieldChangeDetail): void;
5
6
  /** 子表插行后:应用 onRowInit + always */
6
7
  export declare function applyBusinessTableRulesOnRowInit(doc: Doc, subFieldKey: string, rowIndex: number): void;
7
8
  /** 文档初始化后:应用 always + onRowInit 规则 */
@@ -1,4 +1,5 @@
1
1
  import { Doc } from '../../../core';
2
+ import { FieldChangeDetail, FieldChangeMap } from '../../../core/data/DataManager';
2
3
  export { buildLinkageDownstreamClears, resolveBusinessSelectLinkage, type BusinessSelectLinkageResult, } from './linkage-engine';
3
4
  export { collectBusinessSubTableContexts, parseSubtableFieldPath, type BusinessSubTableRuntimeContext, } from './table-runtime-shared';
4
5
  /** 文档初始化 */
@@ -6,4 +7,6 @@ export declare function applyBusinessTableRuntimeOnInit(doc: Doc): void;
6
7
  /** 子表插行 */
7
8
  export declare function applyBusinessTableRuntimeOnRowInit(doc: Doc, subFieldKey: string, rowIndex: number): void;
8
9
  /** 字段变更 */
9
- export declare function applyBusinessTableRuntimeOnFieldChange(doc: Doc, changedPath: string): void;
10
+ export declare function applyBusinessTableRuntimeOnFieldChange(doc: Doc, changedPath: string, fieldChange?: FieldChangeDetail): void;
11
+ /** 批量字段变更 */
12
+ export declare function applyBusinessTableRuntimeOnFieldChanges(doc: Doc, changedMap: FieldChangeMap): void;
@@ -1,4 +1,5 @@
1
1
  import { Doc } from '../../../core';
2
+ import { FieldChangeDetail } from '../../../core/data/DataManager';
2
3
  import { BusinessFieldProfile, BusinessSubTableProfile, RuleContext } from '../types';
3
4
  export interface BusinessSubTableRuntimeContext {
4
5
  profile: BusinessSubTableProfile;
@@ -37,4 +38,8 @@ export declare function forEachBusinessTableRow(doc: Doc, runtimeCtx: BusinessSu
37
38
  rowIndex?: number;
38
39
  changedFieldKey?: string;
39
40
  } | undefined, iteratee: (ctx: RuleContext) => void): void;
41
+ /** 判断字段值是否实质未变(用于避免同值 set 误触发级联清空) */
42
+ export declare function isSameFieldValue(a: unknown, b: unknown): boolean;
43
+ /** 上游字段变更是否应触发下游清空 */
44
+ export declare function shouldClearDownstreamForFieldChange(change?: FieldChangeDetail): boolean;
40
45
  export {};