@fluid-app/portal-sdk 0.1.194 → 0.1.196
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/{FluidProvider-dp9q6oRM.mjs → FluidProvider-CGqVqcHP.mjs} +3 -3
- package/dist/{FluidProvider-dp9q6oRM.mjs.map → FluidProvider-CGqVqcHP.mjs.map} +1 -1
- package/dist/{FluidProvider-BWBEdHQQ.cjs → FluidProvider-j5QX1XRm.cjs} +3 -3
- package/dist/{FluidProvider-BWBEdHQQ.cjs.map → FluidProvider-j5QX1XRm.cjs.map} +1 -1
- package/dist/{MessagingScreen-DX8A0ahD.cjs → MessagingScreen-BaGLql5n.cjs} +2 -2
- package/dist/{MessagingScreen-DX8A0ahD.cjs.map → MessagingScreen-BaGLql5n.cjs.map} +1 -1
- package/dist/{MessagingScreen-CJ3p3ZHq.cjs → MessagingScreen-Beyb0TUm.cjs} +2 -2
- package/dist/{MessagingScreen-BNsaLpzu.mjs → MessagingScreen-CpUfQIFf.mjs} +2 -2
- package/dist/{MessagingScreen-BNsaLpzu.mjs.map → MessagingScreen-CpUfQIFf.mjs.map} +1 -1
- package/dist/{PortalContentApiProvider-Bxtd3cTD.mjs → PortalContentApiProvider-3zgq-z26.mjs} +54 -81
- package/dist/{PortalContentApiProvider-Bxtd3cTD.mjs.map → PortalContentApiProvider-3zgq-z26.mjs.map} +1 -1
- package/dist/{PortalContentApiProvider-D_0DbqrK.cjs → PortalContentApiProvider-Zoz_YDJM.cjs} +54 -81
- package/dist/{PortalContentApiProvider-D_0DbqrK.cjs.map → PortalContentApiProvider-Zoz_YDJM.cjs.map} +1 -1
- package/dist/{ProductsScreen-DliPMmcL.cjs → ProductsScreen-BLsyTVHI.cjs} +2 -2
- package/dist/{ProductsScreen-DjvCNiay.cjs → ProductsScreen-BiyYxql3.cjs} +2 -2
- package/dist/{ProductsScreen-DjvCNiay.cjs.map → ProductsScreen-BiyYxql3.cjs.map} +1 -1
- package/dist/{ProductsScreen-COiPDOoi.mjs → ProductsScreen-DNigWzOk.mjs} +2 -2
- package/dist/{ProductsScreen-COiPDOoi.mjs.map → ProductsScreen-DNigWzOk.mjs.map} +1 -1
- package/dist/{ProductsScreen-CIZEyhz1.mjs → ProductsScreen-xuQq68Lm.mjs} +2 -2
- package/dist/{ProfileScreen-DL-C2R6R.cjs → ProfileScreen-BoFYel4G.cjs} +2 -2
- package/dist/{ProfileScreen-BsjuHCor.cjs → ProfileScreen-CtMB7I96.cjs} +2 -2
- package/dist/{ProfileScreen-BsjuHCor.cjs.map → ProfileScreen-CtMB7I96.cjs.map} +1 -1
- package/dist/{ProfileScreen-eJvfI2YW.mjs → ProfileScreen-th1mmEn0.mjs} +2 -2
- package/dist/{ProfileScreen-eJvfI2YW.mjs.map → ProfileScreen-th1mmEn0.mjs.map} +1 -1
- package/dist/{ShareablesScreen-BDdgmBeh.cjs → ShareablesScreen-CP4uXPPz.cjs} +2 -2
- package/dist/{ShareablesScreen-Bk0VnMyz.mjs → ShareablesScreen-CfuQenlV.mjs} +2 -2
- package/dist/{ShareablesScreen-Bk0VnMyz.mjs.map → ShareablesScreen-CfuQenlV.mjs.map} +1 -1
- package/dist/{ShareablesScreen-ivCaHKjM.cjs → ShareablesScreen-Df9GKUVi.cjs} +2 -2
- package/dist/{ShareablesScreen-ivCaHKjM.cjs.map → ShareablesScreen-Df9GKUVi.cjs.map} +1 -1
- package/dist/{ShareablesScreen-C4OnaaH6.mjs → ShareablesScreen-w72hongE.mjs} +2 -2
- package/dist/{ShopScreen-X802gHEX.cjs → ShopScreen-CUWxEit0.cjs} +2 -2
- package/dist/{ShopScreen-X802gHEX.cjs.map → ShopScreen-CUWxEit0.cjs.map} +1 -1
- package/dist/{ShopScreen-DEFhDrcd.cjs → ShopScreen-DN8UWl8P.cjs} +2 -2
- package/dist/{ShopScreen-5AXTCtLQ.mjs → ShopScreen-z-1csZzu.mjs} +2 -2
- package/dist/{ShopScreen-5AXTCtLQ.mjs.map → ShopScreen-z-1csZzu.mjs.map} +1 -1
- package/dist/index.cjs +17 -17
- package/dist/index.mjs +17 -17
- package/package.json +16 -16
package/dist/{PortalContentApiProvider-D_0DbqrK.cjs → PortalContentApiProvider-Zoz_YDJM.cjs}
RENAMED
|
@@ -8927,7 +8927,7 @@ function PlaylistsListingScreen(_props) {
|
|
|
8927
8927
|
debouncedSearch,
|
|
8928
8928
|
sortValue
|
|
8929
8929
|
];
|
|
8930
|
-
const { data, isLoading, isFetchingNextPage, hasNextPage, fetchNextPage,
|
|
8930
|
+
const { data, isLoading, isFetchingNextPage, hasNextPage, fetchNextPage, error } = (0, _tanstack_react_query.useInfiniteQuery)({
|
|
8931
8931
|
queryKey,
|
|
8932
8932
|
queryFn: async ({ pageParam }) => {
|
|
8933
8933
|
const response = await api.playlists.getPlaylists({
|
|
@@ -9057,7 +9057,7 @@ function PlaylistsListingScreen(_props) {
|
|
|
9057
9057
|
showToast
|
|
9058
9058
|
]);
|
|
9059
9059
|
if (isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9060
|
-
className: "
|
|
9060
|
+
className: "space-y-6 px-4 py-4 md:px-10 md:py-6",
|
|
9061
9061
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9062
9062
|
className: "flex items-center gap-3",
|
|
9063
9063
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Skeleton, { className: "h-10 flex-1" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Skeleton, { className: "h-10 w-24" })]
|
|
@@ -9069,52 +9069,53 @@ function PlaylistsListingScreen(_props) {
|
|
|
9069
9069
|
}, i))
|
|
9070
9070
|
})]
|
|
9071
9071
|
});
|
|
9072
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
9073
|
-
className: "
|
|
9074
|
-
children:
|
|
9075
|
-
|
|
9076
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BulkSelectionBar, {
|
|
9072
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9073
|
+
className: "space-y-6 px-4 py-4 md:px-10 md:py-6",
|
|
9074
|
+
children: [
|
|
9075
|
+
hasSelection ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BulkSelectionBar, {
|
|
9077
9076
|
selectedCount: selectedIds.size,
|
|
9078
9077
|
totalCount: allPlaylists.length,
|
|
9079
9078
|
onSelectAll: handleSelectAll,
|
|
9080
9079
|
onClearSelection: handleClearSelection,
|
|
9081
9080
|
onBulkFavorite: handleBulkFavorite
|
|
9082
|
-
})
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9081
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9082
|
+
className: "flex justify-end",
|
|
9083
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9084
|
+
className: "w-full max-w-sm",
|
|
9085
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchSort.SearchSort, {
|
|
9086
|
+
searchValue: searchTerm,
|
|
9087
|
+
onSearchChange: setSearchTerm,
|
|
9088
|
+
placeholder: "Search playlists...",
|
|
9089
|
+
sortOptions: [
|
|
9090
|
+
{
|
|
9091
|
+
label: "Name (A-Z)",
|
|
9092
|
+
value: "title"
|
|
9093
|
+
},
|
|
9094
|
+
{
|
|
9095
|
+
label: "Name (Z-A)",
|
|
9096
|
+
value: "-title"
|
|
9097
|
+
},
|
|
9098
|
+
{
|
|
9099
|
+
label: "Date Created (Newest)",
|
|
9100
|
+
value: "-created_at"
|
|
9101
|
+
},
|
|
9102
|
+
{
|
|
9103
|
+
label: "Date Created (Oldest)",
|
|
9104
|
+
value: "created_at"
|
|
9105
|
+
}
|
|
9106
|
+
],
|
|
9107
|
+
sortValue,
|
|
9108
|
+
onSortChange: setSortValue
|
|
9109
|
+
})
|
|
9111
9110
|
})
|
|
9112
|
-
})
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9111
|
+
}),
|
|
9112
|
+
allPlaylists.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9113
|
+
className: "flex flex-col items-center justify-center py-16",
|
|
9114
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
9115
|
+
className: "text-muted-foreground text-sm",
|
|
9116
|
+
children: searchTerm ? `No playlists match "${searchTerm}". Try a different search term.` : "There are no playlists available at the moment."
|
|
9117
|
+
})
|
|
9118
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9118
9119
|
className: GRID_CLASS$1,
|
|
9119
9120
|
children: allPlaylists.map((playlist) => {
|
|
9120
9121
|
const firstItem = playlist.items?.[0];
|
|
@@ -9137,27 +9138,20 @@ function PlaylistsListingScreen(_props) {
|
|
|
9137
9138
|
}, playlist.id);
|
|
9138
9139
|
})
|
|
9139
9140
|
}),
|
|
9140
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9141
|
-
ref: observerTarget,
|
|
9142
|
-
className: "h-1"
|
|
9143
|
-
}),
|
|
9144
9141
|
isFetchingNextPage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9145
|
-
className: "flex
|
|
9142
|
+
className: "flex justify-center py-4",
|
|
9146
9143
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "border-primary h-6 w-6 animate-spin rounded-full border-2 border-t-transparent" })
|
|
9147
9144
|
}),
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
className: "text-muted-foreground text-sm",
|
|
9152
|
-
children: searchTerm ? `No playlists match "${searchTerm}". Try a different search term.` : "There are no playlists available at the moment."
|
|
9153
|
-
})
|
|
9145
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9146
|
+
ref: observerTarget,
|
|
9147
|
+
className: "h-1"
|
|
9154
9148
|
}),
|
|
9155
9149
|
error && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
9156
|
-
className: "bg-destructive/10 text-destructive
|
|
9150
|
+
className: "bg-destructive/10 text-destructive rounded-lg px-3 py-2",
|
|
9157
9151
|
children: ["Error: ", error.message]
|
|
9158
9152
|
})
|
|
9159
9153
|
]
|
|
9160
|
-
})
|
|
9154
|
+
});
|
|
9161
9155
|
}
|
|
9162
9156
|
//#endregion
|
|
9163
9157
|
//#region ../../shareables/ui/src/constants.ts
|
|
@@ -9522,7 +9516,7 @@ function PlaylistDetailScreen({ playlistId, onNavigate }) {
|
|
|
9522
9516
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9523
9517
|
className: "flex flex-col gap-4 px-4 py-4 md:px-10 md:py-6",
|
|
9524
9518
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9525
|
-
className: "mx-auto flex w-full max-w-[480px] flex-col gap-6 md:h-[calc(100vh-140px)] md:flex-row",
|
|
9519
|
+
className: "mx-auto flex w-full max-w-[480px] flex-col gap-6 md:h-[calc(100vh-140px)] md:max-w-none md:flex-row",
|
|
9526
9520
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9527
9521
|
className: "aspect-square w-full md:aspect-auto md:h-full",
|
|
9528
9522
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -9571,7 +9565,7 @@ function PlaylistDetailScreen({ playlistId, onNavigate }) {
|
|
|
9571
9565
|
}),
|
|
9572
9566
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Separator, { className: "border-foreground my-4" }),
|
|
9573
9567
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9574
|
-
className: "
|
|
9568
|
+
className: "bg-background rounded-lg",
|
|
9575
9569
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaggedProductsList, {
|
|
9576
9570
|
products: taggedProducts,
|
|
9577
9571
|
onProductClick: (productId) => onNavigate?.("product", String(productId))
|
|
@@ -11557,37 +11551,16 @@ const SHAREABLE_TYPE_MAP = {
|
|
|
11557
11551
|
Page: "page",
|
|
11558
11552
|
page: "page"
|
|
11559
11553
|
};
|
|
11560
|
-
/**
|
|
11561
|
-
* Build a direct page URL on the company app for a given shareable.
|
|
11562
|
-
*
|
|
11563
|
-
* Portal runs at `<tenant>.portal.fluid.app`; the company app is at
|
|
11564
|
-
* `<tenant>.fluid.app`. Strip the `.portal` segment to get the company
|
|
11565
|
-
* origin, then append the type-specific path.
|
|
11566
|
-
*/
|
|
11567
|
-
const SHARE_PATH_BY_TYPE = {
|
|
11568
|
-
product: "/home/products",
|
|
11569
|
-
media: "/home/media",
|
|
11570
|
-
library: "/home/libraries",
|
|
11571
|
-
page: "/home/pages"
|
|
11572
|
-
};
|
|
11573
|
-
function buildShareUrl(shareableType, shareUrl) {
|
|
11574
|
-
const basePath = SHARE_PATH_BY_TYPE[shareableType];
|
|
11575
|
-
if (!basePath) throw new Error(`Cannot build share URL for type "${shareableType}"`);
|
|
11576
|
-
if (typeof window === "undefined") throw new Error(`Cannot build share URL in a non-browser environment (type: "${shareableType}")`);
|
|
11577
|
-
const token = shareUrl.split("/s/")[1];
|
|
11578
|
-
if (!token) throw new Error(`Share URL missing expected /s/ token segment: "${shareUrl}"`);
|
|
11579
|
-
return `${window.location.origin.replace(/\.portal\./, ".")}${basePath}/${token}`;
|
|
11580
|
-
}
|
|
11581
11554
|
function createShareAdapter(client) {
|
|
11582
11555
|
const portAdapter = createRawSharesAdapter(client);
|
|
11583
11556
|
return { createShareLink: async (input) => {
|
|
11584
11557
|
if (!input.relateableId) throw new Error("Cannot create share link without a relateableId");
|
|
11585
11558
|
const shareableType = SHAREABLE_TYPE_MAP[input.relateableType];
|
|
11586
11559
|
if (!shareableType) throw new Error(`Unknown shareable type: "${input.relateableType}"`);
|
|
11587
|
-
return
|
|
11560
|
+
return (await portAdapter.createShare({
|
|
11588
11561
|
shareable_type: shareableType,
|
|
11589
11562
|
shareable_id: input.relateableId
|
|
11590
|
-
})).share.url
|
|
11563
|
+
})).share.url;
|
|
11591
11564
|
} };
|
|
11592
11565
|
}
|
|
11593
11566
|
function mapDamAsset(raw) {
|
|
@@ -11857,4 +11830,4 @@ Object.defineProperty(exports, "usePortalContentContext", {
|
|
|
11857
11830
|
}
|
|
11858
11831
|
});
|
|
11859
11832
|
|
|
11860
|
-
//# sourceMappingURL=PortalContentApiProvider-
|
|
11833
|
+
//# sourceMappingURL=PortalContentApiProvider-Zoz_YDJM.cjs.map
|