@indice/ng-components 0.2.157 → 0.2.158

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, PLATFORM_ID, Directive, Inject, Input, Output, Component, TemplateRef, ContentChild, ContentChildren, forwardRef, ViewChild, Injectable, InjectionToken, ViewEncapsulation, ChangeDetectionStrategy, Optional, Injector, ElementRef, ViewChildren, Pipe, HostListener, NgModule } from '@angular/core';
2
+ import { EventEmitter, PLATFORM_ID, Directive, Inject, Input, Output, Component, TemplateRef, ContentChild, ContentChildren, LOCALE_ID, forwardRef, ViewChild, Injectable, InjectionToken, ViewEncapsulation, ChangeDetectionStrategy, Optional, Injector, ElementRef, ViewChildren, Pipe, HostListener, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
- import { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';
4
+ import { isPlatformBrowser, getLocaleMonthNames, FormStyle, TranslationWidth, getLocaleDayNames, DOCUMENT, CommonModule } from '@angular/common';
5
5
  import * as i1$1 from '@angular/router';
6
6
  import { Router, NavigationStart, ActivatedRoute, ActivationStart, RouterModule } from '@angular/router';
7
7
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
@@ -865,30 +865,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
865
865
 
866
866
  // freaksly simple date picker : https://tailwind-elements.com/docs/standard/forms/datepicker/
867
867
  class DatepickerComponent {
868
- constructor() {
868
+ constructor(locale) {
869
+ this.locale = locale;
869
870
  this.readonly = false;
870
871
  this.disabled = false;
872
+ this.inline = false;
871
873
  this.displayFormat = 'dd/MM/yyyy';
872
874
  this.placeholder = '';
873
875
  this.value = null;
874
876
  this.valueChange = new EventEmitter();
877
+ this.minDate = undefined;
878
+ this.maxDate = undefined;
875
879
  this.showCalendar = false;
876
880
  this.showYears = false;
877
- this.monthNames = [
878
- 'Ιανουάριος',
879
- 'Φεβρουάριος',
880
- 'Μάρτιος',
881
- 'Απρίλιος',
882
- 'Μάϊος',
883
- 'Ιούνιος',
884
- 'Ιούλιος',
885
- 'Αύγουστος',
886
- 'Σεπτέμβριος',
887
- 'Οκτώβριος',
888
- 'Νοεμβριος',
889
- 'Δεκέμβριος',
890
- ];
891
- this.dayNames = ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'];
881
+ this.monthNames = getLocaleMonthNames(this.locale, FormStyle.Standalone, TranslationWidth.Wide);
882
+ this.dayNames = getLocaleDayNames(this.locale, FormStyle.Standalone, TranslationWidth.Abbreviated);
892
883
  this.month = -1;
893
884
  this.year = -1;
894
885
  this.calendarDates = [];
@@ -936,35 +927,46 @@ class DatepickerComponent {
936
927
  }
937
928
  selectDateValue(date) {
938
929
  // This should be in UTC
939
- let selectedDate = new Date(this.year, this.month, date.day, 3, 0, 0, 0);
940
- this.value = selectedDate;
941
- this.valueChange.emit(this.value);
942
- if (this.onChange$) {
943
- this.onChange$(this.value);
944
- }
945
- this.updateDays();
946
- if (this.onTouched$) {
947
- this.onTouched$();
930
+ if (!this.outOfRangeDate(date.day)) {
931
+ let selectedDate = new Date(this.year, this.month, date.day, 3, 0, 0, 0);
932
+ this.value = selectedDate;
933
+ this.valueChange.emit(this.value);
934
+ if (this.onChange$) {
935
+ this.onChange$(this.value);
936
+ }
937
+ this.updateDays();
938
+ if (this.onTouched$) {
939
+ this.onTouched$();
940
+ }
941
+ this.calcDays();
942
+ this.showCalendar = false;
948
943
  }
949
- this.showCalendar = false;
950
944
  }
951
945
  selectYearValue(year) {
952
- var _a, _b, _c;
946
+ var _a, _b, _c, _d, _e;
953
947
  // This should be in UTC
954
- let selectedDate = new Date(year.year, (_a = this.month) !== null && _a !== void 0 ? _a : 1, (_c = (_b = this.calendarDates) === null || _b === void 0 ? void 0 : _b.find(x => x.selected == true).day) !== null && _c !== void 0 ? _c : 1, 3, 0, 0, 0);
948
+ const tempYear = this.year;
955
949
  this.year = year.year;
956
- this.value = selectedDate;
957
- this.valueChange.emit(this.value);
958
- if (this.onChange$) {
959
- this.onChange$(this.value);
950
+ if (!this.outOfRangeDate((_b = (_a = this.calendarDates) === null || _a === void 0 ? void 0 : _a.find(x => x.selected == true)) !== null && _b !== void 0 ? _b : { day: 1 })) {
951
+ let selectedDate = new Date(year.year, (_c = this.month) !== null && _c !== void 0 ? _c : 1, (_e = (_d = this.calendarDates) === null || _d === void 0 ? void 0 : _d.find(x => x.selected == true).day) !== null && _e !== void 0 ? _e : 1, 3, 0, 0, 0);
952
+ this.value = selectedDate;
953
+ this.valueChange.emit(this.value);
954
+ if (this.onChange$) {
955
+ this.onChange$(this.value);
956
+ }
957
+ this.updateDays();
958
+ if (this.onTouched$) {
959
+ this.onTouched$();
960
+ }
961
+ this.showYears = false;
962
+ this.showCalendar = true;
963
+ this.calcDays();
960
964
  }
961
- this.updateDays();
962
- if (this.onTouched$) {
963
- this.onTouched$();
965
+ else {
966
+ this.year = tempYear;
967
+ this.showYears = false;
968
+ this.showCalendar = true;
964
969
  }
965
- this.showYears = false;
966
- this.showCalendar = true;
967
- this.calcDays();
968
970
  }
969
971
  previousMonth() {
970
972
  if (this.month !== 0) {
@@ -1055,7 +1057,7 @@ class DatepickerComponent {
1055
1057
  }
1056
1058
  getDateFromInput() {
1057
1059
  var _a, _b;
1058
- if (((_a = this.dateInput) === null || _a === void 0 ? void 0 : _a.nativeElement.value) !== '') {
1060
+ if (((_a = this.dateInput) === null || _a === void 0 ? void 0 : _a.nativeElement.value) !== '' && !this.inline) {
1059
1061
  var dateParts = (_b = this.dateInput) === null || _b === void 0 ? void 0 : _b.nativeElement.value.split("/");
1060
1062
  let dateInGrFormat = new Date(+dateParts[2], dateParts[1] - 1, +dateParts[0], 3, 0, 0);
1061
1063
  if (dateInGrFormat.toString() !== 'Invalid Date') {
@@ -1087,15 +1089,35 @@ class DatepickerComponent {
1087
1089
  this.showCalendar = false;
1088
1090
  this.getDateFromInput();
1089
1091
  }
1092
+ outOfRangeDate(date) {
1093
+ let outOfRange = false;
1094
+ if (this.minDate || this.maxDate) {
1095
+ const d = new Date(this.year, this.month, date.day);
1096
+ const dateInMillis = d.getTime();
1097
+ if (this.minDate) {
1098
+ let minDate = this.minDate.getTime();
1099
+ if (dateInMillis < minDate && this.minDate.toDateString() !== d.toDateString()) {
1100
+ outOfRange = true;
1101
+ }
1102
+ }
1103
+ if (this.maxDate) {
1104
+ let maxDate = this.maxDate.getTime();
1105
+ if (dateInMillis > maxDate && this.maxDate.toDateString() !== d.toDateString()) {
1106
+ outOfRange = true;
1107
+ }
1108
+ }
1109
+ }
1110
+ return outOfRange;
1111
+ }
1090
1112
  }
1091
- DatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1092
- DatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DatepickerComponent, selector: "lib-date-picker", inputs: { readonly: "readonly", disabled: "disabled", displayFormat: ["display-format", "displayFormat"], placeholder: "placeholder", value: "value" }, outputs: { valueChange: "valueChange" }, providers: [
1113
+ DatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DatepickerComponent, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component });
1114
+ DatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DatepickerComponent, selector: "lib-date-picker", inputs: { readonly: "readonly", disabled: "disabled", inline: "inline", displayFormat: ["display-format", "displayFormat"], placeholder: "placeholder", value: "value", minDate: "minDate", maxDate: "maxDate" }, outputs: { valueChange: "valueChange" }, providers: [
1093
1115
  {
1094
1116
  provide: NG_VALUE_ACCESSOR,
1095
1117
  useExisting: forwardRef(() => DatepickerComponent),
1096
1118
  multi: true
1097
1119
  }
1098
- ], viewQueries: [{ propertyName: "dateInput", first: true, predicate: ["dateInput"], descendants: true }], ngImport: i0, template: "<div class=\"relative flex\"\n (clickOutside)=\"closeCalendar()\">\n\n <input type=\"text\"\n #dateInput\n [readonly]=\"readonly\"\n name=\"dateInput\"\n (blur)=\"onBlur($event)\"\n id=\"dateInput\"\n (focus)=\"showCalendar = false\"\n [value]=\"value | date: displayFormat\"\n class=\"w-full focus:ring-0 focus:outline-none rounded-none sm:text-sm border-gray-300 focus:border-0\"\n [ngClass]=\"{'cursor-not-allowed': disabled}\"\n [placeholder]=\"disabled ? '' : placeholder\">\n\n <button type=\"button\"\n class=\"relative inline-flex items-center px-2 py-2 border border-gray-300 text-sm font-medium rounded-r-sm text-gray-700 bg-gray-50 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-gray-500 focus:border-gray-500\"\n [disabled]=\"disabled\"\n (click)=\"openCalendar()\"\n [ngClass]=\"{'cursor-not-allowed': disabled}\">\n <i class=\"ms-Icon ms-Icon--DateTime2\"></i>\n </button>\n\n <div *ngIf=\"showCalendar\"\n class=\"bg-gray-100 mt-10 rounded-sm shadow-md p-4 absolute left-0 z-50 w-full\"\n style=\"height:18rem;min-width:16rem;\"\n name=\"calendar\">\n <div class=\"flex justify-between items-center mb-2\">\n <div>\n <button type=\"button\"\n (click)=\"openYears()\">\n <span class=\"text-lg font-bold text-gray-800\">\n {{monthNames[month]}}\n </span>\n <span class=\"ml-1 text-lg text-gray-600 font-normal\">\n {{year}}</span>\n </button>\n </div>\n <div *ngIf=\"!showYears; else showYearsPickerTmpl\">\n <button type=\"button\"\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\n (click)=\"previousMonth();\">\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n <button type=\"button\"\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\n (click)=\"nextMonth()\">\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n <ng-template #showYearsPickerTmpl>\n <div>\n <button type=\"button\"\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25 w-1/2\"\n (click)=\"previousYear();\">\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n <button type=\"button\"\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25 w-1/2\"\n (click)=\"nextYear()\">\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div class=\"flex flex-wrap mb-3 -mx-1\"\n *ngIf=\"!showYears; else showCalYearsTmpl\">\n <div *ngFor=\"let day of dayNames\"\n class=\"text-gray-800 font-medium text-center text-sm uppercase\"\n style=\"width: 14.28%\">{{day}}</div>\n </div>\n\n <ng-template #showCalYearsTmpl>\n <div class=\"flex flex-wrap -mx-1 items-center\">\n <div *ngFor=\"let year of showCalendarYears\"\n style=\"width: 18.28%\"\n class=\"px-1 mb-1\">\n <div (click)=\"selectYearValue(year)\"\n class=\"cursor-pointer text-center hover:text-blue-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\n [class]=\"year.selected ? 'bg-gray-700 text-blue-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{year.year}}</div>\n </div>\n </div>\n </ng-template>\n\n <div class=\"flex flex-wrap -mx-1 items-center\"\n *ngIf=\"!showYears\">\n <div *ngFor=\"let blankday of blankDays\"\n style=\"width: 14.28%\"\n class=\"text-center border p-1 border-transparent text-sm opacity-50\">{{blankday}}</div>\n <div *ngFor=\"let date of calendarDates\"\n style=\"width: 14.28%\"\n class=\"px-1 mb-1\">\n <div (click)=\"selectDateValue(date)\"\n class=\"cursor-pointer text-center hover:text-blue-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\n [class]=\"date.selected ? 'bg-gray-700 text-blue-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{date.day}}</div>\n </div>\n </div>\n </div>\n\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
1120
+ ], viewQueries: [{ propertyName: "dateInput", first: true, predicate: ["dateInput"], descendants: true }], ngImport: i0, template: "<div class=\"flex\"\n [ngClass]=\"{'relative': !inline}\"\n (clickOutside)=\"closeCalendar()\">\n\n <input type=\"text\"\n *ngIf=\"!inline\"\n #dateInput\n [readonly]=\"readonly\"\n name=\"dateInput\"\n (blur)=\"onBlur($event)\"\n id=\"dateInput\"\n (focus)=\"showCalendar = false\"\n [value]=\"value | date: displayFormat\"\n class=\"detapicker-input\"\n [ngClass]=\"{'cursor-not-allowed': disabled}\"\n [placeholder]=\"disabled ? '' : placeholder\">\n\n <button type=\"button\"\n *ngIf=\"!inline\"\n class=\"datepicker-button\"\n [disabled]=\"disabled\"\n (click)=\"openCalendar()\"\n [ngClass]=\"{'cursor-not-allowed': disabled}\">\n <i class=\"ms-Icon ms-Icon--DateTime2\"></i>\n </button>\n\n <div *ngIf=\"showCalendar || inline\"\n [ngClass]=\"{'absolute': !inline}\"\n class=\"datepicker-background\"\n style=\"height:18rem;min-width:16rem;\"\n name=\"calendar\">\n <div class=\"datepicker-btn-wrapper\">\n <div>\n <button type=\"button\"\n (click)=\"openYears()\">\n <span class=\"datepicker-selected-month\">\n {{monthNames[month]}}\n </span>\n <span class=\"datepicker-selected-year\">\n {{year}}</span>\n </button>\n </div>\n <div *ngIf=\"!showYears; else showYearsPickerTmpl\">\n <button type=\"button\"\n class=\"datepicker-nav-btn\"\n (click)=\"previousMonth();\">\n <svg fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n <button type=\"button\"\n class=\"datepicker-nav-btn\"\n (click)=\"nextMonth()\">\n <svg fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n <ng-template #showYearsPickerTmpl>\n <div>\n <button type=\"button\"\n class=\"datepicker-nav-btn\"\n (click)=\"previousYear();\">\n <svg fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n <button type=\"button\"\n class=\"datepicker-nav-btn\"\n (click)=\"nextYear()\">\n <svg fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div class=\"datepicker-wrapper\"\n *ngIf=\"!showYears; else showCalYearsTmpl\">\n <div *ngFor=\"let day of dayNames\"\n class=\"datepicker-day-name\"\n style=\"width: 14.28%\">{{day}}</div>\n </div>\n\n <ng-template #showCalYearsTmpl>\n <div class=\"datepicker-content-wrapper\">\n <div *ngFor=\"let year of showCalendarYears\"\n style=\"width: 18.28%\"\n class=\"px-1 mb-1\">\n <div (click)=\"selectYearValue(year)\"\n class=\"datepicker-year\"\n [class]=\"year.selected ? 'selected' : 'not-selected'\">\n {{year.year}}</div>\n </div>\n </div>\n </ng-template>\n\n <div class=\"datepicker-content-wrapper\"\n *ngIf=\"!showYears\">\n <div *ngFor=\"let blankday of blankDays\"\n style=\"width: 14.28%\"\n class=\"datepicker-blank-days\">{{blankday}}</div>\n <div *ngFor=\"let date of calendarDates;\"\n style=\"width: 14.28%\"\n class=\"px-1 mb-1\">\n <div (click)=\"selectDateValue(date)\"\n class=\"datepicker-days\"\n [ngClass]=\"{'out-of-range': outOfRangeDate(date),'selected': date.selected, 'not-selected':!date.selected }\">\n {{date.day}}</div>\n </div>\n </div>\n </div>\n\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
1099
1121
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DatepickerComponent, decorators: [{
1100
1122
  type: Component,
1101
1123
  args: [{ selector: 'lib-date-picker', providers: [
@@ -1104,11 +1126,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
1104
1126
  useExisting: forwardRef(() => DatepickerComponent),
1105
1127
  multi: true
1106
1128
  }
1107
- ], template: "<div class=\"relative flex\"\n (clickOutside)=\"closeCalendar()\">\n\n <input type=\"text\"\n #dateInput\n [readonly]=\"readonly\"\n name=\"dateInput\"\n (blur)=\"onBlur($event)\"\n id=\"dateInput\"\n (focus)=\"showCalendar = false\"\n [value]=\"value | date: displayFormat\"\n class=\"w-full focus:ring-0 focus:outline-none rounded-none sm:text-sm border-gray-300 focus:border-0\"\n [ngClass]=\"{'cursor-not-allowed': disabled}\"\n [placeholder]=\"disabled ? '' : placeholder\">\n\n <button type=\"button\"\n class=\"relative inline-flex items-center px-2 py-2 border border-gray-300 text-sm font-medium rounded-r-sm text-gray-700 bg-gray-50 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-gray-500 focus:border-gray-500\"\n [disabled]=\"disabled\"\n (click)=\"openCalendar()\"\n [ngClass]=\"{'cursor-not-allowed': disabled}\">\n <i class=\"ms-Icon ms-Icon--DateTime2\"></i>\n </button>\n\n <div *ngIf=\"showCalendar\"\n class=\"bg-gray-100 mt-10 rounded-sm shadow-md p-4 absolute left-0 z-50 w-full\"\n style=\"height:18rem;min-width:16rem;\"\n name=\"calendar\">\n <div class=\"flex justify-between items-center mb-2\">\n <div>\n <button type=\"button\"\n (click)=\"openYears()\">\n <span class=\"text-lg font-bold text-gray-800\">\n {{monthNames[month]}}\n </span>\n <span class=\"ml-1 text-lg text-gray-600 font-normal\">\n {{year}}</span>\n </button>\n </div>\n <div *ngIf=\"!showYears; else showYearsPickerTmpl\">\n <button type=\"button\"\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\n (click)=\"previousMonth();\">\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n <button type=\"button\"\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\n (click)=\"nextMonth()\">\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n <ng-template #showYearsPickerTmpl>\n <div>\n <button type=\"button\"\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25 w-1/2\"\n (click)=\"previousYear();\">\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n <button type=\"button\"\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25 w-1/2\"\n (click)=\"nextYear()\">\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div class=\"flex flex-wrap mb-3 -mx-1\"\n *ngIf=\"!showYears; else showCalYearsTmpl\">\n <div *ngFor=\"let day of dayNames\"\n class=\"text-gray-800 font-medium text-center text-sm uppercase\"\n style=\"width: 14.28%\">{{day}}</div>\n </div>\n\n <ng-template #showCalYearsTmpl>\n <div class=\"flex flex-wrap -mx-1 items-center\">\n <div *ngFor=\"let year of showCalendarYears\"\n style=\"width: 18.28%\"\n class=\"px-1 mb-1\">\n <div (click)=\"selectYearValue(year)\"\n class=\"cursor-pointer text-center hover:text-blue-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\n [class]=\"year.selected ? 'bg-gray-700 text-blue-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{year.year}}</div>\n </div>\n </div>\n </ng-template>\n\n <div class=\"flex flex-wrap -mx-1 items-center\"\n *ngIf=\"!showYears\">\n <div *ngFor=\"let blankday of blankDays\"\n style=\"width: 14.28%\"\n class=\"text-center border p-1 border-transparent text-sm opacity-50\">{{blankday}}</div>\n <div *ngFor=\"let date of calendarDates\"\n style=\"width: 14.28%\"\n class=\"px-1 mb-1\">\n <div (click)=\"selectDateValue(date)\"\n class=\"cursor-pointer text-center hover:text-blue-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\n [class]=\"date.selected ? 'bg-gray-700 text-blue-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{date.day}}</div>\n </div>\n </div>\n </div>\n\n</div>" }]
1108
- }], ctorParameters: function () { return []; }, propDecorators: { readonly: [{
1129
+ ], template: "<div class=\"flex\"\n [ngClass]=\"{'relative': !inline}\"\n (clickOutside)=\"closeCalendar()\">\n\n <input type=\"text\"\n *ngIf=\"!inline\"\n #dateInput\n [readonly]=\"readonly\"\n name=\"dateInput\"\n (blur)=\"onBlur($event)\"\n id=\"dateInput\"\n (focus)=\"showCalendar = false\"\n [value]=\"value | date: displayFormat\"\n class=\"detapicker-input\"\n [ngClass]=\"{'cursor-not-allowed': disabled}\"\n [placeholder]=\"disabled ? '' : placeholder\">\n\n <button type=\"button\"\n *ngIf=\"!inline\"\n class=\"datepicker-button\"\n [disabled]=\"disabled\"\n (click)=\"openCalendar()\"\n [ngClass]=\"{'cursor-not-allowed': disabled}\">\n <i class=\"ms-Icon ms-Icon--DateTime2\"></i>\n </button>\n\n <div *ngIf=\"showCalendar || inline\"\n [ngClass]=\"{'absolute': !inline}\"\n class=\"datepicker-background\"\n style=\"height:18rem;min-width:16rem;\"\n name=\"calendar\">\n <div class=\"datepicker-btn-wrapper\">\n <div>\n <button type=\"button\"\n (click)=\"openYears()\">\n <span class=\"datepicker-selected-month\">\n {{monthNames[month]}}\n </span>\n <span class=\"datepicker-selected-year\">\n {{year}}</span>\n </button>\n </div>\n <div *ngIf=\"!showYears; else showYearsPickerTmpl\">\n <button type=\"button\"\n class=\"datepicker-nav-btn\"\n (click)=\"previousMonth();\">\n <svg fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n <button type=\"button\"\n class=\"datepicker-nav-btn\"\n (click)=\"nextMonth()\">\n <svg fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n <ng-template #showYearsPickerTmpl>\n <div>\n <button type=\"button\"\n class=\"datepicker-nav-btn\"\n (click)=\"previousYear();\">\n <svg fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n <button type=\"button\"\n class=\"datepicker-nav-btn\"\n (click)=\"nextYear()\">\n <svg fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\">\n <path stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div class=\"datepicker-wrapper\"\n *ngIf=\"!showYears; else showCalYearsTmpl\">\n <div *ngFor=\"let day of dayNames\"\n class=\"datepicker-day-name\"\n style=\"width: 14.28%\">{{day}}</div>\n </div>\n\n <ng-template #showCalYearsTmpl>\n <div class=\"datepicker-content-wrapper\">\n <div *ngFor=\"let year of showCalendarYears\"\n style=\"width: 18.28%\"\n class=\"px-1 mb-1\">\n <div (click)=\"selectYearValue(year)\"\n class=\"datepicker-year\"\n [class]=\"year.selected ? 'selected' : 'not-selected'\">\n {{year.year}}</div>\n </div>\n </div>\n </ng-template>\n\n <div class=\"datepicker-content-wrapper\"\n *ngIf=\"!showYears\">\n <div *ngFor=\"let blankday of blankDays\"\n style=\"width: 14.28%\"\n class=\"datepicker-blank-days\">{{blankday}}</div>\n <div *ngFor=\"let date of calendarDates;\"\n style=\"width: 14.28%\"\n class=\"px-1 mb-1\">\n <div (click)=\"selectDateValue(date)\"\n class=\"datepicker-days\"\n [ngClass]=\"{'out-of-range': outOfRangeDate(date),'selected': date.selected, 'not-selected':!date.selected }\">\n {{date.day}}</div>\n </div>\n </div>\n </div>\n\n</div>" }]
1130
+ }], ctorParameters: function () {
1131
+ return [{ type: undefined, decorators: [{
1132
+ type: Inject,
1133
+ args: [LOCALE_ID]
1134
+ }] }];
1135
+ }, propDecorators: { readonly: [{
1109
1136
  type: Input
1110
1137
  }], disabled: [{
1111
1138
  type: Input
1139
+ }], inline: [{
1140
+ type: Input
1112
1141
  }], displayFormat: [{
1113
1142
  type: Input,
1114
1143
  args: ['display-format']
@@ -1121,6 +1150,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
1121
1150
  }], dateInput: [{
1122
1151
  type: ViewChild,
1123
1152
  args: ['dateInput']
1153
+ }], minDate: [{
1154
+ type: Input
1155
+ }], maxDate: [{
1156
+ type: Input
1124
1157
  }] } });
1125
1158
 
1126
1159
  class ToasterService {
@@ -2813,6 +2846,7 @@ class AuthCallbackComponent {
2813
2846
  this.authService.signinRedirectCallback().subscribe((user) => {
2814
2847
  var _a;
2815
2848
  if (user) {
2849
+ debugger;
2816
2850
  this.router.navigateByUrl(((_a = user.state) === null || _a === void 0 ? void 0 : _a.url) || '/');
2817
2851
  }
2818
2852
  });