@burdenoff/fe-libs 2026.527.2 → 2026.527.4
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/button/Button.js +18 -16
- package/dist/chrome/AccountSwitcher.js +10 -7
- package/dist/chrome/AutoBreadcrumbs.js +2 -0
- package/dist/chrome/Breadcrumbs.js +2 -0
- package/dist/chrome/CommandPalette.js +5 -3
- package/dist/chrome/ContextSwitcher.js +90 -338
- package/dist/chrome/DynamicFooter.js +7 -7
- package/dist/chrome/Footer.js +5 -5
- package/dist/chrome/GeographySwitcher.js +3 -3
- package/dist/chrome/GlobalSearch.js +73 -448
- package/dist/chrome/HeaderBar.js +6 -1
- package/dist/chrome/LanguagePickerSheet.js +1 -1
- package/dist/chrome/LanguageSwitcher.js +2 -2
- package/dist/chrome/NotificationCenter.js +69 -694
- package/dist/chrome/PanelTabs.js +7 -4
- package/dist/chrome/PluginContextMenuTarget.js +1 -1
- package/dist/chrome/ProductPickerSheet.js +4 -4
- package/dist/chrome/ProductSideNav.js +1 -1
- package/dist/chrome/ProductSwitcher.js +3 -3
- package/dist/chrome/ProfileSwitcher.js +13 -8
- package/dist/chrome/ShortcutHelpDialog.js +2 -1
- package/dist/chrome/SideNavigation.js +75 -239
- package/dist/chrome/Sidebar.js +1 -0
- package/dist/chrome/contextSwitcher/EmptyState.js +32 -0
- package/dist/chrome/contextSwitcher/OrganizationList.js +34 -0
- package/dist/chrome/contextSwitcher/ProjectList.js +34 -0
- package/dist/chrome/contextSwitcher/SearchInput.js +50 -0
- package/dist/chrome/contextSwitcher/TabButton.js +9 -0
- package/dist/chrome/contextSwitcher/TriggerButton.js +38 -0
- package/dist/chrome/contextSwitcher/WorkspaceList.js +34 -0
- package/dist/chrome/contextSwitcher/icons.js +58 -0
- package/dist/chrome/contextSwitcher/useIsMobile.js +11 -0
- package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +253 -0
- package/dist/chrome/globalSearch/CategoryTabs.js +28 -0
- package/dist/chrome/globalSearch/ResultsList.js +58 -0
- package/dist/chrome/globalSearch/SearchInput.js +28 -0
- package/dist/chrome/globalSearch/SearchModeBar.js +36 -0
- package/dist/chrome/globalSearch/useAdvancedFilters.js +78 -0
- package/dist/chrome/globalSearch/utils.js +22 -0
- package/dist/chrome/notificationCenter/BellButton.js +27 -0
- package/dist/chrome/notificationCenter/NotificationCardItem.js +129 -0
- package/dist/chrome/notificationCenter/NotificationFilters.js +67 -0
- package/dist/chrome/notificationCenter/NotificationFooter.js +23 -0
- package/dist/chrome/notificationCenter/NotificationHeader.js +75 -0
- package/dist/chrome/notificationCenter/NotificationList.js +75 -0
- package/dist/chrome/notificationCenter/NotificationPanel.js +19 -0
- package/dist/chrome/notificationCenter/SkeletonCard.js +18 -0
- package/dist/chrome/notificationCenter/constants.js +93 -0
- package/dist/chrome/notificationCenter/gql.js +58 -0
- package/dist/chrome/notificationCenter/useNotificationCenter.js +149 -0
- package/dist/chrome/notificationCenter/usePanelChrome.js +36 -0
- package/dist/chrome/sideNavigation/CollapseToggle.js +29 -0
- package/dist/chrome/sideNavigation/MobileActionsBar.js +25 -0
- package/dist/chrome/sideNavigation/NavItemRenderer.js +79 -0
- package/dist/chrome/sideNavigation/SidebarHeader.js +29 -0
- package/dist/chrome/sideNavigation/helpers.js +19 -0
- package/dist/chrome/sideNavigation/useSideNavigationState.js +45 -0
- package/dist/form/Checkbox.js +17 -15
- package/dist/form/FormDescription.js +9 -10
- package/dist/form/FormField.js +11 -12
- package/dist/form/FormLabel.js +13 -13
- package/dist/form/FormMessage.js +10 -11
- package/dist/form/Input.js +11 -10
- package/dist/form/Radio.js +25 -21
- package/dist/form/Select.js +81 -66
- package/dist/form/Textarea.js +10 -9
- package/dist/shared/components/AccessDenied.js +8 -4
- package/dist/shared/components/AppErrorBoundary.js +2 -0
- package/dist/shared/components/ContextConversationWidget.js +173 -767
- package/dist/shared/components/ErrorFallback.js +3 -0
- package/dist/shared/components/PWAInstallBanner.js +8 -4
- package/dist/shared/components/RequireAuth.js +4 -4
- package/dist/shared/components/SSORedirectGuard.js +1 -1
- package/dist/shared/components/contextConversationWidget/Composer.js +66 -0
- package/dist/shared/components/contextConversationWidget/MessageItem.js +124 -0
- package/dist/shared/components/contextConversationWidget/MessageList.js +32 -0
- package/dist/shared/components/contextConversationWidget/NoWorkspaceCard.js +19 -0
- package/dist/shared/components/contextConversationWidget/PendingAttachmentsBar.js +28 -0
- package/dist/shared/components/contextConversationWidget/ReplyBanner.js +32 -0
- package/dist/shared/components/contextConversationWidget/WidgetHeader.js +70 -0
- package/dist/shared/components/contextConversationWidget/queries.js +197 -0
- package/dist/shared/components/contextConversationWidget/types.js +10 -0
- package/dist/shared/components/contextConversationWidget/useAttachmentUpload.js +57 -0
- package/dist/shared/components/contextConversationWidget/useConversationSubscriptions.js +26 -0
- package/dist/shared/components/contextConversationWidget/useMessageActions.js +34 -0
- package/dist/shared/components/contextConversationWidget/useSendMessage.js +45 -0
- package/dist/shared/components/contextConversationWidget/useWidgetMessages.js +44 -0
- package/dist/shared/components/contextConversationWidget/utils.js +56 -0
- package/dist/shared/feature-flags/FeatureFlagProvider.js +21 -21
- package/dist/shared/geography/GeographyProvider.js +20 -20
- package/dist/shared/graphql/GatewayContext.js +1 -1
- package/dist/shared/motion/MotionList.js +1 -1
- package/dist/shared/pages/AiPage.js +3 -3
- package/dist/shared/pages/SearchPage.js +293 -1071
- package/dist/shared/pages/searchPage/ActiveFilterChips.js +176 -0
- package/dist/shared/pages/searchPage/FiltersPanel.js +329 -0
- package/dist/shared/pages/searchPage/ResultsList.js +119 -0
- package/dist/shared/pages/searchPage/ResultsStatus.js +32 -0
- package/dist/shared/pages/searchPage/SearchInput.js +31 -0
- package/dist/shared/pages/searchPage/SearchPagination.js +37 -0
- package/dist/shared/pages/searchPage/SearchToolbar.js +58 -0
- package/dist/shared/pages/searchPage/constants.js +155 -0
- package/dist/shared/pages/searchPage/utils.js +24 -0
- package/dist/shared/plugins/PluginRuntimeProvider.js +1 -1
- package/dist/shared/providers/shell/ActiveContextProvider.js +12 -12
- package/dist/shared/providers/shell/AppShellContext.js +1 -1
- package/dist/shared/providers/shell/AuthProvider.js +130 -384
- package/dist/shared/providers/shell/AuthTokenProvider.js +6 -6
- package/dist/shared/providers/shell/ContextManagerProvider.js +1 -1
- package/dist/shared/providers/shell/FeatureFlagsProvider.js +5 -5
- package/dist/shared/providers/shell/GlobalUiProvider.js +17 -17
- package/dist/shared/providers/shell/I18nProvider.js +15 -15
- package/dist/shared/providers/shell/PageConversationContextProvider.js +14 -14
- package/dist/shared/providers/shell/PermissionProvider.js +16 -16
- package/dist/shared/providers/shell/ShellUiProvider.js +13 -13
- package/dist/shared/providers/shell/ThemeProvider.js +9 -9
- package/dist/shared/providers/shell/authProvider/bridgeStateSync.js +34 -0
- package/dist/shared/providers/shell/authProvider/jwt.js +13 -0
- package/dist/shared/providers/shell/authProvider/ssoRelay.js +38 -0
- package/dist/shared/providers/shell/authProvider/useAuthActions.js +170 -0
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +86 -0
- package/dist/shared/providers/shell/authProvider/useRemoteSLO.js +32 -0
- package/dist/shared/providers/shell/authProvider/useStorageSync.js +35 -0
- package/dist/shared/providers/shell/authProvider/useTokenExpiryTimer.js +37 -0
- package/dist/shared/tours/TourPlayer.js +1 -0
- package/dist/shared/tours/TourPlayerProvider.js +1 -1
- package/dist/shared/tours/TourTooltip.js +3 -0
- package/dist/shared/tours/TourTrigger.js +86 -259
- package/dist/shared/tours/ToursContext.js +108 -398
- package/dist/shared/tours/tourTrigger/DesktopTourDropdown.js +48 -0
- package/dist/shared/tours/tourTrigger/MobileTourSheet.js +68 -0
- package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +36 -0
- package/dist/shared/tours/tourTrigger/TourListItemMobile.js +47 -0
- package/dist/shared/tours/tourTrigger/TourStatusChip.js +30 -0
- package/dist/shared/tours/tourTrigger/TourTriggerButton.js +22 -0
- package/dist/shared/tours/toursContext/errors.js +18 -0
- package/dist/shared/tours/toursContext/gql.js +152 -0
- package/dist/shared/tours/toursContext/route.js +20 -0
- package/dist/shared/tours/toursContext/session.js +19 -0
- package/dist/shared/tours/toursContext/useIdleReady.js +18 -0
- package/dist/shared/tours/toursContext/useTourMutations.js +118 -0
- package/dist/shared-events.js +3 -3
- package/dist/shared-hooks.js +1 -1
- package/dist/storage/SaveToFilesButton.js +3 -3
- package/dist/storage/SaveToFilesDialog.js +1 -1
- package/dist/tag/TagBadge.js +1 -1
- package/dist/tag/TagsWidget.js +81 -226
- package/dist/tag/tagsWidget/AddTagTrigger.js +14 -0
- package/dist/tag/tagsWidget/TagBadgeList.js +17 -0
- package/dist/tag/tagsWidget/TagSearchPopover.js +80 -0
- package/dist/tag/tagsWidget/operations.js +64 -0
- package/dist/tag/tagsWidget/useVocabResolver.js +30 -0
- package/dist/ui/card.js +44 -39
- package/dist/ui/dropdown-menu.js +82 -66
- package/dist/ui/input.js +10 -10
- package/dist/ui/label.js +13 -11
- package/dist/ui/select.js +80 -66
- package/dist/ui/table.js +61 -54
- package/dist/ui/textarea.js +9 -9
- package/dist/ui/tooltip.js +13 -11
- package/package.json +1 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { TourListItemMobile as e } from "./TourListItemMobile.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { HelpCircle as n, Sparkles as r, X as i } from "lucide-react";
|
|
4
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
//#region src/shared/tours/tourTrigger/MobileTourSheet.tsx
|
|
6
|
+
var c = t(function({ loading: t, tours: c, onClose: l, onStartTour: u }, d) {
|
|
7
|
+
return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", {
|
|
8
|
+
className: "fixed inset-0 bg-black/50 z-[100] animate-in fade-in duration-200",
|
|
9
|
+
onClick: l
|
|
10
|
+
}), /* @__PURE__ */ s("div", {
|
|
11
|
+
ref: d,
|
|
12
|
+
className: "fixed inset-x-0 bottom-0 z-[101] bg-bg-surface rounded-t-2xl shadow-xl animate-in slide-in-from-bottom duration-300 max-h-[80vh] flex flex-col",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ o("div", {
|
|
15
|
+
className: "flex justify-center pt-3 pb-2",
|
|
16
|
+
children: /* @__PURE__ */ o("div", { className: "w-10 h-1 bg-border-default rounded-full" })
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ s("div", {
|
|
19
|
+
className: "flex items-center justify-between px-4 pb-3 border-b border-border-subtle",
|
|
20
|
+
children: [/* @__PURE__ */ s("div", {
|
|
21
|
+
className: "flex items-center gap-2",
|
|
22
|
+
children: [/* @__PURE__ */ o(r, { className: "size-5 text-action-primary-bg" }), /* @__PURE__ */ o("h2", {
|
|
23
|
+
className: "text-lg font-semibold text-text-primary",
|
|
24
|
+
children: "Product Tours"
|
|
25
|
+
})]
|
|
26
|
+
}), /* @__PURE__ */ o("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
onClick: l,
|
|
29
|
+
className: "p-2 hover:bg-action-ghost-bg-hover rounded-full",
|
|
30
|
+
"aria-label": "Close",
|
|
31
|
+
children: /* @__PURE__ */ o(i, { className: "size-5" })
|
|
32
|
+
})]
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ o("div", {
|
|
35
|
+
className: "flex-1 overflow-y-auto p-4",
|
|
36
|
+
children: t ? /* @__PURE__ */ o("div", {
|
|
37
|
+
className: "flex items-center justify-center py-8",
|
|
38
|
+
children: /* @__PURE__ */ o("div", { className: "animate-spin rounded-full size-6 border-2 border-action-primary-bg border-t-transparent" })
|
|
39
|
+
}) : c.length > 0 ? /* @__PURE__ */ s("div", {
|
|
40
|
+
className: "space-y-3",
|
|
41
|
+
children: [/* @__PURE__ */ o("p", {
|
|
42
|
+
className: "text-sm text-text-secondary mb-4",
|
|
43
|
+
children: "Take a guided tour. Current-page tours are shown first."
|
|
44
|
+
}), c.map((t) => /* @__PURE__ */ o(e, {
|
|
45
|
+
tour: t,
|
|
46
|
+
onStart: u
|
|
47
|
+
}, t.id))]
|
|
48
|
+
}) : /* @__PURE__ */ s("div", {
|
|
49
|
+
className: "text-center py-8",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ o(n, { className: "size-12 mx-auto text-text-tertiary mb-3" }),
|
|
52
|
+
/* @__PURE__ */ o("p", {
|
|
53
|
+
className: "text-text-secondary",
|
|
54
|
+
children: "No tours available for this page"
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ o("p", {
|
|
57
|
+
className: "text-sm text-text-tertiary mt-1",
|
|
58
|
+
children: "Check back later or explore other pages"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
})
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ o("div", { className: "h-safe-area-inset-bottom" })
|
|
64
|
+
]
|
|
65
|
+
})] });
|
|
66
|
+
});
|
|
67
|
+
//#endregion
|
|
68
|
+
export { c as MobileTourSheet };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TourStatusChip as e } from "./TourStatusChip.js";
|
|
2
|
+
import { ChevronRight as t } from "lucide-react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/shared/tours/tourTrigger/TourListItemDesktop.tsx
|
|
5
|
+
function i({ tour: i, onStart: a }) {
|
|
6
|
+
return /* @__PURE__ */ n("button", {
|
|
7
|
+
type: "button",
|
|
8
|
+
onClick: () => a(i),
|
|
9
|
+
className: "w-full p-3 hover:bg-action-ghost-bg-hover rounded-md transition-colors text-left group",
|
|
10
|
+
children: /* @__PURE__ */ r("div", {
|
|
11
|
+
className: "flex items-center justify-between",
|
|
12
|
+
children: [/* @__PURE__ */ r("div", {
|
|
13
|
+
className: "flex-1 min-w-0",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ r("div", {
|
|
16
|
+
className: "flex items-center gap-2 min-w-0",
|
|
17
|
+
children: [/* @__PURE__ */ n("h4", {
|
|
18
|
+
className: "min-w-0 flex-1 font-medium text-text-primary text-sm truncate",
|
|
19
|
+
children: i.name
|
|
20
|
+
}), /* @__PURE__ */ n(e, { status: i.myProgress?.status })]
|
|
21
|
+
}),
|
|
22
|
+
i.description && /* @__PURE__ */ n("p", {
|
|
23
|
+
className: "text-xs text-text-secondary mt-0.5 line-clamp-1",
|
|
24
|
+
children: i.description
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ n("div", {
|
|
27
|
+
className: "flex items-center gap-2 mt-1 text-xs text-text-tertiary",
|
|
28
|
+
children: /* @__PURE__ */ r("span", { children: [i.steps?.length || 0, " steps"] })
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
}), /* @__PURE__ */ n(t, { className: "size-4 text-text-tertiary group-hover:text-action-primary-bg group-hover:translate-x-0.5 transition-all" })]
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { i as TourListItemDesktop };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { TourStatusChip as e } from "./TourStatusChip.js";
|
|
2
|
+
import { Play as t } from "lucide-react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/shared/tours/tourTrigger/TourListItemMobile.tsx
|
|
5
|
+
function i({ tour: i, onStart: a }) {
|
|
6
|
+
return /* @__PURE__ */ n("button", {
|
|
7
|
+
type: "button",
|
|
8
|
+
onClick: () => a(i),
|
|
9
|
+
className: "w-full p-4 bg-bg-muted hover:bg-action-ghost-bg-hover rounded-xl transition-colors text-left group",
|
|
10
|
+
children: /* @__PURE__ */ r("div", {
|
|
11
|
+
className: "flex items-center justify-between",
|
|
12
|
+
children: [/* @__PURE__ */ r("div", {
|
|
13
|
+
className: "flex-1 min-w-0",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ r("div", {
|
|
16
|
+
className: "flex items-center gap-2 min-w-0",
|
|
17
|
+
children: [/* @__PURE__ */ n("h3", {
|
|
18
|
+
className: "min-w-0 flex-1 font-medium text-text-primary truncate",
|
|
19
|
+
children: i.name
|
|
20
|
+
}), /* @__PURE__ */ n(e, { status: i.myProgress?.status })]
|
|
21
|
+
}),
|
|
22
|
+
i.description && /* @__PURE__ */ n("p", {
|
|
23
|
+
className: "text-sm text-text-secondary mt-1 line-clamp-2",
|
|
24
|
+
children: i.description
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ r("div", {
|
|
27
|
+
className: "flex items-center gap-3 mt-2 text-xs text-text-tertiary",
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ r("span", { children: [i.steps?.length || 0, " steps"] }),
|
|
30
|
+
/* @__PURE__ */ n("span", { children: "•" }),
|
|
31
|
+
/* @__PURE__ */ r("span", { children: [
|
|
32
|
+
"~",
|
|
33
|
+
Math.ceil((i.steps?.length || 0) * .5),
|
|
34
|
+
" min"
|
|
35
|
+
] })
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}), /* @__PURE__ */ n("div", {
|
|
40
|
+
className: "ml-3 p-2 bg-action-primary-bg rounded-full text-action-primary-text group-hover:scale-110 transition-transform",
|
|
41
|
+
children: /* @__PURE__ */ n(t, { className: "size-4" })
|
|
42
|
+
})]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { i as TourListItemMobile };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
//#region src/shared/tours/tourTrigger/TourStatusChip.tsx
|
|
3
|
+
var t = "bg-bg-muted text-text-tertiary", n = {
|
|
4
|
+
COMPLETED: {
|
|
5
|
+
label: "Completed",
|
|
6
|
+
className: "bg-status-success-bg-subtle text-status-success-text"
|
|
7
|
+
},
|
|
8
|
+
IN_PROGRESS: {
|
|
9
|
+
label: "In progress",
|
|
10
|
+
className: "bg-status-info-bg-subtle text-status-info-text"
|
|
11
|
+
},
|
|
12
|
+
SKIPPED: {
|
|
13
|
+
label: "Skipped",
|
|
14
|
+
className: t
|
|
15
|
+
},
|
|
16
|
+
DISMISSED: {
|
|
17
|
+
label: "Dismissed",
|
|
18
|
+
className: t
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function r({ status: t }) {
|
|
22
|
+
if (!t) return null;
|
|
23
|
+
let r = n[t];
|
|
24
|
+
return r ? /* @__PURE__ */ e("span", {
|
|
25
|
+
className: `shrink-0 inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${r.className}`,
|
|
26
|
+
children: r.label
|
|
27
|
+
}) : null;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { r as TourStatusChip };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import { HelpCircle as t } from "lucide-react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/shared/tours/tourTrigger/TourTriggerButton.tsx
|
|
5
|
+
var i = e(function({ isOpen: e, hasTours: i, onClick: a }, o) {
|
|
6
|
+
return /* @__PURE__ */ r("button", {
|
|
7
|
+
ref: o,
|
|
8
|
+
onClick: a,
|
|
9
|
+
className: `
|
|
10
|
+
relative p-2 rounded-button transition-colors
|
|
11
|
+
${e ? "bg-action-ghost-bg-hover" : "hover:bg-action-ghost-bg-hover"}
|
|
12
|
+
${i ? "text-text-primary" : "text-text-tertiary"}
|
|
13
|
+
`,
|
|
14
|
+
"aria-label": "Help & Tours",
|
|
15
|
+
"aria-expanded": e,
|
|
16
|
+
"aria-haspopup": "true",
|
|
17
|
+
title: "Help & Tours",
|
|
18
|
+
children: [/* @__PURE__ */ n(t, { className: "size-5" }), i && /* @__PURE__ */ n("span", { className: "absolute top-1 right-1 size-2 bg-action-primary-bg rounded-full" })]
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as TourTriggerButton };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/shared/tours/toursContext/errors.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = e instanceof Error || typeof e == "object" && e && "message" in e && typeof e.message == "string" ? e.message : "";
|
|
4
|
+
return t.includes("myProgress") ? t.includes("Cannot query field") || t.includes("Unknown field") : !1;
|
|
5
|
+
}
|
|
6
|
+
var t = [
|
|
7
|
+
"The client has been stopped",
|
|
8
|
+
"QueryManager stopped",
|
|
9
|
+
"This Apollo Client has been destroyed",
|
|
10
|
+
"aborted"
|
|
11
|
+
];
|
|
12
|
+
function n(e) {
|
|
13
|
+
if (!(e instanceof Error)) return !1;
|
|
14
|
+
let n = e.message;
|
|
15
|
+
return e.name === "InvariantError" || n.startsWith("Invariant Violation") ? t.some((e) => n.includes(e)) : !1;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { e as isMyProgressFieldMissingError, n as isTeardownInvariant };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { gql as e } from "@apollo/client/core";
|
|
2
|
+
//#region src/shared/tours/toursContext/gql.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
fragment ToursCoreFields on Tour {
|
|
5
|
+
id
|
|
6
|
+
context {
|
|
7
|
+
workspaceId
|
|
8
|
+
}
|
|
9
|
+
name
|
|
10
|
+
slug
|
|
11
|
+
description
|
|
12
|
+
productId
|
|
13
|
+
moduleId
|
|
14
|
+
pageId
|
|
15
|
+
status
|
|
16
|
+
isActive
|
|
17
|
+
triggerType
|
|
18
|
+
triggerConfig
|
|
19
|
+
mobileConfig
|
|
20
|
+
tabletConfig
|
|
21
|
+
desktopConfig
|
|
22
|
+
priority
|
|
23
|
+
displayOrder
|
|
24
|
+
}
|
|
25
|
+
`, n = e`
|
|
26
|
+
fragment ToursStepFields on Tour {
|
|
27
|
+
steps {
|
|
28
|
+
id
|
|
29
|
+
tourId
|
|
30
|
+
title
|
|
31
|
+
content
|
|
32
|
+
stepOrder
|
|
33
|
+
targetSelector
|
|
34
|
+
placement
|
|
35
|
+
targetSelectorMobile
|
|
36
|
+
targetSelectorTablet
|
|
37
|
+
targetSelectorDesktop
|
|
38
|
+
customData
|
|
39
|
+
actions
|
|
40
|
+
requireInteraction
|
|
41
|
+
waitForSelector
|
|
42
|
+
waitForEvent
|
|
43
|
+
waitForTimeout
|
|
44
|
+
skipConditions
|
|
45
|
+
media {
|
|
46
|
+
id
|
|
47
|
+
position
|
|
48
|
+
mediaId
|
|
49
|
+
media {
|
|
50
|
+
id
|
|
51
|
+
name
|
|
52
|
+
type
|
|
53
|
+
cdnUrl
|
|
54
|
+
mimeType
|
|
55
|
+
altText
|
|
56
|
+
caption
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`, r = e`
|
|
62
|
+
${t}
|
|
63
|
+
${n}
|
|
64
|
+
query GetToursForContext($context: TourContextInput!) {
|
|
65
|
+
toursForContext(context: $context) {
|
|
66
|
+
...ToursCoreFields
|
|
67
|
+
myProgress {
|
|
68
|
+
id
|
|
69
|
+
status
|
|
70
|
+
}
|
|
71
|
+
...ToursStepFields
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`, i = e`
|
|
75
|
+
${t}
|
|
76
|
+
${n}
|
|
77
|
+
query GetToursForContextFallback($context: TourContextInput!) {
|
|
78
|
+
toursForContext(context: $context) {
|
|
79
|
+
...ToursCoreFields
|
|
80
|
+
...ToursStepFields
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`, a = e`
|
|
84
|
+
mutation StartTour($tourId: ID!, $userId: ID!, $deviceType: DeviceType) {
|
|
85
|
+
startTour(tourId: $tourId, userId: $userId, deviceType: $deviceType) {
|
|
86
|
+
id
|
|
87
|
+
tourId
|
|
88
|
+
userId
|
|
89
|
+
status
|
|
90
|
+
currentStepId
|
|
91
|
+
completedSteps
|
|
92
|
+
startedAt
|
|
93
|
+
completedAt
|
|
94
|
+
lastViewedAt
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`, o = e`
|
|
98
|
+
mutation CompleteTour($tourId: ID!, $userId: ID!) {
|
|
99
|
+
completeTour(tourId: $tourId, userId: $userId) {
|
|
100
|
+
id
|
|
101
|
+
tourId
|
|
102
|
+
userId
|
|
103
|
+
status
|
|
104
|
+
currentStepId
|
|
105
|
+
completedSteps
|
|
106
|
+
startedAt
|
|
107
|
+
completedAt
|
|
108
|
+
lastViewedAt
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`, s = e`
|
|
112
|
+
mutation SkipTour($tourId: ID!, $userId: ID!) {
|
|
113
|
+
skipTour(tourId: $tourId, userId: $userId) {
|
|
114
|
+
id
|
|
115
|
+
tourId
|
|
116
|
+
userId
|
|
117
|
+
status
|
|
118
|
+
currentStepId
|
|
119
|
+
completedSteps
|
|
120
|
+
startedAt
|
|
121
|
+
completedAt
|
|
122
|
+
lastViewedAt
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
`, c = e`
|
|
126
|
+
mutation CompleteStep($tourId: ID!, $stepId: ID!, $userId: ID!) {
|
|
127
|
+
completeStep(tourId: $tourId, stepId: $stepId, userId: $userId) {
|
|
128
|
+
id
|
|
129
|
+
tourId
|
|
130
|
+
userId
|
|
131
|
+
status
|
|
132
|
+
currentStepId
|
|
133
|
+
completedSteps
|
|
134
|
+
startedAt
|
|
135
|
+
completedAt
|
|
136
|
+
lastViewedAt
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
`, l = e`
|
|
140
|
+
mutation TrackTourEvent($input: RecordTourAnalyticsInput!) {
|
|
141
|
+
trackTourEvent(input: $input) {
|
|
142
|
+
id
|
|
143
|
+
tourId
|
|
144
|
+
eventType
|
|
145
|
+
stepId
|
|
146
|
+
stepOrder
|
|
147
|
+
timestamp
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
`;
|
|
151
|
+
//#endregion
|
|
152
|
+
export { c as COMPLETE_STEP, o as COMPLETE_TOUR, r as GET_TOURS_FOR_CONTEXT, i as GET_TOURS_FOR_CONTEXT_WITHOUT_PROGRESS, s as SKIP_TOUR, a as START_TOUR, l as TRACK_TOUR_EVENT };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/shared/tours/toursContext/route.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
let n = e.split("/").filter(Boolean);
|
|
4
|
+
return n.length === 0 ? t : n[0];
|
|
5
|
+
}
|
|
6
|
+
function t(t, n, r, i) {
|
|
7
|
+
let a = t.split("/").filter(Boolean), o = i ? i(t) : e(t, r);
|
|
8
|
+
return a.length === 0 ? {
|
|
9
|
+
moduleId: n,
|
|
10
|
+
pageId: o
|
|
11
|
+
} : a[0] === n ? {
|
|
12
|
+
moduleId: n,
|
|
13
|
+
pageId: a[1] ?? r
|
|
14
|
+
} : {
|
|
15
|
+
moduleId: a[0],
|
|
16
|
+
pageId: o
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { t as deriveRouteContext };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { detectDeviceType as e } from "../types.js";
|
|
2
|
+
//#region src/shared/tours/toursContext/session.ts
|
|
3
|
+
function t() {
|
|
4
|
+
let t = e();
|
|
5
|
+
return t === "mobile" ? "MOBILE" : t === "tablet" ? "TABLET" : "DESKTOP";
|
|
6
|
+
}
|
|
7
|
+
function n() {
|
|
8
|
+
let e = "bf-tour-session-id";
|
|
9
|
+
try {
|
|
10
|
+
let t = sessionStorage.getItem(e);
|
|
11
|
+
if (t) return t;
|
|
12
|
+
let n = typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `tour-session-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
13
|
+
return sessionStorage.setItem(e, n), n;
|
|
14
|
+
} catch {
|
|
15
|
+
return `tour-session-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { n as getOrCreateTourSessionId, t as normalizeDeviceType };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect as e, useState as t } from "react";
|
|
2
|
+
//#region src/shared/tours/toursContext/useIdleReady.ts
|
|
3
|
+
function n() {
|
|
4
|
+
let [n, r] = t(!1);
|
|
5
|
+
return e(() => {
|
|
6
|
+
let e = () => r(!0);
|
|
7
|
+
if (typeof window < "u" && "requestIdleCallback" in window) {
|
|
8
|
+
let t = window.requestIdleCallback(e, { timeout: 2e3 });
|
|
9
|
+
return () => {
|
|
10
|
+
window.cancelIdleCallback?.(t);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
let t = setTimeout(e, 500);
|
|
14
|
+
return () => clearTimeout(t);
|
|
15
|
+
}, []), n;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n as useIdleReady };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { withTourProgressStatus as e } from "../progress.js";
|
|
2
|
+
import { COMPLETE_STEP as t, COMPLETE_TOUR as n, SKIP_TOUR as r, START_TOUR as i, TRACK_TOUR_EVENT as a } from "./gql.js";
|
|
3
|
+
import { getOrCreateTourSessionId as o, normalizeDeviceType as s } from "./session.js";
|
|
4
|
+
import { useCallback as c } from "react";
|
|
5
|
+
//#region src/shared/tours/toursContext/useTourMutations.ts
|
|
6
|
+
function l({ globalClient: l, userId: u, productSlug: d, moduleId: f, pageId: p, workspaceId: m, setAllTours: h, allToursRef: g, progressMutationVersionRef: _, latestProgressMutationByTourRef: v }) {
|
|
7
|
+
return {
|
|
8
|
+
trackProgress: c(async (t, a, o) => {
|
|
9
|
+
if (!l || !u) return;
|
|
10
|
+
let c = a === "started" ? "IN_PROGRESS" : a === "completed" ? "COMPLETED" : "SKIPPED", d = g.current.find((e) => e.id === t)?.myProgress, f = _.current + 1;
|
|
11
|
+
_.current = f, v.current.set(t, f), h((n) => {
|
|
12
|
+
let r = e(n, t, c);
|
|
13
|
+
return g.current = r, r;
|
|
14
|
+
});
|
|
15
|
+
try {
|
|
16
|
+
if (a === "started") {
|
|
17
|
+
await l.mutate({
|
|
18
|
+
mutation: i,
|
|
19
|
+
variables: {
|
|
20
|
+
tourId: t,
|
|
21
|
+
userId: u,
|
|
22
|
+
deviceType: s()
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (a === "completed") {
|
|
28
|
+
await l.mutate({
|
|
29
|
+
mutation: n,
|
|
30
|
+
variables: {
|
|
31
|
+
tourId: t,
|
|
32
|
+
userId: u
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
await l.mutate({
|
|
38
|
+
mutation: r,
|
|
39
|
+
variables: {
|
|
40
|
+
tourId: t,
|
|
41
|
+
userId: u
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
} catch {
|
|
45
|
+
if (v.current.get(t) !== f) return;
|
|
46
|
+
h((e) => {
|
|
47
|
+
let n = e.map((e) => e.id === t ? {
|
|
48
|
+
...e,
|
|
49
|
+
myProgress: d
|
|
50
|
+
} : e);
|
|
51
|
+
return g.current = n, n;
|
|
52
|
+
});
|
|
53
|
+
} finally {
|
|
54
|
+
v.current.get(t) === f && v.current.delete(t);
|
|
55
|
+
}
|
|
56
|
+
}, [
|
|
57
|
+
l,
|
|
58
|
+
u,
|
|
59
|
+
h,
|
|
60
|
+
g,
|
|
61
|
+
_,
|
|
62
|
+
v
|
|
63
|
+
]),
|
|
64
|
+
recordStepCompletion: c(async (e, n) => {
|
|
65
|
+
if (!(!l || !u || !n)) try {
|
|
66
|
+
await l.mutate({
|
|
67
|
+
mutation: t,
|
|
68
|
+
variables: {
|
|
69
|
+
tourId: e,
|
|
70
|
+
stepId: n,
|
|
71
|
+
userId: u
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
} catch {}
|
|
75
|
+
}, [l, u]),
|
|
76
|
+
trackEvent: c(async (e, t, n) => {
|
|
77
|
+
if (!(!l || !u)) try {
|
|
78
|
+
await l.mutate({
|
|
79
|
+
mutation: a,
|
|
80
|
+
variables: { input: {
|
|
81
|
+
tourId: t,
|
|
82
|
+
userId: u,
|
|
83
|
+
sessionId: o(),
|
|
84
|
+
eventType: e,
|
|
85
|
+
stepId: n?.stepId,
|
|
86
|
+
stepOrder: n?.stepOrder,
|
|
87
|
+
productId: d,
|
|
88
|
+
moduleId: f,
|
|
89
|
+
pageId: p,
|
|
90
|
+
deviceType: s(),
|
|
91
|
+
userAgent: typeof navigator < "u" ? navigator.userAgent : void 0,
|
|
92
|
+
duration: n?.duration,
|
|
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
|
+
}
|
|
104
|
+
} }
|
|
105
|
+
});
|
|
106
|
+
} catch {}
|
|
107
|
+
}, [
|
|
108
|
+
l,
|
|
109
|
+
f,
|
|
110
|
+
p,
|
|
111
|
+
d,
|
|
112
|
+
u,
|
|
113
|
+
m
|
|
114
|
+
])
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
export { l as useTourMutations };
|
package/dist/shared-events.js
CHANGED
|
@@ -5,7 +5,7 @@ import { BackendAuditSink as r } from "./shared/events/sinks/BackendAuditSink.js
|
|
|
5
5
|
import { RybbitSink as i } from "./shared/events/sinks/RybbitSink.js";
|
|
6
6
|
import { OtelBrowserSink as a } from "./shared/events/sinks/OtelBrowserSink.js";
|
|
7
7
|
import "./shared/events/sinks/index.js";
|
|
8
|
-
import { createContext as o,
|
|
8
|
+
import { createContext as o, use as s, useCallback as c, useEffect as l, useMemo as u } from "react";
|
|
9
9
|
import { jsx as d } from "react/jsx-runtime";
|
|
10
10
|
//#region src/shared/events/index.tsx
|
|
11
11
|
var f = o({
|
|
@@ -122,7 +122,7 @@ function v({ appName: e, appVersion: t = "0.0.0", appEnv: n = "dev", sourceMfe:
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
function y() {
|
|
125
|
-
return
|
|
125
|
+
return s(f);
|
|
126
126
|
}
|
|
127
127
|
function b(e, t) {
|
|
128
128
|
let n = y();
|
|
@@ -134,7 +134,7 @@ function b(e, t) {
|
|
|
134
134
|
}
|
|
135
135
|
function x(e, t) {
|
|
136
136
|
let n = y();
|
|
137
|
-
return
|
|
137
|
+
return c((r) => n.emit(e, r, t), [
|
|
138
138
|
n,
|
|
139
139
|
e,
|
|
140
140
|
t
|
package/dist/shared-hooks.js
CHANGED
|
@@ -28,7 +28,7 @@ import { useHasAnimated as J } from "./shared/hooks/useHasAnimated.js";
|
|
|
28
28
|
import { useReferralAttribution as Y } from "./shared/hooks/useReferralAttribution.js";
|
|
29
29
|
import { useRecordProductVisit as X } from "./shared/hooks/useRecordProductVisit.js";
|
|
30
30
|
import { QUOTA_EXHAUSTED_EVENT as Z, dispatchQuotaExhausted as Q, useQuotaErrorToast as ne } from "./shared/hooks/useQuotaErrorToast.js";
|
|
31
|
-
import re, {
|
|
31
|
+
import re, { use as ie } from "react";
|
|
32
32
|
//#region src/shared/hooks/index.ts
|
|
33
33
|
var $ = re.createContext(null);
|
|
34
34
|
function ae() {
|
|
@@ -19,7 +19,7 @@ function p({ source: p, defaultFolderPath: m, onDownload: h, onSaved: g, label:
|
|
|
19
19
|
onClick: () => void h(),
|
|
20
20
|
"data-testid": `${y}-download`,
|
|
21
21
|
className: "rounded-r-none",
|
|
22
|
-
children: [/* @__PURE__ */ u(s, { className: "mr-1.5
|
|
22
|
+
children: [/* @__PURE__ */ u(s, { className: "mr-1.5 size-3.5" }), _]
|
|
23
23
|
}), /* @__PURE__ */ d(t, { children: [/* @__PURE__ */ u(i, {
|
|
24
24
|
asChild: !0,
|
|
25
25
|
children: /* @__PURE__ */ u(e, {
|
|
@@ -36,11 +36,11 @@ function p({ source: p, defaultFolderPath: m, onDownload: h, onSaved: g, label:
|
|
|
36
36
|
children: [/* @__PURE__ */ d(r, {
|
|
37
37
|
onSelect: () => void h(),
|
|
38
38
|
"data-testid": `${y}-menu-download`,
|
|
39
|
-
children: [/* @__PURE__ */ u(s, { className: "mr-2
|
|
39
|
+
children: [/* @__PURE__ */ u(s, { className: "mr-2 size-3.5" }), "Download"]
|
|
40
40
|
}), /* @__PURE__ */ d(r, {
|
|
41
41
|
onSelect: () => S(!0),
|
|
42
42
|
"data-testid": `${y}-menu-save`,
|
|
43
|
-
children: [/* @__PURE__ */ u(c, { className: "mr-2
|
|
43
|
+
children: [/* @__PURE__ */ u(c, { className: "mr-2 size-3.5" }), "Save to Files…"]
|
|
44
44
|
})]
|
|
45
45
|
})] })]
|
|
46
46
|
}), /* @__PURE__ */ u(a, {
|
|
@@ -79,7 +79,7 @@ function g({ open: g, onOpenChange: _, source: v, defaultFolderPath: y, filename
|
|
|
79
79
|
} catch {}
|
|
80
80
|
},
|
|
81
81
|
"data-testid": "save-to-files-save",
|
|
82
|
-
children: T ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(l, { className: "mr-2
|
|
82
|
+
children: T ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(l, { className: "mr-2 size-3" }), "Saving…"] }) : "Save"
|
|
83
83
|
})] })
|
|
84
84
|
] })
|
|
85
85
|
});
|
package/dist/tag/TagBadge.js
CHANGED
|
@@ -35,7 +35,7 @@ function u({ label: u, icon: d, color: f, description: p, removable: m = !1, onC
|
|
|
35
35
|
},
|
|
36
36
|
className: "flex-shrink-0 ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10 transition-colors",
|
|
37
37
|
"aria-label": `Remove ${u}`,
|
|
38
|
-
children: /* @__PURE__ */ s(o, { className: "
|
|
38
|
+
children: /* @__PURE__ */ s(o, { className: "size-3" })
|
|
39
39
|
})
|
|
40
40
|
]
|
|
41
41
|
});
|