@gct-paas/word 0.1.32 → 0.1.33
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 +24 -8
- package/dist/core/layout/handlers/fields/FieldBaseHandler.d.ts +1 -0
- package/dist/core/layout/linkSubTableLayout.d.ts +22 -0
- package/dist/core/layout/providers/TableInfoProvider.d.ts +2 -3
- 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} +1 -1
- package/dist/core/model/logic/{BoundedRegion.d.ts → subtable/bounded/BoundedRegion.d.ts} +3 -9
- package/dist/core/model/logic/subtable/link/CheckTableRegion.d.ts +11 -0
- package/dist/core/model/logic/subtable/link/DataGroup2DRegion.d.ts +11 -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} +3 -9
- package/dist/core/model/logic/subtable/shared/itemRegionOps.d.ts +11 -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/index.es.js +1611 -1238
- package/dist/runtime/canvas/table/utils/index.d.ts +10 -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 +70 -20
- package/dist/word.css +128 -128
- package/package.json +3 -3
- 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,18 @@ 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
|
-
|
|
87
|
+
/**
|
|
88
|
+
* 是否是有[动态关联]的表
|
|
89
|
+
*/
|
|
90
|
+
export declare const getIsDataGroup2DTable: (type?: string) => boolean;
|
|
91
|
+
/**
|
|
92
|
+
* [动态关联 表]的单元格是否在子表范围内
|
|
93
|
+
*/
|
|
94
|
+
export declare const getIs2DCellInSubTable: (cellZone?: string) => boolean;
|
|
95
|
+
export declare function getDataIndexLayersMap({ type, cells, isDesign, convertExtraProps, }: {
|
|
88
96
|
type: 'fixed-table' | 'check-table' | 'dynamic-table' | '2d-table';
|
|
89
97
|
cells: any[];
|
|
90
|
-
|
|
98
|
+
isDesign: boolean;
|
|
91
99
|
convertExtraProps: (firstCell: any) => {
|
|
92
100
|
type: OutlineType;
|
|
93
101
|
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;
|
|
@@ -15,12 +15,54 @@ export declare function safeParseJson<T = any>(data: unknown, fallback?: T | nul
|
|
|
15
15
|
/** 设置字段的默认valuePath */
|
|
16
16
|
export declare function generateValuePath(fieldLink: string, subFieldKey: string): string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @returns 替换后的完整路径(如 $.f_gdb[1].ccc / $.ddd[1].ccc)
|
|
18
|
+
* 根据「当前控件」的 runtime 路径,把模板里的占位符展开为真实下标。
|
|
19
|
+
* - 先展开交叉区 `[n_y]`、`[n_x]`(按 refPath 中出现的数字下标顺序取第 1、2 个)
|
|
20
|
+
* - 再对剩余 `[n]` 走 replacePathIndexPlaceholder(单轴子表)
|
|
22
21
|
*/
|
|
23
|
-
export declare function
|
|
22
|
+
export declare function resolveTemplatePathFromRuntimeRef(refPath: string, templatePath: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* 仅有一个「行序号」时的占位符替换(如外部数据源按单行 index 灌值)。
|
|
25
|
+
* 交叉区 [n_y]/[n_x] 在缺少双下标时退化为同一 index(与旧版无下标交叉路径行为一致;精确 y/x 仍依赖版面 getValuePath)。
|
|
26
|
+
*/
|
|
27
|
+
export declare function replacePathIndexPlaceholderLoose(index: number, templatePath: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* 仅有部分「行序号」时的占位符替换。
|
|
30
|
+
*
|
|
31
|
+
* - 传入 x 时替换 [n_x]
|
|
32
|
+
* - 传入 y 时替换 [n_y]
|
|
33
|
+
* - 未传入时保留原占位符
|
|
34
|
+
* - 最后再统一处理普通 [n]
|
|
35
|
+
*
|
|
36
|
+
* 示例:
|
|
37
|
+
* replacePathIndexPlaceholderLoose({
|
|
38
|
+
* x: 1,
|
|
39
|
+
* y: undefined,
|
|
40
|
+
* templatePath: '$.table[n_y].cross[n_x].value[n]',
|
|
41
|
+
* })
|
|
42
|
+
* =>
|
|
43
|
+
* '$.table[n_y].cross[1].value[n]'
|
|
44
|
+
*/
|
|
45
|
+
export declare function replacePathIndexPlaceholders(params: {
|
|
46
|
+
x?: number;
|
|
47
|
+
y?: number;
|
|
48
|
+
templatePath: string;
|
|
49
|
+
}): string;
|
|
50
|
+
/**
|
|
51
|
+
* 提取参考路径中的索引,替换模板路径中的占位符
|
|
52
|
+
*
|
|
53
|
+
* @param refPath 参考路径(如 $.a[1].b)或直接传数字
|
|
54
|
+
* @param templatePath 模板路径(如 $.list[n].value)
|
|
55
|
+
* @param placeholder 占位符名称,默认 n
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* replacePathIndexPlaceholder(1, '$.a[n].b')
|
|
59
|
+
* // $.a[1].b
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* replacePathIndexPlaceholder(2, '$.a[n_x].b', 'n_x')
|
|
63
|
+
* // $.a[2].b
|
|
64
|
+
*/
|
|
65
|
+
export declare function replacePathIndexPlaceholder(refPath: string | number | undefined, templatePath: string, placeholder?: string): string;
|
|
24
66
|
/**
|
|
25
67
|
* 按分隔符截取字符串最后一个片段,处理空值/无分隔符边界
|
|
26
68
|
* @param str 待截取的字符串(允许空/undefined)
|
|
@@ -28,21 +70,29 @@ export declare function replacePathIndexPlaceholder(refPath: string | number | u
|
|
|
28
70
|
* @returns 最后一个片段,空值返回空字符串
|
|
29
71
|
*/
|
|
30
72
|
export declare function getLastSegment(str?: string, separator?: string): string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
73
|
+
export interface ParsedValuePath {
|
|
74
|
+
/** 原始路径 */
|
|
75
|
+
raw: string;
|
|
76
|
+
/** 去掉 $. 后 */
|
|
77
|
+
normalized: string;
|
|
78
|
+
/** 最终字段 */
|
|
79
|
+
fieldKey: string;
|
|
80
|
+
/** 父级字段 */
|
|
81
|
+
parentFieldKey?: string;
|
|
82
|
+
/** 是否根字段 */
|
|
83
|
+
isRoot: boolean;
|
|
84
|
+
/** 是否子表 */
|
|
85
|
+
isSubTable: boolean;
|
|
86
|
+
/** 是否 link */
|
|
87
|
+
isLink: boolean;
|
|
88
|
+
/** linkFieldKey */
|
|
89
|
+
linkFieldKey?: string;
|
|
90
|
+
/** 是否含 index */
|
|
91
|
+
hasIndex: boolean;
|
|
92
|
+
/** path segments */
|
|
93
|
+
segments: string[];
|
|
94
|
+
}
|
|
95
|
+
export declare function parseValuePath(valuePath?: string): ParsedValuePath;
|
|
46
96
|
/**
|
|
47
97
|
* 提取 $.变量名[内容] 格式的方法(截取到 ] 并包含 ])
|
|
48
98
|
* @param str
|