@digigov/form 0.10.4 → 0.10.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.
- package/CHANGELOG.md +13 -1
- package/Field/index.js +2 -2
- package/FieldArray/FieldArray.stories.playwright.json +213 -28
- package/FieldArray/__stories__/Default.js +13 -8
- package/FieldArray/__stories__/WithExactLength.js +14 -8
- package/FieldArray/index.js +3 -3
- package/Form.stories.playwright.json +143 -0
- package/FormBuilder/FormBuilder.stories.playwright.json +52 -0
- package/MultiplicityField/MultiplicityField.stories.playwright.json +1370 -0
- package/MultiplicityField/__stories__/Default.js +3 -3
- package/MultiplicityField/__stories__/WithExactLength.js +3 -3
- package/MultiplicityField/__stories__/WithMaxLength.js +3 -3
- package/MultiplicityField/__stories__/WithMinAndMaxLength.js +3 -3
- package/MultiplicityField/__stories__/WithMinLength.js +3 -3
- package/__stories__/AutoCompleteField.js +14 -4
- package/es/Field/index.js +2 -2
- package/es/FieldArray/FieldArray.stories.playwright.json +213 -28
- package/es/FieldArray/__stories__/Default.js +13 -8
- package/es/FieldArray/__stories__/WithExactLength.js +14 -8
- package/es/FieldArray/index.js +3 -3
- package/es/Form.stories.playwright.json +143 -0
- package/es/FormBuilder/FormBuilder.stories.playwright.json +52 -0
- package/es/MultiplicityField/MultiplicityField.stories.playwright.json +1370 -0
- package/es/MultiplicityField/__stories__/Default.js +3 -3
- package/es/MultiplicityField/__stories__/WithExactLength.js +3 -3
- package/es/MultiplicityField/__stories__/WithMaxLength.js +3 -3
- package/es/MultiplicityField/__stories__/WithMinAndMaxLength.js +3 -3
- package/es/MultiplicityField/__stories__/WithMinLength.js +3 -3
- package/es/__stories__/AutoCompleteField.js +8 -4
- package/es/inputs/Checkboxes/Checkboxes.stories.playwright.json +69 -0
- package/es/inputs/DateInput/DateInput.stories.playwright.json +72 -0
- package/es/inputs/FileInput/FileInput.stories.playwright.json +75 -0
- package/es/inputs/Input/Input.stories.playwright.json +376 -0
- package/es/inputs/Label/Label.stories.playwright.json +40 -0
- package/es/inputs/Radio/Radio.stories.playwright.json +57 -0
- package/esm/Field/index.js +2 -2
- package/esm/FieldArray/FieldArray.stories.playwright.json +213 -28
- package/esm/FieldArray/__stories__/Default.js +13 -8
- package/esm/FieldArray/__stories__/WithExactLength.js +14 -8
- package/esm/FieldArray/index.js +3 -3
- package/esm/Form.stories.playwright.json +143 -0
- package/esm/FormBuilder/FormBuilder.stories.playwright.json +52 -0
- package/esm/MultiplicityField/MultiplicityField.stories.playwright.json +1370 -0
- package/esm/MultiplicityField/__stories__/Default.js +3 -3
- package/esm/MultiplicityField/__stories__/WithExactLength.js +3 -3
- package/esm/MultiplicityField/__stories__/WithMaxLength.js +3 -3
- package/esm/MultiplicityField/__stories__/WithMinAndMaxLength.js +3 -3
- package/esm/MultiplicityField/__stories__/WithMinLength.js +3 -3
- package/esm/__stories__/AutoCompleteField.js +8 -4
- package/esm/index.js +1 -1
- package/esm/inputs/Checkboxes/Checkboxes.stories.playwright.json +69 -0
- package/esm/inputs/DateInput/DateInput.stories.playwright.json +72 -0
- package/esm/inputs/FileInput/FileInput.stories.playwright.json +75 -0
- package/esm/inputs/Input/Input.stories.playwright.json +376 -0
- package/esm/inputs/Label/Label.stories.playwright.json +40 -0
- package/esm/inputs/Radio/Radio.stories.playwright.json +57 -0
- package/inputs/Checkboxes/Checkboxes.stories.playwright.json +69 -0
- package/inputs/DateInput/DateInput.stories.playwright.json +72 -0
- package/inputs/FileInput/FileInput.stories.playwright.json +75 -0
- package/inputs/Input/Input.stories.playwright.json +376 -0
- package/inputs/Label/Label.stories.playwright.json +40 -0
- package/inputs/Radio/Radio.stories.playwright.json +57 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Change Log - @digigov/form
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 16 Nov 2022 14:27:34 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.10.6
|
|
6
|
+
Wed, 16 Nov 2022 14:27:34 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 0.10.5
|
|
11
|
+
Mon, 14 Nov 2022 09:45:06 GMT
|
|
12
|
+
|
|
13
|
+
### Patches
|
|
14
|
+
|
|
15
|
+
- Fix FieldArray and Multiplicity components
|
|
4
16
|
|
|
5
17
|
## 0.10.4
|
|
6
18
|
Fri, 04 Nov 2022 10:33:17 GMT
|
package/Field/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var Field = function Field(_ref) {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
if (calculatedField.type === 'array' && calculatedField.multiplicity
|
|
67
|
+
if (calculatedField.type === 'array' && !calculatedField.multiplicity) {
|
|
68
68
|
calculatedField.name = name;
|
|
69
69
|
return /*#__PURE__*/_react["default"].createElement(_FieldArray["default"], (0, _extends2["default"])({
|
|
70
70
|
control: control,
|
|
@@ -74,7 +74,7 @@ var Field = function Field(_ref) {
|
|
|
74
74
|
}, calculatedField));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
if (calculatedField.type === 'array') {
|
|
77
|
+
if (calculatedField.type === 'array' && calculatedField.multiplicity === true) {
|
|
78
78
|
calculatedField.name = name;
|
|
79
79
|
return /*#__PURE__*/_react["default"].createElement(_MultiplicityField["default"], (0, _extends2["default"])({
|
|
80
80
|
control: control,
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "click",
|
|
10
10
|
"args": {
|
|
11
|
-
"selector": "
|
|
11
|
+
"selector": "text=Προσθήκη συνυπογράφοντα"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "click",
|
|
16
16
|
"args": {
|
|
17
|
-
"selector": "
|
|
17
|
+
"selector": "text=Συνέχεια"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{
|
|
30
30
|
"name": "click",
|
|
31
31
|
"args": {
|
|
32
|
-
"selector": "
|
|
32
|
+
"selector": "text=Προσθήκη συνυπογράφοντα",
|
|
33
33
|
"options": {
|
|
34
34
|
"clickCount": 2
|
|
35
35
|
}
|
|
@@ -66,38 +66,87 @@
|
|
|
66
66
|
],
|
|
67
67
|
"id": "iMmV-vvS4iNn",
|
|
68
68
|
"title": "Add new items to FieldArray"
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
"digigov-form-fieldarray--with-exact-length": {
|
|
73
|
-
"actionSets": [
|
|
69
|
+
},
|
|
74
70
|
{
|
|
75
71
|
"actions": [
|
|
76
72
|
{
|
|
77
73
|
"name": "click",
|
|
78
74
|
"args": {
|
|
79
|
-
"selector": "
|
|
75
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"id": "Lhj8o_MByws7",
|
|
80
|
+
"title": "Validation errors"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"actions": [
|
|
84
|
+
{
|
|
85
|
+
"name": "type",
|
|
86
|
+
"args": {
|
|
87
|
+
"selector": "html>body",
|
|
88
|
+
"text": "hello"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "click",
|
|
93
|
+
"args": {
|
|
94
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "type",
|
|
99
|
+
"args": {
|
|
100
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(1)>label>input",
|
|
101
|
+
"text": "150000496"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "type",
|
|
106
|
+
"args": {
|
|
107
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(2)>label>input",
|
|
108
|
+
"text": "Jon"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "type",
|
|
113
|
+
"args": {
|
|
114
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(3)>label>input",
|
|
115
|
+
"text": "Doe"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "click",
|
|
120
|
+
"args": {
|
|
121
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
|
|
80
122
|
}
|
|
81
123
|
},
|
|
82
124
|
{
|
|
83
125
|
"name": "type",
|
|
84
126
|
"args": {
|
|
85
|
-
"selector": "
|
|
86
|
-
"text": "
|
|
127
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(1)>label>input",
|
|
128
|
+
"text": "150000496"
|
|
87
129
|
}
|
|
88
130
|
},
|
|
89
131
|
{
|
|
90
132
|
"name": "type",
|
|
91
133
|
"args": {
|
|
92
|
-
"selector": "
|
|
93
|
-
"text": "
|
|
134
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(2)>label>input",
|
|
135
|
+
"text": "Mar"
|
|
94
136
|
}
|
|
95
137
|
},
|
|
96
138
|
{
|
|
97
139
|
"name": "type",
|
|
98
140
|
"args": {
|
|
99
|
-
"selector": "
|
|
100
|
-
"text": "
|
|
141
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(3)>label>input",
|
|
142
|
+
"text": "P"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "type",
|
|
147
|
+
"args": {
|
|
148
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(3)>label>input",
|
|
149
|
+
"text": "6977777777"
|
|
101
150
|
}
|
|
102
151
|
},
|
|
103
152
|
{
|
|
@@ -105,51 +154,187 @@
|
|
|
105
154
|
"args": {
|
|
106
155
|
"selector": "html>body>div:nth-child(5)>form>button"
|
|
107
156
|
}
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"id": "OCWrR7oFA3YV",
|
|
160
|
+
"title": "add 2 items"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"actions": [
|
|
164
|
+
{
|
|
165
|
+
"name": "type",
|
|
166
|
+
"args": {
|
|
167
|
+
"selector": "html>body",
|
|
168
|
+
"text": "hello"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "click",
|
|
173
|
+
"args": {
|
|
174
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
|
|
175
|
+
}
|
|
108
176
|
},
|
|
109
177
|
{
|
|
110
178
|
"name": "type",
|
|
111
179
|
"args": {
|
|
112
|
-
"selector": "
|
|
113
|
-
"text": "
|
|
180
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(1)>label>input",
|
|
181
|
+
"text": "150000496"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "type",
|
|
186
|
+
"args": {
|
|
187
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(2)>label>input",
|
|
188
|
+
"text": "Jon"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "type",
|
|
193
|
+
"args": {
|
|
194
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(3)>label>input",
|
|
195
|
+
"text": "Doe"
|
|
114
196
|
}
|
|
115
197
|
},
|
|
116
198
|
{
|
|
117
199
|
"name": "click",
|
|
118
200
|
"args": {
|
|
119
|
-
"selector": "
|
|
201
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "type",
|
|
206
|
+
"args": {
|
|
207
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(1)>label>input",
|
|
208
|
+
"text": "150000496"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "type",
|
|
213
|
+
"args": {
|
|
214
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(2)>label>input",
|
|
215
|
+
"text": "Mar"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "type",
|
|
220
|
+
"args": {
|
|
221
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(3)>label>input",
|
|
222
|
+
"text": "P"
|
|
120
223
|
}
|
|
121
224
|
},
|
|
122
225
|
{
|
|
123
226
|
"name": "click",
|
|
124
227
|
"args": {
|
|
125
|
-
"selector": "
|
|
228
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(3)>div>fieldset>button"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"name": "type",
|
|
233
|
+
"args": {
|
|
234
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(3)>label>input",
|
|
235
|
+
"text": "6977777777"
|
|
126
236
|
}
|
|
127
237
|
},
|
|
128
238
|
{
|
|
129
239
|
"name": "click",
|
|
130
240
|
"args": {
|
|
131
|
-
"selector": "
|
|
241
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"id": "8ZxUUjo0Yxnr",
|
|
246
|
+
"title": "add 2 items and remove 1"
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"digigov-form-fieldarray--with-exact-length": {
|
|
251
|
+
"actionSets": [
|
|
252
|
+
{
|
|
253
|
+
"actions": [
|
|
254
|
+
{
|
|
255
|
+
"name": "click",
|
|
256
|
+
"args": {
|
|
257
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "click",
|
|
262
|
+
"args": {
|
|
263
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"id": "WG3dAbfXa-Sn",
|
|
268
|
+
"title": "validation errors"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"actions": [
|
|
272
|
+
{
|
|
273
|
+
"name": "type",
|
|
274
|
+
"args": {
|
|
275
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(1)>label>input",
|
|
276
|
+
"text": "Hello"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "click",
|
|
281
|
+
"args": {
|
|
282
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
|
|
132
283
|
}
|
|
133
284
|
},
|
|
134
285
|
{
|
|
135
286
|
"name": "type",
|
|
136
287
|
"args": {
|
|
137
|
-
"selector": "
|
|
138
|
-
"text": "
|
|
288
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(1)>label>input",
|
|
289
|
+
"text": "150000496"
|
|
139
290
|
}
|
|
140
291
|
},
|
|
141
292
|
{
|
|
142
293
|
"name": "type",
|
|
143
294
|
"args": {
|
|
144
|
-
"selector": "
|
|
145
|
-
"text": "
|
|
295
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(2)>label>input",
|
|
296
|
+
"text": "Μάρω"
|
|
146
297
|
}
|
|
147
298
|
},
|
|
148
299
|
{
|
|
149
300
|
"name": "type",
|
|
150
301
|
"args": {
|
|
151
|
-
"selector": "
|
|
152
|
-
"text": "
|
|
302
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(3)>label>input",
|
|
303
|
+
"text": "Μενεξέ"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "click",
|
|
308
|
+
"args": {
|
|
309
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "type",
|
|
314
|
+
"args": {
|
|
315
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(1)>label>input",
|
|
316
|
+
"text": "150000496"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "type",
|
|
321
|
+
"args": {
|
|
322
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(2)>label>input",
|
|
323
|
+
"text": "Ηλέκτρα"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "type",
|
|
328
|
+
"args": {
|
|
329
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(3)>label>input",
|
|
330
|
+
"text": "Αποστόλου"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "type",
|
|
335
|
+
"args": {
|
|
336
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(3)>label>input",
|
|
337
|
+
"text": "6977654321"
|
|
153
338
|
}
|
|
154
339
|
},
|
|
155
340
|
{
|
|
@@ -159,8 +344,8 @@
|
|
|
159
344
|
}
|
|
160
345
|
}
|
|
161
346
|
],
|
|
162
|
-
"id": "
|
|
163
|
-
"title": "
|
|
347
|
+
"id": "-U0EryxXC-g7",
|
|
348
|
+
"title": "add exact length of items"
|
|
164
349
|
}
|
|
165
350
|
]
|
|
166
351
|
}
|
|
@@ -25,7 +25,7 @@ var fields = [{
|
|
|
25
25
|
key: 'string',
|
|
26
26
|
type: 'string',
|
|
27
27
|
label: {
|
|
28
|
-
primary: 'Πεδίο
|
|
28
|
+
primary: 'Πεδίο κειμένου',
|
|
29
29
|
secondary: 'Το multiplicity field είναι ένα πεδίο οπότε φαίνεται και είναι μέρος της φόρμας'
|
|
30
30
|
}
|
|
31
31
|
}, {
|
|
@@ -37,15 +37,20 @@ var fields = [{
|
|
|
37
37
|
},
|
|
38
38
|
extra: {
|
|
39
39
|
label: {
|
|
40
|
+
object: {
|
|
41
|
+
title: 'Συνυπογράφοντας',
|
|
42
|
+
add: 'Προσθήκη συνυπογράφοντα',
|
|
43
|
+
"delete": 'Αφαίρεση συνυπογράφοντος'
|
|
44
|
+
},
|
|
40
45
|
question: {
|
|
41
46
|
title: 'Θέλετε να προσθέσετε επιπλέον συνυπογράφοντες;',
|
|
47
|
+
objectLabel: {
|
|
48
|
+
primary: 'Προσθήκη νέου συνυπογράφοντα',
|
|
49
|
+
secondary: 'Συμπληρώστε τα στοιχεία και μετά πατήστε «Προσθήκη»'
|
|
50
|
+
},
|
|
42
51
|
yes: 'Ναι',
|
|
43
52
|
no: 'Όχι'
|
|
44
|
-
}
|
|
45
|
-
edit: 'Επεξεργασία',
|
|
46
|
-
add: 'Προσθέστε τα στοιχεία του επόμενου συνυπογράφοντα',
|
|
47
|
-
"delete": 'Αφαίρεση συνυπογράφοντος',
|
|
48
|
-
save: 'Αποθήκευση'
|
|
53
|
+
}
|
|
49
54
|
},
|
|
50
55
|
min: 2,
|
|
51
56
|
max: 4,
|
|
@@ -82,8 +87,8 @@ var fields = [{
|
|
|
82
87
|
type: 'phone_number',
|
|
83
88
|
required: true,
|
|
84
89
|
label: {
|
|
85
|
-
primary: '
|
|
86
|
-
secondary: '
|
|
90
|
+
primary: 'Σταθερό τηλέφωνο',
|
|
91
|
+
secondary: 'Συμπληρώστε τον αριθμό τηλεφώνου'
|
|
87
92
|
}
|
|
88
93
|
}];
|
|
89
94
|
|
|
@@ -25,7 +25,7 @@ var fields = [{
|
|
|
25
25
|
key: 'string',
|
|
26
26
|
type: 'string',
|
|
27
27
|
label: {
|
|
28
|
-
primary: 'Πεδίο
|
|
28
|
+
primary: 'Πεδίο κειμένου',
|
|
29
29
|
secondary: 'Το multiplicity field είναι ένα πεδίο οπότε φαίνεται και είναι μέρος της φόρμας'
|
|
30
30
|
}
|
|
31
31
|
}, {
|
|
@@ -37,15 +37,21 @@ var fields = [{
|
|
|
37
37
|
},
|
|
38
38
|
extra: {
|
|
39
39
|
label: {
|
|
40
|
+
object: {
|
|
41
|
+
title: 'Συνυπογράφοντας',
|
|
42
|
+
title_added: 'Οι συνυπογράφοντες που έχετε προσθέσει',
|
|
43
|
+
add: 'Προσθήκη',
|
|
44
|
+
"delete": 'Αφαίρεση συνυπογράφοντος'
|
|
45
|
+
},
|
|
40
46
|
question: {
|
|
41
47
|
title: 'Θέλετε να προσθέσετε επιπλέον συνυπογράφοντες;',
|
|
48
|
+
objectLabel: {
|
|
49
|
+
primary: 'Προσθήκη νέου συνυπογράφοντα',
|
|
50
|
+
secondary: 'Συμπληρώστε τα στοιχεία και μετά πατήστε «Προσθήκη»'
|
|
51
|
+
},
|
|
42
52
|
yes: 'Ναι',
|
|
43
53
|
no: 'Όχι'
|
|
44
|
-
}
|
|
45
|
-
edit: 'Επεξεργασία',
|
|
46
|
-
add: 'Προσθέστε τα στοιχεία του επόμενου συνυπογράφοντα',
|
|
47
|
-
"delete": 'Αφαίρεση συνυπογράφοντος',
|
|
48
|
-
save: 'Αποθήκευση'
|
|
54
|
+
}
|
|
49
55
|
},
|
|
50
56
|
length: 2,
|
|
51
57
|
of: {
|
|
@@ -81,8 +87,8 @@ var fields = [{
|
|
|
81
87
|
type: 'phone_number',
|
|
82
88
|
required: true,
|
|
83
89
|
label: {
|
|
84
|
-
primary: '
|
|
85
|
-
secondary: '
|
|
90
|
+
primary: 'Σταθερό τηλέφωνο',
|
|
91
|
+
secondary: 'Συμπληρώστε τον αριθμό τηλεφώνου σας'
|
|
86
92
|
}
|
|
87
93
|
}];
|
|
88
94
|
|
package/FieldArray/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var _FieldContainer = _interopRequireDefault(require("@digigov/form/Field/FieldC
|
|
|
28
28
|
var _excluded = ["name", "register", "control", "formState", "error", "layout", "label"];
|
|
29
29
|
|
|
30
30
|
var FieldArray = function FieldArray(_ref) {
|
|
31
|
-
var _customField$extra, _customField$extra4;
|
|
31
|
+
var _customField$extra, _customField$extra$la, _customField$extra4, _customField$extra4$l;
|
|
32
32
|
|
|
33
33
|
var name = _ref.name,
|
|
34
34
|
register = _ref.register,
|
|
@@ -53,7 +53,7 @@ var FieldArray = function FieldArray(_ref) {
|
|
|
53
53
|
error: formState.isSubmitted && !formState.isSubmitting && error !== null && error !== void 0 && error.message && error ? error : undefined,
|
|
54
54
|
wrapper: "fieldset",
|
|
55
55
|
name: name
|
|
56
|
-
}, fields.length === 0 && /*#__PURE__*/_react["default"].createElement(_ui.Hint, null, (_customField$extra = customField.extra) === null || _customField$extra === void 0 ? void 0 : _customField$extra.label.object.nothing_added), fields.map(function (field, index) {
|
|
56
|
+
}, fields.length === 0 && /*#__PURE__*/_react["default"].createElement(_ui.Hint, null, (_customField$extra = customField.extra) === null || _customField$extra === void 0 ? void 0 : (_customField$extra$la = _customField$extra.label.object) === null || _customField$extra$la === void 0 ? void 0 : _customField$extra$la.nothing_added), fields.map(function (field, index) {
|
|
57
57
|
var _customField$extra2, _customField$extra3;
|
|
58
58
|
|
|
59
59
|
return /*#__PURE__*/_react["default"].createElement(_ui.Card, {
|
|
@@ -79,7 +79,7 @@ var FieldArray = function FieldArray(_ref) {
|
|
|
79
79
|
ev.preventDefault();
|
|
80
80
|
append({});
|
|
81
81
|
}
|
|
82
|
-
}, (_customField$extra4 = customField.extra) === null || _customField$extra4 === void 0 ? void 0 : _customField$extra4.label.object.add));
|
|
82
|
+
}, (_customField$extra4 = customField.extra) === null || _customField$extra4 === void 0 ? void 0 : (_customField$extra4$l = _customField$extra4.label.object) === null || _customField$extra4$l === void 0 ? void 0 : _customField$extra4$l.add));
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
exports.FieldArray = FieldArray;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "4",
|
|
3
|
+
"stories": {
|
|
4
|
+
"digigov-form--int-field": {
|
|
5
|
+
"actionSets": [
|
|
6
|
+
{
|
|
7
|
+
"actions": [
|
|
8
|
+
{
|
|
9
|
+
"name": "click",
|
|
10
|
+
"args": {
|
|
11
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "type",
|
|
16
|
+
"args": {
|
|
17
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(1)>label>input",
|
|
18
|
+
"text": "2.2"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "click",
|
|
23
|
+
"args": {
|
|
24
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"id": "7wMj7iTumGC-",
|
|
29
|
+
"title": "Show validation errors"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"actions": [
|
|
33
|
+
{
|
|
34
|
+
"name": "keyboard.press",
|
|
35
|
+
"args": {
|
|
36
|
+
"key": "Tab"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "keyboard.press",
|
|
41
|
+
"args": {
|
|
42
|
+
"key": "Tab"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"id": "e7W6ZshKZmsE",
|
|
47
|
+
"title": "Focus with keyboard"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"actions": [
|
|
51
|
+
{
|
|
52
|
+
"name": "type",
|
|
53
|
+
"args": {
|
|
54
|
+
"selector": "html>body>div:nth-child(5)>form>div:nth-child(1)>label>input",
|
|
55
|
+
"text": "1"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "click",
|
|
60
|
+
"args": {
|
|
61
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"id": "DBqARxwPma5a",
|
|
66
|
+
"title": "Add number"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"digigov-form--auto-complete-field": {
|
|
71
|
+
"actionSets": [
|
|
72
|
+
{
|
|
73
|
+
"actions": [
|
|
74
|
+
{
|
|
75
|
+
"name": "keyboard.press",
|
|
76
|
+
"args": {
|
|
77
|
+
"key": "Tab"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "type",
|
|
82
|
+
"args": {
|
|
83
|
+
"selector": "html>body>div:nth-child(5)>form>div>label>div>input",
|
|
84
|
+
"text": "ch"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "keyboard.press",
|
|
89
|
+
"args": {
|
|
90
|
+
"key": "ArrowDown"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "keyboard.press",
|
|
95
|
+
"args": {
|
|
96
|
+
"key": "ArrowDown"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "keyboard.press",
|
|
101
|
+
"args": {
|
|
102
|
+
"key": "ArrowUp"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "keyboard.press",
|
|
107
|
+
"args": {
|
|
108
|
+
"key": "Enter"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"id": "14vEsPV7hizO",
|
|
113
|
+
"title": "flow with keyboard"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"actions": [
|
|
117
|
+
{
|
|
118
|
+
"name": "type",
|
|
119
|
+
"args": {
|
|
120
|
+
"selector": "html>body>div:nth-child(5)>form>div>label>div>input",
|
|
121
|
+
"text": "a"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "click",
|
|
126
|
+
"args": {
|
|
127
|
+
"selector": ".govgr-autocomplete__option:has-text(\"Akrotiri\")"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "click",
|
|
132
|
+
"args": {
|
|
133
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"id": "4a4faD_8O-1f",
|
|
138
|
+
"title": "flow with mouse"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|