datastake-daf 0.6.208 → 0.6.209
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/dist/components/index.js
CHANGED
|
@@ -21301,7 +21301,7 @@ function CustomArrowButton({
|
|
|
21301
21301
|
});
|
|
21302
21302
|
}
|
|
21303
21303
|
|
|
21304
|
-
|
|
21304
|
+
dt.div`
|
|
21305
21305
|
position: relative;
|
|
21306
21306
|
|
|
21307
21307
|
.ant-carousel .slick-dots li button {
|
|
@@ -21343,72 +21343,49 @@ function ImageCarousel(_ref) {
|
|
|
21343
21343
|
var _carouselRef$current2;
|
|
21344
21344
|
(_carouselRef$current2 = carouselRef.current) === null || _carouselRef$current2 === void 0 || _carouselRef$current2.next();
|
|
21345
21345
|
};
|
|
21346
|
-
|
|
21347
|
-
// Check if images array is empty or invalid
|
|
21348
|
-
const hasImages = images && images.length > 0;
|
|
21349
21346
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
21350
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21358
|
-
|
|
21359
|
-
|
|
21360
|
-
|
|
21361
|
-
children: hasImages ? images.map((image, index) => {
|
|
21362
|
-
const imageSrc = typeof image === "string" ? image : image.src;
|
|
21363
|
-
const imageAlt = typeof image === "string" ? "".concat(title, " - Image ").concat(index + 1) : image.alt;
|
|
21364
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
21365
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Image, {
|
|
21366
|
-
src: imageSrc,
|
|
21367
|
-
alt: imageAlt,
|
|
21368
|
-
height: height,
|
|
21369
|
-
width: "100%",
|
|
21370
|
-
fallback: fallback,
|
|
21371
|
-
loading: "lazy",
|
|
21372
|
-
preview: {
|
|
21373
|
-
visible: false
|
|
21374
|
-
},
|
|
21375
|
-
onClick: () => {
|
|
21376
|
-
setCurrent(index);
|
|
21377
|
-
setPreviewVisible(true);
|
|
21378
|
-
}
|
|
21379
|
-
})
|
|
21380
|
-
}, imageSrc);
|
|
21381
|
-
}) :
|
|
21382
|
-
/*#__PURE__*/
|
|
21383
|
-
// No images - show placeholder
|
|
21384
|
-
jsxRuntime.jsx("div", {
|
|
21347
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CarouselWidget, _objectSpread2(_objectSpread2({
|
|
21348
|
+
title: title
|
|
21349
|
+
}, rest), {}, {
|
|
21350
|
+
arrows: false,
|
|
21351
|
+
ref: carouselRef,
|
|
21352
|
+
afterChange: handleCarouselChange,
|
|
21353
|
+
infinite: true,
|
|
21354
|
+
children: images.map((image, index) => {
|
|
21355
|
+
const imageSrc = typeof image === "string" ? image : image.src;
|
|
21356
|
+
const imageAlt = typeof image === "string" ? "".concat(title, " - Image ").concat(index + 1) : image.alt;
|
|
21357
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
21385
21358
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Image, {
|
|
21386
|
-
src:
|
|
21387
|
-
alt:
|
|
21359
|
+
src: imageSrc,
|
|
21360
|
+
alt: imageAlt,
|
|
21388
21361
|
height: height,
|
|
21389
21362
|
width: "100%",
|
|
21390
21363
|
fallback: fallback,
|
|
21391
|
-
|
|
21392
|
-
|
|
21393
|
-
|
|
21364
|
+
loading: "lazy",
|
|
21365
|
+
preview: {
|
|
21366
|
+
visible: false
|
|
21367
|
+
},
|
|
21368
|
+
onClick: () => {
|
|
21369
|
+
setCurrent(index);
|
|
21370
|
+
setPreviewVisible(true);
|
|
21394
21371
|
}
|
|
21395
21372
|
})
|
|
21396
|
-
})
|
|
21397
|
-
})
|
|
21398
|
-
|
|
21399
|
-
|
|
21400
|
-
|
|
21401
|
-
|
|
21402
|
-
|
|
21403
|
-
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
|
|
21407
|
-
|
|
21408
|
-
|
|
21409
|
-
|
|
21373
|
+
}, imageSrc);
|
|
21374
|
+
})
|
|
21375
|
+
})), customArrows && images && images.length > 1 && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
21376
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CustomArrowButton, {
|
|
21377
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(Icons.LeftOutlined, {}),
|
|
21378
|
+
onClick: goToPrevious,
|
|
21379
|
+
isLeft: true,
|
|
21380
|
+
iconColor: arrowIconColor,
|
|
21381
|
+
hoverIconColor: arrowHoverIconColor
|
|
21382
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CustomArrowButton, {
|
|
21383
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(Icons.RightOutlined, {}),
|
|
21384
|
+
onClick: goToNext,
|
|
21385
|
+
iconColor: arrowIconColor,
|
|
21386
|
+
hoverIconColor: arrowHoverIconColor
|
|
21410
21387
|
})]
|
|
21411
|
-
}),
|
|
21388
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
21412
21389
|
style: {
|
|
21413
21390
|
display: "none"
|
|
21414
21391
|
},
|
package/package.json
CHANGED
|
@@ -44,6 +44,7 @@ import { StyledCarouselWrapper } from "./style.js";
|
|
|
44
44
|
* @param {string} [props.inactiveDotColor="rgba(255, 255, 255, 0.3)"] - Color of inactive dots
|
|
45
45
|
* @param {string} [props.arrowIconColor="#666"] - Default color of arrow icons
|
|
46
46
|
* @param {string} [props.arrowHoverIconColor="#1890ff"] - Color of arrow icons on hover
|
|
47
|
+
* @param {boolean} [props.customArrows=false] - Whether to show custom navigation arrows
|
|
47
48
|
* @param {Object} [props.rest] - Additional props passed to the underlying CarouselWidget component
|
|
48
49
|
*
|
|
49
50
|
* @features
|
|
@@ -91,25 +92,22 @@ function ImageCarousel({
|
|
|
91
92
|
carouselRef.current?.next();
|
|
92
93
|
};
|
|
93
94
|
|
|
94
|
-
// Check if images array is empty or invalid
|
|
95
|
-
const hasImages = images && images.length > 0;
|
|
96
95
|
|
|
97
96
|
return (
|
|
98
97
|
<>
|
|
99
|
-
<StyledCarouselWrapper
|
|
98
|
+
{/* <StyledCarouselWrapper
|
|
100
99
|
activeDotColor={activeDotColor}
|
|
101
100
|
inactiveDotColor={inactiveDotColor}
|
|
102
|
-
>
|
|
101
|
+
> */}
|
|
103
102
|
<CarouselWidget
|
|
104
103
|
title={title}
|
|
105
104
|
{...rest}
|
|
106
105
|
arrows={false}
|
|
107
106
|
ref={carouselRef}
|
|
108
107
|
afterChange={handleCarouselChange}
|
|
109
|
-
infinite
|
|
110
|
-
dots={hasImages}
|
|
108
|
+
infinite
|
|
111
109
|
>
|
|
112
|
-
{
|
|
110
|
+
{images.map((image, index) => {
|
|
113
111
|
const imageSrc = typeof image === "string" ? image : image.src;
|
|
114
112
|
const imageAlt =
|
|
115
113
|
typeof image === "string"
|
|
@@ -135,25 +133,10 @@ function ImageCarousel({
|
|
|
135
133
|
/>
|
|
136
134
|
</div>
|
|
137
135
|
);
|
|
138
|
-
})
|
|
139
|
-
// No images - show placeholder
|
|
140
|
-
<div>
|
|
141
|
-
<Image
|
|
142
|
-
src="/assets/images/no-image.svg"
|
|
143
|
-
alt="No images available"
|
|
144
|
-
height={height}
|
|
145
|
-
width="100%"
|
|
146
|
-
fallback={fallback}
|
|
147
|
-
preview={false}
|
|
148
|
-
style={{
|
|
149
|
-
objectFit: "contain",
|
|
150
|
-
}}
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
)}
|
|
136
|
+
})}
|
|
154
137
|
</CarouselWidget>
|
|
155
138
|
|
|
156
|
-
{
|
|
139
|
+
{customArrows && images && images.length > 1 && (
|
|
157
140
|
<>
|
|
158
141
|
<CustomArrowButton
|
|
159
142
|
icon={<LeftOutlined />}
|
|
@@ -170,23 +153,21 @@ function ImageCarousel({
|
|
|
170
153
|
/>
|
|
171
154
|
</>
|
|
172
155
|
)}
|
|
173
|
-
</StyledCarouselWrapper>
|
|
156
|
+
{/* </StyledCarouselWrapper> */}
|
|
174
157
|
|
|
175
|
-
{
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
>
|
|
189
|
-
{images.map((image, index) => {
|
|
158
|
+
<div style={{ display: "none" }}>
|
|
159
|
+
<Image.PreviewGroup
|
|
160
|
+
preview={{
|
|
161
|
+
visible: previewVisible,
|
|
162
|
+
current,
|
|
163
|
+
onVisibleChange: (vis) => setPreviewVisible(vis),
|
|
164
|
+
onChange: (idx) => {
|
|
165
|
+
setCurrent(idx);
|
|
166
|
+
carouselRef.current?.goTo(idx);
|
|
167
|
+
},
|
|
168
|
+
}}
|
|
169
|
+
>
|
|
170
|
+
{images.map((image, index) => {
|
|
190
171
|
const imageSrc = typeof image === "string" ? image : image.src;
|
|
191
172
|
const imageAlt =
|
|
192
173
|
typeof image === "string"
|
|
@@ -194,10 +175,9 @@ function ImageCarousel({
|
|
|
194
175
|
: image.alt;
|
|
195
176
|
|
|
196
177
|
return <Image key={imageSrc} src={imageSrc} alt={imageAlt} />;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
)}
|
|
178
|
+
})}
|
|
179
|
+
</Image.PreviewGroup>
|
|
180
|
+
</div>
|
|
201
181
|
</>
|
|
202
182
|
);
|
|
203
183
|
}
|