@rolster/forms 2.8.0 → 2.9.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 +12 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +12 -4
- package/dist/es/index.js.map +1 -1
- package/dist/esm/form-array/form-array.d.ts +3 -2
- package/dist/esm/form-array/form-array.js +8 -4
- package/dist/esm/form-array/form-array.js.map +1 -1
- package/dist/esm/form-control.d.ts +1 -0
- package/dist/esm/form-control.js +4 -0
- package/dist/esm/form-control.js.map +1 -1
- package/dist/esm/types.d.ts +3 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -192,6 +192,10 @@ class FormControl {
|
|
|
192
192
|
touch() {
|
|
193
193
|
this.currentTouched = true;
|
|
194
194
|
}
|
|
195
|
+
setInitialValue(value) {
|
|
196
|
+
this.initialValue = value;
|
|
197
|
+
this.setValue(value);
|
|
198
|
+
}
|
|
195
199
|
setValue(value) {
|
|
196
200
|
if (this.enabled) {
|
|
197
201
|
this.currentValue = value;
|
|
@@ -396,9 +400,9 @@ class FormArray {
|
|
|
396
400
|
this.currentErrors = [];
|
|
397
401
|
const { groups, validators } = createFormArrayOptions(arrayOptions, arrayValidators);
|
|
398
402
|
this.unsusbcriptions = new Map();
|
|
399
|
-
this.
|
|
403
|
+
this.initialValue = groups;
|
|
400
404
|
this.validators = validators;
|
|
401
|
-
this.refresh(this.
|
|
405
|
+
this.refresh(this.initialValue);
|
|
402
406
|
this.observable = commons.observable(this.value);
|
|
403
407
|
groups?.forEach((group) => {
|
|
404
408
|
this.subscription(group);
|
|
@@ -465,7 +469,7 @@ class FormArray {
|
|
|
465
469
|
return someErrors(this.errors, keys);
|
|
466
470
|
}
|
|
467
471
|
reset() {
|
|
468
|
-
this.refresh(this.
|
|
472
|
+
this.refresh(this.initialValue);
|
|
469
473
|
}
|
|
470
474
|
disable() {
|
|
471
475
|
this.currentDisabled = true;
|
|
@@ -483,7 +487,11 @@ class FormArray {
|
|
|
483
487
|
});
|
|
484
488
|
this.refresh([...this.groups, ...groups]);
|
|
485
489
|
}
|
|
486
|
-
|
|
490
|
+
setInitialValue(groups) {
|
|
491
|
+
this.initialValue = groups;
|
|
492
|
+
this.setValue(groups);
|
|
493
|
+
}
|
|
494
|
+
setValue(groups) {
|
|
487
495
|
this.currentGroups.forEach(({ uuid }) => {
|
|
488
496
|
this.unsusbcriptions.delete(uuid);
|
|
489
497
|
});
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../esm/arguments.js","../esm/helpers.js","../esm/form-control.js","../esm/form-array/form-array-control.js","../esm/form-group.js","../esm/form-array/form-array-group.js","../esm/form-array/form-array-list.js","../esm/form-array/form-array.js"],"sourcesContent":["function itIsControlOptions(options) {\n return (typeof options === 'object' &&\n ('value' in options || 'validators' in options));\n}\nfunction itIsGroupOptions(options) {\n return typeof options === 'object' && 'controls' in options;\n}\nfunction itIsArrayOptions(options) {\n return (typeof options === 'object' &&\n ('groups' in options || 'validators' in options));\n}\nexport function createFormControlOptions(...controlOptions) {\n const [options, validators] = controlOptions;\n if (!options) {\n return { value: options, validators };\n }\n if (!validators && itIsControlOptions(options)) {\n return options;\n }\n return {\n value: options,\n validators\n };\n}\nexport function createFormGroupOptions(...groupOptions) {\n const [options, validators] = groupOptions;\n if (!validators && itIsGroupOptions(options)) {\n return options;\n }\n return {\n controls: options,\n validators\n };\n}\nexport function createFormArrayOptions(...arrayOptions) {\n const [options, validators] = arrayOptions;\n if (!options) {\n return { groups: options, validators };\n }\n if (!validators && itIsArrayOptions(options)) {\n return options;\n }\n return {\n groups: options,\n validators\n };\n}\n//# sourceMappingURL=arguments.js.map","import { parseBoolean } from '@rolster/commons';\nfunction reduceErrors(errors) {\n return errors.reduce((keys, { id }) => [...keys, id], []);\n}\nexport const controlIsValid = ({ value, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(value);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport const controlsAllChecked = (controls, key) => {\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value && parseBoolean(control[key]), true);\n};\nexport const controlsPartialChecked = (controls, key) => {\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value || parseBoolean(control[key]), false);\n};\nexport const controlsToValue = (controls) => {\n return Object.entries(controls).reduce((result, [key, { value }]) => {\n result[key] = value;\n return result;\n }, {});\n};\nexport const groupIsValid = ({ controls, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(controls);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport function groupAllChecked(groups, key) {\n return groups.reduce((value, group) => value && parseBoolean(group[key]), true);\n}\nexport function groupPartialChecked(groups, key) {\n return groups.reduce((value, group) => value || parseBoolean(group[key]), false);\n}\nexport const arrayIsValid = ({ groups, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(groups);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport function hasError(errors, key) {\n return reduceErrors(errors).includes(key);\n}\nexport function someErrors(errors, keys) {\n return reduceErrors(errors).some((key) => keys.includes(key));\n}\n//# sourceMappingURL=helpers.js.map","import { observable } from '@rolster/commons';\nimport { createFormControlOptions } from './arguments';\nimport { controlIsValid, hasError, someErrors } from './helpers';\nexport class FormControl {\n constructor(controlOptions, controlValidators) {\n this.currentFocused = false;\n this.currentTouched = false;\n this.currentDirty = false;\n this.currentDisabled = false;\n this.currentValid = true;\n this.currentErrors = [];\n const { value, validators } = createFormControlOptions(controlOptions, controlValidators);\n this.observable = observable(value);\n this.initialValue = value;\n this.validators = validators;\n this.currentValue = value;\n this.updateValueAndValidity(value, validators);\n }\n get focused() {\n return this.currentFocused;\n }\n get unfocused() {\n return !this.currentFocused;\n }\n get touched() {\n return this.currentTouched;\n }\n get untouched() {\n return !this.currentTouched;\n }\n get dirty() {\n return this.currentDirty;\n }\n get pristine() {\n return !this.currentDirty;\n }\n get disabled() {\n return this.currentDisabled;\n }\n get enabled() {\n return !this.currentDisabled;\n }\n get valid() {\n return this.currentValid;\n }\n get invalid() {\n return !this.currentValid;\n }\n get value() {\n return this.currentValue;\n }\n get errors() {\n return this.currentErrors;\n }\n get error() {\n return this.currentError;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n this.setValue(this.initialValue);\n this.currentDirty = false;\n this.currentTouched = false;\n }\n focus() {\n this.currentFocused = true;\n }\n blur() {\n this.currentFocused = false;\n this.currentTouched = true;\n }\n disable() {\n this.currentDisabled = true;\n }\n enable() {\n this.currentDisabled = false;\n }\n touch() {\n this.currentTouched = true;\n }\n setValue(value) {\n if (this.enabled) {\n this.currentValue = value;\n this.currentDirty = true;\n this.updateValueAndValidity(value, this.validators);\n this.observable.next(value);\n }\n }\n setValidators(validators = []) {\n this.validators = validators;\n this.updateValueAndValidity(this.value, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n updateValueAndValidity(value, validators) {\n if (validators) {\n const errors = controlIsValid({ value, validators });\n this.currentError = errors[0];\n this.currentErrors = errors;\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentValid = true;\n this.currentError = undefined;\n this.currentErrors = [];\n }\n }\n}\nexport function formControl(options, validators) {\n return new FormControl(createFormControlOptions(options, validators));\n}\n//# sourceMappingURL=form-control.js.map","import { v4 as uuid } from 'uuid';\nimport { createFormControlOptions } from '../arguments';\nimport { FormControl } from '../form-control';\nexport class FormArrayControl extends FormControl {\n constructor(controlOptions, controlValidators) {\n const { value, validators } = createFormControlOptions(controlOptions, controlValidators);\n super(value, validators);\n this.uuid = uuid();\n }\n}\nexport function formArrayControl(options, validators) {\n return new FormArrayControl(createFormControlOptions(options, validators));\n}\n//# sourceMappingURL=form-array-control.js.map","import { observable } from '@rolster/commons';\nimport { createFormGroupOptions } from './arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from './helpers';\nexport class FormGroup {\n constructor(groupOptions, groupValidators) {\n this.currentErrors = [];\n this.currentValid = true;\n const { controls, validators } = createFormGroupOptions(groupOptions, groupValidators);\n this.currentControls = controls;\n this.validators = validators;\n this.updateValueAndValidity(controls, validators);\n this.observable = observable(this.value);\n Object.values(controls).forEach((control) => {\n control.subscribe(() => {\n this.updateValueAndValidity(this.controls, this.validators);\n this.observable.next(this.value);\n });\n });\n }\n get controls() {\n return this.currentControls;\n }\n get touched() {\n return controlsPartialChecked(this.controls, 'touched');\n }\n get touchedAll() {\n return controlsAllChecked(this.controls, 'touched');\n }\n get untouched() {\n return !this.touched;\n }\n get untouchedAll() {\n return !this.touchedAll;\n }\n get dirty() {\n return controlsPartialChecked(this.controls, 'dirty');\n }\n get dirtyAll() {\n return controlsAllChecked(this.controls, 'dirty');\n }\n get pristine() {\n return !this.dirty;\n }\n get pristineAll() {\n return this.dirtyAll;\n }\n get valid() {\n return this.currentValid && controlsAllChecked(this.controls, 'valid');\n }\n get invalid() {\n return !this.valid;\n }\n get value() {\n return controlsToValue(this.controls);\n }\n get errors() {\n return this.currentErrors;\n }\n get error() {\n return this.currentError;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n reset() {\n Object.values(this.controls).forEach((control) => {\n control.reset();\n });\n }\n setValidators(validators) {\n this.validators = validators;\n this.updateValueAndValidity(this.controls, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n updateValueAndValidity(controls, validators) {\n if (validators) {\n const errors = groupIsValid({ controls, validators });\n this.currentErrors = errors;\n this.currentError = errors[0];\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentErrors = [];\n this.currentError = undefined;\n this.currentValid = true;\n }\n }\n}\nexport function formGroup(options, validators) {\n return new FormGroup(createFormGroupOptions(options, validators));\n}\n//# sourceMappingURL=form-group.js.map","import { v4 as uuid } from 'uuid';\nimport { createFormGroupOptions } from '../arguments';\nimport { FormGroup } from '../form-group';\nexport class FormArrayGroup extends FormGroup {\n constructor(groupOptions, groupValidators) {\n const { controls, resource, validators } = createFormGroupOptions(groupOptions, groupValidators);\n super(controls, validators);\n this.uuid = uuid();\n this.resource = resource;\n }\n}\nexport function formArrayGroup(options, validators) {\n return new FormArrayGroup(createFormGroupOptions(options, validators));\n}\n//# sourceMappingURL=form-array-group.js.map","import { v4 as uuid } from 'uuid';\nimport { FormControl } from '../form-control';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue } from '../helpers';\nexport class FormArrayList extends FormControl {\n constructor(valueToControls, value, validators) {\n const initialValue = value || [];\n super(initialValue, validators);\n this.valueToControls = valueToControls;\n this.currentControls = initialValue.map((value) => this.createControls(value));\n this.uuid = uuid();\n }\n get controls() {\n return this.currentControls;\n }\n get touched() {\n return this.controls.reduce((valid, controls) => valid && controlsPartialChecked(controls, 'touched'), true);\n }\n get dirty() {\n return this.controls.reduce((valid, controls) => valid && controlsPartialChecked(controls, 'dirty'), true);\n }\n get valid() {\n return (this.currentValid &&\n this.controls.reduce((valid, controls) => valid && controlsAllChecked(controls, 'valid'), true));\n }\n get value() {\n return this.controls.map((controls) => controlsToValue(controls));\n }\n setValue(values) {\n this.currentControls = values.map((value) => this.createControls(value));\n }\n push(controls) {\n this.currentControls = this.currentControls.concat([controls]);\n }\n remove(controls) {\n this.currentControls = this.currentControls.filter((currentControls) => currentControls !== controls);\n }\n createControls(value) {\n const controls = this.valueToControls(value);\n Object.values(controls).forEach((control) => {\n control.subscribe(() => {\n const { value, validators } = this;\n this.updateValueAndValidity(value, validators);\n this.observable.next(value);\n });\n });\n return controls;\n }\n}\nexport function formArrayList(valueToControl, value, validators) {\n return new FormArrayList(valueToControl, value, validators);\n}\n//# sourceMappingURL=form-array-list.js.map","import { observable } from '@rolster/commons';\nimport { createFormArrayOptions } from '../arguments';\nimport { arrayIsValid, groupAllChecked, groupPartialChecked, hasError, someErrors } from '../helpers';\nexport class FormArray {\n constructor(arrayOptions, arrayValidators) {\n this.currentGroups = [];\n this.currentValid = true;\n this.currentDisabled = false;\n this.currentErrors = [];\n const { groups, validators } = createFormArrayOptions(arrayOptions, arrayValidators);\n this.unsusbcriptions = new Map();\n this.initialState = groups;\n this.validators = validators;\n this.refresh(this.initialState);\n this.observable = observable(this.value);\n groups?.forEach((group) => {\n this.subscription(group);\n });\n }\n get groups() {\n return this.currentGroups;\n }\n get controls() {\n return this.groups.map(({ controls }) => controls);\n }\n get touched() {\n return groupPartialChecked(this.groups, 'touched');\n }\n get touchedAll() {\n return groupAllChecked(this.groups, 'touchedAll');\n }\n get untouched() {\n return !this.touched;\n }\n get untouchedAll() {\n return !this.touchedAll;\n }\n get dirty() {\n return groupPartialChecked(this.groups, 'dirty');\n }\n get dirtyAll() {\n return groupAllChecked(this.groups, 'dirtyAll');\n }\n get pristine() {\n return !this.dirty;\n }\n get pristineAll() {\n return !this.dirtyAll;\n }\n get disabled() {\n return this.currentDisabled;\n }\n get enabled() {\n return !this.currentDisabled;\n }\n get valid() {\n return this.currentValid && groupAllChecked(this.groups, 'valid');\n }\n get invalid() {\n return !this.currentValid;\n }\n get value() {\n return this.groups.map(({ value: state }) => state);\n }\n get error() {\n return this.currentError;\n }\n get errors() {\n return this.currentErrors;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n this.refresh(this.initialState);\n }\n disable() {\n this.currentDisabled = true;\n }\n enable() {\n this.currentDisabled = false;\n }\n push(group) {\n this.subscription(group);\n this.refresh([...this.groups, group]);\n }\n merge(groups) {\n groups.forEach((group) => {\n this.subscription(group);\n });\n this.refresh([...this.groups, ...groups]);\n }\n set(groups) {\n this.currentGroups.forEach(({ uuid }) => {\n this.unsusbcriptions.delete(uuid);\n });\n groups.forEach((group) => {\n this.subscription(group);\n });\n this.refresh(groups); // Update groups\n }\n remove({ uuid }) {\n this.refresh(this.groups.filter((group) => group.uuid !== uuid));\n }\n setValidators(validators) {\n this.validators = validators;\n this.updateValidityStatus(this.groups, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n subscription(group) {\n const unsusbcription = group.subscribe(() => {\n this.updateValidityStatus(this.groups, this.validators);\n });\n this.unsusbcriptions.set(group.uuid, unsusbcription);\n }\n updateValidityStatus(groups, validators) {\n if (validators) {\n const errors = arrayIsValid({ groups, validators });\n this.currentErrors = errors;\n this.currentError = errors[0];\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentValid = true;\n this.currentErrors = [];\n this.currentError = undefined;\n }\n }\n refresh(newGroups) {\n const groups = newGroups || [];\n this.currentGroups = groups;\n this.updateValidityStatus(groups, this.validators);\n }\n}\nexport function formArray(options, validators) {\n return new FormArray(createFormArrayOptions(options, validators));\n}\n//# sourceMappingURL=form-array.js.map"],"names":["parseBoolean","observable","uuid"],"mappings":";;;;;;;AAAA,SAAS,kBAAkB,CAAC,OAAO,EAAE;AACrC,IAAI,QAAQ,OAAO,OAAO,KAAK,QAAQ;AACvC,SAAS,OAAO,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,CAAC,EAAE;AACzD,CAAC;AACD,SAAS,gBAAgB,CAAC,OAAO,EAAE;AACnC,IAAI,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,UAAU,IAAI,OAAO,CAAC;AAChE,CAAC;AACD,SAAS,gBAAgB,CAAC,OAAO,EAAE;AACnC,IAAI,QAAQ,OAAO,OAAO,KAAK,QAAQ;AACvC,SAAS,QAAQ,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,CAAC,EAAE;AAC1D,CAAC;AACM,SAAS,wBAAwB,CAAC,GAAG,cAAc,EAAE;AAC5D,IAAI,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,cAAc,CAAC;AACjD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC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,OAAO,CAAC,SAAS,EAAE;AACvB,QAAQ,MAAM,MAAM,GAAG,SAAS,IAAI,EAAE,CAAC;AACvC,QAAQ,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;AACpC,QAAQ,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAC3D,KAAK;AACL,CAAC;AACM,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE;AAC/C,IAAI,OAAO,IAAI,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACtE;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../esm/arguments.js","../esm/helpers.js","../esm/form-control.js","../esm/form-array/form-array-control.js","../esm/form-group.js","../esm/form-array/form-array-group.js","../esm/form-array/form-array-list.js","../esm/form-array/form-array.js"],"sourcesContent":["function itIsControlOptions(options) {\n return (typeof options === 'object' &&\n ('value' in options || 'validators' in options));\n}\nfunction itIsGroupOptions(options) {\n return typeof options === 'object' && 'controls' in options;\n}\nfunction itIsArrayOptions(options) {\n return (typeof options === 'object' &&\n ('groups' in options || 'validators' in options));\n}\nexport function createFormControlOptions(...controlOptions) {\n const [options, validators] = controlOptions;\n if (!options) {\n return { value: options, validators };\n }\n if (!validators && itIsControlOptions(options)) {\n return options;\n }\n return {\n value: options,\n validators\n };\n}\nexport function createFormGroupOptions(...groupOptions) {\n const [options, validators] = groupOptions;\n if (!validators && itIsGroupOptions(options)) {\n return options;\n }\n return {\n controls: options,\n validators\n };\n}\nexport function createFormArrayOptions(...arrayOptions) {\n const [options, validators] = arrayOptions;\n if (!options) {\n return { groups: options, validators };\n }\n if (!validators && itIsArrayOptions(options)) {\n return options;\n }\n return {\n groups: options,\n validators\n };\n}\n//# sourceMappingURL=arguments.js.map","import { parseBoolean } from '@rolster/commons';\nfunction reduceErrors(errors) {\n return errors.reduce((keys, { id }) => [...keys, id], []);\n}\nexport const controlIsValid = ({ value, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(value);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport const controlsAllChecked = (controls, key) => {\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value && parseBoolean(control[key]), true);\n};\nexport const controlsPartialChecked = (controls, key) => {\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value || parseBoolean(control[key]), false);\n};\nexport const controlsToValue = (controls) => {\n return Object.entries(controls).reduce((result, [key, { value }]) => {\n result[key] = value;\n return result;\n }, {});\n};\nexport const groupIsValid = ({ controls, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(controls);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport function groupAllChecked(groups, key) {\n return groups.reduce((value, group) => value && parseBoolean(group[key]), true);\n}\nexport function groupPartialChecked(groups, key) {\n return groups.reduce((value, group) => value || parseBoolean(group[key]), false);\n}\nexport const arrayIsValid = ({ groups, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(groups);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport function hasError(errors, key) {\n return reduceErrors(errors).includes(key);\n}\nexport function someErrors(errors, keys) {\n return reduceErrors(errors).some((key) => keys.includes(key));\n}\n//# sourceMappingURL=helpers.js.map","import { observable } from '@rolster/commons';\nimport { createFormControlOptions } from './arguments';\nimport { controlIsValid, hasError, someErrors } from './helpers';\nexport class FormControl {\n constructor(controlOptions, controlValidators) {\n this.currentFocused = false;\n this.currentTouched = false;\n this.currentDirty = false;\n this.currentDisabled = false;\n this.currentValid = true;\n this.currentErrors = [];\n const { value, validators } = createFormControlOptions(controlOptions, controlValidators);\n this.observable = observable(value);\n this.initialValue = value;\n this.validators = validators;\n this.currentValue = value;\n this.updateValueAndValidity(value, validators);\n }\n get focused() {\n return this.currentFocused;\n }\n get unfocused() {\n return !this.currentFocused;\n }\n get touched() {\n return this.currentTouched;\n }\n get untouched() {\n return !this.currentTouched;\n }\n get dirty() {\n return this.currentDirty;\n }\n get pristine() {\n return !this.currentDirty;\n }\n get disabled() {\n return this.currentDisabled;\n }\n get enabled() {\n return !this.currentDisabled;\n }\n get valid() {\n return this.currentValid;\n }\n get invalid() {\n return !this.currentValid;\n }\n get value() {\n return this.currentValue;\n }\n get errors() {\n return this.currentErrors;\n }\n get error() {\n return this.currentError;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n this.setValue(this.initialValue);\n this.currentDirty = false;\n this.currentTouched = false;\n }\n focus() {\n this.currentFocused = true;\n }\n blur() {\n this.currentFocused = false;\n this.currentTouched = true;\n }\n disable() {\n this.currentDisabled = true;\n }\n enable() {\n this.currentDisabled = false;\n }\n touch() {\n this.currentTouched = true;\n }\n setInitialValue(value) {\n this.initialValue = value;\n this.setValue(value);\n }\n setValue(value) {\n if (this.enabled) {\n this.currentValue = value;\n this.currentDirty = true;\n this.updateValueAndValidity(value, this.validators);\n this.observable.next(value);\n }\n }\n setValidators(validators = []) {\n this.validators = validators;\n this.updateValueAndValidity(this.value, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n updateValueAndValidity(value, validators) {\n if (validators) {\n const errors = controlIsValid({ value, validators });\n this.currentError = errors[0];\n this.currentErrors = errors;\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentValid = true;\n this.currentError = undefined;\n this.currentErrors = [];\n }\n }\n}\nexport function formControl(options, validators) {\n return new FormControl(createFormControlOptions(options, validators));\n}\n//# sourceMappingURL=form-control.js.map","import { v4 as uuid } from 'uuid';\nimport { createFormControlOptions } from '../arguments';\nimport { FormControl } from '../form-control';\nexport class FormArrayControl extends FormControl {\n constructor(controlOptions, controlValidators) {\n const { value, validators } = createFormControlOptions(controlOptions, controlValidators);\n super(value, validators);\n this.uuid = uuid();\n }\n}\nexport function formArrayControl(options, validators) {\n return new FormArrayControl(createFormControlOptions(options, validators));\n}\n//# sourceMappingURL=form-array-control.js.map","import { observable } from '@rolster/commons';\nimport { createFormGroupOptions } from './arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from './helpers';\nexport class FormGroup {\n constructor(groupOptions, groupValidators) {\n this.currentErrors = [];\n this.currentValid = true;\n const { controls, validators } = createFormGroupOptions(groupOptions, groupValidators);\n this.currentControls = controls;\n this.validators = validators;\n this.updateValueAndValidity(controls, validators);\n this.observable = observable(this.value);\n Object.values(controls).forEach((control) => {\n control.subscribe(() => {\n this.updateValueAndValidity(this.controls, this.validators);\n this.observable.next(this.value);\n });\n });\n }\n get controls() {\n return this.currentControls;\n }\n get touched() {\n return controlsPartialChecked(this.controls, 'touched');\n }\n get touchedAll() {\n return controlsAllChecked(this.controls, 'touched');\n }\n get untouched() {\n return !this.touched;\n }\n get untouchedAll() {\n return !this.touchedAll;\n }\n get dirty() {\n return controlsPartialChecked(this.controls, 'dirty');\n }\n get dirtyAll() {\n return controlsAllChecked(this.controls, 'dirty');\n }\n get pristine() {\n return !this.dirty;\n }\n get pristineAll() {\n return this.dirtyAll;\n }\n get valid() {\n return this.currentValid && controlsAllChecked(this.controls, 'valid');\n }\n get invalid() {\n return !this.valid;\n }\n get value() {\n return controlsToValue(this.controls);\n }\n get errors() {\n return this.currentErrors;\n }\n get error() {\n return this.currentError;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n reset() {\n Object.values(this.controls).forEach((control) => {\n control.reset();\n });\n }\n setValidators(validators) {\n this.validators = validators;\n this.updateValueAndValidity(this.controls, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n updateValueAndValidity(controls, validators) {\n if (validators) {\n const errors = groupIsValid({ controls, validators });\n this.currentErrors = errors;\n this.currentError = errors[0];\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentErrors = [];\n this.currentError = undefined;\n this.currentValid = true;\n }\n }\n}\nexport function formGroup(options, validators) {\n return new FormGroup(createFormGroupOptions(options, validators));\n}\n//# sourceMappingURL=form-group.js.map","import { v4 as uuid } from 'uuid';\nimport { createFormGroupOptions } from '../arguments';\nimport { FormGroup } from '../form-group';\nexport class FormArrayGroup extends FormGroup {\n constructor(groupOptions, groupValidators) {\n const { controls, resource, validators } = createFormGroupOptions(groupOptions, groupValidators);\n super(controls, validators);\n this.uuid = uuid();\n this.resource = resource;\n }\n}\nexport function formArrayGroup(options, validators) {\n return new FormArrayGroup(createFormGroupOptions(options, validators));\n}\n//# sourceMappingURL=form-array-group.js.map","import { v4 as uuid } from 'uuid';\nimport { FormControl } from '../form-control';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue } from '../helpers';\nexport class FormArrayList extends FormControl {\n constructor(valueToControls, value, validators) {\n const initialValue = value || [];\n super(initialValue, validators);\n this.valueToControls = valueToControls;\n this.currentControls = initialValue.map((value) => this.createControls(value));\n this.uuid = uuid();\n }\n get controls() {\n return this.currentControls;\n }\n get touched() {\n return this.controls.reduce((valid, controls) => valid && controlsPartialChecked(controls, 'touched'), true);\n }\n get dirty() {\n return this.controls.reduce((valid, controls) => valid && controlsPartialChecked(controls, 'dirty'), true);\n }\n get valid() {\n return (this.currentValid &&\n this.controls.reduce((valid, controls) => valid && controlsAllChecked(controls, 'valid'), true));\n }\n get value() {\n return this.controls.map((controls) => controlsToValue(controls));\n }\n setValue(values) {\n this.currentControls = values.map((value) => this.createControls(value));\n }\n push(controls) {\n this.currentControls = this.currentControls.concat([controls]);\n }\n remove(controls) {\n this.currentControls = this.currentControls.filter((currentControls) => currentControls !== controls);\n }\n createControls(value) {\n const controls = this.valueToControls(value);\n Object.values(controls).forEach((control) => {\n control.subscribe(() => {\n const { value, validators } = this;\n this.updateValueAndValidity(value, validators);\n this.observable.next(value);\n });\n });\n return controls;\n }\n}\nexport function formArrayList(valueToControl, value, validators) {\n return new FormArrayList(valueToControl, value, validators);\n}\n//# sourceMappingURL=form-array-list.js.map","import { observable } from '@rolster/commons';\nimport { createFormArrayOptions } from '../arguments';\nimport { arrayIsValid, groupAllChecked, groupPartialChecked, hasError, someErrors } from '../helpers';\nexport class FormArray {\n constructor(arrayOptions, arrayValidators) {\n this.currentGroups = [];\n this.currentValid = true;\n this.currentDisabled = false;\n this.currentErrors = [];\n const { groups, validators } = createFormArrayOptions(arrayOptions, arrayValidators);\n this.unsusbcriptions = new Map();\n this.initialValue = groups;\n this.validators = validators;\n this.refresh(this.initialValue);\n this.observable = observable(this.value);\n groups?.forEach((group) => {\n this.subscription(group);\n });\n }\n get groups() {\n return this.currentGroups;\n }\n get controls() {\n return this.groups.map(({ controls }) => controls);\n }\n get touched() {\n return groupPartialChecked(this.groups, 'touched');\n }\n get touchedAll() {\n return groupAllChecked(this.groups, 'touchedAll');\n }\n get untouched() {\n return !this.touched;\n }\n get untouchedAll() {\n return !this.touchedAll;\n }\n get dirty() {\n return groupPartialChecked(this.groups, 'dirty');\n }\n get dirtyAll() {\n return groupAllChecked(this.groups, 'dirtyAll');\n }\n get pristine() {\n return !this.dirty;\n }\n get pristineAll() {\n return !this.dirtyAll;\n }\n get disabled() {\n return this.currentDisabled;\n }\n get enabled() {\n return !this.currentDisabled;\n }\n get valid() {\n return this.currentValid && groupAllChecked(this.groups, 'valid');\n }\n get invalid() {\n return !this.currentValid;\n }\n get value() {\n return this.groups.map(({ value: state }) => state);\n }\n get error() {\n return this.currentError;\n }\n get errors() {\n return this.currentErrors;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n this.refresh(this.initialValue);\n }\n disable() {\n this.currentDisabled = true;\n }\n enable() {\n this.currentDisabled = false;\n }\n push(group) {\n this.subscription(group);\n this.refresh([...this.groups, group]);\n }\n merge(groups) {\n groups.forEach((group) => {\n this.subscription(group);\n });\n this.refresh([...this.groups, ...groups]);\n }\n setInitialValue(groups) {\n this.initialValue = groups;\n this.setValue(groups);\n }\n setValue(groups) {\n this.currentGroups.forEach(({ uuid }) => {\n this.unsusbcriptions.delete(uuid);\n });\n groups.forEach((group) => {\n this.subscription(group);\n });\n this.refresh(groups); // Update groups\n }\n remove({ uuid }) {\n this.refresh(this.groups.filter((group) => group.uuid !== uuid));\n }\n setValidators(validators) {\n this.validators = validators;\n this.updateValidityStatus(this.groups, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n subscription(group) {\n const unsusbcription = group.subscribe(() => {\n this.updateValidityStatus(this.groups, this.validators);\n });\n this.unsusbcriptions.set(group.uuid, unsusbcription);\n }\n updateValidityStatus(groups, validators) {\n if (validators) {\n const errors = arrayIsValid({ groups, validators });\n this.currentErrors = errors;\n this.currentError = errors[0];\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentValid = true;\n this.currentErrors = [];\n this.currentError = undefined;\n }\n }\n refresh(newGroups) {\n const groups = newGroups || [];\n this.currentGroups = groups;\n this.updateValidityStatus(groups, this.validators);\n }\n}\nexport function formArray(options, validators) {\n return new FormArray(createFormArrayOptions(options, validators));\n}\n//# sourceMappingURL=form-array.js.map"],"names":["parseBoolean","observable","uuid"],"mappings":";;;;;;;AAAA,SAAS,kBAAkB,CAAC,OAAO,EAAE;AACrC,IAAI,QAAQ,OAAO,OAAO,KAAK,QAAQ;AACvC,SAAS,OAAO,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,CAAC,EAAE;AACzD,CAAC;AACD,SAAS,gBAAgB,CAAC,OAAO,EAAE;AACnC,IAAI,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,UAAU,IAAI,OAAO,CAAC;AAChE,CAAC;AACD,SAAS,gBAAgB,CAAC,OAAO,EAAE;AACnC,IAAI,QAAQ,OAAO,OAAO,KAAK,QAAQ;AACvC,SAAS,QAAQ,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,CAAC,EAAE;AAC1D,CAAC;AACM,SAAS,wBAAwB,CAAC,GAAG,cAAc,EAAE;AAC5D,IAAI,MAAM,CAAC,OAAO,EA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GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;AAChE,YAAY,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;AACxC,YAAY,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1C,YAAY,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;AACpD,SAAS;AACT,aAAa;AACb,YAAY,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;AACrC,YAAY,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;AACpC,YAAY,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;AAC1C,SAAS;AACT,KAAK;AACL,IAAI,OAAO,CAAC,SAAS,EAAE;AACvB,QAAQ,MAAM,MAAM,GAAG,SAAS,IAAI,EAAE,CAAC;AACvC,QAAQ,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;AACpC,QAAQ,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAC3D,KAAK;AACL,CAAC;AACM,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE;AAC/C,IAAI,OAAO,IAAI,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACtE;;;;;;;;;;;;;;;"}
|
package/dist/es/index.js
CHANGED
|
@@ -188,6 +188,10 @@ class FormControl {
|
|
|
188
188
|
touch() {
|
|
189
189
|
this.currentTouched = true;
|
|
190
190
|
}
|
|
191
|
+
setInitialValue(value) {
|
|
192
|
+
this.initialValue = value;
|
|
193
|
+
this.setValue(value);
|
|
194
|
+
}
|
|
191
195
|
setValue(value) {
|
|
192
196
|
if (this.enabled) {
|
|
193
197
|
this.currentValue = value;
|
|
@@ -392,9 +396,9 @@ class FormArray {
|
|
|
392
396
|
this.currentErrors = [];
|
|
393
397
|
const { groups, validators } = createFormArrayOptions(arrayOptions, arrayValidators);
|
|
394
398
|
this.unsusbcriptions = new Map();
|
|
395
|
-
this.
|
|
399
|
+
this.initialValue = groups;
|
|
396
400
|
this.validators = validators;
|
|
397
|
-
this.refresh(this.
|
|
401
|
+
this.refresh(this.initialValue);
|
|
398
402
|
this.observable = observable(this.value);
|
|
399
403
|
groups?.forEach((group) => {
|
|
400
404
|
this.subscription(group);
|
|
@@ -461,7 +465,7 @@ class FormArray {
|
|
|
461
465
|
return someErrors(this.errors, keys);
|
|
462
466
|
}
|
|
463
467
|
reset() {
|
|
464
|
-
this.refresh(this.
|
|
468
|
+
this.refresh(this.initialValue);
|
|
465
469
|
}
|
|
466
470
|
disable() {
|
|
467
471
|
this.currentDisabled = true;
|
|
@@ -479,7 +483,11 @@ class FormArray {
|
|
|
479
483
|
});
|
|
480
484
|
this.refresh([...this.groups, ...groups]);
|
|
481
485
|
}
|
|
482
|
-
|
|
486
|
+
setInitialValue(groups) {
|
|
487
|
+
this.initialValue = groups;
|
|
488
|
+
this.setValue(groups);
|
|
489
|
+
}
|
|
490
|
+
setValue(groups) {
|
|
483
491
|
this.currentGroups.forEach(({ uuid }) => {
|
|
484
492
|
this.unsusbcriptions.delete(uuid);
|
|
485
493
|
});
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../esm/arguments.js","../esm/helpers.js","../esm/form-control.js","../esm/form-array/form-array-control.js","../esm/form-group.js","../esm/form-array/form-array-group.js","../esm/form-array/form-array-list.js","../esm/form-array/form-array.js"],"sourcesContent":["function itIsControlOptions(options) {\n return (typeof options === 'object' &&\n ('value' in options || 'validators' in options));\n}\nfunction itIsGroupOptions(options) {\n return typeof options === 'object' && 'controls' in options;\n}\nfunction itIsArrayOptions(options) {\n return (typeof options === 'object' &&\n ('groups' in options || 'validators' in options));\n}\nexport function createFormControlOptions(...controlOptions) {\n const [options, validators] = controlOptions;\n if (!options) {\n return { value: options, validators };\n }\n if (!validators && itIsControlOptions(options)) {\n return options;\n }\n return {\n value: options,\n validators\n };\n}\nexport function createFormGroupOptions(...groupOptions) {\n const [options, validators] = groupOptions;\n if (!validators && itIsGroupOptions(options)) {\n return options;\n }\n return {\n controls: options,\n validators\n };\n}\nexport function createFormArrayOptions(...arrayOptions) {\n const [options, validators] = arrayOptions;\n if (!options) {\n return { groups: options, validators };\n }\n if (!validators && itIsArrayOptions(options)) {\n return options;\n }\n return {\n groups: options,\n validators\n };\n}\n//# sourceMappingURL=arguments.js.map","import { parseBoolean } from '@rolster/commons';\nfunction reduceErrors(errors) {\n return errors.reduce((keys, { id }) => [...keys, id], []);\n}\nexport const controlIsValid = ({ value, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(value);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport const controlsAllChecked = (controls, key) => {\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value && parseBoolean(control[key]), true);\n};\nexport const controlsPartialChecked = (controls, key) => {\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value || parseBoolean(control[key]), false);\n};\nexport const controlsToValue = (controls) => {\n return Object.entries(controls).reduce((result, [key, { value }]) => {\n result[key] = value;\n return result;\n }, {});\n};\nexport const groupIsValid = ({ controls, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(controls);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport function groupAllChecked(groups, key) {\n return groups.reduce((value, group) => value && parseBoolean(group[key]), true);\n}\nexport function groupPartialChecked(groups, key) {\n return groups.reduce((value, group) => value || parseBoolean(group[key]), false);\n}\nexport const arrayIsValid = ({ groups, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(groups);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport function hasError(errors, key) {\n return reduceErrors(errors).includes(key);\n}\nexport function someErrors(errors, keys) {\n return reduceErrors(errors).some((key) => keys.includes(key));\n}\n//# sourceMappingURL=helpers.js.map","import { observable } from '@rolster/commons';\nimport { createFormControlOptions } from './arguments';\nimport { controlIsValid, hasError, someErrors } from './helpers';\nexport class FormControl {\n constructor(controlOptions, controlValidators) {\n this.currentFocused = false;\n this.currentTouched = false;\n this.currentDirty = false;\n this.currentDisabled = false;\n this.currentValid = true;\n this.currentErrors = [];\n const { value, validators } = createFormControlOptions(controlOptions, controlValidators);\n this.observable = observable(value);\n this.initialValue = value;\n this.validators = validators;\n this.currentValue = value;\n this.updateValueAndValidity(value, validators);\n }\n get focused() {\n return this.currentFocused;\n }\n get unfocused() {\n return !this.currentFocused;\n }\n get touched() {\n return this.currentTouched;\n }\n get untouched() {\n return !this.currentTouched;\n }\n get dirty() {\n return this.currentDirty;\n }\n get pristine() {\n return !this.currentDirty;\n }\n get disabled() {\n return this.currentDisabled;\n }\n get enabled() {\n return !this.currentDisabled;\n }\n get valid() {\n return this.currentValid;\n }\n get invalid() {\n return !this.currentValid;\n }\n get value() {\n return this.currentValue;\n }\n get errors() {\n return this.currentErrors;\n }\n get error() {\n return this.currentError;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n this.setValue(this.initialValue);\n this.currentDirty = false;\n this.currentTouched = false;\n }\n focus() {\n this.currentFocused = true;\n }\n blur() {\n this.currentFocused = false;\n this.currentTouched = true;\n }\n disable() {\n this.currentDisabled = true;\n }\n enable() {\n this.currentDisabled = false;\n }\n touch() {\n this.currentTouched = true;\n }\n setValue(value) {\n if (this.enabled) {\n this.currentValue = value;\n this.currentDirty = true;\n this.updateValueAndValidity(value, this.validators);\n this.observable.next(value);\n }\n }\n setValidators(validators = []) {\n this.validators = validators;\n this.updateValueAndValidity(this.value, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n updateValueAndValidity(value, validators) {\n if (validators) {\n const errors = controlIsValid({ value, validators });\n this.currentError = errors[0];\n this.currentErrors = errors;\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentValid = true;\n this.currentError = undefined;\n this.currentErrors = [];\n }\n }\n}\nexport function formControl(options, validators) {\n return new FormControl(createFormControlOptions(options, validators));\n}\n//# sourceMappingURL=form-control.js.map","import { v4 as uuid } from 'uuid';\nimport { createFormControlOptions } from '../arguments';\nimport { FormControl } from '../form-control';\nexport class FormArrayControl extends FormControl {\n constructor(controlOptions, controlValidators) {\n const { value, validators } = createFormControlOptions(controlOptions, controlValidators);\n super(value, validators);\n this.uuid = uuid();\n }\n}\nexport function formArrayControl(options, validators) {\n return new FormArrayControl(createFormControlOptions(options, validators));\n}\n//# sourceMappingURL=form-array-control.js.map","import { observable } from '@rolster/commons';\nimport { createFormGroupOptions } from './arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from './helpers';\nexport class FormGroup {\n constructor(groupOptions, groupValidators) {\n this.currentErrors = [];\n this.currentValid = true;\n const { controls, validators } = createFormGroupOptions(groupOptions, groupValidators);\n this.currentControls = controls;\n this.validators = validators;\n this.updateValueAndValidity(controls, validators);\n this.observable = observable(this.value);\n Object.values(controls).forEach((control) => {\n control.subscribe(() => {\n this.updateValueAndValidity(this.controls, this.validators);\n this.observable.next(this.value);\n });\n });\n }\n get controls() {\n return this.currentControls;\n }\n get touched() {\n return controlsPartialChecked(this.controls, 'touched');\n }\n get touchedAll() {\n return controlsAllChecked(this.controls, 'touched');\n }\n get untouched() {\n return !this.touched;\n }\n get untouchedAll() {\n return !this.touchedAll;\n }\n get dirty() {\n return controlsPartialChecked(this.controls, 'dirty');\n }\n get dirtyAll() {\n return controlsAllChecked(this.controls, 'dirty');\n }\n get pristine() {\n return !this.dirty;\n }\n get pristineAll() {\n return this.dirtyAll;\n }\n get valid() {\n return this.currentValid && controlsAllChecked(this.controls, 'valid');\n }\n get invalid() {\n return !this.valid;\n }\n get value() {\n return controlsToValue(this.controls);\n }\n get errors() {\n return this.currentErrors;\n }\n get error() {\n return this.currentError;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n reset() {\n Object.values(this.controls).forEach((control) => {\n control.reset();\n });\n }\n setValidators(validators) {\n this.validators = validators;\n this.updateValueAndValidity(this.controls, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n updateValueAndValidity(controls, validators) {\n if (validators) {\n const errors = groupIsValid({ controls, validators });\n this.currentErrors = errors;\n this.currentError = errors[0];\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentErrors = [];\n this.currentError = undefined;\n this.currentValid = true;\n }\n }\n}\nexport function formGroup(options, validators) {\n return new FormGroup(createFormGroupOptions(options, validators));\n}\n//# sourceMappingURL=form-group.js.map","import { v4 as uuid } from 'uuid';\nimport { createFormGroupOptions } from '../arguments';\nimport { FormGroup } from '../form-group';\nexport class FormArrayGroup extends FormGroup {\n constructor(groupOptions, groupValidators) {\n const { controls, resource, validators } = createFormGroupOptions(groupOptions, groupValidators);\n super(controls, validators);\n this.uuid = uuid();\n this.resource = resource;\n }\n}\nexport function formArrayGroup(options, validators) {\n return new FormArrayGroup(createFormGroupOptions(options, validators));\n}\n//# sourceMappingURL=form-array-group.js.map","import { v4 as uuid } from 'uuid';\nimport { FormControl } from '../form-control';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue } from '../helpers';\nexport class FormArrayList extends FormControl {\n constructor(valueToControls, value, validators) {\n const initialValue = value || [];\n super(initialValue, validators);\n this.valueToControls = valueToControls;\n this.currentControls = initialValue.map((value) => this.createControls(value));\n this.uuid = uuid();\n }\n get controls() {\n return this.currentControls;\n }\n get touched() {\n return this.controls.reduce((valid, controls) => valid && controlsPartialChecked(controls, 'touched'), true);\n }\n get dirty() {\n return this.controls.reduce((valid, controls) => valid && controlsPartialChecked(controls, 'dirty'), true);\n }\n get valid() {\n return (this.currentValid &&\n this.controls.reduce((valid, controls) => valid && controlsAllChecked(controls, 'valid'), true));\n }\n get value() {\n return this.controls.map((controls) => controlsToValue(controls));\n }\n setValue(values) {\n this.currentControls = values.map((value) => this.createControls(value));\n }\n push(controls) {\n this.currentControls = this.currentControls.concat([controls]);\n }\n remove(controls) {\n this.currentControls = this.currentControls.filter((currentControls) => currentControls !== controls);\n }\n createControls(value) {\n const controls = this.valueToControls(value);\n Object.values(controls).forEach((control) => {\n control.subscribe(() => {\n const { value, validators } = this;\n this.updateValueAndValidity(value, validators);\n this.observable.next(value);\n });\n });\n return controls;\n }\n}\nexport function formArrayList(valueToControl, value, validators) {\n return new FormArrayList(valueToControl, value, validators);\n}\n//# sourceMappingURL=form-array-list.js.map","import { observable } from '@rolster/commons';\nimport { createFormArrayOptions } from '../arguments';\nimport { arrayIsValid, groupAllChecked, groupPartialChecked, hasError, someErrors } from '../helpers';\nexport class FormArray {\n constructor(arrayOptions, arrayValidators) {\n this.currentGroups = [];\n this.currentValid = true;\n this.currentDisabled = false;\n this.currentErrors = [];\n const { groups, validators } = createFormArrayOptions(arrayOptions, arrayValidators);\n this.unsusbcriptions = new Map();\n this.initialState = groups;\n this.validators = validators;\n this.refresh(this.initialState);\n this.observable = observable(this.value);\n groups?.forEach((group) => {\n this.subscription(group);\n });\n }\n get groups() {\n return this.currentGroups;\n }\n get controls() {\n return this.groups.map(({ controls }) => controls);\n }\n get touched() {\n return groupPartialChecked(this.groups, 'touched');\n }\n get touchedAll() {\n return groupAllChecked(this.groups, 'touchedAll');\n }\n get untouched() {\n return !this.touched;\n }\n get untouchedAll() {\n return !this.touchedAll;\n }\n get dirty() {\n return groupPartialChecked(this.groups, 'dirty');\n }\n get dirtyAll() {\n return groupAllChecked(this.groups, 'dirtyAll');\n }\n get pristine() {\n return !this.dirty;\n }\n get pristineAll() {\n return !this.dirtyAll;\n }\n get disabled() {\n return this.currentDisabled;\n }\n get enabled() {\n return !this.currentDisabled;\n }\n get valid() {\n return this.currentValid && groupAllChecked(this.groups, 'valid');\n }\n get invalid() {\n return !this.currentValid;\n }\n get value() {\n return this.groups.map(({ value: state }) => state);\n }\n get error() {\n return this.currentError;\n }\n get errors() {\n return this.currentErrors;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n this.refresh(this.initialState);\n }\n disable() {\n this.currentDisabled = true;\n }\n enable() {\n this.currentDisabled = false;\n }\n push(group) {\n this.subscription(group);\n this.refresh([...this.groups, group]);\n }\n merge(groups) {\n groups.forEach((group) => {\n this.subscription(group);\n });\n this.refresh([...this.groups, ...groups]);\n }\n set(groups) {\n this.currentGroups.forEach(({ uuid }) => {\n this.unsusbcriptions.delete(uuid);\n });\n groups.forEach((group) => {\n this.subscription(group);\n });\n this.refresh(groups); // Update groups\n }\n remove({ uuid }) {\n this.refresh(this.groups.filter((group) => group.uuid !== uuid));\n }\n setValidators(validators) {\n this.validators = validators;\n this.updateValidityStatus(this.groups, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n subscription(group) {\n const unsusbcription = group.subscribe(() => {\n this.updateValidityStatus(this.groups, this.validators);\n });\n this.unsusbcriptions.set(group.uuid, unsusbcription);\n }\n updateValidityStatus(groups, validators) {\n if (validators) {\n const errors = arrayIsValid({ groups, validators });\n this.currentErrors = errors;\n this.currentError = errors[0];\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentValid = true;\n this.currentErrors = [];\n this.currentError = undefined;\n }\n }\n refresh(newGroups) {\n const groups = newGroups || [];\n this.currentGroups = groups;\n this.updateValidityStatus(groups, this.validators);\n }\n}\nexport function formArray(options, validators) {\n return new FormArray(createFormArrayOptions(options, validators));\n}\n//# sourceMappingURL=form-array.js.map"],"names":["uuid"],"mappings":";;;AAAA,SAAS,kBAAkB,CAAC,OAAO,EAAE;AACrC,IAAI,QAAQ,OAAO,OAAO,KAAK,QAAQ;AACvC,SAAS,OAAO,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,CAAC,EAAE;AACzD,CAAC;AACD,SAAS,gBAAgB,CAAC,OAAO,EAAE;AACnC,IAAI,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,U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CAAC;AAChE,YAAY,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;AACxC,YAAY,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1C,YAAY,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;AACpD,SAAS;AACT,aAAa;AACb,YAAY,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;AACrC,YAAY,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;AACpC,YAAY,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;AAC1C,SAAS;AACT,KAAK;AACL,IAAI,OAAO,CAAC,SAAS,EAAE;AACvB,QAAQ,MAAM,MAAM,GAAG,SAAS,IAAI,EAAE,CAAC;AACvC,QAAQ,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;AACpC,QAAQ,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAC3D,KAAK;AACL,CAAC;AACM,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE;AAC/C,IAAI,OAAO,IAAI,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACtE;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../esm/arguments.js","../esm/helpers.js","../esm/form-control.js","../esm/form-array/form-array-control.js","../esm/form-group.js","../esm/form-array/form-array-group.js","../esm/form-array/form-array-list.js","../esm/form-array/form-array.js"],"sourcesContent":["function itIsControlOptions(options) {\n return (typeof options === 'object' &&\n ('value' in options || 'validators' in options));\n}\nfunction itIsGroupOptions(options) {\n return typeof options === 'object' && 'controls' in options;\n}\nfunction itIsArrayOptions(options) {\n return (typeof options === 'object' &&\n ('groups' in options || 'validators' in options));\n}\nexport function createFormControlOptions(...controlOptions) {\n const [options, validators] = controlOptions;\n if (!options) {\n return { value: options, validators };\n }\n if (!validators && itIsControlOptions(options)) {\n return options;\n }\n return {\n value: options,\n validators\n };\n}\nexport function createFormGroupOptions(...groupOptions) {\n const [options, validators] = groupOptions;\n if (!validators && itIsGroupOptions(options)) {\n return options;\n }\n return {\n controls: options,\n validators\n };\n}\nexport function createFormArrayOptions(...arrayOptions) {\n const [options, validators] = arrayOptions;\n if (!options) {\n return { groups: options, validators };\n }\n if (!validators && itIsArrayOptions(options)) {\n return options;\n }\n return {\n groups: options,\n validators\n };\n}\n//# sourceMappingURL=arguments.js.map","import { parseBoolean } from '@rolster/commons';\nfunction reduceErrors(errors) {\n return errors.reduce((keys, { id }) => [...keys, id], []);\n}\nexport const controlIsValid = ({ value, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(value);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport const controlsAllChecked = (controls, key) => {\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value && parseBoolean(control[key]), true);\n};\nexport const controlsPartialChecked = (controls, key) => {\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value || parseBoolean(control[key]), false);\n};\nexport const controlsToValue = (controls) => {\n return Object.entries(controls).reduce((result, [key, { value }]) => {\n result[key] = value;\n return result;\n }, {});\n};\nexport const groupIsValid = ({ controls, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(controls);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport function groupAllChecked(groups, key) {\n return groups.reduce((value, group) => value && parseBoolean(group[key]), true);\n}\nexport function groupPartialChecked(groups, key) {\n return groups.reduce((value, group) => value || parseBoolean(group[key]), false);\n}\nexport const arrayIsValid = ({ groups, validators }) => {\n return validators.reduce((errors, validator) => {\n const error = validator(groups);\n if (error) {\n errors.push(error);\n }\n return errors;\n }, []);\n};\nexport function hasError(errors, key) {\n return reduceErrors(errors).includes(key);\n}\nexport function someErrors(errors, keys) {\n return reduceErrors(errors).some((key) => keys.includes(key));\n}\n//# sourceMappingURL=helpers.js.map","import { observable } from '@rolster/commons';\nimport { createFormControlOptions } from './arguments';\nimport { controlIsValid, hasError, someErrors } from './helpers';\nexport class FormControl {\n constructor(controlOptions, controlValidators) {\n this.currentFocused = false;\n this.currentTouched = false;\n this.currentDirty = false;\n this.currentDisabled = false;\n this.currentValid = true;\n this.currentErrors = [];\n const { value, validators } = createFormControlOptions(controlOptions, controlValidators);\n this.observable = observable(value);\n this.initialValue = value;\n this.validators = validators;\n this.currentValue = value;\n this.updateValueAndValidity(value, validators);\n }\n get focused() {\n return this.currentFocused;\n }\n get unfocused() {\n return !this.currentFocused;\n }\n get touched() {\n return this.currentTouched;\n }\n get untouched() {\n return !this.currentTouched;\n }\n get dirty() {\n return this.currentDirty;\n }\n get pristine() {\n return !this.currentDirty;\n }\n get disabled() {\n return this.currentDisabled;\n }\n get enabled() {\n return !this.currentDisabled;\n }\n get valid() {\n return this.currentValid;\n }\n get invalid() {\n return !this.currentValid;\n }\n get value() {\n return this.currentValue;\n }\n get errors() {\n return this.currentErrors;\n }\n get error() {\n return this.currentError;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n this.setValue(this.initialValue);\n this.currentDirty = false;\n this.currentTouched = false;\n }\n focus() {\n this.currentFocused = true;\n }\n blur() {\n this.currentFocused = false;\n this.currentTouched = true;\n }\n disable() {\n this.currentDisabled = true;\n }\n enable() {\n this.currentDisabled = false;\n }\n touch() {\n this.currentTouched = true;\n }\n setInitialValue(value) {\n this.initialValue = value;\n this.setValue(value);\n }\n setValue(value) {\n if (this.enabled) {\n this.currentValue = value;\n this.currentDirty = true;\n this.updateValueAndValidity(value, this.validators);\n this.observable.next(value);\n }\n }\n setValidators(validators = []) {\n this.validators = validators;\n this.updateValueAndValidity(this.value, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n updateValueAndValidity(value, validators) {\n if (validators) {\n const errors = controlIsValid({ value, validators });\n this.currentError = errors[0];\n this.currentErrors = errors;\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentValid = true;\n this.currentError = undefined;\n this.currentErrors = [];\n }\n }\n}\nexport function formControl(options, validators) {\n return new FormControl(createFormControlOptions(options, validators));\n}\n//# sourceMappingURL=form-control.js.map","import { v4 as uuid } from 'uuid';\nimport { createFormControlOptions } from '../arguments';\nimport { FormControl } from '../form-control';\nexport class FormArrayControl extends FormControl {\n constructor(controlOptions, controlValidators) {\n const { value, validators } = createFormControlOptions(controlOptions, controlValidators);\n super(value, validators);\n this.uuid = uuid();\n }\n}\nexport function formArrayControl(options, validators) {\n return new FormArrayControl(createFormControlOptions(options, validators));\n}\n//# sourceMappingURL=form-array-control.js.map","import { observable } from '@rolster/commons';\nimport { createFormGroupOptions } from './arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from './helpers';\nexport class FormGroup {\n constructor(groupOptions, groupValidators) {\n this.currentErrors = [];\n this.currentValid = true;\n const { controls, validators } = createFormGroupOptions(groupOptions, groupValidators);\n this.currentControls = controls;\n this.validators = validators;\n this.updateValueAndValidity(controls, validators);\n this.observable = observable(this.value);\n Object.values(controls).forEach((control) => {\n control.subscribe(() => {\n this.updateValueAndValidity(this.controls, this.validators);\n this.observable.next(this.value);\n });\n });\n }\n get controls() {\n return this.currentControls;\n }\n get touched() {\n return controlsPartialChecked(this.controls, 'touched');\n }\n get touchedAll() {\n return controlsAllChecked(this.controls, 'touched');\n }\n get untouched() {\n return !this.touched;\n }\n get untouchedAll() {\n return !this.touchedAll;\n }\n get dirty() {\n return controlsPartialChecked(this.controls, 'dirty');\n }\n get dirtyAll() {\n return controlsAllChecked(this.controls, 'dirty');\n }\n get pristine() {\n return !this.dirty;\n }\n get pristineAll() {\n return this.dirtyAll;\n }\n get valid() {\n return this.currentValid && controlsAllChecked(this.controls, 'valid');\n }\n get invalid() {\n return !this.valid;\n }\n get value() {\n return controlsToValue(this.controls);\n }\n get errors() {\n return this.currentErrors;\n }\n get error() {\n return this.currentError;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n reset() {\n Object.values(this.controls).forEach((control) => {\n control.reset();\n });\n }\n setValidators(validators) {\n this.validators = validators;\n this.updateValueAndValidity(this.controls, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n updateValueAndValidity(controls, validators) {\n if (validators) {\n const errors = groupIsValid({ controls, validators });\n this.currentErrors = errors;\n this.currentError = errors[0];\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentErrors = [];\n this.currentError = undefined;\n this.currentValid = true;\n }\n }\n}\nexport function formGroup(options, validators) {\n return new FormGroup(createFormGroupOptions(options, validators));\n}\n//# sourceMappingURL=form-group.js.map","import { v4 as uuid } from 'uuid';\nimport { createFormGroupOptions } from '../arguments';\nimport { FormGroup } from '../form-group';\nexport class FormArrayGroup extends FormGroup {\n constructor(groupOptions, groupValidators) {\n const { controls, resource, validators } = createFormGroupOptions(groupOptions, groupValidators);\n super(controls, validators);\n this.uuid = uuid();\n this.resource = resource;\n }\n}\nexport function formArrayGroup(options, validators) {\n return new FormArrayGroup(createFormGroupOptions(options, validators));\n}\n//# sourceMappingURL=form-array-group.js.map","import { v4 as uuid } from 'uuid';\nimport { FormControl } from '../form-control';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue } from '../helpers';\nexport class FormArrayList extends FormControl {\n constructor(valueToControls, value, validators) {\n const initialValue = value || [];\n super(initialValue, validators);\n this.valueToControls = valueToControls;\n this.currentControls = initialValue.map((value) => this.createControls(value));\n this.uuid = uuid();\n }\n get controls() {\n return this.currentControls;\n }\n get touched() {\n return this.controls.reduce((valid, controls) => valid && controlsPartialChecked(controls, 'touched'), true);\n }\n get dirty() {\n return this.controls.reduce((valid, controls) => valid && controlsPartialChecked(controls, 'dirty'), true);\n }\n get valid() {\n return (this.currentValid &&\n this.controls.reduce((valid, controls) => valid && controlsAllChecked(controls, 'valid'), true));\n }\n get value() {\n return this.controls.map((controls) => controlsToValue(controls));\n }\n setValue(values) {\n this.currentControls = values.map((value) => this.createControls(value));\n }\n push(controls) {\n this.currentControls = this.currentControls.concat([controls]);\n }\n remove(controls) {\n this.currentControls = this.currentControls.filter((currentControls) => currentControls !== controls);\n }\n createControls(value) {\n const controls = this.valueToControls(value);\n Object.values(controls).forEach((control) => {\n control.subscribe(() => {\n const { value, validators } = this;\n this.updateValueAndValidity(value, validators);\n this.observable.next(value);\n });\n });\n return controls;\n }\n}\nexport function formArrayList(valueToControl, value, validators) {\n return new FormArrayList(valueToControl, value, validators);\n}\n//# sourceMappingURL=form-array-list.js.map","import { observable } from '@rolster/commons';\nimport { createFormArrayOptions } from '../arguments';\nimport { arrayIsValid, groupAllChecked, groupPartialChecked, hasError, someErrors } from '../helpers';\nexport class FormArray {\n constructor(arrayOptions, arrayValidators) {\n this.currentGroups = [];\n this.currentValid = true;\n this.currentDisabled = false;\n this.currentErrors = [];\n const { groups, validators } = createFormArrayOptions(arrayOptions, arrayValidators);\n this.unsusbcriptions = new Map();\n this.initialValue = groups;\n this.validators = validators;\n this.refresh(this.initialValue);\n this.observable = observable(this.value);\n groups?.forEach((group) => {\n this.subscription(group);\n });\n }\n get groups() {\n return this.currentGroups;\n }\n get controls() {\n return this.groups.map(({ controls }) => controls);\n }\n get touched() {\n return groupPartialChecked(this.groups, 'touched');\n }\n get touchedAll() {\n return groupAllChecked(this.groups, 'touchedAll');\n }\n get untouched() {\n return !this.touched;\n }\n get untouchedAll() {\n return !this.touchedAll;\n }\n get dirty() {\n return groupPartialChecked(this.groups, 'dirty');\n }\n get dirtyAll() {\n return groupAllChecked(this.groups, 'dirtyAll');\n }\n get pristine() {\n return !this.dirty;\n }\n get pristineAll() {\n return !this.dirtyAll;\n }\n get disabled() {\n return this.currentDisabled;\n }\n get enabled() {\n return !this.currentDisabled;\n }\n get valid() {\n return this.currentValid && groupAllChecked(this.groups, 'valid');\n }\n get invalid() {\n return !this.currentValid;\n }\n get value() {\n return this.groups.map(({ value: state }) => state);\n }\n get error() {\n return this.currentError;\n }\n get errors() {\n return this.currentErrors;\n }\n get wrong() {\n return this.touched && this.invalid;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n this.refresh(this.initialValue);\n }\n disable() {\n this.currentDisabled = true;\n }\n enable() {\n this.currentDisabled = false;\n }\n push(group) {\n this.subscription(group);\n this.refresh([...this.groups, group]);\n }\n merge(groups) {\n groups.forEach((group) => {\n this.subscription(group);\n });\n this.refresh([...this.groups, ...groups]);\n }\n setInitialValue(groups) {\n this.initialValue = groups;\n this.setValue(groups);\n }\n setValue(groups) {\n this.currentGroups.forEach(({ uuid }) => {\n this.unsusbcriptions.delete(uuid);\n });\n groups.forEach((group) => {\n this.subscription(group);\n });\n this.refresh(groups); // Update groups\n }\n remove({ uuid }) {\n this.refresh(this.groups.filter((group) => group.uuid !== uuid));\n }\n setValidators(validators) {\n this.validators = validators;\n this.updateValidityStatus(this.groups, validators);\n }\n subscribe(subscriber) {\n return this.observable.subscribe(subscriber);\n }\n subscription(group) {\n const unsusbcription = group.subscribe(() => {\n this.updateValidityStatus(this.groups, this.validators);\n });\n this.unsusbcriptions.set(group.uuid, unsusbcription);\n }\n updateValidityStatus(groups, validators) {\n if (validators) {\n const errors = arrayIsValid({ groups, validators });\n this.currentErrors = errors;\n this.currentError = errors[0];\n this.currentValid = errors.length === 0;\n }\n else {\n this.currentValid = true;\n this.currentErrors = [];\n this.currentError = undefined;\n }\n }\n refresh(newGroups) {\n const groups = newGroups || [];\n this.currentGroups = groups;\n this.updateValidityStatus(groups, this.validators);\n }\n}\nexport function formArray(options, validators) {\n return new FormArray(createFormArrayOptions(options, validators));\n}\n//# sourceMappingURL=form-array.js.map"],"names":["uuid"],"mappings":";;;AAAA,SAAS,kBAAkB,CAAC,OAAO,EAAE;AACrC,IAAI,QAAQ,OAAO,OAAO,KAAK,QAAQ;AACvC,SAAS,OAAO,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,CAAC,EAAE;AACzD,CAAC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|
type ArrayOptions<C extends FormArrayControls, R> = FormArrayOptions<C, R, AbstractReactiveArrayGroup<C, R>>;
|
|
5
5
|
export declare class FormArray<C extends FormArrayControls = FormArrayControls, R = any> implements AbstractReactiveArray<C, R, AbstractReactiveArrayGroup<C, R>> {
|
|
6
6
|
private currentGroups;
|
|
7
|
-
private initialState?;
|
|
8
7
|
private currentValid;
|
|
9
8
|
private currentDisabled;
|
|
10
9
|
private currentError?;
|
|
11
10
|
private currentErrors;
|
|
11
|
+
private initialValue?;
|
|
12
12
|
private validators?;
|
|
13
13
|
private observable;
|
|
14
14
|
private unsusbcriptions;
|
|
@@ -40,7 +40,8 @@ export declare class FormArray<C extends FormArrayControls = FormArrayControls,
|
|
|
40
40
|
enable(): void;
|
|
41
41
|
push(group: AbstractReactiveArrayGroup<C, R>): void;
|
|
42
42
|
merge(groups: AbstractReactiveArrayGroup<C, R>[]): void;
|
|
43
|
-
|
|
43
|
+
setInitialValue(groups: AbstractReactiveArrayGroup<C, R>[]): void;
|
|
44
|
+
setValue(groups: AbstractReactiveArrayGroup<C, R>[]): void;
|
|
44
45
|
remove({ uuid }: AbstractReactiveArrayGroup<C, R>): void;
|
|
45
46
|
setValidators(validators: ValidatorArrayFn<C, R>[]): void;
|
|
46
47
|
subscribe(subscriber: SubscriberArray<C>): Unsubscription;
|
|
@@ -9,9 +9,9 @@ export class FormArray {
|
|
|
9
9
|
this.currentErrors = [];
|
|
10
10
|
const { groups, validators } = createFormArrayOptions(arrayOptions, arrayValidators);
|
|
11
11
|
this.unsusbcriptions = new Map();
|
|
12
|
-
this.
|
|
12
|
+
this.initialValue = groups;
|
|
13
13
|
this.validators = validators;
|
|
14
|
-
this.refresh(this.
|
|
14
|
+
this.refresh(this.initialValue);
|
|
15
15
|
this.observable = observable(this.value);
|
|
16
16
|
groups?.forEach((group) => {
|
|
17
17
|
this.subscription(group);
|
|
@@ -78,7 +78,7 @@ export class FormArray {
|
|
|
78
78
|
return someErrors(this.errors, keys);
|
|
79
79
|
}
|
|
80
80
|
reset() {
|
|
81
|
-
this.refresh(this.
|
|
81
|
+
this.refresh(this.initialValue);
|
|
82
82
|
}
|
|
83
83
|
disable() {
|
|
84
84
|
this.currentDisabled = true;
|
|
@@ -96,7 +96,11 @@ export class FormArray {
|
|
|
96
96
|
});
|
|
97
97
|
this.refresh([...this.groups, ...groups]);
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
setInitialValue(groups) {
|
|
100
|
+
this.initialValue = groups;
|
|
101
|
+
this.setValue(groups);
|
|
102
|
+
}
|
|
103
|
+
setValue(groups) {
|
|
100
104
|
this.currentGroups.forEach(({ uuid }) => {
|
|
101
105
|
this.unsusbcriptions.delete(uuid);
|
|
102
106
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-array.js","sourceRoot":"","sources":["../../../src/form-array/form-array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACX,MAAM,YAAY,CAAC;AAiBpB,MAAM,OAAO,SAAS;IA2BpB,YACE,YAAsE,EACtE,eAA0C;QA1BpC,kBAAa,GAAuC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"form-array.js","sourceRoot":"","sources":["../../../src/form-array/form-array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACX,MAAM,YAAY,CAAC;AAiBpB,MAAM,OAAO,SAAS;IA2BpB,YACE,YAAsE,EACtE,eAA0C;QA1BpC,kBAAa,GAAuC,EAAE,CAAC;QAEvD,iBAAY,G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I,CAAC,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;CACF;AAiBD,MAAM,UAAU,SAAS,CAIvB,OAAiE,EACjE,UAAqC;IAErC,OAAO,IAAI,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -38,6 +38,7 @@ export declare class FormControl<T = any> implements AbstractReactiveControl<T>
|
|
|
38
38
|
disable(): void;
|
|
39
39
|
enable(): void;
|
|
40
40
|
touch(): void;
|
|
41
|
+
setInitialValue(value: T): void;
|
|
41
42
|
setValue(value: T): void;
|
|
42
43
|
setValidators(validators?: ValidatorFn<T>[]): void;
|
|
43
44
|
subscribe(subscriber: SubscriberControl<T>): Unsubscription;
|
package/dist/esm/form-control.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../src/form-control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AASjE,MAAM,OAAO,WAAW;IA0BtB,YACE,cAA0C,EAC1C,iBAAoC;QA3B5B,mBAAc,GAAG,KAAK,CAAC;QAEvB,mBAAc,GAAG,KAAK,CAAC;QAEvB,iBAAY,GAAG,KAAK,CAAC;QAErB,oBAAe,GAAG,KAAK,CAAC;QAExB,iBAAY,GAAG,IAAI,CAAC;QAQpB,kBAAa,GAAqB,EAAE,CAAC;QAa7C,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,wBAAwB,CACpD,cAAc,EACd,iBAAiB,CAClB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAEpC,IAAI,CAAC,YAAY,GAAG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C;IACH,CAAC;IAEM,aAAa,CAAC,aAA+B,EAAE;QACpD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACtD,CAAC;IAEM,SAAS,CAAC,UAAgC;QAC/C,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;IAES,sBAAsB,CAC9B,KAAQ,EACR,UAA6B;QAE7B,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,MAAM,GAAG,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;YAErD,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;YAC5B,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QAC1B,CAAC;IACH,CAAC;CACF;AAkBD,MAAM,UAAU,WAAW,CACzB,OAAmC,EACnC,UAA6B;IAE7B,OAAO,IAAI,WAAW,CAAC,wBAAwB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACxE,CAAC"}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface AbstractFormControl<T = any> extends AbstractControl<T> {
|
|
|
27
27
|
enable: () => void;
|
|
28
28
|
focus: () => void;
|
|
29
29
|
readonly focused: boolean;
|
|
30
|
+
setInitialValue: (value: T) => void;
|
|
30
31
|
setValue: (value: T) => void;
|
|
31
32
|
setValidators: (validators?: ValidatorFn<T>[]) => void;
|
|
32
33
|
touch: () => void;
|
|
@@ -97,7 +98,8 @@ export interface AbstractArray<C extends AbstractArrayControls = AbstractArrayCo
|
|
|
97
98
|
readonly pristineAll: boolean;
|
|
98
99
|
push: (group: G) => void;
|
|
99
100
|
remove: (group: G) => void;
|
|
100
|
-
|
|
101
|
+
setInitialValue: (groups: G[]) => void;
|
|
102
|
+
setValue: (groups: G[]) => void;
|
|
101
103
|
setValidators: (validators: ValidatorArrayFn<C, R>[]) => void;
|
|
102
104
|
readonly touchedAll: boolean;
|
|
103
105
|
readonly untouchedAll: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolster/forms",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "It implements a set of classes that allow managing the control of states of the input components of the UI.",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"prepublishOnly": "npm run build"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@rolster/commons": "^2.
|
|
51
|
+
"@rolster/commons": "^2.3.0",
|
|
52
52
|
"@rolster/validators": "^2.1.0",
|
|
53
53
|
"uuid": "^9.0.1"
|
|
54
54
|
},
|