@wemake4u/form-player-se 1.0.37 → 1.0.39

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 (29) hide show
  1. package/LICENSE +21 -0
  2. package/esm2022/lib/controls/table.mjs +4 -1
  3. package/esm2022/lib/directives/alert.directive.mjs +44 -0
  4. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +5 -4
  5. package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +32 -7
  6. package/esm2022/lib/dynamic-host/dynamic-host.component.mjs +2 -1
  7. package/esm2022/lib/services/compute.service.mjs +6 -2
  8. package/esm2022/lib/services/disable.service.mjs +7 -5
  9. package/esm2022/lib/services/feel.service.mjs +24 -1
  10. package/esm2022/lib/services/grid.service.mjs +42 -15
  11. package/esm2022/lib/services/programmability.service.mjs +8 -1
  12. package/esm2022/lib/services/sanitize.service.mjs +2 -2
  13. package/esm2022/lib/services/scope.service.mjs +6 -1
  14. package/esm2022/lib/services/validation.service.mjs +9 -2
  15. package/esm2022/lib/utils/string.mjs +6 -0
  16. package/fesm2022/wemake4u-form-player-se.mjs +207 -57
  17. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  18. package/lib/controls/table.d.ts +1 -0
  19. package/lib/directives/alert.directive.d.ts +15 -0
  20. package/lib/dynamic-form/dynamic-form.component.d.ts +4 -0
  21. package/lib/services/compute.service.d.ts +1 -0
  22. package/lib/services/disable.service.d.ts +1 -1
  23. package/lib/services/feel.service.d.ts +2 -0
  24. package/lib/services/grid.service.d.ts +6 -2
  25. package/lib/services/programmability.service.d.ts +1 -0
  26. package/lib/services/scope.service.d.ts +1 -0
  27. package/lib/services/validation.service.d.ts +1 -0
  28. package/lib/utils/string.d.ts +1 -0
  29. package/package.json +1 -1
@@ -3,5 +3,6 @@ export declare class TableControl extends Control {
3
3
  readonly setFilter: (filter: any) => void;
4
4
  readonly clearFilter: () => void;
5
5
  readonly refresh: () => void;
6
+ readonly redraw: () => void;
6
7
  private getGrid;
7
8
  }
@@ -0,0 +1,15 @@
1
+ import { ElementRef, Renderer2, OnChanges, SimpleChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AlertDirective implements OnChanges {
4
+ private el;
5
+ private renderer;
6
+ preventClose: boolean | null;
7
+ private viewInitialized;
8
+ constructor(el: ElementRef, renderer: Renderer2);
9
+ ngAfterViewInit(): void;
10
+ ngOnChanges(changes: SimpleChanges): void;
11
+ private applyPreventClose;
12
+ private toggleClass;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertDirective, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDirective, "[preventClose]", never, { "preventClose": { "alias": "preventClose"; "required": false; }; }, {}, never, never, true, never>;
15
+ }
@@ -382,6 +382,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
382
382
  private get language();
383
383
  private onChangeSchema;
384
384
  private onChangeValue;
385
+ private assignActivaNav;
385
386
  private suspendValueChanges;
386
387
  private registerHandlers;
387
388
  private clearHandlers;
@@ -390,8 +391,11 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
390
391
  private emitValueChange;
391
392
  refresh(): void;
392
393
  private getNext;
394
+ private getNextFrom;
393
395
  private getPrevious;
396
+ private getPreviousFrom;
394
397
  private getMaxNav;
398
+ private isFormActivable;
395
399
  private isDisabled;
396
400
  private isInactive;
397
401
  private clearControls;
@@ -9,6 +9,7 @@ export declare class ComputeService {
9
9
  createCollection(): ComputeCollection;
10
10
  addToCollection(collection: ComputeCollection, control: AbstractControl, parentGroup: FormGroup, component: any): void;
11
11
  setupCollection(collection: ComputeCollection): void;
12
+ private canAddToCollection;
12
13
  private applyExpression;
13
14
  private getPath;
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ComputeService, never>;
@@ -10,7 +10,7 @@ export declare class DisableService {
10
10
  addToCollection(collection: DisableCollection, control: AbstractControl, parentGroup: FormGroup, component: any): void;
11
11
  setupCollection(collection: DisableCollection): void;
12
12
  private applyRule;
13
- private isAllowedValue;
13
+ private canAddToCollection;
14
14
  private getPath;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DisableService, never>;
16
16
  static ɵprov: i0.ɵɵInjectableDeclaration<DisableService>;
@@ -4,6 +4,8 @@ export declare class FeelService {
4
4
  evalTemplate(template: string, context?: any): string;
5
5
  evalExpression(expression: string, context?: Record<string, any>): any;
6
6
  evalUnaryTest(expression: string, context?: Record<string, any>, input?: any): boolean;
7
+ isValidExpression(expression: string): boolean;
8
+ isValidUnaryTest(expression: string): boolean;
7
9
  getDependencies(expression: string, context?: Record<string, any>): (string | string[])[];
8
10
  getTemplateDependencies(expression: string, context?: Record<string, any>): (string | string[])[];
9
11
  private findAncestor;
@@ -1,6 +1,7 @@
1
1
  import { Module, RowSelectionOptions, ColDef, GridOptions, GridApi } from 'ag-grid-community';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { FormatterService } from '../services/formatter.service';
4
+ import { MarkdownService } from '../services/markdown.service';
4
5
  import { ProgrammabilityService } from '../services/programmability.service';
5
6
  import { WeakService } from '../services/weak.service';
6
7
  import { LanguageService } from '@wemake4u/interact';
@@ -9,8 +10,9 @@ export declare class GridService {
9
10
  private formatter;
10
11
  private languageService;
11
12
  private programmability;
13
+ private markdownService;
12
14
  private weak;
13
- constructor(formatter: FormatterService, languageService: LanguageService, programmability: ProgrammabilityService, weak: WeakService);
15
+ constructor(formatter: FormatterService, languageService: LanguageService, programmability: ProgrammabilityService, markdownService: MarkdownService, weak: WeakService);
14
16
  getModules(): Module[];
15
17
  getOptions(component: any, formGroup: FormGroup): GridOptions;
16
18
  getColumnDefs(component: any, columns: any, formGroup: FormGroup): ColDef[];
@@ -31,7 +33,8 @@ export declare class GridService {
31
33
  private groupColumns;
32
34
  private groupsToColumnDefs;
33
35
  private setCellDataType;
34
- private setStyles;
36
+ private setRowStyle;
37
+ private setColStyles;
35
38
  private setCellRenderer;
36
39
  private setCellChangeFlash;
37
40
  private setAutoHeight;
@@ -52,6 +55,7 @@ export declare class GridService {
52
55
  getRowSelection(component: any, formGroup: FormGroup): RowSelectionOptions | undefined;
53
56
  private hasRowId;
54
57
  private getRowId;
58
+ private applyStyle;
55
59
  private onRowSelectable;
56
60
  private onRowSelected;
57
61
  private onRowSelecting;
@@ -52,6 +52,7 @@ export declare class ProgrammabilityService implements OnDestroy {
52
52
  private evalTemplate;
53
53
  private onError;
54
54
  private getPredefinedFunctions;
55
+ private getFeelFunctions;
55
56
  private getFormFunctions;
56
57
  private getParentContext;
57
58
  private getRootContext;
@@ -11,6 +11,7 @@ export declare class ScopeService implements IEvaluatorProvider {
11
11
  set(scope: Record<string, any> | null): void;
12
12
  get(): Record<string, any> | null;
13
13
  refresh(path?: Path): void;
14
+ refreshMany(...paths: Path[]): void;
14
15
  getContext(): Record<string, any>;
15
16
  static ɵfac: i0.ɵɵFactoryDeclaration<ScopeService, [{ optional: true; skipSelf: true; }]>;
16
17
  static ɵprov: i0.ɵɵInjectableDeclaration<ScopeService>;
@@ -10,6 +10,7 @@ export declare class ValidationService {
10
10
  createCollection(): ValidationCollection;
11
11
  addToCollection(collection: ValidationCollection, control: AbstractControl, formGroup: FormGroup, component: any): void;
12
12
  setupCollection(collection: ValidationCollection): void;
13
+ private canAddToCollection;
13
14
  private getRules;
14
15
  private validateRules;
15
16
  private createValidator;
@@ -0,0 +1 @@
1
+ export declare function isNullOrEmpty(value: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wemake4u/form-player-se",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "^18.2.0",