@gct-paas/word 0.1.57-beta.1 → 0.1.58
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/README.md +1 -1
- package/dist/base/form-item/src/form-item.vue.d.ts +2 -5
- package/dist/base/modal/src/ModalRoot.vue.d.ts +0 -2
- package/dist/base/modal/src/modal.type.d.ts +0 -4
- package/dist/base/select/src/basic-select.vue.d.ts +0 -5
- package/dist/core/command/types.d.ts +2 -10
- package/dist/core/constants/index.d.ts +7 -10
- package/dist/core/data/DataManager.d.ts +4 -3
- package/dist/core/data/derived-fields.d.ts +4 -1
- package/dist/core/data/enrichers/build-field-enrichers.d.ts +4 -0
- package/dist/core/data/enrichers/id-enricher.d.ts +9 -0
- package/dist/core/data/pipeline-logger.d.ts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/model/document/WsecPr.d.ts +1 -14
- package/dist/core/model/document/wtcRegionRef.d.ts +1 -1
- package/dist/core/model/logic/subtable/repeating/MaterialConsumeTableRegion.d.ts +0 -3
- package/dist/core/model/logic/subtable/repeating/RepeatingRegion.d.ts +0 -3
- package/dist/core/utils/unit-converter-util.d.ts +0 -2
- package/dist/core/view/Doc.d.ts +1 -5
- package/dist/core/view/Section.d.ts +7 -16
- package/dist/domain/active/active-types.d.ts +2 -8
- package/dist/domain/constants/field-state.d.ts +0 -9
- package/dist/domain/field/field-props-schema-type.d.ts +8 -4
- package/dist/domain/field/field-type.d.ts +1 -17
- package/dist/domain/table/business/material/material-balance/index.d.ts +0 -1
- package/dist/domain/table/design/autofill-expander.d.ts +1 -3
- package/dist/domain/table/runtime/api/biz-service-api.d.ts +0 -2
- package/dist/domain/table/runtime/engines/init-load-engine.d.ts +0 -1
- package/dist/domain/table/runtime/engines/linkage-engine.d.ts +1 -1
- package/dist/domain/table/runtime/runtime-handlers.d.ts +0 -2
- package/dist/domain/table/runtime/table-runtime-context.d.ts +3 -3
- package/dist/domain/table/runtime/table-runtime.d.ts +1 -1
- package/dist/domain/table/types.d.ts +1 -5
- package/dist/index.es.js +3211 -5511
- package/dist/runtime/canvas/table/render/material-consume/bom-validator.d.ts +11 -3
- package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts +5 -7
- package/dist/runtime/canvas/table/render/material-consume/service.d.ts +2 -0
- package/dist/runtime/canvas/table/render/material-consume/tmpl-bom-controller.d.ts +4 -2
- package/dist/runtime/designer/toolkit/toolkit-item.vue.d.ts +3 -5
- package/dist/runtime/designer/toolkit/toolkit.vue.d.ts +18 -18
- package/dist/runtime/factories/createValidateFactory.d.ts +0 -2
- package/dist/runtime/factories/useFormValidator.d.ts +0 -4
- package/dist/runtime/interface/computed.d.ts +2 -9
- package/dist/runtime/interface/fetchers.d.ts +0 -10
- package/dist/runtime/interface/render.d.ts +24 -0
- package/dist/runtime/renderer/dialogs/signature/logic.d.ts +0 -2
- package/dist/runtime/renderer/dialogs/signature/signature-dialog.vue.d.ts +0 -2
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/rdo-ref.d.ts +0 -17
- package/dist/runtime/renderer/dropdowns/components/tables/columns/columns.d.ts +4 -3
- package/dist/runtime/renderer/dropdowns/components/tables/component/base-vxe-table.vue.d.ts +2 -0
- package/dist/runtime/renderer/dropdowns/components/tables/composables/useTableDropdown.d.ts +2 -0
- package/dist/runtime/renderer/dropdowns/components/tables/rdo-table-dropdown.vue.d.ts +3 -0
- package/dist/runtime/renderer/dropdowns/components/tables/strategy/selectStrategy.d.ts +3 -1
- package/dist/runtime/renderer/dropdowns/components/tables/table-dropdown.vue.d.ts +3 -0
- package/dist/sdk/doc-runtime/composables/useDocOperations.d.ts +0 -3
- package/dist/sdk/doc-runtime/factories/runtime-json-builder.d.ts +2 -2
- package/dist/sdk/doc-runtime/factories/useDocumentFactory.d.ts +12 -1
- package/dist/sdk/engine/index.d.ts +2 -2
- package/dist/sdk/types/index.d.ts +1 -16
- package/dist/suites/edhr/manifest/field/_common_/basic.d.ts +5 -8
- package/dist/suites/edhr/panel-schema/index.d.ts +0 -1
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/types.d.ts +0 -11
- package/dist/types/material.type.d.ts +9 -0
- package/dist/utils/TriggerUtil.d.ts +1 -1
- package/dist/utils/composables/usePagesToPdf.d.ts +2 -2
- package/dist/utils/func/core.d.ts +0 -4
- package/dist/utils/func/form.d.ts +0 -8
- package/dist/word.css +378 -820
- package/package.json +1 -1
- package/dist/assets/svgs/toolkit/index.d.ts +0 -10
- package/dist/core/command/commands/SetWsecSize.d.ts +0 -10
- package/dist/core/data/enrichers/path-templates.d.ts +0 -2
- package/dist/core/data/enrichers/subtable-path.d.ts +0 -15
- package/dist/core/widget/e-sop-view.d.ts +0 -4
- package/dist/domain/field/index.d.ts +0 -1
- package/dist/domain/field/of-inst-num/index.d.ts +0 -1
- package/dist/domain/field/of-inst-num/of-inst-num-enricher.d.ts +0 -23
- package/dist/domain/table/business/material/material-balance/actions/fetch-material-consume-data.d.ts +0 -7
- package/dist/domain/table/business/material/material-balance/actions/index.d.ts +0 -3
- package/dist/domain/table/business/material/material-balance/actions/open-consume-modal.d.ts +0 -7
- package/dist/domain/table/business/material/material-balance/components/material-consume-modal.vue.d.ts +0 -6
- package/dist/domain/table/business/material/material-balance/profile/field-keys.d.ts +0 -25
- package/dist/domain/table/business/material/material-balance/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/material/material-balance/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/material/material-balance/runtime/use-consume-modal-cleanup.d.ts +0 -3
- package/dist/domain/table/business/material/material-consume/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/material/material-consume/runtime/row-change-handlers.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-in-out/profile/field-keys.d.ts +0 -8
- package/dist/runtime/designer/toolkit/svg/toolkit-svg-icon.vue.d.ts +0 -9
- package/dist/runtime/interface/context-defaults.d.ts +0 -9
- package/dist/runtime/renderer/dialogs/signature/validate-signature-config.d.ts +0 -5
- package/dist/suites/edhr/manifest/field/business/of-inst-num-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/e-sop-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/e-sop-version-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/shopfloor-manifest.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/material-balance-table/MaterialBalanceTablePanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/material-balance-table/material-balance-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/paper/modules/page-size-config.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/paper/modules/signature-config.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/paper/modules/table-setting-config.vue.d.ts +0 -2
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/autofill-runtime.d.ts +0 -15
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-utils.d.ts +0 -22
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/from-field-tree-utils.d.ts +0 -5
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/to-field-tree-utils.d.ts +0 -19
- package/dist/suites/shared/panel/modules/online-form-tmpl-module/online-form-tmpl-utils.d.ts +0 -3
package/README.md
CHANGED
|
@@ -221,7 +221,7 @@ if (!errors) {
|
|
|
221
221
|
当前包主入口为 `@gct-paas/word`,可直接使用以下能力:
|
|
222
222
|
|
|
223
223
|
- 初始化 API:`setupPlatformAdapters`、`setupVueRuntime`
|
|
224
|
-
- 引擎/类型:`useWord`、`DocModeTypeConst`、`
|
|
224
|
+
- 引擎/类型:`useWord`、`DocModeTypeConst`、`PageSizeEnumConst`、`BuiltinComponentTypeConst`、`WordRuntime`、`DocController` 等
|
|
225
225
|
- Vue 组件:`DocDesignLayout`、`DocRenderLayout`、`GctLayout`
|
|
226
226
|
- 插件能力:`registerSuite`、`WordSuitePlugin`、`edhrSuitePlugin`、`registerPanelSchemas`
|
|
227
227
|
|
|
@@ -2,9 +2,7 @@ type __VLS_Props = {
|
|
|
2
2
|
label?: string;
|
|
3
3
|
inline?: boolean;
|
|
4
4
|
required?: boolean;
|
|
5
|
-
size?:
|
|
6
|
-
/** 是否取消与上一项之间的间距 */
|
|
7
|
-
disableSpacing?: boolean;
|
|
5
|
+
size?: string;
|
|
8
6
|
};
|
|
9
7
|
declare function __VLS_template(): {
|
|
10
8
|
attrs: Partial<{}>;
|
|
@@ -19,9 +17,8 @@ declare function __VLS_template(): {
|
|
|
19
17
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
18
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
19
|
required: boolean;
|
|
22
|
-
size:
|
|
20
|
+
size: string;
|
|
23
21
|
inline: boolean;
|
|
24
|
-
disableSpacing: boolean;
|
|
25
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
26
23
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
24
|
export default _default;
|
|
@@ -14,8 +14,6 @@ declare const _default: import('vue').DefineComponent<IModalProps, {}, {}, {}, {
|
|
|
14
14
|
confirmText: string;
|
|
15
15
|
confirmContinueText: string;
|
|
16
16
|
cancelText: string;
|
|
17
|
-
draggable: boolean;
|
|
18
|
-
showMask: boolean;
|
|
19
17
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
20
18
|
bodyRef: unknown;
|
|
21
19
|
}, any>;
|
|
@@ -24,10 +24,6 @@ export interface IModalOptions {
|
|
|
24
24
|
confirmText?: string;
|
|
25
25
|
confirmContinueText?: string;
|
|
26
26
|
cancelText?: string;
|
|
27
|
-
/** 是否可拖拽移动 */
|
|
28
|
-
draggable?: boolean;
|
|
29
|
-
/** 是否显示遮罩,draggable 时默认 false */
|
|
30
|
-
showMask?: boolean;
|
|
31
27
|
onConfirm?: (ins: IModalInstance) => Promise<void> | void;
|
|
32
28
|
onConfirmContinue?: (ins: IModalInstance) => Promise<void> | void;
|
|
33
29
|
onCancel?: (ins: IModalInstance) => Promise<void> | void;
|
|
@@ -22,10 +22,6 @@ type __VLS_Props = {
|
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
/** 不显示右侧箭头 */
|
|
24
24
|
noArrow?: boolean;
|
|
25
|
-
/** 是否允许清除 */
|
|
26
|
-
allowClear?: boolean;
|
|
27
|
-
/** 弹窗选择模式:编辑态外观,点击不展开下拉 */
|
|
28
|
-
picker?: boolean;
|
|
29
25
|
/** 是否需要分组展示 */
|
|
30
26
|
grouped?: boolean;
|
|
31
27
|
};
|
|
@@ -73,7 +69,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
73
69
|
disabled: boolean;
|
|
74
70
|
options: DropdownOption[];
|
|
75
71
|
placeholder: string;
|
|
76
|
-
allowClear: boolean;
|
|
77
72
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
78
73
|
dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
79
74
|
P: {};
|
|
@@ -4,7 +4,6 @@ import { WidgetMeta } from '../widget/widget-meta';
|
|
|
4
4
|
import { WordHighlight } from '../model/types';
|
|
5
5
|
import { PointerHitResult } from '../cursor/hit/types';
|
|
6
6
|
import { SubTableLayoutType, SubTableRegionType } from '../model/document/wtcRegionRef';
|
|
7
|
-
import { PaperSize } from '../constants';
|
|
8
7
|
export interface CursorMeta {
|
|
9
8
|
nodeId: string;
|
|
10
9
|
offset: number;
|
|
@@ -28,7 +27,6 @@ export interface ICommand<T extends CommandType = CommandType> {
|
|
|
28
27
|
}
|
|
29
28
|
export type CommandConstructor = new (doc: Doc, payload?: any) => ICommand<any>;
|
|
30
29
|
export declare const CommandType: {
|
|
31
|
-
readonly setWsecSize: "setWsecSize";
|
|
32
30
|
readonly setOrient: "setOrient";
|
|
33
31
|
readonly setPadding: "setPadding";
|
|
34
32
|
readonly setHeaderFooterConfig: "setHeaderFooterConfig";
|
|
@@ -114,19 +112,13 @@ export type CommandPayloadMap = {
|
|
|
114
112
|
delete: CommandPayload & Record<string, never>;
|
|
115
113
|
backspace: CommandPayload & Record<string, never>;
|
|
116
114
|
enter: CommandPayload & Record<string, never>;
|
|
117
|
-
setWsecSize: CommandPayload & {
|
|
118
|
-
paperSize: PaperSize;
|
|
119
|
-
twipWidth: number;
|
|
120
|
-
twipHeight: number;
|
|
121
|
-
secRefId: string;
|
|
122
|
-
};
|
|
123
115
|
setOrient: CommandPayload & {
|
|
124
116
|
orient: VOrientationType;
|
|
125
|
-
|
|
117
|
+
serRefId: string;
|
|
126
118
|
};
|
|
127
119
|
setPadding: CommandPayload & {
|
|
128
120
|
padding: [number, number, number, number];
|
|
129
|
-
|
|
121
|
+
serRefId: string;
|
|
130
122
|
};
|
|
131
123
|
setHeaderFooterConfig: CommandPayload & {
|
|
132
124
|
headerMargin?: number;
|
|
@@ -36,7 +36,7 @@ export declare const DocModeTypeConst: {
|
|
|
36
36
|
};
|
|
37
37
|
export type DocModeType = ValueOf<typeof DocModeTypeConst>;
|
|
38
38
|
/** 纸张大小 */
|
|
39
|
-
export declare const
|
|
39
|
+
export declare const PageSizeEnumConst: {
|
|
40
40
|
/** A3 */
|
|
41
41
|
readonly A3: "A3";
|
|
42
42
|
/** A4 */
|
|
@@ -46,16 +46,13 @@ export declare const PaperSizeConst: {
|
|
|
46
46
|
/** 自定义 */
|
|
47
47
|
readonly CUSTOM: "CUSTOM";
|
|
48
48
|
};
|
|
49
|
-
export type PaperSize = ValueOf<typeof PaperSizeConst>;
|
|
50
|
-
export type StandardPaperSize = Exclude<PaperSize, 'CUSTOM'>;
|
|
51
|
-
export interface IPaperInfo {
|
|
52
|
-
paperSize: PaperSize;
|
|
53
|
-
mmWidth: number;
|
|
54
|
-
mmHeight: number;
|
|
55
|
-
}
|
|
56
49
|
/** 纸张大小 单位: mm */
|
|
57
|
-
export declare const
|
|
58
|
-
|
|
50
|
+
export declare const PageSize2FormatOpt: {
|
|
51
|
+
A3: number[];
|
|
52
|
+
A4: number[];
|
|
53
|
+
A5: number[];
|
|
54
|
+
};
|
|
55
|
+
export type PageSizeEnum = ValueOf<typeof PageSizeEnumConst>;
|
|
59
56
|
export declare const DEFAULT_PAGE_SIZE: {
|
|
60
57
|
width: number;
|
|
61
58
|
height: number;
|
|
@@ -22,8 +22,6 @@ export type FieldRuntimeSpecificConfig = {
|
|
|
22
22
|
newDisabled?: boolean;
|
|
23
23
|
/** assignment 策略「始终覆盖」时按行不可输入 */
|
|
24
24
|
cannotInput?: boolean;
|
|
25
|
-
/** 实例数字段:用户手填后不再被 API 回填覆盖 */
|
|
26
|
-
ofInstNumUserEdited?: boolean;
|
|
27
25
|
};
|
|
28
26
|
/**
|
|
29
27
|
* 数据管理器
|
|
@@ -87,6 +85,7 @@ export declare class DataManager {
|
|
|
87
85
|
private scheduleLayout;
|
|
88
86
|
getLabelPath(path: JsonPath): JsonPath;
|
|
89
87
|
getHrefPath(path: JsonPath): JsonPath;
|
|
88
|
+
getIdPath(path: JsonPath): JsonPath;
|
|
90
89
|
getFieldRuntimeSpecificConfigKeys(): string[];
|
|
91
90
|
getRuntimeSpecificConfig(): [string, FieldRuntimeSpecificConfig][];
|
|
92
91
|
setRuntimeSpecificConfig(entries: any): void;
|
|
@@ -123,6 +122,8 @@ export declare class DataManager {
|
|
|
123
122
|
getLabel<T = any>(path: JsonPath): T | undefined;
|
|
124
123
|
/** 获取与 value 并存的超链接 href;无或不可链时为 null/undefined */
|
|
125
124
|
getHref<T = string>(path: JsonPath): T | null | undefined;
|
|
125
|
+
/** 获取与 value 并存的批次唯一标识;老数据可能为空 */
|
|
126
|
+
getId<T = string>(path: JsonPath): T | null | undefined;
|
|
126
127
|
/** 子表数组路径下未软删行数 */
|
|
127
128
|
countActiveSubtableRows(arrayPath: JsonPath): number;
|
|
128
129
|
/**
|
|
@@ -330,7 +331,7 @@ export declare class DataManager {
|
|
|
330
331
|
* @param runtimeValuePath 版面解析后的具体路径(可选)
|
|
331
332
|
*/
|
|
332
333
|
removeFieldBindingData(designValuePath: JsonPath, runtimeValuePath?: JsonPath): void;
|
|
333
|
-
/** 收集与字段绑定相关的路径(含 value / label / href 及通配符变体) */
|
|
334
|
+
/** 收集与字段绑定相关的路径(含 value / label / href / id 及通配符变体) */
|
|
334
335
|
private collectFieldBindingPaths;
|
|
335
336
|
/** 收集可从 rawData 删除的具体路径(跳过含通配符的设计路径) */
|
|
336
337
|
private collectConcreteRawDataPaths;
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
export declare const LABEL_SUFFIX = "_lb_";
|
|
3
3
|
/** 与 rawData 并存的外链 href 后缀(超链接字段) */
|
|
4
4
|
export declare const HREF_SUFFIX = "_href_";
|
|
5
|
+
/** 与 rawData 并存的 id 后缀(批次字段,如 material_no_ → material_no__id_) */
|
|
6
|
+
export declare const ID_SUFFIX = "_id_";
|
|
5
7
|
/** 版面超链接文字颜色 */
|
|
6
8
|
export declare const HYPERLINK_TEXT_COLOR = "#0563c1";
|
|
7
9
|
export declare function getLabelPath(path: string): string;
|
|
8
10
|
export declare function getHrefPath(path: string): string;
|
|
9
|
-
|
|
11
|
+
export declare function getIdPath(path: string): string;
|
|
12
|
+
/** 派生数据路径(label / href / id),不参与 changedMap / 业务副作用 */
|
|
10
13
|
export declare function isDerivedDataPath(path: string): boolean;
|
|
11
14
|
/** 子表行内仅前端使用、不参与提交的字段 */
|
|
12
15
|
export declare const ROW_RUNTIME_META_KEYS: Set<string>;
|
|
@@ -16,6 +16,10 @@ export declare function resolveEnricherWidgetProps(instance: {
|
|
|
16
16
|
}): Record<string, unknown>;
|
|
17
17
|
/** 根据文档 widget 列表构建全部 enricher 注册项 */
|
|
18
18
|
export declare function buildFieldEnricherRegistrations(instances: any[], ctx: PostChangePipelineContext, doc: Doc): DataEnricherRegistration[];
|
|
19
|
+
/**
|
|
20
|
+
* 将设计/初始化路径模板展开为运行时具体路径(含 [n] / [n_y][n_x])
|
|
21
|
+
*/
|
|
22
|
+
export declare function expandInitPathTemplates(templatePath: string, rawData: Record<string, any>): string[];
|
|
19
23
|
/**
|
|
20
24
|
* 收集 init / 换数后需要跑 hydrate 的运行时路径(仅 rawData 中已有值的字段)
|
|
21
25
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Doc } from '../../view/Doc';
|
|
2
|
+
import { WidgetMeta } from '../../widget/widget-meta';
|
|
3
|
+
import { DataEnricherRegistration } from '../enricher-types';
|
|
4
|
+
type IdEnricherOptions = Omit<DataEnricherRegistration, 'enrich'> & {
|
|
5
|
+
doc: Doc;
|
|
6
|
+
widgetMeta: WidgetMeta;
|
|
7
|
+
};
|
|
8
|
+
export declare function createIdEnricher(reg: IdEnricherOptions): DataEnricherRegistration;
|
|
9
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmitSource } from './emit-source';
|
|
2
|
-
export type PipelineLogNS = 'data.emit' | 'pipeline.hydrate' | 'pipeline.onChange' | 'pipeline.deps' | 'enricher.label' | 'enricher.hyperlink' | 'pipeline.afterFlush' | 'table.runtime' | 'init.lifecycle' | 'submit.prepare';
|
|
2
|
+
export type PipelineLogNS = 'data.emit' | 'pipeline.hydrate' | 'pipeline.onChange' | 'pipeline.deps' | 'enricher.label' | 'enricher.hyperlink' | 'enricher.id' | 'pipeline.afterFlush' | 'table.runtime' | 'init.lifecycle' | 'submit.prepare';
|
|
3
3
|
export type PipelineLogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
4
4
|
export interface PipelineLogEvent {
|
|
5
5
|
ns: PipelineLogNS;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ 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 { DocModeTypeConst,
|
|
12
|
+
export { DocModeTypeConst, PageSizeEnumConst, BuiltinComponentTypeConst } from './constants';
|
|
13
13
|
export { default as CursorOverlay } from './cursor/render/cursor-overlay.vue';
|
|
14
14
|
export { default as HiddenInput } from './cursor/render/hidden-input.vue';
|
|
15
15
|
export type { DocInitOptions } from './view/Doc';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { RawElement } from '../types/raw';
|
|
2
2
|
import { ModelNode, RefManager, ModelNodeOptions, SimpleRef, SlotRef } from '../base';
|
|
3
|
-
import { PaperSize } from '../../constants';
|
|
4
3
|
export type HeaderFooterKind = 'header' | 'footer';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* 页面大小配置
|
|
7
6
|
*/
|
|
8
7
|
export interface PageSize {
|
|
9
8
|
width?: number;
|
|
@@ -46,7 +45,6 @@ export declare class WsecPr extends ModelNode {
|
|
|
46
45
|
/** 节点类型 */
|
|
47
46
|
type: "element";
|
|
48
47
|
raw: RawElement;
|
|
49
|
-
paperSize?: PaperSize;
|
|
50
48
|
pageSize?: PageSize;
|
|
51
49
|
margins?: PageMargins;
|
|
52
50
|
columns?: Columns;
|
|
@@ -62,7 +60,6 @@ export declare class WsecPr extends ModelNode {
|
|
|
62
60
|
fromParagraph: boolean;
|
|
63
61
|
constructor(options: ModelNodeOptions & {
|
|
64
62
|
raw: RawElement;
|
|
65
|
-
paperSize?: PaperSize;
|
|
66
63
|
pageSize?: PageSize;
|
|
67
64
|
margins?: PageMargins;
|
|
68
65
|
columns?: Columns;
|
|
@@ -122,16 +119,6 @@ export declare class WsecPr extends ModelNode {
|
|
|
122
119
|
* 重新计算浮层引用,并写回 raw
|
|
123
120
|
*/
|
|
124
121
|
normalizeOverlayRefs(refs: string[], secIds: string[]): void;
|
|
125
|
-
getWsecSize(): {
|
|
126
|
-
paperSize: PaperSize | undefined;
|
|
127
|
-
twipWidth: number | undefined;
|
|
128
|
-
twipHeight: number | undefined;
|
|
129
|
-
};
|
|
130
|
-
setWsecSize(option: {
|
|
131
|
-
paperSize: PaperSize;
|
|
132
|
-
twipWidth: number;
|
|
133
|
-
twipHeight: number;
|
|
134
|
-
}): void;
|
|
135
122
|
/**
|
|
136
123
|
* 获取当前页面方向
|
|
137
124
|
* @returns 'portrait' | 'landscape' | null
|
|
@@ -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' | '
|
|
32
|
+
export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table' | 'warehouse-in-out-table' | 'warehouse-inventory-table' | 'warehouse-allocate-table';
|
|
33
33
|
/** 表头 layout 类型 */
|
|
34
34
|
export type TableHeaderLayoutType = 'table-header';
|
|
35
35
|
/** 所有子表表格 layout 类型 */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Wtbl } from '../../../document';
|
|
2
2
|
import { Region, RegionOptions } from '../../base/Region';
|
|
3
3
|
import { RegionJson } from '../../../types';
|
|
4
|
-
import { SubTableLayoutType } from '../../../document/wtcRegionRef';
|
|
5
4
|
export type MaterialConsumeTableWidgetPropsMeta = {
|
|
6
5
|
table_key_: string;
|
|
7
6
|
barcode_parsing_rules_id_?: string;
|
|
@@ -33,8 +32,6 @@ export declare class MaterialConsumeTableRegion extends Region {
|
|
|
33
32
|
get linkFieldKey(): string;
|
|
34
33
|
get subValuePath(): string;
|
|
35
34
|
get linkValuePath(): string;
|
|
36
|
-
/** 设计/渲染层子表类型 */
|
|
37
|
-
get layoutType(): SubTableLayoutType;
|
|
38
35
|
toJSON(): MaterialConsumeTableRegionJson;
|
|
39
36
|
static fromJSON(json: MaterialConsumeTableRegionJson, table: Wtbl): MaterialConsumeTableRegion;
|
|
40
37
|
}
|
|
@@ -19,9 +19,6 @@ export type WarehouseInventoryTableProps = RepeatingWidgetPropsBase & {
|
|
|
19
19
|
/** 条码解析规则 */
|
|
20
20
|
barcode_parsing_rules_id_?: string;
|
|
21
21
|
};
|
|
22
|
-
export type MaterialBalanceTableProps = RepeatingWidgetPropsBase & {
|
|
23
|
-
layoutType: 'material-balance-table';
|
|
24
|
-
};
|
|
25
22
|
export type WarehouseAllocateTableProps = RepeatingWidgetPropsBase & {
|
|
26
23
|
layoutType: 'warehouse-allocate-table';
|
|
27
24
|
barcode_parsing_rules_id_?: string;
|
|
@@ -30,14 +30,12 @@ export declare class UnitConverter {
|
|
|
30
30
|
* @returns cm
|
|
31
31
|
*/
|
|
32
32
|
static twipToCm(twip: number): number;
|
|
33
|
-
static twipToMm(twip: number): number;
|
|
34
33
|
/**
|
|
35
34
|
* 将 cm 转换为twips
|
|
36
35
|
* @param cm cm 值
|
|
37
36
|
* @returns Twips 值
|
|
38
37
|
*/
|
|
39
38
|
static cmToTwip(cm: number): number;
|
|
40
|
-
static mmToTwip(mm: number): number;
|
|
41
39
|
/**
|
|
42
40
|
* 将像素转换为 twips
|
|
43
41
|
* @param pixel 像素值
|
package/dist/core/view/Doc.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { InteractionManager } from '../interaction/InteractionManager';
|
|
|
10
10
|
import { DocModeType } from '../constants';
|
|
11
11
|
import { CommandPayloadMap, RequiredPayloadCommands, OptionalPayloadCommands } from '../command/types';
|
|
12
12
|
import { DocModel } from '../model';
|
|
13
|
-
import { DocRuntimeMeta, FieldModelQuery
|
|
13
|
+
import { DocRuntimeMeta, FieldModelQuery } from '../../sdk/types';
|
|
14
14
|
export interface DocInitOptions {
|
|
15
15
|
mode?: DocModeType;
|
|
16
16
|
model?: DocModel;
|
|
@@ -22,8 +22,6 @@ export interface DocInitOptions {
|
|
|
22
22
|
btnRenderModeType: DocModeType;
|
|
23
23
|
formType: string;
|
|
24
24
|
paramsConfig: Record<string, any>;
|
|
25
|
-
/** 设备配置信息 */
|
|
26
|
-
deviceConfig?: IDeviceConfig;
|
|
27
25
|
pageSize?: {
|
|
28
26
|
width: number;
|
|
29
27
|
height: number;
|
|
@@ -67,8 +65,6 @@ export declare class Doc {
|
|
|
67
65
|
docRuntimeMeta: DocRuntimeMeta;
|
|
68
66
|
/** 外部的参数配置 */
|
|
69
67
|
paramsConfig: Record<string, any>;
|
|
70
|
-
/** 设备配置信息 */
|
|
71
|
-
deviceConfig?: IDeviceConfig;
|
|
72
68
|
/** 字段/模型查询(由上层注入 `SuiteRuntime` 等实现) */
|
|
73
69
|
fieldModelQuery: FieldModelQuery;
|
|
74
70
|
/** 安全距离-上下 */
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { PageMargins, WsecPr } from '../model/document';
|
|
2
|
-
import {
|
|
3
|
-
/**
|
|
4
|
-
* 单位: px
|
|
5
|
-
*/
|
|
6
|
-
export interface SectionPageSize {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
}
|
|
2
|
+
import { PageSizeEnum } from '../constants';
|
|
10
3
|
export type SectionOption = {
|
|
11
|
-
pageSize?:
|
|
4
|
+
pageSize?: {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
12
8
|
pagePadding?: [number, number, number, number];
|
|
13
9
|
bgColor?: string;
|
|
14
10
|
refId: string;
|
|
@@ -59,13 +55,8 @@ export declare class Section {
|
|
|
59
55
|
getContentHeight(): number;
|
|
60
56
|
/** 获取当前页面方向 */
|
|
61
57
|
getOrient(): 'portrait' | 'landscape';
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
paperSize: PaperSize;
|
|
65
|
-
twipWidth?: number | undefined;
|
|
66
|
-
twipHeight?: number | undefined;
|
|
67
|
-
};
|
|
68
|
-
getPaperSize(): PaperSize;
|
|
58
|
+
getPageSizeType(): PageSizeEnum;
|
|
59
|
+
getPageSizeFormat(): [number, number];
|
|
69
60
|
/**
|
|
70
61
|
* 获取页面尺寸信息(用于调试)
|
|
71
62
|
* @returns 格式化的页面信息
|
|
@@ -4,22 +4,16 @@ export type PanelType =
|
|
|
4
4
|
'panel:paper'
|
|
5
5
|
/** 页眉页脚 */
|
|
6
6
|
| 'panel:paper-header-footer'
|
|
7
|
-
/** 配置 */
|
|
8
|
-
| 'panel:config'
|
|
9
|
-
/** 脚本 */
|
|
10
|
-
| 'panel:script'
|
|
11
7
|
/** 数据初始化 */
|
|
12
8
|
| 'panel:data-init'
|
|
13
|
-
/**
|
|
14
|
-
| 'panel:
|
|
9
|
+
/** 数据加载 */
|
|
10
|
+
| 'panel:data-load'
|
|
15
11
|
/** 动态表 */
|
|
16
12
|
| 'panel:dynamic-table'
|
|
17
13
|
/** 出入库明细表 */
|
|
18
14
|
| 'panel:warehouse-in-out-table'
|
|
19
15
|
/** 库存盘点表 */
|
|
20
16
|
| 'panel:warehouse-inventory-table'
|
|
21
|
-
/** 物料平衡表 */
|
|
22
|
-
| 'panel:material-balance-table'
|
|
23
17
|
/** 库存调拨表 */
|
|
24
18
|
| 'panel:warehouse-allocate-table'
|
|
25
19
|
/** 二维表 */
|
|
@@ -42,13 +42,4 @@ export declare const FieldStateColors: {
|
|
|
42
42
|
readonly disabledText: "#c9c9c9";
|
|
43
43
|
readonly disabledLine: "#c9c9c9";
|
|
44
44
|
readonly disabledFill: "rgba(0, 0, 0, 0.04)";
|
|
45
|
-
/** 校验失败(超上下限等) */
|
|
46
|
-
readonly validationErrorText: "#ff4d4f";
|
|
47
|
-
readonly validationErrorLine: "#ff4d4f";
|
|
48
|
-
readonly validationErrorBg: "#fff2f2";
|
|
49
|
-
/** 禁用态校验失败 */
|
|
50
|
-
readonly validationErrorDisabledText: "#ff7072";
|
|
51
|
-
readonly validationErrorDisabledLine: "#ff8a8c";
|
|
52
|
-
readonly validationErrorDisabledBg: "#f5f5f5";
|
|
53
|
-
readonly validationErrorDisabledBgActive: "#f0f0f0";
|
|
54
45
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** 字段配置-渲染组件标识 */
|
|
2
|
-
export type FieldPropsSchemaKey = 'schema:field-text' | 'schema:field-boolean' | 'schema:field-number' | 'schema:field-datetime' | 'schema:field-user' | 'schema:field-org' | 'schema:field-sign' | 'schema:field-enum' | 'schema:field-file' | 'schema:field-image' | 'schema:field-trace' | 'schema:field-business' | 'schema:field-ref'
|
|
2
|
+
export type FieldPropsSchemaKey = 'schema:field-text' | 'schema:field-boolean' | 'schema:field-number' | 'schema:field-datetime' | 'schema:field-user' | 'schema:field-org' | 'schema:field-sign' | 'schema:field-enum' | 'schema:field-file' | 'schema:field-image' | 'schema:field-trace' | 'schema:field-business' | 'schema:field-ref';
|
|
3
3
|
/** 优先级规则 */
|
|
4
4
|
export interface PriorityRule {
|
|
5
5
|
type: 'priority';
|
|
@@ -39,7 +39,7 @@ export interface JoinRule {
|
|
|
39
39
|
export interface ApiRule {
|
|
40
40
|
type: 'api';
|
|
41
41
|
/** 请求函数 key */
|
|
42
|
-
fetcher: 'ref' | '
|
|
42
|
+
fetcher: 'ref' | 'rdo2ref' | 'ref2lot2sn';
|
|
43
43
|
/** 仅主模型字段可发起请求 */
|
|
44
44
|
onlyMainModelFieldsCanRequest: boolean;
|
|
45
45
|
/** 失败时的默认 label */
|
|
@@ -65,7 +65,11 @@ export interface HyperlinkRule {
|
|
|
65
65
|
export interface LabelRule {
|
|
66
66
|
type: 'label';
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
/** 值变化后补全批次唯一标识(companion `_id_` 字段) */
|
|
69
|
+
export interface IdRule {
|
|
70
|
+
type: 'id';
|
|
71
|
+
}
|
|
72
|
+
export type ValueChangeRule = HyperlinkRule | LabelRule | IdRule;
|
|
69
73
|
/** 将 manifest 中的 onValueChangeRule 规范为数组 */
|
|
70
74
|
export declare function normalizeValueChangeRules(rule?: ValueChangeRule | ValueChangeRule[]): ValueChangeRule[];
|
|
71
75
|
export type ComputedRule = PriorityRule | ResolveRule | MapRule | JoinRule | ApiRule;
|
|
@@ -74,6 +78,6 @@ export interface FieldComputedConfig {
|
|
|
74
78
|
propRules?: Record<string, ComputedRule>;
|
|
75
79
|
/** 写入 dataManager 的派生规则 */
|
|
76
80
|
defaultValueRule?: ComputedRule;
|
|
77
|
-
/** 填报值变化后的 enrich(超链接 _href_、展示标签 _lb_) */
|
|
81
|
+
/** 填报值变化后的 enrich(超链接 _href_、展示标签 _lb_、批次 _id_) */
|
|
78
82
|
onValueChangeRule?: ValueChangeRule | ValueChangeRule[];
|
|
79
83
|
}
|
|
@@ -212,10 +212,6 @@ export declare enum FIELD_TYPE {
|
|
|
212
212
|
* 工单号
|
|
213
213
|
*/
|
|
214
214
|
MFG_ORDER = "mfg_order",
|
|
215
|
-
/**
|
|
216
|
-
* 车间
|
|
217
|
-
*/
|
|
218
|
-
SHOPFLOOR = "shopfloor",
|
|
219
215
|
/**
|
|
220
216
|
* 记录单号
|
|
221
217
|
*/
|
|
@@ -359,17 +355,5 @@ export declare enum FIELD_TYPE {
|
|
|
359
355
|
/**
|
|
360
356
|
* 需求数量
|
|
361
357
|
*/
|
|
362
|
-
QTY_REQUIRED = "qty_required"
|
|
363
|
-
/**
|
|
364
|
-
* E-SOP
|
|
365
|
-
*/
|
|
366
|
-
E_SOP = "e_sop",
|
|
367
|
-
/**
|
|
368
|
-
* E-SOP版本
|
|
369
|
-
*/
|
|
370
|
-
E_SOP_VERSION = "e_sop_version",
|
|
371
|
-
/**
|
|
372
|
-
* 实例数
|
|
373
|
-
*/
|
|
374
|
-
OF_INST_NUM = "of_inst_num"
|
|
358
|
+
QTY_REQUIRED = "qty_required"
|
|
375
359
|
}
|
|
@@ -10,10 +10,8 @@ interface ExpandAutofillContext {
|
|
|
10
10
|
sourceFieldKey: string;
|
|
11
11
|
/** 目标字段所在模型 key(子表字段为子模型 modelKey) */
|
|
12
12
|
toModelKey?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** 是否为子表字段 */
|
|
14
14
|
toSubModel?: number;
|
|
15
|
-
/** 子表时:主表 master_slave 字段 key */
|
|
16
|
-
toSubFieldKey?: string;
|
|
17
15
|
}
|
|
18
16
|
/**
|
|
19
17
|
* 将字段 Profile 中的 autofillTemplates 展开为 widget.props.autofillRules
|
|
@@ -6,5 +6,3 @@ export declare function isBizServiceFailure(res: unknown): boolean;
|
|
|
6
6
|
export declare function unwrapBizServiceData<T extends Record<string, unknown>>(res: unknown): T | null;
|
|
7
7
|
/** listAll 类接口取数组 */
|
|
8
8
|
export declare function unwrapBizServiceList(res: unknown): Record<string, unknown>[];
|
|
9
|
-
/** 解析 biz-service 返回的 dict */
|
|
10
|
-
export declare function unwrapBizServiceDict(res: unknown): Record<string, Record<string, unknown>> | undefined;
|
|
@@ -62,6 +62,6 @@ export declare class LinkageEngine {
|
|
|
62
62
|
buildFillFromOption(ctx: TableRuntimeContext, fieldKey: string, rowIndex: number, selectedOption: Record<string, unknown>): Record<string, unknown>;
|
|
63
63
|
/** 将单条 FieldOptionFillDef 映射写入 updates */
|
|
64
64
|
private applyOptionFillDef;
|
|
65
|
-
/**
|
|
65
|
+
/** 构建字段清空更新对象(同时清值、_lb_ 标签与 companion _id_) */
|
|
66
66
|
private buildClearUpdates;
|
|
67
67
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Doc } from '../../../core';
|
|
2
|
-
import { RepeatingRegion
|
|
2
|
+
import { RepeatingRegion } from '../../../core/model/logic';
|
|
3
3
|
import { BusinessFieldProfile, BusinessSubTableProfile, RuleContext } from '../types';
|
|
4
4
|
/** 行遍历选项 */
|
|
5
5
|
export interface EachRowOptions {
|
|
@@ -13,9 +13,9 @@ export declare class TableRuntimeContext {
|
|
|
13
13
|
readonly doc: Doc;
|
|
14
14
|
readonly profile: BusinessSubTableProfile;
|
|
15
15
|
readonly subFieldKey: string;
|
|
16
|
-
readonly region: RepeatingRegion
|
|
16
|
+
readonly region: RepeatingRegion;
|
|
17
17
|
private widgetFieldKeys?;
|
|
18
|
-
constructor(doc: Doc, profile: BusinessSubTableProfile, subFieldKey: string, region: RepeatingRegion
|
|
18
|
+
constructor(doc: Doc, profile: BusinessSubTableProfile, subFieldKey: string, region: RepeatingRegion);
|
|
19
19
|
/** 业务子模型 refModelType */
|
|
20
20
|
get refModelType(): string;
|
|
21
21
|
/** 子表数组路径 $.subFieldKey */
|
|
@@ -36,7 +36,7 @@ export declare class TableRuntime {
|
|
|
36
36
|
/** 文档初始化时执行全套运行时逻辑 */
|
|
37
37
|
onInit(): Promise<void>;
|
|
38
38
|
/**
|
|
39
|
-
* 子表新增行初始化:rowInit → 字段态规则 →
|
|
39
|
+
* 子表新增行初始化:rowInit → 字段态规则 → 级联。
|
|
40
40
|
*/
|
|
41
41
|
onRowInit(subFieldKey: string, rowIndex: number, rowSource?: string): void;
|
|
42
42
|
/**
|
|
@@ -135,15 +135,11 @@ export interface BizServiceApiDef {
|
|
|
135
135
|
modelCategory: string;
|
|
136
136
|
modelKey: string;
|
|
137
137
|
bsKey: string;
|
|
138
|
-
/** 请求方式,默认 post */
|
|
139
|
-
method?: 'get' | 'post';
|
|
140
138
|
}
|
|
141
139
|
/** 文档初始化批量加载 */
|
|
142
140
|
export interface InitLoadDef {
|
|
143
|
-
/** 加载属性写死开关,为 true 时直接启用 initLoad */
|
|
144
|
-
enabled?: boolean;
|
|
145
141
|
/** 对应 widgetMeta.props 上的开关属性名 */
|
|
146
|
-
enabledByWidgetProp
|
|
142
|
+
enabledByWidgetProp: string;
|
|
147
143
|
api: BizServiceApiDef;
|
|
148
144
|
/** listAll 类接口 query 构建 */
|
|
149
145
|
listQuery?: Array<{
|