@gct-paas/word 0.2.5-beta.5 → 0.2.5-beta.6

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.
@@ -1,5 +1,6 @@
1
1
  import { FIELD_TYPE } from '../../../../domain/field/field-type';
2
2
  import { ParseRules } from '../../../../suites/shared/panel/config/editor/qrcode-parse-editor/types';
3
+ import { ParseRuleConfig } from '../../../../suites/shared/panel/config/editor/qrcode-parse-editor/utils';
3
4
  export type DeviceScanFieldInfo = {
4
5
  key: string;
5
6
  modelKey: string;
@@ -21,6 +22,8 @@ export type DeviceScanSubmitResult = {
21
22
  ok: false;
22
23
  message: string;
23
24
  };
25
+ export declare function getRuleCodeByFieldType(parsed: Record<string, any>, config: ParseRuleConfig | undefined, fieldType?: FIELD_TYPE): string | undefined;
26
+ export declare function appendFillMapPayload(payload: Record<string, any>, parsed: Record<string, any>, parseRules: ParseRules | undefined, runtimeValuePath: string): void;
24
27
  /** 解析条码、校验设备编码、查询设备并生成写入 payload */
25
28
  export declare function submitDeviceScan(params: DeviceScanSubmitParams): Promise<DeviceScanSubmitResult>;
26
29
  export declare function showDeviceScanError(message: string): void;
@@ -0,0 +1,18 @@
1
+ import { Ref } from 'vue';
2
+ import { FIELD_TYPE } from '../../../../../../domain/field/field-type';
3
+ import { RuleParseData } from '../../../../../../suites/shared/panel/config/editor/qrcode-parse-editor/utils';
4
+ import { ParseRules } from '../../../../../../suites/shared/panel/config/editor/qrcode-parse-editor/types';
5
+ import { FetcherResult } from './useSelectTable';
6
+ /** 防抖查询与回车查询共用关键词,但只有回车确认的最新结果可以自动回填。 */
7
+ export declare function useSearchEnter(options: {
8
+ keyword: Ref<string | undefined>;
9
+ filters?: () => unknown;
10
+ search: () => Promise<FetcherResult>;
11
+ fetchByCode: (code: string) => Promise<FetcherResult>;
12
+ parseRules: () => ParseRules | undefined;
13
+ fieldType: () => FIELD_TYPE | undefined;
14
+ select: (row: any, parsed?: RuleParseData) => unknown;
15
+ }): {
16
+ onSearchEnter: (event: KeyboardEvent) => Promise<void>;
17
+ scheduleSearch: import('lodash-es').DebouncedFunc<() => void>;
18
+ };
@@ -3,6 +3,8 @@ import { Ref, ComputedRef } from 'vue';
3
3
  * Fetcher 返回结果类型
4
4
  */
5
5
  type FetcherResult = {
6
+ /** 请求已被新查询取代,禁止回填。 */
7
+ stale?: boolean;
6
8
  /** 展示的数据 table 或 tree */
7
9
  data: any[];
8
10
  /** 总页数 */
@@ -4,11 +4,12 @@ export interface TableDropdownSearchFilters {
4
4
  deviceTypeId?: string;
5
5
  }
6
6
  export declare function useTableDropdown(props: any, searchFilters?: MaybeRef<TableDropdownSearchFilters | undefined>): {
7
- fetcher: ({ keyword, pageNo, pageSize, deviceTypeId, }: {
7
+ fetcher: ({ keyword, pageNo, pageSize, deviceTypeId, exactCode, }: {
8
8
  keyword?: string;
9
9
  pageNo: number;
10
10
  pageSize: number;
11
11
  deviceTypeId?: string;
12
+ exactCode?: string;
12
13
  }) => Promise<FetcherResult>;
13
14
  columns: import('vue').ComputedRef<any>;
14
15
  fieldInfo: import('vue').ComputedRef<import('../../../../../../capabilities/model-field-runtime').FieldMeta | null>;
@@ -16,7 +16,7 @@ type __VLS_Props = {
16
16
  hasNextPage: boolean;
17
17
  };
18
18
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
19
- search: () => any;
19
+ search: (event: KeyboardEvent) => any;
20
20
  clear: () => any;
21
21
  "load-more": () => any;
22
22
  "change-select": (row: any) => any;
@@ -24,7 +24,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
24
24
  "manual-input": () => any;
25
25
  "device-type-change": (value?: string | undefined) => any;
26
26
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
27
- onSearch?: (() => any) | undefined;
27
+ onSearch?: ((event: KeyboardEvent) => any) | undefined;
28
28
  onClear?: (() => any) | undefined;
29
29
  "onLoad-more"?: (() => any) | undefined;
30
30
  "onChange-select"?: ((row: any) => any) | undefined;
@@ -0,0 +1,9 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ export declare const DROPDOWN_FOCUS_READY_KEY: InjectionKey<Ref<boolean>>;
3
+ export declare const DROPDOWN_FOCUS_REQUEST_KEY: InjectionKey<Ref<number>>;
4
+ interface SearchInput {
5
+ inputRef?: HTMLInputElement;
6
+ }
7
+ /** 等浮层真正显示和当前搜索框挂载后再聚焦,也覆盖快速重开与展示分支切换。 */
8
+ export declare function useDropdownSearchFocus(inputRef: Ref<SearchInput | null | undefined>): void;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FieldManifest } from '../../../../../capabilities/field-manifest';
2
+ export declare const manifest: FieldManifest;
@@ -0,0 +1,2 @@
1
+ import { FieldManifest } from '../../../../../capabilities/field-manifest';
2
+ export declare const manifest: FieldManifest;
@@ -0,0 +1,2 @@
1
+ import { FieldManifest } from '../../../../../capabilities/field-manifest';
2
+ export declare const manifest: FieldManifest;
@@ -7,13 +7,13 @@ export interface IDisplayField {
7
7
  name: string;
8
8
  [key: string]: any;
9
9
  }
10
- /**
11
- * 不同字段类型显示字段的默认字段列表
12
- */
10
+ /** 支持显示字段配置的普通字段不再预置显示列。 */
13
11
  export declare const DEFAULT_DISPLAY_FIELDS_MAP: Record<string, string[]>;
14
12
  interface DefaultDisplayFieldConfig {
15
13
  keys: string[];
16
14
  unremovableKeys: string[];
17
15
  }
18
- export declare function getDefaultDisplayFieldConfig(type?: string): DefaultDisplayFieldConfig;
16
+ export declare function getDefaultDisplayFieldConfig(_type?: string): DefaultDisplayFieldConfig;
17
+ /** 仅保留设备及批次类字段从历史搜索配置初始化显示列的行为。 */
18
+ export declare const retainsLegacyDisplayFields: (type?: string) => boolean;
19
19
  export {};
@@ -0,0 +1,3 @@
1
+ import { Doc } from '../../../../core';
2
+ /** 指定业务表内的字段不显示默认值配置,主表及普通数据表继续显示。 */
3
+ export declare function isDefaultValueHiddenInBusinessTable(doc: Doc | null | undefined, subFieldKey?: string): boolean;