@hartl-services/medusa-base 2.6.0 → 2.6.1
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.
|
@@ -4,4 +4,4 @@ import { Button, FocusModal, Text } from "@medusajs/ui";
|
|
|
4
4
|
* Full-screen PDF preview. Owns no URL: the caller creates the object URL and
|
|
5
5
|
* revokes it when the modal closes (see `fetchPdfObjectUrl`).
|
|
6
6
|
*/
|
|
7
|
-
export const PdfPreviewModal = ({ open, onOpenChange, title, url, isLoading = false, error = null, frameTitle = "Vorschau", loadingText = "Wird geladen.", closeLabel = "Schließen", }) => (_jsx(FocusModal, { onOpenChange: onOpenChange, open: open, children: _jsxs(FocusModal.Content, { children: [
|
|
7
|
+
export const PdfPreviewModal = ({ open, onOpenChange, title, url, isLoading = false, error = null, frameTitle = "Vorschau", loadingText = "Wird geladen.", closeLabel = "Schließen", }) => (_jsx(FocusModal, { onOpenChange: onOpenChange, open: open, children: _jsxs(FocusModal.Content, { children: [_jsxs(FocusModal.Header, { children: [_jsx(FocusModal.Title, { children: title }), _jsxs(FocusModal.Description, { className: "sr-only", children: ["PDF-Vorschau: ", title] })] }), _jsx(FocusModal.Body, { className: "h-[75vh] p-0", children: url && !isLoading ? (_jsx("iframe", { className: "h-full w-full border-0", src: url, title: frameTitle })) : error ? (_jsx(Text, { "aria-atomic": "true", "aria-live": "assertive", className: "p-6 text-ui-fg-error", role: "alert", children: error })) : (_jsx(Text, { "aria-atomic": "true", "aria-live": "polite", className: "p-6 text-ui-fg-subtle", role: "status", children: loadingText })) }), _jsx(FocusModal.Footer, { children: _jsx(FocusModal.Close, { asChild: true, children: _jsx(Button, { variant: "secondary", children: closeLabel }) }) })] }) }));
|
|
@@ -1419,7 +1419,13 @@ const PdfPreviewModal = ({
|
|
|
1419
1419
|
loadingText = "Wird geladen.",
|
|
1420
1420
|
closeLabel = "Schließen"
|
|
1421
1421
|
}) => /* @__PURE__ */ jsxRuntime.jsx(ui.FocusModal, { onOpenChange, open, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.FocusModal.Content, { children: [
|
|
1422
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1422
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.FocusModal.Header, { children: [
|
|
1423
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.FocusModal.Title, { children: title }),
|
|
1424
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.FocusModal.Description, { className: "sr-only", children: [
|
|
1425
|
+
"PDF-Vorschau: ",
|
|
1426
|
+
title
|
|
1427
|
+
] })
|
|
1428
|
+
] }),
|
|
1423
1429
|
/* @__PURE__ */ jsxRuntime.jsx(ui.FocusModal.Body, { className: "h-[75vh] p-0", children: url && !isLoading ? /* @__PURE__ */ jsxRuntime.jsx("iframe", { className: "h-full w-full border-0", src: url, title: frameTitle }) : error ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1424
1430
|
ui.Text,
|
|
1425
1431
|
{
|
|
@@ -1413,7 +1413,13 @@ const PdfPreviewModal = ({
|
|
|
1413
1413
|
loadingText = "Wird geladen.",
|
|
1414
1414
|
closeLabel = "Schließen"
|
|
1415
1415
|
}) => /* @__PURE__ */ jsx(FocusModal, { onOpenChange, open, children: /* @__PURE__ */ jsxs(FocusModal.Content, { children: [
|
|
1416
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ jsxs(FocusModal.Header, { children: [
|
|
1417
|
+
/* @__PURE__ */ jsx(FocusModal.Title, { children: title }),
|
|
1418
|
+
/* @__PURE__ */ jsxs(FocusModal.Description, { className: "sr-only", children: [
|
|
1419
|
+
"PDF-Vorschau: ",
|
|
1420
|
+
title
|
|
1421
|
+
] })
|
|
1422
|
+
] }),
|
|
1417
1423
|
/* @__PURE__ */ jsx(FocusModal.Body, { className: "h-[75vh] p-0", children: url && !isLoading ? /* @__PURE__ */ jsx("iframe", { className: "h-full w-full border-0", src: url, title: frameTitle }) : error ? /* @__PURE__ */ jsx(
|
|
1418
1424
|
Text,
|
|
1419
1425
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hartl-services/medusa-base",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Base plugin for Hartl Services Medusa shops: per-plugin feature toggles with a generic Admin settings page, a Store endpoint for storefronts, enforcement helpers, the complete-cart hook composition, the root redirect, cart-promotion link repair, the built-in E-Mail, Documents and S3 file storage modules, config helpers with the turnkey food-shop preset, and the Sentry logger wrapper and instrumentation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|