@wemake4u/form-player-se 1.0.33 → 1.0.34
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/esm2022/lib/directives/dropdown.directive.mjs +3 -2
- package/esm2022/lib/directives/grid.directive.mjs +1 -1
- package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +9 -5
- package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +46 -23
- package/esm2022/lib/services/compute.service.mjs +73 -0
- package/esm2022/lib/services/disable.service.mjs +19 -12
- package/esm2022/lib/services/event.service.mjs +2 -2
- package/esm2022/lib/services/form.service.mjs +1 -1
- package/esm2022/lib/services/function.service.mjs +7 -2
- package/esm2022/lib/services/grid.service.mjs +10 -1
- package/esm2022/lib/services/programmability.service.mjs +16 -9
- package/esm2022/lib/services/validation.service.mjs +2 -2
- package/esm2022/lib/utils/uuid.mjs +11 -0
- package/fesm2022/wemake4u-form-player-se.mjs +173 -42
- package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
- package/lib/dynamic-fields/dynamic-fields.component.d.ts +3 -1
- package/lib/dynamic-form/dynamic-form.component.d.ts +6 -3
- package/lib/services/compute.service.d.ts +21 -0
- package/lib/services/disable.service.d.ts +3 -2
- package/lib/services/event.service.d.ts +1 -1
- package/lib/services/function.service.d.ts +1 -0
- package/lib/services/grid.service.d.ts +1 -0
- package/lib/services/programmability.service.d.ts +3 -1
- package/lib/services/validation.service.d.ts +1 -1
- package/lib/utils/uuid.d.ts +1 -0
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ import { SirioFileUploadComponent, NgxSirioEvent } from 'ngx-sirio-lib';
|
|
|
20
20
|
import { Module, GridOptions } from 'ag-grid-community';
|
|
21
21
|
import { AgChartOptions } from 'ag-charts-community';
|
|
22
22
|
import { LanguageService } from '@wemake4u/interact';
|
|
23
|
+
import { DynamicFormComponent } from '../dynamic-form/dynamic-form.component';
|
|
23
24
|
import * as i0 from "@angular/core";
|
|
24
25
|
export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, IDynamicFieldsComponent {
|
|
25
26
|
private sanitizer;
|
|
@@ -36,6 +37,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
|
|
|
36
37
|
private chart;
|
|
37
38
|
private dialog;
|
|
38
39
|
private el;
|
|
40
|
+
form: DynamicFormComponent;
|
|
39
41
|
rows: Array<any> | undefined;
|
|
40
42
|
formGroup: FormGroup;
|
|
41
43
|
alignment: string;
|
|
@@ -411,5 +413,5 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
|
|
|
411
413
|
private getAsObservable;
|
|
412
414
|
private configureDatepicker;
|
|
413
415
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldsComponent, never>;
|
|
414
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFieldsComponent, "app-dynamic-fields", never, { "rows": { "alias": "rows"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "recursionLevel": { "alias": "recursionLevel"; "required": false; }; }, {}, never, never, true, never>;
|
|
416
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFieldsComponent, "app-dynamic-fields", never, { "form": { "alias": "form"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "recursionLevel": { "alias": "recursionLevel"; "required": false; }; }, {}, never, never, true, never>;
|
|
415
417
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { OnChanges, OnDestroy, SimpleChanges, EventEmitter, ElementRef, Injector } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
-
import { ProgrammabilityService } from '../services/programmability.service';
|
|
3
|
+
import { IEvaluatorProvider, ProgrammabilityService } from '../services/programmability.service';
|
|
4
4
|
import { ValidationService } from '../services/validation.service';
|
|
5
5
|
import { DisableService } from '../services/disable.service';
|
|
6
6
|
import { StatusService } from '../services/status.service';
|
|
7
7
|
import { EventService } from '../services/event.service';
|
|
8
|
+
import { ComputeService } from '../services/compute.service';
|
|
8
9
|
import { MetadataService } from '../services/metadata.service';
|
|
9
10
|
import { FormService } from '../services/form.service';
|
|
10
11
|
import { DialogService, FormDialogOptions } from '../services/dialog.service';
|
|
@@ -13,11 +14,12 @@ import { RegisterService } from '../services/register.service';
|
|
|
13
14
|
import { Control } from '../controls/control';
|
|
14
15
|
import { LanguageService } from '@wemake4u/interact';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
|
-
export declare class DynamicFormComponent implements OnChanges, OnDestroy {
|
|
17
|
+
export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEvaluatorProvider {
|
|
17
18
|
private fb;
|
|
18
19
|
private programmability;
|
|
19
20
|
private validationService;
|
|
20
21
|
private disableService;
|
|
22
|
+
private computeService;
|
|
21
23
|
private statusService;
|
|
22
24
|
private eventService;
|
|
23
25
|
private registerService;
|
|
@@ -40,7 +42,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy {
|
|
|
40
42
|
initialized: EventEmitter<FormGroup<any>>;
|
|
41
43
|
activeNavChange: EventEmitter<any>;
|
|
42
44
|
formDiv: ElementRef<HTMLDivElement>;
|
|
43
|
-
constructor(fb: FormBuilder, programmability: ProgrammabilityService, validationService: ValidationService, disableService: DisableService, statusService: StatusService, eventService: EventService, registerService: RegisterService, languageService: LanguageService, metadata: MetadataService, formService: FormService, dialog: DialogService, injector: Injector);
|
|
45
|
+
constructor(fb: FormBuilder, programmability: ProgrammabilityService, validationService: ValidationService, disableService: DisableService, computeService: ComputeService, statusService: StatusService, eventService: EventService, registerService: RegisterService, languageService: LanguageService, metadata: MetadataService, formService: FormService, dialog: DialogService, injector: Injector);
|
|
44
46
|
Texts: {
|
|
45
47
|
i18n: {
|
|
46
48
|
it: {
|
|
@@ -358,6 +360,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy {
|
|
|
358
360
|
openForm(template: string, options: FormDialogOptions): void;
|
|
359
361
|
isChanged(): boolean;
|
|
360
362
|
isValid(): boolean;
|
|
363
|
+
getContext(): Record<string, any>;
|
|
361
364
|
private valueChangesSubscription;
|
|
362
365
|
private _forms;
|
|
363
366
|
private _activeNav;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ProgrammabilityService } from './programmability.service';
|
|
2
|
+
import { FormService } from './form.service';
|
|
3
|
+
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ComputeService {
|
|
6
|
+
private programmability;
|
|
7
|
+
private formService;
|
|
8
|
+
constructor(programmability: ProgrammabilityService, formService: FormService);
|
|
9
|
+
createCollection(): ComputeCollection;
|
|
10
|
+
addToCollection(collection: ComputeCollection, control: AbstractControl, parentGroup: FormGroup, component: any): void;
|
|
11
|
+
setupCollection(collection: ComputeCollection): void;
|
|
12
|
+
private applyExpression;
|
|
13
|
+
private getPath;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComputeService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ComputeService>;
|
|
16
|
+
}
|
|
17
|
+
export interface ComputeContext {
|
|
18
|
+
parentGroup: FormGroup;
|
|
19
|
+
component: any;
|
|
20
|
+
}
|
|
21
|
+
export type ComputeCollection = Map<AbstractControl, ComputeContext>;
|
|
@@ -7,15 +7,16 @@ export declare class DisableService {
|
|
|
7
7
|
private formService;
|
|
8
8
|
constructor(programmability: ProgrammabilityService, formService: FormService);
|
|
9
9
|
createCollection(): DisableCollection;
|
|
10
|
-
addToCollection(collection: DisableCollection, control: AbstractControl, parentGroup: FormGroup,
|
|
10
|
+
addToCollection(collection: DisableCollection, control: AbstractControl, parentGroup: FormGroup, component: any): void;
|
|
11
11
|
setupCollection(collection: DisableCollection): void;
|
|
12
12
|
private applyRule;
|
|
13
|
+
private isAllowedValue;
|
|
13
14
|
private getPath;
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DisableService, never>;
|
|
15
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<DisableService>;
|
|
16
17
|
}
|
|
17
18
|
export interface DisableContext {
|
|
18
19
|
parentGroup: FormGroup;
|
|
19
|
-
|
|
20
|
+
component: any;
|
|
20
21
|
}
|
|
21
22
|
export type DisableCollection = Map<AbstractControl, DisableContext>;
|
|
@@ -6,7 +6,7 @@ export declare class EventService {
|
|
|
6
6
|
constructor(programmability: ProgrammabilityService);
|
|
7
7
|
suppress: boolean;
|
|
8
8
|
createCollection(): EventCollection;
|
|
9
|
-
addToCollection(collection: EventCollection, control: AbstractControl,
|
|
9
|
+
addToCollection(collection: EventCollection, control: AbstractControl, formGroup: FormGroup, component: any): void;
|
|
10
10
|
setupCollection(collection: EventCollection): void;
|
|
11
11
|
private processHandler;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<EventService, never>;
|
|
@@ -12,6 +12,7 @@ export declare class FunctionService implements IEvaluatorProvider {
|
|
|
12
12
|
invokable(func: any): Function;
|
|
13
13
|
executeOnce<T>(observable: Observable<T>, callback: any): void;
|
|
14
14
|
openForm(template: string | object, options: DialogOptions): void;
|
|
15
|
+
newGuid(): string;
|
|
15
16
|
getContext(): Record<string, any>;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<FunctionService, never>;
|
|
17
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<FunctionService>;
|
|
@@ -24,9 +24,11 @@ export declare class ProgrammabilityService implements OnDestroy {
|
|
|
24
24
|
private register;
|
|
25
25
|
private scope;
|
|
26
26
|
constructor(feelService: FeelService, weakService: WeakService, toastService: ToastService, dialogService: DialogService, formatterService: FormatterService, functionService: FunctionService, formService: FormService, globalService: GlobalService, register: RegisterService, scope: ScopeService);
|
|
27
|
-
private
|
|
27
|
+
private predefinedFunctions;
|
|
28
28
|
private destroy$;
|
|
29
|
+
private evaluatorProviders;
|
|
29
30
|
ngOnDestroy(): void;
|
|
31
|
+
addEvaluatorProviders(evaluatorProvider: IEvaluatorProvider): void;
|
|
30
32
|
isExpression(text: string | null): boolean;
|
|
31
33
|
getExpression(text: string | null): string;
|
|
32
34
|
evaluateString(formGroup: FormGroup, value: string | null, options?: EvaluateOptions): string;
|
|
@@ -8,7 +8,7 @@ export declare class ValidationService {
|
|
|
8
8
|
constructor(languageService: LanguageService, programmability: ProgrammabilityService);
|
|
9
9
|
suppress: boolean;
|
|
10
10
|
createCollection(): ValidationCollection;
|
|
11
|
-
addToCollection(collection: ValidationCollection, control: AbstractControl,
|
|
11
|
+
addToCollection(collection: ValidationCollection, control: AbstractControl, formGroup: FormGroup, component: any): void;
|
|
12
12
|
setupCollection(collection: ValidationCollection): void;
|
|
13
13
|
private getRules;
|
|
14
14
|
private validateRules;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateGuid(): string;
|