@fluid-app/portal-sdk 0.1.217 → 0.1.219
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/{ContactsScreen-D-g7XEB-.cjs → ContactsScreen-DYVR-UvO.cjs} +1 -1
- package/dist/{FluidProvider-02beRTpR.mjs → FluidProvider-DTttgSXi.mjs} +8 -8
- package/dist/{FluidProvider-02beRTpR.mjs.map → FluidProvider-DTttgSXi.mjs.map} +1 -1
- package/dist/{FluidProvider-BgFmXtHo.cjs → FluidProvider-Dm4BhF_t.cjs} +8 -8
- package/dist/{FluidProvider-BgFmXtHo.cjs.map → FluidProvider-Dm4BhF_t.cjs.map} +1 -1
- package/dist/{ListWidget-C0ltFhxE.cjs → ListWidget-BE7uA4W4.cjs} +1 -2
- package/dist/{ListWidget-Ct8IDkio.mjs → ListWidget-D7y8bfvT.mjs} +252 -120
- package/dist/ListWidget-D7y8bfvT.mjs.map +1 -0
- package/dist/{ListWidget-C7ouNpEo.cjs → ListWidget-DJ-_dMOK.cjs} +251 -119
- package/dist/ListWidget-DJ-_dMOK.cjs.map +1 -0
- package/dist/{MessagingScreen-CJlVOY5R.mjs → MessagingScreen-CwEXQJlW.mjs} +2 -2
- package/dist/{MessagingScreen-CJlVOY5R.mjs.map → MessagingScreen-CwEXQJlW.mjs.map} +1 -1
- package/dist/{MessagingScreen-BkLcqJbs.cjs → MessagingScreen-DLQ5V0m4.cjs} +2 -2
- package/dist/{MessagingScreen-BkLcqJbs.cjs.map → MessagingScreen-DLQ5V0m4.cjs.map} +1 -1
- package/dist/{MessagingScreen-sN7aBvGk.cjs → MessagingScreen-YBXJL7a9.cjs} +6 -6
- package/dist/{MySiteScreen-DUN5TTvU.mjs → MySiteScreen-CyzM9hX3.mjs} +11 -30
- package/dist/{MySiteScreen-DUN5TTvU.mjs.map → MySiteScreen-CyzM9hX3.mjs.map} +1 -1
- package/dist/{MySiteScreen-B0aOIzU4.cjs → MySiteScreen-DPQ66oRs.cjs} +2 -2
- package/dist/{MySiteScreen-B1L8coGs.cjs → MySiteScreen-DxLcG3-S.cjs} +11 -30
- package/dist/MySiteScreen-DxLcG3-S.cjs.map +1 -0
- package/dist/{MySiteWidget-CDQjyrRA.cjs → MySiteWidget-8UsfEK-w.cjs} +1 -1
- package/dist/{MySiteWidget-CDQjyrRA.cjs.map → MySiteWidget-8UsfEK-w.cjs.map} +1 -1
- package/dist/{MySiteWidget-BlUbduit.mjs → MySiteWidget-D46TVWnf.mjs} +1 -1
- package/dist/{MySiteWidget-BlUbduit.mjs.map → MySiteWidget-D46TVWnf.mjs.map} +1 -1
- package/dist/{NestedWidget-ChAWwsRP.cjs → NestedWidget-BjT-UrSi.cjs} +2 -2
- package/dist/{NestedWidget-ChAWwsRP.cjs.map → NestedWidget-BjT-UrSi.cjs.map} +1 -1
- package/dist/{NestedWidget-Dw0QHoqw.mjs → NestedWidget-CEeQeCq0.mjs} +2 -2
- package/dist/{NestedWidget-Dw0QHoqw.mjs.map → NestedWidget-CEeQeCq0.mjs.map} +1 -1
- package/dist/{NestedWidget--suTLM6l.cjs → NestedWidget-D4amXykk.cjs} +2 -2
- package/dist/{PortalContentApiProvider-RXBp8FNj.cjs → PortalContentApiProvider-DXnplIOD.cjs} +273 -82
- package/dist/PortalContentApiProvider-DXnplIOD.cjs.map +1 -0
- package/dist/{PortalContentApiProvider-C9FeVwRb.mjs → PortalContentApiProvider-x81DXmOR.mjs} +273 -82
- package/dist/PortalContentApiProvider-x81DXmOR.mjs.map +1 -0
- package/dist/{ProductsScreen-DNpzJ6lh.cjs → ProductsScreen-3yjIMjYY.cjs} +2 -2
- package/dist/{ProductsScreen-pkOeOW8M.mjs → ProductsScreen-BVyLOe2K.mjs} +2 -2
- package/dist/{ProductsScreen-BD53vh6Y.cjs → ProductsScreen-R0MfWYZJ.cjs} +2 -2
- package/dist/{ProductsScreen-BD53vh6Y.cjs.map → ProductsScreen-R0MfWYZJ.cjs.map} +1 -1
- package/dist/{ProductsScreen-BtUZxJCt.mjs → ProductsScreen-z9hXfFeJ.mjs} +2 -2
- package/dist/{ProductsScreen-BtUZxJCt.mjs.map → ProductsScreen-z9hXfFeJ.mjs.map} +1 -1
- package/dist/{ProfileScreen-rPqgsNCc.cjs → ProfileScreen-B0WRifk_.cjs} +2 -2
- package/dist/{ProfileScreen-rPqgsNCc.cjs.map → ProfileScreen-B0WRifk_.cjs.map} +1 -1
- package/dist/{ProfileScreen-CNYqUDNB.mjs → ProfileScreen-BuejQU_V.mjs} +2 -2
- package/dist/{ProfileScreen-CNYqUDNB.mjs.map → ProfileScreen-BuejQU_V.mjs.map} +1 -1
- package/dist/{ProfileScreen-Bgo6iTKe.cjs → ProfileScreen-g3se9Jw-.cjs} +6 -6
- package/dist/{ShareablesScreen-DC8xXUo4.cjs → ShareablesScreen-Co_gFZva.cjs} +3 -3
- package/dist/{ShareablesScreen-DC8xXUo4.cjs.map → ShareablesScreen-Co_gFZva.cjs.map} +1 -1
- package/dist/{ShareablesScreen-D1J2Kljk.mjs → ShareablesScreen-DpwFh0ky.mjs} +3 -3
- package/dist/{ShareablesScreen-smU5pGyH.cjs → ShareablesScreen-YlMqyP-B.cjs} +3 -3
- package/dist/{ShareablesScreen-CW1e9x4K.mjs → ShareablesScreen-tkaf9R5N.mjs} +3 -3
- package/dist/{ShareablesScreen-CW1e9x4K.mjs.map → ShareablesScreen-tkaf9R5N.mjs.map} +1 -1
- package/dist/{ShopScreen-B9lHJ8L2.mjs → ShopScreen-B4afB5sE.mjs} +2 -2
- package/dist/{ShopScreen-B9lHJ8L2.mjs.map → ShopScreen-B4afB5sE.mjs.map} +1 -1
- package/dist/{ShopScreen-g6FQ4R1_.cjs → ShopScreen-BOjri6Dm.cjs} +6 -6
- package/dist/{ShopScreen-DUHzufCU.cjs → ShopScreen-Untg6XBY.cjs} +2 -2
- package/dist/{ShopScreen-DUHzufCU.cjs.map → ShopScreen-Untg6XBY.cjs.map} +1 -1
- package/dist/index.cjs +27 -27
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +25 -25
- package/dist/{portal_tenant_content-0zpnjBot.cjs → portal_tenant_content-BvYxmADB.cjs} +18 -1
- package/dist/portal_tenant_content-BvYxmADB.cjs.map +1 -0
- package/dist/{portal_tenant_content-DzIQtSLE.mjs → portal_tenant_content-nHEI2qEY.mjs} +13 -2
- package/dist/portal_tenant_content-nHEI2qEY.mjs.map +1 -0
- package/dist/{scroll-arrows-fK_MFlSX.mjs → scroll-arrows-COrfvJk9.mjs} +1 -1
- package/dist/{scroll-arrows-fK_MFlSX.mjs.map → scroll-arrows-COrfvJk9.mjs.map} +1 -1
- package/dist/{scroll-arrows-DVwMDTt3.cjs → scroll-arrows-i0E2N-ct.cjs} +1 -1
- package/dist/{scroll-arrows-DVwMDTt3.cjs.map → scroll-arrows-i0E2N-ct.cjs.map} +1 -1
- package/dist/{use-mysite-portal-BV-BP3CE.mjs → use-mysite-portal-D29HLD1z.mjs} +3 -2
- package/dist/use-mysite-portal-D29HLD1z.mjs.map +1 -0
- package/dist/{use-mysite-portal-DzDYRU0u.cjs → use-mysite-portal-DxNQ3uTi.cjs} +3 -2
- package/dist/use-mysite-portal-DxNQ3uTi.cjs.map +1 -0
- package/package.json +9 -9
- package/dist/ListWidget-C7ouNpEo.cjs.map +0 -1
- package/dist/ListWidget-Ct8IDkio.mjs.map +0 -1
- package/dist/MySiteScreen-B1L8coGs.cjs.map +0 -1
- package/dist/PortalContentApiProvider-C9FeVwRb.mjs.map +0 -1
- package/dist/PortalContentApiProvider-RXBp8FNj.cjs.map +0 -1
- package/dist/portal_tenant_content-0zpnjBot.cjs.map +0 -1
- package/dist/portal_tenant_content-DzIQtSLE.mjs.map +0 -1
- package/dist/use-mysite-portal-BV-BP3CE.mjs.map +0 -1
- package/dist/use-mysite-portal-DzDYRU0u.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListWidget-C7ouNpEo.cjs","names":["MediaRenderer","DOMPurify","getImageUrl","getAspectRatioClass","useWidgetInteraction","gapValues","useWidgetInteraction","gapValues","ScrollArrows","borderWidthClasses","borderColorClasses","getFontSizeField","getColorField","getPaddingField","getBorderRadiusField","getBorderWidthField","getBorderColorField","getGapField"],"sources":["../../widgets/src/widgets/list-widget/FeaturedSection.tsx","../../widgets/src/widgets/list-widget/ListItemCard.tsx","../../widgets/src/widgets/list-widget/UnorderedList.tsx","../../widgets/src/widgets/list-widget/OrderedList.tsx","../../widgets/src/widgets/ListWidget.tsx"],"sourcesContent":["import type React from \"react\";\nimport type {\n BorderRadiusOptions,\n FontSizeOptions,\n ColorOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { MediaRenderer } from \"../../components/MediaRenderer\";\n\ninterface FeaturedSectionProps {\n borderRadius: BorderRadiusOptions;\n titleSize: FontSizeOptions;\n featuredTitle?: string | undefined;\n featuredSubtitle?: string | undefined;\n featuredButtonText?: string | undefined;\n featuredButtonUrl?: string | undefined;\n featuredSubtitleColor: ColorOptions;\n featuredSubtitleSize: FontSizeOptions;\n asset: { url: string; isVideo: boolean };\n}\n\nexport function FeaturedSection({\n borderRadius,\n titleSize,\n featuredTitle,\n featuredSubtitle,\n featuredButtonText,\n featuredButtonUrl,\n featuredSubtitleColor,\n featuredSubtitleSize,\n asset,\n}: FeaturedSectionProps): React.JSX.Element {\n return (\n <div\n className={`relative h-full min-h-[300px] w-full overflow-hidden rounded-${borderRadius}`}\n >\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n src={asset.url}\n mediaType={asset.isVideo ? \"video\" : \"image\"}\n alt={featuredTitle || \"Featured\"}\n objectFit=\"cover\"\n autoplay={asset.isVideo}\n loop={asset.isVideo}\n muted={asset.isVideo}\n controls={false}\n />\n </div>\n\n <div className=\"pointer-events-none absolute inset-0 bg-black/40\" />\n\n <div className=\"absolute inset-0 flex flex-col items-start justify-end p-8\">\n {featuredTitle && (\n <h3\n className={`font-header mb-2 font-bold text-white text-${titleSize === \"md\" ? \"base\" : titleSize}`}\n >\n {featuredTitle}\n </h3>\n )}\n {featuredSubtitle && (\n <p\n className={`mb-4 text-${featuredSubtitleColor} text-${featuredSubtitleSize === \"md\" ? \"base\" : featuredSubtitleSize}`}\n >\n {featuredSubtitle}\n </p>\n )}\n {featuredButtonText && (\n <a\n href={featuredButtonUrl || \"#\"}\n className={`text-foreground bg-white px-6 py-2 font-medium transition-opacity hover:opacity-90 rounded-${borderRadius}`}\n >\n {featuredButtonText}\n </a>\n )}\n </div>\n </div>\n );\n}\n","import type React from \"react\";\nimport DOMPurify from \"dompurify\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\n\ntype ListItem = {\n id: string;\n image?: string;\n imageUrl?: string;\n videoUrl?: string;\n title?: string;\n description?: string;\n price?: string;\n display_price?: string;\n originalPrice?: string;\n discount?: string;\n qv?: string;\n cv?: string;\n [key: string]: unknown;\n};\n\nfunction getStringValue(value: unknown): string {\n if (!value) return \"\";\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\") return String(value);\n if (typeof value === \"object\" && value !== null) {\n if (\"body\" in value) {\n const body = (value as { body: unknown }).body;\n if (typeof body === \"string\") return body;\n }\n if (\"text\" in value) {\n const text = (value as { text: unknown }).text;\n if (typeof text === \"string\") return text;\n }\n if (\"value\" in value) {\n const val = (value as { value: unknown }).value;\n if (typeof val === \"string\") return val;\n if (typeof val === \"number\") return String(val);\n }\n }\n return \"\";\n}\n\n/**\n * Strips parenthetical text like \"(USD)\" from price strings.\n * Matches the shop page's stripParentheticalText pattern.\n */\nfunction stripParentheticalText(text: string): string {\n return text.replace(/\\s*\\([^)]*\\)/g, \"\").trim();\n}\n\n/**\n * Formats a price for display. Follows the shop page pattern:\n * prices arrive pre-formatted from the API via display_price\n * (e.g. \"$19.99\", \"€15.00 (EUR)\") so we just extract the string\n * and strip parenthetical suffixes.\n */\nfunction formatPrice(value: unknown): string {\n const str = getStringValue(value);\n if (!str) return \"\";\n return stripParentheticalText(str);\n}\n\nexport interface ListItemCardContentProps {\n item: ListItem;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nexport function ListItemCardContent({\n item,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n}: ListItemCardContentProps): React.JSX.Element {\n return (\n <div className={`flex flex-1 flex-col p-${padding}`}>\n {item.title && (\n <h3\n className={`text-${itemTitleColor} text-${itemTitleSize === \"md\" ? \"base\" : itemTitleSize} font-header mb-1 font-semibold`}\n >\n {getStringValue(item.title)}\n </h3>\n )}\n {item.description && (\n <div\n className={`text-${descriptionColor} text-${descriptionSize === \"md\" ? \"base\" : descriptionSize} mb-2 line-clamp-2 overflow-hidden`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(item.description ?? \"\", {\n ALLOWED_TAGS: [\n \"br\",\n \"strong\",\n \"em\",\n \"b\",\n \"i\",\n \"ul\",\n \"ol\",\n \"li\",\n \"p\",\n ],\n ALLOWED_ATTR: [],\n }),\n }}\n />\n )}\n <div className=\"flex items-center gap-2\">\n {(item.display_price || item.price) && (\n <span\n className={`text-${priceColor} text-${priceSize === \"md\" ? \"base\" : priceSize} font-bold`}\n >\n {formatPrice(item.display_price || item.price)}\n </span>\n )}\n {item.originalPrice && (\n <span\n className={`text-${originalPriceColor} text-${descriptionSize === \"md\" ? \"base\" : descriptionSize} line-through`}\n >\n {formatPrice(item.originalPrice)}\n </span>\n )}\n </div>\n {showMetaText && (item.qv || item.cv) && (\n <div\n className={`mt-2 flex gap-3 text-${metaTextColor} text-${metaTextSize === \"md\" ? \"base\" : metaTextSize}`}\n >\n {item.qv && <span>QV: {getStringValue(item.qv)}</span>}\n {item.cv && <span>CV: {getStringValue(item.cv)}</span>}\n </div>\n )}\n </div>\n );\n}\n\nexport function DiscountBadge({\n discount,\n}: {\n discount: string;\n}): React.JSX.Element {\n return (\n <div className=\"bg-destructive text-destructive-foreground absolute top-2 right-2 z-10 rounded-md px-2 py-1 text-xs font-bold\">\n {getStringValue(discount)}\n </div>\n );\n}\n\nexport { getStringValue };\nexport type { ListItem };\n","import type React from \"react\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { gapValues } from \"../../core/fields\";\nimport { useWidgetInteraction } from \"../../contexts/WidgetInteractionContext\";\nimport {\n ListItemCardContent,\n DiscountBadge,\n type ListItem,\n} from \"./ListItemCard\";\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\n\nconst getImageUrl = (item: ListItem): string | undefined => {\n return item.imageUrl || item.image;\n};\n\nconst getAspectRatioClass = (ratio: ImageAspectRatio): string => {\n const ratios = {\n square: \"aspect-square\",\n landscape: \"aspect-video\",\n portrait: \"aspect-[3/4]\",\n };\n return ratios[ratio];\n};\n\nconst getResponsiveGridClass = (columns: number): string => {\n const responsiveClasses: Record<number, string> = {\n 1: \"grid-cols-2 @lg:grid-cols-1\",\n 2: \"grid-cols-2 @lg:grid-cols-2\",\n 3: \"grid-cols-2 @lg:grid-cols-3\",\n 4: \"grid-cols-2 @lg:grid-cols-4\",\n 5: \"grid-cols-2 @lg:grid-cols-5\",\n 6: \"grid-cols-2 @lg:grid-cols-6\",\n };\n return responsiveClasses[columns] || \"grid-cols-2 @lg:grid-cols-3\";\n};\n\nexport interface UnorderedListProps {\n items: ListItem[];\n columns: number;\n gap: GapOptions;\n borderRadius: BorderRadiusOptions;\n imageAspectRatio: ImageAspectRatio;\n showBadge: boolean;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nexport function UnorderedList({\n items,\n columns,\n gap,\n borderRadius,\n imageAspectRatio,\n showBadge,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n}: UnorderedListProps): React.JSX.Element {\n const gridClass = getResponsiveGridClass(columns);\n const { onItemClick } = useWidgetInteraction();\n\n return (\n <div className={`grid ${gridClass} gap-${gapValues[gap]}`}>\n {items.map((item) => {\n const imageUrl = getImageUrl(item);\n const aspectRatioClass = getAspectRatioClass(imageAspectRatio);\n\n return (\n <div\n key={item.id}\n className={`relative flex flex-col rounded-${borderRadius === \"full\" ? \"2xl\" : borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...(onItemClick\n ? {\n role: \"button\",\n tabIndex: 0,\n onClick: () => onItemClick(item),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onItemClick(item);\n }\n },\n }\n : {})}\n >\n {showBadge && item.discount && (\n <DiscountBadge discount={item.discount} />\n )}\n {imageUrl && (\n <div className={`w-full ${aspectRatioClass} overflow-hidden`}>\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <ListItemCardContent\n item={item}\n padding={padding}\n itemTitleColor={itemTitleColor}\n itemTitleSize={itemTitleSize}\n descriptionColor={descriptionColor}\n descriptionSize={descriptionSize}\n priceColor={priceColor}\n priceSize={priceSize}\n originalPriceColor={originalPriceColor}\n metaTextColor={metaTextColor}\n metaTextSize={metaTextSize}\n showMetaText={showMetaText}\n />\n </div>\n );\n })}\n </div>\n );\n}\n","import { useRef } from \"react\";\nimport type React from \"react\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { gapValues } from \"../../core/fields\";\nimport { useWidgetInteraction } from \"../../contexts/WidgetInteractionContext\";\nimport { ScrollArrows } from \"../../ui/scroll-arrows\";\nimport {\n ListItemCardContent,\n DiscountBadge,\n getStringValue,\n type ListItem,\n} from \"./ListItemCard\";\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\ntype ScrollAxis = \"horizontal\" | \"vertical\";\n\nconst SCROLL_ITEM_WIDTH = 300;\n\nconst getImageUrl = (item: ListItem): string | undefined => {\n return item.imageUrl || item.image;\n};\n\nconst getAspectRatioClass = (ratio: ImageAspectRatio): string => {\n const ratios = {\n square: \"aspect-square\",\n landscape: \"aspect-video\",\n portrait: \"aspect-[3/4]\",\n };\n return ratios[ratio];\n};\n\nexport interface OrderedListProps {\n items: ListItem[];\n scrollAxis: ScrollAxis;\n gap: GapOptions;\n borderRadius: BorderRadiusOptions;\n imageAspectRatio: ImageAspectRatio;\n showBadge: boolean;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n numberColor: ColorOptions;\n numberSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nconst largeNumberSizes: Record<FontSizeOptions, string> = {\n xs: \"8rem\",\n sm: \"10rem\",\n md: \"12rem\",\n lg: \"14rem\",\n xl: \"16rem\",\n \"2xl\": \"20rem\",\n};\n\nexport function OrderedList({\n items,\n scrollAxis,\n gap,\n borderRadius,\n imageAspectRatio,\n showBadge,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n numberColor,\n numberSize,\n showMetaText,\n}: OrderedListProps): React.JSX.Element | null {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n\n const scrollByAmount = (direction: \"prev\" | \"next\") => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const computedGap = parseFloat(getComputedStyle(container).gap) || 0;\n const scrollAmount = SCROLL_ITEM_WIDTH + computedGap;\n\n container.scrollTo({\n left:\n container.scrollLeft +\n (direction === \"next\" ? scrollAmount : -scrollAmount),\n behavior: \"smooth\",\n });\n };\n\n const { onItemClick } = useWidgetInteraction();\n\n const interactionProps = (item: ListItem) =>\n onItemClick\n ? ({\n role: \"button\" as const,\n tabIndex: 0,\n onClick: () => onItemClick(item),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onItemClick(item);\n }\n },\n } as const)\n : {};\n\n const contentProps = {\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n };\n\n if (scrollAxis === \"horizontal\") {\n return (\n <div className=\"relative overflow-hidden\">\n <div\n ref={scrollContainerRef}\n className={`flex gap-${gapValues[gap]} scrollbar-hide overflow-x-auto overflow-y-hidden scroll-smooth pb-2`}\n >\n {items.map((item, index) => {\n const imageUrl = getImageUrl(item);\n const aspectRatioClass = getAspectRatioClass(imageAspectRatio);\n\n return (\n <div\n key={item.id}\n className={`relative flex w-[300px] flex-shrink-0 flex-col ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...interactionProps(item)}\n >\n <div\n className={`absolute top-0 left-0 text-${numberColor} z-0 leading-none font-bold opacity-20`}\n style={{ fontSize: largeNumberSizes[numberSize] }}\n >\n {index + 1}\n </div>\n\n <div\n className={`relative z-10 ml-20 flex flex-1 flex-col rounded-${borderRadius === \"full\" ? \"2xl\" : borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md`}\n >\n {showBadge && item.discount && (\n <DiscountBadge discount={item.discount} />\n )}\n {imageUrl && (\n <div\n className={`w-full ${aspectRatioClass} overflow-hidden`}\n >\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <ListItemCardContent item={item} {...contentProps} />\n </div>\n </div>\n );\n })}\n </div>\n\n <div className=\"absolute inset-x-0 top-1/2 z-20 flex w-full -translate-y-1/2 items-center justify-between px-8\">\n <ScrollArrows\n onPrevious={() => scrollByAmount(\"prev\")}\n onNext={() => scrollByAmount(\"next\")}\n />\n </div>\n </div>\n );\n }\n\n if (scrollAxis === \"vertical\") {\n return (\n <div className={`flex flex-col gap-${gapValues[gap]}`}>\n {items.map((item, index) => {\n const imageUrl = getImageUrl(item);\n\n return (\n <div\n key={item.id}\n className={`relative flex gap-${gapValues[gap]} rounded-${borderRadius === \"full\" ? \"2xl\" : borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md ${`p-${padding}`} ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...interactionProps(item)}\n >\n <div\n className={`flex-shrink-0 text-${numberColor} text-${numberSize === \"md\" ? \"base\" : numberSize} flex w-16 items-center justify-center font-bold`}\n >\n {index + 1}\n </div>\n {imageUrl && (\n <div className=\"h-24 w-24 flex-shrink-0 overflow-hidden rounded-md\">\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <div className=\"flex-1\">\n <ListItemCardContent item={item} {...contentProps} />\n </div>\n {showBadge && item.discount && (\n <div className=\"bg-destructive text-destructive-foreground absolute top-2 right-2 rounded-md px-2 py-1 text-xs font-bold\">\n {getStringValue(item.discount)}\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n }\n\n return null;\n}\n","import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n BackgroundValue,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n borderWidthClasses,\n borderColorClasses,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getGapField,\n} from \"../core/fields\";\nimport { FeaturedSection } from \"./list-widget/FeaturedSection\";\nimport { UnorderedList } from \"./list-widget/UnorderedList\";\nimport { OrderedList } from \"./list-widget/OrderedList\";\n\nconst DEFAULT_ITEMS: ListItem[] = [];\n\ntype ListItem = {\n id: string;\n image?: string;\n imageUrl?: string;\n videoUrl?: string;\n title?: string;\n description?: string;\n price?: string;\n originalPrice?: string;\n discount?: string;\n qv?: string;\n cv?: string;\n [key: string]: unknown;\n};\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\ntype ListType = \"ordered\" | \"unordered\";\ntype ScrollAxis = \"horizontal\" | \"vertical\";\n\ntype ListWidgetProps = ComponentProps<\"div\"> & {\n // List configuration\n listType?: ListType;\n scrollAxis?: ScrollAxis;\n titleEnabled?: boolean;\n title?: string;\n items?: ListItem[];\n\n // Text styling\n titleColor?: ColorOptions;\n titleSize?: FontSizeOptions;\n itemTitleColor?: ColorOptions;\n itemTitleSize?: FontSizeOptions;\n descriptionColor?: ColorOptions;\n descriptionSize?: FontSizeOptions;\n priceColor?: ColorOptions;\n priceSize?: FontSizeOptions;\n originalPriceColor?: ColorOptions;\n metaTextColor?: ColorOptions;\n metaTextSize?: FontSizeOptions;\n\n // Ordered list styling\n numberColor?: ColorOptions;\n numberSize?: FontSizeOptions;\n\n // Layout\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n gap?: GapOptions;\n columns?: number;\n imageAspectRatio?: ImageAspectRatio;\n background?: BackgroundValue;\n\n // Behavior\n showBadge?: boolean;\n showMetaText?: boolean;\n maxItems?: number;\n\n // Featured section\n showFeaturedSection?: boolean;\n featuredAsset?: string | { [key: string]: unknown };\n featuredTitle?: string;\n featuredSubtitle?: string;\n featuredButtonText?: string;\n featuredButtonUrl?: string;\n featuredSubtitleColor?: ColorOptions;\n featuredSubtitleSize?: FontSizeOptions;\n};\n\nfunction getFeaturedAssetUrl(\n value: string | { [key: string]: unknown } | undefined,\n): { url: string; isVideo: boolean } | undefined {\n if (!value) return undefined;\n\n // Handle string URLs\n if (typeof value === \"string\") {\n const isVideo = /\\.(mp4|webm|ogg|mov)$/i.test(value);\n return { url: value, isVideo };\n }\n\n // Handle ShareableItem objects\n if (typeof value === \"object\") {\n // Check for video URL first\n const videoUrl =\n (value.videoUrl as string) ||\n (value.video_url as string) ||\n (value.url as string);\n if (videoUrl && /\\.(mp4|webm|ogg|mov)$/i.test(videoUrl)) {\n return { url: videoUrl, isVideo: true };\n }\n\n // Fall back to image URL\n const imageUrl =\n (value.imageUrl as string) ||\n (value.image_url as string) ||\n (value.url as string);\n if (imageUrl) {\n return { url: imageUrl, isVideo: false };\n }\n }\n\n return undefined;\n}\n\nexport function ListWidget({\n listType = \"unordered\",\n scrollAxis = \"horizontal\",\n titleEnabled = true,\n title,\n items = DEFAULT_ITEMS,\n titleColor = \"foreground\",\n titleSize = \"lg\",\n itemTitleColor = \"foreground\",\n itemTitleSize = \"sm\",\n descriptionColor = \"foreground\",\n descriptionSize = \"sm\",\n priceColor = \"foreground\",\n priceSize = \"md\",\n originalPriceColor = \"muted\",\n metaTextColor = \"muted\",\n metaTextSize = \"xs\",\n numberColor = \"primary\",\n numberSize = \"2xl\",\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 4,\n gap = \"md\",\n columns = 3,\n imageAspectRatio = \"square\",\n background = { type: \"solid\", color: \"background\" },\n showBadge = true,\n showMetaText = true,\n maxItems = 12,\n showFeaturedSection = false,\n featuredAsset,\n featuredTitle,\n featuredSubtitle,\n featuredButtonText,\n featuredButtonUrl,\n featuredSubtitleColor = \"background\",\n featuredSubtitleSize = \"md\",\n className,\n ...props\n}: ListWidgetProps): React.JSX.Element {\n const displayItems = maxItems ? items.slice(0, maxItems) : items;\n const hasItems = displayItems.length > 0;\n\n const itemStyleProps = {\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n showBadge,\n borderRadius,\n imageAspectRatio,\n gap,\n };\n\n const hasFeaturedAsset = getFeaturedAssetUrl(featuredAsset);\n const shouldShowFeaturedSection = showFeaturedSection && hasFeaturedAsset;\n\n // Background styling\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n\n return (\n <div\n className={`@container bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && title && (\n <h2\n className={`text-${titleColor} text-${titleSize === \"md\" ? \"base\" : titleSize} font-header mb-6 font-bold`}\n >\n {title}\n </h2>\n )}\n {!hasItems ? (\n <div className=\"border-border bg-muted flex items-center justify-center rounded-md border-2 border-dashed py-12 text-center\">\n <p className=\"text-muted\">No items to display</p>\n </div>\n ) : shouldShowFeaturedSection ? (\n <div className=\"flex flex-col gap-4 @lg:flex-row @lg:gap-6\">\n <div className=\"w-full @lg:w-[45%]\">\n <FeaturedSection\n borderRadius={borderRadius}\n titleSize={titleSize}\n featuredTitle={featuredTitle}\n featuredSubtitle={featuredSubtitle}\n featuredButtonText={featuredButtonText}\n featuredButtonUrl={featuredButtonUrl}\n featuredSubtitleColor={featuredSubtitleColor}\n featuredSubtitleSize={featuredSubtitleSize}\n asset={hasFeaturedAsset!}\n />\n </div>\n <div className=\"w-full @lg:w-[55%]\">\n {listType === \"unordered\" ? (\n <UnorderedList\n items={displayItems}\n columns={columns}\n {...itemStyleProps}\n />\n ) : (\n <OrderedList\n items={displayItems}\n scrollAxis={scrollAxis}\n numberColor={numberColor}\n numberSize={numberSize}\n {...itemStyleProps}\n />\n )}\n </div>\n </div>\n ) : listType === \"unordered\" ? (\n <UnorderedList\n items={displayItems}\n columns={columns}\n {...itemStyleProps}\n />\n ) : (\n <OrderedList\n items={displayItems}\n scrollAxis={scrollAxis}\n numberColor={numberColor}\n numberSize={numberSize}\n {...itemStyleProps}\n />\n )}\n </div>\n );\n}\n\nexport const listWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"ListWidget\",\n displayName: \"List\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"items\"],\n fields: [\n // Styling tab - Title group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the list\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"Header text for the list\",\n defaultValue: \"List\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleSize\",\n label: \"Title Font Size\",\n description: \"Size of the list title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the list title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling tab - Design group\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding inside the container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the container and images\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getGapField({\n key: \"gap\",\n label: \"Gap\",\n description: \"Spacing between items\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n type: \"background\",\n defaultValue: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background color or image for the widget\",\n tab: \"styling\",\n group: \"Design\",\n },\n\n // Styling tab - List Configuration group\n {\n key: \"listType\",\n label: \"List Type\",\n type: \"select\",\n description: \"Type of list layout\",\n defaultValue: \"unordered\",\n options: [\n { label: \"Unordered (Grid)\", value: \"unordered\" },\n { label: \"Ordered (Numbered)\", value: \"ordered\" },\n ],\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"maxItems\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of items to display\",\n min: 1,\n max: 100,\n step: 1,\n defaultValue: 12,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"imageAspectRatio\",\n label: \"Image Aspect Ratio\",\n type: \"buttonGroup\",\n description: \"Aspect ratio for item images\",\n defaultValue: \"square\",\n options: [\n { label: \"Square\", value: \"square\" },\n { label: \"Landscape\", value: \"landscape\" },\n { label: \"Portrait\", value: \"portrait\" },\n ],\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"showBadge\",\n label: \"Show Discount Badge\",\n type: \"boolean\",\n description: \"Display discount badge on images\",\n defaultValue: true,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"showMetaText\",\n label: \"Show QV/CV Text\",\n type: \"boolean\",\n description: \"Display QV and CV values\",\n defaultValue: true,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n\n // Styling tab - Unordered List Configuration\n {\n key: \"columns\",\n label: \"Grid Columns\",\n type: \"number\",\n description: \"Number of columns in the grid (unordered list only)\",\n min: 1,\n max: 6,\n step: 1,\n defaultValue: 3,\n tab: \"styling\",\n group: \"Unordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"unordered\" },\n },\n\n // Styling tab - Ordered List Configuration\n {\n key: \"scrollAxis\",\n label: \"Scroll Direction\",\n type: \"select\",\n description: \"Direction for ordered list scrolling\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n },\n getColorField({\n key: \"numberColor\",\n label: \"Number Color\",\n description: \"Color for ordered list numbers\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n }),\n getFontSizeField({\n key: \"numberSize\",\n label: \"Number Font Size\",\n description: \"Size of ordered list numbers\",\n defaultValue: \"2xl\",\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n }),\n\n // Styling tab - Item Styling group\n getColorField({\n key: \"itemTitleColor\",\n label: \"Item Title Color\",\n description: \"Color for item titles\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"itemTitleSize\",\n label: \"Item Title Font Size\",\n description: \"Size of item titles\",\n defaultValue: \"sm\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"descriptionColor\",\n label: \"Description Color\",\n description: \"Color for descriptions\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"descriptionSize\",\n label: \"Description Font Size\",\n description: \"Size of descriptions\",\n defaultValue: \"sm\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator3\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"priceColor\",\n label: \"Price Color\",\n description: \"Color for prices\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"priceSize\",\n label: \"Price Font Size\",\n description: \"Size of prices\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getColorField({\n key: \"originalPriceColor\",\n label: \"Original Price Color\",\n description: \"Color for crossed-out original prices\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator4\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"metaTextColor\",\n label: \"Meta Text Color\",\n description: \"Color for QV/CV text\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"metaTextSize\",\n label: \"Meta Text Font Size\",\n description: \"Size of QV/CV text\",\n defaultValue: \"xs\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n\n // Styling tab - Featured Section group\n {\n key: \"showFeaturedSection\",\n label: \"Show Featured Section\",\n type: \"boolean\",\n description: \"Display a featured content section\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Featured Section\",\n },\n {\n key: \"featuredAsset\",\n label: \"Featured Asset\",\n type: \"resource\",\n description:\n \"Select a single image or video resource for the featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n allowedTypes: [\"Medium\"],\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredTitle\",\n label: \"Featured Title\",\n type: \"text\",\n description: \"Title for featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredSubtitle\",\n label: \"Featured Subtitle\",\n type: \"text\",\n description: \"Subtitle for featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredButtonText\",\n label: \"Featured Button Text\",\n type: \"text\",\n description: \"Text for featured section button\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredButtonUrl\",\n label: \"Featured Button URL\",\n type: \"text\",\n description: \"URL for featured section button\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n getColorField({\n key: \"featuredSubtitleColor\",\n label: \"Featured Subtitle Color\",\n description: \"Color for featured subtitle\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n }),\n getFontSizeField({\n key: \"featuredSubtitleSize\",\n label: \"Featured Subtitle Font Size\",\n description: \"Size of featured subtitle\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n }),\n\n // Data tab - Data Configuration\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n itemConfigSchema: {\n description: \"Configure settings for this list item\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description\",\n rows: 3,\n },\n {\n key: \"price\",\n label: \"Price\",\n type: \"text\",\n description: \"Current price\",\n },\n {\n key: \"originalPrice\",\n label: \"Original Price\",\n type: \"text\",\n description: \"Original price (will be crossed out)\",\n },\n {\n key: \"discount\",\n label: \"Discount Badge\",\n type: \"text\",\n description: \"Discount text (e.g., '40% Off')\",\n },\n {\n key: \"qv\",\n label: \"QV Value\",\n type: \"text\",\n description: \"Qualifying Volume value\",\n },\n {\n key: \"cv\",\n label: \"CV Value\",\n type: \"text\",\n description: \"Commission Volume value\",\n },\n {\n key: \"image\",\n label: \"Image URL\",\n type: \"text\",\n description: \"Custom image URL for this item\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAoBA,SAAgB,gBAAgB,EAC9B,cACA,WACA,eACA,kBACA,oBACA,mBACA,uBACA,sBACA,SAC0C;AAC1C,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,WAAW,gEAAgE;YAD7E;GAGE,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;cACb,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,eAAD;KACE,KAAK,MAAM;KACX,WAAW,MAAM,UAAU,UAAU;KACrC,KAAK,iBAAiB;KACtB,WAAU;KACV,UAAU,MAAM;KAChB,MAAM,MAAM;KACZ,OAAO,MAAM;KACb,UAAU;KACV,CAAA;IACE,CAAA;GAEN,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAK,WAAU,oDAAqD,CAAA;GAEpE,iBAAA,GAAA,kBAAA,MAAC,OAAD;IAAK,WAAU;cAAf;KACG,iBACC,iBAAA,GAAA,kBAAA,KAAC,MAAD;MACE,WAAW,8CAA8C,cAAc,OAAO,SAAS;gBAEtF;MACE,CAAA;KAEN,oBACC,iBAAA,GAAA,kBAAA,KAAC,KAAD;MACE,WAAW,aAAa,sBAAsB,QAAQ,yBAAyB,OAAO,SAAS;gBAE9F;MACC,CAAA;KAEL,sBACC,iBAAA,GAAA,kBAAA,KAAC,KAAD;MACE,MAAM,qBAAqB;MAC3B,WAAW,8FAA8F;gBAExG;MACC,CAAA;KAEF;;GACF;;;;;AClDV,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AAqB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACFC,mBAAAA,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACFC,mBAAAA,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACFC,mBAAAA,YAAY;GACV,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,MAAM;GACN,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR;EAGD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAoB,OAAO;IAAa,EACjD;IAAE,OAAO;IAAsB,OAAO;IAAW,CAClD;GACD,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS;IACP;KAAE,OAAO;KAAU,OAAO;KAAU;IACpC;KAAE,OAAO;KAAa,OAAO;KAAa;IAC1C;KAAE,OAAO;KAAY,OAAO;KAAY;IACzC;GACD,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EAGD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc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ACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACFC,mBAAAA,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACDA,mBAAAA,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACFD,mBAAAA,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aACE;GACF,KAAK;GACL,OAAO;GACP,cAAc,CAAC,SAAS;GACxB,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACDC,mBAAAA,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACFD,mBAAAA,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CACD,kBAAkB;EAChB,aAAa;EACb,QAAQ;GACN;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,MAAM;IACP;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACF;EACF;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListWidget-Ct8IDkio.mjs","names":["DOMPurify","getImageUrl","getAspectRatioClass"],"sources":["../../widgets/src/widgets/list-widget/FeaturedSection.tsx","../../widgets/src/widgets/list-widget/ListItemCard.tsx","../../widgets/src/widgets/list-widget/UnorderedList.tsx","../../widgets/src/widgets/list-widget/OrderedList.tsx","../../widgets/src/widgets/ListWidget.tsx"],"sourcesContent":["import type React from \"react\";\nimport type {\n BorderRadiusOptions,\n FontSizeOptions,\n ColorOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { MediaRenderer } from \"../../components/MediaRenderer\";\n\ninterface FeaturedSectionProps {\n borderRadius: BorderRadiusOptions;\n titleSize: FontSizeOptions;\n featuredTitle?: string | undefined;\n featuredSubtitle?: string | undefined;\n featuredButtonText?: string | undefined;\n featuredButtonUrl?: string | undefined;\n featuredSubtitleColor: ColorOptions;\n featuredSubtitleSize: FontSizeOptions;\n asset: { url: string; isVideo: boolean };\n}\n\nexport function FeaturedSection({\n borderRadius,\n titleSize,\n featuredTitle,\n featuredSubtitle,\n featuredButtonText,\n featuredButtonUrl,\n featuredSubtitleColor,\n featuredSubtitleSize,\n asset,\n}: FeaturedSectionProps): React.JSX.Element {\n return (\n <div\n className={`relative h-full min-h-[300px] w-full overflow-hidden rounded-${borderRadius}`}\n >\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n src={asset.url}\n mediaType={asset.isVideo ? \"video\" : \"image\"}\n alt={featuredTitle || \"Featured\"}\n objectFit=\"cover\"\n autoplay={asset.isVideo}\n loop={asset.isVideo}\n muted={asset.isVideo}\n controls={false}\n />\n </div>\n\n <div className=\"pointer-events-none absolute inset-0 bg-black/40\" />\n\n <div className=\"absolute inset-0 flex flex-col items-start justify-end p-8\">\n {featuredTitle && (\n <h3\n className={`font-header mb-2 font-bold text-white text-${titleSize === \"md\" ? \"base\" : titleSize}`}\n >\n {featuredTitle}\n </h3>\n )}\n {featuredSubtitle && (\n <p\n className={`mb-4 text-${featuredSubtitleColor} text-${featuredSubtitleSize === \"md\" ? \"base\" : featuredSubtitleSize}`}\n >\n {featuredSubtitle}\n </p>\n )}\n {featuredButtonText && (\n <a\n href={featuredButtonUrl || \"#\"}\n className={`text-foreground bg-white px-6 py-2 font-medium transition-opacity hover:opacity-90 rounded-${borderRadius}`}\n >\n {featuredButtonText}\n </a>\n )}\n </div>\n </div>\n );\n}\n","import type React from \"react\";\nimport DOMPurify from \"dompurify\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\n\ntype ListItem = {\n id: string;\n image?: string;\n imageUrl?: string;\n videoUrl?: string;\n title?: string;\n description?: string;\n price?: string;\n display_price?: string;\n originalPrice?: string;\n discount?: string;\n qv?: string;\n cv?: string;\n [key: string]: unknown;\n};\n\nfunction getStringValue(value: unknown): string {\n if (!value) return \"\";\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\") return String(value);\n if (typeof value === \"object\" && value !== null) {\n if (\"body\" in value) {\n const body = (value as { body: unknown }).body;\n if (typeof body === \"string\") return body;\n }\n if (\"text\" in value) {\n const text = (value as { text: unknown }).text;\n if (typeof text === \"string\") return text;\n }\n if (\"value\" in value) {\n const val = (value as { value: unknown }).value;\n if (typeof val === \"string\") return val;\n if (typeof val === \"number\") return String(val);\n }\n }\n return \"\";\n}\n\n/**\n * Strips parenthetical text like \"(USD)\" from price strings.\n * Matches the shop page's stripParentheticalText pattern.\n */\nfunction stripParentheticalText(text: string): string {\n return text.replace(/\\s*\\([^)]*\\)/g, \"\").trim();\n}\n\n/**\n * Formats a price for display. Follows the shop page pattern:\n * prices arrive pre-formatted from the API via display_price\n * (e.g. \"$19.99\", \"€15.00 (EUR)\") so we just extract the string\n * and strip parenthetical suffixes.\n */\nfunction formatPrice(value: unknown): string {\n const str = getStringValue(value);\n if (!str) return \"\";\n return stripParentheticalText(str);\n}\n\nexport interface ListItemCardContentProps {\n item: ListItem;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nexport function ListItemCardContent({\n item,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n}: ListItemCardContentProps): React.JSX.Element {\n return (\n <div className={`flex flex-1 flex-col p-${padding}`}>\n {item.title && (\n <h3\n className={`text-${itemTitleColor} text-${itemTitleSize === \"md\" ? \"base\" : itemTitleSize} font-header mb-1 font-semibold`}\n >\n {getStringValue(item.title)}\n </h3>\n )}\n {item.description && (\n <div\n className={`text-${descriptionColor} text-${descriptionSize === \"md\" ? \"base\" : descriptionSize} mb-2 line-clamp-2 overflow-hidden`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(item.description ?? \"\", {\n ALLOWED_TAGS: [\n \"br\",\n \"strong\",\n \"em\",\n \"b\",\n \"i\",\n \"ul\",\n \"ol\",\n \"li\",\n \"p\",\n ],\n ALLOWED_ATTR: [],\n }),\n }}\n />\n )}\n <div className=\"flex items-center gap-2\">\n {(item.display_price || item.price) && (\n <span\n className={`text-${priceColor} text-${priceSize === \"md\" ? \"base\" : priceSize} font-bold`}\n >\n {formatPrice(item.display_price || item.price)}\n </span>\n )}\n {item.originalPrice && (\n <span\n className={`text-${originalPriceColor} text-${descriptionSize === \"md\" ? \"base\" : descriptionSize} line-through`}\n >\n {formatPrice(item.originalPrice)}\n </span>\n )}\n </div>\n {showMetaText && (item.qv || item.cv) && (\n <div\n className={`mt-2 flex gap-3 text-${metaTextColor} text-${metaTextSize === \"md\" ? \"base\" : metaTextSize}`}\n >\n {item.qv && <span>QV: {getStringValue(item.qv)}</span>}\n {item.cv && <span>CV: {getStringValue(item.cv)}</span>}\n </div>\n )}\n </div>\n );\n}\n\nexport function DiscountBadge({\n discount,\n}: {\n discount: string;\n}): React.JSX.Element {\n return (\n <div className=\"bg-destructive text-destructive-foreground absolute top-2 right-2 z-10 rounded-md px-2 py-1 text-xs font-bold\">\n {getStringValue(discount)}\n </div>\n );\n}\n\nexport { getStringValue };\nexport type { ListItem };\n","import type React from \"react\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { gapValues } from \"../../core/fields\";\nimport { useWidgetInteraction } from \"../../contexts/WidgetInteractionContext\";\nimport {\n ListItemCardContent,\n DiscountBadge,\n type ListItem,\n} from \"./ListItemCard\";\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\n\nconst getImageUrl = (item: ListItem): string | undefined => {\n return item.imageUrl || item.image;\n};\n\nconst getAspectRatioClass = (ratio: ImageAspectRatio): string => {\n const ratios = {\n square: \"aspect-square\",\n landscape: \"aspect-video\",\n portrait: \"aspect-[3/4]\",\n };\n return ratios[ratio];\n};\n\nconst getResponsiveGridClass = (columns: number): string => {\n const responsiveClasses: Record<number, string> = {\n 1: \"grid-cols-2 @lg:grid-cols-1\",\n 2: \"grid-cols-2 @lg:grid-cols-2\",\n 3: \"grid-cols-2 @lg:grid-cols-3\",\n 4: \"grid-cols-2 @lg:grid-cols-4\",\n 5: \"grid-cols-2 @lg:grid-cols-5\",\n 6: \"grid-cols-2 @lg:grid-cols-6\",\n };\n return responsiveClasses[columns] || \"grid-cols-2 @lg:grid-cols-3\";\n};\n\nexport interface UnorderedListProps {\n items: ListItem[];\n columns: number;\n gap: GapOptions;\n borderRadius: BorderRadiusOptions;\n imageAspectRatio: ImageAspectRatio;\n showBadge: boolean;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nexport function UnorderedList({\n items,\n columns,\n gap,\n borderRadius,\n imageAspectRatio,\n showBadge,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n}: UnorderedListProps): React.JSX.Element {\n const gridClass = getResponsiveGridClass(columns);\n const { onItemClick } = useWidgetInteraction();\n\n return (\n <div className={`grid ${gridClass} gap-${gapValues[gap]}`}>\n {items.map((item) => {\n const imageUrl = getImageUrl(item);\n const aspectRatioClass = getAspectRatioClass(imageAspectRatio);\n\n return (\n <div\n key={item.id}\n className={`relative flex flex-col rounded-${borderRadius === \"full\" ? \"2xl\" : borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...(onItemClick\n ? {\n role: \"button\",\n tabIndex: 0,\n onClick: () => onItemClick(item),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onItemClick(item);\n }\n },\n }\n : {})}\n >\n {showBadge && item.discount && (\n <DiscountBadge discount={item.discount} />\n )}\n {imageUrl && (\n <div className={`w-full ${aspectRatioClass} overflow-hidden`}>\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <ListItemCardContent\n item={item}\n padding={padding}\n itemTitleColor={itemTitleColor}\n itemTitleSize={itemTitleSize}\n descriptionColor={descriptionColor}\n descriptionSize={descriptionSize}\n priceColor={priceColor}\n priceSize={priceSize}\n originalPriceColor={originalPriceColor}\n metaTextColor={metaTextColor}\n metaTextSize={metaTextSize}\n showMetaText={showMetaText}\n />\n </div>\n );\n })}\n </div>\n );\n}\n","import { useRef } from \"react\";\nimport type React from \"react\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { gapValues } from \"../../core/fields\";\nimport { useWidgetInteraction } from \"../../contexts/WidgetInteractionContext\";\nimport { ScrollArrows } from \"../../ui/scroll-arrows\";\nimport {\n ListItemCardContent,\n DiscountBadge,\n getStringValue,\n type ListItem,\n} from \"./ListItemCard\";\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\ntype ScrollAxis = \"horizontal\" | \"vertical\";\n\nconst SCROLL_ITEM_WIDTH = 300;\n\nconst getImageUrl = (item: ListItem): string | undefined => {\n return item.imageUrl || item.image;\n};\n\nconst getAspectRatioClass = (ratio: ImageAspectRatio): string => {\n const ratios = {\n square: \"aspect-square\",\n landscape: \"aspect-video\",\n portrait: \"aspect-[3/4]\",\n };\n return ratios[ratio];\n};\n\nexport interface OrderedListProps {\n items: ListItem[];\n scrollAxis: ScrollAxis;\n gap: GapOptions;\n borderRadius: BorderRadiusOptions;\n imageAspectRatio: ImageAspectRatio;\n showBadge: boolean;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n numberColor: ColorOptions;\n numberSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nconst largeNumberSizes: Record<FontSizeOptions, string> = {\n xs: \"8rem\",\n sm: \"10rem\",\n md: \"12rem\",\n lg: \"14rem\",\n xl: \"16rem\",\n \"2xl\": \"20rem\",\n};\n\nexport function OrderedList({\n items,\n scrollAxis,\n gap,\n borderRadius,\n imageAspectRatio,\n showBadge,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n numberColor,\n numberSize,\n showMetaText,\n}: OrderedListProps): React.JSX.Element | null {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n\n const scrollByAmount = (direction: \"prev\" | \"next\") => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const computedGap = parseFloat(getComputedStyle(container).gap) || 0;\n const scrollAmount = SCROLL_ITEM_WIDTH + computedGap;\n\n container.scrollTo({\n left:\n container.scrollLeft +\n (direction === \"next\" ? scrollAmount : -scrollAmount),\n behavior: \"smooth\",\n });\n };\n\n const { onItemClick } = useWidgetInteraction();\n\n const interactionProps = (item: ListItem) =>\n onItemClick\n ? ({\n role: \"button\" as const,\n tabIndex: 0,\n onClick: () => onItemClick(item),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onItemClick(item);\n }\n },\n } as const)\n : {};\n\n const contentProps = {\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n };\n\n if (scrollAxis === \"horizontal\") {\n return (\n <div className=\"relative overflow-hidden\">\n <div\n ref={scrollContainerRef}\n className={`flex gap-${gapValues[gap]} scrollbar-hide overflow-x-auto overflow-y-hidden scroll-smooth pb-2`}\n >\n {items.map((item, index) => {\n const imageUrl = getImageUrl(item);\n const aspectRatioClass = getAspectRatioClass(imageAspectRatio);\n\n return (\n <div\n key={item.id}\n className={`relative flex w-[300px] flex-shrink-0 flex-col ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...interactionProps(item)}\n >\n <div\n className={`absolute top-0 left-0 text-${numberColor} z-0 leading-none font-bold opacity-20`}\n style={{ fontSize: largeNumberSizes[numberSize] }}\n >\n {index + 1}\n </div>\n\n <div\n className={`relative z-10 ml-20 flex flex-1 flex-col rounded-${borderRadius === \"full\" ? \"2xl\" : borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md`}\n >\n {showBadge && item.discount && (\n <DiscountBadge discount={item.discount} />\n )}\n {imageUrl && (\n <div\n className={`w-full ${aspectRatioClass} overflow-hidden`}\n >\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <ListItemCardContent item={item} {...contentProps} />\n </div>\n </div>\n );\n })}\n </div>\n\n <div className=\"absolute inset-x-0 top-1/2 z-20 flex w-full -translate-y-1/2 items-center justify-between px-8\">\n <ScrollArrows\n onPrevious={() => scrollByAmount(\"prev\")}\n onNext={() => scrollByAmount(\"next\")}\n />\n </div>\n </div>\n );\n }\n\n if (scrollAxis === \"vertical\") {\n return (\n <div className={`flex flex-col gap-${gapValues[gap]}`}>\n {items.map((item, index) => {\n const imageUrl = getImageUrl(item);\n\n return (\n <div\n key={item.id}\n className={`relative flex gap-${gapValues[gap]} rounded-${borderRadius === \"full\" ? \"2xl\" : borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md ${`p-${padding}`} ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...interactionProps(item)}\n >\n <div\n className={`flex-shrink-0 text-${numberColor} text-${numberSize === \"md\" ? \"base\" : numberSize} flex w-16 items-center justify-center font-bold`}\n >\n {index + 1}\n </div>\n {imageUrl && (\n <div className=\"h-24 w-24 flex-shrink-0 overflow-hidden rounded-md\">\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <div className=\"flex-1\">\n <ListItemCardContent item={item} {...contentProps} />\n </div>\n {showBadge && item.discount && (\n <div className=\"bg-destructive text-destructive-foreground absolute top-2 right-2 rounded-md px-2 py-1 text-xs font-bold\">\n {getStringValue(item.discount)}\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n }\n\n return null;\n}\n","import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n BackgroundValue,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n borderWidthClasses,\n borderColorClasses,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getGapField,\n} from \"../core/fields\";\nimport { FeaturedSection } from \"./list-widget/FeaturedSection\";\nimport { UnorderedList } from \"./list-widget/UnorderedList\";\nimport { OrderedList } from \"./list-widget/OrderedList\";\n\nconst DEFAULT_ITEMS: ListItem[] = [];\n\ntype ListItem = {\n id: string;\n image?: string;\n imageUrl?: string;\n videoUrl?: string;\n title?: string;\n description?: string;\n price?: string;\n originalPrice?: string;\n discount?: string;\n qv?: string;\n cv?: string;\n [key: string]: unknown;\n};\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\ntype ListType = \"ordered\" | \"unordered\";\ntype ScrollAxis = \"horizontal\" | \"vertical\";\n\ntype ListWidgetProps = ComponentProps<\"div\"> & {\n // List configuration\n listType?: ListType;\n scrollAxis?: ScrollAxis;\n titleEnabled?: boolean;\n title?: string;\n items?: ListItem[];\n\n // Text styling\n titleColor?: ColorOptions;\n titleSize?: FontSizeOptions;\n itemTitleColor?: ColorOptions;\n itemTitleSize?: FontSizeOptions;\n descriptionColor?: ColorOptions;\n descriptionSize?: FontSizeOptions;\n priceColor?: ColorOptions;\n priceSize?: FontSizeOptions;\n originalPriceColor?: ColorOptions;\n metaTextColor?: ColorOptions;\n metaTextSize?: FontSizeOptions;\n\n // Ordered list styling\n numberColor?: ColorOptions;\n numberSize?: FontSizeOptions;\n\n // Layout\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n gap?: GapOptions;\n columns?: number;\n imageAspectRatio?: ImageAspectRatio;\n background?: BackgroundValue;\n\n // Behavior\n showBadge?: boolean;\n showMetaText?: boolean;\n maxItems?: number;\n\n // Featured section\n showFeaturedSection?: boolean;\n featuredAsset?: string | { [key: string]: unknown };\n featuredTitle?: string;\n featuredSubtitle?: string;\n featuredButtonText?: string;\n featuredButtonUrl?: string;\n featuredSubtitleColor?: ColorOptions;\n featuredSubtitleSize?: FontSizeOptions;\n};\n\nfunction getFeaturedAssetUrl(\n value: string | { [key: string]: unknown } | undefined,\n): { url: string; isVideo: boolean } | undefined {\n if (!value) return undefined;\n\n // Handle string URLs\n if (typeof value === \"string\") {\n const isVideo = /\\.(mp4|webm|ogg|mov)$/i.test(value);\n return { url: value, isVideo };\n }\n\n // Handle ShareableItem objects\n if (typeof value === \"object\") {\n // Check for video URL first\n const videoUrl =\n (value.videoUrl as string) ||\n (value.video_url as string) ||\n (value.url as string);\n if (videoUrl && /\\.(mp4|webm|ogg|mov)$/i.test(videoUrl)) {\n return { url: videoUrl, isVideo: true };\n }\n\n // Fall back to image URL\n const imageUrl =\n (value.imageUrl as string) ||\n (value.image_url as string) ||\n (value.url as string);\n if (imageUrl) {\n return { url: imageUrl, isVideo: false };\n }\n }\n\n return undefined;\n}\n\nexport function ListWidget({\n listType = \"unordered\",\n scrollAxis = \"horizontal\",\n titleEnabled = true,\n title,\n items = DEFAULT_ITEMS,\n titleColor = \"foreground\",\n titleSize = \"lg\",\n itemTitleColor = \"foreground\",\n itemTitleSize = \"sm\",\n descriptionColor = \"foreground\",\n descriptionSize = \"sm\",\n priceColor = \"foreground\",\n priceSize = \"md\",\n originalPriceColor = \"muted\",\n metaTextColor = \"muted\",\n metaTextSize = \"xs\",\n numberColor = \"primary\",\n numberSize = \"2xl\",\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 4,\n gap = \"md\",\n columns = 3,\n imageAspectRatio = \"square\",\n background = { type: \"solid\", color: \"background\" },\n showBadge = true,\n showMetaText = true,\n maxItems = 12,\n showFeaturedSection = false,\n featuredAsset,\n featuredTitle,\n featuredSubtitle,\n featuredButtonText,\n featuredButtonUrl,\n featuredSubtitleColor = \"background\",\n featuredSubtitleSize = \"md\",\n className,\n ...props\n}: ListWidgetProps): React.JSX.Element {\n const displayItems = maxItems ? items.slice(0, maxItems) : items;\n const hasItems = displayItems.length > 0;\n\n const itemStyleProps = {\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n showBadge,\n borderRadius,\n imageAspectRatio,\n gap,\n };\n\n const hasFeaturedAsset = getFeaturedAssetUrl(featuredAsset);\n const shouldShowFeaturedSection = showFeaturedSection && hasFeaturedAsset;\n\n // Background styling\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n\n return (\n <div\n className={`@container bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && title && (\n <h2\n className={`text-${titleColor} text-${titleSize === \"md\" ? \"base\" : titleSize} font-header mb-6 font-bold`}\n >\n {title}\n </h2>\n )}\n {!hasItems ? (\n <div className=\"border-border bg-muted flex items-center justify-center rounded-md border-2 border-dashed py-12 text-center\">\n <p className=\"text-muted\">No items to display</p>\n </div>\n ) : shouldShowFeaturedSection ? (\n <div className=\"flex flex-col gap-4 @lg:flex-row @lg:gap-6\">\n <div className=\"w-full @lg:w-[45%]\">\n <FeaturedSection\n borderRadius={borderRadius}\n titleSize={titleSize}\n featuredTitle={featuredTitle}\n featuredSubtitle={featuredSubtitle}\n featuredButtonText={featuredButtonText}\n featuredButtonUrl={featuredButtonUrl}\n featuredSubtitleColor={featuredSubtitleColor}\n featuredSubtitleSize={featuredSubtitleSize}\n asset={hasFeaturedAsset!}\n />\n </div>\n <div className=\"w-full @lg:w-[55%]\">\n {listType === \"unordered\" ? (\n <UnorderedList\n items={displayItems}\n columns={columns}\n {...itemStyleProps}\n />\n ) : (\n <OrderedList\n items={displayItems}\n scrollAxis={scrollAxis}\n numberColor={numberColor}\n numberSize={numberSize}\n {...itemStyleProps}\n />\n )}\n </div>\n </div>\n ) : listType === \"unordered\" ? (\n <UnorderedList\n items={displayItems}\n columns={columns}\n {...itemStyleProps}\n />\n ) : (\n <OrderedList\n items={displayItems}\n scrollAxis={scrollAxis}\n numberColor={numberColor}\n numberSize={numberSize}\n {...itemStyleProps}\n />\n )}\n </div>\n );\n}\n\nexport const listWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"ListWidget\",\n displayName: \"List\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"items\"],\n fields: [\n // Styling tab - Title group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the list\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"Header text for the list\",\n defaultValue: \"List\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleSize\",\n label: \"Title Font Size\",\n description: \"Size of the list title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the list title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling tab - Design group\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding inside the container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the container and images\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getGapField({\n key: \"gap\",\n label: \"Gap\",\n description: \"Spacing between items\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n type: \"background\",\n defaultValue: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background color or image for the widget\",\n tab: \"styling\",\n group: \"Design\",\n },\n\n // Styling tab - List Configuration group\n {\n key: \"listType\",\n label: \"List Type\",\n type: \"select\",\n description: \"Type of list layout\",\n defaultValue: \"unordered\",\n options: [\n { label: \"Unordered (Grid)\", value: \"unordered\" },\n { label: \"Ordered (Numbered)\", value: \"ordered\" },\n ],\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"maxItems\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of items to display\",\n min: 1,\n max: 100,\n step: 1,\n defaultValue: 12,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"imageAspectRatio\",\n label: \"Image Aspect Ratio\",\n type: \"buttonGroup\",\n description: \"Aspect ratio for item images\",\n defaultValue: \"square\",\n options: [\n { label: \"Square\", value: \"square\" },\n { label: \"Landscape\", value: \"landscape\" },\n { label: \"Portrait\", value: \"portrait\" },\n ],\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"showBadge\",\n label: \"Show Discount Badge\",\n type: \"boolean\",\n description: \"Display discount badge on images\",\n defaultValue: true,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"showMetaText\",\n label: \"Show QV/CV Text\",\n type: \"boolean\",\n description: \"Display QV and CV values\",\n defaultValue: true,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n\n // Styling tab - Unordered List Configuration\n {\n key: \"columns\",\n label: \"Grid Columns\",\n type: \"number\",\n description: \"Number of columns in the grid (unordered list only)\",\n min: 1,\n max: 6,\n step: 1,\n defaultValue: 3,\n tab: \"styling\",\n group: \"Unordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"unordered\" },\n },\n\n // Styling tab - Ordered List Configuration\n {\n key: \"scrollAxis\",\n label: \"Scroll Direction\",\n type: \"select\",\n description: \"Direction for ordered list scrolling\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n },\n getColorField({\n key: \"numberColor\",\n label: \"Number Color\",\n description: \"Color for ordered list numbers\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n }),\n getFontSizeField({\n key: \"numberSize\",\n label: \"Number Font Size\",\n description: \"Size of ordered list numbers\",\n defaultValue: \"2xl\",\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n }),\n\n // Styling tab - Item Styling group\n getColorField({\n key: \"itemTitleColor\",\n label: \"Item Title Color\",\n description: \"Color for item titles\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"itemTitleSize\",\n label: \"Item Title Font Size\",\n description: \"Size of item titles\",\n defaultValue: \"sm\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"descriptionColor\",\n label: \"Description Color\",\n description: \"Color for descriptions\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"descriptionSize\",\n label: \"Description Font Size\",\n description: \"Size of descriptions\",\n defaultValue: \"sm\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator3\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"priceColor\",\n label: \"Price Color\",\n description: \"Color for prices\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"priceSize\",\n label: \"Price Font Size\",\n description: \"Size of prices\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getColorField({\n key: \"originalPriceColor\",\n label: \"Original Price Color\",\n description: \"Color for crossed-out original prices\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator4\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"metaTextColor\",\n label: \"Meta Text Color\",\n description: \"Color for QV/CV text\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"metaTextSize\",\n label: \"Meta Text Font Size\",\n description: \"Size of QV/CV text\",\n defaultValue: \"xs\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n\n // Styling tab - Featured Section group\n {\n key: \"showFeaturedSection\",\n label: \"Show Featured Section\",\n type: \"boolean\",\n description: \"Display a featured content section\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Featured Section\",\n },\n {\n key: \"featuredAsset\",\n label: \"Featured Asset\",\n type: \"resource\",\n description:\n \"Select a single image or video resource for the featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n allowedTypes: [\"Medium\"],\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredTitle\",\n label: \"Featured Title\",\n type: \"text\",\n description: \"Title for featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredSubtitle\",\n label: \"Featured Subtitle\",\n type: \"text\",\n description: \"Subtitle for featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredButtonText\",\n label: \"Featured Button Text\",\n type: \"text\",\n description: \"Text for featured section button\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredButtonUrl\",\n label: \"Featured Button URL\",\n type: \"text\",\n description: \"URL for featured section button\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n getColorField({\n key: \"featuredSubtitleColor\",\n label: \"Featured Subtitle Color\",\n description: \"Color for featured subtitle\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n }),\n getFontSizeField({\n key: \"featuredSubtitleSize\",\n label: \"Featured Subtitle Font Size\",\n description: \"Size of featured subtitle\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n }),\n\n // Data tab - Data Configuration\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n itemConfigSchema: {\n description: \"Configure settings for this list item\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description\",\n rows: 3,\n },\n {\n key: \"price\",\n label: \"Price\",\n type: \"text\",\n description: \"Current price\",\n },\n {\n key: \"originalPrice\",\n label: \"Original Price\",\n type: \"text\",\n description: \"Original price (will be crossed out)\",\n },\n {\n key: \"discount\",\n label: \"Discount Badge\",\n type: \"text\",\n description: \"Discount text (e.g., '40% Off')\",\n },\n {\n key: \"qv\",\n label: \"QV Value\",\n type: \"text\",\n description: \"Qualifying Volume value\",\n },\n {\n key: \"cv\",\n label: \"CV Value\",\n type: \"text\",\n description: \"Commission Volume value\",\n },\n {\n key: \"image\",\n label: \"Image URL\",\n type: \"text\",\n description: \"Custom image URL for this item\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAoBA,SAAgB,gBAAgB,EAC9B,cACA,WACA,eACA,kBACA,oBACA,mBACA,uBACA,sBACA,SAC0C;AAC1C,QACE,qBAAC,OAAD;EACE,WAAW,gEAAgE;YAD7E;GAGE,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,eAAD;KACE,KAAK,MAAM;KACX,WAAW,MAAM,UAAU,UAAU;KACrC,KAAK,iBAAiB;KACtB,WAAU;KACV,UAAU,MAAM;KAChB,MAAM,MAAM;KACZ,OAAO,MAAM;KACb,UAAU;KACV,CAAA;IACE,CAAA;GAEN,oBAAC,OAAD,EAAK,WAAU,oDAAqD,CAAA;GAEpE,qBAAC,OAA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AAQ;EAEN;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF,gBAAgB;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,qBAAqB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,YAAY;GACV,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,MAAM;GACN,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR;EAGD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAoB,OAAO;IAAa,EACjD;IAAE,OAAO;IAAsB,OAAO;IAAW,CAClD;GACD,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;G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ACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aACE;GACF,KAAK;GACL,OAAO;GACP,cAAc,CAAC,SAAS;GACxB,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CACD,kBAAkB;EAChB,aAAa;EACb,QAAQ;GACN;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,MAAM;IACP;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACF;EACF;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MySiteScreen-B1L8coGs.cjs","names":["Card","CardHeader","CardTitle","CardContent","Eye","Separator","Users","Card","CardHeader","CardTitle","CardAction","Button","CardContent","Copy","Card","CardHeader","Button","CardContent","LoaderCircle","Button","ArrowLeft","Card","CardContent","cn","Palette","Check","z","z","buttonSchema","z","z","CSS","GripVertical","Button","Pencil","Trash2","usePortalLinks","usePortalCreateLink","usePortalUpdateLink","usePortalDeleteLink","usePortalReorderLinks","useZodForm","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","ArrowLeft","Plus","Skeleton","Card","DndContext","closestCenter","SortableContext","verticalListSortingStrategy","Dialog","DialogContent","DialogHeader","DialogTitle","Label","Input","DialogFooter","CSS","GripVertical","Button","Trash2","usePortalFavorites","usePortalDeleteFavorite","usePortalReorderFavorites","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","ArrowLeft","Skeleton","Card","DndContext","closestCenter","SortableContext","verticalListSortingStrategy","Dialog","DialogContent","DialogHeader","DialogTitle","DialogFooter","usePortalMySiteProfile","usePortalUpdateProfile","ArrowLeft","Card","Button","Camera","CardContent","Label","Input","Textarea","User","Palette","LayoutGrid","Link2","usePortalMySiteProfile","usePortalMySiteThemes","usePortalUpdateSettings","ChevronRight","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator"],"sources":["../../../mysite/ui/src/portal/components/animation-utils.ts","../../../mysite/ui/src/portal/components/VisitorDetailsCard.tsx","../../../mysite/ui/src/portal/components/MySiteLinkCard.tsx","../../../mysite/ui/src/portal/components/PhonePreview.tsx","../../../mysite/ui/src/portal/components/ThemeEditor.tsx","../../../mysite/ui/src/shared/schemas/mysite.schema.ts","../../../mysite/ui/src/shared/schemas/mysite-theme.schema.ts","../../../mysite/ui/src/shared/utils.ts","../../../mysite/ui/src/portal/components/ButtonsEditor.tsx","../../../mysite/ui/src/portal/components/PortalButtonsEditor.tsx","../../../mysite/ui/src/portal/components/PortalFavoritesEditor.tsx","../../../mysite/ui/src/portal/components/MySiteProfileForm.tsx","../src/screens/MySiteScreen/MySiteMainView.tsx","../src/screens/MySiteScreen/use-mysite-editing-section.ts","../src/screens/MySiteScreen/index.tsx"],"sourcesContent":["import type { AnimPhase } from \"./types\";\n\n// Tailwind className helpers for the MySite main → editor slide/fade.\n//\n// The slide transform (`translate-x-[50%]` / `-translate-x-[200%]`) is only\n// meaningful in the 2/3 + 1/3 wide layout where the content + preview columns\n// sit side-by-side. Below the `2xl` breakpoint the preview column stacks below\n// the content column, so we gate the transform classes with `2xl:` — otherwise\n// the content slides off-screen on narrower viewports. Opacity and transition\n// timings still run at all breakpoints so sections still fade in and out.\n\nexport function getContentClassName(phase: AnimPhase): string {\n switch (phase) {\n case \"idle\":\n return \"opacity-100 transition-none\";\n case \"fade-out\":\n return \"opacity-0 transition-opacity duration-300 ease-in-out\";\n case \"slide\":\n return \"opacity-0 2xl:translate-x-[50%] transition-transform duration-500 ease-in-out\";\n case \"fade-in\":\n return \"opacity-100 2xl:translate-x-[50%] transition-opacity duration-300 ease-in-out\";\n case \"editing\":\n return \"opacity-100 2xl:translate-x-[50%] transition-none\";\n case \"exit-fade-out\":\n return \"opacity-0 2xl:translate-x-[50%] transition-opacity duration-300 ease-in-out\";\n case \"exit-slide\":\n return \"opacity-0 transition-transform duration-500 ease-in-out\";\n case \"exit-fade-in\":\n return \"opacity-100 transition-opacity duration-300 ease-in-out\";\n }\n}\n\nexport function getPreviewClassName(phase: AnimPhase): string {\n switch (phase) {\n case \"idle\":\n case \"fade-out\":\n case \"exit-fade-in\":\n return \"transition-none\";\n case \"slide\":\n return \"2xl:-translate-x-[200%] transition-transform duration-500 ease-in-out\";\n case \"fade-in\":\n case \"editing\":\n case \"exit-fade-out\":\n return \"2xl:-translate-x-[200%] transition-none\";\n case \"exit-slide\":\n return \"transition-transform duration-500 ease-in-out\";\n }\n}\n","import { Eye, Users } from \"lucide-react\";\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Separator,\n} from \"@fluid-app/ui-primitives\";\n\nexport function MySiteVisitorDetailsCard({\n views,\n leads,\n}: {\n views: number;\n leads: number;\n}): React.JSX.Element {\n return (\n <Card className=\"h-auto gap-0 py-0 shadow-none\">\n <CardHeader className=\"p-4 pb-3\">\n <CardTitle className=\"text-sm\">Visitor Details</CardTitle>\n </CardHeader>\n <CardContent className=\"flex px-4 pb-4\">\n <div className=\"flex-1\">\n <div className=\"mb-2 flex items-center gap-1.5\">\n <Eye className=\"text-muted-foreground h-3.5 w-3.5\" />\n <span className=\"text-muted-foreground text-sm\">Views</span>\n </div>\n <p className=\"text-foreground text-2xl font-bold\">\n {views.toLocaleString()}\n </p>\n </div>\n <Separator orientation=\"vertical\" className=\"bg-border mx-4 h-auto\" />\n <div className=\"flex-1\">\n <div className=\"mb-2 flex items-center gap-1.5\">\n <Users className=\"text-muted-foreground h-3.5 w-3.5\" />\n <span className=\"text-muted-foreground text-sm\">Leads</span>\n </div>\n <p className=\"text-foreground text-2xl font-bold\">\n {leads.toLocaleString()}\n </p>\n </div>\n </CardContent>\n </Card>\n );\n}\n","import { useCallback, useState } from \"react\";\nimport { Copy } from \"lucide-react\";\nimport {\n Button,\n Card,\n CardAction,\n CardContent,\n CardHeader,\n CardTitle,\n} from \"@fluid-app/ui-primitives\";\n\nexport function MySiteLinkCard({\n mysiteUrl,\n displayUrl,\n onUpdateSlug,\n onToast,\n}: {\n mysiteUrl: string;\n displayUrl: string;\n onUpdateSlug?: (slug: string) => Promise<void>;\n onToast?: (message: string, type: \"success\" | \"error\") => void;\n}): React.JSX.Element {\n const lastSlashIndex = displayUrl.lastIndexOf(\"/\");\n const urlPrefix =\n lastSlashIndex >= 0 ? displayUrl.slice(0, lastSlashIndex + 1) : \"\";\n const currentSlug =\n lastSlashIndex >= 0 ? displayUrl.slice(lastSlashIndex + 1) : displayUrl;\n\n const [isEditingLink, setIsEditingLink] = useState(false);\n const [linkSlugInput, setLinkSlugInput] = useState(currentSlug);\n const [isSaving, setIsSaving] = useState(false);\n\n const handleEditLink = useCallback(() => {\n setLinkSlugInput(currentSlug);\n setIsEditingLink(true);\n }, [currentSlug]);\n\n const handleCancelEditLink = useCallback(() => {\n setIsEditingLink(false);\n setLinkSlugInput(currentSlug);\n }, [currentSlug]);\n\n const handleSaveLink = useCallback(async () => {\n const trimmed = linkSlugInput.trim();\n if (!trimmed) {\n onToast?.(\"Slug cannot be empty\", \"error\");\n return;\n }\n if (trimmed === currentSlug) {\n setIsEditingLink(false);\n return;\n }\n if (!onUpdateSlug) return;\n setIsSaving(true);\n try {\n await onUpdateSlug(trimmed);\n onToast?.(\"MySite link updated\", \"success\");\n setIsEditingLink(false);\n } catch {\n onToast?.(\"Failed to update link\", \"error\");\n } finally {\n setIsSaving(false);\n }\n }, [linkSlugInput, currentSlug, onUpdateSlug, onToast]);\n\n const handleCopyLink = useCallback(async () => {\n if (!mysiteUrl) return;\n try {\n await navigator.clipboard.writeText(mysiteUrl);\n onToast?.(\"Link copied to clipboard\", \"success\");\n } catch {\n onToast?.(\"Failed to copy link\", \"error\");\n }\n }, [mysiteUrl, onToast]);\n\n return (\n <Card className=\"h-auto gap-0 py-0 shadow-none\">\n <CardHeader className=\"items-center p-4\">\n <CardTitle className=\"text-sm\">Your MySite Link</CardTitle>\n {!isEditingLink && onUpdateSlug && (\n <CardAction>\n <Button variant=\"link\" size=\"sm\" onClick={handleEditLink}>\n Edit Link\n </Button>\n </CardAction>\n )}\n </CardHeader>\n <CardContent className=\"px-4 pb-4\">\n <div className=\"text-foreground flex items-center gap-2 rounded-lg border bg-gradient-to-r from-[rgba(72,187,120,0.2)] via-[rgba(236,72,153,0.15)] to-[rgba(251,146,60,0.15)] px-3 py-2.5\">\n {isEditingLink ? (\n <>\n <span className=\"shrink-0 text-sm\">{urlPrefix}</span>\n <input\n type=\"text\"\n value={linkSlugInput}\n onChange={(e) => setLinkSlugInput(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" && !isSaving) handleSaveLink();\n if (e.key === \"Escape\") handleCancelEditLink();\n }}\n className=\"border-input text-foreground focus:ring-primary bg-background/60 min-w-0 flex-1 rounded-md border px-2 py-1 text-sm font-medium outline-none focus:ring-1\"\n autoFocus\n />\n </>\n ) : (\n <span className=\"min-w-0 flex-1 truncate text-sm\">\n {displayUrl || \"Not configured\"}\n </span>\n )}\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={handleCopyLink}\n disabled={!mysiteUrl}\n >\n <Copy className=\"h-4 w-4\" />\n </Button>\n </div>\n\n <div\n className=\"grid transition-all duration-300 ease-in-out\"\n style={{\n gridTemplateRows: isEditingLink ? \"1fr\" : \"0fr\",\n opacity: isEditingLink ? 1 : 0,\n marginTop: isEditingLink ? 12 : 0,\n }}\n >\n <div className=\"overflow-hidden\">\n <div className=\"flex justify-end gap-2\">\n <Button\n variant=\"secondary\"\n size=\"sm\"\n onClick={handleCancelEditLink}\n >\n Cancel\n </Button>\n <Button size=\"sm\" onClick={handleSaveLink} disabled={isSaving}>\n {isSaving ? \"Saving...\" : \"Save\"}\n </Button>\n </div>\n </div>\n </div>\n </CardContent>\n </Card>\n );\n}\n","import { useEffect, useRef } from \"react\";\nimport { LoaderCircle } from \"lucide-react\";\nimport {\n Button,\n Card,\n CardContent,\n CardHeader,\n} from \"@fluid-app/ui-primitives\";\n\nexport function MySitePhonePreview({\n mysiteUrl,\n themeName,\n previewKey,\n isUpdating,\n onPreview,\n}: {\n mysiteUrl: string;\n themeName: string;\n previewKey: number;\n isUpdating: boolean;\n onPreview: () => void;\n}): React.JSX.Element {\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const previewSrc = `${mysiteUrl}?preview=true`;\n const isInitialLoadRef = useRef(true);\n\n useEffect(() => {\n isInitialLoadRef.current = true;\n }, [previewKey]);\n\n const handleIframeLoad = () => {\n if (isInitialLoadRef.current) {\n isInitialLoadRef.current = false;\n return;\n }\n const iframe = iframeRef.current;\n if (!iframe) return;\n isInitialLoadRef.current = true;\n iframe.src = previewSrc;\n };\n\n return (\n <Card className=\"items-center gap-4 py-5\">\n <CardHeader className=\"w-full items-center px-5\">\n <div>\n <p className=\"text-muted-foreground text-xs\">Current Theme</p>\n <p className=\"text-foreground text-sm font-semibold\">{themeName}</p>\n </div>\n <Button\n className=\"col-start-2 row-span-2 row-start-1 cursor-pointer self-center justify-self-end\"\n variant=\"secondary\"\n size=\"sm\"\n onClick={onPreview}\n disabled={!mysiteUrl}\n >\n Preview\n </Button>\n </CardHeader>\n\n <CardContent className=\"relative mx-auto my-auto w-[260px] px-0 sm:w-[320px]\">\n <div className=\"overflow-hidden rounded-[32px] border-[6px] border-[#1e2939] bg-[#1e2939] shadow-xl sm:rounded-[40px] sm:border-[8px]\">\n <div className=\"flex items-center justify-between bg-[#101828] px-5 py-1 sm:px-6 sm:py-1.5\">\n <span className=\"text-[10px] font-medium text-[#ffffff] sm:text-[11px]\">\n 9:41\n </span>\n <div className=\"flex items-center gap-1\">\n <div className=\"h-2 w-2 rounded-full bg-[#ffffff60] sm:h-2.5 sm:w-2.5\" />\n <div className=\"h-2 w-3.5 rounded-sm bg-[#ffffff60] sm:h-2.5 sm:w-4\" />\n </div>\n </div>\n\n <div\n className=\"relative h-[490px] overflow-y-auto bg-[#ffffff] sm:h-[600px]\"\n style={{ scrollbarWidth: \"none\" }}\n aria-busy={isUpdating}\n >\n {mysiteUrl ? (\n <>\n <iframe\n ref={iframeRef}\n key={previewKey}\n className=\"h-full w-full origin-top-left bg-[#ffffff]\"\n src={previewSrc}\n title=\"MySite Preview\"\n tabIndex={-1}\n // allow-scripts + allow-same-origin is a known sandbox escape\n // hatch: if iframe and parent share an origin, scripts can\n // strip the sandbox attribute. Safe here because mysite is\n // hosted on a different origin than portal.\n sandbox=\"allow-scripts allow-same-origin\"\n onLoad={handleIframeLoad}\n />\n {isUpdating && (\n <div className=\"absolute inset-0 flex items-center justify-center bg-white/60\">\n <LoaderCircle className=\"text-muted-foreground h-6 w-6 animate-spin\" />\n </div>\n )}\n </>\n ) : (\n <div className=\"flex h-full items-center justify-center\">\n <p className=\"text-muted-foreground text-sm\">\n No site configured\n </p>\n </div>\n )}\n </div>\n </div>\n\n <div className=\"absolute bottom-1.5 left-1/2 h-1 w-24 -translate-x-1/2 rounded-full bg-white sm:bottom-2 sm:w-28\" />\n </CardContent>\n </Card>\n );\n}\n","import { ArrowLeft, Check, Palette } from \"lucide-react\";\nimport { Button, Card, CardContent, cn } from \"@fluid-app/ui-primitives\";\n\n/** Minimal theme shape accepted by ThemeEditor.\n * Compatible with both core MySiteTheme (preview_url) and legacy MysiteTheme (image_url). */\nexport interface ThemeDisplayItem {\n id: number;\n name: string;\n preview_url?: string | null;\n image_url?: string | null;\n}\n\nexport function MySiteThemeEditor<T extends ThemeDisplayItem>({\n themes,\n selectedThemeId,\n onSelectTheme,\n isPending,\n onBack,\n}: {\n themes: T[];\n selectedThemeId: number | null;\n onSelectTheme: (theme: T) => void;\n isPending: boolean;\n onBack: () => void;\n}): React.JSX.Element {\n return (\n <>\n <div className=\"flex items-center gap-3\">\n <Button variant=\"ghost\" size=\"icon\" onClick={onBack}>\n <ArrowLeft className=\"h-4 w-4\" />\n </Button>\n <h1 className=\"text-foreground text-xl font-bold\">Choose a Theme</h1>\n </div>\n\n {themes.length === 0 ? (\n <Card>\n <CardContent className=\"py-8 text-center\">\n <p className=\"text-muted-foreground\">No themes available</p>\n </CardContent>\n </Card>\n ) : (\n <div className=\"grid grid-cols-2 gap-4 sm:grid-cols-3\">\n {themes.map((theme) => {\n const isSelected = theme.id === selectedThemeId;\n const imageUrl = theme.preview_url ?? theme.image_url;\n return (\n <button\n key={theme.id}\n type=\"button\"\n onClick={() => onSelectTheme(theme)}\n className={cn(\n \"group focus:ring-primary relative overflow-hidden rounded-lg border-2 transition-all focus:ring-2 focus:ring-offset-2 focus:outline-none\",\n isSelected\n ? \"border-primary ring-primary ring-2\"\n : \"border-border hover:border-muted-foreground/50\",\n )}\n aria-pressed={isSelected}\n disabled={isPending}\n >\n <div className=\"bg-muted relative aspect-[4/3] w-full\">\n {imageUrl ? (\n <img\n src={imageUrl}\n alt={theme.name}\n loading=\"lazy\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n />\n ) : (\n <div className=\"text-muted-foreground/50 flex h-full w-full items-center justify-center\">\n <Palette className=\"h-8 w-8\" />\n </div>\n )}\n {isSelected && (\n <div className=\"bg-primary/20 absolute inset-0 flex items-center justify-center\">\n <div className=\"bg-primary text-primary-foreground flex h-8 w-8 items-center justify-center rounded-full\">\n <Check className=\"h-5 w-5\" />\n </div>\n </div>\n )}\n {!isSelected && (\n <div className=\"absolute inset-0 bg-black/0 transition-colors group-hover:bg-black/10 dark:group-hover:bg-white/10\" />\n )}\n </div>\n <div className=\"bg-card p-2\">\n <p\n className={cn(\n \"truncate text-sm font-medium\",\n isSelected ? \"text-primary\" : \"text-foreground\",\n )}\n >\n {theme.name}\n </p>\n </div>\n </button>\n );\n })}\n </div>\n )}\n </>\n );\n}\n","import { z } from \"zod\";\n\n// User Links (Buttons)\nexport const linkSchema = z.object({\n id: z.number(),\n url: z.string(),\n text: z.string(),\n order: z.number(),\n clicks: z.number().optional().default(0),\n});\n\nexport const linksResponseSchema = z.array(linkSchema);\n\nexport type MySiteLink = z.infer<typeof linkSchema>;\n\n// Favorites\nexport const favoriteableSchema = z\n .object({\n id: z.number(),\n title: z.string().nullable().optional(),\n name: z.string().nullable().optional(),\n image_url: z.string().nullable().optional(),\n type: z.string().optional(),\n })\n .passthrough();\n\nexport const favoriteSchema = z\n .object({\n id: z.number(),\n favoriteable_id: z.number().optional(),\n favoriteable_type: z.string(),\n order: z.number(),\n user_company_id: z.number().optional(),\n created_at: z.string().optional(),\n favoriteable: favoriteableSchema.nullable(),\n })\n .passthrough();\n\nexport const favoritesResponseSchema = z.array(favoriteSchema);\n\nexport type MySiteFavorite = z.infer<typeof favoriteSchema>;\n\n// MySite Update\nexport const mysiteUpdateResponseSchema = z\n .object({\n id: z.number(),\n })\n .passthrough();\n\n// User Profile Update\nexport const profileUpdateResponseSchema = z.object({\n id: z.number(),\n bio: z.string().nullable(),\n facebook: z.string().nullable(),\n twitter: z.string().nullable(),\n instagram: z.string().nullable(),\n youtube: z.string().nullable(),\n pinterest: z.string().nullable(),\n tiktok: z.string().nullable(),\n linkedin: z.string().nullable(),\n whatsapp: z.string().nullable(),\n wechat: z.string().nullable(),\n image_url: z.string().nullable(),\n});\n\nexport type ProfileUpdateResponse = z.infer<typeof profileUpdateResponseSchema>;\n","import { z } from \"zod\";\n\nexport interface MysiteTheme {\n id: number;\n name: string;\n description: string | null;\n public: boolean;\n company_id: number | null;\n created_at: string;\n updated_at: string;\n image_url: string | null;\n application_theme_template_id: number | null;\n}\n\nexport const themeSchema: z.ZodType<MysiteTheme> = z.object({\n id: z.number(),\n name: z.string(),\n description: z.string().nullable(),\n public: z.boolean(),\n company_id: z.number().nullable(),\n created_at: z.string().datetime(),\n updated_at: z.string().datetime(),\n image_url: z.string().nullable(),\n application_theme_template_id: z.number().nullable(),\n});\n\nexport const mysiteThemesSchema: z.ZodType<MysiteTheme[]> =\n z.array(themeSchema);\n\n// --- Legacy Theme (for creating themes via /legacy_themes endpoint) ---\n\ninterface LegacyThemeTemplate {\n id: number;\n name: string;\n content: string | null;\n stylesheet: string | null;\n head: string | null;\n status: string;\n}\n\nconst legacyThemeTemplateSchema: z.ZodType<LegacyThemeTemplate> = z.object({\n id: z.number(),\n name: z.string(),\n content: z.string().nullable(),\n stylesheet: z.string().nullable(),\n head: z.string().nullable(),\n status: z.string(),\n});\n\nexport interface LegacyThemeResponse {\n data: {\n legacy_theme: {\n id: number;\n name: string;\n description: string | null;\n image_url: string | null;\n public: boolean;\n company_id: number | null;\n template: LegacyThemeTemplate;\n };\n };\n}\n\nconst legacyThemeResponseSchema: z.ZodType<LegacyThemeResponse> = z.object({\n data: z.object({\n legacy_theme: z.object({\n id: z.number(),\n name: z.string(),\n description: z.string().nullable(),\n image_url: z.string().nullable(),\n public: z.boolean(),\n company_id: z.number().nullable(),\n template: legacyThemeTemplateSchema,\n }),\n }),\n});\n\nexport { legacyThemeResponseSchema };\n\nexport interface CreateLegacyThemeInput {\n name: string;\n description?: string;\n image_url?: string;\n public?: boolean;\n template?: {\n content?: string;\n stylesheet?: string;\n head?: string;\n };\n}\n","export const sortByOrder = <T extends { order: number }>(items: T[]): T[] => {\n return [...items].sort((a, b) => a.order - b.order);\n};\n\nexport const updateOrders = <T extends { id: number | string; order: number }>(\n items: T[],\n): T[] => {\n return items.map((item, index) => ({\n ...item,\n order: index + 1,\n }));\n};\n\nexport const generateTempId = (): string => {\n return `temp_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;\n};\n\nexport function normalizeUrl(value: string): string {\n const trimmed = value.trim();\n if (!trimmed) return \"\";\n if (/^https?:\\/\\//i.test(trimmed)) return trimmed;\n return `https://${trimmed}`;\n}\n","\"use client\";\nimport { useCallback, useState } from \"react\";\nimport { ArrowLeft, Plus, GripVertical, Pencil, Trash2 } from \"lucide-react\";\nimport {\n Button,\n Badge,\n Card,\n Dialog,\n Skeleton,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogFooter,\n Input,\n Label,\n useZodForm,\n} from \"@fluid-app/ui-primitives\";\nimport {\n DndContext,\n closestCenter,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n type DragEndEvent,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { z } from \"zod\";\nimport {\n useUserLinks,\n useCreateLink,\n useUpdateLink,\n useDeleteLink,\n useReorderLinks,\n} from \"../../admin/hooks/use-mysite\";\nimport type { FetchClient } from \"@fluid-app/api-client-core\";\nimport type { MySiteLink } from \"../../shared/schemas/mysite.schema\";\nimport { normalizeUrl } from \"../../shared/utils\";\n\nconst buttonSchema = z.object({\n text: z.string().min(1, \"Button text is required\"),\n url: z\n .string()\n .transform(normalizeUrl)\n .pipe(z.string().url(\"Must be a valid URL\")),\n});\n\ntype ButtonFormData = z.infer<typeof buttonSchema>;\n\nfunction SortableButtonCard({\n link,\n onEdit,\n onDelete,\n}: {\n link: MySiteLink;\n onEdit: (link: MySiteLink) => void;\n onDelete: (link: MySiteLink) => void;\n}) {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: link.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const truncatedUrl =\n link.url.length > 40 ? `${link.url.substring(0, 40)}...` : link.url;\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={`border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4 ${\n isDragging ? \"opacity-50 shadow-lg\" : \"\"\n }`}\n >\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground cursor-grab touch-none\"\n aria-label=\"Drag to reorder\"\n {...attributes}\n {...listeners}\n >\n <GripVertical className=\"h-5 w-5\" />\n </button>\n\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-foreground truncate font-medium\">{link.text}</p>\n <p className=\"text-muted-foreground truncate text-sm\">{truncatedUrl}</p>\n </div>\n\n <Badge variant=\"secondary\" className=\"hidden shrink-0 sm:inline-flex\">\n {link.clicks ?? 0} clicks\n </Badge>\n\n <div className=\"flex shrink-0 items-center gap-1\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-muted-foreground hover:text-foreground\"\n onClick={() => onEdit(link)}\n aria-label=\"Edit button\"\n >\n <Pencil className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-muted-foreground hover:text-destructive\"\n onClick={() => onDelete(link)}\n aria-label=\"Delete button\"\n >\n <Trash2 className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n\nexport function MySiteButtonsEditor({\n onBack,\n onRefreshPreview,\n client,\n userId,\n onToast,\n}: {\n onBack: () => void;\n onRefreshPreview?: () => void;\n client: FetchClient;\n userId: number | null | undefined;\n onToast?: (message: string, type: \"success\" | \"error\") => void;\n}): React.JSX.Element {\n \"use no memo\";\n const { data: links = [], isLoading } = useUserLinks(client, userId);\n const createLinkMutation = useCreateLink(client, userId);\n const updateLinkMutation = useUpdateLink(client, userId);\n const deleteLinkMutation = useDeleteLink(client, userId);\n const reorderLinksMutation = useReorderLinks(client, userId);\n\n const [isAddEditDialogOpen, setIsAddEditDialogOpen] = useState(false);\n const [editingLink, setEditingLink] = useState<MySiteLink | null>(null);\n const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);\n const [deletingLink, setDeletingLink] = useState<MySiteLink | null>(null);\n\n const {\n register,\n handleSubmit: handleButtonSubmit,\n reset: resetButtonForm,\n formState: { errors: buttonErrors, isSubmitting: isButtonSubmitting },\n } = useZodForm<ButtonFormData>(buttonSchema, {\n defaultValues: { text: \"\", url: \"\" },\n });\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleOpenAddDialog = useCallback(() => {\n setEditingLink(null);\n resetButtonForm({ text: \"\", url: \"\" });\n setIsAddEditDialogOpen(true);\n }, [resetButtonForm]);\n\n const handleOpenEditDialog = useCallback(\n (link: MySiteLink) => {\n setEditingLink(link);\n resetButtonForm({ text: link.text, url: link.url });\n setIsAddEditDialogOpen(true);\n },\n [resetButtonForm],\n );\n\n const handleCloseAddEditDialog = useCallback(() => {\n setIsAddEditDialogOpen(false);\n setEditingLink(null);\n resetButtonForm({ text: \"\", url: \"\" });\n }, [resetButtonForm]);\n\n const onButtonSubmit = useCallback(\n (data: ButtonFormData) => {\n if (editingLink) {\n updateLinkMutation.mutate(\n { linkId: editingLink.id, data },\n {\n onSuccess: () => {\n onToast?.(\"Button updated\", \"success\");\n handleCloseAddEditDialog();\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to update button\", \"error\");\n },\n },\n );\n } else {\n createLinkMutation.mutate(data, {\n onSuccess: () => {\n onToast?.(\"Button created\", \"success\");\n handleCloseAddEditDialog();\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to create button\", \"error\");\n },\n });\n }\n },\n [\n editingLink,\n createLinkMutation,\n updateLinkMutation,\n handleCloseAddEditDialog,\n onRefreshPreview,\n onToast,\n ],\n );\n\n const handleOpenDeleteDialog = useCallback((link: MySiteLink) => {\n setDeletingLink(link);\n setIsDeleteDialogOpen(true);\n }, []);\n\n const handleCloseDeleteDialog = useCallback(() => {\n setIsDeleteDialogOpen(false);\n setDeletingLink(null);\n }, []);\n\n const handleConfirmDelete = useCallback(() => {\n if (deletingLink) {\n deleteLinkMutation.mutate(deletingLink.id, {\n onSuccess: () => {\n onToast?.(\"Button deleted\", \"success\");\n handleCloseDeleteDialog();\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to delete button\", \"error\");\n },\n });\n }\n }, [\n deletingLink,\n deleteLinkMutation,\n handleCloseDeleteDialog,\n onRefreshPreview,\n onToast,\n ]);\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n if (over && active.id !== over.id) {\n const oldIndex = links.findIndex((l) => l.id === active.id);\n const newIndex = links.findIndex((l) => l.id === over.id);\n const reordered = arrayMove(links, oldIndex, newIndex);\n const payload = reordered.map((link, index) => ({\n id: link.id,\n order: index + 1,\n }));\n reorderLinksMutation.mutate(\n { payload, optimisticItems: reordered },\n {\n onSuccess: () => {\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to reorder buttons\", \"error\");\n },\n },\n );\n }\n },\n [links, reorderLinksMutation, onRefreshPreview, onToast],\n );\n\n return (\n <>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <Button variant=\"ghost\" size=\"icon\" onClick={onBack}>\n <ArrowLeft className=\"h-4 w-4\" />\n </Button>\n <h1 className=\"text-foreground text-xl font-bold\">Buttons</h1>\n </div>\n <Button size=\"sm\" onClick={handleOpenAddDialog}>\n <Plus className=\"mr-1 h-4 w-4\" />\n Add Button\n </Button>\n </div>\n\n {isLoading ? (\n <div className=\"space-y-2\">\n {Array.from({ length: 3 }).map((_, i) => (\n <div\n key={i}\n className=\"border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4\"\n >\n <Skeleton className=\"h-5 w-5\" />\n <div className=\"min-w-0 flex-1 space-y-2\">\n <Skeleton className=\"h-4 w-32\" />\n <Skeleton className=\"h-3 w-48\" />\n </div>\n <Skeleton className=\"hidden h-5 w-16 sm:block\" />\n <div className=\"flex gap-1\">\n <Skeleton className=\"h-8 w-8\" />\n <Skeleton className=\"h-8 w-8\" />\n </div>\n </div>\n ))}\n </div>\n ) : links.length === 0 ? (\n <Card className=\"p-6 text-center sm:p-8\">\n <p className=\"text-muted-foreground mb-4\">\n No buttons yet. Add custom link buttons to display on your MySite.\n </p>\n <Button size=\"sm\" onClick={handleOpenAddDialog}>\n <Plus className=\"mr-1 h-4 w-4\" />\n Add Button\n </Button>\n </Card>\n ) : (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={links.map((l) => l.id)}\n strategy={verticalListSortingStrategy}\n >\n <div className=\"space-y-2\">\n {links.map((link) => (\n <SortableButtonCard\n key={link.id}\n link={link}\n onEdit={handleOpenEditDialog}\n onDelete={handleOpenDeleteDialog}\n />\n ))}\n </div>\n </SortableContext>\n </DndContext>\n )}\n\n {/* Add/Edit Dialog */}\n <Dialog open={isAddEditDialogOpen} onOpenChange={setIsAddEditDialogOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>\n {editingLink ? \"Edit Button\" : \"Add Button\"}\n </DialogTitle>\n </DialogHeader>\n <form\n onSubmit={handleButtonSubmit(onButtonSubmit)}\n className=\"space-y-4\"\n >\n <div className=\"space-y-2\">\n <Label htmlFor=\"text\">Button Text</Label>\n <Input\n id=\"text\"\n placeholder=\"Enter button text...\"\n {...register(\"text\")}\n className={buttonErrors.text ? \"border-destructive\" : \"\"}\n />\n {buttonErrors.text && (\n <p className=\"text-destructive text-sm\">\n {buttonErrors.text.message}\n </p>\n )}\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"url\">URL</Label>\n <Input\n id=\"url\"\n placeholder=\"https://example.com\"\n {...register(\"url\")}\n className={buttonErrors.url ? \"border-destructive\" : \"\"}\n />\n {buttonErrors.url && (\n <p className=\"text-destructive text-sm\">\n {buttonErrors.url.message}\n </p>\n )}\n </div>\n <DialogFooter className=\"flex justify-between\">\n {editingLink ? (\n <Button\n type=\"button\"\n variant=\"destructive\"\n onClick={() => {\n handleCloseAddEditDialog();\n handleOpenDeleteDialog(editingLink);\n }}\n >\n <Trash2 className=\"mr-1 h-4 w-4\" />\n Delete\n </Button>\n ) : (\n <div />\n )}\n <div className=\"flex gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleCloseAddEditDialog}\n >\n Cancel\n </Button>\n <Button\n type=\"submit\"\n disabled={\n isButtonSubmitting ||\n createLinkMutation.isPending ||\n updateLinkMutation.isPending\n }\n >\n {isButtonSubmitting ||\n createLinkMutation.isPending ||\n updateLinkMutation.isPending\n ? \"Saving...\"\n : \"Save\"}\n </Button>\n </div>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n\n {/* Delete Confirmation Dialog */}\n <Dialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Delete Button</DialogTitle>\n </DialogHeader>\n <p className=\"text-muted-foreground\">\n Are you sure you want to delete the button "\n {deletingLink?.text}"? This action cannot be undone.\n </p>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleCloseDeleteDialog}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n onClick={handleConfirmDelete}\n disabled={deleteLinkMutation.isPending}\n >\n {deleteLinkMutation.isPending ? \"Deleting...\" : \"Delete\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </>\n );\n}\n","\"use client\";\nimport { useCallback, useState } from \"react\";\nimport { ArrowLeft, Plus, GripVertical, Pencil, Trash2 } from \"lucide-react\";\nimport {\n Button,\n Card,\n Dialog,\n Skeleton,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogFooter,\n Input,\n Label,\n useZodForm,\n} from \"@fluid-app/ui-primitives\";\nimport {\n DndContext,\n closestCenter,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n type DragEndEvent,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { z } from \"zod\";\nimport {\n usePortalLinks,\n usePortalCreateLink,\n usePortalUpdateLink,\n usePortalDeleteLink,\n usePortalReorderLinks,\n} from \"../hooks/use-mysite-portal\";\nimport type { MySiteLink } from \"@fluid-app/mysite-core/mysite-api-types\";\nimport { normalizeUrl } from \"../../shared/utils\";\n\nconst buttonSchema = z.object({\n title: z.string().min(1, \"Button text is required\"),\n url: z\n .string()\n .transform(normalizeUrl)\n .pipe(z.string().url(\"Must be a valid URL\")),\n});\n\ntype ButtonFormData = z.infer<typeof buttonSchema>;\n\nfunction SortableButtonCard({\n link,\n onEdit,\n onDelete,\n}: {\n link: MySiteLink;\n onEdit: (link: MySiteLink) => void;\n onDelete: (link: MySiteLink) => void;\n}) {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: link.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const truncatedUrl =\n link.url.length > 40 ? `${link.url.substring(0, 40)}...` : link.url;\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={`border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4 ${\n isDragging ? \"opacity-50 shadow-lg\" : \"\"\n }`}\n >\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground cursor-grab touch-none\"\n aria-label=\"Drag to reorder\"\n {...attributes}\n {...listeners}\n >\n <GripVertical className=\"h-5 w-5\" />\n </button>\n\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-foreground truncate font-medium\">{link.title}</p>\n <p className=\"text-muted-foreground truncate text-sm\">{truncatedUrl}</p>\n </div>\n\n <div className=\"flex shrink-0 items-center gap-1\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-muted-foreground hover:text-foreground\"\n onClick={() => onEdit(link)}\n aria-label=\"Edit button\"\n >\n <Pencil className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-muted-foreground hover:text-destructive\"\n onClick={() => onDelete(link)}\n aria-label=\"Delete button\"\n >\n <Trash2 className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n\n/**\n * Portal-specific buttons editor that uses MySiteApi context.\n * No client/userId props needed — data comes from context.\n */\nexport function PortalButtonsEditor({\n onBack,\n onRefreshPreview,\n onToast,\n}: {\n onBack: () => void;\n onRefreshPreview?: () => void;\n onToast?: (message: string, type: \"success\" | \"error\") => void;\n}): React.JSX.Element {\n \"use no memo\";\n const { data: links = [], isLoading } = usePortalLinks();\n const createLinkMutation = usePortalCreateLink();\n const updateLinkMutation = usePortalUpdateLink();\n const deleteLinkMutation = usePortalDeleteLink();\n const reorderLinksMutation = usePortalReorderLinks();\n\n const [isAddEditDialogOpen, setIsAddEditDialogOpen] = useState(false);\n const [editingLink, setEditingLink] = useState<MySiteLink | null>(null);\n const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);\n const [deletingLink, setDeletingLink] = useState<MySiteLink | null>(null);\n\n const {\n register,\n handleSubmit: handleButtonSubmit,\n reset: resetButtonForm,\n formState: { errors: buttonErrors, isSubmitting: isButtonSubmitting },\n } = useZodForm<ButtonFormData>(buttonSchema, {\n defaultValues: { title: \"\", url: \"\" },\n });\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleOpenAddDialog = useCallback(() => {\n setEditingLink(null);\n resetButtonForm({ title: \"\", url: \"\" });\n setIsAddEditDialogOpen(true);\n }, [resetButtonForm]);\n\n const handleOpenEditDialog = useCallback(\n (link: MySiteLink) => {\n setEditingLink(link);\n resetButtonForm({ title: link.title, url: link.url });\n setIsAddEditDialogOpen(true);\n },\n [resetButtonForm],\n );\n\n const handleCloseAddEditDialog = useCallback(() => {\n setIsAddEditDialogOpen(false);\n setEditingLink(null);\n resetButtonForm({ title: \"\", url: \"\" });\n }, [resetButtonForm]);\n\n const onButtonSubmit = useCallback(\n (data: ButtonFormData) => {\n if (editingLink) {\n updateLinkMutation.mutate(\n {\n linkId: editingLink.id,\n body: { title: data.title, url: data.url },\n },\n {\n onSuccess: () => {\n onToast?.(\"Button updated\", \"success\");\n handleCloseAddEditDialog();\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to update button\", \"error\");\n },\n },\n );\n } else {\n createLinkMutation.mutate(\n { title: data.title, url: data.url },\n {\n onSuccess: () => {\n onToast?.(\"Button created\", \"success\");\n handleCloseAddEditDialog();\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to create button\", \"error\");\n },\n },\n );\n }\n },\n [\n editingLink,\n createLinkMutation,\n updateLinkMutation,\n handleCloseAddEditDialog,\n onRefreshPreview,\n onToast,\n ],\n );\n\n const handleOpenDeleteDialog = useCallback((link: MySiteLink) => {\n setDeletingLink(link);\n setIsDeleteDialogOpen(true);\n }, []);\n\n const handleCloseDeleteDialog = useCallback(() => {\n setIsDeleteDialogOpen(false);\n setDeletingLink(null);\n }, []);\n\n const handleConfirmDelete = useCallback(() => {\n if (deletingLink) {\n deleteLinkMutation.mutate(deletingLink.id, {\n onSuccess: () => {\n onToast?.(\"Button deleted\", \"success\");\n handleCloseDeleteDialog();\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to delete button\", \"error\");\n },\n });\n }\n }, [\n deletingLink,\n deleteLinkMutation,\n handleCloseDeleteDialog,\n onRefreshPreview,\n onToast,\n ]);\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n if (over && active.id !== over.id) {\n const oldIndex = links.findIndex((l) => l.id === active.id);\n const newIndex = links.findIndex((l) => l.id === over.id);\n const reordered = arrayMove(links, oldIndex, newIndex);\n const orderedIds = reordered.map((link) => link.id);\n reorderLinksMutation.mutate(\n { orderedIds, optimisticItems: reordered },\n {\n onSuccess: () => {\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to reorder buttons\", \"error\");\n },\n },\n );\n }\n },\n [links, reorderLinksMutation, onRefreshPreview, onToast],\n );\n\n return (\n <>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <Button variant=\"ghost\" size=\"icon\" onClick={onBack}>\n <ArrowLeft className=\"h-4 w-4\" />\n </Button>\n <h1 className=\"text-foreground text-xl font-bold\">Buttons</h1>\n </div>\n <Button size=\"sm\" onClick={handleOpenAddDialog}>\n <Plus className=\"mr-1 h-4 w-4\" />\n Add Button\n </Button>\n </div>\n\n {isLoading ? (\n <div className=\"space-y-2\">\n {Array.from({ length: 3 }).map((_, i) => (\n <div\n key={i}\n className=\"border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4\"\n >\n <Skeleton className=\"h-5 w-5\" />\n <div className=\"min-w-0 flex-1 space-y-2\">\n <Skeleton className=\"h-4 w-32\" />\n <Skeleton className=\"h-3 w-48\" />\n </div>\n <div className=\"flex gap-1\">\n <Skeleton className=\"h-8 w-8\" />\n <Skeleton className=\"h-8 w-8\" />\n </div>\n </div>\n ))}\n </div>\n ) : links.length === 0 ? (\n <Card className=\"p-6 text-center sm:p-8\">\n <p className=\"text-muted-foreground mb-4\">\n No buttons yet. Add custom link buttons to display on your MySite.\n </p>\n <Button size=\"sm\" onClick={handleOpenAddDialog}>\n <Plus className=\"mr-1 h-4 w-4\" />\n Add Button\n </Button>\n </Card>\n ) : (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={links.map((l) => l.id)}\n strategy={verticalListSortingStrategy}\n >\n <div className=\"space-y-2\">\n {links.map((link) => (\n <SortableButtonCard\n key={link.id}\n link={link}\n onEdit={handleOpenEditDialog}\n onDelete={handleOpenDeleteDialog}\n />\n ))}\n </div>\n </SortableContext>\n </DndContext>\n )}\n\n {/* Add/Edit Dialog */}\n <Dialog open={isAddEditDialogOpen} onOpenChange={setIsAddEditDialogOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>\n {editingLink ? \"Edit Button\" : \"Add Button\"}\n </DialogTitle>\n </DialogHeader>\n <form\n onSubmit={handleButtonSubmit(onButtonSubmit)}\n className=\"space-y-4\"\n >\n <div className=\"space-y-2\">\n <Label htmlFor=\"title\">Button Text</Label>\n <Input\n id=\"title\"\n placeholder=\"Enter button text...\"\n {...register(\"title\")}\n className={buttonErrors.title ? \"border-destructive\" : \"\"}\n />\n {buttonErrors.title && (\n <p className=\"text-destructive text-sm\">\n {buttonErrors.title.message}\n </p>\n )}\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"url\">URL</Label>\n <Input\n id=\"url\"\n placeholder=\"https://example.com\"\n {...register(\"url\")}\n className={buttonErrors.url ? \"border-destructive\" : \"\"}\n />\n {buttonErrors.url && (\n <p className=\"text-destructive text-sm\">\n {buttonErrors.url.message}\n </p>\n )}\n </div>\n <DialogFooter className=\"flex justify-between\">\n {editingLink ? (\n <Button\n type=\"button\"\n variant=\"destructive\"\n onClick={() => {\n handleCloseAddEditDialog();\n handleOpenDeleteDialog(editingLink);\n }}\n >\n <Trash2 className=\"mr-1 h-4 w-4\" />\n Delete\n </Button>\n ) : (\n <div />\n )}\n <div className=\"flex gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleCloseAddEditDialog}\n >\n Cancel\n </Button>\n <Button\n type=\"submit\"\n disabled={\n isButtonSubmitting ||\n createLinkMutation.isPending ||\n updateLinkMutation.isPending\n }\n >\n {isButtonSubmitting ||\n createLinkMutation.isPending ||\n updateLinkMutation.isPending\n ? \"Saving...\"\n : \"Save\"}\n </Button>\n </div>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n\n {/* Delete Confirmation Dialog */}\n <Dialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Delete Button</DialogTitle>\n </DialogHeader>\n <p className=\"text-muted-foreground\">\n Are you sure you want to delete the button "\n {deletingLink?.title}"? This action cannot be undone.\n </p>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleCloseDeleteDialog}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n onClick={handleConfirmDelete}\n disabled={deleteLinkMutation.isPending}\n >\n {deleteLinkMutation.isPending ? \"Deleting...\" : \"Delete\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </>\n );\n}\n","\"use client\";\nimport { useCallback, useState } from \"react\";\nimport { ArrowLeft, GripVertical, Trash2 } from \"lucide-react\";\nimport {\n Button,\n Card,\n Dialog,\n Skeleton,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogFooter,\n} from \"@fluid-app/ui-primitives\";\nimport {\n DndContext,\n closestCenter,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n type DragEndEvent,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport {\n usePortalFavorites,\n usePortalDeleteFavorite,\n usePortalReorderFavorites,\n} from \"../hooks/use-mysite-portal\";\nimport type { MySiteFavorite } from \"@fluid-app/mysite-core/mysite-api-types\";\n\nconst TYPE_LABELS: Record<string, string> = {\n Medium: \"Media\",\n Library: \"Playlist\",\n EnrollmentPack: \"Enrollment Pack\",\n Page: \"Page\",\n};\n\nfunction SortableFavoriteCard({\n favorite,\n onDelete,\n}: {\n favorite: MySiteFavorite;\n onDelete: (favorite: MySiteFavorite) => void;\n}) {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: favorite.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const title = favorite.name ?? \"Untitled\";\n const imageUrl = favorite.image_url;\n const typeLabel =\n favorite.favoriteable_type !== \"Product\"\n ? (TYPE_LABELS[favorite.favoriteable_type] ?? favorite.favoriteable_type)\n : null;\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={`border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4 ${\n isDragging ? \"opacity-50 shadow-lg\" : \"\"\n }`}\n >\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground cursor-grab touch-none\"\n aria-label=\"Drag to reorder\"\n {...attributes}\n {...listeners}\n >\n <GripVertical className=\"h-5 w-5\" />\n </button>\n\n <div className=\"bg-muted h-10 w-10 shrink-0 overflow-hidden rounded-md\">\n {imageUrl ? (\n <img\n src={imageUrl}\n alt={title}\n loading=\"lazy\"\n width={40}\n height={40}\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <div className=\"text-muted-foreground flex h-full w-full items-center justify-center text-xs\">\n N/A\n </div>\n )}\n </div>\n\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-foreground truncate font-medium\">{title}</p>\n {typeLabel ? (\n <span className=\"text-muted-foreground text-xs\">{typeLabel}</span>\n ) : null}\n </div>\n\n <div className=\"flex shrink-0 items-center gap-1\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-muted-foreground hover:text-destructive\"\n onClick={() => onDelete(favorite)}\n aria-label=\"Remove favorite\"\n >\n <Trash2 className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n\n/**\n * Portal-specific favorites editor that uses MySiteApi context.\n * No client/affiliateId props needed — data comes from context.\n */\nexport function PortalFavoritesEditor({\n onBack,\n onRefreshPreview,\n onToast,\n}: {\n onBack: () => void;\n onRefreshPreview?: () => void;\n onToast?: (message: string, type: \"success\" | \"error\") => void;\n}): React.JSX.Element {\n const { data: favorites = [], isLoading } = usePortalFavorites();\n const deleteFavoriteMutation = usePortalDeleteFavorite();\n const reorderFavoritesMutation = usePortalReorderFavorites();\n\n const [isDeleteFavoriteDialogOpen, setIsDeleteFavoriteDialogOpen] =\n useState(false);\n const [deletingFavorite, setDeletingFavorite] =\n useState<MySiteFavorite | null>(null);\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleOpenDeleteFavoriteDialog = useCallback(\n (favorite: MySiteFavorite) => {\n setDeletingFavorite(favorite);\n setIsDeleteFavoriteDialogOpen(true);\n },\n [],\n );\n\n const handleCloseDeleteFavoriteDialog = useCallback(() => {\n setIsDeleteFavoriteDialogOpen(false);\n setDeletingFavorite(null);\n }, []);\n\n const handleConfirmDeleteFavorite = useCallback(() => {\n if (deletingFavorite) {\n deleteFavoriteMutation.mutate(deletingFavorite.id, {\n onSuccess: () => {\n onToast?.(\"Content removed\", \"success\");\n handleCloseDeleteFavoriteDialog();\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to remove content\", \"error\");\n },\n });\n }\n }, [\n deletingFavorite,\n deleteFavoriteMutation,\n handleCloseDeleteFavoriteDialog,\n onRefreshPreview,\n onToast,\n ]);\n\n const handleFavoriteDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n if (over && active.id !== over.id) {\n const oldIndex = favorites.findIndex((f) => f.id === active.id);\n const newIndex = favorites.findIndex((f) => f.id === over.id);\n const reordered = arrayMove(favorites, oldIndex, newIndex);\n const orderedIds = reordered.map((fav) => fav.id);\n reorderFavoritesMutation.mutate(\n { orderedIds, optimisticItems: reordered },\n {\n onSuccess: () => {\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to reorder content\", \"error\");\n },\n },\n );\n }\n },\n [favorites, reorderFavoritesMutation, onRefreshPreview, onToast],\n );\n\n return (\n <>\n <div className=\"flex items-center gap-3\">\n <Button variant=\"ghost\" size=\"icon\" onClick={onBack}>\n <ArrowLeft className=\"h-4 w-4\" />\n </Button>\n <h1 className=\"text-foreground text-xl font-bold\">MySite Content</h1>\n </div>\n\n {isLoading ? (\n <div className=\"space-y-2\">\n {Array.from({ length: 3 }).map((_, i) => (\n <div\n key={i}\n className=\"border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4\"\n >\n <Skeleton className=\"h-5 w-5\" />\n <Skeleton className=\"h-10 w-10 rounded-md\" />\n <div className=\"min-w-0 flex-1 space-y-2\">\n <Skeleton className=\"h-4 w-32\" />\n <Skeleton className=\"h-3 w-20\" />\n </div>\n <Skeleton className=\"h-8 w-8\" />\n </div>\n ))}\n </div>\n ) : favorites.length === 0 ? (\n <Card className=\"p-6 text-center sm:p-8\">\n <p className=\"text-muted-foreground\">\n No featured content yet. Favorite products, media, or pages to\n display on your MySite.\n </p>\n </Card>\n ) : (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleFavoriteDragEnd}\n >\n <SortableContext\n items={favorites.map((f) => f.id)}\n strategy={verticalListSortingStrategy}\n >\n <div className=\"space-y-2\">\n {favorites.map((fav) => (\n <SortableFavoriteCard\n key={fav.id}\n favorite={fav}\n onDelete={handleOpenDeleteFavoriteDialog}\n />\n ))}\n </div>\n </SortableContext>\n </DndContext>\n )}\n\n {/* Delete Favorite Confirmation Dialog */}\n <Dialog\n open={isDeleteFavoriteDialogOpen}\n onOpenChange={setIsDeleteFavoriteDialogOpen}\n >\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Remove Content</DialogTitle>\n </DialogHeader>\n <p className=\"text-muted-foreground\">\n Are you sure you want to remove "\n {deletingFavorite?.name ?? \"this item\"}\n " from your MySite? This action cannot be undone.\n </p>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleCloseDeleteFavoriteDialog}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n onClick={handleConfirmDeleteFavorite}\n disabled={deleteFavoriteMutation.isPending}\n >\n {deleteFavoriteMutation.isPending ? \"Removing...\" : \"Remove\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </>\n );\n}\n","\"use client\";\nimport { useState, useCallback, useEffect, useRef } from \"react\";\nimport { ArrowLeft, Camera } from \"lucide-react\";\nimport {\n Button,\n Card,\n CardContent,\n Input,\n Label,\n Textarea,\n} from \"@fluid-app/ui-primitives\";\nimport {\n usePortalMySiteProfile,\n usePortalUpdateProfile,\n} from \"../hooks/use-mysite-portal\";\n\ninterface ProfileFormState {\n display_name: string;\n bio: string;\n}\n\nexport function MySiteProfileForm({\n onBack,\n onToast,\n onRefreshPreview,\n onUploadPhoto,\n avatarUrl,\n userName,\n userInitial,\n}: {\n onBack: () => void;\n onToast?: (message: string, type: \"success\" | \"error\") => void;\n onRefreshPreview?: () => void;\n onUploadPhoto?: (file: File) => Promise<string>;\n avatarUrl?: string | null;\n userName?: string | null;\n userInitial?: string | null;\n}): React.JSX.Element {\n const { data: profile, isLoading: isProfileLoading } =\n usePortalMySiteProfile();\n\n const updateProfileMutation = usePortalUpdateProfile();\n\n const [formState, setFormState] = useState<ProfileFormState>(() => ({\n display_name: \"\",\n bio: \"\",\n }));\n\n const profileSyncedRef = useRef(false);\n useEffect(() => {\n if (profile && !profileSyncedRef.current) {\n profileSyncedRef.current = true;\n setFormState({\n display_name: profile.display_name ?? \"\",\n bio: profile.bio ?? \"\",\n });\n }\n }, [profile]);\n\n const isDirty =\n formState.display_name !== (profile?.display_name ?? \"\") ||\n formState.bio !== (profile?.bio ?? \"\");\n\n const handleFieldChange = useCallback(\n (field: keyof ProfileFormState, value: string) => {\n setFormState((s) => ({ ...s, [field]: value }));\n },\n [],\n );\n\n const handleSave = useCallback(() => {\n updateProfileMutation.mutate(\n {\n display_name: formState.display_name,\n bio: formState.bio,\n },\n {\n onSuccess: () => {\n profileSyncedRef.current = false;\n onToast?.(\"Profile updated successfully\", \"success\");\n onRefreshPreview?.();\n },\n onError: () => {\n onToast?.(\"Failed to update profile\", \"error\");\n },\n },\n );\n }, [formState, updateProfileMutation, onToast, onRefreshPreview]);\n\n // Avatar upload handling\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [isUploadingPhoto, setIsUploadingPhoto] = useState(false);\n const [previewUrl, setPreviewUrl] = useState<string | null>(null);\n\n useEffect(() => {\n return () => {\n if (previewUrl) URL.revokeObjectURL(previewUrl);\n };\n }, [previewUrl]);\n\n const handleFileSelected = useCallback(\n async (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0];\n if (!file || !onUploadPhoto) return;\n\n if (!file.type.startsWith(\"image/\")) {\n onToast?.(\"Please select an image file\", \"error\");\n return;\n }\n\n setPreviewUrl(URL.createObjectURL(file));\n setIsUploadingPhoto(true);\n\n try {\n const imageUrl = await onUploadPhoto(file);\n updateProfileMutation.mutate(\n { avatar_url: imageUrl },\n {\n onSuccess: () => {\n onToast?.(\"Profile photo updated\", \"success\");\n onRefreshPreview?.();\n },\n onError: () => {\n setPreviewUrl(null);\n onToast?.(\"Failed to save profile photo\", \"error\");\n },\n },\n );\n } catch {\n setPreviewUrl(null);\n onToast?.(\"Failed to upload photo\", \"error\");\n } finally {\n setIsUploadingPhoto(false);\n if (fileInputRef.current) fileInputRef.current.value = \"\";\n }\n },\n [onUploadPhoto, updateProfileMutation, onToast, onRefreshPreview],\n );\n\n if (isProfileLoading) {\n return (\n <div className=\"flex h-full items-center justify-center\">\n <div className=\"text-muted-foreground animate-pulse\">Loading...</div>\n </div>\n );\n }\n\n const displayAvatarUrl = previewUrl || avatarUrl || profile?.avatar_url;\n\n return (\n <div className=\"space-y-4 p-4 sm:space-y-6 sm:p-6\">\n {/* Header */}\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={onBack}\n className=\"text-muted-foreground hover:bg-muted hover:text-foreground flex h-10 w-10 items-center justify-center rounded-full transition-colors\"\n aria-label=\"Go back\"\n >\n <ArrowLeft className=\"h-5 w-5\" />\n </button>\n <h1 className=\"text-foreground text-xl font-bold sm:text-2xl\">\n Profile\n </h1>\n </div>\n\n {/* Avatar Section (optional) */}\n {onUploadPhoto && (\n <Card className=\"p-4 sm:p-6\">\n <input\n ref={fileInputRef}\n type=\"file\"\n accept=\"image/*\"\n className=\"hidden\"\n onChange={handleFileSelected}\n />\n <div className=\"flex flex-col items-center gap-3 sm:flex-row sm:gap-4\">\n <div className=\"relative h-[120px] w-[120px] shrink-0 overflow-hidden rounded-full bg-gray-200\">\n {displayAvatarUrl ? (\n <img\n src={displayAvatarUrl}\n alt={userName || \"Profile\"}\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <div className=\"bg-background text-foreground flex h-full w-full items-center justify-center text-xl font-semibold\">\n {userInitial || \"U\"}\n </div>\n )}\n {isUploadingPhoto && (\n <div className=\"absolute inset-0 flex items-center justify-center rounded-full bg-black/40\">\n <div className=\"border-t-primary h-6 w-6 animate-spin rounded-full border-2 border-white\" />\n </div>\n )}\n </div>\n <Button\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => fileInputRef.current?.click()}\n disabled={isUploadingPhoto}\n >\n <Camera className=\"mr-1 h-4 w-4\" />\n {isUploadingPhoto ? \"Uploading...\" : \"Change Photo\"}\n </Button>\n </div>\n </Card>\n )}\n\n {/* Display Name + Bio */}\n <Card className=\"h-auto gap-0 py-0 shadow-none\">\n <CardContent className=\"space-y-4 p-4 sm:p-6\">\n <div className=\"space-y-2\">\n <Label htmlFor=\"profile-display-name\">Display Name</Label>\n <Input\n id=\"profile-display-name\"\n type=\"text\"\n value={formState.display_name}\n onChange={(e) =>\n handleFieldChange(\"display_name\", e.target.value)\n }\n placeholder=\"Your display name\"\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"profile-bio\">Bio</Label>\n <Textarea\n id=\"profile-bio\"\n rows={4}\n value={formState.bio}\n onChange={(e) => handleFieldChange(\"bio\", e.target.value)}\n placeholder=\"Tell people a little about yourself...\"\n />\n </div>\n </CardContent>\n </Card>\n\n {/* Save Button */}\n <div className=\"flex justify-end\">\n <Button\n onClick={handleSave}\n disabled={!isDirty || updateProfileMutation.isPending}\n className=\"w-full sm:w-auto\"\n >\n {updateProfileMutation.isPending ? \"Saving...\" : \"Save Changes\"}\n </Button>\n </div>\n </div>\n );\n}\n","import { useCallback, useMemo, useState } from \"react\";\nimport {\n usePortalMySiteProfile,\n usePortalMySiteThemes,\n usePortalUpdateSettings,\n} from \"@fluid-app/mysite-ui/portal/hooks/use-mysite-portal\";\nimport type { MySiteTheme } from \"@fluid-app/mysite-core/mysite-api-types\";\nimport {\n type AnimPhase,\n type EditingSection,\n getContentClassName,\n getPreviewClassName,\n MySiteVisitorDetailsCard,\n MySitePhonePreview,\n MySiteLinkCard,\n MySiteThemeEditor,\n MySiteProfileForm,\n PortalButtonsEditor,\n PortalFavoritesEditor,\n} from \"@fluid-app/mysite-ui/portal/components\";\nimport { ChevronRight, User, Link2, Palette, LayoutGrid } from \"lucide-react\";\nimport { fluidToast } from \"@fluid-app/ui-primitives\";\n\ntype NavItem = {\n label: string;\n key: Exclude<EditingSection, null>;\n icon: typeof User;\n};\n\nconst navigationItems: NavItem[] = [\n { label: \"Profile\", key: \"profile\", icon: User },\n { label: \"Theme\", key: \"theme\", icon: Palette },\n { label: \"MySite Content\", key: \"content\", icon: LayoutGrid },\n { label: \"Buttons\", key: \"buttons\", icon: Link2 },\n];\n\nfunction defaultToast(message: string, type: \"success\" | \"error\") {\n fluidToast({ title: message, type });\n}\n\nexport interface MySiteMainViewProps {\n editingSection: EditingSection;\n animPhase: AnimPhase;\n showEditContent: boolean;\n onEditSection: (section: EditingSection) => void;\n onBackClick: () => void;\n}\n\nexport function MySiteMainView({\n editingSection,\n animPhase,\n showEditContent,\n onEditSection,\n onBackClick,\n}: MySiteMainViewProps): React.JSX.Element {\n const { data: profile, isLoading: isProfileLoading } =\n usePortalMySiteProfile();\n const { data: themes = [] } = usePortalMySiteThemes();\n const updateSettingsMutation = usePortalUpdateSettings();\n\n const [previewKey, setPreviewKey] = useState(0);\n const refreshPreview = useCallback(() => setPreviewKey((k) => k + 1), []);\n\n const [selectedThemeId, setSelectedThemeId] = useState<number | null>(null);\n\n const resolvedThemeId =\n selectedThemeId ??\n profile?.theme_id ??\n themes.find((t) => t.name === \"Default\")?.id ??\n themes[0]?.id ??\n null;\n\n const currentTheme = themes.find((t) => t.id === resolvedThemeId);\n const themeName = currentTheme?.name ?? \"Default\";\n\n const mysiteUrl = profile?.mysite_url ?? \"\";\n const displayUrl = mysiteUrl ? mysiteUrl.replace(/^https?:\\/\\//, \"\") : \"\";\n const views = profile?.mysite_views ?? 0;\n const leads = profile?.mysite_leads ?? 0;\n\n const handleSelectTheme = useCallback(\n (theme: MySiteTheme) => {\n if (theme.id === resolvedThemeId) return;\n const previousThemeId = selectedThemeId;\n setSelectedThemeId(theme.id);\n updateSettingsMutation.mutate(\n { theme_id: theme.id },\n {\n onSuccess: () => {\n defaultToast(`Theme changed to \"${theme.name}\"`, \"success\");\n refreshPreview();\n },\n onError: () => {\n setSelectedThemeId(previousThemeId);\n defaultToast(\"Failed to update theme\", \"error\");\n },\n },\n );\n },\n [resolvedThemeId, selectedThemeId, updateSettingsMutation, refreshPreview],\n );\n\n const handleUpdateSlug = useCallback(\n async (slug: string) => {\n await new Promise<void>((resolve, reject) => {\n updateSettingsMutation.mutate(\n { slug },\n {\n onSuccess: () => resolve(),\n onError: () => reject(new Error(\"Failed\")),\n },\n );\n });\n },\n [updateSettingsMutation],\n );\n\n const handlePreview = useCallback(() => {\n if (mysiteUrl) window.open(`${mysiteUrl}?preview=true`, \"_blank\");\n }, [mysiteUrl]);\n\n const sectionLabel = useMemo(() => {\n if (editingSection === \"theme\") return \"Theme\";\n if (editingSection === \"buttons\") return \"Buttons\";\n if (editingSection === \"content\") return \"MySite Content\";\n if (editingSection === \"profile\") return \"Profile\";\n return \"\";\n }, [editingSection]);\n\n if (isProfileLoading) {\n return (\n <div className=\"flex h-full flex-col overflow-y-auto px-2 py-6 2xl:flex-row 2xl:overflow-hidden\">\n <div className=\"w-full px-4 2xl:w-2/3 2xl:shrink-0\">\n <div className=\"flex flex-col gap-5\">\n <div className=\"bg-muted h-7 w-32 animate-pulse rounded-md\" />\n <div className=\"bg-muted h-20 w-full animate-pulse rounded-lg\" />\n <div className=\"bg-muted h-16 w-full animate-pulse rounded-lg\" />\n <div className=\"bg-muted h-40 w-full animate-pulse rounded-lg\" />\n </div>\n </div>\n <div className=\"w-full shrink-0 overflow-y-hidden px-4 pt-5 2xl:w-1/3 2xl:pt-0\">\n <div className=\"bg-muted flex h-full flex-col items-center gap-4 rounded-xl p-5\">\n <div className=\"flex w-full items-center justify-between\">\n <div className=\"space-y-1\">\n <div className=\"bg-background/50 h-3 w-24 animate-pulse rounded\" />\n <div className=\"bg-background/50 h-4 w-28 animate-pulse rounded\" />\n </div>\n <div className=\"bg-background/50 h-8 w-20 animate-pulse rounded-md\" />\n </div>\n <div className=\"bg-background/50 h-[490px] w-[260px] animate-pulse rounded-[36px] sm:h-[600px] sm:w-[320px]\" />\n </div>\n </div>\n </div>\n );\n }\n\n const contentAnimClassName = getContentClassName(animPhase);\n const previewAnimClassName = getPreviewClassName(animPhase);\n\n return (\n <div className=\"flex h-full flex-col overflow-y-auto px-2 py-6 2xl:flex-row 2xl:overflow-hidden\">\n {/* Content column */}\n <div\n className={`w-full px-4 2xl:w-2/3 2xl:shrink-0 ${contentAnimClassName}`}\n >\n <div className=\"flex min-w-0 flex-col gap-5 2xl:h-full 2xl:overflow-y-auto\">\n {showEditContent && editingSection === \"theme\" ? (\n <MySiteThemeEditor\n themes={themes}\n selectedThemeId={resolvedThemeId}\n onSelectTheme={handleSelectTheme}\n isPending={updateSettingsMutation.isPending}\n onBack={onBackClick}\n />\n ) : showEditContent && editingSection === \"buttons\" ? (\n <PortalButtonsEditor\n onBack={onBackClick}\n onRefreshPreview={refreshPreview}\n onToast={defaultToast}\n />\n ) : showEditContent && editingSection === \"content\" ? (\n <PortalFavoritesEditor\n onBack={onBackClick}\n onRefreshPreview={refreshPreview}\n onToast={defaultToast}\n />\n ) : showEditContent && editingSection === \"profile\" ? (\n <MySiteProfileForm\n onBack={onBackClick}\n onRefreshPreview={refreshPreview}\n onToast={defaultToast}\n />\n ) : (\n <>\n {/* Header with optional back-to-section label */}\n <div className=\"flex items-center gap-2\">\n <h1 className=\"text-foreground text-xl font-bold\">MySite</h1>\n {animPhase !== \"idle\" && sectionLabel && (\n <>\n <ChevronRight className=\"text-muted-foreground h-4 w-4\" />\n <span className=\"text-foreground text-xl font-bold\">\n {sectionLabel}\n </span>\n </>\n )}\n </div>\n\n <MySiteVisitorDetailsCard views={views} leads={leads} />\n\n <MySiteLinkCard\n mysiteUrl={mysiteUrl}\n displayUrl={displayUrl}\n onUpdateSlug={handleUpdateSlug}\n onToast={defaultToast}\n />\n\n <div className=\"border-border bg-card divide-border divide-y overflow-hidden rounded-lg border\">\n {navigationItems.map((item) => {\n const Icon = item.icon;\n const rowClassName =\n \"group hover:bg-muted flex w-full items-center gap-2.5 px-3 py-2.5 transition-colors text-left cursor-pointer\";\n\n return (\n <button\n key={item.label}\n type=\"button\"\n onClick={() => onEditSection(item.key)}\n className={rowClassName}\n >\n <div className=\"bg-muted text-foreground flex h-7 w-7 shrink-0 items-center justify-center rounded-full\">\n <Icon className=\"h-3.5 w-3.5\" />\n </div>\n <span className=\"text-foreground flex-1 text-sm font-medium\">\n {item.label}\n </span>\n <ChevronRight className=\"text-muted-foreground h-3 w-3 shrink-0 transition-transform group-hover:translate-x-0.5\" />\n </button>\n );\n })}\n </div>\n </>\n )}\n </div>\n </div>\n\n {/* Preview column */}\n <div\n className={`w-full shrink-0 overflow-y-hidden px-4 pt-5 2xl:w-1/3 2xl:pt-0 ${previewAnimClassName}`}\n >\n <MySitePhonePreview\n mysiteUrl={mysiteUrl}\n themeName={themeName}\n previewKey={previewKey}\n isUpdating={updateSettingsMutation.isPending}\n onPreview={handlePreview}\n />\n </div>\n </div>\n );\n}\n","import { useCallback, useEffect, useRef, useState } from \"react\";\nimport {\n type AnimPhase,\n type EditingSection,\n FADE_MS,\n SLIDE_MS,\n} from \"@fluid-app/mysite-ui/portal/components\";\n\nexport interface MySiteEditingSectionState {\n editingSection: EditingSection;\n animPhase: AnimPhase;\n showEditContent: boolean;\n handleEditSection: (section: EditingSection) => void;\n handleBackClick: () => void;\n}\n\nexport function useMySiteEditingSection(): MySiteEditingSectionState {\n const [animPhase, setAnimPhase] = useState<AnimPhase>(\"idle\");\n const [editingSection, setEditingSection] = useState<EditingSection>(null);\n const timeoutsRef = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n useEffect(() => {\n const ref = timeoutsRef;\n return () => ref.current.forEach(clearTimeout);\n }, []);\n\n const cancelScheduled = useCallback(() => {\n timeoutsRef.current.forEach(clearTimeout);\n timeoutsRef.current = [];\n }, []);\n\n const schedule = useCallback((phase: AnimPhase, delay: number) => {\n const id = setTimeout(() => setAnimPhase(phase), delay);\n timeoutsRef.current.push(id);\n }, []);\n\n const showEditContent = [\n \"slide\",\n \"fade-in\",\n \"editing\",\n \"exit-fade-out\",\n \"exit-slide\",\n ].includes(animPhase);\n\n const handleEditSection = useCallback(\n (section: EditingSection) => {\n cancelScheduled();\n setEditingSection(section);\n setAnimPhase(\"fade-out\");\n schedule(\"slide\", FADE_MS);\n schedule(\"fade-in\", FADE_MS + SLIDE_MS);\n schedule(\"editing\", FADE_MS + SLIDE_MS + FADE_MS);\n },\n [cancelScheduled, schedule],\n );\n\n const handleBackClick = useCallback(() => {\n cancelScheduled();\n setAnimPhase(\"exit-fade-out\");\n schedule(\"exit-slide\", FADE_MS);\n schedule(\"exit-fade-in\", FADE_MS + SLIDE_MS);\n const id = setTimeout(\n () => {\n setAnimPhase(\"idle\");\n setEditingSection(null);\n },\n FADE_MS + SLIDE_MS + FADE_MS,\n );\n timeoutsRef.current.push(id);\n }, [cancelScheduled, schedule]);\n\n return {\n editingSection,\n animPhase,\n showEditContent,\n handleEditSection,\n handleBackClick,\n };\n}\n","import React, { useCallback, useMemo } from \"react\";\nimport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from \"@fluid-app/ui-primitives\";\nimport { useScreenHeaderBreadcrumbs } from \"@fluid-app/portal-react/shell/ScreenHeaderContext\";\nimport type { WidgetPropertySchema } from \"../../registries/property-schema-types\";\nimport { MySiteMainView } from \"./MySiteMainView\";\nimport { useMySiteEditingSection } from \"./use-mysite-editing-section\";\nimport type { MySiteScreenProps } from \"./types\";\n\nexport type { MySiteScreenProps } from \"./types\";\nexport type { MeProfile } from \"./types\";\n\nexport function MySiteScreen({\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: MySiteScreenProps): React.JSX.Element {\n const {\n editingSection,\n animPhase,\n showEditContent,\n handleEditSection,\n handleBackClick,\n } = useMySiteEditingSection();\n\n const sectionLabel = useMemo(() => {\n if (editingSection === \"theme\") return \"Theme\";\n if (editingSection === \"buttons\") return \"Buttons\";\n if (editingSection === \"content\") return \"MySite Content\";\n if (editingSection === \"profile\") return \"Profile\";\n return null;\n }, [editingSection]);\n\n const handleRootCrumbClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n if (editingSection !== null) handleBackClick();\n },\n [editingSection, handleBackClick],\n );\n\n const headerBreadcrumbs = useMemo(\n () => (\n <Breadcrumb>\n <BreadcrumbList className=\"text-lg\">\n <BreadcrumbItem>\n {sectionLabel ? (\n <BreadcrumbLink href=\"#\" onClick={handleRootCrumbClick}>\n My Site\n </BreadcrumbLink>\n ) : (\n <BreadcrumbPage className=\"font-semibold\">My Site</BreadcrumbPage>\n )}\n </BreadcrumbItem>\n {sectionLabel && (\n <>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n <BreadcrumbPage className=\"font-semibold\">\n {sectionLabel}\n </BreadcrumbPage>\n </BreadcrumbItem>\n </>\n )}\n </BreadcrumbList>\n </Breadcrumb>\n ),\n [sectionLabel, handleRootCrumbClick],\n );\n useScreenHeaderBreadcrumbs(headerBreadcrumbs);\n\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <MySiteMainView\n editingSection={editingSection}\n animPhase={animPhase}\n showEditContent={showEditContent}\n onEditSection={handleEditSection}\n onBackClick={handleBackClick}\n />\n </div>\n );\n}\n\nexport const mySiteScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"MySiteScreen\",\n displayName: \"My Site Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,oBAAoB,OAA0B;AAC5D,SAAQ,OAAR;EACE,KAAK,OACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,KAAK,gBACH,QAAO;EACT,KAAK,aACH,QAAO;EACT,KAAK,eACH,QAAO;;;AAIb,SAAgB,oBAAoB,OAA0B;AAC5D,SAAQ,OAAR;EACE,KAAK;EACL,KAAK;EACL,KAAK,eACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,KAAK;EACL,KAAK;EACL,KAAK,gBACH,QAAO;EACT,KAAK,aACH,QAAO;;;;;ACpCb,SAAgB,yBAAyB,EACvC,OACA,SAIoB;AACpB,QACE,iBAAA,GAAA,kBAAA,MAACA,YAAAA,MAAD;EAAM,WAAU;YAAhB,CACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,YAAD;GAAY,WAAU;aACpB,iBAAA,GAAA,kBAAA,KAACC,YAAAA,WAAD;IAAW,WAAU;cAAU;IAA2B,CAAA;GAC/C,CAAA,EACb,iBAAA,GAAA,kBAAA,MAACC,YAAAA,aAAD;GAAa,WAAU;aAAvB;IACE,iBAAA,GAAA,kBAAA,MAA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