@wemake4u/form-player-se 1.0.47 → 1.0.48

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 (65) hide show
  1. package/THIRD_PARTY_LICENSES.txt +6 -0
  2. package/esm2022/lib/builtIn/function.json +16 -0
  3. package/esm2022/lib/components/actionsCellRenderer/actionsCellRenderer.component.mjs +18 -14
  4. package/esm2022/lib/components/badge/badge.component.mjs +16 -0
  5. package/esm2022/lib/components/hostCellRenderer/hostCellRenderer.component.mjs +10 -8
  6. package/esm2022/lib/controls/factory.mjs +7 -1
  7. package/esm2022/lib/controls/navigator.mjs +4 -0
  8. package/esm2022/lib/controls/treerlist.mjs +4 -0
  9. package/esm2022/lib/dialog/dialog.component.mjs +10 -8
  10. package/esm2022/lib/directives/collapse.directive.mjs +3 -3
  11. package/esm2022/lib/directives/date.directive.mjs +139 -44
  12. package/esm2022/lib/directives/dialog.directive.mjs +7 -1
  13. package/esm2022/lib/directives/dropdown.directive.mjs +13 -8
  14. package/esm2022/lib/directives/filepicker.directive.mjs +34 -0
  15. package/esm2022/lib/directives/navigator.directive.mjs +76 -0
  16. package/esm2022/lib/directives/repeat.directive.mjs +8 -7
  17. package/esm2022/lib/directives/tab.badge.directive.mjs +95 -0
  18. package/esm2022/lib/directives/tabitem.directive.mjs +7 -4
  19. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +50 -84
  20. package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +11 -8
  21. package/esm2022/lib/pipes/times.mjs +14 -0
  22. package/esm2022/lib/services/builder.service.mjs +43 -89
  23. package/esm2022/lib/services/compute.service.mjs +7 -7
  24. package/esm2022/lib/services/dialog.service.mjs +35 -4
  25. package/esm2022/lib/services/disable.service.mjs +29 -10
  26. package/esm2022/lib/services/event.service.mjs +14 -12
  27. package/esm2022/lib/services/form.service.mjs +32 -46
  28. package/esm2022/lib/services/function.service.mjs +6 -2
  29. package/esm2022/lib/services/grid.service.mjs +20 -14
  30. package/esm2022/lib/services/lifetime.service.mjs +36 -0
  31. package/esm2022/lib/services/programmability.service.mjs +21 -17
  32. package/esm2022/lib/services/status.service.mjs +88 -25
  33. package/esm2022/lib/services/validation.service.mjs +7 -7
  34. package/esm2022/lib/utils/FormArrayEx.mjs +63 -0
  35. package/esm2022/lib/utils/window.mjs +3 -2
  36. package/fesm2022/wemake4u-form-player-se.mjs +889 -399
  37. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  38. package/lib/components/badge/badge.component.d.ts +13 -0
  39. package/lib/controls/navigator.d.ts +3 -0
  40. package/lib/controls/treerlist.d.ts +3 -0
  41. package/lib/dialog/dialog.component.d.ts +2 -2
  42. package/lib/directives/collapse.directive.d.ts +3 -2
  43. package/lib/directives/date.directive.d.ts +15 -4
  44. package/lib/directives/dropdown.directive.d.ts +2 -2
  45. package/lib/directives/filepicker.directive.d.ts +11 -0
  46. package/lib/directives/navigator.directive.d.ts +22 -0
  47. package/lib/directives/tab.badge.directive.d.ts +28 -0
  48. package/lib/directives/tabitem.directive.d.ts +2 -1
  49. package/lib/dynamic-fields/dynamic-fields.component.d.ts +9 -8
  50. package/lib/dynamic-form/dynamic-form.component.d.ts +1 -1
  51. package/lib/pipes/times.d.ts +7 -0
  52. package/lib/services/builder.service.d.ts +6 -10
  53. package/lib/services/compute.service.d.ts +2 -1
  54. package/lib/services/dialog.service.d.ts +10 -3
  55. package/lib/services/disable.service.d.ts +5 -1
  56. package/lib/services/event.service.d.ts +1 -1
  57. package/lib/services/form.service.d.ts +5 -2
  58. package/lib/services/function.service.d.ts +1 -0
  59. package/lib/services/grid.service.d.ts +1 -1
  60. package/lib/services/lifetime.service.d.ts +12 -0
  61. package/lib/services/programmability.service.d.ts +3 -1
  62. package/lib/services/status.service.d.ts +18 -4
  63. package/lib/services/validation.service.d.ts +2 -1
  64. package/lib/utils/FormArrayEx.d.ts +26 -0
  65. package/package.json +3 -2
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BadgeComponent {
3
+ badge: {
4
+ type: string;
5
+ text: string;
6
+ };
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<BadgeComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<BadgeComponent, "app-badge", never, { "badge": { "alias": "badge"; "required": true; }; }, {}, never, never, true, never>;
9
+ }
10
+ export interface Badge {
11
+ type: string;
12
+ text: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ import { Control } from "./control";
2
+ export declare class NavigatorControl extends Control {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { Control } from "./control";
2
+ export declare class TreelistControl extends Control {
3
+ }
@@ -1,4 +1,4 @@
1
- import { FormDialogOptions, DialogAction } from '../services/dialog.service';
1
+ import { FormDialogOptions, DialogAction, SirioDialogExService } from '../services/dialog.service';
2
2
  import { SirioDialogElement } from 'ngx-sirio-lib';
3
3
  import { LanguageService } from '@wemake4u/interact';
4
4
  import * as i0 from "@angular/core";
@@ -345,7 +345,7 @@ export declare class DialogComponent extends SirioDialogElement {
345
345
  Elements: string;
346
346
  Of: string;
347
347
  };
348
- constructor(languageService: LanguageService);
348
+ constructor(languageService: LanguageService, sirioDialogExService: SirioDialogExService);
349
349
  ngOnInit(): void;
350
350
  options: FormDialogOptions;
351
351
  ngAfterViewInit(): void;
@@ -1,6 +1,7 @@
1
1
  import { ElementRef, Renderer2, OnChanges, SimpleChanges, OnDestroy, DestroyRef } from '@angular/core';
2
2
  import { ListenerService } from '../services/listener.service';
3
3
  import { LanguageService } from '@wemake4u/interact';
4
+ import { EvaluateOptions } from '../services/programmability.service';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class CollapseDirective implements OnChanges, OnDestroy {
6
7
  private el;
@@ -9,8 +10,8 @@ export declare class CollapseDirective implements OnChanges, OnDestroy {
9
10
  private listenerService;
10
11
  private languageService;
11
12
  maxHeight: number | null;
12
- onCollapse?: () => void;
13
- onExpand?: () => void;
13
+ onCollapse?: (options?: EvaluateOptions) => void;
14
+ onExpand?: (options?: EvaluateOptions) => void;
14
15
  component: any;
15
16
  private currentHeight;
16
17
  private button;
@@ -1,10 +1,21 @@
1
+ import { AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
1
2
  import { SirioDatepickerComponent } from 'ngx-sirio-lib';
2
3
  import * as i0 from "@angular/core";
3
- export declare class DateDirective {
4
+ export declare class DateDirective implements OnChanges, AfterViewInit {
4
5
  private sirioDatepicker;
6
+ pick: any;
7
+ minDate: any;
8
+ maxDate: any;
5
9
  constructor(sirioDatepicker: SirioDatepickerComponent);
10
+ ngOnChanges(changes: SimpleChanges): void;
11
+ ngAfterViewInit(): void;
12
+ private displayFormat;
13
+ private configurePicker;
14
+ private getPickLevel;
15
+ private getDate;
16
+ private getDisplayFormat;
6
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DateDirective, [{ host: true; }]>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<DateDirective, "[isoDate]", never, {}, {}, never, never, true, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateDirective, "[isoDate]", never, { "pick": { "alias": "pick"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, {}, never, never, true, never>;
8
19
  }
9
- export declare function dateToDisplay(value: string): string | null;
10
- export declare function dateToStore(value: string): string | null;
20
+ export declare function dateToDisplay(value: string, displayFormat?: string): string | null;
21
+ export declare function dateToStore(value: string, displayFormat?: string): string | null;
@@ -1,7 +1,7 @@
1
1
  import { AfterViewInit, OnDestroy, ElementRef, Renderer2, DestroyRef } from '@angular/core';
2
2
  import { ListenerService } from '../services/listener.service';
3
3
  import { SirioSelectComponent } from 'ngx-sirio-lib';
4
- import { ExtendContextFn } from '../services/programmability.service';
4
+ import { EvaluateOptions } from '../services/programmability.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class DropdownDirective implements AfterViewInit, OnDestroy {
7
7
  private el;
@@ -10,7 +10,7 @@ export declare class DropdownDirective implements AfterViewInit, OnDestroy {
10
10
  private destroyRef;
11
11
  private sirioSelect;
12
12
  component: any;
13
- onSelectionChanged?: (extendContext: ExtendContextFn) => void;
13
+ onSelectionChanged?: (options?: EvaluateOptions) => void;
14
14
  constructor(el: ElementRef, renderer: Renderer2, listenerService: ListenerService, destroyRef: DestroyRef, sirioSelect: SirioSelectComponent);
15
15
  ngAfterViewInit(): void;
16
16
  ngOnInit(): void;
@@ -0,0 +1,11 @@
1
+ import { AfterViewChecked, ElementRef, Renderer2 } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FileListReadonlyDirective implements AfterViewChecked {
4
+ private host;
5
+ private renderer;
6
+ readonly: boolean | null;
7
+ constructor(host: ElementRef<HTMLElement>, renderer: Renderer2);
8
+ ngAfterViewChecked(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileListReadonlyDirective, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FileListReadonlyDirective, "ngx-sirio-file-upload", never, { "readonly": { "alias": "readonly"; "required": false; }; }, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,22 @@
1
+ import { AfterViewInit, EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NavigatorStateDirective implements AfterViewInit {
4
+ private _total;
5
+ private _index;
6
+ private _requestedIndex;
7
+ private initialized;
8
+ ngAfterViewInit(): void;
9
+ indexChange: EventEmitter<number>;
10
+ set total(value: number);
11
+ get total(): number;
12
+ get index(): number;
13
+ set index(value: number);
14
+ canNext(): boolean;
15
+ canPrevious(): boolean;
16
+ next(): void;
17
+ previous(): void;
18
+ private recalculate;
19
+ private setIndex;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavigatorStateDirective, never>;
21
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NavigatorStateDirective, "[navigatorState]", ["navigatorState"], { "total": { "alias": "total"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, { "indexChange": "indexChange"; }, never, never, true, never>;
22
+ }
@@ -0,0 +1,28 @@
1
+ import { AfterViewInit, ApplicationRef, DestroyRef, ElementRef, EnvironmentInjector, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
2
+ import { Badge } from '../components/badge/badge.component';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TabBadgesDirective implements AfterViewInit {
5
+ private host;
6
+ private appRef;
7
+ private environmentInjector;
8
+ private renderer;
9
+ private destroyRef;
10
+ constructor(host: ElementRef, appRef: ApplicationRef, environmentInjector: EnvironmentInjector, renderer: Renderer2, destroyRef: DestroyRef);
11
+ ngAfterViewInit(): void;
12
+ setBadge(index: number, badge: Badge | null): void;
13
+ private badges;
14
+ private pendingBadges;
15
+ private findAnchor;
16
+ private createBadge;
17
+ private dispose;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<TabBadgesDirective, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TabBadgesDirective, "[tabBadges]", ["tabBadges"], {}, {}, never, never, true, never>;
20
+ }
21
+ export declare class TabBadgeDirective implements OnChanges {
22
+ tabBadges: TabBadgesDirective;
23
+ tabIndex: number;
24
+ badge: Badge | null;
25
+ ngOnChanges(changes: SimpleChanges): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<TabBadgeDirective, never>;
27
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TabBadgeDirective, "[tabBadge]", never, { "tabBadges": { "alias": "tabBadges"; "required": true; }; "tabIndex": { "alias": "tabIndex"; "required": true; }; "badge": { "alias": "badge"; "required": false; }; }, {}, never, never, true, never>;
28
+ }
@@ -3,7 +3,8 @@ import * as i0 from "@angular/core";
3
3
  export declare class TabItemDirective implements OnChanges {
4
4
  componentRef: any;
5
5
  disabled: any;
6
+ label: any;
6
7
  ngOnChanges(changes: SimpleChanges): void;
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<TabItemDirective, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<TabItemDirective, "[tabItem]", never, { "componentRef": { "alias": "componentRef"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TabItemDirective, "[tabItem]", never, { "componentRef": { "alias": "componentRef"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, true, never>;
9
10
  }
@@ -16,6 +16,7 @@ import { GridService } from '../services/grid.service';
16
16
  import { ChartService } from '../services/chart.service';
17
17
  import { AutoFocusService } from '../services/autofocus.service';
18
18
  import { FunctionService } from '../services/function.service';
19
+ import { NavigatorStateDirective } from '../directives/navigator.directive';
19
20
  import { Observable } from 'rxjs';
20
21
  import { FlatNode } from '../utils/flatten';
21
22
  import { SirioFileUploadComponent, NgxSirioEvent, ButtonColors } from 'ngx-sirio-lib';
@@ -405,6 +406,10 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
405
406
  evaluate(text: string | null, cacheable?: boolean, extendContext?: ExtendContextFn): any;
406
407
  evaluateColor(value: string | null): ButtonColors | null;
407
408
  evaluateConditional(conditional: any): boolean;
409
+ evaluateWithEvent(text: string | null, event: any): any;
410
+ evaluateWithEventAsBoolean(text: string | null, event?: any, defaultValue?: boolean): any;
411
+ evaluateWithEventAsString(text: string | null, event?: any, defaultValue?: string): string;
412
+ evaluateWithEventAsHandler(text: string | null, event: any): any;
408
413
  getTreeColumns(component: any): any;
409
414
  getTreeSource(component: any): Observable<FlatNode<any>[]>;
410
415
  getTemplate(value: string): any;
@@ -430,12 +435,10 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
430
435
  getGridModules(component: any): Module[];
431
436
  onGridSelectionChanged(component: any, event: any): void;
432
437
  getRowSource(component: any): any;
433
- runExpression(expression: any): (() => void) | undefined;
438
+ callExpression(expression: any): (() => void) | undefined;
434
439
  refreshRowSource(component: any): () => void;
435
- addItem(formArray: FormArray): void;
436
- removeItem(formArray: FormArray, index: number, withConfirm: boolean): void;
437
- navigationIndex: number;
438
- navigateItem(formArray: FormArray, delta?: number): void;
440
+ addItem(formArray: FormArray, state: NavigatorStateDirective): void;
441
+ removeItem(formArray: FormArray, index: number, withConfirm: boolean, state: NavigatorStateDirective): void;
439
442
  moveUpItem(formArray: FormArray, index: number): void;
440
443
  moveDownItem(formArray: FormArray, index: number): void;
441
444
  createUploadTables(component: any): any;
@@ -479,15 +482,13 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
479
482
  private noData;
480
483
  private get language();
481
484
  private invalidate;
485
+ private getEventOptions;
482
486
  private getControlFromPath;
483
487
  private getAsObservable;
484
488
  private applyCssClasses;
485
489
  private applyInlineStyles;
486
490
  private evaluateFuncOrValue;
487
491
  private invokeFuncOrValue;
488
- private configureDatepicker;
489
- private markForAutoFocus;
490
- private requireAutoFocus;
491
492
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldsComponent, never>;
492
493
  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; }; "identity": { "alias": "identity"; "required": false; }; "identityIndex": { "alias": "identityIndex"; "required": false; }; "disableAutoFocus": { "alias": "disableAutoFocus"; "required": false; }; }, {}, never, never, true, never>;
493
494
  }
@@ -397,7 +397,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
397
397
  set activeNav(value: number);
398
398
  getFormGroup(path: string | null): FormGroup;
399
399
  getFormStatus(form: any, index: number): SirioStepperProgressStatus;
400
- countInvalids(form: any): number;
400
+ countErrors(form: any): number;
401
401
  activateForm(event: NgxSirioEvent<SirioStepperProgressBarComponent>): void;
402
402
  evaluateBoolean(value: boolean | string | null): boolean | null;
403
403
  evaluateTemplate(value: string | null): string;
@@ -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 { FormArray, FormGroup } from '@angular/forms';
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
- constructor(validationService: ValidationService, disableService: DisableService, computeService: ComputeService, statusService: StatusService, eventService: EventService, metadata: MetadataService);
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: SirioDialogService);
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
- countInvalid(controls: Iterable<AbstractControl>): number;
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, event: any): any;
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(key: any, collection: StatusCollection): void;
14
- countInvalid(key: any): number;
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 type StatusCollection = Set<AbstractControl>;
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.47",
3
+ "version": "1.0.48",
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",