@arsedizioni/ars-utils 19.3.7 → 19.3.8

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.
@@ -29,7 +29,7 @@ import * as i20 from '@arsedizioni/ars-utils/core';
29
29
  import { SystemUtils, BroadcastService, SafeUrlPipe, DateInterval, ThemeService, ScreenService, DateFormat, FormatPipe, SelectableModel, ArsCoreModule } from '@arsedizioni/ars-utils/core';
30
30
  import { FlexLayoutModule, FlexModule } from '@ngbracket/ngx-layout';
31
31
  import { takeUntil as takeUntil$1, finalize as finalize$1 } from 'rxjs/operators';
32
- import { startOfToday, subDays, endOfDay, startOfMonth, endOfMonth, addHours, startOfDay } from 'date-fns';
32
+ import { startOfToday, subDays, endOfDay, startOfMonth, endOfMonth, startOfDay } from 'date-fns';
33
33
  import { finalize, Subject, takeUntil } from 'rxjs';
34
34
  import * as i4$1 from '@angular/material/divider';
35
35
  import { MatDividerModule } from '@angular/material/divider';
@@ -1591,15 +1591,16 @@ class ClipperSearchCalendarComponent {
1591
1591
  * @param date : the date to filter to or "month" to filter by the whole month.
1592
1592
  */
1593
1593
  filterByDate(date) {
1594
- console.log("change date:" + date?.toString());
1595
1594
  if (date === 'month') {
1596
1595
  if (this.calendarDate) {
1597
1596
  this.changed.emit(new DateInterval(endOfDay(startOfMonth(this.calendarDate)), endOfMonth(this.calendarDate)));
1598
1597
  }
1599
1598
  }
1600
1599
  else if (date) {
1601
- this.changed.emit(new DateInterval(addHours(startOfDay(date), 2), endOfDay(date)));
1600
+ this.changed.emit(new DateInterval(endOfDay(date), endOfDay(date)));
1602
1601
  this.calendarDate = date;
1602
+ const calendar = this.calendar();
1603
+ calendar.activeDate = date;
1603
1604
  }
1604
1605
  else {
1605
1606
  this.changed.emit(null);
@@ -1619,7 +1620,7 @@ class ClipperSearchCalendarComponent {
1619
1620
  this.calendarDate = newDate;
1620
1621
  }
1621
1622
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ClipperSearchCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1622
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: ClipperSearchCalendarComponent, isStandalone: true, selector: "clipper-search-calendar", inputs: { canFilter: { classPropertyName: "canFilter", publicName: "canFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true, isSignal: true }], ngImport: i0, template: "<div fxLayout=\"column\" fxFill class=\"calendar-container scroll-hidden\">\r\n <div class=\"calendar-months\">\r\n <div>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"center\" fxLayoutGap=\"8px\" fxFill>\r\n @for (m of months(); track $index) {\r\n <button fxFlex=\"37px\" mat-button class=\"small uppercase\" (click)=\"filterByMonth(m)\" [disabled]=\"m.total === 0\">\r\n @if (m.expired) {\r\n <span class=\"expired\" [matTooltip]=\"m.expired + ' elementi in ritardo'\">{{m.monthShortName}}</span>\r\n }\r\n @if (!m.expired) {\r\n <span [matTooltip]=\"m.total + ' elementi'\">{{m.monthShortName}}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"separator\"></div>\r\n </div>\r\n <div fxFlex=\"*\" class=\"scroll-auto\">\r\n @if (!busy()) {\r\n <mat-calendar #calendar [headerComponent]=\"calendarEmptyHeader\" [dateClass]=\"calendarDateClass\"\r\n [dateFilter]=\"calendarDateFilter\" (selectedChange)=\"filterByDate($event)\" class=\"calendar-month\">\r\n </mat-calendar>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around\" style=\"padding:0 15px\">\r\n <button type=\"button\" mat-stroked-button color=\"primary\" (click)=\"filterByDate('month')\">Tutto il\r\n mese</button>\r\n </div>\r\n }\r\n </div>\r\n</div>", styles: [".calendar-container{padding-top:20px;padding-bottom:10px}.calendar-message{padding-top:10px;padding-left:15px}.calendar-months .separator{border-top:1px var(--ars-color-divider, #757d87) solid;margin-top:15px;padding-top:15px}.calendar-months .expired{color:var(--ars-color-error, #ff5449)!important}.calendar-month{padding:10px 0 30px;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule$1 }, { kind: "directive", type: i1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatExpansionModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1623
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: ClipperSearchCalendarComponent, isStandalone: true, selector: "clipper-search-calendar", inputs: { canFilter: { classPropertyName: "canFilter", publicName: "canFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true, isSignal: true }], ngImport: i0, template: "<div fxLayout=\"column\" fxFill class=\"calendar-container scroll-hidden\">\r\n <div class=\"calendar-months\">\r\n <div>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"center\" fxLayoutGap=\"8px\" fxFill>\r\n @for (m of months(); track $index) {\r\n <button fxFlex=\"37px\" mat-button class=\"small uppercase\" (click)=\"filterByMonth(m)\" [disabled]=\"m.total === 0\">\r\n @if (m.expired) {\r\n <span class=\"expired\" [matTooltip]=\"m.expired + ' elementi in ritardo'\">{{m.monthShortName}}</span>\r\n } @else {\r\n <span [matTooltip]=\"m.total + ' elementi'\">{{m.monthShortName}}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"separator\"></div>\r\n </div>\r\n <div fxFlex=\"*\" class=\"scroll-auto\">\r\n @if (!busy()) {\r\n <mat-calendar #calendar [headerComponent]=\"calendarEmptyHeader\" [dateClass]=\"calendarDateClass\"\r\n [dateFilter]=\"calendarDateFilter\" (selectedChange)=\"filterByDate($event)\" class=\"calendar-month\">\r\n </mat-calendar>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around\" style=\"padding:0 15px\">\r\n <button type=\"button\" mat-stroked-button color=\"primary\" (click)=\"filterByDate('month')\">Tutto il\r\n mese</button>\r\n </div>\r\n }\r\n </div>\r\n</div>", styles: [".calendar-container{padding-top:20px;padding-bottom:10px}.calendar-message{padding-top:10px;padding-left:15px}.calendar-months .separator{border-top:1px var(--ars-color-divider, #757d87) solid;margin-top:15px;padding-top:15px}.calendar-months .expired{color:var(--ars-color-error, #ff5449)!important}.calendar-month{padding:10px 0 30px;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule$1 }, { kind: "directive", type: i1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatExpansionModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1623
1624
  }
1624
1625
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ClipperSearchCalendarComponent, decorators: [{
1625
1626
  type: Component,
@@ -1632,7 +1633,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1632
1633
  MatIconModule,
1633
1634
  MatDividerModule,
1634
1635
  MatExpansionModule
1635
- ], template: "<div fxLayout=\"column\" fxFill class=\"calendar-container scroll-hidden\">\r\n <div class=\"calendar-months\">\r\n <div>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"center\" fxLayoutGap=\"8px\" fxFill>\r\n @for (m of months(); track $index) {\r\n <button fxFlex=\"37px\" mat-button class=\"small uppercase\" (click)=\"filterByMonth(m)\" [disabled]=\"m.total === 0\">\r\n @if (m.expired) {\r\n <span class=\"expired\" [matTooltip]=\"m.expired + ' elementi in ritardo'\">{{m.monthShortName}}</span>\r\n }\r\n @if (!m.expired) {\r\n <span [matTooltip]=\"m.total + ' elementi'\">{{m.monthShortName}}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"separator\"></div>\r\n </div>\r\n <div fxFlex=\"*\" class=\"scroll-auto\">\r\n @if (!busy()) {\r\n <mat-calendar #calendar [headerComponent]=\"calendarEmptyHeader\" [dateClass]=\"calendarDateClass\"\r\n [dateFilter]=\"calendarDateFilter\" (selectedChange)=\"filterByDate($event)\" class=\"calendar-month\">\r\n </mat-calendar>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around\" style=\"padding:0 15px\">\r\n <button type=\"button\" mat-stroked-button color=\"primary\" (click)=\"filterByDate('month')\">Tutto il\r\n mese</button>\r\n </div>\r\n }\r\n </div>\r\n</div>", styles: [".calendar-container{padding-top:20px;padding-bottom:10px}.calendar-message{padding-top:10px;padding-left:15px}.calendar-months .separator{border-top:1px var(--ars-color-divider, #757d87) solid;margin-top:15px;padding-top:15px}.calendar-months .expired{color:var(--ars-color-error, #ff5449)!important}.calendar-month{padding:10px 0 30px;width:100%}\n"] }]
1636
+ ], template: "<div fxLayout=\"column\" fxFill class=\"calendar-container scroll-hidden\">\r\n <div class=\"calendar-months\">\r\n <div>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"center\" fxLayoutGap=\"8px\" fxFill>\r\n @for (m of months(); track $index) {\r\n <button fxFlex=\"37px\" mat-button class=\"small uppercase\" (click)=\"filterByMonth(m)\" [disabled]=\"m.total === 0\">\r\n @if (m.expired) {\r\n <span class=\"expired\" [matTooltip]=\"m.expired + ' elementi in ritardo'\">{{m.monthShortName}}</span>\r\n } @else {\r\n <span [matTooltip]=\"m.total + ' elementi'\">{{m.monthShortName}}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"separator\"></div>\r\n </div>\r\n <div fxFlex=\"*\" class=\"scroll-auto\">\r\n @if (!busy()) {\r\n <mat-calendar #calendar [headerComponent]=\"calendarEmptyHeader\" [dateClass]=\"calendarDateClass\"\r\n [dateFilter]=\"calendarDateFilter\" (selectedChange)=\"filterByDate($event)\" class=\"calendar-month\">\r\n </mat-calendar>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around\" style=\"padding:0 15px\">\r\n <button type=\"button\" mat-stroked-button color=\"primary\" (click)=\"filterByDate('month')\">Tutto il\r\n mese</button>\r\n </div>\r\n }\r\n </div>\r\n</div>", styles: [".calendar-container{padding-top:20px;padding-bottom:10px}.calendar-message{padding-top:10px;padding-left:15px}.calendar-months .separator{border-top:1px var(--ars-color-divider, #757d87) solid;margin-top:15px;padding-top:15px}.calendar-months .expired{color:var(--ars-color-error, #ff5449)!important}.calendar-month{padding:10px 0 30px;width:100%}\n"] }]
1636
1637
  }] });
1637
1638
 
1638
1639
  class ClipperSearchFacetsComponent {