@jctrans-materials/comps-vue2 1.0.41-beta.0 → 1.0.41-beta.1

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.
@@ -0,0 +1,107 @@
1
+ declare const _default: import('../../../vue-demi').DefineComponent<{
2
+ value: {
3
+ type: null;
4
+ default: undefined;
5
+ };
6
+ multiple: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ lang: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ placeholder: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ historyKey: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ reportType: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ }, {
27
+ SearchIcon: string;
28
+ ICON_MORE: string;
29
+ isDropdownVisible: import('../../../vue-demi').Ref<boolean>;
30
+ query: import('../../../vue-demi').Ref<string>;
31
+ inputRef: import('../../../vue-demi').Ref<HTMLInputElement | null>;
32
+ scrollContainer: import('../../../vue-demi').Ref<HTMLElement | null>;
33
+ isEn: import('../../../vue-demi').ComputedRef<boolean>;
34
+ selectedItems: import('../../../vue-demi').ComputedRef<any[]>;
35
+ isSelected: import('../../../vue-demi').ComputedRef<boolean>;
36
+ selectedLabel: import('../../../vue-demi').ComputedRef<any>;
37
+ hasValue: import('../../../vue-demi').ComputedRef<boolean>;
38
+ searchHistory: import('../../../vue-demi').Ref<{
39
+ [x: string]: any;
40
+ id?: string | number | undefined;
41
+ type: string;
42
+ display?: string | undefined;
43
+ displayEn?: string | undefined;
44
+ displayCn?: string | undefined;
45
+ name?: string | undefined;
46
+ nameEn?: string | undefined;
47
+ nameCn?: string | undefined;
48
+ }[]>;
49
+ searchResults: import('../../../vue-demi').Ref<{
50
+ [x: string]: any;
51
+ id?: string | number | undefined;
52
+ type: string;
53
+ display?: string | undefined;
54
+ displayEn?: string | undefined;
55
+ displayCn?: string | undefined;
56
+ name?: string | undefined;
57
+ nameEn?: string | undefined;
58
+ nameCn?: string | undefined;
59
+ }[]>;
60
+ loading: import('../../../vue-demi').Ref<boolean>;
61
+ isFetchingMore: import('../../../vue-demi').Ref<boolean>;
62
+ isFinished: import('../../../vue-demi').Ref<boolean>;
63
+ clearHistory: () => void;
64
+ openSearch: () => void;
65
+ closeSearch: () => void;
66
+ selectItem: (item: any) => void;
67
+ clearAll: () => void;
68
+ handleScroll: (e: Event) => void;
69
+ onInput: () => void;
70
+ getItemLabel: (item: any) => any;
71
+ getItemType: (type: string) => any;
72
+ isItemActive: (item: any) => boolean;
73
+ handleApplyData: () => Promise<void>;
74
+ }, {}, {}, {}, import('../../../vue-demi').ComponentOptionsMixin, import('../../../vue-demi').ComponentOptionsMixin, {}, string, Readonly<import('../../../vue-demi').ExtractPropTypes<{
75
+ value: {
76
+ type: null;
77
+ default: undefined;
78
+ };
79
+ multiple: {
80
+ type: BooleanConstructor;
81
+ default: boolean;
82
+ };
83
+ lang: {
84
+ type: StringConstructor;
85
+ default: string;
86
+ };
87
+ placeholder: {
88
+ type: StringConstructor;
89
+ default: string;
90
+ };
91
+ historyKey: {
92
+ type: StringConstructor;
93
+ default: string;
94
+ };
95
+ reportType: {
96
+ type: StringConstructor;
97
+ default: string;
98
+ };
99
+ }>>, {
100
+ value: any;
101
+ lang: string;
102
+ reportType: string;
103
+ placeholder: string;
104
+ multiple: boolean;
105
+ historyKey: string;
106
+ }>;
107
+ export default _default;
@@ -1,16 +1,6 @@
1
1
  import { LocationType } from '@jctrans-materials/shared';
2
2
 
3
- export declare function getCountryApi(key: string): Promise<import('@jctrans-materials/shared').BaseResponse<import('@jctrans-materials/shared').UnifiedItem>>;
4
- export declare function searchAllApi(key: string, types: LocationType[]): Promise<import('@jctrans-materials/shared').BaseResponse<import('@jctrans-materials/shared').UnifiedItem>>;
5
- export declare function searchByNameApi(key: string, types?: LocationType[], other?: {}): Promise<{
6
- records: import('@jctrans-materials/shared').LocationUnifiedItem[];
7
- total: number;
8
- current: number;
9
- size: number;
10
- }>;
11
- export declare const searchByIdWithTypeApi: (id: string | number | Array<number | string>, type: LocationType) => Promise<{
12
- records: import('@jctrans-materials/shared').LocationUnifiedItem[];
13
- total: number;
14
- current: number;
15
- size: number;
16
- }>;
3
+ export declare function getCountryApi(key: string): Promise<import('@jctrans-materials/shared').BaseResponse<import('@jctrans-materials/shared').LocationUnifiedItem>>;
4
+ export declare function searchAllApi(key: string, types: LocationType[]): Promise<import('@jctrans-materials/shared').BaseResponse<import('@jctrans-materials/shared').LocationUnifiedItem>>;
5
+ export declare function searchByNameApi(key: string, types?: LocationType[], other?: {}): Promise<import('@jctrans-materials/shared').BaseResponse<import('@jctrans-materials/shared').LocationUnifiedItem>>;
6
+ export declare const searchByIdWithTypeApi: (id: string | number | Array<number | string>, type: LocationType) => any;
@@ -165,9 +165,9 @@ declare const _default: import('../../../vue-demi').DefineComponent<{
165
165
  multiple: boolean;
166
166
  showApplyData: boolean;
167
167
  disabled: boolean;
168
+ historyKey: string;
168
169
  collapseTags: boolean;
169
170
  searchTypeList: unknown[];
170
- historyKey: string;
171
171
  showSearchIcon: boolean;
172
172
  showItemTag: boolean;
173
173
  }>;
@@ -0,0 +1,129 @@
1
+ export declare const lineList: ({
2
+ id: number;
3
+ type: string;
4
+ nameCn: string;
5
+ nameEn: string;
6
+ display: string;
7
+ displayEn: string;
8
+ displayCn: string;
9
+ raw: {
10
+ id: number;
11
+ lineType: string;
12
+ lineNameCn: string;
13
+ lineNameEn: string;
14
+ countryId: null;
15
+ countryNameCn: null;
16
+ countryNameEn: null;
17
+ countryList: ({
18
+ id: number;
19
+ continentId: number;
20
+ fileId: string;
21
+ fullnameCn: string;
22
+ fullnameEn: string;
23
+ nameCn: string;
24
+ nameEn: string;
25
+ nameEnShow: string;
26
+ sanctionFlag: string;
27
+ shortCode: string;
28
+ telCode: string;
29
+ pinyin: string;
30
+ capitalId: number;
31
+ threeCharCode: string;
32
+ developedType: string;
33
+ postCode: string;
34
+ isoShortCode: string;
35
+ } | {
36
+ id: number;
37
+ continentId: number;
38
+ fileId: string;
39
+ fullnameCn: string;
40
+ fullnameEn: string;
41
+ nameCn: string;
42
+ nameEn: string;
43
+ nameEnShow: string;
44
+ sanctionFlag: string;
45
+ shortCode: string;
46
+ telCode: string;
47
+ pinyin: string;
48
+ capitalId: number;
49
+ threeCharCode: string;
50
+ developedType: string;
51
+ isoShortCode: string;
52
+ postCode?: undefined;
53
+ } | {
54
+ id: number;
55
+ continentId: number;
56
+ fileId: string;
57
+ fullnameCn: string;
58
+ fullnameEn: string;
59
+ nameCn: string;
60
+ nameEn: string;
61
+ nameEnShow: string;
62
+ sanctionFlag: string;
63
+ shortCode: string;
64
+ telCode: string;
65
+ pinyin: string;
66
+ threeCharCode: string;
67
+ isoShortCode: string;
68
+ capitalId?: undefined;
69
+ developedType?: undefined;
70
+ postCode?: undefined;
71
+ })[];
72
+ };
73
+ lineType: string;
74
+ } | {
75
+ id: number;
76
+ type: string;
77
+ nameCn: string;
78
+ nameEn: string;
79
+ display: string;
80
+ displayEn: string;
81
+ displayCn: string;
82
+ raw: {
83
+ id: number;
84
+ lineType: string;
85
+ lineNameCn: string;
86
+ lineNameEn: string;
87
+ countryId: null;
88
+ countryNameCn: null;
89
+ countryNameEn: null;
90
+ countryList: ({
91
+ id: number;
92
+ continentId: number;
93
+ fileId: string;
94
+ fullnameCn: string;
95
+ fullnameEn: string;
96
+ nameCn: string;
97
+ nameEn: string;
98
+ nameEnShow: string;
99
+ sanctionFlag: string;
100
+ shortCode: string;
101
+ telCode: string;
102
+ pinyin: string;
103
+ capitalId: number;
104
+ threeCharCode: string;
105
+ developedType: string;
106
+ postCode: string;
107
+ isoShortCode: string;
108
+ } | {
109
+ id: number;
110
+ continentId: number;
111
+ fileId: string;
112
+ fullnameCn: string;
113
+ fullnameEn: string;
114
+ nameCn: string;
115
+ nameEn: string;
116
+ nameEnShow: string;
117
+ sanctionFlag: string;
118
+ shortCode: string;
119
+ telCode: string;
120
+ pinyin: string;
121
+ threeCharCode: string;
122
+ developedType: string;
123
+ isoShortCode: string;
124
+ capitalId?: undefined;
125
+ postCode?: undefined;
126
+ })[];
127
+ };
128
+ lineType: string;
129
+ })[];
@@ -0,0 +1,81 @@
1
+ declare const _default: import('../../../vue-demi').DefineComponent<{
2
+ value: {
3
+ type: ArrayConstructor;
4
+ default: () => never[];
5
+ };
6
+ lineId: {
7
+ type: NumberConstructor;
8
+ default: null;
9
+ };
10
+ placeholder: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ lang: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ lineType: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ multiple: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ }, {
27
+ selectRef: import('../../../vue-demi').Ref<any>;
28
+ selectedValues: import('../../../vue-demi').Ref<any[]>;
29
+ options: import('../../../vue-demi').Ref<any[]>;
30
+ loading: import('../../../vue-demi').Ref<boolean>;
31
+ cascaderProps: import('../../../vue-demi').ComputedRef<{
32
+ multiple: boolean;
33
+ expandTrigger: string;
34
+ emitPath: boolean;
35
+ checkStrictly: boolean;
36
+ }>;
37
+ transformedOptions: import('../../../vue-demi').ComputedRef<{
38
+ label: any;
39
+ value: string;
40
+ children: any;
41
+ }[]>;
42
+ currentPlaceholder: import('../../../vue-demi').ComputedRef<string>;
43
+ noDataText: import('../../../vue-demi').ComputedRef<"Searching..." | "正在搜索中..." | "暂无结果" | "No results found">;
44
+ handleExpand: () => void;
45
+ handleChange: (selected: any) => void;
46
+ handleApply: () => Promise<void>;
47
+ ICON_MORE: string;
48
+ }, {}, {}, {}, import('../../../vue-demi').ComponentOptionsMixin, import('../../../vue-demi').ComponentOptionsMixin, ("input" | "change" | "apply" | "update:lineId")[], string, Readonly<import('../../../vue-demi').ExtractPropTypes<{
49
+ value: {
50
+ type: ArrayConstructor;
51
+ default: () => never[];
52
+ };
53
+ lineId: {
54
+ type: NumberConstructor;
55
+ default: null;
56
+ };
57
+ placeholder: {
58
+ type: StringConstructor;
59
+ default: string;
60
+ };
61
+ lang: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ lineType: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
69
+ multiple: {
70
+ type: BooleanConstructor;
71
+ default: boolean;
72
+ };
73
+ }>>, {
74
+ value: unknown[];
75
+ lang: string;
76
+ lineType: string;
77
+ placeholder: string;
78
+ multiple: boolean;
79
+ lineId: number;
80
+ }>;
81
+ export default _default;
@@ -0,0 +1,18 @@
1
+ export interface HydrationBaseItem<TType extends string = string> {
2
+ id?: string | number | null;
3
+ type?: TType | null;
4
+ display?: string;
5
+ [key: string]: any;
6
+ }
7
+ interface FetchResponse<T> {
8
+ records?: T[];
9
+ }
10
+ type FetchByTypeFn<T extends HydrationBaseItem<TType>, TType extends string> = (ids: Array<string | number> | string | number, type: TType) => Promise<FetchResponse<T>>;
11
+ export declare function useModelValueHydration<TType extends string, T extends HydrationBaseItem<TType>>(fetchByType: FetchByTypeFn<T, TType>): {
12
+ hydrateMultiple: (list: T[]) => Promise<{
13
+ updatedList: T[];
14
+ hasChanged: boolean;
15
+ }>;
16
+ hydrateSingle: (item: T | null | undefined) => Promise<T | null | undefined>;
17
+ };
18
+ export {};
package/dist/gio.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VueConstructor } from '../vue-demi';
2
2
 
3
- export type TrackAttrs = Record<string, string | number | Array<string | number>>;
3
+ export type TrackAttrs = Record<string, string | number | Array<string | number> | null | undefined>;
4
4
  export type TrackDirectiveValue = string | {
5
5
  event?: string;
6
6
  name?: string;
@@ -39,6 +39,13 @@ export type TrackConfig = {
39
39
  idMapping?: boolean;
40
40
  hashtag?: boolean;
41
41
  serverUrl?: string;
42
+ performance?: {
43
+ monitor?: boolean;
44
+ exception?: boolean;
45
+ network?: boolean | {
46
+ exclude?: string | RegExp | Array<string | RegExp>;
47
+ };
48
+ };
42
49
  };
43
50
  };
44
51
  export type GioPublicApi = {