@rolster/react-forms 18.13.1 → 19.0.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 +45 -46
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +45 -46
- package/dist/es/index.js.map +1 -1
- package/dist/esm/form-array/form-array-control.js +3 -3
- package/dist/esm/form-array/form-array-control.js.map +1 -1
- package/dist/esm/form-array/form-array.js +11 -11
- package/dist/esm/form-array/form-array.js.map +1 -1
- package/dist/esm/form-control.js +6 -6
- package/dist/esm/form-control.js.map +1 -1
- package/dist/esm/form-group.js +25 -26
- package/dist/esm/form-group.js.map +1 -1
- package/dist/esm/form-ref.js +8 -9
- package/dist/esm/form-ref.js.map +1 -1
- package/package.json +5 -5
package/dist/es/index.js
CHANGED
|
@@ -110,10 +110,10 @@ class ReactRolsterArrayControl extends RolsterArrayControl {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
function rolsterArrayControl(options, validators) {
|
|
113
|
-
const
|
|
113
|
+
const formControl = createFormControlOptions(options, validators);
|
|
114
114
|
return new ReactRolsterArrayControl({
|
|
115
|
-
...
|
|
116
|
-
initialValue:
|
|
115
|
+
...formControl,
|
|
116
|
+
initialValue: formControl.value,
|
|
117
117
|
uuid: v4()
|
|
118
118
|
});
|
|
119
119
|
}
|
|
@@ -351,12 +351,12 @@ function refactorForControls(action, state, groups) {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
function useFormArray(options, validators) {
|
|
354
|
-
const
|
|
355
|
-
const groups =
|
|
356
|
-
const
|
|
357
|
-
const
|
|
354
|
+
const formArray = createFormArrayOptions(options, validators);
|
|
355
|
+
const groups = formArray.groups || [];
|
|
356
|
+
const value = useRef(groups);
|
|
357
|
+
const formGroups = useRef(new Map());
|
|
358
358
|
const [state, setState] = useState({
|
|
359
|
-
...refactorForValid$1(groups,
|
|
359
|
+
...refactorForValid$1(groups, formArray.validators),
|
|
360
360
|
controls: groups.map(({ controls }) => controls),
|
|
361
361
|
dirty: false,
|
|
362
362
|
dirties: false,
|
|
@@ -365,13 +365,13 @@ function useFormArray(options, validators) {
|
|
|
365
365
|
touched: false,
|
|
366
366
|
toucheds: false,
|
|
367
367
|
value: groups.map(({ controls }) => controlsToValue(controls)),
|
|
368
|
-
validators:
|
|
368
|
+
validators: formArray.validators
|
|
369
369
|
});
|
|
370
370
|
useEffect(() => {
|
|
371
|
-
|
|
371
|
+
formGroups.current.clear();
|
|
372
372
|
state.groups.forEach((group) => {
|
|
373
|
+
formGroups.current.set(group.uuid, group);
|
|
373
374
|
group.subscribe(subscriber);
|
|
374
|
-
groupsMap.current.set(group.uuid, group);
|
|
375
375
|
});
|
|
376
376
|
}, [state.groups]);
|
|
377
377
|
const subscriber = useCallback((action, group) => {
|
|
@@ -402,7 +402,7 @@ function useFormArray(options, validators) {
|
|
|
402
402
|
...state,
|
|
403
403
|
...refactorForGroups(groups, state.validators)
|
|
404
404
|
}));
|
|
405
|
-
|
|
405
|
+
value.current = groups;
|
|
406
406
|
}, []);
|
|
407
407
|
const push = useCallback((group) => {
|
|
408
408
|
setState((state) => ({
|
|
@@ -423,7 +423,7 @@ function useFormArray(options, validators) {
|
|
|
423
423
|
}));
|
|
424
424
|
}, []);
|
|
425
425
|
const findByUuid = useCallback((uuid) => {
|
|
426
|
-
return
|
|
426
|
+
return formGroups.current.get(uuid);
|
|
427
427
|
}, [state.groups]);
|
|
428
428
|
const setValidators = useCallback((validators) => {
|
|
429
429
|
setState((state) => ({
|
|
@@ -437,7 +437,7 @@ function useFormArray(options, validators) {
|
|
|
437
437
|
const reset = useCallback(() => {
|
|
438
438
|
setState((state) => ({
|
|
439
439
|
...state,
|
|
440
|
-
...refactorForGroups(
|
|
440
|
+
...refactorForGroups(value.current, state.validators)
|
|
441
441
|
}));
|
|
442
442
|
}, []);
|
|
443
443
|
return {
|
|
@@ -469,16 +469,16 @@ function errorsInControl(value, validators) {
|
|
|
469
469
|
return validators ? controlIsValid({ value, validators }) : [];
|
|
470
470
|
}
|
|
471
471
|
function useControl(options, validators) {
|
|
472
|
-
const
|
|
473
|
-
const initialValue = useRef(
|
|
472
|
+
const formControl = createFormControlOptions(options, validators);
|
|
473
|
+
const initialValue = useRef(formControl.value);
|
|
474
474
|
const [state, setState] = useState({
|
|
475
475
|
dirty: false,
|
|
476
476
|
disabled: false,
|
|
477
|
-
errors: errorsInControl(
|
|
477
|
+
errors: errorsInControl(formControl.value, formControl.validators),
|
|
478
478
|
focused: false,
|
|
479
|
-
touched: !!
|
|
480
|
-
value:
|
|
481
|
-
validators:
|
|
479
|
+
touched: !!formControl.touched,
|
|
480
|
+
value: formControl.value,
|
|
481
|
+
validators: formControl.validators
|
|
482
482
|
});
|
|
483
483
|
const elementRef = useRef(null);
|
|
484
484
|
const focus = useCallback(() => {
|
|
@@ -574,8 +574,7 @@ function refactorForValid(controls, validators) {
|
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
576
|
function useFormGroup(options, validators) {
|
|
577
|
-
const
|
|
578
|
-
const { controls } = _options;
|
|
577
|
+
const formGroup = createFormGroupOptions(options, validators);
|
|
579
578
|
const firstEffects = useRef({
|
|
580
579
|
dirty: true,
|
|
581
580
|
disabledFocused: true,
|
|
@@ -583,68 +582,68 @@ function useFormGroup(options, validators) {
|
|
|
583
582
|
value: true
|
|
584
583
|
});
|
|
585
584
|
const [state, setState] = useState({
|
|
586
|
-
...refactorForValid(controls,
|
|
587
|
-
controls,
|
|
588
|
-
dirties: controlsAllChecked(controls, 'dirty'),
|
|
589
|
-
dirty: controlsPartialChecked(controls, 'dirty'),
|
|
590
|
-
touched: controlsPartialChecked(controls, 'touched'),
|
|
591
|
-
toucheds: controlsAllChecked(controls, 'touched'),
|
|
592
|
-
value: controlsToValue(controls),
|
|
593
|
-
validators:
|
|
585
|
+
...refactorForValid(formGroup.controls, formGroup.validators),
|
|
586
|
+
controls: formGroup.controls,
|
|
587
|
+
dirties: controlsAllChecked(formGroup.controls, 'dirty'),
|
|
588
|
+
dirty: controlsPartialChecked(formGroup.controls, 'dirty'),
|
|
589
|
+
touched: controlsPartialChecked(formGroup.controls, 'touched'),
|
|
590
|
+
toucheds: controlsAllChecked(formGroup.controls, 'touched'),
|
|
591
|
+
value: controlsToValue(formGroup.controls),
|
|
592
|
+
validators: formGroup.validators
|
|
594
593
|
});
|
|
595
594
|
useEffect(() => {
|
|
596
595
|
if (!firstEffects.current.value) {
|
|
597
596
|
setState((state) => ({
|
|
598
597
|
...state,
|
|
599
|
-
...refactorForValid(controls, state.validators),
|
|
600
|
-
controls,
|
|
601
|
-
value: controlsToValue(controls)
|
|
598
|
+
...refactorForValid(formGroup.controls, state.validators),
|
|
599
|
+
controls: formGroup.controls,
|
|
600
|
+
value: controlsToValue(formGroup.controls)
|
|
602
601
|
}));
|
|
603
602
|
}
|
|
604
603
|
else {
|
|
605
604
|
firstEffects.current.value = false;
|
|
606
605
|
}
|
|
607
|
-
}, reduceControlsToArray(controls, 'value'));
|
|
606
|
+
}, reduceControlsToArray(formGroup.controls, 'value'));
|
|
608
607
|
useEffect(() => {
|
|
609
608
|
if (!firstEffects.current.disabledFocused) {
|
|
610
609
|
setState((state) => ({
|
|
611
610
|
...state,
|
|
612
|
-
controls
|
|
611
|
+
controls: formGroup.controls
|
|
613
612
|
}));
|
|
614
613
|
}
|
|
615
614
|
else {
|
|
616
615
|
firstEffects.current.disabledFocused = false;
|
|
617
616
|
}
|
|
618
617
|
}, [
|
|
619
|
-
...reduceControlsToArray(controls, 'disabled'),
|
|
620
|
-
...reduceControlsToArray(controls, 'focused')
|
|
618
|
+
...reduceControlsToArray(formGroup.controls, 'disabled'),
|
|
619
|
+
...reduceControlsToArray(formGroup.controls, 'focused')
|
|
621
620
|
]);
|
|
622
621
|
useEffect(() => {
|
|
623
622
|
if (!firstEffects.current.dirty) {
|
|
624
623
|
setState((state) => ({
|
|
625
624
|
...state,
|
|
626
|
-
controls,
|
|
627
|
-
dirty: controlsPartialChecked(controls, 'dirty'),
|
|
628
|
-
dirties: controlsAllChecked(controls, 'dirty')
|
|
625
|
+
controls: formGroup.controls,
|
|
626
|
+
dirty: controlsPartialChecked(formGroup.controls, 'dirty'),
|
|
627
|
+
dirties: controlsAllChecked(formGroup.controls, 'dirty')
|
|
629
628
|
}));
|
|
630
629
|
}
|
|
631
630
|
else {
|
|
632
631
|
firstEffects.current.dirty = false;
|
|
633
632
|
}
|
|
634
|
-
}, reduceControlsToArray(controls, 'dirty'));
|
|
633
|
+
}, reduceControlsToArray(formGroup.controls, 'dirty'));
|
|
635
634
|
useEffect(() => {
|
|
636
635
|
if (!firstEffects.current.touched) {
|
|
637
636
|
setState((state) => ({
|
|
638
637
|
...state,
|
|
639
|
-
controls,
|
|
640
|
-
touched: controlsPartialChecked(controls, 'touched'),
|
|
641
|
-
toucheds: controlsAllChecked(controls, 'touched')
|
|
638
|
+
controls: formGroup.controls,
|
|
639
|
+
touched: controlsPartialChecked(formGroup.controls, 'touched'),
|
|
640
|
+
toucheds: controlsAllChecked(formGroup.controls, 'touched')
|
|
642
641
|
}));
|
|
643
642
|
}
|
|
644
643
|
else {
|
|
645
644
|
firstEffects.current.touched = false;
|
|
646
645
|
}
|
|
647
|
-
}, reduceControlsToArray(controls, 'touched'));
|
|
646
|
+
}, reduceControlsToArray(formGroup.controls, 'touched'));
|
|
648
647
|
const setValidators = useCallback((validators) => {
|
|
649
648
|
setState((state) => ({
|
|
650
649
|
...state,
|
|
@@ -652,7 +651,7 @@ function useFormGroup(options, validators) {
|
|
|
652
651
|
}));
|
|
653
652
|
}, []);
|
|
654
653
|
const reset = useCallback(() => {
|
|
655
|
-
Object.values(controls).forEach((control) => {
|
|
654
|
+
Object.values(formGroup.controls).forEach((control) => {
|
|
656
655
|
control.reset();
|
|
657
656
|
});
|
|
658
657
|
}, []);
|
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.value = options.value;\n this.initialValue = options.initialValue;\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 setInitialValue(value) {\n if (value !== this.initialValue) {\n const errors = this.validators\n ? controlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', {\n dirty: false,\n errors,\n initialValue: value,\n value\n });\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', {\n dirty: true,\n errors,\n value\n });\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.initialValue,\n validators: this.validators\n })\n : [];\n this.refresh('reset', {\n dirty: false,\n errors,\n touched: false,\n value: this.initialValue\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 _options = createFormControlOptions(options, validators);\n return new ReactRolsterArrayControl({\n ..._options,\n initialValue: _options.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 value: controlsToValue(controls),\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 });\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((controls) => controlsToValue(controls));\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 setInitialValue(value) {\n this.refresh('list', {\n controls: value.map((value) => this.valueToControls(value)),\n initialValue: value\n });\n }\n setValue(value) {\n this.refresh('list', {\n controls: value.map((value) => this.valueToControls(value))\n });\n }\n reset() {\n this.refresh('list', {\n controls: this.initialValue.map((value) => this.valueToControls(value))\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 initialValue: 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 _options = createFormArrayOptions(options, validators);\n const groups = _options.groups || [];\n const _value = useRef(groups);\n const groupsMap = useRef(new Map());\n const [state, setState] = useState({\n ...refactorForValid(groups, _options.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: _options.validators\n });\n useEffect(() => {\n groupsMap.current.clear();\n state.groups.forEach((group) => {\n group.subscribe(subscriber);\n groupsMap.current.set(group.uuid, group);\n });\n }, [state.groups]);\n const subscriber = useCallback((action, group) => {\n setState((state) => {\n const groups = state.groups.map((_group) => {\n return _group.uuid === group.uuid ? group : _group;\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 groupsMap.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) => rolsterHasError(state.errors, key), [state.errors]);\n const someErrors = useCallback((keys) => rolsterSomeErrors(state.errors, keys), [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 _options = createFormControlOptions(options, validators);\n const initialValue = useRef(_options.value);\n const [state, setState] = useState({\n dirty: false,\n disabled: false,\n errors: errorsInControl(_options.value, _options.validators),\n focused: false,\n touched: !!_options.touched,\n value: _options.value,\n validators: _options.validators\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 setInitialValue = useCallback((value) => {\n initialValue.current = value;\n setState((state) => ({\n ...state,\n dirty: true,\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(initialValue.current, state.validators),\n value: initialValue.current,\n touched: false\n }));\n }, []);\n const hasError = useCallback((key) => rolsterHasError(state.errors, key), [state.errors]);\n const someErrors = useCallback((keys) => rolsterSomeErrors(state.errors, keys), [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 setInitialValue,\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, controlsPartialChecked, controlsToValue, groupIsValid, reduceControlsToArray } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, 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}\nexport function useFormGroup(options, validators) {\n const _options = createFormGroupOptions(options, validators);\n const { controls } = _options;\n const firstEffects = useRef({\n dirty: true,\n disabledFocused: true,\n touched: true,\n value: true\n });\n const [state, setState] = useState({\n ...refactorForValid(controls, _options.validators),\n controls,\n dirties: controlsAllChecked(controls, 'dirty'),\n dirty: controlsPartialChecked(controls, 'dirty'),\n touched: controlsPartialChecked(controls, 'touched'),\n toucheds: controlsAllChecked(controls, 'touched'),\n value: controlsToValue(controls),\n validators: _options.validators\n });\n useEffect(() => {\n if (!firstEffects.current.value) {\n setState((state) => ({\n ...state,\n ...refactorForValid(controls, state.validators),\n controls,\n value: controlsToValue(controls)\n }));\n }\n else {\n firstEffects.current.value = false;\n }\n }, reduceControlsToArray(controls, 'value'));\n useEffect(() => {\n if (!firstEffects.current.disabledFocused) {\n setState((state) => ({\n ...state,\n controls\n }));\n }\n else {\n firstEffects.current.disabledFocused = false;\n }\n }, [\n ...reduceControlsToArray(controls, 'disabled'),\n ...reduceControlsToArray(controls, 'focused')\n ]);\n useEffect(() => {\n if (!firstEffects.current.dirty) {\n setState((state) => ({\n ...state,\n controls,\n dirty: controlsPartialChecked(controls, 'dirty'),\n dirties: controlsAllChecked(controls, 'dirty')\n }));\n }\n else {\n firstEffects.current.dirty = false;\n }\n }, reduceControlsToArray(controls, 'dirty'));\n useEffect(() => {\n if (!firstEffects.current.touched) {\n setState((state) => ({\n ...state,\n controls,\n touched: controlsPartialChecked(controls, 'touched'),\n toucheds: controlsAllChecked(controls, 'touched')\n }));\n }\n else {\n firstEffects.current.touched = false;\n }\n }, reduceControlsToArray(controls, 'touched'));\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.controls, validators)\n }));\n }, []);\n const reset = useCallback(() => {\n Object.values(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,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACnC,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AACjD,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,CA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Q,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,KAAK;AAC5C,KAAK,CAAC;AACN;;ACxGO,SAAS,sBAAsB,CAAC,QAAQ,EAAE;AACjD,IAAI,OAAO,qBAAqB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AACM,SAAS,mBAAmB,CAAC,KAAK,EAAE;AAC3C,IAAI,OAAO,sBAAsB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClD;;ACLO,SAAS,uBAAuB,CAAC,EAAE,SAAS,EAAE,EAAE;AACvD,IAAI,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAE,CAAC;AAClD,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,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 } 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.value = options.value;\n this.initialValue = options.initialValue;\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 setInitialValue(value) {\n if (value !== this.initialValue) {\n const errors = this.validators\n ? controlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', {\n dirty: false,\n errors,\n initialValue: value,\n value\n });\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', {\n dirty: true,\n errors,\n value\n });\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.initialValue,\n validators: this.validators\n })\n : [];\n this.refresh('reset', {\n dirty: false,\n errors,\n touched: false,\n value: this.initialValue\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 initialValue: 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 value: controlsToValue(controls),\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 });\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((controls) => controlsToValue(controls));\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 setInitialValue(value) {\n this.refresh('list', {\n controls: value.map((value) => this.valueToControls(value)),\n initialValue: value\n });\n }\n setValue(value) {\n this.refresh('list', {\n controls: value.map((value) => this.valueToControls(value))\n });\n }\n reset() {\n this.refresh('list', {\n controls: this.initialValue.map((value) => this.valueToControls(value))\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 initialValue: 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 ...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 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((_group) => {\n return _group.uuid === group.uuid ? group : _group;\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) => rolsterHasError(state.errors, key), [state.errors]);\n const someErrors = useCallback((keys) => rolsterSomeErrors(state.errors, keys), [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 initialValue = useRef(formControl.value);\n const [state, setState] = useState({\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 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 setInitialValue = useCallback((value) => {\n initialValue.current = value;\n setState((state) => ({\n ...state,\n dirty: true,\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(initialValue.current, state.validators),\n value: initialValue.current,\n touched: false\n }));\n }, []);\n const hasError = useCallback((key) => rolsterHasError(state.errors, key), [state.errors]);\n const someErrors = useCallback((keys) => rolsterSomeErrors(state.errors, keys), [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 setInitialValue,\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, controlsPartialChecked, controlsToValue, groupIsValid, reduceControlsToArray } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, 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}\nexport function useFormGroup(options, validators) {\n const formGroup = createFormGroupOptions(options, validators);\n const firstEffects = useRef({\n dirty: true,\n disabledFocused: true,\n touched: true,\n value: true\n });\n const [state, setState] = useState({\n ...refactorForValid(formGroup.controls, formGroup.validators),\n controls: formGroup.controls,\n dirties: controlsAllChecked(formGroup.controls, 'dirty'),\n dirty: controlsPartialChecked(formGroup.controls, 'dirty'),\n touched: controlsPartialChecked(formGroup.controls, 'touched'),\n toucheds: controlsAllChecked(formGroup.controls, 'touched'),\n value: controlsToValue(formGroup.controls),\n validators: formGroup.validators\n });\n useEffect(() => {\n if (!firstEffects.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 firstEffects.current.value = false;\n }\n }, reduceControlsToArray(formGroup.controls, 'value'));\n useEffect(() => {\n if (!firstEffects.current.disabledFocused) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls\n }));\n }\n else {\n firstEffects.current.disabledFocused = false;\n }\n }, [\n ...reduceControlsToArray(formGroup.controls, 'disabled'),\n ...reduceControlsToArray(formGroup.controls, 'focused')\n ]);\n useEffect(() => {\n if (!firstEffects.current.dirty) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n dirty: controlsPartialChecked(formGroup.controls, 'dirty'),\n dirties: controlsAllChecked(formGroup.controls, 'dirty')\n }));\n }\n else {\n firstEffects.current.dirty = false;\n }\n }, reduceControlsToArray(formGroup.controls, 'dirty'));\n useEffect(() => {\n if (!firstEffects.current.touched) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n touched: controlsPartialChecked(formGroup.controls, 'touched'),\n toucheds: controlsAllChecked(formGroup.controls, 'touched')\n }));\n }\n else {\n firstEffects.current.touched = false;\n }\n }, reduceControlsToArray(formGroup.controls, 'touched'));\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,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACnC,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AACjD,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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,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,KAAK;AAC5C,KAAK,CAAC;AACN;;ACvGO,SAAS,sBAAsB,CAAC,QAAQ,EAAE;AACjD,IAAI,OAAO,qBAAqB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AACM,SAAS,mBAAmB,CAAC,KAAK,EAAE;AAC3C,IAAI,OAAO,sBAAsB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClD;;ACLO,SAAS,uBAAuB,CAAC,EAAE,SAAS,EAAE,EAAE;AACvD,IAAI,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAE,CAAC;AAClD,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,EAAE;AAC3E,KAAK,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AACtC,IAAI,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACvC;;;;"}
|
|
@@ -108,10 +108,10 @@ class ReactRolsterArrayControl extends RolsterArrayControl {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
function rolsterArrayControl(options, validators) {
|
|
111
|
-
const
|
|
111
|
+
const formControl = createFormControlOptions(options, validators);
|
|
112
112
|
return new ReactRolsterArrayControl({
|
|
113
|
-
...
|
|
114
|
-
initialValue:
|
|
113
|
+
...formControl,
|
|
114
|
+
initialValue: formControl.value,
|
|
115
115
|
uuid: uuid()
|
|
116
116
|
});
|
|
117
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-array-control.js","sourceRoot":"","sources":["../../../src/form-array/form-array-control.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAG9E,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAiBlC,MAAM,OAAO,mBAAmB;IAyC9B,YAAY,OAA+B;QACzC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,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,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1C,I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AO,EAAE,UAAU,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -29,12 +29,12 @@ function refactorForControls(action, state, groups) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
export function useFormArray(options, validators) {
|
|
32
|
-
const
|
|
33
|
-
const groups =
|
|
34
|
-
const
|
|
35
|
-
const
|
|
32
|
+
const formArray = createFormArrayOptions(options, validators);
|
|
33
|
+
const groups = formArray.groups || [];
|
|
34
|
+
const value = useRef(groups);
|
|
35
|
+
const formGroups = useRef(new Map());
|
|
36
36
|
const [state, setState] = useState({
|
|
37
|
-
...refactorForValid(groups,
|
|
37
|
+
...refactorForValid(groups, formArray.validators),
|
|
38
38
|
controls: groups.map(({ controls }) => controls),
|
|
39
39
|
dirty: false,
|
|
40
40
|
dirties: false,
|
|
@@ -43,13 +43,13 @@ export function useFormArray(options, validators) {
|
|
|
43
43
|
touched: false,
|
|
44
44
|
toucheds: false,
|
|
45
45
|
value: groups.map(({ controls }) => controlsToValue(controls)),
|
|
46
|
-
validators:
|
|
46
|
+
validators: formArray.validators
|
|
47
47
|
});
|
|
48
48
|
useEffect(() => {
|
|
49
|
-
|
|
49
|
+
formGroups.current.clear();
|
|
50
50
|
state.groups.forEach((group) => {
|
|
51
|
+
formGroups.current.set(group.uuid, group);
|
|
51
52
|
group.subscribe(subscriber);
|
|
52
|
-
groupsMap.current.set(group.uuid, group);
|
|
53
53
|
});
|
|
54
54
|
}, [state.groups]);
|
|
55
55
|
const subscriber = useCallback((action, group) => {
|
|
@@ -80,7 +80,7 @@ export function useFormArray(options, validators) {
|
|
|
80
80
|
...state,
|
|
81
81
|
...refactorForGroups(groups, state.validators)
|
|
82
82
|
}));
|
|
83
|
-
|
|
83
|
+
value.current = groups;
|
|
84
84
|
}, []);
|
|
85
85
|
const push = useCallback((group) => {
|
|
86
86
|
setState((state) => ({
|
|
@@ -101,7 +101,7 @@ export function useFormArray(options, validators) {
|
|
|
101
101
|
}));
|
|
102
102
|
}, []);
|
|
103
103
|
const findByUuid = useCallback((uuid) => {
|
|
104
|
-
return
|
|
104
|
+
return formGroups.current.get(uuid);
|
|
105
105
|
}, [state.groups]);
|
|
106
106
|
const setValidators = useCallback((validators) => {
|
|
107
107
|
setState((state) => ({
|
|
@@ -115,7 +115,7 @@ export function useFormArray(options, validators) {
|
|
|
115
115
|
const reset = useCallback(() => {
|
|
116
116
|
setState((state) => ({
|
|
117
117
|
...state,
|
|
118
|
-
...refactorForGroups(
|
|
118
|
+
...refactorForGroups(value.current, state.validators)
|
|
119
119
|
}));
|
|
120
120
|
}, []);
|
|
121
121
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-array.js","sourceRoot":"","sources":["../../../src/form-array/form-array.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,QAAQ,IAAI,eAAe,EAC3B,UAAU,IAAI,iBAAiB,EAChC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA0BjE,SAAS,gBAAgB,CACvB,MAA+B,EAC/B,UAAqC;IAErC,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtE,OAAO;QACL,MAAM;QACN,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC;KAC/D,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAIxB,MAAW,EAAE,UAAqC;IAClD,OAAO;QACL,GAAG,gBAAgB,CAAC,MAAM,EAAE,UAAU,CAAC;QACvC,MAAM;QACN,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,QAA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AC,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,EACnD,CAAC,KAAK,CAAC,MAAM,CAAC,CACf,CAAC;IAEF,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,IAAc,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,EACzD,CAAC,KAAK,CAAC,MAAM,CAAC,CACf,CAAC;IAEF,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACnB,GAAG,KAAK;YACR,GAAG,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC;SACtD,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,GAAG,KAAK;QACR,OAAO;QACP,MAAM;QACN,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;QACtB,UAAU;QACV,QAAQ;QACR,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK;QACrB,KAAK;QACL,QAAQ,EAAE,CAAC,KAAK,CAAC,KAAK;QACtB,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO;QACzB,IAAI;QACJ,MAAM;QACN,KAAK;QACL,eAAe;QACf,aAAa;QACb,QAAQ;QACR,UAAU;QACV,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO;QACzB,UAAU,EAAE,CAAC,KAAK,CAAC,QAAQ;QAC3B,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK;KACrC,CAAC;AACJ,CAAC"}
|
package/dist/esm/form-control.js
CHANGED
|
@@ -5,16 +5,16 @@ function errorsInControl(value, validators) {
|
|
|
5
5
|
return validators ? controlIsValid({ value, validators }) : [];
|
|
6
6
|
}
|
|
7
7
|
function useControl(options, validators) {
|
|
8
|
-
const
|
|
9
|
-
const initialValue = useRef(
|
|
8
|
+
const formControl = createFormControlOptions(options, validators);
|
|
9
|
+
const initialValue = useRef(formControl.value);
|
|
10
10
|
const [state, setState] = useState({
|
|
11
11
|
dirty: false,
|
|
12
12
|
disabled: false,
|
|
13
|
-
errors: errorsInControl(
|
|
13
|
+
errors: errorsInControl(formControl.value, formControl.validators),
|
|
14
14
|
focused: false,
|
|
15
|
-
touched: !!
|
|
16
|
-
value:
|
|
17
|
-
validators:
|
|
15
|
+
touched: !!formControl.touched,
|
|
16
|
+
value: formControl.value,
|
|
17
|
+
validators: formControl.validators
|
|
18
18
|
});
|
|
19
19
|
const elementRef = useRef(null);
|
|
20
20
|
const focus = useCallback(() => {
|