@arsedizioni/ars-utils 21.2.1 → 21.2.102

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 (31) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +780 -799
  2. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-core.mjs +63 -98
  4. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +6 -9
  6. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +49 -97
  8. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-ui.mjs +160 -256
  10. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +6 -9
  12. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/types/arsedizioni-ars-utils-clipper.common.d.ts.map +1 -0
  15. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +15 -20
  16. package/types/arsedizioni-ars-utils-clipper.ui.d.ts.map +1 -0
  17. package/types/arsedizioni-ars-utils-core.d.ts +37 -49
  18. package/types/arsedizioni-ars-utils-core.d.ts.map +1 -0
  19. package/types/arsedizioni-ars-utils-evolution.common.d.ts.map +1 -0
  20. package/types/arsedizioni-ars-utils-help.d.ts.map +1 -0
  21. package/types/arsedizioni-ars-utils-support.common.d.ts.map +1 -0
  22. package/types/arsedizioni-ars-utils-support.ui.d.ts +3 -4
  23. package/types/arsedizioni-ars-utils-support.ui.d.ts.map +1 -0
  24. package/types/arsedizioni-ars-utils-tinymce.d.ts.map +1 -0
  25. package/types/arsedizioni-ars-utils-ui.application.d.ts +50 -73
  26. package/types/arsedizioni-ars-utils-ui.application.d.ts.map +1 -0
  27. package/types/arsedizioni-ars-utils-ui.d.ts +76 -104
  28. package/types/arsedizioni-ars-utils-ui.d.ts.map +1 -0
  29. package/types/arsedizioni-ars-utils-ui.oauth.d.ts +3 -4
  30. package/types/arsedizioni-ars-utils-ui.oauth.d.ts.map +1 -0
  31. package/types/arsedizioni-ars-utils.d.ts.map +1 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, inject, Renderer2, ElementRef, Directive, output, ChangeDetectionStrategy, Component, Injectable, ChangeDetectorRef, signal, viewChild, NgModule, HostBinding, Input, ViewChild, Optional, Self, effect, computed } from '@angular/core';
2
+ import { input, inject, Renderer2, ElementRef, Directive, output, ChangeDetectionStrategy, Component, Injectable, DestroyRef, ChangeDetectorRef, signal, viewChild, NgModule, HostBinding, Input, ViewChild, Optional, Self, effect, computed } from '@angular/core';
3
3
  import * as i13 from '@angular/material/paginator';
4
4
  import { MatPaginatorModule, MatPaginatorIntl } from '@angular/material/paginator';
5
5
  import { DialogService, DeleteDialogConfirmMode, PaginatorIntl, OtpInputComponent, UIService } from '@arsedizioni/ars-utils/ui';
@@ -25,10 +25,10 @@ import { EmailsValidatorDirective, SafeHtmlPipe, SystemUtils, ArsCoreModule, Sea
25
25
  import * as i1$1 from '@ngbracket/ngx-layout/flex';
26
26
  import { FlexModule } from '@ngbracket/ngx-layout/flex';
27
27
  import { FlatTreeControl } from '@angular/cdk/tree';
28
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
28
29
  import * as i8$1 from '@angular/material/tree';
29
30
  import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
30
- import { BehaviorSubject, Subject, of, fromEvent, takeUntil as takeUntil$1, debounceTime } from 'rxjs';
31
- import { takeUntil } from 'rxjs/operators';
31
+ import { BehaviorSubject, of, Subject, fromEvent, debounceTime } from 'rxjs';
32
32
  import { FlexLayoutModule } from '@ngbracket/ngx-layout';
33
33
  import { MatOptionModule } from '@angular/material/core';
34
34
  import * as i3$2 from '@angular/material/select';
@@ -66,7 +66,7 @@ class ResizeTableColumnDirective {
66
66
  if (this.pressed && e.buttons) {
67
67
  this.renderer.addClass(this.table, "resizing");
68
68
  // Calculate width of column
69
- let width = this.startWidth + (e.pageX - this.startX - offset);
69
+ const width = this.startWidth + (e.pageX - this.startX - offset);
70
70
  const tableCells = Array.from(this.table.querySelectorAll(".mat-row")).map((row) => row.querySelectorAll(".mat-cell").item(this.index()));
71
71
  // Set table header width
72
72
  this.renderer.setStyle(this.column, "width", `${width}px`);
@@ -155,23 +155,19 @@ class CurrentFilter {
155
155
  * Update filtered value
156
156
  */
157
157
  filtered() {
158
- return ((this.flt1 !== null && this.flt1 !== undefined) ||
159
- (this.flt2 !== null && this.flt2 !== undefined) ||
160
- (this.flt3 !== null && this.flt3 !== undefined) ||
161
- (this.flt4 !== null && this.flt4 !== undefined) ||
162
- (this.flt5 !== null && this.flt5 !== undefined) ||
163
- (this.text !== null && this.text !== undefined && this.text.length > 0) ||
164
- (this.text2 !== null && this.text2 !== undefined && this.text2.length > 0) ||
165
- (this.text3 !== null && this.text3 !== undefined && this.text3.length > 0));
158
+ return (this.flt1 != null ||
159
+ this.flt2 != null ||
160
+ this.flt3 != null ||
161
+ this.flt4 != null ||
162
+ this.flt5 != null ||
163
+ !!this.text?.length ||
164
+ !!this.text2?.length ||
165
+ !!this.text3?.length);
166
166
  }
167
167
  }
168
168
  class CurrentFilterItem {
169
169
  constructor() {
170
- this.items = undefined;
171
- this.value = undefined;
172
170
  this.enabled = true;
173
- this.title = undefined;
174
- this.selectedTitle = undefined;
175
171
  }
176
172
  clear() {
177
173
  this.value = undefined;
@@ -192,18 +188,14 @@ class SendToDialogComponent {
192
188
  };
193
189
  }
194
190
  ngOnInit() {
195
- this.dialogData = this.dialogData || { count: 0, appearance: 'fill' };
196
- if (!this.dialogData.appearance) {
197
- this.dialogData.appearance = 'fill';
198
- }
199
- if (!this.dialogData.count) {
200
- this.dialogData.count = 0;
201
- }
191
+ this.dialogData ??= { count: 0, appearance: 'fill' };
192
+ this.dialogData.appearance ??= 'fill';
193
+ this.dialogData.count ??= 0;
202
194
  if (!this.dialogData.title && this.dialogData.count) {
203
195
  this.dialogData.title =
204
196
  this.dialogData.count === 1
205
- ? "Invia documento a..."
206
- : "Invia " + this.dialogData.count + " documenti a...";
197
+ ? 'Invia documento a...'
198
+ : `Invia ${this.dialogData.count} documenti a...`;
207
199
  }
208
200
  }
209
201
  /**
@@ -214,9 +206,6 @@ class SendToDialogComponent {
214
206
  this.item.options = this.dialogData.options;
215
207
  this.done.emit(this.item);
216
208
  }
217
- /**
218
- * Populate recipients
219
- */
220
209
  populateRecipients() {
221
210
  this.populate.emit(this.item);
222
211
  }
@@ -254,10 +243,6 @@ class TreeDataSource {
254
243
  ngOnDestroy() {
255
244
  this.dataChange.unsubscribe();
256
245
  }
257
- /**
258
- * Initialzie the data source
259
- * @param data : data
260
- */
261
246
  initialize(data) {
262
247
  this.dataChange.next(data);
263
248
  }
@@ -300,7 +285,7 @@ class TreeDataSource {
300
285
  return;
301
286
  if (n.parent) {
302
287
  const p = n.parent.children.findIndex(n => n.id === id);
303
- if (p != -1) {
288
+ if (p !== -1) {
304
289
  n.parent.children.splice(p, 1);
305
290
  if (n.parent.count > 0)
306
291
  n.parent.count--;
@@ -308,7 +293,7 @@ class TreeDataSource {
308
293
  }
309
294
  else {
310
295
  const p = this.data.findIndex(n => n.id === id);
311
- if (p != -1) {
296
+ if (p !== -1) {
312
297
  this.data.splice(p, 1);
313
298
  }
314
299
  }
@@ -356,7 +341,7 @@ class SelectTreeDialogComponent {
356
341
  constructor() {
357
342
  this.done = output();
358
343
  this.append = output();
359
- this.unsubscribe = new Subject();
344
+ this.destroyRef = inject(DestroyRef);
360
345
  this.changeDetector = inject(ChangeDetectorRef);
361
346
  this.dialogRef = inject((MatDialogRef));
362
347
  this.dialogData = inject(MAT_DIALOG_DATA);
@@ -382,7 +367,7 @@ class SelectTreeDialogComponent {
382
367
  this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
383
368
  this.treeData = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
384
369
  this.tree.dataChange
385
- .pipe(takeUntil(this.unsubscribe))
370
+ .pipe(takeUntilDestroyed(this.destroyRef))
386
371
  .subscribe(data => {
387
372
  this.treeData.data = data;
388
373
  setTimeout(() => {
@@ -408,10 +393,6 @@ class SelectTreeDialogComponent {
408
393
  this.doFilter(this.dialogData.initialFilter);
409
394
  }
410
395
  }
411
- ngOnDestroy() {
412
- this.unsubscribe.next();
413
- this.unsubscribe.complete();
414
- }
415
396
  /**
416
397
  * Submit selection
417
398
  */
@@ -450,7 +431,7 @@ class SelectTreeDialogComponent {
450
431
  this.filterIndex = -1;
451
432
  if (this.filterText) {
452
433
  this.treeControl.dataNodes.forEach(n => {
453
- if (n.name.toLowerCase().indexOf(this.filterText.toLowerCase()) != -1) {
434
+ if (n.name.toLowerCase().indexOf(this.filterText.toLowerCase()) !== -1) {
454
435
  this.filteredItems.push(n);
455
436
  }
456
437
  });
@@ -550,7 +531,7 @@ class SelectPictureDialogComponent {
550
531
  if (maxSize > 0) {
551
532
  const size = file.size / 1048576;
552
533
  if (size > maxSize) {
553
- this.dialogService.error("File troppo grande (massimo " + SystemUtils.formatFileSize(maxSize * 1048576) + ")");
534
+ this.dialogService.error(`File troppo grande (massimo ${SystemUtils.formatFileSize(maxSize * 1048576)})`);
554
535
  return;
555
536
  }
556
537
  }
@@ -568,7 +549,7 @@ class SelectPictureDialogComponent {
568
549
  b = 'audio/*';
569
550
  }
570
551
  if (!accept.includes(a) && !accept.includes(b)) {
571
- this.dialogService.error("Sono accettati solo questi tipi di file: " + accept);
552
+ this.dialogService.error(`Sono accettati solo questi tipi di file: ${accept}`);
572
553
  return;
573
554
  }
574
555
  }
@@ -578,12 +559,12 @@ class SelectPictureDialogComponent {
578
559
  img.onload = () => {
579
560
  const maxWidth = this.dialogData.maxWidth ?? 0;
580
561
  if (maxWidth > 0 && img.width > maxWidth) {
581
- this.dialogService.error("Immagine troppo larga (massimo " + maxWidth + " pixel)");
562
+ this.dialogService.error(`Immagine troppo larga (massimo ${maxWidth} pixel)`);
582
563
  return;
583
564
  }
584
565
  const maxHeight = this.dialogData.maxHeight ?? 0;
585
566
  if (maxHeight > 0 && img.height > maxHeight) {
586
- this.dialogService.error("Immagine troppo alta (massimo " + maxHeight + " pixel)");
567
+ this.dialogService.error(`Immagine troppo alta (massimo ${maxHeight} pixel)`);
587
568
  return;
588
569
  }
589
570
  this.pictureWidth.set(img.width);
@@ -684,7 +665,7 @@ class SelectFileDialogComponent {
684
665
  if (maxSize > 0) {
685
666
  const size = file.size / 1048576;
686
667
  if (size > maxSize) {
687
- this.dialogService.error("File troppo grande (massimo " + SystemUtils.formatFileSize(maxSize * 1048576) + ")");
668
+ this.dialogService.error(`File troppo grande (massimo ${SystemUtils.formatFileSize(maxSize * 1048576)})`);
688
669
  return;
689
670
  }
690
671
  }
@@ -702,7 +683,7 @@ class SelectFileDialogComponent {
702
683
  b = 'audio/*';
703
684
  }
704
685
  if (!accept.includes(a) && !accept.includes(b)) {
705
- this.dialogService.error("Sono accettati solo questi tipi di file: " + accept);
686
+ this.dialogService.error(`Sono accettati solo questi tipi di file: ${accept}`);
706
687
  return;
707
688
  }
708
689
  }
@@ -997,7 +978,6 @@ class SelectDialogComponent {
997
978
  */
998
979
  ok() {
999
980
  if (!this.okDisabled()) {
1000
- // Multi selection
1001
981
  const selectedItems = [];
1002
982
  this.selection().selectedOptions.selected.forEach((element) => {
1003
983
  selectedItems.push(element.value);
@@ -1137,7 +1117,7 @@ class SelectDialogComponent {
1137
1117
  * Delete
1138
1118
  */
1139
1119
  doDelete() {
1140
- let selectedItems = [];
1120
+ const selectedItems = [];
1141
1121
  this.selection().selectedOptions.selected.forEach((element) => {
1142
1122
  selectedItems.push(element.value);
1143
1123
  });
@@ -1341,7 +1321,7 @@ class ApplicationDialogService {
1341
1321
  },
1342
1322
  closeOnNavigation: false,
1343
1323
  minWidth: '375px',
1344
- maxWidth: width + 'px',
1324
+ maxWidth: `${width}px`,
1345
1325
  width: '100%'
1346
1326
  });
1347
1327
  }
@@ -1674,7 +1654,7 @@ class PromptOtpDialogComponent {
1674
1654
  */
1675
1655
  ok() {
1676
1656
  if (this.f().form.invalid) {
1677
- this.dialogService.error("Ci sono degli errori da correggere.");
1657
+ this.dialogService.error('Ci sono degli errori da correggere.');
1678
1658
  return;
1679
1659
  }
1680
1660
  this.done.emit({ value: this.value });
@@ -1823,7 +1803,7 @@ class FileInputComponent {
1823
1803
  setDisabledState(isDisabled) {
1824
1804
  if (!SystemUtils.isBrowser())
1825
1805
  return;
1826
- let elem = document.getElementById(this.id);
1806
+ const elem = document.getElementById(this.id);
1827
1807
  if (elem) {
1828
1808
  this.renderer.setProperty(elem, 'disabled', isDisabled);
1829
1809
  }
@@ -1832,7 +1812,7 @@ class FileInputComponent {
1832
1812
  if (!this.focused) {
1833
1813
  if (!SystemUtils.isBrowser())
1834
1814
  return;
1835
- let elem = document.getElementById(this.id);
1815
+ const elem = document.getElementById(this.id);
1836
1816
  if (elem) {
1837
1817
  elem.focus();
1838
1818
  this.propagateTouched();
@@ -1933,7 +1913,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
1933
1913
  class FilePreviewComponent {
1934
1914
  constructor() {
1935
1915
  this.iframe = viewChild('iframe', ...(ngDevMode ? [{ debugName: "iframe" }] : []));
1936
- this.unsubscribe = new Subject();
1937
1916
  this.httpClient = inject(HttpClient);
1938
1917
  this.dialogService = inject(DialogService);
1939
1918
  this.dialogData = inject(MAT_DIALOG_DATA);
@@ -1964,8 +1943,6 @@ class FilePreviewComponent {
1964
1943
  }
1965
1944
  }
1966
1945
  ngOnDestroy() {
1967
- this.unsubscribe.next();
1968
- this.unsubscribe.complete();
1969
1946
  this.url.set(null);
1970
1947
  }
1971
1948
  /**
@@ -2064,9 +2041,6 @@ class FilterBarComponent {
2064
2041
  ngOnInit() {
2065
2042
  this.initializeFilters();
2066
2043
  }
2067
- /**
2068
- * Initialize filters
2069
- */
2070
2044
  initializeFilters() {
2071
2045
  if (!this.filters())
2072
2046
  return;
@@ -2103,35 +2077,35 @@ class FilterBarComponent {
2103
2077
  let changed = false;
2104
2078
  switch (filter.group) {
2105
2079
  case Filters.FLT_1:
2106
- changed = this.currentFilter.flt1 != filter.value;
2080
+ changed = this.currentFilter.flt1 !== filter.value;
2107
2081
  if (changed) {
2108
2082
  this.currentFilter.flt1 = filter.value;
2109
2083
  this.currentFilter.flt1Name = filter.titleSelected;
2110
2084
  }
2111
2085
  break;
2112
2086
  case Filters.FLT_2:
2113
- changed = this.currentFilter.flt2 != filter.value;
2087
+ changed = this.currentFilter.flt2 !== filter.value;
2114
2088
  if (changed) {
2115
2089
  this.currentFilter.flt2 = filter.value;
2116
2090
  this.currentFilter.flt2Name = filter.titleSelected;
2117
2091
  }
2118
2092
  break;
2119
2093
  case Filters.FLT_3:
2120
- changed = this.currentFilter.flt3 != filter.value;
2094
+ changed = this.currentFilter.flt3 !== filter.value;
2121
2095
  if (changed) {
2122
2096
  this.currentFilter.flt3 = filter.value;
2123
2097
  this.currentFilter.flt3Name = filter.titleSelected;
2124
2098
  }
2125
2099
  break;
2126
2100
  case Filters.FLT_4:
2127
- changed = this.currentFilter.flt4 != filter.value;
2101
+ changed = this.currentFilter.flt4 !== filter.value;
2128
2102
  if (changed) {
2129
2103
  this.currentFilter.flt4 = filter.value;
2130
2104
  this.currentFilter.flt4Name = filter.titleSelected;
2131
2105
  }
2132
2106
  break;
2133
2107
  case Filters.FLT_5:
2134
- changed = this.currentFilter.flt5 != filter.value;
2108
+ changed = this.currentFilter.flt5 !== filter.value;
2135
2109
  if (changed) {
2136
2110
  this.currentFilter.flt5 = filter.value;
2137
2111
  this.currentFilter.flt5Name = filter.titleSelected;
@@ -2359,17 +2333,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
2359
2333
 
2360
2334
  class CalendarEmptyHeader {
2361
2335
  constructor() {
2362
- this.unsubscribe = new Subject();
2336
+ this.destroyRef = inject(DestroyRef);
2363
2337
  this.calendar = inject((MatCalendar));
2364
2338
  this.changeDetector = inject(ChangeDetectorRef);
2365
2339
  this.calendar.stateChanges
2366
- .pipe(takeUntil(this.unsubscribe))
2340
+ .pipe(takeUntilDestroyed(this.destroyRef))
2367
2341
  .subscribe(() => this.changeDetector.markForCheck());
2368
2342
  }
2369
- ngOnDestroy() {
2370
- this.unsubscribe.next();
2371
- this.unsubscribe.complete();
2372
- }
2373
2343
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CalendarEmptyHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2374
2344
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: CalendarEmptyHeader, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<div></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2375
2345
  }
@@ -2458,7 +2428,7 @@ class ButtonSelectorComponent {
2458
2428
  setDisabledState(isDisabled) {
2459
2429
  if (!SystemUtils.isBrowser())
2460
2430
  return;
2461
- let elem = document.getElementById(this.id);
2431
+ const elem = document.getElementById(this.id);
2462
2432
  if (elem) {
2463
2433
  this.renderer.setProperty(elem, 'disabled', isDisabled);
2464
2434
  }
@@ -2467,7 +2437,7 @@ class ButtonSelectorComponent {
2467
2437
  if (!this.focused) {
2468
2438
  if (!SystemUtils.isBrowser())
2469
2439
  return;
2470
- let elem = document.getElementById(this.id);
2440
+ const elem = document.getElementById(this.id);
2471
2441
  if (elem) {
2472
2442
  elem.focus();
2473
2443
  this.propagateTouched();
@@ -2486,9 +2456,6 @@ class ButtonSelectorComponent {
2486
2456
  }
2487
2457
  this.changeDetector.markForCheck();
2488
2458
  }
2489
- /**
2490
- * Reset value
2491
- */
2492
2459
  reset() {
2493
2460
  this.writeValue(undefined);
2494
2461
  }
@@ -2579,7 +2546,7 @@ class ChipsSelectorComponent {
2579
2546
  this.containerWidth = signal(-6, ...(ngDevMode ? [{ debugName: "containerWidth" }] : []));
2580
2547
  this.focused = false;
2581
2548
  this.stateChanges = new Subject();
2582
- this.unsubscribe = new Subject();
2549
+ this.destroyRef = inject(DestroyRef);
2583
2550
  this.changeDetector = inject(ChangeDetectorRef);
2584
2551
  this.changesEnabled = false;
2585
2552
  this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
@@ -2615,7 +2582,7 @@ class ChipsSelectorComponent {
2615
2582
  ngOnInit() {
2616
2583
  // React to window size change
2617
2584
  fromEvent(window, 'resize')
2618
- .pipe(takeUntil$1(this.unsubscribe), debounceTime(250))
2585
+ .pipe(takeUntilDestroyed(this.destroyRef), debounceTime(250))
2619
2586
  .subscribe(() => {
2620
2587
  if (this.collapseAt() > 0) {
2621
2588
  // Close the options menu if open
@@ -2624,8 +2591,6 @@ class ChipsSelectorComponent {
2624
2591
  });
2625
2592
  }
2626
2593
  ngOnDestroy() {
2627
- this.unsubscribe.next();
2628
- this.unsubscribe.complete();
2629
2594
  this.stateChanges.complete();
2630
2595
  }
2631
2596
  ngAfterContentInit() {
@@ -2699,7 +2664,7 @@ class ChipsSelectorComponent {
2699
2664
  setDisabledState(isDisabled) {
2700
2665
  if (!SystemUtils.isBrowser())
2701
2666
  return;
2702
- let elem = document.getElementById(this.id);
2667
+ const elem = document.getElementById(this.id);
2703
2668
  if (elem) {
2704
2669
  this.renderer.setProperty(elem, 'disabled', isDisabled);
2705
2670
  }
@@ -2708,7 +2673,7 @@ class ChipsSelectorComponent {
2708
2673
  if (!this.focused) {
2709
2674
  if (!SystemUtils.isBrowser())
2710
2675
  return;
2711
- let elem = document.getElementById(this.id);
2676
+ const elem = document.getElementById(this.id);
2712
2677
  if (elem) {
2713
2678
  elem.focus();
2714
2679
  this.propagateTouched();
@@ -2724,10 +2689,6 @@ class ChipsSelectorComponent {
2724
2689
  e.stopPropagation();
2725
2690
  this.changeDetector.markForCheck();
2726
2691
  }
2727
- /**
2728
- * Select single element
2729
- * @param item : the item to select
2730
- */
2731
2692
  select(item) {
2732
2693
  if (item) {
2733
2694
  this.writeValue([item]);
@@ -2766,9 +2727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
2766
2727
  class ButtonToggleComponent {
2767
2728
  constructor() {
2768
2729
  this.changed = output();
2769
- this.current = computed(() => {
2770
- return this.value();
2771
- }, ...(ngDevMode ? [{ debugName: "current" }] : []));
2730
+ this.current = computed(() => this.value(), ...(ngDevMode ? [{ debugName: "current" }] : []));
2772
2731
  this.toggled = false;
2773
2732
  this.value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : []));
2774
2733
  this.width = input(-1, ...(ngDevMode ? [{ debugName: "width" }] : []));
@@ -2779,16 +2738,9 @@ class ButtonToggleComponent {
2779
2738
  this.iconOff = input(undefined, ...(ngDevMode ? [{ debugName: "iconOff" }] : []));
2780
2739
  this.cssClass = input(undefined, ...(ngDevMode ? [{ debugName: "cssClass" }] : []));
2781
2740
  this.cssClassSmall = input(undefined, ...(ngDevMode ? [{ debugName: "cssClassSmall" }] : []));
2782
- this.label = computed(() => {
2783
- return this.value() ? this.labelOn() ?? '' : this.labelOff() ?? '';
2784
- }, ...(ngDevMode ? [{ debugName: "label" }] : []));
2785
- this.icon = computed(() => {
2786
- return this.value() ? this.iconOn() ?? '' : this.iconOff() ?? '';
2787
- }, ...(ngDevMode ? [{ debugName: "icon" }] : []));
2741
+ this.label = computed(() => this.value() ? this.labelOn() ?? '' : this.labelOff() ?? '', ...(ngDevMode ? [{ debugName: "label" }] : []));
2742
+ this.icon = computed(() => this.value() ? this.iconOn() ?? '' : this.iconOff() ?? '', ...(ngDevMode ? [{ debugName: "icon" }] : []));
2788
2743
  }
2789
- /**
2790
- * Toggle the button
2791
- */
2792
2744
  toggle() {
2793
2745
  this.toggled = !(this.value());
2794
2746
  this.changed.emit({ value: this.value(), toggled: this.toggled });