@gct-paas/word 0.1.74-beta.28 → 0.1.74-beta.30

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.
@@ -1,13 +1,12 @@
1
1
  import { Doc } from '../../view/Doc';
2
- import { FIELD_TYPE } from '../../../domain/field/field-type';
3
2
  import { DataEnricherRegistration } from '../types';
4
- export declare const LOT_PARENT_LABEL_FIELD_TYPES: Set<FIELD_TYPE>;
3
+ export type LotParentLookupBy = 'name' | 'id';
5
4
  /** 生产 LOT/SN 字段保存子批次 ID 时,解析其子批次名称。 */
6
5
  export declare function resolveProductionContainerChildName(childId: unknown): Promise<string | undefined>;
7
6
  type LotParentLabelEnricherOptions = {
8
7
  doc: Doc;
9
8
  valuePath: string;
10
- fieldType: FIELD_TYPE;
9
+ lookupBy?: LotParentLookupBy;
11
10
  };
12
11
  export declare function createLotParentLabelEnricher(options: LotParentLabelEnricherOptions): DataEnricherRegistration;
13
12
  export {};
@@ -67,7 +67,16 @@ export interface LabelRule {
67
67
  export interface IdRule {
68
68
  type: 'id';
69
69
  }
70
- export type ValueChangeRule = HyperlinkRule | LabelRule | IdRule;
70
+ /**
71
+ * LOT/SN 父批展示名写入 `_lb_`。
72
+ * - lookupBy: 'name' → 字段值是子批次 name_
73
+ * - lookupBy: 'id' → 字段值是子批次 id_(如生产 LOT/SN)
74
+ */
75
+ export interface LotParentLabelRule {
76
+ type: 'lot-parent-label';
77
+ lookupBy?: 'name' | 'id';
78
+ }
79
+ export type ValueChangeRule = HyperlinkRule | LabelRule | IdRule | LotParentLabelRule;
71
80
  /** 将 manifest 中的 onValueChangeRule 规范为数组 */
72
81
  export declare function normalizeValueChangeRules(rule?: ValueChangeRule | ValueChangeRule[]): ValueChangeRule[];
73
82
  export type ComputedRule = PriorityRule | ResolveRule | MapRule | JoinRule | ApiRule;