@rolster/react-forms 19.1.0 → 19.2.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/cjs/index.js +46 -50
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +42 -44
- package/dist/es/index.js.map +1 -1
- package/dist/esm/form-array/form-array-control.js +7 -8
- package/dist/esm/form-array/form-array-control.js.map +1 -1
- package/dist/esm/form-array/form-array-group.js +21 -21
- package/dist/esm/form-array/form-array-group.js.map +1 -1
- package/dist/esm/form-array/form-array-list.js +3 -3
- package/dist/esm/form-array/form-array-list.js.map +1 -1
- package/dist/esm/form-array/form-array.js +12 -14
- package/dist/esm/form-array/form-array.js.map +1 -1
- package/dist/esm/form-control.js +2 -3
- package/dist/esm/form-control.js.map +1 -1
- package/dist/esm/form-group.js +3 -4
- package/dist/esm/form-group.js.map +1 -1
- package/dist/esm/form-ref.js +1 -1
- package/dist/esm/form-ref.js.map +1 -1
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +26 -18
- package/dist/esm/form-array/index.d.ts +0 -4
- package/dist/esm/form-array/index.js +0 -5
- package/dist/esm/form-array/index.js.map +0 -1
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createFormControlOptions, createFormGroupOptions, createFormArrayOptions } from '@rolster/forms/
|
|
2
|
-
import { controlIsValid, hasError, someErrors, groupIsValid, controlsAllChecked, controlsPartialChecked, controlsToValue, arrayIsValid, groupAllChecked, reduceControlsToArray } from '@rolster/forms/helpers';
|
|
1
|
+
import { createFormControlOptions, formControlIsValid, hasError, someErrors, createFormGroupOptions, formGroupIsValid, controlsToValue, verifyAllTrueInControls, verifyAnyTrueInControls, createFormArrayOptions, formArrayIsValid, verifyAllTrueInGroups, reduceControlsToArray } from '@rolster/forms/helpers';
|
|
3
2
|
import { v4 } from 'uuid';
|
|
4
3
|
import { useRef, useState, useEffect, useCallback, useMemo } from 'react';
|
|
5
4
|
|
|
@@ -41,7 +40,7 @@ class RolsterArrayControl {
|
|
|
41
40
|
setDefaultValue(value) {
|
|
42
41
|
if (value !== this.defaultValue) {
|
|
43
42
|
const errors = this.validators
|
|
44
|
-
?
|
|
43
|
+
? formControlIsValid({ value, validators: this.validators })
|
|
45
44
|
: [];
|
|
46
45
|
this.refresh('value', { errors, defaultValue: value, value });
|
|
47
46
|
}
|
|
@@ -49,7 +48,7 @@ class RolsterArrayControl {
|
|
|
49
48
|
setStartValue(value) {
|
|
50
49
|
if (value !== this.value) {
|
|
51
50
|
const errors = this.validators
|
|
52
|
-
?
|
|
51
|
+
? formControlIsValid({ value, validators: this.validators })
|
|
53
52
|
: [];
|
|
54
53
|
this.refresh('value', { errors, value });
|
|
55
54
|
}
|
|
@@ -57,14 +56,14 @@ class RolsterArrayControl {
|
|
|
57
56
|
setValue(value) {
|
|
58
57
|
if (value !== this.value) {
|
|
59
58
|
const errors = this.validators
|
|
60
|
-
?
|
|
59
|
+
? formControlIsValid({ value, validators: this.validators })
|
|
61
60
|
: [];
|
|
62
61
|
this.refresh('value', { dirty: true, errors, value });
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
setValidators(validators) {
|
|
66
65
|
const errors = validators
|
|
67
|
-
?
|
|
66
|
+
? formControlIsValid({ value: this.value, validators })
|
|
68
67
|
: [];
|
|
69
68
|
this.refresh('validators', { errors, validators });
|
|
70
69
|
}
|
|
@@ -79,7 +78,7 @@ class RolsterArrayControl {
|
|
|
79
78
|
}
|
|
80
79
|
reset() {
|
|
81
80
|
const errors = this.validators
|
|
82
|
-
?
|
|
81
|
+
? formControlIsValid({
|
|
83
82
|
value: this.defaultValue,
|
|
84
83
|
validators: this.validators
|
|
85
84
|
})
|
|
@@ -104,7 +103,7 @@ class RolsterArrayControl {
|
|
|
104
103
|
class ReactRolsterArrayControl extends RolsterArrayControl {
|
|
105
104
|
constructor(options) {
|
|
106
105
|
const { value, validators } = options;
|
|
107
|
-
const errors = validators ?
|
|
106
|
+
const errors = validators ? formControlIsValid({ value, validators }) : [];
|
|
108
107
|
super({ ...options, errors });
|
|
109
108
|
}
|
|
110
109
|
}
|
|
@@ -136,10 +135,10 @@ function replaceControl(controls, control) {
|
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
function refactorForValid$2(controls, validators) {
|
|
139
|
-
const errors = validators ?
|
|
138
|
+
const errors = validators ? formGroupIsValid({ controls, validators }) : [];
|
|
140
139
|
return {
|
|
141
140
|
errors,
|
|
142
|
-
valid: errors.length === 0 &&
|
|
141
|
+
valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid')
|
|
143
142
|
};
|
|
144
143
|
}
|
|
145
144
|
function refactorForControls$1(action, group, controls) {
|
|
@@ -147,26 +146,26 @@ function refactorForControls$1(action, group, controls) {
|
|
|
147
146
|
case 'focused':
|
|
148
147
|
case 'touched':
|
|
149
148
|
return {
|
|
150
|
-
touched:
|
|
151
|
-
toucheds:
|
|
149
|
+
touched: verifyAnyTrueInControls(controls, 'touched'),
|
|
150
|
+
toucheds: verifyAllTrueInControls(controls, 'touched')
|
|
152
151
|
};
|
|
153
152
|
case 'validators':
|
|
154
153
|
return refactorForValid$2(controls, group.validators);
|
|
155
154
|
case 'reset':
|
|
156
155
|
return {
|
|
157
156
|
...refactorForValid$2(controls, group.validators),
|
|
158
|
-
dirty:
|
|
159
|
-
dirties:
|
|
160
|
-
touched:
|
|
161
|
-
toucheds:
|
|
157
|
+
dirty: verifyAnyTrueInControls(controls, 'dirty'),
|
|
158
|
+
dirties: verifyAllTrueInControls(controls, 'dirty'),
|
|
159
|
+
touched: verifyAnyTrueInControls(controls, 'touched'),
|
|
160
|
+
toucheds: verifyAllTrueInControls(controls, 'touched'),
|
|
162
161
|
value: controlsToValue(controls)
|
|
163
162
|
};
|
|
164
163
|
case 'list':
|
|
165
164
|
case 'value':
|
|
166
165
|
return {
|
|
167
166
|
...refactorForValid$2(controls, group.validators),
|
|
168
|
-
dirty:
|
|
169
|
-
dirties:
|
|
167
|
+
dirty: verifyAnyTrueInControls(controls, 'dirty'),
|
|
168
|
+
dirties: verifyAllTrueInControls(controls, 'dirty'),
|
|
170
169
|
value: controlsToValue(controls)
|
|
171
170
|
};
|
|
172
171
|
default:
|
|
@@ -224,27 +223,27 @@ class RolsterArrayGroup {
|
|
|
224
223
|
class ReactRolsterArrayGroup extends RolsterArrayGroup {
|
|
225
224
|
constructor(options) {
|
|
226
225
|
const { controls, validators } = options;
|
|
227
|
-
const errors = validators ?
|
|
226
|
+
const errors = validators ? formGroupIsValid({ controls, validators }) : [];
|
|
228
227
|
super({
|
|
229
228
|
...options,
|
|
230
229
|
errors,
|
|
231
|
-
dirties:
|
|
232
|
-
dirty:
|
|
233
|
-
touched:
|
|
234
|
-
toucheds:
|
|
235
|
-
valid: errors.length === 0 &&
|
|
230
|
+
dirties: verifyAllTrueInControls(controls, 'dirty'),
|
|
231
|
+
dirty: verifyAnyTrueInControls(controls, 'dirty'),
|
|
232
|
+
touched: verifyAnyTrueInControls(controls, 'touched'),
|
|
233
|
+
toucheds: verifyAllTrueInControls(controls, 'touched'),
|
|
234
|
+
valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid'),
|
|
236
235
|
value: controlsToValue(controls)
|
|
237
236
|
});
|
|
238
237
|
}
|
|
239
238
|
}
|
|
240
|
-
function
|
|
239
|
+
function valueIsGroupOptions(options) {
|
|
241
240
|
return typeof options === 'object' && 'controls' in options;
|
|
242
241
|
}
|
|
243
242
|
function formArrayGroup(options, validators) {
|
|
244
|
-
const
|
|
243
|
+
const _uuid = valueIsGroupOptions(options) ? options.uuid || v4() : v4();
|
|
245
244
|
return new ReactRolsterArrayGroup({
|
|
246
245
|
...createFormGroupOptions(options, validators),
|
|
247
|
-
uuid:
|
|
246
|
+
uuid: _uuid
|
|
248
247
|
});
|
|
249
248
|
}
|
|
250
249
|
|
|
@@ -252,13 +251,13 @@ class RolsterArrayList extends RolsterArrayControl {
|
|
|
252
251
|
constructor(options) {
|
|
253
252
|
const { controls, valueToControls, validators } = options;
|
|
254
253
|
const value = controls.map(controlsToValue);
|
|
255
|
-
const errors = validators ?
|
|
254
|
+
const errors = validators ? formControlIsValid({ value, validators }) : [];
|
|
256
255
|
super({ ...options, errors, value });
|
|
257
256
|
this.valueToControls = valueToControls;
|
|
258
257
|
this.controls = controls;
|
|
259
258
|
this.valid =
|
|
260
259
|
errors.length === 0 &&
|
|
261
|
-
controls.reduce((valid, controls) => valid &&
|
|
260
|
+
controls.reduce((valid, controls) => valid && verifyAllTrueInControls(controls, 'valid'), true);
|
|
262
261
|
this.invalid = !this.valid;
|
|
263
262
|
this.wrong = this.touched && this.invalid;
|
|
264
263
|
controls.forEach((reactControls) => {
|
|
@@ -331,10 +330,10 @@ function formArrayList(options) {
|
|
|
331
330
|
}
|
|
332
331
|
|
|
333
332
|
function refactorForValid$1(groups, validators) {
|
|
334
|
-
const errors = validators ?
|
|
333
|
+
const errors = validators ? formArrayIsValid({ groups, validators }) : [];
|
|
335
334
|
return {
|
|
336
335
|
errors,
|
|
337
|
-
valid: errors.length === 0 &&
|
|
336
|
+
valid: errors.length === 0 && verifyAllTrueInGroups(groups, 'valid')
|
|
338
337
|
};
|
|
339
338
|
}
|
|
340
339
|
function refactorForGroups(groups, validators) {
|
|
@@ -359,20 +358,19 @@ function refactorForControls(action, state, groups) {
|
|
|
359
358
|
}
|
|
360
359
|
function useFormArray(options, validators) {
|
|
361
360
|
const formArray = createFormArrayOptions(options, validators);
|
|
362
|
-
const
|
|
363
|
-
const value = useRef(groups);
|
|
361
|
+
const defaultValue = useRef(formArray.groups || []);
|
|
364
362
|
const formGroups = useRef(new Map());
|
|
365
363
|
const [state, setState] = useState(() => {
|
|
366
364
|
return {
|
|
367
|
-
...refactorForValid$1(
|
|
368
|
-
controls:
|
|
365
|
+
...refactorForValid$1(defaultValue.current, formArray.validators),
|
|
366
|
+
controls: defaultValue.current.map(({ controls }) => controls),
|
|
369
367
|
dirty: false,
|
|
370
368
|
dirties: false,
|
|
371
369
|
disabled: false,
|
|
372
|
-
groups,
|
|
370
|
+
groups: defaultValue.current,
|
|
373
371
|
touched: false,
|
|
374
372
|
toucheds: false,
|
|
375
|
-
value:
|
|
373
|
+
value: defaultValue.current.map(({ controls }) => controlsToValue(controls)),
|
|
376
374
|
validators: formArray.validators
|
|
377
375
|
};
|
|
378
376
|
});
|
|
@@ -406,12 +404,12 @@ function useFormArray(options, validators) {
|
|
|
406
404
|
...refactorForGroups(groups, state.validators)
|
|
407
405
|
}));
|
|
408
406
|
}, []);
|
|
409
|
-
const
|
|
407
|
+
const setDefaultValue = useCallback((groups) => {
|
|
410
408
|
setState((state) => ({
|
|
411
409
|
...state,
|
|
412
410
|
...refactorForGroups(groups, state.validators)
|
|
413
411
|
}));
|
|
414
|
-
|
|
412
|
+
defaultValue.current = groups;
|
|
415
413
|
}, []);
|
|
416
414
|
const push = useCallback((group) => {
|
|
417
415
|
setState((state) => ({
|
|
@@ -450,7 +448,7 @@ function useFormArray(options, validators) {
|
|
|
450
448
|
const reset = useCallback(() => {
|
|
451
449
|
setState((state) => ({
|
|
452
450
|
...state,
|
|
453
|
-
...refactorForGroups(
|
|
451
|
+
...refactorForGroups(defaultValue.current, state.validators)
|
|
454
452
|
}));
|
|
455
453
|
}, []);
|
|
456
454
|
return {
|
|
@@ -468,7 +466,7 @@ function useFormArray(options, validators) {
|
|
|
468
466
|
push,
|
|
469
467
|
remove,
|
|
470
468
|
reset,
|
|
471
|
-
|
|
469
|
+
setDefaultValue,
|
|
472
470
|
setValidators,
|
|
473
471
|
setValue,
|
|
474
472
|
someErrors: someErrors$1,
|
|
@@ -479,7 +477,7 @@ function useFormArray(options, validators) {
|
|
|
479
477
|
}
|
|
480
478
|
|
|
481
479
|
function errorsInControl(value, validators) {
|
|
482
|
-
return validators ?
|
|
480
|
+
return validators ? formControlIsValid({ value, validators }) : [];
|
|
483
481
|
}
|
|
484
482
|
function useControl(options, validators) {
|
|
485
483
|
const formControl = createFormControlOptions(options, validators);
|
|
@@ -593,10 +591,10 @@ function useInputControl(options, validators) {
|
|
|
593
591
|
}
|
|
594
592
|
|
|
595
593
|
function refactorForValid(controls, validators) {
|
|
596
|
-
const errors = validators ?
|
|
594
|
+
const errors = validators ? formGroupIsValid({ controls, validators }) : [];
|
|
597
595
|
return {
|
|
598
596
|
errors,
|
|
599
|
-
valid: errors.length === 0 &&
|
|
597
|
+
valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid')
|
|
600
598
|
};
|
|
601
599
|
}
|
|
602
600
|
function checkAllSuccess(status) {
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../esm/form-array/form-array-control.js","../esm/utilities.js","../esm/form-array/form-array-group.js","../esm/form-array/form-array-list.js","../esm/form-array/form-array.js","../esm/form-control.js","../esm/form-group.js","../esm/helpers.js","../esm/hooks.js"],"sourcesContent":["import { createFormControlOptions } from '@rolster/forms/arguments';\nimport { controlIsValid, hasError, someErrors } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nexport class RolsterArrayControl {\n constructor(options) {\n this.uuid = options.uuid;\n this.defaultValue = options.defaultValue;\n this.value = options.value;\n this.focused = !!options.focused;\n this.unfocused = !this.focused;\n this.touched = !!options.touched;\n this.untouched = !this.touched;\n this.dirty = !!options.dirty;\n this.pristine = !this.dirty;\n this.disabled = !!options.disabled;\n this.enabled = !this.disabled;\n this.valid = this.isValid(options.errors);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n this.errors = options.errors;\n this.error = this.errors[0];\n this.validators = options.validators;\n }\n focus() {\n this.unfocused && this.refresh('focused', { focused: true });\n }\n blur() {\n this.focused && this.refresh('focused', { focused: false, touched: true });\n }\n disable() {\n this.enabled && this.refresh('disabled', { disabled: true });\n }\n enable() {\n this.disabled && this.refresh('disabled', { disabled: false });\n }\n touch() {\n this.untouched && this.refresh('touched', { touched: true });\n }\n setDefaultValue(value) {\n if (value !== this.defaultValue) {\n const errors = this.validators\n ? controlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { errors, defaultValue: value, value });\n }\n }\n setStartValue(value) {\n if (value !== this.value) {\n const errors = this.validators\n ? controlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { errors, value });\n }\n }\n setValue(value) {\n if (value !== this.value) {\n const errors = this.validators\n ? controlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { dirty: true, errors, value });\n }\n }\n setValidators(validators) {\n const errors = validators\n ? controlIsValid({ value: this.value, validators })\n : [];\n this.refresh('validators', { errors, validators });\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n const errors = this.validators\n ? controlIsValid({\n value: this.defaultValue,\n validators: this.validators\n })\n : [];\n this.refresh('reset', {\n dirty: false,\n errors,\n touched: false,\n value: this.defaultValue\n });\n }\n isValid(errors) {\n return errors.length === 0;\n }\n builder(options) {\n return new RolsterArrayControl({ ...this, ...options });\n }\n refresh(action, options) {\n this.subscriber && this.subscriber(action, this.builder(options));\n }\n}\nclass ReactRolsterArrayControl extends RolsterArrayControl {\n constructor(options) {\n const { value, validators } = options;\n const errors = validators ? controlIsValid({ value, validators }) : [];\n super({ ...options, errors });\n }\n}\nfunction rolsterArrayControl(options, validators) {\n const formControl = createFormControlOptions(options, validators);\n return new ReactRolsterArrayControl({\n ...formControl,\n defaultValue: formControl.value,\n uuid: uuid()\n });\n}\nexport function reactArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\nexport function formArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\nexport function inputArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\n//# sourceMappingURL=form-array-control.js.map","export function replaceControl(controls, control) {\n return Object.entries(controls).reduce((controls, [key, _control]) => {\n if (_control.uuid === control.uuid) {\n controls[key] = control;\n }\n return controls;\n }, controls);\n}\n//# sourceMappingURL=utilities.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { replaceControl } from '../utilities';\nfunction refactorForValid(controls, validators) {\n const errors = validators ? groupIsValid({ controls, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && controlsAllChecked(controls, 'valid')\n };\n}\nfunction refactorForControls(action, group, controls) {\n switch (action) {\n case 'focused':\n case 'touched':\n return {\n touched: controlsPartialChecked(controls, 'touched'),\n toucheds: controlsAllChecked(controls, 'touched')\n };\n case 'validators':\n return refactorForValid(controls, group.validators);\n case 'reset':\n return {\n ...refactorForValid(controls, group.validators),\n dirty: controlsPartialChecked(controls, 'dirty'),\n dirties: controlsAllChecked(controls, 'dirty'),\n touched: controlsPartialChecked(controls, 'touched'),\n toucheds: controlsAllChecked(controls, 'touched'),\n value: controlsToValue(controls)\n };\n case 'list':\n case 'value':\n return {\n ...refactorForValid(controls, group.validators),\n dirty: controlsPartialChecked(controls, 'dirty'),\n dirties: controlsAllChecked(controls, 'dirty'),\n value: controlsToValue(controls)\n };\n default:\n return {};\n }\n}\nexport class RolsterArrayGroup {\n constructor(options) {\n this.uuid = options.uuid;\n this.controls = options.controls;\n this.value = options.value;\n this.resource = options.resource;\n this.dirty = !!options.dirty;\n this.dirties = !!options.dirties;\n this.pristine = !this.dirty;\n this.pristines = !this.dirties;\n this.touched = !!options.touched;\n this.toucheds = !!options.toucheds;\n this.untouched = !this.touched;\n this.untoucheds = !this.toucheds;\n this.valid = !!options.valid;\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n this.errors = options.errors;\n this.error = this.errors[0];\n this.validators = options.validators;\n this.subscriberControl = (action, control) => {\n const controls = replaceControl(this.controls, control);\n this.refresh(action, {\n ...refactorForControls(action, this, controls),\n controls\n });\n };\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n Object.values(this.controls).forEach((control) => {\n control.subscribe(this.subscriberControl);\n });\n }\n setValidators(validators) {\n this.refresh('validators', {\n ...refactorForValid(this.controls, validators),\n validators\n });\n }\n setResource(resource) {\n this.refresh('resource', { resource });\n }\n refresh(action, options) {\n this.subscriber &&\n this.subscriber(action, new RolsterArrayGroup({ ...this, ...options }));\n }\n}\nclass ReactRolsterArrayGroup extends RolsterArrayGroup {\n constructor(options) {\n const { controls, validators } = options;\n const errors = validators ? groupIsValid({ controls, validators }) : [];\n super({\n ...options,\n errors,\n dirties: controlsAllChecked(controls, 'dirty'),\n dirty: controlsPartialChecked(controls, 'dirty'),\n touched: controlsPartialChecked(controls, 'touched'),\n toucheds: controlsAllChecked(controls, 'touched'),\n valid: errors.length === 0 && controlsAllChecked(controls, 'valid'),\n value: controlsToValue(controls)\n });\n }\n}\nfunction groupIsOptions(options) {\n return typeof options === 'object' && 'controls' in options;\n}\nexport function formArrayGroup(options, validators) {\n const groupUuid = groupIsOptions(options) ? options.uuid || uuid() : uuid();\n return new ReactRolsterArrayGroup({\n ...createFormGroupOptions(options, validators),\n uuid: groupUuid\n });\n}\n//# sourceMappingURL=form-array-group.js.map","import { controlIsValid, controlsAllChecked, controlsToValue } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { replaceControl } from '../utilities';\nimport { RolsterArrayControl } from './form-array-control';\nclass RolsterArrayList extends RolsterArrayControl {\n constructor(options) {\n const { controls, valueToControls, validators } = options;\n const value = controls.map(controlsToValue);\n const errors = validators ? controlIsValid({ value, validators }) : [];\n super({ ...options, errors, value });\n this.valueToControls = valueToControls;\n this.controls = controls;\n this.valid =\n errors.length === 0 &&\n controls.reduce((valid, controls) => valid && controlsAllChecked(controls, 'valid'), true);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n controls.forEach((reactControls) => {\n this._subscribe(reactControls);\n });\n }\n setDefaultValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls),\n defaultValue: value\n });\n }\n setStartValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls)\n });\n }\n setValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls),\n dirty: true\n });\n }\n reset() {\n this.refresh('list', {\n controls: this.defaultValue.map(this.valueToControls),\n dirty: false,\n touched: false\n });\n }\n push(controls) {\n this.refresh('list', {\n controls: [...this.controls, controls]\n });\n }\n remove(controls) {\n this.refresh('list', {\n controls: this.controls.filter((_controls) => _controls !== controls)\n });\n }\n builder(options) {\n return new RolsterArrayList({\n ...this,\n ...options,\n valueToControls: this.valueToControls\n });\n }\n refresh(action, options) {\n super.refresh(action, options);\n }\n _subscribe(reactControls) {\n Object.values(reactControls).forEach((control) => {\n control.subscribe((action, _control) => {\n const _reactControls = this.controls.map((_controls) => reactControls !== _controls\n ? _controls\n : replaceControl(reactControls, _control));\n this.refresh(action, { controls: _reactControls });\n });\n });\n }\n}\nexport function formArrayList(options) {\n const value = options?.value || [];\n return new RolsterArrayList({\n ...options,\n controls: value.map((value) => options.valueToControls(value)),\n defaultValue: value,\n uuid: uuid()\n });\n}\n//# sourceMappingURL=form-array-list.js.map","import { createFormArrayOptions } from '@rolster/forms/arguments';\nimport { arrayIsValid, controlsToValue, groupAllChecked, hasError as rolsterHasError, someErrors as rolsterSomeErrors } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nfunction refactorForValid(groups, validators) {\n const errors = validators ? arrayIsValid({ groups, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && groupAllChecked(groups, 'valid')\n };\n}\nfunction refactorForGroups(groups, validators) {\n return {\n ...refactorForValid(groups, validators),\n groups,\n controls: groups.map(({ controls }) => controls),\n value: groups.map(({ controls }) => controlsToValue(controls))\n };\n}\nfunction refactorForControls(action, state, groups) {\n switch (action) {\n case 'validators':\n return refactorForValid(groups, state.validators);\n case 'reset':\n case 'list':\n case 'value':\n return refactorForGroups(groups, state.validators);\n default:\n return { groups };\n }\n}\nexport function useFormArray(options, validators) {\n const formArray = createFormArrayOptions(options, validators);\n const groups = formArray.groups || [];\n const value = useRef(groups);\n const formGroups = useRef(new Map());\n const [state, setState] = useState(() => {\n return {\n ...refactorForValid(groups, formArray.validators),\n controls: groups.map(({ controls }) => controls),\n dirty: false,\n dirties: false,\n disabled: false,\n groups,\n touched: false,\n toucheds: false,\n value: groups.map(({ controls }) => controlsToValue(controls)),\n validators: formArray.validators\n };\n });\n useEffect(() => {\n formGroups.current.clear();\n state.groups.forEach((group) => {\n formGroups.current.set(group.uuid, group);\n group.subscribe(subscriber);\n });\n }, [state.groups]);\n const subscriber = useCallback((action, group) => {\n setState((state) => {\n const groups = state.groups.map((currentGroup) => {\n return currentGroup.uuid === group.uuid ? group : currentGroup;\n });\n return {\n ...state,\n ...refactorForControls(action, state, groups)\n };\n });\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const setValue = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(groups, state.validators)\n }));\n }, []);\n const setInitialValue = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(groups, state.validators)\n }));\n value.current = groups;\n }, []);\n const push = useCallback((group) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups([...state.groups, group], state.validators)\n }));\n }, []);\n const merge = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups([...state.groups, ...groups], state.validators)\n }));\n }, []);\n const remove = useCallback(({ uuid }) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(state.groups.filter((group) => group.uuid !== uuid), state.validators)\n }));\n }, []);\n const findByUuid = useCallback((uuid) => {\n return formGroups.current.get(uuid);\n }, [state.groups]);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.groups, validators),\n validators\n }));\n }, []);\n const hasError = useCallback((key) => {\n return rolsterHasError(state.errors, key);\n }, [state.errors]);\n const someErrors = useCallback((keys) => {\n return rolsterSomeErrors(state.errors, keys);\n }, [state.errors]);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(value.current, state.validators)\n }));\n }, []);\n return {\n ...state,\n disable,\n enable,\n enabled: !state.disabled,\n error: state.errors[0],\n findByUuid,\n hasError,\n invalid: !state.valid,\n merge,\n pristine: !state.dirty,\n pristines: !state.dirties,\n push,\n remove,\n reset,\n setInitialValue,\n setValidators,\n setValue,\n someErrors,\n untouched: !state.touched,\n untoucheds: !state.toucheds,\n wrong: state.touched && !state.valid\n };\n}\n//# sourceMappingURL=form-array.js.map","import { createFormControlOptions } from '@rolster/forms/arguments';\nimport { controlIsValid, hasError as rolsterHasError, someErrors as rolsterSomeErrors } from '@rolster/forms/helpers';\nimport { useCallback, useRef, useState } from 'react';\nfunction errorsInControl(value, validators) {\n return validators ? controlIsValid({ value, validators }) : [];\n}\nfunction useControl(options, validators) {\n const formControl = createFormControlOptions(options, validators);\n const defaultValue = useRef(formControl.value);\n const [state, setState] = useState(() => {\n return {\n dirty: false,\n disabled: false,\n errors: errorsInControl(formControl.value, formControl.validators),\n focused: false,\n touched: !!formControl.touched,\n value: formControl.value,\n validators: formControl.validators\n };\n });\n const elementRef = useRef(null);\n const focus = useCallback(() => {\n setState((state) => ({ ...state, focused: true }));\n }, []);\n const blur = useCallback(() => {\n setState((state) => ({ ...state, focused: false, touched: true }));\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const touch = useCallback(() => {\n setState((state) => ({ ...state, touched: true }));\n }, []);\n const setDefaultValue = useCallback((value) => {\n defaultValue.current = value;\n setState((state) => ({\n ...state,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setStartValue = useCallback((value) => {\n setState((state) => ({\n ...state,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setValue = useCallback((value) => {\n setState((state) => ({\n ...state,\n dirty: true,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n errors: errorsInControl(state.value, validators),\n validators\n }));\n }, []);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n dirty: false,\n errors: errorsInControl(defaultValue.current, state.validators),\n value: defaultValue.current,\n touched: false\n }));\n }, []);\n const hasError = useCallback((key) => {\n return rolsterHasError(state.errors, key);\n }, [state.errors]);\n const someErrors = useCallback((keys) => {\n return rolsterSomeErrors(state.errors, keys);\n }, [state.errors]);\n const valid = state.errors.length === 0;\n return {\n ...state,\n blur,\n disable,\n elementRef,\n enable,\n enabled: !state.disabled,\n error: state.errors[0],\n focus,\n hasError,\n invalid: !valid,\n pristine: !state.dirty,\n reset,\n setDefaultValue,\n setStartValue,\n setValidators,\n setValue,\n someErrors,\n touch,\n unfocused: !state.focused,\n untouched: !state.touched,\n valid,\n wrong: state.touched && !valid\n };\n}\nexport function useReactControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useFormControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useInputControl(options, validators) {\n return useControl(options, validators);\n}\n//# sourceMappingURL=form-control.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\nimport { controlsAllChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nfunction refactorForValid(controls, validators) {\n const errors = validators ? groupIsValid({ controls, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && controlsAllChecked(controls, 'valid')\n };\n}\nfunction checkAllSuccess(status) {\n return status.reduce((success, status) => success && status, true);\n}\nfunction checkPartialSuccess(status) {\n return status.reduce((success, status) => success || status, false);\n}\nexport function useFormGroup(options, validators) {\n const formGroup = createFormGroupOptions(options, validators);\n const formInitialized = useRef({\n dirty: false,\n touched: false,\n value: false,\n visual: false\n });\n const formGroupStatus = useMemo(() => {\n const dirty = [];\n const touched = [];\n const value = [];\n const visual = [];\n Object.values(formGroup.controls).forEach((control) => {\n dirty.push(control.dirty);\n touched.push(control.touched);\n value.push(control.value);\n visual.push(control.disabled);\n visual.push(control.focused);\n });\n return {\n dirty,\n touched,\n value,\n visual\n };\n }, [formGroup.controls]);\n const [state, setState] = useState(() => {\n return {\n ...refactorForValid(formGroup.controls, formGroup.validators),\n controls: formGroup.controls,\n dirties: checkAllSuccess(formGroupStatus.dirty),\n dirty: checkPartialSuccess(formGroupStatus.dirty),\n touched: checkPartialSuccess(formGroupStatus.touched),\n toucheds: checkAllSuccess(formGroupStatus.touched),\n validators: formGroup.validators,\n value: controlsToValue(formGroup.controls)\n };\n });\n useEffect(() => {\n if (formInitialized.current.value) {\n setState((state) => ({\n ...state,\n ...refactorForValid(formGroup.controls, state.validators),\n controls: formGroup.controls,\n value: controlsToValue(formGroup.controls)\n }));\n }\n else {\n formInitialized.current.value = true;\n }\n }, formGroupStatus.value);\n useEffect(() => {\n if (formInitialized.current.dirty) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n dirty: checkPartialSuccess(formGroupStatus.dirty),\n dirties: checkAllSuccess(formGroupStatus.dirty)\n }));\n }\n else {\n formInitialized.current.dirty = true;\n }\n }, formGroupStatus.dirty);\n useEffect(() => {\n if (formInitialized.current.touched) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n touched: checkPartialSuccess(formGroupStatus.touched),\n toucheds: checkAllSuccess(formGroupStatus.touched)\n }));\n }\n else {\n formInitialized.current.touched = true;\n }\n }, formGroupStatus.touched);\n useEffect(() => {\n if (formInitialized.current.visual) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls\n }));\n }\n else {\n formInitialized.current.visual = true;\n }\n }, formGroupStatus.visual);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.controls, validators)\n }));\n }, []);\n const reset = useCallback(() => {\n Object.values(formGroup.controls).forEach((control) => {\n control.reset();\n });\n }, []);\n return {\n ...state,\n error: state.errors[0],\n invalid: !state.valid,\n pristine: !state.dirty,\n pristines: !state.dirties,\n reset,\n setValidators,\n untouched: !state.touched,\n untoucheds: !state.toucheds,\n wrong: state.touched && !state.valid\n };\n}\n//# sourceMappingURL=form-group.js.map","import { reduceControlsToArray } from '@rolster/forms/helpers';\nexport function reduceControlsToValues(controls) {\n return reduceControlsToArray(controls, 'value');\n}\nexport function reduceGroupToValues(group) {\n return reduceControlsToValues(group.controls);\n}\n//# sourceMappingURL=helpers.js.map","import { useMemo, useState } from 'react';\nexport function useFormArrayGroupSelect({ formArray }) {\n const [formSelect, setFormGroup] = useState();\n const formGroup = useMemo(() => {\n return (formSelect &&\n formArray.groups.find(({ uuid }) => formSelect.uuid === uuid));\n }, [formArray.value, formSelect]);\n return { formGroup, setFormGroup };\n}\n//# sourceMappingURL=hooks.js.map"],"names":["uuid","refactorForValid","refactorForControls","hasError","rolsterHasError","someErrors","rolsterSomeErrors"],"mappings":";;;;;AAGO,MAAM,mBAAmB,CAAC;AACjC,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AACjC,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AACjD,QAAQ,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACnC,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;AACzC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;AACvC,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;AACzC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;AACvC,QAAQ,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AACrC,QAAQ,IAAI,CAAC,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AC,MAAM;AACpC,QAAQ,QAAQ,UAAU;AAC1B,YAAY,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE;AAC3E,KAAK,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AACtC,IAAI,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACvC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../esm/form-array/form-array-control.js","../esm/utilities.js","../esm/form-array/form-array-group.js","../esm/form-array/form-array-list.js","../esm/form-array/form-array.js","../esm/form-control.js","../esm/form-group.js","../esm/helpers.js","../esm/hooks.js"],"sourcesContent":["import { createFormControlOptions, formControlIsValid, hasError, someErrors } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nexport class RolsterArrayControl {\n constructor(options) {\n this.uuid = options.uuid;\n this.defaultValue = options.defaultValue;\n this.value = options.value;\n this.focused = !!options.focused;\n this.unfocused = !this.focused;\n this.touched = !!options.touched;\n this.untouched = !this.touched;\n this.dirty = !!options.dirty;\n this.pristine = !this.dirty;\n this.disabled = !!options.disabled;\n this.enabled = !this.disabled;\n this.valid = this.isValid(options.errors);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n this.errors = options.errors;\n this.error = this.errors[0];\n this.validators = options.validators;\n }\n focus() {\n this.unfocused && this.refresh('focused', { focused: true });\n }\n blur() {\n this.focused && this.refresh('focused', { focused: false, touched: true });\n }\n disable() {\n this.enabled && this.refresh('disabled', { disabled: true });\n }\n enable() {\n this.disabled && this.refresh('disabled', { disabled: false });\n }\n touch() {\n this.untouched && this.refresh('touched', { touched: true });\n }\n setDefaultValue(value) {\n if (value !== this.defaultValue) {\n const errors = this.validators\n ? formControlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { errors, defaultValue: value, value });\n }\n }\n setStartValue(value) {\n if (value !== this.value) {\n const errors = this.validators\n ? formControlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { errors, value });\n }\n }\n setValue(value) {\n if (value !== this.value) {\n const errors = this.validators\n ? formControlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { dirty: true, errors, value });\n }\n }\n setValidators(validators) {\n const errors = validators\n ? formControlIsValid({ value: this.value, validators })\n : [];\n this.refresh('validators', { errors, validators });\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n const errors = this.validators\n ? formControlIsValid({\n value: this.defaultValue,\n validators: this.validators\n })\n : [];\n this.refresh('reset', {\n dirty: false,\n errors,\n touched: false,\n value: this.defaultValue\n });\n }\n isValid(errors) {\n return errors.length === 0;\n }\n builder(options) {\n return new RolsterArrayControl({ ...this, ...options });\n }\n refresh(action, options) {\n this.subscriber && this.subscriber(action, this.builder(options));\n }\n}\nclass ReactRolsterArrayControl extends RolsterArrayControl {\n constructor(options) {\n const { value, validators } = options;\n const errors = validators ? formControlIsValid({ value, validators }) : [];\n super({ ...options, errors });\n }\n}\nfunction rolsterArrayControl(options, validators) {\n const formControl = createFormControlOptions(options, validators);\n return new ReactRolsterArrayControl({\n ...formControl,\n defaultValue: formControl.value,\n uuid: uuid()\n });\n}\nexport function reactArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\nexport function formArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\nexport function inputArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\n//# sourceMappingURL=form-array-control.js.map","export function replaceControl(controls, control) {\n return Object.entries(controls).reduce((controls, [key, _control]) => {\n if (_control.uuid === control.uuid) {\n controls[key] = control;\n }\n return controls;\n }, controls);\n}\n//# sourceMappingURL=utilities.js.map","import { createFormGroupOptions } from '@rolster/forms/helpers';\nimport { controlsToValue, formGroupIsValid, verifyAllTrueInControls, verifyAnyTrueInControls } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { replaceControl } from '../utilities';\nfunction refactorForValid(controls, validators) {\n const errors = validators ? formGroupIsValid({ controls, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid')\n };\n}\nfunction refactorForControls(action, group, controls) {\n switch (action) {\n case 'focused':\n case 'touched':\n return {\n touched: verifyAnyTrueInControls(controls, 'touched'),\n toucheds: verifyAllTrueInControls(controls, 'touched')\n };\n case 'validators':\n return refactorForValid(controls, group.validators);\n case 'reset':\n return {\n ...refactorForValid(controls, group.validators),\n dirty: verifyAnyTrueInControls(controls, 'dirty'),\n dirties: verifyAllTrueInControls(controls, 'dirty'),\n touched: verifyAnyTrueInControls(controls, 'touched'),\n toucheds: verifyAllTrueInControls(controls, 'touched'),\n value: controlsToValue(controls)\n };\n case 'list':\n case 'value':\n return {\n ...refactorForValid(controls, group.validators),\n dirty: verifyAnyTrueInControls(controls, 'dirty'),\n dirties: verifyAllTrueInControls(controls, 'dirty'),\n value: controlsToValue(controls)\n };\n default:\n return {};\n }\n}\nexport class RolsterArrayGroup {\n constructor(options) {\n this.uuid = options.uuid;\n this.controls = options.controls;\n this.value = options.value;\n this.resource = options.resource;\n this.dirty = !!options.dirty;\n this.dirties = !!options.dirties;\n this.pristine = !this.dirty;\n this.pristines = !this.dirties;\n this.touched = !!options.touched;\n this.toucheds = !!options.toucheds;\n this.untouched = !this.touched;\n this.untoucheds = !this.toucheds;\n this.valid = !!options.valid;\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n this.errors = options.errors;\n this.error = this.errors[0];\n this.validators = options.validators;\n this.subscriberControl = (action, control) => {\n const controls = replaceControl(this.controls, control);\n this.refresh(action, {\n ...refactorForControls(action, this, controls),\n controls\n });\n };\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n Object.values(this.controls).forEach((control) => {\n control.subscribe(this.subscriberControl);\n });\n }\n setValidators(validators) {\n this.refresh('validators', {\n ...refactorForValid(this.controls, validators),\n validators\n });\n }\n setResource(resource) {\n this.refresh('resource', { resource });\n }\n refresh(action, options) {\n this.subscriber &&\n this.subscriber(action, new RolsterArrayGroup({ ...this, ...options }));\n }\n}\nclass ReactRolsterArrayGroup extends RolsterArrayGroup {\n constructor(options) {\n const { controls, validators } = options;\n const errors = validators ? formGroupIsValid({ controls, validators }) : [];\n super({\n ...options,\n errors,\n dirties: verifyAllTrueInControls(controls, 'dirty'),\n dirty: verifyAnyTrueInControls(controls, 'dirty'),\n touched: verifyAnyTrueInControls(controls, 'touched'),\n toucheds: verifyAllTrueInControls(controls, 'touched'),\n valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid'),\n value: controlsToValue(controls)\n });\n }\n}\nfunction valueIsGroupOptions(options) {\n return typeof options === 'object' && 'controls' in options;\n}\nexport function formArrayGroup(options, validators) {\n const _uuid = valueIsGroupOptions(options) ? options.uuid || uuid() : uuid();\n return new ReactRolsterArrayGroup({\n ...createFormGroupOptions(options, validators),\n uuid: _uuid\n });\n}\n//# sourceMappingURL=form-array-group.js.map","import { controlsToValue, formControlIsValid, verifyAllTrueInControls } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { replaceControl } from '../utilities';\nimport { RolsterArrayControl } from './form-array-control';\nclass RolsterArrayList extends RolsterArrayControl {\n constructor(options) {\n const { controls, valueToControls, validators } = options;\n const value = controls.map(controlsToValue);\n const errors = validators ? formControlIsValid({ value, validators }) : [];\n super({ ...options, errors, value });\n this.valueToControls = valueToControls;\n this.controls = controls;\n this.valid =\n errors.length === 0 &&\n controls.reduce((valid, controls) => valid && verifyAllTrueInControls(controls, 'valid'), true);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n controls.forEach((reactControls) => {\n this._subscribe(reactControls);\n });\n }\n setDefaultValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls),\n defaultValue: value\n });\n }\n setStartValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls)\n });\n }\n setValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls),\n dirty: true\n });\n }\n reset() {\n this.refresh('list', {\n controls: this.defaultValue.map(this.valueToControls),\n dirty: false,\n touched: false\n });\n }\n push(controls) {\n this.refresh('list', {\n controls: [...this.controls, controls]\n });\n }\n remove(controls) {\n this.refresh('list', {\n controls: this.controls.filter((_controls) => _controls !== controls)\n });\n }\n builder(options) {\n return new RolsterArrayList({\n ...this,\n ...options,\n valueToControls: this.valueToControls\n });\n }\n refresh(action, options) {\n super.refresh(action, options);\n }\n _subscribe(reactControls) {\n Object.values(reactControls).forEach((control) => {\n control.subscribe((action, _control) => {\n const _reactControls = this.controls.map((_controls) => reactControls !== _controls\n ? _controls\n : replaceControl(reactControls, _control));\n this.refresh(action, { controls: _reactControls });\n });\n });\n }\n}\nexport function formArrayList(options) {\n const value = options?.value || [];\n return new RolsterArrayList({\n ...options,\n controls: value.map((value) => options.valueToControls(value)),\n defaultValue: value,\n uuid: uuid()\n });\n}\n//# sourceMappingURL=form-array-list.js.map","import { controlsToValue, createFormArrayOptions, formArrayIsValid, hasError as rolsterHasError, someErrors as rolsterSomeErrors, verifyAllTrueInGroups } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nfunction refactorForValid(groups, validators) {\n const errors = validators ? formArrayIsValid({ groups, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && verifyAllTrueInGroups(groups, 'valid')\n };\n}\nfunction refactorForGroups(groups, validators) {\n return {\n ...refactorForValid(groups, validators),\n groups,\n controls: groups.map(({ controls }) => controls),\n value: groups.map(({ controls }) => controlsToValue(controls))\n };\n}\nfunction refactorForControls(action, state, groups) {\n switch (action) {\n case 'validators':\n return refactorForValid(groups, state.validators);\n case 'reset':\n case 'list':\n case 'value':\n return refactorForGroups(groups, state.validators);\n default:\n return { groups };\n }\n}\nexport function useFormArray(options, validators) {\n const formArray = createFormArrayOptions(options, validators);\n const defaultValue = useRef(formArray.groups || []);\n const formGroups = useRef(new Map());\n const [state, setState] = useState(() => {\n return {\n ...refactorForValid(defaultValue.current, formArray.validators),\n controls: defaultValue.current.map(({ controls }) => controls),\n dirty: false,\n dirties: false,\n disabled: false,\n groups: defaultValue.current,\n touched: false,\n toucheds: false,\n value: defaultValue.current.map(({ controls }) => controlsToValue(controls)),\n validators: formArray.validators\n };\n });\n useEffect(() => {\n formGroups.current.clear();\n state.groups.forEach((group) => {\n formGroups.current.set(group.uuid, group);\n group.subscribe(subscriber);\n });\n }, [state.groups]);\n const subscriber = useCallback((action, group) => {\n setState((state) => {\n const groups = state.groups.map((currentGroup) => {\n return currentGroup.uuid === group.uuid ? group : currentGroup;\n });\n return {\n ...state,\n ...refactorForControls(action, state, groups)\n };\n });\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const setValue = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(groups, state.validators)\n }));\n }, []);\n const setDefaultValue = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(groups, state.validators)\n }));\n defaultValue.current = groups;\n }, []);\n const push = useCallback((group) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups([...state.groups, group], state.validators)\n }));\n }, []);\n const merge = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups([...state.groups, ...groups], state.validators)\n }));\n }, []);\n const remove = useCallback(({ uuid }) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(state.groups.filter((group) => group.uuid !== uuid), state.validators)\n }));\n }, []);\n const findByUuid = useCallback((uuid) => {\n return formGroups.current.get(uuid);\n }, [state.groups]);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.groups, validators),\n validators\n }));\n }, []);\n const hasError = useCallback((key) => {\n return rolsterHasError(state.errors, key);\n }, [state.errors]);\n const someErrors = useCallback((keys) => {\n return rolsterSomeErrors(state.errors, keys);\n }, [state.errors]);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(defaultValue.current, state.validators)\n }));\n }, []);\n return {\n ...state,\n disable,\n enable,\n enabled: !state.disabled,\n error: state.errors[0],\n findByUuid,\n hasError,\n invalid: !state.valid,\n merge,\n pristine: !state.dirty,\n pristines: !state.dirties,\n push,\n remove,\n reset,\n setDefaultValue,\n setValidators,\n setValue,\n someErrors,\n untouched: !state.touched,\n untoucheds: !state.toucheds,\n wrong: state.touched && !state.valid\n };\n}\n//# sourceMappingURL=form-array.js.map","import { createFormControlOptions, formControlIsValid, hasError as rolsterHasError, someErrors as rolsterSomeErrors } from '@rolster/forms/helpers';\nimport { useCallback, useRef, useState } from 'react';\nfunction errorsInControl(value, validators) {\n return validators ? formControlIsValid({ value, validators }) : [];\n}\nfunction useControl(options, validators) {\n const formControl = createFormControlOptions(options, validators);\n const defaultValue = useRef(formControl.value);\n const [state, setState] = useState(() => {\n return {\n dirty: false,\n disabled: false,\n errors: errorsInControl(formControl.value, formControl.validators),\n focused: false,\n touched: !!formControl.touched,\n value: formControl.value,\n validators: formControl.validators\n };\n });\n const elementRef = useRef(null);\n const focus = useCallback(() => {\n setState((state) => ({ ...state, focused: true }));\n }, []);\n const blur = useCallback(() => {\n setState((state) => ({ ...state, focused: false, touched: true }));\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const touch = useCallback(() => {\n setState((state) => ({ ...state, touched: true }));\n }, []);\n const setDefaultValue = useCallback((value) => {\n defaultValue.current = value;\n setState((state) => ({\n ...state,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setStartValue = useCallback((value) => {\n setState((state) => ({\n ...state,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setValue = useCallback((value) => {\n setState((state) => ({\n ...state,\n dirty: true,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n errors: errorsInControl(state.value, validators),\n validators\n }));\n }, []);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n dirty: false,\n errors: errorsInControl(defaultValue.current, state.validators),\n value: defaultValue.current,\n touched: false\n }));\n }, []);\n const hasError = useCallback((key) => {\n return rolsterHasError(state.errors, key);\n }, [state.errors]);\n const someErrors = useCallback((keys) => {\n return rolsterSomeErrors(state.errors, keys);\n }, [state.errors]);\n const valid = state.errors.length === 0;\n return {\n ...state,\n blur,\n disable,\n elementRef,\n enable,\n enabled: !state.disabled,\n error: state.errors[0],\n focus,\n hasError,\n invalid: !valid,\n pristine: !state.dirty,\n reset,\n setDefaultValue,\n setStartValue,\n setValidators,\n setValue,\n someErrors,\n touch,\n unfocused: !state.focused,\n untouched: !state.touched,\n valid,\n wrong: state.touched && !valid\n };\n}\nexport function useReactControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useFormControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useInputControl(options, validators) {\n return useControl(options, validators);\n}\n//# sourceMappingURL=form-control.js.map","import { controlsToValue, createFormGroupOptions, formGroupIsValid, verifyAllTrueInControls } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nfunction refactorForValid(controls, validators) {\n const errors = validators ? formGroupIsValid({ controls, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid')\n };\n}\nfunction checkAllSuccess(status) {\n return status.reduce((success, status) => success && status, true);\n}\nfunction checkPartialSuccess(status) {\n return status.reduce((success, status) => success || status, false);\n}\nexport function useFormGroup(options, validators) {\n const formGroup = createFormGroupOptions(options, validators);\n const formInitialized = useRef({\n dirty: false,\n touched: false,\n value: false,\n visual: false\n });\n const formGroupStatus = useMemo(() => {\n const dirty = [];\n const touched = [];\n const value = [];\n const visual = [];\n Object.values(formGroup.controls).forEach((control) => {\n dirty.push(control.dirty);\n touched.push(control.touched);\n value.push(control.value);\n visual.push(control.disabled);\n visual.push(control.focused);\n });\n return {\n dirty,\n touched,\n value,\n visual\n };\n }, [formGroup.controls]);\n const [state, setState] = useState(() => {\n return {\n ...refactorForValid(formGroup.controls, formGroup.validators),\n controls: formGroup.controls,\n dirties: checkAllSuccess(formGroupStatus.dirty),\n dirty: checkPartialSuccess(formGroupStatus.dirty),\n touched: checkPartialSuccess(formGroupStatus.touched),\n toucheds: checkAllSuccess(formGroupStatus.touched),\n validators: formGroup.validators,\n value: controlsToValue(formGroup.controls)\n };\n });\n useEffect(() => {\n if (formInitialized.current.value) {\n setState((state) => ({\n ...state,\n ...refactorForValid(formGroup.controls, state.validators),\n controls: formGroup.controls,\n value: controlsToValue(formGroup.controls)\n }));\n }\n else {\n formInitialized.current.value = true;\n }\n }, formGroupStatus.value);\n useEffect(() => {\n if (formInitialized.current.dirty) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n dirty: checkPartialSuccess(formGroupStatus.dirty),\n dirties: checkAllSuccess(formGroupStatus.dirty)\n }));\n }\n else {\n formInitialized.current.dirty = true;\n }\n }, formGroupStatus.dirty);\n useEffect(() => {\n if (formInitialized.current.touched) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n touched: checkPartialSuccess(formGroupStatus.touched),\n toucheds: checkAllSuccess(formGroupStatus.touched)\n }));\n }\n else {\n formInitialized.current.touched = true;\n }\n }, formGroupStatus.touched);\n useEffect(() => {\n if (formInitialized.current.visual) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls\n }));\n }\n else {\n formInitialized.current.visual = true;\n }\n }, formGroupStatus.visual);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.controls, validators)\n }));\n }, []);\n const reset = useCallback(() => {\n Object.values(formGroup.controls).forEach((control) => {\n control.reset();\n });\n }, []);\n return {\n ...state,\n error: state.errors[0],\n invalid: !state.valid,\n pristine: !state.dirty,\n pristines: !state.dirties,\n reset,\n setValidators,\n untouched: !state.touched,\n untoucheds: !state.toucheds,\n wrong: state.touched && !state.valid\n };\n}\n//# sourceMappingURL=form-group.js.map","import { reduceControlsToArray } from '@rolster/forms/helpers';\nexport function reduceControlsToValues(controls) {\n return reduceControlsToArray(controls, 'value');\n}\nexport function reduceGroupToValues(group) {\n return reduceControlsToValues(group.controls);\n}\n//# sourceMappingURL=helpers.js.map","import { useMemo, useState } from 'react';\nexport function useFormArrayGroupSelect({ formArray }) {\n const [formSelect, setFormGroup] = useState();\n const formGroup = useMemo(() => {\n return (formSelect &&\n formArray.groups.find(({ uuid }) => formSelect.uuid === uuid));\n }, [formArray.value, formSelect]);\n return { formGroup, setFormGroup };\n}\n//# sourceMappingURL=hooks.js.map"],"names":["uuid","refactorForValid","refactorForControls","hasError","rolsterHasError","someErrors","rolsterSomeErrors"],"mappings":";;;;AAEO,MAAM,mBAAmB,CAAC;AACjC,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI;AAChC,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY;AAChD,QAAQ,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK;AAClC,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO;AACxC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO;AACtC,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO;AACxC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO;AACtC,QAAQ,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK;AACpC,QAAQ,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK;AACnC,QAAQ,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ;AAC1C,QAA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KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9B,QAAQ,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK;AAC7B,QAAQ,QAAQ,EAAE,CAAC,KAAK,CAAC,KAAK;AAC9B,QAAQ,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO;AACjC,QAAQ,KAAK;AACb,QAAQ,aAAa;AACrB,QAAQ,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO;AACjC,QAAQ,UAAU,EAAE,CAAC,KAAK,CAAC,QAAQ;AACnC,QAAQ,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC;AACvC,KAAK;AACL;;AC9HO,SAAS,sBAAsB,CAAC,QAAQ,EAAE;AACjD,IAAI,OAAO,qBAAqB,CAAC,QAAQ,EAAE,OAAO,CAAC;AACnD;AACO,SAAS,mBAAmB,CAAC,KAAK,EAAE;AAC3C,IAAI,OAAO,sBAAsB,CAAC,KAAK,CAAC,QAAQ,CAAC;AACjD;;ACLO,SAAS,uBAAuB,CAAC,EAAE,SAAS,EAAE,EAAE;AACvD,IAAI,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAE;AACjD,IAAI,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM;AACpC,QAAQ,QAAQ,UAAU;AAC1B,YAAY,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC;AACzE,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACrC,IAAI,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE;AACtC;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createFormControlOptions } from '@rolster/forms/
|
|
2
|
-
import { controlIsValid, hasError, someErrors } from '@rolster/forms/helpers';
|
|
1
|
+
import { createFormControlOptions, formControlIsValid, hasError, someErrors } from '@rolster/forms/helpers';
|
|
3
2
|
import { v4 as uuid } from 'uuid';
|
|
4
3
|
export class RolsterArrayControl {
|
|
5
4
|
constructor(options) {
|
|
@@ -39,7 +38,7 @@ export class RolsterArrayControl {
|
|
|
39
38
|
setDefaultValue(value) {
|
|
40
39
|
if (value !== this.defaultValue) {
|
|
41
40
|
const errors = this.validators
|
|
42
|
-
?
|
|
41
|
+
? formControlIsValid({ value, validators: this.validators })
|
|
43
42
|
: [];
|
|
44
43
|
this.refresh('value', { errors, defaultValue: value, value });
|
|
45
44
|
}
|
|
@@ -47,7 +46,7 @@ export class RolsterArrayControl {
|
|
|
47
46
|
setStartValue(value) {
|
|
48
47
|
if (value !== this.value) {
|
|
49
48
|
const errors = this.validators
|
|
50
|
-
?
|
|
49
|
+
? formControlIsValid({ value, validators: this.validators })
|
|
51
50
|
: [];
|
|
52
51
|
this.refresh('value', { errors, value });
|
|
53
52
|
}
|
|
@@ -55,14 +54,14 @@ export class RolsterArrayControl {
|
|
|
55
54
|
setValue(value) {
|
|
56
55
|
if (value !== this.value) {
|
|
57
56
|
const errors = this.validators
|
|
58
|
-
?
|
|
57
|
+
? formControlIsValid({ value, validators: this.validators })
|
|
59
58
|
: [];
|
|
60
59
|
this.refresh('value', { dirty: true, errors, value });
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
setValidators(validators) {
|
|
64
63
|
const errors = validators
|
|
65
|
-
?
|
|
64
|
+
? formControlIsValid({ value: this.value, validators })
|
|
66
65
|
: [];
|
|
67
66
|
this.refresh('validators', { errors, validators });
|
|
68
67
|
}
|
|
@@ -77,7 +76,7 @@ export class RolsterArrayControl {
|
|
|
77
76
|
}
|
|
78
77
|
reset() {
|
|
79
78
|
const errors = this.validators
|
|
80
|
-
?
|
|
79
|
+
? formControlIsValid({
|
|
81
80
|
value: this.defaultValue,
|
|
82
81
|
validators: this.validators
|
|
83
82
|
})
|
|
@@ -102,7 +101,7 @@ export class RolsterArrayControl {
|
|
|
102
101
|
class ReactRolsterArrayControl extends RolsterArrayControl {
|
|
103
102
|
constructor(options) {
|
|
104
103
|
const { value, validators } = options;
|
|
105
|
-
const errors = validators ?
|
|
104
|
+
const errors = validators ? formControlIsValid({ value, validators }) : [];
|
|
106
105
|
super({ ...options, errors });
|
|
107
106
|
}
|
|
108
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-array-control.js","sourceRoot":"","sources":["../../../src/form-array/form-array-control.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"form-array-control.js","sourceRoot":"","sources":["../../../src/form-array/form-array-control.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACX,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAiBlC,MAAM,OAAO,mBAAmB;IA0C9B,YAAY,OAA+B;QACzC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACnC,IAA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