cmat 0.0.29 → 0.0.30
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/components/adapter/index.d.ts +8 -9
- package/components/breadcrumb/index.d.ts +2 -4
- package/components/carousel/index.d.ts +3 -5
- package/components/cascade/index.d.ts +6 -7
- package/components/chip-input/index.d.ts +2 -2
- package/components/custom-formly/index.d.ts +41 -49
- package/components/date-range/index.d.ts +5 -6
- package/components/drawer/index.d.ts +30 -34
- package/components/fullscreen/index.d.ts +1 -2
- package/components/highlight/index.d.ts +12 -14
- package/components/image-viewer/index.d.ts +4 -5
- package/components/json-editor/index.d.ts +2 -3
- package/components/knob-input/index.d.ts +8 -8
- package/components/material-color-picker/index.d.ts +3 -3
- package/components/material-datetimepicker/index.d.ts +89 -93
- package/components/navigation/index.d.ts +82 -88
- package/components/opt-input/index.d.ts +6 -6
- package/components/pagination/index.d.ts +6 -9
- package/components/popover/index.d.ts +13 -16
- package/components/progress-bar/index.d.ts +3 -5
- package/components/rating/index.d.ts +5 -5
- package/components/select-search/index.d.ts +16 -17
- package/components/select-table/index.d.ts +6 -6
- package/components/select-tree/index.d.ts +7 -6
- package/components/speed-dial/index.d.ts +2 -3
- package/components/timeline/index.d.ts +2 -3
- package/components/toast/index.d.ts +14 -16
- package/components/transfer-picker/index.d.ts +43 -44
- package/components/treetable/index.d.ts +2 -3
- package/components/upload/index.d.ts +23 -27
- package/directives/animate-on-scroll/index.d.ts +4 -19
- package/directives/arrow-cursor/index.d.ts +2 -4
- package/directives/autofocus/index.d.ts +2 -2
- package/directives/data-exporter/index.d.ts +2 -15
- package/directives/digit-only/index.d.ts +4 -4
- package/directives/equal-validator/index.d.ts +1 -2
- package/fesm2022/cmat-components-adapter.mjs +22 -39
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +19 -21
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +3 -3
- package/fesm2022/cmat-components-carousel.mjs +112 -127
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +61 -73
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +14 -18
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +167 -169
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +17 -17
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +17 -19
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +7 -10
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +14 -14
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +9 -12
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +7 -7
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +12 -19
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +3 -3
- package/fesm2022/cmat-components-material-color-picker.mjs +8 -7
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +166 -216
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +108 -112
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +13 -20
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +9 -9
- package/fesm2022/cmat-components-pagination.mjs +32 -34
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +9 -9
- package/fesm2022/cmat-components-popover.mjs +27 -32
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +10 -10
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +10 -14
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +30 -53
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +28 -33
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +55 -61
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +13 -13
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +18 -20
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +16 -16
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +47 -47
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +11 -12
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +32 -33
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +13 -14
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +11 -14
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +8 -9
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +28 -28
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +11 -13
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +17 -17
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +9 -16
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +11 -14
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +4 -5
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +4 -5
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +4 -5
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +4 -5
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +4 -5
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +13 -14
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +4 -5
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +3 -3
- package/fesm2022/cmat-services-config.mjs +10 -12
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +17 -20
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +10 -11
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-loading.mjs +14 -14
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +10 -10
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +8 -8
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +9 -13
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +10 -11
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +8 -8
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +3 -3
- package/lib/mock-api/index.d.ts +0 -1
- package/package.json +52 -52
- package/pipes/secure/index.d.ts +2 -4
- package/services/config/index.d.ts +1 -1
- package/services/confirmation/index.d.ts +2 -4
- package/services/data/index.d.ts +1 -3
- package/services/loading/index.d.ts +3 -4
- package/services/media-watcher/index.d.ts +2 -3
- package/services/platform/index.d.ts +2 -3
- package/services/splash-screen/index.d.ts +1 -2
- package/services/title/index.d.ts +3 -5
- package/services/translation/index.d.ts +1 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i3 from '@angular/common';
|
|
2
|
-
import {
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Input, Directive,
|
|
4
|
+
import { Component, inject, TemplateRef, Input, Directive, ElementRef, NgZone, ChangeDetectorRef, Renderer2, DOCUMENT, EventEmitter, numberAttribute, booleanAttribute, ContentChildren, ContentChild, ViewChild, Output, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
5
5
|
import * as i2 from '@angular/material/button';
|
|
6
6
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
7
|
import * as i1 from '@angular/material/icon';
|
|
@@ -10,10 +10,10 @@ import { CmatArrowCursorDirective } from 'cmat/directives/arrow-cursor';
|
|
|
10
10
|
|
|
11
11
|
/* eslint-disable @typescript-eslint/member-ordering */
|
|
12
12
|
class CmatCarouselHeaderComponent {
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.
|
|
14
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatCarouselHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.2", type: CmatCarouselHeaderComponent, isStandalone: true, selector: "cmat-carousel-header", ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatCarouselHeaderComponent, decorators: [{
|
|
17
17
|
type: Component,
|
|
18
18
|
args: [{
|
|
19
19
|
selector: 'cmat-carousel-header',
|
|
@@ -21,10 +21,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
21
21
|
}]
|
|
22
22
|
}] });
|
|
23
23
|
class CmatCarouselFooterComponent {
|
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatCarouselFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.2", type: CmatCarouselFooterComponent, isStandalone: true, selector: "cmat-carousel-footer", ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatCarouselFooterComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{
|
|
30
30
|
selector: 'cmat-carousel-footer',
|
|
@@ -32,21 +32,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
32
32
|
}]
|
|
33
33
|
}] });
|
|
34
34
|
class CmatCarouselTemplateDirective {
|
|
35
|
-
constructor(
|
|
36
|
-
this.template =
|
|
35
|
+
constructor() {
|
|
36
|
+
this.template = inject(TemplateRef);
|
|
37
37
|
}
|
|
38
38
|
getType() {
|
|
39
39
|
return this.name;
|
|
40
40
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.
|
|
42
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatCarouselTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.2", type: CmatCarouselTemplateDirective, isStandalone: true, selector: "[cmatCarouselTemplate]", inputs: { type: "type", name: ["cmatCarouselTemplate", "name"] }, ngImport: i0 }); }
|
|
43
43
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatCarouselTemplateDirective, decorators: [{
|
|
45
45
|
type: Directive,
|
|
46
46
|
args: [{
|
|
47
47
|
selector: '[cmatCarouselTemplate]'
|
|
48
48
|
}]
|
|
49
|
-
}],
|
|
49
|
+
}], propDecorators: { type: [{
|
|
50
50
|
type: Input
|
|
51
51
|
}], name: [{
|
|
52
52
|
type: Input,
|
|
@@ -89,13 +89,12 @@ class CmatCarouselComponent {
|
|
|
89
89
|
set data(val) {
|
|
90
90
|
this._data = val;
|
|
91
91
|
}
|
|
92
|
-
constructor(
|
|
93
|
-
this.el =
|
|
94
|
-
this.zone =
|
|
95
|
-
this.cd =
|
|
96
|
-
this.renderer =
|
|
97
|
-
this._document =
|
|
98
|
-
this._platformId = _platformId;
|
|
92
|
+
constructor() {
|
|
93
|
+
this.el = inject(ElementRef);
|
|
94
|
+
this.zone = inject(NgZone);
|
|
95
|
+
this.cd = inject(ChangeDetectorRef);
|
|
96
|
+
this.renderer = inject(Renderer2);
|
|
97
|
+
this._document = inject(DOCUMENT);
|
|
99
98
|
this.orientation = 'horizontal';
|
|
100
99
|
this.navigatorsType = 'normal';
|
|
101
100
|
this.verticalViewPortHeight = '300px';
|
|
@@ -127,51 +126,49 @@ class CmatCarouselComponent {
|
|
|
127
126
|
this.window = this._document.defaultView;
|
|
128
127
|
}
|
|
129
128
|
ngOnChanges(simpleChange) {
|
|
130
|
-
if (
|
|
131
|
-
if (
|
|
132
|
-
|
|
129
|
+
if (simpleChange.data) {
|
|
130
|
+
if (this.circular && this._data) {
|
|
131
|
+
this._setCloneItems();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (this.isCreated) {
|
|
135
|
+
if (simpleChange.circular) {
|
|
136
|
+
if (this.isCircular()) {
|
|
133
137
|
this._setCloneItems();
|
|
134
138
|
}
|
|
135
139
|
}
|
|
136
|
-
if (
|
|
137
|
-
if (
|
|
138
|
-
|
|
139
|
-
this.defaultNumVisible = this.numVisible;
|
|
140
|
-
}
|
|
141
|
-
if (this.isCircular()) {
|
|
142
|
-
this._setCloneItems();
|
|
143
|
-
}
|
|
144
|
-
this._createStyle();
|
|
145
|
-
this._calculatePosition();
|
|
146
|
-
}
|
|
147
|
-
if (simpleChange.numScroll) {
|
|
148
|
-
if (this.responsiveOptions) {
|
|
149
|
-
this.defaultNumScroll = this.numScroll;
|
|
150
|
-
}
|
|
140
|
+
if (simpleChange.numVisible) {
|
|
141
|
+
if (this.responsiveOptions) {
|
|
142
|
+
this.defaultNumVisible = this.numVisible;
|
|
151
143
|
}
|
|
152
|
-
|
|
153
|
-
|
|
144
|
+
this._createStyle();
|
|
145
|
+
this._calculatePosition();
|
|
146
|
+
}
|
|
147
|
+
if (simpleChange.numScroll) {
|
|
148
|
+
if (this.responsiveOptions) {
|
|
149
|
+
this.defaultNumScroll = this.numScroll;
|
|
154
150
|
}
|
|
155
151
|
}
|
|
152
|
+
if (simpleChange.autoplayInterval) {
|
|
153
|
+
this.allowAutoplay = !!this.autoplayInterval;
|
|
154
|
+
}
|
|
156
155
|
}
|
|
157
156
|
this.cd.markForCheck();
|
|
158
157
|
}
|
|
159
158
|
ngAfterContentInit() {
|
|
160
159
|
this.id = `cmat-carousel-${NEXT_ID++}`;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this._bindDocumentListeners();
|
|
174
|
-
}
|
|
160
|
+
this.allowAutoplay = !!this.autoplayInterval;
|
|
161
|
+
if (this.circular) {
|
|
162
|
+
this._setCloneItems();
|
|
163
|
+
}
|
|
164
|
+
if (this.responsiveOptions) {
|
|
165
|
+
this.defaultNumScroll = this._numScroll;
|
|
166
|
+
this.defaultNumVisible = this._numVisible;
|
|
167
|
+
}
|
|
168
|
+
this._createStyle();
|
|
169
|
+
this._calculatePosition();
|
|
170
|
+
if (this.responsiveOptions) {
|
|
171
|
+
this._bindDocumentListeners();
|
|
175
172
|
}
|
|
176
173
|
this.templates?.forEach((item) => {
|
|
177
174
|
switch (item.getType()) {
|
|
@@ -198,62 +195,60 @@ class CmatCarouselComponent {
|
|
|
198
195
|
this.cd.detectChanges();
|
|
199
196
|
}
|
|
200
197
|
ngAfterContentChecked() {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (this.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
this.
|
|
214
|
-
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
totalShiftedItems = page * this._numScroll * -1;
|
|
218
|
-
if (isCircular) {
|
|
219
|
-
totalShiftedItems -= this._numVisible;
|
|
220
|
-
}
|
|
221
|
-
if (page === this.totalDots() - 1 && this.remainingItems > 0) {
|
|
222
|
-
totalShiftedItems += -1 * this.remainingItems + this._numScroll;
|
|
223
|
-
this.isRemainingItemsAdded = true;
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
this.isRemainingItemsAdded = false;
|
|
227
|
-
}
|
|
228
|
-
if (totalShiftedItems !== this.totalShiftedItems) {
|
|
229
|
-
this.totalShiftedItems = totalShiftedItems;
|
|
230
|
-
}
|
|
231
|
-
this._oldNumScroll = this._numScroll;
|
|
232
|
-
this.prevState.numScroll = this._numScroll;
|
|
233
|
-
this.prevState.numVisible = this._numVisible;
|
|
234
|
-
this.prevState.value = [...(this._data)];
|
|
235
|
-
if (this.totalDots() > 0 && this.itemsContainer.nativeElement) {
|
|
236
|
-
this.itemsContainer.nativeElement.style.transform = this.isVertical() ? `translate3d(0, ${totalShiftedItems * (100 / this._numVisible)}%, 0)` : `translate3d(${totalShiftedItems * (100 / this._numVisible)}%, 0, 0)`;
|
|
237
|
-
}
|
|
238
|
-
this.isCreated = true;
|
|
239
|
-
if (this.autoplayInterval && this.isAutoplay()) {
|
|
240
|
-
this._startAutoplay();
|
|
241
|
-
}
|
|
198
|
+
const isCircular = this.isCircular();
|
|
199
|
+
let totalShiftedItems = this.totalShiftedItems;
|
|
200
|
+
if (this.data && this.itemsContainer && (this.prevState.numScroll !== this._numScroll || this.prevState.numVisible !== this._numVisible || this.prevState.value.length !== this.data.length)) {
|
|
201
|
+
if (this.autoplayInterval) {
|
|
202
|
+
this._stopAutoplay(false);
|
|
203
|
+
}
|
|
204
|
+
this.remainingItems = (this.data.length - this._numVisible) % this._numScroll;
|
|
205
|
+
let page = this._page;
|
|
206
|
+
if (this.totalDots() !== 0 && page >= this.totalDots()) {
|
|
207
|
+
page = this.totalDots() - 1;
|
|
208
|
+
this._page = page;
|
|
209
|
+
this.pageEvent.emit({
|
|
210
|
+
page: this.page
|
|
211
|
+
});
|
|
242
212
|
}
|
|
213
|
+
totalShiftedItems = page * this._numScroll * -1;
|
|
243
214
|
if (isCircular) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
215
|
+
totalShiftedItems -= this._numVisible;
|
|
216
|
+
}
|
|
217
|
+
if (page === this.totalDots() - 1 && this.remainingItems > 0) {
|
|
218
|
+
totalShiftedItems += -1 * this.remainingItems + this._numScroll;
|
|
219
|
+
this.isRemainingItemsAdded = true;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
this.isRemainingItemsAdded = false;
|
|
223
|
+
}
|
|
224
|
+
if (totalShiftedItems !== this.totalShiftedItems) {
|
|
225
|
+
this.totalShiftedItems = totalShiftedItems;
|
|
226
|
+
}
|
|
227
|
+
this._oldNumScroll = this._numScroll;
|
|
228
|
+
this.prevState.numScroll = this._numScroll;
|
|
229
|
+
this.prevState.numVisible = this._numVisible;
|
|
230
|
+
this.prevState.value = [...(this._data)];
|
|
231
|
+
if (this.totalDots() > 0 && this.itemsContainer.nativeElement) {
|
|
232
|
+
this.itemsContainer.nativeElement.style.transform = this.isVertical() ? `translate3d(0, ${totalShiftedItems * (100 / this._numVisible)}%, 0)` : `translate3d(${totalShiftedItems * (100 / this._numVisible)}%, 0, 0)`;
|
|
233
|
+
}
|
|
234
|
+
this.isCreated = true;
|
|
235
|
+
if (this.autoplayInterval && this.isAutoplay()) {
|
|
236
|
+
this._startAutoplay();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (isCircular) {
|
|
240
|
+
if (this.page === 0) {
|
|
241
|
+
totalShiftedItems = -1 * this._numVisible;
|
|
242
|
+
}
|
|
243
|
+
else if (totalShiftedItems === 0) {
|
|
244
|
+
totalShiftedItems = -1 * this.data.length;
|
|
245
|
+
if (this.remainingItems > 0) {
|
|
246
|
+
this.isRemainingItemsAdded = true;
|
|
255
247
|
}
|
|
256
248
|
}
|
|
249
|
+
if (totalShiftedItems !== this.totalShiftedItems) {
|
|
250
|
+
this.totalShiftedItems = totalShiftedItems;
|
|
251
|
+
}
|
|
257
252
|
}
|
|
258
253
|
}
|
|
259
254
|
ngOnDestroy() {
|
|
@@ -411,18 +406,14 @@ class CmatCarouselComponent {
|
|
|
411
406
|
}
|
|
412
407
|
}
|
|
413
408
|
_bindDocumentListeners() {
|
|
414
|
-
|
|
415
|
-
this.
|
|
416
|
-
|
|
417
|
-
});
|
|
418
|
-
}
|
|
409
|
+
this.documentResizeListener ??= this.renderer.listen(this.window, 'resize', () => {
|
|
410
|
+
this._calculatePosition();
|
|
411
|
+
});
|
|
419
412
|
}
|
|
420
413
|
_unbindDocumentListeners() {
|
|
421
|
-
if (
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
this.documentResizeListener = null;
|
|
425
|
-
}
|
|
414
|
+
if (this.documentResizeListener) {
|
|
415
|
+
this.documentResizeListener();
|
|
416
|
+
this.documentResizeListener = null;
|
|
426
417
|
}
|
|
427
418
|
}
|
|
428
419
|
_onRightKey() {
|
|
@@ -626,19 +617,13 @@ class CmatCarouselComponent {
|
|
|
626
617
|
this.clonedItemsForFinishing.push(...this.data.slice(0, this._numVisible));
|
|
627
618
|
}
|
|
628
619
|
}
|
|
629
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.
|
|
630
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: CmatCarouselComponent, isStandalone: true, selector: "cmat-carousel", inputs: { page: "page", numVisible: "numVisible", numScroll: "numScroll", responsiveOptions: "responsiveOptions", orientation: "orientation", navigatorsType: "navigatorsType", verticalViewPortHeight: "verticalViewPortHeight", arrowSelector: "arrowSelector", contentClass: "contentClass", indicatorsContentClass: "indicatorsContentClass", indicatorsContentStyle: "indicatorsContentStyle", indicatorStyleClass: "indicatorStyleClass", indicatorStyle: "indicatorStyle", data: "data", circular: ["circular", "circular", booleanAttribute], showIndicators: ["showIndicators", "showIndicators", booleanAttribute], showNavigators: ["showNavigators", "showNavigators", booleanAttribute], autoplayInterval: ["autoplayInterval", "autoplayInterval", numberAttribute], style: "style", styleClass: "styleClass" }, outputs: { pageEvent: "pageEvent" }, queries: [{ propertyName: "headerFacet", first: true, predicate: CmatCarouselHeaderComponent, descendants: true }, { propertyName: "footerFacet", first: true, predicate: CmatCarouselFooterComponent, descendants: true }, { propertyName: "templates", predicate: CmatCarouselTemplateDirective }], viewQueries: [{ propertyName: "itemsContainer", first: true, predicate: ["itemsContainer"], descendants: true }, { propertyName: "indicatorContent", first: true, predicate: ["indicatorContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div role=\"region\" [attr.id]=\"id\"\r\n [ngClass]=\"{ 'cmat-carousel': true, 'cmat-carousel-vertical': isVertical(), 'cmat-carousel-horizontal': !isVertical() }\"\r\n [ngStyle]=\"style\" [class]=\"styleClass\">\r\n\r\n @if(headerFacet || headerTemplate){\r\n <div class=\"cmat-carousel-header\">\r\n <ng-content select=\"cmat-carousel-header\"></ng-content>\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n </div>\r\n }\r\n\r\n <div [class]=\"contentClass\" [ngClass]=\"'items-center cmat-carousel-content'\">\r\n <div class=\"cmat-carousel-container\" cmatArrowCursor [orientation]=\"orientation\" [selector]=\"arrowSelector\"\r\n [enabled]=\"navigatorsType==='arrow'\" [attr.aria-live]=\"allowAutoplay ? 'polite' : 'off'\"\r\n (clickEvent)=\"arrowCursorClick($event)\">\r\n @if(showNavigators&&navigatorsType==='normal'){\r\n <button type=\"button\" mat-icon-button [ngClass]=\"{ 'cmat-carousel-prev': true }\"\r\n [disabled]=\"isBackwardNavDisabled()\" (click)=\"navBackward($event)\">\r\n @if(!previousIconTemplate){\r\n @if(!isVertical()){\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-left'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-up'\"></mat-icon>\r\n }\r\n }\r\n @else {\r\n <span class=\"cmat-carousel-prev-icon\">\r\n <ng-template *ngTemplateOutlet=\"previousIconTemplate\"></ng-template>\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n <div class=\"cmat-carousel-items-content\"\r\n [ngStyle]=\"{ height: isVertical() ? verticalViewPortHeight : 'auto' }\" (touchend)=\"onTouchEnd($event)\"\r\n (touchstart)=\"onTouchStart($event)\" (touchmove)=\"onTouchMove($event)\">\r\n <div #itemsContainer class=\"cmat-carousel-items-container\" (transitionend)=\"onTransitionEnd()\">\r\n @for (item of clonedItemsForStarting; track $index) {\r\n <div [ngClass]=\"{\r\n 'cmat-carousel-item cmat-carousel-item-cloned': true,\r\n 'cmat-carousel-item-active': totalShiftedItems * -1 === data.length,\r\n 'cmat-carousel-item-start': 0 === $index,\r\n 'cmat-carousel-item-end': clonedItemsForStarting?.length??0 - 1 === $index\r\n }\" [attr.aria-hidden]=\"!(totalShiftedItems * -1 === data.length)\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n @for (item of data; track $index) {\r\n <div [ngClass]=\"{ 'cmat-carousel-item': true, 'cmat-carousel-item-active': firstIndex() <= $index && lastIndex() >= $index, 'cmat-carousel-item-start': firstIndex() === $index, 'cmat-carousel-item-end': lastIndex() === $index }\"\r\n [attr.aria-hidden]=\"!(totalShiftedItems * -1 === data.length)\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n @for (item of clonedItemsForFinishing; track $index) {\r\n <div [ngClass]=\"{\r\n 'cmat-carousel-item cmat-carousel-item-cloned': true,\r\n 'cmat-carousel-item-active': totalShiftedItems * -1 === numVisible,\r\n 'cmat-carousel-item-start': 0 === $index,\r\n 'cmat-carousel-item-end': clonedItemsForFinishing?.length??0 - 1 === $index\r\n }\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n @if(showNavigators&&navigatorsType==='normal'){\r\n <button type=\"button\" mat-icon-button [ngClass]=\"{ 'cmat-carousel-next': true}\"\r\n [disabled]=\"isForwardNavDisabled()\" (click)=\"navForward($event)\">\r\n @if(!nextIconTemplate){\r\n @if(!isVertical()){\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-right'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-down'\"></mat-icon>\r\n }\r\n }\r\n @else{\r\n <span class=\"cmat-carousel-prev-icon\">\r\n <ng-template *ngTemplateOutlet=\"nextIconTemplate\"></ng-template>\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n </div>\r\n @if(showIndicators){\r\n <ul #indicatorContent role=\"presentation\" [ngClass]=\"'cmat-carousel-indicators'\"\r\n [class]=\"indicatorsContentClass\" [ngStyle]=\"indicatorsContentStyle\" (keydown)=\"onIndicatorKeydown($event)\">\r\n @for (totalDot of totalDotsArray(); track $index) {\r\n <li [ngClass]=\"{ 'cmat-carousel-indicator': true, 'cmat-carousel-indicator-active': page === $index }\"\r\n [attr.data-pc-section]=\"'indicator'\">\r\n <button type=\"button\" [ngClass]=\"'cmat-carousel-indicator-button'\" [class]=\"indicatorStyleClass\"\r\n [ngStyle]=\"indicatorStyle\" [attr.aria-current]=\"page === $index ? 'page' : undefined\"\r\n [tabindex]=\"page === $index ? 0 : -1\" (click)=\"onDotClick($event, $index)\">\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n\r\n </div>\r\n @if(footerFacet || footerTemplate){\r\n <div class=\"cmat-carousel-footer\">\r\n <ng-content select=\"cmat-carousel-footer\"></ng-content>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n </div>\r\n }\r\n</div>", styles: ["cmat-carousel{display:flex;flex-direction:column}cmat-carousel .cmat-carousel-content{display:flex;flex-direction:column;overflow:hidden}cmat-carousel .cmat-carousel-prev,cmat-carousel .cmat-carousel-next{align-self:center;flex-grow:0;flex-shrink:0;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative;margin:.25rem}cmat-carousel .cmat-carousel-container{display:flex;flex-direction:row;width:100%}cmat-carousel .cmat-carousel-items-content{overflow:hidden;width:100%}cmat-carousel .cmat-carousel-items-container{display:flex;flex-direction:row}cmat-carousel .cmat-carousel-indicators{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap;padding:1rem;gap:.5rem;margin:0;list-style:none}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator-active{background:var(--cmat-text-default)!important;opacity:1!important}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator{border:0 none;border-radius:6px;background:var(--cmat-text-disabled);transition:background .2s,color .2s,outline-color .2s,box-shadow .2s;opacity:.3}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator .cmat-carousel-indicator-button{display:flex;align-items:center;justify-content:center;width:2rem;height:.5rem;outline-color:transparent;padding:0;margin:0;-webkit-user-select:none;user-select:none;cursor:pointer}cmat-carousel .cmat-carousel-vertical .cmat-carousel-container{flex-direction:column;width:auto}cmat-carousel .cmat-carousel-vertical .cmat-carousel-items-container{flex-direction:column;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: CmatArrowCursorDirective, selector: "[cmatArrowCursor]", inputs: ["animationDuration", "orientation", "enabled", "selector"], outputs: ["clickEvent"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
620
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
621
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CmatCarouselComponent, isStandalone: true, selector: "cmat-carousel", inputs: { page: "page", numVisible: "numVisible", numScroll: "numScroll", responsiveOptions: "responsiveOptions", orientation: "orientation", navigatorsType: "navigatorsType", verticalViewPortHeight: "verticalViewPortHeight", arrowSelector: "arrowSelector", contentClass: "contentClass", indicatorsContentClass: "indicatorsContentClass", indicatorsContentStyle: "indicatorsContentStyle", indicatorStyleClass: "indicatorStyleClass", indicatorStyle: "indicatorStyle", data: "data", circular: ["circular", "circular", booleanAttribute], showIndicators: ["showIndicators", "showIndicators", booleanAttribute], showNavigators: ["showNavigators", "showNavigators", booleanAttribute], autoplayInterval: ["autoplayInterval", "autoplayInterval", numberAttribute], style: "style", styleClass: "styleClass" }, outputs: { pageEvent: "pageEvent" }, queries: [{ propertyName: "headerFacet", first: true, predicate: CmatCarouselHeaderComponent, descendants: true }, { propertyName: "footerFacet", first: true, predicate: CmatCarouselFooterComponent, descendants: true }, { propertyName: "templates", predicate: CmatCarouselTemplateDirective }], viewQueries: [{ propertyName: "itemsContainer", first: true, predicate: ["itemsContainer"], descendants: true }, { propertyName: "indicatorContent", first: true, predicate: ["indicatorContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div role=\"region\" [attr.id]=\"id\"\r\n [ngClass]=\"{ 'cmat-carousel': true, 'cmat-carousel-vertical': isVertical(), 'cmat-carousel-horizontal': !isVertical() }\"\r\n [ngStyle]=\"style\" [class]=\"styleClass\">\r\n\r\n @if(headerFacet || headerTemplate){\r\n <div class=\"cmat-carousel-header\">\r\n <ng-content select=\"cmat-carousel-header\"></ng-content>\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n </div>\r\n }\r\n\r\n <div [class]=\"contentClass\" [ngClass]=\"'items-center cmat-carousel-content'\">\r\n <div class=\"cmat-carousel-container\" cmatArrowCursor [orientation]=\"orientation\" [selector]=\"arrowSelector\"\r\n [enabled]=\"navigatorsType==='arrow'\" [attr.aria-live]=\"allowAutoplay ? 'polite' : 'off'\"\r\n (clickEvent)=\"arrowCursorClick($event)\">\r\n @if(showNavigators&&navigatorsType==='normal'){\r\n <button type=\"button\" mat-icon-button [ngClass]=\"{ 'cmat-carousel-prev': true }\"\r\n [disabled]=\"isBackwardNavDisabled()\" (click)=\"navBackward($event)\">\r\n @if(!previousIconTemplate){\r\n @if(!isVertical()){\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-left'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-up'\"></mat-icon>\r\n }\r\n }\r\n @else {\r\n <span class=\"cmat-carousel-prev-icon\">\r\n <ng-template *ngTemplateOutlet=\"previousIconTemplate\"></ng-template>\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n <div class=\"cmat-carousel-items-content\"\r\n [ngStyle]=\"{ height: isVertical() ? verticalViewPortHeight : 'auto' }\" (touchend)=\"onTouchEnd($event)\"\r\n (touchstart)=\"onTouchStart($event)\" (touchmove)=\"onTouchMove($event)\">\r\n <div #itemsContainer class=\"cmat-carousel-items-container\" (transitionend)=\"onTransitionEnd()\">\r\n @for (item of clonedItemsForStarting; track $index) {\r\n <div [ngClass]=\"{\r\n 'cmat-carousel-item cmat-carousel-item-cloned': true,\r\n 'cmat-carousel-item-active': totalShiftedItems * -1 === data.length,\r\n 'cmat-carousel-item-start': 0 === $index,\r\n 'cmat-carousel-item-end': clonedItemsForStarting?.length??0 - 1 === $index\r\n }\" [attr.aria-hidden]=\"!(totalShiftedItems * -1 === data.length)\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n @for (item of data; track $index) {\r\n <div [ngClass]=\"{ 'cmat-carousel-item': true, 'cmat-carousel-item-active': firstIndex() <= $index && lastIndex() >= $index, 'cmat-carousel-item-start': firstIndex() === $index, 'cmat-carousel-item-end': lastIndex() === $index }\"\r\n [attr.aria-hidden]=\"!(totalShiftedItems * -1 === data.length)\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n @for (item of clonedItemsForFinishing; track $index) {\r\n <div [ngClass]=\"{\r\n 'cmat-carousel-item cmat-carousel-item-cloned': true,\r\n 'cmat-carousel-item-active': totalShiftedItems * -1 === numVisible,\r\n 'cmat-carousel-item-start': 0 === $index,\r\n 'cmat-carousel-item-end': clonedItemsForFinishing?.length??0 - 1 === $index\r\n }\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n @if(showNavigators&&navigatorsType==='normal'){\r\n <button type=\"button\" mat-icon-button [ngClass]=\"{ 'cmat-carousel-next': true}\"\r\n [disabled]=\"isForwardNavDisabled()\" (click)=\"navForward($event)\">\r\n @if(!nextIconTemplate){\r\n @if(!isVertical()){\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-right'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-down'\"></mat-icon>\r\n }\r\n }\r\n @else{\r\n <span class=\"cmat-carousel-prev-icon\">\r\n <ng-template *ngTemplateOutlet=\"nextIconTemplate\"></ng-template>\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n </div>\r\n @if(showIndicators){\r\n <ul #indicatorContent role=\"presentation\" [ngClass]=\"'cmat-carousel-indicators'\"\r\n [class]=\"indicatorsContentClass\" [ngStyle]=\"indicatorsContentStyle\" (keydown)=\"onIndicatorKeydown($event)\">\r\n @for (totalDot of totalDotsArray(); track $index) {\r\n <li [ngClass]=\"{ 'cmat-carousel-indicator': true, 'cmat-carousel-indicator-active': page === $index }\"\r\n [attr.data-pc-section]=\"'indicator'\">\r\n <button type=\"button\" [ngClass]=\"'cmat-carousel-indicator-button'\" [class]=\"indicatorStyleClass\"\r\n [ngStyle]=\"indicatorStyle\" [attr.aria-current]=\"page === $index ? 'page' : undefined\"\r\n [tabindex]=\"page === $index ? 0 : -1\" (click)=\"onDotClick($event, $index)\">\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n\r\n </div>\r\n @if(footerFacet || footerTemplate){\r\n <div class=\"cmat-carousel-footer\">\r\n <ng-content select=\"cmat-carousel-footer\"></ng-content>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n </div>\r\n }\r\n</div>", styles: ["cmat-carousel{display:flex;flex-direction:column}cmat-carousel .cmat-carousel-content{display:flex;flex-direction:column;overflow:hidden}cmat-carousel .cmat-carousel-prev,cmat-carousel .cmat-carousel-next{align-self:center;flex-grow:0;flex-shrink:0;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative;margin:.25rem}cmat-carousel .cmat-carousel-container{display:flex;flex-direction:row;width:100%}cmat-carousel .cmat-carousel-items-content{overflow:hidden;width:100%}cmat-carousel .cmat-carousel-items-container{display:flex;flex-direction:row}cmat-carousel .cmat-carousel-indicators{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap;padding:1rem;gap:.5rem;margin:0;list-style:none}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator-active{background:var(--cmat-text-default)!important;opacity:1!important}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator{border:0 none;border-radius:6px;background:var(--cmat-text-disabled);transition:background .2s,color .2s,outline-color .2s,box-shadow .2s;opacity:.3}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator .cmat-carousel-indicator-button{display:flex;align-items:center;justify-content:center;width:2rem;height:.5rem;outline-color:transparent;padding:0;margin:0;-webkit-user-select:none;user-select:none;cursor:pointer}cmat-carousel .cmat-carousel-vertical .cmat-carousel-container{flex-direction:column;width:auto}cmat-carousel .cmat-carousel-vertical .cmat-carousel-items-container{flex-direction:column;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: CmatArrowCursorDirective, selector: "[cmatArrowCursor]", inputs: ["animationDuration", "orientation", "enabled", "selector"], outputs: ["clickEvent"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
631
622
|
}
|
|
632
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.
|
|
623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatCarouselComponent, decorators: [{
|
|
633
624
|
type: Component,
|
|
634
625
|
args: [{ selector: 'cmat-carousel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [MatIconModule, MatButtonModule, CmatArrowCursorDirective, CommonModule], template: "<div role=\"region\" [attr.id]=\"id\"\r\n [ngClass]=\"{ 'cmat-carousel': true, 'cmat-carousel-vertical': isVertical(), 'cmat-carousel-horizontal': !isVertical() }\"\r\n [ngStyle]=\"style\" [class]=\"styleClass\">\r\n\r\n @if(headerFacet || headerTemplate){\r\n <div class=\"cmat-carousel-header\">\r\n <ng-content select=\"cmat-carousel-header\"></ng-content>\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n </div>\r\n }\r\n\r\n <div [class]=\"contentClass\" [ngClass]=\"'items-center cmat-carousel-content'\">\r\n <div class=\"cmat-carousel-container\" cmatArrowCursor [orientation]=\"orientation\" [selector]=\"arrowSelector\"\r\n [enabled]=\"navigatorsType==='arrow'\" [attr.aria-live]=\"allowAutoplay ? 'polite' : 'off'\"\r\n (clickEvent)=\"arrowCursorClick($event)\">\r\n @if(showNavigators&&navigatorsType==='normal'){\r\n <button type=\"button\" mat-icon-button [ngClass]=\"{ 'cmat-carousel-prev': true }\"\r\n [disabled]=\"isBackwardNavDisabled()\" (click)=\"navBackward($event)\">\r\n @if(!previousIconTemplate){\r\n @if(!isVertical()){\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-left'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-up'\"></mat-icon>\r\n }\r\n }\r\n @else {\r\n <span class=\"cmat-carousel-prev-icon\">\r\n <ng-template *ngTemplateOutlet=\"previousIconTemplate\"></ng-template>\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n <div class=\"cmat-carousel-items-content\"\r\n [ngStyle]=\"{ height: isVertical() ? verticalViewPortHeight : 'auto' }\" (touchend)=\"onTouchEnd($event)\"\r\n (touchstart)=\"onTouchStart($event)\" (touchmove)=\"onTouchMove($event)\">\r\n <div #itemsContainer class=\"cmat-carousel-items-container\" (transitionend)=\"onTransitionEnd()\">\r\n @for (item of clonedItemsForStarting; track $index) {\r\n <div [ngClass]=\"{\r\n 'cmat-carousel-item cmat-carousel-item-cloned': true,\r\n 'cmat-carousel-item-active': totalShiftedItems * -1 === data.length,\r\n 'cmat-carousel-item-start': 0 === $index,\r\n 'cmat-carousel-item-end': clonedItemsForStarting?.length??0 - 1 === $index\r\n }\" [attr.aria-hidden]=\"!(totalShiftedItems * -1 === data.length)\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n @for (item of data; track $index) {\r\n <div [ngClass]=\"{ 'cmat-carousel-item': true, 'cmat-carousel-item-active': firstIndex() <= $index && lastIndex() >= $index, 'cmat-carousel-item-start': firstIndex() === $index, 'cmat-carousel-item-end': lastIndex() === $index }\"\r\n [attr.aria-hidden]=\"!(totalShiftedItems * -1 === data.length)\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n @for (item of clonedItemsForFinishing; track $index) {\r\n <div [ngClass]=\"{\r\n 'cmat-carousel-item cmat-carousel-item-cloned': true,\r\n 'cmat-carousel-item-active': totalShiftedItems * -1 === numVisible,\r\n 'cmat-carousel-item-start': 0 === $index,\r\n 'cmat-carousel-item-end': clonedItemsForFinishing?.length??0 - 1 === $index\r\n }\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n @if(showNavigators&&navigatorsType==='normal'){\r\n <button type=\"button\" mat-icon-button [ngClass]=\"{ 'cmat-carousel-next': true}\"\r\n [disabled]=\"isForwardNavDisabled()\" (click)=\"navForward($event)\">\r\n @if(!nextIconTemplate){\r\n @if(!isVertical()){\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-right'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'heroicons_solid:chevron-down'\"></mat-icon>\r\n }\r\n }\r\n @else{\r\n <span class=\"cmat-carousel-prev-icon\">\r\n <ng-template *ngTemplateOutlet=\"nextIconTemplate\"></ng-template>\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n </div>\r\n @if(showIndicators){\r\n <ul #indicatorContent role=\"presentation\" [ngClass]=\"'cmat-carousel-indicators'\"\r\n [class]=\"indicatorsContentClass\" [ngStyle]=\"indicatorsContentStyle\" (keydown)=\"onIndicatorKeydown($event)\">\r\n @for (totalDot of totalDotsArray(); track $index) {\r\n <li [ngClass]=\"{ 'cmat-carousel-indicator': true, 'cmat-carousel-indicator-active': page === $index }\"\r\n [attr.data-pc-section]=\"'indicator'\">\r\n <button type=\"button\" [ngClass]=\"'cmat-carousel-indicator-button'\" [class]=\"indicatorStyleClass\"\r\n [ngStyle]=\"indicatorStyle\" [attr.aria-current]=\"page === $index ? 'page' : undefined\"\r\n [tabindex]=\"page === $index ? 0 : -1\" (click)=\"onDotClick($event, $index)\">\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n\r\n </div>\r\n @if(footerFacet || footerTemplate){\r\n <div class=\"cmat-carousel-footer\">\r\n <ng-content select=\"cmat-carousel-footer\"></ng-content>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n </div>\r\n }\r\n</div>", styles: ["cmat-carousel{display:flex;flex-direction:column}cmat-carousel .cmat-carousel-content{display:flex;flex-direction:column;overflow:hidden}cmat-carousel .cmat-carousel-prev,cmat-carousel .cmat-carousel-next{align-self:center;flex-grow:0;flex-shrink:0;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative;margin:.25rem}cmat-carousel .cmat-carousel-container{display:flex;flex-direction:row;width:100%}cmat-carousel .cmat-carousel-items-content{overflow:hidden;width:100%}cmat-carousel .cmat-carousel-items-container{display:flex;flex-direction:row}cmat-carousel .cmat-carousel-indicators{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap;padding:1rem;gap:.5rem;margin:0;list-style:none}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator-active{background:var(--cmat-text-default)!important;opacity:1!important}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator{border:0 none;border-radius:6px;background:var(--cmat-text-disabled);transition:background .2s,color .2s,outline-color .2s,box-shadow .2s;opacity:.3}cmat-carousel .cmat-carousel-indicators .cmat-carousel-indicator .cmat-carousel-indicator-button{display:flex;align-items:center;justify-content:center;width:2rem;height:.5rem;outline-color:transparent;padding:0;margin:0;-webkit-user-select:none;user-select:none;cursor:pointer}cmat-carousel .cmat-carousel-vertical .cmat-carousel-container{flex-direction:column;width:auto}cmat-carousel .cmat-carousel-vertical .cmat-carousel-items-container{flex-direction:column;height:100%}\n"] }]
|
|
635
|
-
}], ctorParameters: () => [
|
|
636
|
-
type: Inject,
|
|
637
|
-
args: [DOCUMENT]
|
|
638
|
-
}] }, { type: undefined, decorators: [{
|
|
639
|
-
type: Inject,
|
|
640
|
-
args: [PLATFORM_ID]
|
|
641
|
-
}] }], propDecorators: { page: [{
|
|
626
|
+
}], ctorParameters: () => [], propDecorators: { page: [{
|
|
642
627
|
type: Input
|
|
643
628
|
}], numVisible: [{
|
|
644
629
|
type: Input
|