@gct-paas/word 0.1.28 → 0.1.30

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.
@@ -41,13 +41,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
41
41
  "onUpdate:modelValue"?: ((val: string | number | null) => any) | undefined;
42
42
  }>, {
43
43
  disabled: boolean;
44
- roundingMode: 1 | 4 | 6;
45
44
  modelValue: ValueType;
46
45
  step: number;
47
46
  allowClear: boolean;
48
47
  controls: boolean;
49
48
  returnString: boolean;
50
49
  emitOnInput: boolean;
50
+ roundingMode: 1 | 4 | 6;
51
51
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
52
52
  inputRef: HTMLInputElement;
53
53
  }, HTMLDivElement>;
@@ -15,7 +15,7 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
15
15
  focus: () => void;
16
16
  blur: () => void;
17
17
  select: () => void;
18
- inputRef: import('vue').Ref<HTMLTextAreaElement | HTMLInputElement | null, HTMLTextAreaElement | HTMLInputElement | null>;
18
+ inputRef: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | null, HTMLInputElement | HTMLTextAreaElement | null>;
19
19
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
20
  input: (value: string | number, event: Event) => any;
21
21
  search: (value: string | number) => any;
@@ -25,8 +25,8 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
25
25
  keydown: (event: KeyboardEvent) => any;
26
26
  keypress: (event: KeyboardEvent) => any;
27
27
  keyup: (event: KeyboardEvent) => any;
28
- clear: () => any;
29
28
  "update:modelValue": (value: string | number) => any;
29
+ clear: () => any;
30
30
  pressEnter: (event: KeyboardEvent) => any;
31
31
  }, string, import('vue').PublicProps, Readonly<GctInputProps> & Readonly<{
32
32
  onInput?: ((value: string | number, event: Event) => any) | undefined;
@@ -37,8 +37,8 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
37
37
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
38
38
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
39
39
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
40
- onClear?: (() => any) | undefined;
41
40
  "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
41
+ onClear?: (() => any) | undefined;
42
42
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
43
43
  }>, {
44
44
  name: string;
@@ -49,10 +49,8 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
49
49
  disabled: boolean;
50
50
  size: import('./types').InputSize;
51
51
  placeholder: string;
52
- autocomplete: string;
53
- spellcheck: boolean;
54
- prefix: string;
55
52
  modelValue: string | number;
53
+ prefix: string;
56
54
  suffix: string;
57
55
  addonBefore: string;
58
56
  addonAfter: string;
@@ -61,8 +59,10 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
61
59
  showPasswordToggle: boolean;
62
60
  maxLength: number;
63
61
  autofocus: boolean;
62
+ autocomplete: string;
64
63
  bordered: boolean;
65
64
  showSearchButton: boolean;
65
+ spellcheck: boolean;
66
66
  customStyle: Record<string, string | number>;
67
67
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
68
68
  inputRef: HTMLInputElement;
@@ -23,8 +23,8 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
23
23
  keydown: (event: KeyboardEvent) => any;
24
24
  keypress: (event: KeyboardEvent) => any;
25
25
  keyup: (event: KeyboardEvent) => any;
26
- clear: () => any;
27
26
  "update:modelValue": (value: string | number) => any;
27
+ clear: () => any;
28
28
  pressEnter: (event: KeyboardEvent) => any;
29
29
  }, string, import('vue').PublicProps, Readonly<GctInputProps> & Readonly<{
30
30
  onInput?: ((value: string | number, event: Event) => any) | undefined;
@@ -35,8 +35,8 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
35
35
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
36
36
  onKeypress?: ((event: KeyboardEvent) => any) | undefined;
37
37
  onKeyup?: ((event: KeyboardEvent) => any) | undefined;
38
- onClear?: (() => any) | undefined;
39
38
  "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
39
+ onClear?: (() => any) | undefined;
40
40
  onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
41
41
  }>, {
42
42
  name: string;
@@ -44,14 +44,14 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
44
44
  readonly: boolean;
45
45
  disabled: boolean;
46
46
  placeholder: string;
47
- autocomplete: string;
48
- spellcheck: boolean;
49
47
  modelValue: string | number;
50
48
  allowClear: boolean;
51
49
  showCount: boolean;
52
50
  maxLength: number;
53
51
  autofocus: boolean;
52
+ autocomplete: string;
54
53
  bordered: boolean;
54
+ spellcheck: boolean;
55
55
  customStyle: Record<string, string | number>;
56
56
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
57
57
  textareaRef: HTMLTextAreaElement;
@@ -14,6 +14,8 @@ type __VLS_Props = {
14
14
  options: Option[];
15
15
  showMode?: 'icon' | 'icon-label';
16
16
  disabled?: boolean;
17
+ /** 多选模式:modelValue 为数组,点击切换选中状态 */
18
+ multiple?: boolean;
17
19
  };
18
20
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
19
21
  change: (v: any) => any;
@@ -1,8 +1,7 @@
1
1
  import { CommandBase, PostCommandContext } from '../base/CommandBase';
2
2
  import { Doc } from '../../view/Doc';
3
3
  import { CommandPayloadMap } from '../types';
4
- import { Wp, Wtc } from '../../model/document';
5
- import { ModelNode } from '../../model/base';
4
+ import { Wp } from '../../model/document';
6
5
  type InsertFieldCommandOptions = CommandPayloadMap['insertField'];
7
6
  export declare class InsertField extends CommandBase<'insertField'> {
8
7
  constructor(doc: Doc, payload: InsertFieldCommandOptions);
@@ -45,7 +44,6 @@ export declare class InsertField extends CommandBase<'insertField'> {
45
44
  * isFieldPathCompatible("$.a[n].b", "$.a[n].b[n].c") // false - 去掉开头 [n] 后 .c 实际上应该检查原逻辑
46
45
  */
47
46
  protected isFieldPathCompatible(parentPath: string, childPath: string): boolean;
48
- protected getAncestorCell(node: ModelNode): Wtc | null;
49
47
  protected validateFieldPath(valuePath: string | undefined, node: Wp): boolean;
50
48
  }
51
49
  export {};
@@ -9,10 +9,10 @@ type __VLS_Props = {
9
9
  visible?: boolean;
10
10
  };
11
11
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
- caretWidth: number;
12
+ visible: boolean;
13
13
  caretColor: string;
14
+ caretWidth: number;
14
15
  blinkInterval: number;
15
16
  alwaysVisibleAfterEventMs: number;
16
- visible: boolean;
17
17
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
18
  export default _default;
@@ -1,6 +1,7 @@
1
1
  import { Wtbl, Wtc, Wtr } from '../../model/document';
2
- import { TableExpander, CellFragment } from '../../utils/expand';
2
+ import { TableExpander, CellFragment, TableRange } from '../../utils/expand';
3
3
  import { SubRenderer } from '../../view/TableCell';
4
+ import { _2DTableRegion, CheckTableRegion } from '../../model/logic';
4
5
  export declare class TableInfoProvider {
5
6
  wtbl: Wtbl;
6
7
  tableExpander: TableExpander;
@@ -19,6 +20,7 @@ export declare class TableInfoProvider {
19
20
  getCellModelRef(cell: any): {
20
21
  id: string;
21
22
  };
23
+ getDataGroup2DAreaRange(region: CheckTableRegion | _2DTableRegion): TableRange | undefined;
22
24
  getCellSubRenderer(cell: CellFragment): SubRenderer | undefined;
23
25
  /**
24
26
  * 获取当前行是都能分割
@@ -0,0 +1,47 @@
1
+ import { ModelNode } from '../model/base';
2
+ import { Doc } from '../view/Doc';
3
+ import { ImageSize } from '../../base/utils/image-size-util';
4
+ import { WrField } from '../model/document/WrField';
5
+ import { Wtc } from '../model/document/Wtc';
6
+ import { Wr } from '../model/document/Wp';
7
+ import { WrText } from '../model/document/WrText';
8
+ import { WidgetMeta } from '../widget/widget-meta';
9
+ export declare const ADAPTIVE_IMAGE_CELL_MSG = "\u8BE5\u5355\u5143\u683C\u4E3A\u81EA\u9002\u5E94\u56FE\u7247\u5B57\u6BB5\uFF0C\u4E0D\u53EF\u6DFB\u52A0\u5176\u4ED6\u5185\u5BB9";
10
+ export declare const ADAPTIVE_IMAGE_SWITCH_MSG = "\u5207\u6362\u4E3A\u81EA\u9002\u5E94\u524D\uFF0C\u8BF7\u5148\u6E05\u7A7A\u5355\u5143\u683C\u5185\u5176\u4ED6\u5185\u5BB9\uFF0C\u4E14\u5355\u5143\u683C\u5185\u4EC5\u4FDD\u7559\u8BE5\u56FE\u7247\u5B57\u6BB5";
11
+ export type AdaptiveImageComputedValue = {
12
+ relWidth: number;
13
+ relHeight: number;
14
+ };
15
+ /** 是否为自适应模式的图片字段 */
16
+ export declare function isAdaptiveImageWidgetMeta(widgetMeta?: WidgetMeta | null): boolean;
17
+ /** 是否为无实际内容的文本 run(占位符或空文本) */
18
+ export declare function isEmptyTextRun(run: WrText): boolean;
19
+ /** 从模型节点向上查找所在单元格 */
20
+ export declare function getAncestorCell(node: ModelNode): Wtc | null;
21
+ /** 获取单元格内所有 run */
22
+ export declare function getCellRuns(cell: Wtc): Wr[];
23
+ /** 获取单元格内有实际内容的 run */
24
+ export declare function getNonEmptyCellRuns(cell: Wtc): Wr[];
25
+ /** 获取单元格内的自适应图片字段 */
26
+ export declare function getAdaptiveImageFieldInCell(cell: Wtc): WrField | null;
27
+ /** 单元格是否已被自适应图片字段锁定(禁止插入其他内容) */
28
+ export declare function isCellLockedByAdaptiveImage(cell: Wtc | null): boolean;
29
+ /** 单元格是否仅包含一个图片字段(用于切换为自适应前的校验) */
30
+ export declare function canSwitchImageFieldToAdaptive(cell: Wtc | null, fieldRunId?: string): boolean;
31
+ /** 单元格是否仅包含自适应图片字段 */
32
+ export declare function cellHasOnlyAdaptiveImageField(cell: Wtc): boolean;
33
+ /** 与 FieldImageHandler / 渲染层约定的 newSpecificConfig 键 */
34
+ export declare function getAdaptiveImageConfigKey(modelRef: {
35
+ id: string;
36
+ start?: number;
37
+ }): string;
38
+ /** 从布局节点向上查找所在单元格的内容区尺寸 */
39
+ export declare function getCellContentSizeFromWidget(doc: Doc, widgetId: string): ImageSize | null;
40
+ /** 自适应模式下铺满单元格内容区 */
41
+ export declare function computeAdaptiveImageSize(cellSize: ImageSize): ImageSize;
42
+ /** 读取渲染阶段写入的自适应尺寸 */
43
+ export declare function getAdaptiveImageComputedSize(widgetMeta: {
44
+ props?: {
45
+ newSpecificConfig?: Record<string, AdaptiveImageComputedValue>;
46
+ };
47
+ } | null | undefined, configKey: string, fallback?: ImageSize): ImageSize | undefined;
@@ -7,6 +7,7 @@ import { RepeatingWidgetMeta } from '../model/logic/RepeatingRegion';
7
7
  import { BoundedWidgetMeta } from '../model/logic/BoundedRegion';
8
8
  import { CheckTableWidgetMeta } from '../model/logic/CheckTableRegion';
9
9
  import { TableRange } from '../utils/expand';
10
+ import { _2DTableWidgetMeta } from '../model/logic/_2DTableRegion';
10
11
  export interface TableCellOptions extends LayoutGroupOptions {
11
12
  colspan?: number;
12
13
  rowspan?: number;
@@ -23,8 +24,8 @@ export type SubRenderer = {
23
24
  xDataIndex?: number;
24
25
  yDataIndex?: number;
25
26
  valuePath: string;
26
- widgetMeta?: RepeatingWidgetMeta | BoundedWidgetMeta | CheckTableWidgetMeta;
27
- dataGroup2DRange?: TableRange;
27
+ widgetMeta?: RepeatingWidgetMeta | BoundedWidgetMeta | CheckTableWidgetMeta | _2DTableWidgetMeta;
28
+ dataGroup2DAreaRange?: TableRange;
28
29
  };
29
30
  export declare class TableCell extends LayoutGroup<Paragraph> implements IContainerMetrics {
30
31
  component: "tableCell";
@@ -42,6 +42,8 @@ export declare class ImageRun extends LayoutNode implements IImageRun {
42
42
  keepAspect: boolean;
43
43
  decorations?: ImageRunOptions['decorations'];
44
44
  get width(): number;
45
+ set width(value: number);
45
46
  get height(): number;
47
+ set height(value: number);
46
48
  constructor(options: ImageRunOptions);
47
49
  }