cd-form 1.0.18 → 1.0.24

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,112 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ interface Props {
3
+ value?: any;
4
+ placeholder?: string;
5
+ disabled?: boolean;
6
+ clearable?: boolean;
7
+ searchLoading?: boolean;
8
+ searchResults?: any[];
9
+ dialogTableData?: any[];
10
+ dialogLoading?: boolean;
11
+ dialogPagination?: {
12
+ current: number;
13
+ pageSize: number;
14
+ total: number;
15
+ };
16
+ columnOptions?: any[];
17
+ releaseId?: string;
18
+ relationField?: string;
19
+ searchFields?: string[];
20
+ formType?: string;
21
+ multiple?: boolean;
22
+ rowKey?: string;
23
+ dialogTitle?: string;
24
+ dialogWidth?: string;
25
+ cdFormConfig?: {
26
+ formData?: any;
27
+ columnData?: any;
28
+ };
29
+ }
30
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
31
+ clearable: boolean;
32
+ searchLoading: boolean;
33
+ dialogLoading: boolean;
34
+ searchResults: () => never[];
35
+ dialogTableData: () => never[];
36
+ columnOptions: () => never[];
37
+ multiple: boolean;
38
+ rowKey: string;
39
+ dialogWidth: string;
40
+ cdFormConfig: () => {
41
+ formData: null;
42
+ columnData: null;
43
+ };
44
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
45
+ change: (value: any) => void;
46
+ search: (data: {
47
+ keyword: string;
48
+ searchFields: string[];
49
+ }) => void;
50
+ "update:value": (value: any) => void;
51
+ "dialog-search": (filters: any) => void;
52
+ "dialog-page-change": (pagination: any) => void;
53
+ "advanced-select": () => void;
54
+ "row-select": (row: any) => void;
55
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
56
+ clearable: boolean;
57
+ searchLoading: boolean;
58
+ dialogLoading: boolean;
59
+ searchResults: () => never[];
60
+ dialogTableData: () => never[];
61
+ columnOptions: () => never[];
62
+ multiple: boolean;
63
+ rowKey: string;
64
+ dialogWidth: string;
65
+ cdFormConfig: () => {
66
+ formData: null;
67
+ columnData: null;
68
+ };
69
+ }>>> & Readonly<{
70
+ onChange?: ((value: any) => any) | undefined;
71
+ onSearch?: ((data: {
72
+ keyword: string;
73
+ searchFields: string[];
74
+ }) => any) | undefined;
75
+ "onUpdate:value"?: ((value: any) => any) | undefined;
76
+ "onDialog-search"?: ((filters: any) => any) | undefined;
77
+ "onDialog-page-change"?: ((pagination: any) => any) | undefined;
78
+ "onAdvanced-select"?: (() => any) | undefined;
79
+ "onRow-select"?: ((row: any) => any) | undefined;
80
+ }>, {
81
+ clearable: boolean;
82
+ dialogWidth: string;
83
+ multiple: boolean;
84
+ searchLoading: boolean;
85
+ searchResults: any[];
86
+ dialogTableData: any[];
87
+ dialogLoading: boolean;
88
+ columnOptions: any[];
89
+ rowKey: string;
90
+ cdFormConfig: {
91
+ formData?: any;
92
+ columnData?: any;
93
+ };
94
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
95
+ export default _default;
96
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
97
+ type __VLS_TypePropsToRuntimeProps<T> = {
98
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
99
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
100
+ } : {
101
+ type: PropType<T[K]>;
102
+ required: true;
103
+ };
104
+ };
105
+ type __VLS_WithDefaults<P, D> = {
106
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
107
+ default: D[K];
108
+ }> : P[K];
109
+ };
110
+ type __VLS_Prettify<T> = {
111
+ [K in keyof T]: T[K];
112
+ } & {};
@@ -0,0 +1,207 @@
1
+ import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ export declare const CdRelationForm: DefineComponent<ExtractPropTypes<{
3
+ placeholder: {
4
+ type: PropType<string>;
5
+ };
6
+ clearable: {
7
+ type: PropType<boolean>;
8
+ default: boolean;
9
+ };
10
+ disabled: {
11
+ type: PropType<boolean>;
12
+ };
13
+ formType: {
14
+ type: PropType<string>;
15
+ };
16
+ value: {
17
+ type: PropType<any>;
18
+ };
19
+ dialogWidth: {
20
+ type: PropType<string>;
21
+ default: string;
22
+ };
23
+ multiple: {
24
+ type: PropType<boolean>;
25
+ default: boolean;
26
+ };
27
+ searchLoading: {
28
+ type: PropType<boolean>;
29
+ default: boolean;
30
+ };
31
+ searchResults: {
32
+ type: PropType<any[]>;
33
+ default: () => never[];
34
+ };
35
+ dialogTableData: {
36
+ type: PropType<any[]>;
37
+ default: () => never[];
38
+ };
39
+ dialogLoading: {
40
+ type: PropType<boolean>;
41
+ default: boolean;
42
+ };
43
+ dialogPagination: {
44
+ type: PropType<{
45
+ current: number;
46
+ pageSize: number;
47
+ total: number;
48
+ }>;
49
+ };
50
+ columnOptions: {
51
+ type: PropType<any[]>;
52
+ default: () => never[];
53
+ };
54
+ releaseId: {
55
+ type: PropType<string>;
56
+ };
57
+ relationField: {
58
+ type: PropType<string>;
59
+ };
60
+ searchFields: {
61
+ type: PropType<string[]>;
62
+ };
63
+ rowKey: {
64
+ type: PropType<string>;
65
+ default: string;
66
+ };
67
+ dialogTitle: {
68
+ type: PropType<string>;
69
+ };
70
+ cdFormConfig: {
71
+ type: PropType<{
72
+ formData?: any;
73
+ columnData?: any;
74
+ }>;
75
+ default: () => {
76
+ formData: null;
77
+ columnData: null;
78
+ };
79
+ };
80
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
81
+ change: (value: any) => void;
82
+ search: (data: {
83
+ keyword: string;
84
+ searchFields: string[];
85
+ }) => void;
86
+ "update:value": (value: any) => void;
87
+ "dialog-search": (filters: any) => void;
88
+ "dialog-page-change": (pagination: any) => void;
89
+ "advanced-select": () => void;
90
+ "row-select": (row: any) => void;
91
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
92
+ placeholder: {
93
+ type: PropType<string>;
94
+ };
95
+ clearable: {
96
+ type: PropType<boolean>;
97
+ default: boolean;
98
+ };
99
+ disabled: {
100
+ type: PropType<boolean>;
101
+ };
102
+ formType: {
103
+ type: PropType<string>;
104
+ };
105
+ value: {
106
+ type: PropType<any>;
107
+ };
108
+ dialogWidth: {
109
+ type: PropType<string>;
110
+ default: string;
111
+ };
112
+ multiple: {
113
+ type: PropType<boolean>;
114
+ default: boolean;
115
+ };
116
+ searchLoading: {
117
+ type: PropType<boolean>;
118
+ default: boolean;
119
+ };
120
+ searchResults: {
121
+ type: PropType<any[]>;
122
+ default: () => never[];
123
+ };
124
+ dialogTableData: {
125
+ type: PropType<any[]>;
126
+ default: () => never[];
127
+ };
128
+ dialogLoading: {
129
+ type: PropType<boolean>;
130
+ default: boolean;
131
+ };
132
+ dialogPagination: {
133
+ type: PropType<{
134
+ current: number;
135
+ pageSize: number;
136
+ total: number;
137
+ }>;
138
+ };
139
+ columnOptions: {
140
+ type: PropType<any[]>;
141
+ default: () => never[];
142
+ };
143
+ releaseId: {
144
+ type: PropType<string>;
145
+ };
146
+ relationField: {
147
+ type: PropType<string>;
148
+ };
149
+ searchFields: {
150
+ type: PropType<string[]>;
151
+ };
152
+ rowKey: {
153
+ type: PropType<string>;
154
+ default: string;
155
+ };
156
+ dialogTitle: {
157
+ type: PropType<string>;
158
+ };
159
+ cdFormConfig: {
160
+ type: PropType<{
161
+ formData?: any;
162
+ columnData?: any;
163
+ }>;
164
+ default: () => {
165
+ formData: null;
166
+ columnData: null;
167
+ };
168
+ };
169
+ }>> & Readonly<{
170
+ onChange?: ((value: any) => any) | undefined;
171
+ onSearch?: ((data: {
172
+ keyword: string;
173
+ searchFields: string[];
174
+ }) => any) | undefined;
175
+ "onUpdate:value"?: ((value: any) => any) | undefined;
176
+ "onDialog-search"?: ((filters: any) => any) | undefined;
177
+ "onDialog-page-change"?: ((pagination: any) => any) | undefined;
178
+ "onAdvanced-select"?: (() => any) | undefined;
179
+ "onRow-select"?: ((row: any) => any) | undefined;
180
+ }>, {
181
+ clearable: boolean;
182
+ dialogWidth: string;
183
+ multiple: boolean;
184
+ searchLoading: boolean;
185
+ searchResults: any[];
186
+ dialogTableData: any[];
187
+ dialogLoading: boolean;
188
+ columnOptions: any[];
189
+ rowKey: string;
190
+ cdFormConfig: {
191
+ formData?: any;
192
+ columnData?: any;
193
+ };
194
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
195
+ export default CdRelationForm;
196
+ export interface RelationFormApi {
197
+ getFieldDataSelect: (params: {
198
+ releaseId: string;
199
+ keyword: string;
200
+ currentPage: number;
201
+ pageSize: number;
202
+ }) => Promise<any>;
203
+ getDataChange?: (params: any) => Promise<any>;
204
+ getConfigData?: (params: any) => Promise<any>;
205
+ getReleaseInfo?: (params: any) => Promise<any>;
206
+ getModelList?: (params: any) => Promise<any>;
207
+ }
@@ -1,5 +1,5 @@
1
1
  import { FormFieldConfig, FormDataConfig } from '../types';
2
- import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, PropType, ComponentProvideOptions } from 'vue';
3
3
 
4
4
  declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
5
  field: FormFieldConfig;
@@ -19,6 +19,30 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
19
19
  multiple: boolean;
20
20
  currentValue: any;
21
21
  }) => void;
22
+ "i18n-click": (data: {
23
+ field: string;
24
+ value: any;
25
+ i18nValue: string;
26
+ }) => void;
27
+ "relation-form-search": (data: {
28
+ field: string;
29
+ releaseId: string;
30
+ keyword: string;
31
+ }) => void;
32
+ "relation-form-advanced": (data: {
33
+ field: string;
34
+ releaseId: string;
35
+ }) => void;
36
+ "relation-form-dialog-search": (data: {
37
+ field: string;
38
+ releaseId: string;
39
+ filters: any;
40
+ }) => void;
41
+ "relation-form-page-change": (data: {
42
+ field: string;
43
+ releaseId: string;
44
+ pagination: any;
45
+ }) => void;
22
46
  }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
23
47
  field: FormFieldConfig;
24
48
  formModel: Record<string, any>;
@@ -37,10 +61,228 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
37
61
  multiple: boolean;
38
62
  currentValue: any;
39
63
  }) => any) | undefined;
64
+ "onI18n-click"?: ((data: {
65
+ field: string;
66
+ value: any;
67
+ i18nValue: string;
68
+ }) => any) | undefined;
69
+ "onRelation-form-search"?: ((data: {
70
+ field: string;
71
+ releaseId: string;
72
+ keyword: string;
73
+ }) => any) | undefined;
74
+ "onRelation-form-advanced"?: ((data: {
75
+ field: string;
76
+ releaseId: string;
77
+ }) => any) | undefined;
78
+ "onRelation-form-dialog-search"?: ((data: {
79
+ field: string;
80
+ releaseId: string;
81
+ filters: any;
82
+ }) => any) | undefined;
83
+ "onRelation-form-page-change"?: ((data: {
84
+ field: string;
85
+ releaseId: string;
86
+ pagination: any;
87
+ }) => any) | undefined;
40
88
  }>, {
41
89
  disabled: boolean;
42
90
  tableMode: boolean;
43
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
91
+ }, {}, {
92
+ RelationFormInternal: DefineComponent<ExtractPropTypes<{
93
+ placeholder: {
94
+ type: PropType<string>;
95
+ };
96
+ clearable: {
97
+ type: PropType<boolean>;
98
+ default: boolean;
99
+ };
100
+ disabled: {
101
+ type: PropType<boolean>;
102
+ };
103
+ formType: {
104
+ type: PropType<string>;
105
+ };
106
+ value: {
107
+ type: PropType<any>;
108
+ };
109
+ dialogWidth: {
110
+ type: PropType<string>;
111
+ default: string;
112
+ };
113
+ multiple: {
114
+ type: PropType<boolean>;
115
+ default: boolean;
116
+ };
117
+ searchLoading: {
118
+ type: PropType<boolean>;
119
+ default: boolean;
120
+ };
121
+ searchResults: {
122
+ type: PropType<any[]>;
123
+ default: () => never[];
124
+ };
125
+ dialogTableData: {
126
+ type: PropType<any[]>;
127
+ default: () => never[];
128
+ };
129
+ dialogLoading: {
130
+ type: PropType<boolean>;
131
+ default: boolean;
132
+ };
133
+ dialogPagination: {
134
+ type: PropType<{
135
+ current: number;
136
+ pageSize: number;
137
+ total: number;
138
+ }>;
139
+ };
140
+ columnOptions: {
141
+ type: PropType<any[]>;
142
+ default: () => never[];
143
+ };
144
+ releaseId: {
145
+ type: PropType<string>;
146
+ };
147
+ relationField: {
148
+ type: PropType<string>;
149
+ };
150
+ searchFields: {
151
+ type: PropType<string[]>;
152
+ };
153
+ rowKey: {
154
+ type: PropType<string>;
155
+ default: string;
156
+ };
157
+ dialogTitle: {
158
+ type: PropType<string>;
159
+ };
160
+ cdFormConfig: {
161
+ type: PropType<{
162
+ formData?: any;
163
+ columnData?: any;
164
+ }>;
165
+ default: () => {
166
+ formData: null;
167
+ columnData: null;
168
+ };
169
+ };
170
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
171
+ change: (value: any) => void;
172
+ search: (data: {
173
+ keyword: string;
174
+ searchFields: string[];
175
+ }) => void;
176
+ "update:value": (value: any) => void;
177
+ "dialog-search": (filters: any) => void;
178
+ "dialog-page-change": (pagination: any) => void;
179
+ "advanced-select": () => void;
180
+ "row-select": (row: any) => void;
181
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
182
+ placeholder: {
183
+ type: PropType<string>;
184
+ };
185
+ clearable: {
186
+ type: PropType<boolean>;
187
+ default: boolean;
188
+ };
189
+ disabled: {
190
+ type: PropType<boolean>;
191
+ };
192
+ formType: {
193
+ type: PropType<string>;
194
+ };
195
+ value: {
196
+ type: PropType<any>;
197
+ };
198
+ dialogWidth: {
199
+ type: PropType<string>;
200
+ default: string;
201
+ };
202
+ multiple: {
203
+ type: PropType<boolean>;
204
+ default: boolean;
205
+ };
206
+ searchLoading: {
207
+ type: PropType<boolean>;
208
+ default: boolean;
209
+ };
210
+ searchResults: {
211
+ type: PropType<any[]>;
212
+ default: () => never[];
213
+ };
214
+ dialogTableData: {
215
+ type: PropType<any[]>;
216
+ default: () => never[];
217
+ };
218
+ dialogLoading: {
219
+ type: PropType<boolean>;
220
+ default: boolean;
221
+ };
222
+ dialogPagination: {
223
+ type: PropType<{
224
+ current: number;
225
+ pageSize: number;
226
+ total: number;
227
+ }>;
228
+ };
229
+ columnOptions: {
230
+ type: PropType<any[]>;
231
+ default: () => never[];
232
+ };
233
+ releaseId: {
234
+ type: PropType<string>;
235
+ };
236
+ relationField: {
237
+ type: PropType<string>;
238
+ };
239
+ searchFields: {
240
+ type: PropType<string[]>;
241
+ };
242
+ rowKey: {
243
+ type: PropType<string>;
244
+ default: string;
245
+ };
246
+ dialogTitle: {
247
+ type: PropType<string>;
248
+ };
249
+ cdFormConfig: {
250
+ type: PropType<{
251
+ formData?: any;
252
+ columnData?: any;
253
+ }>;
254
+ default: () => {
255
+ formData: null;
256
+ columnData: null;
257
+ };
258
+ };
259
+ }>> & Readonly<{
260
+ onChange?: ((value: any) => any) | undefined;
261
+ onSearch?: ((data: {
262
+ keyword: string;
263
+ searchFields: string[];
264
+ }) => any) | undefined;
265
+ "onUpdate:value"?: ((value: any) => any) | undefined;
266
+ "onDialog-search"?: ((filters: any) => any) | undefined;
267
+ "onDialog-page-change"?: ((pagination: any) => any) | undefined;
268
+ "onAdvanced-select"?: (() => any) | undefined;
269
+ "onRow-select"?: ((row: any) => any) | undefined;
270
+ }>, {
271
+ clearable: boolean;
272
+ dialogWidth: string;
273
+ multiple: boolean;
274
+ searchLoading: boolean;
275
+ searchResults: any[];
276
+ dialogTableData: any[];
277
+ dialogLoading: boolean;
278
+ columnOptions: any[];
279
+ rowKey: string;
280
+ cdFormConfig: {
281
+ formData?: any;
282
+ columnData?: any;
283
+ };
284
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
285
+ }, {}, string, ComponentProvideOptions, true, {}, any>;
44
286
  export default _default;
45
287
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
46
288
  type __VLS_TypePropsToRuntimeProps<T> = {