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

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 (61) hide show
  1. package/dist/assets/svgs/table/index.d.ts +28 -0
  2. package/dist/base/checkbox/src/checkbox-group.vue.d.ts +1 -1
  3. package/dist/base/date-time-picker/src/DateTimePicker.vue.d.ts +1 -1
  4. package/dist/base/form-item/src/form-item.vue.d.ts +1 -1
  5. package/dist/base/icon/src/icon.vue.d.ts +1 -1
  6. package/dist/base/input/src/input.vue.d.ts +8 -8
  7. package/dist/base/input/src/text-area.vue.d.ts +6 -6
  8. package/dist/base/radio/src/radio-group.vue.d.ts +1 -1
  9. package/dist/base/rdo-tree-select/src/rdo-tree-select.vue.d.ts +1 -1
  10. package/dist/base/select/src/basic-select.vue.d.ts +1 -1
  11. package/dist/base/select/src/searchable-select.vue.d.ts +2 -2
  12. package/dist/base/switch/src/switch.vue.d.ts +1 -1
  13. package/dist/base/table/src/table.vue.d.ts +1 -1
  14. package/dist/capabilities/panel/schema/types.d.ts +1 -0
  15. package/dist/core/cursor/render/cursor-renderer.vue.d.ts +2 -2
  16. package/dist/core/data/DataManager.d.ts +8 -0
  17. package/dist/core/data/post-change-pipeline.d.ts +5 -5
  18. package/dist/core/model/document/wtcRegionRef.d.ts +1 -1
  19. package/dist/core/model/logic/subtable/repeating/RepeatingRegion.d.ts +15 -4
  20. package/dist/domain/active/active-types.d.ts +2 -0
  21. package/dist/domain/field/field-type.d.ts +9 -1
  22. package/dist/domain/table/_shared/linkage-engine.d.ts +4 -3
  23. package/dist/domain/table/_shared/rule-engine.d.ts +2 -1
  24. package/dist/domain/table/_shared/runtime-engine.d.ts +4 -1
  25. package/dist/domain/table/_shared/table-runtime-shared.d.ts +5 -0
  26. package/dist/domain/table/hooks/on-repeating-default-props.d.ts +3 -0
  27. package/dist/domain/table/index.d.ts +1 -0
  28. package/dist/domain/table/types.d.ts +2 -0
  29. package/dist/index.es.js +2712 -2626
  30. package/dist/runtime/designer/panel/panel-nav.d.ts +13 -0
  31. package/dist/runtime/designer/ribbon/svg/table/table-svg-icon.vue.d.ts +11 -0
  32. package/dist/runtime/renderer/dialogs/device-scan/device-scan-dialog.vue.d.ts +18 -18
  33. package/dist/runtime/renderer/dropdowns/components/tables/rdo-table-dropdown.vue.d.ts +18 -18
  34. package/dist/runtime/renderer/dropdowns/components/tables/table-dropdown.vue.d.ts +18 -18
  35. package/dist/suites/edhr/manifest/field/material/location-manifest.d.ts +2 -0
  36. package/dist/suites/edhr/manifest/field/material/warehouse-manifest.d.ts +2 -0
  37. package/dist/suites/edhr/panel-router/index.d.ts +2 -1
  38. package/dist/suites/edhr/panel-schema/2d-table/2d-table.basic.d.ts +1 -14
  39. package/dist/suites/edhr/panel-schema/_shared/create-table-panel-schema.d.ts +3 -0
  40. package/dist/suites/edhr/panel-schema/_shared/data-group-2d-title.d.ts +7 -0
  41. package/dist/suites/edhr/panel-schema/check-table/check-table.basic.d.ts +1 -14
  42. package/dist/suites/edhr/panel-schema/data-group-2d/data-group-2d.basic.d.ts +2 -0
  43. package/dist/suites/edhr/panel-schema/dynamic-table/dynamic-table.basic.d.ts +1 -14
  44. package/dist/suites/edhr/panel-schema/fixed-table/fixed-table.basic.d.ts +1 -14
  45. package/dist/suites/edhr/panel-schema/index.d.ts +8 -70
  46. package/dist/suites/edhr/panel-schema/material-consume-table/material-consume-table.basic.d.ts +1 -14
  47. package/dist/suites/edhr/panel-schema/warehouse-in-out-table/warehouse-in-out-table.basic.d.ts +1 -0
  48. package/dist/suites/edhr/panel-schema/warehouse-inventory-table/warehouse-inventory-table.basic.d.ts +1 -0
  49. package/dist/suites/shared/hooks/useSubTablePanelBase.d.ts +14 -0
  50. package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/barcode-parsing-rules-string-editor.vue.d.ts +21 -0
  51. package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/qrcode-parse-editor.vue.d.ts +17 -0
  52. package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/qrcode-parse-modal.vue.d.ts +20 -0
  53. package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/utils.d.ts +5 -0
  54. package/dist/suites/shared/panel/modules/sub-table-basic-info.vue.d.ts +31 -0
  55. package/dist/suites/shared/panel/modules/sub-table-grid-info.vue.d.ts +12 -0
  56. package/dist/word.css +191 -250
  57. package/package.json +1 -1
  58. package/dist/suites/edhr/panel-schema/fixed-table/FixedTablePanel.vue.d.ts +0 -8
  59. package/dist/suites/edhr/panel-schema/{2d-table/_2DTablePanel.vue.d.ts → _shared/BoundedSubTablePanel.vue.d.ts} +0 -0
  60. package/dist/suites/edhr/panel-schema/{check-table/CheckTablePanel.vue.d.ts → _shared/RepeatingSubTablePanel.vue.d.ts} +0 -0
  61. package/dist/suites/edhr/panel-schema/{dynamic-table/DynamicTablePanel.vue.d.ts → warehouse-inventory-table/WarehouseInventoryTablePanel.vue.d.ts} +1 -1
@@ -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;
@@ -19,8 +19,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
19
19
  onChange?: ((...args: any[]) => any) | undefined;
20
20
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
21
21
  }>, {
22
- disabled: boolean;
23
22
  size: string;
23
+ disabled: boolean;
24
24
  modelValue: Array<string | number | boolean>;
25
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
26
26
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -11,8 +11,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
11
11
  "onUpdate:modelValue"?: ((v: string | undefined) => any) | undefined;
12
12
  }>, {
13
13
  disabled: boolean;
14
- placeholder: string;
15
14
  format: string;
15
+ placeholder: string;
16
16
  calendarProps: any;
17
17
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
18
18
  dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
@@ -16,8 +16,8 @@ declare function __VLS_template(): {
16
16
  };
17
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
18
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
- required: boolean;
20
19
  size: string;
20
+ required: boolean;
21
21
  inline: boolean;
22
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
23
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -5,8 +5,8 @@ type __VLS_Props = {
5
5
  icon: string;
6
6
  };
7
7
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
- color: string;
9
8
  size: number | string;
10
9
  version: "v1" | "v2";
10
+ color: string;
11
11
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
12
12
  export default _default;
@@ -15,7 +15,7 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
15
15
  focus: () => void;
16
16
  blur: () => void;
17
17
  select: () => void;
18
- inputRef: import('vue').Ref<HTMLTextAreaElement | HTMLInputElement | null, HTMLTextAreaElement | HTMLInputElement | null>;
18
+ inputRef: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | null, HTMLInputElement | HTMLTextAreaElement | null>;
19
19
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
20
  input: (value: string | number, event: Event) => any;
21
21
  search: (value: string | number) => any;
@@ -25,8 +25,8 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
25
25
  keydown: (event: KeyboardEvent) => any;
26
26
  keypress: (event: KeyboardEvent) => any;
27
27
  keyup: (event: KeyboardEvent) => any;
28
- clear: () => any;
29
28
  "update:modelValue": (value: string | number) => any;
29
+ clear: () => any;
30
30
  pressEnter: (event: KeyboardEvent) => any;
31
31
  }, string, import('vue').PublicProps, Readonly<GctInputProps> & Readonly<{
32
32
  onInput?: ((value: string | number, event: Event) => any) | undefined;
@@ -37,21 +37,19 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
37
37
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
38
38
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
39
39
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
40
- onClear?: (() => any) | undefined;
41
40
  "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
41
+ onClear?: (() => any) | undefined;
42
42
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
43
43
  }>, {
44
44
  name: string;
45
45
  type: import('./types').InputType;
46
46
  id: string;
47
- readonly: boolean;
48
- disabled: boolean;
49
47
  size: import('./types').InputSize;
50
- autocomplete: string;
51
- spellcheck: boolean;
52
- placeholder: string;
48
+ disabled: boolean;
53
49
  modelValue: string | number;
50
+ placeholder: string;
54
51
  prefix: string;
52
+ readonly: boolean;
55
53
  suffix: string;
56
54
  addonBefore: string;
57
55
  addonAfter: string;
@@ -60,9 +58,11 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
60
58
  showPasswordToggle: boolean;
61
59
  maxLength: number;
62
60
  autofocus: boolean;
61
+ autocomplete: string;
63
62
  rows: number;
64
63
  bordered: boolean;
65
64
  showSearchButton: boolean;
65
+ spellcheck: boolean;
66
66
  customStyle: Record<string, string | number>;
67
67
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
68
68
  inputRef: HTMLInputElement;
@@ -23,8 +23,8 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
23
23
  keydown: (event: KeyboardEvent) => any;
24
24
  keypress: (event: KeyboardEvent) => any;
25
25
  keyup: (event: KeyboardEvent) => any;
26
- clear: () => any;
27
26
  "update:modelValue": (value: string | number) => any;
27
+ clear: () => any;
28
28
  pressEnter: (event: KeyboardEvent) => any;
29
29
  }, string, import('vue').PublicProps, Readonly<GctInputProps> & Readonly<{
30
30
  onInput?: ((value: string | number, event: Event) => any) | undefined;
@@ -35,23 +35,23 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
35
35
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
36
36
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
37
37
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
38
- onClear?: (() => any) | undefined;
39
38
  "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
39
+ onClear?: (() => any) | undefined;
40
40
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
41
41
  }>, {
42
42
  name: string;
43
- readonly: boolean;
44
43
  disabled: boolean;
45
- autocomplete: string;
46
- spellcheck: boolean;
47
- placeholder: string;
48
44
  modelValue: string | number;
45
+ placeholder: string;
46
+ readonly: boolean;
49
47
  allowClear: boolean;
50
48
  showCount: boolean;
51
49
  maxLength: number;
52
50
  autofocus: boolean;
51
+ autocomplete: string;
53
52
  rows: number;
54
53
  bordered: boolean;
54
+ spellcheck: boolean;
55
55
  customStyle: Record<string, string | number>;
56
56
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
57
57
  textareaRef: HTMLTextAreaElement;
@@ -20,8 +20,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
20
20
  onChange?: ((...args: any[]) => any) | undefined;
21
21
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
22
22
  }>, {
23
- disabled: boolean;
24
23
  size: string;
24
+ disabled: boolean;
25
25
  optionType: string;
26
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
27
27
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -22,12 +22,12 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
22
22
  "onUpdate:fullPathValue"?: ((value?: string | null | undefined) => any) | undefined;
23
23
  }>, {
24
24
  disabled: boolean;
25
- pageSize: number;
26
25
  placeholder: string;
27
26
  popperWidth: number;
28
27
  allowClear: boolean;
29
28
  disabledParent: boolean;
30
29
  parentToDefault: boolean;
30
+ pageSize: number;
31
31
  modelCategory: string;
32
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
33
33
  dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
@@ -67,8 +67,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
67
67
  "onUpdate:modelValue"?: ((val: string | number | (string | number)[]) => any) | undefined;
68
68
  }>, {
69
69
  disabled: boolean;
70
- options: DropdownOption[];
71
70
  placeholder: string;
71
+ options: DropdownOption[];
72
72
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
73
73
  dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
74
74
  P: {};
@@ -15,10 +15,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
15
15
  onChange?: ((val?: string | number | undefined, item?: DropdownOption | undefined) => any) | undefined;
16
16
  "onUpdate:modelValue"?: ((val?: string | number | undefined) => any) | undefined;
17
17
  }>, {
18
- readonly: boolean;
19
18
  disabled: boolean;
20
- options: DropdownOption[];
21
19
  placeholder: string;
20
+ options: DropdownOption[];
21
+ readonly: boolean;
22
22
  allowClear: boolean;
23
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
24
24
  rootRef: HTMLDivElement;
@@ -10,8 +10,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
10
10
  onChange?: ((...args: any[]) => any) | undefined;
11
11
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
12
12
  }>, {
13
- disabled: boolean;
14
13
  size: string;
14
+ disabled: boolean;
15
15
  modelValue: boolean;
16
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
17
17
  export default _default;
@@ -32,8 +32,8 @@ declare const __VLS_component: import('vue').DefineComponent<TableProps, {}, {},
32
32
  "onRow-click"?: ((row: TableRow) => any) | undefined;
33
33
  }>, {
34
34
  size: "small" | "middle" | "large";
35
- multiple: boolean;
36
35
  loading: boolean;
36
+ multiple: boolean;
37
37
  columns: TableColumn[];
38
38
  stripe: boolean;
39
39
  selectable: boolean;
@@ -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 */
@@ -9,10 +9,10 @@ type __VLS_Props = {
9
9
  visible?: boolean;
10
10
  };
11
11
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
- caretWidth: number;
12
+ visible: boolean;
13
13
  caretColor: string;
14
+ caretWidth: number;
14
15
  blinkInterval: number;
15
16
  alwaysVisibleAfterEventMs: number;
16
- visible: boolean;
17
17
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
18
  export default _default;
@@ -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
  */
@@ -29,7 +29,7 @@ export declare const SUB_TABLE_REGION_TYPES: readonly ["repeating", "bounded", "
29
29
  * 子表 layout 类型
30
30
  * Ribbon 面板、子表主题色均使用此类型;主题配置见 @/domain/table 各 Profile.theme
31
31
  */
32
- export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table' | 'warehouse-in-out-table';
32
+ export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table' | 'warehouse-in-out-table' | 'warehouse-inventory-table';
33
33
  /** 表头 layout 类型 */
34
34
  export type TableHeaderLayoutType = 'table-header';
35
35
  /** 所有子表表格 layout 类型 */
@@ -2,13 +2,24 @@ import { Region, RegionOptions } from '../../base/Region';
2
2
  import { RegionJson } from '../../../types';
3
3
  import { Wtbl } from '../../../document';
4
4
  import { SubTableLayoutType } from '../../../document/wtcRegionRef';
5
- export type RepeatingWidgetPropsMeta = {
5
+ export type RepeatingWidgetPropsBase = {
6
6
  /** 快速填报 */
7
7
  quickFill: boolean;
8
- /** UI layout 类型;默认 dynamic-table,出入库明细等为 warehouse-in-out-table */
9
- layoutType?: SubTableLayoutType;
10
- [key: string]: any;
11
8
  };
9
+ export type DynamicTableProps = RepeatingWidgetPropsBase & {
10
+ layoutType?: 'dynamic-table';
11
+ };
12
+ export type WarehouseInOutTableProps = RepeatingWidgetPropsBase & {
13
+ layoutType: 'warehouse-in-out-table';
14
+ };
15
+ export type WarehouseInventoryTableProps = RepeatingWidgetPropsBase & {
16
+ layoutType: 'warehouse-inventory-table';
17
+ /** 库存自动加载 */
18
+ autoLoadInventory?: boolean;
19
+ /** 条码解析规则 */
20
+ barcode_parsing_rules_id_?: string;
21
+ };
22
+ export type RepeatingWidgetPropsMeta = DynamicTableProps | WarehouseInOutTableProps | WarehouseInventoryTableProps;
12
23
  export type RepeatingWidgetMeta = {
13
24
  props: RepeatingWidgetPropsMeta;
14
25
  };
@@ -12,6 +12,8 @@ export type PanelType =
12
12
  | 'panel:dynamic-table'
13
13
  /** 出入库明细表 */
14
14
  | 'panel:warehouse-in-out-table'
15
+ /** 库存盘点表 */
16
+ | 'panel:warehouse-inventory-table'
15
17
  /** 二维表 */
16
18
  | 'panel:2d-table'
17
19
  /** 物料消耗表 */
@@ -319,5 +319,13 @@ export declare enum FIELD_TYPE {
319
319
  /**
320
320
  * 仓管员
321
321
  */
322
- WAREHOUSE_MANAGER = "warehouse_manager"
322
+ WAREHOUSE_MANAGER = "warehouse_manager",
323
+ /**
324
+ * 仓库
325
+ */
326
+ WAREHOUSE = "warehouse",
327
+ /**
328
+ * 库位
329
+ */
330
+ LOCATION = "location"
323
331
  }
@@ -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 {};
@@ -0,0 +1,3 @@
1
+ import { SubTableLayoutType } from '../../../core/model/document/wtcRegionRef';
2
+ import { RepeatingWidgetPropsMeta } from '../../../core/model/logic/subtable/repeating/RepeatingRegion';
3
+ export declare function getDefaultRepeatingWidgetProps(layoutType?: SubTableLayoutType): RepeatingWidgetPropsMeta;
@@ -10,3 +10,4 @@ export * from './_shared/table-theme';
10
10
  export * from './_shared/rule-engine';
11
11
  export * from './hooks/on-subtable-create';
12
12
  export * from './hooks/on-field-attach';
13
+ export * from './hooks/on-repeating-default-props';
@@ -70,6 +70,8 @@ interface TableProfileBase {
70
70
  layoutType: SubTableLayoutType;
71
71
  /** 创建子表时执行的指令 */
72
72
  command: SubTableCommand;
73
+ /** 创建 repeating 子表时合并到 widgetMeta.props 的默认值 */
74
+ defaultWidgetProps?: Record<string, unknown>;
73
75
  /** 是否在 Ribbon 中启用,false 时显示为 disabled */
74
76
  enabled?: boolean;
75
77
  /** 设计态子表区域主题色 */