@gct-paas/word 0.1.38 → 0.1.41
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/core/data/DataManager.d.ts +15 -0
- package/dist/core/data/subtable-row.d.ts +17 -0
- package/dist/core/layout/LayoutContext.d.ts +2 -0
- package/dist/core/model/DocModel.d.ts +2 -2
- package/dist/index.es.js +2115 -140
- package/dist/runtime/_register_/runtime/SuiteRuntime.d.ts +4 -0
- package/dist/runtime/interface/change-diff.d.ts +2 -0
- package/dist/sdk/doc-runtime/check-table/map-check-table-item-infos.d.ts +1 -1
- package/dist/sdk/doc-runtime/composables/useDocOperations.d.ts +2 -0
- package/dist/sdk/doc-runtime/utils/wait-for-data-settle.d.ts +8 -0
- package/dist/sdk/engine/index.d.ts +0 -1
- package/dist/sdk/types/field-model-query.d.ts +2 -0
- package/dist/sdk/types/index.d.ts +20 -9
- package/dist/utils/func/render.d.ts +11 -3
- package/dist/word.css +12 -12
- package/package.json +5 -4
|
@@ -57,6 +57,10 @@ export declare class DataManager {
|
|
|
57
57
|
* @returns 指定路径的标签值或原值,不存在返回 undefined
|
|
58
58
|
*/
|
|
59
59
|
getLabel<T = any>(path: JsonPath): T | undefined;
|
|
60
|
+
/** 子表数组路径下未软删行数 */
|
|
61
|
+
countActiveSubtableRows(arrayPath: JsonPath): number;
|
|
62
|
+
/** 版面可见行下标 → rawData 数组实际下标 */
|
|
63
|
+
resolveSubtableVisibleIndex(arrayPath: JsonPath, visibleIndex: number): number;
|
|
60
64
|
private assignField;
|
|
61
65
|
/**
|
|
62
66
|
* 根据 jsonpath 设置数据
|
|
@@ -170,6 +174,17 @@ export declare class DataManager {
|
|
|
170
174
|
* 这样可以保证:参数映射(`[n]`)先铺好默认值,自定义数据源(真实下标)再精确覆盖。
|
|
171
175
|
*/
|
|
172
176
|
applyInitData(initDataMap: Record<string, any>): void;
|
|
177
|
+
/**
|
|
178
|
+
* 补齐二维/检验表的关联轴子表(如 f_ewblink / f_jianyan2)到动态关联铺砖槽位数。
|
|
179
|
+
* 不处理主体轴(如 f_ewb / f_jianyan1),避免覆盖接口行或误扩纵向轴。
|
|
180
|
+
*/
|
|
181
|
+
private syncSubTableRowsToLayout;
|
|
182
|
+
/** 子表在 rawData 中的行数(支持尚未转成数组的 { data: [] } 接口形态,此时返回 0 且不在此阶段强转) */
|
|
183
|
+
private countSubTableDataRows;
|
|
184
|
+
/**
|
|
185
|
+
* 为检验表关联轴补足铺砖行:占位标记 + __gw_x_uid(与 push/insert 行为一致)。
|
|
186
|
+
*/
|
|
187
|
+
private ensureCheckTableLinkLayoutRows;
|
|
173
188
|
private applyInitDataCrossWildcard;
|
|
174
189
|
/**
|
|
175
190
|
* 解析子表初始化行数:接口已有行数、版面数据分组槽位。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** 子表行软删 / 可见下标与存储下标映射(与后端 deleted_ 约定一致) */
|
|
2
|
+
type AxisType = 'x' | 'y';
|
|
3
|
+
export type PersistedSubtableRowContext = {
|
|
4
|
+
rawData?: Record<string, any>;
|
|
5
|
+
/** 子表 key,如 f_ewb、f_ewblink(不含 $.) */
|
|
6
|
+
tableKey?: string;
|
|
7
|
+
axis?: AxisType;
|
|
8
|
+
};
|
|
9
|
+
/** 是否应软删(打 deleted_)而非 splice */
|
|
10
|
+
export declare function isPersistedSubtableRow(row: Record<string, any> | undefined | null, ctx?: PersistedSubtableRowContext): boolean;
|
|
11
|
+
/** 未软删的行数;空数组返回 0 */
|
|
12
|
+
export declare function countActiveSubtableRows(rows: unknown): number;
|
|
13
|
+
/** 版面可见行下标 → rawData 数组中的实际下标 */
|
|
14
|
+
export declare function resolveSubtableStorageIndex(rows: any[], visibleIndex: number): number;
|
|
15
|
+
/** 在可见下标处插入时对应的 splice 位置 */
|
|
16
|
+
export declare function resolveSubtableInsertIndex(rows: any[], visibleIndex: number): number;
|
|
17
|
+
export {};
|
|
@@ -48,6 +48,8 @@ export declare class LayoutContext {
|
|
|
48
48
|
*/
|
|
49
49
|
getParagraphRemainingSize(): number;
|
|
50
50
|
addRun(run: LayoutNode): void;
|
|
51
|
+
/** 子表可见行下标 → rawData 存储下标(跳过 deleted_ 行) */
|
|
52
|
+
private mapSubtableVisibleIndex;
|
|
51
53
|
/**
|
|
52
54
|
* 根据 dataIndex 替换 path 中的 [n] 为实际值
|
|
53
55
|
* @param path 包含 [n] 的路径,如 "$.items[n].name"
|
|
@@ -69,8 +69,8 @@ export declare class DocModel {
|
|
|
69
69
|
* 根据版面数据分组 / 动态关联铺砖,计算子表字段在 rawData 中应初始化的行数。
|
|
70
70
|
*
|
|
71
71
|
* - 固定表:槽位归 subFieldKey(bounded + itemRegion)
|
|
72
|
-
* - 二维表 /
|
|
73
|
-
* 纵向 subFieldKey(如
|
|
72
|
+
* - 二维表 / 检验表:动态分组铺砖槽位归 linkFieldKey(如 f_jianyan2);
|
|
73
|
+
* 纵向 subFieldKey(如 f_jianyan1)由检验项条数撑行,返回 0
|
|
74
74
|
* - 其它子表无分组:返回 1
|
|
75
75
|
*/
|
|
76
76
|
getSubTableLayoutSlotCount(subFieldKey: string): number;
|