@norwegian/core-components 6.51.3 → 6.52.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.
Files changed (33) hide show
  1. package/assets/documentation/filter-new/filter-new.md +0 -0
  2. package/esm2022/lib/components/airport-select-new/airport-select-new.component.mjs +2 -2
  3. package/esm2022/lib/components/alert/alert.component.mjs +2 -2
  4. package/esm2022/lib/components/datepicker-combo-new/datepicker-combo-new.component.mjs +1 -1
  5. package/esm2022/lib/components/filter/index.mjs +1 -2
  6. package/esm2022/lib/components/filter-new/enums/trip-type.enum.mjs +8 -0
  7. package/esm2022/lib/components/filter-new/filter-new.component.mjs +1328 -0
  8. package/esm2022/lib/components/filter-new/filter-new.module.mjs +101 -0
  9. package/esm2022/lib/components/filter-new/index.mjs +4 -0
  10. package/esm2022/lib/components/index.mjs +3 -1
  11. package/esm2022/lib/components/number-field-new/number-field-new.component.mjs +3 -3
  12. package/esm2022/lib/components/passenger-select/index.mjs +1 -3
  13. package/esm2022/lib/components/passenger-select-new/enums/passenger-type.enum.mjs +9 -0
  14. package/esm2022/lib/components/passenger-select-new/index.mjs +5 -0
  15. package/esm2022/lib/components/passenger-select-new/models/passengers.model.mjs +2 -0
  16. package/esm2022/lib/components/passenger-select-new/passenger-select-new.component.mjs +417 -0
  17. package/esm2022/lib/components/passenger-select-new/passenger-select-new.module.mjs +28 -0
  18. package/fesm2022/norwegian-core-components.mjs +8664 -6835
  19. package/fesm2022/norwegian-core-components.mjs.map +1 -1
  20. package/lib/components/datepicker-combo-new/datepicker-combo-new.component.d.ts +2 -2
  21. package/lib/components/filter/index.d.ts +0 -1
  22. package/lib/components/filter-new/enums/trip-type.enum.d.ts +6 -0
  23. package/lib/components/filter-new/filter-new.component.d.ts +829 -0
  24. package/lib/components/filter-new/filter-new.module.d.ts +27 -0
  25. package/lib/components/filter-new/index.d.ts +3 -0
  26. package/lib/components/index.d.ts +2 -0
  27. package/lib/components/passenger-select/index.d.ts +0 -2
  28. package/lib/components/passenger-select-new/enums/passenger-type.enum.d.ts +7 -0
  29. package/lib/components/passenger-select-new/index.d.ts +4 -0
  30. package/lib/components/passenger-select-new/models/passengers.model.d.ts +10 -0
  31. package/lib/components/passenger-select-new/passenger-select-new.component.d.ts +141 -0
  32. package/lib/components/passenger-select-new/passenger-select-new.module.d.ts +10 -0
  33. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./filter-new.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../../core/directives/nas-class/nas-class.module";
5
+ import * as i4 from "../airport-select/airport-select.module";
6
+ import * as i5 from "../dropdown/dropdown.module";
7
+ import * as i6 from "../passenger-select/passenger-select.module";
8
+ import * as i7 from "../accordion/accordion.module";
9
+ import * as i8 from "../icon/icon.module";
10
+ import * as i9 from "../datepicker-combo/datepicker-combo.module";
11
+ import * as i10 from "../checkbox/checkbox.module";
12
+ import * as i11 from "@angular/forms";
13
+ import * as i12 from "../button/button.module";
14
+ import * as i13 from "../subsidy-discount/subsidy-discount.module";
15
+ import * as i14 from "../suggestions/suggestions.module";
16
+ import * as i15 from "../airport-select-new/airport-select-new.module";
17
+ import * as i16 from "../datepicker-combo-new/datepicker-combo-new.module";
18
+ import * as i17 from "../datepicker-new/datepicker-new.module";
19
+ import * as i18 from "../button-new/button-new.module";
20
+ import * as i19 from "../passenger-select-new/passenger-select-new.module";
21
+ import * as i20 from "../radio-new/radio-new.module";
22
+ import * as i21 from "../checkbox-new/checkbox-new.module";
23
+ export declare class FilterNewModule {
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterNewModule, never>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FilterNewModule, [typeof i1.FilterNewComponent], [typeof i2.CommonModule, typeof i3.NasClassModule, typeof i4.AirportSelectModule, typeof i5.DropdownModule, typeof i6.PassengerSelectModule, typeof i7.AccordionModule, typeof i8.IconModule, typeof i9.DatepickerComboModule, typeof i10.CheckboxModule, typeof i11.ReactiveFormsModule, typeof i12.ButtonModule, typeof i13.SubsidyDiscountModule, typeof i14.SuggestionsModule, typeof i15.AirportSelectNewModule, typeof i16.DatepickerComboNewModule, typeof i17.DatepickerNewModule, typeof i18.ButtonNewModule, typeof i19.PassengerSelectNewModule, typeof i20.RadioNewModule, typeof i21.CheckboxNewModule], [typeof i1.FilterNewComponent]>;
26
+ static ɵinj: i0.ɵɵInjectorDeclaration<FilterNewModule>;
27
+ }
@@ -0,0 +1,3 @@
1
+ export * from './enums/trip-type.enum';
2
+ export * from './filter-new.component';
3
+ export * from './filter-new.module';
@@ -9,6 +9,7 @@ export * from './continue/index';
9
9
  export * from './cover/index';
10
10
  export * from './dropdown/index';
11
11
  export * from './filter/index';
12
+ export * from './filter-new/index';
12
13
  export * from './sort/index';
13
14
  export * from './grid/index';
14
15
  export * from './icon/index';
@@ -22,6 +23,7 @@ export * from './page-footer/index';
22
23
  export * from './page-header/index';
23
24
  export * from './page-header-old/index';
24
25
  export * from './passenger-select/index';
26
+ export * from './passenger-select-new/index';
25
27
  export * from './premium-toggle/index';
26
28
  export * from './radio/index';
27
29
  export * from './select/index';
@@ -1,4 +1,2 @@
1
1
  export * from './passenger-select.component';
2
2
  export * from './passenger-select.module';
3
- export * from './enums/passenger-type.enum';
4
- export * from './models/passengers.model';
@@ -0,0 +1,7 @@
1
+ export declare enum PassengerType {
2
+ Adult = 0,
3
+ Child = 1,
4
+ Infant = 2,
5
+ Youth = 3,
6
+ YoungAdult = 4
7
+ }
@@ -0,0 +1,4 @@
1
+ export * from './passenger-select-new.component';
2
+ export * from './passenger-select-new.module';
3
+ export * from './enums/passenger-type.enum';
4
+ export * from './models/passengers.model';
@@ -0,0 +1,10 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ import { PassengerType } from '../enums/passenger-type.enum';
3
+ export interface PassengersModel {
4
+ label: string;
5
+ type: PassengerType;
6
+ count?: number;
7
+ formControlName?: string;
8
+ formGroup?: FormGroup;
9
+ disabled?: boolean;
10
+ }
@@ -0,0 +1,141 @@
1
+ /**
2
+ * @license
3
+ * Copyright Norwegian Air Shuttle. All Rights Reserved.
4
+ */
5
+ import { EventEmitter, OnInit, QueryList } from '@angular/core';
6
+ import { FormGroup } from '@angular/forms';
7
+ import { PassengerType } from './enums/passenger-type.enum';
8
+ import { PassengersModel } from './models/passengers.model';
9
+ import { NasComponentBase } from '../../core/base/nas-component.base';
10
+ import { NumberFieldNewComponent } from '../number-field-new';
11
+ import * as i0 from "@angular/core";
12
+ /**
13
+ * @description
14
+ * Norwegian Passenger Select Component | New design | Beta
15
+ */
16
+ export declare class PassengerSelectNewComponent extends NasComponentBase implements OnInit {
17
+ numberFields: QueryList<NumberFieldNewComponent>;
18
+ totalCount: number;
19
+ isGroupBooking: boolean;
20
+ /**
21
+ * @property Input
22
+ * @description
23
+ * An array of different passenger types that will be displayed.
24
+ */
25
+ passengers: PassengersModel[];
26
+ /**
27
+ * @property Input
28
+ * @description
29
+ * The total maximum amount of passengers.
30
+ */
31
+ maxPaxCount: number;
32
+ /**
33
+ * @property Input
34
+ * @description
35
+ * The minimum amount of adults that can be selected.
36
+ */
37
+ minAdultCount: number;
38
+ /**
39
+ * @property Input
40
+ * @description
41
+ * The limit for when the total amount of passengers exceeds to be a group booking.
42
+ */
43
+ groupBookingLimit: number;
44
+ /**
45
+ * @property Input
46
+ * @description
47
+ * A title that will be added to the dropdown.
48
+ */
49
+ title: string;
50
+ /**
51
+ * @property Input
52
+ * @description
53
+ * A label for the adults passenger type.
54
+ */
55
+ adultsLabel: string;
56
+ /**
57
+ * @property Input
58
+ * @description
59
+ * A label for the children passenger type.
60
+ */
61
+ childrenLabel: string;
62
+ /**
63
+ * @description
64
+ * A label for the infants passenger type.
65
+ */
66
+ infantsLabel: string;
67
+ /**
68
+ * @property Input
69
+ * @description
70
+ * A label for the adults passenger type.
71
+ */
72
+ youthsLabel: string;
73
+ /**
74
+ * @property Input
75
+ * @description
76
+ * A label for the adults passenger type.
77
+ */
78
+ youngAdultsLabel: string;
79
+ /**
80
+ * @property Input
81
+ * @description
82
+ * A label that will appear when total number of selected passengers exceeds the group booking limit
83
+ */
84
+ groupBookingLabel: string;
85
+ /**
86
+ * @property Input
87
+ * @description
88
+ * Adds the parent's form group.
89
+ * It requires that the consumer included ReactiveFormsModule in it's module.
90
+ * It is requiered to be filled if nasFormControlName added.
91
+ */
92
+ nasFormGroup: FormGroup;
93
+ /**
94
+ * @property Input
95
+ * @description
96
+ * Sets a formControlName directive to the input.
97
+ * It requires that the consumer included ReactiveFormsModule in it's module.
98
+ * It requiers that the nasFormGroup input is filled.
99
+ */
100
+ nasFormControlGroupBooking: string;
101
+ /**
102
+ * @property Input
103
+ * @description
104
+ * ARIA label for the subtract buttons.
105
+ */
106
+ ariaLabelSubtract: string;
107
+ /**
108
+ * @property Input
109
+ * @description
110
+ * ARIA label for the add buttons.
111
+ */
112
+ ariaLabelAdd: string;
113
+ /**
114
+ * @property Output
115
+ * @description
116
+ * An event that is fired every time a passenger selection change is performed.
117
+ */
118
+ passengersChange: EventEmitter<PassengersModel[]>;
119
+ /**
120
+ * @property Output
121
+ * @description
122
+ * An event that is fired every time a passenger selection change is performed.
123
+ */
124
+ focusOnNext: EventEmitter<any>;
125
+ /**
126
+ * @property Output
127
+ * @description
128
+ * An event that is fired every time a passenger selection change is performed.
129
+ */
130
+ focusOnPrevious: EventEmitter<any>;
131
+ constructor();
132
+ ngOnInit(): void;
133
+ getLabel(type: PassengerType): string;
134
+ keyDown(event: KeyboardEvent, index: number): void;
135
+ setPassengersCount(passengers: PassengersModel, count: number): void;
136
+ getMax(passengers: PassengersModel): number;
137
+ getMin(passengers: PassengersModel): number;
138
+ private setTotalCount;
139
+ static ɵfac: i0.ɵɵFactoryDeclaration<PassengerSelectNewComponent, never>;
140
+ static ɵcmp: i0.ɵɵComponentDeclaration<PassengerSelectNewComponent, "nas-passenger-select-new", never, { "passengers": { "alias": "passengers"; "required": false; }; "maxPaxCount": { "alias": "maxPaxCount"; "required": false; }; "minAdultCount": { "alias": "minAdultCount"; "required": false; }; "groupBookingLimit": { "alias": "groupBookingLimit"; "required": false; }; "title": { "alias": "title"; "required": false; }; "adultsLabel": { "alias": "adultsLabel"; "required": false; }; "childrenLabel": { "alias": "childrenLabel"; "required": false; }; "infantsLabel": { "alias": "infantsLabel"; "required": false; }; "youthsLabel": { "alias": "youthsLabel"; "required": false; }; "youngAdultsLabel": { "alias": "youngAdultsLabel"; "required": false; }; "groupBookingLabel": { "alias": "groupBookingLabel"; "required": false; }; "nasFormGroup": { "alias": "nasFormGroup"; "required": false; }; "nasFormControlGroupBooking": { "alias": "nasFormControlGroupBooking"; "required": false; }; "ariaLabelSubtract": { "alias": "ariaLabelSubtract"; "required": false; }; "ariaLabelAdd": { "alias": "ariaLabelAdd"; "required": false; }; }, { "passengersChange": "passengersChange"; "focusOnNext": "focusOnNext"; "focusOnPrevious": "focusOnPrevious"; }, never, never, false, never>;
141
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./passenger-select-new.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../number-field-new/number-field-new.module";
5
+ import * as i4 from "../../core/directives/nas-class/nas-class.module";
6
+ export declare class PassengerSelectNewModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<PassengerSelectNewModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PassengerSelectNewModule, [typeof i1.PassengerSelectNewComponent], [typeof i2.CommonModule, typeof i3.NumberFieldNewModule, typeof i4.NasClassModule], [typeof i1.PassengerSelectNewComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<PassengerSelectNewModule>;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norwegian/core-components",
3
- "version": "6.51.3",
3
+ "version": "6.52.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=16.0.0 < 19.0.0",
6
6
  "@angular/core": ">=16.0.0 < 19.0.0"