@fluid-app/portal-sdk 0.1.76 → 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/{MessagingScreen-Bp5t4STI.mjs → MessagingScreen-L76XP3Oz.mjs} +1 -0
- 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/index.cjs +10 -10
- package/dist/index.mjs +12 -12
- 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 +20 -16
- package/dist/src-B-aQFEbA.cjs.map +0 -1
- package/dist/src-CvQ9ezCI.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -50,11 +50,11 @@ const require_ContactsScreen = require("./ContactsScreen-B45I4fsu.cjs");
|
|
|
50
50
|
require("./src-C_kOrGdZ.cjs");
|
|
51
51
|
require("./dist-B4Ke7bHH.cjs");
|
|
52
52
|
const require_OrdersScreen = require("./OrdersScreen-CB_VOlRI.cjs");
|
|
53
|
-
require("./src-
|
|
54
|
-
const require_ShopScreen = require("./ShopScreen-
|
|
55
|
-
const require_ShareablesScreen = require("./ShareablesScreen-
|
|
53
|
+
require("./src-fXyI4AWk.cjs");
|
|
54
|
+
const require_ShopScreen = require("./ShopScreen-OfnN0oCo.cjs");
|
|
55
|
+
const require_ShareablesScreen = require("./ShareablesScreen-BSy0IA8v.cjs");
|
|
56
56
|
require("./dist-lO2OG0T5.cjs");
|
|
57
|
-
const require_ProductsScreen = require("./ProductsScreen-
|
|
57
|
+
const require_ProductsScreen = require("./ProductsScreen-DzJlDMus.cjs");
|
|
58
58
|
const require_MySiteScreen = require("./MySiteScreen-DY7PSqP6.cjs");
|
|
59
59
|
require("./UpgradeScreen-C93rBNY2.cjs");
|
|
60
60
|
require("./AppDownloadScreen-BICgVr39.cjs");
|
|
@@ -2638,10 +2638,10 @@ const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => requir
|
|
|
2638
2638
|
const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-DxYZJ0k6.cjs")).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
2639
2639
|
const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-ms1wGWHQ.cjs")).then((m) => ({ default: m.MessagingScreen })));
|
|
2640
2640
|
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-BY_bV9hD.cjs")).then((m) => ({ default: m.ContactsScreen })));
|
|
2641
|
-
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-
|
|
2641
|
+
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-5t5Jqdw5.cjs")).then((m) => ({ default: m.ShopScreen })));
|
|
2642
2642
|
const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-9f10-_AZ.cjs")).then((n) => n.CustomersScreen_exports).then((m) => ({ default: m.CustomersScreen })));
|
|
2643
|
-
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-
|
|
2644
|
-
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
2643
|
+
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-a7n9oVPF.cjs")).then((m) => ({ default: m.ProductsScreen })));
|
|
2644
|
+
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-BnAtijbM.cjs")).then((m) => ({ default: m.ShareablesScreen })));
|
|
2645
2645
|
const MySiteScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MySiteScreen-CEb9L0vp.cjs")).then((m) => ({ default: m.MySiteScreen })));
|
|
2646
2646
|
const UpgradeScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./UpgradeScreen-DTNlUcYa.cjs")).then((m) => ({ default: m.UpgradeScreen })));
|
|
2647
2647
|
const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-B2Cfv-uS.cjs")).then((m) => ({ default: m.AppDownloadScreen })));
|
|
@@ -4103,10 +4103,10 @@ const screenPropertySchemas = {
|
|
|
4103
4103
|
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-D5_PtRCp.cjs")).then((m) => m.ordersScreenPropertySchema),
|
|
4104
4104
|
SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-DxYZJ0k6.cjs")).then((m) => m.subscriptionsScreenPropertySchema),
|
|
4105
4105
|
CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-9f10-_AZ.cjs")).then((n) => n.CustomersScreen_exports).then((m) => m.customersScreenPropertySchema),
|
|
4106
|
-
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-
|
|
4106
|
+
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-a7n9oVPF.cjs")).then((m) => m.productsScreenPropertySchema),
|
|
4107
4107
|
MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-CEb9L0vp.cjs")).then((m) => m.mySiteScreenPropertySchema),
|
|
4108
|
-
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
4109
|
-
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-
|
|
4108
|
+
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-BnAtijbM.cjs")).then((m) => m.shareablesScreenPropertySchema),
|
|
4109
|
+
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-5t5Jqdw5.cjs")).then((m) => m.shopScreenPropertySchema),
|
|
4110
4110
|
UpgradeScreen: () => Promise.resolve().then(() => require("./UpgradeScreen-DTNlUcYa.cjs")).then((m) => m.upgradeScreenPropertySchema),
|
|
4111
4111
|
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-B2Cfv-uS.cjs")).then((m) => m.appDownloadScreenPropertySchema)
|
|
4112
4112
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -48,11 +48,11 @@ import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./Contac
|
|
|
48
48
|
import "./src-BakNjVTk.mjs";
|
|
49
49
|
import "./dist-Cl4FsM3V.mjs";
|
|
50
50
|
import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-CuQTI5f9.mjs";
|
|
51
|
-
import "./src-
|
|
52
|
-
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-
|
|
53
|
-
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-
|
|
51
|
+
import "./src-nhqydD53.mjs";
|
|
52
|
+
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-BpQQ00y7.mjs";
|
|
53
|
+
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-CRtMGs-h.mjs";
|
|
54
54
|
import "./sortable.esm-CzzU6kIR.mjs";
|
|
55
|
-
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-
|
|
55
|
+
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-CGe2U2jo.mjs";
|
|
56
56
|
import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-BfYDwE3C.mjs";
|
|
57
57
|
import "./UpgradeScreen-CaTBqSyO.mjs";
|
|
58
58
|
import "./AppDownloadScreen-0bjHFsn8.mjs";
|
|
@@ -2634,12 +2634,12 @@ function AccountManageLayout({ children }) {
|
|
|
2634
2634
|
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-Y5zQgZL0.mjs").then((n) => n.n).then((m) => ({ default: m.ProfileScreen })));
|
|
2635
2635
|
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-CuQTI5f9.mjs").then((n) => n.n).then((m) => ({ default: m.OrdersScreen })));
|
|
2636
2636
|
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-CBoAwhKQ.mjs").then((n) => n.n).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
2637
|
-
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-
|
|
2637
|
+
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-L76XP3Oz.mjs").then((m) => ({ default: m.MessagingScreen })));
|
|
2638
2638
|
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-fv44z4G1.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
|
|
2639
|
-
const ShopScreen$1 = lazy(() => import("./ShopScreen-
|
|
2639
|
+
const ShopScreen$1 = lazy(() => import("./ShopScreen-BpQQ00y7.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
|
|
2640
2640
|
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-xAauAB-B.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
|
|
2641
|
-
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-
|
|
2642
|
-
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-
|
|
2641
|
+
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-BQlgLkmn.mjs").then((m) => ({ default: m.ProductsScreen })));
|
|
2642
|
+
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-B67BMAUa.mjs").then((m) => ({ default: m.ShareablesScreen })));
|
|
2643
2643
|
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-BfYDwE3C.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
|
|
2644
2644
|
const UpgradeScreen = lazy(() => import("./UpgradeScreen-CaTBqSyO.mjs").then((n) => n.t).then((m) => ({ default: m.UpgradeScreen })));
|
|
2645
2645
|
const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-0bjHFsn8.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
|
|
@@ -4096,15 +4096,15 @@ function useContact(_contactId) {
|
|
|
4096
4096
|
//#region src/screens/index.ts
|
|
4097
4097
|
const screenPropertySchemas = {
|
|
4098
4098
|
ProfileScreen: () => import("./ProfileScreen-Y5zQgZL0.mjs").then((n) => n.n).then((m) => m.profileScreenPropertySchema),
|
|
4099
|
-
MessagingScreen: () => import("./MessagingScreen-
|
|
4099
|
+
MessagingScreen: () => import("./MessagingScreen-L76XP3Oz.mjs").then((m) => m.messagingScreenPropertySchema),
|
|
4100
4100
|
ContactsScreen: () => import("./ContactsScreen-fv44z4G1.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
|
|
4101
4101
|
OrdersScreen: () => import("./OrdersScreen-CuQTI5f9.mjs").then((n) => n.n).then((m) => m.ordersScreenPropertySchema),
|
|
4102
4102
|
SubscriptionsScreen: () => import("./SubscriptionsScreen-CBoAwhKQ.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
|
|
4103
4103
|
CustomersScreen: () => import("./CustomersScreen-xAauAB-B.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
|
|
4104
|
-
ProductsScreen: () => import("./ProductsScreen-
|
|
4104
|
+
ProductsScreen: () => import("./ProductsScreen-BQlgLkmn.mjs").then((m) => m.productsScreenPropertySchema),
|
|
4105
4105
|
MySiteScreen: () => import("./MySiteScreen-BfYDwE3C.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
|
|
4106
|
-
ShareablesScreen: () => import("./ShareablesScreen-
|
|
4107
|
-
ShopScreen: () => import("./ShopScreen-
|
|
4106
|
+
ShareablesScreen: () => import("./ShareablesScreen-B67BMAUa.mjs").then((m) => m.shareablesScreenPropertySchema),
|
|
4107
|
+
ShopScreen: () => import("./ShopScreen-BpQQ00y7.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema),
|
|
4108
4108
|
UpgradeScreen: () => import("./UpgradeScreen-CaTBqSyO.mjs").then((n) => n.t).then((m) => m.upgradeScreenPropertySchema),
|
|
4109
4109
|
AppDownloadScreen: () => import("./AppDownloadScreen-0bjHFsn8.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema)
|
|
4110
4110
|
};
|
|
@@ -4179,11 +4179,11 @@ const MediaTab = ({ config, onSelectionChange, onMediaDataChange, selectedMediaI
|
|
|
4179
4179
|
className: "space-y-4",
|
|
4180
4180
|
children: [
|
|
4181
4181
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Dialog, {
|
|
4182
|
-
open: previewMedia
|
|
4182
|
+
open: !!previewMedia,
|
|
4183
4183
|
onOpenChange: (open) => !open && onPreviewMediaChange?.(null),
|
|
4184
4184
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.DialogPortal, {
|
|
4185
4185
|
container: previewContainer ?? void 0,
|
|
4186
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogOverlay, { className: "z-9999 bg-black/70 backdrop-blur-none" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.
|
|
4186
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogOverlay, { className: "z-9999 bg-black/70 backdrop-blur-none" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogContent, {
|
|
4187
4187
|
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",
|
|
4188
4188
|
style: { zIndex: 1e4 },
|
|
4189
4189
|
children: previewMedia && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -6823,12 +6823,6 @@ function PlaylistCard({ title, imageUrl, href, itemCount, isFavorited = false, i
|
|
|
6823
6823
|
//#endregion
|
|
6824
6824
|
//#region ../../shareables/ui/src/components/playlists/SearchAndSortBar.tsx
|
|
6825
6825
|
const PLAYLIST_SORT_OPTIONS = [
|
|
6826
|
-
{
|
|
6827
|
-
id: "is_favorited",
|
|
6828
|
-
label: "Favorited",
|
|
6829
|
-
sortBy: "is_favorited",
|
|
6830
|
-
sortDirection: "desc"
|
|
6831
|
-
},
|
|
6832
6826
|
{
|
|
6833
6827
|
id: "title_asc",
|
|
6834
6828
|
label: "Name (A-Z)",
|
|
@@ -6852,24 +6846,6 @@ const PLAYLIST_SORT_OPTIONS = [
|
|
|
6852
6846
|
label: "Date Created (Oldest)",
|
|
6853
6847
|
sortBy: "created_at",
|
|
6854
6848
|
sortDirection: "asc"
|
|
6855
|
-
},
|
|
6856
|
-
{
|
|
6857
|
-
id: "updated_at_desc",
|
|
6858
|
-
label: "Date Modified (Recent)",
|
|
6859
|
-
sortBy: "updated_at",
|
|
6860
|
-
sortDirection: "desc"
|
|
6861
|
-
},
|
|
6862
|
-
{
|
|
6863
|
-
id: "updated_at_asc",
|
|
6864
|
-
label: "Date Modified (Oldest)",
|
|
6865
|
-
sortBy: "updated_at",
|
|
6866
|
-
sortDirection: "asc"
|
|
6867
|
-
},
|
|
6868
|
-
{
|
|
6869
|
-
id: "shares_count",
|
|
6870
|
-
label: "Most Shared",
|
|
6871
|
-
sortBy: "shares_count",
|
|
6872
|
-
sortDirection: "desc"
|
|
6873
6849
|
}
|
|
6874
6850
|
];
|
|
6875
6851
|
function SearchAndSortBar({ searchTerm, onSearchTermChange, currentSort, onSortChange, placeholder = "Search playlists...", sortOptions = PLAYLIST_SORT_OPTIONS }) {
|
|
@@ -6969,7 +6945,7 @@ function PlaylistsListingScreen(_props) {
|
|
|
6969
6945
|
}) })
|
|
6970
6946
|
}) }), []));
|
|
6971
6947
|
const [searchTerm, setSearchTerm] = (0, react.useState)("");
|
|
6972
|
-
const [currentSort, setCurrentSort] = (0, react.useState)(PLAYLIST_SORT_OPTIONS[
|
|
6948
|
+
const [currentSort, setCurrentSort] = (0, react.useState)(PLAYLIST_SORT_OPTIONS[0]);
|
|
6973
6949
|
const [selectedIds, setSelectedIds] = (0, react.useState)(/* @__PURE__ */ new Set());
|
|
6974
6950
|
const debouncedSearch = useDebounce(searchTerm, 300);
|
|
6975
6951
|
const observerTarget = (0, react.useRef)(null);
|
|
@@ -7193,6 +7169,13 @@ function PlaylistsListingScreen(_props) {
|
|
|
7193
7169
|
})] });
|
|
7194
7170
|
}
|
|
7195
7171
|
//#endregion
|
|
7172
|
+
//#region ../../shareables/ui/src/constants.ts
|
|
7173
|
+
const NAVIGABLE_RELATEABLE_TYPES = new Set([
|
|
7174
|
+
"Product",
|
|
7175
|
+
"Page",
|
|
7176
|
+
"Medium"
|
|
7177
|
+
]);
|
|
7178
|
+
//#endregion
|
|
7196
7179
|
//#region ../../shareables/ui/src/components/SharePage/TaggedProductsList.tsx
|
|
7197
7180
|
const DEFAULT_IMAGE$3 = "https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png";
|
|
7198
7181
|
function resolvePrice(product) {
|
|
@@ -7203,9 +7186,9 @@ function resolvePrice(product) {
|
|
|
7203
7186
|
else if (firstVariant?.price) price = firstVariant.price;
|
|
7204
7187
|
}
|
|
7205
7188
|
if (!price) return null;
|
|
7189
|
+
const numPrice = parseFloat(price.replace(/[^0-9.-]/g, ""));
|
|
7190
|
+
if (Number.isNaN(numPrice) || numPrice <= 0) return null;
|
|
7206
7191
|
if (price.includes("$")) return price;
|
|
7207
|
-
const numPrice = parseFloat(price);
|
|
7208
|
-
if (Number.isNaN(numPrice)) return price;
|
|
7209
7192
|
return `$${numPrice.toFixed(2)}`;
|
|
7210
7193
|
}
|
|
7211
7194
|
function TaggedProductsList({ products, onProductClick }) {
|
|
@@ -7299,6 +7282,7 @@ function TaggedProductsList({ products, onProductClick }) {
|
|
|
7299
7282
|
const DEFAULT_IMAGE$2 = "https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png";
|
|
7300
7283
|
function getItemType(type, kind) {
|
|
7301
7284
|
if (type === "Product") return "Product";
|
|
7285
|
+
if (type === "EnrollmentPack") return "Enrollment";
|
|
7302
7286
|
if (type === "Page") return "Page";
|
|
7303
7287
|
if (kind === "video") return "Video";
|
|
7304
7288
|
if (kind === "image") return "Image";
|
|
@@ -7355,11 +7339,13 @@ function PlaylistItemsList({ items, onSelectItem, selectedItemIndex = 0, onNavig
|
|
|
7355
7339
|
const relateable = item.relateable;
|
|
7356
7340
|
const imageUrl = relateable?.image_url || relateable?.compressed_image_url || DEFAULT_IMAGE$2;
|
|
7357
7341
|
const title = relateable?.title || "Untitled";
|
|
7358
|
-
const
|
|
7342
|
+
const rawPrice = relateable?.display_price || relateable?.price;
|
|
7343
|
+
const price = rawPrice && parseFloat(rawPrice.replace(/[^0-9.-]/g, "")) > 0 ? rawPrice : null;
|
|
7359
7344
|
const itemType = getItemType(item.relateable_type, relateable?.kind);
|
|
7360
7345
|
const isVideo = relateable?.kind === "video";
|
|
7361
7346
|
const isImage = relateable?.kind === "image";
|
|
7362
7347
|
const isProduct = item.relateable_type === "Product";
|
|
7348
|
+
const isNavigable = NAVIGABLE_RELATEABLE_TYPES.has(item.relateable_type ?? "");
|
|
7363
7349
|
const videoLength = formatVideoLength(relateable?.duration);
|
|
7364
7350
|
const fileType = getFileType(relateable?.media_format, relateable?.image_url);
|
|
7365
7351
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -7382,13 +7368,19 @@ function PlaylistItemsList({ items, onSelectItem, selectedItemIndex = 0, onNavig
|
|
|
7382
7368
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7383
7369
|
className: "flex min-w-0 flex-1 flex-col gap-1 py-1",
|
|
7384
7370
|
children: [
|
|
7385
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
7371
|
+
isNavigable ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
7386
7372
|
onClick: (e) => handleNavigateToItem(relateable?.id ?? item.id, item.relateable_type, e),
|
|
7387
7373
|
className: "group text-foreground flex items-start gap-1.5 text-left text-[15px] leading-[1.4] font-semibold hover:underline",
|
|
7388
7374
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7389
7375
|
className: "line-clamp-2",
|
|
7390
7376
|
children: title
|
|
7391
7377
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowUpRight, { className: "text-foreground mt-0.5 h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-100" })]
|
|
7378
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7379
|
+
className: "text-foreground text-[15px] leading-[1.4] font-semibold",
|
|
7380
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7381
|
+
className: "line-clamp-2",
|
|
7382
|
+
children: title
|
|
7383
|
+
})
|
|
7392
7384
|
}),
|
|
7393
7385
|
isProduct && price && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7394
7386
|
className: "text-foreground text-[15px] leading-[1.4] font-normal",
|
|
@@ -7594,9 +7586,10 @@ function PlaylistDetailScreen({ playlistId, onNavigate }) {
|
|
|
7594
7586
|
onSelectItem: setSelectedPlaylistItemIndex,
|
|
7595
7587
|
selectedItemIndex: selectedPlaylistItemIndex,
|
|
7596
7588
|
onNavigateToItem: (itemId, relateableType) => {
|
|
7589
|
+
if (!NAVIGABLE_RELATEABLE_TYPES.has(relateableType ?? "")) return;
|
|
7597
7590
|
if (relateableType === "Product") onNavigate?.("product", String(itemId));
|
|
7598
7591
|
else if (relateableType === "Page") onNavigate?.("page", String(itemId));
|
|
7599
|
-
else onNavigate?.("media", String(itemId));
|
|
7592
|
+
else if (relateableType === "Medium") onNavigate?.("media", String(itemId));
|
|
7600
7593
|
}
|
|
7601
7594
|
})]
|
|
7602
7595
|
})
|
|
@@ -8296,6 +8289,8 @@ function computeOrderedItems(items) {
|
|
|
8296
8289
|
}
|
|
8297
8290
|
function PlaylistItemsSection({ playlistId }) {
|
|
8298
8291
|
const { showToast, filePickerClient } = useShareablesUI();
|
|
8292
|
+
const shareablesApiClient = useShareablesClient();
|
|
8293
|
+
const repContext = useRepContext();
|
|
8299
8294
|
const [filePickerOpen, setFilePickerOpen] = (0, react.useState)(false);
|
|
8300
8295
|
const { items: contextItems, updateItems, addItem, removeItem } = usePlaylistItems();
|
|
8301
8296
|
const tableItems = contextItems;
|
|
@@ -8413,9 +8408,15 @@ function PlaylistItemsSection({ playlistId }) {
|
|
|
8413
8408
|
}),
|
|
8414
8409
|
loading: () => "",
|
|
8415
8410
|
dismiss: () => {}
|
|
8416
|
-
}
|
|
8411
|
+
},
|
|
8412
|
+
shareablesClient: { media: { list: (filters) => require_src$1.getMedia(shareablesApiClient, filters ?? {}, repContext) } }
|
|
8417
8413
|
};
|
|
8418
|
-
}, [
|
|
8414
|
+
}, [
|
|
8415
|
+
filePickerClient,
|
|
8416
|
+
showToast,
|
|
8417
|
+
shareablesApiClient,
|
|
8418
|
+
repContext
|
|
8419
|
+
]);
|
|
8419
8420
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8420
8421
|
className: "border-border bg-card rounded-lg border p-4",
|
|
8421
8422
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -9027,4 +9028,4 @@ Object.defineProperty(exports, "ShareablesUIProvider", {
|
|
|
9027
9028
|
}
|
|
9028
9029
|
});
|
|
9029
9030
|
|
|
9030
|
-
//# sourceMappingURL=src-
|
|
9031
|
+
//# sourceMappingURL=src-fXyI4AWk.cjs.map
|