@wemake4u/form-player-se 1.0.22 → 1.0.24

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 (50) hide show
  1. package/esm2022/lib/components/actionsCellRenderer/actionsCellRenderer.component.mjs +69 -0
  2. package/esm2022/lib/components/deleteRowRenderer/deleteRowRenderer.component.mjs +25 -0
  3. package/esm2022/lib/components/hostCellRenderer/hostCellRenderer.component.mjs +101 -0
  4. package/esm2022/lib/components/objectURLRenderer/objectURLRenderer.component.mjs +27 -0
  5. package/esm2022/lib/components/setFilter/setFilter.component.mjs +111 -0
  6. package/esm2022/lib/directives/collapse.directive.mjs +2 -2
  7. package/esm2022/lib/directives/disable.directive.mjs +28 -9
  8. package/esm2022/lib/directives/disable.path.directive.mjs +40 -0
  9. package/esm2022/lib/directives/dropdown.directive.mjs +1 -1
  10. package/esm2022/lib/directives/grid.directive.mjs +39 -7
  11. package/esm2022/lib/directives/text.directive.mjs +4 -1
  12. package/esm2022/lib/directives/updateblur.directive.mjs +10 -3
  13. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +18 -6
  14. package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +27 -14
  15. package/esm2022/lib/dynamic-host/dynamic-host.component.mjs +121 -0
  16. package/esm2022/lib/services/form.service.mjs +296 -0
  17. package/esm2022/lib/services/function.service.mjs +8 -2
  18. package/esm2022/lib/services/global.service.mjs +42 -0
  19. package/esm2022/lib/services/grid.service.mjs +101 -47
  20. package/esm2022/lib/services/programmability.service.mjs +32 -10
  21. package/esm2022/lib/utils/feelable.mjs +28 -0
  22. package/esm2022/public-api.mjs +2 -1
  23. package/fesm2022/wemake4u-form-player-se.mjs +845 -179
  24. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  25. package/lib/components/actionsCellRenderer/actionsCellRenderer.component.d.ts +18 -0
  26. package/lib/components/deleteRowRenderer/deleteRowRenderer.component.d.ts +48 -0
  27. package/lib/components/hostCellRenderer/hostCellRenderer.component.d.ts +29 -0
  28. package/lib/components/objectURLRenderer/objectURLRenderer.component.d.ts +49 -0
  29. package/lib/directives/disable.directive.d.ts +7 -2
  30. package/lib/directives/disable.path.directive.d.ts +16 -0
  31. package/lib/directives/grid.directive.d.ts +13 -3
  32. package/lib/dynamic-fields/dynamic-fields.component.d.ts +1 -0
  33. package/lib/dynamic-form/dynamic-form.component.d.ts +4 -1
  34. package/lib/dynamic-host/dynamic-host.component.d.ts +27 -0
  35. package/lib/services/form.service.d.ts +42 -0
  36. package/lib/services/function.service.d.ts +1 -1
  37. package/lib/services/global.service.d.ts +16 -0
  38. package/lib/services/grid.service.d.ts +7 -2
  39. package/lib/services/programmability.service.d.ts +7 -3
  40. package/lib/utils/feelable.d.ts +2 -0
  41. package/package.json +1 -1
  42. package/public-api.d.ts +1 -0
  43. package/esm2022/lib/directives/disableform.directive.mjs +0 -42
  44. package/esm2022/lib/utils/gridCells.mjs +0 -108
  45. package/esm2022/lib/utils/patchForm.mjs +0 -75
  46. package/esm2022/lib/utils/setFilter.mjs +0 -111
  47. package/lib/directives/disableform.directive.d.ts +0 -17
  48. package/lib/utils/gridCells.d.ts +0 -110
  49. package/lib/utils/patchForm.d.ts +0 -9
  50. /package/lib/{utils/setFilter.d.ts → components/setFilter/setFilter.component.d.ts} +0 -0
@@ -0,0 +1,18 @@
1
+ import { ICellRendererAngularComp } from 'ag-grid-angular';
2
+ import { ProgrammabilityService } from '../../services/programmability.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ActionsCellRendererComponent implements ICellRendererAngularComp {
5
+ private programmability;
6
+ constructor(programmability: ProgrammabilityService);
7
+ params: any;
8
+ agInit(params: any): void;
9
+ refresh(): boolean;
10
+ evaluateBoolean(value: boolean | string | null): boolean | null;
11
+ evaluateString(value: string | null): string;
12
+ clickButton(action: any, event: any): any;
13
+ private getData;
14
+ private getRowIndex;
15
+ private getFormGroup;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActionsCellRendererComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<ActionsCellRendererComponent, "ng-component", never, {}, {}, never, never, true, never>;
18
+ }
@@ -0,0 +1,48 @@
1
+ import { ICellRendererAngularComp } from 'ag-grid-angular';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DeleteRowRendererComponent implements ICellRendererAngularComp {
4
+ params: any;
5
+ Texts: {
6
+ TypeToSearch: string;
7
+ Upload: string;
8
+ ScrollLeft: string;
9
+ ScrollRight: string;
10
+ AddItem: string;
11
+ RemoveItem: string;
12
+ PreviousSection: string;
13
+ NextSection: string;
14
+ Show: string;
15
+ Remove: string;
16
+ Close: string;
17
+ Confirm: string;
18
+ OK: string;
19
+ Cancel: string;
20
+ Abort: string;
21
+ Retry: string;
22
+ Ignore: string;
23
+ Yes: string;
24
+ No: string;
25
+ Try: string;
26
+ Continue: string;
27
+ Name: string;
28
+ Size: string;
29
+ Type: string;
30
+ Actions: string;
31
+ ReadMore: string;
32
+ ReadLess: string;
33
+ SelectAll: string;
34
+ ChooseOne: string;
35
+ True: string;
36
+ False: string;
37
+ Blank: string;
38
+ NotBlank: string;
39
+ Information: string;
40
+ OpenMenu: string;
41
+ CloseMenu: string;
42
+ };
43
+ agInit(params: any): void;
44
+ onClick(event: Event): void;
45
+ refresh(): boolean;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<DeleteRowRendererComponent, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<DeleteRowRendererComponent, "ng-component", never, {}, {}, never, never, true, never>;
48
+ }
@@ -0,0 +1,29 @@
1
+ import { ViewContainerRef, AfterViewInit, Injector } from '@angular/core';
2
+ import { ICellRendererAngularComp } from 'ag-grid-angular';
3
+ import { ProgrammabilityService } from '../../services/programmability.service';
4
+ import { GlobalService } from '../../services/global.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class HostCellRendererComponent implements ICellRendererAngularComp, AfterViewInit {
7
+ private injector;
8
+ private programmability;
9
+ private globalService;
10
+ container: ViewContainerRef;
11
+ constructor(injector: Injector, programmability: ProgrammabilityService, globalService: GlobalService);
12
+ params: any;
13
+ agInit(params: any): void;
14
+ refresh(): boolean;
15
+ ngAfterViewInit(): void;
16
+ private componentRef;
17
+ private resolveComponentType;
18
+ private resolveProperties;
19
+ private setProperties;
20
+ private evaluate;
21
+ private getComponentType;
22
+ private getProperties;
23
+ private getFormGroup;
24
+ private getData;
25
+ private getValue;
26
+ private getRowIndex;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<HostCellRendererComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<HostCellRendererComponent, "ng-component", never, {}, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,49 @@
1
+ import { ICellRendererAngularComp } from 'ag-grid-angular';
2
+ import { ICellRendererParams } from 'ag-grid-community';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ObjectURLRendererComponent implements ICellRendererAngularComp {
5
+ params: ICellRendererParams;
6
+ Texts: {
7
+ TypeToSearch: string;
8
+ Upload: string;
9
+ ScrollLeft: string;
10
+ ScrollRight: string;
11
+ AddItem: string;
12
+ RemoveItem: string;
13
+ PreviousSection: string;
14
+ NextSection: string;
15
+ Show: string;
16
+ Remove: string;
17
+ Close: string;
18
+ Confirm: string;
19
+ OK: string;
20
+ Cancel: string;
21
+ Abort: string;
22
+ Retry: string;
23
+ Ignore: string;
24
+ Yes: string;
25
+ No: string;
26
+ Try: string;
27
+ Continue: string;
28
+ Name: string;
29
+ Size: string;
30
+ Type: string;
31
+ Actions: string;
32
+ ReadMore: string;
33
+ ReadLess: string;
34
+ SelectAll: string;
35
+ ChooseOne: string;
36
+ True: string;
37
+ False: string;
38
+ Blank: string;
39
+ NotBlank: string;
40
+ Information: string;
41
+ OpenMenu: string;
42
+ CloseMenu: string;
43
+ };
44
+ agInit(params: ICellRendererParams): void;
45
+ onClick(event: Event): void;
46
+ refresh(): boolean;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectURLRendererComponent, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<ObjectURLRendererComponent, "ng-component", never, {}, {}, never, never, true, never>;
49
+ }
@@ -1,20 +1,25 @@
1
1
  import { OnChanges, SimpleChanges, ElementRef, Renderer2 } from '@angular/core';
2
2
  import { NgControl } from '@angular/forms';
3
+ import { GlobalService } from '../services/global.service';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class DisableDirective implements OnChanges {
5
6
  private ngControl;
7
+ private global;
6
8
  private el;
7
9
  private renderer;
8
10
  disableControl: boolean | null;
9
11
  readonly: boolean | null;
10
12
  placeholder: string | null;
11
13
  componentRef: any;
12
- constructor(ngControl: NgControl, el: ElementRef, renderer: Renderer2);
14
+ properties: any;
15
+ constructor(ngControl: NgControl, global: GlobalService, el: ElementRef, renderer: Renderer2);
13
16
  private disableClass;
14
17
  private readonlyClass;
18
+ private lightReadonlyClass;
15
19
  ngOnChanges(changes: SimpleChanges): void;
16
20
  private toggleClass;
17
21
  private overridePlaceholder;
22
+ private useLightReadonly;
18
23
  static ɵfac: i0.ɵɵFactoryDeclaration<DisableDirective, never>;
19
- static ɵdir: i0.ɵɵDirectiveDeclaration<DisableDirective, "[disableControl], [readonly]", never, { "disableControl": { "alias": "disableControl"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "componentRef": { "alias": "componentRef"; "required": false; }; }, {}, never, never, true, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DisableDirective, "[disableControl], [readonly]", never, { "disableControl": { "alias": "disableControl"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "componentRef": { "alias": "componentRef"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; }, {}, never, never, true, never>;
20
25
  }
@@ -0,0 +1,16 @@
1
+ import { ViewContainerRef, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DisablePathDirective implements OnChanges {
5
+ private viewContainer;
6
+ config: {
7
+ disabled: boolean | null;
8
+ formGroup: FormGroup;
9
+ path: string;
10
+ };
11
+ constructor(viewContainer: ViewContainerRef);
12
+ ngOnChanges(changes: SimpleChanges): void;
13
+ private hasValue;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DisablePathDirective, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DisablePathDirective, "[disablePath]", never, { "config": { "alias": "disablePath"; "required": false; }; }, {}, never, never, true, never>;
16
+ }
@@ -1,17 +1,27 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
2
3
  import { AgGridAngular } from 'ag-grid-angular';
4
+ import { GridService } from '../services/grid.service';
3
5
  import * as i0 from "@angular/core";
4
6
  export declare class GridDirective implements OnChanges {
5
7
  private grid;
8
+ private gridService;
6
9
  rowSource: any;
7
- constructor(grid: AgGridAngular);
10
+ columnDefs: any;
11
+ formGroup: FormGroup;
12
+ language: string;
13
+ component: any;
14
+ constructor(grid: AgGridAngular, gridService: GridService);
8
15
  ngOnChanges(changes: SimpleChanges): void;
16
+ private gridApi;
9
17
  private isGridReady;
10
18
  private onRowChanges;
11
19
  private setRowData;
12
20
  private setDataSource;
13
21
  private isArray;
14
22
  private isDataSource;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<GridDirective, [{ host: true; }]>;
16
- static ɵdir: i0.ɵɵDirectiveDeclaration<GridDirective, "[rowSource]", never, { "rowSource": { "alias": "rowSource"; "required": false; }; }, {}, never, never, true, never>;
23
+ private onGridReady;
24
+ private onColumnsChanges;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<GridDirective, [{ host: true; }, null]>;
26
+ static ɵdir: i0.ɵɵDirectiveDeclaration<GridDirective, "[rowSource], [columnDefs]", never, { "rowSource": { "alias": "rowSource"; "required": false; }; "columnDefs": { "alias": "columnDefs"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "language": { "alias": "language"; "required": false; }; "component": { "alias": "register"; "required": false; }; }, {}, never, never, true, never>;
17
27
  }
@@ -340,6 +340,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
340
340
  removeItem(formArray: FormArray, index: number): void;
341
341
  createUploadTables(component: any): any;
342
342
  fileUploaded($event: NgxSirioEvent<SirioFileUploadComponent>): void;
343
+ getFeelableProperties(component: any): Record<string, any> | null;
343
344
  private invalidate;
344
345
  private getControlFromPath;
345
346
  private focusFirst;
@@ -3,6 +3,7 @@ import { FormBuilder, FormGroup } from '@angular/forms';
3
3
  import { ProgrammabilityService } from '../services/programmability.service';
4
4
  import { CommandEvent, EventService } from '../services/event.service';
5
5
  import { MetadataService } from '../services/metadata.service';
6
+ import { FormService } from '../services/form.service';
6
7
  import { DialogService, FormDialogOptions } from '../services/dialog.service';
7
8
  import { SirioStepperProgressStatus } from 'ngx-sirio-lib';
8
9
  import { RegisterService } from '../services/register.service';
@@ -14,6 +15,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy {
14
15
  private events;
15
16
  private registerService;
16
17
  private metadata;
18
+ private formService;
17
19
  private dialog;
18
20
  private injector;
19
21
  schema: any;
@@ -30,7 +32,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy {
30
32
  onCommand: EventEmitter<CommandEvent>;
31
33
  activeNavChange: EventEmitter<any>;
32
34
  formDiv: ElementRef<HTMLDivElement>;
33
- constructor(fb: FormBuilder, programmability: ProgrammabilityService, events: EventService, registerService: RegisterService, metadata: MetadataService, dialog: DialogService, injector: Injector);
35
+ constructor(fb: FormBuilder, programmability: ProgrammabilityService, events: EventService, registerService: RegisterService, metadata: MetadataService, formService: FormService, dialog: DialogService, injector: Injector);
34
36
  Texts: {
35
37
  i18n: {
36
38
  it: {
@@ -347,6 +349,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy {
347
349
  private invalidateFn;
348
350
  private isFormComponent;
349
351
  private isContainerComponent;
352
+ private isComponentWithInput;
350
353
  private isArrayComponent;
351
354
  private getArrayItem;
352
355
  private getContainers;
@@ -0,0 +1,27 @@
1
+ import { AfterViewInit, ViewContainerRef, Injector, ComponentRef, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { GlobalService } from '../services/global.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DynamicHostComponent implements AfterViewInit, OnChanges, OnDestroy {
6
+ private injector;
7
+ private globalService;
8
+ component: any;
9
+ properties: Record<string, any> | null;
10
+ formGroup: FormGroup;
11
+ container: ViewContainerRef;
12
+ constructor(injector: Injector, globalService: GlobalService);
13
+ ngOnDestroy(): void;
14
+ ngOnChanges(changes: SimpleChanges): void;
15
+ ngAfterViewInit(): void;
16
+ getComponentRef(): ComponentRef<any> | null;
17
+ private componentRef;
18
+ private statusSub;
19
+ private isBindable;
20
+ private setBinding;
21
+ private setProperties;
22
+ private isControlValueAccessor;
23
+ private resolveComponentType;
24
+ private validProperties;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicHostComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicHostComponent, "app-dynamic-host", never, { "component": { "alias": "register"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; }, {}, never, never, true, never>;
27
+ }
@@ -0,0 +1,42 @@
1
+ import { IEvaluatorProvider } from './programmability.service';
2
+ import { AbstractControl } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export type Path = string | number | Array<string | number>;
5
+ type ControlType = 'array' | 'group' | 'control';
6
+ export interface PatchOptions {
7
+ emitEvent?: boolean;
8
+ emitError?: boolean;
9
+ emitWarn?: boolean;
10
+ validateType?: boolean;
11
+ fallbackValue?: any;
12
+ strict: boolean;
13
+ }
14
+ export interface PathOptions {
15
+ emitError?: boolean;
16
+ emitWarn?: boolean;
17
+ create?: boolean;
18
+ expected?: ControlType;
19
+ }
20
+ export declare class FormService implements IEvaluatorProvider {
21
+ set(control: AbstractControl, path: Path, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
22
+ get(control: AbstractControl, path: Path, pathOptions?: PathOptions): any;
23
+ prepend(control: AbstractControl, path: Path, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
24
+ append(control: AbstractControl, path: Path, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
25
+ insert(control: AbstractControl, path: Path, index: number, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
26
+ remove(control: AbstractControl, path: Path, index: number): boolean;
27
+ moveUp(control: AbstractControl, path: Path, index: number): boolean;
28
+ moveDown(control: AbstractControl, path: Path, index: number): boolean;
29
+ patch(control: AbstractControl, value: any, options?: PatchOptions): void;
30
+ getContext(formGroup: any): Record<string, any>;
31
+ private applyPath;
32
+ private insertIntoArray;
33
+ private removeFromArray;
34
+ private createArrayItem;
35
+ private createControlFromValue;
36
+ private createControlFromArray;
37
+ private setUnknown;
38
+ private isUnknown;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormService>;
41
+ }
42
+ export {};
@@ -9,7 +9,7 @@ export declare class FunctionService implements IEvaluatorProvider {
9
9
  private injector;
10
10
  constructor(metadata: MetadataService, dialog: DialogService, injector: Injector);
11
11
  invokable(func: any): Function;
12
- openForm(template: string, options: DialogOptions): void;
12
+ openForm(template: string | object, options: DialogOptions): void;
13
13
  getContext(): Record<string, any>;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<FunctionService, never>;
15
15
  static ɵprov: i0.ɵɵInjectableDeclaration<FunctionService>;
@@ -0,0 +1,16 @@
1
+ import { Type } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class GlobalService {
4
+ constructor();
5
+ clearProperties(): void;
6
+ setProperties(properties: Record<string, any>): void;
7
+ getProperties(): Record<string, any>;
8
+ getProperty(name: string, defaultValue?: any): any;
9
+ registerComponent(typeName: string, componentType: Type<any>): void;
10
+ getComponents(): Record<string, Type<any>>;
11
+ getComponent(typeName: string): Type<any> | null;
12
+ private properties;
13
+ private components;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<GlobalService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<GlobalService>;
16
+ }
@@ -1,4 +1,4 @@
1
- import { Module, GridOptions } from 'ag-grid-community';
1
+ import { Module, ColDef, GridOptions } from 'ag-grid-community';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { FormatterService } from '../services/formatter.service';
4
4
  import { ProgrammabilityService } from '../services/programmability.service';
@@ -9,11 +9,13 @@ export declare class GridService {
9
9
  constructor(formatter: FormatterService, programmability: ProgrammabilityService);
10
10
  getModules(): Module[];
11
11
  getOptions(component: any, formGroup: FormGroup, language: string): GridOptions;
12
+ getColumnDefs(component: any, columns: any, formGroup: FormGroup, language: string): ColDef[];
12
13
  onSelectionChanged(component: any, formGroup: FormGroup, event: any): any;
13
14
  private locale;
14
- private getColumns;
15
+ private resizeGrid;
15
16
  private setCellDataType;
16
17
  private setCellRenderer;
18
+ private setAutoHeight;
17
19
  private setResizable;
18
20
  private setSortable;
19
21
  private setFilter;
@@ -30,6 +32,9 @@ export declare class GridService {
30
32
  private setValueFormatter;
31
33
  private getRowSelection;
32
34
  private onRowSelectable;
35
+ private onRowSelected;
36
+ private onRowSelecting;
37
+ private hasSelection;
33
38
  private getPaginable;
34
39
  private getPageSize;
35
40
  private getTexts;
@@ -5,6 +5,7 @@ import { ScopeService } from '../services/scope.service';
5
5
  import { RegisterService } from '../services/register.service';
6
6
  import { ToastService } from '../services/toast.service';
7
7
  import { FunctionService } from '../services/function.service';
8
+ import { FormService } from './form.service';
8
9
  import { DialogService } from '../services/dialog.service';
9
10
  import { WeakService } from '../services/weak.service';
10
11
  import * as i0 from "@angular/core";
@@ -14,9 +15,10 @@ export declare class ProgrammabilityService implements OnDestroy {
14
15
  private toastService;
15
16
  private dialogService;
16
17
  private functionService;
18
+ private formService;
17
19
  private register;
18
20
  private scope;
19
- constructor(feelService: FeelService, weakService: WeakService, toastService: ToastService, dialogService: DialogService, functionService: FunctionService, register: RegisterService, scope: ScopeService);
21
+ constructor(feelService: FeelService, weakService: WeakService, toastService: ToastService, dialogService: DialogService, functionService: FunctionService, formService: FormService, register: RegisterService, scope: ScopeService);
20
22
  private readonly predefinedFunctions;
21
23
  private destroy$;
22
24
  ngOnDestroy(): void;
@@ -35,16 +37,18 @@ export declare class ProgrammabilityService implements OnDestroy {
35
37
  private evalExpression;
36
38
  private evalTemplate;
37
39
  private getPredefinedFunctions;
40
+ private getFormFunctions;
38
41
  private getParentContext;
42
+ private getRootContext;
39
43
  private getParent;
40
44
  private getContext;
41
45
  private watchingExpression;
42
46
  private watchingDependencies;
43
- static ɵfac: i0.ɵɵFactoryDeclaration<ProgrammabilityService, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProgrammabilityService, [null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
44
48
  static ɵprov: i0.ɵɵInjectableDeclaration<ProgrammabilityService>;
45
49
  }
46
50
  export interface IEvaluatorProvider {
47
- getContext(): Record<string, any>;
51
+ getContext(scope?: any): Record<string, any>;
48
52
  }
49
53
  export interface EvaluateOptions {
50
54
  cacheable?: boolean;
@@ -0,0 +1,2 @@
1
+ export declare function toExpression(value: any): string;
2
+ export declare function toFeelable(value: any): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wemake4u/form-player-se",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^18.2.0",
6
6
  "@angular/common": "^18.2.0",
package/public-api.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './lib/services/markdown.service';
7
7
  export * from './lib/services/data.service';
8
8
  export * from './lib/services/scope.service';
9
9
  export * from './lib/services/dialog.service';
10
+ export * from './lib/services/global.service';
10
11
  export * from './lib/interact/confirmation';
11
12
  export * from './lib/interact/notification';
12
13
  export * from './lib/interact/prompt';
@@ -1,42 +0,0 @@
1
- import { Directive, Input } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
3
- import * as i0 from "@angular/core";
4
- export class DisableFormDirective {
5
- templateRef;
6
- viewContainer;
7
- config;
8
- constructor(templateRef, viewContainer) {
9
- this.templateRef = templateRef;
10
- this.viewContainer = viewContainer;
11
- }
12
- ngOnChanges(changes) {
13
- if (this.hasValue(this.config.path) && this.config.formGroup) {
14
- var formGroup = this.config.formGroup.get(this.config.path);
15
- if (formGroup instanceof FormGroup) {
16
- if (this.config.disabled) {
17
- formGroup.disable({ emitEvent: false });
18
- }
19
- else {
20
- formGroup.enable({ emitEvent: false });
21
- }
22
- }
23
- }
24
- this.viewContainer.clear();
25
- }
26
- hasValue(value) {
27
- return value != null && value.trim().length > 0;
28
- }
29
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DisableFormDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
30
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DisableFormDirective, isStandalone: true, selector: "[disableForm]", inputs: { config: ["disableForm", "config"] }, usesOnChanges: true, ngImport: i0 });
31
- }
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DisableFormDirective, decorators: [{
33
- type: Directive,
34
- args: [{
35
- selector: '[disableForm]',
36
- standalone: true
37
- }]
38
- }], ctorParameters: () => [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }], propDecorators: { config: [{
39
- type: Input,
40
- args: ['disableForm']
41
- }] } });
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzYWJsZWZvcm0uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI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O1xyXG4gIH07XHJcblxyXG4gIGNvbnN0cnVjdG9yKFxyXG4gICAgcHJpdmF0ZSB0ZW1wbGF0ZVJlZjogVGVtcGxhdGVSZWY8YW55PixcclxuICAgIHByaXZhdGUgdmlld0NvbnRhaW5lcjogVmlld0NvbnRhaW5lclJlZlxyXG4gICkgeyB9XHJcblxyXG4gIG5nT25DaGFuZ2VzKGNoYW5nZXM6IFNpbXBsZUNoYW5nZXMpOiB2b2lkIHtcclxuXHJcbiAgICBpZiAodGhpcy5oYXNWYWx1ZSh0aGlzLmNvbmZpZy5wYXRoKSAmJiB0aGlzLmNvbmZpZy5mb3JtR3JvdXApIHtcclxuICAgICAgdmFyIGZvcm1Hcm91cCA9IHRoaXMuY29uZmlnLmZvcm1Hcm91cC5nZXQodGhpcy5jb25maWcucGF0aCk7XHJcbiAgICAgIGlmIChmb3JtR3JvdXAgaW5zdGFuY2VvZiBGb3JtR3JvdXApIHtcclxuICAgICAgICBpZiAodGhpcy5jb25maWcuZGlzYWJsZWQpIHtcclxuICAgICAgICAgIGZvcm1Hcm91cC5kaXNhYmxlKHsgZW1pdEV2ZW50OiBmYWxzZSB9KTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgZm9ybUdyb3VwLmVuYWJsZSh7IGVtaXRFdmVudDogZmFsc2UgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICBcclxuICAgIHRoaXMudmlld0NvbnRhaW5lci5jbGVhcigpO1xyXG4gIH1cclxuXHJcbiAgcHJpdmF0ZSBoYXNWYWx1ZSh2YWx1ZTogc3RyaW5nIHwgbnVsbCk6IGJvb2xlYW4ge1xyXG4gICAgcmV0dXJuIHZhbHVlICE9IG51bGwgJiYgdmFsdWUudHJpbSgpLmxlbmd0aCA+IDA7XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -1,108 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { SirioButtonComponent } from 'ngx-sirio-lib';
4
- import { Texts } from '../locale/locale-it';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "../services/programmability.service";
7
- import * as i2 from "@angular/common";
8
- export class ObjectURLRendererComponent {
9
- params;
10
- Texts = Texts;
11
- agInit(params) {
12
- this.params = params;
13
- }
14
- onClick(event) {
15
- const fileURL = URL.createObjectURL(this.params.data);
16
- window.open(fileURL, '_blank');
17
- setTimeout(() => {
18
- URL.revokeObjectURL(fileURL);
19
- }, 1000);
20
- }
21
- refresh() {
22
- return false;
23
- }
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ObjectURLRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ObjectURLRendererComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<a [attr.aria-label]=\"Texts.Show\" title=\"{{ Texts.Show }}\" href=\"javascript:void(0)\" (click)=\"onClick($event)\">\r\n <span class=\"fas fa-paperclip\"></span>\r\n</a>\r\n" });
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ObjectURLRendererComponent, decorators: [{
28
- type: Component,
29
- args: [{ standalone: true, template: "<a [attr.aria-label]=\"Texts.Show\" title=\"{{ Texts.Show }}\" href=\"javascript:void(0)\" (click)=\"onClick($event)\">\r\n <span class=\"fas fa-paperclip\"></span>\r\n</a>\r\n" }]
30
- }] });
31
- export class DeleteRowCellRenderer {
32
- params;
33
- Texts = Texts;
34
- agInit(params) {
35
- this.params = params;
36
- }
37
- onClick(event) {
38
- if ('remove' in this.params.data && typeof this.params.data.remove === 'function') {
39
- this.params.data.remove();
40
- }
41
- }
42
- refresh() {
43
- return false;
44
- }
45
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DeleteRowCellRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DeleteRowCellRenderer, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<a [attr.aria-label]=\"Texts.Remove\" title=\"{{ Texts.Remove }}\" href=\"javascript:void(0)\" (click)=\"onClick($event)\">\r\n <span class=\"fas fa-trash\"></span>\r\n</a>\r\n" });
47
- }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DeleteRowCellRenderer, decorators: [{
49
- type: Component,
50
- args: [{ standalone: true, template: "<a [attr.aria-label]=\"Texts.Remove\" title=\"{{ Texts.Remove }}\" href=\"javascript:void(0)\" (click)=\"onClick($event)\">\r\n <span class=\"fas fa-trash\"></span>\r\n</a>\r\n" }]
51
- }] });
52
- export class ActionsCellRenderer {
53
- programmability;
54
- constructor(programmability) {
55
- this.programmability = programmability;
56
- }
57
- params;
58
- agInit(params) {
59
- this.params = params;
60
- }
61
- refresh() {
62
- return false;
63
- }
64
- evaluateBoolean(value) {
65
- const options = {
66
- extendContext: () => ({
67
- "event": {
68
- params: this.params,
69
- data: this.getData()
70
- }
71
- })
72
- };
73
- return this.programmability.evaluateBoolean(this.getFormGroup(), value, options);
74
- }
75
- evaluateString(value) {
76
- return this.programmability.evaluateString(this.getFormGroup(), value);
77
- }
78
- clickButton(action, event) {
79
- if (action.click) {
80
- const options = {
81
- cacheable: false,
82
- extendContext: () => ({
83
- "event": {
84
- params: this.params,
85
- action: action,
86
- data: this.getData()
87
- }
88
- })
89
- };
90
- return this.programmability.evaluate(this.getFormGroup(), action.click, options);
91
- }
92
- }
93
- getData() {
94
- return this.params.data;
95
- }
96
- getFormGroup() {
97
- return this.params.formGroup;
98
- }
99
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionsCellRenderer, deps: [{ token: i1.ProgrammabilityService }], target: i0.ɵɵFactoryTarget.Component });
100
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ActionsCellRenderer, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div class=\"btn-small-group\">\r\n <ng-container *ngFor=\"let action of params.component.actions\">\r\n <ngx-sirio-button class=\"btn-small\"\r\n [ariaLabel]=\"evaluateString(action.label)\"\r\n [title]=\"evaluateString(action.label)\"\r\n [color]=\"null\"\r\n [disabled]=\"evaluateBoolean(action.disabled)\"\r\n (clickEvent)=\"clickButton(action, $event)\"\r\n [icon]=\"evaluateString(action.icon)\">\r\n </ngx-sirio-button>\r\n </ng-container>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SirioButtonComponent, selector: "ngx-sirio-button", inputs: ["ariaExpanded", "ariaControls", "ariaActivedescendant", "ariaHaspopup", "ariaLabel", "ariaRequired", "ariaInvalid", "ariaDescribedby", "icon", "title", "role", "color", "isFloating", "isExtended", "isLight", "isSmall", "disabled", "isDropdown", "type", "dismissType", "isBtnBlock"], outputs: ["clickEvent", "focusEvent", "blurEvent"] }] });
101
- }
102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionsCellRenderer, decorators: [{
103
- type: Component,
104
- args: [{ standalone: true, imports: [
105
- CommonModule, SirioButtonComponent
106
- ], template: "<div class=\"btn-small-group\">\r\n <ng-container *ngFor=\"let action of params.component.actions\">\r\n <ngx-sirio-button class=\"btn-small\"\r\n [ariaLabel]=\"evaluateString(action.label)\"\r\n [title]=\"evaluateString(action.label)\"\r\n [color]=\"null\"\r\n [disabled]=\"evaluateBoolean(action.disabled)\"\r\n (clickEvent)=\"clickButton(action, $event)\"\r\n [icon]=\"evaluateString(action.icon)\">\r\n </ngx-sirio-button>\r\n </ng-container>\r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