@gct-paas/word 0.1.74-beta.0 → 0.1.74-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.
@@ -17,6 +17,8 @@ type __VLS_Props = {
17
17
  returnString?: boolean;
18
18
  /** 控制是否实时 emit */
19
19
  emitOnInput?: boolean;
20
+ /** 清空并失焦后回填的值;未配置时保持原有空值行为 */
21
+ emptyValue?: string | number;
20
22
  /** 小数截取处理规则 */
21
23
  roundingMode?: 1 | 4 | 6;
22
24
  };
@@ -40,7 +40,7 @@ export declare class LayoutContext {
40
40
  ensureCellParagraphSpace(itemWidth: number): void;
41
41
  ensurePageParagraphSpace(itemWidth: number, itemHeight: number): void;
42
42
  ensureParagraphSpace(itemWidth: number, itemHeight: number): void;
43
- insertLineBreak(): void;
43
+ insertLineBreak(blockGap?: number): void;
44
44
  /** 设置下一个 run 与当前 run 之间的行内 gap。 */
45
45
  setInlineGap(gap: number): void;
46
46
  createNewPage(payload?: Partial<PageOptions>): Page;
@@ -390,20 +390,6 @@ export declare enum FIELD_TYPE {
390
390
  */
391
391
  STERILIZATION_CONTAINER = "sterilization_container"
392
392
  }
393
- export declare enum FIELD_TYPE_TRACE {
394
- MATERIAL_NO = "material_no",
395
- STERILIZE_LOT = "sterilization_container",
396
- MATERIAL_LOT = "material_container",
397
- RELATED_LOT_NO = "related_lot_no",
398
- PRODUCT = "product",
399
- SHOPFLOOR = "shopfloor",
400
- DEVICE = "device",
401
- MFG_ORDER = "mfg_order",
402
- RECORD_NO = "record_no",
403
- TRACE_DATE = "trace_date",
404
- ORDER_NO = "order_no",
405
- EXTERNAL_REF_NO = "external_reference_no"
406
- }
407
393
  export type FieldTypeSource = Pick<FieldMeta, 'type' | 'bizType'>;
408
394
  /** manifest / 面板 / 渲染 / icon 查找用的类型 */
409
395
  export declare function resolveFieldManifestType(field: FieldTypeSource): FIELD_TYPE;
@@ -0,0 +1,8 @@
1
+ export declare const DEFAULT_ICON_LABEL_SPACE = 8;
2
+ export declare const DEFAULT_OPTION_SPACING = 12;
3
+ /** 将清空或异常的间距恢复为设计默认值,避免配置与画布出现空值。 */
4
+ export declare function resolveSpacingValue(value: unknown, defaultValue: number): number;
5
+ /** 新配置使用 optionSpacing;缺失时继续兼容历史 controlEnumSpace。 */
6
+ export declare function resolveOptionSpacing(optionSpacing: unknown, legacyOptionSpacing?: unknown): number;
7
+ /** 纵向排列时仅在相邻选项行之间添加 gap,最后一项后不额外留白。 */
8
+ export declare function resolveVerticalOptionGap(optionIndex: number, optionCount: number, optionSpacing: unknown, legacyOptionSpacing?: unknown): number;
@@ -1,9 +1,11 @@
1
1
  import { CheckTableItemInfosPayload, CheckTableRegionRef } from '../types';
2
+ import { ICheckTableConfig } from '../front-config';
2
3
  /**
3
- * 按已扫描的检验表 region 并行拉取检验项详情。
4
- * @returns infosMap / countMap(count 至少为 1,用于占位行)
4
+ * 按已扫描的检验表 region 并行解析检验项(有快照用快照,否则请求)。
5
+ * @returns infosMap / countMap(count 至少为 1,用于占位行)/ 待落库 byTable 快照
5
6
  */
6
- export declare function fetchCheckItemsForRegions(instanceId: string, regions: CheckTableRegionRef[]): Promise<{
7
+ export declare function fetchCheckItemsForRegions(instanceId: string, regions: CheckTableRegionRef[], checkTableConfig?: ICheckTableConfig): Promise<{
7
8
  infosMap: Record<string, CheckTableItemInfosPayload>;
8
9
  countMap: Record<string, number>;
10
+ pendingCheckTableConfig?: ICheckTableConfig;
9
11
  }>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 表单实例 frontConfig
3
+ *
4
+ * Word 检验表按 regionId 写入 checkTableConfig.byTable;
5
+ * shared 预留给后续若接入 MedPro M08 整页共用源。
6
+ */
7
+ export interface ICheckTableConfig {
8
+ /** MedPro 整页共用原始检验项;字段存在即锁定(可空数组) */
9
+ shared?: Record<string, unknown>[];
10
+ /** 按检验表 regionId 分表快照;key 存在即锁定(可空数组) */
11
+ byTable?: Record<string, Record<string, unknown>[]>;
12
+ }
13
+ export interface IFrontConfig {
14
+ checkTableConfig?: ICheckTableConfig;
15
+ otherConfig?: Record<string, unknown>;
16
+ }
17
+ export declare function parseFrontConfig(frontConfig?: string | null): IFrontConfig;
18
+ export declare function hasByTableCheckTableSnapshot(config: ICheckTableConfig | undefined, regionId: string): boolean;
19
+ export declare function hasAnyCheckTableSnapshot(config?: ICheckTableConfig): boolean;
20
+ /** 从 frontConfig 字符串取出检验表快照 */
21
+ export declare function getCheckTableConfigFromFrontConfig(frontConfig?: string | null): ICheckTableConfig | undefined;
@@ -2,4 +2,5 @@ export { profile as checkTableProfile } from './profile';
2
2
  export { CHECK_TABLE_TYPE_TO_VALUE_FIELD } from './profile/field-keys';
3
3
  export * from './runtime';
4
4
  export * from './actions';
5
+ export * from './front-config';
5
6
  export * from './types';
@@ -1,13 +1,20 @@
1
1
  import { CheckTableItemInfosPayload, CheckTableRegionRef } from '../types';
2
- /**
3
- * 文档初始化前:一次扫描 → 并行拉检验项 → 原地扩 runtimeJson。
4
- * 须在 ModelConverter.toModel 之前调用;传入的 runtimeJson 须已是可写副本。
5
- */
6
- export declare function prepareCheckTableRuntimeJson<T extends Record<string, unknown>>(instanceId: string, runtimeJson: T): Promise<{
2
+ import { ICheckTableConfig } from '../front-config';
3
+ export type PrepareCheckTableRuntimeJsonResult<T extends Record<string, unknown>> = {
7
4
  runtimeJson: T;
8
5
  infosMap: Record<string, CheckTableItemInfosPayload>;
9
6
  regions: CheckTableRegionRef[];
10
- }>;
7
+ /** 本次打开解析/拉取到的检验表快照,保存时写入 frontConfig.checkTableConfig */
8
+ pendingCheckTableConfig?: ICheckTableConfig;
9
+ };
10
+ /**
11
+ * 文档初始化前:一次扫描 → 并行拉检验项(或读快照)→ 原地扩 runtimeJson。
12
+ * 须在 ModelConverter.toModel 之前调用;传入的 runtimeJson 须已是可写副本。
13
+ */
14
+ export declare function prepareCheckTableRuntimeJson<T extends Record<string, unknown>>(instanceId: string, runtimeJson: T, options?: {
15
+ /** 实例已落库的 frontConfig(JSON 字符串) */
16
+ frontConfig?: string | null;
17
+ }): Promise<PrepareCheckTableRuntimeJsonResult<T>>;
11
18
  /**
12
19
  * 文档初始化中:将检验项配置写入 defaultsMap(字段路径展开)。
13
20
  * 优先使用 prepare 返回的 regions,避免再次扫描 runtimeJson。