@wemake4u/form-player-se 1.0.36 → 1.0.38
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/LICENSE +21 -0
- package/README.md +17 -0
- package/THIRD_PARTY_LICENSES.txt +73 -0
- package/esm2022/lib/directives/date.directive.mjs +3 -3
- package/esm2022/lib/directives/datetime.directive.mjs +199 -0
- package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +5 -3
- package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +31 -7
- package/esm2022/lib/dynamic-host/dynamic-host.component.mjs +15 -3
- package/esm2022/lib/services/compute.service.mjs +6 -2
- package/esm2022/lib/services/disable.service.mjs +7 -5
- package/esm2022/lib/services/feel.service.mjs +24 -1
- package/esm2022/lib/services/programmability.service.mjs +8 -1
- package/esm2022/lib/services/sanitize.service.mjs +2 -2
- package/esm2022/lib/services/validation.service.mjs +9 -2
- package/esm2022/lib/utils/date.mjs +59 -0
- package/esm2022/lib/utils/string.mjs +6 -0
- package/fesm2022/wemake4u-form-player-se.mjs +353 -19
- package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
- package/lib/directives/date.directive.d.ts +2 -0
- package/lib/directives/datetime.directive.d.ts +42 -0
- package/lib/dynamic-form/dynamic-form.component.d.ts +4 -0
- package/lib/dynamic-host/dynamic-host.component.d.ts +1 -0
- package/lib/services/compute.service.d.ts +1 -0
- package/lib/services/disable.service.d.ts +1 -1
- package/lib/services/feel.service.d.ts +2 -0
- package/lib/services/programmability.service.d.ts +1 -0
- package/lib/services/validation.service.d.ts +1 -0
- package/lib/utils/date.d.ts +6 -0
- package/lib/utils/string.d.ts +1 -0
- package/package.json +2 -1
|
@@ -6,3 +6,5 @@ export declare class DateDirective {
|
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateDirective, [{ host: true; }]>;
|
|
7
7
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DateDirective, "[isoDate]", never, {}, {}, never, never, true, never>;
|
|
8
8
|
}
|
|
9
|
+
export declare function dateToDisplay(value: string): string | null;
|
|
10
|
+
export declare function dateToStore(value: string): string | null;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AfterViewInit, OnDestroy, Renderer2 } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
3
|
+
import { SirioDatepickerComponent, SirioTimepickerComponent } from 'ngx-sirio-lib';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DateTimeCoordinatorDirective implements ControlValueAccessor, AfterViewInit, OnDestroy {
|
|
6
|
+
datePicker: SirioDatepickerComponent;
|
|
7
|
+
timePicker: SirioTimepickerComponent;
|
|
8
|
+
private onChange;
|
|
9
|
+
private onTouched;
|
|
10
|
+
private dateValue;
|
|
11
|
+
private timeValue;
|
|
12
|
+
private destroy$;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
ngAfterViewInit(): void;
|
|
15
|
+
writeValue(value: any): void;
|
|
16
|
+
setDisabledState(isDisabled: boolean): void;
|
|
17
|
+
registerOnChange(fn: any): void;
|
|
18
|
+
registerOnTouched(fn: any): void;
|
|
19
|
+
private recalculate;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeCoordinatorDirective, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeCoordinatorDirective, "[dateTimeCoordinator]", never, { "datePicker": { "alias": "datePicker"; "required": false; }; "timePicker": { "alias": "timePicker"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
export declare class DateTimeValidationDirective implements AfterViewInit, OnDestroy {
|
|
24
|
+
private ngControl;
|
|
25
|
+
private renderer;
|
|
26
|
+
isWarning: boolean;
|
|
27
|
+
showWhenValid: boolean;
|
|
28
|
+
private sub?;
|
|
29
|
+
constructor(ngControl: NgControl, renderer: Renderer2);
|
|
30
|
+
ngOnDestroy(): void;
|
|
31
|
+
ngAfterViewInit(): void;
|
|
32
|
+
private getCoordinator;
|
|
33
|
+
private checkValidation;
|
|
34
|
+
private cleanupValidation;
|
|
35
|
+
private setValid;
|
|
36
|
+
private setInvalid;
|
|
37
|
+
private setWarning;
|
|
38
|
+
private setPending;
|
|
39
|
+
private applyClass;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeValidationDirective, never>;
|
|
41
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeValidationDirective, "[dateTimeValidator]", never, { "isWarning": { "alias": "isWarning"; "required": false; }; "showWhenValid": { "alias": "showWhenValid"; "required": false; }; }, {}, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -382,6 +382,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
|
|
|
382
382
|
private get language();
|
|
383
383
|
private onChangeSchema;
|
|
384
384
|
private onChangeValue;
|
|
385
|
+
private assignActivaNav;
|
|
385
386
|
private suspendValueChanges;
|
|
386
387
|
private registerHandlers;
|
|
387
388
|
private clearHandlers;
|
|
@@ -390,8 +391,11 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
|
|
|
390
391
|
private emitValueChange;
|
|
391
392
|
refresh(): void;
|
|
392
393
|
private getNext;
|
|
394
|
+
private getNextFrom;
|
|
393
395
|
private getPrevious;
|
|
396
|
+
private getPreviousFrom;
|
|
394
397
|
private getMaxNav;
|
|
398
|
+
private isFormActivable;
|
|
395
399
|
private isDisabled;
|
|
396
400
|
private isInactive;
|
|
397
401
|
private clearControls;
|
|
@@ -19,6 +19,7 @@ export declare class DynamicHostComponent implements AfterViewInit, OnChanges, O
|
|
|
19
19
|
private isBindable;
|
|
20
20
|
private setBinding;
|
|
21
21
|
private setProperties;
|
|
22
|
+
private assignValue;
|
|
22
23
|
private isControlValueAccessor;
|
|
23
24
|
private resolveComponentType;
|
|
24
25
|
private validProperties;
|
|
@@ -9,6 +9,7 @@ export declare class ComputeService {
|
|
|
9
9
|
createCollection(): ComputeCollection;
|
|
10
10
|
addToCollection(collection: ComputeCollection, control: AbstractControl, parentGroup: FormGroup, component: any): void;
|
|
11
11
|
setupCollection(collection: ComputeCollection): void;
|
|
12
|
+
private canAddToCollection;
|
|
12
13
|
private applyExpression;
|
|
13
14
|
private getPath;
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComputeService, never>;
|
|
@@ -10,7 +10,7 @@ export declare class DisableService {
|
|
|
10
10
|
addToCollection(collection: DisableCollection, control: AbstractControl, parentGroup: FormGroup, component: any): void;
|
|
11
11
|
setupCollection(collection: DisableCollection): void;
|
|
12
12
|
private applyRule;
|
|
13
|
-
private
|
|
13
|
+
private canAddToCollection;
|
|
14
14
|
private getPath;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DisableService, never>;
|
|
16
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<DisableService>;
|
|
@@ -4,6 +4,8 @@ export declare class FeelService {
|
|
|
4
4
|
evalTemplate(template: string, context?: any): string;
|
|
5
5
|
evalExpression(expression: string, context?: Record<string, any>): any;
|
|
6
6
|
evalUnaryTest(expression: string, context?: Record<string, any>, input?: any): boolean;
|
|
7
|
+
isValidExpression(expression: string): boolean;
|
|
8
|
+
isValidUnaryTest(expression: string): boolean;
|
|
7
9
|
getDependencies(expression: string, context?: Record<string, any>): (string | string[])[];
|
|
8
10
|
getTemplateDependencies(expression: string, context?: Record<string, any>): (string | string[])[];
|
|
9
11
|
private findAncestor;
|
|
@@ -10,6 +10,7 @@ export declare class ValidationService {
|
|
|
10
10
|
createCollection(): ValidationCollection;
|
|
11
11
|
addToCollection(collection: ValidationCollection, control: AbstractControl, formGroup: FormGroup, component: any): void;
|
|
12
12
|
setupCollection(collection: ValidationCollection): void;
|
|
13
|
+
private canAddToCollection;
|
|
13
14
|
private getRules;
|
|
14
15
|
private validateRules;
|
|
15
16
|
private createValidator;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function toLocalString(d: Date): string | null;
|
|
2
|
+
export declare function toLocalDateString(d: Date): string | null;
|
|
3
|
+
export declare function toLocalTimeString(d: Date): string | null;
|
|
4
|
+
export declare function isValidDateObject(value: any): value is Date;
|
|
5
|
+
export declare function isValidTime(value: string): boolean;
|
|
6
|
+
export declare function isValidDate(value: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isNullOrEmpty(value: string): boolean;
|