@fluid-app/portal-sdk 0.1.314 → 0.1.315
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-BAWob9Xh.mjs → MessagingScreen-BgDi-Gar.mjs} +0 -1
- package/dist/{OrdersScreen-BvC2vAPI.mjs → OrdersScreen-CSddnx1C.mjs} +0 -2
- package/dist/{ProfileScreen-B4nb_OZG.mjs → ProfileScreen-0Uimme9y.mjs} +1 -2
- package/dist/{ProfileScreen-1eUj1pwW.mjs → ProfileScreen-BOyEWw2y.mjs} +5 -3
- package/dist/ProfileScreen-BOyEWw2y.mjs.map +1 -0
- package/dist/{ProfileScreen-CCpujV84.cjs → ProfileScreen-C-UWLnEr.cjs} +5 -3
- package/dist/ProfileScreen-C-UWLnEr.cjs.map +1 -0
- package/dist/{ProfileScreen-CQhgY8xm.cjs → ProfileScreen-D2Z8BQtq.cjs} +1 -1
- package/dist/{ShareablesScreen-QclWhq3D.cjs → ShareablesScreen-BeEEI0mD.cjs} +88 -5
- package/dist/ShareablesScreen-BeEEI0mD.cjs.map +1 -0
- package/dist/{ShareablesScreen-7umiVWD0.mjs → ShareablesScreen-CaYM4JHC.mjs} +1 -3
- package/dist/{ShareablesScreen-PL7O47Gv.cjs → ShareablesScreen-QAqtL2DB.cjs} +1 -1
- package/dist/{ShareablesScreen-yXCq_akC.mjs → ShareablesScreen-Qqr8uE9h.mjs} +89 -6
- package/dist/ShareablesScreen-Qqr8uE9h.mjs.map +1 -0
- package/dist/{ShopScreen-D_XPdJVC.mjs → ShopScreen-O0wjoQ-a.mjs} +0 -2
- package/dist/{SubscriptionsScreen-CaVTy07E.mjs → SubscriptionsScreen-BJoy1y6u.mjs} +0 -2
- package/dist/index.cjs +6 -6
- package/dist/index.mjs +14 -14
- package/package.json +15 -15
- package/dist/ProfileScreen-1eUj1pwW.mjs.map +0 -1
- package/dist/ProfileScreen-CCpujV84.cjs.map +0 -1
- package/dist/ShareablesScreen-QclWhq3D.cjs.map +0 -1
- package/dist/ShareablesScreen-yXCq_akC.mjs.map +0 -1
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import "./portal_tenant_content-CRrn7i-P.mjs";
|
|
2
2
|
import "./store-api-context-DViwxyG4.mjs";
|
|
3
3
|
import "./mysite-api-context-kUTM3GNG.mjs";
|
|
4
|
-
import "./PortalTenantClientProvider-_VXOs0t4.mjs";
|
|
5
4
|
import "./locale-context-DGCebJhw.mjs";
|
|
6
5
|
import "./src-DC5QoBhR.mjs";
|
|
7
6
|
import "./ScreenHeaderContext-C22wBIsP.mjs";
|
|
8
7
|
import "./translation-api-context-factory-BYNOdpnp.mjs";
|
|
9
|
-
import "./AppNavigationContext-DNomMUij.mjs";
|
|
10
8
|
import "./static-dict-adapter-CGDunURa.mjs";
|
|
11
9
|
import "./SearchSort-ByyOEmDa.mjs";
|
|
12
10
|
import "./use-mysite-portal-DmMDb7Mn.mjs";
|
|
@@ -14,5 +12,5 @@ import "./dist-D7_77Mei.mjs";
|
|
|
14
12
|
import "./es-CaDFGDKY.mjs";
|
|
15
13
|
import "./dist-D8dilWiq.mjs";
|
|
16
14
|
import "./sortable.esm-UhdC9Man.mjs";
|
|
17
|
-
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-
|
|
15
|
+
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-Qqr8uE9h.mjs";
|
|
18
16
|
export { ShareablesScreen, shareablesScreenPropertySchema };
|
|
@@ -13,6 +13,6 @@ require("./dist-BwU2ZIKy.cjs");
|
|
|
13
13
|
require("./es-Cek6aP5I.cjs");
|
|
14
14
|
require("./dist-B3CAYy1s.cjs");
|
|
15
15
|
require("./dist-DdMbxOP3.cjs");
|
|
16
|
-
const require_ShareablesScreen = require("./ShareablesScreen-
|
|
16
|
+
const require_ShareablesScreen = require("./ShareablesScreen-BeEEI0mD.cjs");
|
|
17
17
|
exports.ShareablesScreen = require_ShareablesScreen.ShareablesScreen;
|
|
18
18
|
exports.shareablesScreenPropertySchema = require_ShareablesScreen.shareablesScreenPropertySchema;
|
|
@@ -17,7 +17,7 @@ import { a as verticalListSortingStrategy, c as PointerSensor, d as useSensors,
|
|
|
17
17
|
import React, { PureComponent, createContext, createRef, forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
18
18
|
import { keepPreviousData, useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
19
19
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
import { AlertTriangleIcon, AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, ArrowUpRight, Camera, Check, CheckIcon, ChevronDownIcon, CirclePlay, CloudIcon, Copy, CropIcon, Download, DownloadIcon, EllipsisVerticalIcon, FileIcon, FileImage, FileText, FileTextIcon, Filter, FolderIcon, FolderPlusIcon, Globe, GraduationCapIcon, GripVertical, Heart, HelpCircle, Image, ImageIcon, ImagesIcon, LaptopIcon, LayersIcon, LayoutGrid, LayoutGridIcon, LinkIcon, List, ListIcon, ListMusic, ListOrdered, LoaderIcon, Mail, Maximize, Menu, MinusIcon, MoreHorizontal, MoreVertical, MoveHorizontalIcon, Package, PackageIcon, Pause, Pencil, Phone, Play, Plus, PlusIcon, RotateCwIcon, Search, SearchIcon, ShoppingBag, ShoppingCart, SlidersHorizontalIcon, Trash2, Trash2Icon, TypeIcon, Upload, UserIcon, Video, VideoIcon, X, XIcon } from "lucide-react";
|
|
20
|
+
import { AlertTriangleIcon, AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, ArrowUpRight, Camera, Check, CheckIcon, ChevronDownIcon, ChevronLeft, ChevronRight, CirclePlay, CloudIcon, Copy, CropIcon, Download, DownloadIcon, EllipsisVerticalIcon, FileIcon, FileImage, FileText, FileTextIcon, Filter, FolderIcon, FolderPlusIcon, Globe, GraduationCapIcon, GripVertical, Heart, HelpCircle, Image, ImageIcon, ImagesIcon, LaptopIcon, LayersIcon, LayoutGrid, LayoutGridIcon, LinkIcon, List, ListIcon, ListMusic, ListOrdered, LoaderIcon, Mail, Maximize, Menu, MinusIcon, MoreHorizontal, MoreVertical, MoveHorizontalIcon, Package, PackageIcon, Pause, Pencil, Phone, Play, Plus, PlusIcon, RotateCwIcon, Search, SearchIcon, ShoppingBag, ShoppingCart, SlidersHorizontalIcon, Trash2, Trash2Icon, TypeIcon, Upload, UserIcon, Video, VideoIcon, X, XIcon } from "lucide-react";
|
|
21
21
|
import { createPortal } from "react-dom";
|
|
22
22
|
import * as z$1 from "zod";
|
|
23
23
|
import { z } from "zod";
|
|
@@ -922,11 +922,27 @@ function ProductsScreen({ countryCode, fetchProducts: fetchPortalProducts, onNav
|
|
|
922
922
|
}
|
|
923
923
|
//#endregion
|
|
924
924
|
//#region ../../shareables/ui/src/components/SharePage/SharePageImageDisplay.tsx
|
|
925
|
-
function
|
|
925
|
+
function buildPdfSrc(url, page = 1) {
|
|
926
|
+
try {
|
|
927
|
+
const parsed = new URL(url);
|
|
928
|
+
parsed.hash = `page=${page}&view=FitH`;
|
|
929
|
+
return parsed.toString();
|
|
930
|
+
} catch {
|
|
931
|
+
return `${url}#page=${page}&view=FitH`;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
function SharePageImageDisplay({ displayImage, displayTitle, displayVideo, displayPdf, isVideo, badgeLabel, rounded = true, showBadge = true }) {
|
|
926
935
|
const [isPreviewOpen, setIsPreviewOpen] = useState(false);
|
|
936
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
927
937
|
const renderImage = useRenderImage();
|
|
938
|
+
const handlePrevPage = () => {
|
|
939
|
+
setCurrentPage((prev) => prev > 1 ? prev - 1 : prev);
|
|
940
|
+
};
|
|
941
|
+
const handleNextPage = () => {
|
|
942
|
+
setCurrentPage((prev) => prev + 1);
|
|
943
|
+
};
|
|
928
944
|
return /* @__PURE__ */ jsxs("div", {
|
|
929
|
-
className: `relative h-full w-full overflow-hidden bg-gray-100 ${rounded ? "rounded-2xl" : ""}`,
|
|
945
|
+
className: `relative flex h-full w-full flex-col overflow-hidden bg-gray-100 ${rounded ? "rounded-2xl" : ""}`,
|
|
930
946
|
children: [
|
|
931
947
|
isVideo ? /* @__PURE__ */ jsx("video", {
|
|
932
948
|
src: displayVideo || "",
|
|
@@ -935,7 +951,45 @@ function SharePageImageDisplay({ displayImage, displayTitle, displayVideo, isVid
|
|
|
935
951
|
muted: true,
|
|
936
952
|
loop: true,
|
|
937
953
|
controls: true
|
|
938
|
-
}) :
|
|
954
|
+
}) : displayPdf ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("iframe", {
|
|
955
|
+
src: buildPdfSrc(displayPdf, currentPage),
|
|
956
|
+
className: "min-h-0 w-full flex-1",
|
|
957
|
+
title: displayTitle || "PDF document"
|
|
958
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
959
|
+
className: "flex items-center justify-center gap-4 py-3",
|
|
960
|
+
children: [
|
|
961
|
+
/* @__PURE__ */ jsx(Button, {
|
|
962
|
+
onClick: handlePrevPage,
|
|
963
|
+
disabled: currentPage <= 1,
|
|
964
|
+
variant: "outline",
|
|
965
|
+
size: "sm",
|
|
966
|
+
className: "h-8 w-8 p-0",
|
|
967
|
+
"aria-label": "Previous page",
|
|
968
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
969
|
+
}),
|
|
970
|
+
/* @__PURE__ */ jsx("div", {
|
|
971
|
+
className: "flex items-center gap-2",
|
|
972
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
973
|
+
type: "number",
|
|
974
|
+
min: "1",
|
|
975
|
+
value: currentPage,
|
|
976
|
+
onChange: (e) => {
|
|
977
|
+
const page = parseInt(e.target.value);
|
|
978
|
+
if (page > 0) setCurrentPage(page);
|
|
979
|
+
},
|
|
980
|
+
className: "border-input bg-background w-14 rounded-md border px-2 py-1 text-center text-sm focus:ring-1 focus:outline-none"
|
|
981
|
+
})
|
|
982
|
+
}),
|
|
983
|
+
/* @__PURE__ */ jsx(Button, {
|
|
984
|
+
onClick: handleNextPage,
|
|
985
|
+
variant: "outline",
|
|
986
|
+
size: "sm",
|
|
987
|
+
className: "h-8 w-8 p-0",
|
|
988
|
+
"aria-label": "Next page",
|
|
989
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
990
|
+
})
|
|
991
|
+
]
|
|
992
|
+
})] }) : renderImage({
|
|
939
993
|
src: displayImage,
|
|
940
994
|
alt: displayTitle,
|
|
941
995
|
fill: true,
|
|
@@ -946,7 +1000,7 @@ function SharePageImageDisplay({ displayImage, displayTitle, displayVideo, isVid
|
|
|
946
1000
|
className: "absolute top-3 right-3 z-0 bg-gray-100 text-gray-900 hover:bg-gray-100",
|
|
947
1001
|
children: badgeLabel
|
|
948
1002
|
}),
|
|
949
|
-
isVideo && /* @__PURE__ */ jsx(Button, {
|
|
1003
|
+
(isVideo || displayPdf) && /* @__PURE__ */ jsx(Button, {
|
|
950
1004
|
onClick: () => setIsPreviewOpen(true),
|
|
951
1005
|
className: "absolute top-3 left-3 z-0 flex h-8 w-8 items-center justify-center rounded-full bg-white/90 text-gray-700 backdrop-blur-sm transition-colors hover:bg-white",
|
|
952
1006
|
variant: "ghost",
|
|
@@ -969,6 +1023,32 @@ function SharePageImageDisplay({ displayImage, displayTitle, displayVideo, isVid
|
|
|
969
1023
|
controls: true,
|
|
970
1024
|
onClick: (e) => e.stopPropagation()
|
|
971
1025
|
})]
|
|
1026
|
+
}),
|
|
1027
|
+
isPreviewOpen && displayPdf && /* @__PURE__ */ jsxs("div", {
|
|
1028
|
+
className: "fixed inset-0 z-9999 flex items-center justify-center bg-black/70 backdrop-blur-sm",
|
|
1029
|
+
onClick: () => setIsPreviewOpen(false),
|
|
1030
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
1031
|
+
onClick: (e) => {
|
|
1032
|
+
e.stopPropagation();
|
|
1033
|
+
setIsPreviewOpen(false);
|
|
1034
|
+
},
|
|
1035
|
+
className: "absolute top-4 right-4 z-10000 flex h-10 w-10 items-center justify-center rounded-full bg-white/90 text-gray-900 backdrop-blur-sm transition-colors hover:bg-white",
|
|
1036
|
+
variant: "ghost",
|
|
1037
|
+
size: "sm",
|
|
1038
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
1039
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1040
|
+
className: "relative",
|
|
1041
|
+
onClick: (e) => e.stopPropagation(),
|
|
1042
|
+
style: {
|
|
1043
|
+
width: "95vw",
|
|
1044
|
+
height: "90vh"
|
|
1045
|
+
},
|
|
1046
|
+
children: /* @__PURE__ */ jsx("iframe", {
|
|
1047
|
+
src: buildPdfSrc(displayPdf, currentPage),
|
|
1048
|
+
className: "h-full w-full rounded-lg bg-white",
|
|
1049
|
+
title: displayTitle || "PDF document"
|
|
1050
|
+
})
|
|
1051
|
+
})]
|
|
972
1052
|
})
|
|
973
1053
|
]
|
|
974
1054
|
});
|
|
@@ -2161,7 +2241,9 @@ function MediaDetailScreen({ mediaId, onNavigate, onBack }) {
|
|
|
2161
2241
|
const displayTitle = mediaItem?.title || "";
|
|
2162
2242
|
const displayImage = mediaItem?.image_url || "";
|
|
2163
2243
|
const displayVideo = mediaItem?.video_url || "";
|
|
2244
|
+
const displayPdf = mediaItem?.pdf_url || "";
|
|
2164
2245
|
const isVideo = mediaItem?.kind === "video" && !!displayVideo;
|
|
2246
|
+
const isPdf = mediaItem?.kind === "pdf" && !!displayPdf;
|
|
2165
2247
|
const badgeLabel = getBadgeLabel(mediaItem?.kind ?? null, {
|
|
2166
2248
|
video: t("media_type_video"),
|
|
2167
2249
|
image: t("media_type_image"),
|
|
@@ -2209,6 +2291,7 @@ function MediaDetailScreen({ mediaId, onNavigate, onBack }) {
|
|
|
2209
2291
|
displayImage,
|
|
2210
2292
|
displayTitle,
|
|
2211
2293
|
displayVideo: isVideo ? displayVideo : void 0,
|
|
2294
|
+
displayPdf: isPdf ? displayPdf : void 0,
|
|
2212
2295
|
isVideo,
|
|
2213
2296
|
badgeLabel,
|
|
2214
2297
|
rounded: true,
|
|
@@ -13897,4 +13980,4 @@ const shareablesScreenPropertySchema = {
|
|
|
13897
13980
|
//#endregion
|
|
13898
13981
|
export { shareablesScreenPropertySchema as n, ShareablesScreen as t };
|
|
13899
13982
|
|
|
13900
|
-
//# sourceMappingURL=ShareablesScreen-
|
|
13983
|
+
//# sourceMappingURL=ShareablesScreen-Qqr8uE9h.mjs.map
|