@equinor/roma-framework 0.0.6 → 0.0.7-BETA.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/roma-framework",
3
- "version": "0.0.6",
3
+ "version": "0.0.7-BETA.1",
4
4
  "repository": "https://github.com/equinor/tops-roma",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -71245,7 +71245,7 @@ var __privateMethod = (obj, member, method) => {
71245
71245
  }) {
71246
71246
  const queryClient = useQueryClient();
71247
71247
  kind = kind ?? "widget";
71248
- const { setCurrentApp, clearCurrentApp } = useCurrentApp();
71248
+ const { setCurrentApp, clearCurrentApp, currentApp } = useCurrentApp();
71249
71249
  const framework = useFramework();
71250
71250
  const [error, setError] = reactExports.useState(null);
71251
71251
  const [loading, setLoading] = reactExports.useState(false);
@@ -71304,7 +71304,8 @@ var __privateMethod = (obj, member, method) => {
71304
71304
  } catch {
71305
71305
  }
71306
71306
  appModule.dispose();
71307
- clearCurrentApp();
71307
+ if (kind === "app")
71308
+ clearCurrentApp();
71308
71309
  };
71309
71310
  }, [app]);
71310
71311
  const ref = reactExports.useRef(null);
@@ -71387,39 +71388,61 @@ var __privateMethod = (obj, member, method) => {
71387
71388
  const e2 = new CustomEvent("onDensityChanged", { detail: newDensity });
71388
71389
  event.dispatchEvent("onDensityChanged", e2);
71389
71390
  };
71390
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(TopBar, { id: "cli-top-bar", sticky: false, style: { padding: 0, height: 48 }, children: [
71391
- /* @__PURE__ */ jsxRuntimeExports.jsx(TopBar.Header, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$1.Title, { children: [
71392
- /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { data: business }),
71393
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Roma" })
71394
- ] }) }),
71395
- /* @__PURE__ */ jsxRuntimeExports.jsxs(TopBar.CustomContent, { children: [
71396
- "Dev Portal: ",
71397
- (currentApp == null ? void 0 : currentApp.appKey) ?? ""
71398
- ] }),
71399
- /* @__PURE__ */ jsxRuntimeExports.jsxs(TopBar.Actions, { children: [
71400
- /* @__PURE__ */ jsxRuntimeExports.jsx(
71401
- Button$1,
71402
- {
71403
- onClick: () => setA11yOpen(true),
71404
- ref: a11yRef,
71405
- variant: "ghost_icon",
71406
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { data: accessible })
71407
- }
71408
- ),
71409
- /* @__PURE__ */ jsxRuntimeExports.jsx(
71410
- Menu,
71411
- {
71412
- onClose: () => setA11yOpen(false),
71413
- anchorEl: a11yRef.current,
71414
- open: a11yOpen,
71415
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu.Section, { title: "Density", children: [
71416
- /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { active: density === "comfortable", onClick: () => toggleDensity("comfortable"), children: "Comfortable" }),
71417
- /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { active: density === "compact", onClick: () => toggleDensity("compact"), children: "Compact" })
71418
- ] })
71419
- }
71420
- )
71421
- ] })
71422
- ] });
71391
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
71392
+ TopBar,
71393
+ {
71394
+ id: "cli-top-bar",
71395
+ sticky: false,
71396
+ style: { padding: 0, paddingRight: "8px", height: 48 },
71397
+ children: [
71398
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TopBar.Header, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$1.Title, { children: [
71399
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { data: business }),
71400
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Roma" })
71401
+ ] }) }),
71402
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(TopBar.CustomContent, { children: [
71403
+ "Dev Portal: ",
71404
+ (currentApp == null ? void 0 : currentApp.appKey) ?? ""
71405
+ ] }),
71406
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(TopBar.Actions, { children: [
71407
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
71408
+ Button$1,
71409
+ {
71410
+ onClick: () => setA11yOpen(true),
71411
+ ref: a11yRef,
71412
+ variant: "ghost_icon",
71413
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { data: accessible })
71414
+ }
71415
+ ),
71416
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
71417
+ Menu,
71418
+ {
71419
+ onClose: () => setA11yOpen(false),
71420
+ anchorEl: a11yRef.current,
71421
+ open: a11yOpen,
71422
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu.Section, { title: "Density", children: [
71423
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
71424
+ Menu.Item,
71425
+ {
71426
+ active: density === "comfortable",
71427
+ onClick: () => toggleDensity("comfortable"),
71428
+ children: "Comfortable"
71429
+ }
71430
+ ),
71431
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
71432
+ Menu.Item,
71433
+ {
71434
+ active: density === "compact",
71435
+ onClick: () => toggleDensity("compact"),
71436
+ children: "Compact"
71437
+ }
71438
+ )
71439
+ ] })
71440
+ }
71441
+ )
71442
+ ] })
71443
+ ]
71444
+ }
71445
+ );
71423
71446
  };
71424
71447
  const Navigation = ({
71425
71448
  setOpen
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/roma-framework",
3
- "version": "0.0.6",
3
+ "version": "0.0.7-BETA.1",
4
4
  "repository": "https://github.com/equinor/tops-roma",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,