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.
Files changed (164) hide show
  1. package/components/adapter/index.d.ts +8 -9
  2. package/components/breadcrumb/index.d.ts +2 -4
  3. package/components/carousel/index.d.ts +3 -5
  4. package/components/cascade/index.d.ts +6 -7
  5. package/components/chip-input/index.d.ts +2 -2
  6. package/components/custom-formly/index.d.ts +41 -49
  7. package/components/date-range/index.d.ts +5 -6
  8. package/components/drawer/index.d.ts +30 -34
  9. package/components/fullscreen/index.d.ts +1 -2
  10. package/components/highlight/index.d.ts +12 -14
  11. package/components/image-viewer/index.d.ts +4 -5
  12. package/components/json-editor/index.d.ts +2 -3
  13. package/components/knob-input/index.d.ts +8 -8
  14. package/components/material-color-picker/index.d.ts +3 -3
  15. package/components/material-datetimepicker/index.d.ts +89 -93
  16. package/components/navigation/index.d.ts +82 -88
  17. package/components/opt-input/index.d.ts +6 -6
  18. package/components/pagination/index.d.ts +6 -9
  19. package/components/popover/index.d.ts +13 -16
  20. package/components/progress-bar/index.d.ts +3 -5
  21. package/components/rating/index.d.ts +5 -5
  22. package/components/select-search/index.d.ts +16 -17
  23. package/components/select-table/index.d.ts +6 -6
  24. package/components/select-tree/index.d.ts +7 -6
  25. package/components/speed-dial/index.d.ts +2 -3
  26. package/components/timeline/index.d.ts +2 -3
  27. package/components/toast/index.d.ts +14 -16
  28. package/components/transfer-picker/index.d.ts +43 -44
  29. package/components/treetable/index.d.ts +2 -3
  30. package/components/upload/index.d.ts +23 -27
  31. package/directives/animate-on-scroll/index.d.ts +4 -19
  32. package/directives/arrow-cursor/index.d.ts +2 -4
  33. package/directives/autofocus/index.d.ts +2 -2
  34. package/directives/data-exporter/index.d.ts +2 -15
  35. package/directives/digit-only/index.d.ts +4 -4
  36. package/directives/equal-validator/index.d.ts +1 -2
  37. package/fesm2022/cmat-components-adapter.mjs +22 -39
  38. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  39. package/fesm2022/cmat-components-breadcrumb.mjs +19 -21
  40. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  41. package/fesm2022/cmat-components-card.mjs +3 -3
  42. package/fesm2022/cmat-components-carousel.mjs +112 -127
  43. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  44. package/fesm2022/cmat-components-cascade.mjs +61 -73
  45. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  46. package/fesm2022/cmat-components-chip-input.mjs +14 -18
  47. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  48. package/fesm2022/cmat-components-custom-formly.mjs +167 -169
  49. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  50. package/fesm2022/cmat-components-date-range.mjs +17 -17
  51. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  52. package/fesm2022/cmat-components-drawer.mjs +17 -19
  53. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  54. package/fesm2022/cmat-components-fullscreen.mjs +7 -10
  55. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  56. package/fesm2022/cmat-components-highlight.mjs +14 -14
  57. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  58. package/fesm2022/cmat-components-image-viewer.mjs +9 -12
  59. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  60. package/fesm2022/cmat-components-json-editor.mjs +7 -7
  61. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  62. package/fesm2022/cmat-components-knob-input.mjs +12 -19
  63. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  64. package/fesm2022/cmat-components-masonry.mjs +3 -3
  65. package/fesm2022/cmat-components-material-color-picker.mjs +8 -7
  66. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  67. package/fesm2022/cmat-components-material-datetimepicker.mjs +166 -216
  68. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  69. package/fesm2022/cmat-components-navigation.mjs +108 -112
  70. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  71. package/fesm2022/cmat-components-opt-input.mjs +13 -20
  72. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  73. package/fesm2022/cmat-components-org-chart.mjs +9 -9
  74. package/fesm2022/cmat-components-pagination.mjs +32 -34
  75. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  76. package/fesm2022/cmat-components-password-strength.mjs +9 -9
  77. package/fesm2022/cmat-components-popover.mjs +27 -32
  78. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  79. package/fesm2022/cmat-components-progress-bar.mjs +10 -10
  80. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  81. package/fesm2022/cmat-components-rating.mjs +10 -14
  82. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  83. package/fesm2022/cmat-components-select-search.mjs +30 -53
  84. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  85. package/fesm2022/cmat-components-select-table.mjs +28 -33
  86. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  87. package/fesm2022/cmat-components-select-tree.mjs +55 -61
  88. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  89. package/fesm2022/cmat-components-speed-dial.mjs +13 -13
  90. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  91. package/fesm2022/cmat-components-timeline.mjs +18 -20
  92. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  93. package/fesm2022/cmat-components-toast.mjs +16 -16
  94. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  95. package/fesm2022/cmat-components-transfer-picker.mjs +47 -47
  96. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  97. package/fesm2022/cmat-components-treetable.mjs +11 -12
  98. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  99. package/fesm2022/cmat-components-upload.mjs +32 -33
  100. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  101. package/fesm2022/cmat-directives-animate-on-scroll.mjs +13 -14
  102. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-arrow-cursor.mjs +11 -14
  104. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-autofocus.mjs +8 -9
  106. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-data-exporter.mjs +28 -28
  108. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-debounce.mjs +11 -13
  110. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-digit-only.mjs +17 -17
  112. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-equal-validator.mjs +9 -16
  114. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  115. package/fesm2022/cmat-lib-mock-api.mjs +11 -14
  116. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  117. package/fesm2022/cmat-pipes-bytes.mjs +4 -5
  118. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  119. package/fesm2022/cmat-pipes-date-format.mjs +4 -5
  120. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-find-by-key.mjs +4 -5
  122. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-group-by.mjs +4 -5
  124. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-keys.mjs +4 -5
  126. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-secure.mjs +13 -14
  128. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-uppercase.mjs +4 -5
  130. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  131. package/fesm2022/cmat-services-alert.mjs +3 -3
  132. package/fesm2022/cmat-services-config.mjs +10 -12
  133. package/fesm2022/cmat-services-config.mjs.map +1 -1
  134. package/fesm2022/cmat-services-confirmation.mjs +17 -20
  135. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  136. package/fesm2022/cmat-services-data.mjs +10 -11
  137. package/fesm2022/cmat-services-data.mjs.map +1 -1
  138. package/fesm2022/cmat-services-export-as.mjs +3 -3
  139. package/fesm2022/cmat-services-loading.mjs +14 -14
  140. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  141. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  142. package/fesm2022/cmat-services-media-watcher.mjs +10 -10
  143. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  144. package/fesm2022/cmat-services-platform.mjs +8 -8
  145. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  146. package/fesm2022/cmat-services-splash-screen.mjs +9 -13
  147. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  148. package/fesm2022/cmat-services-title.mjs +10 -11
  149. package/fesm2022/cmat-services-title.mjs.map +1 -1
  150. package/fesm2022/cmat-services-translation.mjs +8 -8
  151. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  152. package/fesm2022/cmat-services-utils.mjs +3 -3
  153. package/lib/mock-api/index.d.ts +0 -1
  154. package/package.json +52 -52
  155. package/pipes/secure/index.d.ts +2 -4
  156. package/services/config/index.d.ts +1 -1
  157. package/services/confirmation/index.d.ts +2 -4
  158. package/services/data/index.d.ts +1 -3
  159. package/services/loading/index.d.ts +3 -4
  160. package/services/media-watcher/index.d.ts +2 -3
  161. package/services/platform/index.d.ts +2 -3
  162. package/services/splash-screen/index.d.ts +1 -2
  163. package/services/title/index.d.ts +3 -5
  164. package/services/translation/index.d.ts +1 -2
@@ -1,7 +1,7 @@
1
1
  import * as i3 from '@angular/common';
2
- import { isPlatformBrowser, CommonModule } from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, Input, Directive, EventEmitter, DOCUMENT, PLATFORM_ID, numberAttribute, booleanAttribute, ContentChildren, ContentChild, ViewChild, Output, Inject, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
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.0", ngImport: i0, type: CmatCarouselHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: CmatCarouselHeaderComponent, isStandalone: true, selector: "cmat-carousel-header", ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
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.0", ngImport: i0, type: CmatCarouselHeaderComponent, decorators: [{
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.0", ngImport: i0, type: CmatCarouselFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: CmatCarouselFooterComponent, isStandalone: true, selector: "cmat-carousel-footer", ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
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.0", ngImport: i0, type: CmatCarouselFooterComponent, decorators: [{
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(template) {
36
- this.template = 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.0", ngImport: i0, type: CmatCarouselTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
42
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CmatCarouselTemplateDirective, isStandalone: true, selector: "[cmatCarouselTemplate]", inputs: { type: "type", name: ["cmatCarouselTemplate", "name"] }, ngImport: i0 }); }
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.0", ngImport: i0, type: CmatCarouselTemplateDirective, decorators: [{
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
- }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { type: [{
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(el, zone, cd, renderer, _document, _platformId) {
93
- this.el = el;
94
- this.zone = zone;
95
- this.cd = cd;
96
- this.renderer = renderer;
97
- this._document = _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 (isPlatformBrowser(this._platformId)) {
131
- if (simpleChange.data) {
132
- if (this.circular && this._data) {
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 (this.isCreated) {
137
- if (simpleChange.numVisible) {
138
- if (this.responsiveOptions) {
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
- if (simpleChange.autoplayInterval) {
153
- this.allowAutoplay = !!this.autoplayInterval;
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
- if (isPlatformBrowser(this._platformId)) {
162
- this.allowAutoplay = !!this.autoplayInterval;
163
- if (this.circular) {
164
- this._setCloneItems();
165
- }
166
- if (this.responsiveOptions) {
167
- this.defaultNumScroll = this._numScroll;
168
- this.defaultNumVisible = this._numVisible;
169
- }
170
- this._createStyle();
171
- this._calculatePosition();
172
- if (this.responsiveOptions) {
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
- if (isPlatformBrowser(this._platformId)) {
202
- const isCircular = this.isCircular();
203
- let totalShiftedItems = this.totalShiftedItems;
204
- if (this.data && this.itemsContainer && (this.prevState.numScroll !== this._numScroll || this.prevState.numVisible !== this._numVisible || this.prevState.value.length !== this.data.length)) {
205
- if (this.autoplayInterval) {
206
- this._stopAutoplay(false);
207
- }
208
- this.remainingItems = (this.data.length - this._numVisible) % this._numScroll;
209
- let page = this._page;
210
- if (this.totalDots() !== 0 && page >= this.totalDots()) {
211
- page = this.totalDots() - 1;
212
- this._page = page;
213
- this.pageEvent.emit({
214
- page: this.page
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
- if (this.page === 0) {
245
- totalShiftedItems = -1 * this._numVisible;
246
- }
247
- else if (totalShiftedItems === 0) {
248
- totalShiftedItems = -1 * this.data.length;
249
- if (this.remainingItems > 0) {
250
- this.isRemainingItemsAdded = true;
251
- }
252
- }
253
- if (totalShiftedItems !== this.totalShiftedItems) {
254
- this.totalShiftedItems = totalShiftedItems;
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
- if (isPlatformBrowser(this._platformId)) {
415
- this.documentResizeListener ??= this.renderer.listen(this.window, 'resize', () => {
416
- this._calculatePosition();
417
- });
418
- }
409
+ this.documentResizeListener ??= this.renderer.listen(this.window, 'resize', () => {
410
+ this._calculatePosition();
411
+ });
419
412
  }
420
413
  _unbindDocumentListeners() {
421
- if (isPlatformBrowser(this._platformId)) {
422
- if (this.documentResizeListener) {
423
- this.documentResizeListener();
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.0", ngImport: i0, type: CmatCarouselComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
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.0", ngImport: i0, type: CmatCarouselComponent, decorators: [{
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: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: Document, decorators: [{
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