@burdenoff/fe-libs 2026.601.11 → 2026.601.13
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/shared/actors/index.js +1 -1
- package/dist/shared/config/shellRoutes.d.ts.map +1 -1
- package/dist/shared/config/shellRoutes.js +7 -0
- package/dist/shared/tours/toursContext/useTourMutations.d.ts.map +1 -1
- package/dist/shared/tours/toursContext/useTourMutations.js +1 -10
- package/dist/shared.js +77 -77
- package/dist/sharing/AcceptSharePage.d.ts +28 -0
- package/dist/sharing/AcceptSharePage.d.ts.map +1 -0
- package/dist/sharing/AcceptSharePage.js +270 -0
- package/dist/sharing/MemberPicker.d.ts +26 -0
- package/dist/sharing/MemberPicker.d.ts.map +1 -0
- package/dist/sharing/MemberPicker.js +110 -0
- package/dist/sharing/PermissionSelect.d.ts +19 -0
- package/dist/sharing/PermissionSelect.d.ts.map +1 -0
- package/dist/sharing/PermissionSelect.js +30 -0
- package/dist/sharing/ShareDialog.d.ts +26 -0
- package/dist/sharing/ShareDialog.d.ts.map +1 -0
- package/dist/sharing/ShareDialog.js +318 -0
- package/dist/sharing/SharedWithList.d.ts +18 -0
- package/dist/sharing/SharedWithList.d.ts.map +1 -0
- package/dist/sharing/SharedWithList.js +184 -0
- package/dist/sharing/index.d.ts +9 -0
- package/dist/sharing/index.d.ts.map +1 -0
- package/dist/sharing/shareUrl.d.ts +20 -0
- package/dist/sharing/shareUrl.d.ts.map +1 -0
- package/dist/sharing/shareUrl.js +39 -0
- package/dist/sharing/types.d.ts +94 -0
- package/dist/sharing/types.d.ts.map +1 -0
- package/dist/sharing/types.js +25 -0
- package/dist/sharing/useWorkspaceDirectory.d.ts +43 -0
- package/dist/sharing/useWorkspaceDirectory.d.ts.map +1 -0
- package/dist/sharing/useWorkspaceDirectory.js +117 -0
- package/dist/sharing.d.ts +2 -0
- package/dist/sharing.js +9 -0
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shellRoutes.d.ts","sourceRoot":"","sources":["../../../src/shared/config/shellRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAK5E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"shellRoutes.d.ts","sourceRoot":"","sources":["../../../src/shared/config/shellRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAK5E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAwKtD,CAAC;AAYF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,gBAAgB,EAA6B,GACpD,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAe7C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,gBAAgB,EAA6B,GACpD,OAAO,CAGT;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,gBAAgB,EAA6B,GACpD,OAAO,CAET;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,gBAAgB,EAA6B,GACpD,OAAO,CAET"}
|
|
@@ -131,6 +131,13 @@ var e = {
|
|
|
131
131
|
showFooter: !1,
|
|
132
132
|
showBreadcrumb: !1
|
|
133
133
|
},
|
|
134
|
+
{
|
|
135
|
+
pattern: /^\/share\/accept\//,
|
|
136
|
+
showHeader: !1,
|
|
137
|
+
showSidebar: !1,
|
|
138
|
+
showFooter: !1,
|
|
139
|
+
showBreadcrumb: !1
|
|
140
|
+
},
|
|
134
141
|
{
|
|
135
142
|
pattern: /^\/embed\//,
|
|
136
143
|
showHeader: !1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTourMutations.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/toursContext/useTourMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC,UAAU,oBAAoB;IAC5B,YAAY,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,WAAW,EAAE,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC;IACtC,0BAA0B,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACrD,+BAA+B,EAAE,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACxE;AAED,MAAM,MAAM,cAAc,GACtB,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,MAAM,EACN,WAAW,EACX,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,WAAW,EACX,0BAA0B,EAC1B,+BAA+B,GAChC,EAAE,oBAAoB;4BAEJ,MAAM,UAAU,SAAS,GAAG,WAAW,GAAG,SAAS,YAAY,MAAM;mCA4ErE,MAAM,UAAU,MAAM;4BAoBnB,cAAc,UAAU,MAAM,YAAY,iBAAiB;
|
|
1
|
+
{"version":3,"file":"useTourMutations.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/toursContext/useTourMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC,UAAU,oBAAoB;IAC5B,YAAY,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,WAAW,EAAE,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC;IACtC,0BAA0B,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACrD,+BAA+B,EAAE,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACxE;AAED,MAAM,MAAM,cAAc,GACtB,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,MAAM,EACN,WAAW,EACX,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,WAAW,EACX,0BAA0B,EAC1B,+BAA+B,GAChC,EAAE,oBAAoB;4BAEJ,MAAM,UAAU,SAAS,GAAG,WAAW,GAAG,SAAS,YAAY,MAAM;mCA4ErE,MAAM,UAAU,MAAM;4BAoBnB,cAAc,UAAU,MAAM,YAAY,iBAAiB;EAuChF"}
|
|
@@ -91,16 +91,7 @@ function l({ globalClient: l, userId: u, productSlug: d, moduleId: f, pageId: p,
|
|
|
91
91
|
userAgent: typeof navigator < "u" ? navigator.userAgent : void 0,
|
|
92
92
|
duration: n?.duration,
|
|
93
93
|
metadata: n?.metadata,
|
|
94
|
-
context: m ? {
|
|
95
|
-
workspaceId: m,
|
|
96
|
-
productId: d,
|
|
97
|
-
moduleId: f,
|
|
98
|
-
pageId: p
|
|
99
|
-
} : {
|
|
100
|
-
productId: d,
|
|
101
|
-
moduleId: f,
|
|
102
|
-
pageId: p
|
|
103
|
-
}
|
|
94
|
+
context: m ? { workspaceId: m } : void 0
|
|
104
95
|
} }
|
|
105
96
|
});
|
|
106
97
|
} catch {}
|
package/dist/shared.js
CHANGED
|
@@ -29,88 +29,88 @@ import { clearUserContext as mt, initializeLogger as ht, setUserContext as gt }
|
|
|
29
29
|
import { createProfileScopedStorage as _t, getProfileScopedKey as vt } from "./shared/utils/profileScopedStorage.js";
|
|
30
30
|
import { QUOTA_EXHAUSTED_CODE as yt, RESOURCE_CAP_EXCEEDED_CODE as bt, STORAGE_QUOTA_EXCEEDED_CODE as xt, UPGRADE_ERROR_CODES as St, buildQuotaExhaustedMessage as Ct, extractQuotaExhaustedExtensions as wt, extractUpgradeErrorExtensions as Tt, isQuotaExhaustedError as Et, isUpgradeError as Dt } from "./shared/utils/quotaErrors.js";
|
|
31
31
|
import { cn as Ot } from "./shared-utils.js";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
32
|
+
import { ActorIdentity as kt } from "./shared/actors/ActorIdentity.js";
|
|
33
|
+
import { buildActorFallback as At, useActorProfiles as jt } from "./shared/actors/useActorProfiles.js";
|
|
34
|
+
import { ErrorBoundary as Mt } from "./shared/components/ErrorBoundary.js";
|
|
35
|
+
import { RequireAuth as Nt, RequireGuest as Pt } from "./shared/components/RequireAuth.js";
|
|
36
|
+
import { PermissionButton as Ft, PermissionGate as It, PermissionLink as Lt } from "./shared/components/PermissionGate.js";
|
|
37
|
+
import { AccessDenied as Rt, PermissionDenied as zt } from "./shared/components/AccessDenied.js";
|
|
38
|
+
import { ErrorFallback as Bt } from "./shared/components/ErrorFallback.js";
|
|
39
|
+
import { LoadingFallback as Vt, PageLoadingFallback as Ht, SectionLoadingFallback as Ut } from "./shared/components/LoadingFallback.js";
|
|
40
|
+
import { MicrofrontendErrorBoundary as Wt } from "./shared/components/MicrofrontendErrorBoundary.js";
|
|
41
|
+
import { ConditionalShell as Gt } from "./shared/components/ConditionalShell.js";
|
|
42
|
+
import { usePWA as Kt } from "./shared/hooks/usePWA.js";
|
|
43
|
+
import { PWAInstallBanner as qt } from "./shared/components/PWAInstallBanner.js";
|
|
44
|
+
import { ErrorBoundary as Jt } from "./shared/components/AppErrorBoundary.js";
|
|
45
|
+
import { FeatureFlagProvider as Yt, useFeatureFlags as Xt } from "./shared/feature-flags/FeatureFlagProvider.js";
|
|
46
|
+
import { useFeatureFlag as Zt, useFeatureFlagDetails as Qt, useFeatureFlagValue as $t } from "./shared/feature-flags/useFeatureFlag.js";
|
|
47
|
+
import { FeatureGate as en } from "./shared/feature-flags/FeatureGate.js";
|
|
46
48
|
import "./shared-feature-flags.js";
|
|
47
|
-
import { ContextConversationWidget as
|
|
48
|
-
import { detectPlatform as
|
|
49
|
-
import { KeyboardHelpDialogWrapper as
|
|
50
|
-
import { QuotaMeter as
|
|
51
|
-
import { UPGRADE_PROMPT_EVENT as
|
|
52
|
-
import { UpgradeInlineBanner as
|
|
49
|
+
import { ContextConversationWidget as tn } from "./shared/components/ContextConversationWidget.js";
|
|
50
|
+
import { detectPlatform as nn, formatKeyCombo as rn, getDisplayKeysForPlatform as an, getShortcutLabel as on, isMac as sn, isMobileDevice as cn, isTabletDevice as ln, matchesKeyCombo as un, normalizeKey as dn, normalizePlatformCombo as fn, parseKeyCombo as pn, shouldEnableKeyboardShortcuts as mn, shouldIgnoreShortcut as hn } from "./shared/keyboard/utils.js";
|
|
51
|
+
import { KeyboardHelpDialogWrapper as gn } from "./shared/components/KeyboardHelpDialogWrapper.js";
|
|
52
|
+
import { QuotaMeter as _n } from "./shared/components/QuotaMeter.js";
|
|
53
|
+
import { UPGRADE_PROMPT_EVENT as vn, UpgradePromptModal as yn, dispatchUpgradePrompt as bn } from "./shared/components/UpgradePromptModal.js";
|
|
54
|
+
import { UpgradeInlineBanner as xn } from "./shared/components/UpgradeInlineBanner.js";
|
|
53
55
|
import "./shared-components.js";
|
|
54
|
-
import { DevtoolsSink as
|
|
55
|
-
import { BroadcastChannelSink as
|
|
56
|
-
import { BackendAuditSink as
|
|
57
|
-
import { RybbitSink as
|
|
58
|
-
import { OtelBrowserSink as
|
|
59
|
-
import { EventBusProvider as
|
|
60
|
-
import { useDebounce as
|
|
61
|
-
import { useThrottle as
|
|
62
|
-
import { BREAKPOINTS as
|
|
63
|
-
import { useOnClickOutside as
|
|
64
|
-
import { useKeyPress as
|
|
65
|
-
import { useCopyToClipboard as
|
|
66
|
-
import { useLocalStorage as
|
|
67
|
-
import { useSessionStorage as
|
|
68
|
-
import { usePrevious as
|
|
69
|
-
import { useConditionalToggle as
|
|
70
|
-
import { useAsync as
|
|
71
|
-
import { MODIFIER_KEYS as
|
|
72
|
-
import { useKeyboardShortcuts as
|
|
73
|
-
import { useHotkeys as
|
|
74
|
-
import { useShortcutHelp as
|
|
75
|
-
import { GLOBAL_SHORTCUT_CATEGORIES as
|
|
76
|
-
import { useLogger as
|
|
77
|
-
import { useHasAnimated as
|
|
78
|
-
import { useReferralAttribution as
|
|
79
|
-
import { useRecordProductVisit as
|
|
80
|
-
import { QUOTA_EXHAUSTED_EVENT as
|
|
81
|
-
import { PLAN_USAGE_SNAPSHOT_EVENT as
|
|
82
|
-
import { appendContextToPath as
|
|
83
|
-
import { MicrofrontendContext as
|
|
84
|
-
import { detectDeviceType as
|
|
85
|
-
import { useTourPlayer as
|
|
86
|
-
import { TourSpotlight as
|
|
87
|
-
import { TourTooltip as
|
|
88
|
-
import { TourPlayerProvider as
|
|
89
|
-
import { TourPlayer as
|
|
90
|
-
import { getTourContextRank as
|
|
91
|
-
import { withTourProgressStatus as
|
|
92
|
-
import { ToursProvider as
|
|
93
|
-
import { TourInitializer as
|
|
94
|
-
import { AppShellProvider as
|
|
95
|
-
import { MicrofrontendProvider as
|
|
96
|
-
import { TourTrigger as
|
|
56
|
+
import { DevtoolsSink as Sn } from "./shared/events/sinks/DevtoolsSink.js";
|
|
57
|
+
import { BroadcastChannelSink as Cn } from "./shared/events/sinks/BroadcastChannelSink.js";
|
|
58
|
+
import { BackendAuditSink as wn } from "./shared/events/sinks/BackendAuditSink.js";
|
|
59
|
+
import { RybbitSink as Tn } from "./shared/events/sinks/RybbitSink.js";
|
|
60
|
+
import { OtelBrowserSink as En } from "./shared/events/sinks/OtelBrowserSink.js";
|
|
61
|
+
import { EventBusProvider as Dn, createEventBus as On, useEvent as kn, useEventBus as An, useEventEmitter as jn } from "./shared-events.js";
|
|
62
|
+
import { useDebounce as Mn } from "./shared/hooks/useDebounce.js";
|
|
63
|
+
import { useThrottle as Nn } from "./shared/hooks/useThrottle.js";
|
|
64
|
+
import { BREAKPOINTS as Pn, useBreakpoint as Fn, useMobileBreakpoint as In } from "./shared/hooks/useBreakpoint.js";
|
|
65
|
+
import { useOnClickOutside as Ln, useOnClickOutsideWithRef as Rn } from "./shared/hooks/useOnClickOutside.js";
|
|
66
|
+
import { useKeyPress as zn, useKeyboardShortcut as Bn } from "./shared/hooks/useKeyPress.js";
|
|
67
|
+
import { useCopyToClipboard as Vn } from "./shared/hooks/useCopyToClipboard.js";
|
|
68
|
+
import { useLocalStorage as Hn } from "./shared/hooks/useLocalStorage.js";
|
|
69
|
+
import { useSessionStorage as Un } from "./shared/hooks/useSessionStorage.js";
|
|
70
|
+
import { usePrevious as Wn, usePreviousDistinct as Gn, usePreviousHistory as Kn } from "./shared/hooks/usePrevious.js";
|
|
71
|
+
import { useConditionalToggle as qn, useToggle as Jn, useToggleObject as Yn } from "./shared/hooks/useToggle.js";
|
|
72
|
+
import { useAsync as Xn, useAsyncImmediate as Zn } from "./shared/hooks/useAsync.js";
|
|
73
|
+
import { MODIFIER_KEYS as Qn, PLATFORM_TYPES as $n } from "./shared/keyboard/types.js";
|
|
74
|
+
import { useKeyboardShortcuts as er } from "./shared/keyboard/useKeyboardShortcuts.js";
|
|
75
|
+
import { useHotkeys as tr } from "./shared/keyboard/useHotkeys.js";
|
|
76
|
+
import { useShortcutHelp as nr } from "./shared/keyboard/useShortcutHelp.js";
|
|
77
|
+
import { GLOBAL_SHORTCUT_CATEGORIES as rr, createGlobalShortcuts as ir, getGlobalShortcutsByCategory as ar, mergeShortcuts as or } from "./shared/keyboard/globalShortcuts.js";
|
|
78
|
+
import { useLogger as sr } from "./shared/logger/useLogger.js";
|
|
79
|
+
import { useHasAnimated as cr } from "./shared/hooks/useHasAnimated.js";
|
|
80
|
+
import { useReferralAttribution as lr } from "./shared/hooks/useReferralAttribution.js";
|
|
81
|
+
import { useRecordProductVisit as ur } from "./shared/hooks/useRecordProductVisit.js";
|
|
82
|
+
import { QUOTA_EXHAUSTED_EVENT as dr, dispatchQuotaExhausted as fr, useQuotaErrorToast as pr } from "./shared/hooks/useQuotaErrorToast.js";
|
|
83
|
+
import { PLAN_USAGE_SNAPSHOT_EVENT as mr, publishPlanUsageSnapshot as hr, useUpgradePrompt as gr } from "./shared/hooks/useUpgradePrompt.js";
|
|
84
|
+
import { appendContextToPath as _r, useCurrentContextSearchParams as vr } from "./shared/hooks/useCurrentContextSearchParams.js";
|
|
85
|
+
import { MicrofrontendContext as yr, useMicrofrontendContext as br } from "./shared-hooks.js";
|
|
86
|
+
import { detectDeviceType as xr, getResponsiveSelector as Sr } from "./shared/tours/types.js";
|
|
87
|
+
import { useTourPlayer as Cr } from "./shared/tours/useTourPlayer.js";
|
|
88
|
+
import { TourSpotlight as wr } from "./shared/tours/TourSpotlight.js";
|
|
89
|
+
import { TourTooltip as Tr } from "./shared/tours/TourTooltip.js";
|
|
90
|
+
import { TourPlayerProvider as Er, useIsTourPlaying as Dr, useStartTour as Or, useStopTour as kr, useTourPlayerContext as Ar } from "./shared/tours/TourPlayerProvider.js";
|
|
91
|
+
import { TourPlayer as jr, TourTriggerButton as Mr, usePlayTour as Nr } from "./shared/tours/TourPlayer.js";
|
|
92
|
+
import { getTourContextRank as Pr, getTourRouteCatalog as Fr, getTourRouteModules as Ir, getTourRoutePages as Lr, isTourVisibleForContext as Rr, normalizeTourPath as zr, registerTourRouteCatalog as Br, resolveTourTargetPath as Vr } from "./shared/tours/routeCatalog.js";
|
|
93
|
+
import { withTourProgressStatus as Hr } from "./shared/tours/progress.js";
|
|
94
|
+
import { ToursProvider as Ur, useAutoStartTour as Wr, useSafeToursContext as Gr, useTours as Kr, useToursContext as qr } from "./shared/tours/ToursContext.js";
|
|
95
|
+
import { TourInitializer as Jr } from "./shared/tours/TourInitializer.js";
|
|
96
|
+
import { AppShellProvider as Yr, resolveAppShellObservabilityConfig as Xr } from "./shared/providers/AppShellProvider.js";
|
|
97
|
+
import { MicrofrontendProvider as Zr } from "./shared-providers.js";
|
|
98
|
+
import { TourTrigger as Qr } from "./shared/tours/TourTrigger.js";
|
|
97
99
|
import "./shared-tours.js";
|
|
98
|
-
import { getNativeBridge as
|
|
99
|
-
import { getPlatform as
|
|
100
|
-
import { nativeConfirm as
|
|
101
|
-
import { SafeAreaView as
|
|
102
|
-
import { useNativePlatform as
|
|
103
|
-
import { useSafeArea as
|
|
104
|
-
import { useNativeKeyboard as
|
|
105
|
-
import { useAppState as
|
|
106
|
-
import { useDeviceInfo as
|
|
107
|
-
import { useHaptics as
|
|
108
|
-
import { useStatusBar as
|
|
100
|
+
import { getNativeBridge as $r } from "./shared/native/bridge.js";
|
|
101
|
+
import { getPlatform as ei, isAndroid as ti, isIOS as ni, isNative as ri, isWeb as ii } from "./shared/native/platform.js";
|
|
102
|
+
import { nativeConfirm as ai, nativeCopyText as oi, nativeImpact as si, nativeNotify as ci, nativeOpenUrl as li, nativeShare as ui, nativeToast as di } from "./shared/native/consumers.js";
|
|
103
|
+
import { SafeAreaView as fi } from "./shared/native/SafeAreaView.js";
|
|
104
|
+
import { useNativePlatform as pi } from "./shared/native/hooks/useNativePlatform.js";
|
|
105
|
+
import { useSafeArea as mi } from "./shared/native/hooks/useSafeArea.js";
|
|
106
|
+
import { useNativeKeyboard as hi } from "./shared/native/hooks/useNativeKeyboard.js";
|
|
107
|
+
import { useAppState as gi } from "./shared/native/hooks/useAppState.js";
|
|
108
|
+
import { useDeviceInfo as _i } from "./shared/native/hooks/useDeviceInfo.js";
|
|
109
|
+
import { useHaptics as vi } from "./shared/native/hooks/useHaptics.js";
|
|
110
|
+
import { useStatusBar as yi } from "./shared/native/hooks/useStatusBar.js";
|
|
109
111
|
import "./shared-native.js";
|
|
110
|
-
import { buildActorFallback as _i, useActorProfiles as vi } from "./shared/actors/useActorProfiles.js";
|
|
111
|
-
import { ActorIdentity as yi } from "./shared/actors/ActorIdentity.js";
|
|
112
112
|
import "./shared/actors/index.js";
|
|
113
113
|
//#region src/shared/index.ts
|
|
114
114
|
var bi = "1.0.0";
|
|
115
115
|
//#endregion
|
|
116
|
-
export {
|
|
116
|
+
export { Rt as AccessDenied, kt as ActorIdentity, Me as ApolloClient, Ne as ApolloProvider, Jt as AppErrorBoundary, ot as AppInitializer, Yr as AppShellProvider, re as BACKEND_ERROR_EVENT, Pn as BREAKPOINTS, wn as BackendAuditSink, Cn as BroadcastChannelSink, W as COMMON_SHELL_LESS_ROUTES, ie as CONNECTION_STATUS_EVENT, Gt as ConditionalShell, pt as ConsoleTransport, tn as ContextConversationWidget, X as DEFAULT_PAGE_SIZE, G as DEFAULT_SHELL_CONFIG, Sn as DevtoolsSink, Mt as ErrorBoundary, Bt as ErrorFallback, Dn as EventBusProvider, bi as FE_SHARED_VERSION, Yt as FeatureFlagProvider, en as FeatureGate, Z as GATEWAYS, rr as GLOBAL_SHORTCUT_CATEGORIES, Ee as GatewayProvider, Pe as InMemoryCache, gn as KeyboardHelpDialogWrapper, Vt as LoadingFallback, lt as LogLevel, dt as LogManager, ut as Logger, Qn as MODIFIER_KEYS, yr as MicrofrontendContext, Wt as MicrofrontendErrorBoundary, Zr as MicrofrontendProvider, En as OtelBrowserSink, mr as PLAN_USAGE_SNAPSHOT_EVENT, $n as PLATFORM_TYPES, B as PRODUCTS, V as PRODUCT_URLS, qt as PWAInstallBanner, Ht as PageLoadingFallback, Ft as PermissionButton, zt as PermissionDenied, It as PermissionGate, Lt as PermissionLink, yt as QUOTA_EXHAUSTED_CODE, dr as QUOTA_EXHAUSTED_EVENT, _n as QuotaMeter, bt as RESOURCE_CAP_EXCEEDED_CODE, Nt as RequireAuth, Pt as RequireGuest, Tn as RybbitSink, be as SSELink, tt as SSORedirectSpinner, xt as STORAGE_QUOTA_EXCEEDED_CODE, fi as SafeAreaView, Ut as SectionLoadingFallback, Jr as TourInitializer, jr as TourPlayer, Er as TourPlayerProvider, wr as TourSpotlight, Tr as TourTooltip, Qr as TourTrigger, Mr as TourTriggerButton, Ur as ToursProvider, St as UPGRADE_ERROR_CODES, vn as UPGRADE_PROMPT_EVENT, xn as UpgradeInlineBanner, yn as UpgradePromptModal, je as WsLink, n as alertTokens, _r as appendContextToPath, Ve as attemptTokenRefresh, At as buildActorFallback, Ct as buildQuotaExhaustedMessage, p as capitalizeFirst, m as capitalizeWords, r as categoryTokens, nt as checkRemoteSLO, rt as checkSLO, He as clearAuthSessionStorage, it as clearLocalAuthState, qe as clearSSoCookie, Je as clearShellSsoCookies, mt as clearUserContext, Ot as cn, t as createApolloClient, On as createEventBus, ir as createGlobalShortcuts, xe as createGraphQLClient, _t as createProfileScopedStorage, xr as detectDeviceType, nn as detectPlatform, ae as dispatchBackendErrorEvent, fr as dispatchQuotaExhausted, bn as dispatchUpgradePrompt, oe as extractBackendError, wt as extractQuotaExhaustedExtensions, Tt as extractUpgradeErrorExtensions, h as formatBytes, g as formatCompactNumber, _ as formatCurrency, v as formatCurrencyCompact, y as formatDate, b as formatDateTime, x as formatDuration, rn as formatKeyCombo, S as formatList, C as formatNumber, w as formatOrdinal, T as formatPercentage, E as formatRelativeTime, D as formatTime, i as getAlertTokens, a as getCategoryTokens, an as getDisplayKeysForPlatform, Q as getGatewayConfig, $ as getGatewayUrl, Se as getGlobalClient, ar as getGlobalShortcutsByCategory, ee as getGraphQLEndpoint, $r as getNativeBridge, ei as getPlatform, H as getProductUrl, U as getProductsWithUrls, vt as getProfileScopedKey, o as getProgressTokens, Sr as getResponsiveSelector, at as getSSORedirectUrl, Ye as getSSoCookie, K as getShellConfig, on as getShortcutLabel, s as getStatusBadgeTokens, c as getStatusTokens, fe as getStoredAuthToken, pe as getStoredLocale, me as getStoredOrganizationId, he as getStoredProjectId, ge as getStoredWorkspaceId, _e as getStoredWorkspaceToken, Pr as getTourContextRank, Fr as getTourRouteCatalog, Ir as getTourRouteModules, Lr as getTourRoutePages, l as getTrendTokens, Ce as getWorkspaceClient, te as getWorkspaceTokenPayload, Fe as gql, ve as graphqlFetch, Ue as hasAuthGraphQLErrors, we as initializeAppClients, ht as initializeLogger, I as installGatewayFetchRewrite, se as isAbortError, ti as isAndroid, We as isAuthGraphQLError, Ge as isAuthNetworkError, ce as isBackendErrorDisplay, N as isChunkLoadError, ni as isIOS, sn as isMac, cn as isMobileDevice, ri as isNative, Et as isQuotaExhaustedError, Xe as isSharedSsoCookieDomain, q as isShellLessRoute, ln as isTabletDevice, Rr as isTourVisibleForContext, le as isTransportError, Ze as isTrustedSsoOrigin, Dt as isUpgradeError, ii as isWeb, ne as isWorkspaceTokenValidForContext, P as lazyWithRetry, ft as logManager, ue as markConnectionHealthy, un as matchesKeyCombo, or as mergeShortcuts, ai as nativeConfirm, oi as nativeCopyText, si as nativeImpact, ci as nativeNotify, li as nativeOpenUrl, ui as nativeShare, di as nativeToast, dn as normalizeKey, fn as normalizePlatformCombo, zr as normalizeTourPath, pn as parseKeyCombo, O as pluralize, u as progressTokens, hr as publishPlanUsageSnapshot, Qe as readShellSsoCookie, Ke as redirectToLogin, Br as registerTourRouteCatalog, Te as resetAppClients, Xr as resolveAppShellObservabilityConfig, z as resolveAuthBridgeConfig, L as resolveGatewayBases, ye as resolveGatewayUrl, F as resolveGatewayUrls, Vr as resolveTourTargetPath, $e as setSSoCookie, et as setShellSsoCookies, gt as setUserContext, mn as shouldEnableKeyboardShortcuts, hn as shouldIgnoreShortcut, J as shouldShowBreadcrumb, Y as shouldShowSidebar, de as shouldToastBackendError, k as slugify, d as statusTokens, R as suppressConsole, A as toCamelCase, j as toPascalCase, f as trendTokens, M as truncateText, jt as useActorProfiles, Ie as useApolloClient, gi as useAppState, Xn as useAsync, Zn as useAsyncImmediate, Wr as useAutoStartTour, Fn as useBreakpoint, qn as useConditionalToggle, Vn as useCopyToClipboard, vr as useCurrentContextSearchParams, Mn as useDebounce, _i as useDeviceInfo, kn as useEvent, An as useEventBus, jn as useEventEmitter, Zt as useFeatureFlag, Qt as useFeatureFlagDetails, $t as useFeatureFlagValue, Xt as useFeatureFlags, De as useGateway, Oe as useGatewayClient, vi as useHaptics, cr as useHasAnimated, tr as useHotkeys, Dr as useIsTourPlaying, zn as useKeyPress, Bn as useKeyboardShortcut, er as useKeyboardShortcuts, Le as useLazyQuery, Hn as useLocalStorage, sr as useLogger, e as useMediaQuery, br as useMicrofrontendContext, In as useMobileBreakpoint, Re as useMutation, hi as useNativeKeyboard, pi as useNativePlatform, Ln as useOnClickOutside, Rn as useOnClickOutsideWithRef, Kt as usePWA, Nr as usePlayTour, Wn as usePrevious, Gn as usePreviousDistinct, Kn as usePreviousHistory, ze as useQuery, pr as useQuotaErrorToast, ur as useRecordProductVisit, lr as useReferralAttribution, st as useRegistryHelpers, mi as useSafeArea, ke as useSafeGateway, Ae as useSafeGatewayClient, Gr as useSafeToursContext, Un as useSessionStorage, ct as useShellNavigate, nr as useShortcutHelp, Or as useStartTour, yi as useStatusBar, kr as useStopTour, Be as useSubscription, Nn as useThrottle, Jn as useToggle, Yn as useToggleObject, Cr as useTourPlayer, Ar as useTourPlayerContext, Kr as useTours, qr as useToursContext, gr as useUpgradePrompt, Hr as withTourProgressStatus };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ShareRole, ShareStatus } from './types';
|
|
3
|
+
/** Preview payload the consumer resolves for a token before accept/decline. */
|
|
4
|
+
export interface SharePreview {
|
|
5
|
+
resourceType: string;
|
|
6
|
+
resourceName?: string;
|
|
7
|
+
role: ShareRole;
|
|
8
|
+
sharerName?: string;
|
|
9
|
+
status: ShareStatus;
|
|
10
|
+
/** Email the invite was addressed to, when the controller exposes it. */
|
|
11
|
+
invitedEmail?: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface AcceptSharePageProps {
|
|
14
|
+
token: string;
|
|
15
|
+
loadPreview: (token: string) => Promise<SharePreview | null>;
|
|
16
|
+
accept: (token: string) => Promise<void>;
|
|
17
|
+
decline: (token: string) => Promise<void>;
|
|
18
|
+
onAccepted: () => void;
|
|
19
|
+
currentUserEmail?: string | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Generic, controller-driven share-accept page for the `/share/accept/:token`
|
|
23
|
+
* route. Resolves a preview, then renders the resource + role and Accept/Decline
|
|
24
|
+
* actions. Handles loading / invalid / expired / already-accepted / wrong-account
|
|
25
|
+
* states with stable headings (domcontentloaded-friendly for E2E).
|
|
26
|
+
*/
|
|
27
|
+
export declare const AcceptSharePage: FC<AcceptSharePageProps>;
|
|
28
|
+
//# sourceMappingURL=AcceptSharePage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcceptSharePage.d.ts","sourceRoot":"","sources":["../../src/sharing/AcceptSharePage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAMrD,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtE,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAC7D,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAWD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAyNpD,CAAC"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { Button as e } from "../ui/button.js";
|
|
2
|
+
import { Badge as t } from "../ui/badge.js";
|
|
3
|
+
import { Spinner as n } from "../ui/spinner.js";
|
|
4
|
+
import { roleLabel as r } from "./types.js";
|
|
5
|
+
import { useEffect as i, useState as a } from "react";
|
|
6
|
+
import { AlertTriangle as o, Check as s, Clock as c, ShieldX as l } from "lucide-react";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
//#region src/sharing/AcceptSharePage.tsx
|
|
9
|
+
var f = ({ token: f, loadPreview: p, accept: m, decline: h, onAccepted: g, currentUserEmail: _ }) => {
|
|
10
|
+
let [v, y] = a({ kind: "loading" }), [b, x] = a(null);
|
|
11
|
+
i(() => {
|
|
12
|
+
let e = !1;
|
|
13
|
+
y({ kind: "loading" });
|
|
14
|
+
async function t() {
|
|
15
|
+
try {
|
|
16
|
+
let t = await p(f);
|
|
17
|
+
if (e) return;
|
|
18
|
+
if (!t) {
|
|
19
|
+
y({ kind: "invalid" });
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (t.status === "EXPIRED") {
|
|
23
|
+
y({ kind: "expired" });
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (t.status === "REVOKED") {
|
|
27
|
+
y({ kind: "invalid" });
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (t.status === "ACCEPTED") {
|
|
31
|
+
y({
|
|
32
|
+
kind: "already-accepted",
|
|
33
|
+
preview: t
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (t.invitedEmail && _ && t.invitedEmail.toLowerCase() !== _.toLowerCase()) {
|
|
38
|
+
y({
|
|
39
|
+
kind: "wrong-account",
|
|
40
|
+
preview: t
|
|
41
|
+
});
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
y({
|
|
45
|
+
kind: "ready",
|
|
46
|
+
preview: t
|
|
47
|
+
});
|
|
48
|
+
} catch (t) {
|
|
49
|
+
if (e) return;
|
|
50
|
+
y({
|
|
51
|
+
kind: "error",
|
|
52
|
+
message: t instanceof Error ? t.message : "Failed to load invitation"
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return t(), () => {
|
|
57
|
+
e = !0;
|
|
58
|
+
};
|
|
59
|
+
}, [
|
|
60
|
+
f,
|
|
61
|
+
p,
|
|
62
|
+
_
|
|
63
|
+
]);
|
|
64
|
+
let S = async () => {
|
|
65
|
+
x("accept");
|
|
66
|
+
try {
|
|
67
|
+
await m(f), g();
|
|
68
|
+
} catch (e) {
|
|
69
|
+
y({
|
|
70
|
+
kind: "error",
|
|
71
|
+
message: e instanceof Error ? e.message : "Failed to accept invitation"
|
|
72
|
+
});
|
|
73
|
+
} finally {
|
|
74
|
+
x(null);
|
|
75
|
+
}
|
|
76
|
+
}, C = async () => {
|
|
77
|
+
x("decline");
|
|
78
|
+
try {
|
|
79
|
+
await h(f), y({ kind: "invalid" });
|
|
80
|
+
} catch (e) {
|
|
81
|
+
y({
|
|
82
|
+
kind: "error",
|
|
83
|
+
message: e instanceof Error ? e.message : "Failed to decline invitation"
|
|
84
|
+
});
|
|
85
|
+
} finally {
|
|
86
|
+
x(null);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return /* @__PURE__ */ u("div", {
|
|
90
|
+
"data-testid": "accept-share-page",
|
|
91
|
+
className: "flex min-h-screen items-center justify-center bg-bg-canvas px-4 py-12",
|
|
92
|
+
children: /* @__PURE__ */ d("div", {
|
|
93
|
+
className: "w-full max-w-md rounded-xl border border-border-default bg-bg-surface p-6 shadow-sm",
|
|
94
|
+
children: [
|
|
95
|
+
v.kind === "loading" ? /* @__PURE__ */ d("div", {
|
|
96
|
+
className: "flex flex-col items-center gap-3 py-8 text-center",
|
|
97
|
+
children: [/* @__PURE__ */ u(n, {}), /* @__PURE__ */ u("h1", {
|
|
98
|
+
className: "text-lg font-semibold text-text-primary",
|
|
99
|
+
children: "Loading invitation…"
|
|
100
|
+
})]
|
|
101
|
+
}) : null,
|
|
102
|
+
v.kind === "invalid" ? /* @__PURE__ */ d("div", {
|
|
103
|
+
className: "flex flex-col items-center gap-3 py-6 text-center",
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ u("div", {
|
|
106
|
+
className: "flex size-12 items-center justify-center rounded-full bg-status-error-bg-subtle",
|
|
107
|
+
children: /* @__PURE__ */ u(l, { className: "size-6 text-status-error-text" })
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ u("h1", {
|
|
110
|
+
className: "text-lg font-semibold text-text-primary",
|
|
111
|
+
children: "Invitation unavailable"
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ u("p", {
|
|
114
|
+
className: "text-sm text-text-secondary",
|
|
115
|
+
children: "This share link is invalid or has been revoked."
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
}) : null,
|
|
119
|
+
v.kind === "expired" ? /* @__PURE__ */ d("div", {
|
|
120
|
+
className: "flex flex-col items-center gap-3 py-6 text-center",
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ u("div", {
|
|
123
|
+
className: "flex size-12 items-center justify-center rounded-full bg-status-warning-bg-subtle",
|
|
124
|
+
children: /* @__PURE__ */ u(c, { className: "size-6 text-status-warning-text" })
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ u("h1", {
|
|
127
|
+
className: "text-lg font-semibold text-text-primary",
|
|
128
|
+
children: "Invitation expired"
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ u("p", {
|
|
131
|
+
className: "text-sm text-text-secondary",
|
|
132
|
+
children: "This share link has expired. Ask the owner to send a new one."
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
}) : null,
|
|
136
|
+
v.kind === "already-accepted" ? /* @__PURE__ */ d("div", {
|
|
137
|
+
className: "flex flex-col items-center gap-3 py-6 text-center",
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ u("div", {
|
|
140
|
+
className: "flex size-12 items-center justify-center rounded-full bg-status-success-bg-subtle",
|
|
141
|
+
children: /* @__PURE__ */ u(s, { className: "size-6 text-status-success-text" })
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ u("h1", {
|
|
144
|
+
className: "text-lg font-semibold text-text-primary",
|
|
145
|
+
children: "Already accepted"
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ d("p", {
|
|
148
|
+
className: "text-sm text-text-secondary",
|
|
149
|
+
children: [
|
|
150
|
+
"You already have access to",
|
|
151
|
+
" ",
|
|
152
|
+
v.preview.resourceName ?? `this ${v.preview.resourceType}`,
|
|
153
|
+
"."
|
|
154
|
+
]
|
|
155
|
+
})
|
|
156
|
+
]
|
|
157
|
+
}) : null,
|
|
158
|
+
v.kind === "wrong-account" ? /* @__PURE__ */ d("div", {
|
|
159
|
+
className: "flex flex-col items-center gap-3 py-6 text-center",
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ u("div", {
|
|
162
|
+
className: "flex size-12 items-center justify-center rounded-full bg-status-warning-bg-subtle",
|
|
163
|
+
children: /* @__PURE__ */ u(o, { className: "size-6 text-status-warning-text" })
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ u("h1", {
|
|
166
|
+
className: "text-lg font-semibold text-text-primary",
|
|
167
|
+
children: "Wrong account"
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ d("p", {
|
|
170
|
+
className: "text-sm text-text-secondary",
|
|
171
|
+
children: [
|
|
172
|
+
"This invitation was sent to ",
|
|
173
|
+
v.preview.invitedEmail,
|
|
174
|
+
". You’re signed in as",
|
|
175
|
+
" ",
|
|
176
|
+
_,
|
|
177
|
+
". Switch accounts to accept it."
|
|
178
|
+
]
|
|
179
|
+
})
|
|
180
|
+
]
|
|
181
|
+
}) : null,
|
|
182
|
+
v.kind === "error" ? /* @__PURE__ */ d("div", {
|
|
183
|
+
className: "flex flex-col items-center gap-3 py-6 text-center",
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ u("div", {
|
|
186
|
+
className: "flex size-12 items-center justify-center rounded-full bg-status-error-bg-subtle",
|
|
187
|
+
children: /* @__PURE__ */ u(o, { className: "size-6 text-status-error-text" })
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ u("h1", {
|
|
190
|
+
className: "text-lg font-semibold text-text-primary",
|
|
191
|
+
children: "Something went wrong"
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ u("p", {
|
|
194
|
+
className: "text-sm text-text-secondary",
|
|
195
|
+
children: v.message
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
}) : null,
|
|
199
|
+
v.kind === "ready" ? /* @__PURE__ */ d("div", {
|
|
200
|
+
className: "flex flex-col gap-5",
|
|
201
|
+
children: [
|
|
202
|
+
/* @__PURE__ */ d("div", {
|
|
203
|
+
className: "text-center",
|
|
204
|
+
children: [/* @__PURE__ */ u("h1", {
|
|
205
|
+
className: "text-lg font-semibold text-text-primary",
|
|
206
|
+
children: "You’ve been invited"
|
|
207
|
+
}), v.preview.sharerName ? /* @__PURE__ */ d("p", {
|
|
208
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
209
|
+
children: [
|
|
210
|
+
v.preview.sharerName,
|
|
211
|
+
" shared a ",
|
|
212
|
+
v.preview.resourceType,
|
|
213
|
+
" with you."
|
|
214
|
+
]
|
|
215
|
+
}) : /* @__PURE__ */ d("p", {
|
|
216
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
217
|
+
children: [
|
|
218
|
+
"A ",
|
|
219
|
+
v.preview.resourceType,
|
|
220
|
+
" has been shared with you."
|
|
221
|
+
]
|
|
222
|
+
})]
|
|
223
|
+
}),
|
|
224
|
+
/* @__PURE__ */ d("div", {
|
|
225
|
+
className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
226
|
+
children: [/* @__PURE__ */ u("p", {
|
|
227
|
+
className: "text-sm font-medium text-text-primary",
|
|
228
|
+
children: v.preview.resourceName ?? v.preview.resourceType
|
|
229
|
+
}), /* @__PURE__ */ d("div", {
|
|
230
|
+
className: "mt-2 flex items-center gap-2",
|
|
231
|
+
children: [/* @__PURE__ */ u("span", {
|
|
232
|
+
className: "text-xs text-text-secondary",
|
|
233
|
+
children: "Your access:"
|
|
234
|
+
}), /* @__PURE__ */ u(t, {
|
|
235
|
+
variant: "info",
|
|
236
|
+
children: r(v.preview.role)
|
|
237
|
+
})]
|
|
238
|
+
})]
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ d("div", {
|
|
241
|
+
className: "flex gap-2",
|
|
242
|
+
children: [/* @__PURE__ */ u(e, {
|
|
243
|
+
type: "button",
|
|
244
|
+
variant: "outline",
|
|
245
|
+
"data-testid": "decline-share",
|
|
246
|
+
disabled: b !== null,
|
|
247
|
+
onClick: () => {
|
|
248
|
+
C();
|
|
249
|
+
},
|
|
250
|
+
className: "flex-1",
|
|
251
|
+
children: b === "decline" ? "Declining…" : "Decline"
|
|
252
|
+
}), /* @__PURE__ */ u(e, {
|
|
253
|
+
type: "button",
|
|
254
|
+
"data-testid": "accept-share",
|
|
255
|
+
disabled: b !== null,
|
|
256
|
+
onClick: () => {
|
|
257
|
+
S();
|
|
258
|
+
},
|
|
259
|
+
className: "flex-1",
|
|
260
|
+
children: b === "accept" ? "Accepting…" : "Accept"
|
|
261
|
+
})]
|
|
262
|
+
})
|
|
263
|
+
]
|
|
264
|
+
}) : null
|
|
265
|
+
]
|
|
266
|
+
})
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
//#endregion
|
|
270
|
+
export { f as AcceptSharePage };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** A member chosen in the picker. `userId` is absent for free-typed emails. */
|
|
3
|
+
export interface SelectedMember {
|
|
4
|
+
userId?: string;
|
|
5
|
+
email: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MemberPickerProps {
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
onSelect: (member: SelectedMember) => void;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
excludeIds?: string[];
|
|
13
|
+
/** Override the workspace gateway / auth token used by the directory hook. */
|
|
14
|
+
authToken?: string;
|
|
15
|
+
apiGatewayUrl?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* cmdk-based member autocomplete for sharing. Lists workspace members via
|
|
20
|
+
* {@link useWorkspaceDirectory}, renders each with {@link ActorIdentity}, and
|
|
21
|
+
* lets a user free-type an email that isn't a member ("will be invited by
|
|
22
|
+
* email"). Supports single- or multi-select; in multi mode it surfaces removable
|
|
23
|
+
* chips for the chosen members.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MemberPicker: FC<MemberPickerProps>;
|
|
26
|
+
//# sourceMappingURL=MemberPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemberPicker.d.ts","sourceRoot":"","sources":["../../src/sharing/MemberPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAgBnD,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqBD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA8J9C,CAAC"}
|