@wemake4u/form-player-se 1.0.20 → 1.0.22

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/esm2022/lib/directives/change.directive.mjs +27 -0
  2. package/esm2022/lib/directives/collapse.directive.mjs +7 -5
  3. package/esm2022/lib/directives/dropdown.directive.mjs +16 -2
  4. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +12 -4
  5. package/esm2022/lib/interact/confirmation.mjs +37 -0
  6. package/esm2022/lib/interact/notification.mjs +36 -0
  7. package/esm2022/lib/interact/prompt.mjs +34 -0
  8. package/esm2022/lib/services/chart.service.mjs +59 -19
  9. package/esm2022/lib/services/dialog.service.mjs +39 -1
  10. package/esm2022/lib/services/programmability.service.mjs +27 -7
  11. package/esm2022/lib/services/toast.service.mjs +12 -11
  12. package/esm2022/lib/services/weak.service.mjs +1 -2
  13. package/esm2022/lib/utils/observableAll.mjs +26 -0
  14. package/esm2022/public-api.mjs +4 -1
  15. package/fesm2022/wemake4u-form-player-se.mjs +309 -45
  16. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  17. package/lib/directives/change.directive.d.ts +9 -0
  18. package/lib/directives/dropdown.directive.d.ts +5 -2
  19. package/lib/dynamic-fields/dynamic-fields.component.d.ts +3 -1
  20. package/lib/interact/confirmation.d.ts +11 -0
  21. package/lib/interact/notification.d.ts +10 -0
  22. package/lib/interact/prompt.d.ts +11 -0
  23. package/lib/services/chart.service.d.ts +5 -2
  24. package/lib/services/dialog.service.d.ts +2 -0
  25. package/lib/services/programmability.service.d.ts +3 -2
  26. package/lib/services/toast.service.d.ts +4 -4
  27. package/lib/utils/observableAll.d.ts +2 -0
  28. package/package.json +3 -2
  29. package/public-api.d.ts +3 -0
@@ -0,0 +1,9 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ChangeDirective implements OnChanges {
4
+ observe: any;
5
+ callback?: () => void;
6
+ ngOnChanges(changes: SimpleChanges): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChangeDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ChangeDirective, "[observe]", never, { "observe": { "alias": "observe"; "required": false; }; "callback": { "alias": "callback"; "required": false; }; }, {}, never, never, true, never>;
9
+ }
@@ -1,14 +1,17 @@
1
- import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
1
+ import { AfterViewInit, OnDestroy, ElementRef, Renderer2 } from '@angular/core';
2
2
  import { SirioSelectComponent } from 'ngx-sirio-lib';
3
3
  import * as i0 from "@angular/core";
4
- export declare class DropdownDirective implements AfterViewInit {
4
+ export declare class DropdownDirective implements AfterViewInit, OnDestroy {
5
5
  private el;
6
6
  private renderer;
7
7
  private sirioSelect;
8
8
  constructor(el: ElementRef, renderer: Renderer2, sirioSelect: SirioSelectComponent);
9
+ private optionsSubscription?;
9
10
  ngAfterViewInit(): void;
11
+ ngOnDestroy(): void;
10
12
  private handleValue;
11
13
  private handleSearchable;
14
+ private handleOptionsChanges;
12
15
  private deactivate;
13
16
  private activate;
14
17
  private onKeyUp;
@@ -328,7 +328,9 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
328
328
  clickButton(component: any, event: any): void;
329
329
  getValues(component: any): Observable<any>;
330
330
  refreshValues(component: any): () => void;
331
- getChartOptions(component: any): AgChartOptions;
331
+ getChartOptions(component: any): Observable<AgChartOptions>;
332
+ invalidateChart(component: any): () => void;
333
+ getChartData(component: any): any;
332
334
  getGridOptions(component: any): GridOptions;
333
335
  getGridModules(component: any): Module[];
334
336
  onGridSelectionChanged(component: any, event: any): void;
@@ -0,0 +1,11 @@
1
+ import { ConfirmationController } from '@wemake4u/interact';
2
+ import { DialogService } from '../services/dialog.service';
3
+ import { Observable } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DefaultConfirmationController implements ConfirmationController {
6
+ private dialogService;
7
+ constructor(dialogService: DialogService);
8
+ confirm(message?: string, title?: string): Observable<boolean>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultConfirmationController, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<DefaultConfirmationController>;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { NotificationController, NotifyTypes } from '@wemake4u/interact';
2
+ import { ToastService } from '../services/toast.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DefaultNotificationController implements NotificationController {
5
+ private toast;
6
+ constructor(toast: ToastService);
7
+ notify(type: NotifyTypes, message: string, title?: string): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultNotificationController, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<DefaultNotificationController>;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { PromptController } from '@wemake4u/interact';
2
+ import { DialogService } from '../services/dialog.service';
3
+ import { Observable } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DefaultPromptController implements PromptController {
6
+ private dialogService;
7
+ constructor(dialogService: DialogService);
8
+ prompt(message?: string, defaultValue?: string, title?: string): Observable<string | null>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultPromptController, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<DefaultPromptController>;
11
+ }
@@ -1,12 +1,16 @@
1
1
  import { FormGroup } from '@angular/forms';
2
2
  import { ProgrammabilityService } from '../services/programmability.service';
3
+ import { Observable } from 'rxjs';
3
4
  import { AgChartOptions } from 'ag-charts-community';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class ChartService {
6
7
  private programmability;
7
8
  constructor(programmability: ProgrammabilityService);
8
- getOptions(component: any, formGroup: FormGroup, language: string): AgChartOptions;
9
+ getOptions(component: any, formGroup: FormGroup, language: string): Observable<AgChartOptions>;
10
+ getDataExpression(component: any): string;
11
+ private bindData;
9
12
  private locale;
13
+ private getTheme;
10
14
  private getSeries;
11
15
  private getSeriesOptionsNames;
12
16
  private getBaseSeriesOptions;
@@ -23,7 +27,6 @@ export declare class ChartService {
23
27
  private getDonutSeriesOptions;
24
28
  private getDonutSeriesOptionsNames;
25
29
  private getProps;
26
- private getDataProps;
27
30
  private isBoolean;
28
31
  private isString;
29
32
  private isNumber;
@@ -9,9 +9,11 @@ export declare class DialogService implements IEvaluatorProvider {
9
9
  alert(text: string, options?: DialogOptions): void;
10
10
  info(text: string, options?: DialogOptions): void;
11
11
  confirm(text: string, options?: DialogOptions): void;
12
+ prompt(text: string, defaultValue?: string, options?: DialogOptions): void;
12
13
  getContext(): Record<string, any>;
13
14
  private showDialog;
14
15
  private createTextSchema;
16
+ private createInputSchema;
15
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
16
18
  static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
17
19
  }
@@ -22,6 +22,7 @@ export declare class ProgrammabilityService implements OnDestroy {
22
22
  ngOnDestroy(): void;
23
23
  isExpression(text: string | null): boolean;
24
24
  getExpression(text: string | null): string;
25
+ watchExpression(formGroup: FormGroup, value: string | null, callback: (value: any) => void): void;
25
26
  evaluateString(formGroup: FormGroup, value: string | null): string;
26
27
  evaluateBoolean(formGroup: FormGroup, value: boolean | string | null, options?: EvaluateOptions): boolean | null;
27
28
  evaluateNumber(formGroup: FormGroup, value: number | string | null): number | null;
@@ -37,8 +38,8 @@ export declare class ProgrammabilityService implements OnDestroy {
37
38
  private getParentContext;
38
39
  private getParent;
39
40
  private getContext;
40
- private watchExpression;
41
- private watchDependencies;
41
+ private watchingExpression;
42
+ private watchingDependencies;
42
43
  static ɵfac: i0.ɵɵFactoryDeclaration<ProgrammabilityService, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
43
44
  static ɵprov: i0.ɵɵInjectableDeclaration<ProgrammabilityService>;
44
45
  }
@@ -4,10 +4,10 @@ import * as i0 from "@angular/core";
4
4
  export declare class ToastService implements IEvaluatorProvider {
5
5
  private sirioToast;
6
6
  constructor(sirioToast: SirioToastService);
7
- notifyInfo(message: string, delay?: number): void;
8
- notifySuccess(message: string, delay?: number): void;
9
- notifyWarning(message: string, delay?: number): void;
10
- notifyError(message: string, delay?: number): void;
7
+ notifyInfo(message: string, title?: string, delay?: number): void;
8
+ notifySuccess(message: string, title?: string, delay?: number): void;
9
+ notifyWarning(message: string, title?: string, delay?: number): void;
10
+ notifyError(message: string, title?: string, delay?: number): void;
11
11
  getContext(): Record<string, any>;
12
12
  private notify;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
@@ -0,0 +1,2 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare function observableAll<T extends object>(obj: T): Observable<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wemake4u/form-player-se",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^18.2.0",
6
6
  "@angular/common": "^18.2.0",
@@ -14,7 +14,8 @@
14
14
  "ag-charts-angular": "^11.3.2",
15
15
  "ag-charts-community": "^11.3.2",
16
16
  "ngx-sirio-lib": "^1.2.6-A16",
17
- "util": "^0.12.5"
17
+ "util": "^0.12.5",
18
+ "@wemake4u/interact": "^1.0.0"
18
19
  },
19
20
  "dependencies": {
20
21
  "tslib": "^2.3.0",
package/public-api.d.ts CHANGED
@@ -7,3 +7,6 @@ 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/interact/confirmation';
11
+ export * from './lib/interact/notification';
12
+ export * from './lib/interact/prompt';