@fluid-app/portal-sdk 0.1.75 → 0.1.77
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-fNFKA1nn.cjs → ContactsScreen-B45I4fsu.cjs} +2 -2
- package/dist/{ContactsScreen-fNFKA1nn.cjs.map → ContactsScreen-B45I4fsu.cjs.map} +1 -1
- package/dist/{ContactsScreen-pCkw9htG.cjs → ContactsScreen-BY_bV9hD.cjs} +2 -2
- package/dist/{ContactsScreen-CzvfANNV.mjs → ContactsScreen-fv44z4G1.mjs} +2 -2
- package/dist/{ContactsScreen-CzvfANNV.mjs.map → ContactsScreen-fv44z4G1.mjs.map} +1 -1
- package/dist/{MessagingScreen-Bp5t4STI.mjs → MessagingScreen-L76XP3Oz.mjs} +1 -0
- package/dist/{MySiteScreen-CqeZTwj9.mjs → MySiteScreen-BfYDwE3C.mjs} +12 -11
- package/dist/MySiteScreen-BfYDwE3C.mjs.map +1 -0
- package/dist/{MySiteScreen-BhFE_jmk.cjs → MySiteScreen-CEb9L0vp.cjs} +1 -1
- package/dist/{MySiteScreen-Ci2rLGQc.cjs → MySiteScreen-DY7PSqP6.cjs} +11 -10
- package/dist/MySiteScreen-DY7PSqP6.cjs.map +1 -0
- package/dist/{OrdersScreen-Bkdrj8I1.cjs → OrdersScreen-CB_VOlRI.cjs} +2 -2
- package/dist/{OrdersScreen-Bkdrj8I1.cjs.map → OrdersScreen-CB_VOlRI.cjs.map} +1 -1
- package/dist/{OrdersScreen-DOI-Rl_H.mjs → OrdersScreen-CuQTI5f9.mjs} +2 -2
- package/dist/{OrdersScreen-DOI-Rl_H.mjs.map → OrdersScreen-CuQTI5f9.mjs.map} +1 -1
- package/dist/{OrdersScreen-GlJc86ai.cjs → OrdersScreen-D5_PtRCp.cjs} +2 -2
- package/dist/{ProductsScreen-SExV06P8.mjs → ProductsScreen-BQlgLkmn.mjs} +6 -2
- package/dist/{ProductsScreen-KLajmCLk.mjs → ProductsScreen-CGe2U2jo.mjs} +2 -2
- package/dist/{ProductsScreen-KLajmCLk.mjs.map → ProductsScreen-CGe2U2jo.mjs.map} +1 -1
- package/dist/{ProductsScreen-D1hLP4qn.cjs → ProductsScreen-DzJlDMus.cjs} +2 -2
- package/dist/{ProductsScreen-D1hLP4qn.cjs.map → ProductsScreen-DzJlDMus.cjs.map} +1 -1
- package/dist/{ProductsScreen-DD07WW44.cjs → ProductsScreen-a7n9oVPF.cjs} +2 -2
- package/dist/{ShareablesScreen-C_aJXryA.mjs → ShareablesScreen-B67BMAUa.mjs} +6 -2
- package/dist/{ShareablesScreen-CA8sm7n_.cjs → ShareablesScreen-BSy0IA8v.cjs} +2 -2
- package/dist/{ShareablesScreen-CA8sm7n_.cjs.map → ShareablesScreen-BSy0IA8v.cjs.map} +1 -1
- package/dist/{ShareablesScreen-BKidUZz_.cjs → ShareablesScreen-BnAtijbM.cjs} +2 -2
- package/dist/{ShareablesScreen-CTruUco1.mjs → ShareablesScreen-CRtMGs-h.mjs} +2 -2
- package/dist/{ShareablesScreen-CTruUco1.mjs.map → ShareablesScreen-CRtMGs-h.mjs.map} +1 -1
- package/dist/{ShopScreen-D0xqkK7W.cjs → ShopScreen-5t5Jqdw5.cjs} +1 -1
- package/dist/{ShopScreen-BZLvCzbI.mjs → ShopScreen-BpQQ00y7.mjs} +3 -3
- package/dist/{ShopScreen-BZLvCzbI.mjs.map → ShopScreen-BpQQ00y7.mjs.map} +1 -1
- package/dist/{ShopScreen-saEPQJZ-.cjs → ShopScreen-OfnN0oCo.cjs} +5 -5
- package/dist/{ShopScreen-saEPQJZ-.cjs.map → ShopScreen-OfnN0oCo.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-C2n-qh9n.mjs → SubscriptionsScreen-CBoAwhKQ.mjs} +2 -2
- package/dist/{SubscriptionsScreen-C2n-qh9n.mjs.map → SubscriptionsScreen-CBoAwhKQ.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-Lvd76SAc.cjs → SubscriptionsScreen-D5oQ8bt1.cjs} +2 -2
- package/dist/{SubscriptionsScreen-Lvd76SAc.cjs.map → SubscriptionsScreen-D5oQ8bt1.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-B_RaW9A9.cjs → SubscriptionsScreen-DxYZJ0k6.cjs} +2 -2
- package/dist/index.cjs +23 -23
- package/dist/index.mjs +25 -25
- package/dist/{order-detail-LrdeXs2m.cjs → order-detail-65Ln2EUO.cjs} +25 -38
- package/dist/{order-detail-LrdeXs2m.cjs.map → order-detail-65Ln2EUO.cjs.map} +1 -1
- package/dist/{order-detail--h20GcWg.mjs → order-detail-o-C0YhaZ.mjs} +25 -38
- package/dist/{order-detail--h20GcWg.mjs.map → order-detail-o-C0YhaZ.mjs.map} +1 -1
- package/dist/{src-B-aQFEbA.cjs → src-fXyI4AWk.cjs} +36 -35
- package/dist/src-fXyI4AWk.cjs.map +1 -0
- package/dist/{src-CvQ9ezCI.mjs → src-nhqydD53.mjs} +36 -35
- package/dist/src-nhqydD53.mjs.map +1 -0
- package/package.json +22 -18
- package/dist/MySiteScreen-Ci2rLGQc.cjs.map +0 -1
- package/dist/MySiteScreen-CqeZTwj9.mjs.map +0 -1
- package/dist/src-B-aQFEbA.cjs.map +0 -1
- package/dist/src-CvQ9ezCI.mjs.map +0 -1
|
@@ -4176,11 +4176,11 @@ const MediaTab = ({ config, onSelectionChange, onMediaDataChange, selectedMediaI
|
|
|
4176
4176
|
className: "space-y-4",
|
|
4177
4177
|
children: [
|
|
4178
4178
|
/* @__PURE__ */ jsx(Dialog, {
|
|
4179
|
-
open: previewMedia
|
|
4179
|
+
open: !!previewMedia,
|
|
4180
4180
|
onOpenChange: (open) => !open && onPreviewMediaChange?.(null),
|
|
4181
4181
|
children: /* @__PURE__ */ jsxs(DialogPortal, {
|
|
4182
4182
|
container: previewContainer ?? void 0,
|
|
4183
|
-
children: [/* @__PURE__ */ jsx(DialogOverlay, { className: "z-9999 bg-black/70 backdrop-blur-none" }), /* @__PURE__ */ jsx(
|
|
4183
|
+
children: [/* @__PURE__ */ jsx(DialogOverlay, { className: "z-9999 bg-black/70 backdrop-blur-none" }), /* @__PURE__ */ jsx(DialogContent, {
|
|
4184
4184
|
className: "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-1/2 left-1/2 z-10000 max-h-[85vh] w-full max-w-4xl -translate-x-1/2 -translate-y-1/2 overflow-hidden bg-white shadow-xl",
|
|
4185
4185
|
style: { zIndex: 1e4 },
|
|
4186
4186
|
children: previewMedia && /* @__PURE__ */ jsx("div", {
|
|
@@ -6820,12 +6820,6 @@ function PlaylistCard({ title, imageUrl, href, itemCount, isFavorited = false, i
|
|
|
6820
6820
|
//#endregion
|
|
6821
6821
|
//#region ../../shareables/ui/src/components/playlists/SearchAndSortBar.tsx
|
|
6822
6822
|
const PLAYLIST_SORT_OPTIONS = [
|
|
6823
|
-
{
|
|
6824
|
-
id: "is_favorited",
|
|
6825
|
-
label: "Favorited",
|
|
6826
|
-
sortBy: "is_favorited",
|
|
6827
|
-
sortDirection: "desc"
|
|
6828
|
-
},
|
|
6829
6823
|
{
|
|
6830
6824
|
id: "title_asc",
|
|
6831
6825
|
label: "Name (A-Z)",
|
|
@@ -6849,24 +6843,6 @@ const PLAYLIST_SORT_OPTIONS = [
|
|
|
6849
6843
|
label: "Date Created (Oldest)",
|
|
6850
6844
|
sortBy: "created_at",
|
|
6851
6845
|
sortDirection: "asc"
|
|
6852
|
-
},
|
|
6853
|
-
{
|
|
6854
|
-
id: "updated_at_desc",
|
|
6855
|
-
label: "Date Modified (Recent)",
|
|
6856
|
-
sortBy: "updated_at",
|
|
6857
|
-
sortDirection: "desc"
|
|
6858
|
-
},
|
|
6859
|
-
{
|
|
6860
|
-
id: "updated_at_asc",
|
|
6861
|
-
label: "Date Modified (Oldest)",
|
|
6862
|
-
sortBy: "updated_at",
|
|
6863
|
-
sortDirection: "asc"
|
|
6864
|
-
},
|
|
6865
|
-
{
|
|
6866
|
-
id: "shares_count",
|
|
6867
|
-
label: "Most Shared",
|
|
6868
|
-
sortBy: "shares_count",
|
|
6869
|
-
sortDirection: "desc"
|
|
6870
6846
|
}
|
|
6871
6847
|
];
|
|
6872
6848
|
function SearchAndSortBar({ searchTerm, onSearchTermChange, currentSort, onSortChange, placeholder = "Search playlists...", sortOptions = PLAYLIST_SORT_OPTIONS }) {
|
|
@@ -6966,7 +6942,7 @@ function PlaylistsListingScreen(_props) {
|
|
|
6966
6942
|
}) })
|
|
6967
6943
|
}) }), []));
|
|
6968
6944
|
const [searchTerm, setSearchTerm] = useState("");
|
|
6969
|
-
const [currentSort, setCurrentSort] = useState(PLAYLIST_SORT_OPTIONS[
|
|
6945
|
+
const [currentSort, setCurrentSort] = useState(PLAYLIST_SORT_OPTIONS[0]);
|
|
6970
6946
|
const [selectedIds, setSelectedIds] = useState(/* @__PURE__ */ new Set());
|
|
6971
6947
|
const debouncedSearch = useDebounce(searchTerm, 300);
|
|
6972
6948
|
const observerTarget = useRef(null);
|
|
@@ -7190,6 +7166,13 @@ function PlaylistsListingScreen(_props) {
|
|
|
7190
7166
|
})] });
|
|
7191
7167
|
}
|
|
7192
7168
|
//#endregion
|
|
7169
|
+
//#region ../../shareables/ui/src/constants.ts
|
|
7170
|
+
const NAVIGABLE_RELATEABLE_TYPES = new Set([
|
|
7171
|
+
"Product",
|
|
7172
|
+
"Page",
|
|
7173
|
+
"Medium"
|
|
7174
|
+
]);
|
|
7175
|
+
//#endregion
|
|
7193
7176
|
//#region ../../shareables/ui/src/components/SharePage/TaggedProductsList.tsx
|
|
7194
7177
|
const DEFAULT_IMAGE$3 = "https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png";
|
|
7195
7178
|
function resolvePrice(product) {
|
|
@@ -7200,9 +7183,9 @@ function resolvePrice(product) {
|
|
|
7200
7183
|
else if (firstVariant?.price) price = firstVariant.price;
|
|
7201
7184
|
}
|
|
7202
7185
|
if (!price) return null;
|
|
7186
|
+
const numPrice = parseFloat(price.replace(/[^0-9.-]/g, ""));
|
|
7187
|
+
if (Number.isNaN(numPrice) || numPrice <= 0) return null;
|
|
7203
7188
|
if (price.includes("$")) return price;
|
|
7204
|
-
const numPrice = parseFloat(price);
|
|
7205
|
-
if (Number.isNaN(numPrice)) return price;
|
|
7206
7189
|
return `$${numPrice.toFixed(2)}`;
|
|
7207
7190
|
}
|
|
7208
7191
|
function TaggedProductsList({ products, onProductClick }) {
|
|
@@ -7296,6 +7279,7 @@ function TaggedProductsList({ products, onProductClick }) {
|
|
|
7296
7279
|
const DEFAULT_IMAGE$2 = "https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png";
|
|
7297
7280
|
function getItemType(type, kind) {
|
|
7298
7281
|
if (type === "Product") return "Product";
|
|
7282
|
+
if (type === "EnrollmentPack") return "Enrollment";
|
|
7299
7283
|
if (type === "Page") return "Page";
|
|
7300
7284
|
if (kind === "video") return "Video";
|
|
7301
7285
|
if (kind === "image") return "Image";
|
|
@@ -7352,11 +7336,13 @@ function PlaylistItemsList({ items, onSelectItem, selectedItemIndex = 0, onNavig
|
|
|
7352
7336
|
const relateable = item.relateable;
|
|
7353
7337
|
const imageUrl = relateable?.image_url || relateable?.compressed_image_url || DEFAULT_IMAGE$2;
|
|
7354
7338
|
const title = relateable?.title || "Untitled";
|
|
7355
|
-
const
|
|
7339
|
+
const rawPrice = relateable?.display_price || relateable?.price;
|
|
7340
|
+
const price = rawPrice && parseFloat(rawPrice.replace(/[^0-9.-]/g, "")) > 0 ? rawPrice : null;
|
|
7356
7341
|
const itemType = getItemType(item.relateable_type, relateable?.kind);
|
|
7357
7342
|
const isVideo = relateable?.kind === "video";
|
|
7358
7343
|
const isImage = relateable?.kind === "image";
|
|
7359
7344
|
const isProduct = item.relateable_type === "Product";
|
|
7345
|
+
const isNavigable = NAVIGABLE_RELATEABLE_TYPES.has(item.relateable_type ?? "");
|
|
7360
7346
|
const videoLength = formatVideoLength(relateable?.duration);
|
|
7361
7347
|
const fileType = getFileType(relateable?.media_format, relateable?.image_url);
|
|
7362
7348
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -7379,13 +7365,19 @@ function PlaylistItemsList({ items, onSelectItem, selectedItemIndex = 0, onNavig
|
|
|
7379
7365
|
}), /* @__PURE__ */ jsxs("div", {
|
|
7380
7366
|
className: "flex min-w-0 flex-1 flex-col gap-1 py-1",
|
|
7381
7367
|
children: [
|
|
7382
|
-
/* @__PURE__ */ jsxs("button", {
|
|
7368
|
+
isNavigable ? /* @__PURE__ */ jsxs("button", {
|
|
7383
7369
|
onClick: (e) => handleNavigateToItem(relateable?.id ?? item.id, item.relateable_type, e),
|
|
7384
7370
|
className: "group text-foreground flex items-start gap-1.5 text-left text-[15px] leading-[1.4] font-semibold hover:underline",
|
|
7385
7371
|
children: [/* @__PURE__ */ jsx("span", {
|
|
7386
7372
|
className: "line-clamp-2",
|
|
7387
7373
|
children: title
|
|
7388
7374
|
}), /* @__PURE__ */ jsx(ArrowUpRight, { className: "text-foreground mt-0.5 h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-100" })]
|
|
7375
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
7376
|
+
className: "text-foreground text-[15px] leading-[1.4] font-semibold",
|
|
7377
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
7378
|
+
className: "line-clamp-2",
|
|
7379
|
+
children: title
|
|
7380
|
+
})
|
|
7389
7381
|
}),
|
|
7390
7382
|
isProduct && price && /* @__PURE__ */ jsx("div", {
|
|
7391
7383
|
className: "text-foreground text-[15px] leading-[1.4] font-normal",
|
|
@@ -7591,9 +7583,10 @@ function PlaylistDetailScreen({ playlistId, onNavigate }) {
|
|
|
7591
7583
|
onSelectItem: setSelectedPlaylistItemIndex,
|
|
7592
7584
|
selectedItemIndex: selectedPlaylistItemIndex,
|
|
7593
7585
|
onNavigateToItem: (itemId, relateableType) => {
|
|
7586
|
+
if (!NAVIGABLE_RELATEABLE_TYPES.has(relateableType ?? "")) return;
|
|
7594
7587
|
if (relateableType === "Product") onNavigate?.("product", String(itemId));
|
|
7595
7588
|
else if (relateableType === "Page") onNavigate?.("page", String(itemId));
|
|
7596
|
-
else onNavigate?.("media", String(itemId));
|
|
7589
|
+
else if (relateableType === "Medium") onNavigate?.("media", String(itemId));
|
|
7597
7590
|
}
|
|
7598
7591
|
})]
|
|
7599
7592
|
})
|
|
@@ -8290,6 +8283,8 @@ function computeOrderedItems(items) {
|
|
|
8290
8283
|
}
|
|
8291
8284
|
function PlaylistItemsSection({ playlistId }) {
|
|
8292
8285
|
const { showToast, filePickerClient } = useShareablesUI();
|
|
8286
|
+
const shareablesApiClient = useShareablesClient();
|
|
8287
|
+
const repContext = useRepContext();
|
|
8293
8288
|
const [filePickerOpen, setFilePickerOpen] = useState(false);
|
|
8294
8289
|
const { items: contextItems, updateItems, addItem, removeItem } = usePlaylistItems();
|
|
8295
8290
|
const tableItems = contextItems;
|
|
@@ -8407,9 +8402,15 @@ function PlaylistItemsSection({ playlistId }) {
|
|
|
8407
8402
|
}),
|
|
8408
8403
|
loading: () => "",
|
|
8409
8404
|
dismiss: () => {}
|
|
8410
|
-
}
|
|
8405
|
+
},
|
|
8406
|
+
shareablesClient: { media: { list: (filters) => getMedia(shareablesApiClient, filters ?? {}, repContext) } }
|
|
8411
8407
|
};
|
|
8412
|
-
}, [
|
|
8408
|
+
}, [
|
|
8409
|
+
filePickerClient,
|
|
8410
|
+
showToast,
|
|
8411
|
+
shareablesApiClient,
|
|
8412
|
+
repContext
|
|
8413
|
+
]);
|
|
8413
8414
|
return /* @__PURE__ */ jsxs("div", {
|
|
8414
8415
|
className: "border-border bg-card rounded-lg border p-4",
|
|
8415
8416
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -8997,4 +8998,4 @@ function ProductsApp({ countryCode, companyLogoUrl, productId: controlledProduct
|
|
|
8997
8998
|
//#endregion
|
|
8998
8999
|
export { ShareablesCoreProvider as i, ShareablesApp as n, ShareablesUIProvider as r, ProductsApp as t };
|
|
8999
9000
|
|
|
9000
|
-
//# sourceMappingURL=src-
|
|
9001
|
+
//# sourceMappingURL=src-nhqydD53.mjs.map
|