@rolster/react-forms 19.3.0 → 19.4.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 → index.cjs} +1 -1
- package/dist/cjs/index.cjs.map +1 -0
- package/package.json +10 -7
- package/dist/cjs/index.js.map +0 -1
- package/dist/es/index.js +0 -737
- package/dist/es/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","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":["formControlIsValid","hasError","someErrors","createFormControlOptions","uuid","refactorForValid","formGroupIsValid","verifyAllTrueInControls","refactorForControls","verifyAnyTrueInControls","controlsToValue","createFormGroupOptions","formArrayIsValid","verifyAllTrueInGroups","createFormArrayOptions","useRef","useState","useEffect","useCallback","rolsterHasError","rolsterSomeErrors","useMemo","reduceControlsToArray"],"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;A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zE,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACrC,IAAI,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE;AACtC;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolster/react-forms",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "It implements a set of classes that allow managing the control of states of the input components in React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"types": "./dist/esm/index.d.ts",
|
|
15
|
-
"main": "./dist/cjs/index.
|
|
15
|
+
"main": "./dist/cjs/index.cjs",
|
|
16
16
|
"module": "./dist/esm/index.js",
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
19
|
"types": "./dist/esm/index.d.ts",
|
|
20
20
|
"node": {
|
|
21
|
-
"require": "./dist/cjs/index.
|
|
21
|
+
"require": "./dist/cjs/index.cjs",
|
|
22
22
|
"import": "./dist/esm/index.js"
|
|
23
23
|
},
|
|
24
24
|
"default": "./dist/esm/index.js"
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"prepublishOnly": "npm run build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rolster/forms": "^4.
|
|
40
|
-
"@rolster/validators": "^3.
|
|
39
|
+
"@rolster/forms": "^4.1.0",
|
|
40
|
+
"@rolster/validators": "^3.1.0",
|
|
41
41
|
"react": "^19.2.0",
|
|
42
42
|
"uuid": "^13.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@rolster/rollup": "^
|
|
45
|
+
"@rolster/rollup": "^2.0.0",
|
|
46
46
|
"@rolster/types": "^1.1.0",
|
|
47
47
|
"@types/react": "^18.2.42",
|
|
48
48
|
"@types/uuid": "^9.0.7",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"jsdom": "^27.0.0",
|
|
52
52
|
"prettier": "^3.8.1",
|
|
53
53
|
"react-dom": "^19.2.0",
|
|
54
|
-
"rimraf": "^
|
|
54
|
+
"rimraf": "^6.1.3",
|
|
55
55
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
56
56
|
"tslib": "^2.4.0",
|
|
57
57
|
"typescript": "^5.7.2",
|
|
@@ -70,5 +70,8 @@
|
|
|
70
70
|
],
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
|
+
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": ">=14.13"
|
|
73
76
|
}
|
|
74
77
|
}
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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":["formControlIsValid","hasError","someErrors","createFormControlOptions","uuid","refactorForValid","formGroupIsValid","verifyAllTrueInControls","refactorForControls","verifyAnyTrueInControls","controlsToValue","createFormGroupOptions","formArrayIsValid","verifyAllTrueInGroups","createFormArrayOptions","useRef","useState","useEffect","useCallback","rolsterHasError","rolsterSomeErrors","useMemo","reduceControlsToArray"],"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,S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EAAE,YAAY,CAAC,GAAGN,cAAQ,EAAE;AACjD,IAAI,MAAM,SAAS,GAAGK,aAAO,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;;;;;;;;;;;;;;;;"}
|
package/dist/es/index.js
DELETED
|
@@ -1,737 +0,0 @@
|
|
|
1
|
-
import { createFormControlOptions, formControlIsValid, hasError, someErrors, createFormGroupOptions, formGroupIsValid, controlsToValue, verifyAllTrueInControls, verifyAnyTrueInControls, createFormArrayOptions, formArrayIsValid, verifyAllTrueInGroups, reduceControlsToArray } from '@rolster/forms/helpers';
|
|
2
|
-
import { v4 } from 'uuid';
|
|
3
|
-
import { useRef, useState, useEffect, useCallback, useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
class RolsterArrayControl {
|
|
6
|
-
constructor(options) {
|
|
7
|
-
this.uuid = options.uuid;
|
|
8
|
-
this.defaultValue = options.defaultValue;
|
|
9
|
-
this.value = options.value;
|
|
10
|
-
this.focused = !!options.focused;
|
|
11
|
-
this.unfocused = !this.focused;
|
|
12
|
-
this.touched = !!options.touched;
|
|
13
|
-
this.untouched = !this.touched;
|
|
14
|
-
this.dirty = !!options.dirty;
|
|
15
|
-
this.pristine = !this.dirty;
|
|
16
|
-
this.disabled = !!options.disabled;
|
|
17
|
-
this.enabled = !this.disabled;
|
|
18
|
-
this.valid = this.isValid(options.errors);
|
|
19
|
-
this.invalid = !this.valid;
|
|
20
|
-
this.wrong = this.touched && this.invalid;
|
|
21
|
-
this.errors = options.errors;
|
|
22
|
-
this.error = this.errors[0];
|
|
23
|
-
this.validators = options.validators;
|
|
24
|
-
}
|
|
25
|
-
focus() {
|
|
26
|
-
this.unfocused && this.refresh('focused', { focused: true });
|
|
27
|
-
}
|
|
28
|
-
blur() {
|
|
29
|
-
this.focused && this.refresh('focused', { focused: false, touched: true });
|
|
30
|
-
}
|
|
31
|
-
disable() {
|
|
32
|
-
this.enabled && this.refresh('disabled', { disabled: true });
|
|
33
|
-
}
|
|
34
|
-
enable() {
|
|
35
|
-
this.disabled && this.refresh('disabled', { disabled: false });
|
|
36
|
-
}
|
|
37
|
-
touch() {
|
|
38
|
-
this.untouched && this.refresh('touched', { touched: true });
|
|
39
|
-
}
|
|
40
|
-
setDefaultValue(value) {
|
|
41
|
-
if (value !== this.defaultValue) {
|
|
42
|
-
const errors = this.validators
|
|
43
|
-
? formControlIsValid({ value, validators: this.validators })
|
|
44
|
-
: [];
|
|
45
|
-
this.refresh('value', { errors, defaultValue: value, value });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
setStartValue(value) {
|
|
49
|
-
if (value !== this.value) {
|
|
50
|
-
const errors = this.validators
|
|
51
|
-
? formControlIsValid({ value, validators: this.validators })
|
|
52
|
-
: [];
|
|
53
|
-
this.refresh('value', { errors, value });
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
setValue(value) {
|
|
57
|
-
if (value !== this.value) {
|
|
58
|
-
const errors = this.validators
|
|
59
|
-
? formControlIsValid({ value, validators: this.validators })
|
|
60
|
-
: [];
|
|
61
|
-
this.refresh('value', { dirty: true, errors, value });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
setValidators(validators) {
|
|
65
|
-
const errors = validators
|
|
66
|
-
? formControlIsValid({ value: this.value, validators })
|
|
67
|
-
: [];
|
|
68
|
-
this.refresh('validators', { errors, validators });
|
|
69
|
-
}
|
|
70
|
-
subscribe(subscriber) {
|
|
71
|
-
this.subscriber = subscriber;
|
|
72
|
-
}
|
|
73
|
-
hasError(key) {
|
|
74
|
-
return hasError(this.errors, key);
|
|
75
|
-
}
|
|
76
|
-
someErrors(keys) {
|
|
77
|
-
return someErrors(this.errors, keys);
|
|
78
|
-
}
|
|
79
|
-
reset() {
|
|
80
|
-
const errors = this.validators
|
|
81
|
-
? formControlIsValid({
|
|
82
|
-
value: this.defaultValue,
|
|
83
|
-
validators: this.validators
|
|
84
|
-
})
|
|
85
|
-
: [];
|
|
86
|
-
this.refresh('reset', {
|
|
87
|
-
dirty: false,
|
|
88
|
-
errors,
|
|
89
|
-
touched: false,
|
|
90
|
-
value: this.defaultValue
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
isValid(errors) {
|
|
94
|
-
return errors.length === 0;
|
|
95
|
-
}
|
|
96
|
-
builder(options) {
|
|
97
|
-
return new RolsterArrayControl({ ...this, ...options });
|
|
98
|
-
}
|
|
99
|
-
refresh(action, options) {
|
|
100
|
-
this.subscriber && this.subscriber(action, this.builder(options));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
class ReactRolsterArrayControl extends RolsterArrayControl {
|
|
104
|
-
constructor(options) {
|
|
105
|
-
const { value, validators } = options;
|
|
106
|
-
const errors = validators ? formControlIsValid({ value, validators }) : [];
|
|
107
|
-
super({ ...options, errors });
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function rolsterArrayControl(options, validators) {
|
|
111
|
-
const formControl = createFormControlOptions(options, validators);
|
|
112
|
-
return new ReactRolsterArrayControl({
|
|
113
|
-
...formControl,
|
|
114
|
-
defaultValue: formControl.value,
|
|
115
|
-
uuid: v4()
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
function reactArrayControl(options, validators) {
|
|
119
|
-
return rolsterArrayControl(options, validators);
|
|
120
|
-
}
|
|
121
|
-
function formArrayControl(options, validators) {
|
|
122
|
-
return rolsterArrayControl(options, validators);
|
|
123
|
-
}
|
|
124
|
-
function inputArrayControl(options, validators) {
|
|
125
|
-
return rolsterArrayControl(options, validators);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function replaceControl(controls, control) {
|
|
129
|
-
return Object.entries(controls).reduce((controls, [key, _control]) => {
|
|
130
|
-
if (_control.uuid === control.uuid) {
|
|
131
|
-
controls[key] = control;
|
|
132
|
-
}
|
|
133
|
-
return controls;
|
|
134
|
-
}, controls);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function refactorForValid$2(controls, validators) {
|
|
138
|
-
const errors = validators ? formGroupIsValid({ controls, validators }) : [];
|
|
139
|
-
return {
|
|
140
|
-
errors,
|
|
141
|
-
valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid')
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function refactorForControls$1(action, group, controls) {
|
|
145
|
-
switch (action) {
|
|
146
|
-
case 'focused':
|
|
147
|
-
case 'touched':
|
|
148
|
-
return {
|
|
149
|
-
touched: verifyAnyTrueInControls(controls, 'touched'),
|
|
150
|
-
toucheds: verifyAllTrueInControls(controls, 'touched')
|
|
151
|
-
};
|
|
152
|
-
case 'validators':
|
|
153
|
-
return refactorForValid$2(controls, group.validators);
|
|
154
|
-
case 'reset':
|
|
155
|
-
return {
|
|
156
|
-
...refactorForValid$2(controls, group.validators),
|
|
157
|
-
dirty: verifyAnyTrueInControls(controls, 'dirty'),
|
|
158
|
-
dirties: verifyAllTrueInControls(controls, 'dirty'),
|
|
159
|
-
touched: verifyAnyTrueInControls(controls, 'touched'),
|
|
160
|
-
toucheds: verifyAllTrueInControls(controls, 'touched'),
|
|
161
|
-
value: controlsToValue(controls)
|
|
162
|
-
};
|
|
163
|
-
case 'list':
|
|
164
|
-
case 'value':
|
|
165
|
-
return {
|
|
166
|
-
...refactorForValid$2(controls, group.validators),
|
|
167
|
-
dirty: verifyAnyTrueInControls(controls, 'dirty'),
|
|
168
|
-
dirties: verifyAllTrueInControls(controls, 'dirty'),
|
|
169
|
-
value: controlsToValue(controls)
|
|
170
|
-
};
|
|
171
|
-
default:
|
|
172
|
-
return {};
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
class RolsterArrayGroup {
|
|
176
|
-
constructor(options) {
|
|
177
|
-
this.uuid = options.uuid;
|
|
178
|
-
this.controls = options.controls;
|
|
179
|
-
this.value = options.value;
|
|
180
|
-
this.resource = options.resource;
|
|
181
|
-
this.dirty = !!options.dirty;
|
|
182
|
-
this.dirties = !!options.dirties;
|
|
183
|
-
this.pristine = !this.dirty;
|
|
184
|
-
this.pristines = !this.dirties;
|
|
185
|
-
this.touched = !!options.touched;
|
|
186
|
-
this.toucheds = !!options.toucheds;
|
|
187
|
-
this.untouched = !this.touched;
|
|
188
|
-
this.untoucheds = !this.toucheds;
|
|
189
|
-
this.valid = !!options.valid;
|
|
190
|
-
this.invalid = !this.valid;
|
|
191
|
-
this.wrong = this.touched && this.invalid;
|
|
192
|
-
this.errors = options.errors;
|
|
193
|
-
this.error = this.errors[0];
|
|
194
|
-
this.validators = options.validators;
|
|
195
|
-
this.subscriberControl = (action, control) => {
|
|
196
|
-
const controls = replaceControl(this.controls, control);
|
|
197
|
-
this.refresh(action, {
|
|
198
|
-
...refactorForControls$1(action, this, controls),
|
|
199
|
-
controls
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
subscribe(subscriber) {
|
|
204
|
-
this.subscriber = subscriber;
|
|
205
|
-
Object.values(this.controls).forEach((control) => {
|
|
206
|
-
control.subscribe(this.subscriberControl);
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
setValidators(validators) {
|
|
210
|
-
this.refresh('validators', {
|
|
211
|
-
...refactorForValid$2(this.controls, validators),
|
|
212
|
-
validators
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
setResource(resource) {
|
|
216
|
-
this.refresh('resource', { resource });
|
|
217
|
-
}
|
|
218
|
-
refresh(action, options) {
|
|
219
|
-
this.subscriber &&
|
|
220
|
-
this.subscriber(action, new RolsterArrayGroup({ ...this, ...options }));
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
class ReactRolsterArrayGroup extends RolsterArrayGroup {
|
|
224
|
-
constructor(options) {
|
|
225
|
-
const { controls, validators } = options;
|
|
226
|
-
const errors = validators ? formGroupIsValid({ controls, validators }) : [];
|
|
227
|
-
super({
|
|
228
|
-
...options,
|
|
229
|
-
errors,
|
|
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'),
|
|
235
|
-
value: controlsToValue(controls)
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
function valueIsGroupOptions(options) {
|
|
240
|
-
return typeof options === 'object' && 'controls' in options;
|
|
241
|
-
}
|
|
242
|
-
function formArrayGroup(options, validators) {
|
|
243
|
-
const _uuid = valueIsGroupOptions(options) ? options.uuid || v4() : v4();
|
|
244
|
-
return new ReactRolsterArrayGroup({
|
|
245
|
-
...createFormGroupOptions(options, validators),
|
|
246
|
-
uuid: _uuid
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
class RolsterArrayList extends RolsterArrayControl {
|
|
251
|
-
constructor(options) {
|
|
252
|
-
const { controls, valueToControls, validators } = options;
|
|
253
|
-
const value = controls.map(controlsToValue);
|
|
254
|
-
const errors = validators ? formControlIsValid({ value, validators }) : [];
|
|
255
|
-
super({ ...options, errors, value });
|
|
256
|
-
this.valueToControls = valueToControls;
|
|
257
|
-
this.controls = controls;
|
|
258
|
-
this.valid =
|
|
259
|
-
errors.length === 0 &&
|
|
260
|
-
controls.reduce((valid, controls) => valid && verifyAllTrueInControls(controls, 'valid'), true);
|
|
261
|
-
this.invalid = !this.valid;
|
|
262
|
-
this.wrong = this.touched && this.invalid;
|
|
263
|
-
controls.forEach((reactControls) => {
|
|
264
|
-
this._subscribe(reactControls);
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
setDefaultValue(value) {
|
|
268
|
-
this.refresh('list', {
|
|
269
|
-
controls: value.map(this.valueToControls),
|
|
270
|
-
defaultValue: value
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
setStartValue(value) {
|
|
274
|
-
this.refresh('list', {
|
|
275
|
-
controls: value.map(this.valueToControls)
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
setValue(value) {
|
|
279
|
-
this.refresh('list', {
|
|
280
|
-
controls: value.map(this.valueToControls),
|
|
281
|
-
dirty: true
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
reset() {
|
|
285
|
-
this.refresh('list', {
|
|
286
|
-
controls: this.defaultValue.map(this.valueToControls),
|
|
287
|
-
dirty: false,
|
|
288
|
-
touched: false
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
push(controls) {
|
|
292
|
-
this.refresh('list', {
|
|
293
|
-
controls: [...this.controls, controls]
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
remove(controls) {
|
|
297
|
-
this.refresh('list', {
|
|
298
|
-
controls: this.controls.filter((_controls) => _controls !== controls)
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
builder(options) {
|
|
302
|
-
return new RolsterArrayList({
|
|
303
|
-
...this,
|
|
304
|
-
...options,
|
|
305
|
-
valueToControls: this.valueToControls
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
refresh(action, options) {
|
|
309
|
-
super.refresh(action, options);
|
|
310
|
-
}
|
|
311
|
-
_subscribe(reactControls) {
|
|
312
|
-
Object.values(reactControls).forEach((control) => {
|
|
313
|
-
control.subscribe((action, _control) => {
|
|
314
|
-
const _reactControls = this.controls.map((_controls) => reactControls !== _controls
|
|
315
|
-
? _controls
|
|
316
|
-
: replaceControl(reactControls, _control));
|
|
317
|
-
this.refresh(action, { controls: _reactControls });
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
function formArrayList(options) {
|
|
323
|
-
const value = options?.value || [];
|
|
324
|
-
return new RolsterArrayList({
|
|
325
|
-
...options,
|
|
326
|
-
controls: value.map((value) => options.valueToControls(value)),
|
|
327
|
-
defaultValue: value,
|
|
328
|
-
uuid: v4()
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
function refactorForValid$1(groups, validators) {
|
|
333
|
-
const errors = validators ? formArrayIsValid({ groups, validators }) : [];
|
|
334
|
-
return {
|
|
335
|
-
errors,
|
|
336
|
-
valid: errors.length === 0 && verifyAllTrueInGroups(groups, 'valid')
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
function refactorForGroups(groups, validators) {
|
|
340
|
-
return {
|
|
341
|
-
...refactorForValid$1(groups, validators),
|
|
342
|
-
groups,
|
|
343
|
-
controls: groups.map(({ controls }) => controls),
|
|
344
|
-
value: groups.map(({ controls }) => controlsToValue(controls))
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
function refactorForControls(action, state, groups) {
|
|
348
|
-
switch (action) {
|
|
349
|
-
case 'validators':
|
|
350
|
-
return refactorForValid$1(groups, state.validators);
|
|
351
|
-
case 'reset':
|
|
352
|
-
case 'list':
|
|
353
|
-
case 'value':
|
|
354
|
-
return refactorForGroups(groups, state.validators);
|
|
355
|
-
default:
|
|
356
|
-
return { groups };
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
function useFormArray(options, validators) {
|
|
360
|
-
const formArray = createFormArrayOptions(options, validators);
|
|
361
|
-
const defaultValue = useRef(formArray.groups || []);
|
|
362
|
-
const formGroups = useRef(new Map());
|
|
363
|
-
const [state, setState] = useState(() => {
|
|
364
|
-
return {
|
|
365
|
-
...refactorForValid$1(defaultValue.current, formArray.validators),
|
|
366
|
-
controls: defaultValue.current.map(({ controls }) => controls),
|
|
367
|
-
dirty: false,
|
|
368
|
-
dirties: false,
|
|
369
|
-
disabled: false,
|
|
370
|
-
groups: defaultValue.current,
|
|
371
|
-
touched: false,
|
|
372
|
-
toucheds: false,
|
|
373
|
-
value: defaultValue.current.map(({ controls }) => controlsToValue(controls)),
|
|
374
|
-
validators: formArray.validators
|
|
375
|
-
};
|
|
376
|
-
});
|
|
377
|
-
useEffect(() => {
|
|
378
|
-
formGroups.current.clear();
|
|
379
|
-
state.groups.forEach((group) => {
|
|
380
|
-
formGroups.current.set(group.uuid, group);
|
|
381
|
-
group.subscribe(subscriber);
|
|
382
|
-
});
|
|
383
|
-
}, [state.groups]);
|
|
384
|
-
const subscriber = useCallback((action, group) => {
|
|
385
|
-
setState((state) => {
|
|
386
|
-
const groups = state.groups.map((currentGroup) => {
|
|
387
|
-
return currentGroup.uuid === group.uuid ? group : currentGroup;
|
|
388
|
-
});
|
|
389
|
-
return {
|
|
390
|
-
...state,
|
|
391
|
-
...refactorForControls(action, state, groups)
|
|
392
|
-
};
|
|
393
|
-
});
|
|
394
|
-
}, []);
|
|
395
|
-
const disable = useCallback(() => {
|
|
396
|
-
setState((state) => ({ ...state, disabled: true }));
|
|
397
|
-
}, []);
|
|
398
|
-
const enable = useCallback(() => {
|
|
399
|
-
setState((state) => ({ ...state, disabled: false }));
|
|
400
|
-
}, []);
|
|
401
|
-
const setValue = useCallback((groups) => {
|
|
402
|
-
setState((state) => ({
|
|
403
|
-
...state,
|
|
404
|
-
...refactorForGroups(groups, state.validators)
|
|
405
|
-
}));
|
|
406
|
-
}, []);
|
|
407
|
-
const setDefaultValue = useCallback((groups) => {
|
|
408
|
-
setState((state) => ({
|
|
409
|
-
...state,
|
|
410
|
-
...refactorForGroups(groups, state.validators)
|
|
411
|
-
}));
|
|
412
|
-
defaultValue.current = groups;
|
|
413
|
-
}, []);
|
|
414
|
-
const push = useCallback((group) => {
|
|
415
|
-
setState((state) => ({
|
|
416
|
-
...state,
|
|
417
|
-
...refactorForGroups([...state.groups, group], state.validators)
|
|
418
|
-
}));
|
|
419
|
-
}, []);
|
|
420
|
-
const merge = useCallback((groups) => {
|
|
421
|
-
setState((state) => ({
|
|
422
|
-
...state,
|
|
423
|
-
...refactorForGroups([...state.groups, ...groups], state.validators)
|
|
424
|
-
}));
|
|
425
|
-
}, []);
|
|
426
|
-
const remove = useCallback(({ uuid }) => {
|
|
427
|
-
setState((state) => ({
|
|
428
|
-
...state,
|
|
429
|
-
...refactorForGroups(state.groups.filter((group) => group.uuid !== uuid), state.validators)
|
|
430
|
-
}));
|
|
431
|
-
}, []);
|
|
432
|
-
const findByUuid = useCallback((uuid) => {
|
|
433
|
-
return formGroups.current.get(uuid);
|
|
434
|
-
}, [state.groups]);
|
|
435
|
-
const setValidators = useCallback((validators) => {
|
|
436
|
-
setState((state) => ({
|
|
437
|
-
...state,
|
|
438
|
-
...refactorForValid$1(state.groups, validators),
|
|
439
|
-
validators
|
|
440
|
-
}));
|
|
441
|
-
}, []);
|
|
442
|
-
const hasError$1 = useCallback((key) => {
|
|
443
|
-
return hasError(state.errors, key);
|
|
444
|
-
}, [state.errors]);
|
|
445
|
-
const someErrors$1 = useCallback((keys) => {
|
|
446
|
-
return someErrors(state.errors, keys);
|
|
447
|
-
}, [state.errors]);
|
|
448
|
-
const reset = useCallback(() => {
|
|
449
|
-
setState((state) => ({
|
|
450
|
-
...state,
|
|
451
|
-
...refactorForGroups(defaultValue.current, state.validators)
|
|
452
|
-
}));
|
|
453
|
-
}, []);
|
|
454
|
-
return {
|
|
455
|
-
...state,
|
|
456
|
-
disable,
|
|
457
|
-
enable,
|
|
458
|
-
enabled: !state.disabled,
|
|
459
|
-
error: state.errors[0],
|
|
460
|
-
findByUuid,
|
|
461
|
-
hasError: hasError$1,
|
|
462
|
-
invalid: !state.valid,
|
|
463
|
-
merge,
|
|
464
|
-
pristine: !state.dirty,
|
|
465
|
-
pristines: !state.dirties,
|
|
466
|
-
push,
|
|
467
|
-
remove,
|
|
468
|
-
reset,
|
|
469
|
-
setDefaultValue,
|
|
470
|
-
setValidators,
|
|
471
|
-
setValue,
|
|
472
|
-
someErrors: someErrors$1,
|
|
473
|
-
untouched: !state.touched,
|
|
474
|
-
untoucheds: !state.toucheds,
|
|
475
|
-
wrong: state.touched && !state.valid
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
function errorsInControl(value, validators) {
|
|
480
|
-
return validators ? formControlIsValid({ value, validators }) : [];
|
|
481
|
-
}
|
|
482
|
-
function useControl(options, validators) {
|
|
483
|
-
const formControl = createFormControlOptions(options, validators);
|
|
484
|
-
const defaultValue = useRef(formControl.value);
|
|
485
|
-
const [state, setState] = useState(() => {
|
|
486
|
-
return {
|
|
487
|
-
dirty: false,
|
|
488
|
-
disabled: false,
|
|
489
|
-
errors: errorsInControl(formControl.value, formControl.validators),
|
|
490
|
-
focused: false,
|
|
491
|
-
touched: !!formControl.touched,
|
|
492
|
-
value: formControl.value,
|
|
493
|
-
validators: formControl.validators
|
|
494
|
-
};
|
|
495
|
-
});
|
|
496
|
-
const elementRef = useRef(null);
|
|
497
|
-
const focus = useCallback(() => {
|
|
498
|
-
setState((state) => ({ ...state, focused: true }));
|
|
499
|
-
}, []);
|
|
500
|
-
const blur = useCallback(() => {
|
|
501
|
-
setState((state) => ({ ...state, focused: false, touched: true }));
|
|
502
|
-
}, []);
|
|
503
|
-
const disable = useCallback(() => {
|
|
504
|
-
setState((state) => ({ ...state, disabled: true }));
|
|
505
|
-
}, []);
|
|
506
|
-
const enable = useCallback(() => {
|
|
507
|
-
setState((state) => ({ ...state, disabled: false }));
|
|
508
|
-
}, []);
|
|
509
|
-
const touch = useCallback(() => {
|
|
510
|
-
setState((state) => ({ ...state, touched: true }));
|
|
511
|
-
}, []);
|
|
512
|
-
const setDefaultValue = useCallback((value) => {
|
|
513
|
-
defaultValue.current = value;
|
|
514
|
-
setState((state) => ({
|
|
515
|
-
...state,
|
|
516
|
-
errors: errorsInControl(value, state.validators),
|
|
517
|
-
value
|
|
518
|
-
}));
|
|
519
|
-
}, []);
|
|
520
|
-
const setStartValue = useCallback((value) => {
|
|
521
|
-
setState((state) => ({
|
|
522
|
-
...state,
|
|
523
|
-
errors: errorsInControl(value, state.validators),
|
|
524
|
-
value
|
|
525
|
-
}));
|
|
526
|
-
}, []);
|
|
527
|
-
const setValue = useCallback((value) => {
|
|
528
|
-
setState((state) => ({
|
|
529
|
-
...state,
|
|
530
|
-
dirty: true,
|
|
531
|
-
errors: errorsInControl(value, state.validators),
|
|
532
|
-
value
|
|
533
|
-
}));
|
|
534
|
-
}, []);
|
|
535
|
-
const setValidators = useCallback((validators) => {
|
|
536
|
-
setState((state) => ({
|
|
537
|
-
...state,
|
|
538
|
-
errors: errorsInControl(state.value, validators),
|
|
539
|
-
validators
|
|
540
|
-
}));
|
|
541
|
-
}, []);
|
|
542
|
-
const reset = useCallback(() => {
|
|
543
|
-
setState((state) => ({
|
|
544
|
-
...state,
|
|
545
|
-
dirty: false,
|
|
546
|
-
errors: errorsInControl(defaultValue.current, state.validators),
|
|
547
|
-
value: defaultValue.current,
|
|
548
|
-
touched: false
|
|
549
|
-
}));
|
|
550
|
-
}, []);
|
|
551
|
-
const hasError$1 = useCallback((key) => {
|
|
552
|
-
return hasError(state.errors, key);
|
|
553
|
-
}, [state.errors]);
|
|
554
|
-
const someErrors$1 = useCallback((keys) => {
|
|
555
|
-
return someErrors(state.errors, keys);
|
|
556
|
-
}, [state.errors]);
|
|
557
|
-
const valid = state.errors.length === 0;
|
|
558
|
-
return {
|
|
559
|
-
...state,
|
|
560
|
-
blur,
|
|
561
|
-
disable,
|
|
562
|
-
elementRef,
|
|
563
|
-
enable,
|
|
564
|
-
enabled: !state.disabled,
|
|
565
|
-
error: state.errors[0],
|
|
566
|
-
focus,
|
|
567
|
-
hasError: hasError$1,
|
|
568
|
-
invalid: !valid,
|
|
569
|
-
pristine: !state.dirty,
|
|
570
|
-
reset,
|
|
571
|
-
setDefaultValue,
|
|
572
|
-
setStartValue,
|
|
573
|
-
setValidators,
|
|
574
|
-
setValue,
|
|
575
|
-
someErrors: someErrors$1,
|
|
576
|
-
touch,
|
|
577
|
-
unfocused: !state.focused,
|
|
578
|
-
untouched: !state.touched,
|
|
579
|
-
valid,
|
|
580
|
-
wrong: state.touched && !valid
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
function useReactControl(options, validators) {
|
|
584
|
-
return useControl(options, validators);
|
|
585
|
-
}
|
|
586
|
-
function useFormControl(options, validators) {
|
|
587
|
-
return useControl(options, validators);
|
|
588
|
-
}
|
|
589
|
-
function useInputControl(options, validators) {
|
|
590
|
-
return useControl(options, validators);
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
function refactorForValid(controls, validators) {
|
|
594
|
-
const errors = validators ? formGroupIsValid({ controls, validators }) : [];
|
|
595
|
-
return {
|
|
596
|
-
errors,
|
|
597
|
-
valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid')
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
function checkAllSuccess(status) {
|
|
601
|
-
return status.reduce((success, status) => success && status, true);
|
|
602
|
-
}
|
|
603
|
-
function checkPartialSuccess(status) {
|
|
604
|
-
return status.reduce((success, status) => success || status, false);
|
|
605
|
-
}
|
|
606
|
-
function useFormGroup(options, validators) {
|
|
607
|
-
const formGroup = createFormGroupOptions(options, validators);
|
|
608
|
-
const formInitialized = useRef({
|
|
609
|
-
dirty: false,
|
|
610
|
-
touched: false,
|
|
611
|
-
value: false,
|
|
612
|
-
visual: false
|
|
613
|
-
});
|
|
614
|
-
const formGroupStatus = useMemo(() => {
|
|
615
|
-
const dirty = [];
|
|
616
|
-
const touched = [];
|
|
617
|
-
const value = [];
|
|
618
|
-
const visual = [];
|
|
619
|
-
Object.values(formGroup.controls).forEach((control) => {
|
|
620
|
-
dirty.push(control.dirty);
|
|
621
|
-
touched.push(control.touched);
|
|
622
|
-
value.push(control.value);
|
|
623
|
-
visual.push(control.disabled);
|
|
624
|
-
visual.push(control.focused);
|
|
625
|
-
});
|
|
626
|
-
return {
|
|
627
|
-
dirty,
|
|
628
|
-
touched,
|
|
629
|
-
value,
|
|
630
|
-
visual
|
|
631
|
-
};
|
|
632
|
-
}, [formGroup.controls]);
|
|
633
|
-
const [state, setState] = useState(() => {
|
|
634
|
-
return {
|
|
635
|
-
...refactorForValid(formGroup.controls, formGroup.validators),
|
|
636
|
-
controls: formGroup.controls,
|
|
637
|
-
dirties: checkAllSuccess(formGroupStatus.dirty),
|
|
638
|
-
dirty: checkPartialSuccess(formGroupStatus.dirty),
|
|
639
|
-
touched: checkPartialSuccess(formGroupStatus.touched),
|
|
640
|
-
toucheds: checkAllSuccess(formGroupStatus.touched),
|
|
641
|
-
validators: formGroup.validators,
|
|
642
|
-
value: controlsToValue(formGroup.controls)
|
|
643
|
-
};
|
|
644
|
-
});
|
|
645
|
-
useEffect(() => {
|
|
646
|
-
if (formInitialized.current.value) {
|
|
647
|
-
setState((state) => ({
|
|
648
|
-
...state,
|
|
649
|
-
...refactorForValid(formGroup.controls, state.validators),
|
|
650
|
-
controls: formGroup.controls,
|
|
651
|
-
value: controlsToValue(formGroup.controls)
|
|
652
|
-
}));
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
formInitialized.current.value = true;
|
|
656
|
-
}
|
|
657
|
-
}, formGroupStatus.value);
|
|
658
|
-
useEffect(() => {
|
|
659
|
-
if (formInitialized.current.dirty) {
|
|
660
|
-
setState((state) => ({
|
|
661
|
-
...state,
|
|
662
|
-
controls: formGroup.controls,
|
|
663
|
-
dirty: checkPartialSuccess(formGroupStatus.dirty),
|
|
664
|
-
dirties: checkAllSuccess(formGroupStatus.dirty)
|
|
665
|
-
}));
|
|
666
|
-
}
|
|
667
|
-
else {
|
|
668
|
-
formInitialized.current.dirty = true;
|
|
669
|
-
}
|
|
670
|
-
}, formGroupStatus.dirty);
|
|
671
|
-
useEffect(() => {
|
|
672
|
-
if (formInitialized.current.touched) {
|
|
673
|
-
setState((state) => ({
|
|
674
|
-
...state,
|
|
675
|
-
controls: formGroup.controls,
|
|
676
|
-
touched: checkPartialSuccess(formGroupStatus.touched),
|
|
677
|
-
toucheds: checkAllSuccess(formGroupStatus.touched)
|
|
678
|
-
}));
|
|
679
|
-
}
|
|
680
|
-
else {
|
|
681
|
-
formInitialized.current.touched = true;
|
|
682
|
-
}
|
|
683
|
-
}, formGroupStatus.touched);
|
|
684
|
-
useEffect(() => {
|
|
685
|
-
if (formInitialized.current.visual) {
|
|
686
|
-
setState((state) => ({
|
|
687
|
-
...state,
|
|
688
|
-
controls: formGroup.controls
|
|
689
|
-
}));
|
|
690
|
-
}
|
|
691
|
-
else {
|
|
692
|
-
formInitialized.current.visual = true;
|
|
693
|
-
}
|
|
694
|
-
}, formGroupStatus.visual);
|
|
695
|
-
const setValidators = useCallback((validators) => {
|
|
696
|
-
setState((state) => ({
|
|
697
|
-
...state,
|
|
698
|
-
...refactorForValid(state.controls, validators)
|
|
699
|
-
}));
|
|
700
|
-
}, []);
|
|
701
|
-
const reset = useCallback(() => {
|
|
702
|
-
Object.values(formGroup.controls).forEach((control) => {
|
|
703
|
-
control.reset();
|
|
704
|
-
});
|
|
705
|
-
}, []);
|
|
706
|
-
return {
|
|
707
|
-
...state,
|
|
708
|
-
error: state.errors[0],
|
|
709
|
-
invalid: !state.valid,
|
|
710
|
-
pristine: !state.dirty,
|
|
711
|
-
pristines: !state.dirties,
|
|
712
|
-
reset,
|
|
713
|
-
setValidators,
|
|
714
|
-
untouched: !state.touched,
|
|
715
|
-
untoucheds: !state.toucheds,
|
|
716
|
-
wrong: state.touched && !state.valid
|
|
717
|
-
};
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
function reduceControlsToValues(controls) {
|
|
721
|
-
return reduceControlsToArray(controls, 'value');
|
|
722
|
-
}
|
|
723
|
-
function reduceGroupToValues(group) {
|
|
724
|
-
return reduceControlsToValues(group.controls);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
function useFormArrayGroupSelect({ formArray }) {
|
|
728
|
-
const [formSelect, setFormGroup] = useState();
|
|
729
|
-
const formGroup = useMemo(() => {
|
|
730
|
-
return (formSelect &&
|
|
731
|
-
formArray.groups.find(({ uuid }) => formSelect.uuid === uuid));
|
|
732
|
-
}, [formArray.value, formSelect]);
|
|
733
|
-
return { formGroup, setFormGroup };
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
export { formArrayControl, formArrayGroup, formArrayList, inputArrayControl, reactArrayControl, reduceControlsToValues, reduceGroupToValues, useFormArray, useFormArrayGroupSelect, useFormControl, useFormGroup, useInputControl, useReactControl };
|
|
737
|
-
//# sourceMappingURL=index.js.map
|
package/dist/es/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,QA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