@sebgroup/green-angular 1.0.4 → 1.2.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 (50) hide show
  1. package/esm2020/index.mjs +3 -1
  2. package/esm2020/lib/accordion/accordion-list-item.component.mjs +3 -3
  3. package/esm2020/lib/accordion/accordion.component.mjs +3 -3
  4. package/esm2020/lib/accordion/accordion.module.mjs +5 -5
  5. package/esm2020/lib/badge/badge.component.mjs +12 -12
  6. package/esm2020/lib/badge/badge.module.mjs +5 -5
  7. package/esm2020/lib/button/button.component.mjs +3 -3
  8. package/esm2020/lib/button/button.module.mjs +5 -5
  9. package/esm2020/lib/datepicker/datepicker.component.mjs +32 -32
  10. package/esm2020/lib/datepicker/datepicker.module.mjs +5 -5
  11. package/esm2020/lib/dropdown/dropdown-option.directive.mjs +3 -3
  12. package/esm2020/lib/dropdown/dropdown.component.mjs +21 -21
  13. package/esm2020/lib/dropdown/dropdown.module.mjs +5 -5
  14. package/esm2020/lib/green-angular.module.mjs +12 -8
  15. package/esm2020/lib/modal/modal.component.mjs +23 -23
  16. package/esm2020/lib/modal/modal.module.mjs +5 -5
  17. package/esm2020/lib/pagination/index.mjs +3 -0
  18. package/esm2020/lib/pagination/pagination.component.mjs +175 -0
  19. package/esm2020/lib/pagination/pagination.module.mjs +18 -0
  20. package/esm2020/lib/progress-circle/progress-circle.component.mjs +12 -19
  21. package/esm2020/lib/progress-circle/progress-circle.module.mjs +5 -5
  22. package/esm2020/lib/segmented-control/segmented-control.component.mjs +9 -14
  23. package/esm2020/lib/segmented-control/segmented-control.module.mjs +5 -5
  24. package/esm2020/lib/slider/index.mjs +3 -0
  25. package/esm2020/lib/slider/slider.component.mjs +108 -0
  26. package/esm2020/lib/slider/slider.module.mjs +19 -0
  27. package/fesm2015/sebgroup-green-angular.mjs +482 -188
  28. package/fesm2015/sebgroup-green-angular.mjs.map +1 -1
  29. package/fesm2020/sebgroup-green-angular.mjs +478 -185
  30. package/fesm2020/sebgroup-green-angular.mjs.map +1 -1
  31. package/index.d.ts +2 -0
  32. package/lib/accordion/accordion-list-item.component.d.ts +1 -1
  33. package/lib/accordion/accordion.component.d.ts +1 -1
  34. package/lib/badge/badge.component.d.ts +1 -1
  35. package/lib/button/button.component.d.ts +1 -1
  36. package/lib/datepicker/datepicker.component.d.ts +1 -1
  37. package/lib/dropdown/dropdown-option.directive.d.ts +1 -1
  38. package/lib/dropdown/dropdown.component.d.ts +1 -1
  39. package/lib/green-angular.module.d.ts +2 -1
  40. package/lib/modal/modal.component.d.ts +4 -4
  41. package/lib/pagination/index.d.ts +2 -0
  42. package/lib/pagination/pagination.component.d.ts +42 -0
  43. package/lib/pagination/pagination.module.d.ts +8 -0
  44. package/lib/progress-circle/progress-circle.component.d.ts +2 -3
  45. package/lib/segmented-control/segmented-control.component.d.ts +1 -1
  46. package/lib/slider/index.d.ts +2 -0
  47. package/lib/slider/slider.component.d.ts +36 -0
  48. package/lib/slider/slider.module.d.ts +9 -0
  49. package/package.json +5 -5
  50. package/sebgroup-green-angular.d.ts +0 -5
@@ -1,14 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, Input, Output, ContentChildren, NgModule, ChangeDetectionStrategy, HostBinding, Directive, Injector, Inject, ViewChild, ContentChild } from '@angular/core';
3
- import * as i2 from '@angular/common';
3
+ import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { randomId, dropdownValues, createDropdown, months, years, createDatepicker } from '@sebgroup/extract';
6
- import { NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import { randomId, dropdownValues, createDropdown, months, years, createDatepicker, calculateDegrees, sliderColors, getSliderTrackBackground, PaginationI18n } from '@sebgroup/extract';
6
+ import * as i2 from '@angular/forms';
7
+ import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7
8
  import { startOfDay, endOfDay } from 'date-fns';
8
9
  import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
9
- import * as i1 from '@angular/cdk/a11y';
10
+ import * as i1$1 from '@angular/cdk/a11y';
10
11
  import { A11yModule } from '@angular/cdk/a11y';
11
- import * as i2$1 from '@angular/router';
12
+ import * as i1$2 from '@angular/router';
12
13
  import { RouterModule } from '@angular/router';
13
14
 
14
15
  class NggAccordionListItemComponent {
@@ -39,9 +40,9 @@ class NggAccordionListItemComponent {
39
40
  this.expandedChange.emit(this);
40
41
  }
41
42
  }
42
- NggAccordionListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggAccordionListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
43
- NggAccordionListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggAccordionListItemComponent, selector: "div[ngg-accordion-list-item]", inputs: { id: "id", listItemHeader: "listItemHeader", listItemSubHeader: "listItemSubHeader" }, outputs: { expandedChange: "expandedChange" }, ngImport: i0, template: "<ng-container data-testid=\"accordion-list-item-root\">\n <div role=\"heading\" aria-level=\"2\" [attr.id]=\"id\">\n <button data-testid=\"accordion-list-item-expander-button\" [attr.id]=\"id + '_header'\" (click)=\"toggleExpanded()\"\n tabindex=\"0\" [attr.aria-expanded]=\"this.isExpanded\" [attr.aria-controls]=\"id + '_section'\">\n <span data-testid=\"accordion-list-item-header\">{{listItemHeader}}</span>\n <span data-testid=\"accordion-list-item-subheader\">{{listItemSubHeader}}</span>\n <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18.8095 9.22817L18.1907 8.60942C18.0438 8.46255 17.8063 8.46255 17.6595 8.60942L12.0001 14.2563L6.34072 8.60942C6.19385 8.46255 5.95635 8.46255 5.80947 8.60942L5.19072 9.22817C5.04385 9.37505 5.04385 9.61255 5.19072 9.75942L11.7345 16.3032C11.8813 16.45 12.1188 16.45 12.2657 16.3032L18.8095 9.75942C18.9563 9.61255 18.9563 9.37505 18.8095 9.22817Z\"\n fill=\"#333333\" />\n </svg>\n </button>\n <div role=\"region\" [hidden]=\"!this.isExpanded\"\n [ngStyle]=\"{height: this.contentHeight}\" [id]=\"id + '_section'\" [attr.aria-labelledby]=\"id + '_header'\"\n data-testid=\"accordion-list-item-content\">\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</ng-container>", directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggAccordionListItemComponent, decorators: [{
43
+ NggAccordionListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
44
+ NggAccordionListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggAccordionListItemComponent, selector: "div[ngg-accordion-list-item]", inputs: { id: "id", listItemHeader: "listItemHeader", listItemSubHeader: "listItemSubHeader" }, outputs: { expandedChange: "expandedChange" }, ngImport: i0, template: "<ng-container data-testid=\"accordion-list-item-root\">\n <div role=\"heading\" aria-level=\"2\" [attr.id]=\"id\">\n <button data-testid=\"accordion-list-item-expander-button\" [attr.id]=\"id + '_header'\" (click)=\"toggleExpanded()\"\n tabindex=\"0\" [attr.aria-expanded]=\"this.isExpanded\" [attr.aria-controls]=\"id + '_section'\">\n <span data-testid=\"accordion-list-item-header\">{{listItemHeader}}</span>\n <span data-testid=\"accordion-list-item-subheader\">{{listItemSubHeader}}</span>\n <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18.8095 9.22817L18.1907 8.60942C18.0438 8.46255 17.8063 8.46255 17.6595 8.60942L12.0001 14.2563L6.34072 8.60942C6.19385 8.46255 5.95635 8.46255 5.80947 8.60942L5.19072 9.22817C5.04385 9.37505 5.04385 9.61255 5.19072 9.75942L11.7345 16.3032C11.8813 16.45 12.1188 16.45 12.2657 16.3032L18.8095 9.75942C18.9563 9.61255 18.9563 9.37505 18.8095 9.22817Z\"\n fill=\"#333333\" />\n </svg>\n </button>\n <div role=\"region\" [hidden]=\"!this.isExpanded\"\n [ngStyle]=\"{height: this.contentHeight}\" [id]=\"id + '_section'\" [attr.aria-labelledby]=\"id + '_header'\"\n data-testid=\"accordion-list-item-content\">\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</ng-container>", dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionListItemComponent, decorators: [{
45
46
  type: Component,
46
47
  args: [{ selector: 'div[ngg-accordion-list-item]', template: "<ng-container data-testid=\"accordion-list-item-root\">\n <div role=\"heading\" aria-level=\"2\" [attr.id]=\"id\">\n <button data-testid=\"accordion-list-item-expander-button\" [attr.id]=\"id + '_header'\" (click)=\"toggleExpanded()\"\n tabindex=\"0\" [attr.aria-expanded]=\"this.isExpanded\" [attr.aria-controls]=\"id + '_section'\">\n <span data-testid=\"accordion-list-item-header\">{{listItemHeader}}</span>\n <span data-testid=\"accordion-list-item-subheader\">{{listItemSubHeader}}</span>\n <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18.8095 9.22817L18.1907 8.60942C18.0438 8.46255 17.8063 8.46255 17.6595 8.60942L12.0001 14.2563L6.34072 8.60942C6.19385 8.46255 5.95635 8.46255 5.80947 8.60942L5.19072 9.22817C5.04385 9.37505 5.04385 9.61255 5.19072 9.75942L11.7345 16.3032C11.8813 16.45 12.1188 16.45 12.2657 16.3032L18.8095 9.75942C18.9563 9.61255 18.9563 9.37505 18.8095 9.22817Z\"\n fill=\"#333333\" />\n </svg>\n </button>\n <div role=\"region\" [hidden]=\"!this.isExpanded\"\n [ngStyle]=\"{height: this.contentHeight}\" [id]=\"id + '_section'\" [attr.aria-labelledby]=\"id + '_header'\"\n data-testid=\"accordion-list-item-content\">\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</ng-container>" }]
47
48
  }], propDecorators: { id: [{
@@ -111,9 +112,9 @@ class NggAccordionComponent {
111
112
  }
112
113
  }
113
114
  }
114
- NggAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
115
- NggAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggAccordionComponent, selector: "ngg-accordion", inputs: { closeOthers: "closeOthers", expandAll: "expandAll" }, queries: [{ propertyName: "items", predicate: NggAccordionListItemComponent }], ngImport: i0, template: "<div class=\"accordion\" data-testid=\"accordion-root\">\n <ng-content></ng-content>\n</div>\n" });
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggAccordionComponent, decorators: [{
115
+ NggAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
+ NggAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggAccordionComponent, selector: "ngg-accordion", inputs: { closeOthers: "closeOthers", expandAll: "expandAll" }, queries: [{ propertyName: "items", predicate: NggAccordionListItemComponent }], ngImport: i0, template: "<div class=\"accordion\" data-testid=\"accordion-root\">\n <ng-content></ng-content>\n</div>\n" });
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionComponent, decorators: [{
117
118
  type: Component,
118
119
  args: [{ selector: "ngg-accordion", template: "<div class=\"accordion\" data-testid=\"accordion-root\">\n <ng-content></ng-content>\n</div>\n" }]
119
120
  }], propDecorators: { items: [{
@@ -127,10 +128,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
127
128
 
128
129
  class NggAccordionModule {
129
130
  }
130
- NggAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
131
- NggAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggAccordionModule, declarations: [NggAccordionListItemComponent, NggAccordionComponent], imports: [CommonModule], exports: [NggAccordionListItemComponent, NggAccordionComponent] });
132
- NggAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggAccordionModule, imports: [[CommonModule]] });
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggAccordionModule, decorators: [{
131
+ NggAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
132
+ NggAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionModule, declarations: [NggAccordionListItemComponent, NggAccordionComponent], imports: [CommonModule], exports: [NggAccordionListItemComponent, NggAccordionComponent] });
133
+ NggAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionModule, imports: [CommonModule] });
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionModule, decorators: [{
134
135
  type: NgModule,
135
136
  args: [{
136
137
  imports: [CommonModule],
@@ -140,13 +141,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
140
141
  }] });
141
142
 
142
143
  class NggBadgeComponent {
143
- //eslint-disable-next-line
144
- constructor() {
145
- /** The color of the component */
146
- this.badgeType = '';
147
- /** Callback when component is dismissed */
148
- this.handleClose = new EventEmitter();
149
- }
150
144
  /** Flag whether the component can be dismissed */
151
145
  set isCloseable(value) {
152
146
  this._isCloseable = value;
@@ -157,6 +151,13 @@ class NggBadgeComponent {
157
151
  get class() {
158
152
  return ['badge', this.badgeType].join(' ');
159
153
  }
154
+ //eslint-disable-next-line
155
+ constructor() {
156
+ /** The color of the component */
157
+ this.badgeType = '';
158
+ /** Callback when component is dismissed */
159
+ this.handleClose = new EventEmitter();
160
+ }
160
161
  ngOnInit() {
161
162
  if (!!this.customColor || !!this.customBackgroundColor) {
162
163
  this.badgeType = '';
@@ -166,8 +167,8 @@ class NggBadgeComponent {
166
167
  this.handleClose.emit(e);
167
168
  }
168
169
  }
169
- NggBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
170
- 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: `
170
+ NggBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
171
+ NggBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.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: `
171
172
  <strong>
172
173
  <ng-content></ng-content>
173
174
  </strong>
@@ -175,8 +176,8 @@ NggBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
175
176
  {{ closeText }}
176
177
  <i></i>
177
178
  </button>
178
- `, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeComponent, decorators: [{
179
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeComponent, decorators: [{
180
181
  type: Component,
181
182
  args: [{
182
183
  // we need to disable this warning since we don't want the badge component to create a new element
@@ -218,10 +219,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
218
219
 
219
220
  class NggBadgeModule {
220
221
  }
221
- NggBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
222
- NggBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeModule, declarations: [NggBadgeComponent], imports: [CommonModule], exports: [NggBadgeComponent] });
223
- NggBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeModule, imports: [[CommonModule]] });
224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggBadgeModule, decorators: [{
222
+ NggBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
223
+ NggBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeModule, declarations: [NggBadgeComponent], imports: [CommonModule], exports: [NggBadgeComponent] });
224
+ NggBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeModule, imports: [CommonModule] });
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeModule, decorators: [{
225
226
  type: NgModule,
226
227
  args: [{
227
228
  declarations: [NggBadgeComponent],
@@ -230,14 +231,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
230
231
  }]
231
232
  }] });
232
233
 
234
+ class NggButtonComponent {
235
+ get classes() {
236
+ return [this.variant, this.size ? this.size : false].filter(Boolean).join(" ");
237
+ }
238
+ }
239
+ NggButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
240
+ NggButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggButtonComponent, selector: "[ngg-button]", inputs: { variant: "variant", size: "size" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonComponent, decorators: [{
242
+ type: Component,
243
+ args: [{
244
+ // eslint-disable-next-line @angular-eslint/component-selector
245
+ selector: '[ngg-button]',
246
+ template: `<ng-content></ng-content>`,
247
+ changeDetection: ChangeDetectionStrategy.OnPush
248
+ }]
249
+ }], propDecorators: { variant: [{
250
+ type: Input
251
+ }], size: [{
252
+ type: Input
253
+ }], classes: [{
254
+ type: HostBinding,
255
+ args: ['class']
256
+ }] } });
257
+
258
+ class NggButtonModule {
259
+ }
260
+ NggButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
261
+ NggButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggButtonModule, declarations: [NggButtonComponent], imports: [CommonModule], exports: [NggButtonComponent] });
262
+ NggButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonModule, imports: [CommonModule] });
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonModule, decorators: [{
264
+ type: NgModule,
265
+ args: [{
266
+ declarations: [NggButtonComponent],
267
+ imports: [CommonModule],
268
+ exports: [NggButtonComponent],
269
+ }]
270
+ }] });
271
+
233
272
  class NggDropdownOptionDirective {
234
273
  constructor(templateRef) {
235
274
  this.templateRef = templateRef;
236
275
  }
237
276
  }
238
- NggDropdownOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownOptionDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
239
- NggDropdownOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.3", type: NggDropdownOptionDirective, selector: "[nggDropdownOption]", ngImport: i0 });
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownOptionDirective, decorators: [{
277
+ NggDropdownOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownOptionDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
278
+ NggDropdownOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: NggDropdownOptionDirective, selector: "[nggDropdownOption]", ngImport: i0 });
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownOptionDirective, decorators: [{
241
280
  type: Directive,
242
281
  args: [{
243
282
  selector: '[nggDropdownOption]',
@@ -245,24 +284,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
245
284
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
246
285
 
247
286
  class NggDropdownComponent {
248
- constructor(cd, injector) {
249
- var _a, _b, _c;
250
- this.cd = cd;
251
- this.injector = injector;
252
- this.loop = false;
253
- this.options = [];
254
- this._multiSelect = false;
255
- this._searchable = false;
256
- this.valueChange = new EventEmitter();
257
- this.touched = new EventEmitter();
258
- this.toggler = (_a = dropdownValues().elements) === null || _a === void 0 ? void 0 : _a.toggler;
259
- this.listbox = (_b = dropdownValues().elements) === null || _b === void 0 ? void 0 : _b.listbox;
260
- this.fieldset = (_c = dropdownValues().elements) === null || _c === void 0 ? void 0 : _c.fieldset;
261
- this.trackByKey = (index, option) => {
262
- var _a;
263
- return (_a = option.attributes.id) !== null && _a !== void 0 ? _a : '';
264
- };
265
- }
266
287
  set multiSelect(value) {
267
288
  this._multiSelect = this.convertToBoolean(value);
268
289
  }
@@ -286,6 +307,24 @@ class NggDropdownComponent {
286
307
  get control() {
287
308
  return this.injector.get(NgControl);
288
309
  }
310
+ constructor(cd, injector) {
311
+ var _a, _b, _c;
312
+ this.cd = cd;
313
+ this.injector = injector;
314
+ this.loop = false;
315
+ this.options = [];
316
+ this._multiSelect = false;
317
+ this._searchable = false;
318
+ this.valueChange = new EventEmitter();
319
+ this.touched = new EventEmitter();
320
+ this.toggler = (_a = dropdownValues().elements) === null || _a === void 0 ? void 0 : _a.toggler;
321
+ this.listbox = (_b = dropdownValues().elements) === null || _b === void 0 ? void 0 : _b.listbox;
322
+ this.fieldset = (_c = dropdownValues().elements) === null || _c === void 0 ? void 0 : _c.fieldset;
323
+ this.trackByKey = (index, option) => {
324
+ var _a;
325
+ return (_a = option.attributes.id) !== null && _a !== void 0 ? _a : '';
326
+ };
327
+ }
289
328
  ngAfterViewInit() {
290
329
  var _a, _b, _c;
291
330
  if (((_a = this.togglerRef) === null || _a === void 0 ? void 0 : _a.nativeElement) && ((_b = this.listboxRef) === null || _b === void 0 ? void 0 : _b.nativeElement)) {
@@ -355,15 +394,15 @@ class NggDropdownComponent {
355
394
  return (value === '' || value === 'true' || value.toString() === 'true' || false);
356
395
  }
357
396
  }
358
- NggDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: Injector }], target: i0.ɵɵFactoryTarget.Component });
359
- NggDropdownComponent.ɵcmp = 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: [
397
+ NggDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: Injector }], target: i0.ɵɵFactoryTarget.Component });
398
+ NggDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.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: [
360
399
  {
361
400
  provide: NG_VALUE_ACCESSOR,
362
401
  useExisting: NggDropdownComponent,
363
402
  multi: true,
364
403
  },
365
- ], 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 class=\"form-group\">\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 <i></i>\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 <!--TODO: Improve checkboxes in dropdown angular-->\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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownComponent, decorators: [{
404
+ ], 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 class=\"form-group\">\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 <i></i>\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 <!--TODO: Improve checkboxes in dropdown angular-->\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", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
405
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownComponent, decorators: [{
367
406
  type: Component,
368
407
  args: [{ selector: 'ngg-dropdown', providers: [
369
408
  {
@@ -424,32 +463,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
424
463
  }] } });
425
464
 
426
465
  class NggDatepickerComponent {
427
- constructor(_cdr) {
428
- this._cdr = _cdr;
429
- this.id = randomId();
430
- this.isValid = null;
431
- this.valueChange = new EventEmitter();
432
- this._months = months({});
433
- this.listener = (data, state) => {
434
- var _a, _b, _c, _d, _e;
435
- if (this.dp && state) {
436
- this.dp.state = Object.assign({}, state);
437
- this.years = years({
438
- from: (_b = (_a = this.dp.state) === null || _a === void 0 ? void 0 : _a.minDate) === null || _b === void 0 ? void 0 : _b.getFullYear(),
439
- to: (_d = (_c = this.dp.state) === null || _c === void 0 ? void 0 : _c.maxDate) === null || _d === void 0 ? void 0 : _d.getFullYear(),
440
- });
441
- }
442
- if (data) {
443
- // only emit change event if date has changed
444
- if (((_e = this.data) === null || _e === void 0 ? void 0 : _e.selectedDate) !== data.selectedDate) {
445
- this.valueChange.emit(data.selectedDate);
446
- this.onChangeFn && this.onChangeFn(data.selectedDate);
447
- }
448
- this.data = data;
449
- }
450
- this._cdr.detectChanges();
451
- };
452
- }
453
466
  get months() {
454
467
  return this._months;
455
468
  }
@@ -477,6 +490,32 @@ class NggDatepickerComponent {
477
490
  }
478
491
  }
479
492
  }
493
+ constructor(_cdr) {
494
+ this._cdr = _cdr;
495
+ this.id = randomId();
496
+ this.isValid = null;
497
+ this.valueChange = new EventEmitter();
498
+ this._months = months({});
499
+ this.listener = (data, state) => {
500
+ var _a, _b, _c, _d, _e;
501
+ if (this.dp && state) {
502
+ this.dp.state = Object.assign({}, state);
503
+ this.years = years({
504
+ from: (_b = (_a = this.dp.state) === null || _a === void 0 ? void 0 : _a.minDate) === null || _b === void 0 ? void 0 : _b.getFullYear(),
505
+ to: (_d = (_c = this.dp.state) === null || _c === void 0 ? void 0 : _c.maxDate) === null || _d === void 0 ? void 0 : _d.getFullYear(),
506
+ });
507
+ }
508
+ if (data) {
509
+ // only emit change event if date has changed
510
+ if (((_e = this.data) === null || _e === void 0 ? void 0 : _e.selectedDate) !== data.selectedDate) {
511
+ this.valueChange.emit(data.selectedDate);
512
+ this.onChangeFn && this.onChangeFn(data.selectedDate);
513
+ }
514
+ this.data = data;
515
+ }
516
+ this._cdr.detectChanges();
517
+ };
518
+ }
480
519
  writeValue(value) {
481
520
  this.value = value;
482
521
  }
@@ -540,15 +579,15 @@ class NggDatepickerComponent {
540
579
  }
541
580
  }
542
581
  }
543
- NggDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
544
- 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: [
582
+ NggDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
583
+ NggDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggDatepickerComponent, selector: "ngg-datepicker", inputs: { options: "options", value: "value", id: "id", label: "label", isValid: "isValid" }, outputs: { valueChange: "valueChange" }, providers: [
545
584
  {
546
585
  provide: NG_VALUE_ACCESSOR,
547
586
  useExisting: NggDatepickerComponent,
548
587
  multi: true,
549
588
  },
550
- ], 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 }], usesOnChanges: 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 (blur)=\"blurInput()\"\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 (focusout)=\"focusoutDialog($event)\"\n>\n <button type=\"button\" class=\"close\" (click)=\"dp?.close()\">\n <i></i>Close\n </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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerComponent, decorators: [{
589
+ ], 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 }], usesOnChanges: 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 (blur)=\"blurInput()\"\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 (focusout)=\"focusoutDialog($event)\"\n>\n <button type=\"button\" class=\"close\" (click)=\"dp?.close()\">\n <i></i>Close\n </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", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NggDropdownComponent, selector: "ngg-dropdown", inputs: ["id", "texts", "loop", "display", "useValue", "label", "options", "valid", "invalid", "compareWith", "searchFilter", "multiSelect", "searchable", "value"], outputs: ["valueChange", "touched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
590
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerComponent, decorators: [{
552
591
  type: Component,
553
592
  args: [{ selector: 'ngg-datepicker', providers: [
554
593
  {
@@ -617,10 +656,10 @@ function dateValidator(dates) {
617
656
 
618
657
  class NggDropdownModule {
619
658
  }
620
- NggDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
621
- NggDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownModule, declarations: [NggDropdownComponent, NggDropdownOptionDirective], imports: [CommonModule], exports: [NggDropdownComponent, NggDropdownOptionDirective] });
622
- NggDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownModule, imports: [[CommonModule]] });
623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDropdownModule, decorators: [{
659
+ NggDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
660
+ NggDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownModule, declarations: [NggDropdownComponent, NggDropdownOptionDirective], imports: [CommonModule], exports: [NggDropdownComponent, NggDropdownOptionDirective] });
661
+ NggDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownModule, imports: [CommonModule] });
662
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownModule, decorators: [{
624
663
  type: NgModule,
625
664
  args: [{
626
665
  declarations: [NggDropdownComponent, NggDropdownOptionDirective],
@@ -631,10 +670,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
631
670
 
632
671
  class NggDatepickerModule {
633
672
  }
634
- NggDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
635
- NggDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerModule, declarations: [NggDatepickerComponent], imports: [CommonModule, NggDropdownModule], exports: [NggDatepickerComponent] });
636
- NggDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerModule, imports: [[CommonModule, NggDropdownModule]] });
637
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggDatepickerModule, decorators: [{
673
+ NggDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
674
+ NggDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerModule, declarations: [NggDatepickerComponent], imports: [CommonModule, NggDropdownModule], exports: [NggDatepickerComponent] });
675
+ NggDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerModule, imports: [CommonModule, NggDropdownModule] });
676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerModule, decorators: [{
638
677
  type: NgModule,
639
678
  args: [{
640
679
  declarations: [NggDatepickerComponent],
@@ -644,15 +683,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
644
683
  }] });
645
684
 
646
685
  class NggModalComponent {
647
- constructor(ref, configurableFocusTrapFactory) {
648
- this.ref = ref;
649
- this.configurableFocusTrapFactory = configurableFocusTrapFactory;
650
- this.isOpenChange = new EventEmitter();
651
- this.closed = new EventEmitter();
652
- this.confirm = new EventEmitter();
653
- this.dismiss = new EventEmitter();
654
- this.configurableFocusTrap = this.configurableFocusTrapFactory.create(this.ref.nativeElement);
655
- }
656
686
  get trapFocus() {
657
687
  return this._trapFocus;
658
688
  }
@@ -684,6 +714,15 @@ class NggModalComponent {
684
714
  }
685
715
  }
686
716
  get open() { return this.isOpen; }
717
+ constructor(ref, configurableFocusTrapFactory) {
718
+ this.ref = ref;
719
+ this.configurableFocusTrapFactory = configurableFocusTrapFactory;
720
+ this.isOpenChange = new EventEmitter();
721
+ this.closed = new EventEmitter();
722
+ this.confirm = new EventEmitter();
723
+ this.dismiss = new EventEmitter();
724
+ this.configurableFocusTrap = this.configurableFocusTrapFactory.create(this.ref.nativeElement);
725
+ }
687
726
  ngOnInit() {
688
727
  if (this._isOpen && this.trapFocus)
689
728
  this.enableFocusTrap();
@@ -730,12 +769,12 @@ class NggModalComponent {
730
769
  enableBodyScroll(this.ref.nativeElement);
731
770
  }
732
771
  }
733
- NggModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalComponent, deps: [{ token: i0.ElementRef }, { token: i1.ConfigurableFocusTrapFactory }], target: i0.ɵɵFactoryTarget.Component });
734
- 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", trapFocus: "trapFocus", 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 i2.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return i2.NgSwitch; }), selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i0.forwardRef(function () { return i2.NgSwitchCase; }), selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i0.forwardRef(function () { return i2.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i0.forwardRef(function () { return i2.NgSwitchDefault; }), selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalComponent, decorators: [{
772
+ NggModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ConfigurableFocusTrapFactory }], target: i0.ɵɵFactoryTarget.Component });
773
+ NggModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggModalComponent, selector: "ngg-modal", inputs: { modalType: "modalType", header: "header", confirmLabel: "confirmLabel", dismissLabel: "dismissLabel", size: "size", trapFocus: "trapFocus", 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"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitch; }), selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitchCase; }), selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitchDefault; }), selector: "[ngSwitchDefault]" }, { kind: "component", type: i0.forwardRef(function () { return NggModalHeaderComponent; }), selector: "[ngg-modal-header]", inputs: ["header"], outputs: ["closed"] }, { kind: "component", type: i0.forwardRef(function () { return NggModalBodyComponent; }), selector: "[ngg-modal-body]" }, { kind: "component", type: i0.forwardRef(function () { return NggModalFooterComponent; }), selector: "[ngg-modal-footer]", inputs: ["dismissLabel", "confirmLabel"], outputs: ["dismiss", "confirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalComponent, decorators: [{
736
775
  type: Component,
737
776
  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"] }]
738
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.ConfigurableFocusTrapFactory }]; }, propDecorators: { modalType: [{
777
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ConfigurableFocusTrapFactory }]; }, propDecorators: { modalType: [{
739
778
  type: Input
740
779
  }], header: [{
741
780
  type: Input
@@ -772,15 +811,15 @@ class NggModalHeaderComponent {
772
811
  this.closed.emit(event);
773
812
  }
774
813
  }
775
- NggModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
776
- 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: `
814
+ NggModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
815
+ NggModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggModalHeaderComponent, selector: "[ngg-modal-header]", inputs: { header: "header" }, outputs: { closed: "closed" }, ngImport: i0, template: `
777
816
  <h3 data-testid="modal-header-text">{{header}}</h3>
778
817
  <button data-testid="modal-close-button" class="close" (click)="this.handleClose($event)">
779
818
  <span className="sr-only">Close</span>
780
819
  <i></i>
781
820
  </button>
782
821
  `, 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"] });
783
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalHeaderComponent, decorators: [{
822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalHeaderComponent, decorators: [{
784
823
  type: Component,
785
824
  args: [{ selector: '[ngg-modal-header]', template: `
786
825
  <h3 data-testid="modal-header-text">{{header}}</h3>
@@ -796,9 +835,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
796
835
  }] } });
797
836
  class NggModalBodyComponent {
798
837
  }
799
- NggModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
800
- 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"] });
801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalBodyComponent, decorators: [{
838
+ NggModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
839
+ NggModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.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"] });
840
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalBodyComponent, decorators: [{
802
841
  type: Component,
803
842
  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"] }]
804
843
  }] });
@@ -814,12 +853,12 @@ class NggModalFooterComponent {
814
853
  this.confirm.emit(event);
815
854
  }
816
855
  }
817
- NggModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
818
- 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: `
856
+ NggModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
857
+ NggModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggModalFooterComponent, selector: "[ngg-modal-footer]", inputs: { dismissLabel: "dismissLabel", confirmLabel: "confirmLabel" }, outputs: { dismiss: "dismiss", confirm: "confirm" }, ngImport: i0, template: `
819
858
  <button data-testid="modal-dismiss-button" *ngIf="dismissLabel" class="secondary" (click)="this.handleDismiss($event)">{{dismissLabel}}</button>
820
859
  <button data-testid="modal-confirm-button" *ngIf="confirmLabel" class="primary" (click)="this.handleConfirm($event)">{{confirmLabel}}</button>
821
- `, 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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
822
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalFooterComponent, decorators: [{
860
+ `, 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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalFooterComponent, decorators: [{
823
862
  type: Component,
824
863
  args: [{ selector: '[ngg-modal-footer]', template: `
825
864
  <button data-testid="modal-dismiss-button" *ngIf="dismissLabel" class="secondary" (click)="this.handleDismiss($event)">{{dismissLabel}}</button>
@@ -846,13 +885,13 @@ const EXPORTS = [
846
885
  ];
847
886
  class NggModalModule {
848
887
  }
849
- NggModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
850
- NggModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalModule, declarations: [NggModalComponent,
888
+ NggModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
889
+ NggModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggModalModule, declarations: [NggModalComponent,
851
890
  NggModalHeaderComponent,
852
891
  NggModalBodyComponent,
853
892
  NggModalFooterComponent], imports: [A11yModule, CommonModule], exports: [NggModalComponent] });
854
- NggModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalModule, imports: [[A11yModule, CommonModule]] });
855
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModalModule, decorators: [{
893
+ NggModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalModule, imports: [A11yModule, CommonModule] });
894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalModule, decorators: [{
856
895
  type: NgModule,
857
896
  args: [{
858
897
  imports: [A11yModule, CommonModule],
@@ -866,31 +905,24 @@ class NggProgressCircleComponent {
866
905
  this._startValue = '0deg';
867
906
  this._endValue = '0deg';
868
907
  /** id of the progress circle */
869
- this.id = `progress-circle-${randomId()}`;
908
+ this.id = `${randomId()}-progress-circle`;
870
909
  /** theme of the progress circle */
871
910
  this.theme = 'warning';
872
911
  }
873
912
  /** progress circle value in percentage */
874
- set value(percent) {
875
- const degrees = this.calculateDegrees(percent);
876
- this._endValue = `${degrees}deg`;
877
- }
878
- calculateDegrees(percent) {
879
- if (percent > 100) {
880
- return 180;
913
+ set value(val) {
914
+ const degrees = `${calculateDegrees(val)}deg`;
915
+ this._endValue = degrees;
916
+ if (this.theme === 'disabled') {
917
+ this._startValue = degrees;
881
918
  }
882
- if (percent < 0) {
883
- return 0;
884
- }
885
- /** formula: ((n% * 360deg) / 100% ) / 2 */
886
- return percent * 1.8;
887
919
  }
888
920
  }
889
- NggProgressCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggProgressCircleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
890
- NggProgressCircleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggProgressCircleComponent, selector: "ngg-progress-circle", inputs: { id: "id", theme: "theme", value: "value" }, host: { properties: { "style.--start-value": "this._startValue", "style.--end-value": "this._endValue" } }, ngImport: i0, template: "<div\n class=\"outer-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n", directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
891
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggProgressCircleComponent, decorators: [{
921
+ NggProgressCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
922
+ NggProgressCircleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggProgressCircleComponent, selector: "ngg-progress-circle", inputs: { id: "id", theme: "theme", value: "value" }, host: { properties: { "style.--start-value": "this._startValue", "style.--end-value": "this._endValue" } }, ngImport: i0, template: "<div\n class=\"gds-progress-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleComponent, decorators: [{
892
924
  type: Component,
893
- args: [{ selector: 'ngg-progress-circle', template: "<div\n class=\"outer-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
925
+ args: [{ selector: 'ngg-progress-circle', template: "<div\n class=\"gds-progress-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
894
926
  }], propDecorators: { _startValue: [{
895
927
  type: HostBinding,
896
928
  args: ['style.--start-value']
@@ -907,10 +939,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
907
939
 
908
940
  class NggProgressCircleModule {
909
941
  }
910
- NggProgressCircleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggProgressCircleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
911
- NggProgressCircleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggProgressCircleModule, declarations: [NggProgressCircleComponent], imports: [CommonModule], exports: [NggProgressCircleComponent] });
912
- NggProgressCircleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggProgressCircleModule, imports: [[CommonModule]] });
913
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggProgressCircleModule, decorators: [{
942
+ NggProgressCircleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
943
+ NggProgressCircleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleModule, declarations: [NggProgressCircleComponent], imports: [CommonModule], exports: [NggProgressCircleComponent] });
944
+ NggProgressCircleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleModule, imports: [CommonModule] });
945
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleModule, decorators: [{
914
946
  type: NgModule,
915
947
  args: [{
916
948
  declarations: [NggProgressCircleComponent],
@@ -921,8 +953,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
921
953
 
922
954
  class NggSegmentedControlComponent {
923
955
  }
924
- NggSegmentedControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
925
- NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggSegmentedControlComponent, selector: "ngg-segmented-control", inputs: { $controls: "$controls" }, ngImport: i0, template: `
956
+ NggSegmentedControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
957
+ NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggSegmentedControlComponent, selector: "ngg-segmented-control", inputs: { $controls: "$controls" }, ngImport: i0, template: `
926
958
  <div class="group">
927
959
  <a
928
960
  *ngFor="let control of $controls | async"
@@ -932,12 +964,10 @@ NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
932
964
  >{{ control.text }}</a
933
965
  >
934
966
  </div>
935
- `, isInline: true, directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i2$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
936
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlComponent, decorators: [{
967
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
968
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlComponent, decorators: [{
937
969
  type: Component,
938
- args: [{
939
- selector: 'ngg-segmented-control',
940
- template: `
970
+ args: [{ selector: 'ngg-segmented-control', template: `
941
971
  <div class="group">
942
972
  <a
943
973
  *ngFor="let control of $controls | async"
@@ -947,20 +977,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
947
977
  >{{ control.text }}</a
948
978
  >
949
979
  </div>
950
- `,
951
- styles: [],
952
- changeDetection: ChangeDetectionStrategy.OnPush,
953
- }]
980
+ `, changeDetection: ChangeDetectionStrategy.OnPush }]
954
981
  }], propDecorators: { $controls: [{
955
982
  type: Input
956
983
  }] } });
957
984
 
958
985
  class NggSegmentedControlModule {
959
986
  }
960
- NggSegmentedControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
961
- NggSegmentedControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlModule, declarations: [NggSegmentedControlComponent], imports: [RouterModule, CommonModule], exports: [NggSegmentedControlComponent] });
962
- NggSegmentedControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlModule, imports: [[RouterModule, CommonModule]] });
963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggSegmentedControlModule, decorators: [{
987
+ NggSegmentedControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
988
+ NggSegmentedControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlModule, declarations: [NggSegmentedControlComponent], imports: [RouterModule, CommonModule], exports: [NggSegmentedControlComponent] });
989
+ NggSegmentedControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlModule, imports: [RouterModule, CommonModule] });
990
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlModule, decorators: [{
964
991
  type: NgModule,
965
992
  args: [{
966
993
  declarations: [NggSegmentedControlComponent],
@@ -969,64 +996,145 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
969
996
  }]
970
997
  }] });
971
998
 
972
- class NggButtonComponent {
973
- get classes() {
974
- return [this.variant, this.size ? this.size : false].filter(Boolean).join(" ");
999
+ class NggSliderComponent {
1000
+ constructor() {
1001
+ this.name = `${randomId()}-slider`;
1002
+ this.min = 0;
1003
+ this.max = 100;
1004
+ this.step = 1;
1005
+ this.label = '';
1006
+ this.instruction = '';
1007
+ this.placeholder = '';
1008
+ this.errorMessage = '';
1009
+ this.hasTextbox = false;
1010
+ this.disabled = false;
1011
+ this.value = 0;
1012
+ this.sliderChange = new EventEmitter();
1013
+ this.sliderTouch = new EventEmitter();
1014
+ this.style = {};
1015
+ }
1016
+ ngOnInit() {
1017
+ this.setTrackBackground();
1018
+ }
1019
+ ngOnChanges(changes) {
1020
+ if (changes['value']) {
1021
+ this.setTrackBackground();
1022
+ }
1023
+ }
1024
+ onBlur() {
1025
+ this.sliderTouch.emit(true);
1026
+ this.onTouchedFn && this.onTouchedFn();
1027
+ }
1028
+ handleChange() {
1029
+ var _a;
1030
+ this.value = (_a = this.value) !== null && _a !== void 0 ? _a : 0;
1031
+ this.setTrackBackground();
1032
+ this.sliderChange.emit(this.value);
1033
+ this.onChangeFn && this.onChangeFn(this.value);
1034
+ }
1035
+ setTrackBackground() {
1036
+ if (this.disabled) {
1037
+ this.style.background = sliderColors.disabled;
1038
+ return;
1039
+ }
1040
+ const percent = ((this.value - this.min) / (this.max - this.min)) * 100;
1041
+ this.style.background = getSliderTrackBackground(percent);
1042
+ }
1043
+ /** control value accessor functions */
1044
+ writeValue(val) {
1045
+ if (this.value !== val) {
1046
+ this.value = val !== null && val !== void 0 ? val : 0;
1047
+ this.handleChange();
1048
+ }
1049
+ }
1050
+ registerOnChange(fn) {
1051
+ this.onChangeFn = fn;
1052
+ }
1053
+ registerOnTouched(fn) {
1054
+ this.onTouchedFn = fn;
975
1055
  }
976
1056
  }
977
- NggButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
978
- NggButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: NggButtonComponent, selector: "[ngg-button]", inputs: { variant: "variant", size: "size" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
979
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggButtonComponent, decorators: [{
1057
+ NggSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1058
+ NggSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggSliderComponent, selector: "ngg-slider", inputs: { name: "name", min: "min", max: "max", step: "step", label: "label", instruction: "instruction", placeholder: "placeholder", errorMessage: "errorMessage", hasTextbox: "hasTextbox", disabled: "disabled", value: "value" }, outputs: { sliderChange: "sliderChange", sliderTouch: "sliderTouch" }, providers: [
1059
+ {
1060
+ provide: NG_VALUE_ACCESSOR,
1061
+ useExisting: NggSliderComponent,
1062
+ multi: true,
1063
+ },
1064
+ ], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\">{{ label }}</label>\n <p *ngIf=\"!!instruction\">{{ instruction }}</p>\n </div>\n <div *ngIf=\"hasTextbox\" class=\"form-group\">\n <input\n type=\"number\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n />\n <span *ngIf=\"!!errorMessage\" class=\"form-info\"></span>\n </div>\n</div>\n<input\n type=\"range\"\n [attr.id]=\"name\"\n [attr.name]=\"name\"\n [attr.min]=\"min\"\n [attr.max]=\"max\"\n [attr.step]=\"step\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [ngStyle]=\"style\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n/>\n<p *ngIf=\"!!errorMessage\" class=\"gds-slider-error-info\">\n {{ errorMessage }}\n</p>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1065
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderComponent, decorators: [{
980
1066
  type: Component,
981
- args: [{
982
- // eslint-disable-next-line @angular-eslint/component-selector
983
- selector: '[ngg-button]',
984
- template: `<ng-content></ng-content>`,
985
- changeDetection: ChangeDetectionStrategy.OnPush
986
- }]
987
- }], propDecorators: { variant: [{
1067
+ args: [{ selector: 'ngg-slider', providers: [
1068
+ {
1069
+ provide: NG_VALUE_ACCESSOR,
1070
+ useExisting: NggSliderComponent,
1071
+ multi: true,
1072
+ },
1073
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\">{{ label }}</label>\n <p *ngIf=\"!!instruction\">{{ instruction }}</p>\n </div>\n <div *ngIf=\"hasTextbox\" class=\"form-group\">\n <input\n type=\"number\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n />\n <span *ngIf=\"!!errorMessage\" class=\"form-info\"></span>\n </div>\n</div>\n<input\n type=\"range\"\n [attr.id]=\"name\"\n [attr.name]=\"name\"\n [attr.min]=\"min\"\n [attr.max]=\"max\"\n [attr.step]=\"step\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [ngStyle]=\"style\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n/>\n<p *ngIf=\"!!errorMessage\" class=\"gds-slider-error-info\">\n {{ errorMessage }}\n</p>\n" }]
1074
+ }], propDecorators: { name: [{
988
1075
  type: Input
989
- }], size: [{
1076
+ }], min: [{
990
1077
  type: Input
991
- }], classes: [{
992
- type: HostBinding,
993
- args: ['class']
1078
+ }], max: [{
1079
+ type: Input
1080
+ }], step: [{
1081
+ type: Input
1082
+ }], label: [{
1083
+ type: Input
1084
+ }], instruction: [{
1085
+ type: Input
1086
+ }], placeholder: [{
1087
+ type: Input
1088
+ }], errorMessage: [{
1089
+ type: Input
1090
+ }], hasTextbox: [{
1091
+ type: Input
1092
+ }], disabled: [{
1093
+ type: Input
1094
+ }], value: [{
1095
+ type: Input
1096
+ }], sliderChange: [{
1097
+ type: Output
1098
+ }], sliderTouch: [{
1099
+ type: Output
994
1100
  }] } });
995
1101
 
996
- class NggButtonModule {
1102
+ class NggSliderModule {
997
1103
  }
998
- NggButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
999
- NggButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggButtonModule, declarations: [NggButtonComponent], imports: [CommonModule], exports: [NggButtonComponent] });
1000
- NggButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggButtonModule, imports: [[CommonModule]] });
1001
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggButtonModule, decorators: [{
1104
+ NggSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1105
+ NggSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggSliderModule, declarations: [NggSliderComponent], imports: [CommonModule, FormsModule], exports: [NggSliderComponent] });
1106
+ NggSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderModule, imports: [CommonModule, FormsModule] });
1107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderModule, decorators: [{
1002
1108
  type: NgModule,
1003
1109
  args: [{
1004
- declarations: [NggButtonComponent],
1005
- imports: [CommonModule],
1006
- exports: [NggButtonComponent],
1110
+ imports: [CommonModule, FormsModule],
1111
+ exports: [NggSliderComponent],
1112
+ declarations: [NggSliderComponent],
1007
1113
  }]
1008
1114
  }] });
1009
1115
 
1010
1116
  class NggModule {
1011
1117
  }
1012
- NggModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1013
- NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModule, imports: [CommonModule], exports: [NggAccordionModule,
1118
+ NggModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1119
+ NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggModule, imports: [CommonModule], exports: [NggAccordionModule,
1014
1120
  NggBadgeModule,
1015
1121
  NggButtonModule,
1016
1122
  NggDatepickerModule,
1017
1123
  NggDropdownModule,
1018
1124
  NggModalModule,
1019
1125
  NggProgressCircleModule,
1020
- NggSegmentedControlModule] });
1021
- NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModule, imports: [[CommonModule], NggAccordionModule,
1126
+ NggSegmentedControlModule,
1127
+ NggSliderModule] });
1128
+ NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModule, imports: [CommonModule, NggAccordionModule,
1022
1129
  NggBadgeModule,
1023
1130
  NggButtonModule,
1024
1131
  NggDatepickerModule,
1025
1132
  NggDropdownModule,
1026
1133
  NggModalModule,
1027
1134
  NggProgressCircleModule,
1028
- NggSegmentedControlModule] });
1029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: NggModule, decorators: [{
1135
+ NggSegmentedControlModule,
1136
+ NggSliderModule] });
1137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModule, decorators: [{
1030
1138
  type: NgModule,
1031
1139
  args: [{
1032
1140
  declarations: [],
@@ -1040,13 +1148,199 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
1040
1148
  NggModalModule,
1041
1149
  NggProgressCircleModule,
1042
1150
  NggSegmentedControlModule,
1151
+ NggSliderModule,
1043
1152
  ],
1044
1153
  }]
1045
1154
  }] });
1046
1155
 
1156
+ class NggPaginationComponent {
1157
+ constructor() {
1158
+ /** Internationalization labels */
1159
+ this.i18n = PaginationI18n;
1160
+ /** Rendered size */
1161
+ this.size = 'small';
1162
+ /** Amount of pages to be displayed between the first and last */
1163
+ this.displayPages = 5;
1164
+ /** Total amount of items to be paginated */
1165
+ this.length = 0;
1166
+ /** Displayed items per page */
1167
+ this.pageSize = 10;
1168
+ this._pageIndex = 0;
1169
+ this._pageIndicies = [];
1170
+ /** Event emitted when a new page index is selected */
1171
+ this.page = new EventEmitter();
1172
+ }
1173
+ /** The zero-based page index of the displayed list of pages. Defaulted to 0. */
1174
+ get pageIndex() {
1175
+ return this._pageIndex;
1176
+ }
1177
+ set pageIndex(value) {
1178
+ this._pageIndex = Math.max(value, 0);
1179
+ }
1180
+ /** All centric page indicies to be displayed. */
1181
+ get pageIndicies() {
1182
+ return this._pageIndicies;
1183
+ }
1184
+ get totalPages() {
1185
+ if (!this.pageSize) {
1186
+ return 0;
1187
+ }
1188
+ return Math.ceil(this.length / this.pageSize);
1189
+ }
1190
+ ngOnChanges(changes) {
1191
+ if (changes.displayPages ||
1192
+ changes.pageIndex ||
1193
+ changes.pageSize ||
1194
+ changes.length) {
1195
+ this._pageIndicies = this.getDisplayedPageIndicies();
1196
+ }
1197
+ }
1198
+ hasPrevious() {
1199
+ return this.pageIndex >= 1;
1200
+ }
1201
+ hasNext() {
1202
+ return this.pageIndex < this.totalPages - 1;
1203
+ }
1204
+ gotoFirst() {
1205
+ if (!this.hasPrevious()) {
1206
+ return;
1207
+ }
1208
+ const previous = this.pageIndex;
1209
+ this.pageIndex = 0;
1210
+ this.emit(previous);
1211
+ }
1212
+ gotoLast() {
1213
+ if (!this.hasNext()) {
1214
+ return;
1215
+ }
1216
+ const previous = this.pageIndex;
1217
+ this.pageIndex = this.totalPages - 1;
1218
+ this.emit(previous);
1219
+ }
1220
+ gotoPrevious() {
1221
+ if (!this.hasPrevious()) {
1222
+ return;
1223
+ }
1224
+ const previous = this.pageIndex;
1225
+ this.pageIndex = previous - 1;
1226
+ this.emit(previous);
1227
+ }
1228
+ gotoNext() {
1229
+ if (!this.hasNext()) {
1230
+ return;
1231
+ }
1232
+ const previous = this.pageIndex;
1233
+ this.pageIndex = previous + 1;
1234
+ this.emit(previous);
1235
+ }
1236
+ goto(index) {
1237
+ if (index === this.pageIndex || index < 0 || index >= this.totalPages) {
1238
+ return;
1239
+ }
1240
+ const previous = this.pageIndex;
1241
+ this.pageIndex = index;
1242
+ this.emit(previous);
1243
+ }
1244
+ emit(previous) {
1245
+ this._pageIndicies = this.getDisplayedPageIndicies();
1246
+ this.page.emit({ pageIndex: this.pageIndex, previousPageIndex: previous });
1247
+ }
1248
+ getDisplayedPageIndicies() {
1249
+ // Do not render
1250
+ if (this.totalPages <= 1) {
1251
+ return [];
1252
+ }
1253
+ // All pages can fit
1254
+ if (this.totalPages <= this.displayPages)
1255
+ return [...Array(this.totalPages - 2).keys()].map((index) => index + 1);
1256
+ // Only first & last
1257
+ if (this.totalPages === 2)
1258
+ return [];
1259
+ return this.getCenteredPageIndicies();
1260
+ }
1261
+ /**
1262
+ * Find X (displayPages) amount of page indicies that are centered from the currently selected page index,
1263
+ * but exclude the first and last indicies if they are within the range.
1264
+ */
1265
+ getCenteredPageIndicies() {
1266
+ const pages = [];
1267
+ if (this.pageIndex === 0) {
1268
+ pages.push(this.pageIndex + 1);
1269
+ }
1270
+ else if (this.pageIndex === this.totalPages - 1) {
1271
+ pages.push(this.pageIndex - 1);
1272
+ }
1273
+ else {
1274
+ pages.push(this.pageIndex);
1275
+ }
1276
+ const addAfter = () => {
1277
+ const next = pages[pages.length - 1] + 1;
1278
+ if (next < this.totalPages - 1 && counter > 0) {
1279
+ pages.push(next);
1280
+ return true;
1281
+ }
1282
+ return false;
1283
+ };
1284
+ const addBefore = () => {
1285
+ const previous = pages[0] - 1;
1286
+ if (previous > 0 && counter > 0) {
1287
+ pages.unshift(previous);
1288
+ return true;
1289
+ }
1290
+ return false;
1291
+ };
1292
+ let counter = this.displayPages - 1;
1293
+ while (counter > 0) {
1294
+ const addedAfter = addAfter();
1295
+ if (addedAfter)
1296
+ counter--;
1297
+ const addedBefore = addBefore();
1298
+ if (addedBefore)
1299
+ counter--;
1300
+ if (!addedAfter && !addedBefore)
1301
+ break;
1302
+ }
1303
+ return pages;
1304
+ }
1305
+ }
1306
+ NggPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1307
+ NggPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggPaginationComponent, selector: "ngg-pagination", inputs: { i18n: "i18n", size: "size", displayPages: "displayPages", length: "length", pageSize: "pageSize", pageIndex: "pageIndex" }, outputs: { page: "page" }, usesOnChanges: true, ngImport: i0, template: "<nav\n [class]=\"'pagination ' + size\"\n role=\"navigation\"\n [attr.aria-label]=\"i18n.paginationLabel\"\n *ngIf=\"totalPages > 1\"\n>\n <ul class=\"gds-reset\">\n <li *ngIf=\"hasPrevious()\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoPrevious()\"\n [attr.aria-label]=\"i18n.previousPageLabel\"\n role=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\"\n />\n </svg>\n </a>\n </li>\n\n <li>\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoFirst()\"\n [attr.aria-current]=\"pageIndex === 0 ? 'page' : null\"\n [attr.aria-label]=\"i18n.firstPageLabel\"\n role=\"button\"\n >\n 1\n </a>\n </li>\n <li *ngIf=\"pageIndicies[0] > 1\" aria-hidden=\"true\">...</li>\n\n <li *ngFor=\"let index of pageIndicies\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"goto(index)\"\n [attr.aria-current]=\"pageIndex === index ? 'page' : null\"\n [attr.aria-label]=\"i18n.getPageLabel(index)\"\n role=\"button\"\n >\n {{ index + 1 }}\n </a>\n </li>\n\n <li\n *ngIf=\"pageIndicies[pageIndicies.length - 1] < totalPages - 2\"\n aria-hidden=\"true\"\n >\n ...\n </li>\n\n <li>\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoLast()\"\n [attr.aria-current]=\"pageIndex === totalPages - 1 ? 'page' : null\"\n [attr.aria-label]=\"i18n.lastPageLabel\"\n role=\"button\"\n >\n {{ totalPages }}\n </a>\n </li>\n <li *ngIf=\"hasNext()\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoNext()\"\n [attr.aria-label]=\"i18n.nextPageLabel\"\n role=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\n />\n </svg>\n </a>\n </li>\n </ul>\n</nav>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationComponent, decorators: [{
1309
+ type: Component,
1310
+ args: [{ selector: 'ngg-pagination', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav\n [class]=\"'pagination ' + size\"\n role=\"navigation\"\n [attr.aria-label]=\"i18n.paginationLabel\"\n *ngIf=\"totalPages > 1\"\n>\n <ul class=\"gds-reset\">\n <li *ngIf=\"hasPrevious()\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoPrevious()\"\n [attr.aria-label]=\"i18n.previousPageLabel\"\n role=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\"\n />\n </svg>\n </a>\n </li>\n\n <li>\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoFirst()\"\n [attr.aria-current]=\"pageIndex === 0 ? 'page' : null\"\n [attr.aria-label]=\"i18n.firstPageLabel\"\n role=\"button\"\n >\n 1\n </a>\n </li>\n <li *ngIf=\"pageIndicies[0] > 1\" aria-hidden=\"true\">...</li>\n\n <li *ngFor=\"let index of pageIndicies\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"goto(index)\"\n [attr.aria-current]=\"pageIndex === index ? 'page' : null\"\n [attr.aria-label]=\"i18n.getPageLabel(index)\"\n role=\"button\"\n >\n {{ index + 1 }}\n </a>\n </li>\n\n <li\n *ngIf=\"pageIndicies[pageIndicies.length - 1] < totalPages - 2\"\n aria-hidden=\"true\"\n >\n ...\n </li>\n\n <li>\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoLast()\"\n [attr.aria-current]=\"pageIndex === totalPages - 1 ? 'page' : null\"\n [attr.aria-label]=\"i18n.lastPageLabel\"\n role=\"button\"\n >\n {{ totalPages }}\n </a>\n </li>\n <li *ngIf=\"hasNext()\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoNext()\"\n [attr.aria-label]=\"i18n.nextPageLabel\"\n role=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\n />\n </svg>\n </a>\n </li>\n </ul>\n</nav>\n" }]
1311
+ }], propDecorators: { i18n: [{
1312
+ type: Input
1313
+ }], size: [{
1314
+ type: Input
1315
+ }], displayPages: [{
1316
+ type: Input
1317
+ }], length: [{
1318
+ type: Input
1319
+ }], pageSize: [{
1320
+ type: Input
1321
+ }], pageIndex: [{
1322
+ type: Input
1323
+ }], page: [{
1324
+ type: Output
1325
+ }] } });
1326
+
1327
+ class NggPaginationModule {
1328
+ }
1329
+ NggPaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1330
+ NggPaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationModule, declarations: [NggPaginationComponent], imports: [CommonModule], exports: [NggPaginationComponent] });
1331
+ NggPaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationModule, imports: [CommonModule] });
1332
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationModule, decorators: [{
1333
+ type: NgModule,
1334
+ args: [{
1335
+ declarations: [NggPaginationComponent],
1336
+ imports: [CommonModule],
1337
+ exports: [NggPaginationComponent],
1338
+ }]
1339
+ }] });
1340
+
1047
1341
  /**
1048
1342
  * Generated bundle index. Do not edit.
1049
1343
  */
1050
1344
 
1051
- export { NggAccordionComponent, NggAccordionListItemComponent, NggAccordionModule, NggBadgeComponent, NggBadgeModule, NggButtonComponent, NggButtonModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalHeaderComponent, NggModalModule, NggModule, NggProgressCircleComponent, NggProgressCircleModule, NggSegmentedControlComponent, NggSegmentedControlModule, dateValidator };
1345
+ export { NggAccordionComponent, NggAccordionListItemComponent, NggAccordionModule, NggBadgeComponent, NggBadgeModule, NggButtonComponent, NggButtonModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalHeaderComponent, NggModalModule, NggModule, NggPaginationComponent, NggPaginationModule, NggProgressCircleComponent, NggProgressCircleModule, NggSegmentedControlComponent, NggSegmentedControlModule, NggSliderComponent, NggSliderModule, dateValidator };
1052
1346
  //# sourceMappingURL=sebgroup-green-angular.mjs.map