@wemake4u/form-player-se 1.0.46 → 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.
- 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/filepicker.directive.mjs +34 -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/directives/treelist.directive.mjs +98 -0
- package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +130 -111
- package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +11 -8
- package/esm2022/lib/pipes/times.mjs +14 -0
- package/esm2022/lib/services/builder.service.mjs +43 -89
- package/esm2022/lib/services/compute.service.mjs +7 -7
- package/esm2022/lib/services/dialog.service.mjs +35 -4
- package/esm2022/lib/services/disable.service.mjs +29 -10
- 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 +19 -8
- 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 -17
- 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/flatten.mjs +44 -0
- package/esm2022/lib/utils/window.mjs +3 -2
- package/fesm2022/wemake4u-form-player-se.mjs +1124 -438
- package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
- package/lib/components/badge/badge.component.d.ts +13 -0
- package/lib/controls/navigator.d.ts +3 -0
- package/lib/controls/treerlist.d.ts +3 -0
- package/lib/dialog/dialog.component.d.ts +2 -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/filepicker.directive.d.ts +11 -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/directives/treelist.directive.d.ts +23 -0
- package/lib/dynamic-fields/dynamic-fields.component.d.ts +24 -10
- package/lib/dynamic-form/dynamic-form.component.d.ts +1 -1
- 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 +3 -1
- 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 +4 -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/lib/utils/flatten.d.ts +13 -0
- 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
|
+
}
|
|
@@ -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 {
|
|
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?: (
|
|
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
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementRef, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ListenerService } from '../services/listener.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TreeListDirective implements OnChanges, AfterViewInit {
|
|
5
|
+
private el;
|
|
6
|
+
private listenerService;
|
|
7
|
+
nodes: any[];
|
|
8
|
+
constructor(el: ElementRef, listenerService: ListenerService);
|
|
9
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
+
ngAfterViewInit(): void;
|
|
11
|
+
private initialized;
|
|
12
|
+
private rows;
|
|
13
|
+
private rebuild;
|
|
14
|
+
private getChildren;
|
|
15
|
+
private setVisible;
|
|
16
|
+
private updateVisibility;
|
|
17
|
+
private isExpanded;
|
|
18
|
+
private refreshTree;
|
|
19
|
+
private initToggles;
|
|
20
|
+
private refreshToggleIcon;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeListDirective, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TreeListDirective, "[treelist]", never, { "nodes": { "alias": "treelist"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -15,7 +15,10 @@ import { FormService } from '../services/form.service';
|
|
|
15
15
|
import { GridService } from '../services/grid.service';
|
|
16
16
|
import { ChartService } from '../services/chart.service';
|
|
17
17
|
import { AutoFocusService } from '../services/autofocus.service';
|
|
18
|
+
import { FunctionService } from '../services/function.service';
|
|
19
|
+
import { NavigatorStateDirective } from '../directives/navigator.directive';
|
|
18
20
|
import { Observable } from 'rxjs';
|
|
21
|
+
import { FlatNode } from '../utils/flatten';
|
|
19
22
|
import { SirioFileUploadComponent, NgxSirioEvent, ButtonColors } from 'ngx-sirio-lib';
|
|
20
23
|
import { Module, GridOptions } from 'ag-grid-community';
|
|
21
24
|
import { AgChartOptions } from 'ag-charts-community';
|
|
@@ -32,6 +35,7 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
|
|
|
32
35
|
private metadata;
|
|
33
36
|
private languageService;
|
|
34
37
|
private global;
|
|
38
|
+
private functionService;
|
|
35
39
|
private formService;
|
|
36
40
|
private grid;
|
|
37
41
|
private chart;
|
|
@@ -385,7 +389,7 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
|
|
|
385
389
|
Elements: string;
|
|
386
390
|
Of: string;
|
|
387
391
|
};
|
|
388
|
-
constructor(sanitizer: SanitizeService, markdown: MarkdownService, mime: MimeService, programmability: ProgrammabilityService, weak: WeakService, register: RegisterService, metadata: MetadataService, languageService: LanguageService, global: GlobalService, formService: FormService, grid: GridService, chart: ChartService, dialog: DialogService, autoFocus: AutoFocusService, el: ElementRef);
|
|
392
|
+
constructor(sanitizer: SanitizeService, markdown: MarkdownService, mime: MimeService, programmability: ProgrammabilityService, weak: WeakService, register: RegisterService, metadata: MetadataService, languageService: LanguageService, global: GlobalService, functionService: FunctionService, formService: FormService, grid: GridService, chart: ChartService, dialog: DialogService, autoFocus: AutoFocusService, el: ElementRef);
|
|
389
393
|
ngOnInit(): void;
|
|
390
394
|
ngOnChanges(changes: SimpleChanges): void;
|
|
391
395
|
ngAfterViewInit(): void;
|
|
@@ -397,11 +401,17 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
|
|
|
397
401
|
evaluateBoolean(value: boolean | string | null): boolean | null;
|
|
398
402
|
evaluateNumber(value: number | string | null): number | null;
|
|
399
403
|
evaluateUrl(value: string | null): SafeResourceUrl;
|
|
400
|
-
|
|
404
|
+
evaluateSize(value: number | string | null): string | null;
|
|
401
405
|
evaluateTemplate(value: string | null): string;
|
|
402
406
|
evaluate(text: string | null, cacheable?: boolean, extendContext?: ExtendContextFn): any;
|
|
403
407
|
evaluateColor(value: string | null): ButtonColors | null;
|
|
404
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;
|
|
413
|
+
getTreeColumns(component: any): any;
|
|
414
|
+
getTreeSource(component: any): Observable<FlatNode<any>[]>;
|
|
405
415
|
getTemplate(value: string): any;
|
|
406
416
|
getFormGroup(control: AbstractControl | null): FormGroup;
|
|
407
417
|
getFormArray(control: AbstractControl | null): FormArray;
|
|
@@ -425,12 +435,10 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
|
|
|
425
435
|
getGridModules(component: any): Module[];
|
|
426
436
|
onGridSelectionChanged(component: any, event: any): void;
|
|
427
437
|
getRowSource(component: any): any;
|
|
428
|
-
|
|
438
|
+
callExpression(expression: any): (() => void) | undefined;
|
|
429
439
|
refreshRowSource(component: any): () => void;
|
|
430
|
-
addItem(formArray: FormArray): void;
|
|
431
|
-
removeItem(formArray: FormArray, index: number, withConfirm: boolean): void;
|
|
432
|
-
navigationIndex: number;
|
|
433
|
-
navigateItem(formArray: FormArray, delta?: number): void;
|
|
440
|
+
addItem(formArray: FormArray, state: NavigatorStateDirective): void;
|
|
441
|
+
removeItem(formArray: FormArray, index: number, withConfirm: boolean, state: NavigatorStateDirective): void;
|
|
434
442
|
moveUpItem(formArray: FormArray, index: number): void;
|
|
435
443
|
moveDownItem(formArray: FormArray, index: number): void;
|
|
436
444
|
createUploadTables(component: any): any;
|
|
@@ -456,6 +464,10 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
|
|
|
456
464
|
getComponentStyle(component: any): {
|
|
457
465
|
[key: string]: string;
|
|
458
466
|
} | null;
|
|
467
|
+
getClass(component: any): {};
|
|
468
|
+
getStyle(component: any): {
|
|
469
|
+
[key: string]: string;
|
|
470
|
+
} | null;
|
|
459
471
|
getTextAlignment(component: any): string;
|
|
460
472
|
getHorizontalAlignment(component: any): {
|
|
461
473
|
"horizontal-left": boolean;
|
|
@@ -463,18 +475,20 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
|
|
|
463
475
|
"horizontal-right": boolean;
|
|
464
476
|
"horizontal-fill": boolean;
|
|
465
477
|
};
|
|
478
|
+
getJustify(align: string | undefined): string;
|
|
466
479
|
getLightView(component: any): string;
|
|
467
480
|
getPanels(component: any): Observable<any>;
|
|
481
|
+
isTextOverflow(el: HTMLElement): boolean;
|
|
468
482
|
private noData;
|
|
469
483
|
private get language();
|
|
470
484
|
private invalidate;
|
|
485
|
+
private getEventOptions;
|
|
471
486
|
private getControlFromPath;
|
|
472
487
|
private getAsObservable;
|
|
473
488
|
private applyCssClasses;
|
|
474
489
|
private applyInlineStyles;
|
|
475
|
-
private
|
|
476
|
-
private
|
|
477
|
-
private requireAutoFocus;
|
|
490
|
+
private evaluateFuncOrValue;
|
|
491
|
+
private invokeFuncOrValue;
|
|
478
492
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldsComponent, never>;
|
|
479
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>;
|
|
480
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
|
-
|
|
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 {
|
|
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;
|
|
@@ -10,13 +10,15 @@ export declare class FunctionService implements IEvaluatorProvider {
|
|
|
10
10
|
private dialog;
|
|
11
11
|
private injector;
|
|
12
12
|
constructor(metadata: MetadataService, dialog: DialogService, injector: Injector);
|
|
13
|
-
invokable(func: any):
|
|
13
|
+
invokable(func: any): (...args: any[]) => any;
|
|
14
|
+
asInvokable(func: any): ((...args: any[]) => any) | null;
|
|
14
15
|
executeOnce<T>(observable: Observable<T>, callback: any): void;
|
|
15
16
|
asObservable<T>(value: T): Observable<T>;
|
|
16
17
|
setTimeout<T>(callback: any, delay: number): void;
|
|
17
18
|
openForm(template: string | object, options: DialogOptions): void;
|
|
18
19
|
openWindow(url: string, target?: WindowTarget, features?: OpenWindowFeatures): Window | null;
|
|
19
20
|
newGuid(): string;
|
|
21
|
+
range(from: number, to: number): number[];
|
|
20
22
|
getContext(): Record<string, any>;
|
|
21
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<FunctionService, never>;
|
|
22
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;
|
|
@@ -76,6 +76,9 @@ export interface IEvaluatorProvider {
|
|
|
76
76
|
export interface EvaluateOptions {
|
|
77
77
|
cacheable?: boolean;
|
|
78
78
|
ignoreDeps?: boolean;
|
|
79
|
+
cacheInvalidated?: () => void;
|
|
80
|
+
destroyRef?: DestroyRef;
|
|
81
|
+
invokeArgs?: any[];
|
|
79
82
|
extendContext?: ExtendContextFn;
|
|
80
83
|
}
|
|
81
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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FlatNode<T = any> {
|
|
2
|
+
id: number;
|
|
3
|
+
parentId: number | null;
|
|
4
|
+
level: number;
|
|
5
|
+
hasChildren: boolean;
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
data: T;
|
|
8
|
+
meta?: Record<string, any>;
|
|
9
|
+
}
|
|
10
|
+
export declare function flattenTree<T>(nodes: unknown, options?: {
|
|
11
|
+
children?: keyof T | ((node: T) => T[] | null | undefined);
|
|
12
|
+
onCreate?: (flatNode: FlatNode<T>) => void;
|
|
13
|
+
}): FlatNode<T>[];
|
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.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",
|