@gct-paas/word 0.2.12-beta.0 → 0.2.15-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.
- package/dist/domain/document-business/business/product-release/profile.d.ts +2 -0
- package/dist/domain/document-business/business/product-release/service.d.ts +2 -0
- package/dist/domain/document-business/index.d.ts +2 -0
- package/dist/domain/document-business/registry.d.ts +2 -0
- package/dist/domain/document-business/runtime/field-query-runtime.d.ts +4 -0
- package/dist/domain/document-business/types.d.ts +24 -0
- package/dist/domain/field/field-type.d.ts +8 -0
- package/dist/domain/field/query-filter.d.ts +15 -0
- package/dist/index.es.js +537 -252
- package/dist/runtime/renderer/dropdowns/components/tables/composables/useMaterialSubstitutionSource.d.ts +7 -0
- package/dist/suites/edhr/manifest/field/business/product-release-qty-manifest.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FieldQueryFilter } from '../../field/query-filter';
|
|
2
|
+
import { BusinessFieldQueryContext } from '../types';
|
|
3
|
+
/** 按业务场景与字段匹配规则;规则失败时保留原查询,失败结果不进入缓存。 */
|
|
4
|
+
export declare function resolveBusinessFieldFilters(context: BusinessFieldQueryContext): Promise<FieldQueryFilter[]>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FIELD_TYPE } from '../field/field-type';
|
|
2
|
+
import { FieldQueryFilter } from '../field/query-filter';
|
|
3
|
+
/** detail 业务类型、实例参数与当前查询字段;业务规则无需依赖 Doc 或组件。 */
|
|
4
|
+
export interface BusinessFieldQueryContext {
|
|
5
|
+
businessType?: string;
|
|
6
|
+
paramsConfig: Readonly<Record<string, unknown>>;
|
|
7
|
+
fieldType?: FIELD_TYPE;
|
|
8
|
+
}
|
|
9
|
+
export interface BusinessFieldQueryRule {
|
|
10
|
+
id: string;
|
|
11
|
+
match: {
|
|
12
|
+
fieldType: FIELD_TYPE;
|
|
13
|
+
};
|
|
14
|
+
/** 声明结果缓存的依赖参数,由 Runtime 统一执行缓存和请求去重。 */
|
|
15
|
+
cache?: {
|
|
16
|
+
key: (context: BusinessFieldQueryContext) => unknown;
|
|
17
|
+
ttlMs?: number;
|
|
18
|
+
};
|
|
19
|
+
resolveFilters: (context: BusinessFieldQueryContext) => Promise<readonly FieldQueryFilter[]>;
|
|
20
|
+
}
|
|
21
|
+
export interface DocumentBusinessProfile {
|
|
22
|
+
businessType: string;
|
|
23
|
+
fieldQueries: readonly BusinessFieldQueryRule[];
|
|
24
|
+
}
|
|
@@ -327,6 +327,10 @@ export declare const BUSINESS_FIELD_TYPE: {
|
|
|
327
327
|
* 产品检验数量
|
|
328
328
|
*/
|
|
329
329
|
readonly PRODUCT_CHECK_QTY: "product_check_qty";
|
|
330
|
+
/**
|
|
331
|
+
* 放行数量
|
|
332
|
+
*/
|
|
333
|
+
readonly PRODUCT_RELEASE_QTY: "product_release_qty";
|
|
330
334
|
/**
|
|
331
335
|
* 材料检验数量
|
|
332
336
|
*/
|
|
@@ -576,6 +580,10 @@ export declare const FIELD_TYPE: {
|
|
|
576
580
|
* 产品检验数量
|
|
577
581
|
*/
|
|
578
582
|
readonly PRODUCT_CHECK_QTY: "product_check_qty";
|
|
583
|
+
/**
|
|
584
|
+
* 放行数量
|
|
585
|
+
*/
|
|
586
|
+
readonly PRODUCT_RELEASE_QTY: "product_release_qty";
|
|
579
587
|
/**
|
|
580
588
|
* 材料检验数量
|
|
581
589
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 下拉接口使用的查询结构,与渲染组件解耦。 */
|
|
2
|
+
export interface FieldQuery {
|
|
3
|
+
queryData?: Record<string, unknown>;
|
|
4
|
+
exp?: string;
|
|
5
|
+
}
|
|
6
|
+
/** 业务规则提供的附加条件;空 values 明确表示无候选,空条件列表表示不追加过滤。 */
|
|
7
|
+
export interface FieldQueryFilter {
|
|
8
|
+
field: string;
|
|
9
|
+
operator: 'in';
|
|
10
|
+
values: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
/** 空 in 可能被接口视为不筛选,使用占位值表达无候选。 */
|
|
13
|
+
export declare const EMPTY_QUERY_VALUE = "__word_no_matching_query_value__";
|
|
14
|
+
/** 附加条件统一按 AND 合并;同字段 IN 条件取交集,保留已有搜索表达式。 */
|
|
15
|
+
export declare function mergeQueryFilters(query: FieldQuery, filters: readonly FieldQueryFilter[]): FieldQuery;
|