tee3apps-cms-sdk-react 0.0.20 → 0.0.23
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Page.tsx +2 -2
- package/src/PageComponents/BoxComponent.tsx +123 -25
- package/src/PageComponents/Visual-Components/CarouselComponent.tsx +300 -167
- package/src/PageComponents/Visual-Components/GroupBrandComponent.tsx +396 -390
- package/src/PageComponents/Visual-Components/GroupCategoryComponent.tsx +21 -13
- package/src/PageComponents/Visual-Components/GroupImageList.tsx +642 -668
- package/src/PageComponents/Visual-Components/GroupProductComponent.tsx +46 -20
- package/src/PageComponents/Visual-Components/GroupVideoList.tsx +693 -589
- package/src/PageComponents/Visual-Components/ImageComponent.tsx +74 -18
- package/src/PageComponents/Visual-Components/LottieComponent.tsx +14 -8
- package/src/PageComponents/Visual-Components/NavigationComponent.tsx +74 -27
- package/src/PageComponents/Visual-Components/RichTextComponent.tsx +1 -1
- package/src/PageComponents/Visual-Components/TabComponent.tsx +1624 -876
- package/src/PageComponents/Visual-Components/TextComponent.tsx +24 -10
- package/src/PageComponents/Visual-Components/VideoComponent.tsx +33 -11
- package/src/PageComponents/Visual-Components/tab.css +645 -611
- package/src/index.css +126 -81
- package/src/Components/BoxRenderer.tsx +0 -108
- package/src/Components/ComponentRenderer.tsx +0 -29
- package/src/Components/ImageComponent.tsx +0 -68
- package/src/Components/RowComponent.tsx +0 -66
- package/src/Components/TextComponent.tsx +0 -47
|
@@ -178,6 +178,13 @@ const GroupCategoryComponent: React.FC<GroupCategoryComponentMainProps> = ({ pro
|
|
|
178
178
|
return `${Linodeurl}${url}`;
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
+
const getCategoryName = (name: any): string => {
|
|
182
|
+
if (!name) return '';
|
|
183
|
+
if (typeof name === 'string') return name;
|
|
184
|
+
if (typeof name === 'object' && name.all) return name.all;
|
|
185
|
+
return String(name);
|
|
186
|
+
};
|
|
187
|
+
|
|
181
188
|
const buildCategoryHref = (item: CategoryItem): string | null => {
|
|
182
189
|
if (item.pages && item.pages.length > 0) {
|
|
183
190
|
const firstPage = item.pages[0];
|
|
@@ -196,7 +203,7 @@ const GroupCategoryComponent: React.FC<GroupCategoryComponentMainProps> = ({ pro
|
|
|
196
203
|
const href = buildCategoryHref(item);
|
|
197
204
|
const Wrapper: React.FC<{ children: React.ReactNode }> = ({ children }) =>
|
|
198
205
|
href ? (
|
|
199
|
-
<a href={href} style={{ textDecoration: 'none', color: 'inherit' }}>
|
|
206
|
+
<a href={href} style={{ textDecoration: 'none', color: 'inherit', height: '100%', display: 'block' }}>
|
|
200
207
|
{children}
|
|
201
208
|
</a>
|
|
202
209
|
) : (
|
|
@@ -207,8 +214,7 @@ const GroupCategoryComponent: React.FC<GroupCategoryComponentMainProps> = ({ pro
|
|
|
207
214
|
<div
|
|
208
215
|
className="categoryCard"
|
|
209
216
|
style={{
|
|
210
|
-
height:'100%',
|
|
211
|
-
|
|
217
|
+
height: '100%',
|
|
212
218
|
borderRadius: '8px',
|
|
213
219
|
overflow: 'hidden',
|
|
214
220
|
border: '1px solid #eee',
|
|
@@ -216,7 +222,7 @@ const GroupCategoryComponent: React.FC<GroupCategoryComponentMainProps> = ({ pro
|
|
|
216
222
|
display: 'flex',
|
|
217
223
|
flexDirection: 'column',
|
|
218
224
|
alignItems: 'center',
|
|
219
|
-
justifyContent: '
|
|
225
|
+
justifyContent: 'flex-start',
|
|
220
226
|
padding: large ? '16px' : '12px',
|
|
221
227
|
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
|
|
222
228
|
transition: 'transform 0.2s ease',
|
|
@@ -244,7 +250,7 @@ const GroupCategoryComponent: React.FC<GroupCategoryComponentMainProps> = ({ pro
|
|
|
244
250
|
>
|
|
245
251
|
<img
|
|
246
252
|
src={getImageUrl(item.image.url)}
|
|
247
|
-
alt={item.image.alt || item.name
|
|
253
|
+
alt={item.image.alt || getCategoryName(item.name) || ''}
|
|
248
254
|
style={{ width: '100%', height: '100%', objectFit: 'contain' }}
|
|
249
255
|
/>
|
|
250
256
|
</div>
|
|
@@ -265,7 +271,7 @@ const GroupCategoryComponent: React.FC<GroupCategoryComponentMainProps> = ({ pro
|
|
|
265
271
|
WebkitBoxOrient: 'vertical',
|
|
266
272
|
}}
|
|
267
273
|
>
|
|
268
|
-
{item.name}
|
|
274
|
+
{getCategoryName(item.name)}
|
|
269
275
|
</div>
|
|
270
276
|
)}
|
|
271
277
|
</div>
|
|
@@ -282,10 +288,12 @@ const GroupCategoryComponent: React.FC<GroupCategoryComponentMainProps> = ({ pro
|
|
|
282
288
|
borderRadius: '0px',
|
|
283
289
|
minHeight: '100px',
|
|
284
290
|
position: 'relative',
|
|
285
|
-
overflow: '
|
|
291
|
+
overflow: 'visible',
|
|
286
292
|
marginBottom: '20px',
|
|
287
293
|
marginTop: '0px',
|
|
288
|
-
|
|
294
|
+
display: 'flex',
|
|
295
|
+
flexDirection: 'column',
|
|
296
|
+
height: '100%'
|
|
289
297
|
}}
|
|
290
298
|
className='GroupCategoryComponent'
|
|
291
299
|
>
|
|
@@ -366,23 +374,23 @@ const GroupCategoryComponent: React.FC<GroupCategoryComponentMainProps> = ({ pro
|
|
|
366
374
|
style={{
|
|
367
375
|
display: currentLayout === 'NONE' ? 'flex' : 'block',
|
|
368
376
|
overflowX: currentLayout === 'NONE' ? (isHorizontalScroll ? 'auto' : 'hidden') : 'visible',
|
|
377
|
+
overflowY: currentLayout === 'NONE' ? 'hidden' : 'visible',
|
|
378
|
+
alignItems: currentLayout === 'NONE' ? 'stretch' : undefined,
|
|
369
379
|
gap: currentLayout === 'NONE' ? '12px' : '0',
|
|
370
380
|
padding: '12px',
|
|
371
381
|
scrollBehavior: 'smooth',
|
|
372
382
|
backgroundColor: props.carouselBackground || '#fff',
|
|
373
|
-
scrollbarWidth: 'thin',
|
|
374
383
|
borderRadius: '8px',
|
|
375
384
|
position: 'relative',
|
|
376
|
-
|
|
377
|
-
,
|
|
378
|
-
|
|
385
|
+
flex: 1,
|
|
386
|
+
minHeight: 0,
|
|
379
387
|
}}
|
|
380
388
|
className="groupCategoryCarousel"
|
|
381
389
|
>
|
|
382
390
|
{categories.length > 0 ? (
|
|
383
391
|
currentLayout === 'NONE' ? (
|
|
384
392
|
categories.map((category) => (
|
|
385
|
-
<div key={category.code} style={{ minWidth: '150px' ,height:'
|
|
393
|
+
<div key={category.code} style={{ minWidth: '150px', width: '150px', flexShrink: 0, display: 'flex', flexDirection: 'column', height: '100%' }}>
|
|
386
394
|
<Card item={category} />
|
|
387
395
|
</div>
|
|
388
396
|
))
|