@norwegian/core-components 6.50.0 → 6.51.0
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.
- package/assets/documentation/autocomplete-new/autocomplete-new.md +1 -0
- package/esm2022/lib/components/autocomplete-new/autocomplete-new.component.mjs +307 -0
- package/esm2022/lib/components/autocomplete-new/autocomplete-new.module.mjs +43 -0
- package/esm2022/lib/components/autocomplete-new/index.mjs +3 -0
- package/esm2022/lib/components/autocomplete-new/models/autocomplete-new.model.mjs +2 -0
- package/esm2022/lib/components/datepicker/index.mjs +1 -2
- package/esm2022/lib/components/datepicker-combo-new/datepicker-combo-new.component.mjs +390 -0
- package/esm2022/lib/components/datepicker-combo-new/datepicker-combo-new.module.mjs +31 -0
- package/esm2022/lib/components/datepicker-combo-new/index.mjs +3 -0
- package/esm2022/lib/components/datepicker-new/calendar-new/calendar-date.model.mjs +2 -0
- package/esm2022/lib/components/datepicker-new/calendar-new/calendar-new.component.mjs +594 -0
- package/esm2022/lib/components/datepicker-new/calendar-new/enums/week-start.enum.mjs +6 -0
- package/esm2022/lib/components/datepicker-new/calendar-new/models/day.model.mjs +2 -0
- package/esm2022/lib/components/datepicker-new/calendar-new/models/select-option.model.mjs +2 -0
- package/esm2022/lib/components/datepicker-new/calendar-new/models/week.model.mjs +2 -0
- package/esm2022/lib/components/datepicker-new/datepicker-new.component.mjs +571 -0
- package/esm2022/lib/components/datepicker-new/datepicker-new.module.mjs +55 -0
- package/esm2022/lib/components/datepicker-new/index.mjs +5 -0
- package/esm2022/lib/components/datepicker-new/services/calendar.service.mjs +215 -0
- package/esm2022/lib/components/index.mjs +4 -1
- package/fesm2022/norwegian-core-components.mjs +2333 -203
- package/fesm2022/norwegian-core-components.mjs.map +1 -1
- package/lib/components/autocomplete-new/autocomplete-new.component.d.ts +134 -0
- package/lib/components/autocomplete-new/autocomplete-new.module.d.ts +13 -0
- package/lib/components/autocomplete-new/index.d.ts +2 -0
- package/lib/components/autocomplete-new/models/autocomplete-new.model.d.ts +5 -0
- package/lib/components/datepicker/index.d.ts +0 -1
- package/lib/components/datepicker-combo-new/datepicker-combo-new.component.d.ts +302 -0
- package/lib/components/datepicker-combo-new/datepicker-combo-new.module.d.ts +10 -0
- package/lib/components/datepicker-combo-new/index.d.ts +2 -0
- package/lib/components/datepicker-new/calendar-new/calendar-date.model.d.ts +5 -0
- package/lib/components/datepicker-new/calendar-new/calendar-new.component.d.ts +159 -0
- package/lib/components/datepicker-new/calendar-new/enums/week-start.enum.d.ts +4 -0
- package/lib/components/datepicker-new/calendar-new/models/day.model.d.ts +10 -0
- package/lib/components/datepicker-new/calendar-new/models/select-option.model.d.ts +4 -0
- package/lib/components/datepicker-new/calendar-new/models/week.model.d.ts +5 -0
- package/lib/components/datepicker-new/datepicker-new.component.d.ts +272 -0
- package/lib/components/datepicker-new/datepicker-new.module.d.ts +16 -0
- package/lib/components/datepicker-new/index.d.ts +4 -0
- package/lib/components/datepicker-new/services/calendar.service.d.ts +27 -0
- package/lib/components/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1120,7 +1120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
1120
1120
|
* @license
|
|
1121
1121
|
* Copyright Norwegian Air Shuttle. All Rights Reserved.
|
|
1122
1122
|
*/
|
|
1123
|
-
let nextId$
|
|
1123
|
+
let nextId$h = 0;
|
|
1124
1124
|
/**
|
|
1125
1125
|
* @description
|
|
1126
1126
|
* Norwegian Button Component | Buttons and Indicators
|
|
@@ -1196,7 +1196,7 @@ class ButtonComponent extends NasComponentBase {
|
|
|
1196
1196
|
this.clickChange = new EventEmitter();
|
|
1197
1197
|
this.trackingEventSource = new Subject();
|
|
1198
1198
|
this.trackingEvent$ = this.trackingEventSource.asObservable();
|
|
1199
|
-
this.componentId = nextId$
|
|
1199
|
+
this.componentId = nextId$h++;
|
|
1200
1200
|
}
|
|
1201
1201
|
getClasses(element, modifiers) {
|
|
1202
1202
|
const classes = new Array();
|
|
@@ -1284,7 +1284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
1284
1284
|
* @license
|
|
1285
1285
|
* Copyright Norwegian Air Shuttle. All Rights Reserved.
|
|
1286
1286
|
*/
|
|
1287
|
-
let nextId$
|
|
1287
|
+
let nextId$g = 0;
|
|
1288
1288
|
class AirportSelectDropdownComponent extends NasComponentBase {
|
|
1289
1289
|
get closestAirports() {
|
|
1290
1290
|
return this.closestAirportsValue;
|
|
@@ -1378,7 +1378,7 @@ class AirportSelectDropdownComponent extends NasComponentBase {
|
|
|
1378
1378
|
this.focusOnNext = new EventEmitter();
|
|
1379
1379
|
this.focusOnPrevious = new EventEmitter();
|
|
1380
1380
|
this.positionChange = new EventEmitter();
|
|
1381
|
-
this.componentId = nextId$
|
|
1381
|
+
this.componentId = nextId$g++;
|
|
1382
1382
|
}
|
|
1383
1383
|
ngOnInit() {
|
|
1384
1384
|
if (!this.ariaLabelClear) {
|
|
@@ -2444,7 +2444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
2444
2444
|
}]
|
|
2445
2445
|
}] });
|
|
2446
2446
|
|
|
2447
|
-
let nextId$
|
|
2447
|
+
let nextId$f = 0;
|
|
2448
2448
|
/**
|
|
2449
2449
|
* @description
|
|
2450
2450
|
* Norwegian Checkbox Component | Form Controls
|
|
@@ -2505,7 +2505,7 @@ class CheckboxComponent extends NasComponentBase {
|
|
|
2505
2505
|
this.value = '';
|
|
2506
2506
|
this.checkedChange = new EventEmitter();
|
|
2507
2507
|
this.focusOnPrevious = new EventEmitter();
|
|
2508
|
-
this.componentId = nextId$
|
|
2508
|
+
this.componentId = nextId$f++;
|
|
2509
2509
|
}
|
|
2510
2510
|
ngOnInit() {
|
|
2511
2511
|
if (this.nasFormGroup && this.nasFormControlName) {
|
|
@@ -2674,7 +2674,7 @@ function Debounce(delay = 300) {
|
|
|
2674
2674
|
};
|
|
2675
2675
|
}
|
|
2676
2676
|
|
|
2677
|
-
let nextId$
|
|
2677
|
+
let nextId$e = 0;
|
|
2678
2678
|
/**
|
|
2679
2679
|
* @description
|
|
2680
2680
|
* Norwegian continue Component | Layout
|
|
@@ -2762,7 +2762,7 @@ class ContinueComponent extends NasComponentBase {
|
|
|
2762
2762
|
this.scrolledPast = false;
|
|
2763
2763
|
this.contentHeight = 0;
|
|
2764
2764
|
this.animateUp = false;
|
|
2765
|
-
this.componentId = nextId$
|
|
2765
|
+
this.componentId = nextId$e++;
|
|
2766
2766
|
this.updateHeight = this.updateHeight.bind(this);
|
|
2767
2767
|
this.checkPosition = this.checkPosition.bind(this);
|
|
2768
2768
|
this.onScroll = this.onScroll.bind(this);
|
|
@@ -2967,7 +2967,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
2967
2967
|
}]
|
|
2968
2968
|
}] });
|
|
2969
2969
|
|
|
2970
|
-
let nextId$
|
|
2970
|
+
let nextId$d = 0;
|
|
2971
2971
|
/**
|
|
2972
2972
|
* @description
|
|
2973
2973
|
* Norwegian Dropdown Component | Form Controls
|
|
@@ -2995,7 +2995,7 @@ class DropdownComponent extends NasComponentBase {
|
|
|
2995
2995
|
* An event that is fired every time the dropdown is toggled.
|
|
2996
2996
|
*/
|
|
2997
2997
|
this.openChange = new EventEmitter();
|
|
2998
|
-
this.componentId = nextId$
|
|
2998
|
+
this.componentId = nextId$d++;
|
|
2999
2999
|
}
|
|
3000
3000
|
ngOnInit() {
|
|
3001
3001
|
if (!this.ariaLabelBackdrop) {
|
|
@@ -3807,7 +3807,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
3807
3807
|
type: Input
|
|
3808
3808
|
}] } });
|
|
3809
3809
|
|
|
3810
|
-
let nextId$
|
|
3810
|
+
let nextId$c = 0;
|
|
3811
3811
|
/**
|
|
3812
3812
|
* @description
|
|
3813
3813
|
* Norwegian Select Component | Form Controls
|
|
@@ -3870,7 +3870,7 @@ class SelectComponent extends NasComponentBase {
|
|
|
3870
3870
|
*/
|
|
3871
3871
|
this.keydown = new EventEmitter();
|
|
3872
3872
|
this.open = false;
|
|
3873
|
-
this.componentId = nextId$
|
|
3873
|
+
this.componentId = nextId$c++;
|
|
3874
3874
|
}
|
|
3875
3875
|
ngOnChanges() {
|
|
3876
3876
|
if (this.selectedValue) {
|
|
@@ -4203,13 +4203,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
4203
4203
|
type: Input
|
|
4204
4204
|
}] } });
|
|
4205
4205
|
|
|
4206
|
-
var WeekStart;
|
|
4206
|
+
var WeekStart$1;
|
|
4207
4207
|
(function (WeekStart) {
|
|
4208
4208
|
WeekStart[WeekStart["monday"] = 0] = "monday";
|
|
4209
4209
|
WeekStart[WeekStart["sunday"] = 1] = "sunday";
|
|
4210
|
-
})(WeekStart || (WeekStart = {}));
|
|
4210
|
+
})(WeekStart$1 || (WeekStart$1 = {}));
|
|
4211
4211
|
|
|
4212
|
-
class CalendarService {
|
|
4212
|
+
let CalendarService$1 = class CalendarService {
|
|
4213
4213
|
constructor(datePipe, dateService) {
|
|
4214
4214
|
this.datePipe = datePipe;
|
|
4215
4215
|
this.dateService = dateService;
|
|
@@ -4232,7 +4232,7 @@ class CalendarService {
|
|
|
4232
4232
|
const currentDay = new Date(Date.UTC(weekday.getFullYear(), weekday.getMonth(), weekday.getDate() + index));
|
|
4233
4233
|
weekdays.push(this.datePipe.transform(currentDay, 'EEE', 'UTC', locale));
|
|
4234
4234
|
}
|
|
4235
|
-
if (weekStart !== WeekStart.monday) {
|
|
4235
|
+
if (weekStart !== WeekStart$1.monday) {
|
|
4236
4236
|
const sunday = weekdays.pop();
|
|
4237
4237
|
weekdays.unshift(sunday);
|
|
4238
4238
|
}
|
|
@@ -4291,7 +4291,7 @@ class CalendarService {
|
|
|
4291
4291
|
const currentDate = this.dateService.utcDate(currentDayModel.date);
|
|
4292
4292
|
currentDayModel.isEmpty = currentDayModel.isAvailable;
|
|
4293
4293
|
let currentDay = currentDate.getDay();
|
|
4294
|
-
if (weekStart === WeekStart.monday) {
|
|
4294
|
+
if (weekStart === WeekStart$1.monday) {
|
|
4295
4295
|
if (currentDay === 0) {
|
|
4296
4296
|
currentDay = 6;
|
|
4297
4297
|
}
|
|
@@ -4408,8 +4408,8 @@ class CalendarService {
|
|
|
4408
4408
|
}
|
|
4409
4409
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarService, deps: [{ token: i1.DatePipe }, { token: DateHelper }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4410
4410
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarService, providedIn: 'root' }); }
|
|
4411
|
-
}
|
|
4412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarService, decorators: [{
|
|
4411
|
+
};
|
|
4412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarService$1, decorators: [{
|
|
4413
4413
|
type: Injectable,
|
|
4414
4414
|
args: [{
|
|
4415
4415
|
providedIn: 'root'
|
|
@@ -4574,7 +4574,7 @@ class CalendarComponent extends NasComponentBase {
|
|
|
4574
4574
|
* @description
|
|
4575
4575
|
* Desides if the week should start on a monday or sunday. Defaults to monday.
|
|
4576
4576
|
*/
|
|
4577
|
-
this.weekStart = WeekStart.monday;
|
|
4577
|
+
this.weekStart = WeekStart$1.monday;
|
|
4578
4578
|
/**
|
|
4579
4579
|
* @description
|
|
4580
4580
|
* A locale code for the locale format rules to use. When not supplied, uses the value of LOCALE_ID, which is en-US by default.
|
|
@@ -4906,7 +4906,7 @@ class CalendarComponent extends NasComponentBase {
|
|
|
4906
4906
|
this.calendarService.updateAvailableDaysWithSelectedDate(this.availableDays, this.selectedDate);
|
|
4907
4907
|
this.weeks = this.calendarService.getWeeks(this.availableDays, this.weekStart);
|
|
4908
4908
|
}
|
|
4909
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarComponent, deps: [{ token: DateHelper }, { token: i1.DatePipe }, { token: CalendarService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4909
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarComponent, deps: [{ token: DateHelper }, { token: i1.DatePipe }, { token: CalendarService$1 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4910
4910
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: CalendarComponent, selector: "nas-calendar", inputs: { noAvailableFlightsLabel: "noAvailableFlightsLabel", availableFlightsLabel: "availableFlightsLabel", disablePastSelection: "disablePastSelection", lowerLimitDate: "lowerLimitDate", date: "date", weekStart: "weekStart", displayWeekNumbers: "displayWeekNumbers", availability: "availability", locale: "locale", availableDates: "availableDates", activeDate: "activeDate", selectedDate: "selectedDate", nasFormGroup: "nasFormGroup", nasFormControlName: "nasFormControlName", dateDisplayFormat: "dateDisplayFormat", ariaLabelPreviousMonth: "ariaLabelPreviousMonth", ariaLabelNextMonth: "ariaLabelNextMonth" }, outputs: { monthChange: "monthChange", focusOnNextChange: "focusOnNextChange", selectedDateChange: "selectedDateChange", activeDateChange: "activeDateChange" }, viewQueries: [{ propertyName: "previousMonthRef", first: true, predicate: ["previousMonthRef"], descendants: true }, { propertyName: "nextMonthRef", first: true, predicate: ["nextMonthRef"], descendants: true }, { propertyName: "calendarContent", first: true, predicate: ["calendarContent"], descendants: true }, { propertyName: "monthSelectRef", first: true, predicate: ["monthSelect"], descendants: true }, { propertyName: "tableCells", predicate: ["tableCells"], descendants: true }, { propertyName: "dateButtons", predicate: ["dateButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [nasClass]=\"getClass()\">\n <span [nasClass]=\"getClass('arrow')\"></span>\n <div #calendarContent\n tabindex=\"0\"\n [nasClass]=\"getClass('content')\">\n <header [nasClass]=\"getClass('header')\">\n <button type=\"button\"\n #previousMonthRef\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelPreviousMonth\"\n [nasClass]=\"getClass('nav')\"\n [disabled]=\"isPreviousMonthDisabled === true\"\n (keydown)=\"onPreviousMonthKeydown($event)\"\n (mousedown)=\"onPreviousMonthMousedown()\">\n <nas-icon tabindex=\"-1\"\n [type]=\"'arrow-left--light'\"></nas-icon>\n </button>\n <ng-container *ngIf=\"months?.length > 0; else currentMonthTemplate\">\n <nas-select #monthSelect\n [cssClass]=\"getClass('month')\"\n [inline]=\"true\"\n [simple]=\"true\"\n [options]=\"months\"\n [(selected)]=\"selectedMonth\"\n (keydown)=\"onMonthSelectKeydown($event)\"></nas-select>\n </ng-container>\n <ng-template #currentMonthTemplate>\n {{currentMonthModel}}\n </ng-template>\n <button type=\"button\"\n tabindex=\"0\"\n #nextMonthRef\n [nasClass]=\"getClass('nav')\"\n [attr.aria-label]=\"ariaLabelNextMonth\"\n [disabled]=\"nextMonthDisabled\"\n (keydown)=\"onNextMonthKeydown($event)\"\n (mousedown)=\"onNextMonthMousedown()\">\n <nas-icon [type]=\"'arrow-right--light'\"></nas-icon>\n </button>\n </header>\n <table [nasClass]=\"getClass('table')\">\n <thead>\n <tr>\n <th *ngIf=\"exists(displayWeekNumbers)\"\n [nasClass]=\"getClass('week-number')\"></th>\n <th [nasClass]=\"getClass('cell')\"\n *ngFor=\"let weekday of weekdays\">\n <div [nasClass]=\"getClass('item', 'header')\">{{weekday}}</div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let week of weeks\"\n [nasClass]=\"getClass('row', 'animate')\">\n <td *ngIf=\"exists(displayWeekNumbers)\"\n [nasClass]=\"getClass('week-number')\">\n <span [nasClass]=\"getClass('date', 'week-number')\">{{week.weekNumber}}</span>\n </td>\n <td [nasClass]=\"getClass('cell')\"\n *ngFor=\"let day of week?.days\"\n #tableCells>\n <div [nasClass]=\"getClass('item', 'dummy')\"\n *ngIf=\"day === null; else dayTemplate\"></div>\n <ng-template #dayTemplate\n tabindex=\"0\">\n <button type=\"button\"\n #dateButton\n (keydown)=\"dateKeyDown($event)\"\n tabIndex=\"0\"\n [nasClass]=\"getCellButtonClass(day)\"\n (mousedown)=\"onMouseDown(day.date, $event)\"\n (click)=\"onDayClick(day)\"\n (focus)=\"onDayFocus(day)\">\n <div [nasClass]=\"getClass('date-wrapper')\">\n <span [nasClass]=\"getClass('date')\"\n [attr.aria-label]=\"day.date | date : 'dd':'UTC'\">{{day.date | date : 'dd':'UTC':locale}}</span>\n </div>\n </button>\n </ng-template>\n </td>\n </tr>\n </tbody>\n </table>\n <div [nasClass]=\"getClass('footer')\">\n <div *ngIf=\"availableDates?.length === 0 && noAvailableFlightsLabel\"\n [nasClass]=\"getClass('footer', 'item')\">\n <nas-icon [icon]=\"'alert'\"></nas-icon>\n {{noAvailableFlightsLabel}}\n </div>\n <div *ngIf=\"availableDates?.length > 0 && noAvailableFlightsLabel && availableFlightsLabel\"\n [nasClass]=\"getClass('footer', 'item')\">\n <div [nasClass]=\"getClass('item', 'available')\"></div>\n <div [nasClass]=\"getClass('footer', 'label')\">{{availableFlightsLabel}}</div>\n <span [nasClass]=\"getClass('item', 'unavailable')\"></span>\n <div [nasClass]=\"getClass('footer', 'label')\">{{noAvailableFlightsLabel}}</div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-calendar{max-width:375px;float:right;border:3px solid #15273f;padding:10px;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:flip-in .55s ease both;margin-top:3px;position:relative}.nas-calendar__content:active{outline:none;box-shadow:none}.nas-calendar__content:focus{outline:none;box-shadow:none}@media (min-width: 640px){.nas-calendar{margin-right:15px}}.nas-calendar__cover{margin-bottom:16px}.nas-calendar__header{position:relative;display:flex;justify-content:center;height:48px}.nas-calendar__month{max-width:200px;margin:0 auto 21px}.nas-calendar__table{table-layout:fixed;width:100%}.nas-calendar__week-number{font-size:14px;line-height:20px;position:relative;width:20px;display:none}@media (min-width: 640px){.nas-calendar__week-number{display:table-cell}}.nas-calendar__cell{padding:0}.nas-calendar__nav{position:absolute;margin:0 2px 12px;flex-shrink:0;width:24px;height:24px;border-radius:50%;background-color:#15273f;transition:transform .2s cubic-bezier(0,0,.1,1),opacity .2s ease-out}.nas-calendar__nav .nas-icon-arrow-left--light,.nas-calendar__nav .nas-icon-arrow-right--light{position:absolute;top:50%;left:50%}.nas-calendar__nav .nas-icon-arrow-left--light{transform:translate(-60%,-50%)}.nas-calendar__nav .nas-icon-arrow-right--light{transform:translate(-40%,-50%)}.nas-calendar__nav:first-child{left:0}.nas-calendar__nav:last-child{right:0}.nas-calendar__nav:hover,.nas-calendar__nav:focus{background-color:#002a3a;outline:none;border:3px solid #3b99fc}.nas-calendar__nav:active{transform:translateY(2px)}.nas-calendar__nav[disabled]{pointer-events:none;opacity:.5}.nas-calendar__item{font-size:14px;line-height:20px;display:flex;flex-direction:column;cursor:pointer;overflow:hidden;width:100%;height:36px;text-align:left;outline:0;padding:2px;border:1px solid #fff;transition:transform .17s cubic-bezier(0,0,.1,1);border-radius:0;align-items:center;justify-content:center;pointer-events:none;opacity:.5;background-color:#fff}.nas-calendar__item .nas-calendar__date{color:#002a3a}@media (min-width: 640px){.nas-calendar__item{padding:2px 6px}}@media (min-width: 1000px){.nas-calendar__item{padding:2px 3px}}@media (min-width: 1180px){.nas-calendar__item{padding:2px 6px}}.nas-calendar__item--large{height:36px}.nas-calendar__item--header{pointer-events:none;height:auto;background-color:transparent;border:0;opacity:1}@media (min-width: 640px){.nas-calendar__item--header{padding-left:11px}}.nas-calendar__item--dummy{visibility:hidden}.nas-calendar__item--today .nas-calendar__date{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:#002a3a}.nas-calendar__item--cheapest{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:#e5212d}.nas-calendar__item--empty{pointer-events:none;opacity:.3;border-color:#fff;background-color:#fff}.nas-calendar__item--empty .nas-calendar__date{color:inherit}.nas-calendar__item--available{pointer-events:all;opacity:1;border-color:#fff;background-color:#c3c3c3}.nas-calendar__item--available .nas-calendar__date{color:#002a3a}.nas-calendar__item--active{border-color:#15273f;border-width:3px}.nas-calendar__item--before{pointer-events:none;color:#a9a9a9;opacity:.55}.nas-calendar__item:hover,.nas-calendar__item:focus{border-color:#15273f;border-width:3px;box-shadow:inset 0 0 2px #c3c3c3,inset 0 0 2px 3px #3b99fc}.nas-calendar__item:active{transform:translateY(3px)}.nas-calendar__item--selected,.nas-calendar__item:active{color:#fff;background-color:#e5212d}.nas-calendar__item--selected:hover,.nas-calendar__item--selected:focus,.nas-calendar__item:active:hover,.nas-calendar__item:active:focus{border-color:#15273f;border-width:3px}.nas-calendar__item--selected .nas-calendar__date,.nas-calendar__item:active .nas-calendar__date{color:inherit}.nas-calendar__item--sold-out{pointer-events:none;opacity:.8;border-color:#fff;background-color:#fff}.nas-calendar__item--sold-out .nas-calendar__date{color:#002a3a}.nas-calendar__item[disabled]{pointer-events:none}.nas-calendar__date{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;color:#6f6f6f}.nas-calendar__date--week-number{top:6px;right:6px}.nas-calendar__price{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:inherit;letter-spacing:-.04em}@media (min-width: 640px){.nas-calendar__price{font-size:14px;line-height:1.1}}@media (min-width: 1280px){.nas-calendar__price{font-size:16px}}.nas-calendar__price--before{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;text-decoration:line-through;font-size:.8em;line-height:1}@media (min-width: 1000px){.nas-calendar__price--before{margin-bottom:2px}}.nas-calendar__sold-out{position:absolute;bottom:2px;left:2px;line-height:1;overflow-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto;letter-spacing:-.015em;color:#8c8c8c;font-size:.75em}@media (min-width: 640px){.nas-calendar__sold-out{font-size:.9em;bottom:6px;left:6px}}@media (min-width: 1000px){.nas-calendar__sold-out{left:3px}}@media (min-width: 1180px){.nas-calendar__sold-out{left:6px}}.nas-calendar__transit{position:relative;display:flex;max-width:3.8em;width:calc(100% - 12px);padding:0 .5em 0 .3em;height:8px;justify-content:space-around;margin-bottom:2px;transform:scale(.85);transform-origin:left;background-color:inherit}@media (min-width: 640px){.nas-calendar__transit{transform:none;padding:0 .5em 0 .3em;margin-bottom:3px}}.nas-calendar__transit:before,.nas-calendar__transit:after{content:\"\";position:absolute}.nas-calendar__transit:before{top:calc(50% - 1px);width:100%;left:0;height:2px;background-color:currentColor}.nas-calendar__transit:after{width:8px;height:8px;right:0;border-right:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg)}.nas-calendar__transit-indicator{position:relative;width:8px;height:8px;flex-shrink:0;border-radius:50%;border:2px solid currentColor;background-color:#fff}.nas-calendar__asterisk{font-size:.67em;top:-.36em;margin-left:.1em}.nas-calendar__footer{display:flex;justify-content:center}.nas-calendar__footer .nas-calendar__item{width:25px;height:25px;margin-right:3px}.nas-calendar__footer .nas-calendar__item--unavailable{border:1px solid #15273f}.nas-calendar__footer--item{margin-top:12px}.nas-calendar__footer--label{flex-shrink:0;margin-right:12px;display:flex;flex-direction:column;justify-content:center;font-size:14px;line-height:20px}.nas-calendar__arrow{position:absolute;width:16px;height:16px;top:-10px;left:calc(50% - 8px);background-color:inherit;transform:rotate(45deg);border-top:3px solid #15273f;border-left:3px solid #15273f}@keyframes lowfare-item-in{0%{opacity:0;transform:scale(0)}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SelectComponent, selector: "nas-select", inputs: ["id", "inline", "label", "block", "spaceless", "stretch", "compact", "simple", "light", "fill", "error", "errorMessage", "disabled", "autogrow", "cssClass", "nasFormControlName", "nasFormGroup", "options", "selectedValue", "selected"], outputs: ["selectedChange", "keydown"] }, { kind: "component", type: IconComponent, selector: "nas-icon", inputs: ["icon", "type", "isIndicator", "lightCircularBackground", "cssClass"] }, { kind: "directive", type: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
4911
4911
|
}
|
|
4912
4912
|
__decorate([
|
|
@@ -4924,7 +4924,7 @@ __decorate([
|
|
|
4924
4924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
4925
4925
|
type: Component,
|
|
4926
4926
|
args: [{ selector: 'nas-calendar', encapsulation: ViewEncapsulation.None, template: "<div [nasClass]=\"getClass()\">\n <span [nasClass]=\"getClass('arrow')\"></span>\n <div #calendarContent\n tabindex=\"0\"\n [nasClass]=\"getClass('content')\">\n <header [nasClass]=\"getClass('header')\">\n <button type=\"button\"\n #previousMonthRef\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelPreviousMonth\"\n [nasClass]=\"getClass('nav')\"\n [disabled]=\"isPreviousMonthDisabled === true\"\n (keydown)=\"onPreviousMonthKeydown($event)\"\n (mousedown)=\"onPreviousMonthMousedown()\">\n <nas-icon tabindex=\"-1\"\n [type]=\"'arrow-left--light'\"></nas-icon>\n </button>\n <ng-container *ngIf=\"months?.length > 0; else currentMonthTemplate\">\n <nas-select #monthSelect\n [cssClass]=\"getClass('month')\"\n [inline]=\"true\"\n [simple]=\"true\"\n [options]=\"months\"\n [(selected)]=\"selectedMonth\"\n (keydown)=\"onMonthSelectKeydown($event)\"></nas-select>\n </ng-container>\n <ng-template #currentMonthTemplate>\n {{currentMonthModel}}\n </ng-template>\n <button type=\"button\"\n tabindex=\"0\"\n #nextMonthRef\n [nasClass]=\"getClass('nav')\"\n [attr.aria-label]=\"ariaLabelNextMonth\"\n [disabled]=\"nextMonthDisabled\"\n (keydown)=\"onNextMonthKeydown($event)\"\n (mousedown)=\"onNextMonthMousedown()\">\n <nas-icon [type]=\"'arrow-right--light'\"></nas-icon>\n </button>\n </header>\n <table [nasClass]=\"getClass('table')\">\n <thead>\n <tr>\n <th *ngIf=\"exists(displayWeekNumbers)\"\n [nasClass]=\"getClass('week-number')\"></th>\n <th [nasClass]=\"getClass('cell')\"\n *ngFor=\"let weekday of weekdays\">\n <div [nasClass]=\"getClass('item', 'header')\">{{weekday}}</div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let week of weeks\"\n [nasClass]=\"getClass('row', 'animate')\">\n <td *ngIf=\"exists(displayWeekNumbers)\"\n [nasClass]=\"getClass('week-number')\">\n <span [nasClass]=\"getClass('date', 'week-number')\">{{week.weekNumber}}</span>\n </td>\n <td [nasClass]=\"getClass('cell')\"\n *ngFor=\"let day of week?.days\"\n #tableCells>\n <div [nasClass]=\"getClass('item', 'dummy')\"\n *ngIf=\"day === null; else dayTemplate\"></div>\n <ng-template #dayTemplate\n tabindex=\"0\">\n <button type=\"button\"\n #dateButton\n (keydown)=\"dateKeyDown($event)\"\n tabIndex=\"0\"\n [nasClass]=\"getCellButtonClass(day)\"\n (mousedown)=\"onMouseDown(day.date, $event)\"\n (click)=\"onDayClick(day)\"\n (focus)=\"onDayFocus(day)\">\n <div [nasClass]=\"getClass('date-wrapper')\">\n <span [nasClass]=\"getClass('date')\"\n [attr.aria-label]=\"day.date | date : 'dd':'UTC'\">{{day.date | date : 'dd':'UTC':locale}}</span>\n </div>\n </button>\n </ng-template>\n </td>\n </tr>\n </tbody>\n </table>\n <div [nasClass]=\"getClass('footer')\">\n <div *ngIf=\"availableDates?.length === 0 && noAvailableFlightsLabel\"\n [nasClass]=\"getClass('footer', 'item')\">\n <nas-icon [icon]=\"'alert'\"></nas-icon>\n {{noAvailableFlightsLabel}}\n </div>\n <div *ngIf=\"availableDates?.length > 0 && noAvailableFlightsLabel && availableFlightsLabel\"\n [nasClass]=\"getClass('footer', 'item')\">\n <div [nasClass]=\"getClass('item', 'available')\"></div>\n <div [nasClass]=\"getClass('footer', 'label')\">{{availableFlightsLabel}}</div>\n <span [nasClass]=\"getClass('item', 'unavailable')\"></span>\n <div [nasClass]=\"getClass('footer', 'label')\">{{noAvailableFlightsLabel}}</div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-calendar{max-width:375px;float:right;border:3px solid #15273f;padding:10px;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:flip-in .55s ease both;margin-top:3px;position:relative}.nas-calendar__content:active{outline:none;box-shadow:none}.nas-calendar__content:focus{outline:none;box-shadow:none}@media (min-width: 640px){.nas-calendar{margin-right:15px}}.nas-calendar__cover{margin-bottom:16px}.nas-calendar__header{position:relative;display:flex;justify-content:center;height:48px}.nas-calendar__month{max-width:200px;margin:0 auto 21px}.nas-calendar__table{table-layout:fixed;width:100%}.nas-calendar__week-number{font-size:14px;line-height:20px;position:relative;width:20px;display:none}@media (min-width: 640px){.nas-calendar__week-number{display:table-cell}}.nas-calendar__cell{padding:0}.nas-calendar__nav{position:absolute;margin:0 2px 12px;flex-shrink:0;width:24px;height:24px;border-radius:50%;background-color:#15273f;transition:transform .2s cubic-bezier(0,0,.1,1),opacity .2s ease-out}.nas-calendar__nav .nas-icon-arrow-left--light,.nas-calendar__nav .nas-icon-arrow-right--light{position:absolute;top:50%;left:50%}.nas-calendar__nav .nas-icon-arrow-left--light{transform:translate(-60%,-50%)}.nas-calendar__nav .nas-icon-arrow-right--light{transform:translate(-40%,-50%)}.nas-calendar__nav:first-child{left:0}.nas-calendar__nav:last-child{right:0}.nas-calendar__nav:hover,.nas-calendar__nav:focus{background-color:#002a3a;outline:none;border:3px solid #3b99fc}.nas-calendar__nav:active{transform:translateY(2px)}.nas-calendar__nav[disabled]{pointer-events:none;opacity:.5}.nas-calendar__item{font-size:14px;line-height:20px;display:flex;flex-direction:column;cursor:pointer;overflow:hidden;width:100%;height:36px;text-align:left;outline:0;padding:2px;border:1px solid #fff;transition:transform .17s cubic-bezier(0,0,.1,1);border-radius:0;align-items:center;justify-content:center;pointer-events:none;opacity:.5;background-color:#fff}.nas-calendar__item .nas-calendar__date{color:#002a3a}@media (min-width: 640px){.nas-calendar__item{padding:2px 6px}}@media (min-width: 1000px){.nas-calendar__item{padding:2px 3px}}@media (min-width: 1180px){.nas-calendar__item{padding:2px 6px}}.nas-calendar__item--large{height:36px}.nas-calendar__item--header{pointer-events:none;height:auto;background-color:transparent;border:0;opacity:1}@media (min-width: 640px){.nas-calendar__item--header{padding-left:11px}}.nas-calendar__item--dummy{visibility:hidden}.nas-calendar__item--today .nas-calendar__date{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:#002a3a}.nas-calendar__item--cheapest{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:#e5212d}.nas-calendar__item--empty{pointer-events:none;opacity:.3;border-color:#fff;background-color:#fff}.nas-calendar__item--empty .nas-calendar__date{color:inherit}.nas-calendar__item--available{pointer-events:all;opacity:1;border-color:#fff;background-color:#c3c3c3}.nas-calendar__item--available .nas-calendar__date{color:#002a3a}.nas-calendar__item--active{border-color:#15273f;border-width:3px}.nas-calendar__item--before{pointer-events:none;color:#a9a9a9;opacity:.55}.nas-calendar__item:hover,.nas-calendar__item:focus{border-color:#15273f;border-width:3px;box-shadow:inset 0 0 2px #c3c3c3,inset 0 0 2px 3px #3b99fc}.nas-calendar__item:active{transform:translateY(3px)}.nas-calendar__item--selected,.nas-calendar__item:active{color:#fff;background-color:#e5212d}.nas-calendar__item--selected:hover,.nas-calendar__item--selected:focus,.nas-calendar__item:active:hover,.nas-calendar__item:active:focus{border-color:#15273f;border-width:3px}.nas-calendar__item--selected .nas-calendar__date,.nas-calendar__item:active .nas-calendar__date{color:inherit}.nas-calendar__item--sold-out{pointer-events:none;opacity:.8;border-color:#fff;background-color:#fff}.nas-calendar__item--sold-out .nas-calendar__date{color:#002a3a}.nas-calendar__item[disabled]{pointer-events:none}.nas-calendar__date{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;color:#6f6f6f}.nas-calendar__date--week-number{top:6px;right:6px}.nas-calendar__price{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:inherit;letter-spacing:-.04em}@media (min-width: 640px){.nas-calendar__price{font-size:14px;line-height:1.1}}@media (min-width: 1280px){.nas-calendar__price{font-size:16px}}.nas-calendar__price--before{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;text-decoration:line-through;font-size:.8em;line-height:1}@media (min-width: 1000px){.nas-calendar__price--before{margin-bottom:2px}}.nas-calendar__sold-out{position:absolute;bottom:2px;left:2px;line-height:1;overflow-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto;letter-spacing:-.015em;color:#8c8c8c;font-size:.75em}@media (min-width: 640px){.nas-calendar__sold-out{font-size:.9em;bottom:6px;left:6px}}@media (min-width: 1000px){.nas-calendar__sold-out{left:3px}}@media (min-width: 1180px){.nas-calendar__sold-out{left:6px}}.nas-calendar__transit{position:relative;display:flex;max-width:3.8em;width:calc(100% - 12px);padding:0 .5em 0 .3em;height:8px;justify-content:space-around;margin-bottom:2px;transform:scale(.85);transform-origin:left;background-color:inherit}@media (min-width: 640px){.nas-calendar__transit{transform:none;padding:0 .5em 0 .3em;margin-bottom:3px}}.nas-calendar__transit:before,.nas-calendar__transit:after{content:\"\";position:absolute}.nas-calendar__transit:before{top:calc(50% - 1px);width:100%;left:0;height:2px;background-color:currentColor}.nas-calendar__transit:after{width:8px;height:8px;right:0;border-right:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg)}.nas-calendar__transit-indicator{position:relative;width:8px;height:8px;flex-shrink:0;border-radius:50%;border:2px solid currentColor;background-color:#fff}.nas-calendar__asterisk{font-size:.67em;top:-.36em;margin-left:.1em}.nas-calendar__footer{display:flex;justify-content:center}.nas-calendar__footer .nas-calendar__item{width:25px;height:25px;margin-right:3px}.nas-calendar__footer .nas-calendar__item--unavailable{border:1px solid #15273f}.nas-calendar__footer--item{margin-top:12px}.nas-calendar__footer--label{flex-shrink:0;margin-right:12px;display:flex;flex-direction:column;justify-content:center;font-size:14px;line-height:20px}.nas-calendar__arrow{position:absolute;width:16px;height:16px;top:-10px;left:calc(50% - 8px);background-color:inherit;transform:rotate(45deg);border-top:3px solid #15273f;border-left:3px solid #15273f}@keyframes lowfare-item-in{0%{opacity:0;transform:scale(0)}}\n"] }]
|
|
4927
|
-
}], ctorParameters: function () { return [{ type: DateHelper }, { type: i1.DatePipe }, { type: CalendarService }]; }, propDecorators: { previousMonthRef: [{
|
|
4927
|
+
}], ctorParameters: function () { return [{ type: DateHelper }, { type: i1.DatePipe }, { type: CalendarService$1 }]; }, propDecorators: { previousMonthRef: [{
|
|
4928
4928
|
type: ViewChild,
|
|
4929
4929
|
args: ['previousMonthRef']
|
|
4930
4930
|
}], nextMonthRef: [{
|
|
@@ -7687,7 +7687,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
7687
7687
|
}]
|
|
7688
7688
|
}] });
|
|
7689
7689
|
|
|
7690
|
-
let nextId$
|
|
7690
|
+
let nextId$b = 0;
|
|
7691
7691
|
/**
|
|
7692
7692
|
* @license
|
|
7693
7693
|
* Copyright Norwegian Air Shuttle. All Rights Reserved.
|
|
@@ -7722,7 +7722,7 @@ class RadioComponent extends NasComponentBase {
|
|
|
7722
7722
|
* <nas-radio (checkedChange)="onCheckedChange($event)"></nas-radio>
|
|
7723
7723
|
*/
|
|
7724
7724
|
this.checkedChange = new EventEmitter();
|
|
7725
|
-
this.componentId = nextId$
|
|
7725
|
+
this.componentId = nextId$b++;
|
|
7726
7726
|
}
|
|
7727
7727
|
mainClass() {
|
|
7728
7728
|
return this.getClass('', [
|
|
@@ -8233,7 +8233,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
8233
8233
|
}]
|
|
8234
8234
|
}] });
|
|
8235
8235
|
|
|
8236
|
-
let nextId$
|
|
8236
|
+
let nextId$a = 0;
|
|
8237
8237
|
/**
|
|
8238
8238
|
* @description
|
|
8239
8239
|
* Norwegian Input Component | Form Controls
|
|
@@ -8311,7 +8311,7 @@ class InputComponent extends NasComponentBase {
|
|
|
8311
8311
|
* <nas-input [line]="false"></nas-input>
|
|
8312
8312
|
*/
|
|
8313
8313
|
this.line = true;
|
|
8314
|
-
this.componentId = nextId$
|
|
8314
|
+
this.componentId = nextId$a++;
|
|
8315
8315
|
}
|
|
8316
8316
|
ngAfterViewInit() {
|
|
8317
8317
|
if (this.exists(this.disabled)) {
|
|
@@ -8849,7 +8849,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
8849
8849
|
* @license
|
|
8850
8850
|
* Copyright Norwegian Air Shuttle. All Rights Reserved.
|
|
8851
8851
|
*/
|
|
8852
|
-
let nextId$
|
|
8852
|
+
let nextId$9 = 0;
|
|
8853
8853
|
/**
|
|
8854
8854
|
* @description
|
|
8855
8855
|
* Norwegian Button Component | New design | Beta
|
|
@@ -8925,7 +8925,7 @@ class ButtonNewComponent extends NasComponentBase {
|
|
|
8925
8925
|
this.clickChange = new EventEmitter();
|
|
8926
8926
|
this.trackingEventSource = new Subject();
|
|
8927
8927
|
this.trackingEvent$ = this.trackingEventSource.asObservable();
|
|
8928
|
-
this.componentId = nextId$
|
|
8928
|
+
this.componentId = nextId$9++;
|
|
8929
8929
|
}
|
|
8930
8930
|
getClasses(element, modifiers) {
|
|
8931
8931
|
const classes = new Array();
|
|
@@ -11216,7 +11216,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
11216
11216
|
type: Output
|
|
11217
11217
|
}] } });
|
|
11218
11218
|
|
|
11219
|
-
let nextId$
|
|
11219
|
+
let nextId$8 = 0;
|
|
11220
11220
|
/**
|
|
11221
11221
|
* @description
|
|
11222
11222
|
* Norwegian Tab Group Component | Layout
|
|
@@ -11252,7 +11252,7 @@ class TabGroupComponent extends NasComponentBase {
|
|
|
11252
11252
|
super('nas-tab-group');
|
|
11253
11253
|
this.selectedIndexValue = 0;
|
|
11254
11254
|
this.groupId = 0;
|
|
11255
|
-
this.groupId = nextId$
|
|
11255
|
+
this.groupId = nextId$8++;
|
|
11256
11256
|
}
|
|
11257
11257
|
ngAfterViewInit() {
|
|
11258
11258
|
let tabIndex = 0;
|
|
@@ -11324,180 +11324,2296 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
11324
11324
|
}]
|
|
11325
11325
|
}] });
|
|
11326
11326
|
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
return this.modelValue;
|
|
11327
|
+
var WeekStart;
|
|
11328
|
+
(function (WeekStart) {
|
|
11329
|
+
WeekStart[WeekStart["monday"] = 0] = "monday";
|
|
11330
|
+
WeekStart[WeekStart["sunday"] = 1] = "sunday";
|
|
11331
|
+
})(WeekStart || (WeekStart = {}));
|
|
11332
|
+
|
|
11333
|
+
class CalendarService {
|
|
11334
|
+
constructor(datePipe, dateService) {
|
|
11335
|
+
this.datePipe = datePipe;
|
|
11336
|
+
this.dateService = dateService;
|
|
11338
11337
|
}
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11338
|
+
getMonthNames(locale) {
|
|
11339
|
+
const month = new Date();
|
|
11340
|
+
month.setMonth(0);
|
|
11341
|
+
month.setDate(1);
|
|
11342
|
+
const monthNames = new Array();
|
|
11343
|
+
for (let index = 0; index < 12; index++) {
|
|
11344
|
+
const currentMonth = new Date(Date.UTC(month.getFullYear(), month.getMonth() + index, 1));
|
|
11345
|
+
monthNames.push(this.datePipe.transform(currentMonth, 'MMMM', 'UTC', locale));
|
|
11346
|
+
}
|
|
11347
|
+
return monthNames;
|
|
11342
11348
|
}
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
|
|
11349
|
+
getWeekdays(weekStart, locale) {
|
|
11350
|
+
const weekday = this.getMonday();
|
|
11351
|
+
const weekdays = new Array();
|
|
11352
|
+
for (let index = 0; index < 7; index++) {
|
|
11353
|
+
const currentDay = new Date(Date.UTC(weekday.getFullYear(), weekday.getMonth(), weekday.getDate() + index));
|
|
11354
|
+
const dayName = this.datePipe.transform(currentDay, 'EEE', 'UTC', locale);
|
|
11355
|
+
weekdays.push(dayName.charAt(0));
|
|
11356
|
+
}
|
|
11357
|
+
if (weekStart !== WeekStart.monday) {
|
|
11358
|
+
const sunday = weekdays.pop();
|
|
11359
|
+
weekdays.unshift(sunday);
|
|
11360
|
+
}
|
|
11361
|
+
return weekdays;
|
|
11352
11362
|
}
|
|
11353
|
-
|
|
11354
|
-
if (!
|
|
11363
|
+
updateAvailableDaysWithSelectedDate(availableDays, selectedDate) {
|
|
11364
|
+
if (!availableDays || !selectedDate) {
|
|
11355
11365
|
return;
|
|
11356
11366
|
}
|
|
11357
|
-
|
|
11358
|
-
|
|
11367
|
+
availableDays = availableDays.map((x) => {
|
|
11368
|
+
if (!this.dateService.isSameDate(this.dateService.utcDate(x.date), selectedDate)) {
|
|
11369
|
+
return x;
|
|
11370
|
+
}
|
|
11371
|
+
if (x.isDisabled) {
|
|
11372
|
+
selectedDate.setDate(selectedDate.date + 1);
|
|
11373
|
+
return x;
|
|
11374
|
+
}
|
|
11375
|
+
x.isSelected = true;
|
|
11376
|
+
return x;
|
|
11377
|
+
});
|
|
11359
11378
|
}
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
* @example
|
|
11375
|
-
* <nas-phone-number (modelChange)="onModelChange()"></nas-phone-number>
|
|
11376
|
-
*/
|
|
11377
|
-
this.modelChange = new EventEmitter();
|
|
11378
|
-
/**
|
|
11379
|
-
* @property Output
|
|
11380
|
-
* @description
|
|
11381
|
-
* An event that is fired every time a selection is done.
|
|
11382
|
-
* @example
|
|
11383
|
-
* <nas-phone-number (selectedChange)="onSelectedChange($event)"></nas-phone-number>
|
|
11384
|
-
*/
|
|
11385
|
-
this.selectedChange = new EventEmitter();
|
|
11379
|
+
setActiveDate(date, weeks) {
|
|
11380
|
+
if (!weeks || weeks.length <= 0) {
|
|
11381
|
+
return;
|
|
11382
|
+
}
|
|
11383
|
+
for (const day of this.getDays(weeks)) {
|
|
11384
|
+
if (!day) {
|
|
11385
|
+
continue;
|
|
11386
|
+
}
|
|
11387
|
+
day.isActive = false;
|
|
11388
|
+
const utcDate = this.dateService.utcDate(day.date);
|
|
11389
|
+
if (this.dateService.isSameDate(utcDate, date)) {
|
|
11390
|
+
day.isActive = true;
|
|
11391
|
+
}
|
|
11392
|
+
}
|
|
11386
11393
|
}
|
|
11387
|
-
|
|
11388
|
-
const
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
this.exists(this.disabled) && 'disabled',
|
|
11392
|
-
this.exists(this.loading) && 'loading',
|
|
11393
|
-
this.exists(this.spaceless) && 'spaceless'
|
|
11394
|
-
]);
|
|
11394
|
+
getDays(weeks) {
|
|
11395
|
+
const flatten = new Array();
|
|
11396
|
+
weeks.forEach(x => x.days.forEach(d => flatten.push(d)));
|
|
11397
|
+
return flatten;
|
|
11395
11398
|
}
|
|
11396
|
-
|
|
11397
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: PhoneNumberComponent, selector: "nas-phone-number", inputs: { options: "options", preferredOptions: "preferredOptions", prefixCountryCode: "prefixCountryCode", label: "label", optionsLabel: "optionsLabel", preferredOptionsLabel: "preferredOptionsLabel", placeholder: "placeholder", id: "id", type: "type", error: "error", disabled: "disabled", spaceless: "spaceless", loading: "loading", errorMessage: "errorMessage", info: "info", icon: "icon", readonly: "readonly", ariaDescribedby: ["aria-describedby", "ariaDescribedby"], required: "required", nasFormControlName: "nasFormControlName", nasFormControlNamePrefix: "nasFormControlNamePrefix", nasFormGroup: "nasFormGroup", model: "model", cssClass: "cssClass", selectedValue: "selectedValue", selected: "selected" }, outputs: { modelChange: "modelChange", selectedChange: "selectedChange" }, usesInheritance: true, ngImport: i0, template: "<div [nasClass]=\"mainClass()\">\n <label [nasClass]=\"getClass('label')\" *ngIf=\"label\" [attr.for]=\"id\">{{label}}</label>\n\n <div [nasClass]=\"getClass('controls')\">\n <ng-container *ngIf=\"!nasFormGroup || !nasFormControlName; else reactiveForm\">\n <div [nasClass]=\"getClass('prefix')\" *ngIf=\"prefixCountryCode else selectCountryCode\">\n {{prefixCountryCode}}\n </div>\n <ng-template #selectCountryCode>\n <div [nasClass]=\"getClass('country-code')\">\n <nas-select *ngIf=\"!preferredOptions\" [options]=\"options\" [error]=\"error\" [disabled]=\"disabled\"\n [spaceless]=\"spaceless\" [cssClass]=\"cssClass\" [selectedValue]=\"selectedValue\" [(selected)]=\"selected\">\n </nas-select>\n <nas-select *ngIf=\"preferredOptions\" [error]=\"error\" [disabled]=\"disabled\" [spaceless]=\"spaceless\"\n [cssClass]=\"cssClass\" [selectedValue]=\"selectedValue\" [(selected)]=\"selected\">\n <nas-optgroup [label]=\"preferredOptionsLabel\">\n <nas-option *ngFor=\"let option of preferredOptions\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n <nas-optgroup [label]=\"optionsLabel\">\n <nas-option *ngFor=\"let option of options\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n </nas-select>\n </div>\n </ng-template>\n <div [nasClass]=\"getClass('number')\">\n <input [nasClass]=\"getClass('text')\" [attr.id]=\"id\" [attr.type]=\"type\" [attr.disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\" [attr.readonly]=\"readonly\" [required]=\"required\"\n [attr.aria-describedby]=\"ariaDescribedby\" [attr.aria-invalid]=\"error\" [attr.aria-required]=\"required\"\n [(ngModel)]=\"model\" />\n </div>\n </ng-container>\n <ng-template #reactiveForm>\n <div [nasClass]=\"getClass('prefix')\" *ngIf=\"prefixCountryCode else selectCountryCodeReactive\">\n {{prefixCountryCode}}\n </div>\n <ng-template #selectCountryCodeReactive>\n <div [nasClass]=\"getClass('country-code')\">\n <nas-select *ngIf=\"!preferredOptions\" [options]=\"options\" [error]=\"error\" [disabled]=\"disabled\"\n [spaceless]=\"spaceless\" [cssClass]=\"cssClass\" [nasFormControlName]=\"nasFormControlNamePrefix\"\n [nasFormGroup]=\"nasFormGroup\">\n </nas-select>\n <nas-select *ngIf=\"preferredOptions\" [error]=\"error\" [disabled]=\"disabled\" [spaceless]=\"spaceless\"\n [cssClass]=\"cssClass\" [nasFormControlName]=\"nasFormControlNamePrefix\" [nasFormGroup]=\"nasFormGroup\">\n <nas-optgroup [label]=\"preferredOptionsLabel\">\n <nas-option *ngFor=\"let option of preferredOptions\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n <nas-optgroup [label]=\"optionsLabel\">\n <nas-option *ngFor=\"let option of options\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n </nas-select>\n </div>\n </ng-template>\n <div [nasClass]=\"getClass('number')\" [formGroup]=\"nasFormGroup\">\n <input [nasClass]=\"getClass('text')\" [attr.id]=\"id\" [attr.type]=\"type\" [attr.disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\" [attr.readonly]=\"readonly\" [required]=\"required\"\n [attr.aria-describedby]=\"ariaDescribedby\" [attr.aria-invalid]=\"error\" [attr.aria-required]=\"required\"\n [formControlName]=\"nasFormControlName\" />\n </div>\n </ng-template>\n </div>\n <span [nasClass]=\"getClass('icon')\" *ngIf=\"exists(error)\">\n <nas-icon icon=\"alert--error\"></nas-icon>\n </span>\n\n <span [nasClass]=\"getClass('icon')\" *ngIf=\"icon && !exists(error)\">\n <nas-icon [icon]=\"icon\"></nas-icon>\n </span>\n <span [nasClass]=\"getClass('line')\"></span>\n\n <p [nasClass]=\"getClass('error')\" *ngIf=\"exists(error) && errorMessage\">{{errorMessage}}</p>\n\n <span [nasClass]=\"getClass('info')\" *ngIf=\"info\">{{info}}</span>\n\n</div>\n", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-phone-number{margin-bottom:16px;position:relative}.nas-phone-number__label{display:flex;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;letter-spacing:-.025em;word-spacing:-.025em;display:block;margin-top:0;margin-bottom:6px}@media (min-width: 640px){.nas-phone-number__label{letter-spacing:inherit;word-spacing:inherit}}.nas-phone-number__label~.nas-phone-number__icon{top:43px}.nas-phone-number__label~.nas-phone-number__icon--spinner{top:41px}.nas-phone-number__controls{display:flex}.nas-phone-number__prefix{display:flex;padding:3px 16px 0;justify-content:center;align-items:center;margin-bottom:3px;background-color:#f1f1f1}.nas-phone-number__number{flex:1}.nas-phone-number__text{position:relative;margin-bottom:3px;height:50px}.nas-phone-number__text:focus~.nas-phone-number__line{background-color:#15273f}.nas-phone-number__text[disabled]{opacity:.5}.nas-phone-number__line{position:relative;display:block;height:3px;background-color:#c3c3c3;transition:background-color .15s cubic-bezier(0,0,.1,1)}.nas-phone-number__icon{position:absolute;pointer-events:none;right:12px;top:13px}.nas-phone-number__icon--spinner{top:12px}.nas-phone-number__info{display:block;margin-top:9px;margin-bottom:24px}.nas-phone-number--error .nas-phone-number__text{padding-right:40px;background-repeat:no-repeat;background-position:right 9px center}.nas-phone-number--error .nas-phone-number__error{display:block;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;color:#e5212d}.nas-phone-number--error .nas-phone-number__line{background-color:#e5212d}.nas-phone-number--error .nas-phone-number__text:focus~.nas-phone-number__line{background-color:#15273f}.nas-phone-number--disabled .nas-phone-number__text{opacity:.5}.nas-phone-number--loading .nas-phone-number__line{background-color:#15273f;animation:input-loader ease 1.5s;animation-iteration-count:infinite;animation-fill-mode:forwards;transform-origin:left}.nas-phone-number--spaceless{margin-bottom:0}@keyframes input-loader{0%{transform:translate(0) scaleX(0)}50%{transform:translate(0) scaleX(1)}to{transform:translate(100%) scaleX(0)}}.nas-phone-number:focus-within .nas-phone-number__line{background-color:#15273f}:host ::ng-deep .nas-select{margin-bottom:3px}:host ::ng-deep .nas-select select{padding:13px 34px 15px 12px;border:none;background-color:#f1f1f1;height:50px;line-height:24px}\n"], dependencies: [{ 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: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }, { kind: "component", type: SelectComponent, selector: "nas-select", inputs: ["id", "inline", "label", "block", "spaceless", "stretch", "compact", "simple", "light", "fill", "error", "errorMessage", "disabled", "autogrow", "cssClass", "nasFormControlName", "nasFormGroup", "options", "selectedValue", "selected"], outputs: ["selectedChange", "keydown"] }, { kind: "component", type: OptionComponent, selector: "nas-option", inputs: ["option"] }, { kind: "component", type: OptgroupComponent, selector: "nas-optgroup", inputs: ["label"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "nas-icon", inputs: ["icon", "type", "isIndicator", "lightCircularBackground", "cssClass"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
}
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
}
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11399
|
+
getWeeks(availableDays, weekStart) {
|
|
11400
|
+
if (!availableDays) {
|
|
11401
|
+
return;
|
|
11402
|
+
}
|
|
11403
|
+
const sortedDays = availableDays
|
|
11404
|
+
.sort((a, b) => this.dateService
|
|
11405
|
+
.date(this.dateService.utcDate(a.date)).getTime() - this.dateService.date(this.dateService.utcDate(b.date)).getTime());
|
|
11406
|
+
const weeks = new Array();
|
|
11407
|
+
let index = 0;
|
|
11408
|
+
for (let week = 0; week < 6; week++) {
|
|
11409
|
+
const days = new Array();
|
|
11410
|
+
for (let day = 0; day < 7; day++) {
|
|
11411
|
+
const currentDayModel = sortedDays[0];
|
|
11412
|
+
if (currentDayModel) {
|
|
11413
|
+
const currentDate = this.dateService.utcDate(currentDayModel.date);
|
|
11414
|
+
currentDayModel.isEmpty = currentDayModel.isAvailable;
|
|
11415
|
+
let currentDay = currentDate.getDay();
|
|
11416
|
+
if (weekStart === WeekStart.monday) {
|
|
11417
|
+
if (currentDay === 0) {
|
|
11418
|
+
currentDay = 6;
|
|
11419
|
+
}
|
|
11420
|
+
else {
|
|
11421
|
+
currentDay -= 1;
|
|
11422
|
+
}
|
|
11423
|
+
}
|
|
11424
|
+
if (currentDay === day) {
|
|
11425
|
+
index = index + 1;
|
|
11426
|
+
currentDayModel.index = index;
|
|
11427
|
+
days.push(currentDayModel);
|
|
11428
|
+
sortedDays.shift();
|
|
11429
|
+
}
|
|
11430
|
+
else {
|
|
11431
|
+
days.push(null);
|
|
11432
|
+
}
|
|
11433
|
+
}
|
|
11434
|
+
}
|
|
11435
|
+
const firstDayInWeek = days.find(x => x != null);
|
|
11436
|
+
let firstDateDateInWeek;
|
|
11437
|
+
if (firstDayInWeek) {
|
|
11438
|
+
const utcDate = this.dateService.utcDate(firstDayInWeek.date);
|
|
11439
|
+
firstDateDateInWeek = new Date(utcDate.year, utcDate.month, utcDate.date);
|
|
11440
|
+
}
|
|
11441
|
+
if (!days.every(x => x === null)) {
|
|
11442
|
+
weeks.push({
|
|
11443
|
+
days: days,
|
|
11444
|
+
weekNumber: this.dateService.getWeekNumber(firstDateDateInWeek)
|
|
11445
|
+
});
|
|
11446
|
+
}
|
|
11447
|
+
}
|
|
11448
|
+
return weeks;
|
|
11449
|
+
}
|
|
11450
|
+
getCurrentMonth(date) {
|
|
11451
|
+
let currentMonth;
|
|
11452
|
+
if (date) {
|
|
11453
|
+
currentMonth = this.dateService.utcDate(new Date(Date.UTC(date.year, date.month, 1)));
|
|
11454
|
+
}
|
|
11455
|
+
else {
|
|
11456
|
+
currentMonth = this.dateService.utcDate();
|
|
11457
|
+
}
|
|
11458
|
+
return currentMonth;
|
|
11459
|
+
}
|
|
11460
|
+
getMonthsSelectOptions(disablePastSelection, maxMonthIndex, monthNames) {
|
|
11461
|
+
const months = new Array();
|
|
11462
|
+
if (disablePastSelection === false) {
|
|
11463
|
+
return months;
|
|
11464
|
+
}
|
|
11465
|
+
for (let index = 0; index < maxMonthIndex; index++) {
|
|
11466
|
+
const date = this.dateService.utcDate().toDate();
|
|
11467
|
+
date.setUTCDate(1);
|
|
11468
|
+
date.setUTCMonth(date.getUTCMonth() + index);
|
|
11469
|
+
const selectOption = {
|
|
11470
|
+
title: `${monthNames[date.getUTCMonth()]} ${date.getUTCFullYear()}`,
|
|
11471
|
+
value: date.toISOString()
|
|
11472
|
+
};
|
|
11473
|
+
months.push(selectOption);
|
|
11474
|
+
}
|
|
11475
|
+
return months;
|
|
11476
|
+
}
|
|
11477
|
+
getSelectedMonth(months, currentMonth) {
|
|
11478
|
+
if (!months) {
|
|
11479
|
+
return null;
|
|
11480
|
+
}
|
|
11481
|
+
const selected = months.find(x => {
|
|
11482
|
+
const date = this.dateService.utcDate(x.value);
|
|
11483
|
+
date.setDate(1);
|
|
11484
|
+
const month = new UtcDate(currentMonth.year, currentMonth.month, 1);
|
|
11485
|
+
return this.dateService.isSameMonth(date, month);
|
|
11486
|
+
});
|
|
11487
|
+
return selected;
|
|
11488
|
+
}
|
|
11489
|
+
getAvailableDays(currentMonth, availableDates, availability, disablePastSelection, lowerLimitDate, activeDate, selectedDate) {
|
|
11490
|
+
const firstDateInThisMonth = new Date();
|
|
11491
|
+
firstDateInThisMonth.setUTCDate(1);
|
|
11492
|
+
firstDateInThisMonth.setUTCHours(0, 0, 0, 0);
|
|
11493
|
+
const currentDate = currentMonth
|
|
11494
|
+
? new Date(Date.UTC(currentMonth.year, currentMonth.month, 1))
|
|
11495
|
+
: firstDateInThisMonth;
|
|
11496
|
+
const currentDateMonth = currentDate.getUTCMonth();
|
|
11497
|
+
const days = new Array();
|
|
11498
|
+
while (currentDate.getUTCMonth() === currentDateMonth) {
|
|
11499
|
+
const utcDate = this.dateService.utcDate(currentDate);
|
|
11500
|
+
const day = {
|
|
11501
|
+
date: this.dateService.date(utcDate).toISOString(),
|
|
11502
|
+
isAvailable: this.isAvailable(utcDate, availableDates, availability, disablePastSelection),
|
|
11503
|
+
isDisabled: this.dateService.isLessThan(utcDate, lowerLimitDate) ? true : false,
|
|
11504
|
+
isActive: this.dateService.isSameDate(this.dateService.utcDate(currentDate), activeDate) || this.dateService.isSameDate(this.dateService.utcDate(currentDate), lowerLimitDate),
|
|
11505
|
+
isWithinRange: this.dateService.isGreaterThan(utcDate, lowerLimitDate) && this.dateService.isLessThan(utcDate, selectedDate)
|
|
11506
|
+
};
|
|
11507
|
+
if (selectedDate && this.dateService.isSameDate(selectedDate, utcDate) && day.isSelected || !day.isAvailable) {
|
|
11508
|
+
day.isSelected = false;
|
|
11509
|
+
}
|
|
11510
|
+
days.push(day);
|
|
11511
|
+
currentDate.setUTCDate(currentDate.getUTCDate() + 1);
|
|
11512
|
+
}
|
|
11513
|
+
return days;
|
|
11514
|
+
}
|
|
11515
|
+
isAvailable(date, availableDates, availability, disablePastSelection) {
|
|
11516
|
+
if (!availability) {
|
|
11517
|
+
return disablePastSelection && this.dateService.isInThePast(date, false, true, true) ? false : true;
|
|
11518
|
+
}
|
|
11519
|
+
if ((disablePastSelection && this.dateService.isInThePast(date, false, true, true))
|
|
11520
|
+
|| !availableDates
|
|
11521
|
+
|| !availableDates.some(x => this.dateService.isSameDate(x, date))) {
|
|
11522
|
+
return false;
|
|
11523
|
+
}
|
|
11524
|
+
return true;
|
|
11525
|
+
}
|
|
11526
|
+
getMonday() {
|
|
11527
|
+
const date = new Date();
|
|
11528
|
+
const day = date.getDay();
|
|
11529
|
+
const diff = date.getDate() - day + (day === 0 ? -6 : 1);
|
|
11530
|
+
return new Date(date.setDate(diff));
|
|
11531
|
+
}
|
|
11532
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarService, deps: [{ token: i1.DatePipe }, { token: DateHelper }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11533
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarService, providedIn: 'root' }); }
|
|
11534
|
+
}
|
|
11535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarService, decorators: [{
|
|
11536
|
+
type: Injectable,
|
|
11537
|
+
args: [{
|
|
11538
|
+
providedIn: 'root'
|
|
11539
|
+
}]
|
|
11540
|
+
}], ctorParameters: function () { return [{ type: i1.DatePipe }, { type: DateHelper }]; } });
|
|
11541
|
+
|
|
11542
|
+
class CalendarNewComponent extends NasComponentBase {
|
|
11543
|
+
/**
|
|
11544
|
+
* @description
|
|
11545
|
+
* The lowest date allowed.
|
|
11546
|
+
*/
|
|
11547
|
+
get lowerLimitDate() {
|
|
11548
|
+
return this.lowerLimitDateValue;
|
|
11549
|
+
}
|
|
11550
|
+
set lowerLimitDate(date) {
|
|
11551
|
+
if (!date) {
|
|
11552
|
+
return;
|
|
11553
|
+
}
|
|
11554
|
+
this.lowerLimitDateValue = date;
|
|
11555
|
+
if (!this.selectedDate) {
|
|
11556
|
+
this.selectedDateValue = this.lowerLimitDateValue;
|
|
11557
|
+
this.activeDate = this.lowerLimitDateValue;
|
|
11558
|
+
}
|
|
11559
|
+
else if (this.selectedDate && this.dateService.isGreaterThan(date, this.selectedDate, false, true, true)) {
|
|
11560
|
+
this.selectedDateValue = this.lowerLimitDateValue;
|
|
11561
|
+
this.activeDate = this.lowerLimitDateValue;
|
|
11562
|
+
}
|
|
11563
|
+
else if (this.activeDate && this.dateService.isGreaterThan(date, this.activeDate, false, true, true)) {
|
|
11564
|
+
this.activeDate = this.lowerLimitDateValue;
|
|
11565
|
+
}
|
|
11566
|
+
this.applySelectedDateChanges();
|
|
11567
|
+
}
|
|
11568
|
+
/**
|
|
11569
|
+
* @description
|
|
11570
|
+
* An array with all the available dates of the month for seats.
|
|
11571
|
+
*/
|
|
11572
|
+
get availableDates() {
|
|
11573
|
+
return this.availableDatesValue;
|
|
11574
|
+
}
|
|
11575
|
+
set availableDates(dates) {
|
|
11576
|
+
if (!dates || !this.exists(this.availability)) {
|
|
11577
|
+
return;
|
|
11578
|
+
}
|
|
11579
|
+
if (dates.length > 0) {
|
|
11580
|
+
const firstDate = dates[0];
|
|
11581
|
+
this.currentMonth = firstDate;
|
|
11582
|
+
this.setPreviousMonthDisabled();
|
|
11583
|
+
}
|
|
11584
|
+
this.availableDatesValue = dates;
|
|
11585
|
+
this.applySelectedDateChanges();
|
|
11586
|
+
if (!this.shouldFocusCalendarOnAvailableDatesUpdate) {
|
|
11587
|
+
return;
|
|
11588
|
+
}
|
|
11589
|
+
if (document.activeElement === this.nextMonthRef.nativeElement ||
|
|
11590
|
+
document.activeElement === this.previousMonthRef.nativeElement ||
|
|
11591
|
+
this.monthSelectRef && document.activeElement === this.monthSelectRef.select.nativeElement) {
|
|
11592
|
+
return;
|
|
11593
|
+
}
|
|
11594
|
+
setTimeout(() => {
|
|
11595
|
+
const elmementToFocus = this.activeDateCell;
|
|
11596
|
+
if (elmementToFocus) {
|
|
11597
|
+
elmementToFocus.focus();
|
|
11598
|
+
}
|
|
11599
|
+
this.shouldFocusCalendarOnAvailableDatesUpdate = false;
|
|
11600
|
+
}, 100);
|
|
11601
|
+
}
|
|
11602
|
+
/**
|
|
11603
|
+
* @description
|
|
11604
|
+
* Gets or sets the active date
|
|
11605
|
+
*/
|
|
11606
|
+
get activeDate() {
|
|
11607
|
+
return this.activeDateValue;
|
|
11608
|
+
}
|
|
11609
|
+
set activeDate(date) {
|
|
11610
|
+
if (!date || this.dateService.isSameDate(date, this.activeDate)) {
|
|
11611
|
+
return;
|
|
11612
|
+
}
|
|
11613
|
+
if (!this.currentMonth) {
|
|
11614
|
+
this.currentMonth = date;
|
|
11615
|
+
}
|
|
11616
|
+
if (!this.dateService.isSameMonth(date, this.currentMonth)) {
|
|
11617
|
+
this.currentMonth = date;
|
|
11618
|
+
this.applySelectedDateChanges();
|
|
11619
|
+
this.monthChange.emit(this.currentMonth);
|
|
11620
|
+
this.setPreviousMonthDisabled();
|
|
11621
|
+
const elmementToFocus = this.activeDateCell;
|
|
11622
|
+
if (elmementToFocus) {
|
|
11623
|
+
elmementToFocus.focus();
|
|
11624
|
+
}
|
|
11625
|
+
}
|
|
11626
|
+
if (this.weeks) {
|
|
11627
|
+
this.calendarService.setActiveDate(date, this.weeks);
|
|
11628
|
+
for (const day of this.calendarService.getDays(this.weeks)) {
|
|
11629
|
+
if (!day) {
|
|
11630
|
+
continue;
|
|
11631
|
+
}
|
|
11632
|
+
if (day.isActive) {
|
|
11633
|
+
this.activeDateValue = date;
|
|
11634
|
+
this.activeDateChange.emit(date);
|
|
11635
|
+
}
|
|
11636
|
+
}
|
|
11637
|
+
}
|
|
11638
|
+
}
|
|
11639
|
+
get selectedDate() {
|
|
11640
|
+
return this.selectedDateValue;
|
|
11641
|
+
}
|
|
11642
|
+
set selectedDate(date) {
|
|
11643
|
+
if (!date) {
|
|
11644
|
+
return;
|
|
11645
|
+
}
|
|
11646
|
+
this.selectedDateValue = date;
|
|
11647
|
+
if (!this.dateService.isSameMonth(date, this.activeDate)
|
|
11648
|
+
|| !this.dateService.isSameMonth(date, this.currentMonth)) {
|
|
11649
|
+
this.currentMonth = date;
|
|
11650
|
+
this.activeDateValue = date;
|
|
11651
|
+
this.applySelectedDateChanges();
|
|
11652
|
+
}
|
|
11653
|
+
this.setSelectedDate(date);
|
|
11654
|
+
}
|
|
11655
|
+
get selectedMonth() {
|
|
11656
|
+
return this.selectedValue;
|
|
11657
|
+
}
|
|
11658
|
+
set selectedMonth(option) {
|
|
11659
|
+
if (!option) {
|
|
11660
|
+
return;
|
|
11661
|
+
}
|
|
11662
|
+
this.selectedValue = option;
|
|
11663
|
+
const optionDate = this.dateService.utcDate(option.value);
|
|
11664
|
+
if (!this.dateService.isSameMonth(optionDate, this.currentMonth)) {
|
|
11665
|
+
this.currentMonth = optionDate;
|
|
11666
|
+
this.applySelectedDateChanges();
|
|
11667
|
+
this.monthChange.emit(this.currentMonth);
|
|
11668
|
+
this.setPreviousMonthDisabled();
|
|
11669
|
+
}
|
|
11670
|
+
}
|
|
11671
|
+
get nextMonthDisabled() {
|
|
11672
|
+
const nextMonthIndex = this.currentMonth
|
|
11673
|
+
&& this.dateService.getUtcNumberOfMonthBetween(this.dateService.utcDate(), this.currentMonth);
|
|
11674
|
+
return (nextMonthIndex + 2) >= this.maxMonthIndex;
|
|
11675
|
+
}
|
|
11676
|
+
get currentMonthModel() {
|
|
11677
|
+
if (!this.currentMonth) {
|
|
11678
|
+
return '';
|
|
11679
|
+
}
|
|
11680
|
+
return `${this.monthNames[this.currentMonth.toDate().getUTCMonth()]} ${this.currentMonth.toDate().getUTCFullYear()}`;
|
|
11681
|
+
}
|
|
11682
|
+
/**
|
|
11683
|
+
* @description
|
|
11684
|
+
* Is in use by DatepickerComponent
|
|
11685
|
+
*/
|
|
11686
|
+
get activeDateCell() {
|
|
11687
|
+
return document.querySelector('.nas-calendar__item--active');
|
|
11688
|
+
}
|
|
11689
|
+
constructor(dateService, datePipe, calendarService) {
|
|
11690
|
+
super('nas-calendar-new');
|
|
11691
|
+
this.dateService = dateService;
|
|
11692
|
+
this.datePipe = datePipe;
|
|
11693
|
+
this.calendarService = calendarService;
|
|
11694
|
+
this.months = new Array();
|
|
11695
|
+
this.weekdays = new Array();
|
|
11696
|
+
/**
|
|
11697
|
+
* @description
|
|
11698
|
+
* Desides if the week should start on a monday or sunday. Defaults to monday.
|
|
11699
|
+
*/
|
|
11700
|
+
this.weekStart = WeekStart.monday;
|
|
11701
|
+
/**
|
|
11702
|
+
* @description
|
|
11703
|
+
* A locale code for the locale format rules to use. When not supplied, uses the value of LOCALE_ID, which is en-US by default.
|
|
11704
|
+
* This requires that registerLocaleData is called with the respective locale.
|
|
11705
|
+
*/
|
|
11706
|
+
this.locale = 'en-US';
|
|
11707
|
+
this.dateDisplayFormat = 'EEEE d, MMMM yyyy';
|
|
11708
|
+
/**
|
|
11709
|
+
* @description
|
|
11710
|
+
* Month selected by the user by clicking in drop down for month selection or month navigation buttons.
|
|
11711
|
+
*/
|
|
11712
|
+
this.monthChange = new EventEmitter();
|
|
11713
|
+
/**
|
|
11714
|
+
* @description
|
|
11715
|
+
* When a user has actively changed the date.
|
|
11716
|
+
*/
|
|
11717
|
+
this.focusOnNextChange = new EventEmitter();
|
|
11718
|
+
/**
|
|
11719
|
+
* @description
|
|
11720
|
+
* When selected date has been changed.
|
|
11721
|
+
*/
|
|
11722
|
+
this.selectedDateChange = new EventEmitter();
|
|
11723
|
+
/**
|
|
11724
|
+
* @description
|
|
11725
|
+
* When active date has been changed.
|
|
11726
|
+
*/
|
|
11727
|
+
this.activeDateChange = new EventEmitter();
|
|
11728
|
+
this.maxMonthIndex = 13;
|
|
11729
|
+
this.monthNames = new Array();
|
|
11730
|
+
this.shouldFocusCalendarOnAvailableDatesUpdate = false;
|
|
11731
|
+
}
|
|
11732
|
+
ngOnInit() {
|
|
11733
|
+
if (!this.ariaLabelPreviousMonth) {
|
|
11734
|
+
this.warnMissingAccessibiltyInput('ariaLabelPreviousMonth');
|
|
11735
|
+
}
|
|
11736
|
+
if (!this.ariaLabelNextMonth) {
|
|
11737
|
+
this.warnMissingAccessibiltyInput('ariaLabelNextMonth');
|
|
11738
|
+
}
|
|
11739
|
+
if (this.nasFormGroup && this.nasFormControlName) {
|
|
11740
|
+
const control = this.nasFormGroup.get(this.nasFormControlName);
|
|
11741
|
+
if (control) {
|
|
11742
|
+
const calendarDate = control.value;
|
|
11743
|
+
if (calendarDate) {
|
|
11744
|
+
this.selectedDate = calendarDate.date;
|
|
11745
|
+
}
|
|
11746
|
+
}
|
|
11747
|
+
}
|
|
11748
|
+
if (this.date || !this.currentMonth) {
|
|
11749
|
+
this.currentMonth = this.calendarService.getCurrentMonth(this.date);
|
|
11750
|
+
}
|
|
11751
|
+
this.availableDays = this.calendarService.getAvailableDays(this.currentMonth, this.availableDates, this.availability, this.disablePastSelection, this.lowerLimitDate, this.activeDate, this.selectedDate);
|
|
11752
|
+
this.calendarService.updateAvailableDaysWithSelectedDate(this.availableDays, this.selectedDate);
|
|
11753
|
+
this.weeks = this.calendarService.getWeeks(this.availableDays, this.weekStart);
|
|
11754
|
+
this.monthNames = this.calendarService.getMonthNames(this.locale);
|
|
11755
|
+
this.months = this.calendarService.getMonthsSelectOptions(this.disablePastSelection, this.maxMonthIndex, this.monthNames);
|
|
11756
|
+
this.selectedMonth = this.calendarService.getSelectedMonth(this.months, this.currentMonth);
|
|
11757
|
+
this.weekdays = this.calendarService.getWeekdays(this.weekStart, this.locale);
|
|
11758
|
+
this.setPreviousMonthDisabled();
|
|
11759
|
+
}
|
|
11760
|
+
dateKeyDown(event) {
|
|
11761
|
+
let elementToFocus;
|
|
11762
|
+
switch (event.key) {
|
|
11763
|
+
case 'ArrowLeft':
|
|
11764
|
+
case 'ArrowRight':
|
|
11765
|
+
case 'ArrowUp':
|
|
11766
|
+
case 'ArrowDown':
|
|
11767
|
+
this.shouldFocusCalendarOnAvailableDatesUpdate = true;
|
|
11768
|
+
break;
|
|
11769
|
+
case 'Tab':
|
|
11770
|
+
if (!event.shiftKey) {
|
|
11771
|
+
if (this.previousMonthRef && !this.isPreviousMonthDisabled) {
|
|
11772
|
+
elementToFocus = this.previousMonthRef.nativeElement;
|
|
11773
|
+
}
|
|
11774
|
+
else if (this.monthSelectRef && this.months.length > 0) {
|
|
11775
|
+
elementToFocus = this.monthSelectRef.select.nativeElement;
|
|
11776
|
+
}
|
|
11777
|
+
else if (this.nextMonthRef && !this.nextMonthDisabled) {
|
|
11778
|
+
elementToFocus = this.nextMonthRef.nativeElement;
|
|
11779
|
+
}
|
|
11780
|
+
}
|
|
11781
|
+
else {
|
|
11782
|
+
if (this.nextMonthRef && !this.nextMonthDisabled) {
|
|
11783
|
+
elementToFocus = this.nextMonthRef.nativeElement;
|
|
11784
|
+
}
|
|
11785
|
+
else if (this.monthSelectRef && this.months.length > 0) {
|
|
11786
|
+
elementToFocus = this.monthSelectRef.select.nativeElement;
|
|
11787
|
+
}
|
|
11788
|
+
else if (this.previousMonthRef && !this.isPreviousMonthDisabled) {
|
|
11789
|
+
elementToFocus = this.previousMonthRef.nativeElement;
|
|
11790
|
+
}
|
|
11791
|
+
}
|
|
11792
|
+
this.focusElement(event, elementToFocus);
|
|
11793
|
+
break;
|
|
11794
|
+
case 'Enter':
|
|
11795
|
+
event.preventDefault();
|
|
11796
|
+
const activeDay = this.calendarService
|
|
11797
|
+
.getDays(this.weeks)
|
|
11798
|
+
.find(x => x && this.dateService.isSameDate(this.dateService.utcDate(x.date), this.activeDate));
|
|
11799
|
+
if (this.availability && activeDay?.isAvailable && !activeDay?.isDisabled || !this.availability) {
|
|
11800
|
+
this.setSelectedDate(this.activeDate);
|
|
11801
|
+
this.focusOnNextChange.emit(event);
|
|
11802
|
+
}
|
|
11803
|
+
break;
|
|
11804
|
+
}
|
|
11805
|
+
}
|
|
11806
|
+
onPreviousMonthKeydown(event) {
|
|
11807
|
+
let elementToFocus;
|
|
11808
|
+
switch (event.key) {
|
|
11809
|
+
case 'Tab':
|
|
11810
|
+
if (!event.shiftKey) {
|
|
11811
|
+
if (this.monthSelectRef && this.months.length > 0) {
|
|
11812
|
+
elementToFocus = this.monthSelectRef.select.nativeElement;
|
|
11813
|
+
}
|
|
11814
|
+
else if (this.nextMonthRef && !this.nextMonthDisabled) {
|
|
11815
|
+
elementToFocus = this.nextMonthRef.nativeElement;
|
|
11816
|
+
}
|
|
11817
|
+
else {
|
|
11818
|
+
elementToFocus = this.activeDateCell;
|
|
11819
|
+
}
|
|
11820
|
+
}
|
|
11821
|
+
else {
|
|
11822
|
+
elementToFocus = this.activeDateCell;
|
|
11823
|
+
}
|
|
11824
|
+
this.focusElement(event, elementToFocus);
|
|
11825
|
+
break;
|
|
11826
|
+
case 'Enter':
|
|
11827
|
+
this.getPreviousMonth();
|
|
11828
|
+
event.preventDefault();
|
|
11829
|
+
break;
|
|
11830
|
+
default:
|
|
11831
|
+
break;
|
|
11832
|
+
}
|
|
11833
|
+
}
|
|
11834
|
+
onNextMonthKeydown(event) {
|
|
11835
|
+
let elementToFocus;
|
|
11836
|
+
switch (event.key) {
|
|
11837
|
+
case 'Tab':
|
|
11838
|
+
if (!event.shiftKey) {
|
|
11839
|
+
elementToFocus = this.activeDateCell;
|
|
11840
|
+
}
|
|
11841
|
+
else {
|
|
11842
|
+
if (this.monthSelectRef && this.months.length > 0) {
|
|
11843
|
+
elementToFocus = this.monthSelectRef.select.nativeElement;
|
|
11844
|
+
}
|
|
11845
|
+
else if (this.onPreviousMonthKeydown && !this.isPreviousMonthDisabled) {
|
|
11846
|
+
elementToFocus = this.previousMonthRef.nativeElement;
|
|
11847
|
+
}
|
|
11848
|
+
else {
|
|
11849
|
+
elementToFocus = this.activeDateCell;
|
|
11850
|
+
}
|
|
11851
|
+
}
|
|
11852
|
+
this.focusElement(event, elementToFocus);
|
|
11853
|
+
break;
|
|
11854
|
+
case 'Enter':
|
|
11855
|
+
event.preventDefault();
|
|
11856
|
+
this.getNextMonth();
|
|
11857
|
+
break;
|
|
11858
|
+
}
|
|
11859
|
+
}
|
|
11860
|
+
onNextMonthMousedown() {
|
|
11861
|
+
this.getNextMonth();
|
|
11862
|
+
}
|
|
11863
|
+
onPreviousMonthMousedown() {
|
|
11864
|
+
this.getPreviousMonth();
|
|
11865
|
+
}
|
|
11866
|
+
onMonthSelectKeydown(event) {
|
|
11867
|
+
let elementToFocus;
|
|
11868
|
+
switch (event.key) {
|
|
11869
|
+
case 'Tab':
|
|
11870
|
+
if (!event.shiftKey) {
|
|
11871
|
+
if (this.nextMonthRef && !this.nextMonthDisabled) {
|
|
11872
|
+
elementToFocus = this.nextMonthRef.nativeElement;
|
|
11873
|
+
}
|
|
11874
|
+
else {
|
|
11875
|
+
elementToFocus = this.activeDateCell;
|
|
11876
|
+
}
|
|
11877
|
+
}
|
|
11878
|
+
else {
|
|
11879
|
+
if (this.onPreviousMonthKeydown && !this.isPreviousMonthDisabled) {
|
|
11880
|
+
elementToFocus = this.previousMonthRef.nativeElement;
|
|
11881
|
+
}
|
|
11882
|
+
else {
|
|
11883
|
+
elementToFocus = this.activeDateCell;
|
|
11884
|
+
}
|
|
11885
|
+
}
|
|
11886
|
+
this.focusElement(event, elementToFocus);
|
|
11887
|
+
break;
|
|
11888
|
+
}
|
|
11889
|
+
}
|
|
11890
|
+
focusElement(event, elementToFocus) {
|
|
11891
|
+
if (elementToFocus) {
|
|
11892
|
+
elementToFocus.focus();
|
|
11893
|
+
}
|
|
11894
|
+
if (event) {
|
|
11895
|
+
event.preventDefault();
|
|
11896
|
+
}
|
|
11897
|
+
}
|
|
11898
|
+
setActiveDate() {
|
|
11899
|
+
if (!this.currentMonth) {
|
|
11900
|
+
return;
|
|
11901
|
+
}
|
|
11902
|
+
const today = this.dateService.utcDate();
|
|
11903
|
+
const lastDay = new Date(this.currentMonth.year, this.currentMonth.month + 1, 0);
|
|
11904
|
+
const newDate = this.activeDate?.date > lastDay.getDate() ? lastDay.getDate() : this.activeDate?.date;
|
|
11905
|
+
if (this.currentMonth.month !== today.month || this.currentMonth.year !== today.year) {
|
|
11906
|
+
const nextMonth = this.currentMonth.month;
|
|
11907
|
+
const nextYear = this.currentMonth.year;
|
|
11908
|
+
this.activeDate = new UtcDate(nextYear, nextMonth, newDate);
|
|
11909
|
+
}
|
|
11910
|
+
else if (this.activeDate && this.activeDate.month !== this.currentMonth.month) {
|
|
11911
|
+
this.activeDate = new UtcDate(this.activeDateValue.year, this.currentMonth.month, newDate);
|
|
11912
|
+
}
|
|
11913
|
+
else {
|
|
11914
|
+
this.activeDate = this.dateService.utcDate();
|
|
11915
|
+
}
|
|
11916
|
+
}
|
|
11917
|
+
onMouseDown(date, event) {
|
|
11918
|
+
this.setSelectedDate(this.dateService.utcDate(date));
|
|
11919
|
+
this.focusOnNextChange.emit(event);
|
|
11920
|
+
}
|
|
11921
|
+
onDayFocus(day) {
|
|
11922
|
+
this.activeDate = this.dateService.utcDate(day.date);
|
|
11923
|
+
}
|
|
11924
|
+
onDayClick(day) {
|
|
11925
|
+
if (this.dateService.isGreaterThan(this.dateService.utcDate(day.date), this.activeDate)) {
|
|
11926
|
+
}
|
|
11927
|
+
if (!day.isAvailable) {
|
|
11928
|
+
return;
|
|
11929
|
+
}
|
|
11930
|
+
this.setSelectedDate(this.dateService.utcDate(day.date));
|
|
11931
|
+
this.availableDays.forEach(date => {
|
|
11932
|
+
if (this.activeDate && this.selectedDate) {
|
|
11933
|
+
const utcDate = this.dateService.utcDate(day.date);
|
|
11934
|
+
const withinRange = this.dateService.isGreaterThan(utcDate, this.selectedDate) &&
|
|
11935
|
+
this.dateService.isLessThan(utcDate, this.activeDate);
|
|
11936
|
+
date.isWithinRange = withinRange;
|
|
11937
|
+
}
|
|
11938
|
+
});
|
|
11939
|
+
}
|
|
11940
|
+
setSelectedDate(date) {
|
|
11941
|
+
if (!date) {
|
|
11942
|
+
return;
|
|
11943
|
+
}
|
|
11944
|
+
if (this.nasFormGroup && this.nasFormControlName) {
|
|
11945
|
+
const control = this.nasFormGroup.get(this.nasFormControlName);
|
|
11946
|
+
const calendarDate = {
|
|
11947
|
+
model: this.datePipe.transform(this.dateService.date(date), this.dateDisplayFormat, 'UTC', this.locale),
|
|
11948
|
+
date: date
|
|
11949
|
+
};
|
|
11950
|
+
control.patchValue(calendarDate);
|
|
11951
|
+
}
|
|
11952
|
+
this.selectedDateChange.emit(date);
|
|
11953
|
+
if (this.weeks && this.weeks.length > 0) {
|
|
11954
|
+
for (const week of this.weeks) {
|
|
11955
|
+
if (!week) {
|
|
11956
|
+
continue;
|
|
11957
|
+
}
|
|
11958
|
+
for (const day of week.days) {
|
|
11959
|
+
if (!day) {
|
|
11960
|
+
continue;
|
|
11961
|
+
}
|
|
11962
|
+
day.isSelected = day.isAvailable
|
|
11963
|
+
&& this.dateService.isSameDate(this.dateService.utcDate(day.date), date);
|
|
11964
|
+
}
|
|
11965
|
+
}
|
|
11966
|
+
}
|
|
11967
|
+
}
|
|
11968
|
+
getCellButtonClass(day) {
|
|
11969
|
+
if (!day) {
|
|
11970
|
+
return this.getClass('item');
|
|
11971
|
+
}
|
|
11972
|
+
return this.getClass('item', [
|
|
11973
|
+
day.isDisabled && 'before',
|
|
11974
|
+
day.isSelected && 'selected',
|
|
11975
|
+
!this.dateService.isSameMonth(this.dateService.utcDate(day.date), this.currentMonth) && 'empty',
|
|
11976
|
+
day.isAvailable && 'available',
|
|
11977
|
+
'large',
|
|
11978
|
+
day.isActive && 'active',
|
|
11979
|
+
day.isWithinRange && 'within-range'
|
|
11980
|
+
]);
|
|
11981
|
+
}
|
|
11982
|
+
getNextMonth() {
|
|
11983
|
+
if (!this.weeks) {
|
|
11984
|
+
return;
|
|
11985
|
+
}
|
|
11986
|
+
const firstWeek = this.weeks[0];
|
|
11987
|
+
if (!firstWeek) {
|
|
11988
|
+
return;
|
|
11989
|
+
}
|
|
11990
|
+
const firstValidDay = firstWeek.days
|
|
11991
|
+
.find(day => day && this.dateService.isSameMonth(this.dateService.utcDate(day.date), this.currentMonth));
|
|
11992
|
+
if (!firstValidDay) {
|
|
11993
|
+
return;
|
|
11994
|
+
}
|
|
11995
|
+
const nextMonth = this.dateService.utcDate(firstValidDay.date);
|
|
11996
|
+
const month = nextMonth.month + 1;
|
|
11997
|
+
nextMonth.setMonth(month);
|
|
11998
|
+
this.currentMonth = nextMonth;
|
|
11999
|
+
this.applySelectedDateChanges();
|
|
12000
|
+
this.monthChange.emit(this.currentMonth);
|
|
12001
|
+
this.setPreviousMonthDisabled();
|
|
12002
|
+
if (!this.availability) {
|
|
12003
|
+
this.maxMonthIndex++;
|
|
12004
|
+
}
|
|
12005
|
+
}
|
|
12006
|
+
getPreviousMonth() {
|
|
12007
|
+
if (!this.weeks) {
|
|
12008
|
+
return;
|
|
12009
|
+
}
|
|
12010
|
+
const firstWeek = this.weeks[0];
|
|
12011
|
+
if (!firstWeek) {
|
|
12012
|
+
return;
|
|
12013
|
+
}
|
|
12014
|
+
const firstValidDay = firstWeek.days
|
|
12015
|
+
.find(day => day && this.dateService.isSameMonth(this.dateService.utcDate(day.date), this.currentMonth));
|
|
12016
|
+
const previousMonth = this.dateService.utcDate(firstValidDay.date);
|
|
12017
|
+
const month = previousMonth.month - 1;
|
|
12018
|
+
previousMonth.setMonth(month);
|
|
12019
|
+
this.currentMonth = previousMonth;
|
|
12020
|
+
this.applySelectedDateChanges();
|
|
12021
|
+
this.monthChange.emit(this.currentMonth);
|
|
12022
|
+
this.setPreviousMonthDisabled();
|
|
12023
|
+
}
|
|
12024
|
+
setPreviousMonthDisabled() {
|
|
12025
|
+
if (this.currentMonth) {
|
|
12026
|
+
const previousMonth = new UtcDate(this.currentMonth.year, this.currentMonth.month, this.currentMonth.date);
|
|
12027
|
+
const month = previousMonth.month - 1;
|
|
12028
|
+
previousMonth.setMonth(month);
|
|
12029
|
+
if (this.disablePastSelection && this.dateService.isInThePast(previousMonth, true)) {
|
|
12030
|
+
this.isPreviousMonthDisabled = true;
|
|
12031
|
+
return;
|
|
12032
|
+
}
|
|
12033
|
+
}
|
|
12034
|
+
this.isPreviousMonthDisabled = false;
|
|
12035
|
+
}
|
|
12036
|
+
applySelectedDateChanges() {
|
|
12037
|
+
this.availableDays = this.calendarService.getAvailableDays(this.currentMonth, this.availableDates, this.availability, this.disablePastSelection, this.lowerLimitDate, this.activeDate, this.selectedDate);
|
|
12038
|
+
this.selectedMonth = this.months
|
|
12039
|
+
.find(x => this.dateService.isSameMonth(this.dateService.utcDate(x.value), this.currentMonth));
|
|
12040
|
+
this.calendarService.updateAvailableDaysWithSelectedDate(this.availableDays, this.selectedDate);
|
|
12041
|
+
this.weeks = this.calendarService.getWeeks(this.availableDays, this.weekStart);
|
|
12042
|
+
}
|
|
12043
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarNewComponent, deps: [{ token: DateHelper }, { token: i1.DatePipe }, { token: CalendarService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12044
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: CalendarNewComponent, selector: "nas-calendar-new", inputs: { noAvailableFlightsLabel: "noAvailableFlightsLabel", availableFlightsLabel: "availableFlightsLabel", disablePastSelection: "disablePastSelection", lowerLimitDate: "lowerLimitDate", date: "date", weekStart: "weekStart", displayWeekNumbers: "displayWeekNumbers", availability: "availability", locale: "locale", availableDates: "availableDates", activeDate: "activeDate", selectedDate: "selectedDate", nasFormGroup: "nasFormGroup", nasFormControlName: "nasFormControlName", dateDisplayFormat: "dateDisplayFormat", ariaLabelPreviousMonth: "ariaLabelPreviousMonth", ariaLabelNextMonth: "ariaLabelNextMonth" }, outputs: { monthChange: "monthChange", focusOnNextChange: "focusOnNextChange", selectedDateChange: "selectedDateChange", activeDateChange: "activeDateChange" }, viewQueries: [{ propertyName: "previousMonthRef", first: true, predicate: ["previousMonthRef"], descendants: true }, { propertyName: "nextMonthRef", first: true, predicate: ["nextMonthRef"], descendants: true }, { propertyName: "calendarContent", first: true, predicate: ["calendarContent"], descendants: true }, { propertyName: "monthSelectRef", first: true, predicate: ["monthSelect"], descendants: true }, { propertyName: "tableCells", predicate: ["tableCells"], descendants: true }, { propertyName: "dateButtons", predicate: ["dateButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [nasClass]=\"getClass()\">\n <div #calendarContent\n tabindex=\"0\"\n [nasClass]=\"getClass('content')\">\n <header [nasClass]=\"getClass('header')\">\n <button type=\"button\"\n #previousMonthRef\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelPreviousMonth\"\n [nasClass]=\"getClass('nav')\"\n [disabled]=\"isPreviousMonthDisabled === true\"\n (keydown)=\"onPreviousMonthKeydown($event)\"\n (mousedown)=\"onPreviousMonthMousedown()\">\n <nas-icon tabindex=\"-1\"\n [type]=\"'arrow-left'\"></nas-icon>\n </button>\n <ng-container *ngIf=\"months?.length > 0; else currentMonthTemplate\">\n <nas-select #monthSelect\n [cssClass]=\"getClass('month')\"\n [inline]=\"true\"\n [simple]=\"true\"\n [options]=\"months\"\n [(selected)]=\"selectedMonth\"\n (keydown)=\"onMonthSelectKeydown($event)\"></nas-select>\n </ng-container>\n <ng-template #currentMonthTemplate>\n {{currentMonthModel}}\n </ng-template> \n <button type=\"button\"\n tabindex=\"0\"\n #nextMonthRef\n [nasClass]=\"getClass('nav')\"\n [attr.aria-label]=\"ariaLabelNextMonth\"\n [disabled]=\"nextMonthDisabled\"\n (keydown)=\"onNextMonthKeydown($event)\"\n (mousedown)=\"onNextMonthMousedown()\">\n <nas-icon [type]=\"'arrow-right'\"></nas-icon>\n </button>\n </header>\n\n <!-- Weekdays + Dates -->\n <table [nasClass]=\"getClass('table')\">\n <thead>\n <tr [nasClass]=\"getClass('week')\">\n <th *ngIf=\"exists(displayWeekNumbers)\"\n [nasClass]=\"getClass('week-number')\"></th>\n <th [nasClass]=\"getClass('cell')\"\n *ngFor=\"let weekday of weekdays\">\n <div [nasClass]=\"getClass('item', 'header')\">{{weekday}}</div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let week of weeks\"\n [nasClass]=\"getClass('row', 'animate')\">\n <td *ngIf=\"exists(displayWeekNumbers)\"\n [nasClass]=\"getClass('week-number')\">\n <span [nasClass]=\"getClass('date', 'week-number')\">{{week.weekNumber}}</span>\n </td>\n <td [nasClass]=\"getClass('cell')\"\n *ngFor=\"let day of week?.days\"\n #tableCells>\n <div [nasClass]=\"getClass('item', 'dummy')\"\n *ngIf=\"day === null; else dayTemplate\"></div>\n <ng-template #dayTemplate\n tabindex=\"0\">\n <button type=\"button\"\n #dateButton\n (keydown)=\"dateKeyDown($event)\"\n tabIndex=\"0\"\n [nasClass]=\"getCellButtonClass(day)\"\n (mousedown)=\"onMouseDown(day.date, $event)\"\n (click)=\"onDayClick(day)\"\n (focus)=\"onDayFocus(day)\">\n <div [nasClass]=\"getClass('date-wrapper')\">\n <span [nasClass]=\"getClass('date')\"\n [attr.aria-label]=\"day.date | date : 'd':'UTC'\">{{ day.date | date : 'd':'UTC':locale }}</span>\n </div>\n </button>\n </ng-template>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div [nasClass]=\"getClass('footer')\">\n <div *ngIf=\"availableDates?.length === 0 && noAvailableFlightsLabel\"\n [nasClass]=\"getClass('footer', 'item')\">\n <nas-icon [icon]=\"'alert'\"></nas-icon>\n {{noAvailableFlightsLabel}}\n </div>\n <div *ngIf=\"availableDates?.length > 0 && noAvailableFlightsLabel && availableFlightsLabel\"\n [nasClass]=\"getClass('footer', 'item')\">\n <div [nasClass]=\"getClass('item', 'available')\"></div>\n <div [nasClass]=\"getClass('footer', 'label')\">{{availableFlightsLabel}}</div>\n <span [nasClass]=\"getClass('item', 'unavailable')\"></span>\n <div [nasClass]=\"getClass('footer', 'label')\">{{noAvailableFlightsLabel}}</div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-calendar-new{width:100%;min-width:325px;float:right;padding:10px 0 5px;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:flip-in .55s ease both;margin-top:3px;position:relative;z-index:4}@media (min-width: 640px){.nas-calendar-new{max-width:350px}}.nas-calendar-new__content:active{outline:none;box-shadow:none}.nas-calendar-new__content:focus{outline:none;box-shadow:none}.nas-calendar-new__cover{margin-bottom:16px}.nas-calendar-new__header{height:30px;font-size:small;font-weight:700;display:flex;justify-content:space-between}.nas-calendar-new__month{margin:0 auto 21px}.nas-calendar-new__months{background-color:#fff;max-width:350px;display:flex;flex-wrap:wrap;gap:15px}.nas-calendar-new__months--item{text-transform:uppercase}.nas-calendar-new__table{table-layout:fixed;width:100%}.nas-calendar-new__week-number{font-size:14px;line-height:20px;position:relative;width:20px;display:none}@media (min-width: 640px){.nas-calendar-new__week-number{display:table-cell}}.nas-calendar-new__cell{padding:0;font-weight:400;color:#15273f}.nas-calendar-new__nav{margin:-3px 2px 12px;width:24px;height:24px;border-radius:50%;transition:transform .2s cubic-bezier(0,0,.1,1),opacity .2s ease-out}.nas-calendar-new__nav .nas-icon-arrow-left--light,.nas-calendar-new__nav .nas-icon-arrow-right--light{position:absolute;top:50%;left:50%}.nas-calendar-new__nav .nas-icon-arrow-left--light{transform:translate(-60%,-50%)}.nas-calendar-new__nav .nas-icon-arrow-right--light{transform:translate(-40%,-50%)}.nas-calendar-new__nav:hover,.nas-calendar-new__nav:focus{outline:none;border:2px solid #3b99fc}.nas-calendar-new__nav:active{transform:translateY(2px)}.nas-calendar-new__nav[disabled]{pointer-events:none;opacity:.5}.nas-calendar-new__item{font-size:14px;line-height:20px;display:flex;flex-direction:column;margin-left:5px;cursor:pointer;overflow:hidden;width:100%;height:40px;text-align:left;outline:0;padding:2px;border:1px solid #fff;transition:transform .17s cubic-bezier(0,0,.1,1);border-radius:0;align-items:center;justify-content:center;pointer-events:none;opacity:.5;background-color:#fff}.nas-calendar-new__item .nas-calendar-new__date{color:#002a3a}@media (min-width: 640px){.nas-calendar-new__item{padding:2px 6px}}@media (min-width: 1000px){.nas-calendar-new__item{padding:2px 3px}}@media (min-width: 1180px){.nas-calendar-new__item{padding:2px 6px}}.nas-calendar-new__item--large{height:40px;width:40px;margin-top:5px}.nas-calendar-new__item--header{pointer-events:none;background-color:transparent;border:0;opacity:1;padding-bottom:9px;margin-left:0!important}.nas-calendar-new__item--dummy{visibility:hidden}.nas-calendar-new__item--today .nas-calendar-new__date{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:#15273f}.nas-calendar-new__item--cheapest{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:#e5212d}.nas-calendar-new__item--empty{pointer-events:none;opacity:.3;border-color:#fff;background-color:#fff}.nas-calendar-new__item--empty .nas-calendar-new__date{color:inherit}.nas-calendar-new__item--available{pointer-events:all;opacity:1;border-color:#eaeaea;background-color:#f9f9f9}.nas-calendar-new__item--available .nas-calendar-new__date{color:#002a3a}.nas-calendar-new__item--active{border:2px solid #15273F;background-color:#ebf4ff}.nas-calendar-new__item--within-range{background-color:#ebf4ff}.nas-calendar-new__item--before{pointer-events:none;color:#a9a9a9;opacity:.55}.nas-calendar-new__item:hover,.nas-calendar-new__item:focus{border-color:#15273f;border-width:3px;box-shadow:inset 0 0 2px #c3c3c3,inset 0 0 2px 3px #3b99fc}.nas-calendar-new__item:active{transform:translateY(3px)}.nas-calendar-new__item--selected,.nas-calendar-new__item:active{color:#fff;background-color:#15273f;height:40px;width:40px;margin-left:5px}.nas-calendar-new__item--selected:hover,.nas-calendar-new__item--selected:focus,.nas-calendar-new__item:active:hover,.nas-calendar-new__item:active:focus{border-color:#15273f;border-width:3px}.nas-calendar-new__item--selected .nas-calendar-new__date,.nas-calendar-new__item:active .nas-calendar-new__date{color:inherit}.nas-calendar-new__item--sold-out{pointer-events:none;opacity:.8;border-color:#fff;background-color:#fff}.nas-calendar-new__item--sold-out .nas-calendar-new__date{color:#002a3a}.nas-calendar-new__item[disabled]{pointer-events:none}.nas-calendar-new__week{border-bottom:1px solid #eaeaea}.nas-calendar-new__date{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;color:#6f6f6f}.nas-calendar-new__date--week-number{top:6px;right:6px}.nas-calendar-new__price{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:inherit;letter-spacing:-.04em}@media (min-width: 640px){.nas-calendar-new__price{font-size:14px;line-height:1.1}}@media (min-width: 1280px){.nas-calendar-new__price{font-size:16px}}.nas-calendar-new__price--before{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;text-decoration:line-through;font-size:.8em;line-height:1}@media (min-width: 1000px){.nas-calendar-new__price--before{margin-bottom:2px}}.nas-calendar-new__sold-out{position:absolute;bottom:2px;left:2px;line-height:1;overflow-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto;letter-spacing:-.015em;color:#8c8c8c;font-size:.75em}@media (min-width: 640px){.nas-calendar-new__sold-out{font-size:.9em;bottom:6px;left:6px}}@media (min-width: 1000px){.nas-calendar-new__sold-out{left:3px}}@media (min-width: 1180px){.nas-calendar-new__sold-out{left:6px}}.nas-calendar-new__transit{position:relative;display:flex;max-width:3.8em;width:calc(100% - 12px);padding:0 .5em 0 .3em;height:8px;justify-content:space-around;margin-bottom:2px;transform:scale(.85);transform-origin:left;background-color:inherit}@media (min-width: 640px){.nas-calendar-new__transit{transform:none;padding:0 .5em 0 .3em;margin-bottom:3px}}.nas-calendar-new__transit:before,.nas-calendar-new__transit:after{content:\"\";position:absolute}.nas-calendar-new__transit:before{top:calc(50% - 1px);width:100%;left:0;height:2px;background-color:currentColor}.nas-calendar-new__transit:after{width:8px;height:8px;right:0;border-right:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg)}.nas-calendar-new__transit-indicator{position:relative;width:8px;height:8px;flex-shrink:0;border-radius:50%;border:2px solid currentColor;background-color:#fff}.nas-calendar-new__asterisk{font-size:.67em;top:-.36em;margin-left:.1em}.nas-calendar-new__footer{display:flex;justify-content:center}.nas-calendar-new__footer .nas-calendar-new__item{width:25px;height:25px;margin-right:3px}.nas-calendar-new__footer .nas-calendar-new__item--unavailable{border:1px solid #15273f}.nas-calendar-new__footer--item{margin-bottom:6px}.nas-calendar-new__footer--label{flex-shrink:0;margin-right:12px;display:flex;flex-direction:column;justify-content:center;font-size:14px;line-height:20px}@keyframes lowfare-item-in{0%{opacity:0;transform:scale(0)}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SelectComponent, selector: "nas-select", inputs: ["id", "inline", "label", "block", "spaceless", "stretch", "compact", "simple", "light", "fill", "error", "errorMessage", "disabled", "autogrow", "cssClass", "nasFormControlName", "nasFormGroup", "options", "selectedValue", "selected"], outputs: ["selectedChange", "keydown"] }, { kind: "component", type: IconComponent, selector: "nas-icon", inputs: ["icon", "type", "isIndicator", "lightCircularBackground", "cssClass"] }, { kind: "directive", type: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
12045
|
+
}
|
|
12046
|
+
__decorate([
|
|
12047
|
+
Debounce(150)
|
|
12048
|
+
], CalendarNewComponent.prototype, "onPreviousMonthKeydown", null);
|
|
12049
|
+
__decorate([
|
|
12050
|
+
Debounce(150)
|
|
12051
|
+
], CalendarNewComponent.prototype, "onNextMonthKeydown", null);
|
|
12052
|
+
__decorate([
|
|
12053
|
+
Debounce(200)
|
|
12054
|
+
], CalendarNewComponent.prototype, "onNextMonthMousedown", null);
|
|
12055
|
+
__decorate([
|
|
12056
|
+
Debounce(200)
|
|
12057
|
+
], CalendarNewComponent.prototype, "onPreviousMonthMousedown", null);
|
|
12058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: CalendarNewComponent, decorators: [{
|
|
12059
|
+
type: Component,
|
|
12060
|
+
args: [{ selector: 'nas-calendar-new', encapsulation: ViewEncapsulation.None, template: "<div [nasClass]=\"getClass()\">\n <div #calendarContent\n tabindex=\"0\"\n [nasClass]=\"getClass('content')\">\n <header [nasClass]=\"getClass('header')\">\n <button type=\"button\"\n #previousMonthRef\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelPreviousMonth\"\n [nasClass]=\"getClass('nav')\"\n [disabled]=\"isPreviousMonthDisabled === true\"\n (keydown)=\"onPreviousMonthKeydown($event)\"\n (mousedown)=\"onPreviousMonthMousedown()\">\n <nas-icon tabindex=\"-1\"\n [type]=\"'arrow-left'\"></nas-icon>\n </button>\n <ng-container *ngIf=\"months?.length > 0; else currentMonthTemplate\">\n <nas-select #monthSelect\n [cssClass]=\"getClass('month')\"\n [inline]=\"true\"\n [simple]=\"true\"\n [options]=\"months\"\n [(selected)]=\"selectedMonth\"\n (keydown)=\"onMonthSelectKeydown($event)\"></nas-select>\n </ng-container>\n <ng-template #currentMonthTemplate>\n {{currentMonthModel}}\n </ng-template> \n <button type=\"button\"\n tabindex=\"0\"\n #nextMonthRef\n [nasClass]=\"getClass('nav')\"\n [attr.aria-label]=\"ariaLabelNextMonth\"\n [disabled]=\"nextMonthDisabled\"\n (keydown)=\"onNextMonthKeydown($event)\"\n (mousedown)=\"onNextMonthMousedown()\">\n <nas-icon [type]=\"'arrow-right'\"></nas-icon>\n </button>\n </header>\n\n <!-- Weekdays + Dates -->\n <table [nasClass]=\"getClass('table')\">\n <thead>\n <tr [nasClass]=\"getClass('week')\">\n <th *ngIf=\"exists(displayWeekNumbers)\"\n [nasClass]=\"getClass('week-number')\"></th>\n <th [nasClass]=\"getClass('cell')\"\n *ngFor=\"let weekday of weekdays\">\n <div [nasClass]=\"getClass('item', 'header')\">{{weekday}}</div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let week of weeks\"\n [nasClass]=\"getClass('row', 'animate')\">\n <td *ngIf=\"exists(displayWeekNumbers)\"\n [nasClass]=\"getClass('week-number')\">\n <span [nasClass]=\"getClass('date', 'week-number')\">{{week.weekNumber}}</span>\n </td>\n <td [nasClass]=\"getClass('cell')\"\n *ngFor=\"let day of week?.days\"\n #tableCells>\n <div [nasClass]=\"getClass('item', 'dummy')\"\n *ngIf=\"day === null; else dayTemplate\"></div>\n <ng-template #dayTemplate\n tabindex=\"0\">\n <button type=\"button\"\n #dateButton\n (keydown)=\"dateKeyDown($event)\"\n tabIndex=\"0\"\n [nasClass]=\"getCellButtonClass(day)\"\n (mousedown)=\"onMouseDown(day.date, $event)\"\n (click)=\"onDayClick(day)\"\n (focus)=\"onDayFocus(day)\">\n <div [nasClass]=\"getClass('date-wrapper')\">\n <span [nasClass]=\"getClass('date')\"\n [attr.aria-label]=\"day.date | date : 'd':'UTC'\">{{ day.date | date : 'd':'UTC':locale }}</span>\n </div>\n </button>\n </ng-template>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div [nasClass]=\"getClass('footer')\">\n <div *ngIf=\"availableDates?.length === 0 && noAvailableFlightsLabel\"\n [nasClass]=\"getClass('footer', 'item')\">\n <nas-icon [icon]=\"'alert'\"></nas-icon>\n {{noAvailableFlightsLabel}}\n </div>\n <div *ngIf=\"availableDates?.length > 0 && noAvailableFlightsLabel && availableFlightsLabel\"\n [nasClass]=\"getClass('footer', 'item')\">\n <div [nasClass]=\"getClass('item', 'available')\"></div>\n <div [nasClass]=\"getClass('footer', 'label')\">{{availableFlightsLabel}}</div>\n <span [nasClass]=\"getClass('item', 'unavailable')\"></span>\n <div [nasClass]=\"getClass('footer', 'label')\">{{noAvailableFlightsLabel}}</div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-calendar-new{width:100%;min-width:325px;float:right;padding:10px 0 5px;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:flip-in .55s ease both;margin-top:3px;position:relative;z-index:4}@media (min-width: 640px){.nas-calendar-new{max-width:350px}}.nas-calendar-new__content:active{outline:none;box-shadow:none}.nas-calendar-new__content:focus{outline:none;box-shadow:none}.nas-calendar-new__cover{margin-bottom:16px}.nas-calendar-new__header{height:30px;font-size:small;font-weight:700;display:flex;justify-content:space-between}.nas-calendar-new__month{margin:0 auto 21px}.nas-calendar-new__months{background-color:#fff;max-width:350px;display:flex;flex-wrap:wrap;gap:15px}.nas-calendar-new__months--item{text-transform:uppercase}.nas-calendar-new__table{table-layout:fixed;width:100%}.nas-calendar-new__week-number{font-size:14px;line-height:20px;position:relative;width:20px;display:none}@media (min-width: 640px){.nas-calendar-new__week-number{display:table-cell}}.nas-calendar-new__cell{padding:0;font-weight:400;color:#15273f}.nas-calendar-new__nav{margin:-3px 2px 12px;width:24px;height:24px;border-radius:50%;transition:transform .2s cubic-bezier(0,0,.1,1),opacity .2s ease-out}.nas-calendar-new__nav .nas-icon-arrow-left--light,.nas-calendar-new__nav .nas-icon-arrow-right--light{position:absolute;top:50%;left:50%}.nas-calendar-new__nav .nas-icon-arrow-left--light{transform:translate(-60%,-50%)}.nas-calendar-new__nav .nas-icon-arrow-right--light{transform:translate(-40%,-50%)}.nas-calendar-new__nav:hover,.nas-calendar-new__nav:focus{outline:none;border:2px solid #3b99fc}.nas-calendar-new__nav:active{transform:translateY(2px)}.nas-calendar-new__nav[disabled]{pointer-events:none;opacity:.5}.nas-calendar-new__item{font-size:14px;line-height:20px;display:flex;flex-direction:column;margin-left:5px;cursor:pointer;overflow:hidden;width:100%;height:40px;text-align:left;outline:0;padding:2px;border:1px solid #fff;transition:transform .17s cubic-bezier(0,0,.1,1);border-radius:0;align-items:center;justify-content:center;pointer-events:none;opacity:.5;background-color:#fff}.nas-calendar-new__item .nas-calendar-new__date{color:#002a3a}@media (min-width: 640px){.nas-calendar-new__item{padding:2px 6px}}@media (min-width: 1000px){.nas-calendar-new__item{padding:2px 3px}}@media (min-width: 1180px){.nas-calendar-new__item{padding:2px 6px}}.nas-calendar-new__item--large{height:40px;width:40px;margin-top:5px}.nas-calendar-new__item--header{pointer-events:none;background-color:transparent;border:0;opacity:1;padding-bottom:9px;margin-left:0!important}.nas-calendar-new__item--dummy{visibility:hidden}.nas-calendar-new__item--today .nas-calendar-new__date{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:#15273f}.nas-calendar-new__item--cheapest{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:#e5212d}.nas-calendar-new__item--empty{pointer-events:none;opacity:.3;border-color:#fff;background-color:#fff}.nas-calendar-new__item--empty .nas-calendar-new__date{color:inherit}.nas-calendar-new__item--available{pointer-events:all;opacity:1;border-color:#eaeaea;background-color:#f9f9f9}.nas-calendar-new__item--available .nas-calendar-new__date{color:#002a3a}.nas-calendar-new__item--active{border:2px solid #15273F;background-color:#ebf4ff}.nas-calendar-new__item--within-range{background-color:#ebf4ff}.nas-calendar-new__item--before{pointer-events:none;color:#a9a9a9;opacity:.55}.nas-calendar-new__item:hover,.nas-calendar-new__item:focus{border-color:#15273f;border-width:3px;box-shadow:inset 0 0 2px #c3c3c3,inset 0 0 2px 3px #3b99fc}.nas-calendar-new__item:active{transform:translateY(3px)}.nas-calendar-new__item--selected,.nas-calendar-new__item:active{color:#fff;background-color:#15273f;height:40px;width:40px;margin-left:5px}.nas-calendar-new__item--selected:hover,.nas-calendar-new__item--selected:focus,.nas-calendar-new__item:active:hover,.nas-calendar-new__item:active:focus{border-color:#15273f;border-width:3px}.nas-calendar-new__item--selected .nas-calendar-new__date,.nas-calendar-new__item:active .nas-calendar-new__date{color:inherit}.nas-calendar-new__item--sold-out{pointer-events:none;opacity:.8;border-color:#fff;background-color:#fff}.nas-calendar-new__item--sold-out .nas-calendar-new__date{color:#002a3a}.nas-calendar-new__item[disabled]{pointer-events:none}.nas-calendar-new__week{border-bottom:1px solid #eaeaea}.nas-calendar-new__date{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;color:#6f6f6f}.nas-calendar-new__date--week-number{top:6px;right:6px}.nas-calendar-new__price{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;color:inherit;letter-spacing:-.04em}@media (min-width: 640px){.nas-calendar-new__price{font-size:14px;line-height:1.1}}@media (min-width: 1280px){.nas-calendar-new__price{font-size:16px}}.nas-calendar-new__price--before{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;text-decoration:line-through;font-size:.8em;line-height:1}@media (min-width: 1000px){.nas-calendar-new__price--before{margin-bottom:2px}}.nas-calendar-new__sold-out{position:absolute;bottom:2px;left:2px;line-height:1;overflow-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto;letter-spacing:-.015em;color:#8c8c8c;font-size:.75em}@media (min-width: 640px){.nas-calendar-new__sold-out{font-size:.9em;bottom:6px;left:6px}}@media (min-width: 1000px){.nas-calendar-new__sold-out{left:3px}}@media (min-width: 1180px){.nas-calendar-new__sold-out{left:6px}}.nas-calendar-new__transit{position:relative;display:flex;max-width:3.8em;width:calc(100% - 12px);padding:0 .5em 0 .3em;height:8px;justify-content:space-around;margin-bottom:2px;transform:scale(.85);transform-origin:left;background-color:inherit}@media (min-width: 640px){.nas-calendar-new__transit{transform:none;padding:0 .5em 0 .3em;margin-bottom:3px}}.nas-calendar-new__transit:before,.nas-calendar-new__transit:after{content:\"\";position:absolute}.nas-calendar-new__transit:before{top:calc(50% - 1px);width:100%;left:0;height:2px;background-color:currentColor}.nas-calendar-new__transit:after{width:8px;height:8px;right:0;border-right:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg)}.nas-calendar-new__transit-indicator{position:relative;width:8px;height:8px;flex-shrink:0;border-radius:50%;border:2px solid currentColor;background-color:#fff}.nas-calendar-new__asterisk{font-size:.67em;top:-.36em;margin-left:.1em}.nas-calendar-new__footer{display:flex;justify-content:center}.nas-calendar-new__footer .nas-calendar-new__item{width:25px;height:25px;margin-right:3px}.nas-calendar-new__footer .nas-calendar-new__item--unavailable{border:1px solid #15273f}.nas-calendar-new__footer--item{margin-bottom:6px}.nas-calendar-new__footer--label{flex-shrink:0;margin-right:12px;display:flex;flex-direction:column;justify-content:center;font-size:14px;line-height:20px}@keyframes lowfare-item-in{0%{opacity:0;transform:scale(0)}}\n"] }]
|
|
12061
|
+
}], ctorParameters: function () { return [{ type: DateHelper }, { type: i1.DatePipe }, { type: CalendarService }]; }, propDecorators: { previousMonthRef: [{
|
|
12062
|
+
type: ViewChild,
|
|
12063
|
+
args: ['previousMonthRef']
|
|
12064
|
+
}], nextMonthRef: [{
|
|
12065
|
+
type: ViewChild,
|
|
12066
|
+
args: ['nextMonthRef']
|
|
12067
|
+
}], tableCells: [{
|
|
12068
|
+
type: ViewChildren,
|
|
12069
|
+
args: ['tableCells']
|
|
12070
|
+
}], dateButtons: [{
|
|
12071
|
+
type: ViewChildren,
|
|
12072
|
+
args: ['dateButton']
|
|
12073
|
+
}], calendarContent: [{
|
|
12074
|
+
type: ViewChild,
|
|
12075
|
+
args: ['calendarContent']
|
|
12076
|
+
}], monthSelectRef: [{
|
|
12077
|
+
type: ViewChild,
|
|
12078
|
+
args: ['monthSelect']
|
|
12079
|
+
}], noAvailableFlightsLabel: [{
|
|
12080
|
+
type: Input
|
|
12081
|
+
}], availableFlightsLabel: [{
|
|
12082
|
+
type: Input
|
|
12083
|
+
}], disablePastSelection: [{
|
|
12084
|
+
type: Input
|
|
12085
|
+
}], lowerLimitDate: [{
|
|
12086
|
+
type: Input
|
|
12087
|
+
}], date: [{
|
|
12088
|
+
type: Input
|
|
12089
|
+
}], weekStart: [{
|
|
12090
|
+
type: Input
|
|
12091
|
+
}], displayWeekNumbers: [{
|
|
12092
|
+
type: Input
|
|
12093
|
+
}], availability: [{
|
|
12094
|
+
type: Input
|
|
12095
|
+
}], locale: [{
|
|
12096
|
+
type: Input
|
|
12097
|
+
}], availableDates: [{
|
|
12098
|
+
type: Input
|
|
12099
|
+
}], activeDate: [{
|
|
12100
|
+
type: Input
|
|
12101
|
+
}], selectedDate: [{
|
|
12102
|
+
type: Input
|
|
12103
|
+
}], nasFormGroup: [{
|
|
12104
|
+
type: Input
|
|
12105
|
+
}], nasFormControlName: [{
|
|
12106
|
+
type: Input
|
|
12107
|
+
}], dateDisplayFormat: [{
|
|
12108
|
+
type: Input
|
|
12109
|
+
}], ariaLabelPreviousMonth: [{
|
|
12110
|
+
type: Input
|
|
12111
|
+
}], ariaLabelNextMonth: [{
|
|
12112
|
+
type: Input
|
|
12113
|
+
}], monthChange: [{
|
|
12114
|
+
type: Output
|
|
12115
|
+
}], focusOnNextChange: [{
|
|
12116
|
+
type: Output
|
|
12117
|
+
}], selectedDateChange: [{
|
|
12118
|
+
type: Output
|
|
12119
|
+
}], activeDateChange: [{
|
|
12120
|
+
type: Output
|
|
12121
|
+
}], onPreviousMonthKeydown: [], onNextMonthKeydown: [], onNextMonthMousedown: [], onPreviousMonthMousedown: [] } });
|
|
12122
|
+
|
|
12123
|
+
/**
|
|
12124
|
+
* @description
|
|
12125
|
+
* Norwegian Date Picker Component | New design | Beta
|
|
12126
|
+
*/
|
|
12127
|
+
class DatepickerNewComponent extends NasComponentBase {
|
|
12128
|
+
get showBackdrop() {
|
|
12129
|
+
return this.show && !this.exists(this.disableBackdrop);
|
|
12130
|
+
}
|
|
12131
|
+
set showBackdrop(value) {
|
|
12132
|
+
if (this.show === value) {
|
|
12133
|
+
return;
|
|
12134
|
+
}
|
|
12135
|
+
setTimeout(() => {
|
|
12136
|
+
this.show = value;
|
|
12137
|
+
});
|
|
12138
|
+
}
|
|
12139
|
+
/**
|
|
12140
|
+
* @property Input
|
|
12141
|
+
* @description
|
|
12142
|
+
* The lowest date allowed.
|
|
12143
|
+
*/
|
|
12144
|
+
get lowerLimitDate() {
|
|
12145
|
+
return this.lowerLimitDateValue;
|
|
12146
|
+
}
|
|
12147
|
+
set lowerLimitDate(date) {
|
|
12148
|
+
this.lowerLimitDateValue = date;
|
|
12149
|
+
if (this.dateService.isLessThan(this.selectedDate, date, false, true, true)) {
|
|
12150
|
+
this.selectedDate = date;
|
|
12151
|
+
}
|
|
12152
|
+
}
|
|
12153
|
+
/**
|
|
12154
|
+
* @property Input
|
|
12155
|
+
* @description
|
|
12156
|
+
* boolean value to disable or enable the input of the date picker.
|
|
12157
|
+
*/
|
|
12158
|
+
get disabled() {
|
|
12159
|
+
return this.disabledValue;
|
|
12160
|
+
}
|
|
12161
|
+
set disabled(value) {
|
|
12162
|
+
this.disabledValue = value;
|
|
12163
|
+
if (this.nasFormGroup && this.nasFormControlName) {
|
|
12164
|
+
setTimeout(() => {
|
|
12165
|
+
const control = this.nasFormGroup.get(this.nasFormControlName);
|
|
12166
|
+
if (!control) {
|
|
12167
|
+
return;
|
|
12168
|
+
}
|
|
12169
|
+
if (value) {
|
|
12170
|
+
control.disable();
|
|
12171
|
+
}
|
|
12172
|
+
else {
|
|
12173
|
+
control.enable();
|
|
12174
|
+
}
|
|
12175
|
+
});
|
|
12176
|
+
}
|
|
12177
|
+
}
|
|
12178
|
+
/**
|
|
12179
|
+
* @property Input
|
|
12180
|
+
* @description
|
|
12181
|
+
* An array of times to be added in the time selector.
|
|
12182
|
+
*/
|
|
12183
|
+
get times() {
|
|
12184
|
+
return this.timesValue;
|
|
12185
|
+
}
|
|
12186
|
+
set times(times) {
|
|
12187
|
+
if (!times) {
|
|
12188
|
+
return;
|
|
12189
|
+
}
|
|
12190
|
+
this.timesValue = times;
|
|
12191
|
+
this.timeOptions = times.map(x => {
|
|
12192
|
+
x.year = new Date().getUTCFullYear();
|
|
12193
|
+
const option = {
|
|
12194
|
+
title: this.datePipe.transform(this.dateService.date(x), this.timeDisplayFormat, 'UTC', this.locale),
|
|
12195
|
+
value: this.dateService.date(x).toISOString()
|
|
12196
|
+
};
|
|
12197
|
+
return option;
|
|
12198
|
+
});
|
|
12199
|
+
this.dateDisplayFormat = 'mediumDate';
|
|
12200
|
+
}
|
|
12201
|
+
/**
|
|
12202
|
+
* @property Input
|
|
12203
|
+
* @description
|
|
12204
|
+
* The calendar is open or closed.
|
|
12205
|
+
*/
|
|
12206
|
+
get open() {
|
|
12207
|
+
return this.openValue;
|
|
12208
|
+
}
|
|
12209
|
+
set open(open) {
|
|
12210
|
+
if (open === this.openValue) {
|
|
12211
|
+
return;
|
|
12212
|
+
}
|
|
12213
|
+
this.openValue = open;
|
|
12214
|
+
if (open) {
|
|
12215
|
+
this.openCalendar();
|
|
12216
|
+
}
|
|
12217
|
+
else {
|
|
12218
|
+
this.closeCalendar();
|
|
12219
|
+
}
|
|
12220
|
+
}
|
|
12221
|
+
/**
|
|
12222
|
+
* @property Input
|
|
12223
|
+
* @description
|
|
12224
|
+
* Set selected month.
|
|
12225
|
+
*/
|
|
12226
|
+
get selectedMonth() {
|
|
12227
|
+
return this.selectedMonthValue;
|
|
12228
|
+
}
|
|
12229
|
+
set selectedMonth(month) {
|
|
12230
|
+
if (!month) {
|
|
12231
|
+
return;
|
|
12232
|
+
}
|
|
12233
|
+
if (this.dateService.isSameMonth(this.selectedMonthValue, month)) {
|
|
12234
|
+
return;
|
|
12235
|
+
}
|
|
12236
|
+
setTimeout(() => {
|
|
12237
|
+
this.selectedMonthValue = month;
|
|
12238
|
+
this.selectedMonthChange.emit(month);
|
|
12239
|
+
});
|
|
12240
|
+
}
|
|
12241
|
+
/**
|
|
12242
|
+
* @property Input
|
|
12243
|
+
* @description
|
|
12244
|
+
* Gets or sets the selected Date in the date picker. Setting this date will highlight the date in the date picker
|
|
12245
|
+
* and user can change it by clicking from any other enabled dates
|
|
12246
|
+
* or by navigating betrween months and selecting from different available month.
|
|
12247
|
+
*/
|
|
12248
|
+
get selectedDate() {
|
|
12249
|
+
return this.selectedDateValue;
|
|
12250
|
+
}
|
|
12251
|
+
set selectedDate(date) {
|
|
12252
|
+
if (!date) {
|
|
12253
|
+
return;
|
|
12254
|
+
}
|
|
12255
|
+
if (this.selectedDateValue && this.dateService.isSameDate(this.selectedDateValue, date)) {
|
|
12256
|
+
return;
|
|
12257
|
+
}
|
|
12258
|
+
if (this.selectedTimeValue) {
|
|
12259
|
+
date = new UtcDate(date.year, date.month, date.date, this.selectedTimeValue.hours, this.selectedTimeValue.minutes);
|
|
12260
|
+
}
|
|
12261
|
+
this.selectedDateValue = date;
|
|
12262
|
+
if (this.nasFormGroup && this.nasFormControlName) {
|
|
12263
|
+
const control = this.nasFormGroup.get(this.nasFormControlName);
|
|
12264
|
+
if (control) {
|
|
12265
|
+
const calendarDate = {
|
|
12266
|
+
model: this.datePipe.transform(this.dateService.date(date), this.dateDisplayFormat, 'UTC', this.locale),
|
|
12267
|
+
date: date
|
|
12268
|
+
};
|
|
12269
|
+
control.patchValue(calendarDate);
|
|
12270
|
+
}
|
|
12271
|
+
}
|
|
12272
|
+
setTimeout(() => {
|
|
12273
|
+
this.model = this.datePipe.transform(this.dateService.date(date), this.dateDisplayFormat, 'UTC', this.locale);
|
|
12274
|
+
});
|
|
12275
|
+
this.selectedDateChange.emit(date);
|
|
12276
|
+
if (this.show) {
|
|
12277
|
+
this.closeCalendar();
|
|
12278
|
+
}
|
|
12279
|
+
}
|
|
12280
|
+
/**
|
|
12281
|
+
* @property Input
|
|
12282
|
+
* @description
|
|
12283
|
+
* Sets the selected time in the time selector.
|
|
12284
|
+
*/
|
|
12285
|
+
get selectedTime() {
|
|
12286
|
+
return this.selectedTimeValue;
|
|
12287
|
+
}
|
|
12288
|
+
set selectedTime(time) {
|
|
12289
|
+
if (!time) {
|
|
12290
|
+
return;
|
|
12291
|
+
}
|
|
12292
|
+
this.selectedTimeValue = time;
|
|
12293
|
+
if (this.timeOptions && this.timeOptions.length > 0) {
|
|
12294
|
+
const timeOption = this.timeOptions.find(x => x.value === this.dateService.date(time).toISOString());
|
|
12295
|
+
if (timeOption) {
|
|
12296
|
+
this.selectedTimeOption = timeOption;
|
|
12297
|
+
}
|
|
12298
|
+
}
|
|
12299
|
+
if (this.selectedDate) {
|
|
12300
|
+
this.selectedDate = new UtcDate(this.selectedDate.year, this.selectedDate.month, this.selectedDate.date, this.selectedTimeValue.hours, this.selectedTimeValue.minutes);
|
|
12301
|
+
}
|
|
12302
|
+
else if (this.activeDate) {
|
|
12303
|
+
this.selectedDate = new UtcDate(this.activeDate.year, this.activeDate.month, this.activeDate.date, this.selectedTimeValue.hours, this.selectedTimeValue.minutes);
|
|
12304
|
+
}
|
|
12305
|
+
}
|
|
12306
|
+
get activeDate() {
|
|
12307
|
+
if (this.selectedDate && this.activeDateValue &&
|
|
12308
|
+
this.dateService.isLessThan(this.activeDateValue, this.selectedDate, false, true, true)) {
|
|
12309
|
+
return this.activeDateValue;
|
|
12310
|
+
}
|
|
12311
|
+
if (this.activeDateValue) {
|
|
12312
|
+
return this.activeDateValue;
|
|
12313
|
+
}
|
|
12314
|
+
else if (this.selectedDate) {
|
|
12315
|
+
this.activeDateValue = this.selectedDate;
|
|
12316
|
+
}
|
|
12317
|
+
else {
|
|
12318
|
+
const now = new Date();
|
|
12319
|
+
this.activeDateValue = new UtcDate(now.getFullYear(), now.getMonth(), now.getDate());
|
|
12320
|
+
}
|
|
12321
|
+
return this.activeDateValue;
|
|
12322
|
+
}
|
|
12323
|
+
set activeDate(date) {
|
|
12324
|
+
if (this.lowerLimitDate && this.dateService.isLessThan(date, this.lowerLimitDate, false, true, true)) {
|
|
12325
|
+
return;
|
|
12326
|
+
}
|
|
12327
|
+
this.activeDateValue = date;
|
|
12328
|
+
clearTimeout(this.activeDateTimeout);
|
|
12329
|
+
this.activeDateTimeout = setTimeout(() => {
|
|
12330
|
+
this.model = this.datePipe.transform(this.dateService.date(this.selectedDate), this.dateDisplayFormat, 'UTC', this.locale);
|
|
12331
|
+
});
|
|
12332
|
+
}
|
|
12333
|
+
constructor(datePipe, dateService) {
|
|
12334
|
+
super('nas-datepicker-new');
|
|
12335
|
+
this.datePipe = datePipe;
|
|
12336
|
+
this.dateService = dateService;
|
|
12337
|
+
this.show = false;
|
|
12338
|
+
this.showTimes = false;
|
|
12339
|
+
/**
|
|
12340
|
+
* @property Input
|
|
12341
|
+
* @description
|
|
12342
|
+
* The display format of the date when user has selected the date and it is being shown in the input box for the date picker.
|
|
12343
|
+
* Please look at the angular Date pipe for valid formats and variations.
|
|
12344
|
+
*/
|
|
12345
|
+
this.dateDisplayFormat = 'EEEE d, MMMM yyyy';
|
|
12346
|
+
/**
|
|
12347
|
+
* @property Input
|
|
12348
|
+
* @description
|
|
12349
|
+
* The time display format.
|
|
12350
|
+
*/
|
|
12351
|
+
this.timeDisplayFormat = 'HH:mm';
|
|
12352
|
+
/**
|
|
12353
|
+
* @property Input
|
|
12354
|
+
* @description
|
|
12355
|
+
* A locale code for the locale format rules to use. When not supplied, uses the value of LOCALE_ID, which is en-US by default.
|
|
12356
|
+
* This requires that registerLocaleData is called with the respective locale.
|
|
12357
|
+
*/
|
|
12358
|
+
this.locale = 'en-US';
|
|
12359
|
+
/**
|
|
12360
|
+
* @property Output
|
|
12361
|
+
* @description
|
|
12362
|
+
* Date selected by the user by clicking in date-picker date-box.
|
|
12363
|
+
*/
|
|
12364
|
+
this.selectedDateChange = new EventEmitter();
|
|
12365
|
+
/**
|
|
12366
|
+
* @property Output
|
|
12367
|
+
* @description
|
|
12368
|
+
* Month selected by the user by clicking in drop down for month selection or month navigation buttons.
|
|
12369
|
+
*/
|
|
12370
|
+
this.selectedMonthChange = new EventEmitter();
|
|
12371
|
+
/**
|
|
12372
|
+
* @property Output
|
|
12373
|
+
* @description
|
|
12374
|
+
* The calendar is open or closed.
|
|
12375
|
+
*/
|
|
12376
|
+
this.openChange = new EventEmitter();
|
|
12377
|
+
/**
|
|
12378
|
+
* @property Output
|
|
12379
|
+
* @description
|
|
12380
|
+
* When a user has actively changed the date.
|
|
12381
|
+
*/
|
|
12382
|
+
this.focusOnNextChange = new EventEmitter();
|
|
12383
|
+
/**
|
|
12384
|
+
* @property Output
|
|
12385
|
+
* @description
|
|
12386
|
+
* When a user has pressed shift + tab to go to previous control.
|
|
12387
|
+
*/
|
|
12388
|
+
this.focusOnPreviousChange = new EventEmitter();
|
|
12389
|
+
this.forceNotOpenCalendar = false;
|
|
12390
|
+
}
|
|
12391
|
+
ngOnInit() {
|
|
12392
|
+
if (this.nasFormGroup && this.nasFormControlName) {
|
|
12393
|
+
this.nasFormGroup
|
|
12394
|
+
.get(this.nasFormControlName)
|
|
12395
|
+
.valueChanges
|
|
12396
|
+
.subscribe(value => {
|
|
12397
|
+
if (this.model === value?.model) {
|
|
12398
|
+
return;
|
|
12399
|
+
}
|
|
12400
|
+
setTimeout(() => {
|
|
12401
|
+
this.model = value?.model;
|
|
12402
|
+
this.selectedDateValue = value?.date;
|
|
12403
|
+
});
|
|
12404
|
+
});
|
|
12405
|
+
}
|
|
12406
|
+
}
|
|
12407
|
+
onInputKeydownShiftTab(event) {
|
|
12408
|
+
this.closeCalendar();
|
|
12409
|
+
this.focusOnPreviousChange.emit(event);
|
|
12410
|
+
}
|
|
12411
|
+
onCalendarKeyDown(event) {
|
|
12412
|
+
let currentActiveDate = this.activeDate.date;
|
|
12413
|
+
let date;
|
|
12414
|
+
if (document.activeElement === this.input.nativeElement) {
|
|
12415
|
+
event.stopImmediatePropagation();
|
|
12416
|
+
}
|
|
12417
|
+
switch (event.key) {
|
|
12418
|
+
case 'ArrowRight':
|
|
12419
|
+
if (this.isActiveElementMonthButtons()) {
|
|
12420
|
+
event.preventDefault();
|
|
12421
|
+
break;
|
|
12422
|
+
}
|
|
12423
|
+
currentActiveDate++;
|
|
12424
|
+
this.activeDate = this.dateService.utcDate(new Date(Date.UTC(this.activeDate.year, this.activeDate.month, currentActiveDate)));
|
|
12425
|
+
this.setFocusOnActiveDateAsync();
|
|
12426
|
+
break;
|
|
12427
|
+
case 'ArrowLeft':
|
|
12428
|
+
if (this.isActiveElementMonthButtons()) {
|
|
12429
|
+
event.preventDefault();
|
|
12430
|
+
break;
|
|
12431
|
+
}
|
|
12432
|
+
currentActiveDate--;
|
|
12433
|
+
date = this.dateService.utcDate(new Date(Date.UTC(this.activeDate.year, this.activeDate.month, currentActiveDate)));
|
|
12434
|
+
if (this.exists(this.disablePastSelection) && this.dateService.isInThePast(date)) {
|
|
12435
|
+
break;
|
|
12436
|
+
}
|
|
12437
|
+
this.activeDate = date;
|
|
12438
|
+
this.setFocusOnActiveDateAsync();
|
|
12439
|
+
break;
|
|
12440
|
+
case 'ArrowUp':
|
|
12441
|
+
if (this.isActiveElementMonthButtons()) {
|
|
12442
|
+
event.preventDefault();
|
|
12443
|
+
break;
|
|
12444
|
+
}
|
|
12445
|
+
currentActiveDate -= 7;
|
|
12446
|
+
date = this.dateService.utcDate(new Date(Date.UTC(this.activeDate.year, this.activeDate.month, currentActiveDate)));
|
|
12447
|
+
if (this.exists(this.disablePastSelection) && this.dateService.isInThePast(date)) {
|
|
12448
|
+
break;
|
|
12449
|
+
}
|
|
12450
|
+
this.activeDate = date;
|
|
12451
|
+
this.setFocusOnActiveDateAsync();
|
|
12452
|
+
event.preventDefault();
|
|
12453
|
+
break;
|
|
12454
|
+
case 'ArrowDown':
|
|
12455
|
+
if (this.isActiveElementMonthButtons()) {
|
|
12456
|
+
event.preventDefault();
|
|
12457
|
+
break;
|
|
12458
|
+
}
|
|
12459
|
+
currentActiveDate += 7;
|
|
12460
|
+
this.activeDateValue = this.dateService.utcDate(new Date(Date.UTC(this.activeDate.year, this.activeDate.month, currentActiveDate)));
|
|
12461
|
+
this.setFocusOnActiveDateAsync();
|
|
12462
|
+
event.preventDefault();
|
|
12463
|
+
break;
|
|
12464
|
+
case 'Escape':
|
|
12465
|
+
this.closeCalendar();
|
|
12466
|
+
this.forceNotOpenCalendar = true;
|
|
12467
|
+
if (this.input) {
|
|
12468
|
+
this.input.nativeElement.select();
|
|
12469
|
+
}
|
|
12470
|
+
break;
|
|
12471
|
+
case 'Enter':
|
|
12472
|
+
if (this.isActiveElementMonthButtons()) {
|
|
12473
|
+
return;
|
|
12474
|
+
}
|
|
12475
|
+
this.setFocusOnTimeSelectorOrNext(event);
|
|
12476
|
+
break;
|
|
12477
|
+
}
|
|
12478
|
+
}
|
|
12479
|
+
onTimeSelectorKeydown(event) {
|
|
12480
|
+
if (event.key === 'Tab') {
|
|
12481
|
+
if (event.shiftKey) {
|
|
12482
|
+
this.openCalendar();
|
|
12483
|
+
}
|
|
12484
|
+
else {
|
|
12485
|
+
this.focusOnNextChange.emit(event);
|
|
12486
|
+
}
|
|
12487
|
+
event.preventDefault();
|
|
12488
|
+
}
|
|
12489
|
+
}
|
|
12490
|
+
setFocusOnTimeSelectorOrNext(event) {
|
|
12491
|
+
if (this.timeOptions) {
|
|
12492
|
+
setTimeout(() => {
|
|
12493
|
+
const selectElement = this.timeSelector.select.nativeElement;
|
|
12494
|
+
if (selectElement) {
|
|
12495
|
+
selectElement.focus();
|
|
12496
|
+
}
|
|
12497
|
+
});
|
|
12498
|
+
}
|
|
12499
|
+
else {
|
|
12500
|
+
this.focusOnNextChange.emit(event);
|
|
12501
|
+
}
|
|
12502
|
+
this.closeCalendar();
|
|
12503
|
+
}
|
|
12504
|
+
onMonthChange(currentMonth) {
|
|
12505
|
+
this.selectedMonth = currentMonth;
|
|
12506
|
+
}
|
|
12507
|
+
onMouseDownDatepicker() {
|
|
12508
|
+
this.openCalendar();
|
|
12509
|
+
}
|
|
12510
|
+
openCalendar() {
|
|
12511
|
+
if (this.show || this.disabled || this.forceNotOpenCalendar) {
|
|
12512
|
+
this.forceNotOpenCalendar = false;
|
|
12513
|
+
return;
|
|
12514
|
+
}
|
|
12515
|
+
setTimeout(() => {
|
|
12516
|
+
this.show = true;
|
|
12517
|
+
});
|
|
12518
|
+
this.activeDate = this.selectedDate;
|
|
12519
|
+
clearTimeout(this.openCalendarTimeout);
|
|
12520
|
+
this.openCalendarTimeout = setTimeout(() => {
|
|
12521
|
+
this.input.nativeElement.select();
|
|
12522
|
+
this.openChange.emit(this.show);
|
|
12523
|
+
}, 100);
|
|
12524
|
+
}
|
|
12525
|
+
onTimeSelected(option) {
|
|
12526
|
+
this.selectedTime = this.dateService.utcDate(option.value);
|
|
12527
|
+
this.focusOnNextChange.emit();
|
|
12528
|
+
}
|
|
12529
|
+
onTimeSelectorClick() {
|
|
12530
|
+
}
|
|
12531
|
+
getMainClass() {
|
|
12532
|
+
return this.getContainerClass('', [(this.exists(this.timeOptions) && 'has-time'),
|
|
12533
|
+
(this.exists(this.compact) && 'compact')]);
|
|
12534
|
+
}
|
|
12535
|
+
getLabelClass() {
|
|
12536
|
+
if (this.exists(this.disabled)) {
|
|
12537
|
+
return this.getClass('date-picker-label', ['disabled']);
|
|
12538
|
+
}
|
|
12539
|
+
else {
|
|
12540
|
+
return this.getClass('date-picker-label');
|
|
12541
|
+
}
|
|
12542
|
+
}
|
|
12543
|
+
closeCalendar() {
|
|
12544
|
+
setTimeout(() => {
|
|
12545
|
+
this.show = false;
|
|
12546
|
+
});
|
|
12547
|
+
this.openChange.emit(false);
|
|
12548
|
+
}
|
|
12549
|
+
selectDate(event) {
|
|
12550
|
+
if (!this.isModelValid()) {
|
|
12551
|
+
return;
|
|
12552
|
+
}
|
|
12553
|
+
this.activeDate = this.date();
|
|
12554
|
+
if (!this.someValidDaysEqualsSelectedDay(this.activeDate)) {
|
|
12555
|
+
return;
|
|
12556
|
+
}
|
|
12557
|
+
this.selectedDate = this.activeDate;
|
|
12558
|
+
this.setFocusOnTimeSelectorOrNext(event);
|
|
12559
|
+
this.closeCalendar();
|
|
12560
|
+
}
|
|
12561
|
+
isActiveElementMonthButtons() {
|
|
12562
|
+
return document.activeElement === this.calendar.nextMonthRef.nativeElement ||
|
|
12563
|
+
document.activeElement === this.calendar.previousMonthRef.nativeElement ||
|
|
12564
|
+
this.calendar.monthSelectRef && document.activeElement === this.calendar.monthSelectRef.select.nativeElement;
|
|
12565
|
+
}
|
|
12566
|
+
setFocusOnActiveDateAsync() {
|
|
12567
|
+
setTimeout(() => {
|
|
12568
|
+
const elmementToFocus = this.calendar.activeDateCell;
|
|
12569
|
+
if (elmementToFocus) {
|
|
12570
|
+
elmementToFocus.focus();
|
|
12571
|
+
}
|
|
12572
|
+
}, 200);
|
|
12573
|
+
}
|
|
12574
|
+
isModelValid() {
|
|
12575
|
+
const timestamp = Date.parse(this.model);
|
|
12576
|
+
return isNaN(timestamp) !== true;
|
|
12577
|
+
}
|
|
12578
|
+
allDays() {
|
|
12579
|
+
const allDays = new Array();
|
|
12580
|
+
if (this.calendar) {
|
|
12581
|
+
this.calendar.weeks.forEach(x => x && x.days.forEach(d => allDays.push(d)));
|
|
12582
|
+
}
|
|
12583
|
+
return allDays;
|
|
12584
|
+
}
|
|
12585
|
+
someValidDaysEqualsSelectedDay(selectedDay) {
|
|
12586
|
+
return this.allDays()
|
|
12587
|
+
.some(x => x
|
|
12588
|
+
&& this.dateService.isSameDate(this.dateService.utcDate(x.date), selectedDay)
|
|
12589
|
+
&& (x.isAvailable || !x.isDisabled));
|
|
12590
|
+
}
|
|
12591
|
+
date() {
|
|
12592
|
+
const modelDate = new Date(this.model);
|
|
12593
|
+
const modelUtcDate = new UtcDate(modelDate.getFullYear(), modelDate.getMonth(), modelDate.getDate());
|
|
12594
|
+
return modelUtcDate;
|
|
12595
|
+
}
|
|
12596
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerNewComponent, deps: [{ token: i1.DatePipe }, { token: DateHelper }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12597
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: DatepickerNewComponent, selector: "nas-datepicker-new", inputs: { ariaLabelBackdrop: "ariaLabelBackdrop", disableBackdrop: "disableBackdrop", noAvailableFlightsLabel: "noAvailableFlightsLabel", availableFlightsLabel: "availableFlightsLabel", disablePastSelection: "disablePastSelection", lowerLimitDate: "lowerLimitDate", availability: "availability", availableDates: "availableDates", disabled: "disabled", placeholder: "placeholder", required: "required", ariaDescribedby: "ariaDescribedby", ariaLabel: "ariaLabel", dateDisplayFormat: "dateDisplayFormat", timeDisplayFormat: "timeDisplayFormat", locale: "locale", compact: "compact", nasFormGroup: "nasFormGroup", nasFormControlName: "nasFormControlName", times: "times", open: "open", selectedMonth: "selectedMonth", selectedDate: "selectedDate", selectedTime: "selectedTime", ariaLabelPreviousMonth: "ariaLabelPreviousMonth", ariaLabelNextMonth: "ariaLabelNextMonth" }, outputs: { selectedDateChange: "selectedDateChange", selectedMonthChange: "selectedMonthChange", openChange: "openChange", focusOnNextChange: "focusOnNextChange", focusOnPreviousChange: "focusOnPreviousChange" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }, { propertyName: "datePickerContent", first: true, predicate: ["datePickerContent"], descendants: true }, { propertyName: "timeSelector", first: true, predicate: ["timeSelector"], descendants: true }, { propertyName: "time", first: true, predicate: ["time"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<label [nasClass]=\"getMainClass()\">\n <div [nasClass]=\"getClass('date-picker-content')\">\n <div [nasClass]=\"getClass('date-picker-wrapper')\">\n <div [nasClass]=\"getClass('controls', show && 'active')\"\n (mousedown)=\"onMouseDownDatepicker()\">\n <div #datePickerContent\n [nasClass]=\"getLabelClass()\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n <input #input\n [nasClass]=\"getClass('date-picker')\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-required]=\"required\"\n [attr.aria-haspopup]=\"true\"\n (keydown.tab)=\"selectDate($event)\"\n (keydown.shift.tab)=\"onInputKeydownShiftTab($event)\"\n (keydown.enter)=\"selectDate($event)\"\n (keydown.arrowdown)=\"onCalendarKeyDown($event)\"\n (keydown.arrowleft)=\"onCalendarKeyDown($event)\"\n (keydown.arrowright)=\"onCalendarKeyDown($event)\"\n (keydown.arrowup)=\"onCalendarKeyDown($event)\"\n (focus)=\"openCalendar()\"\n [(ngModel)]=\"model\" />\n </div>\n <div [nasClass]=\"getClass('calendar-icon')\">\n <nas-icon *ngIf=\"exists(disabled); else regularIcon\"\n [icon]=\"'calendar--disabled'\"\n [ngStyle]=\"{'pointer-events': 'none'}\">\n </nas-icon>\n <ng-template #regularIcon>\n <nas-icon icon=\"calendar\"\n (click)=\"openCalendar()\">\n </nas-icon>\n </ng-template>\n </div>\n <nas-calendar-new #calendar *ngIf=\"show\"\n [nasFormGroup]=\"nasFormGroup\"\n [nasFormControlName]=\"nasFormControlName\"\n [dateDisplayFormat]=\"dateDisplayFormat\"\n [noAvailableFlightsLabel]=\"noAvailableFlightsLabel\"\n [availableFlightsLabel]=\"availableFlightsLabel\"\n [availability]=\"exists(availability)\"\n [availableDates]=\"availableDates\"\n [lowerLimitDate]=\"lowerLimitDate\"\n [disablePastSelection]=\"exists(disablePastSelection)\"\n [locale]=\"locale\"\n [ariaLabelPreviousMonth]=\"ariaLabelPreviousMonth\"\n [ariaLabelNextMonth]=\"ariaLabelNextMonth\"\n [(activeDate)]=\"activeDate\"\n [(selectedDate)]=\"selectedDate\"\n (focusOnNextChange)=\"setFocusOnTimeSelectorOrNext($event)\"\n (keydown)=\"onCalendarKeyDown($event)\"\n (monthChange)=\"onMonthChange($event)\">\n </nas-calendar-new>\n </div>\n <nas-backdrop [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [(showBackdrop)]=\"showBackdrop\"></nas-backdrop>\n </div>\n</label>\n<div *ngIf=\"timeOptions\"\n [nasClass]=\"getClass('time-selector-wrapper')\">\n <nas-select #timeSelector\n [nasClass]=\"getClass('time-picker')\"\n [selected]=\"selectedTimeOption\"\n (selectedChange)=\"onTimeSelected($event)\"\n (keydown)=\"onTimeSelectorKeydown($event)\">\n <div [nasClass]=\"getClass('arrow')\">\n <div [nasClass]=\"getClass('icon-left')\">\n <nas-icon [type]=\"'arrow-left'\"></nas-icon>\n </div>\n </div>\n <nas-option #time *ngFor=\"let time of timeOptions\"\n [option]=\"time\"></nas-option>\n <div [nasClass]=\"getClass('arrow')\">\n <div [nasClass]=\"getClass('icon-right')\">\n <nas-icon [type]=\"'arrow-right'\"></nas-icon>\n </div>\n </div>\n </nas-select>\n</div>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<!-- Lag en metode som sender inn value til det klokkeslettet som er valgt -->\n<!-- div som er clickable for hver time? -->\n<!-- input-text-new? -->", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}:host{display:flex}.nas-datepicker-new{position:relative;top:0;left:0;width:100%;height:100%;overflow-x:visible;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 16px;max-height:98vh;overflow-y:visible;margin-bottom:8px}.nas-datepicker-new__time-picker{display:flex;gap:12px;justify-content:center}.nas-datepicker-new__date-picker-wrapper{border:2px solid #6f6f6f;position:relative}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker{display:block;width:100%;height:35px;padding:0 16px 9px;border:0;border-radius:0;transition:all .2s cubic-bezier(0,0,.1,1);font-family:inherit;outline:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;color:#15273f;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;font-size:16px;line-height:26px;position:relative;z-index:3;background-color:inherit}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker[disabled]{color:#909090;background-color:#fff}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker:-moz-placeholder{line-height:normal}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker::-moz-placeholder{line-height:normal}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker:-ms-input-placeholder{line-height:normal}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker::-webkit-input-placeholder{line-height:normal}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker:focus~.nas-datepicker-new__input-line{border-color:#15273f}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__calendar-icon{position:absolute;right:15px;top:50%;margin-top:-12px;vertical-align:middle;cursor:pointer;z-index:3}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker-label{padding:9px 16px 0;position:relative;z-index:3;color:#15273f;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;font-size:14px;line-height:20px;background-color:inherit;display:flex}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker-label--disabled{color:#909090}.nas-datepicker-new__date-picker-wrapper nas-calendar-new{position:absolute;top:75px;vertical-align:middle;right:0px;z-index:4}@media (min-width: 640px){.nas-datepicker-new__date-picker-wrapper nas-calendar-new{right:-15px}}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__controls{background-color:#fff}.nas-datepicker-new__time-selector-wrapper nas-select-new{display:flex}.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select{margin-bottom:0;margin-left:3px}.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select:after{bottom:26px}.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select select{border:3px solid #fff;background-color:#fff;height:64px}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select select{height:60px}}.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select select:focus{border-color:#15273f}.nas-datepicker-new--has-time{padding-right:3px}.nas-datepicker-new nas-spinner{position:absolute;top:300px;left:45%;right:45%}.nas-datepicker-new__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0b14202b;animation:datepicker-backdrop .7s ease-out both}.nas-datepicker-new--compact{padding:0;margin-bottom:6px}@keyframes datepicker-backdrop{0%{opacity:0}}\n"], dependencies: [{ 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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: SelectComponent, selector: "nas-select", inputs: ["id", "inline", "label", "block", "spaceless", "stretch", "compact", "simple", "light", "fill", "error", "errorMessage", "disabled", "autogrow", "cssClass", "nasFormControlName", "nasFormGroup", "options", "selectedValue", "selected"], outputs: ["selectedChange", "keydown"] }, { kind: "component", type: OptionComponent, selector: "nas-option", inputs: ["option"] }, { kind: "component", type: IconComponent, selector: "nas-icon", inputs: ["icon", "type", "isIndicator", "lightCircularBackground", "cssClass"] }, { kind: "directive", type: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BackdropComponent, selector: "nas-backdrop", inputs: ["showBackdrop", "ariaLabelBackdrop"], outputs: ["showBackdropChange"] }, { kind: "component", type: CalendarNewComponent, selector: "nas-calendar-new", inputs: ["noAvailableFlightsLabel", "availableFlightsLabel", "disablePastSelection", "lowerLimitDate", "date", "weekStart", "displayWeekNumbers", "availability", "locale", "availableDates", "activeDate", "selectedDate", "nasFormGroup", "nasFormControlName", "dateDisplayFormat", "ariaLabelPreviousMonth", "ariaLabelNextMonth"], outputs: ["monthChange", "focusOnNextChange", "selectedDateChange", "activeDateChange"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
12598
|
+
}
|
|
12599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerNewComponent, decorators: [{
|
|
12600
|
+
type: Component,
|
|
12601
|
+
args: [{ selector: 'nas-datepicker-new', encapsulation: ViewEncapsulation.None, template: "<label [nasClass]=\"getMainClass()\">\n <div [nasClass]=\"getClass('date-picker-content')\">\n <div [nasClass]=\"getClass('date-picker-wrapper')\">\n <div [nasClass]=\"getClass('controls', show && 'active')\"\n (mousedown)=\"onMouseDownDatepicker()\">\n <div #datePickerContent\n [nasClass]=\"getLabelClass()\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n <input #input\n [nasClass]=\"getClass('date-picker')\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-required]=\"required\"\n [attr.aria-haspopup]=\"true\"\n (keydown.tab)=\"selectDate($event)\"\n (keydown.shift.tab)=\"onInputKeydownShiftTab($event)\"\n (keydown.enter)=\"selectDate($event)\"\n (keydown.arrowdown)=\"onCalendarKeyDown($event)\"\n (keydown.arrowleft)=\"onCalendarKeyDown($event)\"\n (keydown.arrowright)=\"onCalendarKeyDown($event)\"\n (keydown.arrowup)=\"onCalendarKeyDown($event)\"\n (focus)=\"openCalendar()\"\n [(ngModel)]=\"model\" />\n </div>\n <div [nasClass]=\"getClass('calendar-icon')\">\n <nas-icon *ngIf=\"exists(disabled); else regularIcon\"\n [icon]=\"'calendar--disabled'\"\n [ngStyle]=\"{'pointer-events': 'none'}\">\n </nas-icon>\n <ng-template #regularIcon>\n <nas-icon icon=\"calendar\"\n (click)=\"openCalendar()\">\n </nas-icon>\n </ng-template>\n </div>\n <nas-calendar-new #calendar *ngIf=\"show\"\n [nasFormGroup]=\"nasFormGroup\"\n [nasFormControlName]=\"nasFormControlName\"\n [dateDisplayFormat]=\"dateDisplayFormat\"\n [noAvailableFlightsLabel]=\"noAvailableFlightsLabel\"\n [availableFlightsLabel]=\"availableFlightsLabel\"\n [availability]=\"exists(availability)\"\n [availableDates]=\"availableDates\"\n [lowerLimitDate]=\"lowerLimitDate\"\n [disablePastSelection]=\"exists(disablePastSelection)\"\n [locale]=\"locale\"\n [ariaLabelPreviousMonth]=\"ariaLabelPreviousMonth\"\n [ariaLabelNextMonth]=\"ariaLabelNextMonth\"\n [(activeDate)]=\"activeDate\"\n [(selectedDate)]=\"selectedDate\"\n (focusOnNextChange)=\"setFocusOnTimeSelectorOrNext($event)\"\n (keydown)=\"onCalendarKeyDown($event)\"\n (monthChange)=\"onMonthChange($event)\">\n </nas-calendar-new>\n </div>\n <nas-backdrop [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [(showBackdrop)]=\"showBackdrop\"></nas-backdrop>\n </div>\n</label>\n<div *ngIf=\"timeOptions\"\n [nasClass]=\"getClass('time-selector-wrapper')\">\n <nas-select #timeSelector\n [nasClass]=\"getClass('time-picker')\"\n [selected]=\"selectedTimeOption\"\n (selectedChange)=\"onTimeSelected($event)\"\n (keydown)=\"onTimeSelectorKeydown($event)\">\n <div [nasClass]=\"getClass('arrow')\">\n <div [nasClass]=\"getClass('icon-left')\">\n <nas-icon [type]=\"'arrow-left'\"></nas-icon>\n </div>\n </div>\n <nas-option #time *ngFor=\"let time of timeOptions\"\n [option]=\"time\"></nas-option>\n <div [nasClass]=\"getClass('arrow')\">\n <div [nasClass]=\"getClass('icon-right')\">\n <nas-icon [type]=\"'arrow-right'\"></nas-icon>\n </div>\n </div>\n </nas-select>\n</div>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<!-- Lag en metode som sender inn value til det klokkeslettet som er valgt -->\n<!-- div som er clickable for hver time? -->\n<!-- input-text-new? -->", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}:host{display:flex}.nas-datepicker-new{position:relative;top:0;left:0;width:100%;height:100%;overflow-x:visible;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 16px;max-height:98vh;overflow-y:visible;margin-bottom:8px}.nas-datepicker-new__time-picker{display:flex;gap:12px;justify-content:center}.nas-datepicker-new__date-picker-wrapper{border:2px solid #6f6f6f;position:relative}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker{display:block;width:100%;height:35px;padding:0 16px 9px;border:0;border-radius:0;transition:all .2s cubic-bezier(0,0,.1,1);font-family:inherit;outline:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;color:#15273f;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;font-size:16px;line-height:26px;position:relative;z-index:3;background-color:inherit}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker[disabled]{color:#909090;background-color:#fff}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker:-moz-placeholder{line-height:normal}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker::-moz-placeholder{line-height:normal}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker:-ms-input-placeholder{line-height:normal}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker::-webkit-input-placeholder{line-height:normal}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker:focus~.nas-datepicker-new__input-line{border-color:#15273f}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__calendar-icon{position:absolute;right:15px;top:50%;margin-top:-12px;vertical-align:middle;cursor:pointer;z-index:3}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker-label{padding:9px 16px 0;position:relative;z-index:3;color:#15273f;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;font-size:14px;line-height:20px;background-color:inherit;display:flex}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__date-picker-label--disabled{color:#909090}.nas-datepicker-new__date-picker-wrapper nas-calendar-new{position:absolute;top:75px;vertical-align:middle;right:0px;z-index:4}@media (min-width: 640px){.nas-datepicker-new__date-picker-wrapper nas-calendar-new{right:-15px}}.nas-datepicker-new__date-picker-wrapper .nas-datepicker-new__controls{background-color:#fff}.nas-datepicker-new__time-selector-wrapper nas-select-new{display:flex}.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select{margin-bottom:0;margin-left:3px}.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select:after{bottom:26px}.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select select{border:3px solid #fff;background-color:#fff;height:64px}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select select{height:60px}}.nas-datepicker-new__time-selector-wrapper nas-select-new ::ng-deep .nas-select select:focus{border-color:#15273f}.nas-datepicker-new--has-time{padding-right:3px}.nas-datepicker-new nas-spinner{position:absolute;top:300px;left:45%;right:45%}.nas-datepicker-new__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0b14202b;animation:datepicker-backdrop .7s ease-out both}.nas-datepicker-new--compact{padding:0;margin-bottom:6px}@keyframes datepicker-backdrop{0%{opacity:0}}\n"] }]
|
|
12602
|
+
}], ctorParameters: function () { return [{ type: i1.DatePipe }, { type: DateHelper }]; }, propDecorators: { input: [{
|
|
12603
|
+
type: ViewChild,
|
|
12604
|
+
args: ['input']
|
|
12605
|
+
}], calendar: [{
|
|
12606
|
+
type: ViewChild,
|
|
12607
|
+
args: ['calendar']
|
|
12608
|
+
}], datePickerContent: [{
|
|
12609
|
+
type: ViewChild,
|
|
12610
|
+
args: ['datePickerContent']
|
|
12611
|
+
}], timeSelector: [{
|
|
12612
|
+
type: ViewChild,
|
|
12613
|
+
args: ['timeSelector']
|
|
12614
|
+
}], time: [{
|
|
12615
|
+
type: ViewChild,
|
|
12616
|
+
args: ['time']
|
|
12617
|
+
}], ariaLabelBackdrop: [{
|
|
12618
|
+
type: Input
|
|
12619
|
+
}], disableBackdrop: [{
|
|
12620
|
+
type: Input
|
|
12621
|
+
}], noAvailableFlightsLabel: [{
|
|
12622
|
+
type: Input
|
|
12623
|
+
}], availableFlightsLabel: [{
|
|
12624
|
+
type: Input
|
|
12625
|
+
}], disablePastSelection: [{
|
|
12626
|
+
type: Input
|
|
12627
|
+
}], lowerLimitDate: [{
|
|
12628
|
+
type: Input
|
|
12629
|
+
}], availability: [{
|
|
12630
|
+
type: Input
|
|
12631
|
+
}], availableDates: [{
|
|
12632
|
+
type: Input
|
|
12633
|
+
}], disabled: [{
|
|
12634
|
+
type: Input
|
|
12635
|
+
}], placeholder: [{
|
|
12636
|
+
type: Input
|
|
12637
|
+
}], required: [{
|
|
12638
|
+
type: Input
|
|
12639
|
+
}], ariaDescribedby: [{
|
|
12640
|
+
type: Input
|
|
12641
|
+
}], ariaLabel: [{
|
|
12642
|
+
type: Input
|
|
12643
|
+
}], dateDisplayFormat: [{
|
|
12644
|
+
type: Input
|
|
12645
|
+
}], timeDisplayFormat: [{
|
|
12646
|
+
type: Input
|
|
12647
|
+
}], locale: [{
|
|
12648
|
+
type: Input
|
|
12649
|
+
}], compact: [{
|
|
12650
|
+
type: Input
|
|
12651
|
+
}], nasFormGroup: [{
|
|
12652
|
+
type: Input
|
|
12653
|
+
}], nasFormControlName: [{
|
|
12654
|
+
type: Input
|
|
12655
|
+
}], times: [{
|
|
12656
|
+
type: Input
|
|
12657
|
+
}], open: [{
|
|
12658
|
+
type: Input
|
|
12659
|
+
}], selectedMonth: [{
|
|
12660
|
+
type: Input
|
|
12661
|
+
}], selectedDate: [{
|
|
12662
|
+
type: Input
|
|
12663
|
+
}], selectedTime: [{
|
|
12664
|
+
type: Input
|
|
12665
|
+
}], ariaLabelPreviousMonth: [{
|
|
12666
|
+
type: Input
|
|
12667
|
+
}], ariaLabelNextMonth: [{
|
|
12668
|
+
type: Input
|
|
12669
|
+
}], selectedDateChange: [{
|
|
12670
|
+
type: Output
|
|
12671
|
+
}], selectedMonthChange: [{
|
|
12672
|
+
type: Output
|
|
12673
|
+
}], openChange: [{
|
|
12674
|
+
type: Output
|
|
12675
|
+
}], focusOnNextChange: [{
|
|
12676
|
+
type: Output
|
|
12677
|
+
}], focusOnPreviousChange: [{
|
|
12678
|
+
type: Output
|
|
12679
|
+
}] } });
|
|
12680
|
+
|
|
12681
|
+
class DatepickerNewModule {
|
|
12682
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerNewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
12683
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: DatepickerNewModule, declarations: [DatepickerNewComponent, CalendarNewComponent], imports: [CommonModule,
|
|
12684
|
+
CoverModule,
|
|
12685
|
+
SelectModule,
|
|
12686
|
+
IconModule,
|
|
12687
|
+
NasClassModule,
|
|
12688
|
+
FormsModule,
|
|
12689
|
+
SpinnerModule,
|
|
12690
|
+
ReactiveFormsModule,
|
|
12691
|
+
BackdropModule], exports: [DatepickerNewComponent, CalendarNewComponent] }); }
|
|
12692
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerNewModule, providers: [DatePipe, DateHelper], imports: [CommonModule,
|
|
12693
|
+
CoverModule,
|
|
12694
|
+
SelectModule,
|
|
12695
|
+
IconModule,
|
|
12696
|
+
NasClassModule,
|
|
12697
|
+
FormsModule,
|
|
12698
|
+
SpinnerModule,
|
|
12699
|
+
ReactiveFormsModule,
|
|
12700
|
+
BackdropModule] }); }
|
|
12701
|
+
}
|
|
12702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerNewModule, decorators: [{
|
|
12703
|
+
type: NgModule,
|
|
12704
|
+
args: [{
|
|
12705
|
+
declarations: [DatepickerNewComponent, CalendarNewComponent],
|
|
12706
|
+
imports: [
|
|
12707
|
+
CommonModule,
|
|
12708
|
+
CoverModule,
|
|
12709
|
+
SelectModule,
|
|
12710
|
+
IconModule,
|
|
12711
|
+
NasClassModule,
|
|
12712
|
+
FormsModule,
|
|
12713
|
+
SpinnerModule,
|
|
12714
|
+
ReactiveFormsModule,
|
|
12715
|
+
BackdropModule
|
|
12716
|
+
],
|
|
12717
|
+
exports: [DatepickerNewComponent, CalendarNewComponent],
|
|
12718
|
+
providers: [DatePipe, DateHelper]
|
|
12719
|
+
}]
|
|
12720
|
+
}] });
|
|
12721
|
+
|
|
12722
|
+
/**
|
|
12723
|
+
* @license
|
|
12724
|
+
* Copyright Norwegian Air Shuttle. All Rights Reserved.
|
|
12725
|
+
*/
|
|
12726
|
+
/**
|
|
12727
|
+
* @description
|
|
12728
|
+
* Norwegian Datepicker Combo Component | New design | Beta
|
|
12729
|
+
*/
|
|
12730
|
+
class DatepickerComboNewComponent extends NasComponentBase {
|
|
12731
|
+
/**
|
|
12732
|
+
* @property Input
|
|
12733
|
+
* @description
|
|
12734
|
+
* Sets outbound datepicker open.
|
|
12735
|
+
*/
|
|
12736
|
+
get outboundOpen() {
|
|
12737
|
+
return this.outboundOpenValue;
|
|
12738
|
+
}
|
|
12739
|
+
set outboundOpen(value) {
|
|
12740
|
+
if (this.outboundDisabled || value === this.outboundOpenValue) {
|
|
12741
|
+
return;
|
|
12742
|
+
}
|
|
12743
|
+
setTimeout(() => {
|
|
12744
|
+
this.outboundOpenValue = value;
|
|
12745
|
+
this.outboundOpenChange.emit(value);
|
|
12746
|
+
if (value && this.inboundOpen) {
|
|
12747
|
+
this.inboundOpen = false;
|
|
12748
|
+
}
|
|
12749
|
+
});
|
|
12750
|
+
}
|
|
12751
|
+
/**
|
|
12752
|
+
* @property Input
|
|
12753
|
+
* @description
|
|
12754
|
+
* Sets inbound datepicker open.
|
|
12755
|
+
*/
|
|
12756
|
+
get inboundOpen() {
|
|
12757
|
+
return this.inboundOpenValue;
|
|
12758
|
+
}
|
|
12759
|
+
set inboundOpen(value) {
|
|
12760
|
+
if (this.inboundDisabled || value === this.inboundOpenValue) {
|
|
12761
|
+
return;
|
|
12762
|
+
}
|
|
12763
|
+
if (this.outboundOnly) {
|
|
12764
|
+
this.focusOnNextChange.emit();
|
|
12765
|
+
return;
|
|
12766
|
+
}
|
|
12767
|
+
setTimeout(() => {
|
|
12768
|
+
this.inboundOpenValue = value;
|
|
12769
|
+
this.inboundOpenChange.emit(value);
|
|
12770
|
+
if (value && this.outboundOpen) {
|
|
12771
|
+
this.outboundOpen = false;
|
|
12772
|
+
}
|
|
12773
|
+
});
|
|
12774
|
+
}
|
|
12775
|
+
/**
|
|
12776
|
+
* @property Input
|
|
12777
|
+
* @description
|
|
12778
|
+
* Selected datefor outbound calendar.
|
|
12779
|
+
*/
|
|
12780
|
+
get outboundSelectedDate() {
|
|
12781
|
+
return this.outboundSelectedDateValue;
|
|
12782
|
+
}
|
|
12783
|
+
set outboundSelectedDate(date) {
|
|
12784
|
+
if (!date) {
|
|
12785
|
+
return;
|
|
12786
|
+
}
|
|
12787
|
+
if (this.outboundSelectedDateValue && this.dateService.isSameDate(this.outboundSelectedDateValue, date)) {
|
|
12788
|
+
return;
|
|
12789
|
+
}
|
|
12790
|
+
this.outboundSelectedDateValue = date;
|
|
12791
|
+
this.inboundLowerLimitDate = new UtcDate(date.year, date.month, 1);
|
|
12792
|
+
this.inboundLowerLimitDate.setDate(date.date + this.inboundLowerLimitDateOffset);
|
|
12793
|
+
this.outboundSelectedDateChange.emit(date);
|
|
12794
|
+
}
|
|
12795
|
+
/**
|
|
12796
|
+
* @property Input
|
|
12797
|
+
* @description
|
|
12798
|
+
* Selected datefor inbound calendar.
|
|
12799
|
+
*/
|
|
12800
|
+
get inboundSelectedDate() {
|
|
12801
|
+
return this.inboundSelectedDateValue;
|
|
12802
|
+
}
|
|
12803
|
+
set inboundSelectedDate(date) {
|
|
12804
|
+
if (!date) {
|
|
12805
|
+
return;
|
|
12806
|
+
}
|
|
12807
|
+
if (this.inboundSelectedDateValue && this.dateService.isSameDate(this.inboundSelectedDateValue, date)) {
|
|
12808
|
+
return;
|
|
12809
|
+
}
|
|
12810
|
+
this.inboundSelectedDateValue = date;
|
|
12811
|
+
this.inboundSelectedDateChange.emit(date);
|
|
12812
|
+
}
|
|
12813
|
+
get inboundSelectedMonth() {
|
|
12814
|
+
return this.inboundSelectedMonthValue;
|
|
12815
|
+
}
|
|
12816
|
+
set inboundSelectedMonth(month) {
|
|
12817
|
+
if (!month) {
|
|
12818
|
+
return;
|
|
12819
|
+
}
|
|
12820
|
+
if (this.dateService.isSameMonth(month, this.inboundSelectedMonthValue)) {
|
|
12821
|
+
return;
|
|
12822
|
+
}
|
|
12823
|
+
setTimeout(() => {
|
|
12824
|
+
this.inboundSelectedMonthValue = month;
|
|
12825
|
+
this.inboundMonthChange.emit(month);
|
|
12826
|
+
});
|
|
12827
|
+
}
|
|
12828
|
+
constructor(dateService, deviceHelper, renderer) {
|
|
12829
|
+
super('nas-datepicker-combo-new');
|
|
12830
|
+
this.dateService = dateService;
|
|
12831
|
+
this.deviceHelper = deviceHelper;
|
|
12832
|
+
this.renderer = renderer;
|
|
12833
|
+
/**
|
|
12834
|
+
* @property Input
|
|
12835
|
+
* @description
|
|
12836
|
+
* The display format of the date when user has selected the date and it is being shown in the input box for the date picker.
|
|
12837
|
+
* Please look at the angular Date pipe for valid formats and variations.
|
|
12838
|
+
*/
|
|
12839
|
+
this.dateDisplayFormat = 'EEEE d, MMMM yyyy';
|
|
12840
|
+
/**
|
|
12841
|
+
* @property Input
|
|
12842
|
+
* @description
|
|
12843
|
+
* The time display format.
|
|
12844
|
+
*/
|
|
12845
|
+
this.timeDisplayFormat = 'HH:mm';
|
|
12846
|
+
/**
|
|
12847
|
+
* @property Input
|
|
12848
|
+
* @description
|
|
12849
|
+
* A locale code for the locale format rules to use. When not supplied, uses the value of LOCALE_ID, which is en-US by default.
|
|
12850
|
+
* This requires that registerLocaleData is called with the respective locale.
|
|
12851
|
+
*/
|
|
12852
|
+
this.locale = 'en-US';
|
|
12853
|
+
/**
|
|
12854
|
+
* @property Input
|
|
12855
|
+
* @description
|
|
12856
|
+
* Sets a relative number to decide when the inbound lower limit date should be based on selected outbound date.
|
|
12857
|
+
*
|
|
12858
|
+
* The lower limit date for inbound is set by default equal to the selected outbound date.
|
|
12859
|
+
*
|
|
12860
|
+
* If this number is positive, the inbound lower limit date will add the number of days to the selected outbound date.
|
|
12861
|
+
* If this number is negative, the inbound lower limit date will subtract the number of days to the selected outbound date.
|
|
12862
|
+
*/
|
|
12863
|
+
this.inboundLowerLimitDateOffset = 0;
|
|
12864
|
+
/**
|
|
12865
|
+
* @property Input
|
|
12866
|
+
* @description
|
|
12867
|
+
* Outbound and inbound dates will break horizontally in mobile view.
|
|
12868
|
+
*/
|
|
12869
|
+
this.inlineFlex = 0;
|
|
12870
|
+
/**
|
|
12871
|
+
* @property Output
|
|
12872
|
+
* @description
|
|
12873
|
+
* When selected datehas been changed on the outbound calendar.
|
|
12874
|
+
*/
|
|
12875
|
+
this.outboundSelectedDateChange = new EventEmitter();
|
|
12876
|
+
/**
|
|
12877
|
+
* @property Output
|
|
12878
|
+
* @description
|
|
12879
|
+
* When selected datehas been changed on the inbound calendar.
|
|
12880
|
+
*/
|
|
12881
|
+
this.inboundSelectedDateChange = new EventEmitter();
|
|
12882
|
+
/**
|
|
12883
|
+
* @property Output
|
|
12884
|
+
* @description
|
|
12885
|
+
* Outbound datepicker is open or closed.
|
|
12886
|
+
*/
|
|
12887
|
+
this.outboundOpenChange = new EventEmitter();
|
|
12888
|
+
/**
|
|
12889
|
+
* @property Output
|
|
12890
|
+
* @description
|
|
12891
|
+
* Inbound datepicker is open or closed.
|
|
12892
|
+
*/
|
|
12893
|
+
this.inboundOpenChange = new EventEmitter();
|
|
12894
|
+
/**
|
|
12895
|
+
* @property Output
|
|
12896
|
+
* @description
|
|
12897
|
+
* Outbound calendar changes month.
|
|
12898
|
+
*/
|
|
12899
|
+
this.outboundMonthChange = new EventEmitter();
|
|
12900
|
+
/**
|
|
12901
|
+
* @property Output
|
|
12902
|
+
* @description
|
|
12903
|
+
* Inbound calendar changes month.
|
|
12904
|
+
*/
|
|
12905
|
+
this.inboundMonthChange = new EventEmitter();
|
|
12906
|
+
/**
|
|
12907
|
+
* @property Output
|
|
12908
|
+
* @description
|
|
12909
|
+
* When a user has actively changed the date.
|
|
12910
|
+
*/
|
|
12911
|
+
this.focusOnNextChange = new EventEmitter();
|
|
12912
|
+
/**
|
|
12913
|
+
* @property Output
|
|
12914
|
+
* @description
|
|
12915
|
+
* When a user has pressed shift + tab to go to previous control.
|
|
12916
|
+
*/
|
|
12917
|
+
this.focusOnPreviousChange = new EventEmitter();
|
|
12918
|
+
this.inboundOpenValue = false;
|
|
12919
|
+
this.outboundOpenValue = false;
|
|
12920
|
+
this.containerWidth = new BehaviorSubject(0);
|
|
12921
|
+
window.onresize = () => {
|
|
12922
|
+
this.updateContainerWidth();
|
|
12923
|
+
};
|
|
12924
|
+
}
|
|
12925
|
+
ngOnInit() {
|
|
12926
|
+
if (this.nasFormGroup) {
|
|
12927
|
+
if (this.nasFormControlNameOutbound) {
|
|
12928
|
+
this.outboundValueChangesSubscription = this.nasFormGroup.get(this.nasFormControlNameOutbound)
|
|
12929
|
+
.valueChanges
|
|
12930
|
+
.subscribe(outbound => {
|
|
12931
|
+
this.outboundSelectedDate = outbound?.date;
|
|
12932
|
+
});
|
|
12933
|
+
}
|
|
12934
|
+
if (this.nasFormControlNameInbound) {
|
|
12935
|
+
this.inboundValueChangesSubscription = this.nasFormGroup.get(this.nasFormControlNameInbound)
|
|
12936
|
+
.valueChanges
|
|
12937
|
+
.subscribe(inbound => {
|
|
12938
|
+
this.inboundSelectedDate = inbound?.date;
|
|
12939
|
+
});
|
|
12940
|
+
}
|
|
12941
|
+
}
|
|
12942
|
+
}
|
|
12943
|
+
ngAfterViewChecked() {
|
|
12944
|
+
this.updateContainerWidth();
|
|
12945
|
+
this.setInlineFlex();
|
|
12946
|
+
}
|
|
12947
|
+
onFocusOnNext(event) {
|
|
12948
|
+
this.focusOnNextChange.emit(event);
|
|
12949
|
+
}
|
|
12950
|
+
onFocusOnPrevious(event) {
|
|
12951
|
+
this.focusOnPreviousChange.emit(event);
|
|
12952
|
+
}
|
|
12953
|
+
onInboundFocusOnPrevious() {
|
|
12954
|
+
if (this.times && this.times.length > 0) {
|
|
12955
|
+
const selectElement = this.datepickerOutbound.timeSelector?.select?.nativeElement;
|
|
12956
|
+
setTimeout(() => {
|
|
12957
|
+
selectElement?.focus();
|
|
12958
|
+
});
|
|
12959
|
+
this.inboundOpenChange.emit(false);
|
|
12960
|
+
}
|
|
12961
|
+
else {
|
|
12962
|
+
this.outboundOpen = true;
|
|
12963
|
+
}
|
|
12964
|
+
}
|
|
12965
|
+
onOutboundMonthChange(date) {
|
|
12966
|
+
this.outboundMonthChange.emit(date);
|
|
12967
|
+
this.inboundSelectedMonthValue = date;
|
|
12968
|
+
}
|
|
12969
|
+
getMainClass() {
|
|
12970
|
+
const widths = [
|
|
12971
|
+
this.deviceHelper.isWidthTablet(this.containerWidth.getValue()) && 'md',
|
|
12972
|
+
this.deviceHelper.isWidthDesktop(this.containerWidth.getValue()) && 'lg'
|
|
12973
|
+
].filter(Boolean);
|
|
12974
|
+
const classes = [...widths];
|
|
12975
|
+
if (this.exists(this.compact)) {
|
|
12976
|
+
classes.push('compact');
|
|
12977
|
+
}
|
|
12978
|
+
if (this.inlineFlex > 0) {
|
|
12979
|
+
classes.push('inline-flex');
|
|
12980
|
+
}
|
|
12981
|
+
return this.getContainerClass('', classes);
|
|
12982
|
+
}
|
|
12983
|
+
checkOutboundOnly() {
|
|
12984
|
+
return !(this.deviceHelper.isMobileWidth() && this.exists(this.outboundOnly));
|
|
12985
|
+
}
|
|
12986
|
+
checkInboundDisabled() {
|
|
12987
|
+
return (!this.deviceHelper.isMobileWidth() && this.exists(this.outboundOnly))
|
|
12988
|
+
|| this.exists(this.inboundDisabled);
|
|
12989
|
+
}
|
|
12990
|
+
ngOnDestroy() {
|
|
12991
|
+
this.inboundValueChangesSubscription?.unsubscribe();
|
|
12992
|
+
this.outboundValueChangesSubscription?.unsubscribe();
|
|
12993
|
+
}
|
|
12994
|
+
updateContainerWidth() {
|
|
12995
|
+
const containerOffsetWidth = this.container.nativeElement.offsetWidth;
|
|
12996
|
+
if (containerOffsetWidth > 0) {
|
|
12997
|
+
this.containerWidth.next(containerOffsetWidth);
|
|
12998
|
+
}
|
|
12999
|
+
}
|
|
13000
|
+
setInlineFlex() {
|
|
13001
|
+
if (this.inlineFlex > 0) {
|
|
13002
|
+
const container = this.container.nativeElement;
|
|
13003
|
+
this.renderer.addClass(container, 'nas-datepicker-combo-new--inline-flex');
|
|
13004
|
+
container.style.width = `${this.inlineFlex}px`;
|
|
13005
|
+
}
|
|
13006
|
+
}
|
|
13007
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerComboNewComponent, deps: [{ token: DateHelper }, { token: DeviceHelper }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13008
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: DatepickerComboNewComponent, selector: "nas-datepicker-combo-new", inputs: { ariaLabelBackdrop: "ariaLabelBackdrop", outboundOpen: "outboundOpen", inboundOpen: "inboundOpen", noAvailableFlightsLabel: "noAvailableFlightsLabel", availableFlightsLabel: "availableFlightsLabel", disablePastSelection: "disablePastSelection", outboundDisabled: "outboundDisabled", inboundDisabled: "inboundDisabled", outboundOnly: "outboundOnly", outboundLabel: "outboundLabel", inboundLabel: "inboundLabel", availability: "availability", outboundAvailableDates: "outboundAvailableDates", inboundAvailableDates: "inboundAvailableDates", times: "times", dateDisplayFormat: "dateDisplayFormat", timeDisplayFormat: "timeDisplayFormat", locale: "locale", compact: "compact", nasFormGroup: "nasFormGroup", nasFormControlNameOutbound: "nasFormControlNameOutbound", nasFormControlNameInbound: "nasFormControlNameInbound", outboundSelectedDate: "outboundSelectedDate", inboundSelectedDate: "inboundSelectedDate", disableBackdrop: "disableBackdrop", outboundSelectedTime: "outboundSelectedTime", inboundSelectedTime: "inboundSelectedTime", ariaLabelPreviousMonth: "ariaLabelPreviousMonth", ariaLabelNextMonth: "ariaLabelNextMonth", inboundLowerLimitDateOffset: "inboundLowerLimitDateOffset", inlineFlex: "inlineFlex" }, outputs: { outboundSelectedDateChange: "outboundSelectedDateChange", inboundSelectedDateChange: "inboundSelectedDateChange", outboundOpenChange: "outboundOpenChange", inboundOpenChange: "inboundOpenChange", outboundMonthChange: "outboundMonthChange", inboundMonthChange: "inboundMonthChange", focusOnNextChange: "focusOnNextChange", focusOnPreviousChange: "focusOnPreviousChange" }, viewQueries: [{ propertyName: "datepickerOutbound", first: true, predicate: ["datepickerOutbound"], descendants: true }, { propertyName: "datepickerInbound", first: true, predicate: ["datepickerInbound"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [nasClass]=\"getMainClass()\" #container>\n <div [nasClass]=\"getClass('date-picker')\">\n <nas-datepicker-new #datepickerOutbound\n compact\n [disableBackdrop]=\"disableBackdrop\"\n [nasFormGroup]=\"nasFormGroup\"\n [nasFormControlName]=\"nasFormControlNameOutbound\"\n [noAvailableFlightsLabel]=\"noAvailableFlightsLabel\"\n [availableFlightsLabel]=\"availableFlightsLabel\"\n [disablePastSelection]=\"exists(disablePastSelection)\"\n [availability]=\"exists(availability)\"\n [availableDates]=\"outboundAvailableDates\"\n [times]=\"times\"\n [selectedTime]=\"outboundSelectedTime\"\n [dateDisplayFormat]=\"dateDisplayFormat\"\n [timeDisplayFormat]=\"timeDisplayFormat\"\n [locale]=\"locale\"\n [disabled]=\"exists(outboundDisabled)\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [ariaLabelPreviousMonth]=\"ariaLabelPreviousMonth\"\n [ariaLabelNextMonth]=\"ariaLabelNextMonth\"\n (focusOnNextChange)=\"inboundOpen = true\"\n (focusOnPreviousChange)=\"onFocusOnPrevious($event)\"\n (selectedMonthChange)=\"onOutboundMonthChange($event)\"\n [(open)]=\"outboundOpen\"\n [(selectedDate)]=\"outboundSelectedDate\">{{outboundLabel}}</nas-datepicker-new>\n </div>\n <span [nasClass]=\"getClass('separator')\"></span>\n <div *ngIf=\"checkOutboundOnly()\"\n [nasClass]=\"getClass('date-picker')\">\n <nas-datepicker-new #datepickerInbound\n compact\n [disableBackdrop]=\"disableBackdrop\"\n [nasFormGroup]=\"nasFormGroup\"\n [nasFormControlName]=\"nasFormControlNameInbound\"\n [disabled]=\"checkInboundDisabled()\"\n [noAvailableFlightsLabel]=\"noAvailableFlightsLabel\"\n [availableFlightsLabel]=\"availableFlightsLabel\"\n [disablePastSelection]=\"exists(disablePastSelection)\"\n [availability]=\"exists(availability)\"\n [availableDates]=\"inboundAvailableDates\"\n [lowerLimitDate]=\"inboundLowerLimitDate\"\n [times]=\"times\"\n [selectedTime]=\"inboundSelectedTime\"\n [dateDisplayFormat]=\"dateDisplayFormat\"\n [timeDisplayFormat]=\"timeDisplayFormat\"\n [locale]=\"locale\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [ariaLabelPreviousMonth]=\"ariaLabelPreviousMonth\"\n [ariaLabelNextMonth]=\"ariaLabelNextMonth\"\n (focusOnNextChange)=\"onFocusOnNext($event)\"\n (focusOnPreviousChange)=\"onInboundFocusOnPrevious()\"\n [(open)]=\"inboundOpen\"\n [(selectedMonth)]=\"inboundSelectedMonth\"\n [(selectedDate)]=\"inboundSelectedDate\">{{inboundLabel}}</nas-datepicker-new>\n </div>\n</div>", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-datepicker-combo-new{display:flex;margin:24px auto;flex-wrap:wrap;flex-direction:column}.nas-datepicker-combo-new nas-datepicker-new{display:flex}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper{padding-left:3px;padding-bottom:3px}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper .nas-select{margin-bottom:0}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper .nas-select:after{bottom:25px}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper .nas-select select{background-color:#fff;height:68px;border:2px solid #6f6f6f}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper .nas-select select:focus{border-color:#15273f}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__date-picker-wrapper nas-calendar-new{top:68px;right:0;left:0;margin-inline:auto;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.nas-datepicker-combo-new__date-picker{width:100%}.nas-datepicker-combo-new__date-picker:first-child nas-datepicker-new ::ng-deep .nas-datepicker__date-picker-wrapper{border-bottom:none}.nas-datepicker-combo-new__date-picker:first-child nas-datepicker-new ::ng-deep .nas-datepicker__time-selector-wrapper{border-bottom:none}.nas-datepicker-combo-new__separator{display:none}.nas-datepicker-combo-new--md,.nas-datepicker-combo-new--lg{flex-wrap:nowrap;flex-direction:row}.nas-datepicker-combo-new--md .nas-datepicker-combo-new__separator,.nas-datepicker-combo-new--lg .nas-datepicker-combo-new__separator{display:block;position:relative;align-self:flex-end;flex-shrink:0;width:3px}.nas-datepicker-combo-new--compact{margin:0 auto}.nas-datepicker-combo-new--inline-flex{flex-wrap:nowrap;flex-direction:row;gap:4px;position:relative;margin:0}.nas-datepicker-combo-new--inline-flex .nas-datepicker-combo-new__separator{display:none}.nas-datepicker-combo-new--inline-flex nas-datepicker-new ::ng-deep .nas-datepicker-new{position:unset}.nas-datepicker-combo-new--inline-flex nas-datepicker-new ::ng-deep .nas-datepicker-new__date-picker-wrapper{position:unset}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DatepickerNewComponent, selector: "nas-datepicker-new", inputs: ["ariaLabelBackdrop", "disableBackdrop", "noAvailableFlightsLabel", "availableFlightsLabel", "disablePastSelection", "lowerLimitDate", "availability", "availableDates", "disabled", "placeholder", "required", "ariaDescribedby", "ariaLabel", "dateDisplayFormat", "timeDisplayFormat", "locale", "compact", "nasFormGroup", "nasFormControlName", "times", "open", "selectedMonth", "selectedDate", "selectedTime", "ariaLabelPreviousMonth", "ariaLabelNextMonth"], outputs: ["selectedDateChange", "selectedMonthChange", "openChange", "focusOnNextChange", "focusOnPreviousChange"] }, { kind: "directive", type: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }] }); }
|
|
13009
|
+
}
|
|
13010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerComboNewComponent, decorators: [{
|
|
13011
|
+
type: Component,
|
|
13012
|
+
args: [{ selector: 'nas-datepicker-combo-new', encapsulation: ViewEncapsulation.Emulated, template: "<div [nasClass]=\"getMainClass()\" #container>\n <div [nasClass]=\"getClass('date-picker')\">\n <nas-datepicker-new #datepickerOutbound\n compact\n [disableBackdrop]=\"disableBackdrop\"\n [nasFormGroup]=\"nasFormGroup\"\n [nasFormControlName]=\"nasFormControlNameOutbound\"\n [noAvailableFlightsLabel]=\"noAvailableFlightsLabel\"\n [availableFlightsLabel]=\"availableFlightsLabel\"\n [disablePastSelection]=\"exists(disablePastSelection)\"\n [availability]=\"exists(availability)\"\n [availableDates]=\"outboundAvailableDates\"\n [times]=\"times\"\n [selectedTime]=\"outboundSelectedTime\"\n [dateDisplayFormat]=\"dateDisplayFormat\"\n [timeDisplayFormat]=\"timeDisplayFormat\"\n [locale]=\"locale\"\n [disabled]=\"exists(outboundDisabled)\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [ariaLabelPreviousMonth]=\"ariaLabelPreviousMonth\"\n [ariaLabelNextMonth]=\"ariaLabelNextMonth\"\n (focusOnNextChange)=\"inboundOpen = true\"\n (focusOnPreviousChange)=\"onFocusOnPrevious($event)\"\n (selectedMonthChange)=\"onOutboundMonthChange($event)\"\n [(open)]=\"outboundOpen\"\n [(selectedDate)]=\"outboundSelectedDate\">{{outboundLabel}}</nas-datepicker-new>\n </div>\n <span [nasClass]=\"getClass('separator')\"></span>\n <div *ngIf=\"checkOutboundOnly()\"\n [nasClass]=\"getClass('date-picker')\">\n <nas-datepicker-new #datepickerInbound\n compact\n [disableBackdrop]=\"disableBackdrop\"\n [nasFormGroup]=\"nasFormGroup\"\n [nasFormControlName]=\"nasFormControlNameInbound\"\n [disabled]=\"checkInboundDisabled()\"\n [noAvailableFlightsLabel]=\"noAvailableFlightsLabel\"\n [availableFlightsLabel]=\"availableFlightsLabel\"\n [disablePastSelection]=\"exists(disablePastSelection)\"\n [availability]=\"exists(availability)\"\n [availableDates]=\"inboundAvailableDates\"\n [lowerLimitDate]=\"inboundLowerLimitDate\"\n [times]=\"times\"\n [selectedTime]=\"inboundSelectedTime\"\n [dateDisplayFormat]=\"dateDisplayFormat\"\n [timeDisplayFormat]=\"timeDisplayFormat\"\n [locale]=\"locale\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [ariaLabelPreviousMonth]=\"ariaLabelPreviousMonth\"\n [ariaLabelNextMonth]=\"ariaLabelNextMonth\"\n (focusOnNextChange)=\"onFocusOnNext($event)\"\n (focusOnPreviousChange)=\"onInboundFocusOnPrevious()\"\n [(open)]=\"inboundOpen\"\n [(selectedMonth)]=\"inboundSelectedMonth\"\n [(selectedDate)]=\"inboundSelectedDate\">{{inboundLabel}}</nas-datepicker-new>\n </div>\n</div>", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-datepicker-combo-new{display:flex;margin:24px auto;flex-wrap:wrap;flex-direction:column}.nas-datepicker-combo-new nas-datepicker-new{display:flex}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper{padding-left:3px;padding-bottom:3px}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper .nas-select{margin-bottom:0}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper .nas-select:after{bottom:25px}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper .nas-select select{background-color:#fff;height:68px;border:2px solid #6f6f6f}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__time-selector-wrapper .nas-select select:focus{border-color:#15273f}.nas-datepicker-combo-new nas-datepicker-new ::ng-deep .nas-datepicker-new__date-picker-wrapper nas-calendar-new{top:68px;right:0;left:0;margin-inline:auto;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.nas-datepicker-combo-new__date-picker{width:100%}.nas-datepicker-combo-new__date-picker:first-child nas-datepicker-new ::ng-deep .nas-datepicker__date-picker-wrapper{border-bottom:none}.nas-datepicker-combo-new__date-picker:first-child nas-datepicker-new ::ng-deep .nas-datepicker__time-selector-wrapper{border-bottom:none}.nas-datepicker-combo-new__separator{display:none}.nas-datepicker-combo-new--md,.nas-datepicker-combo-new--lg{flex-wrap:nowrap;flex-direction:row}.nas-datepicker-combo-new--md .nas-datepicker-combo-new__separator,.nas-datepicker-combo-new--lg .nas-datepicker-combo-new__separator{display:block;position:relative;align-self:flex-end;flex-shrink:0;width:3px}.nas-datepicker-combo-new--compact{margin:0 auto}.nas-datepicker-combo-new--inline-flex{flex-wrap:nowrap;flex-direction:row;gap:4px;position:relative;margin:0}.nas-datepicker-combo-new--inline-flex .nas-datepicker-combo-new__separator{display:none}.nas-datepicker-combo-new--inline-flex nas-datepicker-new ::ng-deep .nas-datepicker-new{position:unset}.nas-datepicker-combo-new--inline-flex nas-datepicker-new ::ng-deep .nas-datepicker-new__date-picker-wrapper{position:unset}\n"] }]
|
|
13013
|
+
}], ctorParameters: function () { return [{ type: DateHelper }, { type: DeviceHelper }, { type: i0.Renderer2 }]; }, propDecorators: { datepickerOutbound: [{
|
|
13014
|
+
type: ViewChild,
|
|
13015
|
+
args: ['datepickerOutbound']
|
|
13016
|
+
}], datepickerInbound: [{
|
|
13017
|
+
type: ViewChild,
|
|
13018
|
+
args: ['datepickerInbound']
|
|
13019
|
+
}], container: [{
|
|
13020
|
+
type: ViewChild,
|
|
13021
|
+
args: ['container']
|
|
13022
|
+
}], ariaLabelBackdrop: [{
|
|
13023
|
+
type: Input
|
|
13024
|
+
}], outboundOpen: [{
|
|
13025
|
+
type: Input
|
|
13026
|
+
}], inboundOpen: [{
|
|
13027
|
+
type: Input
|
|
13028
|
+
}], noAvailableFlightsLabel: [{
|
|
13029
|
+
type: Input
|
|
13030
|
+
}], availableFlightsLabel: [{
|
|
13031
|
+
type: Input
|
|
13032
|
+
}], disablePastSelection: [{
|
|
13033
|
+
type: Input
|
|
13034
|
+
}], outboundDisabled: [{
|
|
13035
|
+
type: Input
|
|
13036
|
+
}], inboundDisabled: [{
|
|
13037
|
+
type: Input
|
|
13038
|
+
}], outboundOnly: [{
|
|
13039
|
+
type: Input
|
|
13040
|
+
}], outboundLabel: [{
|
|
13041
|
+
type: Input
|
|
13042
|
+
}], inboundLabel: [{
|
|
13043
|
+
type: Input
|
|
13044
|
+
}], availability: [{
|
|
13045
|
+
type: Input
|
|
13046
|
+
}], outboundAvailableDates: [{
|
|
13047
|
+
type: Input
|
|
13048
|
+
}], inboundAvailableDates: [{
|
|
13049
|
+
type: Input
|
|
13050
|
+
}], times: [{
|
|
13051
|
+
type: Input
|
|
13052
|
+
}], dateDisplayFormat: [{
|
|
13053
|
+
type: Input
|
|
13054
|
+
}], timeDisplayFormat: [{
|
|
13055
|
+
type: Input
|
|
13056
|
+
}], locale: [{
|
|
13057
|
+
type: Input
|
|
13058
|
+
}], compact: [{
|
|
13059
|
+
type: Input
|
|
13060
|
+
}], nasFormGroup: [{
|
|
13061
|
+
type: Input
|
|
13062
|
+
}], nasFormControlNameOutbound: [{
|
|
13063
|
+
type: Input
|
|
13064
|
+
}], nasFormControlNameInbound: [{
|
|
13065
|
+
type: Input
|
|
13066
|
+
}], outboundSelectedDate: [{
|
|
13067
|
+
type: Input
|
|
13068
|
+
}], inboundSelectedDate: [{
|
|
13069
|
+
type: Input
|
|
13070
|
+
}], disableBackdrop: [{
|
|
13071
|
+
type: Input
|
|
13072
|
+
}], outboundSelectedTime: [{
|
|
13073
|
+
type: Input
|
|
13074
|
+
}], inboundSelectedTime: [{
|
|
13075
|
+
type: Input
|
|
13076
|
+
}], ariaLabelPreviousMonth: [{
|
|
13077
|
+
type: Input
|
|
13078
|
+
}], ariaLabelNextMonth: [{
|
|
13079
|
+
type: Input
|
|
13080
|
+
}], inboundLowerLimitDateOffset: [{
|
|
13081
|
+
type: Input
|
|
13082
|
+
}], inlineFlex: [{
|
|
13083
|
+
type: Input
|
|
13084
|
+
}], outboundSelectedDateChange: [{
|
|
13085
|
+
type: Output
|
|
13086
|
+
}], inboundSelectedDateChange: [{
|
|
13087
|
+
type: Output
|
|
13088
|
+
}], outboundOpenChange: [{
|
|
13089
|
+
type: Output
|
|
13090
|
+
}], inboundOpenChange: [{
|
|
13091
|
+
type: Output
|
|
13092
|
+
}], outboundMonthChange: [{
|
|
13093
|
+
type: Output
|
|
13094
|
+
}], inboundMonthChange: [{
|
|
13095
|
+
type: Output
|
|
13096
|
+
}], focusOnNextChange: [{
|
|
13097
|
+
type: Output
|
|
13098
|
+
}], focusOnPreviousChange: [{
|
|
13099
|
+
type: Output
|
|
13100
|
+
}] } });
|
|
13101
|
+
|
|
13102
|
+
class DatepickerComboNewModule {
|
|
13103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerComboNewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
13104
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: DatepickerComboNewModule, declarations: [DatepickerComboNewComponent], imports: [CommonModule,
|
|
13105
|
+
DatepickerNewModule,
|
|
13106
|
+
NasClassModule], exports: [DatepickerComboNewComponent] }); }
|
|
13107
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerComboNewModule, providers: [DeviceHelper, DateHelper], imports: [CommonModule,
|
|
13108
|
+
DatepickerNewModule,
|
|
13109
|
+
NasClassModule] }); }
|
|
13110
|
+
}
|
|
13111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: DatepickerComboNewModule, decorators: [{
|
|
13112
|
+
type: NgModule,
|
|
13113
|
+
args: [{
|
|
13114
|
+
declarations: [DatepickerComboNewComponent],
|
|
13115
|
+
imports: [
|
|
13116
|
+
CommonModule,
|
|
13117
|
+
DatepickerNewModule,
|
|
13118
|
+
NasClassModule
|
|
13119
|
+
],
|
|
13120
|
+
exports: [DatepickerComboNewComponent],
|
|
13121
|
+
providers: [DeviceHelper, DateHelper]
|
|
13122
|
+
}]
|
|
13123
|
+
}] });
|
|
13124
|
+
|
|
13125
|
+
/**
|
|
13126
|
+
* @license
|
|
13127
|
+
* Copyright Norwegian Air Shuttle. All Rights Reserved.
|
|
13128
|
+
*/
|
|
13129
|
+
/**
|
|
13130
|
+
* @description
|
|
13131
|
+
* Norwegian Phone number Component | Form Controls
|
|
13132
|
+
*/
|
|
13133
|
+
class PhoneNumberComponent extends NasComponentBase {
|
|
13134
|
+
get model() {
|
|
13135
|
+
return this.modelValue;
|
|
13136
|
+
}
|
|
13137
|
+
set model(value) {
|
|
13138
|
+
this.modelValue = value;
|
|
13139
|
+
this.modelChange.emit(this.modelValue);
|
|
13140
|
+
}
|
|
13141
|
+
/**
|
|
13142
|
+
* @property Input
|
|
13143
|
+
* @description
|
|
13144
|
+
* Gets or sets the selected value.
|
|
13145
|
+
* @example
|
|
13146
|
+
* <nas-phone-number [(selected)]="selected"></nas-phone-number>
|
|
13147
|
+
*/
|
|
13148
|
+
get selected() {
|
|
13149
|
+
return this.selectedValue;
|
|
13150
|
+
}
|
|
13151
|
+
set selected(option) {
|
|
13152
|
+
if (!option) {
|
|
13153
|
+
return;
|
|
13154
|
+
}
|
|
13155
|
+
this.selectedValue = option;
|
|
13156
|
+
this.selectedChange.emit(this.selectedValue);
|
|
13157
|
+
}
|
|
13158
|
+
constructor() {
|
|
13159
|
+
super('nas-phone-number');
|
|
13160
|
+
/**
|
|
13161
|
+
* @property Input
|
|
13162
|
+
* @description
|
|
13163
|
+
* The type of the native input element. Default value is number
|
|
13164
|
+
* @example
|
|
13165
|
+
* <nas-phone-number [type]="'text'"></nas-phone-number>
|
|
13166
|
+
*/
|
|
13167
|
+
this.type = 'number';
|
|
13168
|
+
/**
|
|
13169
|
+
* @property Output
|
|
13170
|
+
* @description
|
|
13171
|
+
* An output event that fies when input value changes.
|
|
13172
|
+
* @example
|
|
13173
|
+
* <nas-phone-number (modelChange)="onModelChange()"></nas-phone-number>
|
|
13174
|
+
*/
|
|
13175
|
+
this.modelChange = new EventEmitter();
|
|
13176
|
+
/**
|
|
13177
|
+
* @property Output
|
|
13178
|
+
* @description
|
|
13179
|
+
* An event that is fired every time a selection is done.
|
|
13180
|
+
* @example
|
|
13181
|
+
* <nas-phone-number (selectedChange)="onSelectedChange($event)"></nas-phone-number>
|
|
13182
|
+
*/
|
|
13183
|
+
this.selectedChange = new EventEmitter();
|
|
13184
|
+
}
|
|
13185
|
+
mainClass() {
|
|
13186
|
+
const { error, disabled, loading, spaceless } = this;
|
|
13187
|
+
return this.getClass('', [
|
|
13188
|
+
this.exists(this.error) && 'error',
|
|
13189
|
+
this.exists(this.disabled) && 'disabled',
|
|
13190
|
+
this.exists(this.loading) && 'loading',
|
|
13191
|
+
this.exists(this.spaceless) && 'spaceless'
|
|
13192
|
+
]);
|
|
13193
|
+
}
|
|
13194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: PhoneNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: PhoneNumberComponent, selector: "nas-phone-number", inputs: { options: "options", preferredOptions: "preferredOptions", prefixCountryCode: "prefixCountryCode", label: "label", optionsLabel: "optionsLabel", preferredOptionsLabel: "preferredOptionsLabel", placeholder: "placeholder", id: "id", type: "type", error: "error", disabled: "disabled", spaceless: "spaceless", loading: "loading", errorMessage: "errorMessage", info: "info", icon: "icon", readonly: "readonly", ariaDescribedby: ["aria-describedby", "ariaDescribedby"], required: "required", nasFormControlName: "nasFormControlName", nasFormControlNamePrefix: "nasFormControlNamePrefix", nasFormGroup: "nasFormGroup", model: "model", cssClass: "cssClass", selectedValue: "selectedValue", selected: "selected" }, outputs: { modelChange: "modelChange", selectedChange: "selectedChange" }, usesInheritance: true, ngImport: i0, template: "<div [nasClass]=\"mainClass()\">\n <label [nasClass]=\"getClass('label')\" *ngIf=\"label\" [attr.for]=\"id\">{{label}}</label>\n\n <div [nasClass]=\"getClass('controls')\">\n <ng-container *ngIf=\"!nasFormGroup || !nasFormControlName; else reactiveForm\">\n <div [nasClass]=\"getClass('prefix')\" *ngIf=\"prefixCountryCode else selectCountryCode\">\n {{prefixCountryCode}}\n </div>\n <ng-template #selectCountryCode>\n <div [nasClass]=\"getClass('country-code')\">\n <nas-select *ngIf=\"!preferredOptions\" [options]=\"options\" [error]=\"error\" [disabled]=\"disabled\"\n [spaceless]=\"spaceless\" [cssClass]=\"cssClass\" [selectedValue]=\"selectedValue\" [(selected)]=\"selected\">\n </nas-select>\n <nas-select *ngIf=\"preferredOptions\" [error]=\"error\" [disabled]=\"disabled\" [spaceless]=\"spaceless\"\n [cssClass]=\"cssClass\" [selectedValue]=\"selectedValue\" [(selected)]=\"selected\">\n <nas-optgroup [label]=\"preferredOptionsLabel\">\n <nas-option *ngFor=\"let option of preferredOptions\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n <nas-optgroup [label]=\"optionsLabel\">\n <nas-option *ngFor=\"let option of options\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n </nas-select>\n </div>\n </ng-template>\n <div [nasClass]=\"getClass('number')\">\n <input [nasClass]=\"getClass('text')\" [attr.id]=\"id\" [attr.type]=\"type\" [attr.disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\" [attr.readonly]=\"readonly\" [required]=\"required\"\n [attr.aria-describedby]=\"ariaDescribedby\" [attr.aria-invalid]=\"error\" [attr.aria-required]=\"required\"\n [(ngModel)]=\"model\" />\n </div>\n </ng-container>\n <ng-template #reactiveForm>\n <div [nasClass]=\"getClass('prefix')\" *ngIf=\"prefixCountryCode else selectCountryCodeReactive\">\n {{prefixCountryCode}}\n </div>\n <ng-template #selectCountryCodeReactive>\n <div [nasClass]=\"getClass('country-code')\">\n <nas-select *ngIf=\"!preferredOptions\" [options]=\"options\" [error]=\"error\" [disabled]=\"disabled\"\n [spaceless]=\"spaceless\" [cssClass]=\"cssClass\" [nasFormControlName]=\"nasFormControlNamePrefix\"\n [nasFormGroup]=\"nasFormGroup\">\n </nas-select>\n <nas-select *ngIf=\"preferredOptions\" [error]=\"error\" [disabled]=\"disabled\" [spaceless]=\"spaceless\"\n [cssClass]=\"cssClass\" [nasFormControlName]=\"nasFormControlNamePrefix\" [nasFormGroup]=\"nasFormGroup\">\n <nas-optgroup [label]=\"preferredOptionsLabel\">\n <nas-option *ngFor=\"let option of preferredOptions\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n <nas-optgroup [label]=\"optionsLabel\">\n <nas-option *ngFor=\"let option of options\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n </nas-select>\n </div>\n </ng-template>\n <div [nasClass]=\"getClass('number')\" [formGroup]=\"nasFormGroup\">\n <input [nasClass]=\"getClass('text')\" [attr.id]=\"id\" [attr.type]=\"type\" [attr.disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\" [attr.readonly]=\"readonly\" [required]=\"required\"\n [attr.aria-describedby]=\"ariaDescribedby\" [attr.aria-invalid]=\"error\" [attr.aria-required]=\"required\"\n [formControlName]=\"nasFormControlName\" />\n </div>\n </ng-template>\n </div>\n <span [nasClass]=\"getClass('icon')\" *ngIf=\"exists(error)\">\n <nas-icon icon=\"alert--error\"></nas-icon>\n </span>\n\n <span [nasClass]=\"getClass('icon')\" *ngIf=\"icon && !exists(error)\">\n <nas-icon [icon]=\"icon\"></nas-icon>\n </span>\n <span [nasClass]=\"getClass('line')\"></span>\n\n <p [nasClass]=\"getClass('error')\" *ngIf=\"exists(error) && errorMessage\">{{errorMessage}}</p>\n\n <span [nasClass]=\"getClass('info')\" *ngIf=\"info\">{{info}}</span>\n\n</div>\n", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-phone-number{margin-bottom:16px;position:relative}.nas-phone-number__label{display:flex;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;letter-spacing:-.025em;word-spacing:-.025em;display:block;margin-top:0;margin-bottom:6px}@media (min-width: 640px){.nas-phone-number__label{letter-spacing:inherit;word-spacing:inherit}}.nas-phone-number__label~.nas-phone-number__icon{top:43px}.nas-phone-number__label~.nas-phone-number__icon--spinner{top:41px}.nas-phone-number__controls{display:flex}.nas-phone-number__prefix{display:flex;padding:3px 16px 0;justify-content:center;align-items:center;margin-bottom:3px;background-color:#f1f1f1}.nas-phone-number__number{flex:1}.nas-phone-number__text{position:relative;margin-bottom:3px;height:50px}.nas-phone-number__text:focus~.nas-phone-number__line{background-color:#15273f}.nas-phone-number__text[disabled]{opacity:.5}.nas-phone-number__line{position:relative;display:block;height:3px;background-color:#c3c3c3;transition:background-color .15s cubic-bezier(0,0,.1,1)}.nas-phone-number__icon{position:absolute;pointer-events:none;right:12px;top:13px}.nas-phone-number__icon--spinner{top:12px}.nas-phone-number__info{display:block;margin-top:9px;margin-bottom:24px}.nas-phone-number--error .nas-phone-number__text{padding-right:40px;background-repeat:no-repeat;background-position:right 9px center}.nas-phone-number--error .nas-phone-number__error{display:block;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;color:#e5212d}.nas-phone-number--error .nas-phone-number__line{background-color:#e5212d}.nas-phone-number--error .nas-phone-number__text:focus~.nas-phone-number__line{background-color:#15273f}.nas-phone-number--disabled .nas-phone-number__text{opacity:.5}.nas-phone-number--loading .nas-phone-number__line{background-color:#15273f;animation:input-loader ease 1.5s;animation-iteration-count:infinite;animation-fill-mode:forwards;transform-origin:left}.nas-phone-number--spaceless{margin-bottom:0}@keyframes input-loader{0%{transform:translate(0) scaleX(0)}50%{transform:translate(0) scaleX(1)}to{transform:translate(100%) scaleX(0)}}.nas-phone-number:focus-within .nas-phone-number__line{background-color:#15273f}:host ::ng-deep .nas-select{margin-bottom:3px}:host ::ng-deep .nas-select select{padding:13px 34px 15px 12px;border:none;background-color:#f1f1f1;height:50px;line-height:24px}\n"], dependencies: [{ 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: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }, { kind: "component", type: SelectComponent, selector: "nas-select", inputs: ["id", "inline", "label", "block", "spaceless", "stretch", "compact", "simple", "light", "fill", "error", "errorMessage", "disabled", "autogrow", "cssClass", "nasFormControlName", "nasFormGroup", "options", "selectedValue", "selected"], outputs: ["selectedChange", "keydown"] }, { kind: "component", type: OptionComponent, selector: "nas-option", inputs: ["option"] }, { kind: "component", type: OptgroupComponent, selector: "nas-optgroup", inputs: ["label"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "nas-icon", inputs: ["icon", "type", "isIndicator", "lightCircularBackground", "cssClass"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
13196
|
+
}
|
|
13197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: PhoneNumberComponent, decorators: [{
|
|
13198
|
+
type: Component,
|
|
13199
|
+
args: [{ selector: 'nas-phone-number', template: "<div [nasClass]=\"mainClass()\">\n <label [nasClass]=\"getClass('label')\" *ngIf=\"label\" [attr.for]=\"id\">{{label}}</label>\n\n <div [nasClass]=\"getClass('controls')\">\n <ng-container *ngIf=\"!nasFormGroup || !nasFormControlName; else reactiveForm\">\n <div [nasClass]=\"getClass('prefix')\" *ngIf=\"prefixCountryCode else selectCountryCode\">\n {{prefixCountryCode}}\n </div>\n <ng-template #selectCountryCode>\n <div [nasClass]=\"getClass('country-code')\">\n <nas-select *ngIf=\"!preferredOptions\" [options]=\"options\" [error]=\"error\" [disabled]=\"disabled\"\n [spaceless]=\"spaceless\" [cssClass]=\"cssClass\" [selectedValue]=\"selectedValue\" [(selected)]=\"selected\">\n </nas-select>\n <nas-select *ngIf=\"preferredOptions\" [error]=\"error\" [disabled]=\"disabled\" [spaceless]=\"spaceless\"\n [cssClass]=\"cssClass\" [selectedValue]=\"selectedValue\" [(selected)]=\"selected\">\n <nas-optgroup [label]=\"preferredOptionsLabel\">\n <nas-option *ngFor=\"let option of preferredOptions\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n <nas-optgroup [label]=\"optionsLabel\">\n <nas-option *ngFor=\"let option of options\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n </nas-select>\n </div>\n </ng-template>\n <div [nasClass]=\"getClass('number')\">\n <input [nasClass]=\"getClass('text')\" [attr.id]=\"id\" [attr.type]=\"type\" [attr.disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\" [attr.readonly]=\"readonly\" [required]=\"required\"\n [attr.aria-describedby]=\"ariaDescribedby\" [attr.aria-invalid]=\"error\" [attr.aria-required]=\"required\"\n [(ngModel)]=\"model\" />\n </div>\n </ng-container>\n <ng-template #reactiveForm>\n <div [nasClass]=\"getClass('prefix')\" *ngIf=\"prefixCountryCode else selectCountryCodeReactive\">\n {{prefixCountryCode}}\n </div>\n <ng-template #selectCountryCodeReactive>\n <div [nasClass]=\"getClass('country-code')\">\n <nas-select *ngIf=\"!preferredOptions\" [options]=\"options\" [error]=\"error\" [disabled]=\"disabled\"\n [spaceless]=\"spaceless\" [cssClass]=\"cssClass\" [nasFormControlName]=\"nasFormControlNamePrefix\"\n [nasFormGroup]=\"nasFormGroup\">\n </nas-select>\n <nas-select *ngIf=\"preferredOptions\" [error]=\"error\" [disabled]=\"disabled\" [spaceless]=\"spaceless\"\n [cssClass]=\"cssClass\" [nasFormControlName]=\"nasFormControlNamePrefix\" [nasFormGroup]=\"nasFormGroup\">\n <nas-optgroup [label]=\"preferredOptionsLabel\">\n <nas-option *ngFor=\"let option of preferredOptions\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n <nas-optgroup [label]=\"optionsLabel\">\n <nas-option *ngFor=\"let option of options\" [option]=\"option\"></nas-option>\n </nas-optgroup>\n </nas-select>\n </div>\n </ng-template>\n <div [nasClass]=\"getClass('number')\" [formGroup]=\"nasFormGroup\">\n <input [nasClass]=\"getClass('text')\" [attr.id]=\"id\" [attr.type]=\"type\" [attr.disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\" [attr.readonly]=\"readonly\" [required]=\"required\"\n [attr.aria-describedby]=\"ariaDescribedby\" [attr.aria-invalid]=\"error\" [attr.aria-required]=\"required\"\n [formControlName]=\"nasFormControlName\" />\n </div>\n </ng-template>\n </div>\n <span [nasClass]=\"getClass('icon')\" *ngIf=\"exists(error)\">\n <nas-icon icon=\"alert--error\"></nas-icon>\n </span>\n\n <span [nasClass]=\"getClass('icon')\" *ngIf=\"icon && !exists(error)\">\n <nas-icon [icon]=\"icon\"></nas-icon>\n </span>\n <span [nasClass]=\"getClass('line')\"></span>\n\n <p [nasClass]=\"getClass('error')\" *ngIf=\"exists(error) && errorMessage\">{{errorMessage}}</p>\n\n <span [nasClass]=\"getClass('info')\" *ngIf=\"info\">{{info}}</span>\n\n</div>\n", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-phone-number{margin-bottom:16px;position:relative}.nas-phone-number__label{display:flex;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;letter-spacing:-.025em;word-spacing:-.025em;display:block;margin-top:0;margin-bottom:6px}@media (min-width: 640px){.nas-phone-number__label{letter-spacing:inherit;word-spacing:inherit}}.nas-phone-number__label~.nas-phone-number__icon{top:43px}.nas-phone-number__label~.nas-phone-number__icon--spinner{top:41px}.nas-phone-number__controls{display:flex}.nas-phone-number__prefix{display:flex;padding:3px 16px 0;justify-content:center;align-items:center;margin-bottom:3px;background-color:#f1f1f1}.nas-phone-number__number{flex:1}.nas-phone-number__text{position:relative;margin-bottom:3px;height:50px}.nas-phone-number__text:focus~.nas-phone-number__line{background-color:#15273f}.nas-phone-number__text[disabled]{opacity:.5}.nas-phone-number__line{position:relative;display:block;height:3px;background-color:#c3c3c3;transition:background-color .15s cubic-bezier(0,0,.1,1)}.nas-phone-number__icon{position:absolute;pointer-events:none;right:12px;top:13px}.nas-phone-number__icon--spinner{top:12px}.nas-phone-number__info{display:block;margin-top:9px;margin-bottom:24px}.nas-phone-number--error .nas-phone-number__text{padding-right:40px;background-repeat:no-repeat;background-position:right 9px center}.nas-phone-number--error .nas-phone-number__error{display:block;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;color:#e5212d}.nas-phone-number--error .nas-phone-number__line{background-color:#e5212d}.nas-phone-number--error .nas-phone-number__text:focus~.nas-phone-number__line{background-color:#15273f}.nas-phone-number--disabled .nas-phone-number__text{opacity:.5}.nas-phone-number--loading .nas-phone-number__line{background-color:#15273f;animation:input-loader ease 1.5s;animation-iteration-count:infinite;animation-fill-mode:forwards;transform-origin:left}.nas-phone-number--spaceless{margin-bottom:0}@keyframes input-loader{0%{transform:translate(0) scaleX(0)}50%{transform:translate(0) scaleX(1)}to{transform:translate(100%) scaleX(0)}}.nas-phone-number:focus-within .nas-phone-number__line{background-color:#15273f}:host ::ng-deep .nas-select{margin-bottom:3px}:host ::ng-deep .nas-select select{padding:13px 34px 15px 12px;border:none;background-color:#f1f1f1;height:50px;line-height:24px}\n"] }]
|
|
13200
|
+
}], ctorParameters: function () { return []; }, propDecorators: { options: [{
|
|
13201
|
+
type: Input
|
|
13202
|
+
}], preferredOptions: [{
|
|
13203
|
+
type: Input
|
|
13204
|
+
}], prefixCountryCode: [{
|
|
13205
|
+
type: Input
|
|
13206
|
+
}], label: [{
|
|
13207
|
+
type: Input
|
|
13208
|
+
}], optionsLabel: [{
|
|
13209
|
+
type: Input
|
|
13210
|
+
}], preferredOptionsLabel: [{
|
|
13211
|
+
type: Input
|
|
13212
|
+
}], placeholder: [{
|
|
13213
|
+
type: Input
|
|
13214
|
+
}], id: [{
|
|
13215
|
+
type: Input
|
|
13216
|
+
}], type: [{
|
|
13217
|
+
type: Input
|
|
13218
|
+
}], error: [{
|
|
13219
|
+
type: Input
|
|
13220
|
+
}], disabled: [{
|
|
13221
|
+
type: Input
|
|
13222
|
+
}], spaceless: [{
|
|
13223
|
+
type: Input
|
|
13224
|
+
}], loading: [{
|
|
13225
|
+
type: Input
|
|
13226
|
+
}], errorMessage: [{
|
|
13227
|
+
type: Input
|
|
13228
|
+
}], info: [{
|
|
13229
|
+
type: Input
|
|
13230
|
+
}], icon: [{
|
|
13231
|
+
type: Input
|
|
13232
|
+
}], readonly: [{
|
|
13233
|
+
type: Input
|
|
13234
|
+
}], ariaDescribedby: [{
|
|
13235
|
+
type: Input,
|
|
13236
|
+
args: ['aria-describedby']
|
|
13237
|
+
}], required: [{
|
|
13238
|
+
type: Input
|
|
13239
|
+
}], nasFormControlName: [{
|
|
13240
|
+
type: Input
|
|
13241
|
+
}], nasFormControlNamePrefix: [{
|
|
13242
|
+
type: Input
|
|
13243
|
+
}], nasFormGroup: [{
|
|
13244
|
+
type: Input
|
|
13245
|
+
}], model: [{
|
|
13246
|
+
type: Input
|
|
13247
|
+
}], modelChange: [{
|
|
13248
|
+
type: Output
|
|
13249
|
+
}], cssClass: [{
|
|
13250
|
+
type: Input
|
|
13251
|
+
}], selectedValue: [{
|
|
13252
|
+
type: Input
|
|
13253
|
+
}], selected: [{
|
|
13254
|
+
type: Input
|
|
13255
|
+
}], selectedChange: [{
|
|
13256
|
+
type: Output
|
|
13257
|
+
}] } });
|
|
13258
|
+
|
|
13259
|
+
class PhoneNumberModule {
|
|
13260
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: PhoneNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
13261
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: PhoneNumberModule, declarations: [PhoneNumberComponent], imports: [CommonModule,
|
|
13262
|
+
NasClassModule,
|
|
13263
|
+
SelectModule,
|
|
13264
|
+
InputModule,
|
|
13265
|
+
FormsModule,
|
|
13266
|
+
IconModule,
|
|
13267
|
+
ReactiveFormsModule], exports: [PhoneNumberComponent] }); }
|
|
13268
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: PhoneNumberModule, imports: [CommonModule,
|
|
13269
|
+
NasClassModule,
|
|
13270
|
+
SelectModule,
|
|
13271
|
+
InputModule,
|
|
13272
|
+
FormsModule,
|
|
13273
|
+
IconModule,
|
|
13274
|
+
ReactiveFormsModule] }); }
|
|
13275
|
+
}
|
|
13276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: PhoneNumberModule, decorators: [{
|
|
13277
|
+
type: NgModule,
|
|
13278
|
+
args: [{
|
|
13279
|
+
declarations: [PhoneNumberComponent],
|
|
13280
|
+
imports: [
|
|
13281
|
+
CommonModule,
|
|
13282
|
+
NasClassModule,
|
|
13283
|
+
SelectModule,
|
|
11486
13284
|
InputModule,
|
|
11487
13285
|
FormsModule,
|
|
11488
13286
|
IconModule,
|
|
11489
|
-
ReactiveFormsModule,
|
|
13287
|
+
ReactiveFormsModule,
|
|
13288
|
+
],
|
|
13289
|
+
exports: [PhoneNumberComponent]
|
|
13290
|
+
}]
|
|
13291
|
+
}] });
|
|
13292
|
+
|
|
13293
|
+
let nextId$7 = 0;
|
|
13294
|
+
/**
|
|
13295
|
+
* @description
|
|
13296
|
+
* Norwegian Airport Select Component | Form Controls
|
|
13297
|
+
*/
|
|
13298
|
+
class AutocompleteComponent extends NasComponentBase {
|
|
13299
|
+
get showBackdrop() {
|
|
13300
|
+
return !this.exists(this.disableBackdrop) && this.open;
|
|
13301
|
+
}
|
|
13302
|
+
set showBackdrop(value) {
|
|
13303
|
+
if (!value) {
|
|
13304
|
+
this.blur();
|
|
13305
|
+
}
|
|
13306
|
+
}
|
|
13307
|
+
/**
|
|
13308
|
+
* @property Input
|
|
13309
|
+
* @description
|
|
13310
|
+
* An array of items that will appear inside the dropdown list.
|
|
13311
|
+
*/
|
|
13312
|
+
get items() {
|
|
13313
|
+
return this.itemsValue;
|
|
13314
|
+
}
|
|
13315
|
+
set items(items) {
|
|
13316
|
+
if (!items || items.length <= 0) {
|
|
13317
|
+
return;
|
|
13318
|
+
}
|
|
13319
|
+
this.itemsValue = items;
|
|
13320
|
+
this.filter();
|
|
13321
|
+
}
|
|
13322
|
+
/**
|
|
13323
|
+
* @property Input
|
|
13324
|
+
* @description
|
|
13325
|
+
* Can set and listen to wheather the dropdown list is or should be open or not.
|
|
13326
|
+
*/
|
|
13327
|
+
get open() {
|
|
13328
|
+
return this.openValue;
|
|
13329
|
+
}
|
|
13330
|
+
set open(open) {
|
|
13331
|
+
if (this.open === open || !this.items) {
|
|
13332
|
+
return;
|
|
13333
|
+
}
|
|
13334
|
+
this.openValue = open;
|
|
13335
|
+
this.openChange.emit(open);
|
|
13336
|
+
}
|
|
13337
|
+
/**
|
|
13338
|
+
* @property Input
|
|
13339
|
+
* @description
|
|
13340
|
+
* Can set and listen to changes in the model of the text field.
|
|
13341
|
+
*/
|
|
13342
|
+
get model() {
|
|
13343
|
+
return this.modelValue;
|
|
13344
|
+
}
|
|
13345
|
+
set model(model) {
|
|
13346
|
+
if (this.modelValue === model) {
|
|
13347
|
+
return;
|
|
13348
|
+
}
|
|
13349
|
+
this.modelValue = model;
|
|
13350
|
+
if (model && this.filteredItems) {
|
|
13351
|
+
this.index = this.filteredItems.findIndex(x => x.title === model);
|
|
13352
|
+
}
|
|
13353
|
+
this.pathReactiveFormControl(model);
|
|
13354
|
+
this.modelChange.emit(model);
|
|
13355
|
+
}
|
|
13356
|
+
constructor(document) {
|
|
13357
|
+
super('nas-autocomplete');
|
|
13358
|
+
this.document = document;
|
|
13359
|
+
this.filteredItems = this.items;
|
|
13360
|
+
/**
|
|
13361
|
+
* @property Input
|
|
13362
|
+
* @description
|
|
13363
|
+
* A placeholder that will appear inside the text field.
|
|
13364
|
+
*/
|
|
13365
|
+
this.placeholder = '';
|
|
13366
|
+
/**
|
|
13367
|
+
* @property Output
|
|
13368
|
+
* @description
|
|
13369
|
+
* Is fired when the next element should be focused.
|
|
13370
|
+
*/
|
|
13371
|
+
this.focusOnNext = new EventEmitter();
|
|
13372
|
+
/**
|
|
13373
|
+
* @property Output
|
|
13374
|
+
* @description
|
|
13375
|
+
* Is fired when the user selects an item in the dropdown list.
|
|
13376
|
+
*/
|
|
13377
|
+
this.selectedChange = new EventEmitter();
|
|
13378
|
+
this.openChange = new EventEmitter();
|
|
13379
|
+
this.modelChange = new EventEmitter();
|
|
13380
|
+
this.index = -1;
|
|
13381
|
+
this.openValue = false;
|
|
13382
|
+
this.componentId = nextId$7++;
|
|
13383
|
+
}
|
|
13384
|
+
ngOnInit() {
|
|
13385
|
+
if (!this.ariaLabelClear) {
|
|
13386
|
+
this.warnMissingAccessibiltyInput('ariaLabelClear');
|
|
13387
|
+
}
|
|
13388
|
+
if (!this.ariaLabelBackdrop) {
|
|
13389
|
+
this.warnMissingAccessibiltyInput('ariaLabelBackdrop');
|
|
13390
|
+
}
|
|
13391
|
+
}
|
|
13392
|
+
getResultsId() {
|
|
13393
|
+
return `nas-autocomplete-results-${this.componentId}`;
|
|
13394
|
+
}
|
|
13395
|
+
getLabelId() {
|
|
13396
|
+
return `nas-autocomplete-label-${this.componentId}`;
|
|
13397
|
+
}
|
|
13398
|
+
getInputId() {
|
|
13399
|
+
return `nas-autocomplete-input-${this.componentId}`;
|
|
13400
|
+
}
|
|
13401
|
+
setOpen() {
|
|
13402
|
+
this.input.nativeElement.select();
|
|
13403
|
+
this.open = true;
|
|
13404
|
+
}
|
|
13405
|
+
filter() {
|
|
13406
|
+
if (!this.items) {
|
|
13407
|
+
return;
|
|
13408
|
+
}
|
|
13409
|
+
if (!this.model && (!this.nasFormGroup || !this.nasFormControlName)) {
|
|
13410
|
+
this.filteredItems = this.items;
|
|
13411
|
+
return;
|
|
13412
|
+
}
|
|
13413
|
+
let currentModel = this.model;
|
|
13414
|
+
if (this.nasFormGroup && this.nasFormControlName) {
|
|
13415
|
+
const control = this.nasFormGroup.get(this.nasFormControlName);
|
|
13416
|
+
currentModel = control.value;
|
|
13417
|
+
}
|
|
13418
|
+
this.filteredItems = this.items.filter(x => (x.title && x.title.toLowerCase().includes(currentModel.toLowerCase())) ||
|
|
13419
|
+
(x.preamble && x.preamble.toLowerCase().includes(currentModel.toLowerCase())));
|
|
13420
|
+
if (currentModel === '' || this.input.nativeElement.value === '') {
|
|
13421
|
+
this.filteredItems = this.items;
|
|
13422
|
+
}
|
|
13423
|
+
this.index = 0;
|
|
13424
|
+
if (this.filteredItems) {
|
|
13425
|
+
this.focused = this.filteredItems[this.index];
|
|
13426
|
+
this.open = true;
|
|
13427
|
+
}
|
|
13428
|
+
else {
|
|
13429
|
+
this.open = false;
|
|
13430
|
+
}
|
|
13431
|
+
}
|
|
13432
|
+
onKeyDown(event) {
|
|
13433
|
+
switch (event.key) {
|
|
13434
|
+
case 'Escape':
|
|
13435
|
+
this.open = false;
|
|
13436
|
+
this.blur();
|
|
13437
|
+
break;
|
|
13438
|
+
case 'Tab':
|
|
13439
|
+
case 'Enter':
|
|
13440
|
+
if (!event.shiftKey) {
|
|
13441
|
+
event.preventDefault();
|
|
13442
|
+
this.focusOnNext.emit(event);
|
|
13443
|
+
}
|
|
13444
|
+
if (this.focused) {
|
|
13445
|
+
this.modelValue = this.focused.title;
|
|
13446
|
+
this.selectedChange.emit(this.focused);
|
|
13447
|
+
this.pathReactiveFormControl(this.modelValue);
|
|
13448
|
+
}
|
|
13449
|
+
this.blur();
|
|
13450
|
+
break;
|
|
13451
|
+
case 'ArrowDown':
|
|
13452
|
+
case 'Down':
|
|
13453
|
+
this.focusDown();
|
|
13454
|
+
break;
|
|
13455
|
+
case 'ArrowUp':
|
|
13456
|
+
case 'Up':
|
|
13457
|
+
this.focusUp();
|
|
13458
|
+
break;
|
|
13459
|
+
default:
|
|
13460
|
+
break;
|
|
13461
|
+
}
|
|
13462
|
+
}
|
|
13463
|
+
clearSelected(event) {
|
|
13464
|
+
event.preventDefault();
|
|
13465
|
+
this.focused = null;
|
|
13466
|
+
this.filteredItems = this.items;
|
|
13467
|
+
this.model = '';
|
|
13468
|
+
this.open = true;
|
|
13469
|
+
this.index = -1;
|
|
13470
|
+
this.input.nativeElement.focus();
|
|
13471
|
+
}
|
|
13472
|
+
select(item) {
|
|
13473
|
+
this.focused = item;
|
|
13474
|
+
this.model = item.title;
|
|
13475
|
+
this.selectedChange.emit(item);
|
|
13476
|
+
if (this.filteredItems) {
|
|
13477
|
+
this.index = this.filteredItems.findIndex(x => x.id === item.id);
|
|
13478
|
+
}
|
|
13479
|
+
this.open = false;
|
|
13480
|
+
this.focusOnNext.emit();
|
|
13481
|
+
}
|
|
13482
|
+
blur() {
|
|
13483
|
+
this.open = false;
|
|
13484
|
+
this.openChange.emit(false);
|
|
13485
|
+
}
|
|
13486
|
+
focusDown() {
|
|
13487
|
+
++this.index;
|
|
13488
|
+
if (this.filteredItems) {
|
|
13489
|
+
if (!this.filteredItems[this.index]) {
|
|
13490
|
+
this.index = 0;
|
|
13491
|
+
}
|
|
13492
|
+
this.focused = this.filteredItems[this.index];
|
|
13493
|
+
}
|
|
13494
|
+
if (this.index === 0) {
|
|
13495
|
+
this.autoScroll(0);
|
|
13496
|
+
}
|
|
13497
|
+
else {
|
|
13498
|
+
this.autoScroll(131);
|
|
13499
|
+
}
|
|
13500
|
+
}
|
|
13501
|
+
focusUp() {
|
|
13502
|
+
--this.index;
|
|
13503
|
+
if (this.index < 0) {
|
|
13504
|
+
this.index = 0;
|
|
13505
|
+
this.blur();
|
|
13506
|
+
return;
|
|
13507
|
+
}
|
|
13508
|
+
if (this.filteredItems) {
|
|
13509
|
+
this.focused = this.filteredItems[this.index];
|
|
13510
|
+
}
|
|
13511
|
+
this.autoScroll(0);
|
|
13512
|
+
}
|
|
13513
|
+
pathReactiveFormControl(model) {
|
|
13514
|
+
if (this.nasFormGroup && this.nasFormControlName) {
|
|
13515
|
+
const formControl = this.nasFormGroup.get(this.nasFormControlName);
|
|
13516
|
+
formControl.patchValue(model);
|
|
13517
|
+
}
|
|
13518
|
+
}
|
|
13519
|
+
autoScroll(extraOffset) {
|
|
13520
|
+
if (!this.results) {
|
|
13521
|
+
return;
|
|
13522
|
+
}
|
|
13523
|
+
const results = this.results.nativeElement;
|
|
13524
|
+
const focusedItem = this.document.querySelector('.nas-autocomplete__list-item--focus');
|
|
13525
|
+
if (focusedItem) {
|
|
13526
|
+
results.scrollTo(0, 0);
|
|
13527
|
+
results.scrollTo(0, focusedItem.offsetTop + extraOffset - results.clientHeight);
|
|
13528
|
+
}
|
|
13529
|
+
}
|
|
13530
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteComponent, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13531
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: AutocompleteComponent, selector: "nas-autocomplete", inputs: { label: "label", placeholder: "placeholder", icon: "icon", items: "items", open: "open", model: "model", disableBackdrop: "disableBackdrop", nasFormControlName: "nasFormControlName", nasFormGroup: "nasFormGroup", ariaLabelBackdrop: "ariaLabelBackdrop", ariaLabelClear: "ariaLabelClear" }, outputs: { focusOnNext: "focusOnNext", selectedChange: "selectedChange", openChange: "openChange", modelChange: "modelChange" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "results", first: true, predicate: ["results"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!nasFormControlName; else reactiveForm\">\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"true\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [nasClass]=\"getClass('input')\"\n [(ngModel)]=\"model\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n <span [nasClass]=\"getClass('input-line')\"></span>\n </label>\n</ng-container>\n<ng-template #reactiveForm>\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\"\n [formGroup]=\"nasFormGroup\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [formControlName]=\"nasFormControlName\"\n [nasClass]=\"getClass('input')\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n <span [nasClass]=\"getClass('input-line')\"></span>\n </label>\n</ng-template>\n<div [id]=\"getResultsId()\"\n [nasClass]=\"getClass('results-wrapper')\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\">\n <ul #results\n role=\"listbox\"\n *ngIf=\"open\"\n [attr.aria-labelledby]=\"getLabelId()\"\n [nasClass]=\"getClass('results')\">\n <li role=\"option\"\n *ngFor=\"let item of filteredItems\"\n [id]=\"item.id\"\n [nasClass]=\"getClass('list-item', item.id === focused?.id && 'focus')\">\n <button type=\"button\"\n [nasClass]=\"getClass('item', item.id === focused?.id && 'focus')\"\n (click)=\"select(item)\"\n tabindex=\"-1\">\n <span [nasClass]=\"getClass('title')\">{{item.title}}</span>\n <span [nasClass]=\"getClass('preamble')\">{{item.preamble}}</span>\n </button>\n </li>\n </ul>\n</div>\n\n<nas-backdrop *ngIf=\"!exists(disableBackdrop)\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [(showBackdrop)]=\"showBackdrop\"></nas-backdrop>", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-autocomplete__wrapper{position:relative;display:block;z-index:3}.nas-autocomplete__label{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;font-size:14px;line-height:20px;display:block;position:relative;z-index:3;padding:9px 16px 0;background-color:#fff;margin-bottom:auto}.nas-autocomplete__input{height:35px;position:relative;z-index:3;line-height:1;margin:0}.nas-autocomplete__input[type=text]{padding:0 16px 9px}.nas-autocomplete__input:focus~.nas-autocomplete__input-line{border-color:#15273f}.nas-autocomplete__icon{position:absolute;z-index:4;right:24px;bottom:24px}.nas-autocomplete__input-line{display:block;position:relative;z-index:3;margin-top:3px;margin-bottom:-9px;border-top:3px solid #c3c3c3}.nas-autocomplete__results-wrapper{position:relative;z-index:4;perspective:1000px;margin-top:6px}.nas-autocomplete__results{position:absolute;z-index:3;width:100%;left:0;max-height:50vh;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;border:3px solid #15273f;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:results .65s ease both}.nas-autocomplete__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0b14202b;animation:backdrop .7s ease-out both}.nas-autocomplete__item{display:block;position:relative;z-index:2;width:100%;text-align:left;padding:12px;margin-top:-1px;outline:0}.nas-autocomplete__item--focus,.nas-autocomplete__item:hover,.nas-autocomplete__item:focus{background-color:#15273f}.nas-autocomplete__item--focus,.nas-autocomplete__item--focus .nas-autocomplete__title,.nas-autocomplete__item--focus .nas-autocomplete__preamble,.nas-autocomplete__item:hover,.nas-autocomplete__item:hover .nas-autocomplete__title,.nas-autocomplete__item:hover .nas-autocomplete__preamble,.nas-autocomplete__item:focus,.nas-autocomplete__item:focus .nas-autocomplete__title,.nas-autocomplete__item:focus .nas-autocomplete__preamble{color:#fff}.nas-autocomplete__title{display:inline-block;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;line-height:1;color:#15273f;margin-bottom:3px}.nas-autocomplete__preamble{display:block;font-size:14px}@keyframes results{0%{transform:rotateX(-90deg)}40%{transform:rotateX(20deg)}to{transform:rotateX(0)}}@keyframes backdrop{0%{opacity:0}}\n"], dependencies: [{ 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: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "nas-icon", inputs: ["icon", "type", "isIndicator", "lightCircularBackground", "cssClass"] }, { kind: "component", type: BackdropComponent, selector: "nas-backdrop", inputs: ["showBackdrop", "ariaLabelBackdrop"], outputs: ["showBackdropChange"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
13532
|
+
}
|
|
13533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
13534
|
+
type: Component,
|
|
13535
|
+
args: [{ selector: 'nas-autocomplete', template: "<ng-container *ngIf=\"!nasFormControlName; else reactiveForm\">\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"true\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [nasClass]=\"getClass('input')\"\n [(ngModel)]=\"model\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n <span [nasClass]=\"getClass('input-line')\"></span>\n </label>\n</ng-container>\n<ng-template #reactiveForm>\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\"\n [formGroup]=\"nasFormGroup\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [formControlName]=\"nasFormControlName\"\n [nasClass]=\"getClass('input')\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n <span [nasClass]=\"getClass('input-line')\"></span>\n </label>\n</ng-template>\n<div [id]=\"getResultsId()\"\n [nasClass]=\"getClass('results-wrapper')\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\">\n <ul #results\n role=\"listbox\"\n *ngIf=\"open\"\n [attr.aria-labelledby]=\"getLabelId()\"\n [nasClass]=\"getClass('results')\">\n <li role=\"option\"\n *ngFor=\"let item of filteredItems\"\n [id]=\"item.id\"\n [nasClass]=\"getClass('list-item', item.id === focused?.id && 'focus')\">\n <button type=\"button\"\n [nasClass]=\"getClass('item', item.id === focused?.id && 'focus')\"\n (click)=\"select(item)\"\n tabindex=\"-1\">\n <span [nasClass]=\"getClass('title')\">{{item.title}}</span>\n <span [nasClass]=\"getClass('preamble')\">{{item.preamble}}</span>\n </button>\n </li>\n </ul>\n</div>\n\n<nas-backdrop *ngIf=\"!exists(disableBackdrop)\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [(showBackdrop)]=\"showBackdrop\"></nas-backdrop>", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-autocomplete__wrapper{position:relative;display:block;z-index:3}.nas-autocomplete__label{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;font-size:14px;line-height:20px;display:block;position:relative;z-index:3;padding:9px 16px 0;background-color:#fff;margin-bottom:auto}.nas-autocomplete__input{height:35px;position:relative;z-index:3;line-height:1;margin:0}.nas-autocomplete__input[type=text]{padding:0 16px 9px}.nas-autocomplete__input:focus~.nas-autocomplete__input-line{border-color:#15273f}.nas-autocomplete__icon{position:absolute;z-index:4;right:24px;bottom:24px}.nas-autocomplete__input-line{display:block;position:relative;z-index:3;margin-top:3px;margin-bottom:-9px;border-top:3px solid #c3c3c3}.nas-autocomplete__results-wrapper{position:relative;z-index:4;perspective:1000px;margin-top:6px}.nas-autocomplete__results{position:absolute;z-index:3;width:100%;left:0;max-height:50vh;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;border:3px solid #15273f;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:results .65s ease both}.nas-autocomplete__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0b14202b;animation:backdrop .7s ease-out both}.nas-autocomplete__item{display:block;position:relative;z-index:2;width:100%;text-align:left;padding:12px;margin-top:-1px;outline:0}.nas-autocomplete__item--focus,.nas-autocomplete__item:hover,.nas-autocomplete__item:focus{background-color:#15273f}.nas-autocomplete__item--focus,.nas-autocomplete__item--focus .nas-autocomplete__title,.nas-autocomplete__item--focus .nas-autocomplete__preamble,.nas-autocomplete__item:hover,.nas-autocomplete__item:hover .nas-autocomplete__title,.nas-autocomplete__item:hover .nas-autocomplete__preamble,.nas-autocomplete__item:focus,.nas-autocomplete__item:focus .nas-autocomplete__title,.nas-autocomplete__item:focus .nas-autocomplete__preamble{color:#fff}.nas-autocomplete__title{display:inline-block;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;line-height:1;color:#15273f;margin-bottom:3px}.nas-autocomplete__preamble{display:block;font-size:14px}@keyframes results{0%{transform:rotateX(-90deg)}40%{transform:rotateX(20deg)}to{transform:rotateX(0)}}@keyframes backdrop{0%{opacity:0}}\n"] }]
|
|
13536
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
13537
|
+
type: Inject,
|
|
13538
|
+
args: [DOCUMENT]
|
|
13539
|
+
}] }]; }, propDecorators: { input: [{
|
|
13540
|
+
type: ViewChild,
|
|
13541
|
+
args: ['input']
|
|
13542
|
+
}], results: [{
|
|
13543
|
+
type: ViewChild,
|
|
13544
|
+
args: ['results']
|
|
13545
|
+
}], label: [{
|
|
13546
|
+
type: Input
|
|
13547
|
+
}], placeholder: [{
|
|
13548
|
+
type: Input
|
|
13549
|
+
}], icon: [{
|
|
13550
|
+
type: Input
|
|
13551
|
+
}], items: [{
|
|
13552
|
+
type: Input
|
|
13553
|
+
}], open: [{
|
|
13554
|
+
type: Input
|
|
13555
|
+
}], model: [{
|
|
13556
|
+
type: Input
|
|
13557
|
+
}], disableBackdrop: [{
|
|
13558
|
+
type: Input
|
|
13559
|
+
}], nasFormControlName: [{
|
|
13560
|
+
type: Input
|
|
13561
|
+
}], nasFormGroup: [{
|
|
13562
|
+
type: Input
|
|
13563
|
+
}], ariaLabelBackdrop: [{
|
|
13564
|
+
type: Input
|
|
13565
|
+
}], ariaLabelClear: [{
|
|
13566
|
+
type: Input
|
|
13567
|
+
}], focusOnNext: [{
|
|
13568
|
+
type: Output
|
|
13569
|
+
}], selectedChange: [{
|
|
13570
|
+
type: Output
|
|
13571
|
+
}], openChange: [{
|
|
13572
|
+
type: Output
|
|
13573
|
+
}], modelChange: [{
|
|
13574
|
+
type: Output
|
|
13575
|
+
}] } });
|
|
13576
|
+
|
|
13577
|
+
class AutocompleteModule {
|
|
13578
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
13579
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteModule, declarations: [AutocompleteComponent], imports: [CommonModule,
|
|
13580
|
+
NasClassModule,
|
|
13581
|
+
FormsModule,
|
|
13582
|
+
IconModule,
|
|
13583
|
+
SpinnerModule,
|
|
13584
|
+
BackdropModule,
|
|
13585
|
+
ReactiveFormsModule], exports: [AutocompleteComponent] }); }
|
|
13586
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteModule, imports: [CommonModule,
|
|
13587
|
+
NasClassModule,
|
|
13588
|
+
FormsModule,
|
|
13589
|
+
IconModule,
|
|
13590
|
+
SpinnerModule,
|
|
13591
|
+
BackdropModule,
|
|
13592
|
+
ReactiveFormsModule] }); }
|
|
13593
|
+
}
|
|
13594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteModule, decorators: [{
|
|
13595
|
+
type: NgModule,
|
|
13596
|
+
args: [{
|
|
13597
|
+
declarations: [AutocompleteComponent],
|
|
13598
|
+
imports: [
|
|
13599
|
+
CommonModule,
|
|
13600
|
+
NasClassModule,
|
|
13601
|
+
FormsModule,
|
|
13602
|
+
IconModule,
|
|
13603
|
+
SpinnerModule,
|
|
13604
|
+
BackdropModule,
|
|
13605
|
+
ReactiveFormsModule
|
|
11490
13606
|
],
|
|
11491
|
-
exports: [
|
|
13607
|
+
exports: [AutocompleteComponent]
|
|
11492
13608
|
}]
|
|
11493
13609
|
}] });
|
|
11494
13610
|
|
|
11495
13611
|
let nextId$6 = 0;
|
|
11496
13612
|
/**
|
|
11497
13613
|
* @description
|
|
11498
|
-
* Norwegian Airport Select Component |
|
|
13614
|
+
* Norwegian Airport Select Component | New design | Beta
|
|
11499
13615
|
*/
|
|
11500
|
-
class
|
|
13616
|
+
class AutocompleteNewComponent extends NasComponentBase {
|
|
11501
13617
|
get showBackdrop() {
|
|
11502
13618
|
return !this.exists(this.disableBackdrop) && this.open;
|
|
11503
13619
|
}
|
|
@@ -11556,7 +13672,7 @@ class AutocompleteComponent extends NasComponentBase {
|
|
|
11556
13672
|
this.modelChange.emit(model);
|
|
11557
13673
|
}
|
|
11558
13674
|
constructor(document) {
|
|
11559
|
-
super('nas-autocomplete');
|
|
13675
|
+
super('nas-autocomplete-new');
|
|
11560
13676
|
this.document = document;
|
|
11561
13677
|
this.filteredItems = this.items;
|
|
11562
13678
|
/**
|
|
@@ -11592,13 +13708,13 @@ class AutocompleteComponent extends NasComponentBase {
|
|
|
11592
13708
|
}
|
|
11593
13709
|
}
|
|
11594
13710
|
getResultsId() {
|
|
11595
|
-
return `nas-autocomplete-results-${this.componentId}`;
|
|
13711
|
+
return `nas-autocomplete-new-results-${this.componentId}`;
|
|
11596
13712
|
}
|
|
11597
13713
|
getLabelId() {
|
|
11598
|
-
return `nas-autocomplete-label-${this.componentId}`;
|
|
13714
|
+
return `nas-autocomplete-new-label-${this.componentId}`;
|
|
11599
13715
|
}
|
|
11600
13716
|
getInputId() {
|
|
11601
|
-
return `nas-autocomplete-input-${this.componentId}`;
|
|
13717
|
+
return `nas-autocomplete-new-input-${this.componentId}`;
|
|
11602
13718
|
}
|
|
11603
13719
|
setOpen() {
|
|
11604
13720
|
this.input.nativeElement.select();
|
|
@@ -11723,27 +13839,41 @@ class AutocompleteComponent extends NasComponentBase {
|
|
|
11723
13839
|
return;
|
|
11724
13840
|
}
|
|
11725
13841
|
const results = this.results.nativeElement;
|
|
11726
|
-
const focusedItem = this.document.querySelector('.nas-
|
|
13842
|
+
const focusedItem = this.document.querySelector('.nas-autocomplete-new__list-item--focus');
|
|
11727
13843
|
if (focusedItem) {
|
|
11728
13844
|
results.scrollTo(0, 0);
|
|
11729
13845
|
results.scrollTo(0, focusedItem.offsetTop + extraOffset - results.clientHeight);
|
|
11730
13846
|
}
|
|
11731
13847
|
}
|
|
11732
|
-
|
|
11733
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: AutocompleteComponent, selector: "nas-autocomplete", inputs: { label: "label", placeholder: "placeholder", icon: "icon", items: "items", open: "open", model: "model", disableBackdrop: "disableBackdrop", nasFormControlName: "nasFormControlName", nasFormGroup: "nasFormGroup", ariaLabelBackdrop: "ariaLabelBackdrop", ariaLabelClear: "ariaLabelClear" }, outputs: { focusOnNext: "focusOnNext", selectedChange: "selectedChange", openChange: "openChange", modelChange: "modelChange" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "results", first: true, predicate: ["results"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!nasFormControlName; else reactiveForm\">\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"true\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [nasClass]=\"getClass('input')\"\n [(ngModel)]=\"model\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n <span [nasClass]=\"getClass('input-line')\"></span>\n </label>\n</ng-container>\n<ng-template #reactiveForm>\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\"\n [formGroup]=\"nasFormGroup\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [formControlName]=\"nasFormControlName\"\n [nasClass]=\"getClass('input')\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n <span [nasClass]=\"getClass('input-line')\"></span>\n </label>\n</ng-template>\n<div [id]=\"getResultsId()\"\n [nasClass]=\"getClass('results-wrapper')\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\">\n <ul #results\n role=\"listbox\"\n *ngIf=\"open\"\n [attr.aria-labelledby]=\"getLabelId()\"\n [nasClass]=\"getClass('results')\">\n <li role=\"option\"\n *ngFor=\"let item of filteredItems\"\n [id]=\"item.id\"\n [nasClass]=\"getClass('list-item', item.id === focused?.id && 'focus')\">\n <button type=\"button\"\n [nasClass]=\"getClass('item', item.id === focused?.id && 'focus')\"\n (click)=\"select(item)\"\n tabindex=\"-1\">\n <span [nasClass]=\"getClass('title')\">{{item.title}}</span>\n <span [nasClass]=\"getClass('preamble')\">{{item.preamble}}</span>\n </button>\n </li>\n </ul>\n</div>\n\n<nas-backdrop *ngIf=\"!exists(disableBackdrop)\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [(showBackdrop)]=\"showBackdrop\"></nas-backdrop>", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-autocomplete__wrapper{position:relative;display:block;z-index:3}.nas-autocomplete__label{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;font-size:14px;line-height:20px;display:block;position:relative;z-index:3;padding:9px 16px 0;background-color:#fff;margin-bottom:auto}.nas-autocomplete__input{height:35px;position:relative;z-index:3;line-height:1;margin:0}.nas-autocomplete__input[type=text]{padding:0 16px 9px}.nas-autocomplete__input:focus~.nas-autocomplete__input-line{border-color:#15273f}.nas-autocomplete__icon{position:absolute;z-index:4;right:24px;bottom:24px}.nas-autocomplete__input-line{display:block;position:relative;z-index:3;margin-top:3px;margin-bottom:-9px;border-top:3px solid #c3c3c3}.nas-autocomplete__results-wrapper{position:relative;z-index:4;perspective:1000px;margin-top:6px}.nas-autocomplete__results{position:absolute;z-index:3;width:100%;left:0;max-height:50vh;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;border:3px solid #15273f;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:results .65s ease both}.nas-autocomplete__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0b14202b;animation:backdrop .7s ease-out both}.nas-autocomplete__item{display:block;position:relative;z-index:2;width:100%;text-align:left;padding:12px;margin-top:-1px;outline:0}.nas-autocomplete__item--focus,.nas-autocomplete__item:hover,.nas-autocomplete__item:focus{background-color:#15273f}.nas-autocomplete__item--focus,.nas-autocomplete__item--focus .nas-autocomplete__title,.nas-autocomplete__item--focus .nas-autocomplete__preamble,.nas-autocomplete__item:hover,.nas-autocomplete__item:hover .nas-autocomplete__title,.nas-autocomplete__item:hover .nas-autocomplete__preamble,.nas-autocomplete__item:focus,.nas-autocomplete__item:focus .nas-autocomplete__title,.nas-autocomplete__item:focus .nas-autocomplete__preamble{color:#fff}.nas-autocomplete__title{display:inline-block;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;line-height:1;color:#15273f;margin-bottom:3px}.nas-autocomplete__preamble{display:block;font-size:14px}@keyframes results{0%{transform:rotateX(-90deg)}40%{transform:rotateX(20deg)}to{transform:rotateX(0)}}@keyframes backdrop{0%{opacity:0}}\n"], dependencies: [{ 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: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "nas-icon", inputs: ["icon", "type", "isIndicator", "lightCircularBackground", "cssClass"] }, { kind: "component", type: BackdropComponent, selector: "nas-backdrop", inputs: ["showBackdrop", "ariaLabelBackdrop"], outputs: ["showBackdropChange"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
13848
|
+
onInput(event) {
|
|
13849
|
+
const inputElement = event.target;
|
|
13850
|
+
console.log('element', inputElement);
|
|
13851
|
+
if (this.label.length > 0) {
|
|
13852
|
+
this.input.nativeElement.style.borderColor = inputElement.value ? '#15273f' : '#6f6f6f';
|
|
13853
|
+
this.span.nativeElement.style.borderColor = inputElement.value ? '#15273f' : '#6f6f6f';
|
|
13854
|
+
}
|
|
13855
|
+
}
|
|
13856
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteNewComponent, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13857
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: AutocompleteNewComponent, selector: "nas-autocomplete-new", inputs: { label: "label", placeholder: "placeholder", icon: "icon", items: "items", open: "open", model: "model", disableBackdrop: "disableBackdrop", nasFormControlName: "nasFormControlName", nasFormGroup: "nasFormGroup", ariaLabelBackdrop: "ariaLabelBackdrop", ariaLabelClear: "ariaLabelClear" }, outputs: { focusOnNext: "focusOnNext", selectedChange: "selectedChange", openChange: "openChange", modelChange: "modelChange" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "span", first: true, predicate: ["span"], descendants: true }, { propertyName: "results", first: true, predicate: ["results"], descendants: true }, { propertyName: "labelElement", first: true, predicate: ["labelDOM"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!nasFormControlName; else reactiveForm\">\n <label [id]=\"getLabelId()\" (input)=\"onInput($event)\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\" #labelElement>\n <span [nasClass]=\"getClass('label')\" #span>{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"true\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [nasClass]=\"getClass('input')\"\n [(ngModel)]=\"model\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n </label>\n</ng-container>\n<ng-template #reactiveForm>\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\"\n [formGroup]=\"nasFormGroup\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [formControlName]=\"nasFormControlName\"\n [nasClass]=\"getClass('input')\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n </label>\n</ng-template>\n<div [id]=\"getResultsId()\"\n [nasClass]=\"getClass('results-wrapper')\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\">\n <ul #results\n role=\"listbox\"\n *ngIf=\"open\"\n [attr.aria-labelledby]=\"getLabelId()\"\n [nasClass]=\"getClass('results')\">\n <li role=\"option\"\n *ngFor=\"let item of filteredItems\"\n [id]=\"item.id\"\n [nasClass]=\"getClass('list-item', item.id === focused?.id && 'focus')\">\n <button type=\"button\"\n [nasClass]=\"getClass('item', item.id === focused?.id && 'focus')\"\n (click)=\"select(item)\"\n tabindex=\"-1\">\n <span [nasClass]=\"getClass('title')\">{{item.title}}</span>\n <span [nasClass]=\"getClass('preamble')\">{{item.preamble}}</span>\n </button>\n </li>\n </ul>\n</div>\n\n<nas-backdrop *ngIf=\"!exists(disableBackdrop)\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [(showBackdrop)]=\"showBackdrop\"></nas-backdrop>", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-autocomplete-new__wrapper{position:relative;display:block;z-index:3}.nas-autocomplete-new__label{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;font-size:14px;line-height:20px;display:block;position:relative;z-index:3;padding:9px 16px 0;background-color:#fff;margin-bottom:none;border:2px solid #6f6f6f;border-bottom:none}.nas-autocomplete-new__input{height:35px;position:relative;z-index:3;line-height:1;margin:0;border:2px solid #6f6f6f;border-top:none}.nas-autocomplete-new__icon{position:absolute;z-index:4;right:24px;bottom:24px}.nas-autocomplete-new__results-wrapper{position:relative;z-index:4;perspective:1000px}.nas-autocomplete-new__results{margin-top:-8px;position:absolute;z-index:3;width:100%;left:0;max-height:50vh;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;border:2px solid #15273f;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:results .65s ease both;scrollbar-width:none;-ms-overflow-style:none}.nas-autocomplete-new__results::-webkit-scrollbar{display:none}.nas-autocomplete-new__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0b14202b;animation:backdrop .7s ease-out both}.nas-autocomplete-new__item{display:block;position:relative;z-index:2;width:100%;text-align:left;padding:12px;margin-top:-1px;outline:0;border-bottom:2px solid #E9E7E4}.nas-autocomplete-new__item--focus,.nas-autocomplete-new__item:focus{background-color:#ebf4ff;border-bottom-color:#15273f;border-top:2px solid #15273f}.nas-autocomplete-new__item--focus,.nas-autocomplete-new__item--focus .nas-autocomplete-new__title,.nas-autocomplete-new__item--focus .nas-autocomplete-new__preamble,.nas-autocomplete-new__item:focus,.nas-autocomplete-new__item:focus .nas-autocomplete-new__title,.nas-autocomplete-new__item:focus .nas-autocomplete-new__preamble{color:#15273f}.nas-autocomplete-new__item:hover{background-color:#f8f8f8}.nas-autocomplete-new__title{display:inline-block;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;line-height:1;color:#15273f;margin-bottom:3px}.nas-autocomplete-new__preamble{display:block;font-size:14px}@keyframes results{0%{transform:rotateX(-90deg)}40%{transform:rotateX(20deg)}to{transform:rotateX(0)}}@keyframes backdrop{0%{opacity:0}}\n"], dependencies: [{ 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: NasClassDirective, selector: "[nasClass]", inputs: ["nasClass", "attr.class"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "nas-icon", inputs: ["icon", "type", "isIndicator", "lightCircularBackground", "cssClass"] }, { kind: "component", type: BackdropComponent, selector: "nas-backdrop", inputs: ["showBackdrop", "ariaLabelBackdrop"], outputs: ["showBackdropChange"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
11734
13858
|
}
|
|
11735
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
13859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteNewComponent, decorators: [{
|
|
11736
13860
|
type: Component,
|
|
11737
|
-
args: [{ selector: 'nas-autocomplete', template: "<ng-container *ngIf=\"!nasFormControlName; else reactiveForm\">\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"true\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [nasClass]=\"getClass('input')\"\n [(ngModel)]=\"model\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n
|
|
13861
|
+
args: [{ selector: 'nas-autocomplete-new', template: "<ng-container *ngIf=\"!nasFormControlName; else reactiveForm\">\n <label [id]=\"getLabelId()\" (input)=\"onInput($event)\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\" #labelElement>\n <span [nasClass]=\"getClass('label')\" #span>{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"true\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [nasClass]=\"getClass('input')\"\n [(ngModel)]=\"model\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n </label>\n</ng-container>\n<ng-template #reactiveForm>\n <label [id]=\"getLabelId()\"\n [attr.aria-label]=\"label\"\n [nasClass]=\"getClass('wrapper')\"\n [formGroup]=\"nasFormGroup\">\n <span [nasClass]=\"getClass('label')\">{{label}}</span>\n <input #input\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n [id]=\"getInputId()\"\n [attr.aria-controls]=\"getResultsId()\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\"\n [attr.aria-owns]=\"getResultsId()\"\n [formControlName]=\"nasFormControlName\"\n [nasClass]=\"getClass('input')\"\n [placeholder]=\"placeholder\"\n (focus)=\"setOpen()\"\n (input)=\"filter()\"\n (click)=\"setOpen()\"\n (keydown)=\"onKeyDown($event)\" />\n <span [nasClass]=\"getClass('icon')\">\n <button type=\"button\"\n role=\"button\"\n tabindex=\"-1\"\n *ngIf=\"model; else isEmpty\"\n [attr.aria-label]=\"ariaLabelClear\"\n (click)=\"clearSelected($event)\">\n <nas-icon [type]=\"'remove'\"></nas-icon>\n </button>\n <ng-template #isEmpty>\n <nas-icon [type]=\"'small'\"\n [icon]=\"icon\"></nas-icon>\n </ng-template>\n </span>\n </label>\n</ng-template>\n<div [id]=\"getResultsId()\"\n [nasClass]=\"getClass('results-wrapper')\"\n [attr.aria-expanded]=\"open ? 'true' : 'false'\">\n <ul #results\n role=\"listbox\"\n *ngIf=\"open\"\n [attr.aria-labelledby]=\"getLabelId()\"\n [nasClass]=\"getClass('results')\">\n <li role=\"option\"\n *ngFor=\"let item of filteredItems\"\n [id]=\"item.id\"\n [nasClass]=\"getClass('list-item', item.id === focused?.id && 'focus')\">\n <button type=\"button\"\n [nasClass]=\"getClass('item', item.id === focused?.id && 'focus')\"\n (click)=\"select(item)\"\n tabindex=\"-1\">\n <span [nasClass]=\"getClass('title')\">{{item.title}}</span>\n <span [nasClass]=\"getClass('preamble')\">{{item.preamble}}</span>\n </button>\n </li>\n </ul>\n</div>\n\n<nas-backdrop *ngIf=\"!exists(disableBackdrop)\"\n [ariaLabelBackdrop]=\"ariaLabelBackdrop\"\n [(showBackdrop)]=\"showBackdrop\"></nas-backdrop>", styles: ["@keyframes fade-in{0%{opacity:0}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-out{to{opacity:0}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}.nas-autocomplete-new__wrapper{position:relative;display:block;z-index:3}.nas-autocomplete-new__label{font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;font-size:14px;line-height:20px;display:block;position:relative;z-index:3;padding:9px 16px 0;background-color:#fff;margin-bottom:none;border:2px solid #6f6f6f;border-bottom:none}.nas-autocomplete-new__input{height:35px;position:relative;z-index:3;line-height:1;margin:0;border:2px solid #6f6f6f;border-top:none}.nas-autocomplete-new__icon{position:absolute;z-index:4;right:24px;bottom:24px}.nas-autocomplete-new__results-wrapper{position:relative;z-index:4;perspective:1000px}.nas-autocomplete-new__results{margin-top:-8px;position:absolute;z-index:3;width:100%;left:0;max-height:50vh;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;border:2px solid #15273f;background-color:#fff;transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:results .65s ease both;scrollbar-width:none;-ms-overflow-style:none}.nas-autocomplete-new__results::-webkit-scrollbar{display:none}.nas-autocomplete-new__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0b14202b;animation:backdrop .7s ease-out both}.nas-autocomplete-new__item{display:block;position:relative;z-index:2;width:100%;text-align:left;padding:12px;margin-top:-1px;outline:0;border-bottom:2px solid #E9E7E4}.nas-autocomplete-new__item--focus,.nas-autocomplete-new__item:focus{background-color:#ebf4ff;border-bottom-color:#15273f;border-top:2px solid #15273f}.nas-autocomplete-new__item--focus,.nas-autocomplete-new__item--focus .nas-autocomplete-new__title,.nas-autocomplete-new__item--focus .nas-autocomplete-new__preamble,.nas-autocomplete-new__item:focus,.nas-autocomplete-new__item:focus .nas-autocomplete-new__title,.nas-autocomplete-new__item:focus .nas-autocomplete-new__preamble{color:#15273f}.nas-autocomplete-new__item:hover{background-color:#f8f8f8}.nas-autocomplete-new__title{display:inline-block;font-family:Apercu,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;line-height:1;color:#15273f;margin-bottom:3px}.nas-autocomplete-new__preamble{display:block;font-size:14px}@keyframes results{0%{transform:rotateX(-90deg)}40%{transform:rotateX(20deg)}to{transform:rotateX(0)}}@keyframes backdrop{0%{opacity:0}}\n"] }]
|
|
11738
13862
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
11739
13863
|
type: Inject,
|
|
11740
13864
|
args: [DOCUMENT]
|
|
11741
13865
|
}] }]; }, propDecorators: { input: [{
|
|
11742
13866
|
type: ViewChild,
|
|
11743
13867
|
args: ['input']
|
|
13868
|
+
}], span: [{
|
|
13869
|
+
type: ViewChild,
|
|
13870
|
+
args: ['span']
|
|
11744
13871
|
}], results: [{
|
|
11745
13872
|
type: ViewChild,
|
|
11746
13873
|
args: ['results']
|
|
13874
|
+
}], labelElement: [{
|
|
13875
|
+
type: ViewChild,
|
|
13876
|
+
args: ['labelDOM']
|
|
11747
13877
|
}], label: [{
|
|
11748
13878
|
type: Input
|
|
11749
13879
|
}], placeholder: [{
|
|
@@ -11776,16 +13906,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
11776
13906
|
type: Output
|
|
11777
13907
|
}] } });
|
|
11778
13908
|
|
|
11779
|
-
class
|
|
11780
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
11781
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type:
|
|
13909
|
+
class AutocompleteNewModule {
|
|
13910
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteNewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
13911
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteNewModule, declarations: [AutocompleteNewComponent], imports: [CommonModule,
|
|
11782
13912
|
NasClassModule,
|
|
11783
13913
|
FormsModule,
|
|
11784
13914
|
IconModule,
|
|
11785
13915
|
SpinnerModule,
|
|
11786
13916
|
BackdropModule,
|
|
11787
|
-
ReactiveFormsModule], exports: [
|
|
11788
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
13917
|
+
ReactiveFormsModule], exports: [AutocompleteNewComponent] }); }
|
|
13918
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteNewModule, imports: [CommonModule,
|
|
11789
13919
|
NasClassModule,
|
|
11790
13920
|
FormsModule,
|
|
11791
13921
|
IconModule,
|
|
@@ -11793,10 +13923,10 @@ class AutocompleteModule {
|
|
|
11793
13923
|
BackdropModule,
|
|
11794
13924
|
ReactiveFormsModule] }); }
|
|
11795
13925
|
}
|
|
11796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
13926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AutocompleteNewModule, decorators: [{
|
|
11797
13927
|
type: NgModule,
|
|
11798
13928
|
args: [{
|
|
11799
|
-
declarations: [
|
|
13929
|
+
declarations: [AutocompleteNewComponent],
|
|
11800
13930
|
imports: [
|
|
11801
13931
|
CommonModule,
|
|
11802
13932
|
NasClassModule,
|
|
@@ -11806,7 +13936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
11806
13936
|
BackdropModule,
|
|
11807
13937
|
ReactiveFormsModule
|
|
11808
13938
|
],
|
|
11809
|
-
exports: [
|
|
13939
|
+
exports: [AutocompleteNewComponent]
|
|
11810
13940
|
}]
|
|
11811
13941
|
}] });
|
|
11812
13942
|
|
|
@@ -14096,5 +16226,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
14096
16226
|
* Generated bundle index. Do not edit.
|
|
14097
16227
|
*/
|
|
14098
16228
|
|
|
14099
|
-
export { AbandonedBasketService, AccordionComponent, AccordionModule, AirportSelectComponent, AirportSelectModule, AlertComponent, AlertModule, AnimateHelper, AutocompleteComponent, AutocompleteModule, BackdropComponent, BackdropModule, BemHelper, BoxComponent, BoxModule, ButtonComponent, ButtonModule, ButtonNewComponent, ButtonNewModule, CalendarComponent, CampaignHeaderComponent, CampaignHeaderModule, CheckboxComponent, CheckboxModule, CheckboxNewComponent, CheckboxNewModule, ChipComponent, ChipModule, ColComponent, ColumnComponent, ColumnGroupComponent, ContainerComponent, ContainerModule, ContinueComponent, ContinueModule, CoverComponent, CoverModule, DateHelper, DatepickerComboComponent, DatepickerComboModule, DatepickerComponent, DatepickerModule, DeviceHelper, DividerComponent, DividerModule, DropdownComponent, DropdownModule, FilterComponent, FilterModule, GeolocationService, GetPositionService, GridComponent, GridModule, HamburgerComponent, IconComponent, IconListComponent, IconListModule, IconModule, InfoComponent, InfoModule, InputComponent, InputModule, InputTextComponent, InputTextModule, JourneyAvailabilityComponent, JourneyAvailabilityListComponent, JourneyAvailabilityListModule, JourneyAvailabilityModule, JourneyComponent, JourneyModule, JourneySelectionComponent, JourneySelectionModule, JourneyStopoverComponent, JourneyStopoverModule, LanguageHelper, ListComponent, ListItemComponent, ListModule, MicroButtonComponent, MicroButtonModule, ModalComponent, ModalModule, NasClassDirective, NasClassModule, NasComponentBase, NumberFieldComponent, NumberFieldModule, NumberFieldNewComponent, NumberFieldNewModule, OldHamburgerComponent, OldSearchComponent, OptgroupComponent, OptionComponent, PageFooterComponent, PageFooterModule, PageHeaderComponent, PageHeaderModule, PageHeaderOldComponent, PageHeaderOldModule, PassengerSelectComponent, PassengerSelectModule, PassengerType, PhoneNumberComponent, PhoneNumberModule, PremiumToggleComponent, PremiumToggleModule, RadioComponent, RadioModule, RadioNewComponent, RadioNewModule, SearchComponent, SelectComponent, SelectModule, SimpleListComponent, SimpleListModule, SlideToggleComponent, SlideToggleModule, SlideToggleNewComponent, SlideToggleNewModule, SliderComponent, SliderModule, SortComponent, SortModule, SortService, SpinnerComponent, SpinnerModule, StatusBoxComponent, StatusBoxModule, SubsidyDiscountComponent, SubsidyDiscountModule, SuggestionsComponent, SuggestionsModule, TabComponent, TabGroupComponent, TabGroupModule, TableBodyComponent, TableComponent, TableDataComponent, TableFootComponent, TableHeadComponent, TableHeaderComponent, TableModule, TableRowComponent, TagComponent, TagModule, TextareaComponent, TextareaModule, ToggleComponent, ToggleModule, TripSummaryComponent, TripSummaryModule, TripType, UtcDate, ViewPortService, WeatherIconComponent, WeatherIconModule };
|
|
16229
|
+
export { AbandonedBasketService, AccordionComponent, AccordionModule, AirportSelectComponent, AirportSelectModule, AlertComponent, AlertModule, AnimateHelper, AutocompleteComponent, AutocompleteModule, AutocompleteNewComponent, AutocompleteNewModule, BackdropComponent, BackdropModule, BemHelper, BoxComponent, BoxModule, ButtonComponent, ButtonModule, ButtonNewComponent, ButtonNewModule, CalendarComponent, CalendarNewComponent, CampaignHeaderComponent, CampaignHeaderModule, CheckboxComponent, CheckboxModule, CheckboxNewComponent, CheckboxNewModule, ChipComponent, ChipModule, ColComponent, ColumnComponent, ColumnGroupComponent, ContainerComponent, ContainerModule, ContinueComponent, ContinueModule, CoverComponent, CoverModule, DateHelper, DatepickerComboComponent, DatepickerComboModule, DatepickerComboNewComponent, DatepickerComboNewModule, DatepickerComponent, DatepickerModule, DatepickerNewComponent, DatepickerNewModule, DeviceHelper, DividerComponent, DividerModule, DropdownComponent, DropdownModule, FilterComponent, FilterModule, GeolocationService, GetPositionService, GridComponent, GridModule, HamburgerComponent, IconComponent, IconListComponent, IconListModule, IconModule, InfoComponent, InfoModule, InputComponent, InputModule, InputTextComponent, InputTextModule, JourneyAvailabilityComponent, JourneyAvailabilityListComponent, JourneyAvailabilityListModule, JourneyAvailabilityModule, JourneyComponent, JourneyModule, JourneySelectionComponent, JourneySelectionModule, JourneyStopoverComponent, JourneyStopoverModule, LanguageHelper, ListComponent, ListItemComponent, ListModule, MicroButtonComponent, MicroButtonModule, ModalComponent, ModalModule, NasClassDirective, NasClassModule, NasComponentBase, NumberFieldComponent, NumberFieldModule, NumberFieldNewComponent, NumberFieldNewModule, OldHamburgerComponent, OldSearchComponent, OptgroupComponent, OptionComponent, PageFooterComponent, PageFooterModule, PageHeaderComponent, PageHeaderModule, PageHeaderOldComponent, PageHeaderOldModule, PassengerSelectComponent, PassengerSelectModule, PassengerType, PhoneNumberComponent, PhoneNumberModule, PremiumToggleComponent, PremiumToggleModule, RadioComponent, RadioModule, RadioNewComponent, RadioNewModule, SearchComponent, SelectComponent, SelectModule, SimpleListComponent, SimpleListModule, SlideToggleComponent, SlideToggleModule, SlideToggleNewComponent, SlideToggleNewModule, SliderComponent, SliderModule, SortComponent, SortModule, SortService, SpinnerComponent, SpinnerModule, StatusBoxComponent, StatusBoxModule, SubsidyDiscountComponent, SubsidyDiscountModule, SuggestionsComponent, SuggestionsModule, TabComponent, TabGroupComponent, TabGroupModule, TableBodyComponent, TableComponent, TableDataComponent, TableFootComponent, TableHeadComponent, TableHeaderComponent, TableModule, TableRowComponent, TagComponent, TagModule, TextareaComponent, TextareaModule, ToggleComponent, ToggleModule, TripSummaryComponent, TripSummaryModule, TripType, UtcDate, ViewPortService, WeatherIconComponent, WeatherIconModule };
|
|
14100
16230
|
//# sourceMappingURL=norwegian-core-components.mjs.map
|