@sebgroup/green-angular 1.0.0-beta.3 → 1.0.0-beta.35

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 (39) hide show
  1. package/esm2020/index.mjs +7 -5
  2. package/esm2020/lib/badge/badge.component.mjs +78 -0
  3. package/esm2020/lib/badge/badge.module.mjs +18 -0
  4. package/esm2020/lib/datepicker/datepicker.component.mjs +186 -0
  5. package/esm2020/lib/datepicker/datepicker.module.mjs +19 -0
  6. package/esm2020/lib/dropdown/dropdown-option.directive.mjs +16 -0
  7. package/esm2020/lib/dropdown/dropdown.component.mjs +136 -80
  8. package/esm2020/lib/dropdown/dropdown.module.mjs +8 -31
  9. package/esm2020/lib/green-angular.module.mjs +7 -6
  10. package/esm2020/lib/modal/index.mjs +3 -0
  11. package/esm2020/lib/modal/modal.component.mjs +152 -0
  12. package/esm2020/lib/modal/modal.module.mjs +30 -0
  13. package/esm2020/lib/segmented-control/segmented-control.component.mjs +3 -3
  14. package/esm2020/lib/segmented-control/segmented-control.module.mjs +4 -4
  15. package/fesm2015/sebgroup-green-angular.mjs +605 -479
  16. package/fesm2015/sebgroup-green-angular.mjs.map +1 -1
  17. package/fesm2020/sebgroup-green-angular.mjs +595 -468
  18. package/fesm2020/sebgroup-green-angular.mjs.map +1 -1
  19. package/index.d.ts +6 -4
  20. package/lib/badge/badge.component.d.ts +25 -0
  21. package/lib/badge/badge.module.d.ts +8 -0
  22. package/lib/datepicker/datepicker.component.d.ts +49 -0
  23. package/lib/datepicker/datepicker.module.d.ts +9 -0
  24. package/lib/dropdown/dropdown-option.directive.d.ts +8 -0
  25. package/lib/dropdown/dropdown.component.d.ts +51 -15
  26. package/lib/dropdown/dropdown.module.d.ts +4 -7
  27. package/lib/green-angular.module.d.ts +2 -1
  28. package/lib/modal/index.d.ts +2 -0
  29. package/lib/modal/modal.component.d.ts +50 -0
  30. package/lib/modal/modal.module.d.ts +8 -0
  31. package/package.json +10 -11
  32. package/esm2020/lib/dropdown/popover-element.directive.mjs +0 -218
  33. package/esm2020/lib/dropdown/popover-option.directive.mjs +0 -58
  34. package/esm2020/lib/dropdown/popover-trigger.directive.mjs +0 -80
  35. package/esm2020/lib/dropdown/popover.directive.mjs +0 -46
  36. package/lib/dropdown/popover-element.directive.d.ts +0 -36
  37. package/lib/dropdown/popover-option.directive.d.ts +0 -20
  38. package/lib/dropdown/popover-trigger.directive.d.ts +0 -19
  39. package/lib/dropdown/popover.directive.d.ts +0 -24
@@ -1,19 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, NgModule, Directive, forwardRef, Inject, HostBinding, HostListener, EventEmitter, Output, ContentChildren } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, NgModule, Directive, EventEmitter, Output, ViewChild, ContentChild, HostBinding } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/router';
6
6
  import { RouterModule } from '@angular/router';
7
7
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
- import { BehaviorSubject, Subject, merge, fromEvent, EMPTY } from 'rxjs';
9
- import { tap, takeUntil, skip, switchMap, filter } from 'rxjs/operators';
10
- import { createPopper } from '@popperjs/core';
11
- import { enableBodyScroll, disableBodyScroll } from 'body-scroll-lock';
8
+ import { dropdownValues, createDropdown, randomId, months, years, createDatepicker } from '@sebgroup/extract';
9
+ import { startOfDay, endOfDay } from 'date-fns';
10
+ import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
12
11
 
13
12
  class NggSegmentedControlComponent {
14
13
  }
15
- NggSegmentedControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggSegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16
- NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: NggSegmentedControlComponent, selector: "ngg-segmented-control", inputs: { $controls: "$controls" }, ngImport: i0, template: `
14
+ NggSegmentedControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
+ NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggSegmentedControlComponent, selector: "ngg-segmented-control", inputs: { $controls: "$controls" }, ngImport: i0, template: `
17
16
  <div class="group">
18
17
  <a
19
18
  *ngFor="let control of $controls | async"
@@ -24,7 +23,7 @@ NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
24
23
  >
25
24
  </div>
26
25
  `, isInline: true, directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], pipes: { "async": i1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggSegmentedControlComponent, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlComponent, decorators: [{
28
27
  type: Component,
29
28
  args: [{
30
29
  selector: 'ngg-segmented-control',
@@ -48,10 +47,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImpor
48
47
 
49
48
  class NggSegmentedControlModule {
50
49
  }
51
- NggSegmentedControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggSegmentedControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
52
- NggSegmentedControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggSegmentedControlModule, declarations: [NggSegmentedControlComponent], imports: [RouterModule, CommonModule], exports: [NggSegmentedControlComponent] });
53
- NggSegmentedControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggSegmentedControlModule, imports: [[RouterModule, CommonModule]] });
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggSegmentedControlModule, decorators: [{
50
+ NggSegmentedControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
51
+ NggSegmentedControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlModule, declarations: [NggSegmentedControlComponent], imports: [RouterModule, CommonModule], exports: [NggSegmentedControlComponent] });
52
+ NggSegmentedControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlModule, imports: [[RouterModule, CommonModule]] });
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlModule, decorators: [{
55
54
  type: NgModule,
56
55
  args: [{
57
56
  declarations: [NggSegmentedControlComponent],
@@ -60,417 +59,266 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImpor
60
59
  }]
61
60
  }] });
62
61
 
63
- class NggPopoverDirective {
64
- constructor() {
65
- this._config = {
66
- usePopper: true,
67
- container: '',
68
- useBodyScrollLock: true,
69
- };
70
- this.state = {
71
- $isOpen: new BehaviorSubject(false),
72
- };
73
- }
74
- get config() {
75
- return this._config;
76
- }
77
- set config(config) {
78
- this._config = Object.assign(Object.assign({}, this.config), config);
79
- }
80
- close() {
81
- this.state.$isOpen.next(false);
82
- }
83
- open() {
84
- this.state.$isOpen.next(true);
85
- }
86
- toggle() {
87
- if (this.state.$isOpen.value) {
88
- this.close();
89
- }
90
- else {
91
- this.open();
92
- }
62
+ class NggDropdownOptionDirective {
63
+ constructor(templateRef) {
64
+ this.templateRef = templateRef;
93
65
  }
94
66
  }
95
- NggPopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
96
- NggPopoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.2", type: NggPopoverDirective, selector: "[nggPopover]", inputs: { config: "config" }, ngImport: i0 });
97
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggPopoverDirective, decorators: [{
67
+ NggDropdownOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownOptionDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
68
+ NggDropdownOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.3", type: NggDropdownOptionDirective, selector: "[nggDropdownOption]", ngImport: i0 });
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownOptionDirective, decorators: [{
98
70
  type: Directive,
99
71
  args: [{
100
- selector: '[nggPopover]',
72
+ selector: '[nggDropdownOption]',
101
73
  }]
102
- }], propDecorators: { config: [{
103
- type: Input
104
- }] } });
74
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
105
75
 
106
- class NggPopoverTriggerDirective {
107
- constructor(popover, _elRef) {
108
- this.popover = popover;
109
- this._elRef = _elRef;
110
- this.$unsubscribe = new Subject();
111
- this.class = 'dropdown-toggle';
112
- this.haspopup = 'listbox';
113
- this.owns = null;
114
- this.expanded = this.popover.state.$isOpen.value;
115
- this.toggle = (event) => {
116
- if ('key' in event && event.key === 'ArrowDown') {
117
- // open popover on arrow down by not stopping event propagation
118
- if (this.popover.state.$isOpen.value) {
119
- return;
120
- }
121
- else {
122
- // prevent container from scrolling
123
- event.preventDefault();
124
- }
125
- }
126
- event.stopPropagation();
127
- this.popover.toggle();
76
+ class NggDropdownComponent {
77
+ constructor(cd) {
78
+ var _a, _b, _c;
79
+ this.cd = cd;
80
+ this.loop = false;
81
+ this.options = [];
82
+ this._multiSelect = false;
83
+ this._searchable = false;
84
+ this.valueChange = new EventEmitter();
85
+ this.touched = new EventEmitter();
86
+ this.toggler = (_a = dropdownValues.elements) === null || _a === void 0 ? void 0 : _a.toggler;
87
+ this.listbox = (_b = dropdownValues.elements) === null || _b === void 0 ? void 0 : _b.listbox;
88
+ this.fieldset = (_c = dropdownValues.elements) === null || _c === void 0 ? void 0 : _c.fieldset;
89
+ this.trackByKey = (index, option) => {
90
+ var _a;
91
+ return (_a = option.attributes.id) !== null && _a !== void 0 ? _a : '';
128
92
  };
129
93
  }
130
- ngOnInit() {
131
- // if trigger element does not have an id...
132
- if (!this._elRef.nativeElement.id) {
133
- // ...add a unique id
134
- this._elRef.nativeElement.id = `ngg_dropdownTrigger_${new Date().getTime()}`;
135
- this.owns = this._elRef.nativeElement.id.replace(/dropdownTrigger/, 'popover');
136
- }
137
- else {
138
- this.owns = this._elRef.nativeElement.id + '_popover';
139
- }
140
- this.popover.triggerElement = this._elRef;
141
- this.popover.state.$isOpen
142
- .pipe(tap((isOpen) => (this.expanded = isOpen)), takeUntil(this.$unsubscribe))
143
- .subscribe();
94
+ set multiSelect(value) {
95
+ this._multiSelect = this.convertToBoolean(value);
144
96
  }
145
- ngOnDestroy() {
146
- this.$unsubscribe.next();
147
- this.$unsubscribe.complete();
97
+ get multiSelect() {
98
+ return this._multiSelect;
148
99
  }
149
- }
150
- NggPopoverTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggPopoverTriggerDirective, deps: [{ token: forwardRef(() => NggPopoverDirective) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
151
- NggPopoverTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.2", type: NggPopoverTriggerDirective, selector: "[nggPopoverTrigger]", host: { listeners: { "keydown.arrowdown": "toggle($event)", "click": "toggle($event)" }, properties: { "class": "this.class", "attr.aria-haspopup": "this.haspopup", "attr.aria-owns": "this.owns", "attr.aria-expanded": "this.expanded" } }, ngImport: i0 });
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggPopoverTriggerDirective, decorators: [{
153
- type: Directive,
154
- args: [{
155
- selector: '[nggPopoverTrigger]',
156
- }]
157
- }], ctorParameters: function () {
158
- return [{ type: NggPopoverDirective, decorators: [{
159
- type: Inject,
160
- args: [forwardRef(() => NggPopoverDirective)]
161
- }] }, { type: i0.ElementRef }];
162
- }, propDecorators: { class: [{
163
- type: HostBinding,
164
- args: ['class']
165
- }], haspopup: [{
166
- type: HostBinding,
167
- args: ['attr.aria-haspopup']
168
- }], owns: [{
169
- type: HostBinding,
170
- args: ['attr.aria-owns']
171
- }], expanded: [{
172
- type: HostBinding,
173
- args: ['attr.aria-expanded']
174
- }], toggle: [{
175
- type: HostListener,
176
- args: ['keydown.arrowdown', ['$event']]
177
- }, {
178
- type: HostListener,
179
- args: ['click', ['$event']]
180
- }] } });
181
-
182
- class NggPopoverOptionDirective {
183
- constructor(popover, elRef) {
184
- this.popover = popover;
185
- this.elRef = elRef;
186
- this.selected = false;
187
- this.selectedChanged = new EventEmitter();
188
- this.role = 'option';
189
- this.id = '';
190
- this.clickHandler = (event) => {
191
- this.select(event);
192
- };
193
- this.select = (event) => {
194
- this.selectedChanged.emit(this.nggPopoverOption);
195
- };
100
+ set searchable(value) {
101
+ this._searchable = this.convertToBoolean(value);
196
102
  }
197
- get ariaSelected() {
198
- return this.selected || null;
103
+ get searchable() {
104
+ return this._searchable;
199
105
  }
200
- ngOnInit() {
106
+ set value(newValue) {
201
107
  var _a;
202
- this.id = `${(_a = this.popover.triggerElement) === null || _a === void 0 ? void 0 : _a.nativeElement.id}_dropdownOption_${this.index}`;
108
+ (_a = this.handler) === null || _a === void 0 ? void 0 : _a.selectByValue(newValue);
109
+ this._value = newValue;
203
110
  }
204
- }
205
- NggPopoverOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggPopoverOptionDirective, deps: [{ token: forwardRef(() => NggPopoverDirective) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
206
- NggPopoverOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.2", type: NggPopoverOptionDirective, selector: "[nggPopoverOption]", inputs: { nggPopoverOption: "nggPopoverOption", index: "index", selected: "selected" }, outputs: { selectedChanged: "selectedChanged" }, host: { listeners: { "click": "clickHandler()" }, properties: { "attr.role": "this.role", "attr.aria-selected": "this.ariaSelected", "attr.id": "this.id" } }, ngImport: i0 });
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggPopoverOptionDirective, decorators: [{
208
- type: Directive,
209
- args: [{
210
- selector: '[nggPopoverOption]',
211
- }]
212
- }], ctorParameters: function () {
213
- return [{ type: NggPopoverDirective, decorators: [{
214
- type: Inject,
215
- args: [forwardRef(() => NggPopoverDirective)]
216
- }] }, { type: i0.ElementRef }];
217
- }, propDecorators: { nggPopoverOption: [{
218
- type: Input
219
- }], index: [{
220
- type: Input
221
- }], selected: [{
222
- type: Input
223
- }], selectedChanged: [{
224
- type: Output
225
- }], role: [{
226
- type: HostBinding,
227
- args: ['attr.role']
228
- }], ariaSelected: [{
229
- type: HostBinding,
230
- args: ['attr.aria-selected']
231
- }], id: [{
232
- type: HostBinding,
233
- args: ['attr.id']
234
- }], clickHandler: [{
235
- type: HostListener,
236
- args: ['click']
237
- }] } });
238
-
239
- class NggPopoverElementDirective {
240
- constructor(popover, _elRef, _renderer, _cdr) {
241
- this.popover = popover;
242
- this._elRef = _elRef;
243
- this._renderer = _renderer;
244
- this._cdr = _cdr;
245
- this.$unsubscribe = new Subject();
246
- this.sm = window.innerWidth <= 576;
247
- this.class = true;
248
- this.role = 'listbox';
249
- this.id = null;
250
- this.show = this.popover.state.$isOpen.value;
251
- this.activeDescendant = null;
252
- }
253
- // TODO: refactor and move to general size/device service
254
- onResize(event) {
255
- // determine if small screen size i.e less than or equal to 576 pixels which is the breakpoint for small screens
256
- this.sm = event.target.innerWidth <= 576;
257
- if (this.sm) {
258
- // remove popper
259
- this.removePopper();
260
- }
261
- else if (!this._popper) {
262
- // add popper
263
- this.addPopper();
264
- }
111
+ get value() {
112
+ return this._value;
265
113
  }
266
- handleClickEvent(event) {
267
- // if click inside popover element...
268
- if (this._elRef.nativeElement.contains(event.target)) {
269
- this.popover.close();
270
- }
271
- else if (this.popover.state.$isOpen.value) {
272
- // else if click outside popover element...
273
- this.popover.close();
114
+ ngAfterViewInit() {
115
+ var _a, _b, _c;
116
+ if (((_a = this.togglerRef) === null || _a === void 0 ? void 0 : _a.nativeElement) && ((_b = this.listboxRef) === null || _b === void 0 ? void 0 : _b.nativeElement)) {
117
+ this.handler = createDropdown(this.props, this.togglerRef.nativeElement, this.listboxRef.nativeElement, (_c = this.fieldsetRef) === null || _c === void 0 ? void 0 : _c.nativeElement, (dropdown) => {
118
+ this.dropdown = dropdown;
119
+ this.toggler = dropdown.elements.toggler;
120
+ this.listbox = dropdown.elements.listbox;
121
+ this.fieldset = dropdown.elements.fieldset;
122
+ this.cd.detectChanges();
123
+ }, (value) => {
124
+ this.updateValue(value);
125
+ });
274
126
  }
275
127
  }
276
- handleKeydownEvent(event) {
277
- var _a, _b, _c, _d, _e, _f;
278
- if (event.key === 'Escape') {
279
- this.popover.close();
280
- return;
281
- }
282
- let next = 0; // Used for home key
283
- const currentSelection = ((_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => !!option.selected)) === null || _b === void 0 ? void 0 : _b.index) || 0;
284
- if (event.key === 'End') {
285
- // set next to last option
286
- next = (((_c = this.options) === null || _c === void 0 ? void 0 : _c.length) || 1) - 1;
287
- }
288
- else if (event.key === 'ArrowUp') {
289
- // next can't be less than zero
290
- next = Math.max(0, currentSelection - 1);
291
- // prevent container from scrolling
292
- event.preventDefault();
293
- }
294
- else if (event.key === 'ArrowDown') {
295
- // next can't be greater than number of options
296
- next = Math.min((((_d = this.options) === null || _d === void 0 ? void 0 : _d.length) || 1) - 1, currentSelection + 1);
297
- // prevent container from scrolling
298
- event.preventDefault();
128
+ ngOnDestroy() {
129
+ var _a;
130
+ (_a = this.handler) === null || _a === void 0 ? void 0 : _a.destroy();
131
+ }
132
+ ngOnChanges(changes) {
133
+ if (this.handler &&
134
+ (changes.id || changes.text || changes.loop || changes.options)) {
135
+ this.handler.update(this.props);
299
136
  }
300
- // select next option
301
- (_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.get(next)) === null || _f === void 0 ? void 0 : _f.select(event);
302
137
  }
303
- ngOnInit() {
304
- var _a, _b, _c;
305
- this.id = /^ngg_dropdownTrigger/.test((_a = this.popover.triggerElement) === null || _a === void 0 ? void 0 : _a.nativeElement.id)
306
- ? (_b = this.popover.triggerElement) === null || _b === void 0 ? void 0 : _b.nativeElement.id.replace(/dropdownTrigger/, 'popover')
307
- : ((_c = this.popover.triggerElement) === null || _c === void 0 ? void 0 : _c.nativeElement.id) + '_popover';
308
- this.popover.state.$isOpen
309
- .pipe(skip(1), // skip initial value
310
- tap((isOpen) => {
311
- var _a, _b;
312
- this.show = isOpen; // toggle visibility
313
- if (isOpen) {
314
- this.activeDescendant =
315
- ((_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => !!option.selected)) === null || _b === void 0 ? void 0 : _b.id) || null;
316
- // if use body scroll lock
317
- if (this.popover.config.useBodyScrollLock) {
318
- this.disableBodyScrollLock();
319
- }
320
- // if popover is configured to use a container...
321
- if (this.popover.config.container !== '') {
322
- // ...add container
323
- this.addContainer();
324
- }
325
- // if popover is configured to use popper.js...
326
- if (this.popover.config.usePopper) {
327
- this.addPopper();
328
- }
329
- }
330
- else {
331
- this.activeDescendant = null;
332
- if (this.popover.config.useBodyScrollLock) {
333
- this.enableBodyScrollLock();
334
- }
335
- this.removeContainer();
336
- this.removePopper();
337
- }
338
- }), switchMap((isOpen) => isOpen
339
- ? merge(
340
- // listen to click events
341
- fromEvent(document, 'click').pipe(tap((event) => this.handleClickEvent(event))),
342
- // listen to keydown events
343
- fromEvent(document, 'keydown').pipe(
344
- // filter keys
345
- filter((event) => ['ArrowDown', 'ArrowUp', 'Escape', 'Home', 'End'].indexOf(event.key) !== -1), tap((event) => this.handleKeydownEvent(event))))
346
- : EMPTY), takeUntil(this.$unsubscribe))
347
- .subscribe();
138
+ writeValue(value) {
139
+ this.value = value;
348
140
  }
349
- ngOnDestroy() {
350
- this.removePopper();
351
- // enable scroll if body scroll lock is used
352
- if (this.popover.config.useBodyScrollLock) {
353
- this.enableBodyScrollLock();
354
- }
355
- // remove container if declared
356
- if (this._container) {
357
- this.removeContainer();
358
- }
359
- this.$unsubscribe.next();
360
- this.$unsubscribe.complete();
141
+ registerOnChange(fn) {
142
+ this.onChangeFn = fn;
361
143
  }
362
- enableBodyScrollLock() {
363
- enableBodyScroll(this._elRef.nativeElement);
144
+ registerOnTouched(fn) {
145
+ this.onTouchedFn = fn;
364
146
  }
365
- disableBodyScrollLock() {
366
- disableBodyScroll(this._elRef.nativeElement);
147
+ search($event) {
148
+ var _a;
149
+ (_a = this.handler) === null || _a === void 0 ? void 0 : _a.search($event.target.value);
367
150
  }
368
- addPopper() {
369
- var _a, _b;
370
- if (this.sm) {
371
- return;
372
- }
373
- if (!this._popper) {
374
- // ...create popper instance for anchoring popover with trigger element
375
- this._popper = createPopper((_a = this.popover.triggerElement) === null || _a === void 0 ? void 0 : _a.nativeElement, this._elRef.nativeElement, {
376
- placement: 'bottom-start',
377
- modifiers: [
378
- {
379
- name: 'offset',
380
- options: {
381
- offset: [0, 4],
382
- },
383
- },
384
- ],
385
- });
386
- // detect changes once element and popper is initiated to update initial position
387
- this._cdr.detectChanges();
388
- }
389
- else {
390
- this._popper.state.elements.reference =
391
- (_b = this.popover.triggerElement) === null || _b === void 0 ? void 0 : _b.nativeElement;
392
- this._popper.update().then((_) => this._cdr.detectChanges());
393
- }
151
+ get props() {
152
+ var _a;
153
+ return {
154
+ id: this.id || ((_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.id),
155
+ texts: this.texts,
156
+ useValue: this.useValue,
157
+ display: this.display,
158
+ options: this.options,
159
+ loop: this.loop,
160
+ value: this.value,
161
+ multiSelect: this.multiSelect,
162
+ searchable: this.searchable,
163
+ searchFilter: this.searchFilter,
164
+ compareWith: this.compareWith,
165
+ onTouched: () => {
166
+ var _a;
167
+ (_a = this.onTouchedFn) === null || _a === void 0 ? void 0 : _a.call(this);
168
+ this.touched.emit(true);
169
+ this.cd.markForCheck();
170
+ },
171
+ };
394
172
  }
395
- removePopper() {
173
+ updateValue(option) {
396
174
  var _a;
397
- // destroy popper if declared
398
- if (this._popper) {
399
- (_a = this._popper) === null || _a === void 0 ? void 0 : _a.destroy();
400
- this._popper = null;
401
- }
175
+ this._value = option;
176
+ this.valueChange.emit(option);
177
+ (_a = this.onChangeFn) === null || _a === void 0 ? void 0 : _a.call(this, option);
402
178
  }
403
- addContainer() {
404
- // create global container for popover if not already present
405
- if (!this._container) {
406
- this._container = this._renderer.createElement('div');
407
- }
408
- this._renderer.appendChild(this._container, this._elRef.nativeElement);
409
- this._renderer.appendChild(document.body, this._container);
410
- }
411
- removeContainer() {
412
- if (this._container) {
413
- // remove container from DOM tree
414
- this._renderer.removeChild(document.body, this._container);
415
- // clear container
416
- this._container = null;
417
- }
179
+ convertToBoolean(value) {
180
+ return (value === '' || value === 'true' || value.toString() === 'true' || false);
418
181
  }
419
182
  }
420
- NggPopoverElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggPopoverElementDirective, deps: [{ token: forwardRef(() => NggPopoverDirective) }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
421
- NggPopoverElementDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.2", type: NggPopoverElementDirective, selector: "[nggPopoverElement]", host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class.popover": "this.class", "attr.role": "this.role", "attr.id": "this.id", "class.active": "this.show", "attr.aria-activedescendant": "this.activeDescendant" } }, queries: [{ propertyName: "options", predicate: NggPopoverOptionDirective, descendants: true }], ngImport: i0 });
422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggPopoverElementDirective, decorators: [{
423
- type: Directive,
183
+ NggDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
184
+ NggDropdownComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggDropdownComponent, selector: "ngg-dropdown", inputs: { id: "id", texts: "texts", loop: "loop", display: "display", useValue: "useValue", label: "label", options: "options", valid: "valid", invalid: "invalid", compareWith: "compareWith", searchFilter: "searchFilter", multiSelect: "multiSelect", searchable: "searchable", value: "value" }, outputs: { valueChange: "valueChange", touched: "touched" }, providers: [
185
+ {
186
+ provide: NG_VALUE_ACCESSOR,
187
+ useExisting: NggDropdownComponent,
188
+ multi: true,
189
+ },
190
+ ], queries: [{ propertyName: "customOption", first: true, predicate: NggDropdownOptionDirective, descendants: true }], viewQueries: [{ propertyName: "togglerRef", first: true, predicate: ["togglerRef"], descendants: true }, { propertyName: "listboxRef", first: true, predicate: ["listboxRef"], descendants: true }, { propertyName: "fieldsetRef", first: true, predicate: ["fieldsetRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div>\n <span class=\"label\" *ngIf=\"label\" [id]=\"toggler?.attributes?.id + '_label'\">{{\n label\n }}</span>\n <button\n [attr.aria-labelledby]=\"label ? toggler?.attributes?.id + '_label' : null\"\n [attr.aria-describedby]=\"\n formInfo?.textContent && (formInfo?.textContent?.length ?? 0 > 0)\n ? toggler?.attributes?.id + '_info'\n : null\n \"\n type=\"button\"\n #togglerRef\n [id]=\"toggler?.attributes?.id\"\n [attr.aria-haspopup]=\"toggler?.attributes?.['aria-haspopup']\"\n [attr.aria-expanded]=\"toggler?.attributes?.['aria-expanded']\"\n [attr.aria-owns]=\"toggler?.attributes?.['aria-owns']\"\n [tabindex]=\"toggler?.attributes?.tabIndex\"\n [style]=\"toggler?.attributes?.style\"\n [class]=\"toggler?.classes\"\n (click)=\"handler?.toggle()\"\n [class.is-valid]=\"valid\"\n [class.is-invalid]=\"invalid\"\n >\n <span>{{ dropdown?.texts?.select }}</span>\n </button>\n <span\n class=\"form-info\"\n #formInfo\n [attr.id]=\"toggler?.attributes?.id + '_info'\"\n ><ng-content select=\"[data-form-info]\"></ng-content\n ></span>\n <div\n #listboxRef\n [id]=\"listbox?.attributes?.id\"\n [attr.role]=\"listbox?.attributes?.role\"\n [attr.aria-activedescendant]=\"\n listbox?.attributes?.['aria-activedescendant']\n \"\n [tabindex]=\"listbox?.attributes?.tabIndex\"\n [style]=\"listbox?.attributes?.style\"\n [class]=\"listbox?.classes\"\n >\n <button\n type=\"button\"\n class=\"close m-4 m-sm-2 d-block d-sm-none\"\n (click)=\"handler?.close()\"\n >\n <span class=\"sr-only\">{{ dropdown?.texts?.close }}</span>\n </button>\n <ul role=\"listbox\" *ngIf=\"!dropdown?.isMultiSelect\">\n <ng-container *ngTemplateOutlet=\"searchInput\"></ng-container>\n <li\n *ngFor=\"\n let option of dropdown?.options;\n let index = index;\n trackBy: trackByKey\n \"\n [id]=\"option.attributes.id\"\n [attr.role]=\"option.attributes.role\"\n [attr.aria-selected]=\"option.attributes['aria-selected']\"\n [style]=\"option.attributes.style\"\n [class]=\"option.classes\"\n (click)=\"handler?.select(option)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n customOption?.templateRef\n ? customOption!.templateRef\n : defaultOption;\n context: { option: option, index: index }\n \"\n ></ng-container>\n </li>\n </ul>\n <div *ngIf=\"dropdown?.isMultiSelect\" class=\"sg-fieldset-container\">\n <ng-container *ngTemplateOutlet=\"searchInput\"></ng-container>\n <fieldset\n #fieldsetRef\n [attr.aria-describedby]=\"fieldset?.attributes?.id\"\n role=\"listbox\"\n tabIndex=\"-1\"\n aria-multiselectable=\"true\"\n >\n <legend class=\"sr-only\" [id]=\"fieldset?.attributes?.id\">Options</legend>\n <label\n class=\"form-control\"\n [attr.role]=\"option.attributes.role\"\n [id]=\"option.attributes.id\"\n [attr.aria-selected]=\"option.attributes['aria-selected']\"\n [class]=\"option.classes\"\n *ngFor=\"\n let option of dropdown?.options;\n let index = index;\n trackBy: trackByKey\n \"\n >\n <input\n type=\"checkbox\"\n (change)=\"handler?.select(option, false)\"\n [checked]=\"option.selected\"\n tabIndex=\"-1\"\n />\n <ng-container\n *ngTemplateOutlet=\"\n customOption?.templateRef\n ? customOption!.templateRef\n : defaultOption;\n context: { option: option, index: index }\n \"\n ></ng-container>\n <i></i>\n </label>\n </fieldset>\n </div>\n </div>\n</div>\n\n<ng-template #defaultOption let-option=\"option\">\n {{ option[dropdown!.display] }}\n</ng-template>\n\n<ng-template #searchInput>\n <input\n *ngIf=\"dropdown?.isSearchable\"\n [id]=\"toggler?.attributes?.id + '_search-input'\"\n type=\"search\"\n (input)=\"search($event)\"\n placeholder=\"{{ dropdown?.texts?.searchPlaceholder }}\"\n class=\"rounded-0 rounded-top border-0 border-bottom border-info\"\n />\n</ng-template>\n", directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownComponent, decorators: [{
192
+ type: Component,
193
+ args: [{ selector: 'ngg-dropdown', providers: [
194
+ {
195
+ provide: NG_VALUE_ACCESSOR,
196
+ useExisting: NggDropdownComponent,
197
+ multi: true,
198
+ },
199
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <span class=\"label\" *ngIf=\"label\" [id]=\"toggler?.attributes?.id + '_label'\">{{\n label\n }}</span>\n <button\n [attr.aria-labelledby]=\"label ? toggler?.attributes?.id + '_label' : null\"\n [attr.aria-describedby]=\"\n formInfo?.textContent && (formInfo?.textContent?.length ?? 0 > 0)\n ? toggler?.attributes?.id + '_info'\n : null\n \"\n type=\"button\"\n #togglerRef\n [id]=\"toggler?.attributes?.id\"\n [attr.aria-haspopup]=\"toggler?.attributes?.['aria-haspopup']\"\n [attr.aria-expanded]=\"toggler?.attributes?.['aria-expanded']\"\n [attr.aria-owns]=\"toggler?.attributes?.['aria-owns']\"\n [tabindex]=\"toggler?.attributes?.tabIndex\"\n [style]=\"toggler?.attributes?.style\"\n [class]=\"toggler?.classes\"\n (click)=\"handler?.toggle()\"\n [class.is-valid]=\"valid\"\n [class.is-invalid]=\"invalid\"\n >\n <span>{{ dropdown?.texts?.select }}</span>\n </button>\n <span\n class=\"form-info\"\n #formInfo\n [attr.id]=\"toggler?.attributes?.id + '_info'\"\n ><ng-content select=\"[data-form-info]\"></ng-content\n ></span>\n <div\n #listboxRef\n [id]=\"listbox?.attributes?.id\"\n [attr.role]=\"listbox?.attributes?.role\"\n [attr.aria-activedescendant]=\"\n listbox?.attributes?.['aria-activedescendant']\n \"\n [tabindex]=\"listbox?.attributes?.tabIndex\"\n [style]=\"listbox?.attributes?.style\"\n [class]=\"listbox?.classes\"\n >\n <button\n type=\"button\"\n class=\"close m-4 m-sm-2 d-block d-sm-none\"\n (click)=\"handler?.close()\"\n >\n <span class=\"sr-only\">{{ dropdown?.texts?.close }}</span>\n </button>\n <ul role=\"listbox\" *ngIf=\"!dropdown?.isMultiSelect\">\n <ng-container *ngTemplateOutlet=\"searchInput\"></ng-container>\n <li\n *ngFor=\"\n let option of dropdown?.options;\n let index = index;\n trackBy: trackByKey\n \"\n [id]=\"option.attributes.id\"\n [attr.role]=\"option.attributes.role\"\n [attr.aria-selected]=\"option.attributes['aria-selected']\"\n [style]=\"option.attributes.style\"\n [class]=\"option.classes\"\n (click)=\"handler?.select(option)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n customOption?.templateRef\n ? customOption!.templateRef\n : defaultOption;\n context: { option: option, index: index }\n \"\n ></ng-container>\n </li>\n </ul>\n <div *ngIf=\"dropdown?.isMultiSelect\" class=\"sg-fieldset-container\">\n <ng-container *ngTemplateOutlet=\"searchInput\"></ng-container>\n <fieldset\n #fieldsetRef\n [attr.aria-describedby]=\"fieldset?.attributes?.id\"\n role=\"listbox\"\n tabIndex=\"-1\"\n aria-multiselectable=\"true\"\n >\n <legend class=\"sr-only\" [id]=\"fieldset?.attributes?.id\">Options</legend>\n <label\n class=\"form-control\"\n [attr.role]=\"option.attributes.role\"\n [id]=\"option.attributes.id\"\n [attr.aria-selected]=\"option.attributes['aria-selected']\"\n [class]=\"option.classes\"\n *ngFor=\"\n let option of dropdown?.options;\n let index = index;\n trackBy: trackByKey\n \"\n >\n <input\n type=\"checkbox\"\n (change)=\"handler?.select(option, false)\"\n [checked]=\"option.selected\"\n tabIndex=\"-1\"\n />\n <ng-container\n *ngTemplateOutlet=\"\n customOption?.templateRef\n ? customOption!.templateRef\n : defaultOption;\n context: { option: option, index: index }\n \"\n ></ng-container>\n <i></i>\n </label>\n </fieldset>\n </div>\n </div>\n</div>\n\n<ng-template #defaultOption let-option=\"option\">\n {{ option[dropdown!.display] }}\n</ng-template>\n\n<ng-template #searchInput>\n <input\n *ngIf=\"dropdown?.isSearchable\"\n [id]=\"toggler?.attributes?.id + '_search-input'\"\n type=\"search\"\n (input)=\"search($event)\"\n placeholder=\"{{ dropdown?.texts?.searchPlaceholder }}\"\n class=\"rounded-0 rounded-top border-0 border-bottom border-info\"\n />\n</ng-template>\n" }]
200
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { id: [{
201
+ type: Input
202
+ }], texts: [{
203
+ type: Input
204
+ }], loop: [{
205
+ type: Input
206
+ }], display: [{
207
+ type: Input
208
+ }], useValue: [{
209
+ type: Input
210
+ }], label: [{
211
+ type: Input
212
+ }], options: [{
213
+ type: Input
214
+ }], valid: [{
215
+ type: Input
216
+ }], invalid: [{
217
+ type: Input
218
+ }], compareWith: [{
219
+ type: Input
220
+ }], searchFilter: [{
221
+ type: Input
222
+ }], multiSelect: [{
223
+ type: Input
224
+ }], searchable: [{
225
+ type: Input
226
+ }], value: [{
227
+ type: Input
228
+ }], valueChange: [{
229
+ type: Output
230
+ }], touched: [{
231
+ type: Output
232
+ }], togglerRef: [{
233
+ type: ViewChild,
234
+ args: ['togglerRef']
235
+ }], listboxRef: [{
236
+ type: ViewChild,
237
+ args: ['listboxRef']
238
+ }], fieldsetRef: [{
239
+ type: ViewChild,
240
+ args: ['fieldsetRef']
241
+ }], customOption: [{
242
+ type: ContentChild,
243
+ args: [NggDropdownOptionDirective]
244
+ }] } });
245
+
246
+ class NggDropdownModule {
247
+ }
248
+ NggDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
249
+ NggDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownModule, declarations: [NggDropdownComponent, NggDropdownOptionDirective], imports: [CommonModule], exports: [NggDropdownComponent, NggDropdownOptionDirective] });
250
+ NggDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownModule, imports: [[CommonModule]] });
251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownModule, decorators: [{
252
+ type: NgModule,
424
253
  args: [{
425
- selector: '[nggPopoverElement]',
254
+ declarations: [NggDropdownComponent, NggDropdownOptionDirective],
255
+ imports: [CommonModule],
256
+ exports: [NggDropdownComponent, NggDropdownOptionDirective],
426
257
  }]
427
- }], ctorParameters: function () {
428
- return [{ type: NggPopoverDirective, decorators: [{
429
- type: Inject,
430
- args: [forwardRef(() => NggPopoverDirective)]
431
- }] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }];
432
- }, propDecorators: { options: [{
433
- type: ContentChildren,
434
- args: [NggPopoverOptionDirective, { descendants: true }]
435
- }], class: [{
436
- type: HostBinding,
437
- args: ['class.popover']
438
- }], role: [{
439
- type: HostBinding,
440
- args: ['attr.role']
441
- }], id: [{
442
- type: HostBinding,
443
- args: ['attr.id']
444
- }], show: [{
445
- type: HostBinding,
446
- args: ['class.active']
447
- }], activeDescendant: [{
448
- type: HostBinding,
449
- args: ['attr.aria-activedescendant']
450
- }], onResize: [{
451
- type: HostListener,
452
- args: ['window:resize', ['$event']]
453
- }] } });
258
+ }] });
454
259
 
455
- class NggDropdownComponent {
456
- constructor() {
457
- this._options = [];
458
- this._config = {};
260
+ class NggDatepickerComponent {
261
+ constructor(_cdr) {
262
+ this._cdr = _cdr;
263
+ this.id = randomId();
264
+ this.isValid = null;
265
+ this.valueChange = new EventEmitter();
266
+ this._months = months({});
267
+ this.listener = (data, state) => {
268
+ var _a, _b, _c, _d, _e;
269
+ if (this.dp && state) {
270
+ this.dp.state = Object.assign({}, state);
271
+ this.years = years({
272
+ from: (_b = (_a = this.dp.state) === null || _a === void 0 ? void 0 : _a.minDate) === null || _b === void 0 ? void 0 : _b.getFullYear(),
273
+ to: (_d = (_c = this.dp.state) === null || _c === void 0 ? void 0 : _c.maxDate) === null || _d === void 0 ? void 0 : _d.getFullYear(),
274
+ });
275
+ }
276
+ this.onTouchedFn && this.onTouchedFn();
277
+ if (data) {
278
+ // only emit change event if date has changed
279
+ if (((_e = this.data) === null || _e === void 0 ? void 0 : _e.selectedDate) !== data.selectedDate) {
280
+ this.valueChange.emit(data.selectedDate);
281
+ this.onChangeFn && this.onChangeFn(data.selectedDate);
282
+ }
283
+ this.data = data;
284
+ }
285
+ if (data || state) {
286
+ this._cdr.markForCheck();
287
+ }
288
+ };
289
+ }
290
+ get months() {
291
+ return this._months;
292
+ }
293
+ set months(value) {
294
+ this._months = value;
459
295
  }
460
296
  get options() {
461
297
  return this._options;
462
298
  }
463
299
  set options(value) {
300
+ var _a;
464
301
  this._options = value;
302
+ if (value.locale) {
303
+ this.months = months({ locale: (_a = this.options) === null || _a === void 0 ? void 0 : _a.locale });
304
+ }
465
305
  }
466
- get config() {
467
- return this._config;
306
+ get value() {
307
+ return this._value;
468
308
  }
469
- set config(value) {
470
- this._config = value;
309
+ set value(newValue) {
310
+ if (newValue !== this._value) {
311
+ this._value = newValue;
312
+ }
471
313
  }
472
- writeValue(obj) {
473
- this.value = obj;
314
+ writeValue(value) {
315
+ var _a;
316
+ this.value = value;
317
+ // When binding using ngModel we need to set initial select date
318
+ // once we get initial value as it's not available when component is created
319
+ if (value && this.dp && !((_a = this.data) === null || _a === void 0 ? void 0 : _a.selectedDate)) {
320
+ this.dp.select(value);
321
+ }
474
322
  }
475
323
  registerOnChange(fn) {
476
324
  this.onChangeFn = fn;
@@ -478,128 +326,406 @@ class NggDropdownComponent {
478
326
  registerOnTouched(fn) {
479
327
  this.onTouchedFn = fn;
480
328
  }
481
- select(value) {
482
- this.onChangeFn(value);
483
- this.value = value;
329
+ get data() {
330
+ return this._data;
331
+ }
332
+ set data(value) {
333
+ this._data = value;
334
+ }
335
+ onDateChange(value) {
336
+ var _a;
337
+ const newDate = new Date(value);
338
+ // Only pass valid date to date picker
339
+ if (!isNaN(newDate.getTime())) {
340
+ (_a = this.dp) === null || _a === void 0 ? void 0 : _a.select(value);
341
+ }
342
+ else {
343
+ this.valueChange.emit(value);
344
+ this.onChangeFn && this.onChangeFn(value);
345
+ }
346
+ }
347
+ trackWeek(index, week) {
348
+ return week;
349
+ }
350
+ ngAfterViewInit() {
351
+ // initialize datepicker
352
+ if (this.datepickerElRef &&
353
+ this.datepickerDialogElRef &&
354
+ this.dateInputElRef &&
355
+ this.datepickerTriggerElRef &&
356
+ !this.dp) {
357
+ this.dp = createDatepicker(this.listener, Object.assign(Object.assign({}, this.options), { selectedDate: this.value }), this.datepickerElRef.nativeElement, this.datepickerDialogElRef.nativeElement, this.dateInputElRef.nativeElement, this.datepickerTriggerElRef.nativeElement);
358
+ this._cdr.detectChanges();
359
+ }
360
+ else {
361
+ throw 'Missing one or more elements...';
362
+ }
484
363
  }
485
364
  }
486
- NggDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
487
- NggDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: NggDropdownComponent, selector: "ngg-dropdown", inputs: { options: "options", config: "config" }, providers: [
365
+ NggDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
366
+ NggDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggDatepickerComponent, selector: "ngg-datepicker", inputs: { options: "options", value: "value", id: "id", label: "label", isValid: "isValid" }, outputs: { valueChange: "valueChange" }, providers: [
488
367
  {
489
368
  provide: NG_VALUE_ACCESSOR,
490
- useExisting: NggDropdownComponent,
369
+ useExisting: NggDatepickerComponent,
491
370
  multi: true,
492
371
  },
493
- ], ngImport: i0, template: `
494
- <div nggPopover [config]="config">
495
- <button type="button" nggPopoverTrigger>
496
- {{ value }}
497
- </button>
498
- <div nggPopoverElement tabindex="-1" autofocus>
499
- <button class="close m-4 m-sm-2 d-block d-sm-none ">
500
- <span class="sr-only">Close</span>
501
- </button>
502
- <ul role="listbox">
503
- <li
504
- *ngFor="let option of options; let i = index"
505
- [nggPopoverOption]="option.value"
506
- [index]="i"
507
- [selected]="value === option.value"
508
- (selectedChanged)="select($event)"
509
- >
510
- {{ option.key }}
511
- </li>
512
- </ul>
513
- </div>
514
- </div>
515
- `, isInline: true, directives: [{ type: NggPopoverDirective, selector: "[nggPopover]", inputs: ["config"] }, { type: NggPopoverTriggerDirective, selector: "[nggPopoverTrigger]" }, { type: NggPopoverElementDirective, selector: "[nggPopoverElement]" }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: NggPopoverOptionDirective, selector: "[nggPopoverOption]", inputs: ["nggPopoverOption", "index", "selected"], outputs: ["selectedChanged"] }] });
516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggDropdownComponent, decorators: [{
372
+ ], viewQueries: [{ propertyName: "datepickerDialogElRef", first: true, predicate: ["datepickerDialogElRef"], descendants: true }, { propertyName: "dateInputElRef", first: true, predicate: ["dateInputElRef"], descendants: true }, { propertyName: "datepickerElRef", first: true, predicate: ["datepickerElRef"], descendants: true }, { propertyName: "datepickerTriggerElRef", first: true, predicate: ["datepickerTriggerElRef"], descendants: true }], ngImport: i0, template: "<div class=\"form-group\">\n <label *ngIf=\"label\" [for]=\"id\">{{ label }}</label>\n <div\n class=\"group\"\n #datepickerElRef\n [class.is-valid]=\"isValid\"\n [class.is-invalid]=\"isValid === false\"\n >\n <input\n [attr.id]=\"id\"\n [attr.aria-describedby]=\"\n formInfo?.innerText && formInfo.innerText.length > 0\n ? id + '_info'\n : null\n \"\n type=\"text\"\n placeholder=\"yyyy-mm-dd\"\n #dateInputElRef\n [value]=\"data?.formattedSelectedDate || ''\"\n (change)=\"onDateChange(dateInputElRef.value)\"\n />\n <button\n #datepickerTriggerElRef\n (click)=\"dp?.toggle()\"\n type=\"button\"\n class=\"primary\"\n >\n <i class=\"sg-icon sg-icon-calendar\">Select date</i>\n </button>\n </div>\n <span class=\"form-info\" #formInfo [attr.id]=\"id + '_info'\"\n ><ng-content select=\"[data-form-info]\"></ng-content\n ></span>\n</div>\n<!-- TODO: get or set attributes from within datepicker instance (dp) -->\n<div\n #datepickerDialogElRef\n class=\"popover popover-datepicker\"\n [class.active]=\"dp?.state?.isActive\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Choose Date\"\n>\n <button type=\"button\" class=\"close\" (click)=\"dp?.close()\">Close</button>\n <div class=\"sg-date\">\n <header>\n <button type=\"button\" class=\"link\" (click)=\"dp?.sub(1, 'months')\">\n <i class=\"sg-icon sg-icon-previous\">Previous month</i>\n </button>\n <ngg-dropdown\n [options]=\"months\"\n display=\"key\"\n text=\"Select\"\n [value]=\"data?.month\"\n (valueChange)=\"dp?.setMonth($event)\"\n ></ngg-dropdown>\n <ngg-dropdown\n *ngIf=\"years\"\n [options]=\"years\"\n display=\"key\"\n text=\"Select\"\n [value]=\"data?.year\"\n (valueChange)=\"dp?.setYear($event)\"\n ></ngg-dropdown>\n <button type=\"button\" class=\"link\" (click)=\"dp?.add(1, 'months')\">\n <i class=\"sg-icon sg-icon-next\">Next month</i>\n </button>\n </header>\n <main>\n <table role=\"grid\">\n <thead>\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let header of data?.calendar?.headers\"\n [abbr]=\"header.abbr\"\n [class.sg-week-header]=\"header.type === 'week'\"\n [class.sg-day-header]=\"header.type === 'day'\"\n >\n {{ header.displayText }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"\n let week of data?.calendar?.calendarGrid;\n trackBy: trackWeek;\n let i = index\n \"\n >\n <th\n *ngIf=\"data?.calendar?.weekNumbers as weekNumbers\"\n class=\"sg-week-number\"\n >\n {{ weekNumbers[i] }}\n </th>\n <td\n *ngFor=\"let day of week\"\n [attr.data-date]=\"day.formattedDate\"\n [attr.role]=\"day.selected ? 'gridcell' : null\"\n [attr.aria-selected]=\"\n day.selected && !data?.highlightedDate ? true : null\n \"\n [class.disabled]=\"day.disabled\"\n [class.sg-date-today]=\"day.today\"\n [title]=\"day.today ? 'Today' : ''\"\n [tabIndex]=\"\n day.highlighted ||\n (day.selected && !data?.highlightedDate) ||\n (day.today && !data?.highlightedDate && !data?.selectedDate)\n ? 0\n : -1\n \"\n (click)=\"day.currentMonth && dp?.select(day.date)\"\n >\n {{ day.day }}\n </td>\n </tr>\n </tbody>\n </table>\n </main>\n </div>\n</div>\n", components: [{ type: NggDropdownComponent, selector: "ngg-dropdown", inputs: ["id", "texts", "loop", "display", "useValue", "label", "options", "valid", "invalid", "compareWith", "searchFilter", "multiSelect", "searchable", "value"], outputs: ["valueChange", "touched"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerComponent, decorators: [{
517
374
  type: Component,
518
- args: [{
519
- selector: 'ngg-dropdown',
520
- template: `
521
- <div nggPopover [config]="config">
522
- <button type="button" nggPopoverTrigger>
523
- {{ value }}
524
- </button>
525
- <div nggPopoverElement tabindex="-1" autofocus>
526
- <button class="close m-4 m-sm-2 d-block d-sm-none ">
527
- <span class="sr-only">Close</span>
528
- </button>
529
- <ul role="listbox">
530
- <li
531
- *ngFor="let option of options; let i = index"
532
- [nggPopoverOption]="option.value"
533
- [index]="i"
534
- [selected]="value === option.value"
535
- (selectedChanged)="select($event)"
536
- >
537
- {{ option.key }}
538
- </li>
539
- </ul>
540
- </div>
541
- </div>
542
- `,
543
- providers: [
375
+ args: [{ selector: 'ngg-datepicker', providers: [
544
376
  {
545
377
  provide: NG_VALUE_ACCESSOR,
546
- useExisting: NggDropdownComponent,
378
+ useExisting: NggDatepickerComponent,
547
379
  multi: true,
548
380
  },
549
- ],
550
- //changeDetection: ChangeDetectionStrategy.OnPush
551
- }]
552
- }], propDecorators: { options: [{
381
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <label *ngIf=\"label\" [for]=\"id\">{{ label }}</label>\n <div\n class=\"group\"\n #datepickerElRef\n [class.is-valid]=\"isValid\"\n [class.is-invalid]=\"isValid === false\"\n >\n <input\n [attr.id]=\"id\"\n [attr.aria-describedby]=\"\n formInfo?.innerText && formInfo.innerText.length > 0\n ? id + '_info'\n : null\n \"\n type=\"text\"\n placeholder=\"yyyy-mm-dd\"\n #dateInputElRef\n [value]=\"data?.formattedSelectedDate || ''\"\n (change)=\"onDateChange(dateInputElRef.value)\"\n />\n <button\n #datepickerTriggerElRef\n (click)=\"dp?.toggle()\"\n type=\"button\"\n class=\"primary\"\n >\n <i class=\"sg-icon sg-icon-calendar\">Select date</i>\n </button>\n </div>\n <span class=\"form-info\" #formInfo [attr.id]=\"id + '_info'\"\n ><ng-content select=\"[data-form-info]\"></ng-content\n ></span>\n</div>\n<!-- TODO: get or set attributes from within datepicker instance (dp) -->\n<div\n #datepickerDialogElRef\n class=\"popover popover-datepicker\"\n [class.active]=\"dp?.state?.isActive\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Choose Date\"\n>\n <button type=\"button\" class=\"close\" (click)=\"dp?.close()\">Close</button>\n <div class=\"sg-date\">\n <header>\n <button type=\"button\" class=\"link\" (click)=\"dp?.sub(1, 'months')\">\n <i class=\"sg-icon sg-icon-previous\">Previous month</i>\n </button>\n <ngg-dropdown\n [options]=\"months\"\n display=\"key\"\n text=\"Select\"\n [value]=\"data?.month\"\n (valueChange)=\"dp?.setMonth($event)\"\n ></ngg-dropdown>\n <ngg-dropdown\n *ngIf=\"years\"\n [options]=\"years\"\n display=\"key\"\n text=\"Select\"\n [value]=\"data?.year\"\n (valueChange)=\"dp?.setYear($event)\"\n ></ngg-dropdown>\n <button type=\"button\" class=\"link\" (click)=\"dp?.add(1, 'months')\">\n <i class=\"sg-icon sg-icon-next\">Next month</i>\n </button>\n </header>\n <main>\n <table role=\"grid\">\n <thead>\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let header of data?.calendar?.headers\"\n [abbr]=\"header.abbr\"\n [class.sg-week-header]=\"header.type === 'week'\"\n [class.sg-day-header]=\"header.type === 'day'\"\n >\n {{ header.displayText }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"\n let week of data?.calendar?.calendarGrid;\n trackBy: trackWeek;\n let i = index\n \"\n >\n <th\n *ngIf=\"data?.calendar?.weekNumbers as weekNumbers\"\n class=\"sg-week-number\"\n >\n {{ weekNumbers[i] }}\n </th>\n <td\n *ngFor=\"let day of week\"\n [attr.data-date]=\"day.formattedDate\"\n [attr.role]=\"day.selected ? 'gridcell' : null\"\n [attr.aria-selected]=\"\n day.selected && !data?.highlightedDate ? true : null\n \"\n [class.disabled]=\"day.disabled\"\n [class.sg-date-today]=\"day.today\"\n [title]=\"day.today ? 'Today' : ''\"\n [tabIndex]=\"\n day.highlighted ||\n (day.selected && !data?.highlightedDate) ||\n (day.today && !data?.highlightedDate && !data?.selectedDate)\n ? 0\n : -1\n \"\n (click)=\"day.currentMonth && dp?.select(day.date)\"\n >\n {{ day.day }}\n </td>\n </tr>\n </tbody>\n </table>\n </main>\n </div>\n</div>\n" }]
382
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { options: [{
383
+ type: Input
384
+ }], value: [{
385
+ type: Input
386
+ }], id: [{
387
+ type: Input
388
+ }], label: [{
553
389
  type: Input
554
- }], config: [{
390
+ }], isValid: [{
555
391
  type: Input
392
+ }], valueChange: [{
393
+ type: Output
394
+ }], datepickerDialogElRef: [{
395
+ type: ViewChild,
396
+ args: ['datepickerDialogElRef']
397
+ }], dateInputElRef: [{
398
+ type: ViewChild,
399
+ args: ['dateInputElRef']
400
+ }], datepickerElRef: [{
401
+ type: ViewChild,
402
+ args: ['datepickerElRef']
403
+ }], datepickerTriggerElRef: [{
404
+ type: ViewChild,
405
+ args: ['datepickerTriggerElRef']
556
406
  }] } });
407
+ function dateValidator(dates) {
408
+ return (control) => {
409
+ const value = control.value;
410
+ if (!value) {
411
+ return null;
412
+ }
413
+ const newDate = new Date(value);
414
+ const isValidDate = !isNaN(newDate.getTime());
415
+ if (!isValidDate) {
416
+ return { validDate: true };
417
+ }
418
+ const validMinDate = (dates === null || dates === void 0 ? void 0 : dates.min) ? newDate >= startOfDay(dates.min) : true;
419
+ const validMaxDate = (dates === null || dates === void 0 ? void 0 : dates.max) ? newDate <= endOfDay(dates.max) : true;
420
+ if (!validMinDate && (dates === null || dates === void 0 ? void 0 : dates.min)) {
421
+ return {
422
+ validDate: {
423
+ minDate: startOfDay(dates.min),
424
+ actualDate: newDate,
425
+ },
426
+ };
427
+ }
428
+ if (!validMaxDate && (dates === null || dates === void 0 ? void 0 : dates.max)) {
429
+ return {
430
+ validDate: {
431
+ maxDate: endOfDay(dates.max),
432
+ actualDate: newDate,
433
+ },
434
+ };
435
+ }
436
+ return null;
437
+ };
438
+ }
557
439
 
558
- class NggDropdownModule {
440
+ class NggDatepickerModule {
559
441
  }
560
- NggDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
561
- NggDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggDropdownModule, declarations: [NggPopoverDirective,
562
- NggPopoverOptionDirective,
563
- NggPopoverElementDirective,
564
- NggPopoverTriggerDirective,
565
- NggDropdownComponent], imports: [CommonModule], exports: [NggPopoverDirective,
566
- NggPopoverOptionDirective,
567
- NggPopoverElementDirective,
568
- NggPopoverTriggerDirective,
569
- NggDropdownComponent] });
570
- NggDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggDropdownModule, imports: [[CommonModule]] });
571
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggDropdownModule, decorators: [{
442
+ NggDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
443
+ NggDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerModule, declarations: [NggDatepickerComponent], imports: [CommonModule, NggDropdownModule], exports: [NggDatepickerComponent] });
444
+ NggDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerModule, imports: [[CommonModule, NggDropdownModule]] });
445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerModule, decorators: [{
572
446
  type: NgModule,
573
447
  args: [{
574
- declarations: [
575
- NggPopoverDirective,
576
- NggPopoverOptionDirective,
577
- NggPopoverElementDirective,
578
- NggPopoverTriggerDirective,
579
- NggDropdownComponent,
580
- ],
581
- imports: [CommonModule],
582
- exports: [
583
- NggPopoverDirective,
584
- NggPopoverOptionDirective,
585
- NggPopoverElementDirective,
586
- NggPopoverTriggerDirective,
587
- NggDropdownComponent,
588
- ],
448
+ declarations: [NggDatepickerComponent],
449
+ imports: [CommonModule, NggDropdownModule],
450
+ exports: [NggDatepickerComponent],
589
451
  }]
590
452
  }] });
591
453
 
592
454
  class NggModule {
593
455
  }
594
- NggModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
595
- NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggModule, imports: [CommonModule], exports: [NggSegmentedControlModule, NggDropdownModule] });
596
- NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggModule, imports: [[CommonModule], NggSegmentedControlModule, NggDropdownModule] });
597
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NggModule, decorators: [{
456
+ NggModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
457
+ NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModule, imports: [CommonModule], exports: [NggSegmentedControlModule, NggDropdownModule, NggDatepickerModule] });
458
+ NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModule, imports: [[CommonModule], NggSegmentedControlModule, NggDropdownModule, NggDatepickerModule] });
459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModule, decorators: [{
598
460
  type: NgModule,
599
461
  args: [{
600
462
  declarations: [],
601
463
  imports: [CommonModule],
602
- exports: [NggSegmentedControlModule, NggDropdownModule],
464
+ exports: [NggSegmentedControlModule, NggDropdownModule, NggDatepickerModule],
465
+ }]
466
+ }] });
467
+
468
+ class NggModalComponent {
469
+ constructor(ref) {
470
+ this.ref = ref;
471
+ this.isOpenChange = new EventEmitter();
472
+ this.closed = new EventEmitter();
473
+ this.confirm = new EventEmitter();
474
+ this.dismiss = new EventEmitter();
475
+ }
476
+ get isOpen() {
477
+ return this._isOpen;
478
+ }
479
+ set isOpen(value) {
480
+ this._isOpen = value;
481
+ if (value) {
482
+ disableBodyScroll(this.ref.nativeElement);
483
+ }
484
+ else {
485
+ enableBodyScroll(this.ref.nativeElement);
486
+ }
487
+ }
488
+ get open() { return this.isOpen; }
489
+ handleCloseClick(event) {
490
+ this.closeModal(event);
491
+ }
492
+ handleBackdropClick(event) {
493
+ var _a;
494
+ if (event.target == ((_a = this.backdropRef) === null || _a === void 0 ? void 0 : _a.nativeElement))
495
+ this.closeModal(event);
496
+ }
497
+ handleDismiss(event) {
498
+ this.dismiss.emit(event);
499
+ }
500
+ handleConfirm(event) {
501
+ this.confirm.emit(event);
502
+ }
503
+ closeModal(event) {
504
+ if (this.closed.observers.length > 0) {
505
+ this.closed.emit(event);
506
+ }
507
+ else {
508
+ this.isOpen = false;
509
+ this.isOpenChange.emit(this.isOpen);
510
+ }
511
+ }
512
+ ngOnDestroy() {
513
+ enableBodyScroll(this.ref.nativeElement);
514
+ }
515
+ }
516
+ NggModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
517
+ NggModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggModalComponent, selector: "ngg-modal", inputs: { modalType: "modalType", header: "header", confirmLabel: "confirmLabel", dismissLabel: "dismissLabel", size: "size", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange", closed: "closed", confirm: "confirm", dismiss: "dismiss" }, host: { properties: { "class.open": "this.open" } }, viewQueries: [{ propertyName: "backdropRef", first: true, predicate: ["backdrop"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"isOpen\" [ngSwitch]=\"modalType\">\n <aside data-testid=\"modal\" *ngSwitchCase=\"'slideout'\" role=\"dialog\" aria-modal=\"true\" [class.small]=\"size === 'sm'\" [class.medium]=\"size === 'md'\" [class.large]=\"size === 'lg'\">\n <header ngg-modal-header data-testid=\"modal-header\" [header]=\"header\" (closed)=\"this.handleCloseClick($event)\"></header>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container> \n </div>\n <footer ngg-modal-footer data-testid=\"modal-footer\" *ngIf=\"dismissLabel || confirmLabel\" [dismissLabel]=\"dismissLabel\" [confirmLabel]=\"confirmLabel\" (dismiss)=\"this.handleDismiss($event)\" (confirm)=\"this.handleConfirm($event)\"></footer>\n </aside>\n <main data-testid=\"modal\" *ngSwitchCase=\"'takeover'\" role=\"dialog\" aria-modal=\"true\">\n <header ngg-modal-header data-testid=\"modal-header\" [header]=\"header\" (closed)=\"this.handleCloseClick($event)\"></header>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container> \n </div>\n <footer ngg-modal-footer data-testid=\"modal-footer\" *ngIf=\"dismissLabel || confirmLabel\" [dismissLabel]=\"dismissLabel\" [confirmLabel]=\"confirmLabel\" (dismiss)=\"this.handleDismiss($event)\" (confirm)=\"this.handleConfirm($event)\"></footer>\n </main>\n <section data-testid=\"modal\" *ngSwitchDefault role=\"dialog\" aria-modal=\"true\" [class.small]=\"size === 'sm'\" [class.medium]=\"size === 'md'\" [class.large]=\"size === 'lg'\">\n <header ngg-modal-header data-testid=\"modal-header\" [header]=\"header\" (closed)=\"this.handleCloseClick($event)\"></header>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container> \n </div>\n <footer ngg-modal-footer data-testid=\"modal-footer\" *ngIf=\"dismissLabel || confirmLabel\" [dismissLabel]=\"dismissLabel\" [confirmLabel]=\"confirmLabel\" (dismiss)=\"this.handleDismiss($event)\" (confirm)=\"this.handleConfirm($event)\"></footer>\n </section>\n <ng-template #contentTpl>\n <ng-content></ng-content>\n </ng-template>\n <div #backdrop data-testid=\"modal-backdrop\" class=\"backdrop\" (click)=\"this.handleBackdropClick($event)\" [attr.aria-hidden]=\"true\"></div>\n</ng-container>", styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal-backdrop)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"], components: [{ type: i0.forwardRef(function () { return NggModalHeaderComponent; }), selector: "[ngg-modal-header]", inputs: ["header"], outputs: ["closed"] }, { type: i0.forwardRef(function () { return NggModalBodyComponent; }), selector: "[ngg-modal-body]" }, { type: i0.forwardRef(function () { return NggModalFooterComponent; }), selector: "[ngg-modal-footer]", inputs: ["dismissLabel", "confirmLabel"], outputs: ["dismiss", "confirm"] }], directives: [{ type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return i1.NgSwitch; }), selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i0.forwardRef(function () { return i1.NgSwitchCase; }), selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i0.forwardRef(function () { return i1.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i0.forwardRef(function () { return i1.NgSwitchDefault; }), selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalComponent, decorators: [{
519
+ type: Component,
520
+ args: [{ selector: 'ngg-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"isOpen\" [ngSwitch]=\"modalType\">\n <aside data-testid=\"modal\" *ngSwitchCase=\"'slideout'\" role=\"dialog\" aria-modal=\"true\" [class.small]=\"size === 'sm'\" [class.medium]=\"size === 'md'\" [class.large]=\"size === 'lg'\">\n <header ngg-modal-header data-testid=\"modal-header\" [header]=\"header\" (closed)=\"this.handleCloseClick($event)\"></header>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container> \n </div>\n <footer ngg-modal-footer data-testid=\"modal-footer\" *ngIf=\"dismissLabel || confirmLabel\" [dismissLabel]=\"dismissLabel\" [confirmLabel]=\"confirmLabel\" (dismiss)=\"this.handleDismiss($event)\" (confirm)=\"this.handleConfirm($event)\"></footer>\n </aside>\n <main data-testid=\"modal\" *ngSwitchCase=\"'takeover'\" role=\"dialog\" aria-modal=\"true\">\n <header ngg-modal-header data-testid=\"modal-header\" [header]=\"header\" (closed)=\"this.handleCloseClick($event)\"></header>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container> \n </div>\n <footer ngg-modal-footer data-testid=\"modal-footer\" *ngIf=\"dismissLabel || confirmLabel\" [dismissLabel]=\"dismissLabel\" [confirmLabel]=\"confirmLabel\" (dismiss)=\"this.handleDismiss($event)\" (confirm)=\"this.handleConfirm($event)\"></footer>\n </main>\n <section data-testid=\"modal\" *ngSwitchDefault role=\"dialog\" aria-modal=\"true\" [class.small]=\"size === 'sm'\" [class.medium]=\"size === 'md'\" [class.large]=\"size === 'lg'\">\n <header ngg-modal-header data-testid=\"modal-header\" [header]=\"header\" (closed)=\"this.handleCloseClick($event)\"></header>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container> \n </div>\n <footer ngg-modal-footer data-testid=\"modal-footer\" *ngIf=\"dismissLabel || confirmLabel\" [dismissLabel]=\"dismissLabel\" [confirmLabel]=\"confirmLabel\" (dismiss)=\"this.handleDismiss($event)\" (confirm)=\"this.handleConfirm($event)\"></footer>\n </section>\n <ng-template #contentTpl>\n <ng-content></ng-content>\n </ng-template>\n <div #backdrop data-testid=\"modal-backdrop\" class=\"backdrop\" (click)=\"this.handleBackdropClick($event)\" [attr.aria-hidden]=\"true\"></div>\n</ng-container>", styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal-backdrop)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
521
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { modalType: [{
522
+ type: Input
523
+ }], header: [{
524
+ type: Input
525
+ }], confirmLabel: [{
526
+ type: Input
527
+ }], dismissLabel: [{
528
+ type: Input
529
+ }], size: [{
530
+ type: Input
531
+ }], isOpen: [{
532
+ type: Input
533
+ }], isOpenChange: [{
534
+ type: Output
535
+ }], closed: [{
536
+ type: Output
537
+ }], confirm: [{
538
+ type: Output
539
+ }], dismiss: [{
540
+ type: Output
541
+ }], open: [{
542
+ type: HostBinding,
543
+ args: ['class.open']
544
+ }], backdropRef: [{
545
+ type: ViewChild,
546
+ args: ['backdrop']
547
+ }] } });
548
+ class NggModalHeaderComponent {
549
+ constructor() {
550
+ this.closed = new EventEmitter();
551
+ }
552
+ handleClose(event) {
553
+ this.closed.emit(event);
554
+ }
555
+ }
556
+ NggModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
557
+ NggModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggModalHeaderComponent, selector: "[ngg-modal-header]", inputs: { header: "header" }, outputs: { closed: "closed" }, ngImport: i0, template: `
558
+ <h3 data-testid="modal-header-text">{{header}}</h3>
559
+ <button data-testid="modal-close-button" class="close" (click)="this.handleClose($event)">
560
+ <span className="sr-only">Close</span>
561
+ </button>
562
+ `, isInline: true, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal-backdrop)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] });
563
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalHeaderComponent, decorators: [{
564
+ type: Component,
565
+ args: [{ selector: '[ngg-modal-header]', template: `
566
+ <h3 data-testid="modal-header-text">{{header}}</h3>
567
+ <button data-testid="modal-close-button" class="close" (click)="this.handleClose($event)">
568
+ <span className="sr-only">Close</span>
569
+ </button>
570
+ `, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal-backdrop)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
571
+ }], propDecorators: { header: [{
572
+ type: Input
573
+ }], closed: [{
574
+ type: Output
575
+ }] } });
576
+ class NggModalBodyComponent {
577
+ }
578
+ NggModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
579
+ NggModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggModalBodyComponent, selector: "[ngg-modal-body]", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal-backdrop)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] });
580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalBodyComponent, decorators: [{
581
+ type: Component,
582
+ args: [{ selector: '[ngg-modal-body]', template: `<ng-content></ng-content>`, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal-backdrop)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
583
+ }] });
584
+ class NggModalFooterComponent {
585
+ constructor() {
586
+ this.dismiss = new EventEmitter();
587
+ this.confirm = new EventEmitter();
588
+ }
589
+ handleDismiss(event) {
590
+ this.dismiss.emit(event);
591
+ }
592
+ handleConfirm(event) {
593
+ this.confirm.emit(event);
594
+ }
595
+ }
596
+ NggModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
597
+ NggModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggModalFooterComponent, selector: "[ngg-modal-footer]", inputs: { dismissLabel: "dismissLabel", confirmLabel: "confirmLabel" }, outputs: { dismiss: "dismiss", confirm: "confirm" }, ngImport: i0, template: `
598
+ <button data-testid="modal-dismiss-button" *ngIf="dismissLabel" class="secondary" (click)="this.handleDismiss($event)">{{dismissLabel}}</button>
599
+ <button data-testid="modal-confirm-button" *ngIf="confirmLabel" class="primary" (click)="this.handleConfirm($event)">{{confirmLabel}}</button>
600
+ `, isInline: true, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal-backdrop)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalFooterComponent, decorators: [{
602
+ type: Component,
603
+ args: [{ selector: '[ngg-modal-footer]', template: `
604
+ <button data-testid="modal-dismiss-button" *ngIf="dismissLabel" class="secondary" (click)="this.handleDismiss($event)">{{dismissLabel}}</button>
605
+ <button data-testid="modal-confirm-button" *ngIf="confirmLabel" class="primary" (click)="this.handleConfirm($event)">{{confirmLabel}}</button>
606
+ `, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal-backdrop)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
607
+ }], propDecorators: { dismissLabel: [{
608
+ type: Input
609
+ }], confirmLabel: [{
610
+ type: Input
611
+ }], dismiss: [{
612
+ type: Output
613
+ }], confirm: [{
614
+ type: Output
615
+ }] } });
616
+
617
+ const DECLARATIONS = [
618
+ NggModalComponent,
619
+ NggModalHeaderComponent,
620
+ NggModalBodyComponent,
621
+ NggModalFooterComponent
622
+ ];
623
+ const EXPORTS = [
624
+ NggModalComponent,
625
+ ];
626
+ class NggModalModule {
627
+ }
628
+ NggModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
629
+ NggModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalModule, declarations: [NggModalComponent,
630
+ NggModalHeaderComponent,
631
+ NggModalBodyComponent,
632
+ NggModalFooterComponent], imports: [CommonModule], exports: [NggModalComponent] });
633
+ NggModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalModule, imports: [[CommonModule]] });
634
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalModule, decorators: [{
635
+ type: NgModule,
636
+ args: [{
637
+ imports: [CommonModule],
638
+ exports: EXPORTS,
639
+ declarations: DECLARATIONS,
640
+ }]
641
+ }] });
642
+
643
+ class NggBadgeComponent {
644
+ //eslint-disable-next-line
645
+ constructor() {
646
+ /** The color of the component */
647
+ this.badgeType = '';
648
+ /** Callback when component is dismissed */
649
+ this.handleClose = new EventEmitter();
650
+ }
651
+ /** Flag whether the component can be dismissed */
652
+ set isCloseable(value) {
653
+ this._isCloseable = value;
654
+ }
655
+ get isCloseable() {
656
+ return this._isCloseable === '' || !!this._isCloseable;
657
+ }
658
+ get class() {
659
+ return ['badge', this.badgeType].join(' ');
660
+ }
661
+ ngOnInit() {
662
+ if (!!this.customColor || !!this.customBackgroundColor) {
663
+ this.badgeType = '';
664
+ }
665
+ }
666
+ close(e) {
667
+ this.handleClose.emit(e);
668
+ }
669
+ }
670
+ NggBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
671
+ NggBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggBadgeComponent, selector: "[ngg-badge]", inputs: { badgeType: "badgeType", isCloseable: "isCloseable", closeText: "closeText", customColor: "customColor", customBackgroundColor: "customBackgroundColor" }, outputs: { handleClose: "handleClose" }, host: { properties: { "style.color": "this.customColor", "style.background-color": "this.customBackgroundColor", "class": "this.class" } }, ngImport: i0, template: `
672
+ <strong>
673
+ <ng-content></ng-content>
674
+ </strong>
675
+ <button *ngIf="isCloseable" class="close" (click)="close($event)">
676
+ {{ closeText }}
677
+ </button>
678
+ `, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeComponent, decorators: [{
680
+ type: Component,
681
+ args: [{
682
+ // we need to disable this warning since we don't want the badge component to create a new element
683
+ // eslint-disable-next-line @angular-eslint/component-selector
684
+ selector: '[ngg-badge]',
685
+ template: `
686
+ <strong>
687
+ <ng-content></ng-content>
688
+ </strong>
689
+ <button *ngIf="isCloseable" class="close" (click)="close($event)">
690
+ {{ closeText }}
691
+ </button>
692
+ `,
693
+ changeDetection: ChangeDetectionStrategy.OnPush,
694
+ }]
695
+ }], ctorParameters: function () { return []; }, propDecorators: { badgeType: [{
696
+ type: Input
697
+ }], isCloseable: [{
698
+ type: Input
699
+ }], closeText: [{
700
+ type: Input
701
+ }], customColor: [{
702
+ type: HostBinding,
703
+ args: ['style.color']
704
+ }, {
705
+ type: Input
706
+ }], customBackgroundColor: [{
707
+ type: HostBinding,
708
+ args: ['style.background-color']
709
+ }, {
710
+ type: Input
711
+ }], class: [{
712
+ type: HostBinding,
713
+ args: ['class']
714
+ }], handleClose: [{
715
+ type: Output
716
+ }] } });
717
+
718
+ class NggBadgeModule {
719
+ }
720
+ NggBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
721
+ NggBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeModule, declarations: [NggBadgeComponent], imports: [CommonModule], exports: [NggBadgeComponent] });
722
+ NggBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeModule, imports: [[CommonModule]] });
723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeModule, decorators: [{
724
+ type: NgModule,
725
+ args: [{
726
+ declarations: [NggBadgeComponent],
727
+ imports: [CommonModule],
728
+ exports: [NggBadgeComponent],
603
729
  }]
604
730
  }] });
605
731
 
@@ -607,5 +733,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImpor
607
733
  * Generated bundle index. Do not edit.
608
734
  */
609
735
 
610
- export { NggDropdownComponent, NggDropdownModule, NggModule, NggPopoverDirective, NggPopoverElementDirective, NggPopoverOptionDirective, NggPopoverTriggerDirective, NggSegmentedControlComponent, NggSegmentedControlModule };
736
+ export { NggBadgeComponent, NggBadgeModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalHeaderComponent, NggModalModule, NggModule, NggSegmentedControlComponent, NggSegmentedControlModule, dateValidator };
611
737
  //# sourceMappingURL=sebgroup-green-angular.mjs.map