@wemake4u/form-player-se 1.0.40 → 1.0.41
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/components/setFilter/setFilter.component.mjs +18 -3
- package/esm2022/lib/controls/accordion.mjs +50 -3
- package/esm2022/lib/controls/control.mjs +70 -25
- package/esm2022/lib/controls/factory.mjs +42 -42
- package/esm2022/lib/controls/tab.mjs +47 -25
- package/esm2022/lib/controls/table.mjs +89 -15
- package/esm2022/lib/controls/textfield.mjs +4 -3
- package/esm2022/lib/directives/register.directive.mjs +28 -9
- package/esm2022/lib/directives/tabcontrol.directive.mjs +1 -1
- package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +11 -4
- package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +8 -5
- package/esm2022/lib/services/formatter.service.mjs +3 -1
- package/esm2022/lib/services/navigation.service.mjs +35 -0
- package/esm2022/lib/services/register.service.mjs +40 -2
- package/esm2022/lib/services/state.service.mjs +40 -0
- package/esm2022/lib/utils/navigation.mjs +20 -0
- package/esm2022/lib/utils/patch.mjs +17 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/wemake4u-form-player-se.mjs +510 -157
- package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
- package/lib/controls/accordion.d.ts +5 -1
- package/lib/controls/control.d.ts +31 -12
- package/lib/controls/factory.d.ts +2 -4
- package/lib/controls/tab.d.ts +9 -6
- package/lib/controls/table.d.ts +16 -5
- package/lib/controls/textfield.d.ts +1 -1
- package/lib/directives/register.directive.d.ts +3 -2
- package/lib/dynamic-fields/dynamic-fields.component.d.ts +3 -1
- package/lib/services/navigation.service.d.ts +11 -0
- package/lib/services/register.service.d.ts +9 -0
- package/lib/services/state.service.d.ts +14 -0
- package/lib/utils/navigation.d.ts +6 -0
- package/lib/utils/patch.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ContainerControl } from "./control";
|
|
2
2
|
export declare class AccordionControl extends ContainerControl {
|
|
3
|
-
|
|
3
|
+
openPanel(index: number): void;
|
|
4
|
+
onLoadState(): void;
|
|
5
|
+
onSaveState(): void;
|
|
6
|
+
private createState;
|
|
7
|
+
private get accordion();
|
|
4
8
|
}
|
|
@@ -1,21 +1,40 @@
|
|
|
1
|
-
import { ElementRef } from "@angular/core";
|
|
1
|
+
import { ElementRef, Injector, DestroyRef } from "@angular/core";
|
|
2
2
|
import { RegisterService } from "../services/register.service";
|
|
3
3
|
export declare class Control {
|
|
4
|
-
readonly
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
private readonly context;
|
|
5
|
+
constructor(context: ControlContext);
|
|
6
|
+
get name(): string;
|
|
7
|
+
protected getMetadata(): any;
|
|
8
|
+
protected getComponentRef(): any;
|
|
9
|
+
protected getElementRef(): ElementRef;
|
|
10
|
+
protected getInjector(): Injector;
|
|
11
|
+
protected getDestroyRef(): DestroyRef;
|
|
12
|
+
protected getRegister(): RegisterService | undefined;
|
|
13
|
+
protected onInit(): void;
|
|
14
|
+
protected onLoadState(): void;
|
|
15
|
+
protected onSaveState(): void;
|
|
16
|
+
protected onDestroy(): void;
|
|
17
|
+
protected getState<T = any>(): T | null;
|
|
18
|
+
protected setState(state: any): void;
|
|
19
|
+
protected clearState(): void;
|
|
20
|
+
private getId;
|
|
21
|
+
private State;
|
|
12
22
|
}
|
|
13
23
|
export declare class ContainerControl extends Control {
|
|
14
|
-
|
|
15
|
-
constructor(name: string, metadata: any, componentRef: any, elementRef: ElementRef, register: RegisterService | undefined);
|
|
24
|
+
constructor(context: ControlContext);
|
|
16
25
|
findControl(predicate: (control: Control) => boolean, firstOnly: boolean): Control[];
|
|
17
26
|
}
|
|
18
27
|
export declare class ItemControl extends ContainerControl {
|
|
19
28
|
readonly index: number;
|
|
20
|
-
constructor(
|
|
29
|
+
constructor(context: ControlContext, index: number);
|
|
30
|
+
}
|
|
31
|
+
export interface ControlContext {
|
|
32
|
+
name: string;
|
|
33
|
+
path: string;
|
|
34
|
+
metadata: any;
|
|
35
|
+
componentRef: any;
|
|
36
|
+
elementRef: ElementRef;
|
|
37
|
+
injector: Injector;
|
|
38
|
+
destroyRef: DestroyRef;
|
|
39
|
+
register?: RegisterService;
|
|
21
40
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { RegisterService } from '../services/register.service';
|
|
4
|
-
export declare function createControl(name: string, metadata: any, componentRef: any, elementRef: ElementRef, register: RegisterService | undefined): Control;
|
|
1
|
+
import { Control, ControlContext } from '../controls/control';
|
|
2
|
+
export declare function createControl(context: ControlContext): Control;
|
package/lib/controls/tab.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ContainerControl } from "./control";
|
|
2
2
|
export declare class TabControl extends ContainerControl {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
canNext(): boolean;
|
|
4
|
+
goNext(): void;
|
|
5
|
+
canPrevious(): boolean;
|
|
6
|
+
goPrevious(): void;
|
|
7
|
+
setActiveIndex(index: number): void;
|
|
8
|
+
onLoadState(): void;
|
|
9
|
+
onSaveState(): void;
|
|
10
|
+
private createState;
|
|
11
|
+
private get tab();
|
|
9
12
|
private getPreviousIndex;
|
|
10
13
|
private getNextIndex;
|
|
11
14
|
}
|
package/lib/controls/table.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { Control } from "./control";
|
|
2
|
+
import { FilterModel } from 'ag-grid-community';
|
|
2
3
|
export declare class TableControl extends Control {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
setFilter(filter: FilterModel): void;
|
|
5
|
+
getFilter(): FilterModel;
|
|
6
|
+
clearFilter(): void;
|
|
7
|
+
refresh(): void;
|
|
8
|
+
redraw(): void;
|
|
9
|
+
private currentState;
|
|
10
|
+
onLoadState(): void;
|
|
11
|
+
onSaveState(): void;
|
|
12
|
+
private createState;
|
|
13
|
+
private applyState;
|
|
14
|
+
private applyPagination;
|
|
15
|
+
private applyPageSize;
|
|
16
|
+
private applyPageNumber;
|
|
17
|
+
private get grid();
|
|
18
|
+
private paginationEnabled;
|
|
8
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementRef, AfterContentInit, OnDestroy, QueryList, DestroyRef } from '@angular/core';
|
|
1
|
+
import { ElementRef, AfterContentInit, OnDestroy, QueryList, DestroyRef, Injector } from '@angular/core';
|
|
2
2
|
import { RegisterService } from '../services/register.service';
|
|
3
3
|
import { IDynamicFieldsComponent } from '../dynamic-fields/dynamic-fields.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -6,11 +6,12 @@ export declare class RegisterDirective implements AfterContentInit, OnDestroy {
|
|
|
6
6
|
private el;
|
|
7
7
|
private destroyRef;
|
|
8
8
|
private registerService;
|
|
9
|
+
private injector;
|
|
9
10
|
register: any;
|
|
10
11
|
componentRef: any;
|
|
11
12
|
dynamicField?: IDynamicFieldsComponent;
|
|
12
13
|
itemFields: QueryList<IDynamicFieldsComponent>;
|
|
13
|
-
constructor(el: ElementRef, destroyRef: DestroyRef, registerService: RegisterService);
|
|
14
|
+
constructor(el: ElementRef, destroyRef: DestroyRef, registerService: RegisterService, injector: Injector);
|
|
14
15
|
ngAfterContentInit(): void;
|
|
15
16
|
ngOnDestroy(): void;
|
|
16
17
|
private registerControl;
|
|
@@ -45,6 +45,8 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
|
|
|
45
45
|
alignment: string;
|
|
46
46
|
readOnly: boolean | null;
|
|
47
47
|
recursionLevel: number;
|
|
48
|
+
identity: string;
|
|
49
|
+
identityIndex?: number;
|
|
48
50
|
Texts: {
|
|
49
51
|
i18n: {
|
|
50
52
|
it: {
|
|
@@ -431,5 +433,5 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
|
|
|
431
433
|
private markForAutoFocus;
|
|
432
434
|
private requireAutoFocus;
|
|
433
435
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldsComponent, never>;
|
|
434
|
-
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>;
|
|
436
|
+
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; }; }, {}, never, never, true, never>;
|
|
435
437
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NavigationService {
|
|
4
|
+
private router;
|
|
5
|
+
constructor(router: Router);
|
|
6
|
+
private _skipState;
|
|
7
|
+
get skipState(): boolean;
|
|
8
|
+
private shouldSkipState;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
11
|
+
}
|
|
@@ -8,6 +8,11 @@ export declare class RegisterService implements IEvaluatorProvider {
|
|
|
8
8
|
register(name: string, control: Control): void;
|
|
9
9
|
unregister(name: string): void;
|
|
10
10
|
unregisterAll(): void;
|
|
11
|
+
identify(id: string, index?: number): void;
|
|
12
|
+
getPath(): string;
|
|
13
|
+
private _path?;
|
|
14
|
+
private identityNode?;
|
|
15
|
+
private get identityChain();
|
|
11
16
|
getContext(): Record<string, any>;
|
|
12
17
|
getControl(name: string): Control | null;
|
|
13
18
|
getControlAs<T extends Control>(name: string, type: new (...args: any[]) => T): T | null;
|
|
@@ -17,3 +22,7 @@ export declare class RegisterService implements IEvaluatorProvider {
|
|
|
17
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<RegisterService, [{ optional: true; skipSelf: true; }]>;
|
|
18
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<RegisterService>;
|
|
19
24
|
}
|
|
25
|
+
export interface IdentityNode {
|
|
26
|
+
id: string;
|
|
27
|
+
index?: number;
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NavigationService } from './navigation.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class StateService {
|
|
4
|
+
private navigation;
|
|
5
|
+
constructor(navigation: NavigationService);
|
|
6
|
+
private static readonly store;
|
|
7
|
+
private readonly prefix;
|
|
8
|
+
getState<T = any>(componentId: string): T | null;
|
|
9
|
+
setState(componentId: string, value: any): void;
|
|
10
|
+
clearState(componentId: string): void;
|
|
11
|
+
private buildKey;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StateService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StateService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function patchFunction<T extends object, K extends keyof T>(instance: T, methodName: K, wrapper: (this: T, args: any[], original: (...args: any[]) => any) => any): void;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './lib/utils/syncronize';
|
|
|
4
4
|
export * from './lib/utils/resolveRefs';
|
|
5
5
|
export * from './lib/utils/observable';
|
|
6
6
|
export * from './lib/utils/deepEqual';
|
|
7
|
+
export * from './lib/utils/navigation';
|
|
7
8
|
export * from './lib/services/toast.service';
|
|
8
9
|
export * from './lib/services/sanitize.service';
|
|
9
10
|
export * from './lib/services/feel.service';
|
|
@@ -13,6 +14,7 @@ export * from './lib/services/scope.service';
|
|
|
13
14
|
export * from './lib/services/dialog.service';
|
|
14
15
|
export * from './lib/services/global.service';
|
|
15
16
|
export * from './lib/services/form.service';
|
|
17
|
+
export * from './lib/services/navigation.service';
|
|
16
18
|
export * from './lib/interact/confirmation';
|
|
17
19
|
export * from './lib/interact/notification';
|
|
18
20
|
export * from './lib/interact/prompt';
|