@gct-paas/word 0.1.17 → 0.1.19

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.
Files changed (58) hide show
  1. package/dist/base/calendar/src/calendar.vue.d.ts +6 -4
  2. package/dist/base/calendar/src/time.vue.d.ts +1 -0
  3. package/dist/core/command/commands/Backspace.d.ts +2 -0
  4. package/dist/core/command/commands/MergeCells.d.ts +7 -1
  5. package/dist/core/command/commands/UnmergeCells.d.ts +7 -1
  6. package/dist/core/command/types.d.ts +2 -0
  7. package/dist/core/data/DataManager.d.ts +9 -0
  8. package/dist/core/event/types.d.ts +1 -1
  9. package/dist/core/index.d.ts +2 -5
  10. package/dist/core/interaction/InteractionController.d.ts +4 -0
  11. package/dist/core/interaction/types.d.ts +3 -0
  12. package/dist/core/interaction/useInteraction.d.ts +2 -0
  13. package/dist/core/layout/handlers/ImageHandler.d.ts +1 -0
  14. package/dist/core/layout/handlers/TextHandler.d.ts +5 -0
  15. package/dist/core/layout/handlers/base/BaseHandler.d.ts +5 -0
  16. package/dist/core/layout/handlers/fields/BaseHandler.d.ts +6 -1
  17. package/dist/core/model/DocModel.d.ts +1 -0
  18. package/dist/core/model/base/ModelGroup.d.ts +6 -0
  19. package/dist/core/model/document/Wtr.d.ts +2 -2
  20. package/dist/core/model/document/WtrPr.d.ts +13 -1
  21. package/dist/core/model/footers/Wfooter.d.ts +6 -0
  22. package/dist/core/model/headers/Wheader.d.ts +6 -0
  23. package/dist/core/model/helpers.d.ts +15 -0
  24. package/dist/core/model/images/Wimages.d.ts +12 -0
  25. package/dist/core/utils/expand.d.ts +3 -1
  26. package/dist/core/view/TableCell.d.ts +2 -0
  27. package/dist/core/view/TableRow.d.ts +3 -0
  28. package/dist/core/view/base/LayoutNode.d.ts +3 -0
  29. package/dist/core/widget/widget-state.d.ts +14 -5
  30. package/dist/index.es.js +2032 -1195
  31. package/dist/runtime/canvas/doc-layout.vue.d.ts +2 -1
  32. package/dist/runtime/canvas/table/utils/index.d.ts +1 -0
  33. package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +2 -0
  34. package/dist/runtime/designer/main/editable-canvas.vue.d.ts +2 -2
  35. package/dist/runtime/designer/ribbon/components/sub-table-form-modal.vue.d.ts +6 -6
  36. package/dist/runtime/factories/modules/useSpecificConfig.d.ts +2 -0
  37. package/dist/runtime/factories/useRenderData.d.ts +1 -1
  38. package/dist/runtime/factories/useWidgetInitializer.d.ts +11 -0
  39. package/dist/runtime/renderer/main/preview-canvas.vue.d.ts +2 -2
  40. package/dist/sdk/doc-runtime/factories/useDocumentFactory.d.ts +7 -1
  41. package/dist/sdk/engine/index.d.ts +3 -3
  42. package/dist/sdk/types/index.d.ts +11 -0
  43. package/dist/sdk/vue/layouts/doc-render-layout.vue.d.ts +2 -2
  44. package/dist/{core/sdk → utils/composables}/usePagesToPdf.d.ts +1 -1
  45. package/dist/utils/func/core.d.ts +26 -9
  46. package/dist/utils/func/field.d.ts +13 -0
  47. package/dist/utils/func/file.d.ts +1 -1
  48. package/dist/utils/func/form.d.ts +5 -0
  49. package/dist/utils/func/render.d.ts +10 -1
  50. package/dist/word.css +349 -305
  51. package/package.json +1 -2
  52. package/dist/base/utils/unit-converter-util.d.ts +0 -18
  53. package/dist/core/render/KonvaRenderer.d.ts +0 -46
  54. package/dist/core/render/RendererFactory.d.ts +0 -4
  55. package/dist/core/render/types.d.ts +0 -9
  56. package/dist/core/sdk/createDoc.d.ts +0 -2
  57. package/dist/runtime/interface/utils.d.ts +0 -12
  58. /package/dist/core/{sdk → utils}/DocPubApiContext.d.ts +0 -0
@@ -8,15 +8,17 @@ type __VLS_Props = {
8
8
  minDate?: string | number | Date;
9
9
  maxDate?: string | number | Date;
10
10
  timeFormat?: 'HH:mm:ss' | 'HH:mm' | 'HH';
11
+ showClearBtn?: boolean;
11
12
  };
12
13
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
13
- change: (value: Date) => any;
14
- "update:modelValue": (value: Date) => any;
14
+ change: (value: Date | null) => any;
15
+ "update:modelValue": (value: Date | null) => any;
15
16
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
16
- onChange?: ((value: Date) => any) | undefined;
17
- "onUpdate:modelValue"?: ((value: Date) => any) | undefined;
17
+ onChange?: ((value: Date | null) => any) | undefined;
18
+ "onUpdate:modelValue"?: ((value: Date | null) => any) | undefined;
18
19
  }>, {
19
20
  mode: "datetime" | "date";
21
+ showClearBtn: boolean;
20
22
  weekStart: number;
21
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
22
24
  export default _default;
@@ -2,6 +2,7 @@ type __VLS_Props = {
2
2
  modelValue: string | undefined;
3
3
  disabled?: boolean;
4
4
  format?: 'HH:mm:ss' | 'HH:mm' | 'HH';
5
+ showClearBtn?: boolean;
5
6
  disabledTime?: () => {
6
7
  disabledHours?: () => number[];
7
8
  disabledMinutes?: (hour: number) => number[];
@@ -30,6 +30,8 @@ export declare class Backspace extends CommandBase<'backspace'> {
30
30
  * 处理组件 run 的删除
31
31
  */
32
32
  private handleWidgetRun;
33
+ /** 处理悬浮 run 的删除 */
34
+ private handleOverlayPageWidgetRun;
33
35
  /**
34
36
  * 处理位置 >= 0 的删除情况
35
37
  */
@@ -1,12 +1,18 @@
1
1
  import { CommandBase } from '../base/CommandBase';
2
2
  import { Doc } from '../../view/Doc';
3
- import { WrText } from '../../model/document';
3
+ import { Wp, WrText } from '../../model/document';
4
4
  import { CommandPayloadMap } from '../types';
5
5
  export declare class MergeCells extends CommandBase<'mergeCells'> {
6
6
  constructor(doc: Doc, payload?: CommandPayloadMap['mergeCells']);
7
7
  protected execute(): Promise<{
8
+ wp: Wp;
9
+ pos: number;
10
+ side: string;
11
+ wr?: undefined;
12
+ } | {
8
13
  wr: WrText | undefined;
9
14
  pos: number;
10
15
  side: string;
16
+ wp?: undefined;
11
17
  } | null>;
12
18
  }
@@ -1,12 +1,18 @@
1
1
  import { CommandBase } from '../base/CommandBase';
2
2
  import { Doc } from '../../view/Doc';
3
- import { WrText } from '../../model/document';
3
+ import { Wp, WrText } from '../../model/document';
4
4
  import { CommandPayloadMap } from '../types';
5
5
  export declare class UnmergeCells extends CommandBase<'unmergeCells'> {
6
6
  constructor(doc: Doc, payload?: CommandPayloadMap['unmergeCells']);
7
7
  protected execute(): Promise<{
8
+ wp: Wp;
9
+ pos: number;
10
+ side: string;
11
+ wr?: undefined;
12
+ } | {
8
13
  wr: WrText | undefined;
9
14
  pos: number;
10
15
  side: string;
16
+ wp?: undefined;
11
17
  } | null | undefined>;
12
18
  }
@@ -3,6 +3,7 @@ import { Doc } from '../view/Doc';
3
3
  import { WidgetMeta } from '../widget/widget-meta';
4
4
  import { WordHighlight } from '../model/types';
5
5
  import { PointerHitResult } from '../cursor/hit/types';
6
+ import { FieldMeta } from '@gct-paas/api/apaas';
6
7
  export interface CursorMeta {
7
8
  nodeId: string;
8
9
  offset: number;
@@ -95,6 +96,7 @@ export type CommandPayloadMap = {
95
96
  insertField: CommandPayload & {
96
97
  widgetMeta: WidgetMeta;
97
98
  valuePath: string;
99
+ mainModelFields: FieldMeta[];
98
100
  };
99
101
  insertPaperWidget: CommandPayload & {
100
102
  pageWidgetMeta: WidgetMeta;
@@ -47,6 +47,15 @@ export declare class DataManager {
47
47
  * @returns 指定路径的标签值或原值,不存在返回 undefined
48
48
  */
49
49
  getLabel<T = any>(path: JsonPath): T | undefined;
50
+ /**
51
+ * 根据 jsonpath 设置数据
52
+ * @param path jsonpath 路径
53
+ * @param value 要设置的值
54
+ * @param x
55
+ * @param y
56
+ * @returns 是否设置成功
57
+ */
58
+ set2D(path: JsonPath, value: any, x: number, y: number, source?: 'user' | 'dependency'): boolean;
50
59
  /**
51
60
  * 根据 jsonpath 设置数据
52
61
  * @param path jsonpath 路径
@@ -65,4 +65,4 @@ export type MoveOpts = Pick<KeydownOpts, 'dir' | 'shift' | 'ctrl'>;
65
65
  * 定义了系统中所有需要进行分发/调度的事件类型标识
66
66
  */
67
67
  export type DispatchEventType = 'ime:compositionstart' | 'ime:compositionupdate' | 'ime:compositionend' | 'ime:input' | 'ime:paste' | 'ime:focus' | 'ime:blur' | 'ime:keydown' | 'caret:locate' | 'konva:click' | 'konva:dragstart' | 'konva:dragmove' | 'konva:dragend' | 'konva:contextmenu' | 'inter:str' | 'inter:stc' | 'inter:stall' | 'inter:active' | 'inter:chg-hmid';
68
- export type EventBusType = 'autoScroll:start' | 'autoScroll:move' | 'autoScroll:stop' | 'caret:changed' | 'caret:requestScroll' | 'cursor:change' | 'cursor:changed' | 'tableSelection:change' | 'dragHoverId:change' | 'hoverModelId:change' | 'focusModelId:change' | 'panelData:change';
68
+ export type EventBusType = 'autoScroll:start' | 'autoScroll:move' | 'autoScroll:stop' | 'caret:changed' | 'caret:requestScroll' | 'cursor:change' | 'cursor:changed' | 'tableSelection:change' | 'activeTableId:change' | 'dragHoverId:change' | 'hoverModelId:change' | 'focusModelId:change' | 'panelData:change';
@@ -1,6 +1,5 @@
1
- export { newDoc } from './sdk/createDoc';
2
- export { useDocPubApiContext } from './sdk/DocPubApiContext';
3
- export { usePrint } from './sdk/usePagesToPdf';
1
+ export { Doc } from './view/Doc';
2
+ export { useDocPubApiContext } from './utils/DocPubApiContext';
4
3
  export { useInteraction } from './interaction/useInteraction';
5
4
  export { formulaUtils } from './utils/calculate-formula';
6
5
  export { TextUtil } from './view/utils/TextUtil';
@@ -12,11 +11,9 @@ export { DocumentEventBridge } from './event/DocumentEventBridge';
12
11
  export { DocModeTypeConst, PageSizeEnumConst, BuiltinComponentTypeConst } from './constants';
13
12
  export { default as CursorOverlay } from './cursor/render/cursor-overlay.vue';
14
13
  export { default as HiddenInput } from './cursor/render/hidden-input.vue';
15
- export type { PaperItem } from './sdk/usePagesToPdf';
16
14
  export type { DocInitOptions } from './view/Doc';
17
15
  export type { WidgetMeta } from './widget/widget-meta';
18
16
  export type { DocModeType, CompleteComponentType, BuiltinComponentType } from './constants';
19
- export type { Doc } from './view/Doc';
20
17
  export type { LayoutNode } from './view/base/LayoutNode';
21
18
  export type { Page } from './view/Page';
22
19
  export type { TextRun } from './view/runs/TextRun';
@@ -7,6 +7,7 @@ export declare class InteractionController {
7
7
  onSelectTableRow(payload: {
8
8
  id: string;
9
9
  index: number;
10
+ realRowIndex: number;
10
11
  }): void;
11
12
  onSelectTableCol(payload: {
12
13
  id: string;
@@ -17,6 +18,9 @@ export declare class InteractionController {
17
18
  }): void;
18
19
  clearTableSelection(): void;
19
20
  onChangeDragHoverId(hitId: string): void;
21
+ onSetActiveTableId(tableId: string): void;
22
+ clearActiveTableId(): void;
23
+ private syncActiveTableByMeta;
20
24
  resolveIntent(id: string | undefined, hitId: string | undefined): void;
21
25
  onActivePanelData(payload: {
22
26
  type: PanelType;
@@ -3,10 +3,13 @@ export type ITableSelection = {
3
3
  tableId: string;
4
4
  axis: 'row' | 'col' | 'all';
5
5
  index: number;
6
+ realRowIndex?: number;
6
7
  } | null;
7
8
  export type InteractionState = {
8
9
  /** 表格选择(行 / 列 / 全选) */
9
10
  tableSelection: ITableSelection | null;
11
+ /** 当前激活表格 id(仅用于 table overlay 显示) */
12
+ activeTableId: string;
10
13
  /** 拖拽的id 用来进行处理单个单元格选中 */
11
14
  dragHoverId: string;
12
15
  /** hover 模型的模型 id */
@@ -5,7 +5,9 @@ export declare function useInteraction(docRef: Ref<Doc | null>): {
5
5
  readonly tableId: string;
6
6
  readonly axis: "row" | "col" | "all";
7
7
  readonly index: number;
8
+ readonly realRowIndex?: number | undefined;
8
9
  } | null | undefined;
10
+ readonly activeTableId?: string | undefined;
9
11
  readonly dragHoverId?: string | undefined;
10
12
  readonly hoverModelId?: string | undefined;
11
13
  readonly focusModelId?: string | undefined;
@@ -6,5 +6,6 @@ import { LayoutContext } from '../LayoutContext';
6
6
  */
7
7
  export declare class ImageHandler {
8
8
  static emuToPixels(emu: number): number;
9
+ private static resolveImageQuery;
9
10
  static layout(context: LayoutContext, wr: WrImage): void;
10
11
  }
@@ -2,6 +2,11 @@ import { WrText } from '../../model/document';
2
2
  import { LayoutContext } from '../LayoutContext';
3
3
  export declare class TextHandler {
4
4
  static getId(context: LayoutContext, wr: WrText): string;
5
+ static get2DInfo(context: LayoutContext): {
6
+ xDataIndex: number | undefined;
7
+ yDataIndex: number | undefined;
8
+ valuePath2D: string | undefined;
9
+ };
5
10
  /**
6
11
  * 合并部分run
7
12
  * @param context
@@ -20,7 +20,12 @@ export declare abstract class BaseHandler {
20
20
  * @returns
21
21
  */
22
22
  getDataIndex(init?: 0 | null): number | null;
23
+ getPaperIndex(): number | null;
23
24
  getId(): string;
25
+ get2DInfo(): {
26
+ xDataIndex: number | undefined;
27
+ yDataIndex: number | undefined;
28
+ };
24
29
  getLayoutStyle(): ReturnType<typeof TextRun.textStyle2LayoutStyle>;
25
30
  abstract layout(): void;
26
31
  }
@@ -9,13 +9,18 @@ export type HandlerContext = {
9
9
  export declare class BaseHandler {
10
10
  static hasValue(value: ValueType): boolean;
11
11
  static getId(context: LayoutContext, wr: WrText): string;
12
+ static get2DInfo(context: LayoutContext): {
13
+ xDataIndex: number | undefined;
14
+ yDataIndex: number | undefined;
15
+ valuePath2D: string | undefined;
16
+ };
12
17
  static getValue(ctx: HandlerContext, valuePath: string): any;
13
18
  static getLabel(ctx: HandlerContext, valuePath: string): any;
14
19
  static getNoValueLabel(ctx: HandlerContext): {
15
20
  label: string;
16
21
  type: 'placeholder' | 'fieldName' | 'noneLabel' | 'default';
17
22
  };
18
- static formatDateTimeValue(ctx: HandlerContext, valuePath: string): any;
23
+ static formatFieldValue(ctx: HandlerContext, valuePath: string): any;
19
24
  /**
20
25
  * 渲染组件值 label -> value
21
26
  * @param ctx
@@ -60,4 +60,5 @@ export declare class DocModel {
60
60
  /** 获取章节对应的浮层实例 */
61
61
  getOverlay(section: Section): import('./overlays/Woverlay').Woverlay | null;
62
62
  private collectSecPrs;
63
+ private collectScopedImagesFromHeaderFooter;
63
64
  }
@@ -1,5 +1,6 @@
1
1
  import { ModelNode, ModelNodeOptions } from './ModelNode';
2
2
  import { RawElement } from '../types/raw';
3
+ import { Wp } from '../document/Wp';
3
4
  export interface ModelGroupOptions<T = ModelNode | RawElement> extends ModelNodeOptions {
4
5
  children?: T[];
5
6
  }
@@ -52,6 +53,11 @@ export declare abstract class ModelGroup<T = ModelNode | RawElement> extends Mod
52
53
  * @returns 第一个子节点,如果没有子节点则返回 undefined
53
54
  */
54
55
  getFirstChild(): T | undefined;
56
+ /**
57
+ * 深度优先查找第一个段落节点(w:p)
58
+ * @returns 第一个 Wp,如果未找到则返回 undefined
59
+ */
60
+ getFirstWp(): Wp | undefined;
55
61
  /**
56
62
  * 获取最后一个子节点
57
63
  * @returns 最后一个子节点,如果没有子节点则返回 undefined
@@ -2,8 +2,8 @@ import { RawElement } from '../types/raw';
2
2
  import { Wtbl } from './Wtbl';
3
3
  import { Wtc } from './Wtc';
4
4
  import { ModelGroup, ModelGroupOptions } from '../base';
5
- import { WtrPr } from './WtrPr';
6
- type RowHeightRule = 'auto' | 'atLeast' | 'exact';
5
+ import { WtrPr, WtrHeightRule } from './WtrPr';
6
+ type RowHeightRule = WtrHeightRule;
7
7
  /**
8
8
  * w:tr 表格行
9
9
  */
@@ -1,5 +1,11 @@
1
1
  import { RawElement } from '../types/raw';
2
2
  import { ModelNode, ModelNodeOptions } from '../base';
3
+ export type WtrHeightRule = 'auto' | 'atLeast' | 'exact';
4
+ type ToXmlJsonOptions = {
5
+ rowHeight?: number;
6
+ rowHeightRule?: WtrHeightRule;
7
+ syncRowHeight?: boolean;
8
+ };
3
9
  export declare class WtrPr extends ModelNode {
4
10
  /** 节点名称 */
5
11
  name: 'w:trPr';
@@ -21,7 +27,7 @@ export declare class WtrPr extends ModelNode {
21
27
  *
22
28
  * @returns RawElement 格式的 XML JSON
23
29
  */
24
- toXmlJson(): RawElement;
30
+ toXmlJson(options?: ToXmlJsonOptions): RawElement;
25
31
  /**
26
32
  * 获取指定名称的子元素
27
33
  *
@@ -51,5 +57,11 @@ export declare class WtrPr extends ModelNode {
51
57
  * wpPr.removeElement('w:keepNext');
52
58
  */
53
59
  removeElement(name: string): boolean;
60
+ getRowHeight(): {
61
+ rowHeight?: number;
62
+ rowHeightRule?: WtrHeightRule;
63
+ };
64
+ setRowHeight(rowHeight?: number, rowHeightRule?: WtrHeightRule): void;
54
65
  static fromTemplate(): WtrPr;
55
66
  }
67
+ export {};
@@ -8,6 +8,12 @@ export type WfooterXmlJson = RawElement & {
8
8
  Target: string;
9
9
  Id: string;
10
10
  };
11
+ '@Relationships'?: Array<{
12
+ Type: string;
13
+ Target: string;
14
+ Id: string;
15
+ url?: string;
16
+ }>;
11
17
  };
12
18
  /**
13
19
  * 页脚类
@@ -8,6 +8,12 @@ export type WheaderXmlJson = RawElement & {
8
8
  Target: string;
9
9
  Id: string;
10
10
  };
11
+ '@Relationships'?: Array<{
12
+ Type: string;
13
+ Target: string;
14
+ Id: string;
15
+ url?: string;
16
+ }>;
11
17
  };
12
18
  /**
13
19
  * 页眉类
@@ -11,6 +11,21 @@ export declare const removeChildByName: (parent: ElementNode, name: string) => v
11
11
  export declare const hasChild: (el: ElementNode | undefined, name: string) => boolean;
12
12
  export declare const pickElement: (raw: RawElement, name: string) => RawElement | undefined;
13
13
  export declare const pickAllElements: (raw: RawElement, name: string) => RawElement[];
14
+ /**
15
+ * OOXML 开关类元素(w:b、w:i、w:strike 等):空节点表示开;w:val="0"|false|off 表示关。
16
+ * 场景 1.{
17
+ "@attrs": {
18
+ "w:val": "0"
19
+ },
20
+ "name": "w:i",
21
+ "type": "element"
22
+ }
23
+ 场景 2. {
24
+ "name": "w:i",
25
+ "type": "element"
26
+ }
27
+ */
28
+ export declare const parseOnOffToggleFromElement: (el: RawElement | undefined) => boolean | undefined;
14
29
  export declare const getTextFromRaw: <T extends {
15
30
  text: string;
16
31
  extra?: any;
@@ -9,12 +9,19 @@ export interface DocImage {
9
9
  };
10
10
  url: string;
11
11
  }
12
+ export type ImageScope = 'body' | 'header' | 'footer';
13
+ export interface ScopedImageQuery {
14
+ imageId: string;
15
+ scope?: ImageScope;
16
+ ownerRelId?: string;
17
+ }
12
18
  /**
13
19
  * Word 图片管理类
14
20
  * 用于保存和管理文档中的所有图片资源
15
21
  */
16
22
  export declare class Wimages {
17
23
  private images;
24
+ private scopedImages;
18
25
  constructor(images?: DocImage[]);
19
26
  /**
20
27
  * 从 XML JSON 转换为 Wimages 实例
@@ -22,18 +29,22 @@ export declare class Wimages {
22
29
  * @returns Wimages 实例
23
30
  */
24
31
  static fromXmlJson(json: any): Wimages;
32
+ private rebuildBodyIndex;
33
+ private makeScopedKey;
25
34
  /**
26
35
  * 根据图片 ID 获取图片信息
27
36
  * @param imageId 图片的 Relationship ID
28
37
  * @returns 对应的 DocImage 对象,如果不存在返回 undefined
29
38
  */
30
39
  getImageById(imageId: string): DocImage | undefined;
40
+ getImageByScopedId(query: ScopedImageQuery): DocImage | undefined;
31
41
  /**
32
42
  * 根据图片 ID 获取图片 URL
33
43
  * @param imageId 图片的 Relationship ID
34
44
  * @returns 图片 URL,如果不存在返回 undefined
35
45
  */
36
46
  getImageUrlById(imageId: string): string | undefined;
47
+ getImageUrl(query: ScopedImageQuery): string | undefined;
37
48
  /**
38
49
  * 获取所有图片
39
50
  * @returns 所有图片的数组
@@ -44,6 +55,7 @@ export declare class Wimages {
44
55
  * @param image 图片对象
45
56
  */
46
57
  addImage(image: DocImage): void;
58
+ addScopedImage(query: ScopedImageQuery, image: DocImage): void;
47
59
  /**
48
60
  * 移除指定 ID 的图片
49
61
  * @param imageId 图片的 Relationship ID
@@ -8,6 +8,8 @@ export type CellFragment = {
8
8
  rowspan: number;
9
9
  colspan: number;
10
10
  dataIndex?: number;
11
+ xDataIndex?: number;
12
+ yDataIndex?: number;
11
13
  repeatingId?: string;
12
14
  _2DTableId?: string;
13
15
  boundedId?: string;
@@ -58,7 +60,7 @@ export declare class TableExpander {
58
60
  private initializeBoundedItemDataIndex;
59
61
  private initializeDataGroup2DDataIndex;
60
62
  private initializeRows;
61
- getDataCount(region: RepeatingRegion | _2DTableRegion): number;
63
+ getRepeatCount(region: RepeatingRegion | _2DTableRegion): number;
62
64
  private initializeRepeatingRowsInRange;
63
65
  private initialize2DTableRowsInRange;
64
66
  private initializeBoundedRowInRange;
@@ -19,6 +19,8 @@ export type SubRenderer = {
19
19
  id: string;
20
20
  type: 'dynamic-table' | '2d-table' | 'fixed-table' | 'check-table' | 'table-header';
21
21
  dataIndex?: number;
22
+ xDataIndex?: number;
23
+ yDataIndex?: number;
22
24
  valuePath: string;
23
25
  widgetMeta?: RepeatingWidgetMeta | BoundedWidgetMeta | CheckTableWidgetMeta;
24
26
  };
@@ -4,11 +4,14 @@ import { TableCell } from './TableCell';
4
4
  import { Wtr } from '../model/document';
5
5
  export interface TableRowOptions extends LayoutGroupOptions {
6
6
  allowRowSplit?: boolean;
7
+ /** 记录该行在原始模型表格中的真实行索引(全局索引) */
8
+ realRowIndex?: number;
7
9
  }
8
10
  export declare class TableRow extends LayoutGroup<TableCell> {
9
11
  component: "tableRow";
10
12
  parent: Table;
11
13
  allowRowSplit: boolean;
14
+ realRowIndex: number;
12
15
  constructor(options: TableRowOptions);
13
16
  get width(): number;
14
17
  get height(): number;
@@ -7,6 +7,9 @@ type ModelRef = {
7
7
  id: string;
8
8
  start?: number;
9
9
  end?: number;
10
+ valuePath2D?: string;
11
+ xDataIndex?: number;
12
+ yDataIndex?: number;
10
13
  };
11
14
  /**
12
15
  * 布局节点配置
@@ -1,8 +1,8 @@
1
+ import { Doc } from '../view/Doc';
2
+ import { FieldPermissionInfo } from '../../sdk/types';
3
+ export type WidgetDisplayStatus = 'readonly-component' | 'edit-component' | 'readonly-text';
1
4
  export interface WidgetStateContext {
2
- docMode: string;
3
- isEditMode: boolean;
4
- isPrintMode: boolean;
5
- formType?: string;
5
+ doc: Doc;
6
6
  viewState?: string;
7
7
  required?: boolean;
8
8
  newRequired?: boolean;
@@ -12,10 +12,19 @@ export interface WidgetStateContext {
12
12
  newDisabled?: boolean;
13
13
  cannotInput?: boolean;
14
14
  isLinkedModelField?: boolean;
15
+ fieldLink: string;
16
+ modelLink: string;
15
17
  }
18
+ interface ResolveDisplayStatusFromAuthOptions {
19
+ info?: FieldPermissionInfo;
20
+ readonlyString: WidgetDisplayStatus;
21
+ editString: WidgetDisplayStatus;
22
+ }
23
+ export declare function resolveDisplayStatusFromAuth(options: ResolveDisplayStatusFromAuthOptions): WidgetDisplayStatus | null;
16
24
  export declare function resolveWidgetState(ctx: WidgetStateContext): {
17
25
  required: boolean;
18
26
  readonly: boolean;
19
27
  disabled: boolean;
20
- displayStatus: "readonly-component" | "readonly-text" | "edit-component";
28
+ displayStatus: WidgetDisplayStatus;
21
29
  };
30
+ export {};