@arsedizioni/ars-utils 18.1.53 → 18.1.55

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 (44) hide show
  1. package/core/directives/autoFocusDirective.d.ts +2 -3
  2. package/core/directives/validators.d.ts +0 -8
  3. package/core/pipes/format.pipe.d.ts +0 -1
  4. package/core/pipes/replace.pipe.d.ts +0 -2
  5. package/core/pipes/safe-html.pipe.d.ts +1 -2
  6. package/core/pipes/safe-url.pipe.d.ts +1 -2
  7. package/esm2022/core/directives/autoFocusDirective.mjs +7 -7
  8. package/esm2022/core/directives/validators.mjs +9 -16
  9. package/esm2022/core/pipes/format.pipe.mjs +2 -3
  10. package/esm2022/core/pipes/replace.pipe.mjs +7 -7
  11. package/esm2022/core/pipes/safe-html.pipe.mjs +7 -7
  12. package/esm2022/core/pipes/safe-url.pipe.mjs +7 -7
  13. package/esm2022/core/system.mjs +2 -2
  14. package/esm2022/ui/ui/dialogs/confirm/confirm-dialog.component.mjs +3 -3
  15. package/esm2022/ui.application/ui/dialogs/prompt/prompt-dialog.component.mjs +3 -3
  16. package/esm2022/ui.application/ui/dialogs/prompt-date/prompt-date-dialog.component.mjs +3 -3
  17. package/esm2022/ui.application/ui/dialogs/prompt-time/prompt-time-dialog.component.mjs +3 -3
  18. package/esm2022/ui.application/ui/dialogs/select/select-dialog.component.mjs +4 -4
  19. package/esm2022/ui.application/ui/dialogs/select-file/select-file-dialog.component.mjs +18 -22
  20. package/esm2022/ui.application/ui/dialogs/select-picture/select-picture-dialog.component.mjs +18 -19
  21. package/esm2022/ui.application/ui/dialogs/select-tree/select-tree-dialog.component.mjs +60 -60
  22. package/esm2022/ui.application/ui/dialogs/send-to/send-to-dialog.component.mjs +30 -28
  23. package/esm2022/ui.application/ui/directives/resize-table-column.directive.mjs +8 -8
  24. package/esm2022/ui.oauth/public_api.mjs +2 -2
  25. package/esm2022/ui.oauth/ui/components/login/login-oauth.component.mjs +194 -0
  26. package/fesm2022/arsedizioni-ars-utils-core.mjs +29 -37
  27. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  28. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +122 -120
  29. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  30. package/fesm2022/arsedizioni-ars-utils-ui.mjs +2 -2
  31. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  32. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +36 -40
  33. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  34. package/package.json +13 -13
  35. package/ui.application/ui/components/file-input/file-input.component.d.ts +1 -1
  36. package/ui.application/ui/components/filter-bar/filter-bar.component.d.ts +1 -1
  37. package/ui.application/ui/dialogs/select/select-dialog.component.d.ts +6 -6
  38. package/ui.application/ui/dialogs/select-file/select-file-dialog.component.d.ts +3 -6
  39. package/ui.application/ui/dialogs/select-picture/select-picture-dialog.component.d.ts +4 -6
  40. package/ui.application/ui/dialogs/select-tree/select-tree-dialog.component.d.ts +23 -27
  41. package/ui.application/ui/dialogs/send-to/send-to-dialog.component.d.ts +7 -7
  42. package/ui.application/ui/directives/resize-table-column.directive.d.ts +3 -4
  43. package/ui.oauth/public_api.d.ts +1 -1
  44. package/ui.oauth/ui/components/login/login-oauth.component.d.ts +38 -0
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Pipe, EventEmitter, Directive, Input, Output, HostListener, forwardRef, Optional, Inject, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/platform-browser';
2
+ import { inject, Injectable, Pipe, EventEmitter, Directive, Input, Output, HostListener, forwardRef, Optional, Inject, ElementRef, NgModule } from '@angular/core';
3
+ import { DomSanitizer } from '@angular/platform-browser';
4
4
  import { parseISO, parse, format, setHours, endOfDay, getYear, getMonth, getDate, getDay, getDaysInMonth, addYears, addMonths, addDays, formatISO, isDate, isValid } from 'date-fns';
5
5
  import { it } from 'date-fns/locale';
6
6
  import { HttpParams } from '@angular/common/http';
@@ -12,8 +12,8 @@ import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/materia
12
12
  import { SelectionModel } from '@angular/cdk/collections';
13
13
 
14
14
  class ReplacePipe {
15
- constructor(sanitizer) {
16
- this.sanitizer = sanitizer;
15
+ constructor() {
16
+ this.sanitizer = inject(DomSanitizer);
17
17
  }
18
18
  transform(value, regexValue, replaceValue) {
19
19
  if (!value) {
@@ -24,7 +24,7 @@ class ReplacePipe {
24
24
  }
25
25
  return this.sanitizer.bypassSecurityTrustHtml(value.replace(new RegExp(regexValue, 'g'), replaceValue));
26
26
  }
27
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: ReplacePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
27
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: ReplacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
28
28
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.3", ngImport: i0, type: ReplacePipe, isStandalone: true, name: "replace" }); }
29
29
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: ReplacePipe }); }
30
30
  }
@@ -36,16 +36,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
36
36
  name: 'replace',
37
37
  standalone: true
38
38
  }]
39
- }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
39
+ }] });
40
40
 
41
41
  class SafeHtmlPipe {
42
- constructor(sanitizer) {
43
- this.sanitizer = sanitizer;
42
+ constructor() {
43
+ this.sanitizer = inject(DomSanitizer);
44
44
  }
45
45
  transform(value) {
46
46
  return this.sanitizer.bypassSecurityTrustHtml(value);
47
47
  }
48
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
48
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: SafeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
49
49
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.3", ngImport: i0, type: SafeHtmlPipe, isStandalone: true, name: "safeHtml" }); }
50
50
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: SafeHtmlPipe }); }
51
51
  }
@@ -57,16 +57,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
57
57
  name: 'safeHtml',
58
58
  standalone: true
59
59
  }]
60
- }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
60
+ }] });
61
61
 
62
62
  class SafeUrlPipe {
63
- constructor(sanitizer) {
64
- this.sanitizer = sanitizer;
63
+ constructor() {
64
+ this.sanitizer = inject(DomSanitizer);
65
65
  }
66
66
  transform(value) {
67
67
  return this.sanitizer.bypassSecurityTrustResourceUrl(value);
68
68
  }
69
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: SafeUrlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
69
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: SafeUrlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
70
70
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.3", ngImport: i0, type: SafeUrlPipe, isStandalone: true, name: "safeUrl" }); }
71
71
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: SafeUrlPipe }); }
72
72
  }
@@ -78,7 +78,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
78
78
  name: 'safeUrl',
79
79
  standalone: true
80
80
  }]
81
- }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
81
+ }] });
82
82
 
83
83
  class SearchCallbackPipe {
84
84
  transform(items, callback) {
@@ -208,7 +208,7 @@ class SystemUtils {
208
208
  return null;
209
209
  for (var i = 0; i < array.length; i++) {
210
210
  if (array[i].value === value) {
211
- return array[i].name;
211
+ return array[i].name || array[i].id;
212
212
  }
213
213
  }
214
214
  return null;
@@ -781,7 +781,6 @@ class SystemUtils {
781
781
  }
782
782
 
783
783
  class FormatPipe {
784
- constructor() { }
785
784
  transform(value, type = 'date', pattern = "dd/MM/yyyy") {
786
785
  if (!value)
787
786
  return null;
@@ -827,7 +826,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
827
826
  name: 'format',
828
827
  standalone: true
829
828
  }]
830
- }], ctorParameters: () => [] });
829
+ }] });
831
830
 
832
831
  class CopyClipboardDirective {
833
832
  constructor() {
@@ -975,7 +974,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
975
974
  type: Input
976
975
  }] } });
977
976
  class EmailsValidatorDirective {
978
- constructor() { }
979
977
  validate(control) {
980
978
  let isValid = true;
981
979
  const input = control.value;
@@ -1019,9 +1017,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1019
1017
  ],
1020
1018
  standalone: true,
1021
1019
  }]
1022
- }], ctorParameters: () => [] });
1020
+ }] });
1023
1021
  class GuidValidatorDirective {
1024
- constructor() { }
1025
1022
  validate(control) {
1026
1023
  const input = control.value;
1027
1024
  if (!input || input.length === 0)
@@ -1056,9 +1053,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1056
1053
  ],
1057
1054
  standalone: true,
1058
1055
  }]
1059
- }], ctorParameters: () => [] });
1056
+ }] });
1060
1057
  class SqlDateValidatorDirective {
1061
- constructor() { }
1062
1058
  validate(control) {
1063
1059
  const input = control.value;
1064
1060
  if (!input || input.length === 0)
@@ -1094,9 +1090,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1094
1090
  ],
1095
1091
  standalone: true,
1096
1092
  }]
1097
- }], ctorParameters: () => [] });
1093
+ }] });
1098
1094
  class NotFutureValidatorDirective {
1099
- constructor() { }
1100
1095
  validate(control) {
1101
1096
  const input = control.value;
1102
1097
  if (!input || input.length === 0)
@@ -1133,9 +1128,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1133
1128
  ],
1134
1129
  standalone: true,
1135
1130
  }]
1136
- }], ctorParameters: () => [] });
1131
+ }] });
1137
1132
  class UrlValidatorDirective {
1138
- constructor() { }
1139
1133
  validate(control) {
1140
1134
  const input = control.value;
1141
1135
  const isValid = SystemUtils.parseUrl(input);
@@ -1168,7 +1162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1168
1162
  ],
1169
1163
  standalone: true,
1170
1164
  }]
1171
- }], ctorParameters: () => [] });
1165
+ }] });
1172
1166
  class FileSizeValidatorDirective {
1173
1167
  constructor() {
1174
1168
  this.maxSizeMb = 5;
@@ -1209,7 +1203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1209
1203
  ],
1210
1204
  standalone: true,
1211
1205
  }]
1212
- }], ctorParameters: () => [], propDecorators: { maxSizeMb: [{
1206
+ }], propDecorators: { maxSizeMb: [{
1213
1207
  type: Input
1214
1208
  }], minSizeMb: [{
1215
1209
  type: Input
@@ -1217,7 +1211,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1217
1211
  type: Input
1218
1212
  }] } });
1219
1213
  class PasswordValidatorDirective {
1220
- constructor() { }
1221
1214
  validate(control) {
1222
1215
  const input = control.value;
1223
1216
  let isValid = input && input.length >= 8;
@@ -1262,9 +1255,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1262
1255
  ],
1263
1256
  standalone: true,
1264
1257
  }]
1265
- }], ctorParameters: () => [] });
1258
+ }] });
1266
1259
  class TimeValidatorDirective {
1267
- constructor() { }
1268
1260
  /**
1269
1261
  * Retrieve hours as a number from a time string (e: 12:00)
1270
1262
  * @param value : the time string
@@ -1331,7 +1323,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1331
1323
  ],
1332
1324
  standalone: true,
1333
1325
  }]
1334
- }], ctorParameters: () => [], propDecorators: { slots: [{
1326
+ }], propDecorators: { slots: [{
1335
1327
  type: Input
1336
1328
  }] } });
1337
1329
 
@@ -1623,15 +1615,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1623
1615
  }] }] });
1624
1616
 
1625
1617
  class AutoFocusDirective {
1626
- constructor(el) {
1627
- this.el = el;
1618
+ constructor() {
1619
+ this.elementRef = inject(ElementRef);
1628
1620
  }
1629
1621
  ngAfterContentInit() {
1630
1622
  setTimeout(() => {
1631
- this.el.nativeElement.focus();
1623
+ this.elementRef.nativeElement.focus();
1632
1624
  }, 500);
1633
1625
  }
1634
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1626
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AutoFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1635
1627
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.3", type: AutoFocusDirective, isStandalone: true, selector: "[autoFocus]", ngImport: i0 }); }
1636
1628
  }
1637
1629
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AutoFocusDirective, decorators: [{
@@ -1640,7 +1632,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
1640
1632
  selector: "[autoFocus]",
1641
1633
  standalone: true
1642
1634
  }]
1643
- }], ctorParameters: () => [{ type: i0.ElementRef }] });
1635
+ }] });
1644
1636
 
1645
1637
  class Scrollable {
1646
1638
  constructor() {