@rolster/react-forms 18.9.1 → 18.10.1

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
@@ -40,6 +40,10 @@ class RolsterReactArrayControl {
40
40
  touch() {
41
41
  this.untouched && this.refresh({ touched: true });
42
42
  }
43
+ setInitialValue(value) {
44
+ this.initialValue = value;
45
+ this.setValue(value);
46
+ }
43
47
  setValue(value) {
44
48
  this.refresh({ value });
45
49
  }
@@ -191,8 +195,8 @@ class RolsterArrayList extends RolsterReactArrayControl {
191
195
  subscribeControls(newControls) {
192
196
  Object.values(newControls).forEach((control) => {
193
197
  control.subscribe((options) => {
194
- const controls = this.controls.map((currentControls) => currentControls !== newControls
195
- ? currentControls
198
+ const controls = this.controls.map((_controls) => _controls !== newControls
199
+ ? _controls
196
200
  : Object.entries(newControls).reduce((controls, [key, control]) => {
197
201
  controls[key] =
198
202
  control.uuid === options.uuid
@@ -216,115 +220,128 @@ function formArrayList(valueToControls, options) {
216
220
  });
217
221
  }
218
222
 
219
- function useFormArray(options, arrayValidators) {
220
- const arrayOptions = _arguments.createFormArrayOptions(options, arrayValidators);
221
- const groups = arrayOptions.groups || [];
222
- const currentState = react.useRef(groups);
223
+ function useFormArray(options, validators) {
224
+ const _options = _arguments.createFormArrayOptions(options, validators);
225
+ const groups = _options.groups || [];
226
+ const _value = react.useRef(groups);
223
227
  const [state, setState] = react.useState({
224
228
  controls: groups.map(({ controls }) => controls),
225
229
  disabled: false,
226
230
  groups,
227
231
  value: groups.map(({ controls }) => helpers.controlsToValue(controls)),
228
- validators: arrayOptions.validators
232
+ validators: _options.validators
233
+ });
234
+ const [errors, setErrors] = react.useState([]);
235
+ const [controlState, setControlState] = react.useState({
236
+ valid: false,
237
+ dirty: false,
238
+ dirtyAll: false,
239
+ touched: false,
240
+ touchedAll: false
229
241
  });
230
- const errors = state.validators
231
- ? helpers.arrayIsValid({ groups, validators: state.validators })
232
- : [];
233
- const error = errors[0];
234
- const valid = errors.length === 0 && helpers.groupAllChecked(state.groups, 'valid');
235
- const dirty = helpers.groupPartialChecked(state.groups, 'dirty');
236
- const dirtyAll = helpers.groupAllChecked(state.groups, 'dirty');
237
- const touched = helpers.groupPartialChecked(state.groups, 'touched');
238
- const touchedAll = helpers.groupAllChecked(state.groups, 'touched');
239
242
  react.useEffect(() => {
240
243
  const subscriber = (options) => {
241
- setGroups(state.groups.map((group) => group.uuid === options.uuid
244
+ setValue(state.groups.map((group) => group.uuid === options.uuid
242
245
  ? new RolsterArrayGroup(options)
243
246
  : group));
244
247
  };
245
248
  state.groups.forEach((group) => {
246
249
  group.subscribe(subscriber);
247
250
  });
251
+ setState((_state) => ({
252
+ ..._state,
253
+ controls: state.groups.map(({ controls }) => controls),
254
+ value: state.groups.map(({ controls }) => helpers.controlsToValue(controls))
255
+ }));
248
256
  }, [state.groups]);
249
- function disable() {
257
+ react.useEffect(() => {
258
+ setErrors(state.validators
259
+ ? helpers.arrayIsValid({
260
+ groups: state.groups,
261
+ validators: state.validators
262
+ })
263
+ : []);
264
+ }, [state.groups, state.validators]);
265
+ react.useEffect(() => {
266
+ setControlState({
267
+ valid: errors.length === 0 && helpers.groupAllChecked(state.groups, 'valid'),
268
+ dirty: helpers.groupPartialChecked(state.groups, 'dirty'),
269
+ dirtyAll: helpers.groupAllChecked(state.groups, 'dirty'),
270
+ touched: helpers.groupPartialChecked(state.groups, 'touched'),
271
+ touchedAll: helpers.groupAllChecked(state.groups, 'touched')
272
+ });
273
+ }, [state.groups, errors]);
274
+ const disable = react.useCallback(() => {
250
275
  setState((state) => ({ ...state, disabled: true }));
251
- }
252
- function enable() {
276
+ }, []);
277
+ const enable = react.useCallback(() => {
253
278
  setState((state) => ({ ...state, disabled: false }));
254
- }
255
- function setGroups(groups) {
256
- setState((currentState) => ({
257
- ...currentState,
258
- groups,
259
- controls: groups.map(({ controls }) => controls),
260
- value: groups.map(({ controls }) => helpers.controlsToValue(controls))
279
+ }, []);
280
+ const setValue = react.useCallback((groups) => {
281
+ setState((state) => ({ ...state, groups }));
282
+ }, []);
283
+ const setInitialValue = react.useCallback((groups) => {
284
+ setState((state) => ({ ...state, groups }));
285
+ _value.current = groups;
286
+ }, []);
287
+ const push = react.useCallback((group) => {
288
+ setState((state) => ({ ...state, groups: [...state.groups, group] }));
289
+ }, []);
290
+ const merge = react.useCallback((groups) => {
291
+ setState((state) => ({ ...state, groups: [...state.groups, ...groups] }));
292
+ }, []);
293
+ const remove = react.useCallback(({ uuid }) => {
294
+ setState((state) => ({
295
+ ...state,
296
+ groups: state.groups.filter((group) => group.uuid !== uuid)
261
297
  }));
262
- }
263
- function push(group) {
264
- setGroups([...state.groups, group]);
265
- }
266
- function merge(groups) {
267
- setGroups([...state.groups, ...groups]);
268
- }
269
- function set(groups) {
270
- setGroups(groups);
271
- }
272
- function remove({ uuid }) {
273
- setGroups(state.groups.filter((group) => group.uuid !== uuid));
274
- }
275
- function hasError(key) {
276
- return helpers.hasError(errors, key);
277
- }
278
- function someErrors(keys) {
279
- return helpers.someErrors(errors, keys);
280
- }
281
- function reset() {
282
- setGroups(currentState.current);
283
- }
284
- function setValidators(validators) {
298
+ }, []);
299
+ const reset = react.useCallback(() => {
300
+ setState((state) => ({ ...state, groups: _value.current }));
301
+ }, []);
302
+ const setValidators = react.useCallback((validators) => {
285
303
  setState((state) => ({ ...state, validators }));
286
- }
304
+ }, []);
305
+ const hasError = react.useCallback((key) => helpers.hasError(errors, key), [errors]);
306
+ const someErrors = react.useCallback((keys) => helpers.someErrors(errors, keys), [errors]);
287
307
  return {
288
308
  ...state,
289
- dirty,
290
- dirtyAll,
309
+ ...controlState,
291
310
  disable,
292
311
  enable,
293
312
  enabled: !state.disabled,
294
- error,
295
- errors,
313
+ error: errors[0],
314
+ errors: errors,
296
315
  hasError,
297
- invalid: !valid,
316
+ invalid: !controlState.valid,
298
317
  merge,
299
- pristine: !dirty,
300
- pristineAll: !dirtyAll,
318
+ pristine: !controlState.dirty,
319
+ pristineAll: !controlState.dirtyAll,
301
320
  push,
302
321
  remove,
303
322
  reset,
304
- set,
323
+ setInitialValue,
305
324
  setValidators,
325
+ setValue,
306
326
  someErrors,
307
- touched,
308
- touchedAll,
309
- untouched: !touched,
310
- untouchedAll: !touchedAll,
311
- valid,
312
- wrong: touched && !valid
327
+ untouched: !controlState.touched,
328
+ untouchedAll: !controlState.touchedAll,
329
+ wrong: controlState.touched && !controlState.valid
313
330
  };
314
331
  }
315
332
 
316
- function useControl(controlOptions, controlValidators) {
317
- const { value, touched, validators } = _arguments.createFormControlOptions(controlOptions, controlValidators);
333
+ function useControl(options, validators) {
334
+ const _options = _arguments.createFormControlOptions(options, validators);
318
335
  const [state, setState] = react.useState({
319
336
  dirty: false,
320
337
  disabled: false,
321
338
  focused: false,
322
- touched: !!touched,
323
- validators,
324
- value
339
+ touched: !!_options.touched,
340
+ validators: _options.validators,
341
+ value: _options.value
325
342
  });
326
343
  const [errors, setErrors] = react.useState([]);
327
- const initialValue = react.useRef(value);
344
+ const initialValue = react.useRef(_options.value);
328
345
  const elementRef = react.useRef(null);
329
346
  react.useEffect(() => {
330
347
  setErrors(state.validators
@@ -349,6 +366,10 @@ function useControl(controlOptions, controlValidators) {
349
366
  const touch = react.useCallback(() => {
350
367
  setState((state) => ({ ...state, touched: true }));
351
368
  }, []);
369
+ const setInitialValue = react.useCallback((value) => {
370
+ initialValue.current = value;
371
+ setState((state) => ({ ...state, dirty: true, value }));
372
+ }, []);
352
373
  const setValue = react.useCallback((value) => {
353
374
  setState((state) => ({ ...state, dirty: true, value }));
354
375
  }, []);
@@ -363,12 +384,8 @@ function useControl(controlOptions, controlValidators) {
363
384
  touched: false
364
385
  }));
365
386
  }, []);
366
- function hasError(key) {
367
- return helpers.hasError(errors, key);
368
- }
369
- function someErrors(keys) {
370
- return helpers.someErrors(errors, keys);
371
- }
387
+ const hasError = react.useCallback((key) => helpers.hasError(errors, key), [errors]);
388
+ const someErrors = react.useCallback((keys) => helpers.someErrors(errors, keys), [errors]);
372
389
  const valid = errors.length === 0;
373
390
  return {
374
391
  ...state,
@@ -384,6 +401,7 @@ function useControl(controlOptions, controlValidators) {
384
401
  invalid: !valid,
385
402
  pristine: !state.dirty,
386
403
  reset,
404
+ setInitialValue,
387
405
  setValidators,
388
406
  setValue,
389
407
  someErrors,
@@ -405,9 +423,9 @@ function useInputControl(options, validators) {
405
423
  }
406
424
 
407
425
  function useFormGroup(options, groupValidators) {
408
- const groupOptions = _arguments.createFormGroupOptions(options, groupValidators);
409
- const [validators, setValidators] = react.useState(groupOptions.validators);
410
- const { controls } = groupOptions;
426
+ const _options = _arguments.createFormGroupOptions(options, groupValidators);
427
+ const [validators, setValidators] = react.useState(_options.validators);
428
+ const { controls } = _options;
411
429
  const errors = validators ? helpers.groupIsValid({ controls, validators }) : [];
412
430
  const valid = errors.length === 0 && helpers.controlsAllChecked(controls, 'valid');
413
431
  const value = helpers.controlsToValue(controls);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../esm/form-array/form-array-control.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"],"sourcesContent":["import { createFormControlOptions } from '@rolster/forms/arguments';\nimport { controlIsValid, hasError, someErrors } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nexport class RolsterReactArrayControl {\n constructor(options) {\n this.initialValue = options.initialValue;\n this.uuid = options.uuid;\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 const { value, validators } = options;\n this.value = value;\n this.validators = validators;\n this.errors = validators ? controlIsValid({ value, validators }) : [];\n this.error = this.errors[0];\n }\n focus() {\n this.unfocused && this.refresh({ focused: true });\n }\n blur() {\n this.focused && this.refresh({ focused: false, touched: true });\n }\n disable() {\n this.enabled && this.refresh({ disabled: true });\n }\n enable() {\n this.disabled && this.refresh({ disabled: false });\n }\n touch() {\n this.untouched && this.refresh({ touched: true });\n }\n setValue(value) {\n this.refresh({ value });\n }\n setValidators(validators) {\n this.refresh({ 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 this.refresh({\n dirty: false,\n touched: false,\n value: this.initialValue\n });\n }\n refresh(changes) {\n this.subscriber &&\n this.subscriber({\n ...this,\n ...changes,\n initialValue: this.initialValue\n });\n }\n}\nexport class RolsterArrayControl extends RolsterReactArrayControl {\n constructor(options) {\n super(options);\n this.valid = this.errors.length === 0;\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n }\n clone(options) {\n return new RolsterArrayControl(options);\n }\n}\nfunction rolsterArrayControl(options, validators) {\n const controlOptions = createFormControlOptions(options, validators);\n return new RolsterArrayControl({\n ...controlOptions,\n initialValue: controlOptions.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","import { createFormGroupOptions } from '@rolster/forms/arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nexport class RolsterArrayGroup {\n constructor(options) {\n const { controls, resource, uuid, validators } = options;\n this.uuid = uuid;\n this.controls = controls;\n this.validators = validators;\n this.resource = resource;\n this.errors = validators ? groupIsValid({ controls, validators }) : [];\n this.error = this.errors[0];\n this.valid =\n this.errors.length === 0 && controlsAllChecked(controls, 'valid');\n this.invalid = !this.valid;\n this.dirty = controlsPartialChecked(controls, 'dirty');\n this.dirtyAll = controlsAllChecked(controls, 'dirty');\n this.touched = controlsPartialChecked(controls, 'touched');\n this.touchedAll = controlsAllChecked(controls, 'touched');\n this.untouched = !this.touched;\n this.untouchedAll = !this.touchedAll;\n this.pristine = !this.dirty;\n this.pristineAll = !this.dirtyAll;\n this.wrong = this.touched && this.invalid;\n this.value = controlsToValue(controls);\n const subscriber = (options) => {\n this.refresh({\n controls: Object.entries(this.controls).reduce((controls, [key, control]) => {\n controls[key] =\n control.uuid === options.uuid ? control.clone(options) : control;\n return controls;\n }, {})\n });\n };\n Object.values(controls).forEach((control) => {\n control.subscribe(subscriber);\n });\n }\n setValidators(validators) {\n this.refresh({ validators });\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n }\n refresh(changes) {\n this.subscriber && this.subscriber({ ...this, ...changes });\n }\n}\nexport function formArrayGroup(options, validators) {\n return new RolsterArrayGroup({\n ...createFormGroupOptions(options, validators),\n uuid: uuid()\n });\n}\n//# sourceMappingURL=form-array-group.js.map","import { controlsAllChecked, controlsToValue } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { RolsterReactArrayControl } from './form-array-control';\nexport class RolsterArrayList extends RolsterReactArrayControl {\n constructor(options) {\n const value = options.controls.map((controls) => controlsToValue(controls));\n super({ ...options, value });\n this.valueToControls = options.valueToControls;\n this.controls = options.controls;\n this.valid =\n this.errors.length === 0 &&\n this.controls.reduce((valid, controls) => valid && controlsAllChecked(controls, 'valid'), true);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n options.controls.forEach((controls) => {\n this.subscribeControls(controls);\n });\n }\n setValue(value) {\n this.refresh({\n controls: value.map((value) => this.valueToControls(value))\n });\n }\n clone(options) {\n return new RolsterArrayList(options);\n }\n push(controls) {\n this.refresh({\n controls: [...this.controls, controls]\n });\n }\n remove(controls) {\n this.refresh({\n controls: this.controls.filter((currentControls) => currentControls !== controls)\n });\n }\n refresh(changes) {\n super.refresh(changes);\n }\n subscribeControls(newControls) {\n Object.values(newControls).forEach((control) => {\n control.subscribe((options) => {\n const controls = this.controls.map((currentControls) => currentControls !== newControls\n ? currentControls\n : Object.entries(newControls).reduce((controls, [key, control]) => {\n controls[key] =\n control.uuid === options.uuid\n ? control.clone(options)\n : control;\n return controls;\n }, {}));\n this.refresh({ controls });\n });\n });\n }\n}\nexport function formArrayList(valueToControls, options) {\n const value = options?.value || [];\n return new RolsterArrayList({\n ...options,\n valueToControls,\n controls: value.map((value) => valueToControls(value)),\n initialValue: value,\n uuid: uuid()\n });\n}\n//# sourceMappingURL=form-array-list.js.map","import { createFormArrayOptions } from '@rolster/forms/arguments';\nimport { arrayIsValid, controlsToValue, groupAllChecked, groupPartialChecked, hasError as rolsterHasError, someErrors as rolsterSomeErrors } from '@rolster/forms/helpers';\nimport { useEffect, useRef, useState } from 'react';\nimport { RolsterArrayGroup } from './form-array-group';\nexport function useFormArray(options, arrayValidators) {\n const arrayOptions = createFormArrayOptions(options, arrayValidators);\n const groups = arrayOptions.groups || [];\n const currentState = useRef(groups);\n const [state, setState] = useState({\n controls: groups.map(({ controls }) => controls),\n disabled: false,\n groups,\n value: groups.map(({ controls }) => controlsToValue(controls)),\n validators: arrayOptions.validators\n });\n const errors = state.validators\n ? arrayIsValid({ groups, validators: state.validators })\n : [];\n const error = errors[0];\n const valid = errors.length === 0 && groupAllChecked(state.groups, 'valid');\n const dirty = groupPartialChecked(state.groups, 'dirty');\n const dirtyAll = groupAllChecked(state.groups, 'dirty');\n const touched = groupPartialChecked(state.groups, 'touched');\n const touchedAll = groupAllChecked(state.groups, 'touched');\n useEffect(() => {\n const subscriber = (options) => {\n setGroups(state.groups.map((group) => group.uuid === options.uuid\n ? new RolsterArrayGroup(options)\n : group));\n };\n state.groups.forEach((group) => {\n group.subscribe(subscriber);\n });\n }, [state.groups]);\n function disable() {\n setState((state) => ({ ...state, disabled: true }));\n }\n function enable() {\n setState((state) => ({ ...state, disabled: false }));\n }\n function setGroups(groups) {\n setState((currentState) => ({\n ...currentState,\n groups,\n controls: groups.map(({ controls }) => controls),\n value: groups.map(({ controls }) => controlsToValue(controls))\n }));\n }\n function push(group) {\n setGroups([...state.groups, group]);\n }\n function merge(groups) {\n setGroups([...state.groups, ...groups]);\n }\n function set(groups) {\n setGroups(groups);\n }\n function remove({ uuid }) {\n setGroups(state.groups.filter((group) => group.uuid !== uuid));\n }\n function hasError(key) {\n return rolsterHasError(errors, key);\n }\n function someErrors(keys) {\n return rolsterSomeErrors(errors, keys);\n }\n function reset() {\n setGroups(currentState.current);\n }\n function setValidators(validators) {\n setState((state) => ({ ...state, validators }));\n }\n return {\n ...state,\n dirty,\n dirtyAll,\n disable,\n enable,\n enabled: !state.disabled,\n error,\n errors,\n hasError,\n invalid: !valid,\n merge,\n pristine: !dirty,\n pristineAll: !dirtyAll,\n push,\n remove,\n reset,\n set,\n setValidators,\n someErrors,\n touched,\n touchedAll,\n untouched: !touched,\n untouchedAll: !touchedAll,\n valid,\n wrong: touched && !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, useEffect, useRef, useState } from 'react';\nfunction useControl(controlOptions, controlValidators) {\n const { value, touched, validators } = createFormControlOptions(controlOptions, controlValidators);\n const [state, setState] = useState({\n dirty: false,\n disabled: false,\n focused: false,\n touched: !!touched,\n validators,\n value\n });\n const [errors, setErrors] = useState([]);\n const initialValue = useRef(value);\n const elementRef = useRef(null);\n useEffect(() => {\n setErrors(state.validators\n ? controlIsValid({\n value: state.value,\n validators: state.validators\n })\n : []);\n }, [state.value, state.validators]);\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 setValue = useCallback((value) => {\n setState((state) => ({ ...state, dirty: true, value }));\n }, []);\n const setValidators = useCallback((validators) => {\n setState((state) => ({ ...state, validators }));\n }, []);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n dirty: false,\n value: initialValue.current,\n touched: false\n }));\n }, []);\n function hasError(key) {\n return rolsterHasError(errors, key);\n }\n function someErrors(keys) {\n return rolsterSomeErrors(errors, keys);\n }\n const valid = errors.length === 0;\n return {\n ...state,\n blur,\n disable,\n elementRef,\n enable,\n enabled: !state.disabled,\n error: errors[0],\n errors,\n focus,\n hasError,\n invalid: !valid,\n pristine: !state.dirty,\n reset,\n setValidators,\n setValue,\n someErrors,\n touch,\n unfocused: !state.focused,\n untouched: !state.touched,\n valid,\n wrong: state.touched && !valid\n };\n}\nexport function useReactControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useFormControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useInputControl(options, validators) {\n return useControl(options, validators);\n}\n//# sourceMappingURL=form-control.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\nimport { useState } from 'react';\nexport function useFormGroup(options, groupValidators) {\n const groupOptions = createFormGroupOptions(options, groupValidators);\n const [validators, setValidators] = useState(groupOptions.validators);\n const { controls } = groupOptions;\n const errors = validators ? groupIsValid({ controls, validators }) : [];\n const valid = errors.length === 0 && controlsAllChecked(controls, 'valid');\n const value = controlsToValue(controls);\n const dirty = controlsPartialChecked(controls, 'dirty');\n const dirtyAll = controlsAllChecked(controls, 'dirty');\n const touched = controlsPartialChecked(controls, 'touched');\n const touchedAll = controlsAllChecked(controls, 'touched');\n function reset() {\n Object.values(controls).forEach((control) => {\n control.reset();\n });\n }\n return {\n controls,\n dirty,\n dirtyAll,\n error: errors[0],\n errors,\n invalid: !valid,\n pristine: !dirty,\n pristineAll: !dirtyAll,\n reset,\n setValidators,\n touched,\n touchedAll,\n untouched: !touched,\n untouchedAll: !touchedAll,\n valid,\n value,\n wrong: touched && !valid\n };\n}\n//# sourceMappingURL=form-group.js.map"],"names":["controlIsValid","hasError","someErrors","createFormControlOptions","uuid","groupIsValid","controlsAllChecked","controlsPartialChecked","controlsToValue","createFormGroupOptions","createFormArrayOptions","useRef","useState","arrayIsValid","groupAllChecked","groupPartialChecked","useEffect","rolsterHasError","rolsterSomeErrors","useCallback"],"mappings":";;;;;;;;;AAGO,MAAM,wBAAwB,CAAC;AACtC,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AACjD,QAAQ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AACjC,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;AACzC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;AACvC,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;AACzC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;AACvC,QAAQ,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AACrC,QAAQ,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;AACpC,QAAQ,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AAC3C,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;AACtC,QAAQ,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;AAC9C,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AAC3B,QAAQ,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AACrC,QAAQ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EAAE,CAAC,KAAK;AACvB,QAAQ,QAAQ,EAAE,CAAC,KAAK;AACxB,QAAQ,WAAW,EAAE,CAAC,QAAQ;AAC9B,QAAQ,KAAK;AACb,QAAQ,aAAa;AACrB,QAAQ,OAAO;AACf,QAAQ,UAAU;AAClB,QAAQ,SAAS,EAAE,CAAC,OAAO;AAC3B,QAAQ,YAAY,EAAE,CAAC,UAAU;AACjC,QAAQ,KAAK;AACb,QAAQ,KAAK;AACb,QAAQ,KAAK,EAAE,OAAO,IAAI,CAAC,KAAK;AAChC,KAAK,CAAC;AACN;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../esm/form-array/form-array-control.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"],"sourcesContent":["import { createFormControlOptions } from '@rolster/forms/arguments';\nimport { controlIsValid, hasError, someErrors } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nexport class RolsterReactArrayControl {\n constructor(options) {\n this.initialValue = options.initialValue;\n this.uuid = options.uuid;\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 const { value, validators } = options;\n this.value = value;\n this.validators = validators;\n this.errors = validators ? controlIsValid({ value, validators }) : [];\n this.error = this.errors[0];\n }\n focus() {\n this.unfocused && this.refresh({ focused: true });\n }\n blur() {\n this.focused && this.refresh({ focused: false, touched: true });\n }\n disable() {\n this.enabled && this.refresh({ disabled: true });\n }\n enable() {\n this.disabled && this.refresh({ disabled: false });\n }\n touch() {\n this.untouched && this.refresh({ touched: true });\n }\n setInitialValue(value) {\n this.initialValue = value;\n this.setValue(value);\n }\n setValue(value) {\n this.refresh({ value });\n }\n setValidators(validators) {\n this.refresh({ 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 this.refresh({\n dirty: false,\n touched: false,\n value: this.initialValue\n });\n }\n refresh(changes) {\n this.subscriber &&\n this.subscriber({\n ...this,\n ...changes,\n initialValue: this.initialValue\n });\n }\n}\nexport class RolsterArrayControl extends RolsterReactArrayControl {\n constructor(options) {\n super(options);\n this.valid = this.errors.length === 0;\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n }\n clone(options) {\n return new RolsterArrayControl(options);\n }\n}\nfunction rolsterArrayControl(options, validators) {\n const controlOptions = createFormControlOptions(options, validators);\n return new RolsterArrayControl({\n ...controlOptions,\n initialValue: controlOptions.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","import { createFormGroupOptions } from '@rolster/forms/arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nexport class RolsterArrayGroup {\n constructor(options) {\n const { controls, resource, uuid, validators } = options;\n this.uuid = uuid;\n this.controls = controls;\n this.validators = validators;\n this.resource = resource;\n this.errors = validators ? groupIsValid({ controls, validators }) : [];\n this.error = this.errors[0];\n this.valid =\n this.errors.length === 0 && controlsAllChecked(controls, 'valid');\n this.invalid = !this.valid;\n this.dirty = controlsPartialChecked(controls, 'dirty');\n this.dirtyAll = controlsAllChecked(controls, 'dirty');\n this.touched = controlsPartialChecked(controls, 'touched');\n this.touchedAll = controlsAllChecked(controls, 'touched');\n this.untouched = !this.touched;\n this.untouchedAll = !this.touchedAll;\n this.pristine = !this.dirty;\n this.pristineAll = !this.dirtyAll;\n this.wrong = this.touched && this.invalid;\n this.value = controlsToValue(controls);\n const subscriber = (options) => {\n this.refresh({\n controls: Object.entries(this.controls).reduce((controls, [key, control]) => {\n controls[key] =\n control.uuid === options.uuid ? control.clone(options) : control;\n return controls;\n }, {})\n });\n };\n Object.values(controls).forEach((control) => {\n control.subscribe(subscriber);\n });\n }\n setValidators(validators) {\n this.refresh({ validators });\n }\n subscribe(subscriber) {\n this.subscriber = subscriber;\n }\n refresh(changes) {\n this.subscriber && this.subscriber({ ...this, ...changes });\n }\n}\nexport function formArrayGroup(options, validators) {\n return new RolsterArrayGroup({\n ...createFormGroupOptions(options, validators),\n uuid: uuid()\n });\n}\n//# sourceMappingURL=form-array-group.js.map","import { controlsAllChecked, controlsToValue } from '@rolster/forms/helpers';\nimport { v4 as uuid } from 'uuid';\nimport { RolsterReactArrayControl } from './form-array-control';\nexport class RolsterArrayList extends RolsterReactArrayControl {\n constructor(options) {\n const value = options.controls.map((controls) => controlsToValue(controls));\n super({ ...options, value });\n this.valueToControls = options.valueToControls;\n this.controls = options.controls;\n this.valid =\n this.errors.length === 0 &&\n this.controls.reduce((valid, controls) => valid && controlsAllChecked(controls, 'valid'), true);\n this.invalid = !this.valid;\n this.wrong = this.touched && this.invalid;\n options.controls.forEach((controls) => {\n this.subscribeControls(controls);\n });\n }\n setValue(value) {\n this.refresh({\n controls: value.map((value) => this.valueToControls(value))\n });\n }\n clone(options) {\n return new RolsterArrayList(options);\n }\n push(controls) {\n this.refresh({\n controls: [...this.controls, controls]\n });\n }\n remove(controls) {\n this.refresh({\n controls: this.controls.filter((currentControls) => currentControls !== controls)\n });\n }\n refresh(changes) {\n super.refresh(changes);\n }\n subscribeControls(newControls) {\n Object.values(newControls).forEach((control) => {\n control.subscribe((options) => {\n const controls = this.controls.map((_controls) => _controls !== newControls\n ? _controls\n : Object.entries(newControls).reduce((controls, [key, control]) => {\n controls[key] =\n control.uuid === options.uuid\n ? control.clone(options)\n : control;\n return controls;\n }, {}));\n this.refresh({ controls });\n });\n });\n }\n}\nexport function formArrayList(valueToControls, options) {\n const value = options?.value || [];\n return new RolsterArrayList({\n ...options,\n valueToControls,\n controls: value.map((value) => valueToControls(value)),\n initialValue: value,\n uuid: uuid()\n });\n}\n//# sourceMappingURL=form-array-list.js.map","import { createFormArrayOptions } from '@rolster/forms/arguments';\nimport { arrayIsValid, controlsToValue, groupAllChecked, groupPartialChecked, hasError as rolsterHasError, someErrors as rolsterSomeErrors } from '@rolster/forms/helpers';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { RolsterArrayGroup } from './form-array-group';\nexport function useFormArray(options, validators) {\n const _options = createFormArrayOptions(options, validators);\n const groups = _options.groups || [];\n const _value = useRef(groups);\n const [state, setState] = useState({\n controls: groups.map(({ controls }) => controls),\n disabled: false,\n groups,\n value: groups.map(({ controls }) => controlsToValue(controls)),\n validators: _options.validators\n });\n const [errors, setErrors] = useState([]);\n const [controlState, setControlState] = useState({\n valid: false,\n dirty: false,\n dirtyAll: false,\n touched: false,\n touchedAll: false\n });\n useEffect(() => {\n const subscriber = (options) => {\n setValue(state.groups.map((group) => group.uuid === options.uuid\n ? new RolsterArrayGroup(options)\n : group));\n };\n state.groups.forEach((group) => {\n group.subscribe(subscriber);\n });\n setState((_state) => ({\n ..._state,\n controls: state.groups.map(({ controls }) => controls),\n value: state.groups.map(({ controls }) => controlsToValue(controls))\n }));\n }, [state.groups]);\n useEffect(() => {\n setErrors(state.validators\n ? arrayIsValid({\n groups: state.groups,\n validators: state.validators\n })\n : []);\n }, [state.groups, state.validators]);\n useEffect(() => {\n setControlState({\n valid: errors.length === 0 && groupAllChecked(state.groups, 'valid'),\n dirty: groupPartialChecked(state.groups, 'dirty'),\n dirtyAll: groupAllChecked(state.groups, 'dirty'),\n touched: groupPartialChecked(state.groups, 'touched'),\n touchedAll: groupAllChecked(state.groups, 'touched')\n });\n }, [state.groups, errors]);\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) => ({ ...state, groups }));\n }, []);\n const setInitialValue = useCallback((groups) => {\n setState((state) => ({ ...state, groups }));\n _value.current = groups;\n }, []);\n const push = useCallback((group) => {\n setState((state) => ({ ...state, groups: [...state.groups, group] }));\n }, []);\n const merge = useCallback((groups) => {\n setState((state) => ({ ...state, groups: [...state.groups, ...groups] }));\n }, []);\n const remove = useCallback(({ uuid }) => {\n setState((state) => ({\n ...state,\n groups: state.groups.filter((group) => group.uuid !== uuid)\n }));\n }, []);\n const reset = useCallback(() => {\n setState((state) => ({ ...state, groups: _value.current }));\n }, []);\n const setValidators = useCallback((validators) => {\n setState((state) => ({ ...state, validators }));\n }, []);\n const hasError = useCallback((key) => rolsterHasError(errors, key), [errors]);\n const someErrors = useCallback((keys) => rolsterSomeErrors(errors, keys), [errors]);\n return {\n ...state,\n ...controlState,\n disable,\n enable,\n enabled: !state.disabled,\n error: errors[0],\n errors: errors,\n hasError,\n invalid: !controlState.valid,\n merge,\n pristine: !controlState.dirty,\n pristineAll: !controlState.dirtyAll,\n push,\n remove,\n reset,\n setInitialValue,\n setValidators,\n setValue,\n someErrors,\n untouched: !controlState.touched,\n untouchedAll: !controlState.touchedAll,\n wrong: controlState.touched && !controlState.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, useEffect, useRef, useState } from 'react';\nfunction useControl(options, validators) {\n const _options = createFormControlOptions(options, validators);\n const [state, setState] = useState({\n dirty: false,\n disabled: false,\n focused: false,\n touched: !!_options.touched,\n validators: _options.validators,\n value: _options.value\n });\n const [errors, setErrors] = useState([]);\n const initialValue = useRef(_options.value);\n const elementRef = useRef(null);\n useEffect(() => {\n setErrors(state.validators\n ? controlIsValid({\n value: state.value,\n validators: state.validators\n })\n : []);\n }, [state.value, state.validators]);\n const focus = useCallback(() => {\n setState((state) => ({ ...state, focused: true }));\n }, []);\n const blur = useCallback(() => {\n setState((state) => ({ ...state, focused: false, touched: true }));\n }, []);\n const disable = useCallback(() => {\n setState((state) => ({ ...state, disabled: true }));\n }, []);\n const enable = useCallback(() => {\n setState((state) => ({ ...state, disabled: false }));\n }, []);\n const touch = useCallback(() => {\n setState((state) => ({ ...state, touched: true }));\n }, []);\n const setInitialValue = useCallback((value) => {\n initialValue.current = value;\n setState((state) => ({ ...state, dirty: true, value }));\n }, []);\n const setValue = useCallback((value) => {\n setState((state) => ({ ...state, dirty: true, value }));\n }, []);\n const setValidators = useCallback((validators) => {\n setState((state) => ({ ...state, validators }));\n }, []);\n const reset = useCallback(() => {\n setState((state) => ({\n ...state,\n dirty: false,\n value: initialValue.current,\n touched: false\n }));\n }, []);\n const hasError = useCallback((key) => rolsterHasError(errors, key), [errors]);\n const someErrors = useCallback((keys) => rolsterSomeErrors(errors, keys), [errors]);\n const valid = errors.length === 0;\n return {\n ...state,\n blur,\n disable,\n elementRef,\n enable,\n enabled: !state.disabled,\n error: errors[0],\n errors,\n focus,\n hasError,\n invalid: !valid,\n pristine: !state.dirty,\n reset,\n setInitialValue,\n setValidators,\n setValue,\n someErrors,\n touch,\n unfocused: !state.focused,\n untouched: !state.touched,\n valid,\n wrong: state.touched && !valid\n };\n}\nexport function useReactControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useFormControl(options, validators) {\n return useControl(options, validators);\n}\nexport function useInputControl(options, validators) {\n return useControl(options, validators);\n}\n//# sourceMappingURL=form-control.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\nimport { useState } from 'react';\nexport function useFormGroup(options, groupValidators) {\n const _options = createFormGroupOptions(options, groupValidators);\n const [validators, setValidators] = useState(_options.validators);\n const { controls } = _options;\n const errors = validators ? groupIsValid({ controls, validators }) : [];\n const valid = errors.length === 0 && controlsAllChecked(controls, 'valid');\n const value = controlsToValue(controls);\n const dirty = controlsPartialChecked(controls, 'dirty');\n const dirtyAll = controlsAllChecked(controls, 'dirty');\n const touched = controlsPartialChecked(controls, 'touched');\n const touchedAll = controlsAllChecked(controls, 'touched');\n function reset() {\n Object.values(controls).forEach((control) => {\n control.reset();\n });\n }\n return {\n controls,\n dirty,\n dirtyAll,\n error: errors[0],\n errors,\n invalid: !valid,\n pristine: !dirty,\n pristineAll: !dirtyAll,\n reset,\n setValidators,\n touched,\n touchedAll,\n untouched: !touched,\n untouchedAll: !touchedAll,\n valid,\n value,\n wrong: touched && !valid\n };\n}\n//# sourceMappingURL=form-group.js.map"],"names":["controlIsValid","hasError","someErrors","createFormControlOptions","uuid","groupIsValid","controlsAllChecked","controlsPartialChecked","controlsToValue","createFormGroupOptions","createFormArrayOptions","useRef","useState","useEffect","arrayIsValid","groupAllChecked","groupPartialChecked","useCallback","rolsterHasError","rolsterSomeErrors"],"mappings":";;;;;;;;;AAGO,MAAM,wBAAwB,CAAC;AACtC,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AACjD,QAAQ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AACjC,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;AACzC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;AACvC,QAAQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;AACzC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;AACvC,QAAQ,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AACrC,QAAQ,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;AACpC,QAAQ,IAAI,CAAC,QAAQ,GAAG,C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