@rolster/react-forms 19.1.0 → 19.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1,8 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _arguments = require('@rolster/forms/arguments');
6
3
  var helpers = require('@rolster/forms/helpers');
7
4
  var uuid = require('uuid');
8
5
  var react = require('react');
@@ -45,7 +42,7 @@ class RolsterArrayControl {
45
42
  setDefaultValue(value) {
46
43
  if (value !== this.defaultValue) {
47
44
  const errors = this.validators
48
- ? helpers.controlIsValid({ value, validators: this.validators })
45
+ ? helpers.formControlIsValid({ value, validators: this.validators })
49
46
  : [];
50
47
  this.refresh('value', { errors, defaultValue: value, value });
51
48
  }
@@ -53,7 +50,7 @@ class RolsterArrayControl {
53
50
  setStartValue(value) {
54
51
  if (value !== this.value) {
55
52
  const errors = this.validators
56
- ? helpers.controlIsValid({ value, validators: this.validators })
53
+ ? helpers.formControlIsValid({ value, validators: this.validators })
57
54
  : [];
58
55
  this.refresh('value', { errors, value });
59
56
  }
@@ -61,14 +58,14 @@ class RolsterArrayControl {
61
58
  setValue(value) {
62
59
  if (value !== this.value) {
63
60
  const errors = this.validators
64
- ? helpers.controlIsValid({ value, validators: this.validators })
61
+ ? helpers.formControlIsValid({ value, validators: this.validators })
65
62
  : [];
66
63
  this.refresh('value', { dirty: true, errors, value });
67
64
  }
68
65
  }
69
66
  setValidators(validators) {
70
67
  const errors = validators
71
- ? helpers.controlIsValid({ value: this.value, validators })
68
+ ? helpers.formControlIsValid({ value: this.value, validators })
72
69
  : [];
73
70
  this.refresh('validators', { errors, validators });
74
71
  }
@@ -83,7 +80,7 @@ class RolsterArrayControl {
83
80
  }
84
81
  reset() {
85
82
  const errors = this.validators
86
- ? helpers.controlIsValid({
83
+ ? helpers.formControlIsValid({
87
84
  value: this.defaultValue,
88
85
  validators: this.validators
89
86
  })
@@ -108,12 +105,12 @@ class RolsterArrayControl {
108
105
  class ReactRolsterArrayControl extends RolsterArrayControl {
109
106
  constructor(options) {
110
107
  const { value, validators } = options;
111
- const errors = validators ? helpers.controlIsValid({ value, validators }) : [];
108
+ const errors = validators ? helpers.formControlIsValid({ value, validators }) : [];
112
109
  super({ ...options, errors });
113
110
  }
114
111
  }
115
112
  function rolsterArrayControl(options, validators) {
116
- const formControl = _arguments.createFormControlOptions(options, validators);
113
+ const formControl = helpers.createFormControlOptions(options, validators);
117
114
  return new ReactRolsterArrayControl({
118
115
  ...formControl,
119
116
  defaultValue: formControl.value,
@@ -140,10 +137,10 @@ function replaceControl(controls, control) {
140
137
  }
141
138
 
142
139
  function refactorForValid$2(controls, validators) {
143
- const errors = validators ? helpers.groupIsValid({ controls, validators }) : [];
140
+ const errors = validators ? helpers.formGroupIsValid({ controls, validators }) : [];
144
141
  return {
145
142
  errors,
146
- valid: errors.length === 0 && helpers.controlsAllChecked(controls, 'valid')
143
+ valid: errors.length === 0 && helpers.verifyAllTrueInControls(controls, 'valid')
147
144
  };
148
145
  }
149
146
  function refactorForControls$1(action, group, controls) {
@@ -151,26 +148,26 @@ function refactorForControls$1(action, group, controls) {
151
148
  case 'focused':
152
149
  case 'touched':
153
150
  return {
154
- touched: helpers.controlsPartialChecked(controls, 'touched'),
155
- toucheds: helpers.controlsAllChecked(controls, 'touched')
151
+ touched: helpers.verifyAnyTrueInControls(controls, 'touched'),
152
+ toucheds: helpers.verifyAllTrueInControls(controls, 'touched')
156
153
  };
157
154
  case 'validators':
158
155
  return refactorForValid$2(controls, group.validators);
159
156
  case 'reset':
160
157
  return {
161
158
  ...refactorForValid$2(controls, group.validators),
162
- dirty: helpers.controlsPartialChecked(controls, 'dirty'),
163
- dirties: helpers.controlsAllChecked(controls, 'dirty'),
164
- touched: helpers.controlsPartialChecked(controls, 'touched'),
165
- toucheds: helpers.controlsAllChecked(controls, 'touched'),
159
+ dirty: helpers.verifyAnyTrueInControls(controls, 'dirty'),
160
+ dirties: helpers.verifyAllTrueInControls(controls, 'dirty'),
161
+ touched: helpers.verifyAnyTrueInControls(controls, 'touched'),
162
+ toucheds: helpers.verifyAllTrueInControls(controls, 'touched'),
166
163
  value: helpers.controlsToValue(controls)
167
164
  };
168
165
  case 'list':
169
166
  case 'value':
170
167
  return {
171
168
  ...refactorForValid$2(controls, group.validators),
172
- dirty: helpers.controlsPartialChecked(controls, 'dirty'),
173
- dirties: helpers.controlsAllChecked(controls, 'dirty'),
169
+ dirty: helpers.verifyAnyTrueInControls(controls, 'dirty'),
170
+ dirties: helpers.verifyAllTrueInControls(controls, 'dirty'),
174
171
  value: helpers.controlsToValue(controls)
175
172
  };
176
173
  default:
@@ -228,27 +225,27 @@ class RolsterArrayGroup {
228
225
  class ReactRolsterArrayGroup extends RolsterArrayGroup {
229
226
  constructor(options) {
230
227
  const { controls, validators } = options;
231
- const errors = validators ? helpers.groupIsValid({ controls, validators }) : [];
228
+ const errors = validators ? helpers.formGroupIsValid({ controls, validators }) : [];
232
229
  super({
233
230
  ...options,
234
231
  errors,
235
- dirties: helpers.controlsAllChecked(controls, 'dirty'),
236
- dirty: helpers.controlsPartialChecked(controls, 'dirty'),
237
- touched: helpers.controlsPartialChecked(controls, 'touched'),
238
- toucheds: helpers.controlsAllChecked(controls, 'touched'),
239
- valid: errors.length === 0 && helpers.controlsAllChecked(controls, 'valid'),
232
+ dirties: helpers.verifyAllTrueInControls(controls, 'dirty'),
233
+ dirty: helpers.verifyAnyTrueInControls(controls, 'dirty'),
234
+ touched: helpers.verifyAnyTrueInControls(controls, 'touched'),
235
+ toucheds: helpers.verifyAllTrueInControls(controls, 'touched'),
236
+ valid: errors.length === 0 && helpers.verifyAllTrueInControls(controls, 'valid'),
240
237
  value: helpers.controlsToValue(controls)
241
238
  });
242
239
  }
243
240
  }
244
- function groupIsOptions(options) {
241
+ function valueIsGroupOptions(options) {
245
242
  return typeof options === 'object' && 'controls' in options;
246
243
  }
247
244
  function formArrayGroup(options, validators) {
248
- const groupUuid = groupIsOptions(options) ? options.uuid || uuid.v4() : uuid.v4();
245
+ const _uuid = valueIsGroupOptions(options) ? options.uuid || uuid.v4() : uuid.v4();
249
246
  return new ReactRolsterArrayGroup({
250
- ..._arguments.createFormGroupOptions(options, validators),
251
- uuid: groupUuid
247
+ ...helpers.createFormGroupOptions(options, validators),
248
+ uuid: _uuid
252
249
  });
253
250
  }
254
251
 
@@ -256,13 +253,13 @@ class RolsterArrayList extends RolsterArrayControl {
256
253
  constructor(options) {
257
254
  const { controls, valueToControls, validators } = options;
258
255
  const value = controls.map(helpers.controlsToValue);
259
- const errors = validators ? helpers.controlIsValid({ value, validators }) : [];
256
+ const errors = validators ? helpers.formControlIsValid({ value, validators }) : [];
260
257
  super({ ...options, errors, value });
261
258
  this.valueToControls = valueToControls;
262
259
  this.controls = controls;
263
260
  this.valid =
264
261
  errors.length === 0 &&
265
- controls.reduce((valid, controls) => valid && helpers.controlsAllChecked(controls, 'valid'), true);
262
+ controls.reduce((valid, controls) => valid && helpers.verifyAllTrueInControls(controls, 'valid'), true);
266
263
  this.invalid = !this.valid;
267
264
  this.wrong = this.touched && this.invalid;
268
265
  controls.forEach((reactControls) => {
@@ -335,10 +332,10 @@ function formArrayList(options) {
335
332
  }
336
333
 
337
334
  function refactorForValid$1(groups, validators) {
338
- const errors = validators ? helpers.arrayIsValid({ groups, validators }) : [];
335
+ const errors = validators ? helpers.formArrayIsValid({ groups, validators }) : [];
339
336
  return {
340
337
  errors,
341
- valid: errors.length === 0 && helpers.groupAllChecked(groups, 'valid')
338
+ valid: errors.length === 0 && helpers.verifyAllTrueInGroups(groups, 'valid')
342
339
  };
343
340
  }
344
341
  function refactorForGroups(groups, validators) {
@@ -362,21 +359,20 @@ function refactorForControls(action, state, groups) {
362
359
  }
363
360
  }
364
361
  function useFormArray(options, validators) {
365
- const formArray = _arguments.createFormArrayOptions(options, validators);
366
- const groups = formArray.groups || [];
367
- const value = react.useRef(groups);
362
+ const formArray = helpers.createFormArrayOptions(options, validators);
363
+ const defaultValue = react.useRef(formArray.groups || []);
368
364
  const formGroups = react.useRef(new Map());
369
365
  const [state, setState] = react.useState(() => {
370
366
  return {
371
- ...refactorForValid$1(groups, formArray.validators),
372
- controls: groups.map(({ controls }) => controls),
367
+ ...refactorForValid$1(defaultValue.current, formArray.validators),
368
+ controls: defaultValue.current.map(({ controls }) => controls),
373
369
  dirty: false,
374
370
  dirties: false,
375
371
  disabled: false,
376
- groups,
372
+ groups: defaultValue.current,
377
373
  touched: false,
378
374
  toucheds: false,
379
- value: groups.map(({ controls }) => helpers.controlsToValue(controls)),
375
+ value: defaultValue.current.map(({ controls }) => helpers.controlsToValue(controls)),
380
376
  validators: formArray.validators
381
377
  };
382
378
  });
@@ -410,12 +406,12 @@ function useFormArray(options, validators) {
410
406
  ...refactorForGroups(groups, state.validators)
411
407
  }));
412
408
  }, []);
413
- const setInitialValue = react.useCallback((groups) => {
409
+ const setDefaultValue = react.useCallback((groups) => {
414
410
  setState((state) => ({
415
411
  ...state,
416
412
  ...refactorForGroups(groups, state.validators)
417
413
  }));
418
- value.current = groups;
414
+ defaultValue.current = groups;
419
415
  }, []);
420
416
  const push = react.useCallback((group) => {
421
417
  setState((state) => ({
@@ -454,7 +450,7 @@ function useFormArray(options, validators) {
454
450
  const reset = react.useCallback(() => {
455
451
  setState((state) => ({
456
452
  ...state,
457
- ...refactorForGroups(value.current, state.validators)
453
+ ...refactorForGroups(defaultValue.current, state.validators)
458
454
  }));
459
455
  }, []);
460
456
  return {
@@ -472,7 +468,7 @@ function useFormArray(options, validators) {
472
468
  push,
473
469
  remove,
474
470
  reset,
475
- setInitialValue,
471
+ setDefaultValue,
476
472
  setValidators,
477
473
  setValue,
478
474
  someErrors,
@@ -483,10 +479,10 @@ function useFormArray(options, validators) {
483
479
  }
484
480
 
485
481
  function errorsInControl(value, validators) {
486
- return validators ? helpers.controlIsValid({ value, validators }) : [];
482
+ return validators ? helpers.formControlIsValid({ value, validators }) : [];
487
483
  }
488
484
  function useControl(options, validators) {
489
- const formControl = _arguments.createFormControlOptions(options, validators);
485
+ const formControl = helpers.createFormControlOptions(options, validators);
490
486
  const defaultValue = react.useRef(formControl.value);
491
487
  const [state, setState] = react.useState(() => {
492
488
  return {
@@ -597,10 +593,10 @@ function useInputControl(options, validators) {
597
593
  }
598
594
 
599
595
  function refactorForValid(controls, validators) {
600
- const errors = validators ? helpers.groupIsValid({ controls, validators }) : [];
596
+ const errors = validators ? helpers.formGroupIsValid({ controls, validators }) : [];
601
597
  return {
602
598
  errors,
603
- valid: errors.length === 0 && helpers.controlsAllChecked(controls, 'valid')
599
+ valid: errors.length === 0 && helpers.verifyAllTrueInControls(controls, 'valid')
604
600
  };
605
601
  }
606
602
  function checkAllSuccess(status) {
@@ -610,7 +606,7 @@ function checkPartialSuccess(status) {
610
606
  return status.reduce((success, status) => success || status, false);
611
607
  }
612
608
  function useFormGroup(options, validators) {
613
- const formGroup = _arguments.createFormGroupOptions(options, validators);
609
+ const formGroup = helpers.createFormGroupOptions(options, validators);
614
610
  const formInitialized = react.useRef({
615
611
  dirty: false,
616
612
  touched: false,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../esm/form-array/form-array-control.js","../esm/utilities.js","../esm/form-array/form-array-group.js","../esm/form-array/form-array-list.js","../esm/form-array/form-array.js","../esm/form-control.js","../esm/form-group.js","../esm/helpers.js","../esm/hooks.js"],"sourcesContent":["import { createFormControlOptions } from '@rolster/forms/arguments';\nimport { controlIsValid, hasError, someErrors } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nexport class RolsterArrayControl {\n constructor(options) {\n this.uuid = options.uuid;\n this.defaultValue = options.defaultValue;\n this.value = options.value;\n this.focused = !!options.focused;\n this.unfocused = !this.focused;\n this.touched = !!options.touched;\n this.untouched = !this.touched;\n this.dirty = !!options.dirty;\n this.pristine = !this.dirty;\n this.disabled = !!options.disabled;\n this.enabled = !this.disabled;\n this.valid = this.isValid(options.errors);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n this.errors = options.errors;\n this.error = this.errors[0];\n this.validators = options.validators;\n }\n focus() {\n this.unfocused && this.refresh('focused', { focused: true });\n }\n blur() {\n this.focused && this.refresh('focused', { focused: false, touched: true });\n }\n disable() {\n this.enabled && this.refresh('disabled', { disabled: true });\n }\n enable() {\n this.disabled && this.refresh('disabled', { disabled: false });\n }\n touch() {\n this.untouched && this.refresh('touched', { touched: true });\n }\n setDefaultValue(value) {\n if (value !== this.defaultValue) {\n const errors = this.validators\n ? controlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { errors, defaultValue: value, value });\n }\n }\n setStartValue(value) {\n if (value !== this.value) {\n const errors = this.validators\n ? controlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { errors, value });\n }\n }\n setValue(value) {\n if (value !== this.value) {\n const errors = this.validators\n ? controlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { dirty: true, errors, value });\n }\n }\n setValidators(validators) {\n const errors = validators\n ? controlIsValid({ value: this.value, validators })\n : [];\n this.refresh('validators', { errors, validators });\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n const errors = this.validators\n ? controlIsValid({\n value: this.defaultValue,\n validators: this.validators\n })\n : [];\n this.refresh('reset', {\n dirty: false,\n errors,\n touched: false,\n value: this.defaultValue\n });\n }\n isValid(errors) {\n return errors.length === 0;\n }\n builder(options) {\n return new RolsterArrayControl({ ...this, ...options });\n }\n refresh(action, options) {\n this.subscriber && this.subscriber(action, this.builder(options));\n }\n}\nclass ReactRolsterArrayControl extends RolsterArrayControl {\n constructor(options) {\n const { value, validators } = options;\n const errors = validators ? controlIsValid({ value, validators }) : [];\n super({ ...options, errors });\n }\n}\nfunction rolsterArrayControl(options, validators) {\n const formControl = createFormControlOptions(options, validators);\n return new ReactRolsterArrayControl({\n ...formControl,\n defaultValue: formControl.value,\n uuid: uuid()\n });\n}\nexport function reactArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\nexport function formArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\nexport function inputArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\n//# sourceMappingURL=form-array-control.js.map","export function replaceControl(controls, control) {\n return Object.entries(controls).reduce((controls, [key, _control]) => {\n if (_control.uuid === control.uuid) {\n controls[key] = control;\n }\n return controls;\n }, controls);\n}\n//# sourceMappingURL=utilities.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { replaceControl } from '../utilities';\nfunction refactorForValid(controls, validators) {\n const errors = validators ? groupIsValid({ controls, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && controlsAllChecked(controls, 'valid')\n };\n}\nfunction refactorForControls(action, group, controls) {\n switch (action) {\n case 'focused':\n case 'touched':\n return {\n touched: controlsPartialChecked(controls, 'touched'),\n toucheds: controlsAllChecked(controls, 'touched')\n };\n case 'validators':\n return refactorForValid(controls, group.validators);\n case 'reset':\n return {\n ...refactorForValid(controls, group.validators),\n dirty: controlsPartialChecked(controls, 'dirty'),\n dirties: controlsAllChecked(controls, 'dirty'),\n touched: controlsPartialChecked(controls, 'touched'),\n toucheds: controlsAllChecked(controls, 'touched'),\n value: controlsToValue(controls)\n };\n case 'list':\n case 'value':\n return {\n ...refactorForValid(controls, group.validators),\n dirty: controlsPartialChecked(controls, 'dirty'),\n dirties: controlsAllChecked(controls, 'dirty'),\n value: controlsToValue(controls)\n };\n default:\n return {};\n }\n}\nexport class RolsterArrayGroup {\n constructor(options) {\n this.uuid = options.uuid;\n this.controls = options.controls;\n this.value = options.value;\n this.resource = options.resource;\n this.dirty = !!options.dirty;\n this.dirties = !!options.dirties;\n this.pristine = !this.dirty;\n this.pristines = !this.dirties;\n this.touched = !!options.touched;\n this.toucheds = !!options.toucheds;\n this.untouched = !this.touched;\n this.untoucheds = !this.toucheds;\n this.valid = !!options.valid;\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n this.errors = options.errors;\n this.error = this.errors[0];\n this.validators = options.validators;\n this.subscriberControl = (action, control) => {\n const controls = replaceControl(this.controls, control);\n this.refresh(action, {\n ...refactorForControls(action, this, controls),\n controls\n });\n };\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n Object.values(this.controls).forEach((control) => {\n control.subscribe(this.subscriberControl);\n });\n }\n setValidators(validators) {\n this.refresh('validators', {\n ...refactorForValid(this.controls, validators),\n validators\n });\n }\n setResource(resource) {\n this.refresh('resource', { resource });\n }\n refresh(action, options) {\n this.subscriber &&\n this.subscriber(action, new RolsterArrayGroup({ ...this, ...options }));\n }\n}\nclass ReactRolsterArrayGroup extends RolsterArrayGroup {\n constructor(options) {\n const { controls, validators } = options;\n const errors = validators ? groupIsValid({ controls, validators }) : [];\n super({\n ...options,\n errors,\n dirties: controlsAllChecked(controls, 'dirty'),\n dirty: controlsPartialChecked(controls, 'dirty'),\n touched: controlsPartialChecked(controls, 'touched'),\n toucheds: controlsAllChecked(controls, 'touched'),\n valid: errors.length === 0 && controlsAllChecked(controls, 'valid'),\n value: controlsToValue(controls)\n });\n }\n}\nfunction groupIsOptions(options) {\n return typeof options === 'object' && 'controls' in options;\n}\nexport function formArrayGroup(options, validators) {\n const groupUuid = groupIsOptions(options) ? options.uuid || uuid() : uuid();\n return new ReactRolsterArrayGroup({\n ...createFormGroupOptions(options, validators),\n uuid: groupUuid\n });\n}\n//# sourceMappingURL=form-array-group.js.map","import { controlIsValid, controlsAllChecked, controlsToValue } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { replaceControl } from '../utilities';\nimport { RolsterArrayControl } from './form-array-control';\nclass RolsterArrayList extends RolsterArrayControl {\n constructor(options) {\n const { controls, valueToControls, validators } = options;\n const value = controls.map(controlsToValue);\n const errors = validators ? controlIsValid({ value, validators }) : [];\n super({ ...options, errors, value });\n this.valueToControls = valueToControls;\n this.controls = controls;\n this.valid =\n errors.length === 0 &&\n controls.reduce((valid, controls) => valid && controlsAllChecked(controls, 'valid'), true);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n controls.forEach((reactControls) => {\n this._subscribe(reactControls);\n });\n }\n setDefaultValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls),\n defaultValue: value\n });\n }\n setStartValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls)\n });\n }\n setValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls),\n dirty: true\n });\n }\n reset() {\n this.refresh('list', {\n controls: this.defaultValue.map(this.valueToControls),\n dirty: false,\n touched: false\n });\n }\n push(controls) {\n this.refresh('list', {\n controls: [...this.controls, controls]\n });\n }\n remove(controls) {\n this.refresh('list', {\n controls: this.controls.filter((_controls) => _controls !== controls)\n });\n }\n builder(options) {\n return new RolsterArrayList({\n ...this,\n ...options,\n valueToControls: this.valueToControls\n });\n }\n refresh(action, options) {\n super.refresh(action, options);\n }\n _subscribe(reactControls) {\n Object.values(reactControls).forEach((control) => {\n control.subscribe((action, _control) => {\n const _reactControls = this.controls.map((_controls) => reactControls !== _controls\n ? _controls\n : replaceControl(reactControls, _control));\n this.refresh(action, { controls: _reactControls });\n });\n });\n }\n}\nexport function formArrayList(options) {\n const value = options?.value || [];\n return new RolsterArrayList({\n ...options,\n controls: value.map((value) => options.valueToControls(value)),\n defaultValue: value,\n uuid: uuid()\n });\n}\n//# sourceMappingURL=form-array-list.js.map","import { createFormArrayOptions } from '@rolster/forms/arguments';\nimport { arrayIsValid, controlsToValue, groupAllChecked, hasError as rolsterHasError, someErrors as rolsterSomeErrors } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nfunction refactorForValid(groups, validators) {\n const errors = validators ? arrayIsValid({ groups, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && groupAllChecked(groups, 'valid')\n };\n}\nfunction refactorForGroups(groups, validators) {\n return {\n ...refactorForValid(groups, validators),\n groups,\n controls: groups.map(({ controls }) => controls),\n value: groups.map(({ controls }) => controlsToValue(controls))\n };\n}\nfunction refactorForControls(action, state, groups) {\n switch (action) {\n case 'validators':\n return refactorForValid(groups, state.validators);\n case 'reset':\n case 'list':\n case 'value':\n return refactorForGroups(groups, state.validators);\n default:\n return { groups };\n }\n}\nexport function useFormArray(options, validators) {\n const formArray = createFormArrayOptions(options, validators);\n const groups = formArray.groups || [];\n const value = useRef(groups);\n const formGroups = useRef(new Map());\n const [state, setState] = useState(() => {\n return {\n ...refactorForValid(groups, formArray.validators),\n controls: groups.map(({ controls }) => controls),\n dirty: false,\n dirties: false,\n disabled: false,\n groups,\n touched: false,\n toucheds: false,\n value: groups.map(({ controls }) => controlsToValue(controls)),\n validators: formArray.validators\n };\n });\n useEffect(() => {\n formGroups.current.clear();\n state.groups.forEach((group) => {\n formGroups.current.set(group.uuid, group);\n group.subscribe(subscriber);\n });\n }, [state.groups]);\n const subscriber = useCallback((action, group) => {\n setState((state) => {\n const groups = state.groups.map((currentGroup) => {\n return currentGroup.uuid === group.uuid ? group : currentGroup;\n });\n return {\n ...state,\n ...refactorForControls(action, state, groups)\n };\n });\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const setValue = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(groups, state.validators)\n }));\n }, []);\n const setInitialValue = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(groups, state.validators)\n }));\n value.current = groups;\n }, []);\n const push = useCallback((group) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups([...state.groups, group], state.validators)\n }));\n }, []);\n const merge = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups([...state.groups, ...groups], state.validators)\n }));\n }, []);\n const remove = useCallback(({ uuid }) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(state.groups.filter((group) => group.uuid !== uuid), state.validators)\n }));\n }, []);\n const findByUuid = useCallback((uuid) => {\n return formGroups.current.get(uuid);\n }, [state.groups]);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.groups, validators),\n validators\n }));\n }, []);\n const hasError = useCallback((key) => {\n return rolsterHasError(state.errors, key);\n }, [state.errors]);\n const someErrors = useCallback((keys) => {\n return rolsterSomeErrors(state.errors, keys);\n }, [state.errors]);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(value.current, state.validators)\n }));\n }, []);\n return {\n ...state,\n disable,\n enable,\n enabled: !state.disabled,\n error: state.errors[0],\n findByUuid,\n hasError,\n invalid: !state.valid,\n merge,\n pristine: !state.dirty,\n pristines: !state.dirties,\n push,\n remove,\n reset,\n setInitialValue,\n setValidators,\n setValue,\n someErrors,\n untouched: !state.touched,\n untoucheds: !state.toucheds,\n wrong: state.touched && !state.valid\n };\n}\n//# sourceMappingURL=form-array.js.map","import { createFormControlOptions } from '@rolster/forms/arguments';\nimport { controlIsValid, hasError as rolsterHasError, someErrors as rolsterSomeErrors } from '@rolster/forms/helpers';\nimport { useCallback, useRef, useState } from 'react';\nfunction errorsInControl(value, validators) {\n return validators ? controlIsValid({ value, validators }) : [];\n}\nfunction useControl(options, validators) {\n const formControl = createFormControlOptions(options, validators);\n const defaultValue = useRef(formControl.value);\n const [state, setState] = useState(() => {\n return {\n dirty: false,\n disabled: false,\n errors: errorsInControl(formControl.value, formControl.validators),\n focused: false,\n touched: !!formControl.touched,\n value: formControl.value,\n validators: formControl.validators\n };\n });\n const elementRef = useRef(null);\n const focus = useCallback(() => {\n setState((state) => ({ ...state, focused: true }));\n }, []);\n const blur = useCallback(() => {\n setState((state) => ({ ...state, focused: false, touched: true }));\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const touch = useCallback(() => {\n setState((state) => ({ ...state, touched: true }));\n }, []);\n const setDefaultValue = useCallback((value) => {\n defaultValue.current = value;\n setState((state) => ({\n ...state,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setStartValue = useCallback((value) => {\n setState((state) => ({\n ...state,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setValue = useCallback((value) => {\n setState((state) => ({\n ...state,\n dirty: true,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n errors: errorsInControl(state.value, validators),\n validators\n }));\n }, []);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n dirty: false,\n errors: errorsInControl(defaultValue.current, state.validators),\n value: defaultValue.current,\n touched: false\n }));\n }, []);\n const hasError = useCallback((key) => {\n return rolsterHasError(state.errors, key);\n }, [state.errors]);\n const someErrors = useCallback((keys) => {\n return rolsterSomeErrors(state.errors, keys);\n }, [state.errors]);\n const valid = state.errors.length === 0;\n return {\n ...state,\n blur,\n disable,\n elementRef,\n enable,\n enabled: !state.disabled,\n error: state.errors[0],\n focus,\n hasError,\n invalid: !valid,\n pristine: !state.dirty,\n reset,\n setDefaultValue,\n setStartValue,\n setValidators,\n setValue,\n someErrors,\n touch,\n unfocused: !state.focused,\n untouched: !state.touched,\n valid,\n wrong: state.touched && !valid\n };\n}\nexport function useReactControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useFormControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useInputControl(options, validators) {\n return useControl(options, validators);\n}\n//# sourceMappingURL=form-control.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\nimport { controlsAllChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nfunction refactorForValid(controls, validators) {\n const errors = validators ? groupIsValid({ controls, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && controlsAllChecked(controls, 'valid')\n };\n}\nfunction checkAllSuccess(status) {\n return status.reduce((success, status) => success && status, true);\n}\nfunction checkPartialSuccess(status) {\n return status.reduce((success, status) => success || status, false);\n}\nexport function useFormGroup(options, validators) {\n const formGroup = createFormGroupOptions(options, validators);\n const formInitialized = useRef({\n dirty: false,\n touched: false,\n value: false,\n visual: false\n });\n const formGroupStatus = useMemo(() => {\n const dirty = [];\n const touched = [];\n const value = [];\n const visual = [];\n Object.values(formGroup.controls).forEach((control) => {\n dirty.push(control.dirty);\n touched.push(control.touched);\n value.push(control.value);\n visual.push(control.disabled);\n visual.push(control.focused);\n });\n return {\n dirty,\n touched,\n value,\n visual\n };\n }, [formGroup.controls]);\n const [state, setState] = useState(() => {\n return {\n ...refactorForValid(formGroup.controls, formGroup.validators),\n controls: formGroup.controls,\n dirties: checkAllSuccess(formGroupStatus.dirty),\n dirty: checkPartialSuccess(formGroupStatus.dirty),\n touched: checkPartialSuccess(formGroupStatus.touched),\n toucheds: checkAllSuccess(formGroupStatus.touched),\n validators: formGroup.validators,\n value: controlsToValue(formGroup.controls)\n };\n });\n useEffect(() => {\n if (formInitialized.current.value) {\n setState((state) => ({\n ...state,\n ...refactorForValid(formGroup.controls, state.validators),\n controls: formGroup.controls,\n value: controlsToValue(formGroup.controls)\n }));\n }\n else {\n formInitialized.current.value = true;\n }\n }, formGroupStatus.value);\n useEffect(() => {\n if (formInitialized.current.dirty) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n dirty: checkPartialSuccess(formGroupStatus.dirty),\n dirties: checkAllSuccess(formGroupStatus.dirty)\n }));\n }\n else {\n formInitialized.current.dirty = true;\n }\n }, formGroupStatus.dirty);\n useEffect(() => {\n if (formInitialized.current.touched) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n touched: checkPartialSuccess(formGroupStatus.touched),\n toucheds: checkAllSuccess(formGroupStatus.touched)\n }));\n }\n else {\n formInitialized.current.touched = true;\n }\n }, formGroupStatus.touched);\n useEffect(() => {\n if (formInitialized.current.visual) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls\n }));\n }\n else {\n formInitialized.current.visual = true;\n }\n }, formGroupStatus.visual);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.controls, validators)\n }));\n }, []);\n const reset = useCallback(() => {\n Object.values(formGroup.controls).forEach((control) => {\n control.reset();\n });\n }, []);\n return {\n ...state,\n error: state.errors[0],\n invalid: !state.valid,\n pristine: !state.dirty,\n pristines: !state.dirties,\n reset,\n setValidators,\n untouched: !state.touched,\n untoucheds: !state.toucheds,\n wrong: state.touched && !state.valid\n };\n}\n//# sourceMappingURL=form-group.js.map","import { reduceControlsToArray } from '@rolster/forms/helpers';\nexport function reduceControlsToValues(controls) {\n return reduceControlsToArray(controls, 'value');\n}\nexport function reduceGroupToValues(group) {\n return reduceControlsToValues(group.controls);\n}\n//# sourceMappingURL=helpers.js.map","import { useMemo, useState } from 'react';\nexport function useFormArrayGroupSelect({ formArray }) {\n const [formSelect, setFormGroup] = useState();\n const formGroup = useMemo(() => {\n return (formSelect &&\n formArray.groups.find(({ uuid }) => formSelect.uuid === uuid));\n }, [formArray.value, formSelect]);\n return { formGroup, setFormGroup };\n}\n//# sourceMappingURL=hooks.js.map"],"names":["controlIsValid","hasError","someErrors","createFormControlOptions","uuid","refactorForValid","groupIsValid","controlsAllChecked","refactorForControls","controlsPartialChecked","controlsToValue","createFormGroupOptions","arrayIsValid","groupAllChecked","createFormArrayOptions","useRef","useState","useEffect","useCallback","rolsterHasError","rolsterSomeErrors","useMemo","reduceControlsToArray"],"mappings":";;;;;;;;;AAGO,MAAM,mBAAmB,CAAC;AACjC,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AACjC,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AACjD,Q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,aAAa;AACrB,QAAQ,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO;AACjC,QAAQ,UAAU,EAAE,CAAC,KAAK,CAAC,QAAQ;AACnC,QAAQ,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK;AAC5C,KAAK,CAAC;AACN;;AC/HO,SAAS,sBAAsB,CAAC,QAAQ,EAAE;AACjD,IAAI,OAAOI,6BAAqB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AACM,SAAS,mBAAmB,CAAC,KAAK,EAAE;AAC3C,IAAI,OAAO,sBAAsB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClD;;ACLO,SAAS,uBAAuB,CAAC,EAAE,SAAS,EAAE,EAAE;AACvD,IAAI,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAGN,cAAQ,EAAE,CAAC;AAClD,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,EAAE;AAC3E,KAAK,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AACtC,IAAI,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACvC;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../esm/form-array/form-array-control.js","../esm/utilities.js","../esm/form-array/form-array-group.js","../esm/form-array/form-array-list.js","../esm/form-array/form-array.js","../esm/form-control.js","../esm/form-group.js","../esm/helpers.js","../esm/hooks.js"],"sourcesContent":["import { createFormControlOptions, formControlIsValid, hasError, someErrors } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nexport class RolsterArrayControl {\n constructor(options) {\n this.uuid = options.uuid;\n this.defaultValue = options.defaultValue;\n this.value = options.value;\n this.focused = !!options.focused;\n this.unfocused = !this.focused;\n this.touched = !!options.touched;\n this.untouched = !this.touched;\n this.dirty = !!options.dirty;\n this.pristine = !this.dirty;\n this.disabled = !!options.disabled;\n this.enabled = !this.disabled;\n this.valid = this.isValid(options.errors);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n this.errors = options.errors;\n this.error = this.errors[0];\n this.validators = options.validators;\n }\n focus() {\n this.unfocused && this.refresh('focused', { focused: true });\n }\n blur() {\n this.focused && this.refresh('focused', { focused: false, touched: true });\n }\n disable() {\n this.enabled && this.refresh('disabled', { disabled: true });\n }\n enable() {\n this.disabled && this.refresh('disabled', { disabled: false });\n }\n touch() {\n this.untouched && this.refresh('touched', { touched: true });\n }\n setDefaultValue(value) {\n if (value !== this.defaultValue) {\n const errors = this.validators\n ? formControlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { errors, defaultValue: value, value });\n }\n }\n setStartValue(value) {\n if (value !== this.value) {\n const errors = this.validators\n ? formControlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { errors, value });\n }\n }\n setValue(value) {\n if (value !== this.value) {\n const errors = this.validators\n ? formControlIsValid({ value, validators: this.validators })\n : [];\n this.refresh('value', { dirty: true, errors, value });\n }\n }\n setValidators(validators) {\n const errors = validators\n ? formControlIsValid({ value: this.value, validators })\n : [];\n this.refresh('validators', { errors, validators });\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n }\n hasError(key) {\n return hasError(this.errors, key);\n }\n someErrors(keys) {\n return someErrors(this.errors, keys);\n }\n reset() {\n const errors = this.validators\n ? formControlIsValid({\n value: this.defaultValue,\n validators: this.validators\n })\n : [];\n this.refresh('reset', {\n dirty: false,\n errors,\n touched: false,\n value: this.defaultValue\n });\n }\n isValid(errors) {\n return errors.length === 0;\n }\n builder(options) {\n return new RolsterArrayControl({ ...this, ...options });\n }\n refresh(action, options) {\n this.subscriber && this.subscriber(action, this.builder(options));\n }\n}\nclass ReactRolsterArrayControl extends RolsterArrayControl {\n constructor(options) {\n const { value, validators } = options;\n const errors = validators ? formControlIsValid({ value, validators }) : [];\n super({ ...options, errors });\n }\n}\nfunction rolsterArrayControl(options, validators) {\n const formControl = createFormControlOptions(options, validators);\n return new ReactRolsterArrayControl({\n ...formControl,\n defaultValue: formControl.value,\n uuid: uuid()\n });\n}\nexport function reactArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\nexport function formArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\nexport function inputArrayControl(options, validators) {\n return rolsterArrayControl(options, validators);\n}\n//# sourceMappingURL=form-array-control.js.map","export function replaceControl(controls, control) {\n return Object.entries(controls).reduce((controls, [key, _control]) => {\n if (_control.uuid === control.uuid) {\n controls[key] = control;\n }\n return controls;\n }, controls);\n}\n//# sourceMappingURL=utilities.js.map","import { createFormGroupOptions } from '@rolster/forms/helpers';\nimport { controlsToValue, formGroupIsValid, verifyAllTrueInControls, verifyAnyTrueInControls } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { replaceControl } from '../utilities';\nfunction refactorForValid(controls, validators) {\n const errors = validators ? formGroupIsValid({ controls, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid')\n };\n}\nfunction refactorForControls(action, group, controls) {\n switch (action) {\n case 'focused':\n case 'touched':\n return {\n touched: verifyAnyTrueInControls(controls, 'touched'),\n toucheds: verifyAllTrueInControls(controls, 'touched')\n };\n case 'validators':\n return refactorForValid(controls, group.validators);\n case 'reset':\n return {\n ...refactorForValid(controls, group.validators),\n dirty: verifyAnyTrueInControls(controls, 'dirty'),\n dirties: verifyAllTrueInControls(controls, 'dirty'),\n touched: verifyAnyTrueInControls(controls, 'touched'),\n toucheds: verifyAllTrueInControls(controls, 'touched'),\n value: controlsToValue(controls)\n };\n case 'list':\n case 'value':\n return {\n ...refactorForValid(controls, group.validators),\n dirty: verifyAnyTrueInControls(controls, 'dirty'),\n dirties: verifyAllTrueInControls(controls, 'dirty'),\n value: controlsToValue(controls)\n };\n default:\n return {};\n }\n}\nexport class RolsterArrayGroup {\n constructor(options) {\n this.uuid = options.uuid;\n this.controls = options.controls;\n this.value = options.value;\n this.resource = options.resource;\n this.dirty = !!options.dirty;\n this.dirties = !!options.dirties;\n this.pristine = !this.dirty;\n this.pristines = !this.dirties;\n this.touched = !!options.touched;\n this.toucheds = !!options.toucheds;\n this.untouched = !this.touched;\n this.untoucheds = !this.toucheds;\n this.valid = !!options.valid;\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n this.errors = options.errors;\n this.error = this.errors[0];\n this.validators = options.validators;\n this.subscriberControl = (action, control) => {\n const controls = replaceControl(this.controls, control);\n this.refresh(action, {\n ...refactorForControls(action, this, controls),\n controls\n });\n };\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n Object.values(this.controls).forEach((control) => {\n control.subscribe(this.subscriberControl);\n });\n }\n setValidators(validators) {\n this.refresh('validators', {\n ...refactorForValid(this.controls, validators),\n validators\n });\n }\n setResource(resource) {\n this.refresh('resource', { resource });\n }\n refresh(action, options) {\n this.subscriber &&\n this.subscriber(action, new RolsterArrayGroup({ ...this, ...options }));\n }\n}\nclass ReactRolsterArrayGroup extends RolsterArrayGroup {\n constructor(options) {\n const { controls, validators } = options;\n const errors = validators ? formGroupIsValid({ controls, validators }) : [];\n super({\n ...options,\n errors,\n dirties: verifyAllTrueInControls(controls, 'dirty'),\n dirty: verifyAnyTrueInControls(controls, 'dirty'),\n touched: verifyAnyTrueInControls(controls, 'touched'),\n toucheds: verifyAllTrueInControls(controls, 'touched'),\n valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid'),\n value: controlsToValue(controls)\n });\n }\n}\nfunction valueIsGroupOptions(options) {\n return typeof options === 'object' && 'controls' in options;\n}\nexport function formArrayGroup(options, validators) {\n const _uuid = valueIsGroupOptions(options) ? options.uuid || uuid() : uuid();\n return new ReactRolsterArrayGroup({\n ...createFormGroupOptions(options, validators),\n uuid: _uuid\n });\n}\n//# sourceMappingURL=form-array-group.js.map","import { controlsToValue, formControlIsValid, verifyAllTrueInControls } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { replaceControl } from '../utilities';\nimport { RolsterArrayControl } from './form-array-control';\nclass RolsterArrayList extends RolsterArrayControl {\n constructor(options) {\n const { controls, valueToControls, validators } = options;\n const value = controls.map(controlsToValue);\n const errors = validators ? formControlIsValid({ value, validators }) : [];\n super({ ...options, errors, value });\n this.valueToControls = valueToControls;\n this.controls = controls;\n this.valid =\n errors.length === 0 &&\n controls.reduce((valid, controls) => valid && verifyAllTrueInControls(controls, 'valid'), true);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n controls.forEach((reactControls) => {\n this._subscribe(reactControls);\n });\n }\n setDefaultValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls),\n defaultValue: value\n });\n }\n setStartValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls)\n });\n }\n setValue(value) {\n this.refresh('list', {\n controls: value.map(this.valueToControls),\n dirty: true\n });\n }\n reset() {\n this.refresh('list', {\n controls: this.defaultValue.map(this.valueToControls),\n dirty: false,\n touched: false\n });\n }\n push(controls) {\n this.refresh('list', {\n controls: [...this.controls, controls]\n });\n }\n remove(controls) {\n this.refresh('list', {\n controls: this.controls.filter((_controls) => _controls !== controls)\n });\n }\n builder(options) {\n return new RolsterArrayList({\n ...this,\n ...options,\n valueToControls: this.valueToControls\n });\n }\n refresh(action, options) {\n super.refresh(action, options);\n }\n _subscribe(reactControls) {\n Object.values(reactControls).forEach((control) => {\n control.subscribe((action, _control) => {\n const _reactControls = this.controls.map((_controls) => reactControls !== _controls\n ? _controls\n : replaceControl(reactControls, _control));\n this.refresh(action, { controls: _reactControls });\n });\n });\n }\n}\nexport function formArrayList(options) {\n const value = options?.value || [];\n return new RolsterArrayList({\n ...options,\n controls: value.map((value) => options.valueToControls(value)),\n defaultValue: value,\n uuid: uuid()\n });\n}\n//# sourceMappingURL=form-array-list.js.map","import { controlsToValue, createFormArrayOptions, formArrayIsValid, hasError as rolsterHasError, someErrors as rolsterSomeErrors, verifyAllTrueInGroups } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nfunction refactorForValid(groups, validators) {\n const errors = validators ? formArrayIsValid({ groups, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && verifyAllTrueInGroups(groups, 'valid')\n };\n}\nfunction refactorForGroups(groups, validators) {\n return {\n ...refactorForValid(groups, validators),\n groups,\n controls: groups.map(({ controls }) => controls),\n value: groups.map(({ controls }) => controlsToValue(controls))\n };\n}\nfunction refactorForControls(action, state, groups) {\n switch (action) {\n case 'validators':\n return refactorForValid(groups, state.validators);\n case 'reset':\n case 'list':\n case 'value':\n return refactorForGroups(groups, state.validators);\n default:\n return { groups };\n }\n}\nexport function useFormArray(options, validators) {\n const formArray = createFormArrayOptions(options, validators);\n const defaultValue = useRef(formArray.groups || []);\n const formGroups = useRef(new Map());\n const [state, setState] = useState(() => {\n return {\n ...refactorForValid(defaultValue.current, formArray.validators),\n controls: defaultValue.current.map(({ controls }) => controls),\n dirty: false,\n dirties: false,\n disabled: false,\n groups: defaultValue.current,\n touched: false,\n toucheds: false,\n value: defaultValue.current.map(({ controls }) => controlsToValue(controls)),\n validators: formArray.validators\n };\n });\n useEffect(() => {\n formGroups.current.clear();\n state.groups.forEach((group) => {\n formGroups.current.set(group.uuid, group);\n group.subscribe(subscriber);\n });\n }, [state.groups]);\n const subscriber = useCallback((action, group) => {\n setState((state) => {\n const groups = state.groups.map((currentGroup) => {\n return currentGroup.uuid === group.uuid ? group : currentGroup;\n });\n return {\n ...state,\n ...refactorForControls(action, state, groups)\n };\n });\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const setValue = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(groups, state.validators)\n }));\n }, []);\n const setDefaultValue = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(groups, state.validators)\n }));\n defaultValue.current = groups;\n }, []);\n const push = useCallback((group) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups([...state.groups, group], state.validators)\n }));\n }, []);\n const merge = useCallback((groups) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups([...state.groups, ...groups], state.validators)\n }));\n }, []);\n const remove = useCallback(({ uuid }) => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(state.groups.filter((group) => group.uuid !== uuid), state.validators)\n }));\n }, []);\n const findByUuid = useCallback((uuid) => {\n return formGroups.current.get(uuid);\n }, [state.groups]);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.groups, validators),\n validators\n }));\n }, []);\n const hasError = useCallback((key) => {\n return rolsterHasError(state.errors, key);\n }, [state.errors]);\n const someErrors = useCallback((keys) => {\n return rolsterSomeErrors(state.errors, keys);\n }, [state.errors]);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n ...refactorForGroups(defaultValue.current, state.validators)\n }));\n }, []);\n return {\n ...state,\n disable,\n enable,\n enabled: !state.disabled,\n error: state.errors[0],\n findByUuid,\n hasError,\n invalid: !state.valid,\n merge,\n pristine: !state.dirty,\n pristines: !state.dirties,\n push,\n remove,\n reset,\n setDefaultValue,\n setValidators,\n setValue,\n someErrors,\n untouched: !state.touched,\n untoucheds: !state.toucheds,\n wrong: state.touched && !state.valid\n };\n}\n//# sourceMappingURL=form-array.js.map","import { createFormControlOptions, formControlIsValid, hasError as rolsterHasError, someErrors as rolsterSomeErrors } from '@rolster/forms/helpers';\nimport { useCallback, useRef, useState } from 'react';\nfunction errorsInControl(value, validators) {\n return validators ? formControlIsValid({ value, validators }) : [];\n}\nfunction useControl(options, validators) {\n const formControl = createFormControlOptions(options, validators);\n const defaultValue = useRef(formControl.value);\n const [state, setState] = useState(() => {\n return {\n dirty: false,\n disabled: false,\n errors: errorsInControl(formControl.value, formControl.validators),\n focused: false,\n touched: !!formControl.touched,\n value: formControl.value,\n validators: formControl.validators\n };\n });\n const elementRef = useRef(null);\n const focus = useCallback(() => {\n setState((state) => ({ ...state, focused: true }));\n }, []);\n const blur = useCallback(() => {\n setState((state) => ({ ...state, focused: false, touched: true }));\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const touch = useCallback(() => {\n setState((state) => ({ ...state, touched: true }));\n }, []);\n const setDefaultValue = useCallback((value) => {\n defaultValue.current = value;\n setState((state) => ({\n ...state,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setStartValue = useCallback((value) => {\n setState((state) => ({\n ...state,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setValue = useCallback((value) => {\n setState((state) => ({\n ...state,\n dirty: true,\n errors: errorsInControl(value, state.validators),\n value\n }));\n }, []);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n errors: errorsInControl(state.value, validators),\n validators\n }));\n }, []);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n dirty: false,\n errors: errorsInControl(defaultValue.current, state.validators),\n value: defaultValue.current,\n touched: false\n }));\n }, []);\n const hasError = useCallback((key) => {\n return rolsterHasError(state.errors, key);\n }, [state.errors]);\n const someErrors = useCallback((keys) => {\n return rolsterSomeErrors(state.errors, keys);\n }, [state.errors]);\n const valid = state.errors.length === 0;\n return {\n ...state,\n blur,\n disable,\n elementRef,\n enable,\n enabled: !state.disabled,\n error: state.errors[0],\n focus,\n hasError,\n invalid: !valid,\n pristine: !state.dirty,\n reset,\n setDefaultValue,\n setStartValue,\n setValidators,\n setValue,\n someErrors,\n touch,\n unfocused: !state.focused,\n untouched: !state.touched,\n valid,\n wrong: state.touched && !valid\n };\n}\nexport function useReactControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useFormControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useInputControl(options, validators) {\n return useControl(options, validators);\n}\n//# sourceMappingURL=form-control.js.map","import { controlsToValue, createFormGroupOptions, formGroupIsValid, verifyAllTrueInControls } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nfunction refactorForValid(controls, validators) {\n const errors = validators ? formGroupIsValid({ controls, validators }) : [];\n return {\n errors,\n valid: errors.length === 0 && verifyAllTrueInControls(controls, 'valid')\n };\n}\nfunction checkAllSuccess(status) {\n return status.reduce((success, status) => success && status, true);\n}\nfunction checkPartialSuccess(status) {\n return status.reduce((success, status) => success || status, false);\n}\nexport function useFormGroup(options, validators) {\n const formGroup = createFormGroupOptions(options, validators);\n const formInitialized = useRef({\n dirty: false,\n touched: false,\n value: false,\n visual: false\n });\n const formGroupStatus = useMemo(() => {\n const dirty = [];\n const touched = [];\n const value = [];\n const visual = [];\n Object.values(formGroup.controls).forEach((control) => {\n dirty.push(control.dirty);\n touched.push(control.touched);\n value.push(control.value);\n visual.push(control.disabled);\n visual.push(control.focused);\n });\n return {\n dirty,\n touched,\n value,\n visual\n };\n }, [formGroup.controls]);\n const [state, setState] = useState(() => {\n return {\n ...refactorForValid(formGroup.controls, formGroup.validators),\n controls: formGroup.controls,\n dirties: checkAllSuccess(formGroupStatus.dirty),\n dirty: checkPartialSuccess(formGroupStatus.dirty),\n touched: checkPartialSuccess(formGroupStatus.touched),\n toucheds: checkAllSuccess(formGroupStatus.touched),\n validators: formGroup.validators,\n value: controlsToValue(formGroup.controls)\n };\n });\n useEffect(() => {\n if (formInitialized.current.value) {\n setState((state) => ({\n ...state,\n ...refactorForValid(formGroup.controls, state.validators),\n controls: formGroup.controls,\n value: controlsToValue(formGroup.controls)\n }));\n }\n else {\n formInitialized.current.value = true;\n }\n }, formGroupStatus.value);\n useEffect(() => {\n if (formInitialized.current.dirty) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n dirty: checkPartialSuccess(formGroupStatus.dirty),\n dirties: checkAllSuccess(formGroupStatus.dirty)\n }));\n }\n else {\n formInitialized.current.dirty = true;\n }\n }, formGroupStatus.dirty);\n useEffect(() => {\n if (formInitialized.current.touched) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls,\n touched: checkPartialSuccess(formGroupStatus.touched),\n toucheds: checkAllSuccess(formGroupStatus.touched)\n }));\n }\n else {\n formInitialized.current.touched = true;\n }\n }, formGroupStatus.touched);\n useEffect(() => {\n if (formInitialized.current.visual) {\n setState((state) => ({\n ...state,\n controls: formGroup.controls\n }));\n }\n else {\n formInitialized.current.visual = true;\n }\n }, formGroupStatus.visual);\n const setValidators = useCallback((validators) => {\n setState((state) => ({\n ...state,\n ...refactorForValid(state.controls, validators)\n }));\n }, []);\n const reset = useCallback(() => {\n Object.values(formGroup.controls).forEach((control) => {\n control.reset();\n });\n }, []);\n return {\n ...state,\n error: state.errors[0],\n invalid: !state.valid,\n pristine: !state.dirty,\n pristines: !state.dirties,\n reset,\n setValidators,\n untouched: !state.touched,\n untoucheds: !state.toucheds,\n wrong: state.touched && !state.valid\n };\n}\n//# sourceMappingURL=form-group.js.map","import { reduceControlsToArray } from '@rolster/forms/helpers';\nexport function reduceControlsToValues(controls) {\n return reduceControlsToArray(controls, 'value');\n}\nexport function reduceGroupToValues(group) {\n return reduceControlsToValues(group.controls);\n}\n//# sourceMappingURL=helpers.js.map","import { useMemo, useState } from 'react';\nexport function useFormArrayGroupSelect({ formArray }) {\n const [formSelect, setFormGroup] = useState();\n const formGroup = useMemo(() => {\n return (formSelect &&\n formArray.groups.find(({ uuid }) => formSelect.uuid === uuid));\n }, [formArray.value, formSelect]);\n return { formGroup, setFormGroup };\n}\n//# sourceMappingURL=hooks.js.map"],"names":["formControlIsValid","hasError","someErrors","createFormControlOptions","uuid","refactorForValid","formGroupIsValid","verifyAllTrueInControls","refactorForControls","verifyAnyTrueInControls","controlsToValue","createFormGroupOptions","formArrayIsValid","verifyAllTrueInGroups","createFormArrayOptions","useRef","use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