@rolster/react-forms 18.9.0 → 18.10.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 +118 -100
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +119 -101
- package/dist/es/index.js.map +1 -1
- package/dist/esm/form-array/form-array-control.d.ts +1 -0
- package/dist/esm/form-array/form-array-control.js +4 -0
- package/dist/esm/form-array/form-array-control.js.map +1 -1
- package/dist/esm/form-array/form-array-list.js +2 -2
- package/dist/esm/form-array/form-array-list.js.map +1 -1
- package/dist/esm/form-array/form-array.js +71 -61
- package/dist/esm/form-array/form-array.js.map +1 -1
- package/dist/esm/form-control.js +40 -36
- package/dist/esm/form-control.js.map +1 -1
- package/dist/esm/form-group.js +3 -3
- package/dist/esm/form-group.js.map +1 -1
- package/package.json +3 -3
package/dist/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createFormControlOptions, createFormGroupOptions, createFormArrayOptions } from '@rolster/forms/arguments';
|
|
2
2
|
import { controlIsValid, hasError, someErrors, groupIsValid, controlsAllChecked, controlsPartialChecked, controlsToValue, arrayIsValid, groupAllChecked, groupPartialChecked } from '@rolster/forms/helpers';
|
|
3
3
|
import { v4 } from 'uuid';
|
|
4
|
-
import { useRef, useState, useEffect } from 'react';
|
|
4
|
+
import { useRef, useState, useEffect, useCallback } from 'react';
|
|
5
5
|
|
|
6
6
|
class RolsterReactArrayControl {
|
|
7
7
|
constructor(options) {
|
|
@@ -36,6 +36,10 @@ class RolsterReactArrayControl {
|
|
|
36
36
|
touch() {
|
|
37
37
|
this.untouched && this.refresh({ touched: true });
|
|
38
38
|
}
|
|
39
|
+
setInitialValue(value) {
|
|
40
|
+
this.initialValue = value;
|
|
41
|
+
this.setValue(value);
|
|
42
|
+
}
|
|
39
43
|
setValue(value) {
|
|
40
44
|
this.refresh({ value });
|
|
41
45
|
}
|
|
@@ -187,8 +191,8 @@ class RolsterArrayList extends RolsterReactArrayControl {
|
|
|
187
191
|
subscribeControls(newControls) {
|
|
188
192
|
Object.values(newControls).forEach((control) => {
|
|
189
193
|
control.subscribe((options) => {
|
|
190
|
-
const controls = this.controls.map((
|
|
191
|
-
?
|
|
194
|
+
const controls = this.controls.map((_controls) => _controls !== newControls
|
|
195
|
+
? _controls
|
|
192
196
|
: Object.entries(newControls).reduce((controls, [key, control]) => {
|
|
193
197
|
controls[key] =
|
|
194
198
|
control.uuid === options.uuid
|
|
@@ -212,29 +216,28 @@ function formArrayList(valueToControls, options) {
|
|
|
212
216
|
});
|
|
213
217
|
}
|
|
214
218
|
|
|
215
|
-
function useFormArray(options,
|
|
216
|
-
const
|
|
217
|
-
const groups =
|
|
218
|
-
const
|
|
219
|
+
function useFormArray(options, validators) {
|
|
220
|
+
const _options = createFormArrayOptions(options, validators);
|
|
221
|
+
const groups = _options.groups || [];
|
|
222
|
+
const _value = useRef(groups);
|
|
219
223
|
const [state, setState] = useState({
|
|
220
224
|
controls: groups.map(({ controls }) => controls),
|
|
221
225
|
disabled: false,
|
|
222
226
|
groups,
|
|
223
227
|
value: groups.map(({ controls }) => controlsToValue(controls)),
|
|
224
|
-
validators:
|
|
228
|
+
validators: _options.validators
|
|
229
|
+
});
|
|
230
|
+
const [errors, setErrors] = useState([]);
|
|
231
|
+
const [controlState, setControlState] = useState({
|
|
232
|
+
valid: false,
|
|
233
|
+
dirty: false,
|
|
234
|
+
dirtyAll: false,
|
|
235
|
+
touched: false,
|
|
236
|
+
touchedAll: false
|
|
225
237
|
});
|
|
226
|
-
const errors = state.validators
|
|
227
|
-
? arrayIsValid({ groups, validators: state.validators })
|
|
228
|
-
: [];
|
|
229
|
-
const error = errors[0];
|
|
230
|
-
const valid = errors.length === 0 && groupAllChecked(state.groups, 'valid');
|
|
231
|
-
const dirty = groupPartialChecked(state.groups, 'dirty');
|
|
232
|
-
const dirtyAll = groupAllChecked(state.groups, 'dirty');
|
|
233
|
-
const touched = groupPartialChecked(state.groups, 'touched');
|
|
234
|
-
const touchedAll = groupAllChecked(state.groups, 'touched');
|
|
235
238
|
useEffect(() => {
|
|
236
239
|
const subscriber = (options) => {
|
|
237
|
-
|
|
240
|
+
setValue(state.groups.map((group) => group.uuid === options.uuid
|
|
238
241
|
? new RolsterArrayGroup(options)
|
|
239
242
|
: group));
|
|
240
243
|
};
|
|
@@ -242,127 +245,141 @@ function useFormArray(options, arrayValidators) {
|
|
|
242
245
|
group.subscribe(subscriber);
|
|
243
246
|
});
|
|
244
247
|
}, [state.groups]);
|
|
245
|
-
|
|
248
|
+
useEffect(() => {
|
|
249
|
+
setErrors(state.validators
|
|
250
|
+
? arrayIsValid({
|
|
251
|
+
groups: state.groups,
|
|
252
|
+
validators: state.validators
|
|
253
|
+
})
|
|
254
|
+
: []);
|
|
255
|
+
}, [state.groups, state.validators]);
|
|
256
|
+
useEffect(() => {
|
|
257
|
+
setControlState({
|
|
258
|
+
valid: errors.length === 0 && groupAllChecked(state.groups, 'valid'),
|
|
259
|
+
dirty: groupPartialChecked(state.groups, 'dirty'),
|
|
260
|
+
dirtyAll: groupAllChecked(state.groups, 'dirty'),
|
|
261
|
+
touched: groupPartialChecked(state.groups, 'touched'),
|
|
262
|
+
touchedAll: groupAllChecked(state.groups, 'touched')
|
|
263
|
+
});
|
|
264
|
+
}, [state.groups, errors]);
|
|
265
|
+
const disable = useCallback(() => {
|
|
246
266
|
setState((state) => ({ ...state, disabled: true }));
|
|
247
|
-
}
|
|
248
|
-
|
|
267
|
+
}, []);
|
|
268
|
+
const enable = useCallback(() => {
|
|
249
269
|
setState((state) => ({ ...state, disabled: false }));
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
setState((
|
|
253
|
-
...
|
|
270
|
+
}, []);
|
|
271
|
+
const setValue = useCallback((groups) => {
|
|
272
|
+
setState((_state) => ({
|
|
273
|
+
..._state,
|
|
254
274
|
groups,
|
|
255
275
|
controls: groups.map(({ controls }) => controls),
|
|
256
276
|
value: groups.map(({ controls }) => controlsToValue(controls))
|
|
257
277
|
}));
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
function reset() {
|
|
278
|
-
setGroups(currentState.current);
|
|
279
|
-
}
|
|
280
|
-
function setValidators(validators) {
|
|
278
|
+
}, []);
|
|
279
|
+
const setInitialValue = useCallback((groups) => {
|
|
280
|
+
setValue(groups);
|
|
281
|
+
_value.current = groups;
|
|
282
|
+
}, []);
|
|
283
|
+
const push = useCallback((group) => {
|
|
284
|
+
setValue([...state.groups, group]);
|
|
285
|
+
}, []);
|
|
286
|
+
const merge = useCallback((groups) => {
|
|
287
|
+
setValue([...state.groups, ...groups]);
|
|
288
|
+
}, []);
|
|
289
|
+
const remove = useCallback(({ uuid }) => {
|
|
290
|
+
setValue(state.groups.filter((group) => group.uuid !== uuid));
|
|
291
|
+
}, []);
|
|
292
|
+
const reset = useCallback(() => {
|
|
293
|
+
setValue(_value.current);
|
|
294
|
+
}, []);
|
|
295
|
+
const setValidators = useCallback((validators) => {
|
|
281
296
|
setState((state) => ({ ...state, validators }));
|
|
282
|
-
}
|
|
297
|
+
}, []);
|
|
298
|
+
const hasError$1 = useCallback((key) => hasError(errors, key), [errors]);
|
|
299
|
+
const someErrors$1 = useCallback((keys) => someErrors(errors, keys), [errors]);
|
|
283
300
|
return {
|
|
284
301
|
...state,
|
|
285
|
-
|
|
286
|
-
dirtyAll,
|
|
302
|
+
...controlState,
|
|
287
303
|
disable,
|
|
288
304
|
enable,
|
|
289
305
|
enabled: !state.disabled,
|
|
290
|
-
error,
|
|
291
|
-
errors,
|
|
306
|
+
error: errors[0],
|
|
307
|
+
errors: errors,
|
|
292
308
|
hasError: hasError$1,
|
|
293
|
-
invalid: !valid,
|
|
309
|
+
invalid: !controlState.valid,
|
|
294
310
|
merge,
|
|
295
|
-
pristine: !dirty,
|
|
296
|
-
pristineAll: !dirtyAll,
|
|
311
|
+
pristine: !controlState.dirty,
|
|
312
|
+
pristineAll: !controlState.dirtyAll,
|
|
297
313
|
push,
|
|
298
314
|
remove,
|
|
299
315
|
reset,
|
|
300
|
-
|
|
316
|
+
setInitialValue,
|
|
301
317
|
setValidators,
|
|
318
|
+
setValue,
|
|
302
319
|
someErrors: someErrors$1,
|
|
303
|
-
touched,
|
|
304
|
-
touchedAll,
|
|
305
|
-
|
|
306
|
-
untouchedAll: !touchedAll,
|
|
307
|
-
valid,
|
|
308
|
-
wrong: touched && !valid
|
|
320
|
+
untouched: !controlState.touched,
|
|
321
|
+
untouchedAll: !controlState.touchedAll,
|
|
322
|
+
wrong: controlState.touched && !controlState.valid
|
|
309
323
|
};
|
|
310
324
|
}
|
|
311
325
|
|
|
312
|
-
function useControl(
|
|
313
|
-
const
|
|
326
|
+
function useControl(options, validators) {
|
|
327
|
+
const _options = createFormControlOptions(options, validators);
|
|
314
328
|
const [state, setState] = useState({
|
|
315
329
|
dirty: false,
|
|
316
330
|
disabled: false,
|
|
317
331
|
focused: false,
|
|
318
|
-
touched: !!touched,
|
|
319
|
-
validators,
|
|
320
|
-
value
|
|
332
|
+
touched: !!_options.touched,
|
|
333
|
+
validators: _options.validators,
|
|
334
|
+
value: _options.value
|
|
321
335
|
});
|
|
322
|
-
const
|
|
336
|
+
const [errors, setErrors] = useState([]);
|
|
337
|
+
const initialValue = useRef(_options.value);
|
|
323
338
|
const elementRef = useRef(null);
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
339
|
+
useEffect(() => {
|
|
340
|
+
setErrors(state.validators
|
|
341
|
+
? controlIsValid({
|
|
342
|
+
value: state.value,
|
|
343
|
+
validators: state.validators
|
|
344
|
+
})
|
|
345
|
+
: []);
|
|
346
|
+
}, [state.value, state.validators]);
|
|
347
|
+
const focus = useCallback(() => {
|
|
332
348
|
setState((state) => ({ ...state, focused: true }));
|
|
333
|
-
}
|
|
334
|
-
|
|
349
|
+
}, []);
|
|
350
|
+
const blur = useCallback(() => {
|
|
335
351
|
setState((state) => ({ ...state, focused: false, touched: true }));
|
|
336
|
-
}
|
|
337
|
-
|
|
352
|
+
}, []);
|
|
353
|
+
const disable = useCallback(() => {
|
|
338
354
|
setState((state) => ({ ...state, disabled: true }));
|
|
339
|
-
}
|
|
340
|
-
|
|
355
|
+
}, []);
|
|
356
|
+
const enable = useCallback(() => {
|
|
341
357
|
setState((state) => ({ ...state, disabled: false }));
|
|
342
|
-
}
|
|
343
|
-
|
|
358
|
+
}, []);
|
|
359
|
+
const touch = useCallback(() => {
|
|
344
360
|
setState((state) => ({ ...state, touched: true }));
|
|
345
|
-
}
|
|
346
|
-
|
|
361
|
+
}, []);
|
|
362
|
+
const setInitialValue = useCallback((value) => {
|
|
363
|
+
initialValue.current = value;
|
|
347
364
|
setState((state) => ({ ...state, dirty: true, value }));
|
|
348
|
-
}
|
|
349
|
-
|
|
365
|
+
}, []);
|
|
366
|
+
const setValue = useCallback((value) => {
|
|
367
|
+
setState((state) => ({ ...state, dirty: true, value }));
|
|
368
|
+
}, []);
|
|
369
|
+
const setValidators = useCallback((validators) => {
|
|
350
370
|
setState((state) => ({ ...state, validators }));
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
return hasError(errors, key);
|
|
354
|
-
}
|
|
355
|
-
function someErrors$1(keys) {
|
|
356
|
-
return someErrors(errors, keys);
|
|
357
|
-
}
|
|
358
|
-
function reset() {
|
|
371
|
+
}, []);
|
|
372
|
+
const reset = useCallback(() => {
|
|
359
373
|
setState((state) => ({
|
|
360
374
|
...state,
|
|
361
375
|
dirty: false,
|
|
362
376
|
value: initialValue.current,
|
|
363
377
|
touched: false
|
|
364
378
|
}));
|
|
365
|
-
}
|
|
379
|
+
}, []);
|
|
380
|
+
const hasError$1 = useCallback((key) => hasError(errors, key), [errors]);
|
|
381
|
+
const someErrors$1 = useCallback((keys) => someErrors(errors, keys), [errors]);
|
|
382
|
+
const valid = errors.length === 0;
|
|
366
383
|
return {
|
|
367
384
|
...state,
|
|
368
385
|
blur,
|
|
@@ -377,6 +394,7 @@ function useControl(controlOptions, controlValidators) {
|
|
|
377
394
|
invalid: !valid,
|
|
378
395
|
pristine: !state.dirty,
|
|
379
396
|
reset,
|
|
397
|
+
setInitialValue,
|
|
380
398
|
setValidators,
|
|
381
399
|
setValue,
|
|
382
400
|
someErrors: someErrors$1,
|
|
@@ -398,9 +416,9 @@ function useInputControl(options, validators) {
|
|
|
398
416
|
}
|
|
399
417
|
|
|
400
418
|
function useFormGroup(options, groupValidators) {
|
|
401
|
-
const
|
|
402
|
-
const [validators, setValidators] = useState(
|
|
403
|
-
const { controls } =
|
|
419
|
+
const _options = createFormGroupOptions(options, groupValidators);
|
|
420
|
+
const [validators, setValidators] = useState(_options.validators);
|
|
421
|
+
const { controls } = _options;
|
|
404
422
|
const errors = validators ? groupIsValid({ controls, validators }) : [];
|
|
405
423
|
const valid = errors.length === 0 && controlsAllChecked(controls, 'valid');
|
|
406
424
|
const value = controlsToValue(controls);
|
package/dist/es/index.js.map
CHANGED
|
@@ -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 { 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 initialValue = useRef(value);\n const elementRef = useRef(null);\n const errors = state.validators\n ? controlIsValid({\n value: state.value,\n validators: state.validators\n })\n : [];\n const valid = errors.length === 0;\n function focus() {\n setState((state) => ({ ...state, focused: true }));\n }\n function blur() {\n setState((state) => ({ ...state, focused: false, touched: true }));\n }\n function disable() {\n setState((state) => ({ ...state, disabled: true }));\n }\n function enable() {\n setState((state) => ({ ...state, disabled: false }));\n }\n function touch() {\n setState((state) => ({ ...state, touched: true }));\n }\n function setValue(value) {\n setState((state) => ({ ...state, dirty: true, value }));\n }\n function setValidators(validators) {\n setState((state) => ({ ...state, validators }));\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 setState((state) => ({\n ...state,\n dirty: false,\n value: initialValue.current,\n touched: false\n }));\n }\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":["uuid","hasError","rolsterHasError","someErrors","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,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,IAAI,CAAC,MAAM,GAAG,UAAU,GAAG,cAAc,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kB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC3D,IAAI,MAAM,OAAO,GAAG,sBAAsB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AAChE,IAAI,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AAC/D,IAAI,SAAS,KAAK,GAAG;AACrB,QAAQ,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK;AACrD,YAAY,OAAO,CAAC,KAAK,EAAE,CAAC;AAC5B,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,QAAQ;AAChB,QAAQ,KAAK;AACb,QAAQ,QAAQ;AAChB,QAAQ,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACxB,QAAQ,MAAM;AACd,QAAQ,OAAO,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 }, [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) => ({\n ..._state,\n groups,\n controls: groups.map(({ controls }) => controls),\n value: groups.map(({ controls }) => controlsToValue(controls))\n }));\n }, []);\n const setInitialValue = useCallback((groups) => {\n setValue(groups);\n _value.current = groups;\n }, []);\n const push = useCallback((group) => {\n setValue([...state.groups, group]);\n }, []);\n const merge = useCallback((groups) => {\n setValue([...state.groups, ...groups]);\n }, []);\n const remove = useCallback(({ uuid }) => {\n setValue(state.groups.filter((group) => group.uuid !== uuid));\n }, []);\n const reset = useCallback(() => {\n setValue(_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":["uuid","hasError","rolsterHasError","someErrors","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,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|
@@ -26,6 +26,7 @@ export declare class RolsterReactArrayControl<E extends HTMLElement = HTMLElemen
|
|
|
26
26
|
disable(): void;
|
|
27
27
|
enable(): void;
|
|
28
28
|
touch(): void;
|
|
29
|
+
setInitialValue(value: T): void;
|
|
29
30
|
setValue(value: T): void;
|
|
30
31
|
setValidators(validators?: ValidatorFn<T>[]): void;
|
|
31
32
|
subscribe(subscriber: ReactSubscriberControl<T>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-array-control.js","sourceRoot":"","sources":["../../../src/form-array/form-array-control.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAG9E,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAclC,MAAM,OAAO,wBAAwB;IAqCnC,YAAY,OAAoC;QAC9C,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CA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CAAC,CAAC;IAC1C,CAAC;CACF;AAOD,SAAS,mBAAmB,CAC1B,OAAoC,EACpC,UAA6B;IAE7B,MAAM,cAAc,GAAG,wBAAwB,CAC7C,OAAO,EACP,UAAU,CACX,CAAC;IAEF,OAAO,IAAI,mBAAmB,CAAC;QAC7B,GAAG,cAAc;QACjB,YAAY,EAAE,cAAc,CAAC,KAAK;QAClC,IAAI,EAAE,IAAI,EAAE;KACb,CAAC,CAAC;AACL,CAAC;AA0BD,MAAM,UAAU,iBAAiB,CAC/B,OAAoC,EACpC,UAA6B;IAE7B,OAAO,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAClD,CAAC;AAoBD,MAAM,UAAU,gBAAgB,CAC9B,OAAoC,EACpC,UAA6B;IAE7B,OAAO,mBAAmB,CAAc,OAAO,EAAE,UAAU,CAAC,CAAC;AAC/D,CAAC;AAoBD,MAAM,UAAU,iBAAiB,CAC/B,OAAoC,EACpC,UAA6B;IAE7B,OAAO,mBAAmB,CAAmB,OAAO,EAAE,UAAU,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -40,8 +40,8 @@ export class RolsterArrayList extends RolsterReactArrayControl {
|
|
|
40
40
|
subscribeControls(newControls) {
|
|
41
41
|
Object.values(newControls).forEach((control) => {
|
|
42
42
|
control.subscribe((options) => {
|
|
43
|
-
const controls = this.controls.map((
|
|
44
|
-
?
|
|
43
|
+
const controls = this.controls.map((_controls) => _controls !== newControls
|
|
44
|
+
? _controls
|
|
45
45
|
: Object.entries(newControls).reduce((controls, [key, control]) => {
|
|
46
46
|
controls[key] =
|
|
47
47
|
control.uuid === options.uuid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-array-list.js","sourceRoot":"","sources":["../../../src/form-array/form-array-list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE7E,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MA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