@loafmarkets/ui 0.1.419 → 0.1.421
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/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1078,8 +1078,11 @@ type PropertyDocumentsProps = {
|
|
|
1078
1078
|
documentsData?: DocumentsResponse | null;
|
|
1079
1079
|
highlightDocument?: string | null;
|
|
1080
1080
|
onClearHighlight?: () => void;
|
|
1081
|
+
/** Pre-licence compliance mode: EVERY document (backend + hardcoded) renders
|
|
1082
|
+
as a greyed Coming Soon row — no links, no preview. */
|
|
1083
|
+
forceComingSoon?: boolean;
|
|
1081
1084
|
};
|
|
1082
|
-
declare function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight }: PropertyDocumentsProps): react_jsx_runtime.JSX.Element;
|
|
1085
|
+
declare function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight, forceComingSoon }: PropertyDocumentsProps): react_jsx_runtime.JSX.Element;
|
|
1083
1086
|
|
|
1084
1087
|
type InspectionSlot = {
|
|
1085
1088
|
slotId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1078,8 +1078,11 @@ type PropertyDocumentsProps = {
|
|
|
1078
1078
|
documentsData?: DocumentsResponse | null;
|
|
1079
1079
|
highlightDocument?: string | null;
|
|
1080
1080
|
onClearHighlight?: () => void;
|
|
1081
|
+
/** Pre-licence compliance mode: EVERY document (backend + hardcoded) renders
|
|
1082
|
+
as a greyed Coming Soon row — no links, no preview. */
|
|
1083
|
+
forceComingSoon?: boolean;
|
|
1081
1084
|
};
|
|
1082
|
-
declare function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight }: PropertyDocumentsProps): react_jsx_runtime.JSX.Element;
|
|
1085
|
+
declare function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight, forceComingSoon }: PropertyDocumentsProps): react_jsx_runtime.JSX.Element;
|
|
1083
1086
|
|
|
1084
1087
|
type InspectionSlot = {
|
|
1085
1088
|
slotId: string;
|
package/dist/index.js
CHANGED
|
@@ -6615,7 +6615,7 @@ var Header = ({
|
|
|
6615
6615
|
}
|
|
6616
6616
|
)
|
|
6617
6617
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
6618
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button2, { className: "signup", onClick: handleSignIn, children: "
|
|
6618
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button2, { className: "signup", onClick: handleSignIn, children: "Connect Testnet" }),
|
|
6619
6619
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6620
6620
|
MobileOnlyButton,
|
|
6621
6621
|
{
|
|
@@ -13300,18 +13300,19 @@ var COMING_SOON_TITLES = [
|
|
|
13300
13300
|
"Annual Financial Statements",
|
|
13301
13301
|
"Risk Disclosure Statement"
|
|
13302
13302
|
];
|
|
13303
|
-
function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight }) {
|
|
13303
|
+
function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight, forceComingSoon }) {
|
|
13304
13304
|
const highlightRef = React9.useRef(null);
|
|
13305
13305
|
const [previewUrl, setPreviewUrl] = React9.useState(null);
|
|
13306
13306
|
const [previewTitle, setPreviewTitle] = React9.useState(null);
|
|
13307
13307
|
const backendDocuments = Array.isArray(documentsData?.documents) ? documentsData.documents : [];
|
|
13308
|
-
const liveDocs = backendDocuments.filter(
|
|
13308
|
+
const liveDocs = forceComingSoon ? [] : backendDocuments.filter(
|
|
13309
13309
|
(d) => Boolean(d.documentUrl) && isSafeUrl(d.documentUrl) && LIVE_TITLE_PATTERNS.some((rx) => rx.test(d.title))
|
|
13310
13310
|
);
|
|
13311
|
+
const visibleBackendDocs = forceComingSoon ? backendDocuments.map((d) => ({ title: d.title, documentUrl: "" })) : liveDocs;
|
|
13311
13312
|
const comingSoonDocs = COMING_SOON_TITLES.filter(
|
|
13312
|
-
(title) => !
|
|
13313
|
+
(title) => !visibleBackendDocs.some((d) => d.title.toLowerCase().includes(title.toLowerCase()) || title.toLowerCase().includes(d.title.toLowerCase()))
|
|
13313
13314
|
).map((title) => ({ title, documentUrl: "" }));
|
|
13314
|
-
const documents = [...
|
|
13315
|
+
const documents = [...visibleBackendDocs, ...comingSoonDocs];
|
|
13315
13316
|
const activeUrl = previewUrl ?? (liveDocs[0]?.documentUrl || null);
|
|
13316
13317
|
const activeTitle = previewUrl ? previewTitle : liveDocs[0]?.title || null;
|
|
13317
13318
|
const selectPreview = (doc) => {
|