nw-style-guide 20.3.0-beta.1 → 20.3.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/animations/package.json +3 -0
- package/autofocus/index.d.ts +2 -9
- package/autofocus/package.json +3 -0
- package/carousel/index.d.ts +8 -9
- package/carousel/package.json +3 -0
- package/charts/index.d.ts +17 -19
- package/charts/package.json +3 -0
- package/email-input/index.d.ts +2 -10
- package/email-input/package.json +3 -0
- package/feature-alerts/index.d.ts +16 -22
- package/feature-alerts/package.json +3 -0
- package/fesm2022/nw-style-guide-autofocus.mjs +4 -22
- package/fesm2022/nw-style-guide-autofocus.mjs.map +1 -1
- package/fesm2022/nw-style-guide-carousel.mjs +16 -25
- package/fesm2022/nw-style-guide-carousel.mjs.map +1 -1
- package/fesm2022/nw-style-guide-charts.mjs +43 -102
- package/fesm2022/nw-style-guide-charts.mjs.map +1 -1
- package/fesm2022/nw-style-guide-email-input.mjs +7 -27
- package/fesm2022/nw-style-guide-email-input.mjs.map +1 -1
- package/fesm2022/nw-style-guide-feature-alerts.mjs +10 -41
- package/fesm2022/nw-style-guide-feature-alerts.mjs.map +1 -1
- package/fesm2022/nw-style-guide-loader.mjs +6 -23
- package/fesm2022/nw-style-guide-loader.mjs.map +1 -1
- package/fesm2022/nw-style-guide-picker.mjs +8 -28
- package/fesm2022/nw-style-guide-picker.mjs.map +1 -1
- package/fesm2022/nw-style-guide-resize-observer.mjs +4 -22
- package/fesm2022/nw-style-guide-resize-observer.mjs.map +1 -1
- package/fesm2022/nw-style-guide-tabs.mjs +16 -35
- package/fesm2022/nw-style-guide-tabs.mjs.map +1 -1
- package/fesm2022/nw-style-guide-toasts.mjs +10 -28
- package/fesm2022/nw-style-guide-toasts.mjs.map +1 -1
- package/fesm2022/nw-style-guide-tooltips.mjs +12 -41
- package/fesm2022/nw-style-guide-tooltips.mjs.map +1 -1
- package/fesm2022/nw-style-guide-word-cloud.mjs +15 -35
- package/fesm2022/nw-style-guide-word-cloud.mjs.map +1 -1
- package/loader/index.d.ts +2 -9
- package/loader/package.json +3 -0
- package/package.json +1 -1
- package/picker/index.d.ts +2 -10
- package/picker/package.json +3 -0
- package/resize-observer/index.d.ts +2 -9
- package/resize-observer/package.json +3 -0
- package/tabs/index.d.ts +8 -9
- package/tabs/package.json +3 -0
- package/toasts/index.d.ts +4 -28
- package/toasts/package.json +3 -0
- package/tooltips/index.d.ts +2 -27
- package/tooltips/package.json +3 -0
- package/word-cloud/index.d.ts +20 -22
- package/word-cloud/package.json +3 -0
package/autofocus/index.d.ts
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, ElementRef } from '@angular/core';
|
|
3
|
-
import * as i2 from '@angular/common';
|
|
4
3
|
|
|
5
4
|
declare class AutoFocusDirective implements OnInit {
|
|
6
5
|
private _elRef;
|
|
7
6
|
constructor(_elRef: ElementRef<HTMLElement>);
|
|
8
7
|
ngOnInit(): void;
|
|
9
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutoFocusDirective, never>;
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AutoFocusDirective, "[nwAutofocus]", ["nw-autofocus"], {}, {}, never, never,
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AutoFocusDirective, "[nwAutofocus]", ["nw-autofocus"], {}, {}, never, never, true, never>;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AutoFocusModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AutoFocusModule, [typeof AutoFocusDirective], [typeof i2.CommonModule], [typeof AutoFocusDirective]>;
|
|
16
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AutoFocusModule>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { AutoFocusDirective, AutoFocusModule };
|
|
12
|
+
export { AutoFocusDirective };
|
package/carousel/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, AfterViewInit, AfterContentInit, OnChanges, OnDestroy, EventEmitter, ElementRef, QueryList, Renderer2, ChangeDetectorRef, SimpleChanges } from '@angular/core';
|
|
3
|
-
import * as i3 from '@angular/common';
|
|
4
3
|
|
|
5
4
|
declare class CarouselSlideDirective {
|
|
6
5
|
snapAlign: 'none' | 'start' | 'end' | 'center';
|
|
7
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<CarouselSlideDirective, never>;
|
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CarouselSlideDirective, "[nwCarouselSlide]", ["nw-carousel-slide"], { "snapAlign": { "alias": "snapAlign"; "required": false; }; }, {}, never, never,
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CarouselSlideDirective, "[nwCarouselSlide]", ["nw-carousel-slide"], { "snapAlign": { "alias": "snapAlign"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
declare class CarouselComponent implements OnInit, AfterViewInit, AfterContentInit, OnChanges, OnDestroy {
|
|
@@ -46,13 +45,13 @@ declare class CarouselComponent implements OnInit, AfterViewInit, AfterContentIn
|
|
|
46
45
|
subscribeToWindowResize(): void;
|
|
47
46
|
ngOnDestroy(): void;
|
|
48
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<CarouselComponent, never>;
|
|
49
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent, "nw-carousel", ["nw-carousel"], { "showPageIndicator": { "alias": "showPageIndicator"; "required": false; }; "showPagination": { "alias": "showPagination"; "required": false; }; "showMask": { "alias": "showMask"; "required": false; }; "maskColor": { "alias": "maskColor"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "currPage": { "alias": "currPage"; "required": false; }; "noResultsText": { "alias": "noResultsText"; "required": false; }; }, { "currPageChange": "currPageChange"; }, ["slides"], [".pagination-left", "*", ".pagination-right", ".pagination-indicators"],
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent, "nw-carousel", ["nw-carousel"], { "showPageIndicator": { "alias": "showPageIndicator"; "required": false; }; "showPagination": { "alias": "showPagination"; "required": false; }; "showMask": { "alias": "showMask"; "required": false; }; "maskColor": { "alias": "maskColor"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "currPage": { "alias": "currPage"; "required": false; }; "noResultsText": { "alias": "noResultsText"; "required": false; }; }, { "currPageChange": "currPageChange"; }, ["slides"], [".pagination-left", "*", ".pagination-right", ".pagination-indicators"], true, never>;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Export cooperating directives
|
|
53
|
+
* https://v17.angular.io/guide/standalone-components#standalone-components-for-library-authors
|
|
54
|
+
*/
|
|
55
|
+
declare const CAROUSEL_DIRECTIVES: readonly [typeof CarouselComponent, typeof CarouselSlideDirective];
|
|
57
56
|
|
|
58
|
-
export {
|
|
57
|
+
export { CAROUSEL_DIRECTIVES, CarouselComponent, CarouselSlideDirective };
|
package/charts/index.d.ts
CHANGED
|
@@ -6,8 +6,6 @@ import { CurveFactory, Line, Area } from 'd3-shape';
|
|
|
6
6
|
import { ScaleLinear, ScaleTime } from 'd3-scale';
|
|
7
7
|
import { AxisTimeInterval, Axis } from 'd3-axis';
|
|
8
8
|
import { BrushBehavior } from 'd3-brush';
|
|
9
|
-
import * as i12 from '@angular/common';
|
|
10
|
-
import * as i13 from 'nw-style-guide/resize-observer';
|
|
11
9
|
|
|
12
10
|
declare class ChartUtils {
|
|
13
11
|
static ANIMATION_DURATION: number;
|
|
@@ -63,7 +61,7 @@ declare class ChartComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
63
61
|
onChartDimensionsChange(): void;
|
|
64
62
|
ngOnDestroy(): void;
|
|
65
63
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartComponent, never>;
|
|
66
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "svg[nw-chart]", ["nw-chart"], { "w": { "alias": "width"; "required": false; }; "h": { "alias": "height"; "required": false; }; "margins": { "alias": "margins"; "required": false; }; }, { "nwMousemove": "nwMousemove"; "nwMouseleave": "nwMouseleave"; "bgClick": "bgClick"; }, never, ["[nw-x-axis],[nw-y-axis]", ".nw-slot-1", ".nw-slot-2", "*"],
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "svg[nw-chart]", ["nw-chart"], { "w": { "alias": "width"; "required": false; }; "h": { "alias": "height"; "required": false; }; "margins": { "alias": "margins"; "required": false; }; }, { "nwMousemove": "nwMousemove"; "nwMouseleave": "nwMouseleave"; "bgClick": "bgClick"; }, never, ["[nw-x-axis],[nw-y-axis]", ".nw-slot-1", ".nw-slot-2", "*"], true, never>;
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
type NwXAxisScale = ScaleLinear<number, number> | ScaleTime<number, number>;
|
|
@@ -94,7 +92,7 @@ declare class PathDirective implements OnInit, OnChanges, OnDestroy {
|
|
|
94
92
|
private _subscribeToChartResize;
|
|
95
93
|
ngOnDestroy(): void;
|
|
96
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<PathDirective, never>;
|
|
97
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<PathDirective, "path[nw-path]", ["nw-path"], { "data": { "alias": "nw-path"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "curve": { "alias": "curve"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, { "animEnd": "animEnd"; }, never, never,
|
|
95
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PathDirective, "path[nw-path]", ["nw-path"], { "data": { "alias": "nw-path"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "curve": { "alias": "curve"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, { "animEnd": "animEnd"; }, never, never, true, never>;
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
declare abstract class AxisBase implements OnInit, OnChanges, OnDestroy {
|
|
@@ -147,7 +145,7 @@ declare class XAxisDirective extends AxisBase {
|
|
|
147
145
|
render(): void;
|
|
148
146
|
private _getAxisTranslation;
|
|
149
147
|
static ɵfac: i0.ɵɵFactoryDeclaration<XAxisDirective, never>;
|
|
150
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<XAxisDirective, "[nw-x-axis]", ["nw-x-axis"], { "align": { "alias": "align"; "required": false; }; "domain": { "alias": "domain"; "required": false; }; "scale": { "alias": "scale"; "required": false; }; }, { "scaleUpdated": "scaleUpdated"; }, never, never,
|
|
148
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<XAxisDirective, "[nw-x-axis]", ["nw-x-axis"], { "align": { "alias": "align"; "required": false; }; "domain": { "alias": "domain"; "required": false; }; "scale": { "alias": "scale"; "required": false; }; }, { "scaleUpdated": "scaleUpdated"; }, never, never, true, never>;
|
|
151
149
|
}
|
|
152
150
|
|
|
153
151
|
declare class YAxisDirective extends AxisBase {
|
|
@@ -163,7 +161,7 @@ declare class YAxisDirective extends AxisBase {
|
|
|
163
161
|
render(): void;
|
|
164
162
|
private _getAxisTranslation;
|
|
165
163
|
static ɵfac: i0.ɵɵFactoryDeclaration<YAxisDirective, never>;
|
|
166
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<YAxisDirective, "[nw-y-axis]", ["nw-y-axis"], { "align": { "alias": "align"; "required": false; }; "domain": { "alias": "domain"; "required": false; }; }, { "scaleUpdated": "scaleUpdated"; }, never, never,
|
|
164
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<YAxisDirective, "[nw-y-axis]", ["nw-y-axis"], { "align": { "alias": "align"; "required": false; }; "domain": { "alias": "domain"; "required": false; }; }, { "scaleUpdated": "scaleUpdated"; }, never, never, true, never>;
|
|
167
165
|
}
|
|
168
166
|
|
|
169
167
|
declare class CircleDirective implements OnInit, OnChanges, OnDestroy {
|
|
@@ -191,7 +189,7 @@ declare class CircleDirective implements OnInit, OnChanges, OnDestroy {
|
|
|
191
189
|
private _subscribeToChartResize;
|
|
192
190
|
ngOnDestroy(): void;
|
|
193
191
|
static ɵfac: i0.ɵɵFactoryDeclaration<CircleDirective, never>;
|
|
194
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CircleDirective, "circle[nw-circle]", ["nw-circle"], { "point": { "alias": "nw-circle"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never,
|
|
192
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CircleDirective, "circle[nw-circle]", ["nw-circle"], { "point": { "alias": "nw-circle"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never, true, never>;
|
|
195
193
|
}
|
|
196
194
|
|
|
197
195
|
declare class BrushDirective implements OnInit, OnDestroy, OnChanges {
|
|
@@ -214,7 +212,7 @@ declare class BrushDirective implements OnInit, OnDestroy, OnChanges {
|
|
|
214
212
|
private _unbindEvents;
|
|
215
213
|
ngOnDestroy(): void;
|
|
216
214
|
static ɵfac: i0.ɵɵFactoryDeclaration<BrushDirective, never>;
|
|
217
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BrushDirective, "svg:g[nw-brush]", ["nw-brush"], { "extent": { "alias": "extent"; "required": false; }; "dimension": { "alias": "dimension"; "required": false; }; }, { "brushEnd": "brushEnd"; }, never, never,
|
|
215
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BrushDirective, "svg:g[nw-brush]", ["nw-brush"], { "extent": { "alias": "extent"; "required": false; }; "dimension": { "alias": "dimension"; "required": false; }; }, { "brushEnd": "brushEnd"; }, never, never, true, never>;
|
|
218
216
|
}
|
|
219
217
|
|
|
220
218
|
declare class BarDirective implements OnInit, OnChanges, OnDestroy {
|
|
@@ -245,7 +243,7 @@ declare class BarDirective implements OnInit, OnChanges, OnDestroy {
|
|
|
245
243
|
private _subscribeToChartResize;
|
|
246
244
|
ngOnDestroy(): void;
|
|
247
245
|
static ɵfac: i0.ɵɵFactoryDeclaration<BarDirective, never>;
|
|
248
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BarDirective, "rect[nw-bar]", never, { "value": { "alias": "nw-bar"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "barWidth": { "alias": "barWidth"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never,
|
|
246
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BarDirective, "rect[nw-bar]", never, { "value": { "alias": "nw-bar"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "barWidth": { "alias": "barWidth"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never, true, never>;
|
|
249
247
|
}
|
|
250
248
|
|
|
251
249
|
type AreaDatum = [number, number] | [number, number, number];
|
|
@@ -279,7 +277,7 @@ declare class AreaDirective implements OnInit, OnChanges, OnDestroy {
|
|
|
279
277
|
private _subscribeToChartResize;
|
|
280
278
|
ngOnDestroy(): void;
|
|
281
279
|
static ɵfac: i0.ɵɵFactoryDeclaration<AreaDirective, never>;
|
|
282
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AreaDirective, "path[nw-area]", ["nw-area"], { "data": { "alias": "nw-area"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "curve": { "alias": "curve"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never,
|
|
280
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AreaDirective, "path[nw-area]", ["nw-area"], { "data": { "alias": "nw-area"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "curve": { "alias": "curve"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never, true, never>;
|
|
283
281
|
}
|
|
284
282
|
|
|
285
283
|
declare class ChartTooltipDirective implements OnChanges, AfterViewInit {
|
|
@@ -302,7 +300,7 @@ declare class ChartTooltipDirective implements OnChanges, AfterViewInit {
|
|
|
302
300
|
ngOnChanges(changes: SimpleChanges): void;
|
|
303
301
|
private _setTooltipSize;
|
|
304
302
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartTooltipDirective, never>;
|
|
305
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ChartTooltipDirective, "[nwChartTooltip]", never, { "position": { "alias": "position"; "required": false; }; "chartWidth": { "alias": "chartWidth"; "required": false; }; "chartHeight": { "alias": "chartHeight"; "required": false; }; "chartMargins": { "alias": "chartMargins"; "required": false; }; "offsetX": { "alias": "offsetX"; "required": false; }; }, {}, never, never,
|
|
303
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChartTooltipDirective, "[nwChartTooltip]", never, { "position": { "alias": "position"; "required": false; }; "chartWidth": { "alias": "chartWidth"; "required": false; }; "chartHeight": { "alias": "chartHeight"; "required": false; }; "chartMargins": { "alias": "chartMargins"; "required": false; }; "offsetX": { "alias": "offsetX"; "required": false; }; }, {}, never, never, true, never>;
|
|
306
304
|
}
|
|
307
305
|
|
|
308
306
|
declare class ForeignObjectDirective implements OnInit, OnChanges, OnDestroy {
|
|
@@ -330,7 +328,7 @@ declare class ForeignObjectDirective implements OnInit, OnChanges, OnDestroy {
|
|
|
330
328
|
private _subscribeToChartResize;
|
|
331
329
|
ngOnDestroy(): void;
|
|
332
330
|
static ɵfac: i0.ɵɵFactoryDeclaration<ForeignObjectDirective, never>;
|
|
333
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ForeignObjectDirective, "[nw-foreign-object]", ["nw-foreign-object"], { "point": { "alias": "point"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never,
|
|
331
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ForeignObjectDirective, "[nw-foreign-object]", ["nw-foreign-object"], { "point": { "alias": "point"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never, true, never>;
|
|
334
332
|
}
|
|
335
333
|
|
|
336
334
|
declare class TextDirective implements OnInit, OnChanges, OnDestroy {
|
|
@@ -357,13 +355,13 @@ declare class TextDirective implements OnInit, OnChanges, OnDestroy {
|
|
|
357
355
|
private _subscribeToChartResize;
|
|
358
356
|
ngOnDestroy(): void;
|
|
359
357
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextDirective, never>;
|
|
360
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TextDirective, "text[nw-text]", ["nw-text"], { "point": { "alias": "nw-text"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never,
|
|
358
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TextDirective, "text[nw-text]", ["nw-text"], { "point": { "alias": "nw-text"; "required": false; }; "xDomain": { "alias": "xDomain"; "required": false; }; "yDomain": { "alias": "yDomain"; "required": false; }; "animDuration": { "alias": "animDuration"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "xScale": { "alias": "xScale"; "required": false; }; }, {}, never, never, true, never>;
|
|
361
359
|
}
|
|
362
360
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Export cooperating directives
|
|
363
|
+
* https://v17.angular.io/guide/standalone-components#standalone-components-for-library-authors
|
|
364
|
+
*/
|
|
365
|
+
declare const CHARTS_DIRECTIVES: readonly [typeof ChartComponent, typeof PathDirective, typeof XAxisDirective, typeof YAxisDirective, typeof CircleDirective, typeof BrushDirective, typeof BarDirective, typeof AreaDirective, typeof ChartTooltipDirective, typeof ForeignObjectDirective, typeof TextDirective];
|
|
368
366
|
|
|
369
|
-
export { AreaDirective, BarDirective, BrushDirective, ChartComponent, ChartTooltipDirective,
|
|
367
|
+
export { AreaDirective, BarDirective, BrushDirective, CHARTS_DIRECTIVES, ChartComponent, ChartTooltipDirective, CircleDirective, ForeignObjectDirective, PathDirective, TextDirective, XAxisDirective, YAxisDirective };
|
package/email-input/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, OnDestroy, EventEmitter, ElementRef, ChangeDetectorRef } from '@angular/core';
|
|
3
|
-
import * as i3 from '@angular/forms';
|
|
4
3
|
import { FormControl } from '@angular/forms';
|
|
5
|
-
import * as i2 from '@angular/common';
|
|
6
4
|
|
|
7
5
|
interface IValidationChange {
|
|
8
6
|
isValid: boolean;
|
|
@@ -48,14 +46,8 @@ declare class EmailInputComponent implements OnInit, OnDestroy {
|
|
|
48
46
|
private _emitValidationChange;
|
|
49
47
|
ngOnDestroy(): void;
|
|
50
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<EmailInputComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EmailInputComponent, "nw-email-input", ["nw-email-input"], { "emails": { "alias": "emails"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "persistentPlaceholder": { "alias": "persistentPlaceholder"; "required": false; }; "blacklist": { "alias": "blacklist"; "required": false; }; }, { "updated": "updated"; }, never, never,
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EmailInputComponent, "nw-email-input", ["nw-email-input"], { "emails": { "alias": "emails"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "persistentPlaceholder": { "alias": "persistentPlaceholder"; "required": false; }; "blacklist": { "alias": "blacklist"; "required": false; }; }, { "updated": "updated"; }, never, never, true, never>;
|
|
52
50
|
}
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EmailInputModule, never>;
|
|
56
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EmailInputModule, [typeof EmailInputComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule], [typeof EmailInputComponent]>;
|
|
57
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<EmailInputModule>;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { EmailInputComponent, EmailInputModule };
|
|
52
|
+
export { EmailInputComponent };
|
|
61
53
|
export type { IValidationChange };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectorRef, OnInit, OnDestroy,
|
|
2
|
+
import { ChangeDetectorRef, OnInit, OnDestroy, Provider } from '@angular/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import * as i3 from '@angular/common';
|
|
5
4
|
|
|
6
5
|
declare class WindowRef {
|
|
7
6
|
get nativeWindow(): Window & typeof globalThis;
|
|
@@ -24,6 +23,17 @@ declare class FeatureAlertsService {
|
|
|
24
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<FeatureAlertsService>;
|
|
25
24
|
}
|
|
26
25
|
|
|
26
|
+
interface IFeatureAlertParams {
|
|
27
|
+
id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
message: string;
|
|
30
|
+
placement: string;
|
|
31
|
+
containerClass?: string;
|
|
32
|
+
triggers?: string;
|
|
33
|
+
container?: string;
|
|
34
|
+
isBlockEl?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
declare class HotspotComponent {
|
|
28
38
|
private _featureAlertsService;
|
|
29
39
|
private _cdRef;
|
|
@@ -33,7 +43,7 @@ declare class HotspotComponent {
|
|
|
33
43
|
get isOpen(): boolean;
|
|
34
44
|
dismiss(): void;
|
|
35
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<HotspotComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HotspotComponent, "nw-hotspot", never, { "position": { "alias": "position"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never,
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HotspotComponent, "nw-hotspot", never, { "position": { "alias": "position"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
declare class FeatureAlertsDirective implements OnInit, OnDestroy {
|
|
@@ -66,26 +76,10 @@ declare class FeatureAlertsDirective implements OnInit, OnDestroy {
|
|
|
66
76
|
private _toggleFeatureAlert;
|
|
67
77
|
ngOnDestroy(): void;
|
|
68
78
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureAlertsDirective, never>;
|
|
69
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FeatureAlertsDirective, "[nwFeatureAlert]", never, { "nwFeatureAlert": { "alias": "nwFeatureAlert"; "required": false; }; }, {}, never, never,
|
|
79
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FeatureAlertsDirective, "[nwFeatureAlert]", never, { "nwFeatureAlert": { "alias": "nwFeatureAlert"; "required": false; }; }, {}, never, never, true, never>;
|
|
70
80
|
}
|
|
71
81
|
|
|
72
|
-
declare
|
|
73
|
-
static forRoot(): ModuleWithProviders<FeatureAlertsModule>;
|
|
74
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureAlertsModule, never>;
|
|
75
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FeatureAlertsModule, [typeof HotspotComponent, typeof FeatureAlertsDirective], [typeof i3.CommonModule], [typeof HotspotComponent, typeof FeatureAlertsDirective]>;
|
|
76
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<FeatureAlertsModule>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface IFeatureAlertParams {
|
|
80
|
-
id: string;
|
|
81
|
-
title: string;
|
|
82
|
-
message: string;
|
|
83
|
-
placement: string;
|
|
84
|
-
containerClass?: string;
|
|
85
|
-
triggers?: string;
|
|
86
|
-
container?: string;
|
|
87
|
-
isBlockEl?: boolean;
|
|
88
|
-
}
|
|
82
|
+
declare function provideFeatureAlerts(): Provider[];
|
|
89
83
|
|
|
90
|
-
export { FeatureAlertsDirective,
|
|
84
|
+
export { FeatureAlertsDirective, FeatureAlertsService, HotspotComponent, WindowRef, provideFeatureAlerts };
|
|
91
85
|
export type { IFeatureAlertParams };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Directive } from '@angular/core';
|
|
4
3
|
|
|
5
4
|
class AutoFocusDirective {
|
|
6
5
|
constructor(_elRef) {
|
|
@@ -10,36 +9,19 @@ class AutoFocusDirective {
|
|
|
10
9
|
this._elRef.nativeElement.focus();
|
|
11
10
|
}
|
|
12
11
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
13
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: AutoFocusDirective, isStandalone:
|
|
12
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: AutoFocusDirective, isStandalone: true, selector: "[nwAutofocus]", exportAs: ["nw-autofocus"], ngImport: i0 }); }
|
|
14
13
|
}
|
|
15
14
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AutoFocusDirective, decorators: [{
|
|
16
15
|
type: Directive,
|
|
17
16
|
args: [{
|
|
18
17
|
selector: '[nwAutofocus]',
|
|
19
|
-
exportAs: 'nw-autofocus'
|
|
20
|
-
standalone: false
|
|
18
|
+
exportAs: 'nw-autofocus'
|
|
21
19
|
}]
|
|
22
20
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
23
21
|
|
|
24
|
-
class AutoFocusModule {
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
26
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AutoFocusModule, declarations: [AutoFocusDirective], imports: [CommonModule], exports: [AutoFocusDirective] }); }
|
|
27
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AutoFocusModule, imports: [CommonModule] }); }
|
|
28
|
-
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AutoFocusModule, decorators: [{
|
|
30
|
-
type: NgModule,
|
|
31
|
-
args: [{
|
|
32
|
-
declarations: [AutoFocusDirective],
|
|
33
|
-
imports: [
|
|
34
|
-
CommonModule
|
|
35
|
-
],
|
|
36
|
-
exports: [AutoFocusDirective]
|
|
37
|
-
}]
|
|
38
|
-
}] });
|
|
39
|
-
|
|
40
22
|
/**
|
|
41
23
|
* Generated bundle index. Do not edit.
|
|
42
24
|
*/
|
|
43
25
|
|
|
44
|
-
export { AutoFocusDirective
|
|
26
|
+
export { AutoFocusDirective };
|
|
45
27
|
//# sourceMappingURL=nw-style-guide-autofocus.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nw-style-guide-autofocus.mjs","sources":["../../../projects/nw-style-guide/autofocus/autofocus.directive.ts","../../../projects/nw-style-guide/autofocus/
|
|
1
|
+
{"version":3,"file":"nw-style-guide-autofocus.mjs","sources":["../../../projects/nw-style-guide/autofocus/autofocus.directive.ts","../../../projects/nw-style-guide/autofocus/nw-style-guide-autofocus.ts"],"sourcesContent":["import { Directive, OnInit, ElementRef } from \"@angular/core\";\n\n@Directive({\n selector: '[nwAutofocus]',\n exportAs: 'nw-autofocus'\n})\nexport class AutoFocusDirective implements OnInit {\n\n constructor(private _elRef: ElementRef<HTMLElement>) {}\n\n ngOnInit() {\n this._elRef.nativeElement.focus();\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,kBAAkB,CAAA;AAE3B,IAAA,WAAA,CAAoB,MAA+B,EAAA;QAA/B,IAAA,CAAA,MAAM,GAAN,MAAM;IAA4B;IAEtD,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE;IACrC;+GANS,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE;AACb,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { HostBinding, Input, Directive, EventEmitter, ContentChildren, ViewChild, Output, ChangeDetectionStrategy, Component
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { HostBinding, Input, Directive, EventEmitter, ContentChildren, ViewChild, Output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
3
|
import { trigger, transition, style, animate, AUTO_STYLE } from '@angular/animations';
|
|
6
4
|
import { debounceTime } from 'rxjs/operators';
|
|
7
5
|
import { fromEvent } from 'rxjs';
|
|
6
|
+
import { NgIf, NgStyle, NgClass, NgFor } from '@angular/common';
|
|
8
7
|
|
|
9
8
|
class CarouselSlideDirective {
|
|
10
9
|
constructor() {
|
|
11
10
|
this.snapAlign = 'start';
|
|
12
11
|
}
|
|
13
12
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CarouselSlideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
14
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: CarouselSlideDirective, isStandalone:
|
|
13
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: CarouselSlideDirective, isStandalone: true, selector: "[nwCarouselSlide]", inputs: { snapAlign: "snapAlign" }, host: { properties: { "style.scroll-snap-align": "this.snapAlign" } }, exportAs: ["nw-carousel-slide"], ngImport: i0 }); }
|
|
15
14
|
}
|
|
16
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CarouselSlideDirective, decorators: [{
|
|
17
16
|
type: Directive,
|
|
18
17
|
args: [{
|
|
19
18
|
selector: '[nwCarouselSlide]',
|
|
20
|
-
exportAs: 'nw-carousel-slide'
|
|
21
|
-
standalone: false
|
|
19
|
+
exportAs: 'nw-carousel-slide'
|
|
22
20
|
}]
|
|
23
21
|
}], propDecorators: { snapAlign: [{
|
|
24
22
|
type: HostBinding,
|
|
@@ -115,7 +113,7 @@ class CarouselComponent {
|
|
|
115
113
|
this._slidesSub.unsubscribe();
|
|
116
114
|
}
|
|
117
115
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CarouselComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
118
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CarouselComponent, isStandalone:
|
|
116
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CarouselComponent, isStandalone: true, selector: "nw-carousel", inputs: { showPageIndicator: "showPageIndicator", showPagination: "showPagination", showMask: "showMask", maskColor: "maskColor", containerClass: "containerClass", currPage: "currPage", noResultsText: "noResultsText" }, outputs: { currPageChange: "currPageChange" }, queries: [{ propertyName: "slides", predicate: CarouselSlideDirective }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true, static: true }], exportAs: ["nw-carousel"], usesOnChanges: true, ngImport: i0, template: `
|
|
119
117
|
<div class="carousel-container">
|
|
120
118
|
<div class="pagination-container" *ngIf="showPagination && !isFirstPage">
|
|
121
119
|
<button class="btn btn-carousel btn-carousel-prev" (click)="prev()"></button>
|
|
@@ -153,7 +151,7 @@ class CarouselComponent {
|
|
|
153
151
|
</div>
|
|
154
152
|
|
|
155
153
|
<ng-content select=".pagination-indicators"></ng-content>
|
|
156
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
154
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
|
|
157
155
|
trigger('collapse', [
|
|
158
156
|
transition(':leave', [
|
|
159
157
|
style({ width: AUTO_STYLE }),
|
|
@@ -215,7 +213,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
215
213
|
])
|
|
216
214
|
])
|
|
217
215
|
],
|
|
218
|
-
|
|
216
|
+
imports: [NgIf, NgStyle, NgClass, NgFor]
|
|
219
217
|
}]
|
|
220
218
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { showPageIndicator: [{
|
|
221
219
|
type: Input
|
|
@@ -241,25 +239,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
241
239
|
args: [CarouselSlideDirective]
|
|
242
240
|
}] } });
|
|
243
241
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
imports: [
|
|
253
|
-
CommonModule
|
|
254
|
-
],
|
|
255
|
-
declarations: [CarouselComponent, CarouselSlideDirective],
|
|
256
|
-
exports: [CarouselComponent, CarouselSlideDirective]
|
|
257
|
-
}]
|
|
258
|
-
}] });
|
|
242
|
+
/**
|
|
243
|
+
* Export cooperating directives
|
|
244
|
+
* https://v17.angular.io/guide/standalone-components#standalone-components-for-library-authors
|
|
245
|
+
*/
|
|
246
|
+
const CAROUSEL_DIRECTIVES = [
|
|
247
|
+
CarouselComponent,
|
|
248
|
+
CarouselSlideDirective
|
|
249
|
+
];
|
|
259
250
|
|
|
260
251
|
/**
|
|
261
252
|
* Generated bundle index. Do not edit.
|
|
262
253
|
*/
|
|
263
254
|
|
|
264
|
-
export {
|
|
255
|
+
export { CAROUSEL_DIRECTIVES, CarouselComponent, CarouselSlideDirective };
|
|
265
256
|
//# sourceMappingURL=nw-style-guide-carousel.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nw-style-guide-carousel.mjs","sources":["../../../projects/nw-style-guide/carousel/carousel-slide.directive.ts","../../../projects/nw-style-guide/carousel/carousel.component.ts","../../../projects/nw-style-guide/carousel/carousel.module.ts","../../../projects/nw-style-guide/carousel/nw-style-guide-carousel.ts"],"sourcesContent":["import { Directive, Input, HostBinding } from '@angular/core';\n\n@Directive({\n selector: '[nwCarouselSlide]',\n exportAs: 'nw-carousel-slide',\n standalone: false\n})\nexport class CarouselSlideDirective {\n\n @HostBinding('style.scroll-snap-align')\n @Input() snapAlign: 'none' | 'start' | 'end' | 'center' = 'start';\n\n}\n","import { Component, ChangeDetectionStrategy, Input, ElementRef, ViewChild, Renderer2, ChangeDetectorRef, AfterViewInit, OnDestroy, OnInit, Output, EventEmitter, OnChanges, SimpleChanges, ContentChildren, QueryList, AfterContentInit } from '@angular/core';\nimport { trigger, transition, style, animate, AUTO_STYLE } from '@angular/animations';\nimport { debounceTime } from \"rxjs/operators\";\nimport { CarouselSlideDirective } from \"./carousel-slide.directive\";\nimport { Subscription, fromEvent } from 'rxjs';\n\n@Component({\n selector: 'nw-carousel',\n template: `\n <div class=\"carousel-container\">\n <div class=\"pagination-container\" *ngIf=\"showPagination && !isFirstPage\">\n <button class=\"btn btn-carousel btn-carousel-prev\" (click)=\"prev()\"></button>\n </div>\n\n <ng-content select=\".pagination-left\"></ng-content>\n\n <div class=\"carousel-content\">\n <div class=\"pagination-masks\" *ngIf=\"showMask && pages.length > 1\">\n <div class=\"pagination-mask pagination-mask-start\" *ngIf=\"!isFirstPage\" @collapse\n [ngStyle]=\"maskStyles\"></div>\n\n <div class=\"pagination-mask pagination-mask-end\" *ngIf=\"!isLastPage\" @collapse\n [ngStyle]=\"maskStyles\"></div>\n </div>\n\n <div class=\"carousel\" #carousel [ngClass]=\"containerClass\">\n <ng-content></ng-content>\n\n <p *ngIf=\"slides.length === 0\" class=\"nw-text text-center\">{{noResultsText}}</p>\n </div>\n </div>\n\n <div class=\"pagination-container\" *ngIf=\"showPagination && !isLastPage\">\n <button class=\"btn btn-carousel btn-carousel-next\" (click)=\"next()\"></button>\n </div>\n\n <ng-content select=\".pagination-right\"></ng-content>\n </div>\n\n <div class=\"page-indicators\" *ngIf=\"showPageIndicator && pages.length > 1\">\n <a href=\"javascript:;\" class=\"page-indicator\" *ngFor=\"let page of pages\"\n [class.active]=\"page === currPage\"\n (click)=\"goToPage(page)\"></a>\n </div>\n\n <ng-content select=\".pagination-indicators\"></ng-content>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'nw-carousel',\n animations: [\n trigger('collapse', [\n transition(':leave', [\n style({ width: AUTO_STYLE }),\n animate(`300ms linear`, style({ width: 0 }))\n ])\n ])\n ],\n standalone: false\n})\nexport class CarouselComponent implements OnInit, AfterViewInit, AfterContentInit, OnChanges, OnDestroy {\n\n @Input() showPageIndicator: boolean = true;\n @Input() showPagination: boolean = true;\n @Input() showMask: boolean = true;\n @Input() maskColor: string = '#ffffff';\n @Input() containerClass: string;\n @Input() currPage: number = 0;\n @Input() noResultsText: string = \"No results\";\n\n @Output() currPageChange: EventEmitter<number> = new EventEmitter();\n\n @ViewChild('carousel', { static: true }) carousel: ElementRef;\n\n @ContentChildren(CarouselSlideDirective) slides: QueryList<CarouselSlideDirective>;\n\n public pages: number[] = [];\n\n private _windowResizeSub: Subscription;\n private _slidesSub: Subscription;\n\n constructor(\n private _renderer: Renderer2,\n private _cdRef: ChangeDetectorRef) {}\n\n ngOnInit() {\n this.subscribeToWindowResize();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.currPage && changes.currPage.previousValue !== changes.currPage.currentValue) {\n this._setScrollPosition(this.currPage);\n }\n }\n\n ngAfterViewInit() {\n this.updatePages();\n\n if (this.currPage !== 0) {\n this._setScrollPosition(this.currPage);\n }\n }\n\n ngAfterContentInit() {\n this._slidesSub = this.slides.changes.subscribe(res => {\n this.updatePages();\n });\n }\n\n next() {\n this.goToPage(Math.min(this.pages.length - 1, this.currPage + 1));\n }\n\n prev() {\n this.goToPage(Math.max(0, this.currPage - 1));\n }\n\n goToPage(page: number) {\n this.currPage = page;\n this.currPageChange.emit(this.currPage);\n\n this._setScrollPosition(page);\n }\n\n private _setScrollPosition(page: number): void {\n const carouselWidth: number = this.carouselNativeElement.clientWidth;\n const newScrollPosition: number = page * carouselWidth;\n\n this._renderer.setProperty(this.carouselNativeElement, 'scrollLeft', newScrollPosition);\n }\n\n getPages() {\n const estimatedPages: number = +(this.carouselNativeElement.scrollWidth / this.carouselNativeElement.clientWidth).toFixed(1);\n const numOfPages: number = Math.ceil(estimatedPages);\n\n return [...Array(numOfPages).fill(1)].map((_, i) => i);\n }\n\n updatePages(): void {\n this.pages = this.getPages();\n this._cdRef.detectChanges();\n }\n\n get carouselNativeElement(): HTMLDivElement {\n return (this.carousel.nativeElement as HTMLDivElement);\n }\n\n get isFirstPage(): boolean {\n return this.currPage === 0;\n }\n\n get isLastPage(): boolean {\n return this.currPage === this.pages[this.pages.length - 1];\n }\n\n get maskStyles() {\n return {\n '-webkit-mask-image': `linear-gradient(to left, rgba(0,0,0,0), ${this.maskColor})`,\n 'background-color': `${this.maskColor}`\n };\n }\n\n get maskGradient() {\n return `linear-gradient(to left, rgba(0,0,0,0), ${this.maskColor})`;\n }\n\n subscribeToWindowResize() {\n this._windowResizeSub = fromEvent(window, 'resize')\n .pipe(debounceTime(100))\n .subscribe(_ => {\n this.goToPage(0);\n this.updatePages();\n });\n }\n\n ngOnDestroy() {\n this._windowResizeSub.unsubscribe();\n this._slidesSub.unsubscribe();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CarouselComponent } from './carousel.component';\nimport { CarouselSlideDirective } from './carousel-slide.directive';\n\n@NgModule({\n imports: [\n CommonModule\n ],\n declarations: [CarouselComponent, CarouselSlideDirective],\n exports: [CarouselComponent, CarouselSlideDirective]\n})\nexport class CarouselModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAOa,sBAAsB,CAAA;AALnC,IAAA,WAAA,GAAA;QAQa,IAAA,CAAA,SAAS,GAAwC,OAAO;AAEpE,IAAA;+GALY,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAtB,sBAAsB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,yBAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA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,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAEtC,eAAe;uBAAC,sBAAsB;;;MC7D9B,cAAc,CAAA;+GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAd,cAAc,EAAA,YAAA,EAAA,CAHR,iBAAiB,EAAE,sBAAsB,aAFpD,YAAY,CAAA,EAAA,OAAA,EAAA,CAGN,iBAAiB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAE1C,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YALnB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAKP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL;AACH,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AACzD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,sBAAsB;AACtD,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"nw-style-guide-carousel.mjs","sources":["../../../projects/nw-style-guide/carousel/carousel-slide.directive.ts","../../../projects/nw-style-guide/carousel/carousel.component.ts","../../../projects/nw-style-guide/carousel/public-api.ts","../../../projects/nw-style-guide/carousel/nw-style-guide-carousel.ts"],"sourcesContent":["import { Directive, Input, HostBinding } from '@angular/core';\n\n@Directive({\n selector: '[nwCarouselSlide]',\n exportAs: 'nw-carousel-slide'\n})\nexport class CarouselSlideDirective {\n\n @HostBinding('style.scroll-snap-align')\n @Input() snapAlign: 'none' | 'start' | 'end' | 'center' = 'start';\n\n}\n","import { Component, ChangeDetectionStrategy, Input, ElementRef, ViewChild, Renderer2, ChangeDetectorRef, AfterViewInit, OnDestroy, OnInit, Output, EventEmitter, OnChanges, SimpleChanges, ContentChildren, QueryList, AfterContentInit } from '@angular/core';\nimport { trigger, transition, style, animate, AUTO_STYLE } from '@angular/animations';\nimport { debounceTime } from \"rxjs/operators\";\nimport { CarouselSlideDirective } from \"./carousel-slide.directive\";\nimport { Subscription, fromEvent } from 'rxjs';\nimport { NgIf, NgStyle, NgClass, NgFor } from '@angular/common';\n\n@Component({\n selector: 'nw-carousel',\n template: `\n <div class=\"carousel-container\">\n <div class=\"pagination-container\" *ngIf=\"showPagination && !isFirstPage\">\n <button class=\"btn btn-carousel btn-carousel-prev\" (click)=\"prev()\"></button>\n </div>\n\n <ng-content select=\".pagination-left\"></ng-content>\n\n <div class=\"carousel-content\">\n <div class=\"pagination-masks\" *ngIf=\"showMask && pages.length > 1\">\n <div class=\"pagination-mask pagination-mask-start\" *ngIf=\"!isFirstPage\" @collapse\n [ngStyle]=\"maskStyles\"></div>\n\n <div class=\"pagination-mask pagination-mask-end\" *ngIf=\"!isLastPage\" @collapse\n [ngStyle]=\"maskStyles\"></div>\n </div>\n\n <div class=\"carousel\" #carousel [ngClass]=\"containerClass\">\n <ng-content></ng-content>\n\n <p *ngIf=\"slides.length === 0\" class=\"nw-text text-center\">{{noResultsText}}</p>\n </div>\n </div>\n\n <div class=\"pagination-container\" *ngIf=\"showPagination && !isLastPage\">\n <button class=\"btn btn-carousel btn-carousel-next\" (click)=\"next()\"></button>\n </div>\n\n <ng-content select=\".pagination-right\"></ng-content>\n </div>\n\n <div class=\"page-indicators\" *ngIf=\"showPageIndicator && pages.length > 1\">\n <a href=\"javascript:;\" class=\"page-indicator\" *ngFor=\"let page of pages\"\n [class.active]=\"page === currPage\"\n (click)=\"goToPage(page)\"></a>\n </div>\n\n <ng-content select=\".pagination-indicators\"></ng-content>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'nw-carousel',\n animations: [\n trigger('collapse', [\n transition(':leave', [\n style({ width: AUTO_STYLE }),\n animate(`300ms linear`, style({ width: 0 }))\n ])\n ])\n ],\n imports: [NgIf, NgStyle, NgClass, NgFor]\n})\nexport class CarouselComponent implements OnInit, AfterViewInit, AfterContentInit, OnChanges, OnDestroy {\n\n @Input() showPageIndicator: boolean = true;\n @Input() showPagination: boolean = true;\n @Input() showMask: boolean = true;\n @Input() maskColor: string = '#ffffff';\n @Input() containerClass: string;\n @Input() currPage: number = 0;\n @Input() noResultsText: string = \"No results\";\n\n @Output() currPageChange: EventEmitter<number> = new EventEmitter();\n\n @ViewChild('carousel', { static: true }) carousel: ElementRef;\n\n @ContentChildren(CarouselSlideDirective) slides: QueryList<CarouselSlideDirective>;\n\n public pages: number[] = [];\n\n private _windowResizeSub: Subscription;\n private _slidesSub: Subscription;\n\n constructor(\n private _renderer: Renderer2,\n private _cdRef: ChangeDetectorRef) {}\n\n ngOnInit() {\n this.subscribeToWindowResize();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.currPage && changes.currPage.previousValue !== changes.currPage.currentValue) {\n this._setScrollPosition(this.currPage);\n }\n }\n\n ngAfterViewInit() {\n this.updatePages();\n\n if (this.currPage !== 0) {\n this._setScrollPosition(this.currPage);\n }\n }\n\n ngAfterContentInit() {\n this._slidesSub = this.slides.changes.subscribe(res => {\n this.updatePages();\n });\n }\n\n next() {\n this.goToPage(Math.min(this.pages.length - 1, this.currPage + 1));\n }\n\n prev() {\n this.goToPage(Math.max(0, this.currPage - 1));\n }\n\n goToPage(page: number) {\n this.currPage = page;\n this.currPageChange.emit(this.currPage);\n\n this._setScrollPosition(page);\n }\n\n private _setScrollPosition(page: number): void {\n const carouselWidth: number = this.carouselNativeElement.clientWidth;\n const newScrollPosition: number = page * carouselWidth;\n\n this._renderer.setProperty(this.carouselNativeElement, 'scrollLeft', newScrollPosition);\n }\n\n getPages() {\n const estimatedPages: number = +(this.carouselNativeElement.scrollWidth / this.carouselNativeElement.clientWidth).toFixed(1);\n const numOfPages: number = Math.ceil(estimatedPages);\n\n return [...Array(numOfPages).fill(1)].map((_, i) => i);\n }\n\n updatePages(): void {\n this.pages = this.getPages();\n this._cdRef.detectChanges();\n }\n\n get carouselNativeElement(): HTMLDivElement {\n return (this.carousel.nativeElement as HTMLDivElement);\n }\n\n get isFirstPage(): boolean {\n return this.currPage === 0;\n }\n\n get isLastPage(): boolean {\n return this.currPage === this.pages[this.pages.length - 1];\n }\n\n get maskStyles() {\n return {\n '-webkit-mask-image': `linear-gradient(to left, rgba(0,0,0,0), ${this.maskColor})`,\n 'background-color': `${this.maskColor}`\n };\n }\n\n get maskGradient() {\n return `linear-gradient(to left, rgba(0,0,0,0), ${this.maskColor})`;\n }\n\n subscribeToWindowResize() {\n this._windowResizeSub = fromEvent(window, 'resize')\n .pipe(debounceTime(100))\n .subscribe(_ => {\n this.goToPage(0);\n this.updatePages();\n });\n }\n\n ngOnDestroy() {\n this._windowResizeSub.unsubscribe();\n this._slidesSub.unsubscribe();\n }\n\n}\n","export { CarouselComponent } from './carousel.component';\nexport { CarouselSlideDirective } from './carousel-slide.directive';\n\nimport { CarouselComponent } from './carousel.component';\nimport { CarouselSlideDirective } from './carousel-slide.directive';\n\n/**\n * Export cooperating directives\n * https://v17.angular.io/guide/standalone-components#standalone-components-for-library-authors\n */\nexport const CAROUSEL_DIRECTIVES = [\n CarouselComponent,\n CarouselSlideDirective\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAMa,sBAAsB,CAAA;AAJnC,IAAA,WAAA,GAAA;QAOa,IAAA,CAAA,SAAS,GAAwC,OAAO;AAEpE,IAAA;+GALY,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA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