@ng-nest/ui 21.0.13 → 22.0.1
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/README.md +1 -1
- package/fesm2022/ng-nest-ui-affix.mjs +12 -12
- package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-alert.mjs +46 -34
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +43 -31
- package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-api.mjs +7 -7
- package/fesm2022/ng-nest-ui-attachments.mjs +74 -48
- package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +114 -70
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +47 -32
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +23 -18
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +30 -23
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +75 -44
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-bubble.mjs +76 -48
- package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +53 -42
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +30 -20
- package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-card.mjs +21 -16
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +68 -46
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +121 -73
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +54 -38
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +38 -30
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +119 -72
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +22 -16
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +23 -21
- package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-container.mjs +40 -37
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-contextmenu.mjs +71 -45
- package/fesm2022/ng-nest-ui-contextmenu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +24 -21
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-coversations.mjs +25 -18
- package/fesm2022/ng-nest-ui-coversations.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-crumb.mjs +15 -13
- package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +425 -256
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +42 -31
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +106 -82
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-divider.mjs +24 -17
- package/fesm2022/ng-nest-ui-divider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +7 -7
- package/fesm2022/ng-nest-ui-drag.mjs +10 -10
- package/fesm2022/ng-nest-ui-drawer.mjs +52 -43
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +94 -58
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +14 -12
- package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-examples.mjs +7 -7
- package/fesm2022/ng-nest-ui-find.mjs +111 -71
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +45 -33
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +26 -20
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +16 -15
- package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +28 -21
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +57 -51
- package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-inner.mjs +11 -11
- package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input-number.mjs +63 -42
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +130 -85
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +19 -15
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +37 -31
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +23 -18
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +137 -89
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +36 -25
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +68 -45
- package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
- package/fesm2022/ng-nest-ui-message.mjs +10 -10
- package/fesm2022/ng-nest-ui-notification.mjs +10 -10
- package/fesm2022/ng-nest-ui-outlet.mjs +11 -9
- package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-page-header.mjs +20 -15
- package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pagination.mjs +69 -48
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
- package/fesm2022/ng-nest-ui-popconfirm.mjs +40 -27
- package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popover.mjs +57 -38
- package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-portal.mjs +7 -7
- package/fesm2022/ng-nest-ui-progress.mjs +60 -41
- package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-prompts.mjs +18 -15
- package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +50 -35
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +43 -29
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +18 -16
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +22 -16
- package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-ripple.mjs +14 -13
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +41 -24
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +197 -118
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-sender.mjs +43 -31
- package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +17 -15
- package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +85 -53
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +58 -37
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-splitter.mjs +32 -24
- package/fesm2022/ng-nest-ui-splitter.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +44 -30
- package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-steps.mjs +30 -22
- package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-suggestion.mjs +23 -20
- package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs +35 -25
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +78 -69
- package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +320 -205
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +74 -56
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +30 -23
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +19 -15
- package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +69 -44
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +34 -23
- package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-thought-chain.mjs +26 -19
- package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-picker.mjs +164 -96
- package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
- package/fesm2022/ng-nest-ui-timeline.mjs +26 -19
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +53 -35
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +66 -40
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +39 -28
- package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +186 -111
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +166 -105
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +16 -13
- package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-upload.mjs +81 -53
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-watermark.mjs +45 -35
- package/fesm2022/ng-nest-ui-watermark.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-welcome.mjs +22 -16
- package/fesm2022/ng-nest-ui-welcome.mjs.map +1 -1
- package/package.json +7 -6
- package/types/ng-nest-ui-base-form.d.ts +3 -3
- package/types/ng-nest-ui-carousel.d.ts +1 -1
- package/types/ng-nest-ui-container.d.ts +1 -1
- package/types/ng-nest-ui-core.d.ts +1 -1
- package/types/ng-nest-ui-dialog.d.ts +1 -1
- package/types/ng-nest-ui-drawer.d.ts +1 -1
- package/types/ng-nest-ui-form.d.ts +12 -12
- package/types/ng-nest-ui-layout.d.ts +1 -1
- package/types/ng-nest-ui-list.d.ts +1 -1
- package/types/ng-nest-ui-portal.d.ts +3 -3
- package/types/ng-nest-ui-table-view.d.ts +1 -1
- package/types/ng-nest-ui-table.d.ts +1 -1
- package/types/ng-nest-ui-tabs.d.ts +1 -1
- package/types/ng-nest-ui-tree.d.ts +1 -1
|
@@ -44,7 +44,8 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
44
44
|
* ```
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
47
|
-
this.active = model(0,
|
|
47
|
+
this.active = model(0, /* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
48
49
|
/**
|
|
49
50
|
* @zh_CN 幻灯片高度
|
|
50
51
|
* @en_US Slide height
|
|
@@ -58,7 +59,7 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
58
59
|
* ```
|
|
59
60
|
*
|
|
60
61
|
*/
|
|
61
|
-
this.height = input(this.config?.height ?? '15rem', { ...(ngDevMode ? { debugName: "height" } : {}), transform: XToCssPixelValue });
|
|
62
|
+
this.height = input(this.config?.height ?? '15rem', { ...(ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
62
63
|
/**
|
|
63
64
|
* @zh_CN 切换器触发方式
|
|
64
65
|
* @en_US Switcher trigger method
|
|
@@ -72,7 +73,8 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
72
73
|
* ```
|
|
73
74
|
*
|
|
74
75
|
*/
|
|
75
|
-
this.trigger = input(this.config?.trigger ?? 'hover',
|
|
76
|
+
this.trigger = input(this.config?.trigger ?? 'hover', /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
|
|
76
78
|
/**
|
|
77
79
|
* @zh_CN 箭头显示隐藏方式
|
|
78
80
|
* @en_US Arrow shows how to hide
|
|
@@ -90,7 +92,8 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
90
92
|
* ```
|
|
91
93
|
*
|
|
92
94
|
*/
|
|
93
|
-
this.arrow = input(this.config?.arrow ?? 'hover',
|
|
95
|
+
this.arrow = input(this.config?.arrow ?? 'hover', /* @ts-ignore */
|
|
96
|
+
...(ngDevMode ? [{ debugName: "arrow" }] : /* istanbul ignore next */ []));
|
|
94
97
|
/**
|
|
95
98
|
* @zh_CN 幻灯片轮播方向
|
|
96
99
|
* @en_US Slide rotation direction
|
|
@@ -104,7 +107,8 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
104
107
|
* ```
|
|
105
108
|
*
|
|
106
109
|
*/
|
|
107
|
-
this.direction = input(this.config?.direction ?? 'horizontal',
|
|
110
|
+
this.direction = input(this.config?.direction ?? 'horizontal', /* @ts-ignore */
|
|
111
|
+
...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
|
|
108
112
|
/**
|
|
109
113
|
* @zh_CN 自动切换
|
|
110
114
|
* @en_US Automatic switching
|
|
@@ -118,7 +122,7 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
118
122
|
* ```
|
|
119
123
|
*
|
|
120
124
|
*/
|
|
121
|
-
this.autoplay = input(true, { ...(ngDevMode ? { debugName: "autoplay" } : {}), transform: XToBoolean });
|
|
125
|
+
this.autoplay = input(true, { ...(ngDevMode ? { debugName: "autoplay" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
122
126
|
/**
|
|
123
127
|
* @zh_CN 自动切换时间间隔,ms
|
|
124
128
|
* @en_US Automatic switching time interval. ms
|
|
@@ -132,7 +136,7 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
132
136
|
* ```
|
|
133
137
|
*
|
|
134
138
|
*/
|
|
135
|
-
this.interval = input(3000, { ...(ngDevMode ? { debugName: "interval" } : {}), transform: XToNumber });
|
|
139
|
+
this.interval = input(3000, { ...(ngDevMode ? { debugName: "interval" } : /* istanbul ignore next */ {}), transform: XToNumber });
|
|
136
140
|
/**
|
|
137
141
|
* @zh_CN 切换器是否显示在外面
|
|
138
142
|
* @en_US Whether the switcher is displayed outside
|
|
@@ -146,7 +150,7 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
146
150
|
* ```
|
|
147
151
|
*
|
|
148
152
|
*/
|
|
149
|
-
this.outside = input(false, { ...(ngDevMode ? { debugName: "outside" } : {}), transform: XToBoolean });
|
|
153
|
+
this.outside = input(false, { ...(ngDevMode ? { debugName: "outside" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
150
154
|
/**
|
|
151
155
|
* @zh_CN 是否以卡片的方式显示幻灯片
|
|
152
156
|
* @en_US Whether to display the slideshow as a card
|
|
@@ -160,7 +164,7 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
160
164
|
* ```
|
|
161
165
|
*
|
|
162
166
|
*/
|
|
163
|
-
this.card = input(false, { ...(ngDevMode ? { debugName: "card" } : {}), transform: XToBoolean });
|
|
167
|
+
this.card = input(false, { ...(ngDevMode ? { debugName: "card" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
164
168
|
/**
|
|
165
169
|
* @zh_CN 显示文字
|
|
166
170
|
* @en_US Display text
|
|
@@ -174,7 +178,8 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
174
178
|
* ```
|
|
175
179
|
*
|
|
176
180
|
*/
|
|
177
|
-
this.text = input('',
|
|
181
|
+
this.text = input('', /* @ts-ignore */
|
|
182
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
178
183
|
/**
|
|
179
184
|
* @zh_CN 显示进度条
|
|
180
185
|
* @en_US Show progress
|
|
@@ -188,7 +193,7 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
188
193
|
* ```
|
|
189
194
|
*
|
|
190
195
|
*/
|
|
191
|
-
this.progress = input(false, { ...(ngDevMode ? { debugName: "progress" } : {}), transform: XToBoolean });
|
|
196
|
+
this.progress = input(false, { ...(ngDevMode ? { debugName: "progress" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
192
197
|
/**
|
|
193
198
|
* @zh_CN 进度条颜色
|
|
194
199
|
* @en_US Progress color
|
|
@@ -202,7 +207,8 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
202
207
|
* ```
|
|
203
208
|
*
|
|
204
209
|
*/
|
|
205
|
-
this.progressColor = input('',
|
|
210
|
+
this.progressColor = input('', /* @ts-ignore */
|
|
211
|
+
...(ngDevMode ? [{ debugName: "progressColor" }] : /* istanbul ignore next */ []));
|
|
206
212
|
/**
|
|
207
213
|
* @zh_CN 显示当前页面
|
|
208
214
|
* @en_US Show current page
|
|
@@ -216,12 +222,12 @@ class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {
|
|
|
216
222
|
* ```
|
|
217
223
|
*
|
|
218
224
|
*/
|
|
219
|
-
this.current = input(false, { ...(ngDevMode ? { debugName: "current" } : {}), transform: XToBoolean });
|
|
225
|
+
this.current = input(false, { ...(ngDevMode ? { debugName: "current" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
220
226
|
}
|
|
221
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
222
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
227
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
228
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XCarouselProperty, isStandalone: true, selector: "x-carousel-property", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, arrow: { classPropertyName: "arrow", publicName: "arrow", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, outside: { classPropertyName: "outside", publicName: "outside", isSignal: true, isRequired: false, transformFunction: null }, card: { classPropertyName: "card", publicName: "card", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null }, progressColor: { classPropertyName: "progressColor", publicName: "progressColor", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
223
229
|
}
|
|
224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselProperty, decorators: [{
|
|
225
231
|
type: Component,
|
|
226
232
|
args: [{ selector: `${XCarouselPrefix}-property`, template: '' }]
|
|
227
233
|
}], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }, { type: i0.Output, args: ["activeChange"] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], autoplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoplay", required: false }] }], interval: [{ type: i0.Input, args: [{ isSignal: true, alias: "interval", required: false }] }], outside: [{ type: i0.Input, args: [{ isSignal: true, alias: "outside", required: false }] }], card: [{ type: i0.Input, args: [{ isSignal: true, alias: "card", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], progress: [{ type: i0.Input, args: [{ isSignal: true, alias: "progress", required: false }] }], progressColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressColor", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }] } });
|
|
@@ -250,12 +256,12 @@ class XCarouselPanelProperty extends XProperty {
|
|
|
250
256
|
* ```
|
|
251
257
|
*
|
|
252
258
|
*/
|
|
253
|
-
this.active = input(false, { ...(ngDevMode ? { debugName: "active" } : {}), transform: XToBoolean });
|
|
259
|
+
this.active = input(false, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
254
260
|
}
|
|
255
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
256
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
261
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselPanelProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
262
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XCarouselPanelProperty, isStandalone: true, selector: "x-carousel-panel-property", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
257
263
|
}
|
|
258
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselPanelProperty, decorators: [{
|
|
259
265
|
type: Component,
|
|
260
266
|
args: [{ selector: `${XCarouselPanelPrefix}-property`, template: '' }]
|
|
261
267
|
}], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }] } });
|
|
@@ -265,19 +271,26 @@ class XCarouselComponent extends XCarouselProperty {
|
|
|
265
271
|
super(...arguments);
|
|
266
272
|
this.carousel = viewChild.required('carousel');
|
|
267
273
|
this.content = viewChild.required('content');
|
|
268
|
-
this.start = signal(-1,
|
|
269
|
-
|
|
274
|
+
this.start = signal(-1, /* @ts-ignore */
|
|
275
|
+
...(ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []));
|
|
276
|
+
this.before = signal(-1, /* @ts-ignore */
|
|
277
|
+
...(ngDevMode ? [{ debugName: "before" }] : /* istanbul ignore next */ []));
|
|
270
278
|
this.platformId = inject(PLATFORM_ID);
|
|
271
279
|
this.isBrowser = isPlatformBrowser(this.platformId);
|
|
272
|
-
this.percent = signal(0,
|
|
273
|
-
|
|
274
|
-
this.
|
|
280
|
+
this.percent = signal(0, /* @ts-ignore */
|
|
281
|
+
...(ngDevMode ? [{ debugName: "percent" }] : /* istanbul ignore next */ []));
|
|
282
|
+
this.count = signal(0, /* @ts-ignore */
|
|
283
|
+
...(ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []));
|
|
284
|
+
this.panels = signal([], /* @ts-ignore */
|
|
285
|
+
...(ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []));
|
|
275
286
|
this.unSubject = new Subject();
|
|
276
287
|
this.classMap = computed(() => ({
|
|
277
288
|
[`${XCarouselPrefix}-${this.direction()}`]: !XIsEmpty(this.direction())
|
|
278
|
-
}),
|
|
289
|
+
}), /* @ts-ignore */
|
|
290
|
+
...(ngDevMode ? [{ debugName: "classMap" }] : /* istanbul ignore next */ []));
|
|
279
291
|
this.updatePanel = new Subject();
|
|
280
|
-
this.page = computed(() => this.active() + 1,
|
|
292
|
+
this.page = computed(() => this.active() + 1, /* @ts-ignore */
|
|
293
|
+
...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
|
|
281
294
|
}
|
|
282
295
|
ngAfterViewInit() {
|
|
283
296
|
this.autoplay() && this.resetInterval();
|
|
@@ -339,10 +352,10 @@ class XCarouselComponent extends XCarouselProperty {
|
|
|
339
352
|
getActivated(index) {
|
|
340
353
|
return this.active() === index;
|
|
341
354
|
}
|
|
342
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
343
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
355
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
356
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XCarouselComponent, isStandalone: true, selector: "x-carousel", viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #carousel\r\n class=\"x-carousel\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-carousel-arrow-always]=\"arrow() === 'always'\"\r\n [class.x-carousel-has-current]=\"current()\"\r\n [class.x-carousel-indicator-outside]=\"outside() || card()\"\r\n>\r\n <div #content class=\"x-carousel-content\" [style.height]=\"height()\">\r\n @if (arrow() !== 'never' && direction() !== 'vertical') {\r\n <x-button class=\"arrow-left\" icon=\"fto-chevron-left\" (click)=\"action(active(), -1)\"></x-button>\r\n <x-button class=\"arrow-right\" icon=\"fto-chevron-right\" (click)=\"action(active(), 1)\"></x-button>\r\n }\r\n <ng-content></ng-content>\r\n @if (text()) {\r\n <div class=\"x-carousel-text\">{{ text() }}</div>\r\n }\r\n @if (current()) {\r\n <div class=\"x-carousel-current\">\r\n <span class=\"x-carousel-active\">{{ page() }}</span> /\r\n <span class=\"x-carousel-count\">{{ count() }}</span>\r\n </div>\r\n }\r\n @if (progress()) {\r\n <div class=\"x-carousel-progress\">\r\n <x-progress [percent]=\"percent()\" [color]=\"progressColor()\" [info]=\"false\" height=\"0.325rem\"></x-progress>\r\n </div>\r\n }\r\n </div>\r\n <ul class=\"x-carousel-indicator\">\r\n @for (panel of panels(); track $index) {\r\n <li\r\n [class.x-activated]=\"getActivated($index)\"\r\n (click)=\"action($index, 0, 'click')\"\r\n (mouseenter)=\"action($index, 0, 'hover')\"\r\n >\r\n <x-button type=\"text\"></x-button>\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n", styles: [".x-carousel{margin:0;padding:0}.x-carousel{font-size:var(--x-font-size);box-sizing:border-box;position:relative}.x-carousel-content{position:relative;overflow:hidden}.x-carousel-content>x-button{opacity:0;visibility:hidden;top:50%;z-index:10;transform:translateY(-50%);position:absolute;transition:var(--x-animation-duration-base) ease-out}.x-carousel-content>x-button .x-button{border:none;outline:none;padding:0;margin:0;height:2.25rem;width:2.25rem;border-radius:50%;background-color:#1f2d3d26;color:var(--x-background-100);text-align:center}.x-carousel-content>x-button .x-button:hover{color:var(--x-background-100);background-color:#1f2d3d40}.x-carousel-content>x-button.arrow-left{left:1rem;transform:translate3D(-15px,-50%,0)}.x-carousel-content>x-button.arrow-right{right:1rem;transform:translate3D(15px,-50%,0)}.x-carousel-content>x-carousel-panel{position:absolute;top:0;left:0;width:100%;height:100%;display:inline-block;overflow:hidden;background-color:var(--x-background-a100);z-index:0}.x-carousel-content>x-carousel-panel.x-carousel-animating{transition:.4s ease-in-out}.x-carousel-content>x-carousel-panel.x-carousel-card{width:50%}.x-carousel-content>x-carousel-panel.x-carousel-in-stage{cursor:pointer;z-index:1}.x-carousel-content>x-carousel-panel.x-carousel-in-stage .x-carousel-mask{position:absolute;width:100%;height:100%;top:0;left:0;background-color:var(--x-background);opacity:.24;transition:.2s}.x-carousel-content>x-carousel-panel.x-carousel-in-stage:hover .x-carousel-mask{opacity:.12}.x-carousel-content>x-carousel-panel.x-activated{z-index:2}.x-carousel-indicator{bottom:.25rem;left:50%;transform:translate(-50%);position:absolute;z-index:2;display:inline-flex}.x-carousel-indicator>li{cursor:pointer;background-color:transparent;display:inline-flex;padding:.75rem .25rem}.x-carousel-indicator>li>x-button .x-button{padding:0;width:1.875rem;height:.125rem;background-color:#1f2d3d26;transition:.3s}.x-carousel-indicator>li:hover>x-button .x-button{background-color:#1f2d3d40}.x-carousel-indicator>li.x-activated>x-button .x-button{background-color:#ffffffe6}.x-carousel-indicator-outside .x-carousel-indicator{position:static;transform:none;display:flex;align-items:center;justify-content:center}.x-carousel-indicator-outside .x-carousel-indicator>li>x-button .x-button{background-color:var(--x-text-700)}.x-carousel-indicator-outside .x-carousel-indicator>li.x-activated>x-button .x-button{background-color:#00000080}.x-carousel:hover .x-carousel-content>x-button,.x-carousel-arrow-always .x-carousel-content>x-button{opacity:1;visibility:inherit}.x-carousel:hover .x-carousel-content>x-button.arrow-left,.x-carousel-arrow-always .x-carousel-content>x-button.arrow-left{transform:translate3D(0,-50%,0)}.x-carousel:hover .x-carousel-content>x-button.arrow-right,.x-carousel-arrow-always .x-carousel-content>x-button.arrow-right{transform:translate3D(0,-50%,0)}.x-carousel-horizontal,.x-carousel-vertical{overflow:hidden}.x-carousel-vertical>.x-carousel-indicator{right:0;top:50%;left:inherit;bottom:inherit;flex-direction:column;transform:translateY(-50%)}.x-carousel-vertical>.x-carousel-indicator>li{padding:.25rem .75rem}.x-carousel-vertical>.x-carousel-indicator>li>x-button .x-button{width:.125rem;height:1rem}.x-carousel-text{position:absolute;bottom:0;z-index:10;font-size:1rem;padding:.5rem .75rem}.x-carousel-progress{position:absolute;bottom:0;z-index:11;width:100%;height:.5rem}.x-carousel-progress x-progress{position:relative;height:.5rem;display:block;top:0}.x-carousel-progress x-progress .x-progress{position:relative;top:-.5625rem}.x-carousel-progress x-progress .x-progress-rail,.x-carousel-progress x-progress .x-progress-bg{border-radius:0}.x-carousel-progress x-progress .x-progress-rail{background-color:transparent}.x-carousel-current{position:absolute;bottom:0;right:0;z-index:11;padding:.5rem .75rem;font-size:var(--x-font-size-big)}.x-carousel-active{color:var(--x-primary);font-weight:600;font-size:1.5rem}.x-carousel-count{color:var(--x-text);font-weight:600}.x-carousel-has-current .x-carousel-text{padding-right:5rem}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XProgressComponent, selector: "x-progress" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
344
357
|
}
|
|
345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselComponent, decorators: [{
|
|
346
359
|
type: Component,
|
|
347
360
|
args: [{ selector: `${XCarouselPrefix}`, imports: [NgClass, XButtonComponent, XProgressComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #carousel\r\n class=\"x-carousel\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-carousel-arrow-always]=\"arrow() === 'always'\"\r\n [class.x-carousel-has-current]=\"current()\"\r\n [class.x-carousel-indicator-outside]=\"outside() || card()\"\r\n>\r\n <div #content class=\"x-carousel-content\" [style.height]=\"height()\">\r\n @if (arrow() !== 'never' && direction() !== 'vertical') {\r\n <x-button class=\"arrow-left\" icon=\"fto-chevron-left\" (click)=\"action(active(), -1)\"></x-button>\r\n <x-button class=\"arrow-right\" icon=\"fto-chevron-right\" (click)=\"action(active(), 1)\"></x-button>\r\n }\r\n <ng-content></ng-content>\r\n @if (text()) {\r\n <div class=\"x-carousel-text\">{{ text() }}</div>\r\n }\r\n @if (current()) {\r\n <div class=\"x-carousel-current\">\r\n <span class=\"x-carousel-active\">{{ page() }}</span> /\r\n <span class=\"x-carousel-count\">{{ count() }}</span>\r\n </div>\r\n }\r\n @if (progress()) {\r\n <div class=\"x-carousel-progress\">\r\n <x-progress [percent]=\"percent()\" [color]=\"progressColor()\" [info]=\"false\" height=\"0.325rem\"></x-progress>\r\n </div>\r\n }\r\n </div>\r\n <ul class=\"x-carousel-indicator\">\r\n @for (panel of panels(); track $index) {\r\n <li\r\n [class.x-activated]=\"getActivated($index)\"\r\n (click)=\"action($index, 0, 'click')\"\r\n (mouseenter)=\"action($index, 0, 'hover')\"\r\n >\r\n <x-button type=\"text\"></x-button>\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n", styles: [".x-carousel{margin:0;padding:0}.x-carousel{font-size:var(--x-font-size);box-sizing:border-box;position:relative}.x-carousel-content{position:relative;overflow:hidden}.x-carousel-content>x-button{opacity:0;visibility:hidden;top:50%;z-index:10;transform:translateY(-50%);position:absolute;transition:var(--x-animation-duration-base) ease-out}.x-carousel-content>x-button .x-button{border:none;outline:none;padding:0;margin:0;height:2.25rem;width:2.25rem;border-radius:50%;background-color:#1f2d3d26;color:var(--x-background-100);text-align:center}.x-carousel-content>x-button .x-button:hover{color:var(--x-background-100);background-color:#1f2d3d40}.x-carousel-content>x-button.arrow-left{left:1rem;transform:translate3D(-15px,-50%,0)}.x-carousel-content>x-button.arrow-right{right:1rem;transform:translate3D(15px,-50%,0)}.x-carousel-content>x-carousel-panel{position:absolute;top:0;left:0;width:100%;height:100%;display:inline-block;overflow:hidden;background-color:var(--x-background-a100);z-index:0}.x-carousel-content>x-carousel-panel.x-carousel-animating{transition:.4s ease-in-out}.x-carousel-content>x-carousel-panel.x-carousel-card{width:50%}.x-carousel-content>x-carousel-panel.x-carousel-in-stage{cursor:pointer;z-index:1}.x-carousel-content>x-carousel-panel.x-carousel-in-stage .x-carousel-mask{position:absolute;width:100%;height:100%;top:0;left:0;background-color:var(--x-background);opacity:.24;transition:.2s}.x-carousel-content>x-carousel-panel.x-carousel-in-stage:hover .x-carousel-mask{opacity:.12}.x-carousel-content>x-carousel-panel.x-activated{z-index:2}.x-carousel-indicator{bottom:.25rem;left:50%;transform:translate(-50%);position:absolute;z-index:2;display:inline-flex}.x-carousel-indicator>li{cursor:pointer;background-color:transparent;display:inline-flex;padding:.75rem .25rem}.x-carousel-indicator>li>x-button .x-button{padding:0;width:1.875rem;height:.125rem;background-color:#1f2d3d26;transition:.3s}.x-carousel-indicator>li:hover>x-button .x-button{background-color:#1f2d3d40}.x-carousel-indicator>li.x-activated>x-button .x-button{background-color:#ffffffe6}.x-carousel-indicator-outside .x-carousel-indicator{position:static;transform:none;display:flex;align-items:center;justify-content:center}.x-carousel-indicator-outside .x-carousel-indicator>li>x-button .x-button{background-color:var(--x-text-700)}.x-carousel-indicator-outside .x-carousel-indicator>li.x-activated>x-button .x-button{background-color:#00000080}.x-carousel:hover .x-carousel-content>x-button,.x-carousel-arrow-always .x-carousel-content>x-button{opacity:1;visibility:inherit}.x-carousel:hover .x-carousel-content>x-button.arrow-left,.x-carousel-arrow-always .x-carousel-content>x-button.arrow-left{transform:translate3D(0,-50%,0)}.x-carousel:hover .x-carousel-content>x-button.arrow-right,.x-carousel-arrow-always .x-carousel-content>x-button.arrow-right{transform:translate3D(0,-50%,0)}.x-carousel-horizontal,.x-carousel-vertical{overflow:hidden}.x-carousel-vertical>.x-carousel-indicator{right:0;top:50%;left:inherit;bottom:inherit;flex-direction:column;transform:translateY(-50%)}.x-carousel-vertical>.x-carousel-indicator>li{padding:.25rem .75rem}.x-carousel-vertical>.x-carousel-indicator>li>x-button .x-button{width:.125rem;height:1rem}.x-carousel-text{position:absolute;bottom:0;z-index:10;font-size:1rem;padding:.5rem .75rem}.x-carousel-progress{position:absolute;bottom:0;z-index:11;width:100%;height:.5rem}.x-carousel-progress x-progress{position:relative;height:.5rem;display:block;top:0}.x-carousel-progress x-progress .x-progress{position:relative;top:-.5625rem}.x-carousel-progress x-progress .x-progress-rail,.x-carousel-progress x-progress .x-progress-bg{border-radius:0}.x-carousel-progress x-progress .x-progress-rail{background-color:transparent}.x-carousel-current{position:absolute;bottom:0;right:0;z-index:11;padding:.5rem .75rem;font-size:var(--x-font-size-big)}.x-carousel-active{color:var(--x-primary);font-weight:600;font-size:1.5rem}.x-carousel-count{color:var(--x-text);font-weight:600}.x-carousel-has-current .x-carousel-text{padding-right:5rem}\n"] }]
|
|
348
361
|
}], propDecorators: { carousel: [{ type: i0.ViewChild, args: ['carousel', { isSignal: true }] }], content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }] } });
|
|
@@ -350,17 +363,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
350
363
|
class XCarouselPanelComponent extends XCarouselPanelProperty {
|
|
351
364
|
constructor() {
|
|
352
365
|
super(...arguments);
|
|
353
|
-
this.index = signal(0,
|
|
354
|
-
|
|
355
|
-
this.
|
|
356
|
-
|
|
357
|
-
this.
|
|
358
|
-
|
|
359
|
-
this.
|
|
366
|
+
this.index = signal(0, /* @ts-ignore */
|
|
367
|
+
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
368
|
+
this.animating = signal(false, /* @ts-ignore */
|
|
369
|
+
...(ngDevMode ? [{ debugName: "animating" }] : /* istanbul ignore next */ []));
|
|
370
|
+
this.cardScale = signal(0.83, /* @ts-ignore */
|
|
371
|
+
...(ngDevMode ? [{ debugName: "cardScale" }] : /* istanbul ignore next */ []));
|
|
372
|
+
this.scale = signal(1, /* @ts-ignore */
|
|
373
|
+
...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
374
|
+
this.translate = signal(0, /* @ts-ignore */
|
|
375
|
+
...(ngDevMode ? [{ debugName: "translate" }] : /* istanbul ignore next */ []));
|
|
376
|
+
this.translateType = signal('translateX', /* @ts-ignore */
|
|
377
|
+
...(ngDevMode ? [{ debugName: "translateType" }] : /* istanbul ignore next */ []));
|
|
378
|
+
this.inStage = signal(false, /* @ts-ignore */
|
|
379
|
+
...(ngDevMode ? [{ debugName: "inStage" }] : /* istanbul ignore next */ []));
|
|
360
380
|
this.unSubject = new Subject();
|
|
361
381
|
this.carousel = inject(XCarouselComponent, { optional: true, host: true });
|
|
362
|
-
this.activeSignal = signal(this.active(),
|
|
363
|
-
|
|
382
|
+
this.activeSignal = signal(this.active(), /* @ts-ignore */
|
|
383
|
+
...(ngDevMode ? [{ debugName: "activeSignal" }] : /* istanbul ignore next */ []));
|
|
384
|
+
this.card = computed(() => this.carousel?.card() ?? false, /* @ts-ignore */
|
|
385
|
+
...(ngDevMode ? [{ debugName: "card" }] : /* istanbul ignore next */ []));
|
|
364
386
|
this.elementRef = inject(ElementRef);
|
|
365
387
|
}
|
|
366
388
|
get getCard() {
|
|
@@ -467,10 +489,10 @@ class XCarouselPanelComponent extends XCarouselPanelProperty {
|
|
|
467
489
|
this.carousel?.setActiveItem(this.index());
|
|
468
490
|
}
|
|
469
491
|
}
|
|
470
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
471
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
492
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselPanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
493
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XCarouselPanelComponent, isStandalone: true, selector: "x-carousel-panel", host: { properties: { "class.x-carousel-card": "this.getCard", "class.x-activated": "this.getActivated", "class.x-carousel-in-stage": "this.getInStage", "class.x-carousel-animating": "this.getAnimating", "style.transform": "this.getTransform" } }, usesInheritance: true, ngImport: i0, template: "<div #carouselPanel class=\"x-carousel-panel\" (click)=\"panelClick()\">\r\n @if (card()) {\r\n <div [hidden]=\"activeSignal()\" class=\"x-carousel-mask\"></div>\r\n }\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".x-carousel-panel{margin:0;padding:0}.x-carousel-panel{box-sizing:border-box;width:100%;height:100%;display:inline-block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
472
494
|
}
|
|
473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselPanelComponent, decorators: [{
|
|
474
496
|
type: Component,
|
|
475
497
|
args: [{ selector: `${XCarouselPanelPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #carouselPanel class=\"x-carousel-panel\" (click)=\"panelClick()\">\r\n @if (card()) {\r\n <div [hidden]=\"activeSignal()\" class=\"x-carousel-mask\"></div>\r\n }\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".x-carousel-panel{margin:0;padding:0}.x-carousel-panel{box-sizing:border-box;width:100%;height:100%;display:inline-block}\n"] }]
|
|
476
498
|
}], propDecorators: { getCard: [{
|
|
@@ -491,11 +513,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
491
513
|
}] } });
|
|
492
514
|
|
|
493
515
|
class XCarouselModule {
|
|
494
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
495
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
496
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
516
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
517
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XCarouselModule, imports: [XCarouselComponent, XCarouselPanelComponent], exports: [XCarouselComponent, XCarouselPanelComponent] }); }
|
|
518
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselModule, imports: [XCarouselComponent] }); }
|
|
497
519
|
}
|
|
498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCarouselModule, decorators: [{
|
|
499
521
|
type: NgModule,
|
|
500
522
|
args: [{
|
|
501
523
|
imports: [XCarouselComponent, XCarouselPanelComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-carousel.mjs","sources":["../../../../lib/ng-nest/ui/carousel/carousel.property.ts","../../../../lib/ng-nest/ui/carousel/carousel.component.ts","../../../../lib/ng-nest/ui/carousel/carousel.component.html","../../../../lib/ng-nest/ui/carousel/carousel-panel.component.ts","../../../../lib/ng-nest/ui/carousel/carousel-panel.component.html","../../../../lib/ng-nest/ui/carousel/carousel.module.ts","../../../../lib/ng-nest/ui/carousel/ng-nest-ui-carousel.ts"],"sourcesContent":["import { XProperty, XPropertyFunction, XToNumber, XToCssPixelValue, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input, model } from '@angular/core';\r\nimport type { XNumber, XBoolean, XShadow, XDisplayDirection, XTrigger } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Carousel\r\n * @selector x-carousel\r\n * @decorator component\r\n */\r\nexport const XCarouselPrefix = 'x-carousel';\r\nconst X_CAROUSEL_CONFIG_NAME = 'carousel';\r\n\r\n/**\r\n * Carousel Property\r\n */\r\n@Component({ selector: `${XCarouselPrefix}-property`, template: '' })\r\nexport class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 当前激活的幻灯片索引\r\n * @en_US Index of the currently active slide\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel [active]=\"1\" (activeChange)=\"activeChange($event)\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * <x-carousel [(active)]=\"active\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n * ```typescript\r\n * active = signal(1)\r\n * activeChange(active: number) {\r\n * console.log(active)\r\n * }\r\n * ```\r\n *\r\n */\r\n readonly active = model<number>(0);\r\n /**\r\n * @zh_CN 幻灯片高度\r\n * @en_US Slide height\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel height=\"18rem\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly height = input<string, XNumber>(this.config?.height ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 切换器触发方式\r\n * @en_US Switcher trigger method\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel trigger=\"click\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly trigger = input<XCarouselTrigger>(this.config?.trigger ?? 'hover');\r\n /**\r\n * @zh_CN 箭头显示隐藏方式\r\n * @en_US Arrow shows how to hide\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel arrow=\"always\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * <x-carousel arrow=\"never\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly arrow = input<XCarouselArrow>(this.config?.arrow ?? 'hover');\r\n /**\r\n * @zh_CN 幻灯片轮播方向\r\n * @en_US Slide rotation direction\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel direction=\"vertical\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly direction = input<XCarouselDirection>(this.config?.direction ?? 'horizontal');\r\n /**\r\n * @zh_CN 自动切换\r\n * @en_US Automatic switching\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel autoplay=\"false\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly autoplay = input<boolean, XBoolean>(true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 自动切换时间间隔,ms\r\n * @en_US Automatic switching time interval. ms\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel interval=\"5000\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly interval = input<number, XNumber>(3000, { transform: XToNumber });\r\n /**\r\n * @zh_CN 切换器是否显示在外面\r\n * @en_US Whether the switcher is displayed outside\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel outside>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly outside = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 是否以卡片的方式显示幻灯片\r\n * @en_US Whether to display the slideshow as a card\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel card>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly card = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示文字\r\n * @en_US Display text\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel text=\"text info\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly text = input<string>('');\r\n /**\r\n * @zh_CN 显示进度条\r\n * @en_US Show progress\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel progress>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly progress = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 进度条颜色\r\n * @en_US Progress color\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel progress progressColor=\"blue\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly progressColor = input<string>('');\r\n /**\r\n * @zh_CN 显示当前页面\r\n * @en_US Show current page\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel current>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly current = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 指示器切换方式\r\n * @en_US Indicator switching method\r\n */\r\nexport type XCarouselTrigger = XTrigger;\r\n\r\n/**\r\n * @zh_CN 切换箭头显示方式\r\n * @en_US Toggle arrow display\r\n */\r\nexport type XCarouselArrow = XShadow;\r\n\r\n/**\r\n * @zh_CN 走马灯展示的方向\r\n * @en_US The direction of the revolving lantern\r\n */\r\nexport type XCarouselDirection = XDisplayDirection;\r\n\r\n/**\r\n * Carousel Panel\r\n * @selector x-carousel-panel\r\n * @decorator component\r\n */\r\nexport const XCarouselPanelPrefix = 'x-carousel-panel';\r\n\r\n/**\r\n * Carousel Panel Property\r\n */\r\n@Component({ selector: `${XCarouselPanelPrefix}-property`, template: '' })\r\nexport class XCarouselPanelProperty extends XProperty {\r\n /**\r\n * @zh_CN 激活当前幻灯片\r\n * @en_US Activate the current slide\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel active>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly active = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ElementRef,\r\n ChangeDetectionStrategy,\r\n SimpleChanges,\r\n PLATFORM_ID,\r\n inject,\r\n computed,\r\n viewChild,\r\n signal\r\n} from '@angular/core';\r\nimport { XCarouselPrefix, XCarouselProperty } from './carousel.property';\r\nimport { XIsUndefined, XIsChange, XIsEmpty, XResize } from '@ng-nest/ui/core';\r\nimport { Subject, Subscription, interval } from 'rxjs';\r\nimport { takeUntil, debounceTime, tap } from 'rxjs/operators';\r\nimport { NgClass, isPlatformBrowser } from '@angular/common';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XProgressComponent } from '@ng-nest/ui/progress';\r\nimport type { XResizeObserver } from '@ng-nest/ui/core';\r\n\r\n@Component({\r\n selector: `${XCarouselPrefix}`,\r\n imports: [NgClass, XButtonComponent, XProgressComponent],\r\n templateUrl: './carousel.component.html',\r\n styleUrls: ['./carousel.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCarouselComponent extends XCarouselProperty {\r\n carousel = viewChild.required<ElementRef<HTMLElement>>('carousel');\r\n content = viewChild.required<ElementRef<HTMLElement>>('content');\r\n start = signal(-1);\r\n before = signal(-1);\r\n timer?: Subscription;\r\n precentTimer?: Subscription;\r\n platformId = inject(PLATFORM_ID);\r\n isBrowser = isPlatformBrowser(this.platformId);\r\n percent = signal(0);\r\n count = signal(0);\r\n panels = signal<object[]>([]);\r\n private unSubject = new Subject<void>();\r\n private resizeObserver!: XResizeObserver;\r\n\r\n classMap = computed(() => ({\r\n [`${XCarouselPrefix}-${this.direction()}`]: !XIsEmpty(this.direction())\r\n }));\r\n\r\n updatePanel = new Subject<void>();\r\n\r\n page = computed(() => this.active() + 1);\r\n\r\n ngAfterViewInit() {\r\n this.autoplay() && this.resetInterval();\r\n XResize(this.content().nativeElement)\r\n .pipe(\r\n debounceTime(30),\r\n tap(({ resizeObserver }) => {\r\n this.resizeObserver = resizeObserver;\r\n this.updatePanel.next();\r\n }),\r\n takeUntil(this.unSubject)\r\n )\r\n .subscribe();\r\n }\r\n\r\n ngOnChanges(simples: SimpleChanges): void {\r\n const { active, interval } = simples;\r\n XIsChange(interval) && this.autoplay() && this.resetInterval();\r\n XIsChange(active) && this.setActiveItem(this.active());\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.timer?.unsubscribe();\r\n this.precentTimer?.unsubscribe();\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n this.resizeObserver?.disconnect();\r\n this.updatePanel.complete();\r\n }\r\n\r\n action(index: number, increase: number, event?: string): void {\r\n if (!XIsUndefined(event) && this.trigger() !== event) return;\r\n this.autoplay() && this.resetInterval();\r\n this.setActiveItem(index + increase);\r\n }\r\n\r\n resetInterval(): void {\r\n if (!this.isBrowser) return;\r\n this.timer?.unsubscribe();\r\n if (this.progress()) {\r\n this.precentTimer?.unsubscribe();\r\n this.percent.set(0);\r\n const js = this.interval() / 100;\r\n this.precentTimer = interval(js)\r\n .pipe(takeUntil(this.unSubject))\r\n .subscribe(() => {\r\n this.percent.update((x) => x + 1);\r\n });\r\n }\r\n this.timer = interval(this.interval())\r\n .pipe(takeUntil(this.unSubject))\r\n .subscribe(() => {\r\n this.percent.set(0);\r\n this.setActiveItem(this.active() + 1);\r\n });\r\n }\r\n\r\n setActiveItem(index: number): void {\r\n if (this.start() === -1) return;\r\n this.before.set(this.active());\r\n const nextValue = index > this.start() ? 0 : index < 0 ? this.start() : index;\r\n this.active.set(nextValue);\r\n this.updatePanel.next();\r\n }\r\n\r\n getActivated(index: number) {\r\n return this.active() === index;\r\n }\r\n}\r\n","<div\r\n #carousel\r\n class=\"x-carousel\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-carousel-arrow-always]=\"arrow() === 'always'\"\r\n [class.x-carousel-has-current]=\"current()\"\r\n [class.x-carousel-indicator-outside]=\"outside() || card()\"\r\n>\r\n <div #content class=\"x-carousel-content\" [style.height]=\"height()\">\r\n @if (arrow() !== 'never' && direction() !== 'vertical') {\r\n <x-button class=\"arrow-left\" icon=\"fto-chevron-left\" (click)=\"action(active(), -1)\"></x-button>\r\n <x-button class=\"arrow-right\" icon=\"fto-chevron-right\" (click)=\"action(active(), 1)\"></x-button>\r\n }\r\n <ng-content></ng-content>\r\n @if (text()) {\r\n <div class=\"x-carousel-text\">{{ text() }}</div>\r\n }\r\n @if (current()) {\r\n <div class=\"x-carousel-current\">\r\n <span class=\"x-carousel-active\">{{ page() }}</span> /\r\n <span class=\"x-carousel-count\">{{ count() }}</span>\r\n </div>\r\n }\r\n @if (progress()) {\r\n <div class=\"x-carousel-progress\">\r\n <x-progress [percent]=\"percent()\" [color]=\"progressColor()\" [info]=\"false\" height=\"0.325rem\"></x-progress>\r\n </div>\r\n }\r\n </div>\r\n <ul class=\"x-carousel-indicator\">\r\n @for (panel of panels(); track $index) {\r\n <li\r\n [class.x-activated]=\"getActivated($index)\"\r\n (click)=\"action($index, 0, 'click')\"\r\n (mouseenter)=\"action($index, 0, 'hover')\"\r\n >\r\n <x-button type=\"text\"></x-button>\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n ElementRef,\r\n ChangeDetectionStrategy,\r\n inject,\r\n OnDestroy,\r\n signal,\r\n HostBinding,\r\n computed\r\n} from '@angular/core';\r\nimport { XCarouselPanelPrefix, XCarouselPanelProperty } from './carousel.property';\r\nimport { XCarouselComponent } from './carousel.component';\r\nimport { Subject, takeUntil } from 'rxjs';\r\n\r\n@Component({\r\n selector: `${XCarouselPanelPrefix}`,\r\n templateUrl: './carousel-panel.component.html',\r\n styleUrls: ['./carousel-panel.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCarouselPanelComponent extends XCarouselPanelProperty implements OnInit, OnDestroy {\r\n @HostBinding('class.x-carousel-card') get getCard() {\r\n return !!this.carousel?.card();\r\n }\r\n @HostBinding('class.x-activated') get getActivated() {\r\n return this.activeSignal();\r\n }\r\n @HostBinding('class.x-carousel-in-stage') get getInStage() {\r\n return this.inStage();\r\n }\r\n @HostBinding('class.x-carousel-animating') get getAnimating() {\r\n return this.animating();\r\n }\r\n @HostBinding('style.transform') get getTransform() {\r\n return `${this.translateType()}(${this.translate()}px) scale(${this.scale()})`;\r\n }\r\n index = signal(0);\r\n animating = signal(false);\r\n preTranslate!: number;\r\n cardScale = signal(0.83);\r\n scale = signal(1);\r\n translate = signal(0);\r\n translateType = signal('translateX');\r\n inStage = signal(false);\r\n unSubject = new Subject<void>();\r\n carousel = inject(XCarouselComponent, { optional: true, host: true });\r\n activeSignal = signal(this.active());\r\n card = computed(() => this.carousel?.card() ?? false);\r\n private elementRef = inject(ElementRef);\r\n\r\n ngOnInit() {\r\n if (!this.carousel) return;\r\n this.carousel.count.update((x) => x + 1);\r\n this.carousel.start.update((x) => x + 1);\r\n this.index.set(this.carousel.start());\r\n\r\n this.carousel.panels.update((x) => {\r\n x.push(this.elementRef);\r\n return [...x];\r\n });\r\n this.carousel.updatePanel.pipe(takeUntil(this.unSubject)).subscribe(() => {\r\n this.update();\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (!this.carousel) return;\r\n this.carousel.start.update((x) => x - 1);\r\n const idx = this.carousel.panels().indexOf(this.elementRef);\r\n this.carousel.panels.update((x) => {\r\n x.splice(idx, 1);\r\n return [...x];\r\n });\r\n }\r\n\r\n setActive() {\r\n const isActive: boolean = this.carousel!.active() === this.index();\r\n if (this.activeSignal() !== isActive) {\r\n this.activeSignal.set(isActive);\r\n }\r\n }\r\n\r\n setStyles() {\r\n const width = this.elementRef.nativeElement.offsetWidth;\r\n const height = this.elementRef.nativeElement.offsetHeight;\r\n let offset = this.carousel!.active() - this.index();\r\n let distance = width;\r\n if (this.carousel!.card()) {\r\n if (this.carousel!.direction() === 'vertical') {\r\n console.warn('[x-carousel] vertical direction is not supported in card mode');\r\n }\r\n this.inStage.set(Math.round(Math.abs(offset)) <= 1);\r\n this.translate.set(this.calcCardTranslate(this.index(), this.carousel!.active())!);\r\n this.scale.set(offset === 0 ? 1 : this.cardScale());\r\n } else {\r\n if (this.carousel?.direction() === 'vertical') {\r\n distance = height;\r\n this.translateType.set('translateY');\r\n }\r\n const map: any = {\r\n '-2': -distance,\r\n '-1': distance,\r\n '0': 0,\r\n '1': 0 - distance,\r\n '2': distance\r\n };\r\n offset = offset < -2 ? -2 : offset > 2 ? 2 : offset;\r\n this.translate.set(map[offset]);\r\n }\r\n this.animating.set(\r\n this.carousel!.active() === this.index() ||\r\n this.carousel!.before() === this.index() ||\r\n this.carousel!.start() === Math.abs(offset) ||\r\n this.carousel!.card()\r\n );\r\n }\r\n\r\n calcCardTranslate(index: number, activeIndex: number) {\r\n const parentWidth = this.carousel!.carousel().nativeElement.offsetWidth;\r\n let offset: number = index - activeIndex;\r\n let activeFirstOrLast = this.carousel!.start() > 1 && this.carousel!.start() === Math.abs(offset);\r\n if (this.inStage() || activeFirstOrLast) {\r\n if (activeFirstOrLast) offset = offset < 0 ? 1 : -1;\r\n return (parentWidth * ((2 - this.cardScale()) * offset + 1)) / 4;\r\n } else if (index < activeIndex) {\r\n return (-(1 + this.cardScale()) * parentWidth) / 4;\r\n } else {\r\n return ((3 + this.cardScale()) * parentWidth) / 4;\r\n }\r\n }\r\n\r\n update() {\r\n this.setActive();\r\n this.setStyles();\r\n }\r\n\r\n panelClick() {\r\n if (this.carousel?.card() && this.carousel?.active() !== this.index()) {\r\n this.carousel?.autoplay() && this.carousel?.resetInterval();\r\n this.carousel?.setActiveItem(this.index());\r\n }\r\n }\r\n}\r\n","<div #carouselPanel class=\"x-carousel-panel\" (click)=\"panelClick()\">\r\n @if (card()) {\r\n <div [hidden]=\"activeSignal()\" class=\"x-carousel-mask\"></div>\r\n }\r\n <ng-content></ng-content>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCarouselComponent } from './carousel.component';\r\nimport { XCarouselPanelComponent } from './carousel-panel.component';\r\n\r\n@NgModule({\r\n imports: [XCarouselComponent, XCarouselPanelComponent],\r\n exports: [XCarouselComponent, XCarouselPanelComponent]\r\n})\r\nexport class XCarouselModule {}\r\n","/**\n * Generated bundle index.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,EAAA,2NAAA,EAAA,MAAA,EAAA,CAAA,6HAAA,CAAA,EAAA;;sBAG9C,WAAW;uBAAC,uBAAuB;;sBAGnC,WAAW;uBAAC,mBAAmB;;sBAG/B,WAAW;uBAAC,2BAA2B;;sBAGvC,WAAW;uBAAC,4BAA4B;;sBAGxC,WAAW;uBAAC,iBAAiB;;;ME5BnB,eAAe,CAAA;iIAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHhB,kBAAkB,EAAE,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAC3C,kBAAkB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAE1C,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHhB,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAGjB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB;AACtD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-carousel.mjs","sources":["../../../../lib/ng-nest/ui/carousel/carousel.property.ts","../../../../lib/ng-nest/ui/carousel/carousel.component.ts","../../../../lib/ng-nest/ui/carousel/carousel.component.html","../../../../lib/ng-nest/ui/carousel/carousel-panel.component.ts","../../../../lib/ng-nest/ui/carousel/carousel-panel.component.html","../../../../lib/ng-nest/ui/carousel/carousel.module.ts","../../../../lib/ng-nest/ui/carousel/ng-nest-ui-carousel.ts"],"sourcesContent":["import { XProperty, XPropertyFunction, XToNumber, XToCssPixelValue, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input, model } from '@angular/core';\r\nimport type { XNumber, XBoolean, XShadow, XDisplayDirection, XTrigger } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Carousel\r\n * @selector x-carousel\r\n * @decorator component\r\n */\r\nexport const XCarouselPrefix = 'x-carousel';\r\nconst X_CAROUSEL_CONFIG_NAME = 'carousel';\r\n\r\n/**\r\n * Carousel Property\r\n */\r\n@Component({ selector: `${XCarouselPrefix}-property`, template: '' })\r\nexport class XCarouselProperty extends XPropertyFunction(X_CAROUSEL_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 当前激活的幻灯片索引\r\n * @en_US Index of the currently active slide\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel [active]=\"1\" (activeChange)=\"activeChange($event)\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * <x-carousel [(active)]=\"active\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n * ```typescript\r\n * active = signal(1)\r\n * activeChange(active: number) {\r\n * console.log(active)\r\n * }\r\n * ```\r\n *\r\n */\r\n readonly active = model<number>(0);\r\n /**\r\n * @zh_CN 幻灯片高度\r\n * @en_US Slide height\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel height=\"18rem\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly height = input<string, XNumber>(this.config?.height ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 切换器触发方式\r\n * @en_US Switcher trigger method\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel trigger=\"click\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly trigger = input<XCarouselTrigger>(this.config?.trigger ?? 'hover');\r\n /**\r\n * @zh_CN 箭头显示隐藏方式\r\n * @en_US Arrow shows how to hide\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel arrow=\"always\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * <x-carousel arrow=\"never\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly arrow = input<XCarouselArrow>(this.config?.arrow ?? 'hover');\r\n /**\r\n * @zh_CN 幻灯片轮播方向\r\n * @en_US Slide rotation direction\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel direction=\"vertical\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly direction = input<XCarouselDirection>(this.config?.direction ?? 'horizontal');\r\n /**\r\n * @zh_CN 自动切换\r\n * @en_US Automatic switching\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel autoplay=\"false\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly autoplay = input<boolean, XBoolean>(true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 自动切换时间间隔,ms\r\n * @en_US Automatic switching time interval. ms\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel interval=\"5000\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly interval = input<number, XNumber>(3000, { transform: XToNumber });\r\n /**\r\n * @zh_CN 切换器是否显示在外面\r\n * @en_US Whether the switcher is displayed outside\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel outside>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly outside = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 是否以卡片的方式显示幻灯片\r\n * @en_US Whether to display the slideshow as a card\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel card>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly card = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示文字\r\n * @en_US Display text\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel text=\"text info\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly text = input<string>('');\r\n /**\r\n * @zh_CN 显示进度条\r\n * @en_US Show progress\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel progress>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly progress = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 进度条颜色\r\n * @en_US Progress color\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel progress progressColor=\"blue\">\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly progressColor = input<string>('');\r\n /**\r\n * @zh_CN 显示当前页面\r\n * @en_US Show current page\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel current>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly current = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 指示器切换方式\r\n * @en_US Indicator switching method\r\n */\r\nexport type XCarouselTrigger = XTrigger;\r\n\r\n/**\r\n * @zh_CN 切换箭头显示方式\r\n * @en_US Toggle arrow display\r\n */\r\nexport type XCarouselArrow = XShadow;\r\n\r\n/**\r\n * @zh_CN 走马灯展示的方向\r\n * @en_US The direction of the revolving lantern\r\n */\r\nexport type XCarouselDirection = XDisplayDirection;\r\n\r\n/**\r\n * Carousel Panel\r\n * @selector x-carousel-panel\r\n * @decorator component\r\n */\r\nexport const XCarouselPanelPrefix = 'x-carousel-panel';\r\n\r\n/**\r\n * Carousel Panel Property\r\n */\r\n@Component({ selector: `${XCarouselPanelPrefix}-property`, template: '' })\r\nexport class XCarouselPanelProperty extends XProperty {\r\n /**\r\n * @zh_CN 激活当前幻灯片\r\n * @en_US Activate the current slide\r\n * @example\r\n *\r\n * ```html\r\n * <x-carousel>\r\n * <x-carousel-panel>0</x-carousel-panel>\r\n * <x-carousel-panel active>1</x-carousel-panel>\r\n * </x-carousel>\r\n * ```\r\n *\r\n */\r\n readonly active = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ElementRef,\r\n ChangeDetectionStrategy,\r\n SimpleChanges,\r\n PLATFORM_ID,\r\n inject,\r\n computed,\r\n viewChild,\r\n signal\r\n} from '@angular/core';\r\nimport { XCarouselPrefix, XCarouselProperty } from './carousel.property';\r\nimport { XIsUndefined, XIsChange, XIsEmpty, XResize } from '@ng-nest/ui/core';\r\nimport { Subject, Subscription, interval } from 'rxjs';\r\nimport { takeUntil, debounceTime, tap } from 'rxjs/operators';\r\nimport { NgClass, isPlatformBrowser } from '@angular/common';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XProgressComponent } from '@ng-nest/ui/progress';\r\nimport type { XResizeObserver } from '@ng-nest/ui/core';\r\n\r\n@Component({\r\n selector: `${XCarouselPrefix}`,\r\n imports: [NgClass, XButtonComponent, XProgressComponent],\r\n templateUrl: './carousel.component.html',\r\n styleUrls: ['./carousel.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCarouselComponent extends XCarouselProperty {\r\n carousel = viewChild.required<ElementRef<HTMLElement>>('carousel');\r\n content = viewChild.required<ElementRef<HTMLElement>>('content');\r\n start = signal(-1);\r\n before = signal(-1);\r\n timer?: Subscription;\r\n precentTimer?: Subscription;\r\n platformId = inject(PLATFORM_ID);\r\n isBrowser = isPlatformBrowser(this.platformId);\r\n percent = signal(0);\r\n count = signal(0);\r\n panels = signal<object[]>([]);\r\n private unSubject = new Subject<void>();\r\n private resizeObserver!: XResizeObserver;\r\n\r\n classMap = computed(() => ({\r\n [`${XCarouselPrefix}-${this.direction()}`]: !XIsEmpty(this.direction())\r\n }));\r\n\r\n updatePanel = new Subject<void>();\r\n\r\n page = computed(() => this.active() + 1);\r\n\r\n ngAfterViewInit() {\r\n this.autoplay() && this.resetInterval();\r\n XResize(this.content().nativeElement)\r\n .pipe(\r\n debounceTime(30),\r\n tap(({ resizeObserver }) => {\r\n this.resizeObserver = resizeObserver;\r\n this.updatePanel.next();\r\n }),\r\n takeUntil(this.unSubject)\r\n )\r\n .subscribe();\r\n }\r\n\r\n ngOnChanges(simples: SimpleChanges): void {\r\n const { active, interval } = simples;\r\n XIsChange(interval) && this.autoplay() && this.resetInterval();\r\n XIsChange(active) && this.setActiveItem(this.active());\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.timer?.unsubscribe();\r\n this.precentTimer?.unsubscribe();\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n this.resizeObserver?.disconnect();\r\n this.updatePanel.complete();\r\n }\r\n\r\n action(index: number, increase: number, event?: string): void {\r\n if (!XIsUndefined(event) && this.trigger() !== event) return;\r\n this.autoplay() && this.resetInterval();\r\n this.setActiveItem(index + increase);\r\n }\r\n\r\n resetInterval(): void {\r\n if (!this.isBrowser) return;\r\n this.timer?.unsubscribe();\r\n if (this.progress()) {\r\n this.precentTimer?.unsubscribe();\r\n this.percent.set(0);\r\n const js = this.interval() / 100;\r\n this.precentTimer = interval(js)\r\n .pipe(takeUntil(this.unSubject))\r\n .subscribe(() => {\r\n this.percent.update((x) => x + 1);\r\n });\r\n }\r\n this.timer = interval(this.interval())\r\n .pipe(takeUntil(this.unSubject))\r\n .subscribe(() => {\r\n this.percent.set(0);\r\n this.setActiveItem(this.active() + 1);\r\n });\r\n }\r\n\r\n setActiveItem(index: number): void {\r\n if (this.start() === -1) return;\r\n this.before.set(this.active());\r\n const nextValue = index > this.start() ? 0 : index < 0 ? this.start() : index;\r\n this.active.set(nextValue);\r\n this.updatePanel.next();\r\n }\r\n\r\n getActivated(index: number) {\r\n return this.active() === index;\r\n }\r\n}\r\n","<div\r\n #carousel\r\n class=\"x-carousel\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-carousel-arrow-always]=\"arrow() === 'always'\"\r\n [class.x-carousel-has-current]=\"current()\"\r\n [class.x-carousel-indicator-outside]=\"outside() || card()\"\r\n>\r\n <div #content class=\"x-carousel-content\" [style.height]=\"height()\">\r\n @if (arrow() !== 'never' && direction() !== 'vertical') {\r\n <x-button class=\"arrow-left\" icon=\"fto-chevron-left\" (click)=\"action(active(), -1)\"></x-button>\r\n <x-button class=\"arrow-right\" icon=\"fto-chevron-right\" (click)=\"action(active(), 1)\"></x-button>\r\n }\r\n <ng-content></ng-content>\r\n @if (text()) {\r\n <div class=\"x-carousel-text\">{{ text() }}</div>\r\n }\r\n @if (current()) {\r\n <div class=\"x-carousel-current\">\r\n <span class=\"x-carousel-active\">{{ page() }}</span> /\r\n <span class=\"x-carousel-count\">{{ count() }}</span>\r\n </div>\r\n }\r\n @if (progress()) {\r\n <div class=\"x-carousel-progress\">\r\n <x-progress [percent]=\"percent()\" [color]=\"progressColor()\" [info]=\"false\" height=\"0.325rem\"></x-progress>\r\n </div>\r\n }\r\n </div>\r\n <ul class=\"x-carousel-indicator\">\r\n @for (panel of panels(); track $index) {\r\n <li\r\n [class.x-activated]=\"getActivated($index)\"\r\n (click)=\"action($index, 0, 'click')\"\r\n (mouseenter)=\"action($index, 0, 'hover')\"\r\n >\r\n <x-button type=\"text\"></x-button>\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n ElementRef,\r\n ChangeDetectionStrategy,\r\n inject,\r\n OnDestroy,\r\n signal,\r\n HostBinding,\r\n computed\r\n} from '@angular/core';\r\nimport { XCarouselPanelPrefix, XCarouselPanelProperty } from './carousel.property';\r\nimport { XCarouselComponent } from './carousel.component';\r\nimport { Subject, takeUntil } from 'rxjs';\r\n\r\n@Component({\r\n selector: `${XCarouselPanelPrefix}`,\r\n templateUrl: './carousel-panel.component.html',\r\n styleUrls: ['./carousel-panel.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCarouselPanelComponent extends XCarouselPanelProperty implements OnInit, OnDestroy {\r\n @HostBinding('class.x-carousel-card') get getCard() {\r\n return !!this.carousel?.card();\r\n }\r\n @HostBinding('class.x-activated') get getActivated() {\r\n return this.activeSignal();\r\n }\r\n @HostBinding('class.x-carousel-in-stage') get getInStage() {\r\n return this.inStage();\r\n }\r\n @HostBinding('class.x-carousel-animating') get getAnimating() {\r\n return this.animating();\r\n }\r\n @HostBinding('style.transform') get getTransform() {\r\n return `${this.translateType()}(${this.translate()}px) scale(${this.scale()})`;\r\n }\r\n index = signal(0);\r\n animating = signal(false);\r\n preTranslate!: number;\r\n cardScale = signal(0.83);\r\n scale = signal(1);\r\n translate = signal(0);\r\n translateType = signal('translateX');\r\n inStage = signal(false);\r\n unSubject = new Subject<void>();\r\n carousel = inject(XCarouselComponent, { optional: true, host: true });\r\n activeSignal = signal(this.active());\r\n card = computed(() => this.carousel?.card() ?? false);\r\n private elementRef = inject(ElementRef);\r\n\r\n ngOnInit() {\r\n if (!this.carousel) return;\r\n this.carousel.count.update((x) => x + 1);\r\n this.carousel.start.update((x) => x + 1);\r\n this.index.set(this.carousel.start());\r\n\r\n this.carousel.panels.update((x) => {\r\n x.push(this.elementRef);\r\n return [...x];\r\n });\r\n this.carousel.updatePanel.pipe(takeUntil(this.unSubject)).subscribe(() => {\r\n this.update();\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (!this.carousel) return;\r\n this.carousel.start.update((x) => x - 1);\r\n const idx = this.carousel.panels().indexOf(this.elementRef);\r\n this.carousel.panels.update((x) => {\r\n x.splice(idx, 1);\r\n return [...x];\r\n });\r\n }\r\n\r\n setActive() {\r\n const isActive: boolean = this.carousel!.active() === this.index();\r\n if (this.activeSignal() !== isActive) {\r\n this.activeSignal.set(isActive);\r\n }\r\n }\r\n\r\n setStyles() {\r\n const width = this.elementRef.nativeElement.offsetWidth;\r\n const height = this.elementRef.nativeElement.offsetHeight;\r\n let offset = this.carousel!.active() - this.index();\r\n let distance = width;\r\n if (this.carousel!.card()) {\r\n if (this.carousel!.direction() === 'vertical') {\r\n console.warn('[x-carousel] vertical direction is not supported in card mode');\r\n }\r\n this.inStage.set(Math.round(Math.abs(offset)) <= 1);\r\n this.translate.set(this.calcCardTranslate(this.index(), this.carousel!.active())!);\r\n this.scale.set(offset === 0 ? 1 : this.cardScale());\r\n } else {\r\n if (this.carousel?.direction() === 'vertical') {\r\n distance = height;\r\n this.translateType.set('translateY');\r\n }\r\n const map: any = {\r\n '-2': -distance,\r\n '-1': distance,\r\n '0': 0,\r\n '1': 0 - distance,\r\n '2': distance\r\n };\r\n offset = offset < -2 ? -2 : offset > 2 ? 2 : offset;\r\n this.translate.set(map[offset]);\r\n }\r\n this.animating.set(\r\n this.carousel!.active() === this.index() ||\r\n this.carousel!.before() === this.index() ||\r\n this.carousel!.start() === Math.abs(offset) ||\r\n this.carousel!.card()\r\n );\r\n }\r\n\r\n calcCardTranslate(index: number, activeIndex: number) {\r\n const parentWidth = this.carousel!.carousel().nativeElement.offsetWidth;\r\n let offset: number = index - activeIndex;\r\n let activeFirstOrLast = this.carousel!.start() > 1 && this.carousel!.start() === Math.abs(offset);\r\n if (this.inStage() || activeFirstOrLast) {\r\n if (activeFirstOrLast) offset = offset < 0 ? 1 : -1;\r\n return (parentWidth * ((2 - this.cardScale()) * offset + 1)) / 4;\r\n } else if (index < activeIndex) {\r\n return (-(1 + this.cardScale()) * parentWidth) / 4;\r\n } else {\r\n return ((3 + this.cardScale()) * parentWidth) / 4;\r\n }\r\n }\r\n\r\n update() {\r\n this.setActive();\r\n this.setStyles();\r\n }\r\n\r\n panelClick() {\r\n if (this.carousel?.card() && this.carousel?.active() !== this.index()) {\r\n this.carousel?.autoplay() && this.carousel?.resetInterval();\r\n this.carousel?.setActiveItem(this.index());\r\n }\r\n }\r\n}\r\n","<div #carouselPanel class=\"x-carousel-panel\" (click)=\"panelClick()\">\r\n @if (card()) {\r\n <div [hidden]=\"activeSignal()\" class=\"x-carousel-mask\"></div>\r\n }\r\n <ng-content></ng-content>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCarouselComponent } from './carousel.component';\r\nimport { XCarouselPanelComponent } from './carousel-panel.component';\r\n\r\n@NgModule({\r\n imports: [XCarouselComponent, XCarouselPanelComponent],\r\n exports: [XCarouselComponent, XCarouselPanelComponent]\r\n})\r\nexport class XCarouselModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["takeUntil"],"mappings":";;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG;AAC/B,MAAM,sBAAsB,GAAG,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