@win2win/shared-ui 0.0.17 → 0.0.18
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.
- package/dist/components/DynamicForm/helpers.d.ts +6 -1
- package/dist/components/DynamicForm/helpers.d.ts.map +1 -1
- package/dist/components/DynamicForm/useFormGroups.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/stores/useFormStore.d.ts +17 -21
- package/dist/stores/useFormStore.d.ts.map +1 -1
- package/dist/w2w-shared-ui.js +1851 -1853
- package/dist/w2w-shared-ui.umd.cjs +13 -13
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ControlType } from '@win2win/shared';
|
|
2
|
+
import { FormControl, FormControlModel, FormGroupModel, FormStep, FormStepModel } from './models';
|
|
2
3
|
export declare function validateFormGroup(group: FormGroupModel): string[];
|
|
3
4
|
export declare function buildGroupsFromComplexControl(group: FormGroupModel, control: FormControlModel, maxControlsPerGroup: number): FormGroupModel[];
|
|
4
5
|
export declare function buildFormGroups(formControls: FormControlModel[]): FormGroupModel[];
|
|
6
|
+
export declare function formatFormSteps(formSteps: FormStep[]): FormStepModel[];
|
|
7
|
+
export declare function formatControls(controls: FormControl[]): FormControlModel[];
|
|
8
|
+
export declare function getDefaultValue(control: FormControl): {} | null;
|
|
9
|
+
export declare const COMPLEX_CONTROLS: ControlType[];
|
|
5
10
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicForm/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicForm/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAa,MAAM,iBAAiB,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAElG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,EAAE,CAWjE;AAiBD,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,gBAAgB,EACzB,mBAAmB,EAAE,MAAM,GAC1B,cAAc,EAAE,CAMlB;AA6CD,wBAAgB,eAAe,CAC7B,YAAY,EAAE,gBAAgB,EAAE,GAC/B,cAAc,EAAE,CAmBlB;AAID,wBAAgB,eAAe,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAMtE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,gBAAgB,EAAE,CAc1E;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,aA0BnD;AAED,eAAO,MAAM,gBAAgB,eAAkD,CAAC"}
|
|
@@ -31,7 +31,7 @@ export declare function useFormGroups(formStepIndex: number, options?: GroupOpti
|
|
|
31
31
|
conditions?: {
|
|
32
32
|
logic: "AND" | "OR";
|
|
33
33
|
children: any[];
|
|
34
|
-
operator: "
|
|
34
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
35
35
|
id: number;
|
|
36
36
|
value: string;
|
|
37
37
|
}[] | undefined;
|
|
@@ -61,7 +61,7 @@ export declare function useFormGroups(formStepIndex: number, options?: GroupOpti
|
|
|
61
61
|
conditions?: {
|
|
62
62
|
logic: "AND" | "OR";
|
|
63
63
|
children: any[];
|
|
64
|
-
operator: "
|
|
64
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
65
65
|
id: number;
|
|
66
66
|
value: string;
|
|
67
67
|
}[] | undefined;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,WAAW,MAAM,0CAA0C,CAAC;AACnE,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAG7C,QAAA,MAAM,WAAW;iBACF,GAAG,WAAW,GAAG;CAe/B,CAAC;AAEF,eAAe,WAAW,CAAC;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FormControl, FormControlModel, FormStep, FormStepModel } from '../components/DynamicForm/models';
|
|
1
|
+
import { FormControlModel, FormStep, FormStepModel } from '../components/DynamicForm/models';
|
|
3
2
|
export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
4
3
|
formSteps: FormStepModel[];
|
|
5
4
|
currentStep: number;
|
|
@@ -15,7 +14,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
15
14
|
visible?: boolean | undefined;
|
|
16
15
|
parentKey?: string | undefined;
|
|
17
16
|
code: string;
|
|
18
|
-
controlType: ControlType;
|
|
17
|
+
controlType: import("@win2win/shared").ControlType;
|
|
19
18
|
label?: string | undefined;
|
|
20
19
|
type?: "number" | "text" | "tel" | "textarea" | undefined;
|
|
21
20
|
name: string;
|
|
@@ -33,7 +32,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
33
32
|
conditions?: {
|
|
34
33
|
logic: "AND" | "OR";
|
|
35
34
|
children: any[];
|
|
36
|
-
operator: "
|
|
35
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
37
36
|
id: number;
|
|
38
37
|
value: string;
|
|
39
38
|
}[] | undefined;
|
|
@@ -45,7 +44,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
45
44
|
col: number;
|
|
46
45
|
structure: {
|
|
47
46
|
code: string;
|
|
48
|
-
controlType: ControlType;
|
|
47
|
+
controlType: import("@win2win/shared").ControlType;
|
|
49
48
|
label?: string | undefined;
|
|
50
49
|
type?: "number" | "text" | "tel" | "textarea" | undefined;
|
|
51
50
|
name: string;
|
|
@@ -63,7 +62,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
63
62
|
conditions?: {
|
|
64
63
|
logic: "AND" | "OR";
|
|
65
64
|
children: any[];
|
|
66
|
-
operator: "
|
|
65
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
67
66
|
id: number;
|
|
68
67
|
value: string;
|
|
69
68
|
}[] | undefined;
|
|
@@ -118,7 +117,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
118
117
|
visible?: boolean | undefined;
|
|
119
118
|
parentKey?: string | undefined;
|
|
120
119
|
code: string;
|
|
121
|
-
controlType: ControlType;
|
|
120
|
+
controlType: import("@win2win/shared").ControlType;
|
|
122
121
|
label?: string | undefined;
|
|
123
122
|
type?: "number" | "text" | "tel" | "textarea" | undefined;
|
|
124
123
|
name: string;
|
|
@@ -136,7 +135,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
136
135
|
conditions?: {
|
|
137
136
|
logic: "AND" | "OR";
|
|
138
137
|
children: any[];
|
|
139
|
-
operator: "
|
|
138
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
140
139
|
id: number;
|
|
141
140
|
value: string;
|
|
142
141
|
}[] | undefined;
|
|
@@ -148,7 +147,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
148
147
|
col: number;
|
|
149
148
|
structure: {
|
|
150
149
|
code: string;
|
|
151
|
-
controlType: ControlType;
|
|
150
|
+
controlType: import("@win2win/shared").ControlType;
|
|
152
151
|
label?: string | undefined;
|
|
153
152
|
type?: "number" | "text" | "tel" | "textarea" | undefined;
|
|
154
153
|
name: string;
|
|
@@ -166,7 +165,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
166
165
|
conditions?: {
|
|
167
166
|
logic: "AND" | "OR";
|
|
168
167
|
children: any[];
|
|
169
|
-
operator: "
|
|
168
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
170
169
|
id: number;
|
|
171
170
|
value: string;
|
|
172
171
|
}[] | undefined;
|
|
@@ -214,7 +213,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
214
213
|
visible?: boolean | undefined;
|
|
215
214
|
parentKey?: string | undefined;
|
|
216
215
|
code: string;
|
|
217
|
-
controlType: ControlType;
|
|
216
|
+
controlType: import("@win2win/shared").ControlType;
|
|
218
217
|
label?: string | undefined;
|
|
219
218
|
type?: "number" | "text" | "tel" | "textarea" | undefined;
|
|
220
219
|
name: string;
|
|
@@ -232,7 +231,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
232
231
|
conditions?: {
|
|
233
232
|
logic: "AND" | "OR";
|
|
234
233
|
children: any[];
|
|
235
|
-
operator: "
|
|
234
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
236
235
|
id: number;
|
|
237
236
|
value: string;
|
|
238
237
|
}[] | undefined;
|
|
@@ -244,7 +243,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
244
243
|
col: number;
|
|
245
244
|
structure: {
|
|
246
245
|
code: string;
|
|
247
|
-
controlType: ControlType;
|
|
246
|
+
controlType: import("@win2win/shared").ControlType;
|
|
248
247
|
label?: string | undefined;
|
|
249
248
|
type?: "number" | "text" | "tel" | "textarea" | undefined;
|
|
250
249
|
name: string;
|
|
@@ -262,7 +261,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
262
261
|
conditions?: {
|
|
263
262
|
logic: "AND" | "OR";
|
|
264
263
|
children: any[];
|
|
265
|
-
operator: "
|
|
264
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
266
265
|
id: number;
|
|
267
266
|
value: string;
|
|
268
267
|
}[] | undefined;
|
|
@@ -320,7 +319,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
320
319
|
visible?: boolean | undefined;
|
|
321
320
|
parentKey?: string | undefined;
|
|
322
321
|
code: string;
|
|
323
|
-
controlType: ControlType;
|
|
322
|
+
controlType: import("@win2win/shared").ControlType;
|
|
324
323
|
label?: string | undefined;
|
|
325
324
|
type?: "number" | "text" | "tel" | "textarea" | undefined;
|
|
326
325
|
name: string;
|
|
@@ -338,7 +337,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
338
337
|
conditions?: {
|
|
339
338
|
logic: "AND" | "OR";
|
|
340
339
|
children: any[];
|
|
341
|
-
operator: "
|
|
340
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
342
341
|
id: number;
|
|
343
342
|
value: string;
|
|
344
343
|
}[] | undefined;
|
|
@@ -350,7 +349,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
350
349
|
col: number;
|
|
351
350
|
structure: {
|
|
352
351
|
code: string;
|
|
353
|
-
controlType: ControlType;
|
|
352
|
+
controlType: import("@win2win/shared").ControlType;
|
|
354
353
|
label?: string | undefined;
|
|
355
354
|
type?: "number" | "text" | "tel" | "textarea" | undefined;
|
|
356
355
|
name: string;
|
|
@@ -368,7 +367,7 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
368
367
|
conditions?: {
|
|
369
368
|
logic: "AND" | "OR";
|
|
370
369
|
children: any[];
|
|
371
|
-
operator: "
|
|
370
|
+
operator: "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "not_contains" | "in" | "not_in";
|
|
372
371
|
id: number;
|
|
373
372
|
value: string;
|
|
374
373
|
}[] | undefined;
|
|
@@ -427,7 +426,4 @@ export declare const useFormStore: import("pinia").StoreDefinition<"form", {
|
|
|
427
426
|
resetSteps(): void;
|
|
428
427
|
setCollection(key: string, value: any): void;
|
|
429
428
|
}>;
|
|
430
|
-
export declare function formatControls(controls: FormControl[]): FormControlModel[];
|
|
431
|
-
export declare function getDefaultValue(control: FormControl): {} | null;
|
|
432
|
-
export declare const COMPLEX_CONTROLS: ControlType[];
|
|
433
429
|
//# sourceMappingURL=useFormStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormStore.d.ts","sourceRoot":"","sources":["../../src/stores/useFormStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFormStore.d.ts","sourceRoot":"","sources":["../../src/stores/useFormStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAG7F,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAsEL,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAMR,MAAM;;+BApEM,QAAQ,EAAE;;;+BAWV,MAAM,gBAAgB,gBAAgB;oCAapD,MAAM,aACN,MAAM,WACR,OAAO;qCASL,MAAM,aACN,MAAM,eACJ,MAAM;4BAQG,OAAO;;uBAMZ,MAAM,SAAS,GAAG;EAoBvC,CAAC"}
|