@wemake4u/form-player-se 1.0.45 → 1.0.46
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/builtIn/builtIn.mjs +6 -2
- package/esm2022/lib/builtIn/cache.json +30 -0
- package/esm2022/lib/builtIn/form.json +25 -0
- package/esm2022/lib/builtIn/function.json +28 -0
- package/esm2022/lib/builtIn/nav.json +37 -0
- package/esm2022/lib/dialog/dialog.component.mjs +5 -4
- package/esm2022/lib/directives/collapse.directive.mjs +22 -2
- package/esm2022/lib/directives/dropdown.directive.mjs +38 -8
- package/esm2022/lib/directives/required.directive.mjs +2 -2
- package/esm2022/lib/directives/tabcontrol.directive.mjs +1 -1
- package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +14 -5
- package/esm2022/lib/services/builder.service.mjs +9 -1
- package/esm2022/lib/services/dialog.service.mjs +1 -1
- package/esm2022/lib/services/feel.service.mjs +25 -7
- package/esm2022/lib/services/form.service.mjs +17 -1
- package/esm2022/lib/services/function.service.mjs +13 -2
- package/esm2022/lib/services/programmability.service.mjs +25 -12
- package/esm2022/lib/services/validation.service.mjs +89 -54
- package/esm2022/lib/services/weak.service.mjs +4 -3
- package/esm2022/lib/utils/cacheControl.mjs +24 -0
- package/esm2022/lib/utils/deepEqual.mjs +27 -19
- package/esm2022/lib/utils/observable.mjs +7 -3
- package/fesm2022/wemake4u-form-player-se.mjs +472 -148
- package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
- package/lib/directives/collapse.directive.d.ts +6 -1
- package/lib/directives/dropdown.directive.d.ts +5 -2
- package/lib/dynamic-fields/dynamic-fields.component.d.ts +3 -2
- package/lib/services/dialog.service.d.ts +10 -3
- package/lib/services/feel.service.d.ts +7 -2
- package/lib/services/form.service.d.ts +3 -0
- package/lib/services/function.service.d.ts +2 -0
- package/lib/services/programmability.service.d.ts +2 -2
- package/lib/services/validation.service.d.ts +5 -2
- package/lib/services/weak.service.d.ts +1 -1
- package/lib/utils/cacheControl.d.ts +9 -0
- package/lib/utils/deepEqual.d.ts +3 -1
- package/lib/utils/observable.d.ts +1 -1
- package/package.json +3 -3
|
@@ -9,6 +9,9 @@ export declare class CollapseDirective implements OnChanges, OnDestroy {
|
|
|
9
9
|
private listenerService;
|
|
10
10
|
private languageService;
|
|
11
11
|
maxHeight: number | null;
|
|
12
|
+
onCollapse?: () => void;
|
|
13
|
+
onExpand?: () => void;
|
|
14
|
+
component: any;
|
|
12
15
|
private currentHeight;
|
|
13
16
|
private button;
|
|
14
17
|
private iconSpan;
|
|
@@ -33,6 +36,8 @@ export declare class CollapseDirective implements OnChanges, OnDestroy {
|
|
|
33
36
|
private collapse;
|
|
34
37
|
private updateIcon;
|
|
35
38
|
private locale;
|
|
39
|
+
private onExpandOccurred;
|
|
40
|
+
private onCollapseOccurred;
|
|
36
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<CollapseDirective, never>;
|
|
37
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseDirective, "[collapse]", never, { "maxHeight": { "alias": "collapse"; "required": false; }; }, {}, never, never, true, never>;
|
|
42
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseDirective, "[collapse]", never, { "maxHeight": { "alias": "collapse"; "required": false; }; "onCollapse": { "alias": "onCollapse"; "required": false; }; "onExpand": { "alias": "onExpand"; "required": false; }; "component": { "alias": "register"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
43
|
}
|
|
@@ -1,6 +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
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class DropdownDirective implements AfterViewInit, OnDestroy {
|
|
6
7
|
private el;
|
|
@@ -8,6 +9,8 @@ export declare class DropdownDirective implements AfterViewInit, OnDestroy {
|
|
|
8
9
|
private listenerService;
|
|
9
10
|
private destroyRef;
|
|
10
11
|
private sirioSelect;
|
|
12
|
+
component: any;
|
|
13
|
+
onSelectionChanged?: (extendContext: ExtendContextFn) => void;
|
|
11
14
|
constructor(el: ElementRef, renderer: Renderer2, listenerService: ListenerService, destroyRef: DestroyRef, sirioSelect: SirioSelectComponent);
|
|
12
15
|
ngAfterViewInit(): void;
|
|
13
16
|
ngOnInit(): void;
|
|
@@ -15,7 +18,7 @@ export declare class DropdownDirective implements AfterViewInit, OnDestroy {
|
|
|
15
18
|
private handleValue;
|
|
16
19
|
private handleSearchable;
|
|
17
20
|
private handleOptionsChanges;
|
|
18
|
-
private
|
|
21
|
+
private handleOptionSelected;
|
|
19
22
|
private canValidate;
|
|
20
23
|
private validator;
|
|
21
24
|
private addValidator;
|
|
@@ -35,5 +38,5 @@ export declare class DropdownDirective implements AfterViewInit, OnDestroy {
|
|
|
35
38
|
private findPreviousVisibleOption;
|
|
36
39
|
private findNextVisibleOption;
|
|
37
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownDirective, [null, null, null, null, { host: true; }]>;
|
|
38
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownDirective, "[dropdown]", never, {}, {}, never, never, true, never>;
|
|
41
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownDirective, "[dropdown]", never, { "component": { "alias": "register"; "required": false; }; "onSelectionChanged": { "alias": "onSelectionChanged"; "required": false; }; }, {}, never, never, true, never>;
|
|
39
42
|
}
|
|
@@ -5,7 +5,7 @@ import { SafeHtml, SafeResourceUrl } from '@angular/platform-browser';
|
|
|
5
5
|
import { SanitizeService } from '../services/sanitize.service';
|
|
6
6
|
import { MarkdownService } from '../services/markdown.service';
|
|
7
7
|
import { MimeService } from '../services/mime.service';
|
|
8
|
-
import { ProgrammabilityService } from '../services/programmability.service';
|
|
8
|
+
import { ExtendContextFn, ProgrammabilityService } from '../services/programmability.service';
|
|
9
9
|
import { DialogService } from '../services/dialog.service';
|
|
10
10
|
import { WeakService } from '../services/weak.service';
|
|
11
11
|
import { RegisterService } from '../services/register.service';
|
|
@@ -399,7 +399,7 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
|
|
|
399
399
|
evaluateUrl(value: string | null): SafeResourceUrl;
|
|
400
400
|
evaluateHeight(value: number | string | null): string | null;
|
|
401
401
|
evaluateTemplate(value: string | null): string;
|
|
402
|
-
evaluate(text: string | null, cacheable?: boolean): any;
|
|
402
|
+
evaluate(text: string | null, cacheable?: boolean, extendContext?: ExtendContextFn): any;
|
|
403
403
|
evaluateColor(value: string | null): ButtonColors | null;
|
|
404
404
|
evaluateConditional(conditional: any): boolean;
|
|
405
405
|
getTemplate(value: string): any;
|
|
@@ -425,6 +425,7 @@ export declare class DynamicFieldsComponent implements OnInit, OnChanges, AfterV
|
|
|
425
425
|
getGridModules(component: any): Module[];
|
|
426
426
|
onGridSelectionChanged(component: any, event: any): void;
|
|
427
427
|
getRowSource(component: any): any;
|
|
428
|
+
runExpression(expression: any): (() => void) | undefined;
|
|
428
429
|
refreshRowSource(component: any): () => void;
|
|
429
430
|
addItem(formArray: FormArray): void;
|
|
430
431
|
removeItem(formArray: FormArray, index: number, withConfirm: boolean): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
|
-
import { SirioDialogService, DialogTypes, DialogSizes } from 'ngx-sirio-lib';
|
|
2
|
+
import { SirioDialogService, DialogTypes, DialogSizes, ButtonColors } 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 {
|
|
@@ -27,6 +27,8 @@ export interface DialogOptions {
|
|
|
27
27
|
isDrawer?: boolean;
|
|
28
28
|
closeButton?: boolean;
|
|
29
29
|
buttons?: DialogButtons;
|
|
30
|
+
customButtons?: CustomButton[];
|
|
31
|
+
keepOpen?: boolean;
|
|
30
32
|
onResult?: (result: DialogResult) => void;
|
|
31
33
|
}
|
|
32
34
|
export interface FormDialogOptions extends DialogOptions {
|
|
@@ -38,8 +40,13 @@ export interface FormDialogOptions extends DialogOptions {
|
|
|
38
40
|
showFormTitle?: boolean;
|
|
39
41
|
}
|
|
40
42
|
export interface DialogResult {
|
|
41
|
-
action: DialogAction;
|
|
43
|
+
action: DialogAction | string;
|
|
42
44
|
value?: any;
|
|
43
45
|
}
|
|
46
|
+
export interface CustomButton {
|
|
47
|
+
text: string;
|
|
48
|
+
color: ButtonColors;
|
|
49
|
+
action: string;
|
|
50
|
+
}
|
|
44
51
|
export type DialogAction = 'OK' | 'Cancel' | 'Yes' | 'No' | 'Confirm' | 'Close' | 'Abort' | 'Retry' | 'Ignore' | 'Try' | 'Continue';
|
|
45
|
-
export type DialogButtons = 'OK' | 'OKCancel' | 'ConfirmCancel' | 'AbortRetryIgnore' | 'YesNoCancel' | 'YesNo' | 'RetryCancel' | 'CancelTryContinue';
|
|
52
|
+
export type DialogButtons = 'OK' | 'OKCancel' | 'ConfirmCancel' | 'AbortRetryIgnore' | 'YesNoCancel' | 'YesNo' | 'RetryCancel' | 'CancelTryContinue' | 'Custom';
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { GlobalService } from '../services/global.service';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class FeelService {
|
|
3
|
-
|
|
4
|
+
private globalService;
|
|
5
|
+
constructor(globalService: GlobalService);
|
|
6
|
+
private _verbose;
|
|
7
|
+
get verbose(): boolean;
|
|
4
8
|
evalTemplate(template: string, context?: any): string;
|
|
5
9
|
evalExpression(expression: string, context?: Record<string, any>): any;
|
|
6
|
-
evalUnaryTest(expression: string, context?: Record<string, any>, input?: any): boolean;
|
|
10
|
+
evalUnaryTest(expression: string, context?: Record<string, any>, input?: any): boolean | null;
|
|
7
11
|
isValidExpression(expression: string): boolean;
|
|
8
12
|
isValidUnaryTest(expression: string): boolean;
|
|
9
13
|
getDependencies(expression: string, context?: Record<string, any>): (string | string[])[];
|
|
@@ -15,6 +19,7 @@ export declare class FeelService {
|
|
|
15
19
|
private getFunctionName;
|
|
16
20
|
private getStatusDependencies;
|
|
17
21
|
private splitQuoted;
|
|
22
|
+
private logWarnings;
|
|
18
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeelService, never>;
|
|
19
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<FeelService>;
|
|
20
25
|
}
|
|
@@ -18,10 +18,13 @@ export interface PathOptions {
|
|
|
18
18
|
create?: boolean;
|
|
19
19
|
expected?: ControlType;
|
|
20
20
|
breakOnArray?: boolean;
|
|
21
|
+
breakOnNull?: boolean;
|
|
21
22
|
}
|
|
22
23
|
export declare class FormService implements IEvaluatorProvider {
|
|
23
24
|
set(control: AbstractControl, path: Path, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
|
|
24
25
|
get(control: AbstractControl, path: Path, pathOptions?: PathOptions): any;
|
|
26
|
+
reset(control: AbstractControl, path: Path): any;
|
|
27
|
+
resetAll(control: AbstractControl, ...paths: string[]): void;
|
|
25
28
|
getControl(control: AbstractControl, path: Path, pathOptions?: PathOptions): AbstractControl | undefined;
|
|
26
29
|
prepend(control: AbstractControl, path: Path, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
|
|
27
30
|
append(control: AbstractControl, path: Path, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
|
|
@@ -12,6 +12,8 @@ export declare class FunctionService implements IEvaluatorProvider {
|
|
|
12
12
|
constructor(metadata: MetadataService, dialog: DialogService, injector: Injector);
|
|
13
13
|
invokable(func: any): Function;
|
|
14
14
|
executeOnce<T>(observable: Observable<T>, callback: any): void;
|
|
15
|
+
asObservable<T>(value: T): Observable<T>;
|
|
16
|
+
setTimeout<T>(callback: any, delay: number): void;
|
|
15
17
|
openForm(template: string | object, options: DialogOptions): void;
|
|
16
18
|
openWindow(url: string, target?: WindowTarget, features?: OpenWindowFeatures): Window | null;
|
|
17
19
|
newGuid(): string;
|
|
@@ -19,7 +19,7 @@ export declare class ProgrammabilityService {
|
|
|
19
19
|
private toastService;
|
|
20
20
|
private dialogService;
|
|
21
21
|
private formatterService;
|
|
22
|
-
private
|
|
22
|
+
private jsonService;
|
|
23
23
|
private functionService;
|
|
24
24
|
private formService;
|
|
25
25
|
private globalService;
|
|
@@ -27,7 +27,7 @@ export declare class ProgrammabilityService {
|
|
|
27
27
|
private destroyRef;
|
|
28
28
|
private register;
|
|
29
29
|
private scope;
|
|
30
|
-
constructor(feelService: FeelService, weakService: WeakService, toastService: ToastService, dialogService: DialogService, formatterService: FormatterService,
|
|
30
|
+
constructor(feelService: FeelService, weakService: WeakService, toastService: ToastService, dialogService: DialogService, formatterService: FormatterService, jsonService: JsonService, functionService: FunctionService, formService: FormService, globalService: GlobalService, subscribeService: SubscribeService, destroyRef: DestroyRef, register: RegisterService, scope: ScopeService);
|
|
31
31
|
private predefinedFunctions;
|
|
32
32
|
private evaluatorProviders;
|
|
33
33
|
addEvaluatorProviders(evaluatorProvider: IEvaluatorProvider): void;
|
|
@@ -12,23 +12,26 @@ export declare class ValidationService {
|
|
|
12
12
|
createCollection(): ValidationCollection;
|
|
13
13
|
addToCollection(collection: ValidationCollection, control: AbstractControl, formGroup: FormGroup, component: any): void;
|
|
14
14
|
setupCollection(collection: ValidationCollection): void;
|
|
15
|
-
validateRequired(control: AbstractControl): ValidationErrors | null;
|
|
15
|
+
validateRequired(control: AbstractControl, currentValue: any): ValidationErrors | null;
|
|
16
16
|
private canAddToCollection;
|
|
17
17
|
private getRules;
|
|
18
18
|
private validateRules;
|
|
19
19
|
private createValidator;
|
|
20
20
|
private createAsyncValidator;
|
|
21
|
+
private createRequiredValidator;
|
|
21
22
|
private validationErrors;
|
|
22
23
|
private watchForValidation;
|
|
23
24
|
private logValidation;
|
|
24
25
|
private readonly nullObserver;
|
|
25
26
|
private get language();
|
|
26
27
|
private locale;
|
|
27
|
-
private
|
|
28
|
+
private requiredValidators;
|
|
28
29
|
private requiredValidator;
|
|
29
30
|
private requiredTrueValidator;
|
|
30
31
|
private isTrueValidator;
|
|
31
32
|
private getRequiredMessage;
|
|
33
|
+
private shouldSkipValidation;
|
|
34
|
+
private resolveSkipValidation;
|
|
32
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationService, never>;
|
|
33
36
|
static ɵprov: i0.ɵɵInjectableDeclaration<ValidationService>;
|
|
34
37
|
}
|
|
@@ -3,7 +3,7 @@ export declare class WeakService {
|
|
|
3
3
|
constructor();
|
|
4
4
|
private cache;
|
|
5
5
|
exists(source: object, key: string): boolean;
|
|
6
|
-
call<T>(source: object, key: string, func: () => T, reusable?: ((value: T) => boolean) | null, store?: ((value: T) => any) | null): T;
|
|
6
|
+
call<T>(source: object, key: string, func: () => T, reusable?: ((value: T) => boolean) | null, store?: ((value: T) => any) | null, cacheable?: ((value: T) => boolean) | null): T;
|
|
7
7
|
invalidate(source: object, key: string): void;
|
|
8
8
|
invalidateAll(source: object): void;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<WeakService, never>;
|
package/lib/utils/deepEqual.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
export declare function subscribeOnce<T>(source$: Observable<T>, next: (value: T) => void): void;
|
|
2
|
+
export declare function subscribeOnce<T>(source$: Observable<T>, next: (value: T) => void, error?: (err: any) => void, complete?: () => void): void;
|
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.46",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^18.2.0",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@types/mime-db": "1.43.5",
|
|
24
24
|
"@types/sanitize-html": "2.13.0",
|
|
25
25
|
"@types/vanillajs-datepicker": "^1.3.4",
|
|
26
|
-
"feelers": "^1.
|
|
27
|
-
"feelin": "
|
|
26
|
+
"feelers": "^1.5.1",
|
|
27
|
+
"feelin": "6.2.0",
|
|
28
28
|
"marked": "15.0.7",
|
|
29
29
|
"mime-db": "1.53.0",
|
|
30
30
|
"sanitize-html": "^2.13.0",
|