@burdenoff/fe-libs 2026.1021.13 → 2026.1021.15
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/admin-overview/AdminOverviewActionsContext.d.ts +11 -0
- package/dist/admin-overview/AdminOverviewActionsContext.js +17 -0
- package/dist/admin-overview/AdminOverviewPage.d.ts +4 -0
- package/dist/admin-overview/AdminOverviewPage.js +524 -0
- package/dist/admin-overview/buildHierarchyGraph.d.ts +36 -0
- package/dist/admin-overview/buildHierarchyGraph.js +172 -0
- package/dist/admin-overview/index.d.ts +10 -0
- package/dist/admin-overview/nodes/OrganizationNode.d.ts +9 -0
- package/dist/admin-overview/nodes/OrganizationNode.js +85 -0
- package/dist/admin-overview/nodes/ProjectNode.d.ts +9 -0
- package/dist/admin-overview/nodes/ProjectNode.js +69 -0
- package/dist/admin-overview/nodes/TenantNode.d.ts +9 -0
- package/dist/admin-overview/nodes/TenantNode.js +78 -0
- package/dist/admin-overview/nodes/WorkspaceNode.d.ts +9 -0
- package/dist/admin-overview/nodes/WorkspaceNode.js +136 -0
- package/dist/admin-overview/nodes/nodeStyles.d.ts +7 -0
- package/dist/admin-overview/nodes/nodeStyles.js +10 -0
- package/dist/admin-overview/operations.d.ts +45 -0
- package/dist/admin-overview/operations.js +42 -0
- package/dist/admin-overview.d.ts +2 -0
- package/dist/admin-overview.js +3 -0
- package/dist/chrome/GlobalSearch.js +9 -9
- package/dist/chrome/HeaderThemeSwitcher.js +7 -7
- package/dist/chrome.js +44 -44
- package/dist/platform-pages/AcceptShareRoute.d.ts +33 -0
- package/dist/platform-pages/AcceptShareRoute.js +72 -0
- package/dist/platform-pages/AffiliatesPage.d.ts +16 -0
- package/dist/platform-pages/AffiliatesPage.js +583 -0
- package/dist/platform-pages/AppearanceSettingsPage.d.ts +14 -0
- package/dist/platform-pages/AppearanceSettingsPage.js +14 -0
- package/dist/platform-pages/index.d.ts +20 -0
- package/dist/platform-pages.d.ts +2 -0
- package/dist/platform-pages.js +4 -0
- package/dist/shared/components/DocsLink.d.ts +56 -0
- package/dist/shared/components/DocsLink.js +97 -0
- package/dist/shared/components/index.d.ts +2 -0
- package/dist/shared/config/docsUrls.d.ts +91 -0
- package/dist/shared/config/docsUrls.js +70 -0
- package/dist/shared/config/index.d.ts +2 -0
- package/dist/shared/config/shellRoutes.js +7 -0
- package/dist/shared/feature-flags/FeatureFlagProvider.d.ts +10 -0
- package/dist/shared/feature-flags/FeatureFlagProvider.js +4 -1
- package/dist/shared/feature-flags/index.d.ts +2 -2
- package/dist/shared/feature-flags/useFeatureFlag.d.ts +26 -1
- package/dist/shared/feature-flags/useFeatureFlag.js +25 -12
- package/dist/shared/hooks/usePushDeviceRegistration.js +1 -1
- package/dist/shared/providers/AppShellProvider.js +6 -6
- package/dist/shared-components.js +7 -6
- package/dist/shared-config.js +10 -9
- package/dist/shared-feature-flags.js +4 -4
- package/dist/shared-hooks.js +25 -25
- package/dist/shared-native.js +15 -15
- package/dist/shared-providers-shell.js +12 -12
- package/dist/shared.js +132 -130
- package/dist/shell-native/push-optin.js +4 -4
- package/package.json +16 -3
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { gql as e } from "@apollo/client";
|
|
2
|
+
//#region src/admin-overview/operations.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
query AdminOverviewGetContext($limit: Int, $offset: Int) {
|
|
5
|
+
myOrganizations(limit: $limit, offset: $offset) {
|
|
6
|
+
items {
|
|
7
|
+
id
|
|
8
|
+
name
|
|
9
|
+
slug
|
|
10
|
+
tenantId
|
|
11
|
+
}
|
|
12
|
+
total
|
|
13
|
+
hasMore
|
|
14
|
+
}
|
|
15
|
+
myWorkspaces(limit: $limit, offset: $offset) {
|
|
16
|
+
items {
|
|
17
|
+
id
|
|
18
|
+
name
|
|
19
|
+
type
|
|
20
|
+
status
|
|
21
|
+
tenantId
|
|
22
|
+
organizationId
|
|
23
|
+
memberCount
|
|
24
|
+
}
|
|
25
|
+
total
|
|
26
|
+
hasMore
|
|
27
|
+
}
|
|
28
|
+
myTenants(limit: $limit, offset: $offset) {
|
|
29
|
+
items {
|
|
30
|
+
id
|
|
31
|
+
name
|
|
32
|
+
slug
|
|
33
|
+
status
|
|
34
|
+
type
|
|
35
|
+
}
|
|
36
|
+
total
|
|
37
|
+
hasMore
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`, n = "\n query AdminOverviewGetMyProjects($pagination: PaginationInput) {\n myProjects(pagination: $pagination) {\n items {\n id\n name\n key\n workspaceId\n status\n archived\n }\n total\n hasMore\n }\n }\n";
|
|
41
|
+
//#endregion
|
|
42
|
+
export { t as GET_ADMIN_OVERVIEW_CONTEXT, n as GET_MY_PROJECTS_DOC };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
-
import {
|
|
3
|
-
import { useAssistantControl as n } from "../shared/assistant/appControls/useAssistantControl.js";
|
|
4
|
-
import { EscapeLayer as r } from "../shared/components/EscapeLayer.js";
|
|
5
|
-
import { SHELL_OVERLAY_LAYER_CLASS as i } from "./shellOverlayLayer.js";
|
|
6
|
-
import { cn as a } from "../utils/cn.js";
|
|
2
|
+
import { cn as t } from "../utils/cn.js";
|
|
7
3
|
import "../utils/index.js";
|
|
4
|
+
import { useGlobalUiOrNull as n } from "../shared/providers/shell/GlobalUiProvider.js";
|
|
5
|
+
import { useAssistantControl as r } from "../shared/assistant/appControls/useAssistantControl.js";
|
|
6
|
+
import { EscapeLayer as i } from "../shared/components/EscapeLayer.js";
|
|
7
|
+
import { SHELL_OVERLAY_LAYER_CLASS as a } from "./shellOverlayLayer.js";
|
|
8
8
|
import { debounce as o, isSearchResults as s } from "./globalSearch/utils.js";
|
|
9
9
|
import { SearchInput as c } from "./globalSearch/SearchInput.js";
|
|
10
10
|
import { CategoryTabs as l } from "./globalSearch/CategoryTabs.js";
|
|
@@ -17,8 +17,8 @@ import { ExternalLink as v } from "lucide-react";
|
|
|
17
17
|
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
18
18
|
//#region src/chrome/GlobalSearch.tsx
|
|
19
19
|
function x({ open: x, onClose: S, categories: C = [], placeholder: w, recentSearches: T = [], onSearch: E, onSelect: D, onViewAllResults: O, className: k }) {
|
|
20
|
-
let A = e(), [j, M] = _(""), [N, P] = _(void 0), [F, I] = _([]), [L, R] = _(!1), [z, B] = _(null), [V, H] = _(!1), U = p(), { buildFilters: W, reset: G, searchMode: K, setSearchMode: q } = U, J =
|
|
21
|
-
|
|
20
|
+
let A = e(), [j, M] = _(""), [N, P] = _(void 0), [F, I] = _([]), [L, R] = _(!1), [z, B] = _(null), [V, H] = _(!1), U = p(), { buildFilters: W, reset: G, searchMode: K, setSearchMode: q } = U, J = n()?.openGlobalSearch, [Y, X] = _(null);
|
|
21
|
+
r("header.search", g(() => J ? { run: ({ query: e }) => (X(e === null ? null : { query: e }), J(), { status: "done" }) } : null, [J])), h(() => {
|
|
22
22
|
!x || !Y || (M(Y.query), X(null));
|
|
23
23
|
}, [x, Y]), h(() => {
|
|
24
24
|
x || (M(""), P(void 0), I([]), B(null), H(!1), G());
|
|
@@ -53,11 +53,11 @@ function x({ open: x, onClose: S, categories: C = [], placeholder: w, recentSear
|
|
|
53
53
|
}, {}), [F]), $ = m((e) => {
|
|
54
54
|
D(e), S();
|
|
55
55
|
}, [D, S]);
|
|
56
|
-
return x ? /* @__PURE__ */ y(
|
|
56
|
+
return x ? /* @__PURE__ */ y(i, {
|
|
57
57
|
modal: !0,
|
|
58
58
|
onDismiss: S,
|
|
59
59
|
children: /* @__PURE__ */ y("div", {
|
|
60
|
-
className:
|
|
60
|
+
className: t("fixed inset-0 flex items-center justify-center bg-bg-overlay backdrop-blur-md", a, "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", k),
|
|
61
61
|
onClick: S,
|
|
62
62
|
"data-state": x ? "open" : "closed",
|
|
63
63
|
role: "dialog",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
2
|
import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuLabel as i, DropdownMenuSeparator as a, DropdownMenuTrigger as o } from "../ui/dropdown-menu.js";
|
|
3
3
|
import { useTheme as s } from "../shared/providers/shell/ThemeProvider.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { cn as u } from "../utils/cn.js";
|
|
4
|
+
import { useThemeOptionLabels as c } from "./useThemeOptionLabels.js";
|
|
5
|
+
import { cn as l } from "../utils/cn.js";
|
|
7
6
|
import "../utils/index.js";
|
|
7
|
+
import { useExclusiveMenu as u } from "../shared/hooks/useExclusiveMenu.js";
|
|
8
8
|
import { useCallback as d, useState as f } from "react";
|
|
9
9
|
import { Check as p, Contrast as m, Monitor as h, Moon as g, Palette as _, Sun as v, Sunset as y, Trees as b, Waves as x } from "lucide-react";
|
|
10
10
|
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
@@ -44,8 +44,8 @@ var w = {
|
|
|
44
44
|
];
|
|
45
45
|
function E({ mobileOptimized: r = !0 }) {
|
|
46
46
|
let [p, m] = f(!1);
|
|
47
|
-
|
|
48
|
-
let { mode: y, setMode: b, resolvedTheme: x } = s(), E = e(), O =
|
|
47
|
+
u("header-theme", p, d(() => m(!1), []));
|
|
48
|
+
let { mode: y, setMode: b, resolvedTheme: x } = s(), E = e(), O = c(), k = E("themeSwitcher.label", "Theme"), A = x === "dark" ? g : v, j = d((e) => b(e), [b]);
|
|
49
49
|
return /* @__PURE__ */ C(t, {
|
|
50
50
|
open: p,
|
|
51
51
|
onOpenChange: m,
|
|
@@ -55,7 +55,7 @@ function E({ mobileOptimized: r = !0 }) {
|
|
|
55
55
|
type: "button",
|
|
56
56
|
"aria-label": k,
|
|
57
57
|
title: k,
|
|
58
|
-
className:
|
|
58
|
+
className: l("flex size-9 items-center justify-center rounded-button text-text-primary transition-colors", "hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", r ? "hidden md:flex" : ""),
|
|
59
59
|
children: /* @__PURE__ */ S(A, {
|
|
60
60
|
className: "size-5",
|
|
61
61
|
"aria-hidden": "true"
|
|
@@ -92,7 +92,7 @@ function E({ mobileOptimized: r = !0 }) {
|
|
|
92
92
|
function D({ active: e, icon: t, label: n, onSelect: i }) {
|
|
93
93
|
return /* @__PURE__ */ C(r, {
|
|
94
94
|
onSelect: i,
|
|
95
|
-
className:
|
|
95
|
+
className: l("gap-2", e && "bg-[var(--color-accent-soft)] text-text-primary"),
|
|
96
96
|
children: [
|
|
97
97
|
/* @__PURE__ */ S(t, {
|
|
98
98
|
className: "size-4 text-text-secondary",
|
package/dist/chrome.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
1
|
+
import { ThemePreferences as e } from "./chrome/ThemePreferences.js";
|
|
2
|
+
import { ShortcutHelpDialog as t } from "./chrome/ShortcutHelpDialog.js";
|
|
3
|
+
import { NAV_MORE_ID_PREFIX as n, applyNavVisibility as r, applyPermissionFilter as i, applySurfaceVisibility as a, isItemEffectivelyShown as o } from "./chrome/sideNavigation/navVisibility.js";
|
|
4
|
+
import { AppShellLayout as s } from "./chrome/AppShellLayout.js";
|
|
5
|
+
import { PageHeader as c } from "./chrome/PageHeader.js";
|
|
6
|
+
import { HeaderBar as l } from "./chrome/HeaderBar.js";
|
|
7
|
+
import { FooterBar as u } from "./chrome/FooterBar.js";
|
|
8
|
+
import { PluginFooterStrip as d } from "./chrome/PluginFooterStrip.js";
|
|
9
|
+
import { DEFAULT_FOOTER_COLUMNS as f, DEFAULT_SOCIAL_LINKS as p, Footer as m } from "./chrome/Footer.js";
|
|
10
|
+
import { SideNavigation as h } from "./chrome/SideNavigation.js";
|
|
11
|
+
import { GlobalSearch as g } from "./chrome/GlobalSearch.js";
|
|
12
|
+
import { CommandPalette as _ } from "./chrome/CommandPalette.js";
|
|
13
|
+
import { Breadcrumbs as v } from "./chrome/Breadcrumbs.js";
|
|
14
|
+
import { NavLink as y } from "./chrome/NavLink.js";
|
|
15
|
+
import { Tabs as b } from "./chrome/Tabs.js";
|
|
16
|
+
import { Sidebar as x } from "./chrome/Sidebar.js";
|
|
17
|
+
import { ProfileSwitcher as S } from "./chrome/ProfileSwitcher.js";
|
|
18
|
+
import { ProductSwitcher as C } from "./chrome/ProductSwitcher.js";
|
|
19
|
+
import { LanguageSwitcher as w } from "./chrome/LanguageSwitcher.js";
|
|
20
|
+
import { ContextSwitcher as T } from "./chrome/ContextSwitcher.js";
|
|
21
|
+
import { GeographySwitcher as E } from "./chrome/GeographySwitcher.js";
|
|
22
|
+
import { PushOptInToggle as D } from "./chrome/notificationCenter/PushOptInToggle.js";
|
|
23
|
+
import { NotificationCenter as O } from "./chrome/NotificationCenter.js";
|
|
24
|
+
import { LanguagePickerSheet as k } from "./chrome/LanguagePickerSheet.js";
|
|
25
|
+
import { ProductPickerSheet as A } from "./chrome/ProductPickerSheet.js";
|
|
26
|
+
import { AccountSwitcher as j } from "./chrome/AccountSwitcher.js";
|
|
27
|
+
import { firstProjectOfWorkspace as M, switchOrganization as N, switchWorkspace as P } from "./chrome/contextSwitcher/contextSwitch.js";
|
|
28
|
+
import { resolveSwitchTarget as F, sectionLandingRule as I } from "./chrome/contextSwitcher/resolveSwitchTarget.js";
|
|
29
|
+
import { useContextSwitchController as L } from "./chrome/contextSwitcher/useContextSwitchController.js";
|
|
30
|
+
import { AutoBreadcrumbs as R, registerBreadcrumbName as z, unregisterBreadcrumbName as B } from "./chrome/AutoBreadcrumbs.js";
|
|
31
|
+
import { NavCustomizeDialog as V } from "./chrome/NavCustomizeDialog.js";
|
|
32
|
+
import { PersonaSimulationPill as H, PersonaSurfaceControls as U } from "./chrome/PersonaSurfaceControls.js";
|
|
33
|
+
import { ProductSideNav as W } from "./chrome/ProductSideNav.js";
|
|
34
|
+
import { BrandMark as G } from "./chrome/BrandMark.js";
|
|
35
|
+
import { DynamicFooter as K } from "./chrome/DynamicFooter.js";
|
|
36
|
+
import { PanelTabs as q } from "./chrome/PanelTabs.js";
|
|
37
|
+
import { PanelContainer as J } from "./chrome/PanelContainer.js";
|
|
38
|
+
import { StatusBar as Y } from "./chrome/StatusBar.js";
|
|
39
|
+
import { PluginRoutes as X } from "./chrome/PluginRoutes.js";
|
|
40
|
+
import { PluginSettingsPage as Z } from "./chrome/PluginSettingsPage.js";
|
|
41
|
+
import { PluginToolbar as Q } from "./chrome/PluginToolbar.js";
|
|
42
|
+
import { PluginWidgetGrid as $ } from "./chrome/PluginWidgetGrid.js";
|
|
43
|
+
import { PluginContextMenuTarget as ee } from "./chrome/PluginContextMenuTarget.js";
|
|
44
44
|
import { selectMobileTabs as te } from "./chrome/mobileTabBar/selectTabs.js";
|
|
45
45
|
import { useMobileTabBarVisible as ne } from "./chrome/mobileTabBar/useMobileTabBarVisible.js";
|
|
46
46
|
import { MobileTabBar as re } from "./chrome/MobileTabBar.js";
|
|
@@ -48,4 +48,4 @@ import { NativeTopBar as ie } from "./chrome/NativeTopBar.js";
|
|
|
48
48
|
import { SwipeNavigation as ae } from "./chrome/SwipeNavigation.js";
|
|
49
49
|
import { NativePageTransition as oe } from "./chrome/NativePageTransition.js";
|
|
50
50
|
import { findNavTitle as se, useNativeTopBarTitle as ce } from "./chrome/nativeTopBarTitle.js";
|
|
51
|
-
export {
|
|
51
|
+
export { j as AccountSwitcher, s as AppShellLayout, R as AutoBreadcrumbs, G as BrandMark, v as Breadcrumbs, _ as CommandPalette, T as ContextSwitcher, f as DEFAULT_FOOTER_COLUMNS, p as DEFAULT_SOCIAL_LINKS, K as DynamicFooter, m as Footer, u as FooterBar, E as GeographySwitcher, g as GlobalSearch, l as HeaderBar, k as LanguagePickerSheet, w as LanguageSwitcher, re as MobileTabBar, n as NAV_MORE_ID_PREFIX, oe as NativePageTransition, ie as NativeTopBar, V as NavCustomizeDialog, y as NavLink, O as NotificationCenter, c as PageHeader, J as PanelContainer, q as PanelTabs, H as PersonaSimulationPill, U as PersonaSurfaceControls, ee as PluginContextMenuTarget, d as PluginFooterStrip, X as PluginRoutes, Z as PluginSettingsPage, Q as PluginToolbar, $ as PluginWidgetGrid, A as ProductPickerSheet, W as ProductSideNav, C as ProductSwitcher, S as ProfileSwitcher, D as PushOptInToggle, t as ShortcutHelpDialog, h as SideNavigation, x as Sidebar, Y as StatusBar, ae as SwipeNavigation, b as Tabs, e as ThemePreferences, r as applyNavVisibility, i as applyPermissionFilter, a as applySurfaceVisibility, se as findNavTitle, M as firstProjectOfWorkspace, o as isItemEffectivelyShown, z as registerBreadcrumbName, F as resolveSwitchTarget, I as sectionLandingRule, te as selectMobileTabs, N as switchOrganization, P as switchWorkspace, B as unregisterBreadcrumbName, L as useContextSwitchController, ne as useMobileTabBarVisible, ce as useNativeTopBarTitle };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AcceptShareRoute — the shared shell wrapper for the generic
|
|
3
|
+
* `<AcceptSharePage>` (`@burdenoff/fe-libs/sharing`). Every app shell mounts it
|
|
4
|
+
* from `@burdenoff/fe-libs/platform-pages` at `/share/accept/:token`.
|
|
5
|
+
*
|
|
6
|
+
* The fe-libs component is presentational + state-machine only; this wrapper
|
|
7
|
+
* supplies the GraphQL bindings (`shareGrantByToken` / `acceptShare` /
|
|
8
|
+
* `declineShare`) via `graphqlFetch` against the WORKSPACE gateway, the
|
|
9
|
+
* current user's email for the wrong-account guard, and the post-accept
|
|
10
|
+
* navigation target.
|
|
11
|
+
*
|
|
12
|
+
* The route lives under `<ProtectedRoute>` so the caller is authenticated and
|
|
13
|
+
* `graphqlFetch` auto-attaches their access + workspace tokens; the underlying
|
|
14
|
+
* `acceptShare` / `declineShare` / `shareGrantByToken` ops are `@rbac(public:
|
|
15
|
+
* true)` but accepting needs the actor identity to bind the grant.
|
|
16
|
+
*/
|
|
17
|
+
export interface AcceptShareRouteProps {
|
|
18
|
+
/**
|
|
19
|
+
* Where the shell lands the user after accepting (or when the URL carries no
|
|
20
|
+
* token), e.g. "/vibecontrols" or "/workflows". The accepted resource is
|
|
21
|
+
* listed there.
|
|
22
|
+
*/
|
|
23
|
+
homePath: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional per-resource destination. Receives the `resourceType` of the share
|
|
26
|
+
* that was accepted and returns an in-app path; return `undefined` to fall
|
|
27
|
+
* back to `homePath`.
|
|
28
|
+
*/
|
|
29
|
+
resolveDestination?: (resourceType: string) => string | undefined;
|
|
30
|
+
}
|
|
31
|
+
/** Resolve the post-accept landing path for a share's resource type. */
|
|
32
|
+
export declare function resolveAcceptedShareDestination(resourceType: string | undefined, homePath: string, resolveDestination?: (resourceType: string) => string | undefined): string;
|
|
33
|
+
export declare function AcceptShareRoute({ homePath, resolveDestination }: AcceptShareRouteProps): import('react/jsx-runtime').JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { graphqlFetch as e } from "../shared/graphql/fetch.js";
|
|
2
|
+
import { useAuth as t } from "../shared/providers/shell/AuthProvider.js";
|
|
3
|
+
import { useShellNavigate as n } from "../shared/utils/appHelpers.js";
|
|
4
|
+
import "../shared-utils.js";
|
|
5
|
+
import { AcceptSharePage as r } from "../sharing/AcceptSharePage.js";
|
|
6
|
+
import "../sharing.js";
|
|
7
|
+
import { useCallback as i, useRef as a } from "react";
|
|
8
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
9
|
+
import { useParams as s } from "react-router";
|
|
10
|
+
//#region src/platform-pages/AcceptShareRoute.tsx
|
|
11
|
+
var c = "\n query ShareGrantByToken($token: String!) {\n shareGrantByToken(token: $token) {\n id\n resourceType\n resourceName\n role\n visibility\n status\n sharerName\n expiresAt\n }\n }\n", l = "\n mutation AcceptShare($token: String!) {\n acceptShare(token: $token) {\n id\n resourceType\n resourceId\n role\n status\n }\n }\n", u = "\n mutation DeclineShare($token: String!) {\n declineShare(token: $token)\n }\n";
|
|
12
|
+
function d(e, t, n) {
|
|
13
|
+
return !e || !n ? t : n(e) ?? t;
|
|
14
|
+
}
|
|
15
|
+
function f({ homePath: f, resolveDestination: p }) {
|
|
16
|
+
let { token: m } = s(), h = t(), g = n(), _ = h.user?.email ?? null, v = a(void 0), y = i(async (t) => {
|
|
17
|
+
let n = (await e({
|
|
18
|
+
gateway: "workspace",
|
|
19
|
+
query: c,
|
|
20
|
+
variables: { token: t },
|
|
21
|
+
operationName: "ShareGrantByToken",
|
|
22
|
+
workspaceId: !0,
|
|
23
|
+
workspaceToken: !0
|
|
24
|
+
})).data?.shareGrantByToken;
|
|
25
|
+
return n ? (v.current = n.resourceType, {
|
|
26
|
+
resourceType: n.resourceType,
|
|
27
|
+
resourceName: n.resourceName ?? void 0,
|
|
28
|
+
role: n.role,
|
|
29
|
+
sharerName: n.sharerName ?? void 0,
|
|
30
|
+
status: n.status
|
|
31
|
+
}) : null;
|
|
32
|
+
}, []), b = i(async (t) => {
|
|
33
|
+
let n = await e({
|
|
34
|
+
gateway: "workspace",
|
|
35
|
+
query: l,
|
|
36
|
+
variables: { token: t },
|
|
37
|
+
operationName: "AcceptShare",
|
|
38
|
+
workspaceId: !0,
|
|
39
|
+
workspaceToken: !0
|
|
40
|
+
});
|
|
41
|
+
if (n.errors?.length) throw Error(n.errors[0].message);
|
|
42
|
+
}, []), x = i(async (t) => {
|
|
43
|
+
let n = await e({
|
|
44
|
+
gateway: "workspace",
|
|
45
|
+
query: u,
|
|
46
|
+
variables: { token: t },
|
|
47
|
+
operationName: "DeclineShare",
|
|
48
|
+
workspaceId: !0,
|
|
49
|
+
workspaceToken: !0
|
|
50
|
+
});
|
|
51
|
+
if (n.errors?.length) throw Error(n.errors[0].message);
|
|
52
|
+
}, []);
|
|
53
|
+
return m ? /* @__PURE__ */ o(r, {
|
|
54
|
+
token: m,
|
|
55
|
+
loadPreview: y,
|
|
56
|
+
accept: b,
|
|
57
|
+
decline: x,
|
|
58
|
+
onAccepted: () => {
|
|
59
|
+
g(d(v.current, f, p));
|
|
60
|
+
},
|
|
61
|
+
currentUserEmail: _
|
|
62
|
+
}) : /* @__PURE__ */ o(r, {
|
|
63
|
+
token: "",
|
|
64
|
+
loadPreview: async () => null,
|
|
65
|
+
accept: async () => {},
|
|
66
|
+
decline: async () => {},
|
|
67
|
+
onAccepted: () => g(f),
|
|
68
|
+
currentUserEmail: _
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { f as AcceptShareRoute, d as resolveAcceptedShareDestination };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AffiliatesPage — owner-side affiliate code CRUDL + analytics + notes.
|
|
3
|
+
*
|
|
4
|
+
* Wired against `global-activity-svc` referral module via the global gateway.
|
|
5
|
+
* Per marqueue §659-682 and dev/audit/marqueue/referrer.md. Shared by every app
|
|
6
|
+
* shell (`@burdenoff/fe-libs/platform-pages`); mount it at `/affiliates` inside
|
|
7
|
+
* the shell's protected routes and pass the shell's product slug.
|
|
8
|
+
*/
|
|
9
|
+
export interface AffiliatesPageProps {
|
|
10
|
+
/**
|
|
11
|
+
* Product slug pre-filled on new affiliate codes (the PlatformProduct slug of
|
|
12
|
+
* the shell that mounts the page, e.g. "vibecontrols" or "fluidgrids").
|
|
13
|
+
*/
|
|
14
|
+
productSlug: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function AffiliatesPage({ productSlug }: AffiliatesPageProps): import('react/jsx-runtime').JSX.Element;
|