@wemake4u/form-player-se 1.0.35 → 1.0.37

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 (41) hide show
  1. package/README.md +17 -0
  2. package/THIRD_PARTY_LICENSES.txt +73 -0
  3. package/esm2022/lib/directives/date.directive.mjs +3 -3
  4. package/esm2022/lib/directives/datetime.directive.mjs +199 -0
  5. package/esm2022/lib/directives/tabcontrol.directive.mjs +2 -2
  6. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +26 -12
  7. package/esm2022/lib/dynamic-host/dynamic-host.component.mjs +14 -3
  8. package/esm2022/lib/locale/locale-de.mjs +3 -2
  9. package/esm2022/lib/locale/locale-en.mjs +3 -2
  10. package/esm2022/lib/locale/locale-es.mjs +3 -2
  11. package/esm2022/lib/locale/locale-fr.mjs +3 -2
  12. package/esm2022/lib/locale/locale-it.mjs +3 -2
  13. package/esm2022/lib/locale/locale-pt.mjs +3 -2
  14. package/esm2022/lib/services/autofocus.service.mjs +22 -0
  15. package/esm2022/lib/services/grid.service.mjs +2 -2
  16. package/esm2022/lib/services/validation.service.mjs +30 -3
  17. package/esm2022/lib/utils/date.mjs +59 -0
  18. package/esm2022/lib/utils/focusable.mjs +6 -5
  19. package/fesm2022/wemake4u-form-player-se.mjs +356 -31
  20. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  21. package/lib/components/deleteRowRenderer/deleteRowRenderer.component.d.ts +1 -0
  22. package/lib/components/objectURLRenderer/objectURLRenderer.component.d.ts +1 -0
  23. package/lib/components/setFilter/setFilter.component.d.ts +1 -0
  24. package/lib/dialog/dialog.component.d.ts +7 -0
  25. package/lib/directives/date.directive.d.ts +2 -0
  26. package/lib/directives/datetime.directive.d.ts +42 -0
  27. package/lib/dynamic-fields/dynamic-fields.component.d.ts +12 -1
  28. package/lib/dynamic-form/dynamic-form.component.d.ts +7 -0
  29. package/lib/dynamic-host/dynamic-host.component.d.ts +1 -0
  30. package/lib/locale/locale-de.d.ts +1 -0
  31. package/lib/locale/locale-en.d.ts +1 -0
  32. package/lib/locale/locale-es.d.ts +1 -0
  33. package/lib/locale/locale-fr.d.ts +1 -0
  34. package/lib/locale/locale-it.d.ts +1 -0
  35. package/lib/locale/locale-pt.d.ts +1 -0
  36. package/lib/locale/locale.d.ts +7 -0
  37. package/lib/services/autofocus.service.d.ts +8 -0
  38. package/lib/services/validation.service.d.ts +5 -0
  39. package/lib/utils/date.d.ts +6 -0
  40. package/lib/utils/focusable.d.ts +1 -1
  41. package/package.json +2 -1
@@ -44,6 +44,7 @@ export declare class DeleteRowRendererComponent implements ICellRendererAngularC
44
44
  MoveUp: string;
45
45
  MoveDown: string;
46
46
  NoData: string;
47
+ RequiredField: string;
47
48
  };
48
49
  agInit(params: any): void;
49
50
  onClick(event: Event): void;
@@ -45,6 +45,7 @@ export declare class ObjectURLRendererComponent implements ICellRendererAngularC
45
45
  MoveUp: string;
46
46
  MoveDown: string;
47
47
  NoData: string;
48
+ RequiredField: string;
48
49
  };
49
50
  agInit(params: ICellRendererParams): void;
50
51
  onClick(event: Event): void;
@@ -46,6 +46,7 @@ export declare class SetFilterComponent implements IFilterAngularComp {
46
46
  MoveUp: string;
47
47
  MoveDown: string;
48
48
  NoData: string;
49
+ RequiredField: string;
49
50
  };
50
51
  selectAll: boolean;
51
52
  searchText: string;
@@ -51,6 +51,7 @@ export declare class DialogComponent extends SirioDialogElement {
51
51
  MoveUp: string;
52
52
  MoveDown: string;
53
53
  NoData: string;
54
+ RequiredField: string;
54
55
  };
55
56
  en: {
56
57
  TypeToSearch: string;
@@ -94,6 +95,7 @@ export declare class DialogComponent extends SirioDialogElement {
94
95
  MoveUp: string;
95
96
  MoveDown: string;
96
97
  NoData: string;
98
+ RequiredField: string;
97
99
  };
98
100
  de: {
99
101
  TypeToSearch: string;
@@ -137,6 +139,7 @@ export declare class DialogComponent extends SirioDialogElement {
137
139
  MoveUp: string;
138
140
  MoveDown: string;
139
141
  NoData: string;
142
+ RequiredField: string;
140
143
  };
141
144
  fr: {
142
145
  TypeToSearch: string;
@@ -180,6 +183,7 @@ export declare class DialogComponent extends SirioDialogElement {
180
183
  MoveUp: string;
181
184
  MoveDown: string;
182
185
  NoData: string;
186
+ RequiredField: string;
183
187
  };
184
188
  es: {
185
189
  TypeToSearch: string;
@@ -223,6 +227,7 @@ export declare class DialogComponent extends SirioDialogElement {
223
227
  MoveUp: string;
224
228
  MoveDown: string;
225
229
  NoData: string;
230
+ RequiredField: string;
226
231
  };
227
232
  pt: {
228
233
  TypeToSearch: string;
@@ -266,6 +271,7 @@ export declare class DialogComponent extends SirioDialogElement {
266
271
  MoveUp: string;
267
272
  MoveDown: string;
268
273
  NoData: string;
274
+ RequiredField: string;
269
275
  };
270
276
  };
271
277
  TypeToSearch: string;
@@ -309,6 +315,7 @@ export declare class DialogComponent extends SirioDialogElement {
309
315
  MoveUp: string;
310
316
  MoveDown: string;
311
317
  NoData: string;
318
+ RequiredField: string;
312
319
  };
313
320
  constructor(languageService: LanguageService);
314
321
  ngOnInit(): void;
@@ -6,3 +6,5 @@ export declare class DateDirective {
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<DateDirective, [{ host: true; }]>;
7
7
  static ɵdir: i0.ɵɵDirectiveDeclaration<DateDirective, "[isoDate]", never, {}, {}, never, never, true, never>;
8
8
  }
9
+ export declare function dateToDisplay(value: string): string | null;
10
+ export declare function dateToStore(value: string): string | null;
@@ -0,0 +1,42 @@
1
+ import { AfterViewInit, OnDestroy, Renderer2 } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
+ import { SirioDatepickerComponent, SirioTimepickerComponent } from 'ngx-sirio-lib';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DateTimeCoordinatorDirective implements ControlValueAccessor, AfterViewInit, OnDestroy {
6
+ datePicker: SirioDatepickerComponent;
7
+ timePicker: SirioTimepickerComponent;
8
+ private onChange;
9
+ private onTouched;
10
+ private dateValue;
11
+ private timeValue;
12
+ private destroy$;
13
+ ngOnDestroy(): void;
14
+ ngAfterViewInit(): void;
15
+ writeValue(value: any): void;
16
+ setDisabledState(isDisabled: boolean): void;
17
+ registerOnChange(fn: any): void;
18
+ registerOnTouched(fn: any): void;
19
+ private recalculate;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeCoordinatorDirective, never>;
21
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeCoordinatorDirective, "[dateTimeCoordinator]", never, { "datePicker": { "alias": "datePicker"; "required": false; }; "timePicker": { "alias": "timePicker"; "required": false; }; }, {}, never, never, true, never>;
22
+ }
23
+ export declare class DateTimeValidationDirective implements AfterViewInit, OnDestroy {
24
+ private ngControl;
25
+ private renderer;
26
+ isWarning: boolean;
27
+ showWhenValid: boolean;
28
+ private sub?;
29
+ constructor(ngControl: NgControl, renderer: Renderer2);
30
+ ngOnDestroy(): void;
31
+ ngAfterViewInit(): void;
32
+ private getCoordinator;
33
+ private checkValidation;
34
+ private cleanupValidation;
35
+ private setValid;
36
+ private setInvalid;
37
+ private setWarning;
38
+ private setPending;
39
+ private applyClass;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeValidationDirective, never>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeValidationDirective, "[dateTimeValidator]", never, { "isWarning": { "alias": "isWarning"; "required": false; }; "showWhenValid": { "alias": "showWhenValid"; "required": false; }; }, {}, never, never, true, never>;
42
+ }
@@ -14,6 +14,7 @@ import { GlobalService } from '../services/global.service';
14
14
  import { FormService } from '../services/form.service';
15
15
  import { GridService } from '../services/grid.service';
16
16
  import { ChartService } from '../services/chart.service';
17
+ import { AutoFocusService } from '../services/autofocus.service';
17
18
  import { ButtonColors } from 'ngx-sirio-lib';
18
19
  import { Observable } from 'rxjs';
19
20
  import { SirioFileUploadComponent, NgxSirioEvent } from 'ngx-sirio-lib';
@@ -36,6 +37,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
36
37
  private grid;
37
38
  private chart;
38
39
  private dialog;
40
+ private autoFocus;
39
41
  private el;
40
42
  form: DynamicFormComponent;
41
43
  rows: Array<any> | undefined;
@@ -87,6 +89,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
87
89
  MoveUp: string;
88
90
  MoveDown: string;
89
91
  NoData: string;
92
+ RequiredField: string;
90
93
  };
91
94
  en: {
92
95
  TypeToSearch: string;
@@ -130,6 +133,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
130
133
  MoveUp: string;
131
134
  MoveDown: string;
132
135
  NoData: string;
136
+ RequiredField: string;
133
137
  };
134
138
  de: {
135
139
  TypeToSearch: string;
@@ -173,6 +177,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
173
177
  MoveUp: string;
174
178
  MoveDown: string;
175
179
  NoData: string;
180
+ RequiredField: string;
176
181
  };
177
182
  fr: {
178
183
  TypeToSearch: string;
@@ -216,6 +221,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
216
221
  MoveUp: string;
217
222
  MoveDown: string;
218
223
  NoData: string;
224
+ RequiredField: string;
219
225
  };
220
226
  es: {
221
227
  TypeToSearch: string;
@@ -259,6 +265,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
259
265
  MoveUp: string;
260
266
  MoveDown: string;
261
267
  NoData: string;
268
+ RequiredField: string;
262
269
  };
263
270
  pt: {
264
271
  TypeToSearch: string;
@@ -302,6 +309,7 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
302
309
  MoveUp: string;
303
310
  MoveDown: string;
304
311
  NoData: string;
312
+ RequiredField: string;
305
313
  };
306
314
  };
307
315
  TypeToSearch: string;
@@ -345,8 +353,9 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
345
353
  MoveUp: string;
346
354
  MoveDown: string;
347
355
  NoData: string;
356
+ RequiredField: string;
348
357
  };
349
- constructor(sanitizer: SanitizeService, markdown: MarkdownService, mime: MimeService, programmability: ProgrammabilityService, weak: WeakService, register: RegisterService, metadata: MetadataService, languageService: LanguageService, global: GlobalService, formService: FormService, grid: GridService, chart: ChartService, dialog: DialogService, el: ElementRef);
358
+ constructor(sanitizer: SanitizeService, markdown: MarkdownService, mime: MimeService, programmability: ProgrammabilityService, weak: WeakService, register: RegisterService, metadata: MetadataService, languageService: LanguageService, global: GlobalService, formService: FormService, grid: GridService, chart: ChartService, dialog: DialogService, autoFocus: AutoFocusService, el: ElementRef);
350
359
  ngOnInit(): void;
351
360
  ngAfterViewInit(): void;
352
361
  getRegister(): RegisterService;
@@ -418,6 +427,8 @@ export declare class DynamicFieldsComponent implements OnInit, AfterViewInit, ID
418
427
  private getControlFromPath;
419
428
  private getAsObservable;
420
429
  private configureDatepicker;
430
+ private markForAutoFocus;
431
+ private requireAutoFocus;
421
432
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldsComponent, never>;
422
433
  static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFieldsComponent, "app-dynamic-fields", never, { "form": { "alias": "form"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "recursionLevel": { "alias": "recursionLevel"; "required": false; }; }, {}, never, never, true, never>;
423
434
  }
@@ -87,6 +87,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
87
87
  MoveUp: string;
88
88
  MoveDown: string;
89
89
  NoData: string;
90
+ RequiredField: string;
90
91
  };
91
92
  en: {
92
93
  TypeToSearch: string;
@@ -130,6 +131,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
130
131
  MoveUp: string;
131
132
  MoveDown: string;
132
133
  NoData: string;
134
+ RequiredField: string;
133
135
  };
134
136
  de: {
135
137
  TypeToSearch: string;
@@ -173,6 +175,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
173
175
  MoveUp: string;
174
176
  MoveDown: string;
175
177
  NoData: string;
178
+ RequiredField: string;
176
179
  };
177
180
  fr: {
178
181
  TypeToSearch: string;
@@ -216,6 +219,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
216
219
  MoveUp: string;
217
220
  MoveDown: string;
218
221
  NoData: string;
222
+ RequiredField: string;
219
223
  };
220
224
  es: {
221
225
  TypeToSearch: string;
@@ -259,6 +263,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
259
263
  MoveUp: string;
260
264
  MoveDown: string;
261
265
  NoData: string;
266
+ RequiredField: string;
262
267
  };
263
268
  pt: {
264
269
  TypeToSearch: string;
@@ -302,6 +307,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
302
307
  MoveUp: string;
303
308
  MoveDown: string;
304
309
  NoData: string;
310
+ RequiredField: string;
305
311
  };
306
312
  };
307
313
  TypeToSearch: string;
@@ -345,6 +351,7 @@ export declare class DynamicFormComponent implements OnChanges, OnDestroy, IEval
345
351
  MoveUp: string;
346
352
  MoveDown: string;
347
353
  NoData: string;
354
+ RequiredField: string;
348
355
  };
349
356
  ngOnDestroy(): void;
350
357
  ngOnChanges(changes: SimpleChanges): void;
@@ -19,6 +19,7 @@ export declare class DynamicHostComponent implements AfterViewInit, OnChanges, O
19
19
  private isBindable;
20
20
  private setBinding;
21
21
  private setProperties;
22
+ private assignValue;
22
23
  private isControlValueAccessor;
23
24
  private resolveComponentType;
24
25
  private validProperties;
@@ -40,4 +40,5 @@ export declare const Texts: {
40
40
  MoveUp: string;
41
41
  MoveDown: string;
42
42
  NoData: string;
43
+ RequiredField: string;
43
44
  };
@@ -40,4 +40,5 @@ export declare const Texts: {
40
40
  MoveUp: string;
41
41
  MoveDown: string;
42
42
  NoData: string;
43
+ RequiredField: string;
43
44
  };
@@ -40,4 +40,5 @@ export declare const Texts: {
40
40
  MoveUp: string;
41
41
  MoveDown: string;
42
42
  NoData: string;
43
+ RequiredField: string;
43
44
  };
@@ -40,4 +40,5 @@ export declare const Texts: {
40
40
  MoveUp: string;
41
41
  MoveDown: string;
42
42
  NoData: string;
43
+ RequiredField: string;
43
44
  };
@@ -40,4 +40,5 @@ export declare const Texts: {
40
40
  MoveUp: string;
41
41
  MoveDown: string;
42
42
  NoData: string;
43
+ RequiredField: string;
43
44
  };
@@ -40,4 +40,5 @@ export declare const Texts: {
40
40
  MoveUp: string;
41
41
  MoveDown: string;
42
42
  NoData: string;
43
+ RequiredField: string;
43
44
  };
@@ -42,6 +42,7 @@ export declare const Texts: {
42
42
  MoveUp: string;
43
43
  MoveDown: string;
44
44
  NoData: string;
45
+ RequiredField: string;
45
46
  };
46
47
  en: {
47
48
  TypeToSearch: string;
@@ -85,6 +86,7 @@ export declare const Texts: {
85
86
  MoveUp: string;
86
87
  MoveDown: string;
87
88
  NoData: string;
89
+ RequiredField: string;
88
90
  };
89
91
  de: {
90
92
  TypeToSearch: string;
@@ -128,6 +130,7 @@ export declare const Texts: {
128
130
  MoveUp: string;
129
131
  MoveDown: string;
130
132
  NoData: string;
133
+ RequiredField: string;
131
134
  };
132
135
  fr: {
133
136
  TypeToSearch: string;
@@ -171,6 +174,7 @@ export declare const Texts: {
171
174
  MoveUp: string;
172
175
  MoveDown: string;
173
176
  NoData: string;
177
+ RequiredField: string;
174
178
  };
175
179
  es: {
176
180
  TypeToSearch: string;
@@ -214,6 +218,7 @@ export declare const Texts: {
214
218
  MoveUp: string;
215
219
  MoveDown: string;
216
220
  NoData: string;
221
+ RequiredField: string;
217
222
  };
218
223
  pt: {
219
224
  TypeToSearch: string;
@@ -257,6 +262,7 @@ export declare const Texts: {
257
262
  MoveUp: string;
258
263
  MoveDown: string;
259
264
  NoData: string;
265
+ RequiredField: string;
260
266
  };
261
267
  };
262
268
  TypeToSearch: string;
@@ -300,4 +306,5 @@ export declare const Texts: {
300
306
  MoveUp: string;
301
307
  MoveDown: string;
302
308
  NoData: string;
309
+ RequiredField: string;
303
310
  };
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AutoFocusService {
3
+ private map;
4
+ mark(target: object): void;
5
+ consume(target: object): boolean;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutoFocusService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<AutoFocusService>;
8
+ }
@@ -20,6 +20,11 @@ export declare class ValidationService {
20
20
  private readonly nullObserver;
21
21
  private get language();
22
22
  private locale;
23
+ private getRequiredValidator;
24
+ private requiredValidator;
25
+ private requiredTrueValidator;
26
+ private isTrueValidator;
27
+ private getRequiredMessage;
23
28
  static ɵfac: i0.ɵɵFactoryDeclaration<ValidationService, never>;
24
29
  static ɵprov: i0.ɵɵInjectableDeclaration<ValidationService>;
25
30
  }
@@ -0,0 +1,6 @@
1
+ export declare function toLocalString(d: Date): string | null;
2
+ export declare function toLocalDateString(d: Date): string | null;
3
+ export declare function toLocalTimeString(d: Date): string | null;
4
+ export declare function isValidDateObject(value: any): value is Date;
5
+ export declare function isValidTime(value: string): boolean;
6
+ export declare function isValidDate(value: string): boolean;
@@ -1,2 +1,2 @@
1
1
  export declare function getFocusables(el: HTMLElement, firstOnly?: boolean): HTMLElement[];
2
- export declare function setFocus(el: HTMLElement): boolean;
2
+ export declare function setFocus(el: HTMLElement, preventScroll?: boolean): HTMLElement | null;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@wemake4u/form-player-se",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
+ "license": "MIT",
4
5
  "peerDependencies": {
5
6
  "@angular/cdk": "^18.2.0",
6
7
  "@angular/common": "^18.2.0",