@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.
- package/esm2020/index.mjs +3 -1
- package/esm2020/lib/accordion/accordion-list-item.component.mjs +3 -3
- package/esm2020/lib/accordion/accordion.component.mjs +3 -3
- package/esm2020/lib/accordion/accordion.module.mjs +5 -5
- package/esm2020/lib/badge/badge.component.mjs +12 -12
- package/esm2020/lib/badge/badge.module.mjs +5 -5
- package/esm2020/lib/button/button.component.mjs +3 -3
- package/esm2020/lib/button/button.module.mjs +5 -5
- package/esm2020/lib/datepicker/datepicker.component.mjs +32 -32
- package/esm2020/lib/datepicker/datepicker.module.mjs +5 -5
- package/esm2020/lib/dropdown/dropdown-option.directive.mjs +3 -3
- package/esm2020/lib/dropdown/dropdown.component.mjs +21 -21
- package/esm2020/lib/dropdown/dropdown.module.mjs +5 -5
- package/esm2020/lib/green-angular.module.mjs +12 -8
- package/esm2020/lib/modal/modal.component.mjs +23 -23
- package/esm2020/lib/modal/modal.module.mjs +5 -5
- package/esm2020/lib/pagination/index.mjs +3 -0
- package/esm2020/lib/pagination/pagination.component.mjs +175 -0
- package/esm2020/lib/pagination/pagination.module.mjs +18 -0
- package/esm2020/lib/progress-circle/progress-circle.component.mjs +12 -19
- package/esm2020/lib/progress-circle/progress-circle.module.mjs +5 -5
- package/esm2020/lib/segmented-control/segmented-control.component.mjs +9 -14
- package/esm2020/lib/segmented-control/segmented-control.module.mjs +5 -5
- package/esm2020/lib/slider/index.mjs +3 -0
- package/esm2020/lib/slider/slider.component.mjs +108 -0
- package/esm2020/lib/slider/slider.module.mjs +19 -0
- package/fesm2015/sebgroup-green-angular.mjs +482 -188
- package/fesm2015/sebgroup-green-angular.mjs.map +1 -1
- package/fesm2020/sebgroup-green-angular.mjs +478 -185
- package/fesm2020/sebgroup-green-angular.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/accordion/accordion-list-item.component.d.ts +1 -1
- package/lib/accordion/accordion.component.d.ts +1 -1
- package/lib/badge/badge.component.d.ts +1 -1
- package/lib/button/button.component.d.ts +1 -1
- package/lib/datepicker/datepicker.component.d.ts +1 -1
- package/lib/dropdown/dropdown-option.directive.d.ts +1 -1
- package/lib/dropdown/dropdown.component.d.ts +1 -1
- package/lib/green-angular.module.d.ts +2 -1
- package/lib/modal/modal.component.d.ts +4 -4
- package/lib/pagination/index.d.ts +2 -0
- package/lib/pagination/pagination.component.d.ts +42 -0
- package/lib/pagination/pagination.module.d.ts +8 -0
- package/lib/progress-circle/progress-circle.component.d.ts +2 -3
- package/lib/segmented-control/segmented-control.component.d.ts +1 -1
- package/lib/slider/index.d.ts +2 -0
- package/lib/slider/slider.component.d.ts +36 -0
- package/lib/slider/slider.module.d.ts +9 -0
- package/package.json +5 -5
- 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
|
|
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
|
|
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
|
-
import * as i1 from '@angular/cdk/a11y';
|
|
9
|
+
import * as i1$1 from '@angular/cdk/a11y';
|
|
9
10
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
10
11
|
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
|
|
11
|
-
import * as
|
|
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: "
|
|
43
|
-
NggAccordionListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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: [{
|
|
@@ -109,9 +110,9 @@ class NggAccordionComponent {
|
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
NggAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
113
|
-
NggAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
113
|
+
NggAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
114
|
+
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" });
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionComponent, decorators: [{
|
|
115
116
|
type: Component,
|
|
116
117
|
args: [{ selector: "ngg-accordion", template: "<div class=\"accordion\" data-testid=\"accordion-root\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
117
118
|
}], propDecorators: { items: [{
|
|
@@ -125,10 +126,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
125
126
|
|
|
126
127
|
class NggAccordionModule {
|
|
127
128
|
}
|
|
128
|
-
NggAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
129
|
-
NggAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
130
|
-
NggAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
129
|
+
NggAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
130
|
+
NggAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionModule, declarations: [NggAccordionListItemComponent, NggAccordionComponent], imports: [CommonModule], exports: [NggAccordionListItemComponent, NggAccordionComponent] });
|
|
131
|
+
NggAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionModule, imports: [CommonModule] });
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggAccordionModule, decorators: [{
|
|
132
133
|
type: NgModule,
|
|
133
134
|
args: [{
|
|
134
135
|
imports: [CommonModule],
|
|
@@ -138,13 +139,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
138
139
|
}] });
|
|
139
140
|
|
|
140
141
|
class NggBadgeComponent {
|
|
141
|
-
//eslint-disable-next-line
|
|
142
|
-
constructor() {
|
|
143
|
-
/** The color of the component */
|
|
144
|
-
this.badgeType = '';
|
|
145
|
-
/** Callback when component is dismissed */
|
|
146
|
-
this.handleClose = new EventEmitter();
|
|
147
|
-
}
|
|
148
142
|
/** Flag whether the component can be dismissed */
|
|
149
143
|
set isCloseable(value) {
|
|
150
144
|
this._isCloseable = value;
|
|
@@ -155,6 +149,13 @@ class NggBadgeComponent {
|
|
|
155
149
|
get class() {
|
|
156
150
|
return ['badge', this.badgeType].join(' ');
|
|
157
151
|
}
|
|
152
|
+
//eslint-disable-next-line
|
|
153
|
+
constructor() {
|
|
154
|
+
/** The color of the component */
|
|
155
|
+
this.badgeType = '';
|
|
156
|
+
/** Callback when component is dismissed */
|
|
157
|
+
this.handleClose = new EventEmitter();
|
|
158
|
+
}
|
|
158
159
|
ngOnInit() {
|
|
159
160
|
if (!!this.customColor || !!this.customBackgroundColor) {
|
|
160
161
|
this.badgeType = '';
|
|
@@ -164,8 +165,8 @@ class NggBadgeComponent {
|
|
|
164
165
|
this.handleClose.emit(e);
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
|
-
NggBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
168
|
-
NggBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
168
|
+
NggBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
169
|
+
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: `
|
|
169
170
|
<strong>
|
|
170
171
|
<ng-content></ng-content>
|
|
171
172
|
</strong>
|
|
@@ -173,8 +174,8 @@ NggBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
173
174
|
{{ closeText }}
|
|
174
175
|
<i></i>
|
|
175
176
|
</button>
|
|
176
|
-
`, isInline: true,
|
|
177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
177
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeComponent, decorators: [{
|
|
178
179
|
type: Component,
|
|
179
180
|
args: [{
|
|
180
181
|
// we need to disable this warning since we don't want the badge component to create a new element
|
|
@@ -216,10 +217,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
216
217
|
|
|
217
218
|
class NggBadgeModule {
|
|
218
219
|
}
|
|
219
|
-
NggBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
220
|
-
NggBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
221
|
-
NggBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
220
|
+
NggBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
221
|
+
NggBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeModule, declarations: [NggBadgeComponent], imports: [CommonModule], exports: [NggBadgeComponent] });
|
|
222
|
+
NggBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeModule, imports: [CommonModule] });
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggBadgeModule, decorators: [{
|
|
223
224
|
type: NgModule,
|
|
224
225
|
args: [{
|
|
225
226
|
declarations: [NggBadgeComponent],
|
|
@@ -228,14 +229,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
228
229
|
}]
|
|
229
230
|
}] });
|
|
230
231
|
|
|
232
|
+
class NggButtonComponent {
|
|
233
|
+
get classes() {
|
|
234
|
+
return [this.variant, this.size ? this.size : false].filter(Boolean).join(" ");
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
NggButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
+
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 });
|
|
239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonComponent, decorators: [{
|
|
240
|
+
type: Component,
|
|
241
|
+
args: [{
|
|
242
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
243
|
+
selector: '[ngg-button]',
|
|
244
|
+
template: `<ng-content></ng-content>`,
|
|
245
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
246
|
+
}]
|
|
247
|
+
}], propDecorators: { variant: [{
|
|
248
|
+
type: Input
|
|
249
|
+
}], size: [{
|
|
250
|
+
type: Input
|
|
251
|
+
}], classes: [{
|
|
252
|
+
type: HostBinding,
|
|
253
|
+
args: ['class']
|
|
254
|
+
}] } });
|
|
255
|
+
|
|
256
|
+
class NggButtonModule {
|
|
257
|
+
}
|
|
258
|
+
NggButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
259
|
+
NggButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggButtonModule, declarations: [NggButtonComponent], imports: [CommonModule], exports: [NggButtonComponent] });
|
|
260
|
+
NggButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonModule, imports: [CommonModule] });
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggButtonModule, decorators: [{
|
|
262
|
+
type: NgModule,
|
|
263
|
+
args: [{
|
|
264
|
+
declarations: [NggButtonComponent],
|
|
265
|
+
imports: [CommonModule],
|
|
266
|
+
exports: [NggButtonComponent],
|
|
267
|
+
}]
|
|
268
|
+
}] });
|
|
269
|
+
|
|
231
270
|
class NggDropdownOptionDirective {
|
|
232
271
|
constructor(templateRef) {
|
|
233
272
|
this.templateRef = templateRef;
|
|
234
273
|
}
|
|
235
274
|
}
|
|
236
|
-
NggDropdownOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
237
|
-
NggDropdownOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
275
|
+
NggDropdownOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownOptionDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
276
|
+
NggDropdownOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: NggDropdownOptionDirective, selector: "[nggDropdownOption]", ngImport: i0 });
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownOptionDirective, decorators: [{
|
|
239
278
|
type: Directive,
|
|
240
279
|
args: [{
|
|
241
280
|
selector: '[nggDropdownOption]',
|
|
@@ -243,22 +282,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
243
282
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
244
283
|
|
|
245
284
|
class NggDropdownComponent {
|
|
246
|
-
constructor(cd, injector) {
|
|
247
|
-
this.cd = cd;
|
|
248
|
-
this.injector = injector;
|
|
249
|
-
this.loop = false;
|
|
250
|
-
this.options = [];
|
|
251
|
-
this._multiSelect = false;
|
|
252
|
-
this._searchable = false;
|
|
253
|
-
this.valueChange = new EventEmitter();
|
|
254
|
-
this.touched = new EventEmitter();
|
|
255
|
-
this.toggler = dropdownValues().elements?.toggler;
|
|
256
|
-
this.listbox = dropdownValues().elements?.listbox;
|
|
257
|
-
this.fieldset = dropdownValues().elements?.fieldset;
|
|
258
|
-
this.trackByKey = (index, option) => {
|
|
259
|
-
return option.attributes.id ?? '';
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
285
|
set multiSelect(value) {
|
|
263
286
|
this._multiSelect = this.convertToBoolean(value);
|
|
264
287
|
}
|
|
@@ -281,6 +304,22 @@ class NggDropdownComponent {
|
|
|
281
304
|
get control() {
|
|
282
305
|
return this.injector.get(NgControl);
|
|
283
306
|
}
|
|
307
|
+
constructor(cd, injector) {
|
|
308
|
+
this.cd = cd;
|
|
309
|
+
this.injector = injector;
|
|
310
|
+
this.loop = false;
|
|
311
|
+
this.options = [];
|
|
312
|
+
this._multiSelect = false;
|
|
313
|
+
this._searchable = false;
|
|
314
|
+
this.valueChange = new EventEmitter();
|
|
315
|
+
this.touched = new EventEmitter();
|
|
316
|
+
this.toggler = dropdownValues().elements?.toggler;
|
|
317
|
+
this.listbox = dropdownValues().elements?.listbox;
|
|
318
|
+
this.fieldset = dropdownValues().elements?.fieldset;
|
|
319
|
+
this.trackByKey = (index, option) => {
|
|
320
|
+
return option.attributes.id ?? '';
|
|
321
|
+
};
|
|
322
|
+
}
|
|
284
323
|
ngAfterViewInit() {
|
|
285
324
|
if (this.togglerRef?.nativeElement && this.listboxRef?.nativeElement) {
|
|
286
325
|
this.handler = createDropdown(this.props, this.togglerRef.nativeElement, this.listboxRef.nativeElement, this.fieldsetRef?.nativeElement, (dropdown) => {
|
|
@@ -344,15 +383,15 @@ class NggDropdownComponent {
|
|
|
344
383
|
return (value === '' || value === 'true' || value.toString() === 'true' || false);
|
|
345
384
|
}
|
|
346
385
|
}
|
|
347
|
-
NggDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
348
|
-
NggDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
386
|
+
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 });
|
|
387
|
+
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: [
|
|
349
388
|
{
|
|
350
389
|
provide: NG_VALUE_ACCESSOR,
|
|
351
390
|
useExisting: NggDropdownComponent,
|
|
352
391
|
multi: true,
|
|
353
392
|
},
|
|
354
|
-
], 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",
|
|
355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
393
|
+
], 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 });
|
|
394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownComponent, decorators: [{
|
|
356
395
|
type: Component,
|
|
357
396
|
args: [{ selector: 'ngg-dropdown', providers: [
|
|
358
397
|
{
|
|
@@ -411,31 +450,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
411
450
|
}] } });
|
|
412
451
|
|
|
413
452
|
class NggDatepickerComponent {
|
|
414
|
-
constructor(_cdr) {
|
|
415
|
-
this._cdr = _cdr;
|
|
416
|
-
this.id = randomId();
|
|
417
|
-
this.isValid = null;
|
|
418
|
-
this.valueChange = new EventEmitter();
|
|
419
|
-
this._months = months({});
|
|
420
|
-
this.listener = (data, state) => {
|
|
421
|
-
if (this.dp && state) {
|
|
422
|
-
this.dp.state = { ...state };
|
|
423
|
-
this.years = years({
|
|
424
|
-
from: this.dp.state?.minDate?.getFullYear(),
|
|
425
|
-
to: this.dp.state?.maxDate?.getFullYear(),
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
if (data) {
|
|
429
|
-
// only emit change event if date has changed
|
|
430
|
-
if (this.data?.selectedDate !== data.selectedDate) {
|
|
431
|
-
this.valueChange.emit(data.selectedDate);
|
|
432
|
-
this.onChangeFn && this.onChangeFn(data.selectedDate);
|
|
433
|
-
}
|
|
434
|
-
this.data = data;
|
|
435
|
-
}
|
|
436
|
-
this._cdr.detectChanges();
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
453
|
get months() {
|
|
440
454
|
return this._months;
|
|
441
455
|
}
|
|
@@ -462,6 +476,31 @@ class NggDatepickerComponent {
|
|
|
462
476
|
}
|
|
463
477
|
}
|
|
464
478
|
}
|
|
479
|
+
constructor(_cdr) {
|
|
480
|
+
this._cdr = _cdr;
|
|
481
|
+
this.id = randomId();
|
|
482
|
+
this.isValid = null;
|
|
483
|
+
this.valueChange = new EventEmitter();
|
|
484
|
+
this._months = months({});
|
|
485
|
+
this.listener = (data, state) => {
|
|
486
|
+
if (this.dp && state) {
|
|
487
|
+
this.dp.state = { ...state };
|
|
488
|
+
this.years = years({
|
|
489
|
+
from: this.dp.state?.minDate?.getFullYear(),
|
|
490
|
+
to: this.dp.state?.maxDate?.getFullYear(),
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
if (data) {
|
|
494
|
+
// only emit change event if date has changed
|
|
495
|
+
if (this.data?.selectedDate !== data.selectedDate) {
|
|
496
|
+
this.valueChange.emit(data.selectedDate);
|
|
497
|
+
this.onChangeFn && this.onChangeFn(data.selectedDate);
|
|
498
|
+
}
|
|
499
|
+
this.data = data;
|
|
500
|
+
}
|
|
501
|
+
this._cdr.detectChanges();
|
|
502
|
+
};
|
|
503
|
+
}
|
|
465
504
|
writeValue(value) {
|
|
466
505
|
this.value = value;
|
|
467
506
|
}
|
|
@@ -526,15 +565,15 @@ class NggDatepickerComponent {
|
|
|
526
565
|
}
|
|
527
566
|
}
|
|
528
567
|
}
|
|
529
|
-
NggDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
530
|
-
NggDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
568
|
+
NggDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
569
|
+
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: [
|
|
531
570
|
{
|
|
532
571
|
provide: NG_VALUE_ACCESSOR,
|
|
533
572
|
useExisting: NggDatepickerComponent,
|
|
534
573
|
multi: true,
|
|
535
574
|
},
|
|
536
|
-
], 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",
|
|
537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
575
|
+
], 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 });
|
|
576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerComponent, decorators: [{
|
|
538
577
|
type: Component,
|
|
539
578
|
args: [{ selector: 'ngg-datepicker', providers: [
|
|
540
579
|
{
|
|
@@ -603,10 +642,10 @@ function dateValidator(dates) {
|
|
|
603
642
|
|
|
604
643
|
class NggDropdownModule {
|
|
605
644
|
}
|
|
606
|
-
NggDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
607
|
-
NggDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
608
|
-
NggDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
645
|
+
NggDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
646
|
+
NggDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownModule, declarations: [NggDropdownComponent, NggDropdownOptionDirective], imports: [CommonModule], exports: [NggDropdownComponent, NggDropdownOptionDirective] });
|
|
647
|
+
NggDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownModule, imports: [CommonModule] });
|
|
648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDropdownModule, decorators: [{
|
|
610
649
|
type: NgModule,
|
|
611
650
|
args: [{
|
|
612
651
|
declarations: [NggDropdownComponent, NggDropdownOptionDirective],
|
|
@@ -617,10 +656,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
617
656
|
|
|
618
657
|
class NggDatepickerModule {
|
|
619
658
|
}
|
|
620
|
-
NggDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
621
|
-
NggDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
622
|
-
NggDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
623
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
659
|
+
NggDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
660
|
+
NggDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerModule, declarations: [NggDatepickerComponent], imports: [CommonModule, NggDropdownModule], exports: [NggDatepickerComponent] });
|
|
661
|
+
NggDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerModule, imports: [CommonModule, NggDropdownModule] });
|
|
662
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggDatepickerModule, decorators: [{
|
|
624
663
|
type: NgModule,
|
|
625
664
|
args: [{
|
|
626
665
|
declarations: [NggDatepickerComponent],
|
|
@@ -630,15 +669,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
630
669
|
}] });
|
|
631
670
|
|
|
632
671
|
class NggModalComponent {
|
|
633
|
-
constructor(ref, configurableFocusTrapFactory) {
|
|
634
|
-
this.ref = ref;
|
|
635
|
-
this.configurableFocusTrapFactory = configurableFocusTrapFactory;
|
|
636
|
-
this.isOpenChange = new EventEmitter();
|
|
637
|
-
this.closed = new EventEmitter();
|
|
638
|
-
this.confirm = new EventEmitter();
|
|
639
|
-
this.dismiss = new EventEmitter();
|
|
640
|
-
this.configurableFocusTrap = this.configurableFocusTrapFactory.create(this.ref.nativeElement);
|
|
641
|
-
}
|
|
642
672
|
get trapFocus() {
|
|
643
673
|
return this._trapFocus;
|
|
644
674
|
}
|
|
@@ -670,6 +700,15 @@ class NggModalComponent {
|
|
|
670
700
|
}
|
|
671
701
|
}
|
|
672
702
|
get open() { return this.isOpen; }
|
|
703
|
+
constructor(ref, configurableFocusTrapFactory) {
|
|
704
|
+
this.ref = ref;
|
|
705
|
+
this.configurableFocusTrapFactory = configurableFocusTrapFactory;
|
|
706
|
+
this.isOpenChange = new EventEmitter();
|
|
707
|
+
this.closed = new EventEmitter();
|
|
708
|
+
this.confirm = new EventEmitter();
|
|
709
|
+
this.dismiss = new EventEmitter();
|
|
710
|
+
this.configurableFocusTrap = this.configurableFocusTrapFactory.create(this.ref.nativeElement);
|
|
711
|
+
}
|
|
673
712
|
ngOnInit() {
|
|
674
713
|
if (this._isOpen && this.trapFocus)
|
|
675
714
|
this.enableFocusTrap();
|
|
@@ -714,12 +753,12 @@ class NggModalComponent {
|
|
|
714
753
|
enableBodyScroll(this.ref.nativeElement);
|
|
715
754
|
}
|
|
716
755
|
}
|
|
717
|
-
NggModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
718
|
-
NggModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
756
|
+
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 });
|
|
757
|
+
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 });
|
|
758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalComponent, decorators: [{
|
|
720
759
|
type: Component,
|
|
721
760
|
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"] }]
|
|
722
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.ConfigurableFocusTrapFactory }]; }, propDecorators: { modalType: [{
|
|
761
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ConfigurableFocusTrapFactory }]; }, propDecorators: { modalType: [{
|
|
723
762
|
type: Input
|
|
724
763
|
}], header: [{
|
|
725
764
|
type: Input
|
|
@@ -756,15 +795,15 @@ class NggModalHeaderComponent {
|
|
|
756
795
|
this.closed.emit(event);
|
|
757
796
|
}
|
|
758
797
|
}
|
|
759
|
-
NggModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
760
|
-
NggModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
798
|
+
NggModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
799
|
+
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: `
|
|
761
800
|
<h3 data-testid="modal-header-text">{{header}}</h3>
|
|
762
801
|
<button data-testid="modal-close-button" class="close" (click)="this.handleClose($event)">
|
|
763
802
|
<span className="sr-only">Close</span>
|
|
764
803
|
<i></i>
|
|
765
804
|
</button>
|
|
766
805
|
`, 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"] });
|
|
767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
806
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalHeaderComponent, decorators: [{
|
|
768
807
|
type: Component,
|
|
769
808
|
args: [{ selector: '[ngg-modal-header]', template: `
|
|
770
809
|
<h3 data-testid="modal-header-text">{{header}}</h3>
|
|
@@ -780,9 +819,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
780
819
|
}] } });
|
|
781
820
|
class NggModalBodyComponent {
|
|
782
821
|
}
|
|
783
|
-
NggModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
784
|
-
NggModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
822
|
+
NggModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
823
|
+
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"] });
|
|
824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalBodyComponent, decorators: [{
|
|
786
825
|
type: Component,
|
|
787
826
|
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"] }]
|
|
788
827
|
}] });
|
|
@@ -798,12 +837,12 @@ class NggModalFooterComponent {
|
|
|
798
837
|
this.confirm.emit(event);
|
|
799
838
|
}
|
|
800
839
|
}
|
|
801
|
-
NggModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
802
|
-
NggModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
840
|
+
NggModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
841
|
+
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: `
|
|
803
842
|
<button data-testid="modal-dismiss-button" *ngIf="dismissLabel" class="secondary" (click)="this.handleDismiss($event)">{{dismissLabel}}</button>
|
|
804
843
|
<button data-testid="modal-confirm-button" *ngIf="confirmLabel" class="primary" (click)="this.handleConfirm($event)">{{confirmLabel}}</button>
|
|
805
|
-
`, 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"],
|
|
806
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
844
|
+
`, 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"] }] });
|
|
845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalFooterComponent, decorators: [{
|
|
807
846
|
type: Component,
|
|
808
847
|
args: [{ selector: '[ngg-modal-footer]', template: `
|
|
809
848
|
<button data-testid="modal-dismiss-button" *ngIf="dismissLabel" class="secondary" (click)="this.handleDismiss($event)">{{dismissLabel}}</button>
|
|
@@ -830,13 +869,13 @@ const EXPORTS = [
|
|
|
830
869
|
];
|
|
831
870
|
class NggModalModule {
|
|
832
871
|
}
|
|
833
|
-
NggModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
834
|
-
NggModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
872
|
+
NggModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
873
|
+
NggModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggModalModule, declarations: [NggModalComponent,
|
|
835
874
|
NggModalHeaderComponent,
|
|
836
875
|
NggModalBodyComponent,
|
|
837
876
|
NggModalFooterComponent], imports: [A11yModule, CommonModule], exports: [NggModalComponent] });
|
|
838
|
-
NggModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
839
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
877
|
+
NggModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalModule, imports: [A11yModule, CommonModule] });
|
|
878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModalModule, decorators: [{
|
|
840
879
|
type: NgModule,
|
|
841
880
|
args: [{
|
|
842
881
|
imports: [A11yModule, CommonModule],
|
|
@@ -850,31 +889,24 @@ class NggProgressCircleComponent {
|
|
|
850
889
|
this._startValue = '0deg';
|
|
851
890
|
this._endValue = '0deg';
|
|
852
891
|
/** id of the progress circle */
|
|
853
|
-
this.id =
|
|
892
|
+
this.id = `${randomId()}-progress-circle`;
|
|
854
893
|
/** theme of the progress circle */
|
|
855
894
|
this.theme = 'warning';
|
|
856
895
|
}
|
|
857
896
|
/** progress circle value in percentage */
|
|
858
|
-
set value(
|
|
859
|
-
const degrees =
|
|
860
|
-
this._endValue =
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
if (percent > 100) {
|
|
864
|
-
return 180;
|
|
865
|
-
}
|
|
866
|
-
if (percent < 0) {
|
|
867
|
-
return 0;
|
|
897
|
+
set value(val) {
|
|
898
|
+
const degrees = `${calculateDegrees(val)}deg`;
|
|
899
|
+
this._endValue = degrees;
|
|
900
|
+
if (this.theme === 'disabled') {
|
|
901
|
+
this._startValue = degrees;
|
|
868
902
|
}
|
|
869
|
-
/** formula: ((n% * 360deg) / 100% ) / 2 */
|
|
870
|
-
return percent * 1.8;
|
|
871
903
|
}
|
|
872
904
|
}
|
|
873
|
-
NggProgressCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
874
|
-
NggProgressCircleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
875
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
905
|
+
NggProgressCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
906
|
+
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"] }] });
|
|
907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleComponent, decorators: [{
|
|
876
908
|
type: Component,
|
|
877
|
-
args: [{ selector: 'ngg-progress-circle', template: "<div\n class=\"
|
|
909
|
+
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" }]
|
|
878
910
|
}], propDecorators: { _startValue: [{
|
|
879
911
|
type: HostBinding,
|
|
880
912
|
args: ['style.--start-value']
|
|
@@ -891,10 +923,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
891
923
|
|
|
892
924
|
class NggProgressCircleModule {
|
|
893
925
|
}
|
|
894
|
-
NggProgressCircleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
895
|
-
NggProgressCircleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
896
|
-
NggProgressCircleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
926
|
+
NggProgressCircleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
927
|
+
NggProgressCircleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleModule, declarations: [NggProgressCircleComponent], imports: [CommonModule], exports: [NggProgressCircleComponent] });
|
|
928
|
+
NggProgressCircleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleModule, imports: [CommonModule] });
|
|
929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggProgressCircleModule, decorators: [{
|
|
898
930
|
type: NgModule,
|
|
899
931
|
args: [{
|
|
900
932
|
declarations: [NggProgressCircleComponent],
|
|
@@ -905,8 +937,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
905
937
|
|
|
906
938
|
class NggSegmentedControlComponent {
|
|
907
939
|
}
|
|
908
|
-
NggSegmentedControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
909
|
-
NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
940
|
+
NggSegmentedControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
941
|
+
NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: NggSegmentedControlComponent, selector: "ngg-segmented-control", inputs: { $controls: "$controls" }, ngImport: i0, template: `
|
|
910
942
|
<div class="group">
|
|
911
943
|
<a
|
|
912
944
|
*ngFor="let control of $controls | async"
|
|
@@ -916,12 +948,10 @@ NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
916
948
|
>{{ control.text }}</a
|
|
917
949
|
>
|
|
918
950
|
</div>
|
|
919
|
-
`, isInline: true,
|
|
920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
951
|
+
`, 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 });
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlComponent, decorators: [{
|
|
921
953
|
type: Component,
|
|
922
|
-
args: [{
|
|
923
|
-
selector: 'ngg-segmented-control',
|
|
924
|
-
template: `
|
|
954
|
+
args: [{ selector: 'ngg-segmented-control', template: `
|
|
925
955
|
<div class="group">
|
|
926
956
|
<a
|
|
927
957
|
*ngFor="let control of $controls | async"
|
|
@@ -931,20 +961,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
931
961
|
>{{ control.text }}</a
|
|
932
962
|
>
|
|
933
963
|
</div>
|
|
934
|
-
`,
|
|
935
|
-
styles: [],
|
|
936
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
937
|
-
}]
|
|
964
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
938
965
|
}], propDecorators: { $controls: [{
|
|
939
966
|
type: Input
|
|
940
967
|
}] } });
|
|
941
968
|
|
|
942
969
|
class NggSegmentedControlModule {
|
|
943
970
|
}
|
|
944
|
-
NggSegmentedControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
945
|
-
NggSegmentedControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
946
|
-
NggSegmentedControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
971
|
+
NggSegmentedControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
972
|
+
NggSegmentedControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlModule, declarations: [NggSegmentedControlComponent], imports: [RouterModule, CommonModule], exports: [NggSegmentedControlComponent] });
|
|
973
|
+
NggSegmentedControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlModule, imports: [RouterModule, CommonModule] });
|
|
974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSegmentedControlModule, decorators: [{
|
|
948
975
|
type: NgModule,
|
|
949
976
|
args: [{
|
|
950
977
|
declarations: [NggSegmentedControlComponent],
|
|
@@ -953,64 +980,144 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
953
980
|
}]
|
|
954
981
|
}] });
|
|
955
982
|
|
|
956
|
-
class
|
|
957
|
-
|
|
958
|
-
|
|
983
|
+
class NggSliderComponent {
|
|
984
|
+
constructor() {
|
|
985
|
+
this.name = `${randomId()}-slider`;
|
|
986
|
+
this.min = 0;
|
|
987
|
+
this.max = 100;
|
|
988
|
+
this.step = 1;
|
|
989
|
+
this.label = '';
|
|
990
|
+
this.instruction = '';
|
|
991
|
+
this.placeholder = '';
|
|
992
|
+
this.errorMessage = '';
|
|
993
|
+
this.hasTextbox = false;
|
|
994
|
+
this.disabled = false;
|
|
995
|
+
this.value = 0;
|
|
996
|
+
this.sliderChange = new EventEmitter();
|
|
997
|
+
this.sliderTouch = new EventEmitter();
|
|
998
|
+
this.style = {};
|
|
999
|
+
}
|
|
1000
|
+
ngOnInit() {
|
|
1001
|
+
this.setTrackBackground();
|
|
1002
|
+
}
|
|
1003
|
+
ngOnChanges(changes) {
|
|
1004
|
+
if (changes['value']) {
|
|
1005
|
+
this.setTrackBackground();
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
onBlur() {
|
|
1009
|
+
this.sliderTouch.emit(true);
|
|
1010
|
+
this.onTouchedFn && this.onTouchedFn();
|
|
1011
|
+
}
|
|
1012
|
+
handleChange() {
|
|
1013
|
+
this.value = this.value ?? 0;
|
|
1014
|
+
this.setTrackBackground();
|
|
1015
|
+
this.sliderChange.emit(this.value);
|
|
1016
|
+
this.onChangeFn && this.onChangeFn(this.value);
|
|
1017
|
+
}
|
|
1018
|
+
setTrackBackground() {
|
|
1019
|
+
if (this.disabled) {
|
|
1020
|
+
this.style.background = sliderColors.disabled;
|
|
1021
|
+
return;
|
|
1022
|
+
}
|
|
1023
|
+
const percent = ((this.value - this.min) / (this.max - this.min)) * 100;
|
|
1024
|
+
this.style.background = getSliderTrackBackground(percent);
|
|
1025
|
+
}
|
|
1026
|
+
/** control value accessor functions */
|
|
1027
|
+
writeValue(val) {
|
|
1028
|
+
if (this.value !== val) {
|
|
1029
|
+
this.value = val ?? 0;
|
|
1030
|
+
this.handleChange();
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
registerOnChange(fn) {
|
|
1034
|
+
this.onChangeFn = fn;
|
|
1035
|
+
}
|
|
1036
|
+
registerOnTouched(fn) {
|
|
1037
|
+
this.onTouchedFn = fn;
|
|
959
1038
|
}
|
|
960
1039
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1040
|
+
NggSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1041
|
+
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: [
|
|
1042
|
+
{
|
|
1043
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1044
|
+
useExisting: NggSliderComponent,
|
|
1045
|
+
multi: true,
|
|
1046
|
+
},
|
|
1047
|
+
], 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 });
|
|
1048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderComponent, decorators: [{
|
|
964
1049
|
type: Component,
|
|
965
|
-
args: [{
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1050
|
+
args: [{ selector: 'ngg-slider', providers: [
|
|
1051
|
+
{
|
|
1052
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1053
|
+
useExisting: NggSliderComponent,
|
|
1054
|
+
multi: true,
|
|
1055
|
+
},
|
|
1056
|
+
], 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" }]
|
|
1057
|
+
}], propDecorators: { name: [{
|
|
972
1058
|
type: Input
|
|
973
|
-
}],
|
|
1059
|
+
}], min: [{
|
|
974
1060
|
type: Input
|
|
975
|
-
}],
|
|
976
|
-
type:
|
|
977
|
-
|
|
1061
|
+
}], max: [{
|
|
1062
|
+
type: Input
|
|
1063
|
+
}], step: [{
|
|
1064
|
+
type: Input
|
|
1065
|
+
}], label: [{
|
|
1066
|
+
type: Input
|
|
1067
|
+
}], instruction: [{
|
|
1068
|
+
type: Input
|
|
1069
|
+
}], placeholder: [{
|
|
1070
|
+
type: Input
|
|
1071
|
+
}], errorMessage: [{
|
|
1072
|
+
type: Input
|
|
1073
|
+
}], hasTextbox: [{
|
|
1074
|
+
type: Input
|
|
1075
|
+
}], disabled: [{
|
|
1076
|
+
type: Input
|
|
1077
|
+
}], value: [{
|
|
1078
|
+
type: Input
|
|
1079
|
+
}], sliderChange: [{
|
|
1080
|
+
type: Output
|
|
1081
|
+
}], sliderTouch: [{
|
|
1082
|
+
type: Output
|
|
978
1083
|
}] } });
|
|
979
1084
|
|
|
980
|
-
class
|
|
1085
|
+
class NggSliderModule {
|
|
981
1086
|
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1087
|
+
NggSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1088
|
+
NggSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggSliderModule, declarations: [NggSliderComponent], imports: [CommonModule, FormsModule], exports: [NggSliderComponent] });
|
|
1089
|
+
NggSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderModule, imports: [CommonModule, FormsModule] });
|
|
1090
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggSliderModule, decorators: [{
|
|
986
1091
|
type: NgModule,
|
|
987
1092
|
args: [{
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1093
|
+
imports: [CommonModule, FormsModule],
|
|
1094
|
+
exports: [NggSliderComponent],
|
|
1095
|
+
declarations: [NggSliderComponent],
|
|
991
1096
|
}]
|
|
992
1097
|
}] });
|
|
993
1098
|
|
|
994
1099
|
class NggModule {
|
|
995
1100
|
}
|
|
996
|
-
NggModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
997
|
-
NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1101
|
+
NggModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1102
|
+
NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggModule, imports: [CommonModule], exports: [NggAccordionModule,
|
|
998
1103
|
NggBadgeModule,
|
|
999
1104
|
NggButtonModule,
|
|
1000
1105
|
NggDatepickerModule,
|
|
1001
1106
|
NggDropdownModule,
|
|
1002
1107
|
NggModalModule,
|
|
1003
1108
|
NggProgressCircleModule,
|
|
1004
|
-
NggSegmentedControlModule
|
|
1005
|
-
|
|
1109
|
+
NggSegmentedControlModule,
|
|
1110
|
+
NggSliderModule] });
|
|
1111
|
+
NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModule, imports: [CommonModule, NggAccordionModule,
|
|
1006
1112
|
NggBadgeModule,
|
|
1007
1113
|
NggButtonModule,
|
|
1008
1114
|
NggDatepickerModule,
|
|
1009
1115
|
NggDropdownModule,
|
|
1010
1116
|
NggModalModule,
|
|
1011
1117
|
NggProgressCircleModule,
|
|
1012
|
-
NggSegmentedControlModule
|
|
1013
|
-
|
|
1118
|
+
NggSegmentedControlModule,
|
|
1119
|
+
NggSliderModule] });
|
|
1120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggModule, decorators: [{
|
|
1014
1121
|
type: NgModule,
|
|
1015
1122
|
args: [{
|
|
1016
1123
|
declarations: [],
|
|
@@ -1024,13 +1131,199 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
1024
1131
|
NggModalModule,
|
|
1025
1132
|
NggProgressCircleModule,
|
|
1026
1133
|
NggSegmentedControlModule,
|
|
1134
|
+
NggSliderModule,
|
|
1027
1135
|
],
|
|
1028
1136
|
}]
|
|
1029
1137
|
}] });
|
|
1030
1138
|
|
|
1139
|
+
class NggPaginationComponent {
|
|
1140
|
+
constructor() {
|
|
1141
|
+
/** Internationalization labels */
|
|
1142
|
+
this.i18n = PaginationI18n;
|
|
1143
|
+
/** Rendered size */
|
|
1144
|
+
this.size = 'small';
|
|
1145
|
+
/** Amount of pages to be displayed between the first and last */
|
|
1146
|
+
this.displayPages = 5;
|
|
1147
|
+
/** Total amount of items to be paginated */
|
|
1148
|
+
this.length = 0;
|
|
1149
|
+
/** Displayed items per page */
|
|
1150
|
+
this.pageSize = 10;
|
|
1151
|
+
this._pageIndex = 0;
|
|
1152
|
+
this._pageIndicies = [];
|
|
1153
|
+
/** Event emitted when a new page index is selected */
|
|
1154
|
+
this.page = new EventEmitter();
|
|
1155
|
+
}
|
|
1156
|
+
/** The zero-based page index of the displayed list of pages. Defaulted to 0. */
|
|
1157
|
+
get pageIndex() {
|
|
1158
|
+
return this._pageIndex;
|
|
1159
|
+
}
|
|
1160
|
+
set pageIndex(value) {
|
|
1161
|
+
this._pageIndex = Math.max(value, 0);
|
|
1162
|
+
}
|
|
1163
|
+
/** All centric page indicies to be displayed. */
|
|
1164
|
+
get pageIndicies() {
|
|
1165
|
+
return this._pageIndicies;
|
|
1166
|
+
}
|
|
1167
|
+
get totalPages() {
|
|
1168
|
+
if (!this.pageSize) {
|
|
1169
|
+
return 0;
|
|
1170
|
+
}
|
|
1171
|
+
return Math.ceil(this.length / this.pageSize);
|
|
1172
|
+
}
|
|
1173
|
+
ngOnChanges(changes) {
|
|
1174
|
+
if (changes.displayPages ||
|
|
1175
|
+
changes.pageIndex ||
|
|
1176
|
+
changes.pageSize ||
|
|
1177
|
+
changes.length) {
|
|
1178
|
+
this._pageIndicies = this.getDisplayedPageIndicies();
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
hasPrevious() {
|
|
1182
|
+
return this.pageIndex >= 1;
|
|
1183
|
+
}
|
|
1184
|
+
hasNext() {
|
|
1185
|
+
return this.pageIndex < this.totalPages - 1;
|
|
1186
|
+
}
|
|
1187
|
+
gotoFirst() {
|
|
1188
|
+
if (!this.hasPrevious()) {
|
|
1189
|
+
return;
|
|
1190
|
+
}
|
|
1191
|
+
const previous = this.pageIndex;
|
|
1192
|
+
this.pageIndex = 0;
|
|
1193
|
+
this.emit(previous);
|
|
1194
|
+
}
|
|
1195
|
+
gotoLast() {
|
|
1196
|
+
if (!this.hasNext()) {
|
|
1197
|
+
return;
|
|
1198
|
+
}
|
|
1199
|
+
const previous = this.pageIndex;
|
|
1200
|
+
this.pageIndex = this.totalPages - 1;
|
|
1201
|
+
this.emit(previous);
|
|
1202
|
+
}
|
|
1203
|
+
gotoPrevious() {
|
|
1204
|
+
if (!this.hasPrevious()) {
|
|
1205
|
+
return;
|
|
1206
|
+
}
|
|
1207
|
+
const previous = this.pageIndex;
|
|
1208
|
+
this.pageIndex = previous - 1;
|
|
1209
|
+
this.emit(previous);
|
|
1210
|
+
}
|
|
1211
|
+
gotoNext() {
|
|
1212
|
+
if (!this.hasNext()) {
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
const previous = this.pageIndex;
|
|
1216
|
+
this.pageIndex = previous + 1;
|
|
1217
|
+
this.emit(previous);
|
|
1218
|
+
}
|
|
1219
|
+
goto(index) {
|
|
1220
|
+
if (index === this.pageIndex || index < 0 || index >= this.totalPages) {
|
|
1221
|
+
return;
|
|
1222
|
+
}
|
|
1223
|
+
const previous = this.pageIndex;
|
|
1224
|
+
this.pageIndex = index;
|
|
1225
|
+
this.emit(previous);
|
|
1226
|
+
}
|
|
1227
|
+
emit(previous) {
|
|
1228
|
+
this._pageIndicies = this.getDisplayedPageIndicies();
|
|
1229
|
+
this.page.emit({ pageIndex: this.pageIndex, previousPageIndex: previous });
|
|
1230
|
+
}
|
|
1231
|
+
getDisplayedPageIndicies() {
|
|
1232
|
+
// Do not render
|
|
1233
|
+
if (this.totalPages <= 1) {
|
|
1234
|
+
return [];
|
|
1235
|
+
}
|
|
1236
|
+
// All pages can fit
|
|
1237
|
+
if (this.totalPages <= this.displayPages)
|
|
1238
|
+
return [...Array(this.totalPages - 2).keys()].map((index) => index + 1);
|
|
1239
|
+
// Only first & last
|
|
1240
|
+
if (this.totalPages === 2)
|
|
1241
|
+
return [];
|
|
1242
|
+
return this.getCenteredPageIndicies();
|
|
1243
|
+
}
|
|
1244
|
+
/**
|
|
1245
|
+
* Find X (displayPages) amount of page indicies that are centered from the currently selected page index,
|
|
1246
|
+
* but exclude the first and last indicies if they are within the range.
|
|
1247
|
+
*/
|
|
1248
|
+
getCenteredPageIndicies() {
|
|
1249
|
+
const pages = [];
|
|
1250
|
+
if (this.pageIndex === 0) {
|
|
1251
|
+
pages.push(this.pageIndex + 1);
|
|
1252
|
+
}
|
|
1253
|
+
else if (this.pageIndex === this.totalPages - 1) {
|
|
1254
|
+
pages.push(this.pageIndex - 1);
|
|
1255
|
+
}
|
|
1256
|
+
else {
|
|
1257
|
+
pages.push(this.pageIndex);
|
|
1258
|
+
}
|
|
1259
|
+
const addAfter = () => {
|
|
1260
|
+
const next = pages[pages.length - 1] + 1;
|
|
1261
|
+
if (next < this.totalPages - 1 && counter > 0) {
|
|
1262
|
+
pages.push(next);
|
|
1263
|
+
return true;
|
|
1264
|
+
}
|
|
1265
|
+
return false;
|
|
1266
|
+
};
|
|
1267
|
+
const addBefore = () => {
|
|
1268
|
+
const previous = pages[0] - 1;
|
|
1269
|
+
if (previous > 0 && counter > 0) {
|
|
1270
|
+
pages.unshift(previous);
|
|
1271
|
+
return true;
|
|
1272
|
+
}
|
|
1273
|
+
return false;
|
|
1274
|
+
};
|
|
1275
|
+
let counter = this.displayPages - 1;
|
|
1276
|
+
while (counter > 0) {
|
|
1277
|
+
const addedAfter = addAfter();
|
|
1278
|
+
if (addedAfter)
|
|
1279
|
+
counter--;
|
|
1280
|
+
const addedBefore = addBefore();
|
|
1281
|
+
if (addedBefore)
|
|
1282
|
+
counter--;
|
|
1283
|
+
if (!addedAfter && !addedBefore)
|
|
1284
|
+
break;
|
|
1285
|
+
}
|
|
1286
|
+
return pages;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
NggPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1290
|
+
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 });
|
|
1291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationComponent, decorators: [{
|
|
1292
|
+
type: Component,
|
|
1293
|
+
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" }]
|
|
1294
|
+
}], propDecorators: { i18n: [{
|
|
1295
|
+
type: Input
|
|
1296
|
+
}], size: [{
|
|
1297
|
+
type: Input
|
|
1298
|
+
}], displayPages: [{
|
|
1299
|
+
type: Input
|
|
1300
|
+
}], length: [{
|
|
1301
|
+
type: Input
|
|
1302
|
+
}], pageSize: [{
|
|
1303
|
+
type: Input
|
|
1304
|
+
}], pageIndex: [{
|
|
1305
|
+
type: Input
|
|
1306
|
+
}], page: [{
|
|
1307
|
+
type: Output
|
|
1308
|
+
}] } });
|
|
1309
|
+
|
|
1310
|
+
class NggPaginationModule {
|
|
1311
|
+
}
|
|
1312
|
+
NggPaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1313
|
+
NggPaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationModule, declarations: [NggPaginationComponent], imports: [CommonModule], exports: [NggPaginationComponent] });
|
|
1314
|
+
NggPaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationModule, imports: [CommonModule] });
|
|
1315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: NggPaginationModule, decorators: [{
|
|
1316
|
+
type: NgModule,
|
|
1317
|
+
args: [{
|
|
1318
|
+
declarations: [NggPaginationComponent],
|
|
1319
|
+
imports: [CommonModule],
|
|
1320
|
+
exports: [NggPaginationComponent],
|
|
1321
|
+
}]
|
|
1322
|
+
}] });
|
|
1323
|
+
|
|
1031
1324
|
/**
|
|
1032
1325
|
* Generated bundle index. Do not edit.
|
|
1033
1326
|
*/
|
|
1034
1327
|
|
|
1035
|
-
export { NggAccordionComponent, NggAccordionListItemComponent, NggAccordionModule, NggBadgeComponent, NggBadgeModule, NggButtonComponent, NggButtonModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalHeaderComponent, NggModalModule, NggModule, NggProgressCircleComponent, NggProgressCircleModule, NggSegmentedControlComponent, NggSegmentedControlModule, dateValidator };
|
|
1328
|
+
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 };
|
|
1036
1329
|
//# sourceMappingURL=sebgroup-green-angular.mjs.map
|