@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.
Files changed (30) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -0
  3. package/THIRD_PARTY_LICENSES.txt +73 -0
  4. package/esm2022/lib/directives/date.directive.mjs +3 -3
  5. package/esm2022/lib/directives/datetime.directive.mjs +199 -0
  6. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +5 -3
  7. package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +31 -7
  8. package/esm2022/lib/dynamic-host/dynamic-host.component.mjs +15 -3
  9. package/esm2022/lib/services/compute.service.mjs +6 -2
  10. package/esm2022/lib/services/disable.service.mjs +7 -5
  11. package/esm2022/lib/services/feel.service.mjs +24 -1
  12. package/esm2022/lib/services/programmability.service.mjs +8 -1
  13. package/esm2022/lib/services/sanitize.service.mjs +2 -2
  14. package/esm2022/lib/services/validation.service.mjs +9 -2
  15. package/esm2022/lib/utils/date.mjs +59 -0
  16. package/esm2022/lib/utils/string.mjs +6 -0
  17. package/fesm2022/wemake4u-form-player-se.mjs +353 -19
  18. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  19. package/lib/directives/date.directive.d.ts +2 -0
  20. package/lib/directives/datetime.directive.d.ts +42 -0
  21. package/lib/dynamic-form/dynamic-form.component.d.ts +4 -0
  22. package/lib/dynamic-host/dynamic-host.component.d.ts +1 -0
  23. package/lib/services/compute.service.d.ts +1 -0
  24. package/lib/services/disable.service.d.ts +1 -1
  25. package/lib/services/feel.service.d.ts +2 -0
  26. package/lib/services/programmability.service.d.ts +1 -0
  27. package/lib/services/validation.service.d.ts +1 -0
  28. package/lib/utils/date.d.ts +6 -0
  29. package/lib/utils/string.d.ts +1 -0
  30. 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 isAllowedValue;
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;
@@ -52,6 +52,7 @@ export declare class ProgrammabilityService implements OnDestroy {
52
52
  private evalTemplate;
53
53
  private onError;
54
54
  private getPredefinedFunctions;
55
+ private getFeelFunctions;
55
56
  private getFormFunctions;
56
57
  private getParentContext;
57
58
  private getRootContext;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@wemake4u/form-player-se",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
+ "license": "MIT",
4
5
  "peerDependencies": {
5
6
  "@angular/cdk": "^18.2.0",
6
7
  "@angular/common": "^18.2.0",