@gct-paas/word 0.2.24-beta.1 → 0.2.24-beta.3
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.
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Doc } from '../../../core';
|
|
2
|
+
import { DataSourceConfig, DataSourceManagerOptions } from '@gct-paas/form-base';
|
|
3
|
+
interface RuntimeDataSourceOptions {
|
|
4
|
+
doc: Doc;
|
|
5
|
+
canExecute: NonNullable<DataSourceManagerOptions['canExecute']>;
|
|
6
|
+
getContext: DataSourceManagerOptions['getContext'];
|
|
7
|
+
getInstanceId: DataSourceManagerOptions['getInstanceId'];
|
|
8
|
+
adapters?: DataSourceManagerOptions['adapters'];
|
|
9
|
+
}
|
|
10
|
+
/** 为单份 Word 文档绑定数源与字段填充;初始化和释放由文档生命周期调度。 */
|
|
11
|
+
export declare function createRuntimeDataSourceBinding(options: RuntimeDataSourceOptions): {
|
|
12
|
+
manager: {
|
|
13
|
+
getSources: () => DataSourceConfig[];
|
|
14
|
+
getContext: () => Record<string, unknown>;
|
|
15
|
+
canExecute: () => boolean;
|
|
16
|
+
reload: (key: string) => Promise<unknown>;
|
|
17
|
+
reloadAll: () => Promise<PromiseSettledResult<unknown>[]>;
|
|
18
|
+
states: {
|
|
19
|
+
readonly [x: string]: {
|
|
20
|
+
readonly status: import('@gct-paas/form-base').DataSourceQueryStatus;
|
|
21
|
+
readonly data?: Readonly<unknown> | undefined;
|
|
22
|
+
readonly error?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
query: (key: string, parameters?: import('@gct-paas/form-base').DataSourceParameters) => Promise<unknown>;
|
|
26
|
+
cancel: (key: string) => boolean;
|
|
27
|
+
getResult(key: string): unknown;
|
|
28
|
+
initialize: () => Promise<PromiseSettledResult<unknown>[]>;
|
|
29
|
+
queryOnValueChange(keys: readonly string[]): Promise<PromiseSettledResult<unknown>[]>;
|
|
30
|
+
dispose(): void;
|
|
31
|
+
};
|
|
32
|
+
refresh: () => void | undefined;
|
|
33
|
+
dispose(): void;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -52,19 +52,20 @@ export declare function getObjectBomDropdownQuery(fieldType: string | undefined,
|
|
|
52
52
|
} | {
|
|
53
53
|
'id_.in': string[];
|
|
54
54
|
} | null;
|
|
55
|
+
export interface ObjectBomQtyError {
|
|
56
|
+
field: string;
|
|
57
|
+
message: string;
|
|
58
|
+
}
|
|
55
59
|
/**
|
|
56
60
|
* 表单提交:校验所有物料消耗对象的数量 vs 需求数量
|
|
57
61
|
* - 开了数量校验且需求数量有值才校验
|
|
58
62
|
* - 人为指定:用 objectBom.entries_[0];否则用 bomEntries 中与对象物料匹配的明细
|
|
59
|
-
* -
|
|
63
|
+
* - 收集全部对象的 field/message 错误,无错误返回空数组
|
|
60
64
|
*/
|
|
61
65
|
export declare function validateObjectBomQtyOnSubmit(opts: {
|
|
62
66
|
formState: Record<string, any>;
|
|
63
67
|
objectFieldList?: IMaterialConsumeObjectInfo[];
|
|
64
68
|
modelFields: readonly FieldMeta[];
|
|
65
69
|
formInstBom?: FormInstBomResponse | null;
|
|
66
|
-
}): Promise<
|
|
67
|
-
field: string;
|
|
68
|
-
message: string;
|
|
69
|
-
} | null>;
|
|
70
|
+
}): Promise<ObjectBomQtyError[]>;
|
|
70
71
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/word",
|
|
3
|
-
"version": "0.2.24-beta.
|
|
3
|
+
"version": "0.2.24-beta.3",
|
|
4
4
|
"description": "GCT 在线 word",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"pdf-fontkit": "^1.8.9",
|
|
60
60
|
"pdf-lib": "^1.17.1",
|
|
61
61
|
"resize-observer-polyfill": "^1.5.1",
|
|
62
|
-
"@gct-paas/form-base": "0.1.6-beta.
|
|
62
|
+
"@gct-paas/form-base": "0.1.6-beta.2",
|
|
63
63
|
"vue-color": "^3.3.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|