@hexclave/react 1.0.33 → 1.0.35
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/dev-tool/dev-tool-core.d.ts.map +1 -1
- package/dist/dev-tool/dev-tool-core.js +8 -12
- package/dist/dev-tool/dev-tool-core.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-core.d.ts.map +1 -1
- package/dist/esm/dev-tool/dev-tool-core.js +9 -13
- package/dist/esm/dev-tool/dev-tool-core.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +23 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +5 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +19 -16
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +23 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +5 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +19 -16
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/common.js +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/package.json +3 -3
- package/src/dev-tool/dev-tool-core.ts +14 -9
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.ts +37 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +22 -3
- package/src/lib/hexclave-app/apps/interfaces/client-app.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-tool-core.d.ts","names":[],"sources":["../../../src/dev-tool/dev-tool-core.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"dev-tool-core.d.ts","names":[],"sources":["../../../src/dev-tool/dev-tool-core.ts"],"mappings":";;;iBAiuEgB,aAAA,CAAc,GAAA,EAAK,cAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEV_TOOL_ROOT_ID } from "@hexclave/shared/dist/utils/dev-tool";
|
|
2
|
-
import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
|
|
2
|
+
import { runAsynchronously, runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
|
|
3
3
|
import { getGlobalUiInstance, h, hasAppendChild, setGlobalUiInstance, setHtml } from "../in-page-ui/dom.js";
|
|
4
4
|
import { hexclaveAppInternalsSymbol } from "../lib/hexclave-app/common.js";
|
|
5
5
|
import { isLocalhost } from "@hexclave/shared/dist/utils/urls";
|
|
@@ -1692,10 +1692,6 @@ function createComponentsTab(app) {
|
|
|
1692
1692
|
};
|
|
1693
1693
|
});
|
|
1694
1694
|
}
|
|
1695
|
-
function getCompactUrl(url) {
|
|
1696
|
-
const resolved = new URL(url, window.location.origin);
|
|
1697
|
-
return `${resolved.pathname}${resolved.search}${resolved.hash}`;
|
|
1698
|
-
}
|
|
1699
1695
|
const sidebar = h("div", { className: "sdt-pg-sidebar" });
|
|
1700
1696
|
const mainArea = h("div", { className: "sdt-pg-main" });
|
|
1701
1697
|
function renderSidebar() {
|
|
@@ -1733,12 +1729,6 @@ function createComponentsTab(app) {
|
|
|
1733
1729
|
const header = h("div", { className: "sdt-pg-header" });
|
|
1734
1730
|
const headerTop = h("div", { className: "sdt-pg-header-top" });
|
|
1735
1731
|
headerTop.appendChild(h("h3", { className: "sdt-pg-title" }, `${page.label} Page`));
|
|
1736
|
-
headerTop.appendChild(h("a", {
|
|
1737
|
-
href: page.url,
|
|
1738
|
-
target: "_blank",
|
|
1739
|
-
rel: "noopener noreferrer",
|
|
1740
|
-
className: "sdt-pg-title-url"
|
|
1741
|
-
}, getCompactUrl(page.url)));
|
|
1742
1732
|
if (page.versionStatus === "outdated") headerTop.appendChild(h("span", { className: "sdt-pg-badge sdt-pg-badge-outdated" }, "Outdated"));
|
|
1743
1733
|
header.appendChild(headerTop);
|
|
1744
1734
|
const redirectMethod = `hexclaveApp.redirectTo${page.key.charAt(0).toUpperCase()}${page.key.slice(1)}()`;
|
|
@@ -1747,8 +1737,14 @@ function createComponentsTab(app) {
|
|
|
1747
1737
|
const openBtn = h("button", { className: "sdt-pg-copy-btn sdt-pg-open-btn" });
|
|
1748
1738
|
setHtml(openBtn, "Open <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.25\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M7 17L17 7\"/><path d=\"M7 7h10v10\"/></svg>");
|
|
1749
1739
|
openBtn.addEventListener("click", () => {
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1740
|
+
const openedWindow = window.open("about:blank", "_blank");
|
|
1741
|
+
if (openedWindow != null) openedWindow.opener = null;
|
|
1742
|
+
runAsynchronouslyWithAlert(async () => {
|
|
1743
|
+
const redirectUrl = await app[hexclaveAppInternalsSymbol].getRedirectToHandlerUrl(page.key);
|
|
1744
|
+
const resolved = new URL(redirectUrl, window.location.origin);
|
|
1745
|
+
if (openedWindow != null) openedWindow.location.replace(resolved.toString());
|
|
1746
|
+
else window.open(resolved.toString(), "_blank", "noopener,noreferrer");
|
|
1747
|
+
});
|
|
1752
1748
|
});
|
|
1753
1749
|
codeRow.appendChild(openBtn);
|
|
1754
1750
|
header.appendChild(codeRow);
|