@wemake4u/form-player-se 1.0.17 → 1.0.19

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 (77) hide show
  1. package/esm2022/lib/controls/checklist.mjs +4 -1
  2. package/esm2022/lib/controls/chipchecklist.mjs +4 -1
  3. package/esm2022/lib/controls/chipradio.mjs +4 -1
  4. package/esm2022/lib/controls/control.mjs +6 -27
  5. package/esm2022/lib/controls/radio.mjs +4 -1
  6. package/esm2022/lib/controls/select.mjs +4 -1
  7. package/esm2022/lib/controls/table.mjs +8 -5
  8. package/esm2022/lib/controls/taglist.mjs +4 -1
  9. package/esm2022/lib/controls/textfield.mjs +3 -3
  10. package/esm2022/lib/dialog/dialog.component.mjs +101 -0
  11. package/esm2022/lib/directives/accordion.directive.mjs +2 -13
  12. package/esm2022/lib/directives/dialog.directive.mjs +25 -0
  13. package/esm2022/lib/directives/dropdown.directive.mjs +7 -7
  14. package/esm2022/lib/directives/grid.directive.mjs +7 -7
  15. package/esm2022/lib/directives/refresh.directive.mjs +25 -0
  16. package/esm2022/lib/directives/register.directive.mjs +5 -8
  17. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +46 -19
  18. package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +106 -53
  19. package/esm2022/lib/locale/locale-de.mjs +11 -1
  20. package/esm2022/lib/locale/locale-en.mjs +11 -1
  21. package/esm2022/lib/locale/locale-es.mjs +11 -1
  22. package/esm2022/lib/locale/locale-fr.mjs +11 -1
  23. package/esm2022/lib/locale/locale-it.mjs +11 -1
  24. package/esm2022/lib/locale/locale-pt.mjs +11 -1
  25. package/esm2022/lib/services/dialog.service.mjs +103 -0
  26. package/esm2022/lib/services/function.service.mjs +47 -0
  27. package/esm2022/lib/services/grid.service.mjs +61 -5
  28. package/esm2022/lib/services/metadata.service.mjs +28 -1
  29. package/esm2022/lib/services/programmability.service.mjs +59 -40
  30. package/esm2022/lib/services/register.service.mjs +62 -30
  31. package/esm2022/lib/services/scope.service.mjs +12 -23
  32. package/esm2022/lib/services/toast.service.mjs +10 -1
  33. package/esm2022/lib/services/weak.service.mjs +1 -11
  34. package/esm2022/lib/utils/functions.mjs +31 -0
  35. package/esm2022/lib/utils/gridCells.mjs +14 -10
  36. package/esm2022/lib/utils/patchForm.mjs +32 -13
  37. package/esm2022/public-api.mjs +2 -1
  38. package/fesm2022/wemake4u-form-player-se.mjs +1257 -809
  39. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  40. package/lib/controls/checklist.d.ts +1 -0
  41. package/lib/controls/chipchecklist.d.ts +1 -0
  42. package/lib/controls/chipradio.d.ts +1 -0
  43. package/lib/controls/control.d.ts +1 -4
  44. package/lib/controls/radio.d.ts +1 -0
  45. package/lib/controls/select.d.ts +1 -0
  46. package/lib/controls/table.d.ts +3 -2
  47. package/lib/controls/taglist.d.ts +1 -0
  48. package/lib/controls/textfield.d.ts +1 -1
  49. package/lib/dialog/dialog.component.d.ts +293 -0
  50. package/lib/directives/dialog.directive.d.ts +8 -0
  51. package/lib/directives/refresh.directive.d.ts +10 -0
  52. package/lib/directives/register.directive.d.ts +1 -3
  53. package/lib/dynamic-fields/dynamic-fields.component.d.ts +79 -4
  54. package/lib/dynamic-form/dynamic-form.component.d.ts +87 -6
  55. package/lib/locale/locale-de.d.ts +10 -0
  56. package/lib/locale/locale-en.d.ts +10 -0
  57. package/lib/locale/locale-es.d.ts +10 -0
  58. package/lib/locale/locale-fr.d.ts +10 -0
  59. package/lib/locale/locale-it.d.ts +10 -0
  60. package/lib/locale/locale-pt.d.ts +10 -0
  61. package/lib/locale/locale.d.ts +70 -0
  62. package/lib/services/dialog.service.d.ts +41 -0
  63. package/lib/services/function.service.d.ts +16 -0
  64. package/lib/services/grid.service.d.ts +3 -0
  65. package/lib/services/metadata.service.d.ts +4 -0
  66. package/lib/services/programmability.service.d.ts +14 -6
  67. package/lib/services/register.service.d.ts +10 -9
  68. package/lib/services/scope.service.d.ts +7 -8
  69. package/lib/services/toast.service.d.ts +3 -1
  70. package/lib/utils/functions.d.ts +2 -0
  71. package/lib/utils/gridCells.d.ts +20 -0
  72. package/lib/utils/patchForm.d.ts +1 -0
  73. package/lib/utils/setFilter.d.ts +10 -0
  74. package/package.json +1 -1
  75. package/public-api.d.ts +1 -0
  76. package/esm2022/lib/services/proxy.service.mjs +0 -131
  77. package/lib/services/proxy.service.d.ts +0 -32
@@ -1,4 +1,5 @@
1
1
  import { Control } from "./control";
2
2
  export declare class CheckListControl extends Control {
3
+ readonly refresh: () => void;
3
4
  private getCheckboxGroup;
4
5
  }
@@ -1,4 +1,5 @@
1
1
  import { Control } from "./control";
2
2
  export declare class ChipCheckListControl extends Control {
3
+ readonly refresh: () => void;
3
4
  private getChipCheckBoxGroup;
4
5
  }
@@ -1,4 +1,5 @@
1
1
  import { Control } from "./control";
2
2
  export declare class ChipRadioControl extends Control {
3
+ readonly refresh: () => void;
3
4
  private getChipRadio;
4
5
  }
@@ -13,10 +13,7 @@ export declare class Control {
13
13
  export declare class ContainerControl extends Control {
14
14
  private register;
15
15
  constructor(name: string, metadata: any, componentRef: any, elementRef: ElementRef, register: RegisterService | undefined);
16
- getControls(): Control[];
17
- getControl(name: string): Control | undefined;
18
- findControl<T extends Control>(name: string, type: new (...args: any[]) => T): T | null;
19
- findControl(name: string): Control | null;
16
+ findControl(predicate: (control: Control) => boolean, firstOnly: boolean): Control[];
20
17
  }
21
18
  export declare class ItemControl extends ContainerControl {
22
19
  readonly index: number;
@@ -1,4 +1,5 @@
1
1
  import { Control } from "./control";
2
2
  export declare class RadioControl extends Control {
3
+ readonly refresh: () => void;
3
4
  private getRadio;
4
5
  }
@@ -1,4 +1,5 @@
1
1
  import { Control } from "./control";
2
2
  export declare class SelectControl extends Control {
3
+ readonly refresh: () => void;
3
4
  private getSelect;
4
5
  }
@@ -1,6 +1,7 @@
1
1
  import { Control } from "./control";
2
2
  export declare class TableControl extends Control {
3
- setFilter(filter: any): void;
4
- clearFilter(): void;
3
+ readonly setFilter: (filter: any) => void;
4
+ readonly clearFilter: () => void;
5
+ readonly refresh: () => void;
5
6
  private getGrid;
6
7
  }
@@ -1,4 +1,5 @@
1
1
  import { Control } from "./control";
2
2
  export declare class TagListControl extends Control {
3
+ readonly refresh: () => void;
3
4
  private getSelect;
4
5
  }
@@ -1,6 +1,6 @@
1
1
  import { Control } from "./control";
2
2
  export declare class TextFieldControl extends Control {
3
- setRandomColor(): void;
3
+ readonly setRandomColor: () => void;
4
4
  private getInput;
5
5
  private getRandomColor;
6
6
  }
@@ -0,0 +1,293 @@
1
+ import { FormDialogOptions, DialogAction } from '../services/dialog.service';
2
+ import { SirioDialogElement } from 'ngx-sirio-lib';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DialogComponent extends SirioDialogElement {
5
+ private formHost;
6
+ private formRef;
7
+ Texts: {
8
+ i18n: {
9
+ it: {
10
+ TypeToSearch: string;
11
+ Upload: string;
12
+ ScrollLeft: string;
13
+ ScrollRight: string;
14
+ AddItem: string;
15
+ RemoveItem: string;
16
+ PreviousSection: string;
17
+ NextSection: string;
18
+ Show: string;
19
+ Remove: string;
20
+ Close: string;
21
+ Confirm: string;
22
+ OK: string;
23
+ Cancel: string;
24
+ Abort: string;
25
+ Retry: string;
26
+ Ignore: string;
27
+ Yes: string;
28
+ No: string;
29
+ Try: string;
30
+ Continue: string;
31
+ Name: string;
32
+ Size: string;
33
+ Type: string;
34
+ Actions: string;
35
+ ReadMore: string;
36
+ ReadLess: string;
37
+ SelectAll: string;
38
+ ChooseOne: string;
39
+ True: string;
40
+ False: string;
41
+ Blank: string;
42
+ NotBlank: string;
43
+ Information: string;
44
+ OpenMenu: string;
45
+ CloseMenu: string;
46
+ };
47
+ en: {
48
+ TypeToSearch: string;
49
+ Upload: string;
50
+ ScrollLeft: string;
51
+ ScrollRight: string;
52
+ AddItem: string;
53
+ RemoveItem: string;
54
+ PreviousSection: string;
55
+ NextSection: string;
56
+ Show: string;
57
+ Remove: string;
58
+ Close: string;
59
+ Confirm: string;
60
+ OK: string;
61
+ Cancel: string;
62
+ Abort: string;
63
+ Retry: string;
64
+ Ignore: string;
65
+ Yes: string;
66
+ No: string;
67
+ Try: string;
68
+ Continue: string;
69
+ Name: string;
70
+ Size: string;
71
+ Type: string;
72
+ Actions: string;
73
+ ReadMore: string;
74
+ ReadLess: string;
75
+ SelectAll: string;
76
+ ChooseOne: string;
77
+ True: string;
78
+ False: string;
79
+ Blank: string;
80
+ NotBlank: string;
81
+ Information: string;
82
+ OpenMenu: string;
83
+ CloseMenu: string;
84
+ };
85
+ de: {
86
+ TypeToSearch: string;
87
+ Upload: string;
88
+ ScrollLeft: string;
89
+ ScrollRight: string;
90
+ AddItem: string;
91
+ RemoveItem: string;
92
+ PreviousSection: string;
93
+ NextSection: string;
94
+ Show: string;
95
+ Remove: string;
96
+ Close: string;
97
+ Confirm: string;
98
+ OK: string;
99
+ Cancel: string;
100
+ Abort: string;
101
+ Retry: string;
102
+ Ignore: string;
103
+ Yes: string;
104
+ No: string;
105
+ Try: string;
106
+ Continue: string;
107
+ Name: string;
108
+ Size: string;
109
+ Type: string;
110
+ Actions: string;
111
+ ReadMore: string;
112
+ ReadLess: string;
113
+ SelectAll: string;
114
+ ChooseOne: string;
115
+ True: string;
116
+ False: string;
117
+ Blank: string;
118
+ NotBlank: string;
119
+ Information: string;
120
+ OpenMenu: string;
121
+ CloseMenu: string;
122
+ };
123
+ fr: {
124
+ TypeToSearch: string;
125
+ Upload: string;
126
+ ScrollLeft: string;
127
+ ScrollRight: string;
128
+ AddItem: string;
129
+ RemoveItem: string;
130
+ PreviousSection: string;
131
+ NextSection: string;
132
+ Show: string;
133
+ Remove: string;
134
+ Close: string;
135
+ Confirm: string;
136
+ OK: string;
137
+ Cancel: string;
138
+ Abort: string;
139
+ Retry: string;
140
+ Ignore: string;
141
+ Yes: string;
142
+ No: string;
143
+ Try: string;
144
+ Continue: string;
145
+ Name: string;
146
+ Size: string;
147
+ Type: string;
148
+ Actions: string;
149
+ ReadMore: string;
150
+ ReadLess: string;
151
+ SelectAll: string;
152
+ ChooseOne: string;
153
+ True: string;
154
+ False: string;
155
+ Blank: string;
156
+ NotBlank: string;
157
+ Information: string;
158
+ OpenMenu: string;
159
+ CloseMenu: string;
160
+ };
161
+ es: {
162
+ TypeToSearch: string;
163
+ Upload: string;
164
+ ScrollLeft: string;
165
+ ScrollRight: string;
166
+ AddItem: string;
167
+ RemoveItem: string;
168
+ PreviousSection: string;
169
+ NextSection: string;
170
+ Show: string;
171
+ Remove: string;
172
+ Close: string;
173
+ Confirm: string;
174
+ OK: string;
175
+ Cancel: string;
176
+ Abort: string;
177
+ Retry: string;
178
+ Ignore: string;
179
+ Yes: string;
180
+ No: string;
181
+ Try: string;
182
+ Continue: string;
183
+ Name: string;
184
+ Size: string;
185
+ Type: string;
186
+ Actions: string;
187
+ ReadMore: string;
188
+ ReadLess: string;
189
+ SelectAll: string;
190
+ ChooseOne: string;
191
+ True: string;
192
+ False: string;
193
+ Blank: string;
194
+ NotBlank: string;
195
+ Information: string;
196
+ OpenMenu: string;
197
+ CloseMenu: string;
198
+ };
199
+ pt: {
200
+ TypeToSearch: string;
201
+ Upload: string;
202
+ ScrollLeft: string;
203
+ ScrollRight: string;
204
+ AddItem: string;
205
+ RemoveItem: string;
206
+ PreviousSection: string;
207
+ NextSection: string;
208
+ Show: string;
209
+ Remove: string;
210
+ Close: string;
211
+ Confirm: string;
212
+ OK: string;
213
+ Cancel: string;
214
+ Abort: string;
215
+ Retry: string;
216
+ Ignore: string;
217
+ Yes: string;
218
+ No: string;
219
+ Try: string;
220
+ Continue: string;
221
+ Name: string;
222
+ Size: string;
223
+ Type: string;
224
+ Actions: string;
225
+ ReadMore: string;
226
+ ReadLess: string;
227
+ SelectAll: string;
228
+ ChooseOne: string;
229
+ True: string;
230
+ False: string;
231
+ Blank: string;
232
+ NotBlank: string;
233
+ Information: string;
234
+ OpenMenu: string;
235
+ CloseMenu: string;
236
+ };
237
+ };
238
+ TypeToSearch: string;
239
+ Upload: string;
240
+ ScrollLeft: string;
241
+ ScrollRight: string;
242
+ AddItem: string;
243
+ RemoveItem: string;
244
+ PreviousSection: string;
245
+ NextSection: string;
246
+ Show: string;
247
+ Remove: string;
248
+ Close: string;
249
+ Confirm: string;
250
+ OK: string;
251
+ Cancel: string;
252
+ Abort: string;
253
+ Retry: string;
254
+ Ignore: string;
255
+ Yes: string;
256
+ No: string;
257
+ Try: string;
258
+ Continue: string;
259
+ Name: string;
260
+ Size: string;
261
+ Type: string;
262
+ Actions: string;
263
+ ReadMore: string;
264
+ ReadLess: string;
265
+ SelectAll: string;
266
+ ChooseOne: string;
267
+ True: string;
268
+ False: string;
269
+ Blank: string;
270
+ NotBlank: string;
271
+ Information: string;
272
+ OpenMenu: string;
273
+ CloseMenu: string;
274
+ };
275
+ ngOnInit(): void;
276
+ options: FormDialogOptions;
277
+ ngAfterViewInit(): void;
278
+ ngOnDestroy(): void;
279
+ doClose(): void;
280
+ doAction(action: DialogAction): void;
281
+ showHeader(): boolean;
282
+ showTitle(): boolean;
283
+ showCloseButton(): boolean;
284
+ showFooter(): boolean;
285
+ isInvalid(): boolean;
286
+ locale(component: any, key: string): string;
287
+ private destroy$;
288
+ private currentValue;
289
+ private setCurrentValue;
290
+ private SendResult;
291
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
292
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "dynamic-dialog", never, {}, {}, never, never, true, never>;
293
+ }
@@ -0,0 +1,8 @@
1
+ import { SirioDialogComponent } from 'ngx-sirio-lib';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DialogDirective {
4
+ private host;
5
+ constructor(host: SirioDialogComponent);
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DialogDirective, "[dialog]", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,10 @@
1
+ import { AfterContentInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RefreshDirective implements AfterContentInit {
4
+ refresh: (() => void) | null;
5
+ componentRef: any;
6
+ constructor();
7
+ ngAfterContentInit(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<RefreshDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RefreshDirective, "[refresh]", never, { "refresh": { "alias": "refresh"; "required": false; }; "componentRef": { "alias": "componentRef"; "required": false; }; }, {}, never, never, true, never>;
10
+ }
@@ -1,17 +1,15 @@
1
1
  import { ElementRef, AfterContentInit, OnDestroy, QueryList } from '@angular/core';
2
2
  import { RegisterService } from '../services/register.service';
3
- import { ProxyService } from '../services/proxy.service';
4
3
  import { IDynamicFieldsComponent } from '../dynamic-fields/dynamic-fields.interface';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class RegisterDirective implements AfterContentInit, OnDestroy {
7
6
  private el;
8
7
  private registerService;
9
- private proxyService;
10
8
  register: any;
11
9
  componentRef: any;
12
10
  dynamicField?: IDynamicFieldsComponent;
13
11
  itemFields: QueryList<IDynamicFieldsComponent>;
14
- constructor(el: ElementRef, registerService: RegisterService, proxyService: ProxyService);
12
+ constructor(el: ElementRef, registerService: RegisterService);
15
13
  ngAfterContentInit(): void;
16
14
  ngOnDestroy(): void;
17
15
  private destroy$;
@@ -45,6 +45,16 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
45
45
  Show: string;
46
46
  Remove: string;
47
47
  Close: string;
48
+ Confirm: string;
49
+ OK: string;
50
+ Cancel: string;
51
+ Abort: string;
52
+ Retry: string;
53
+ Ignore: string;
54
+ Yes: string;
55
+ No: string;
56
+ Try: string;
57
+ Continue: string;
48
58
  Name: string;
49
59
  Size: string;
50
60
  Type: string;
@@ -73,6 +83,16 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
73
83
  Show: string;
74
84
  Remove: string;
75
85
  Close: string;
86
+ Confirm: string;
87
+ OK: string;
88
+ Cancel: string;
89
+ Abort: string;
90
+ Retry: string;
91
+ Ignore: string;
92
+ Yes: string;
93
+ No: string;
94
+ Try: string;
95
+ Continue: string;
76
96
  Name: string;
77
97
  Size: string;
78
98
  Type: string;
@@ -101,6 +121,16 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
101
121
  Show: string;
102
122
  Remove: string;
103
123
  Close: string;
124
+ Confirm: string;
125
+ OK: string;
126
+ Cancel: string;
127
+ Abort: string;
128
+ Retry: string;
129
+ Ignore: string;
130
+ Yes: string;
131
+ No: string;
132
+ Try: string;
133
+ Continue: string;
104
134
  Name: string;
105
135
  Size: string;
106
136
  Type: string;
@@ -129,6 +159,16 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
129
159
  Show: string;
130
160
  Remove: string;
131
161
  Close: string;
162
+ Confirm: string;
163
+ OK: string;
164
+ Cancel: string;
165
+ Abort: string;
166
+ Retry: string;
167
+ Ignore: string;
168
+ Yes: string;
169
+ No: string;
170
+ Try: string;
171
+ Continue: string;
132
172
  Name: string;
133
173
  Size: string;
134
174
  Type: string;
@@ -157,6 +197,16 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
157
197
  Show: string;
158
198
  Remove: string;
159
199
  Close: string;
200
+ Confirm: string;
201
+ OK: string;
202
+ Cancel: string;
203
+ Abort: string;
204
+ Retry: string;
205
+ Ignore: string;
206
+ Yes: string;
207
+ No: string;
208
+ Try: string;
209
+ Continue: string;
160
210
  Name: string;
161
211
  Size: string;
162
212
  Type: string;
@@ -185,6 +235,16 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
185
235
  Show: string;
186
236
  Remove: string;
187
237
  Close: string;
238
+ Confirm: string;
239
+ OK: string;
240
+ Cancel: string;
241
+ Abort: string;
242
+ Retry: string;
243
+ Ignore: string;
244
+ Yes: string;
245
+ No: string;
246
+ Try: string;
247
+ Continue: string;
188
248
  Name: string;
189
249
  Size: string;
190
250
  Type: string;
@@ -213,6 +273,16 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
213
273
  Show: string;
214
274
  Remove: string;
215
275
  Close: string;
276
+ Confirm: string;
277
+ OK: string;
278
+ Cancel: string;
279
+ Abort: string;
280
+ Retry: string;
281
+ Ignore: string;
282
+ Yes: string;
283
+ No: string;
284
+ Try: string;
285
+ Continue: string;
216
286
  Name: string;
217
287
  Size: string;
218
288
  Type: string;
@@ -248,19 +318,24 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
248
318
  getTemplate(value: string): any;
249
319
  getFormGroup(control: AbstractControl | null): FormGroup;
250
320
  getFormArray(control: AbstractControl | null): FormArray;
251
- getControlFromPath(path: string | null): AbstractControl | null;
321
+ resolvePath(path: string | null): FormGroup;
252
322
  toHTML(text: string): SafeHtml;
253
323
  sanitize(html: string): SafeHtml;
254
324
  getMimeTypes(extensions: string): string;
255
325
  clickButton(component: any, event: any): void;
256
326
  getValues(component: any): Observable<any>;
327
+ refreshValues(component: any): () => void;
257
328
  getGridOptions(component: any): GridOptions;
258
329
  getGridModules(component: any): Module[];
259
- getGridData(component: any): Observable<any>;
260
- addItem(component: any): void;
261
- removeItem(component: any, index: number): void;
330
+ onGridSelectionChanged(component: any, event: any): void;
331
+ getRowSource(component: any): Observable<any>;
332
+ refreshRowSource(component: any): () => void;
333
+ addItem(formArray: FormArray): void;
334
+ removeItem(formArray: FormArray, index: number): void;
262
335
  createUploadTables(component: any): any;
263
336
  fileUploaded($event: NgxSirioEvent<SirioFileUploadComponent>): void;
337
+ private invalidate;
338
+ private getControlFromPath;
264
339
  private focusFirst;
265
340
  private getAsObservable;
266
341
  private configureDatepicker;