@gct-paas/word 0.1.32 → 0.1.34
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/base/input/src/input.vue.d.ts +1 -1
- package/dist/base/input/src/text-area.vue.d.ts +1 -1
- package/dist/base/table/src/table.vue.d.ts +1 -1
- package/dist/core/command/commands/InsertField.d.ts +22 -2
- package/dist/core/data/DataManager.d.ts +40 -12
- package/dist/core/layout/handlers/fields/FieldBaseHandler.d.ts +1 -0
- package/dist/core/layout/linkSubTableLayout.d.ts +27 -0
- package/dist/core/layout/providers/TableInfoProvider.d.ts +2 -3
- package/dist/core/model/DocModel.d.ts +9 -0
- package/dist/core/model/document/Wtbl/RegionManager.d.ts +47 -10
- package/dist/core/model/document/Wtc.d.ts +20 -15
- package/dist/core/model/document/wtcRegionRef.d.ts +20 -0
- package/dist/core/model/logic/{Region.d.ts → base/Region.d.ts} +2 -5
- package/dist/core/model/logic/{SubTableHeaderRegion.d.ts → header/SubTableHeaderRegion.d.ts} +3 -6
- package/dist/core/model/logic/{TableHeaderRegion.d.ts → header/TableHeaderRegion.d.ts} +3 -3
- package/dist/core/model/logic/index.d.ts +18 -22
- package/dist/core/model/logic/{BoundedItemRegion.d.ts → subtable/bounded/BoundedItemRegion.d.ts} +5 -1
- package/dist/core/model/logic/{BoundedRegion.d.ts → subtable/bounded/BoundedRegion.d.ts} +7 -9
- package/dist/core/model/logic/subtable/link/CheckTableRegion.d.ts +11 -0
- package/dist/core/model/logic/subtable/link/DataGroup2DRegion.d.ts +15 -0
- package/dist/core/model/logic/subtable/link/LinkSubTableRegion.d.ts +48 -0
- package/dist/core/model/logic/subtable/link/_2DTableRegion.d.ts +11 -0
- package/dist/core/model/logic/{RepeatingRegion.d.ts → subtable/repeating/RepeatingRegion.d.ts} +7 -9
- package/dist/core/model/logic/subtable/shared/dataGroupSlotCount.d.ts +18 -0
- package/dist/core/model/logic/subtable/shared/itemRegionOps.d.ts +11 -0
- package/dist/core/model/logic/subtable/shared/regionValuePath.d.ts +8 -0
- package/dist/core/model/logic/types.d.ts +10 -0
- package/dist/core/utils/expand.d.ts +49 -18
- package/dist/core/view/TableCell.d.ts +3 -7
- package/dist/core/view/runs/ImageWidget.d.ts +6 -0
- package/dist/core/view/runs/TextWidget.d.ts +6 -0
- package/dist/index.es.js +1968 -1254
- package/dist/runtime/canvas/table/utils/index.d.ts +2 -2
- package/dist/runtime/factories/createDesignWidgetFactory.d.ts +17 -0
- package/dist/runtime/factories/{useRenderData.d.ts → useWidgetRenderData.d.ts} +18 -6
- package/dist/runtime/renderer/dropdowns/components/tables/rdo-table-dropdown.vue.d.ts +3 -3
- package/dist/runtime/renderer/dropdowns/components/tables/table-dropdown.vue.d.ts +3 -3
- package/dist/utils/func/core.d.ts +62 -18
- package/dist/utils/func/render.d.ts +4 -1
- package/dist/word.css +153 -153
- package/package.json +1 -1
- package/dist/core/model/logic/CheckTableRegion.d.ts +0 -44
- package/dist/core/model/logic/DataGroup2DRegion.d.ts +0 -12
- package/dist/core/model/logic/_2DTableRegion.d.ts +0 -44
- package/dist/runtime/factories/createFieldToWidgetFactory.d.ts +0 -13
- package/dist/runtime/factories/createPaperWidgetToWidgetFactory.d.ts +0 -13
- package/dist/runtime/factories/usePwRenderData.d.ts +0 -13
|
@@ -84,10 +84,10 @@ export declare function mapCellsToOutlineCells(cells: any[]): {
|
|
|
84
84
|
}[];
|
|
85
85
|
export declare function groupBy<T>(list: T[], getKey: (item: T) => string): Record<string, T[]>;
|
|
86
86
|
export declare function buildPosMap<T>(layers: Record<string, T>, getRect: (layer: T) => any | null, toDom: (rect: any) => any): Record<string, any>;
|
|
87
|
-
export declare function getDataIndexLayersMap({ type, cells,
|
|
87
|
+
export declare function getDataIndexLayersMap({ type, cells, isDesign, convertExtraProps, }: {
|
|
88
88
|
type: 'fixed-table' | 'check-table' | 'dynamic-table' | '2d-table';
|
|
89
89
|
cells: any[];
|
|
90
|
-
|
|
90
|
+
isDesign: boolean;
|
|
91
91
|
convertExtraProps: (firstCell: any) => {
|
|
92
92
|
type: OutlineType;
|
|
93
93
|
placeholder: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FIELD_TYPE } from '../../domain/field/field-type';
|
|
2
|
+
import { FieldMeta } from '../../capabilities/model-field-runtime';
|
|
3
|
+
import { FieldManifest } from '../../capabilities/field-manifest';
|
|
4
|
+
import { PaperWidgetManifest } from '../../capabilities/paper-widget-manifest';
|
|
5
|
+
import { PAPER_WIDGET_TYPE } from '../../domain/paper-widget/paper-widget-type';
|
|
6
|
+
import { PaperWidgetMeta } from '../../capabilities/model-field-runtime/types/paper-widget';
|
|
7
|
+
import { WidgetMeta } from '../../core';
|
|
8
|
+
export interface CreateWidgetFromPaletteOptions {
|
|
9
|
+
/** 主从关联字段 key */
|
|
10
|
+
parentFieldKey?: string;
|
|
11
|
+
/** 插入来源 */
|
|
12
|
+
source?: 'palette';
|
|
13
|
+
/** 覆盖默认 props */
|
|
14
|
+
overrideProps?: Record<string, any>;
|
|
15
|
+
}
|
|
16
|
+
export declare function createDesignFieldToWidgetFactory(getManifest: (type: FIELD_TYPE) => FieldManifest | undefined): (field: FieldMeta, opts?: CreateWidgetFromPaletteOptions) => WidgetMeta;
|
|
17
|
+
export declare function createDesignPaperWidgetToWidgetFactory(getManifest: (type: PAPER_WIDGET_TYPE) => PaperWidgetManifest | undefined): (widget: PaperWidgetMeta, opts?: CreateWidgetFromPaletteOptions) => WidgetMeta;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { WidgetMeta } from '../../core';
|
|
2
2
|
export declare function useWidgetMeta(widget: any): {
|
|
3
3
|
runtimeValuePath: import('vue').ComputedRef<any>;
|
|
4
|
-
widgetMeta: import('vue').ComputedRef<
|
|
4
|
+
widgetMeta: import('vue').ComputedRef<WidgetMeta>;
|
|
5
5
|
fieldMeta: import('vue').ComputedRef<import('../../domain/field/field-binding').FieldDataBindingMeta | undefined>;
|
|
6
|
-
widgetProps: import('vue').ComputedRef<
|
|
7
|
-
widgetType: import('vue').ComputedRef<
|
|
6
|
+
widgetProps: import('vue').ComputedRef<WidgetPropsMeta>;
|
|
7
|
+
widgetType: import('vue').ComputedRef<import('../../domain/widget/component-type').ExternalComponentType>;
|
|
8
8
|
isMultiple: import('vue').ComputedRef<boolean>;
|
|
9
9
|
isAsync: import('vue').ComputedRef<boolean>;
|
|
10
10
|
isDropdown: import('vue').ComputedRef<boolean>;
|
|
11
11
|
isDialog: import('vue').ComputedRef<boolean>;
|
|
12
12
|
};
|
|
13
|
+
export declare function usePaperWidgetMeta(widget: any): {
|
|
14
|
+
pageWidgetMeta: import('vue').ComputedRef<WidgetMeta>;
|
|
15
|
+
pageWidgetProps: import('vue').ComputedRef<WidgetPropsMeta>;
|
|
16
|
+
widgetType: import('vue').ComputedRef<import('../../domain/widget/component-type').ExternalComponentType>;
|
|
17
|
+
};
|
|
13
18
|
export declare function useFieldInfo(fieldMeta: () => WidgetMeta['field'] | undefined): {
|
|
14
19
|
fieldList: import('vue').ComputedRef<import('../../capabilities/model-field-runtime').FieldMeta[]>;
|
|
15
20
|
fieldInfo: import('vue').ComputedRef<import('../../capabilities/model-field-runtime').FieldMeta | null>;
|
|
@@ -17,14 +22,14 @@ export declare function useFieldInfo(fieldMeta: () => WidgetMeta['field'] | unde
|
|
|
17
22
|
};
|
|
18
23
|
export declare function useWidgetStaticAttrs(widget: any): {
|
|
19
24
|
docInst: import('vue').ShallowRef<import('../../core').Doc>;
|
|
20
|
-
widgetMeta: import('vue').ComputedRef<
|
|
25
|
+
widgetMeta: import('vue').ComputedRef<WidgetMeta>;
|
|
21
26
|
fieldMeta: import('vue').ComputedRef<import('../../domain/field/field-binding').FieldDataBindingMeta | undefined>;
|
|
22
|
-
widgetProps: import('vue').ComputedRef<
|
|
27
|
+
widgetProps: import('vue').ComputedRef<WidgetPropsMeta>;
|
|
23
28
|
runtimeValuePath: import('vue').ComputedRef<any>;
|
|
24
29
|
fieldList: import('vue').ComputedRef<import('../../capabilities/model-field-runtime').FieldMeta[]>;
|
|
25
30
|
fieldInfo: import('vue').ComputedRef<import('../../capabilities/model-field-runtime').FieldMeta | null>;
|
|
26
31
|
modelInfo: import('vue').ComputedRef<import('../../capabilities/model-field-runtime').ModelMeta | null | undefined>;
|
|
27
|
-
widgetType: import('vue').ComputedRef<
|
|
32
|
+
widgetType: import('vue').ComputedRef<import('../../domain/widget/component-type').ExternalComponentType>;
|
|
28
33
|
isMultiple: import('vue').ComputedRef<boolean>;
|
|
29
34
|
isAsync: import('vue').ComputedRef<boolean>;
|
|
30
35
|
isDropdown: import('vue').ComputedRef<boolean>;
|
|
@@ -38,3 +43,10 @@ export declare function useWidgetStaticAttrs(widget: any): {
|
|
|
38
43
|
/** 显示状态 */
|
|
39
44
|
showDisplayStatus: import('vue').ComputedRef<import('../../core/widget/widget-state').WidgetDisplayStatus>;
|
|
40
45
|
};
|
|
46
|
+
export declare function usePaperWidgetStaticAttrs(widget: any): {
|
|
47
|
+
docInst: import('vue').ShallowRef<import('../../core').Doc>;
|
|
48
|
+
isDesignMode: import('vue').ComputedRef<boolean>;
|
|
49
|
+
pageWidgetMeta: import('vue').ComputedRef<WidgetMeta>;
|
|
50
|
+
pageWidgetProps: import('vue').ComputedRef<WidgetPropsMeta>;
|
|
51
|
+
widgetType: import('vue').ComputedRef<import('../../domain/widget/component-type').ExternalComponentType>;
|
|
52
|
+
};
|
|
@@ -108,7 +108,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
108
108
|
name: string;
|
|
109
109
|
type: import('../../../../../base/input/src/types').InputType;
|
|
110
110
|
id: string;
|
|
111
|
-
rows: number;
|
|
112
111
|
readonly: boolean;
|
|
113
112
|
disabled: boolean;
|
|
114
113
|
size: import('../../../../../base/input/src/types').InputSize;
|
|
@@ -124,6 +123,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
124
123
|
maxLength: number;
|
|
125
124
|
autofocus: boolean;
|
|
126
125
|
autocomplete: string;
|
|
126
|
+
rows: number;
|
|
127
127
|
bordered: boolean;
|
|
128
128
|
showSearchButton: boolean;
|
|
129
129
|
spellcheck: boolean;
|
|
@@ -152,7 +152,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
152
152
|
name: string;
|
|
153
153
|
type: import('../../../../../base/input/src/types').InputType;
|
|
154
154
|
id: string;
|
|
155
|
-
rows: number;
|
|
156
155
|
readonly: boolean;
|
|
157
156
|
disabled: boolean;
|
|
158
157
|
size: import('../../../../../base/input/src/types').InputSize;
|
|
@@ -168,6 +167,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
168
167
|
maxLength: number;
|
|
169
168
|
autofocus: boolean;
|
|
170
169
|
autocomplete: string;
|
|
170
|
+
rows: number;
|
|
171
171
|
bordered: boolean;
|
|
172
172
|
showSearchButton: boolean;
|
|
173
173
|
spellcheck: boolean;
|
|
@@ -184,7 +184,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
184
184
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
185
185
|
onClear?: (() => any) | undefined;
|
|
186
186
|
onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
|
|
187
|
-
}>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "
|
|
187
|
+
}>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
|
|
188
188
|
focus: () => void;
|
|
189
189
|
blur: () => void;
|
|
190
190
|
select: () => void;
|
|
@@ -103,7 +103,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
103
103
|
name: string;
|
|
104
104
|
type: import('../../../../../base/input/src/types').InputType;
|
|
105
105
|
id: string;
|
|
106
|
-
rows: number;
|
|
107
106
|
readonly: boolean;
|
|
108
107
|
disabled: boolean;
|
|
109
108
|
size: import('../../../../../base/input/src/types').InputSize;
|
|
@@ -119,6 +118,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
119
118
|
maxLength: number;
|
|
120
119
|
autofocus: boolean;
|
|
121
120
|
autocomplete: string;
|
|
121
|
+
rows: number;
|
|
122
122
|
bordered: boolean;
|
|
123
123
|
showSearchButton: boolean;
|
|
124
124
|
spellcheck: boolean;
|
|
@@ -147,7 +147,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
147
147
|
name: string;
|
|
148
148
|
type: import('../../../../../base/input/src/types').InputType;
|
|
149
149
|
id: string;
|
|
150
|
-
rows: number;
|
|
151
150
|
readonly: boolean;
|
|
152
151
|
disabled: boolean;
|
|
153
152
|
size: import('../../../../../base/input/src/types').InputSize;
|
|
@@ -163,6 +162,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
163
162
|
maxLength: number;
|
|
164
163
|
autofocus: boolean;
|
|
165
164
|
autocomplete: string;
|
|
165
|
+
rows: number;
|
|
166
166
|
bordered: boolean;
|
|
167
167
|
showSearchButton: boolean;
|
|
168
168
|
spellcheck: boolean;
|
|
@@ -179,7 +179,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
179
179
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
180
180
|
onClear?: (() => any) | undefined;
|
|
181
181
|
onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
|
|
182
|
-
}>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "
|
|
182
|
+
}>, "select" | "blur" | "focus" | "inputRef" | ("name" | "type" | "id" | "readonly" | "disabled" | "size" | "placeholder" | "modelValue" | "prefix" | "suffix" | "addonBefore" | "addonAfter" | "allowClear" | "showCount" | "showPasswordToggle" | "maxLength" | "autofocus" | "autocomplete" | "rows" | "bordered" | "showSearchButton" | "spellcheck" | "customStyle")> & import('vue').ShallowUnwrapRef<{
|
|
183
183
|
focus: () => void;
|
|
184
184
|
blur: () => void;
|
|
185
185
|
select: () => void;
|
|
@@ -14,13 +14,6 @@ export declare const isEmptyValue: (value: any) => boolean;
|
|
|
14
14
|
export declare function safeParseJson<T = any>(data: unknown, fallback?: T | null, validator?: (value: unknown) => value is T): T | null;
|
|
15
15
|
/** 设置字段的默认valuePath */
|
|
16
16
|
export declare function generateValuePath(fieldLink: string, subFieldKey: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* 提取参考路径中的索引,替换模板路径中的 [n] 占位符
|
|
19
|
-
* @param refPath 参考路径(含具体索引,如 $.f_gdb[1].routing_operation_1_)或直接传数字索引
|
|
20
|
-
* @param templatePath 模板路径(含 [n] 占位符,如 $.f_gdb[n].ccc / $.ddd[n].ccc)
|
|
21
|
-
* @returns 替换后的完整路径(如 $.f_gdb[1].ccc / $.ddd[1].ccc)
|
|
22
|
-
*/
|
|
23
|
-
export declare function replacePathIndexPlaceholder(refPath: string | number | undefined, templatePath: string): string;
|
|
24
17
|
/**
|
|
25
18
|
* 按分隔符截取字符串最后一个片段,处理空值/无分隔符边界
|
|
26
19
|
* @param str 待截取的字符串(允许空/undefined)
|
|
@@ -29,20 +22,71 @@ export declare function replacePathIndexPlaceholder(refPath: string | number | u
|
|
|
29
22
|
*/
|
|
30
23
|
export declare function getLastSegment(str?: string, separator?: string): string;
|
|
31
24
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
25
|
+
* 根据参考路径 / index 替换模板中的占位符
|
|
26
|
+
*
|
|
27
|
+
* - 传入 x 时替换 [n_x]
|
|
28
|
+
* - 传入 y 时替换 [n_y]
|
|
29
|
+
* - 未传入时保留原占位符
|
|
30
|
+
* - 最后再统一处理普通 [n]
|
|
35
31
|
*
|
|
32
|
+
* 示例:
|
|
33
|
+
* replacePathIndexPlaceholders({
|
|
34
|
+
* x: 1,
|
|
35
|
+
* y: undefined,
|
|
36
|
+
* templatePath: '$.table[n_y].cross[n_x].value[n]',
|
|
37
|
+
* })
|
|
36
38
|
* =>
|
|
37
|
-
*
|
|
38
|
-
* fieldKey: 'f_eeb',
|
|
39
|
-
* linkFieldKey: 'f_eeblink'
|
|
40
|
-
* }
|
|
39
|
+
* '$.table[n_y].cross[1].value[n]'
|
|
41
40
|
*/
|
|
42
|
-
export declare function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
export declare function replacePathIndexPlaceholders(params: {
|
|
42
|
+
refPath?: string;
|
|
43
|
+
n?: number;
|
|
44
|
+
x?: number;
|
|
45
|
+
y?: number;
|
|
46
|
+
templatePath: string;
|
|
47
|
+
}): string;
|
|
48
|
+
/**
|
|
49
|
+
* 提取参考路径中的索引,替换模板路径中的占位符
|
|
50
|
+
*
|
|
51
|
+
* @param refPath 参考路径(如 $.a[1].b)或直接传数字
|
|
52
|
+
* @param templatePath 模板路径(如 $.list[n].value)
|
|
53
|
+
* @param placeholder 占位符名称,默认 n
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* replacePathIndexPlaceholder(1, '$.a[n].b')
|
|
57
|
+
* // $.a[1].b
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* replacePathIndexPlaceholder(2, '$.a[n_x].b', 'n_x')
|
|
61
|
+
* // $.a[2].b
|
|
62
|
+
*/
|
|
63
|
+
export declare function replacePathIndexPlaceholder(refPath: string | number | undefined, templatePath: string, placeholder?: string): string;
|
|
64
|
+
export interface ParsedValuePath {
|
|
65
|
+
/** 原始路径 */
|
|
66
|
+
raw: string;
|
|
67
|
+
/** 去掉 $. 后 */
|
|
68
|
+
normalized: string;
|
|
69
|
+
/** 最终字段 */
|
|
70
|
+
fieldKey: string;
|
|
71
|
+
fieldPath: string;
|
|
72
|
+
/** 父级字段 */
|
|
73
|
+
parentFieldKey?: string;
|
|
74
|
+
parentFieldPath?: string;
|
|
75
|
+
/** 是否根字段 */
|
|
76
|
+
isRoot: boolean;
|
|
77
|
+
/** 是否子表 */
|
|
78
|
+
isSubTable: boolean;
|
|
79
|
+
/** 是否 link */
|
|
80
|
+
isLink: boolean;
|
|
81
|
+
/** linkFieldKey */
|
|
82
|
+
linkFieldKey?: string;
|
|
83
|
+
linkFieldPath?: string;
|
|
84
|
+
/** 是否含 index */
|
|
85
|
+
hasIndex: boolean;
|
|
86
|
+
/** path segments */
|
|
87
|
+
segments: string[];
|
|
88
|
+
}
|
|
89
|
+
export declare function parseValuePath(valuePath?: string): ParsedValuePath;
|
|
46
90
|
/**
|
|
47
91
|
* 提取 $.变量名[内容] 格式的方法(截取到 ] 并包含 ])
|
|
48
92
|
* @param str
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldMeta } from '../../capabilities/model-field-runtime';
|
|
2
|
+
import { Wr } from '../../core/model/document';
|
|
2
3
|
export declare function transformSourceData(sourceData: any, i18nData: any): any;
|
|
3
4
|
export declare function transformSourceDataList(data: any[], dict?: {}): {
|
|
4
5
|
_DICT: object;
|
|
@@ -11,6 +12,8 @@ export declare function conversionFormState(payload: {
|
|
|
11
12
|
masterSlaveList: FieldMeta[];
|
|
12
13
|
/** 渲染数据列表 */
|
|
13
14
|
interfaceData: any;
|
|
15
|
+
/** 主要是 WrField */
|
|
16
|
+
instances: Wr[];
|
|
14
17
|
}): Record<string, any>;
|
|
15
|
-
/**
|
|
18
|
+
/** 数据转成真实提交数据 */
|
|
16
19
|
export declare function getSubmitFormData(formData: any): any;
|