@wemake4u/form-player-se 1.0.23 → 1.0.25

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 (83) 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/dialog/dialog.component.mjs +15 -7
  7. package/esm2022/lib/directives/collapse.directive.mjs +20 -12
  8. package/esm2022/lib/directives/date.directive.mjs +2 -2
  9. package/esm2022/lib/directives/dialog.directive.mjs +2 -1
  10. package/esm2022/lib/directives/dropdown.directive.mjs +23 -5
  11. package/esm2022/lib/directives/formIndex.directive.mjs +25 -0
  12. package/esm2022/lib/directives/grid.directive.mjs +94 -17
  13. package/esm2022/lib/directives/readonly.directive.mjs +101 -0
  14. package/esm2022/lib/directives/updateblur.directive.mjs +10 -3
  15. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +64 -26
  16. package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +96 -95
  17. package/esm2022/lib/dynamic-host/dynamic-host.component.mjs +121 -0
  18. package/esm2022/lib/locale/locale-de.mjs +3 -2
  19. package/esm2022/lib/locale/locale-en.mjs +3 -2
  20. package/esm2022/lib/locale/locale-es.mjs +3 -2
  21. package/esm2022/lib/locale/locale-fr.mjs +3 -2
  22. package/esm2022/lib/locale/locale-it.mjs +3 -2
  23. package/esm2022/lib/locale/locale-pt.mjs +3 -2
  24. package/esm2022/lib/services/chart.service.mjs +62 -56
  25. package/esm2022/lib/services/dialog.service.mjs +1 -1
  26. package/esm2022/lib/services/feel.service.mjs +186 -19
  27. package/esm2022/lib/services/form.service.mjs +360 -0
  28. package/esm2022/lib/services/formatter.service.mjs +68 -54
  29. package/esm2022/lib/services/function.service.mjs +9 -5
  30. package/esm2022/lib/services/global.service.mjs +42 -0
  31. package/esm2022/lib/services/grid.service.mjs +189 -53
  32. package/esm2022/lib/services/metadata.service.mjs +1 -8
  33. package/esm2022/lib/services/programmability.service.mjs +338 -64
  34. package/esm2022/lib/services/weak.service.mjs +3 -5
  35. package/esm2022/lib/utils/feelable.mjs +28 -0
  36. package/esm2022/lib/utils/groupByRow.mjs +3 -1
  37. package/esm2022/public-api.mjs +2 -1
  38. package/fesm2022/wemake4u-form-player-se.mjs +1896 -577
  39. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  40. package/lib/components/actionsCellRenderer/actionsCellRenderer.component.d.ts +18 -0
  41. package/lib/components/deleteRowRenderer/deleteRowRenderer.component.d.ts +49 -0
  42. package/lib/components/hostCellRenderer/hostCellRenderer.component.d.ts +29 -0
  43. package/lib/components/objectURLRenderer/objectURLRenderer.component.d.ts +50 -0
  44. package/lib/{utils/setFilter.d.ts → components/setFilter/setFilter.component.d.ts} +1 -0
  45. package/lib/dialog/dialog.component.d.ts +11 -0
  46. package/lib/directives/collapse.directive.d.ts +7 -4
  47. package/lib/directives/dropdown.directive.d.ts +4 -0
  48. package/lib/directives/formIndex.directive.d.ts +10 -0
  49. package/lib/directives/grid.directive.d.ts +21 -4
  50. package/lib/directives/readonly.directive.d.ts +28 -0
  51. package/lib/dynamic-fields/dynamic-fields.component.d.ts +28 -4
  52. package/lib/dynamic-form/dynamic-form.component.d.ts +20 -10
  53. package/lib/dynamic-host/dynamic-host.component.d.ts +27 -0
  54. package/lib/locale/locale-de.d.ts +1 -0
  55. package/lib/locale/locale-en.d.ts +1 -0
  56. package/lib/locale/locale-es.d.ts +1 -0
  57. package/lib/locale/locale-fr.d.ts +1 -0
  58. package/lib/locale/locale-it.d.ts +1 -0
  59. package/lib/locale/locale-pt.d.ts +1 -0
  60. package/lib/locale/locale.d.ts +7 -0
  61. package/lib/services/chart.service.d.ts +5 -2
  62. package/lib/services/dialog.service.d.ts +0 -1
  63. package/lib/services/feel.service.d.ts +8 -0
  64. package/lib/services/form.service.d.ts +51 -0
  65. package/lib/services/formatter.service.d.ts +8 -6
  66. package/lib/services/function.service.d.ts +1 -1
  67. package/lib/services/global.service.d.ts +16 -0
  68. package/lib/services/grid.service.d.ts +16 -4
  69. package/lib/services/metadata.service.d.ts +0 -3
  70. package/lib/services/programmability.service.d.ts +33 -5
  71. package/lib/utils/feelable.d.ts +2 -0
  72. package/lib/utils/groupByRow.d.ts +2 -0
  73. package/package.json +2 -2
  74. package/public-api.d.ts +1 -0
  75. package/esm2022/lib/directives/disable.directive.mjs +0 -71
  76. package/esm2022/lib/directives/disableform.directive.mjs +0 -42
  77. package/esm2022/lib/utils/gridCells.mjs +0 -108
  78. package/esm2022/lib/utils/patchForm.mjs +0 -75
  79. package/esm2022/lib/utils/setFilter.mjs +0 -111
  80. package/lib/directives/disable.directive.d.ts +0 -20
  81. package/lib/directives/disableform.directive.d.ts +0 -17
  82. package/lib/utils/gridCells.d.ts +0 -110
  83. package/lib/utils/patchForm.d.ts +0 -9
@@ -35,4 +35,5 @@ export declare const Texts: {
35
35
  Information: string;
36
36
  OpenMenu: string;
37
37
  CloseMenu: string;
38
+ LoadingFailed: string;
38
39
  };
@@ -35,4 +35,5 @@ export declare const Texts: {
35
35
  Information: string;
36
36
  OpenMenu: string;
37
37
  CloseMenu: string;
38
+ LoadingFailed: string;
38
39
  };
@@ -35,4 +35,5 @@ export declare const Texts: {
35
35
  Information: string;
36
36
  OpenMenu: string;
37
37
  CloseMenu: string;
38
+ LoadingFailed: string;
38
39
  };
@@ -35,4 +35,5 @@ export declare const Texts: {
35
35
  Information: string;
36
36
  OpenMenu: string;
37
37
  CloseMenu: string;
38
+ LoadingFailed: string;
38
39
  };
@@ -37,6 +37,7 @@ export declare const Texts: {
37
37
  Information: string;
38
38
  OpenMenu: string;
39
39
  CloseMenu: string;
40
+ LoadingFailed: string;
40
41
  };
41
42
  en: {
42
43
  TypeToSearch: string;
@@ -75,6 +76,7 @@ export declare const Texts: {
75
76
  Information: string;
76
77
  OpenMenu: string;
77
78
  CloseMenu: string;
79
+ LoadingFailed: string;
78
80
  };
79
81
  de: {
80
82
  TypeToSearch: string;
@@ -113,6 +115,7 @@ export declare const Texts: {
113
115
  Information: string;
114
116
  OpenMenu: string;
115
117
  CloseMenu: string;
118
+ LoadingFailed: string;
116
119
  };
117
120
  fr: {
118
121
  TypeToSearch: string;
@@ -151,6 +154,7 @@ export declare const Texts: {
151
154
  Information: string;
152
155
  OpenMenu: string;
153
156
  CloseMenu: string;
157
+ LoadingFailed: string;
154
158
  };
155
159
  es: {
156
160
  TypeToSearch: string;
@@ -189,6 +193,7 @@ export declare const Texts: {
189
193
  Information: string;
190
194
  OpenMenu: string;
191
195
  CloseMenu: string;
196
+ LoadingFailed: string;
192
197
  };
193
198
  pt: {
194
199
  TypeToSearch: string;
@@ -227,6 +232,7 @@ export declare const Texts: {
227
232
  Information: string;
228
233
  OpenMenu: string;
229
234
  CloseMenu: string;
235
+ LoadingFailed: string;
230
236
  };
231
237
  };
232
238
  TypeToSearch: string;
@@ -265,4 +271,5 @@ export declare const Texts: {
265
271
  Information: string;
266
272
  OpenMenu: string;
267
273
  CloseMenu: string;
274
+ LoadingFailed: string;
268
275
  };
@@ -2,13 +2,16 @@ import { FormGroup } from '@angular/forms';
2
2
  import { ProgrammabilityService } from '../services/programmability.service';
3
3
  import { Observable } from 'rxjs';
4
4
  import { AgChartOptions } from 'ag-charts-community';
5
+ import { LanguageService } from '@wemake4u/interact';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class ChartService {
7
8
  private programmability;
8
- constructor(programmability: ProgrammabilityService);
9
- getOptions(component: any, formGroup: FormGroup, language: string): Observable<AgChartOptions>;
9
+ private languageService;
10
+ constructor(programmability: ProgrammabilityService, languageService: LanguageService);
11
+ getOptions(component: any, formGroup: FormGroup): Observable<AgChartOptions>;
10
12
  getDataExpression(component: any): string;
11
13
  private bindData;
14
+ private get language();
12
15
  private locale;
13
16
  private getTheme;
14
17
  private getSeries;
@@ -23,7 +23,6 @@ export interface DialogOptions {
23
23
  title?: string;
24
24
  isDrawer?: boolean;
25
25
  closeButton?: boolean;
26
- language?: string;
27
26
  buttons?: DialogButtons;
28
27
  onResult?: (result: DialogResult) => void;
29
28
  }
@@ -5,6 +5,14 @@ export declare class FeelService {
5
5
  evalExpression(expression: string, context?: Record<string, any>): any;
6
6
  evalUnaryTest(expression: string, context?: Record<string, any>, input?: any): boolean;
7
7
  getDependencies(expression: string, context?: Record<string, any>): (string | string[])[];
8
+ getTemplateDependencies(expression: string, context?: Record<string, any>): (string | string[])[];
9
+ private findAncestor;
10
+ private findDescendant;
11
+ private findChild;
12
+ private findChildren;
13
+ private getFunctionName;
14
+ private getStatusDependencies;
15
+ private splitQuoted;
8
16
  static ɵfac: i0.ɵɵFactoryDeclaration<FeelService, never>;
9
17
  static ɵprov: i0.ɵɵInjectableDeclaration<FeelService>;
10
18
  }
@@ -0,0 +1,51 @@
1
+ import { IEvaluatorProvider } from './programmability.service';
2
+ import { AbstractControl, FormControlStatus } 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
+ getControl(control: AbstractControl, path: Path, pathOptions?: PathOptions): AbstractControl | undefined;
24
+ prepend(control: AbstractControl, path: Path, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
25
+ append(control: AbstractControl, path: Path, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
26
+ insert(control: AbstractControl, path: Path, index: number, value: any, pathOptions?: PathOptions, patchOptions?: PatchOptions): boolean;
27
+ remove(control: AbstractControl, path: Path, index: number): boolean;
28
+ moveUp(control: AbstractControl, path: Path, index: number): boolean;
29
+ moveDown(control: AbstractControl, path: Path, index: number): boolean;
30
+ status(control: AbstractControl, path: Path, pathOptions?: PathOptions): FormControlStatus | undefined;
31
+ getInvalidControls(control: AbstractControl): {
32
+ path: string;
33
+ control: AbstractControl;
34
+ }[];
35
+ patch(control: AbstractControl, value: any, options?: PatchOptions): void;
36
+ getPath(control: AbstractControl): (string | number)[];
37
+ getContext(formGroup: any): Record<string, any>;
38
+ private applyPath;
39
+ private asObject;
40
+ private asArray;
41
+ private insertIntoArray;
42
+ private removeFromArray;
43
+ private createArrayItem;
44
+ private createControlFromValue;
45
+ private createControlFromArray;
46
+ private setUnknown;
47
+ private isUnknown;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
49
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormService>;
50
+ }
51
+ export {};
@@ -1,11 +1,13 @@
1
+ import { IEvaluatorProvider } from '../services/programmability.service';
1
2
  import * as i0 from "@angular/core";
2
- export declare class FormatterService {
3
+ export declare class FormatterService implements IEvaluatorProvider {
3
4
  constructor();
4
- formatCurrency(value: any, symbol?: string | null): string;
5
- formatDate(value: any): string;
6
- formatDateTime(value: any): string;
7
- formatInteger(value: any): string;
8
- formatExpression(value: any, expression: string): string;
5
+ formatDate(isoDate: string | null | undefined, options?: Intl.DateTimeFormatOptions, locale?: string): string;
6
+ formatTime(isoDate: string | null | undefined, options?: Intl.DateTimeFormatOptions, locale?: string): string;
7
+ formatDateTime(isoDate: string | null | undefined, options?: Intl.DateTimeFormatOptions, locale?: string): string;
8
+ formatCurrency(value: number, currency?: string, locale?: string): string;
9
+ formatNumber(value: number, decimals?: number, locale?: string): string;
10
+ getContext(): Record<string, any>;
9
11
  static ɵfac: i0.ɵɵFactoryDeclaration<FormatterService, never>;
10
12
  static ɵprov: i0.ɵɵInjectableDeclaration<FormatterService>;
11
13
  }
@@ -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,19 +1,31 @@
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';
5
+ import { LanguageService } from '@wemake4u/interact';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class GridService {
7
8
  private formatter;
9
+ private languageService;
8
10
  private programmability;
9
- constructor(formatter: FormatterService, programmability: ProgrammabilityService);
11
+ constructor(formatter: FormatterService, languageService: LanguageService, programmability: ProgrammabilityService);
10
12
  getModules(): Module[];
11
- getOptions(component: any, formGroup: FormGroup, language: string): GridOptions;
13
+ getOptions(component: any, formGroup: FormGroup): GridOptions;
14
+ getColumnDefs(component: any, columns: any, formGroup: FormGroup): ColDef[];
12
15
  onSelectionChanged(component: any, formGroup: FormGroup, event: any): any;
16
+ private get language();
13
17
  private locale;
14
- private getColumns;
18
+ private resizeGrid;
19
+ private hasActions;
20
+ private hasRowNumbers;
21
+ private createColumnDefs;
22
+ private addActionColumnDef;
23
+ private addRowNumbersColumnDef;
24
+ private groupColumns;
25
+ private groupsToColumnDefs;
15
26
  private setCellDataType;
16
27
  private setCellRenderer;
28
+ private setAutoHeight;
17
29
  private setResizable;
18
30
  private setSortable;
19
31
  private setFilter;
@@ -7,11 +7,8 @@ export declare class MetadataService {
7
7
  getTemplateByName(name: string): any;
8
8
  getForms(): any[];
9
9
  getFormByName(name: string): any;
10
- setLanguage(language: string): void;
11
- getLanguage(): string;
12
10
  private schema;
13
11
  private forms;
14
- private language;
15
12
  static ɵfac: i0.ɵɵFactoryDeclaration<MetadataService, never>;
16
13
  static ɵprov: i0.ɵɵInjectableDeclaration<MetadataService>;
17
14
  }
@@ -1,11 +1,14 @@
1
1
  import { OnDestroy } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
2
+ import { AbstractControl, FormGroup, ValidatorFn } from '@angular/forms';
3
3
  import { FeelService } from '../services/feel.service';
4
4
  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 { GlobalService } from '../services/global.service';
9
+ import { FormService } from './form.service';
8
10
  import { DialogService } from '../services/dialog.service';
11
+ import { FormatterService } from '../services/formatter.service';
9
12
  import { WeakService } from '../services/weak.service';
10
13
  import * as i0 from "@angular/core";
11
14
  export declare class ProgrammabilityService implements OnDestroy {
@@ -13,16 +16,18 @@ export declare class ProgrammabilityService implements OnDestroy {
13
16
  private weakService;
14
17
  private toastService;
15
18
  private dialogService;
19
+ private formatterService;
16
20
  private functionService;
21
+ private formService;
22
+ private globalService;
17
23
  private register;
18
24
  private scope;
19
- constructor(feelService: FeelService, weakService: WeakService, toastService: ToastService, dialogService: DialogService, functionService: FunctionService, register: RegisterService, scope: ScopeService);
25
+ constructor(feelService: FeelService, weakService: WeakService, toastService: ToastService, dialogService: DialogService, formatterService: FormatterService, functionService: FunctionService, formService: FormService, globalService: GlobalService, register: RegisterService, scope: ScopeService);
20
26
  private readonly predefinedFunctions;
21
27
  private destroy$;
22
28
  ngOnDestroy(): void;
23
29
  isExpression(text: string | null): boolean;
24
30
  getExpression(text: string | null): string;
25
- watchExpression(formGroup: FormGroup, value: string | null, callback: (value: any) => void): void;
26
31
  evaluateString(formGroup: FormGroup, value: string | null): string;
27
32
  evaluateBoolean(formGroup: FormGroup, value: boolean | string | null, options?: EvaluateOptions): boolean | null;
28
33
  evaluateNumber(formGroup: FormGroup, value: number | string | null): number | null;
@@ -30,24 +35,47 @@ export declare class ProgrammabilityService implements OnDestroy {
30
35
  evaluateTemplate(formGroup: FormGroup, value: string | null): any;
31
36
  evaluateUnary(formGroup: FormGroup, value: string | null, input: any): any;
32
37
  invalidate(value: string | null): void;
38
+ watch(formGroup: FormGroup, dependencies: (string | string[])[], callback: () => void): void;
39
+ getDependencies(expression: string): (string | string[])[];
40
+ disable(formGroup: FormGroup, control: AbstractControl, value: boolean | string | null): void;
41
+ validate(formGroup: FormGroup, key: string, required?: boolean, validations?: ValidationRule[]): [ValidatorFn[], (control: AbstractControl) => void];
33
42
  private cacheable;
43
+ private verbose;
44
+ private onErrorHandler;
45
+ private Init;
34
46
  private evalUnaryTest;
35
47
  private evalExpression;
36
48
  private evalTemplate;
49
+ private onError;
37
50
  private getPredefinedFunctions;
51
+ private getFormFunctions;
38
52
  private getParentContext;
53
+ private getRootContext;
39
54
  private getParent;
40
55
  private getContext;
41
56
  private watchingExpression;
57
+ private watchingTemplateExpression;
42
58
  private watchingDependencies;
43
- static ɵfac: i0.ɵɵFactoryDeclaration<ProgrammabilityService, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
59
+ private invalidateExpression;
60
+ private processDependencies;
61
+ private getPath;
62
+ private validateFn;
63
+ private invalidateFn;
64
+ private validateRule;
65
+ private watchForValidation;
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProgrammabilityService, [null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
44
67
  static ɵprov: i0.ɵɵInjectableDeclaration<ProgrammabilityService>;
45
68
  }
46
69
  export interface IEvaluatorProvider {
47
- getContext(): Record<string, any>;
70
+ getContext(scope?: any): Record<string, any>;
48
71
  }
49
72
  export interface EvaluateOptions {
50
73
  cacheable?: boolean;
51
74
  extendContext?: ExtendContextFn;
52
75
  }
53
76
  export type ExtendContextFn = () => Record<string, any>;
77
+ export interface ValidationRule {
78
+ expression: string;
79
+ type: "validate" | "invalidate";
80
+ message: string;
81
+ }
@@ -0,0 +1,2 @@
1
+ export declare function toExpression(value: any): string;
2
+ export declare function toFeelable(value: any): string;
@@ -4,7 +4,9 @@ interface Form {
4
4
  name: string;
5
5
  title: string;
6
6
  disabled: string | boolean | null;
7
+ inactive: string | boolean | null;
7
8
  path: string | null;
9
+ verticalAlignment: string | null;
8
10
  isTemplate: boolean | null;
9
11
  i18n: any;
10
12
  components: Component[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wemake4u/form-player-se",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^18.2.0",
6
6
  "@angular/common": "^18.2.0",
@@ -15,7 +15,7 @@
15
15
  "ag-charts-community": "^11.3.2",
16
16
  "ngx-sirio-lib": "^1.2.6-A16",
17
17
  "util": "^0.12.5",
18
- "@wemake4u/interact": "^1.0.0"
18
+ "@wemake4u/interact": "^1.0.3"
19
19
  },
20
20
  "dependencies": {
21
21
  "tslib": "^2.3.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,71 +0,0 @@
1
- import { Directive, Input } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/forms";
4
- export class DisableDirective {
5
- ngControl;
6
- el;
7
- renderer;
8
- disableControl = null;
9
- readonly = null;
10
- placeholder = null;
11
- componentRef;
12
- constructor(ngControl, el, renderer) {
13
- this.ngControl = ngControl;
14
- this.el = el;
15
- this.renderer = renderer;
16
- }
17
- disableClass = "fp-disabled";
18
- readonlyClass = "fp-readonly";
19
- ngOnChanges(changes) {
20
- if (changes["disableControl"] || changes["readonly"]) {
21
- if (this.ngControl.control) {
22
- if (this.disableControl) {
23
- this.ngControl.control.disable();
24
- this.toggleClass(true, this.disableClass);
25
- this.overridePlaceholder(false);
26
- }
27
- else {
28
- this.ngControl.control.enable();
29
- this.toggleClass(false, this.disableClass);
30
- const disabled = this.readonly === true;
31
- this.ngControl.valueAccessor?.setDisabledState(disabled);
32
- this.toggleClass(disabled, this.readonlyClass);
33
- this.overridePlaceholder(disabled);
34
- }
35
- }
36
- }
37
- }
38
- toggleClass(value, className) {
39
- if (value) {
40
- this.renderer.addClass(this.el.nativeElement, className);
41
- }
42
- else {
43
- this.renderer.removeClass(this.el.nativeElement, className);
44
- }
45
- }
46
- overridePlaceholder(value) {
47
- if ('placeholder' in this.componentRef) {
48
- this.componentRef.placeholder = value
49
- ? "-"
50
- : this.placeholder;
51
- }
52
- }
53
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DisableDirective, deps: [{ token: i1.NgControl }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
54
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DisableDirective, isStandalone: true, selector: "[disableControl], [readonly]", inputs: { disableControl: "disableControl", readonly: "readonly", placeholder: "placeholder", componentRef: "componentRef" }, usesOnChanges: true, ngImport: i0 });
55
- }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DisableDirective, decorators: [{
57
- type: Directive,
58
- args: [{
59
- selector: '[disableControl], [readonly]',
60
- standalone: true
61
- }]
62
- }], ctorParameters: () => [{ type: i1.NgControl }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { disableControl: [{
63
- type: Input
64
- }], readonly: [{
65
- type: Input
66
- }], placeholder: [{
67
- type: Input
68
- }], componentRef: [{
69
- type: Input
70
- }] } });
71
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzYWJsZS5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2lyaW8vc3JjL2xpYi9kaXJlY3RpdmVzL2Rpc2FibGUuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFtRCxNQUFNLGVBQWUsQ0FBQzs7O0FBT2xHLE1BQU0sT0FBTyxnQkFBZ0I7SUFNUDtJQUNSO0lBQ0E7SUFQSCxjQUFjLEdBQW1CLElBQUksQ0FBQztJQUN0QyxRQUFRLEdBQW1CLElBQUksQ0FBQztJQUNoQyxXQUFXLEdBQWtCLElBQUksQ0FBQztJQUNsQyxZQUFZLENBQU07SUFFM0IsWUFBb0IsU0FBb0IsRUFDNUIsRUFBYyxFQUNkLFFBQW1CO1FBRlgsY0FBUyx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lbmRlcmVyLnJlbW92ZUNsYXNzKHRoaXMuZWwubmF0aXZlRWxlbWVudCwgY2xhc3NOYW1lKTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIHByaXZhdGUgb3ZlcnJpZGVQbGFjZWhvbGRlcih2YWx1ZTogYm9vbGVhbikge1xyXG4gICAgaWYgKCdwbGFjZWhvbGRlcicgaW4gdGhpcy5jb21wb25lbnRSZWYpIHtcclxuICAgICAgdGhpcy5jb21wb25lbnRSZWYucGxhY2Vob2xkZXIgPSB2YWx1ZVxyXG4gICAgICAgID8gXCItXCJcclxuICAgICAgICA6IHRoaXMucGxhY2Vob2xkZXI7XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzYWJsZWZvcm0uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNpcmlvL3NyYy9saWIvZGlyZWN0aXZlcy9kaXNhYmxlZm9ybS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQTJELE1BQU0sZUFBZSxDQUFDO0FBQzFHLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7QUFNM0MsTUFBTSxPQUFPLG9CQUFvQjtJQVFyQjtJQUNBO0lBUlksTUFBTSxDQUkxQjtJQUVGLFlBQ1UsV0FBNkIsRUFDN0IsYUFBK0I7UUFEL0IsZ0JBQVcsR0FBWCxXQUFXLENBQWtCO1FBQzdCLGtCQUFhLEdBQWIsYUFBYSxDQUFrQjtJQUNyQyxDQUFDO0lBRUwsV0FBVyxDQUFDLE9BQXNCO1FBRWhDLElBQUksSUFBSSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxFQUFFLENBQUM7WUFDN0QsSUFBSSxTQUFTLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDL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