@rolster/react-forms 18.4.2 → 18.5.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 +62 -66
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +62 -66
- package/dist/es/index.js.map +1 -1
- package/dist/esm/form-array/form-array-control.hook.d.ts +6 -6
- package/dist/esm/form-array/form-array-control.hook.js +9 -9
- package/dist/esm/form-array/form-array-group.hook.d.ts +2 -2
- package/dist/esm/form-array/form-array-group.hook.js +2 -2
- package/dist/esm/form-array/form-array.hook.js +17 -17
- package/dist/esm/form-array/form-array.hook.js.map +1 -1
- package/dist/esm/form-control.hook.d.ts +4 -4
- package/dist/esm/form-control.hook.js +26 -30
- package/dist/esm/form-control.hook.js.map +1 -1
- package/dist/esm/form-group.hook.js +3 -3
- package/dist/esm/form-group.hook.js.map +1 -1
- package/dist/esm/form-ref.hook.js +2 -2
- package/dist/esm/types.d.ts +1 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var uuid = require('uuid');
|
|
|
6
6
|
var react = require('react');
|
|
7
7
|
|
|
8
8
|
function itIsFormControlOptions(props) {
|
|
9
|
-
return (typeof props === 'object' && ('
|
|
9
|
+
return (typeof props === 'object' && ('value' in props || 'validators' in props));
|
|
10
10
|
}
|
|
11
11
|
function itIsFormGroupOptions(props) {
|
|
12
12
|
return typeof props === 'object' && 'controls' in props;
|
|
@@ -17,13 +17,13 @@ function itIsFormArrayOptions(props) {
|
|
|
17
17
|
function createFormControlOptions(...argsProps) {
|
|
18
18
|
const [props, validators] = argsProps;
|
|
19
19
|
if (!props) {
|
|
20
|
-
return {
|
|
20
|
+
return { value: props, validators };
|
|
21
21
|
}
|
|
22
22
|
if (!validators && itIsFormControlOptions(props)) {
|
|
23
23
|
return props;
|
|
24
24
|
}
|
|
25
25
|
return {
|
|
26
|
-
|
|
26
|
+
value: props,
|
|
27
27
|
validators
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -64,9 +64,9 @@ function parseBoolean(value) {
|
|
|
64
64
|
FALSY_VALUE.includes(value));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
const controlIsValid = ({
|
|
67
|
+
const controlIsValid = ({ value, validators }) => {
|
|
68
68
|
return validators.reduce((errors, validator) => {
|
|
69
|
-
const error = validator(
|
|
69
|
+
const error = validator(value);
|
|
70
70
|
if (error) {
|
|
71
71
|
errors.push(error);
|
|
72
72
|
}
|
|
@@ -79,9 +79,9 @@ const controlsAllChecked = (controls, key) => {
|
|
|
79
79
|
const controlsPartialChecked = (controls, key) => {
|
|
80
80
|
return Object.values(controls).reduce((value, control) => control.disabled ? value : value || parseBoolean(control[key]), false);
|
|
81
81
|
};
|
|
82
|
-
const
|
|
83
|
-
return Object.entries(controls).reduce((result, [key, {
|
|
84
|
-
result[key] =
|
|
82
|
+
const controlsToValue = (controls) => {
|
|
83
|
+
return Object.entries(controls).reduce((result, [key, { value }]) => {
|
|
84
|
+
result[key] = value;
|
|
85
85
|
return result;
|
|
86
86
|
}, {});
|
|
87
87
|
};
|
|
@@ -112,7 +112,7 @@ const arrayIsValid = ({ groups, validators }) => {
|
|
|
112
112
|
|
|
113
113
|
class RolsterArrayControl {
|
|
114
114
|
constructor(options) {
|
|
115
|
-
this.
|
|
115
|
+
this.initialValue = options.initialValue;
|
|
116
116
|
this.uuid = options.uuid;
|
|
117
117
|
this.focused = !!options.focused;
|
|
118
118
|
this.unfocused = !this.focused;
|
|
@@ -122,10 +122,10 @@ class RolsterArrayControl {
|
|
|
122
122
|
this.pristine = !this.dirty;
|
|
123
123
|
this.disabled = !!options.disabled;
|
|
124
124
|
this.enabled = !this.disabled;
|
|
125
|
-
const {
|
|
126
|
-
this.
|
|
125
|
+
const { value, validators } = options;
|
|
126
|
+
this.value = value;
|
|
127
127
|
this.validators = validators;
|
|
128
|
-
this.errors = validators ? controlIsValid({
|
|
128
|
+
this.errors = validators ? controlIsValid({ value, validators }) : [];
|
|
129
129
|
this.error = this.errors[0];
|
|
130
130
|
this.valid = this.errors.length === 0;
|
|
131
131
|
this.invalid = !this.valid;
|
|
@@ -156,8 +156,8 @@ class RolsterArrayControl {
|
|
|
156
156
|
this.update({ touched: true });
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
|
|
160
|
-
this.update({
|
|
159
|
+
setValue(value) {
|
|
160
|
+
this.update({ value });
|
|
161
161
|
}
|
|
162
162
|
setValidators(validators) {
|
|
163
163
|
this.update({ validators });
|
|
@@ -166,14 +166,14 @@ class RolsterArrayControl {
|
|
|
166
166
|
this.subscriber = listener;
|
|
167
167
|
}
|
|
168
168
|
reset() {
|
|
169
|
-
this.update({
|
|
169
|
+
this.update({ value: this.initialValue, dirty: false, touched: false });
|
|
170
170
|
}
|
|
171
171
|
update(changes) {
|
|
172
172
|
if (this.subscriber) {
|
|
173
173
|
this.subscriber({
|
|
174
174
|
...this,
|
|
175
175
|
...changes,
|
|
176
|
-
|
|
176
|
+
initialValue: this.initialValue
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
}
|
|
@@ -183,7 +183,7 @@ function useArrayControl(options, validators) {
|
|
|
183
183
|
return new RolsterArrayControl({
|
|
184
184
|
...controlOptions,
|
|
185
185
|
uuid: uuid.v4(),
|
|
186
|
-
|
|
186
|
+
initialValue: controlOptions.value
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
function useReactArrayControl(options, validators) {
|
|
@@ -217,7 +217,7 @@ class RolsterArrayGroup {
|
|
|
217
217
|
this.pristine = !this.dirty;
|
|
218
218
|
this.pristineAll = !this.dirtyAll;
|
|
219
219
|
this.wrong = this.touched && this.invalid;
|
|
220
|
-
this.
|
|
220
|
+
this.value = controlsToValue(controls);
|
|
221
221
|
const subscriber = (options) => {
|
|
222
222
|
this.update({
|
|
223
223
|
controls: Object.entries(this.controls).reduce((controls, [key, control]) => {
|
|
@@ -254,27 +254,27 @@ function useFormArray(options, arrayValidators) {
|
|
|
254
254
|
const arrayOptions = createFormArrayOptions(options, arrayValidators);
|
|
255
255
|
const { validators } = arrayOptions;
|
|
256
256
|
const groups = arrayOptions.groups || [];
|
|
257
|
-
const [
|
|
257
|
+
const [state, setState] = react.useState({
|
|
258
258
|
controls: groups.map(({ controls }) => controls),
|
|
259
259
|
disabled: false,
|
|
260
260
|
groups,
|
|
261
|
-
|
|
261
|
+
value: groups.map(({ controls }) => controlsToValue(controls)),
|
|
262
262
|
validators
|
|
263
263
|
});
|
|
264
264
|
const currentState = react.useRef(groups);
|
|
265
265
|
react.useEffect(() => {
|
|
266
266
|
const subscriber = (options) => {
|
|
267
|
-
|
|
267
|
+
setState((state) => ({
|
|
268
268
|
...state,
|
|
269
|
-
groups:
|
|
269
|
+
groups: state.groups.map((group) => group.uuid === options.uuid
|
|
270
270
|
? new RolsterArrayGroup(options)
|
|
271
271
|
: group)
|
|
272
272
|
}));
|
|
273
273
|
};
|
|
274
|
-
|
|
274
|
+
state.groups.forEach((group) => {
|
|
275
275
|
group.subscribe(subscriber);
|
|
276
276
|
});
|
|
277
|
-
}, [
|
|
277
|
+
}, [state]);
|
|
278
278
|
const errors = validators ? arrayIsValid({ groups, validators }) : [];
|
|
279
279
|
const error = errors[0];
|
|
280
280
|
const valid = errors.length === 0 && groupAllChecked(groups, 'valid');
|
|
@@ -283,44 +283,44 @@ function useFormArray(options, arrayValidators) {
|
|
|
283
283
|
const touched = groupPartialChecked(groups, 'touched');
|
|
284
284
|
const touchedAll = groupAllChecked(groups, 'touched');
|
|
285
285
|
function disable() {
|
|
286
|
-
|
|
286
|
+
setState((state) => ({ ...state, disabled: true }));
|
|
287
287
|
}
|
|
288
288
|
function enable() {
|
|
289
|
-
|
|
289
|
+
setState((state) => ({ ...state, disabled: false }));
|
|
290
290
|
}
|
|
291
291
|
function setGroups(groups) {
|
|
292
|
-
|
|
292
|
+
setState((currentState) => ({
|
|
293
293
|
...currentState,
|
|
294
294
|
groups,
|
|
295
295
|
controls: groups.map(({ controls }) => controls),
|
|
296
|
-
|
|
296
|
+
value: groups.map(({ controls }) => controlsToValue(controls))
|
|
297
297
|
}));
|
|
298
298
|
}
|
|
299
299
|
function push(group) {
|
|
300
|
-
setGroups([...
|
|
300
|
+
setGroups([...state.groups, group]);
|
|
301
301
|
}
|
|
302
302
|
function merge(groups) {
|
|
303
|
-
setGroups([...
|
|
303
|
+
setGroups([...state.groups, ...groups]);
|
|
304
304
|
}
|
|
305
305
|
function set(groups) {
|
|
306
306
|
setGroups(groups);
|
|
307
307
|
}
|
|
308
308
|
function remove({ uuid }) {
|
|
309
|
-
setGroups(
|
|
309
|
+
setGroups(state.groups.filter((group) => group.uuid !== uuid));
|
|
310
310
|
}
|
|
311
311
|
function reset() {
|
|
312
312
|
setGroups(currentState.current);
|
|
313
313
|
}
|
|
314
314
|
function setValidators(validators) {
|
|
315
|
-
|
|
315
|
+
setState((state) => ({ ...state, validators }));
|
|
316
316
|
}
|
|
317
317
|
return {
|
|
318
|
-
...
|
|
318
|
+
...state,
|
|
319
319
|
dirty,
|
|
320
320
|
dirtyAll,
|
|
321
321
|
disable,
|
|
322
322
|
enable,
|
|
323
|
-
enabled: !
|
|
323
|
+
enabled: !state.disabled,
|
|
324
324
|
error,
|
|
325
325
|
errors,
|
|
326
326
|
invalid: !valid,
|
|
@@ -342,77 +342,73 @@ function useFormArray(options, arrayValidators) {
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
function useControl(controlOptions, controlValidators) {
|
|
345
|
-
const {
|
|
346
|
-
const [
|
|
345
|
+
const { value, touched, validators } = createFormControlOptions(controlOptions, controlValidators);
|
|
346
|
+
const [state, setState] = react.useState({
|
|
347
347
|
dirty: false,
|
|
348
348
|
disabled: false,
|
|
349
349
|
focused: false,
|
|
350
|
-
state: state,
|
|
351
350
|
touched: !!touched,
|
|
352
|
-
validators
|
|
351
|
+
validators,
|
|
352
|
+
value
|
|
353
353
|
});
|
|
354
|
-
const
|
|
354
|
+
const initialValue = react.useRef(value);
|
|
355
355
|
const elementRef = react.useRef(null);
|
|
356
|
-
const errors =
|
|
356
|
+
const errors = state.validators
|
|
357
357
|
? controlIsValid({
|
|
358
|
-
|
|
359
|
-
validators:
|
|
358
|
+
value: state.value,
|
|
359
|
+
validators: state.validators
|
|
360
360
|
})
|
|
361
361
|
: [];
|
|
362
362
|
const valid = errors.length === 0;
|
|
363
363
|
function focus() {
|
|
364
|
-
|
|
364
|
+
setState((state) => ({ ...state, focused: true }));
|
|
365
365
|
}
|
|
366
366
|
function blur() {
|
|
367
|
-
|
|
367
|
+
setState((state) => ({ ...state, focused: false, touched: true }));
|
|
368
368
|
}
|
|
369
369
|
function disable() {
|
|
370
|
-
|
|
370
|
+
setState((state) => ({ ...state, disabled: true }));
|
|
371
371
|
}
|
|
372
372
|
function enable() {
|
|
373
|
-
|
|
373
|
+
setState((state) => ({ ...state, disabled: false }));
|
|
374
374
|
}
|
|
375
375
|
function touch() {
|
|
376
|
-
|
|
376
|
+
setState((state) => ({ ...state, touched: true }));
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
|
|
380
|
-
...currentState,
|
|
381
|
-
dirty: true,
|
|
382
|
-
state
|
|
383
|
-
}));
|
|
378
|
+
function setValue(value) {
|
|
379
|
+
setState((state) => ({ ...state, dirty: true, value }));
|
|
384
380
|
}
|
|
385
381
|
function setValidators(validators) {
|
|
386
|
-
|
|
382
|
+
setState((state) => ({ ...state, validators }));
|
|
387
383
|
}
|
|
388
384
|
function reset() {
|
|
389
|
-
|
|
390
|
-
...
|
|
385
|
+
setState((state) => ({
|
|
386
|
+
...state,
|
|
391
387
|
dirty: false,
|
|
392
|
-
|
|
388
|
+
value: initialValue.current,
|
|
393
389
|
touched: false
|
|
394
390
|
}));
|
|
395
391
|
}
|
|
396
392
|
return {
|
|
397
|
-
...
|
|
393
|
+
...state,
|
|
398
394
|
blur,
|
|
399
395
|
disable,
|
|
400
396
|
elementRef,
|
|
401
397
|
enable,
|
|
402
|
-
enabled: !
|
|
398
|
+
enabled: !state.disabled,
|
|
403
399
|
error: errors[0],
|
|
404
400
|
errors,
|
|
405
401
|
focus,
|
|
406
402
|
invalid: !valid,
|
|
407
|
-
pristine: !
|
|
403
|
+
pristine: !state.dirty,
|
|
408
404
|
reset,
|
|
409
|
-
setState,
|
|
410
405
|
setValidators,
|
|
406
|
+
setValue,
|
|
411
407
|
touch,
|
|
412
|
-
unfocused: !
|
|
413
|
-
untouched: !
|
|
408
|
+
unfocused: !state.focused,
|
|
409
|
+
untouched: !state.touched,
|
|
414
410
|
valid,
|
|
415
|
-
wrong:
|
|
411
|
+
wrong: state.touched && !valid
|
|
416
412
|
};
|
|
417
413
|
}
|
|
418
414
|
function useReactControl(options, validators) {
|
|
@@ -431,7 +427,7 @@ function useFormGroup(options, groupValidators) {
|
|
|
431
427
|
const { controls } = groupOptions;
|
|
432
428
|
const errors = validators ? groupIsValid({ controls, validators }) : [];
|
|
433
429
|
const valid = errors.length === 0 && controlsAllChecked(controls, 'valid');
|
|
434
|
-
const
|
|
430
|
+
const value = controlsToValue(controls);
|
|
435
431
|
const dirty = controlsPartialChecked(controls, 'dirty');
|
|
436
432
|
const dirtyAll = controlsAllChecked(controls, 'dirty');
|
|
437
433
|
const touched = controlsPartialChecked(controls, 'touched');
|
|
@@ -452,12 +448,12 @@ function useFormGroup(options, groupValidators) {
|
|
|
452
448
|
pristineAll: !dirtyAll,
|
|
453
449
|
reset,
|
|
454
450
|
setValidators,
|
|
455
|
-
state,
|
|
456
451
|
touched,
|
|
457
452
|
touchedAll,
|
|
458
453
|
untouched: !touched,
|
|
459
454
|
untouchedAll: !touchedAll,
|
|
460
455
|
valid,
|
|
456
|
+
value,
|
|
461
457
|
wrong: touched && !valid
|
|
462
458
|
};
|
|
463
459
|
}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../node_modules/@rolster/forms/dist/esm/arguments.js","../../node_modules/@rolster/commons/dist/esm/helpers.js","../../node_modules/@rolster/forms/dist/esm/helpers.js","../esm/form-array/form-array-control.hook.js","../esm/form-array/form-array-group.hook.js","../esm/form-array/form-array.hook.js","../esm/form-control.hook.js","../esm/form-group.hook.js"],"sourcesContent":["function itIsFormControlOptions(props) {\r\n return (typeof props === 'object' && ('state' in props || 'validators' in props));\r\n}\r\nfunction itIsFormGroupOptions(props) {\r\n return typeof props === 'object' && 'controls' in props;\r\n}\r\nfunction itIsFormArrayOptions(props) {\r\n return (typeof props === 'object' && ('groups' in props || 'validators' in props));\r\n}\r\nexport function createFormControlOptions(...argsProps) {\r\n const [props, validators] = argsProps;\r\n if (!props) {\r\n return { state: props, validators };\r\n }\r\n if (!validators && itIsFormControlOptions(props)) {\r\n return props;\r\n }\r\n return {\r\n state: props,\r\n validators\r\n };\r\n}\r\nexport function createFormGroupOptions(...argsProps) {\r\n const [props, validators] = argsProps;\r\n if (!validators && itIsFormGroupOptions(props)) {\r\n return props;\r\n }\r\n return {\r\n controls: props,\r\n validators\r\n };\r\n}\r\nexport function createFormArrayOptions(...argsProps) {\r\n const [props, validators] = argsProps;\r\n if (!props) {\r\n return { groups: props, validators };\r\n }\r\n if (!validators && itIsFormArrayOptions(props)) {\r\n return props;\r\n }\r\n return {\r\n groups: props,\r\n validators\r\n };\r\n}\r\n//# sourceMappingURL=arguments.js.map","const PRIMITIVES = [Date, RegExp, Function, String, Boolean, Number];\r\nconst SLICE_SIZE = 512;\r\nconst FALSY_VALUE = ['false', 'undefined', '0', 0];\r\nconst prototypeToString = Object.prototype.toString;\r\nfunction clone(object, caches) {\r\n if (typeof object !== 'object') {\r\n return object;\r\n }\r\n if (prototypeToString.call(object) === '[object Object]') {\r\n const [cacheObject] = caches.filter((cacheObject) => cacheObject === object);\r\n /* istanbul ignore if */\r\n if (cacheObject) {\r\n return cacheObject;\r\n }\r\n caches.push(object);\r\n }\r\n const prototypeObject = Object.getPrototypeOf(object);\r\n const ConstructorObject = prototypeObject.constructor;\r\n if (PRIMITIVES.includes(ConstructorObject)) {\r\n return new ConstructorObject(object);\r\n }\r\n const cloneObject = new ConstructorObject();\r\n for (const prop in object) {\r\n cloneObject[prop] = clone(object[prop], caches);\r\n }\r\n return cloneObject;\r\n}\r\nexport function itIsDefined(object) {\r\n return typeof object !== 'undefined' && object !== null;\r\n}\r\nexport function itIsUndefined(object) {\r\n return !itIsDefined(object);\r\n}\r\nexport function parseBoolean(value) {\r\n return !(itIsUndefined(value) ||\r\n value === false ||\r\n FALSY_VALUE.includes(value));\r\n}\r\nexport function parse(value) {\r\n try {\r\n return JSON.parse(value);\r\n }\r\n catch {\r\n return value;\r\n }\r\n}\r\nexport function evalValueOrFunction(value) {\r\n return typeof value === 'function' ? value() : value;\r\n}\r\nexport function deepClone(object) {\r\n return clone(object, []);\r\n}\r\nexport function deepFreeze(object) {\r\n for (const prop in object) {\r\n const value = object[prop];\r\n if (typeof value === 'object' && !Object.isFrozen(value)) {\r\n deepFreeze(value);\r\n }\r\n }\r\n return Object.freeze(object);\r\n}\r\nexport function callback(call, ...args) {\r\n return typeof call !== 'function' ? undefined : call.apply(call, args);\r\n}\r\n/* istanbul ignore next */\r\nexport function base64ToBlob(data64, mimeType) {\r\n const result64 = data64.replace(/^[^,]+,/, '').replace(/\\s/g, '');\r\n const byteCharacters = window.atob(result64);\r\n const byteArrays = [];\r\n for (let offset = 0; offset < byteCharacters.length; offset += SLICE_SIZE) {\r\n const slice = byteCharacters.slice(offset, offset + SLICE_SIZE);\r\n const byteNumbers = new Array(slice.length);\r\n for (let i = 0; i < slice.length; i++) {\r\n byteNumbers[i] = slice.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n byteArrays.push(byteArray);\r\n }\r\n return new Blob(byteArrays, { type: mimeType });\r\n}\r\n//# sourceMappingURL=helpers.js.map","import { parseBoolean } from '@rolster/commons';\r\nexport const controlIsValid = ({ state, validators }) => {\r\n return validators.reduce((errors, validator) => {\r\n const error = validator(state);\r\n if (error) {\r\n errors.push(error);\r\n }\r\n return errors;\r\n }, []);\r\n};\r\nexport const controlsAllChecked = (controls, key) => {\r\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value && parseBoolean(control[key]), true);\r\n};\r\nexport const controlsPartialChecked = (controls, key) => {\r\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value || parseBoolean(control[key]), false);\r\n};\r\nexport const controlsToState = (controls) => {\r\n return Object.entries(controls).reduce((result, [key, { state }]) => {\r\n result[key] = state;\r\n return result;\r\n }, {});\r\n};\r\nexport const groupIsValid = ({ controls, validators }) => {\r\n return validators.reduce((errors, validator) => {\r\n const error = validator(controls);\r\n if (error) {\r\n errors.push(error);\r\n }\r\n return errors;\r\n }, []);\r\n};\r\nexport function groupAllChecked(groups, key) {\r\n return groups.reduce((value, group) => value && parseBoolean(group[key]), true);\r\n}\r\nexport function groupPartialChecked(groups, key) {\r\n return groups.reduce((value, group) => value || parseBoolean(group[key]), false);\r\n}\r\nexport const arrayIsValid = ({ groups, validators }) => {\r\n return validators.reduce((errors, validator) => {\r\n const error = validator(groups);\r\n if (error) {\r\n errors.push(error);\r\n }\r\n return errors;\r\n }, []);\r\n};\r\n//# sourceMappingURL=helpers.js.map","import { createFormControlOptions } from '@rolster/forms/arguments';\r\nimport { controlIsValid } from '@rolster/forms/helpers';\r\nimport { v4 as uuid } from 'uuid';\r\nexport class RolsterArrayControl {\r\n constructor(options) {\r\n this.initialState = options.initialState;\r\n this.uuid = options.uuid;\r\n this.focused = !!options.focused;\r\n this.unfocused = !this.focused;\r\n this.touched = !!options.touched;\r\n this.untouched = !this.touched;\r\n this.dirty = !!options.dirty;\r\n this.pristine = !this.dirty;\r\n this.disabled = !!options.disabled;\r\n this.enabled = !this.disabled;\r\n const { state, validators } = options;\r\n this.state = state;\r\n this.validators = validators;\r\n this.errors = validators ? controlIsValid({ state, validators }) : [];\r\n this.error = this.errors[0];\r\n this.valid = this.errors.length === 0;\r\n this.invalid = !this.valid;\r\n this.wrong = this.touched && this.invalid;\r\n }\r\n focus() {\r\n if (!this.focused) {\r\n this.update({ focused: true });\r\n }\r\n }\r\n blur() {\r\n if (this.focused) {\r\n this.update({ focused: false, touched: true });\r\n }\r\n }\r\n disable() {\r\n if (!this.disabled) {\r\n this.update({ disabled: true });\r\n }\r\n }\r\n enable() {\r\n if (this.disabled) {\r\n this.update({ disabled: false });\r\n }\r\n }\r\n touch() {\r\n if (this.touched) {\r\n this.update({ touched: true });\r\n }\r\n }\r\n setState(state) {\r\n this.update({ state });\r\n }\r\n setValidators(validators) {\r\n this.update({ validators });\r\n }\r\n subscribe(listener) {\r\n this.subscriber = listener;\r\n }\r\n reset() {\r\n this.update({ state: this.initialState, dirty: false, touched: false });\r\n }\r\n update(changes) {\r\n if (this.subscriber) {\r\n this.subscriber({\r\n ...this,\r\n ...changes,\r\n initialState: this.initialState\r\n });\r\n }\r\n }\r\n}\r\nfunction useArrayControl(options, validators) {\r\n const controlOptions = createFormControlOptions(options, validators);\r\n return new RolsterArrayControl({\r\n ...controlOptions,\r\n uuid: uuid(),\r\n initialState: controlOptions.state\r\n });\r\n}\r\nexport function useReactArrayControl(options, validators) {\r\n return useArrayControl(options, validators);\r\n}\r\nexport function useFormArrayControl(options, validators) {\r\n return useArrayControl(options, validators);\r\n}\r\nexport function useInputArrayControl(options, validators) {\r\n return useArrayControl(options, validators);\r\n}\r\n//# sourceMappingURL=form-array-control.hook.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\r\nimport { controlsAllChecked, controlsPartialChecked, controlsToState, groupIsValid } from '@rolster/forms/helpers';\r\nimport { v4 as uuid } from 'uuid';\r\nimport { RolsterArrayControl } from './form-array-control.hook';\r\nexport class RolsterArrayGroup {\r\n constructor(options) {\r\n const { controls, resource, uuid, validators } = options;\r\n this.uuid = uuid;\r\n this.controls = controls;\r\n this.validators = validators;\r\n this.resource = resource;\r\n this.errors = validators ? groupIsValid({ controls, validators }) : [];\r\n this.error = this.errors[0];\r\n this.valid =\r\n this.errors.length === 0 && controlsAllChecked(controls, 'valid');\r\n this.invalid = !this.valid;\r\n this.dirty = controlsPartialChecked(controls, 'dirty');\r\n this.dirtyAll = controlsAllChecked(controls, 'dirty');\r\n this.touched = controlsPartialChecked(controls, 'touched');\r\n this.touchedAll = controlsAllChecked(controls, 'touched');\r\n this.untouched = !this.touched;\r\n this.untouchedAll = !this.touchedAll;\r\n this.pristine = !this.dirty;\r\n this.pristineAll = !this.dirtyAll;\r\n this.wrong = this.touched && this.invalid;\r\n this.state = controlsToState(controls);\r\n const subscriber = (options) => {\r\n this.update({\r\n controls: Object.entries(this.controls).reduce((controls, [key, control]) => {\r\n controls[key] =\r\n control.uuid === options.uuid\r\n ? new RolsterArrayControl(options)\r\n : control;\r\n return controls;\r\n }, {})\r\n });\r\n };\r\n Object.values(controls).forEach((control) => {\r\n control.subscribe(subscriber);\r\n });\r\n }\r\n setValidators(validators) {\r\n this.update({ validators });\r\n }\r\n subscribe(listener) {\r\n this.subscriber = listener;\r\n }\r\n update(changes) {\r\n if (this.subscriber) {\r\n this.subscriber({ ...this, ...changes });\r\n }\r\n }\r\n}\r\nexport function useFormArrayGroup(options, validators) {\r\n const groupOptions = createFormGroupOptions(options, validators);\r\n return new RolsterArrayGroup({ ...groupOptions, uuid: uuid() });\r\n}\r\n//# sourceMappingURL=form-array-group.hook.js.map","import { createFormArrayOptions } from '@rolster/forms/arguments';\r\nimport { arrayIsValid, controlsToState, groupAllChecked, groupPartialChecked } from '@rolster/forms/helpers';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport { RolsterArrayGroup } from './form-array-group.hook';\r\nexport function useFormArray(options, arrayValidators) {\r\n const arrayOptions = createFormArrayOptions(options, arrayValidators);\r\n const { validators } = arrayOptions;\r\n const groups = arrayOptions.groups || [];\r\n const [arrayState, setArrayState] = useState({\r\n controls: groups.map(({ controls }) => controls),\r\n disabled: false,\r\n groups,\r\n state: groups.map(({ controls }) => controlsToState(controls)),\r\n validators\r\n });\r\n const currentState = useRef(groups);\r\n useEffect(() => {\r\n const subscriber = (options) => {\r\n setArrayState((state) => ({\r\n ...state,\r\n groups: arrayState.groups.map((group) => group.uuid === options.uuid\r\n ? new RolsterArrayGroup(options)\r\n : group)\r\n }));\r\n };\r\n arrayState.groups.forEach((group) => {\r\n group.subscribe(subscriber);\r\n });\r\n }, [arrayState]);\r\n const errors = validators ? arrayIsValid({ groups, validators }) : [];\r\n const error = errors[0];\r\n const valid = errors.length === 0 && groupAllChecked(groups, 'valid');\r\n const dirty = groupPartialChecked(groups, 'dirty');\r\n const dirtyAll = groupAllChecked(groups, 'dirty');\r\n const touched = groupPartialChecked(groups, 'touched');\r\n const touchedAll = groupAllChecked(groups, 'touched');\r\n function disable() {\r\n setArrayState((state) => ({ ...state, disabled: true }));\r\n }\r\n function enable() {\r\n setArrayState((state) => ({ ...state, disabled: false }));\r\n }\r\n function setGroups(groups) {\r\n setArrayState((currentState) => ({\r\n ...currentState,\r\n groups,\r\n controls: groups.map(({ controls }) => controls),\r\n state: groups.map(({ controls }) => controlsToState(controls))\r\n }));\r\n }\r\n function push(group) {\r\n setGroups([...arrayState.groups, group]);\r\n }\r\n function merge(groups) {\r\n setGroups([...arrayState.groups, ...groups]);\r\n }\r\n function set(groups) {\r\n setGroups(groups);\r\n }\r\n function remove({ uuid }) {\r\n setGroups(arrayState.groups.filter((group) => group.uuid !== uuid));\r\n }\r\n function reset() {\r\n setGroups(currentState.current);\r\n }\r\n function setValidators(validators) {\r\n setArrayState((state) => ({ ...state, validators }));\r\n }\r\n return {\r\n ...arrayState,\r\n dirty,\r\n dirtyAll,\r\n disable,\r\n enable,\r\n enabled: !arrayState.disabled,\r\n error,\r\n errors,\r\n invalid: !valid,\r\n merge,\r\n pristine: !dirty,\r\n pristineAll: !dirtyAll,\r\n push,\r\n remove,\r\n reset,\r\n set,\r\n setValidators,\r\n touched,\r\n touchedAll,\r\n untouched: !touched,\r\n untouchedAll: !touchedAll,\r\n valid,\r\n wrong: touched && !valid\r\n };\r\n}\r\n//# sourceMappingURL=form-array.hook.js.map","import { createFormControlOptions } from '@rolster/forms/arguments';\r\nimport { controlIsValid } from '@rolster/forms/helpers';\r\nimport { useRef, useState } from 'react';\r\nfunction useControl(controlOptions, controlValidators) {\r\n const { state, touched, validators } = createFormControlOptions(controlOptions, controlValidators);\r\n const [controlState, setControlState] = useState({\r\n dirty: false,\r\n disabled: false,\r\n focused: false,\r\n state: state,\r\n touched: !!touched,\r\n validators: validators\r\n });\r\n const initialState = useRef(state);\r\n const elementRef = useRef(null);\r\n const errors = controlState.validators\r\n ? controlIsValid({\r\n state: controlState.state,\r\n validators: controlState.validators\r\n })\r\n : [];\r\n const valid = errors.length === 0;\r\n function focus() {\r\n setControlState((state) => ({ ...state, focused: true }));\r\n }\r\n function blur() {\r\n setControlState((state) => ({ ...state, focused: false, touched: true }));\r\n }\r\n function disable() {\r\n setControlState((state) => ({ ...state, disabled: true }));\r\n }\r\n function enable() {\r\n setControlState((state) => ({ ...state, disabled: false }));\r\n }\r\n function touch() {\r\n setControlState((state) => ({ ...state, touched: true }));\r\n }\r\n function setState(state) {\r\n setControlState((currentState) => ({\r\n ...currentState,\r\n dirty: true,\r\n state\r\n }));\r\n }\r\n function setValidators(validators) {\r\n setControlState((state) => ({ ...state, validators }));\r\n }\r\n function reset() {\r\n setControlState((currentState) => ({\r\n ...currentState,\r\n dirty: false,\r\n state: initialState.current,\r\n touched: false\r\n }));\r\n }\r\n return {\r\n ...controlState,\r\n blur,\r\n disable,\r\n elementRef,\r\n enable,\r\n enabled: !controlState.disabled,\r\n error: errors[0],\r\n errors,\r\n focus,\r\n invalid: !valid,\r\n pristine: !controlState.dirty,\r\n reset,\r\n setState,\r\n setValidators,\r\n touch,\r\n unfocused: !controlState.focused,\r\n untouched: !controlState.touched,\r\n valid,\r\n wrong: controlState.touched && !valid\r\n };\r\n}\r\nexport function useReactControl(options, validators) {\r\n return useControl(options, validators);\r\n}\r\nexport function useFormControl(options, validators) {\r\n return useControl(options, validators);\r\n}\r\nexport function useInputControl(options, validators) {\r\n return useControl(options, validators);\r\n}\r\n//# sourceMappingURL=form-control.hook.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\r\nimport { controlsAllChecked, controlsPartialChecked, controlsToState, groupIsValid } from '@rolster/forms/helpers';\r\nimport { useState } from 'react';\r\nexport function useFormGroup(options, groupValidators) {\r\n const groupOptions = createFormGroupOptions(options, groupValidators);\r\n const [validators, setValidators] = useState(groupOptions.validators);\r\n const { controls } = groupOptions;\r\n const errors = validators ? groupIsValid({ controls, validators }) : [];\r\n const valid = errors.length === 0 && controlsAllChecked(controls, 'valid');\r\n const state = controlsToState(controls);\r\n const dirty = controlsPartialChecked(controls, 'dirty');\r\n const dirtyAll = controlsAllChecked(controls, 'dirty');\r\n const touched = controlsPartialChecked(controls, 'touched');\r\n const touchedAll = controlsAllChecked(controls, 'touched');\r\n function reset() {\r\n Object.values(controls).forEach((control) => {\r\n control.reset();\r\n });\r\n }\r\n return {\r\n controls,\r\n dirty,\r\n dirtyAll,\r\n error: errors[0],\r\n errors,\r\n invalid: !valid,\r\n pristine: !dirty,\r\n pristineAll: !dirtyAll,\r\n reset,\r\n setValidators,\r\n state,\r\n touched,\r\n touchedAll,\r\n untouched: !touched,\r\n untouchedAll: !touchedAll,\r\n valid,\r\n wrong: touched && !valid\r\n };\r\n}\r\n//# sourceMappingURL=form-group.hook.js.map"],"names":["uuid","useState","useRef","useEffect"],"mappings":";;;;;;;AAAA,SAAS,sBAAsB,CAAC,KAAK,EAAE;AACvC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,KAAK,OAAO,IAAI,KAAK,IAAI,YAAY,IAAI,KAAK,CAAC,EAAE;AACtF,CAAC;AACD,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,UAAU,IAAI,KAAK,CAAC;AAC5D,CAAC;AACD,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,QAAQ,OAA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modules/@rolster/forms/dist/esm/helpers.js","../esm/form-array/form-array-control.hook.js","../esm/form-array/form-array-group.hook.js","../esm/form-array/form-array.hook.js","../esm/form-control.hook.js","../esm/form-group.hook.js"],"sourcesContent":["function itIsFormControlOptions(props) {\r\n return (typeof props === 'object' && ('value' in props || 'validators' in props));\r\n}\r\nfunction itIsFormGroupOptions(props) {\r\n return typeof props === 'object' && 'controls' in props;\r\n}\r\nfunction itIsFormArrayOptions(props) {\r\n return (typeof props === 'object' && ('groups' in props || 'validators' in props));\r\n}\r\nexport function createFormControlOptions(...argsProps) {\r\n const [props, validators] = argsProps;\r\n if (!props) {\r\n return { value: props, validators };\r\n }\r\n if (!validators && itIsFormControlOptions(props)) {\r\n return props;\r\n }\r\n return {\r\n value: props,\r\n validators\r\n };\r\n}\r\nexport function createFormGroupOptions(...argsProps) {\r\n const [props, validators] = argsProps;\r\n if (!validators && itIsFormGroupOptions(props)) {\r\n return props;\r\n }\r\n return {\r\n controls: props,\r\n validators\r\n };\r\n}\r\nexport function createFormArrayOptions(...argsProps) {\r\n const [props, validators] = argsProps;\r\n if (!props) {\r\n return { groups: props, validators };\r\n }\r\n if (!validators && itIsFormArrayOptions(props)) {\r\n return props;\r\n }\r\n return {\r\n groups: props,\r\n validators\r\n };\r\n}\r\n//# sourceMappingURL=arguments.js.map","const PRIMITIVES = [Date, RegExp, Function, String, Boolean, Number];\r\nconst SLICE_SIZE = 512;\r\nconst FALSY_VALUE = ['false', 'undefined', '0', 0];\r\nconst prototypeToString = Object.prototype.toString;\r\nfunction clone(object, caches) {\r\n if (typeof object !== 'object') {\r\n return object;\r\n }\r\n if (prototypeToString.call(object) === '[object Object]') {\r\n const [cacheObject] = caches.filter((cacheObject) => cacheObject === object);\r\n /* istanbul ignore if */\r\n if (cacheObject) {\r\n return cacheObject;\r\n }\r\n caches.push(object);\r\n }\r\n const prototypeObject = Object.getPrototypeOf(object);\r\n const ConstructorObject = prototypeObject.constructor;\r\n if (PRIMITIVES.includes(ConstructorObject)) {\r\n return new ConstructorObject(object);\r\n }\r\n const cloneObject = new ConstructorObject();\r\n for (const prop in object) {\r\n cloneObject[prop] = clone(object[prop], caches);\r\n }\r\n return cloneObject;\r\n}\r\nexport function itIsDefined(object) {\r\n return typeof object !== 'undefined' && object !== null;\r\n}\r\nexport function itIsUndefined(object) {\r\n return !itIsDefined(object);\r\n}\r\nexport function parseBoolean(value) {\r\n return !(itIsUndefined(value) ||\r\n value === false ||\r\n FALSY_VALUE.includes(value));\r\n}\r\nexport function parse(value) {\r\n try {\r\n return JSON.parse(value);\r\n }\r\n catch {\r\n return value;\r\n }\r\n}\r\nexport function evalValueOrFunction(value) {\r\n return typeof value === 'function' ? value() : value;\r\n}\r\nexport function deepClone(object) {\r\n return clone(object, []);\r\n}\r\nexport function deepFreeze(object) {\r\n for (const prop in object) {\r\n const value = object[prop];\r\n if (typeof value === 'object' && !Object.isFrozen(value)) {\r\n deepFreeze(value);\r\n }\r\n }\r\n return Object.freeze(object);\r\n}\r\nexport function callback(call, ...args) {\r\n return typeof call !== 'function' ? undefined : call.apply(call, args);\r\n}\r\n/* istanbul ignore next */\r\nexport function base64ToBlob(data64, mimeType) {\r\n const result64 = data64.replace(/^[^,]+,/, '').replace(/\\s/g, '');\r\n const byteCharacters = window.atob(result64);\r\n const byteArrays = [];\r\n for (let offset = 0; offset < byteCharacters.length; offset += SLICE_SIZE) {\r\n const slice = byteCharacters.slice(offset, offset + SLICE_SIZE);\r\n const byteNumbers = new Array(slice.length);\r\n for (let i = 0; i < slice.length; i++) {\r\n byteNumbers[i] = slice.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n byteArrays.push(byteArray);\r\n }\r\n return new Blob(byteArrays, { type: mimeType });\r\n}\r\n//# sourceMappingURL=helpers.js.map","import { parseBoolean } from '@rolster/commons';\r\nexport const controlIsValid = ({ value, validators }) => {\r\n return validators.reduce((errors, validator) => {\r\n const error = validator(value);\r\n if (error) {\r\n errors.push(error);\r\n }\r\n return errors;\r\n }, []);\r\n};\r\nexport const controlsAllChecked = (controls, key) => {\r\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value && parseBoolean(control[key]), true);\r\n};\r\nexport const controlsPartialChecked = (controls, key) => {\r\n return Object.values(controls).reduce((value, control) => control.disabled ? value : value || parseBoolean(control[key]), false);\r\n};\r\nexport const controlsToValue = (controls) => {\r\n return Object.entries(controls).reduce((result, [key, { value }]) => {\r\n result[key] = value;\r\n return result;\r\n }, {});\r\n};\r\nexport const groupIsValid = ({ controls, validators }) => {\r\n return validators.reduce((errors, validator) => {\r\n const error = validator(controls);\r\n if (error) {\r\n errors.push(error);\r\n }\r\n return errors;\r\n }, []);\r\n};\r\nexport function groupAllChecked(groups, key) {\r\n return groups.reduce((value, group) => value && parseBoolean(group[key]), true);\r\n}\r\nexport function groupPartialChecked(groups, key) {\r\n return groups.reduce((value, group) => value || parseBoolean(group[key]), false);\r\n}\r\nexport const arrayIsValid = ({ groups, validators }) => {\r\n return validators.reduce((errors, validator) => {\r\n const error = validator(groups);\r\n if (error) {\r\n errors.push(error);\r\n }\r\n return errors;\r\n }, []);\r\n};\r\n//# sourceMappingURL=helpers.js.map","import { createFormControlOptions } from '@rolster/forms/arguments';\r\nimport { controlIsValid } from '@rolster/forms/helpers';\r\nimport { v4 as uuid } from 'uuid';\r\nexport class RolsterArrayControl {\r\n constructor(options) {\r\n this.initialValue = options.initialValue;\r\n this.uuid = options.uuid;\r\n this.focused = !!options.focused;\r\n this.unfocused = !this.focused;\r\n this.touched = !!options.touched;\r\n this.untouched = !this.touched;\r\n this.dirty = !!options.dirty;\r\n this.pristine = !this.dirty;\r\n this.disabled = !!options.disabled;\r\n this.enabled = !this.disabled;\r\n const { value, validators } = options;\r\n this.value = value;\r\n this.validators = validators;\r\n this.errors = validators ? controlIsValid({ value, validators }) : [];\r\n this.error = this.errors[0];\r\n this.valid = this.errors.length === 0;\r\n this.invalid = !this.valid;\r\n this.wrong = this.touched && this.invalid;\r\n }\r\n focus() {\r\n if (!this.focused) {\r\n this.update({ focused: true });\r\n }\r\n }\r\n blur() {\r\n if (this.focused) {\r\n this.update({ focused: false, touched: true });\r\n }\r\n }\r\n disable() {\r\n if (!this.disabled) {\r\n this.update({ disabled: true });\r\n }\r\n }\r\n enable() {\r\n if (this.disabled) {\r\n this.update({ disabled: false });\r\n }\r\n }\r\n touch() {\r\n if (this.touched) {\r\n this.update({ touched: true });\r\n }\r\n }\r\n setValue(value) {\r\n this.update({ value });\r\n }\r\n setValidators(validators) {\r\n this.update({ validators });\r\n }\r\n subscribe(listener) {\r\n this.subscriber = listener;\r\n }\r\n reset() {\r\n this.update({ value: this.initialValue, dirty: false, touched: false });\r\n }\r\n update(changes) {\r\n if (this.subscriber) {\r\n this.subscriber({\r\n ...this,\r\n ...changes,\r\n initialValue: this.initialValue\r\n });\r\n }\r\n }\r\n}\r\nfunction useArrayControl(options, validators) {\r\n const controlOptions = createFormControlOptions(options, validators);\r\n return new RolsterArrayControl({\r\n ...controlOptions,\r\n uuid: uuid(),\r\n initialValue: controlOptions.value\r\n });\r\n}\r\nexport function useReactArrayControl(options, validators) {\r\n return useArrayControl(options, validators);\r\n}\r\nexport function useFormArrayControl(options, validators) {\r\n return useArrayControl(options, validators);\r\n}\r\nexport function useInputArrayControl(options, validators) {\r\n return useArrayControl(options, validators);\r\n}\r\n//# sourceMappingURL=form-array-control.hook.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\r\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\r\nimport { v4 as uuid } from 'uuid';\r\nimport { RolsterArrayControl } from './form-array-control.hook';\r\nexport class RolsterArrayGroup {\r\n constructor(options) {\r\n const { controls, resource, uuid, validators } = options;\r\n this.uuid = uuid;\r\n this.controls = controls;\r\n this.validators = validators;\r\n this.resource = resource;\r\n this.errors = validators ? groupIsValid({ controls, validators }) : [];\r\n this.error = this.errors[0];\r\n this.valid =\r\n this.errors.length === 0 && controlsAllChecked(controls, 'valid');\r\n this.invalid = !this.valid;\r\n this.dirty = controlsPartialChecked(controls, 'dirty');\r\n this.dirtyAll = controlsAllChecked(controls, 'dirty');\r\n this.touched = controlsPartialChecked(controls, 'touched');\r\n this.touchedAll = controlsAllChecked(controls, 'touched');\r\n this.untouched = !this.touched;\r\n this.untouchedAll = !this.touchedAll;\r\n this.pristine = !this.dirty;\r\n this.pristineAll = !this.dirtyAll;\r\n this.wrong = this.touched && this.invalid;\r\n this.value = controlsToValue(controls);\r\n const subscriber = (options) => {\r\n this.update({\r\n controls: Object.entries(this.controls).reduce((controls, [key, control]) => {\r\n controls[key] =\r\n control.uuid === options.uuid\r\n ? new RolsterArrayControl(options)\r\n : control;\r\n return controls;\r\n }, {})\r\n });\r\n };\r\n Object.values(controls).forEach((control) => {\r\n control.subscribe(subscriber);\r\n });\r\n }\r\n setValidators(validators) {\r\n this.update({ validators });\r\n }\r\n subscribe(listener) {\r\n this.subscriber = listener;\r\n }\r\n update(changes) {\r\n if (this.subscriber) {\r\n this.subscriber({ ...this, ...changes });\r\n }\r\n }\r\n}\r\nexport function useFormArrayGroup(options, validators) {\r\n const groupOptions = createFormGroupOptions(options, validators);\r\n return new RolsterArrayGroup({ ...groupOptions, uuid: uuid() });\r\n}\r\n//# sourceMappingURL=form-array-group.hook.js.map","import { createFormArrayOptions } from '@rolster/forms/arguments';\r\nimport { arrayIsValid, controlsToValue, groupAllChecked, groupPartialChecked } from '@rolster/forms/helpers';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport { RolsterArrayGroup } from './form-array-group.hook';\r\nexport function useFormArray(options, arrayValidators) {\r\n const arrayOptions = createFormArrayOptions(options, arrayValidators);\r\n const { validators } = arrayOptions;\r\n const groups = arrayOptions.groups || [];\r\n const [state, setState] = useState({\r\n controls: groups.map(({ controls }) => controls),\r\n disabled: false,\r\n groups,\r\n value: groups.map(({ controls }) => controlsToValue(controls)),\r\n validators\r\n });\r\n const currentState = useRef(groups);\r\n useEffect(() => {\r\n const subscriber = (options) => {\r\n setState((state) => ({\r\n ...state,\r\n groups: state.groups.map((group) => group.uuid === options.uuid\r\n ? new RolsterArrayGroup(options)\r\n : group)\r\n }));\r\n };\r\n state.groups.forEach((group) => {\r\n group.subscribe(subscriber);\r\n });\r\n }, [state]);\r\n const errors = validators ? arrayIsValid({ groups, validators }) : [];\r\n const error = errors[0];\r\n const valid = errors.length === 0 && groupAllChecked(groups, 'valid');\r\n const dirty = groupPartialChecked(groups, 'dirty');\r\n const dirtyAll = groupAllChecked(groups, 'dirty');\r\n const touched = groupPartialChecked(groups, 'touched');\r\n const touchedAll = groupAllChecked(groups, 'touched');\r\n function disable() {\r\n setState((state) => ({ ...state, disabled: true }));\r\n }\r\n function enable() {\r\n setState((state) => ({ ...state, disabled: false }));\r\n }\r\n function setGroups(groups) {\r\n setState((currentState) => ({\r\n ...currentState,\r\n groups,\r\n controls: groups.map(({ controls }) => controls),\r\n value: groups.map(({ controls }) => controlsToValue(controls))\r\n }));\r\n }\r\n function push(group) {\r\n setGroups([...state.groups, group]);\r\n }\r\n function merge(groups) {\r\n setGroups([...state.groups, ...groups]);\r\n }\r\n function set(groups) {\r\n setGroups(groups);\r\n }\r\n function remove({ uuid }) {\r\n setGroups(state.groups.filter((group) => group.uuid !== uuid));\r\n }\r\n function reset() {\r\n setGroups(currentState.current);\r\n }\r\n function setValidators(validators) {\r\n setState((state) => ({ ...state, validators }));\r\n }\r\n return {\r\n ...state,\r\n dirty,\r\n dirtyAll,\r\n disable,\r\n enable,\r\n enabled: !state.disabled,\r\n error,\r\n errors,\r\n invalid: !valid,\r\n merge,\r\n pristine: !dirty,\r\n pristineAll: !dirtyAll,\r\n push,\r\n remove,\r\n reset,\r\n set,\r\n setValidators,\r\n touched,\r\n touchedAll,\r\n untouched: !touched,\r\n untouchedAll: !touchedAll,\r\n valid,\r\n wrong: touched && !valid\r\n };\r\n}\r\n//# sourceMappingURL=form-array.hook.js.map","import { createFormControlOptions } from '@rolster/forms/arguments';\r\nimport { controlIsValid } from '@rolster/forms/helpers';\r\nimport { useRef, useState } from 'react';\r\nfunction useControl(controlOptions, controlValidators) {\r\n const { value, touched, validators } = createFormControlOptions(controlOptions, controlValidators);\r\n const [state, setState] = useState({\r\n dirty: false,\r\n disabled: false,\r\n focused: false,\r\n touched: !!touched,\r\n validators,\r\n value\r\n });\r\n const initialValue = useRef(value);\r\n const elementRef = useRef(null);\r\n const errors = state.validators\r\n ? controlIsValid({\r\n value: state.value,\r\n validators: state.validators\r\n })\r\n : [];\r\n const valid = errors.length === 0;\r\n function focus() {\r\n setState((state) => ({ ...state, focused: true }));\r\n }\r\n function blur() {\r\n setState((state) => ({ ...state, focused: false, touched: true }));\r\n }\r\n function disable() {\r\n setState((state) => ({ ...state, disabled: true }));\r\n }\r\n function enable() {\r\n setState((state) => ({ ...state, disabled: false }));\r\n }\r\n function touch() {\r\n setState((state) => ({ ...state, touched: true }));\r\n }\r\n function setValue(value) {\r\n setState((state) => ({ ...state, dirty: true, value }));\r\n }\r\n function setValidators(validators) {\r\n setState((state) => ({ ...state, validators }));\r\n }\r\n function reset() {\r\n setState((state) => ({\r\n ...state,\r\n dirty: false,\r\n value: initialValue.current,\r\n touched: false\r\n }));\r\n }\r\n return {\r\n ...state,\r\n blur,\r\n disable,\r\n elementRef,\r\n enable,\r\n enabled: !state.disabled,\r\n error: errors[0],\r\n errors,\r\n focus,\r\n invalid: !valid,\r\n pristine: !state.dirty,\r\n reset,\r\n setValidators,\r\n setValue,\r\n touch,\r\n unfocused: !state.focused,\r\n untouched: !state.touched,\r\n valid,\r\n wrong: state.touched && !valid\r\n };\r\n}\r\nexport function useReactControl(options, validators) {\r\n return useControl(options, validators);\r\n}\r\nexport function useFormControl(options, validators) {\r\n return useControl(options, validators);\r\n}\r\nexport function useInputControl(options, validators) {\r\n return useControl(options, validators);\r\n}\r\n//# sourceMappingURL=form-control.hook.js.map","import { createFormGroupOptions } from '@rolster/forms/arguments';\r\nimport { controlsAllChecked, controlsPartialChecked, controlsToValue, groupIsValid } from '@rolster/forms/helpers';\r\nimport { useState } from 'react';\r\nexport function useFormGroup(options, groupValidators) {\r\n const groupOptions = createFormGroupOptions(options, groupValidators);\r\n const [validators, setValidators] = useState(groupOptions.validators);\r\n const { controls } = groupOptions;\r\n const errors = validators ? groupIsValid({ controls, validators }) : [];\r\n const valid = errors.length === 0 && controlsAllChecked(controls, 'valid');\r\n const value = controlsToValue(controls);\r\n const dirty = controlsPartialChecked(controls, 'dirty');\r\n const dirtyAll = controlsAllChecked(controls, 'dirty');\r\n const touched = controlsPartialChecked(controls, 'touched');\r\n const touchedAll = controlsAllChecked(controls, 'touched');\r\n function reset() {\r\n Object.values(controls).forEach((control) => {\r\n control.reset();\r\n });\r\n }\r\n return {\r\n controls,\r\n dirty,\r\n dirtyAll,\r\n error: errors[0],\r\n errors,\r\n invalid: !valid,\r\n pristine: !dirty,\r\n pristineAll: !dirtyAll,\r\n reset,\r\n setValidators,\r\n touched,\r\n touchedAll,\r\n untouched: !touched,\r\n untouchedAll: !touchedAll,\r\n valid,\r\n value,\r\n wrong: touched && !valid\r\n };\r\n}\r\n//# sourceMappingURL=form-group.hook.js.map"],"names":["uuid","useState","useRef","useEffect"],"mappings":";;;;;;;AAAA,SAAS,sBAAsB,CAAC,KAAK,EAAE;AACvC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,KAAK,OAAO,IAAI,KAAK,IAAI,YAAY,IAAI,KAAK,CAAC,EAAE;AACtF,CAAC;AACD,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,UAAU,IAAI,KAAK,CAAC;AAC5D,CAAC;AACD,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,KAAK,QAAQ,IAAI,KAAK,IAAI,YAAY,IAAI,KAAK,CAAC,EAAE;AACvF,CAAC;AACM,SAAS,wBAAwB,CAAC,GAAG,SAA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