@betterinternship/core 2.9.0 → 2.10.0
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/index.js +4 -4
- package/dist/lib/forms/constants/fonts.d.ts +131 -131
- package/dist/lib/forms/constants/fonts.js +54 -54
- package/dist/lib/forms/constants/form.d.ts +2 -2
- package/dist/lib/forms/constants/form.js +17 -17
- package/dist/lib/forms/constants/index.d.ts +2 -2
- package/dist/lib/forms/constants/index.js +2 -2
- package/dist/lib/forms/field-preset-templates.d.ts +23 -23
- package/dist/lib/forms/field-preset-templates.js +247 -247
- package/dist/lib/forms/fields.client.d.ts +30 -30
- package/dist/lib/forms/fields.client.js +20 -20
- package/dist/lib/forms/fields.server.d.ts +16 -16
- package/dist/lib/forms/fields.server.js +1 -1
- package/dist/lib/forms/form-metadata.d.ts +136 -136
- package/dist/lib/forms/form-metadata.js +338 -338
- package/dist/lib/forms/index.d.ts +7 -7
- package/dist/lib/forms/index.js +7 -7
- package/dist/lib/forms/validator-ir.d.ts +191 -186
- package/dist/lib/forms/validator-ir.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './constants/fonts.js';
|
|
2
|
-
export * from './constants/index.js';
|
|
3
|
-
export * from './form-metadata.js';
|
|
4
|
-
export * from './validator-ir.js';
|
|
5
|
-
export * from './field-preset-templates.js';
|
|
6
|
-
export * from './fields.client.js';
|
|
7
|
-
export * from './fields.server.js';
|
|
1
|
+
export * from './constants/fonts.js';
|
|
2
|
+
export * from './constants/index.js';
|
|
3
|
+
export * from './form-metadata.js';
|
|
4
|
+
export * from './validator-ir.js';
|
|
5
|
+
export * from './field-preset-templates.js';
|
|
6
|
+
export * from './fields.client.js';
|
|
7
|
+
export * from './fields.server.js';
|
package/dist/lib/forms/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './constants/fonts.js';
|
|
2
|
-
export * from './constants/index.js';
|
|
3
|
-
export * from './form-metadata.js';
|
|
4
|
-
export * from './validator-ir.js';
|
|
5
|
-
export * from './field-preset-templates.js';
|
|
6
|
-
export * from './fields.client.js';
|
|
7
|
-
export * from './fields.server.js';
|
|
1
|
+
export * from './constants/fonts.js';
|
|
2
|
+
export * from './constants/index.js';
|
|
3
|
+
export * from './form-metadata.js';
|
|
4
|
+
export * from './validator-ir.js';
|
|
5
|
+
export * from './field-preset-templates.js';
|
|
6
|
+
export * from './fields.client.js';
|
|
7
|
+
export * from './fields.server.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,186 +1,191 @@
|
|
|
1
|
-
export type ValidatorBaseType = 'text' | 'number' | 'date' | 'enum' | 'array' | 'checkbox' | 'textarea' | 'time' | 'email' | 'phone' | 'url' | 'signature' | 'image';
|
|
2
|
-
type ValidatorRuleRequired = {
|
|
3
|
-
kind: 'required';
|
|
4
|
-
message?: string;
|
|
5
|
-
};
|
|
6
|
-
type ValidatorRuleMinLength = {
|
|
7
|
-
kind: 'minLength';
|
|
8
|
-
value: number;
|
|
9
|
-
message?: string;
|
|
10
|
-
};
|
|
11
|
-
type ValidatorRuleMaxLength = {
|
|
12
|
-
kind: 'maxLength';
|
|
13
|
-
value: number;
|
|
14
|
-
message?: string;
|
|
15
|
-
};
|
|
16
|
-
type ValidatorRuleEmail = {
|
|
17
|
-
kind: 'email';
|
|
18
|
-
message?: string;
|
|
19
|
-
};
|
|
20
|
-
type ValidatorRuleUrl = {
|
|
21
|
-
kind: 'url';
|
|
22
|
-
message?: string;
|
|
23
|
-
};
|
|
24
|
-
type ValidatorRuleRegex = {
|
|
25
|
-
kind: 'regex';
|
|
26
|
-
pattern: string;
|
|
27
|
-
flags?: string;
|
|
28
|
-
message?: string;
|
|
29
|
-
};
|
|
30
|
-
type ValidatorRulePlainText = {
|
|
31
|
-
kind: 'plainText';
|
|
32
|
-
message?: string;
|
|
33
|
-
};
|
|
34
|
-
type ValidatorRuleTitleCase = {
|
|
35
|
-
kind: 'titleCase';
|
|
36
|
-
message?: string;
|
|
37
|
-
};
|
|
38
|
-
type ValidatorRuleTrim = {
|
|
39
|
-
kind: 'trim';
|
|
40
|
-
};
|
|
41
|
-
type ValidatorRuleMin = {
|
|
42
|
-
kind: 'min';
|
|
43
|
-
value: number;
|
|
44
|
-
message?: string;
|
|
45
|
-
};
|
|
46
|
-
type ValidatorRuleMax = {
|
|
47
|
-
kind: 'max';
|
|
48
|
-
value: number;
|
|
49
|
-
message?: string;
|
|
50
|
-
};
|
|
51
|
-
type ValidatorRuleEnum = {
|
|
52
|
-
kind: 'enum';
|
|
53
|
-
options: string[];
|
|
54
|
-
message?: string;
|
|
55
|
-
};
|
|
56
|
-
type ValidatorRuleArray = {
|
|
57
|
-
kind: 'array';
|
|
58
|
-
options: string[];
|
|
59
|
-
minItems?: number;
|
|
60
|
-
maxItems?: number;
|
|
61
|
-
minMessage?: string;
|
|
62
|
-
maxMessage?: string;
|
|
63
|
-
};
|
|
64
|
-
type ValidatorRuleMinDate = {
|
|
65
|
-
kind: 'minDate';
|
|
66
|
-
isoDate: string;
|
|
67
|
-
message?: string;
|
|
68
|
-
};
|
|
69
|
-
type ValidatorRuleMaxDate = {
|
|
70
|
-
kind: 'maxDate';
|
|
71
|
-
isoDate: string;
|
|
72
|
-
message?: string;
|
|
73
|
-
};
|
|
74
|
-
type ValidatorRuleDateOnOrAfterToday = {
|
|
75
|
-
kind: 'dateOnOrAfterToday';
|
|
76
|
-
message?: string;
|
|
77
|
-
};
|
|
78
|
-
type ValidatorRuleDateOnOrBeforeToday = {
|
|
79
|
-
kind: 'dateOnOrBeforeToday';
|
|
80
|
-
message?: string;
|
|
81
|
-
};
|
|
82
|
-
type
|
|
83
|
-
kind: '
|
|
84
|
-
|
|
85
|
-
message?: string;
|
|
86
|
-
};
|
|
87
|
-
type
|
|
88
|
-
kind: '
|
|
89
|
-
field: string;
|
|
90
|
-
message?: string;
|
|
91
|
-
};
|
|
92
|
-
type
|
|
93
|
-
kind: '
|
|
94
|
-
|
|
95
|
-
message?: string;
|
|
96
|
-
};
|
|
97
|
-
type
|
|
98
|
-
kind: '
|
|
99
|
-
value: string;
|
|
100
|
-
message?: string;
|
|
101
|
-
};
|
|
102
|
-
type
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
type
|
|
108
|
-
type
|
|
109
|
-
type
|
|
110
|
-
type
|
|
111
|
-
type
|
|
112
|
-
type
|
|
113
|
-
type
|
|
114
|
-
type
|
|
115
|
-
type
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
type
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
type
|
|
126
|
-
version: 0;
|
|
127
|
-
baseType: '
|
|
128
|
-
rules:
|
|
129
|
-
} & ValidatorIRMeta;
|
|
130
|
-
type
|
|
131
|
-
version: 0;
|
|
132
|
-
baseType: '
|
|
133
|
-
rules:
|
|
134
|
-
} & ValidatorIRMeta;
|
|
135
|
-
type
|
|
136
|
-
version: 0;
|
|
137
|
-
baseType: '
|
|
138
|
-
rules:
|
|
139
|
-
} & ValidatorIRMeta;
|
|
140
|
-
type
|
|
141
|
-
version: 0;
|
|
142
|
-
baseType: '
|
|
143
|
-
rules:
|
|
144
|
-
} & ValidatorIRMeta;
|
|
145
|
-
type
|
|
146
|
-
version: 0;
|
|
147
|
-
baseType: '
|
|
148
|
-
rules:
|
|
149
|
-
} & ValidatorIRMeta;
|
|
150
|
-
type
|
|
151
|
-
version: 0;
|
|
152
|
-
baseType: '
|
|
153
|
-
rules:
|
|
154
|
-
} & ValidatorIRMeta;
|
|
155
|
-
type
|
|
156
|
-
version: 0;
|
|
157
|
-
baseType: '
|
|
158
|
-
rules:
|
|
159
|
-
} & ValidatorIRMeta;
|
|
160
|
-
type
|
|
161
|
-
version: 0;
|
|
162
|
-
baseType: '
|
|
163
|
-
rules:
|
|
164
|
-
} & ValidatorIRMeta;
|
|
165
|
-
type
|
|
166
|
-
version: 0;
|
|
167
|
-
baseType: '
|
|
168
|
-
rules:
|
|
169
|
-
} & ValidatorIRMeta;
|
|
170
|
-
type
|
|
171
|
-
version: 0;
|
|
172
|
-
baseType: '
|
|
173
|
-
rules:
|
|
174
|
-
} & ValidatorIRMeta;
|
|
175
|
-
type
|
|
176
|
-
version: 0;
|
|
177
|
-
baseType: '
|
|
178
|
-
rules:
|
|
179
|
-
} & ValidatorIRMeta;
|
|
180
|
-
type
|
|
181
|
-
version: 0;
|
|
182
|
-
baseType: '
|
|
183
|
-
rules:
|
|
184
|
-
} & ValidatorIRMeta;
|
|
185
|
-
|
|
186
|
-
|
|
1
|
+
export type ValidatorBaseType = 'text' | 'number' | 'date' | 'enum' | 'array' | 'checkbox' | 'textarea' | 'time' | 'email' | 'phone' | 'url' | 'signature' | 'image';
|
|
2
|
+
type ValidatorRuleRequired = {
|
|
3
|
+
kind: 'required';
|
|
4
|
+
message?: string;
|
|
5
|
+
};
|
|
6
|
+
type ValidatorRuleMinLength = {
|
|
7
|
+
kind: 'minLength';
|
|
8
|
+
value: number;
|
|
9
|
+
message?: string;
|
|
10
|
+
};
|
|
11
|
+
type ValidatorRuleMaxLength = {
|
|
12
|
+
kind: 'maxLength';
|
|
13
|
+
value: number;
|
|
14
|
+
message?: string;
|
|
15
|
+
};
|
|
16
|
+
type ValidatorRuleEmail = {
|
|
17
|
+
kind: 'email';
|
|
18
|
+
message?: string;
|
|
19
|
+
};
|
|
20
|
+
type ValidatorRuleUrl = {
|
|
21
|
+
kind: 'url';
|
|
22
|
+
message?: string;
|
|
23
|
+
};
|
|
24
|
+
type ValidatorRuleRegex = {
|
|
25
|
+
kind: 'regex';
|
|
26
|
+
pattern: string;
|
|
27
|
+
flags?: string;
|
|
28
|
+
message?: string;
|
|
29
|
+
};
|
|
30
|
+
type ValidatorRulePlainText = {
|
|
31
|
+
kind: 'plainText';
|
|
32
|
+
message?: string;
|
|
33
|
+
};
|
|
34
|
+
type ValidatorRuleTitleCase = {
|
|
35
|
+
kind: 'titleCase';
|
|
36
|
+
message?: string;
|
|
37
|
+
};
|
|
38
|
+
type ValidatorRuleTrim = {
|
|
39
|
+
kind: 'trim';
|
|
40
|
+
};
|
|
41
|
+
type ValidatorRuleMin = {
|
|
42
|
+
kind: 'min';
|
|
43
|
+
value: number;
|
|
44
|
+
message?: string;
|
|
45
|
+
};
|
|
46
|
+
type ValidatorRuleMax = {
|
|
47
|
+
kind: 'max';
|
|
48
|
+
value: number;
|
|
49
|
+
message?: string;
|
|
50
|
+
};
|
|
51
|
+
type ValidatorRuleEnum = {
|
|
52
|
+
kind: 'enum';
|
|
53
|
+
options: string[];
|
|
54
|
+
message?: string;
|
|
55
|
+
};
|
|
56
|
+
type ValidatorRuleArray = {
|
|
57
|
+
kind: 'array';
|
|
58
|
+
options: string[];
|
|
59
|
+
minItems?: number;
|
|
60
|
+
maxItems?: number;
|
|
61
|
+
minMessage?: string;
|
|
62
|
+
maxMessage?: string;
|
|
63
|
+
};
|
|
64
|
+
type ValidatorRuleMinDate = {
|
|
65
|
+
kind: 'minDate';
|
|
66
|
+
isoDate: string;
|
|
67
|
+
message?: string;
|
|
68
|
+
};
|
|
69
|
+
type ValidatorRuleMaxDate = {
|
|
70
|
+
kind: 'maxDate';
|
|
71
|
+
isoDate: string;
|
|
72
|
+
message?: string;
|
|
73
|
+
};
|
|
74
|
+
type ValidatorRuleDateOnOrAfterToday = {
|
|
75
|
+
kind: 'dateOnOrAfterToday';
|
|
76
|
+
message?: string;
|
|
77
|
+
};
|
|
78
|
+
type ValidatorRuleDateOnOrBeforeToday = {
|
|
79
|
+
kind: 'dateOnOrBeforeToday';
|
|
80
|
+
message?: string;
|
|
81
|
+
};
|
|
82
|
+
type ValidatorRuleDateOnOrAfterBusinessDays = {
|
|
83
|
+
kind: 'dateOnOrAfterBusinessDays';
|
|
84
|
+
businessDays: number;
|
|
85
|
+
message?: string;
|
|
86
|
+
};
|
|
87
|
+
type ValidatorRuleDateOnOrAfterField = {
|
|
88
|
+
kind: 'dateOnOrAfterField';
|
|
89
|
+
field: string;
|
|
90
|
+
message?: string;
|
|
91
|
+
};
|
|
92
|
+
type ValidatorRuleDateOnOrBeforeField = {
|
|
93
|
+
kind: 'dateOnOrBeforeField';
|
|
94
|
+
field: string;
|
|
95
|
+
message?: string;
|
|
96
|
+
};
|
|
97
|
+
type ValidatorRuleMinTime = {
|
|
98
|
+
kind: 'minTime';
|
|
99
|
+
value: string;
|
|
100
|
+
message?: string;
|
|
101
|
+
};
|
|
102
|
+
type ValidatorRuleMaxTime = {
|
|
103
|
+
kind: 'maxTime';
|
|
104
|
+
value: string;
|
|
105
|
+
message?: string;
|
|
106
|
+
};
|
|
107
|
+
type TextRule = ValidatorRuleRequired | ValidatorRuleMinLength | ValidatorRuleMaxLength | ValidatorRuleEmail | ValidatorRuleUrl | ValidatorRuleRegex | ValidatorRulePlainText | ValidatorRuleTitleCase | ValidatorRuleTrim;
|
|
108
|
+
type NumberRule = ValidatorRuleRequired | ValidatorRuleMin | ValidatorRuleMax;
|
|
109
|
+
type DateRule = ValidatorRuleRequired | ValidatorRuleMinDate | ValidatorRuleMaxDate | ValidatorRuleDateOnOrAfterToday | ValidatorRuleDateOnOrBeforeToday | ValidatorRuleDateOnOrAfterBusinessDays | ValidatorRuleDateOnOrAfterField | ValidatorRuleDateOnOrBeforeField;
|
|
110
|
+
type EnumRule = ValidatorRuleRequired | ValidatorRuleEnum;
|
|
111
|
+
type ArrayRule = ValidatorRuleRequired | ValidatorRuleArray;
|
|
112
|
+
type CheckboxRule = ValidatorRuleRequired;
|
|
113
|
+
type TextareaRule = Exclude<TextRule, ValidatorRuleTrim>;
|
|
114
|
+
type TimeRule = ValidatorRuleRequired | ValidatorRuleMinTime | ValidatorRuleMaxTime;
|
|
115
|
+
type EmailRule = ValidatorRuleRequired;
|
|
116
|
+
type PhoneRule = ValidatorRuleRequired;
|
|
117
|
+
type UrlRule = ValidatorRuleRequired;
|
|
118
|
+
type SignatureRule = ValidatorRuleRequired;
|
|
119
|
+
type ImageRule = ValidatorRuleRequired;
|
|
120
|
+
type ValidatorIRMeta = {
|
|
121
|
+
mode?: 'builder' | 'imported';
|
|
122
|
+
importStatus?: 'exact' | 'partial' | 'custom';
|
|
123
|
+
unmapped?: string[];
|
|
124
|
+
};
|
|
125
|
+
type ValidatorIRText = {
|
|
126
|
+
version: 0;
|
|
127
|
+
baseType: 'text';
|
|
128
|
+
rules: TextRule[];
|
|
129
|
+
} & ValidatorIRMeta;
|
|
130
|
+
type ValidatorIRNumber = {
|
|
131
|
+
version: 0;
|
|
132
|
+
baseType: 'number';
|
|
133
|
+
rules: NumberRule[];
|
|
134
|
+
} & ValidatorIRMeta;
|
|
135
|
+
type ValidatorIRDate = {
|
|
136
|
+
version: 0;
|
|
137
|
+
baseType: 'date';
|
|
138
|
+
rules: DateRule[];
|
|
139
|
+
} & ValidatorIRMeta;
|
|
140
|
+
type ValidatorIREnum = {
|
|
141
|
+
version: 0;
|
|
142
|
+
baseType: 'enum';
|
|
143
|
+
rules: EnumRule[];
|
|
144
|
+
} & ValidatorIRMeta;
|
|
145
|
+
type ValidatorIRArray = {
|
|
146
|
+
version: 0;
|
|
147
|
+
baseType: 'array';
|
|
148
|
+
rules: ArrayRule[];
|
|
149
|
+
} & ValidatorIRMeta;
|
|
150
|
+
type ValidatorIRCheckbox = {
|
|
151
|
+
version: 0;
|
|
152
|
+
baseType: 'checkbox';
|
|
153
|
+
rules: CheckboxRule[];
|
|
154
|
+
} & ValidatorIRMeta;
|
|
155
|
+
type ValidatorIRTextarea = {
|
|
156
|
+
version: 0;
|
|
157
|
+
baseType: 'textarea';
|
|
158
|
+
rules: TextareaRule[];
|
|
159
|
+
} & ValidatorIRMeta;
|
|
160
|
+
type ValidatorIRTime = {
|
|
161
|
+
version: 0;
|
|
162
|
+
baseType: 'time';
|
|
163
|
+
rules: TimeRule[];
|
|
164
|
+
} & ValidatorIRMeta;
|
|
165
|
+
type ValidatorIREmail = {
|
|
166
|
+
version: 0;
|
|
167
|
+
baseType: 'email';
|
|
168
|
+
rules: EmailRule[];
|
|
169
|
+
} & ValidatorIRMeta;
|
|
170
|
+
type ValidatorIRPhone = {
|
|
171
|
+
version: 0;
|
|
172
|
+
baseType: 'phone';
|
|
173
|
+
rules: PhoneRule[];
|
|
174
|
+
} & ValidatorIRMeta;
|
|
175
|
+
type ValidatorIRUrl = {
|
|
176
|
+
version: 0;
|
|
177
|
+
baseType: 'url';
|
|
178
|
+
rules: UrlRule[];
|
|
179
|
+
} & ValidatorIRMeta;
|
|
180
|
+
type ValidatorIRSignature = {
|
|
181
|
+
version: 0;
|
|
182
|
+
baseType: 'signature';
|
|
183
|
+
rules: SignatureRule[];
|
|
184
|
+
} & ValidatorIRMeta;
|
|
185
|
+
type ValidatorIRImage = {
|
|
186
|
+
version: 0;
|
|
187
|
+
baseType: 'image';
|
|
188
|
+
rules: ImageRule[];
|
|
189
|
+
} & ValidatorIRMeta;
|
|
190
|
+
export type ValidatorIRv0 = ValidatorIRText | ValidatorIRNumber | ValidatorIRDate | ValidatorIREnum | ValidatorIRArray | ValidatorIRCheckbox | ValidatorIRTextarea | ValidatorIRTime | ValidatorIREmail | ValidatorIRPhone | ValidatorIRUrl | ValidatorIRSignature | ValidatorIRImage;
|
|
191
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=validator-ir.js.map
|