@gct-paas/word 0.2.5 → 0.2.7-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 (132) hide show
  1. package/dist/assets/svgs/table/index.d.ts +1 -0
  2. package/dist/base/input/src/input-number.vue.d.ts +1 -0
  3. package/dist/base/message/src/Message.vue.d.ts +2 -0
  4. package/dist/base/message/src/message.d.ts +2 -0
  5. package/dist/base/modal/src/modal.type.d.ts +3 -1
  6. package/dist/base/select/src/basic-select.vue.d.ts +16 -4
  7. package/dist/base/utils/image-size-util.d.ts +11 -6
  8. package/dist/capabilities/model-field-runtime/types/field.d.ts +4 -0
  9. package/dist/core/command/base/FloatingFieldCommand.d.ts +9 -0
  10. package/dist/core/command/commands/DeleteRow.d.ts +1 -1
  11. package/dist/core/command/commands/InsertFloatingField.d.ts +9 -0
  12. package/dist/core/command/commands/MoveFloatingField.d.ts +10 -0
  13. package/dist/core/command/commands/RemoveFloatingField.d.ts +12 -0
  14. package/dist/core/command/types.d.ts +14 -0
  15. package/dist/core/data/DataManager.d.ts +6 -1
  16. package/dist/core/data/enrichers/udi-enricher.d.ts +23 -0
  17. package/dist/core/data/formula/business-functions.d.ts +4 -0
  18. package/dist/core/data/types/runtime-config.d.ts +11 -0
  19. package/dist/core/event/handlers/IMEHandler.d.ts +1 -0
  20. package/dist/core/index.d.ts +2 -0
  21. package/dist/core/layout/handlers/fields/signature-decoration-layout.d.ts +14 -0
  22. package/dist/core/model/document/wtcRegionRef.d.ts +1 -1
  23. package/dist/core/model/logic/subtable/repeating/RepeatingRegion.d.ts +4 -1
  24. package/dist/core/model/logic/subtable/shared/merged-table-range.d.ts +4 -0
  25. package/dist/core/model/overlays/Wlayout.d.ts +4 -0
  26. package/dist/core/runtime/DocumentRuntimeManager.d.ts +34 -0
  27. package/dist/core/view/Doc.d.ts +5 -0
  28. package/dist/core/view/runs/ImageRun.d.ts +9 -0
  29. package/dist/core/widget/types.d.ts +2 -2
  30. package/dist/domain/active/active-types.d.ts +3 -1
  31. package/dist/domain/constants/enum/signature.d.ts +14 -0
  32. package/dist/domain/document-rule/index.d.ts +3 -0
  33. package/dist/domain/document-rule/runtime/decision-rule-evaluator.d.ts +13 -0
  34. package/dist/domain/document-rule/runtime/document-rule-runtime.d.ts +19 -0
  35. package/dist/domain/document-rule/types.d.ts +50 -0
  36. package/dist/domain/field/field-props-schema-type.d.ts +1 -1
  37. package/dist/domain/field/field-type.d.ts +58 -0
  38. package/dist/domain/field/seal/seal-binding.d.ts +19 -0
  39. package/dist/domain/field/seal/seal-display.d.ts +32 -0
  40. package/dist/domain/field/seal/seal-value.d.ts +39 -0
  41. package/dist/domain/table/business/device/maintenance/index.d.ts +1 -0
  42. package/dist/domain/table/business/device/maintenance/profile/field-keys.d.ts +9 -0
  43. package/dist/domain/table/business/device/maintenance/profile/fields.d.ts +2 -0
  44. package/dist/domain/table/business/device/maintenance/profile/index.d.ts +3 -0
  45. package/dist/domain/table/business/device/point-inspection/index.d.ts +1 -0
  46. package/dist/domain/table/business/device/point-inspection/profile/field-keys.d.ts +9 -0
  47. package/dist/domain/table/business/device/point-inspection/profile/fields.d.ts +2 -0
  48. package/dist/domain/table/business/device/point-inspection/profile/index.d.ts +3 -0
  49. package/dist/domain/table/business/device/runtime/device-signature-lock-engine.d.ts +13 -0
  50. package/dist/domain/table/business/device/signature-lock.d.ts +26 -0
  51. package/dist/domain/table/business/material/material-requisition/profile/field-keys.d.ts +1 -1
  52. package/dist/domain/table/business/material/material-substitution/actions/scan.d.ts +3 -0
  53. package/dist/domain/table/business/material/material-substitution/index.d.ts +3 -0
  54. package/dist/domain/table/business/material/material-substitution/profile/field-keys.d.ts +39 -0
  55. package/dist/domain/table/business/material/material-substitution/profile/fields.d.ts +2 -0
  56. package/dist/domain/table/business/material/material-substitution/profile/index.d.ts +4 -0
  57. package/dist/domain/table/business/material/material-substitution/runtime/register-handlers.d.ts +1 -0
  58. package/dist/domain/table/business/material/material-substitution/runtime/row-change-handlers.d.ts +3 -0
  59. package/dist/domain/table/business/material/types.d.ts +2 -1
  60. package/dist/domain/table/design/hooks/on-bounded-default-props.d.ts +3 -0
  61. package/dist/domain/table/design/ribbon-options.d.ts +2 -0
  62. package/dist/domain/table/design/sub-model-matcher.d.ts +2 -0
  63. package/dist/domain/table/index.d.ts +2 -0
  64. package/dist/domain/table/registry.d.ts +1 -1
  65. package/dist/domain/table/runtime/table-runtime.d.ts +1 -0
  66. package/dist/domain/table/types.d.ts +11 -3
  67. package/dist/index.es.js +30078 -6424
  68. package/dist/runtime/canvas/node/seal-overlay.vue.d.ts +6 -0
  69. package/dist/runtime/canvas/table/render/material-consume/bom-validator.d.ts +10 -2
  70. package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts +6 -0
  71. package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/fixed-quick-fill-layout.d.ts +30 -0
  72. package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/quick-fill.util.d.ts +2 -1
  73. package/dist/runtime/designer/ribbon/hooks/useDhrEdition.d.ts +7 -0
  74. package/dist/runtime/interface/computed.d.ts +1 -1
  75. package/dist/runtime/renderer/dialogs/device-scan/submit-device-scan.d.ts +3 -0
  76. package/dist/runtime/renderer/dialogs/document-rule-prompt/document-rule-prompt.vue.d.ts +5 -0
  77. package/dist/runtime/renderer/dialogs/document-rule-prompt/open-document-rule-prompt.d.ts +2 -0
  78. package/dist/runtime/renderer/dialogs/seal/open-seal-flow.d.ts +3 -0
  79. package/dist/runtime/renderer/dialogs/seal/seal-api.d.ts +17 -0
  80. package/dist/runtime/renderer/dialogs/seal/seal-auth-dialog.vue.d.ts +60 -0
  81. package/dist/runtime/renderer/dialogs/seal/seal-confirm-dialog.vue.d.ts +9 -0
  82. package/dist/runtime/renderer/dialogs/seal/seal-runtime.d.ts +30 -0
  83. package/dist/runtime/renderer/dialogs/seal/types.d.ts +24 -0
  84. package/dist/runtime/renderer/dialogs/seal/use-seal-confirm.d.ts +27 -0
  85. package/dist/runtime/renderer/dialogs/signature/authentication/signature-authentication.vue.d.ts +27 -0
  86. package/dist/runtime/renderer/dialogs/signature/authentication/types.d.ts +30 -0
  87. package/dist/runtime/renderer/dialogs/signature/authentication/useSignatureAuthentication.d.ts +29 -0
  88. package/dist/runtime/renderer/dialogs/signature/logic.d.ts +5 -1
  89. package/dist/runtime/renderer/dialogs/signature/signature-autofill-runtime.d.ts +14 -0
  90. package/dist/runtime/renderer/dialogs/signature/signature-dialog.vue.d.ts +54 -1
  91. package/dist/runtime/renderer/dialogs/upload-image/base-upload-image.vue.d.ts +1 -0
  92. package/dist/runtime/renderer/dialogs/upload-image/upload-image-dialog.vue.d.ts +1 -0
  93. package/dist/runtime/renderer/dropdowns/components/tables/columns/business/material-consume-history.d.ts +17 -0
  94. package/dist/runtime/renderer/dropdowns/components/tables/composables/useSearchEnter.d.ts +18 -0
  95. package/dist/runtime/renderer/dropdowns/components/tables/composables/useSelectTable.d.ts +2 -0
  96. package/dist/runtime/renderer/dropdowns/components/tables/composables/useTableDropdown.d.ts +2 -1
  97. package/dist/runtime/renderer/dropdowns/components/tables/table-option-dropdown.vue.d.ts +2 -2
  98. package/dist/runtime/validation/layout.d.ts +20 -0
  99. package/dist/runtime/validation/useFormValidator.d.ts +4 -0
  100. package/dist/sdk/doc-runtime/composables/useDocumentRulePrompt.d.ts +3 -0
  101. package/dist/sdk/doc-runtime/factories/useDocumentFactory.d.ts +5 -0
  102. package/dist/sdk/setup.d.ts +2 -0
  103. package/dist/sdk/types/index.d.ts +7 -0
  104. package/dist/sdk/vue/index.d.ts +6 -0
  105. package/dist/suites/edhr/component/gct-seal-render.vue.d.ts +7 -0
  106. package/dist/suites/edhr/manifest/field/_common_/basic.d.ts +5 -0
  107. package/dist/suites/edhr/manifest/field/business/inspection-module-qty-manifest.d.ts +2 -0
  108. package/dist/suites/edhr/manifest/field/business/udi-manifest.d.ts +2 -0
  109. package/dist/suites/edhr/manifest/field/logic/seal-manifest.d.ts +2 -0
  110. package/dist/suites/edhr/manifest/field/object-type/device-parameter-object-manifest.d.ts +2 -0
  111. package/dist/suites/edhr/manifest/field/object-type/inspection-parameter-object-manifest.d.ts +2 -0
  112. package/dist/suites/edhr/manifest/field/object-type/process-parameter-object-manifest.d.ts +2 -0
  113. package/dist/suites/edhr/manifest/field/trace/inspection-container-manifest.d.ts +2 -0
  114. package/dist/suites/edhr/manifest/field/trace/sterilization-date-manifest.d.ts +2 -0
  115. package/dist/suites/edhr/panel-schema/index.d.ts +1 -0
  116. package/dist/suites/edhr/panel-schema/material-substitution-table/material-substitution-table.basic.d.ts +1 -0
  117. package/dist/suites/edhr/panel-schema/rule/components/add-rule-button.vue.d.ts +8 -3
  118. package/dist/suites/edhr/panel-schema/rule/components/decision-rule-condition.vue.d.ts +19 -0
  119. package/dist/suites/edhr/panel-schema/rule/components/decision-rule-group.vue.d.ts +16 -0
  120. package/dist/suites/edhr/panel-schema/rule/modals/inspection-decision-modal.vue.d.ts +11 -0
  121. package/dist/suites/edhr/panel-schema/rule/modals/open-inspection-decision-modal.d.ts +8 -0
  122. package/dist/suites/edhr/panel-schema/rule/types.d.ts +3 -0
  123. package/dist/suites/edhr/panel-schema/rule/use-rules-config.d.ts +12 -0
  124. package/dist/suites/edhr/panel-schema/rule/utils/decision-rule.d.ts +34 -0
  125. package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-node.vue.d.ts +2 -0
  126. package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-select.vue.d.ts +4 -0
  127. package/dist/suites/shared/panel/config/editor/ref-autofill-editor/types.d.ts +2 -0
  128. package/dist/suites/shared/panel/modules/field-formula-module/field-formula-module.vue.d.ts +1 -0
  129. package/dist/suites/shared/panel/utils/default-value-visibility.d.ts +3 -0
  130. package/dist/utils/pdf/collect-seal-draw-ops.d.ts +4 -0
  131. package/dist/word.css +1414 -610
  132. package/package.json +4 -4
@@ -24,6 +24,7 @@ export declare const TABLE_BUSINESS_SVG: {
24
24
  readonly 'material-consume': string;
25
25
  readonly 'material-balance': string;
26
26
  readonly 'material-requisition': string;
27
+ readonly 'material-substitution': string;
27
28
  readonly 'check-table': string;
28
29
  readonly 'pretreatment-list': string;
29
30
  readonly 'entrust-steril-batch-list': string;
@@ -21,6 +21,7 @@ type __VLS_Props = {
21
21
  emptyValue?: string | number;
22
22
  /** 小数截取处理规则 */
23
23
  roundingMode?: 1 | 4 | 6;
24
+ maxlength?: number;
24
25
  };
25
26
  declare function __VLS_template(): {
26
27
  attrs: Partial<{}>;
@@ -3,8 +3,10 @@ interface MessageItem {
3
3
  id: number;
4
4
  type: 'info' | 'success' | 'warning' | 'error';
5
5
  message: string | VNode;
6
+ title?: string;
6
7
  closeable: boolean;
7
8
  duration: number;
9
+ key?: string;
8
10
  timer?: number;
9
11
  startTime?: number;
10
12
  remaining: number;
@@ -2,8 +2,10 @@ import { VNode } from 'vue';
2
2
  export interface MessageOptions {
3
3
  type?: 'info' | 'success' | 'warning' | 'error';
4
4
  message: string | VNode | (() => VNode);
5
+ title?: string;
5
6
  duration?: number;
6
7
  closeable?: boolean;
8
+ key?: string;
7
9
  }
8
10
  declare function GctMessage(options: MessageOptions): void;
9
11
  declare namespace GctMessage {
@@ -5,7 +5,7 @@ export interface IModalInstance {
5
5
  setLoading: (v: boolean) => void;
6
6
  }
7
7
  export interface IModalContext extends IModalInstance {
8
- setOnConfirm: (fn: any) => void;
8
+ setOnConfirm: (fn: (ins: IModalInstance) => Promise<void> | void) => void;
9
9
  }
10
10
  export interface IModalOptions {
11
11
  title?: string;
@@ -13,6 +13,8 @@ export interface IModalOptions {
13
13
  bodyProps?: any;
14
14
  width?: number;
15
15
  height?: number;
16
+ /** 弹框最大高度,数字按 px,字符串可传 90vh 等 CSS 值。 */
17
+ maxHeight?: number | string;
16
18
  zIndex?: number;
17
19
  className?: string;
18
20
  closable?: boolean;
@@ -42,6 +42,10 @@ type __VLS_Props = {
42
42
  allowCreate?: boolean;
43
43
  /** 下拉选项是否可搜索 */
44
44
  searchable?: boolean;
45
+ /** 由外部请求搜索结果,跳过本地过滤 */
46
+ remote?: boolean;
47
+ /** 当前选中项的回显信息,可不在搜索结果中 */
48
+ selectedOption?: DropdownOption;
45
49
  };
46
50
  declare function __VLS_template(): {
47
51
  attrs: Partial<{}>;
@@ -58,6 +62,7 @@ declare function __VLS_template(): {
58
62
  'option-icon'?(_: {
59
63
  option: DropdownOption;
60
64
  }): any;
65
+ 'bottom-bar'?(_: {}): any;
61
66
  };
62
67
  refs: {
63
68
  dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
@@ -79,15 +84,21 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
79
84
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
80
85
  getRef: import('vue').Ref<any, any>;
81
86
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
87
+ search: (keyword: string) => any;
82
88
  edit: (option: DropdownOption) => any;
83
89
  click: (evt: any) => any;
84
- "update:modelValue": (val: string | number | (string | number)[]) => any;
85
- change: (val: string | number | (string | number)[], item?: DropdownOption | undefined) => any;
90
+ "update:modelValue": (val: string | number | (string | number)[] | undefined) => any;
91
+ change: (val: string | number | (string | number)[] | undefined, item?: DropdownOption | undefined) => any;
92
+ "dropdown-show": () => any;
93
+ "reach-bottom": () => any;
86
94
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
95
+ onSearch?: ((keyword: string) => any) | undefined;
87
96
  onEdit?: ((option: DropdownOption) => any) | undefined;
88
97
  onClick?: ((evt: any) => any) | undefined;
89
- "onUpdate:modelValue"?: ((val: string | number | (string | number)[]) => any) | undefined;
90
- onChange?: ((val: string | number | (string | number)[], item?: DropdownOption | undefined) => any) | undefined;
98
+ "onUpdate:modelValue"?: ((val: string | number | (string | number)[] | undefined) => any) | undefined;
99
+ onChange?: ((val: string | number | (string | number)[] | undefined, item?: DropdownOption | undefined) => any) | undefined;
100
+ "onDropdown-show"?: (() => any) | undefined;
101
+ "onReach-bottom"?: (() => any) | undefined;
91
102
  }>, {
92
103
  disabled: boolean;
93
104
  options: DropdownOption[];
@@ -96,6 +107,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
96
107
  allowClear: boolean;
97
108
  unremovableValues: Array<string | number>;
98
109
  searchable: boolean;
110
+ remote: boolean;
99
111
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
100
112
  dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
101
113
  P: {};
@@ -18,6 +18,11 @@ export interface ImageCropRect {
18
18
  width: number;
19
19
  height: number;
20
20
  }
21
+ /** 固定 360×204 兜底图同一比例,按 2 倍像素绘制 */
22
+ export declare const FALLBACK_SIGN_DISPLAY_SIZE: {
23
+ readonly width: 180;
24
+ readonly height: 102;
25
+ };
21
26
  /**
22
27
  * 根据图片原始尺寸 + 配置,计算最终显示尺寸
23
28
  */
@@ -34,11 +39,11 @@ export declare function computeContainLayout(natural: ImageSize, box: ImageSize)
34
39
  * 在目标框内等比缩放(contain),不压缩、不拉伸
35
40
  */
36
41
  export declare function computeContainDisplaySize(natural: ImageSize, box: ImageSize): ImageSize;
37
- /** 同步取无图签名缓存(布局重建时可避免先闪占位再异步补图) */
38
- export declare function getCachedSignatureImage(name: string, width?: number, height?: number, time?: number | string): HTMLImageElement | null;
42
+ /** 同步取无图签名缓存(布局重建时可避免先闪占位再异步补图)。宽高参数仅为兼容现有调用。 */
43
+ export declare function getCachedSignatureImage(name: string, _width?: number, _height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): HTMLImageElement | null;
39
44
  /**
40
- * 创建无图签名兜底图(用户名 + 电子签名 + 验证日期)
41
- * 按字段宽高绘制,显示框设多大,字就按多大排
45
+ * 创建无图签名兜底图
46
+ * 默认用户名 + 电子签名 + 验证日期;仅用户名时只绘制姓名
42
47
  */
43
- export declare function createSignatureImageDataUrl(name: string, width?: number, height?: number, time?: number | string): string;
44
- export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string): Promise<HTMLImageElement>;
48
+ export declare function createSignatureImageDataUrl(name: string, _width?: number, _height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): string;
49
+ export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): Promise<HTMLImageElement>;
@@ -16,6 +16,10 @@ export interface FieldMeta {
16
16
  bizType?: FIELD_TYPE;
17
17
  /** 是否必填 */
18
18
  required?: boolean;
19
+ /** 建字段时配置的默认值,拖入表单时用于初始化组件 */
20
+ defaultValue?: {
21
+ value?: unknown;
22
+ } | null;
19
23
  /** 字段创建类型 */
20
24
  createType: CreateType;
21
25
  /** 映射类型(公式,函数等实际映射的类型) */
@@ -0,0 +1,9 @@
1
+ import { CommandBase } from './CommandBase';
2
+ import { CommandType } from '../types';
3
+ /** Existing commands snapshot only the body; floating field commands also own their overlays. */
4
+ export declare abstract class FloatingFieldCommand<T extends CommandType> extends CommandBase<T> {
5
+ private overlays?;
6
+ private overlayIdentities?;
7
+ protected saveSnapshot(): import('../../model/types').RawElement | undefined;
8
+ protected restoreSnapshot(): void;
9
+ }
@@ -4,7 +4,7 @@ import { CommandBase, PostCommandContext } from '../base/CommandBase';
4
4
  /**
5
5
  * 表格行删除命令
6
6
  *
7
- * 删除指定索引处的行
7
+ * 删除指定行,或当前选区中同一表格的连续多行
8
8
  */
9
9
  export declare class DeleteRow extends CommandBase<'deleteRow'> {
10
10
  constructor(doc: Doc, payload?: CommandPayloadMap['deleteRow']);
@@ -0,0 +1,9 @@
1
+ import { FloatingFieldCommand } from '../base/FloatingFieldCommand';
2
+ import { WrField } from '../../model/document';
3
+ export declare class InsertFloatingField extends FloatingFieldCommand<'insertFloatingField'> {
4
+ protected execute(): Promise<{
5
+ wr: WrField;
6
+ pos: number;
7
+ side: "before";
8
+ } | null>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { FloatingFieldCommand } from '../base/FloatingFieldCommand';
2
+ export declare class MoveFloatingField extends FloatingFieldCommand<'moveFloatingField'> {
3
+ private fieldId?;
4
+ protected execute(): Promise<{
5
+ wr: import('../../model/document').WrField;
6
+ pos: number;
7
+ side: "after";
8
+ } | null>;
9
+ protected afterUndo(): import('../types').CursorMeta | null;
10
+ }
@@ -0,0 +1,12 @@
1
+ import { FloatingFieldCommand } from '../base/FloatingFieldCommand';
2
+ export declare class RemoveFloatingField extends FloatingFieldCommand<'removeFloatingField'> {
3
+ private fieldId?;
4
+ private bindingSnapshot;
5
+ protected execute(): Promise<{
6
+ wp: import('../../model/document').Wp;
7
+ pos: number;
8
+ side: "before";
9
+ } | null>;
10
+ protected restoreSnapshot(): void;
11
+ protected afterUndo(): import('../types').CursorMeta | null;
12
+ }
@@ -39,6 +39,9 @@ export declare const CommandType: {
39
39
  readonly insertField: "insertField";
40
40
  readonly insertPaperWidget: "insertPaperWidget";
41
41
  readonly insertFloatingOverlay: "insertFloatingOverlay";
42
+ readonly insertFloatingField: "insertFloatingField";
43
+ readonly moveFloatingField: "moveFloatingField";
44
+ readonly removeFloatingField: "removeFloatingField";
42
45
  readonly delete: "delete";
43
46
  readonly backspace: "backspace";
44
47
  readonly enter: "enter";
@@ -111,6 +114,17 @@ export type CommandPayloadMap = {
111
114
  hit: PointerHitResult;
112
115
  pageWidgetMeta: WidgetMeta;
113
116
  };
117
+ insertFloatingField: CommandPayload & {
118
+ hit: PointerHitResult;
119
+ widgetMeta: WidgetMeta;
120
+ };
121
+ moveFloatingField: CommandPayload & {
122
+ id: string;
123
+ position: import('../../domain/field/seal/seal-value').SealPosition;
124
+ };
125
+ removeFloatingField: CommandPayload & {
126
+ id: string;
127
+ };
114
128
  delete: CommandPayload & Record<string, never>;
115
129
  backspace: CommandPayload & Record<string, never>;
116
130
  enter: CommandPayload & Record<string, never>;
@@ -1,5 +1,5 @@
1
1
  import { Doc } from '../view/Doc';
2
- import { EmitSource, Data, PartialData, FieldRuntimeSpecificConfig, PostChangePipelineContext } from './types';
2
+ import { EmitSource, Data, PartialData, FieldRuntimeConstraint, FieldRuntimeSpecificConfig, PostChangePipelineContext } from './types';
3
3
  type JsonPath = string;
4
4
  type SubscriptionCallback = (newValue: any, oldValue: any) => void;
5
5
  /**
@@ -72,6 +72,11 @@ export declare class DataManager {
72
72
  setRuntimeSpecificConfig(entries: any): void;
73
73
  getFieldRuntimeSpecificConfig(path: JsonPath): FieldRuntimeSpecificConfig | undefined;
74
74
  setFieldRuntimeSpecificConfig(path: JsonPath, partial: FieldRuntimeSpecificConfig): void;
75
+ /**
76
+ * 原子替换某一功能来源施加的全部字段约束。
77
+ * 未出现在 constraintsByPath 中的旧约束会被清理,其他来源和普通运行时配置不受影响。
78
+ */
79
+ replaceFieldRuntimeConstraints(source: string, constraintsByPath: ReadonlyMap<JsonPath, FieldRuntimeConstraint>): void;
75
80
  /** 子表插行后:index 及之后的行配置下标 +1 */
76
81
  private shiftFieldRuntimeConfigAfterRowInsert;
77
82
  /** 子表删行后:移除该行配置,其后行配置下标 -1 */
@@ -0,0 +1,23 @@
1
+ import { Doc } from '../../view/Doc';
2
+ import { DataEnricherRegistration } from '../types';
3
+ import { FIELD_TYPE } from '../../../domain/field/field-type';
4
+ export interface UdiWidgetTarget {
5
+ valuePath: string;
6
+ }
7
+ type UdiWidgetInstance = {
8
+ widgetMeta?: {
9
+ field?: {
10
+ fieldType?: FIELD_TYPE;
11
+ };
12
+ };
13
+ valuePath?: string;
14
+ };
15
+ /** paramsConfig 中 containerId 优先;没有时使用 snId。 */
16
+ export declare function resolveUdiQuery(doc: Doc): Record<string, string> | undefined;
17
+ /** listAll 返回第一条 UDI;兼容接口返回 udi / name_ 的历史形态。 */
18
+ export declare function parseUdi(res: unknown): string | undefined;
19
+ /** 从单个 widget 实例解析 UDI enrich 目标。 */
20
+ export declare function tryCollectUdiTarget(instance: UdiWidgetInstance): UdiWidgetTarget | null;
21
+ /** UDI:按 paramsConfig.containerId / snId 查询并回填尚未赋值的字段。 */
22
+ export declare function createUdiEnricher(doc: Doc, targets: UdiWidgetTarget[]): DataEnricherRegistration;
23
+ export {};
@@ -0,0 +1,4 @@
1
+ export type FormulaRegister = (name: string, executor: (...args: any[]) => any) => void;
2
+ /** 更新当前表单的参数配置;未传入配置时清空上次的数据。 */
3
+ export declare function setFormulaParamsConfig(paramsConfig?: Record<string, any> | null): void;
4
+ export declare function registerFormulaFuncs(register?: FormulaRegister): void;
@@ -1,8 +1,19 @@
1
+ /**
2
+ * 独立运行时功能施加的字段约束。
3
+ *
4
+ * 多个来源互不覆盖,最终状态按“任一来源为 true”聚合。
5
+ */
6
+ export type FieldRuntimeConstraint = {
7
+ readonly?: boolean;
8
+ disabled?: boolean;
9
+ };
1
10
  /** 组件依赖按 runtime valuePath 写入的运行时配置(子表各行独立) */
2
11
  export type FieldRuntimeSpecificConfig = {
3
12
  newReadonly?: boolean;
4
13
  newRequired?: boolean;
5
14
  newDisabled?: boolean;
15
+ /** 按功能来源隔离的强制约束,避免解除某项约束时覆盖其他运行时规则 */
16
+ runtimeConstraints?: Record<string, FieldRuntimeConstraint>;
6
17
  /** assignment 策略「始终覆盖」时按行不可输入 */
7
18
  cannotInput?: boolean;
8
19
  /** 实例数字段:用户手填后不再被 API 回填覆盖 */
@@ -16,6 +16,7 @@ export declare class IMEHandler implements IEventHandler {
16
16
  private handleInput;
17
17
  private handlePaste;
18
18
  private handleKeydown;
19
+ private tryRemoveSelectedSeal;
19
20
  /** 入队文本,延迟批量执行 InsertText */
20
21
  private enqueueInsert;
21
22
  private handleCommitValidate;
@@ -9,6 +9,8 @@ export { validateTextWidgetMarker } from './layout/logic/LayoutBuilder';
9
9
  export { CommandType } from './command/types';
10
10
  export { ModelConverter } from './model';
11
11
  export { DocumentEventBridge } from './event/DocumentEventBridge';
12
+ export { DocumentRuntimeManager } from './runtime/DocumentRuntimeManager';
13
+ export type { DocumentRuntimeExtension, DocumentValidationContext, DocumentValidationDecision, } from './runtime/DocumentRuntimeManager';
12
14
  export { DocModeTypeConst, PaperSizeConst, BuiltinComponentTypeConst } from './constants';
13
15
  export { default as CursorOverlay } from './cursor/render/cursor-overlay.vue';
14
16
  export { default as HiddenInput } from './cursor/render/hidden-input.vue';
@@ -0,0 +1,14 @@
1
+ /** 签名与日期的组合区域。未设置样式的旧模板按上下排列。 */
2
+ export declare function getSignatureDecorationPlacement(width: number, height: number, textWidth: number, textHeight: number, gap: number, signDisplayStyle?: string): {
3
+ position: "right";
4
+ rectWidth: number;
5
+ rectHeight: number;
6
+ x: number;
7
+ y: number;
8
+ } | {
9
+ position: "bottom";
10
+ rectWidth: number;
11
+ rectHeight: number;
12
+ x: number;
13
+ y: number;
14
+ };
@@ -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' | 'material-balance-table' | 'material-requisition-table' | 'warehouse-in-table' | 'warehouse-inbound-table' | 'warehouse-out-table' | 'warehouse-outbound-table' | 'warehouse-in-out-table' | 'warehouse-inventory-table' | 'part-stocktake-table' | 'device-part-consume-table' | 'warehouse-allocate-table' | 'pretreatment-list-table' | 'entrust-steril-batch-list-table';
32
+ export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table' | 'material-balance-table' | 'material-requisition-table' | 'material-substitution-table' | 'warehouse-in-table' | 'warehouse-inbound-table' | 'warehouse-out-table' | 'warehouse-outbound-table' | 'warehouse-in-out-table' | 'warehouse-inventory-table' | 'part-stocktake-table' | 'device-part-consume-table' | 'warehouse-allocate-table' | 'pretreatment-list-table' | 'entrust-steril-batch-list-table';
33
33
  /** 表头 layout 类型 */
34
34
  export type TableHeaderLayoutType = 'table-header';
35
35
  /** 所有子表表格 layout 类型 */
@@ -63,11 +63,14 @@ export type MaterialBalanceTableProps = RepeatingWidgetPropsBase & {
63
63
  export type MaterialRequisitionTableProps = RepeatingWidgetPropsBase & {
64
64
  layoutType: 'material-requisition-table';
65
65
  };
66
+ export type MaterialSubstitutionTableProps = RepeatingWidgetPropsBase & {
67
+ layoutType: 'material-substitution-table';
68
+ };
66
69
  export type WarehouseAllocateTableProps = RepeatingWidgetPropsBase & {
67
70
  layoutType: 'warehouse-allocate-table';
68
71
  barcode_parsing_rules_id_?: string;
69
72
  };
70
- export type RepeatingWidgetPropsMeta = DynamicTableProps | WarehouseInTableProps | WarehouseInboundTableProps | WarehouseOutTableProps | WarehouseOutboundTableProps | WarehouseInOutTableProps | WarehouseInventoryTableProps | PartStocktakeTableProps | DevicePartConsumeTableProps | WarehouseAllocateTableProps | MaterialBalanceTableProps | MaterialRequisitionTableProps | EntrustSterilBatchListTableProps | PretreatmentListTableProps;
73
+ export type RepeatingWidgetPropsMeta = DynamicTableProps | WarehouseInTableProps | WarehouseInboundTableProps | WarehouseOutTableProps | WarehouseOutboundTableProps | WarehouseInOutTableProps | WarehouseInventoryTableProps | PartStocktakeTableProps | DevicePartConsumeTableProps | WarehouseAllocateTableProps | MaterialBalanceTableProps | MaterialRequisitionTableProps | MaterialSubstitutionTableProps | EntrustSterilBatchListTableProps | PretreatmentListTableProps;
71
74
  export type RepeatingWidgetMeta = {
72
75
  props: RepeatingWidgetPropsMeta;
73
76
  };
@@ -0,0 +1,4 @@
1
+ import { Wtbl } from '../../../document';
2
+ import { TableRange } from './dataGroupSlotCount';
3
+ /** 补齐业务模板覆盖的合并格底层范围,兼容旧表单只记录主格坐标的范围。 */
4
+ export declare function expandMergedTableRange(table: Wtbl, range: TableRange): TableRange;
@@ -9,6 +9,7 @@ export type WlayoutXmlJson = RawElement & {
9
9
  width?: number;
10
10
  height?: number;
11
11
  zIndex?: number;
12
+ pageIndex?: number;
12
13
  };
13
14
  };
14
15
  export interface WlayoutOptions extends ModelGroupOptions<ModelNode> {
@@ -18,6 +19,7 @@ export interface WlayoutOptions extends ModelGroupOptions<ModelNode> {
18
19
  width?: number;
19
20
  height?: number;
20
21
  zIndex?: number;
22
+ pageIndex?: number;
21
23
  }
22
24
  /**
23
25
  * 布局容器
@@ -34,6 +36,7 @@ export declare class Wlayout extends ModelGroup<ModelNode> {
34
36
  width?: number;
35
37
  height?: number;
36
38
  zIndex: number;
39
+ pageIndex?: number;
37
40
  parent?: ModelNode;
38
41
  constructor(options: WlayoutOptions);
39
42
  /**
@@ -66,5 +69,6 @@ export declare class Wlayout extends ModelGroup<ModelNode> {
66
69
  width: number;
67
70
  height: number;
68
71
  zIndex: number;
72
+ pageIndex?: number;
69
73
  }): Wlayout;
70
74
  }
@@ -0,0 +1,34 @@
1
+ import { FieldChangeMap, EmitSource } from '../data';
2
+ export interface DocumentValidationContext {
3
+ scene: 'submit';
4
+ }
5
+ export interface DocumentValidationDecision {
6
+ skipValidation: boolean;
7
+ reason?: string;
8
+ }
9
+ /**
10
+ * 文档级运行时扩展。
11
+ *
12
+ * 表格、对象及文档规则都通过同一生命周期接入,避免业务能力分别挂在
13
+ * composable / DataManager / 校验入口中。
14
+ */
15
+ export interface DocumentRuntimeExtension {
16
+ onInit?(): void | Promise<void>;
17
+ onHydrate?(): void | Promise<void>;
18
+ onFieldChanges?(changedMap: FieldChangeMap, options: {
19
+ batchSource: EmitSource;
20
+ }): void | Promise<void>;
21
+ beforeValidate?(context: DocumentValidationContext): DocumentValidationDecision | void | Promise<DocumentValidationDecision | void>;
22
+ destroy?(): void;
23
+ }
24
+ export declare class DocumentRuntimeManager {
25
+ private readonly extensions;
26
+ register(extension: DocumentRuntimeExtension): void;
27
+ onInit(): Promise<void>;
28
+ onHydrate(): Promise<void>;
29
+ onFieldChanges(changedMap: FieldChangeMap, options: {
30
+ batchSource: EmitSource;
31
+ }): Promise<void>;
32
+ beforeValidate(context: DocumentValidationContext): Promise<DocumentValidationDecision>;
33
+ destroy(): void;
34
+ }
@@ -11,6 +11,7 @@ import { DocModeType } from '../constants';
11
11
  import { CommandPayloadMap, RequiredPayloadCommands, OptionalPayloadCommands } from '../command/types';
12
12
  import { DocModel } from '../model';
13
13
  import { DocRuntimeMeta, FieldModelQuery, IDeviceConfig } from '../../sdk/types';
14
+ import { DocumentRuntimeManager } from '../runtime/DocumentRuntimeManager';
14
15
  export interface DocInitOptions {
15
16
  mode?: DocModeType;
16
17
  model?: DocModel;
@@ -56,6 +57,8 @@ export declare class Doc {
56
57
  refer: boolean;
57
58
  /** 是否是模拟填报 */
58
59
  isMockReport: boolean;
60
+ /** 已进入表单变更编辑;由 enterBaseline 设置,随文档实例销毁。 */
61
+ isFormChangeEditing: boolean;
59
62
  /** 填报内容区底色开关配置 */
60
63
  showPrintFieldBg: boolean;
61
64
  model?: DocModel;
@@ -67,6 +70,8 @@ export declare class Doc {
67
70
  eventManager: EventManager;
68
71
  dataManager: DataManager;
69
72
  interactionManager: InteractionManager;
73
+ /** 文档级业务运行时统一生命周期。 */
74
+ runtimeManager: DocumentRuntimeManager;
70
75
  pageSize: {
71
76
  width: number;
72
77
  height: number;
@@ -10,14 +10,20 @@ export interface IImageRun {
10
10
  readonly width: number;
11
11
  /** 组件高度 */
12
12
  readonly height: number;
13
+ /** 图片本身的宽高(不包含日期装饰) */
14
+ readonly imageWidth: number;
15
+ readonly imageHeight: number;
13
16
  /** 组件坐标位置 */
14
17
  readonly x: number;
15
18
  /** 组件坐标位置 */
16
19
  readonly y: number;
17
20
  /** 图片源地址 */
18
21
  src: string;
22
+ decorations?: ImageRunOptions['decorations'];
19
23
  /** 是否保持等比 */
20
24
  keepAspect: boolean;
25
+ /** 下方文字比图片宽时,图片在组合区域中的水平偏移 */
26
+ readonly imageOffsetX: number;
21
27
  }
22
28
  export interface ImageRunOptions extends LayoutNodeOptions {
23
29
  src: string;
@@ -45,6 +51,9 @@ export declare class ImageRun extends LayoutNode implements IImageRun {
45
51
  decorations?: ImageRunOptions['decorations'];
46
52
  get width(): number;
47
53
  set width(value: number);
54
+ get imageWidth(): number;
55
+ get imageHeight(): number;
56
+ get imageOffsetX(): number;
48
57
  get height(): number;
49
58
  set height(value: number);
50
59
  constructor(options: ImageRunOptions);
@@ -1,7 +1,7 @@
1
1
  import { FIELD_TYPE } from '../../domain/field/field-type';
2
- export type ExternalComponentType = 'cascade' | 'fw:input' | 'fw:number' | 'fw:double' | 'fw:enum' | 'fw:enum-multiple' | 'fw:date-time' | 'fw:date' | 'fw:time' | 'fw:select' | 'fw:select-multiple' | 'fw:tree-select' | 'fw:tree-select-multiple' | 'fw:table-select' | 'fw:rdo-table-select' | 'fw:signature' | 'fw:image' | 'fw:file' | 'pw:image' | 'pw:barcode' | 'pw:qrcode' | 'pw:diagonal' | 'pw:serialnumber' | 'pw:pagination' | 'pw:line' | 'pw:timediff';
2
+ export type ExternalComponentType = 'cascade' | 'fw:input' | 'fw:number' | 'fw:double' | 'fw:enum' | 'fw:enum-multiple' | 'fw:date-time' | 'fw:date' | 'fw:time' | 'fw:select' | 'fw:select-multiple' | 'fw:tree-select' | 'fw:tree-select-multiple' | 'fw:table-select' | 'fw:rdo-table-select' | 'fw:signature' | 'fw:seal' | 'fw:image' | 'fw:file' | 'pw:image' | 'pw:barcode' | 'pw:qrcode' | 'pw:diagonal' | 'pw:serialnumber' | 'pw:pagination' | 'pw:line' | 'pw:timediff';
3
3
  /** 渲染组件标识 后续支持自定义组件 */
4
- export type ExternalNodeType = 'render:gct-placeholder' | 'render:gct-control' | 'render:gct-space' | 'render:gct-text' | 'render:gct-image' | 'render:gct-signature' | 'render:gct-leftMarker' | 'render:gct-rightMarker' | 'render:pw-barcode' | 'render:pw-qrcode' | 'render:pw-image' | 'render:pw-diagonal' | 'render:pw-pagination' | 'render:pw-line';
4
+ export type ExternalNodeType = 'render:gct-placeholder' | 'render:gct-control' | 'render:gct-space' | 'render:gct-text' | 'render:gct-image' | 'render:gct-signature' | 'render:gct-seal' | 'render:gct-leftMarker' | 'render:gct-rightMarker' | 'render:pw-barcode' | 'render:pw-qrcode' | 'render:pw-image' | 'render:pw-diagonal' | 'render:pw-pagination' | 'render:pw-line';
5
5
  /** 渲染节点集合 */
6
6
  export interface FieldNodeRenderers {
7
7
  /** 暗提示节点 */
@@ -32,8 +32,10 @@ export type PanelType =
32
32
  | 'panel:device-part-consume-table'
33
33
  /** 物料平衡表 */
34
34
  | 'panel:material-balance-table'
35
- /** 生产收料表 */
35
+ /** 产线收料表 */
36
36
  | 'panel:material-requisition-table'
37
+ /** 物料替换表 */
38
+ | 'panel:material-substitution-table'
37
39
  /** 库存调拨表 */
38
40
  | 'panel:warehouse-allocate-table'
39
41
  /** 二维表 */
@@ -28,3 +28,17 @@ export declare const SignDisplayTypeConst: {
28
28
  /** 水平显示 */
29
29
  HORIZONTAL: string;
30
30
  };
31
+ /** 兜底签名配置:个人无上传/手写签名素材时,密码校验通过后展示的样式 */
32
+ export declare const FallbackSignTypeConst: {
33
+ /** 仅用户名 */
34
+ NAME_ONLY: string;
35
+ /** 用户名 + 签署日期 */
36
+ NAME_AND_DATE: string;
37
+ };
38
+ /** 签名图片方向 */
39
+ export declare const SignatureImageDirectionConst: {
40
+ /** 横向签名 */
41
+ HORIZONTAL: string;
42
+ /** 竖向签名 */
43
+ VERTICAL: string;
44
+ };
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './runtime/decision-rule-evaluator';
3
+ export * from './runtime/document-rule-runtime';
@@ -0,0 +1,13 @@
1
+ import { DecisionRuleGroup, InspectionDecisionRule } from '../types';
2
+ type DataRow = Record<string, unknown>;
3
+ /** 安全解析设计端保存的规则树;无效或空配置不命中。 */
4
+ export declare function parseInspectionDecisionRuleTree(dataRuleConfig?: string): DecisionRuleGroup | null;
5
+ /**
6
+ * 计算规则树。
7
+ *
8
+ * 同一子表的多个条件绑定到同一条有效行;多个子表则按行组合判断。
9
+ * 子表为空时使用 undefined 占位,使 OR 中的主表条件仍可独立命中。
10
+ */
11
+ export declare function evaluateDecisionRuleTree(root: DecisionRuleGroup, rawData: DataRow): boolean;
12
+ export declare function evaluateInspectionDecisionRule(rule: InspectionDecisionRule | null | undefined, rawData: DataRow): boolean;
13
+ export {};
@@ -0,0 +1,19 @@
1
+ import { Doc } from '../../../core/view/Doc';
2
+ import { DocumentRuntimeExtension, DocumentValidationContext, DocumentValidationDecision } from '../../../core/runtime/DocumentRuntimeManager';
3
+ import { FieldChangeMap } from '../../../core/data';
4
+ export declare const DOCUMENT_RULE_PROMPT_EVENT = "document-rule:prompt";
5
+ export interface DocumentRulePromptPayload {
6
+ rule: 'inspection-decision';
7
+ message: string;
8
+ }
9
+ /** 文档级规则运行时:统一处理状态迁移、提示事件及提交前裁决。 */
10
+ export declare class DocumentRuleRuntime implements DocumentRuntimeExtension {
11
+ private readonly doc;
12
+ private inspectionDecisionMatched;
13
+ constructor(doc: Doc);
14
+ /** 装载和整表换数只建立状态基线,不弹提示。 */
15
+ onHydrate(): void;
16
+ onFieldChanges(changedMap: FieldChangeMap): void;
17
+ beforeValidate(context: DocumentValidationContext): DocumentValidationDecision;
18
+ private evaluateInspectionDecision;
19
+ }