@wemake4u/form-player-se 1.0.47 → 1.0.49
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/THIRD_PARTY_LICENSES.txt +6 -0
- package/esm2022/lib/builtIn/function.json +16 -0
- package/esm2022/lib/components/actionsCellRenderer/actionsCellRenderer.component.mjs +18 -14
- package/esm2022/lib/components/badge/badge.component.mjs +16 -0
- package/esm2022/lib/components/hostCellRenderer/hostCellRenderer.component.mjs +10 -8
- package/esm2022/lib/controls/factory.mjs +7 -1
- package/esm2022/lib/controls/navigator.mjs +4 -0
- package/esm2022/lib/controls/treerlist.mjs +4 -0
- package/esm2022/lib/dialog/dialog.component.mjs +10 -8
- package/esm2022/lib/directives/collapse.directive.mjs +3 -3
- package/esm2022/lib/directives/date.directive.mjs +139 -44
- package/esm2022/lib/directives/dialog.directive.mjs +7 -1
- package/esm2022/lib/directives/dropdown.directive.mjs +13 -8
- package/esm2022/lib/directives/file.directive.mjs +212 -0
- package/esm2022/lib/directives/filemanager.directive.mjs +233 -0
- package/esm2022/lib/directives/filepicker.directive.mjs +40 -0
- package/esm2022/lib/directives/jsonfile.directive.mjs +59 -0
- package/esm2022/lib/directives/navigator.directive.mjs +76 -0
- package/esm2022/lib/directives/repeat.directive.mjs +8 -7
- package/esm2022/lib/directives/tab.badge.directive.mjs +95 -0
- package/esm2022/lib/directives/tabitem.directive.mjs +7 -4
- package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +62 -149
- package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +11 -8
- package/esm2022/lib/locale/locale-de.mjs +6 -2
- package/esm2022/lib/locale/locale-en.mjs +6 -2
- package/esm2022/lib/locale/locale-es.mjs +6 -2
- package/esm2022/lib/locale/locale-fr.mjs +6 -2
- package/esm2022/lib/locale/locale-it.mjs +6 -2
- package/esm2022/lib/locale/locale-pt.mjs +6 -2
- package/esm2022/lib/pipes/times.mjs +14 -0
- package/esm2022/lib/services/builder.service.mjs +43 -89
- package/esm2022/lib/services/compute.service.mjs +9 -9
- package/esm2022/lib/services/dialog.service.mjs +35 -4
- package/esm2022/lib/services/disable.service.mjs +30 -11
- package/esm2022/lib/services/event.service.mjs +14 -12
- package/esm2022/lib/services/form.service.mjs +32 -46
- package/esm2022/lib/services/function.service.mjs +6 -2
- package/esm2022/lib/services/grid.service.mjs +20 -14
- package/esm2022/lib/services/lifetime.service.mjs +36 -0
- package/esm2022/lib/services/programmability.service.mjs +22 -18
- package/esm2022/lib/services/status.service.mjs +88 -25
- package/esm2022/lib/services/validation.service.mjs +7 -7
- package/esm2022/lib/utils/FormArrayEx.mjs +63 -0
- package/esm2022/lib/utils/window.mjs +3 -2
- package/fesm2022/wemake4u-form-player-se.mjs +1460 -509
- package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
- package/lib/components/badge/badge.component.d.ts +13 -0
- package/lib/components/deleteRowRenderer/deleteRowRenderer.component.d.ts +4 -0
- package/lib/components/objectURLRenderer/objectURLRenderer.component.d.ts +4 -0
- package/lib/components/setFilter/setFilter.component.d.ts +4 -0
- package/lib/controls/navigator.d.ts +3 -0
- package/lib/controls/treerlist.d.ts +3 -0
- package/lib/dialog/dialog.component.d.ts +30 -2
- package/lib/directives/collapse.directive.d.ts +3 -2
- package/lib/directives/date.directive.d.ts +15 -4
- package/lib/directives/dropdown.directive.d.ts +2 -2
- package/lib/directives/file.directive.d.ts +31 -0
- package/lib/directives/filemanager.directive.d.ts +47 -0
- package/lib/directives/filepicker.directive.d.ts +23 -0
- package/lib/directives/jsonfile.directive.d.ts +14 -0
- package/lib/directives/navigator.directive.d.ts +22 -0
- package/lib/directives/tab.badge.directive.d.ts +28 -0
- package/lib/directives/tabitem.directive.d.ts +2 -1
- package/lib/dynamic-fields/dynamic-fields.component.d.ts +38 -11
- package/lib/dynamic-form/dynamic-form.component.d.ts +29 -1
- package/lib/locale/locale-de.d.ts +4 -0
- package/lib/locale/locale-en.d.ts +4 -0
- package/lib/locale/locale-es.d.ts +4 -0
- package/lib/locale/locale-fr.d.ts +4 -0
- package/lib/locale/locale-it.d.ts +4 -0
- package/lib/locale/locale-pt.d.ts +4 -0
- package/lib/locale/locale.d.ts +28 -0
- package/lib/pipes/times.d.ts +7 -0
- package/lib/services/builder.service.d.ts +6 -10
- package/lib/services/compute.service.d.ts +2 -1
- package/lib/services/dialog.service.d.ts +10 -3
- package/lib/services/disable.service.d.ts +5 -1
- package/lib/services/event.service.d.ts +1 -1
- package/lib/services/form.service.d.ts +5 -2
- package/lib/services/function.service.d.ts +1 -0
- package/lib/services/grid.service.d.ts +1 -1
- package/lib/services/lifetime.service.d.ts +12 -0
- package/lib/services/programmability.service.d.ts +3 -1
- package/lib/services/status.service.d.ts +18 -4
- package/lib/services/validation.service.d.ts +2 -1
- package/lib/utils/FormArrayEx.d.ts +26 -0
- package/package.json +3 -2
package/lib/locale/locale.d.ts
CHANGED
|
@@ -47,6 +47,10 @@ export declare const Texts: {
|
|
|
47
47
|
NextElement: string;
|
|
48
48
|
Elements: string;
|
|
49
49
|
Of: string;
|
|
50
|
+
Download: string;
|
|
51
|
+
Uploading: string;
|
|
52
|
+
Downloading: string;
|
|
53
|
+
Deleting: string;
|
|
50
54
|
};
|
|
51
55
|
en: {
|
|
52
56
|
TypeToSearch: string;
|
|
@@ -95,6 +99,10 @@ export declare const Texts: {
|
|
|
95
99
|
NextElement: string;
|
|
96
100
|
Elements: string;
|
|
97
101
|
Of: string;
|
|
102
|
+
Download: string;
|
|
103
|
+
Uploading: string;
|
|
104
|
+
Downloading: string;
|
|
105
|
+
Deleting: string;
|
|
98
106
|
};
|
|
99
107
|
de: {
|
|
100
108
|
TypeToSearch: string;
|
|
@@ -143,6 +151,10 @@ export declare const Texts: {
|
|
|
143
151
|
NextElement: string;
|
|
144
152
|
Elements: string;
|
|
145
153
|
Of: string;
|
|
154
|
+
Download: string;
|
|
155
|
+
Uploading: string;
|
|
156
|
+
Downloading: string;
|
|
157
|
+
Deleting: string;
|
|
146
158
|
};
|
|
147
159
|
fr: {
|
|
148
160
|
TypeToSearch: string;
|
|
@@ -191,6 +203,10 @@ export declare const Texts: {
|
|
|
191
203
|
NextElement: string;
|
|
192
204
|
Elements: string;
|
|
193
205
|
Of: string;
|
|
206
|
+
Download: string;
|
|
207
|
+
Uploading: string;
|
|
208
|
+
Downloading: string;
|
|
209
|
+
Deleting: string;
|
|
194
210
|
};
|
|
195
211
|
es: {
|
|
196
212
|
TypeToSearch: string;
|
|
@@ -239,6 +255,10 @@ export declare const Texts: {
|
|
|
239
255
|
NextElement: string;
|
|
240
256
|
Elements: string;
|
|
241
257
|
Of: string;
|
|
258
|
+
Download: string;
|
|
259
|
+
Uploading: string;
|
|
260
|
+
Downloading: string;
|
|
261
|
+
Deleting: string;
|
|
242
262
|
};
|
|
243
263
|
pt: {
|
|
244
264
|
TypeToSearch: string;
|
|
@@ -287,6 +307,10 @@ export declare const Texts: {
|
|
|
287
307
|
NextElement: string;
|
|
288
308
|
Elements: string;
|
|
289
309
|
Of: string;
|
|
310
|
+
Download: string;
|
|
311
|
+
Uploading: string;
|
|
312
|
+
Downloading: string;
|
|
313
|
+
Deleting: string;
|
|
290
314
|
};
|
|
291
315
|
};
|
|
292
316
|
TypeToSearch: string;
|
|
@@ -335,4 +359,8 @@ export declare const Texts: {
|
|
|
335
359
|
NextElement: string;
|
|
336
360
|
Elements: string;
|
|
337
361
|
Of: string;
|
|
362
|
+
Download: string;
|
|
363
|
+
Uploading: string;
|
|
364
|
+
Downloading: string;
|
|
365
|
+
Deleting: string;
|
|
338
366
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TimesPipe implements PipeTransform {
|
|
4
|
+
transform(value: number): number[];
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimesPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TimesPipe, "times", true>;
|
|
7
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DestroyRef } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
2
3
|
import { ValidationService } from './validation.service';
|
|
3
4
|
import { DisableService } from './disable.service';
|
|
4
5
|
import { ComputeService } from './compute.service';
|
|
@@ -6,6 +7,7 @@ import { StatusService } from './status.service';
|
|
|
6
7
|
import { EventService } from './event.service';
|
|
7
8
|
import { MetadataService } from './metadata.service';
|
|
8
9
|
import { FormGroupMode } from '../utils/FormGroupEx';
|
|
10
|
+
import { LifetimeService } from './lifetime.service';
|
|
9
11
|
import * as i0 from "@angular/core";
|
|
10
12
|
export declare class FormBuilderService {
|
|
11
13
|
private validationService;
|
|
@@ -14,7 +16,9 @@ export declare class FormBuilderService {
|
|
|
14
16
|
private statusService;
|
|
15
17
|
private eventService;
|
|
16
18
|
private metadata;
|
|
17
|
-
|
|
19
|
+
private lifetime;
|
|
20
|
+
private destroyRef;
|
|
21
|
+
constructor(validationService: ValidationService, disableService: DisableService, computeService: ComputeService, statusService: StatusService, eventService: EventService, metadata: MetadataService, lifetime: LifetimeService<FormGroup>, destroyRef: DestroyRef);
|
|
18
22
|
buildForm(formGroup: FormGroup, forms: Array<any>, groupMode?: FormGroupMode): void;
|
|
19
23
|
private hasPath;
|
|
20
24
|
private applyPath;
|
|
@@ -27,17 +31,9 @@ export declare class FormBuilderService {
|
|
|
27
31
|
private isArrayComponent;
|
|
28
32
|
private getArrayItem;
|
|
29
33
|
private createFormArray;
|
|
30
|
-
private resizeFormArray;
|
|
31
34
|
private getContainers;
|
|
32
35
|
private getDefaultValue;
|
|
33
36
|
private getUpdateOn;
|
|
34
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormBuilderService, never>;
|
|
35
38
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormBuilderService>;
|
|
36
39
|
}
|
|
37
|
-
export declare function hasFactory(array: FormArray): array is FormArrayWithFactory;
|
|
38
|
-
export interface FormArrayWithFactory extends FormArray {
|
|
39
|
-
createItem(addToArray: boolean): FormGroup;
|
|
40
|
-
addItem(): FormGroup;
|
|
41
|
-
resize(size: number): void;
|
|
42
|
-
createNewArray(): FormArrayWithFactory;
|
|
43
|
-
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DestroyRef } from '@angular/core';
|
|
1
2
|
import { ProgrammabilityService } from './programmability.service';
|
|
2
3
|
import { FormService } from './form.service';
|
|
3
4
|
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
@@ -8,7 +9,7 @@ export declare class ComputeService {
|
|
|
8
9
|
constructor(programmability: ProgrammabilityService, formService: FormService);
|
|
9
10
|
createCollection(): ComputeCollection;
|
|
10
11
|
addToCollection(collection: ComputeCollection, control: AbstractControl, parentGroup: FormGroup, component: any): void;
|
|
11
|
-
setupCollection(collection: ComputeCollection): void;
|
|
12
|
+
setupCollection(collection: ComputeCollection, destroyRef?: DestroyRef): void;
|
|
12
13
|
private canAddToCollection;
|
|
13
14
|
private applyExpression;
|
|
14
15
|
private getPath;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
|
-
import { SirioDialogService, DialogTypes, DialogSizes, ButtonColors } from 'ngx-sirio-lib';
|
|
1
|
+
import { Injector, Type } from '@angular/core';
|
|
2
|
+
import { SirioDialogService, DialogTypes, DialogSizes, ButtonColors, SirioDialogElement } from 'ngx-sirio-lib';
|
|
3
3
|
import { IEvaluatorProvider } from '../services/programmability.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class DialogService implements IEvaluatorProvider {
|
|
6
6
|
private dialogService;
|
|
7
|
-
constructor(dialogService:
|
|
7
|
+
constructor(dialogService: SirioDialogExService);
|
|
8
8
|
openDialog(formSchema: any, options?: FormDialogOptions): void;
|
|
9
9
|
closeDialog(): void;
|
|
10
10
|
alert(text: string, options?: DialogOptions): void;
|
|
@@ -50,3 +50,10 @@ export interface CustomButton {
|
|
|
50
50
|
}
|
|
51
51
|
export type DialogAction = 'OK' | 'Cancel' | 'Yes' | 'No' | 'Confirm' | 'Close' | 'Abort' | 'Retry' | 'Ignore' | 'Try' | 'Continue';
|
|
52
52
|
export type DialogButtons = 'OK' | 'OKCancel' | 'ConfirmCancel' | 'AbortRetryIgnore' | 'YesNoCancel' | 'YesNo' | 'RetryCancel' | 'CancelTryContinue' | 'Custom';
|
|
53
|
+
export declare class SirioDialogExService extends SirioDialogService {
|
|
54
|
+
private dialogsStack;
|
|
55
|
+
openDialog(component: Type<SirioDialogElement>, data?: any): SirioDialogElement;
|
|
56
|
+
closeDialog(): any;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SirioDialogExService, never>;
|
|
58
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SirioDialogExService>;
|
|
59
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DestroyRef } from '@angular/core';
|
|
1
2
|
import { ProgrammabilityService } from './programmability.service';
|
|
2
3
|
import { FormService } from './form.service';
|
|
3
4
|
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
@@ -8,10 +9,13 @@ export declare class DisableService {
|
|
|
8
9
|
constructor(programmability: ProgrammabilityService, formService: FormService);
|
|
9
10
|
createCollection(): DisableCollection;
|
|
10
11
|
addToCollection(collection: DisableCollection, control: AbstractControl, parentGroup: FormGroup, component: any): void;
|
|
11
|
-
setupCollection(collection: DisableCollection): void;
|
|
12
|
+
setupCollection(collection: DisableCollection, destroyRef?: DestroyRef): void;
|
|
13
|
+
private selfDisabled;
|
|
12
14
|
private applyRule;
|
|
13
15
|
private canAddToCollection;
|
|
14
16
|
private getPath;
|
|
17
|
+
private normalize;
|
|
18
|
+
private isContainer;
|
|
15
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<DisableService, never>;
|
|
16
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<DisableService>;
|
|
17
21
|
}
|
|
@@ -13,7 +13,7 @@ export declare class EventService {
|
|
|
13
13
|
get suppress(): boolean;
|
|
14
14
|
createCollection(): EventCollection;
|
|
15
15
|
addToCollection(collection: EventCollection, control: AbstractControl, formGroup: FormGroup, component: any): void;
|
|
16
|
-
setupCollection(collection: EventCollection): void;
|
|
16
|
+
setupCollection(collection: EventCollection, destroyRef?: DestroyRef): void;
|
|
17
17
|
private processHandler;
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<EventService, never>;
|
|
19
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<EventService>;
|
|
@@ -34,7 +34,10 @@ export declare class FormService implements IEvaluatorProvider {
|
|
|
34
34
|
moveDown(control: AbstractControl, path: Path, index: number): boolean;
|
|
35
35
|
status(control: AbstractControl, path: Path, pathOptions?: PathOptions): FormControlStatus | undefined;
|
|
36
36
|
updateAllValueAndValidity(control: AbstractControl, emitEvent?: boolean): void;
|
|
37
|
-
|
|
37
|
+
countErrors(controls: Iterable<AbstractControl>, options?: {
|
|
38
|
+
expandArray?: boolean;
|
|
39
|
+
expandGroup?: boolean;
|
|
40
|
+
}): number;
|
|
38
41
|
getInvalidControls(control: AbstractControl): {
|
|
39
42
|
path: string;
|
|
40
43
|
control: AbstractControl;
|
|
@@ -45,6 +48,7 @@ export declare class FormService implements IEvaluatorProvider {
|
|
|
45
48
|
statusChanges(control: AbstractControl, waitForPending?: () => void): Observable<FormControlStatus>;
|
|
46
49
|
buildControl(value: any): AbstractControl;
|
|
47
50
|
getContext(formGroup: any): Record<string, any>;
|
|
51
|
+
enumerateControls(control: AbstractControl): Generator<AbstractControl>;
|
|
48
52
|
private applyPath;
|
|
49
53
|
private asObject;
|
|
50
54
|
private asArray;
|
|
@@ -53,7 +57,6 @@ export declare class FormService implements IEvaluatorProvider {
|
|
|
53
57
|
private createArrayItem;
|
|
54
58
|
private createControlFromValue;
|
|
55
59
|
private createControlFromArray;
|
|
56
|
-
private enumerateControls;
|
|
57
60
|
private collectErrors;
|
|
58
61
|
private setUnknown;
|
|
59
62
|
private isUnknown;
|
|
@@ -18,6 +18,7 @@ export declare class FunctionService implements IEvaluatorProvider {
|
|
|
18
18
|
openForm(template: string | object, options: DialogOptions): void;
|
|
19
19
|
openWindow(url: string, target?: WindowTarget, features?: OpenWindowFeatures): Window | null;
|
|
20
20
|
newGuid(): string;
|
|
21
|
+
range(from: number, to: number): number[];
|
|
21
22
|
getContext(): Record<string, any>;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<FunctionService, never>;
|
|
23
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<FunctionService>;
|
|
@@ -16,7 +16,7 @@ export declare class GridService {
|
|
|
16
16
|
getModules(): Module[];
|
|
17
17
|
getOptions(component: any, formGroup: FormGroup): GridOptions;
|
|
18
18
|
getColumnDefs(component: any, columns: any, formGroup: FormGroup): ColDef[];
|
|
19
|
-
onSelectionChanged(component: any, formGroup: FormGroup,
|
|
19
|
+
onSelectionChanged(component: any, formGroup: FormGroup, gridEvent: any): any;
|
|
20
20
|
getCacheKey(): string;
|
|
21
21
|
invalidateOptions(component: any): void;
|
|
22
22
|
onRowDataChanged(component: any, api: GridApi, rowData: any): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DestroyRef, EnvironmentInjector, OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class LifetimeService<TKey> implements OnDestroy {
|
|
4
|
+
private readonly environmentInjector;
|
|
5
|
+
private readonly injectors;
|
|
6
|
+
constructor(environmentInjector: EnvironmentInjector);
|
|
7
|
+
resolve(key: TKey): DestroyRef;
|
|
8
|
+
destroy(key: TKey): void;
|
|
9
|
+
ngOnDestroy(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LifetimeService<any>, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LifetimeService<any>>;
|
|
12
|
+
}
|
|
@@ -41,7 +41,7 @@ export declare class ProgrammabilityService {
|
|
|
41
41
|
evaluateUnary(formGroup: FormGroup, value: string | null, input: any, options?: EvaluateOptions): any;
|
|
42
42
|
invalidate(value: string | null): void;
|
|
43
43
|
invalidateAll(): void;
|
|
44
|
-
watch(formGroup: FormGroup, dependencies: (string | string[])[], callback: () => void): void;
|
|
44
|
+
watch(formGroup: FormGroup, dependencies: (string | string[])[], callback: () => void, destroyRef?: DestroyRef): void;
|
|
45
45
|
getDependencies(formGroup: FormGroup, expression: string): (string | string[])[];
|
|
46
46
|
get verbose(): boolean;
|
|
47
47
|
get cacheable(): boolean;
|
|
@@ -77,6 +77,8 @@ export interface EvaluateOptions {
|
|
|
77
77
|
cacheable?: boolean;
|
|
78
78
|
ignoreDeps?: boolean;
|
|
79
79
|
cacheInvalidated?: () => void;
|
|
80
|
+
destroyRef?: DestroyRef;
|
|
81
|
+
invokeArgs?: any[];
|
|
80
82
|
extendContext?: ExtendContextFn;
|
|
81
83
|
}
|
|
82
84
|
export type ExtendContextFn = () => Record<string, any>;
|
|
@@ -8,13 +8,27 @@ export declare class StatusService {
|
|
|
8
8
|
private subscribeService;
|
|
9
9
|
private destroyRef;
|
|
10
10
|
constructor(formService: FormService, subscribeService: SubscribeService, destroyRef: DestroyRef);
|
|
11
|
-
createCollection(): StatusCollection;
|
|
11
|
+
createCollection(key?: any): StatusCollection;
|
|
12
12
|
addToCollection(collection: StatusCollection, control: AbstractControl, component: any): void;
|
|
13
|
-
setupCollection(
|
|
14
|
-
|
|
13
|
+
setupCollection(collection: StatusCollection, destroyRef?: DestroyRef): void;
|
|
14
|
+
countErrors(key: any): number;
|
|
15
15
|
private invalidMap;
|
|
16
16
|
private canAddToCollection;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<StatusService, never>;
|
|
18
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<StatusService>;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export declare class StatusCollection<TKey = any> {
|
|
21
|
+
key?: any;
|
|
22
|
+
constructor(key?: any);
|
|
23
|
+
readonly controls: Set<AbstractControl<any, any>>;
|
|
24
|
+
readonly children: Map<TKey, StatusCollection<TKey>>;
|
|
25
|
+
add(control: AbstractControl): this;
|
|
26
|
+
remove(control: AbstractControl): this;
|
|
27
|
+
has(control: AbstractControl): boolean;
|
|
28
|
+
clear(): void;
|
|
29
|
+
createCollection(key: TKey): StatusCollection<TKey>;
|
|
30
|
+
getCollection(key: TKey): StatusCollection<TKey> | undefined;
|
|
31
|
+
removeCollection(key: TKey): boolean;
|
|
32
|
+
forEach(callback: (control: AbstractControl) => void): void;
|
|
33
|
+
countErrors(errorCounter: (controls: Iterable<AbstractControl>) => number, deep?: boolean): number;
|
|
34
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DestroyRef } from '@angular/core';
|
|
1
2
|
import { ProgrammabilityService } from '../services/programmability.service';
|
|
2
3
|
import { AbstractControl, FormGroup, ValidationErrors } from '@angular/forms';
|
|
3
4
|
import { LanguageService } from '@wemake4u/interact';
|
|
@@ -11,7 +12,7 @@ export declare class ValidationService {
|
|
|
11
12
|
get suppress(): boolean;
|
|
12
13
|
createCollection(): ValidationCollection;
|
|
13
14
|
addToCollection(collection: ValidationCollection, control: AbstractControl, formGroup: FormGroup, component: any): void;
|
|
14
|
-
setupCollection(collection: ValidationCollection): void;
|
|
15
|
+
setupCollection(collection: ValidationCollection, destroyRef?: DestroyRef): void;
|
|
15
16
|
validateRequired(control: AbstractControl, currentValue: any): ValidationErrors | null;
|
|
16
17
|
private canAddToCollection;
|
|
17
18
|
private getRules;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AbstractControl, AsyncValidatorFn, FormArray, ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
export type FormArrayChangeType = 'add' | 'adding' | 'remove' | 'removing';
|
|
4
|
+
export interface FormArrayChange<TControl extends AbstractControl = AbstractControl> {
|
|
5
|
+
type: FormArrayChangeType;
|
|
6
|
+
control: TControl;
|
|
7
|
+
index: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class FormArrayEx<TControl extends AbstractControl = AbstractControl> extends FormArray<TControl> {
|
|
10
|
+
readonly controlsChanges: Subject<FormArrayChange<TControl>>;
|
|
11
|
+
constructor(controls: TControl[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
|
12
|
+
push(control: TControl, options?: {
|
|
13
|
+
emitEvent?: boolean;
|
|
14
|
+
}): void;
|
|
15
|
+
insert(index: number, control: TControl, options?: {
|
|
16
|
+
emitEvent?: boolean;
|
|
17
|
+
}): void;
|
|
18
|
+
removeAt(index: number, options?: {
|
|
19
|
+
emitEvent?: boolean;
|
|
20
|
+
}): void;
|
|
21
|
+
clear(): void;
|
|
22
|
+
moveUp(index: number): boolean;
|
|
23
|
+
moveDown(index: number): boolean;
|
|
24
|
+
resize(newSize: number, factory: () => TControl): void;
|
|
25
|
+
private notify;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wemake4u/form-player-se",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^18.2.0",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"marked": "15.0.7",
|
|
29
29
|
"mime-db": "1.53.0",
|
|
30
30
|
"sanitize-html": "^2.13.0",
|
|
31
|
-
"vanillajs-datepicker": "^1.3.4"
|
|
31
|
+
"vanillajs-datepicker": "^1.3.4",
|
|
32
|
+
"date-fns": "4.3.0"
|
|
32
33
|
},
|
|
33
34
|
"sideEffects": false,
|
|
34
35
|
"module": "fesm2022/wemake4u-form-player-se.mjs",
|