@burdenoff/fe-libs 2026.1003.4 → 2026.1004.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/providers/AppShellProvider.d.ts +2 -0
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +153 -147
- package/dist/shared/tours/TourPermissionsBoundary.d.ts +7 -0
- package/dist/shared/tours/TourPermissionsBoundary.d.ts.map +1 -0
- package/dist/shared/tours/TourPermissionsBoundary.js +17 -0
- package/dist/shared/tours/TourPlayerProvider.d.ts +1 -1
- package/dist/shared/tours/TourPlayerProvider.d.ts.map +1 -1
- package/dist/shared/tours/TourPlayerProvider.js +52 -51
- package/dist/shared/tours/TourTrigger.js +30 -26
- package/dist/shared/tours/ToursContext.d.ts +1 -0
- package/dist/shared/tours/ToursContext.d.ts.map +1 -1
- package/dist/shared/tours/ToursContext.js +123 -120
- package/dist/shared/tours/permissions.d.ts +9 -0
- package/dist/shared/tours/permissions.d.ts.map +1 -0
- package/dist/shared/tours/permissions.js +7 -0
- package/dist/shared/tours/progress.d.ts +6 -1
- package/dist/shared/tours/progress.d.ts.map +1 -1
- package/dist/shared/tours/progress.js +11 -1
- package/dist/shared/tours/routeCatalog.d.ts.map +1 -1
- package/dist/shared/tours/routeCatalog.js +51 -0
- package/dist/shared/tours/tourTrigger/DesktopTourDropdown.d.ts +2 -0
- package/dist/shared/tours/tourTrigger/DesktopTourDropdown.d.ts.map +1 -1
- package/dist/shared/tours/tourTrigger/DesktopTourDropdown.js +32 -31
- package/dist/shared/tours/tourTrigger/MobileTourSheet.d.ts +2 -0
- package/dist/shared/tours/tourTrigger/MobileTourSheet.d.ts.map +1 -1
- package/dist/shared/tours/tourTrigger/MobileTourSheet.js +42 -41
- package/dist/shared/tours/tourTrigger/TourLoadError.d.ts +4 -0
- package/dist/shared/tours/tourTrigger/TourLoadError.d.ts.map +1 -0
- package/dist/shared/tours/tourTrigger/TourLoadError.js +21 -0
- package/dist/shared/tours/toursContext/gql.d.ts.map +1 -1
- package/dist/shared/tours/toursContext/gql.js +2 -0
- package/dist/shared/tours/toursContext/useTourMutations.d.ts.map +1 -1
- package/dist/shared/tours/toursContext/useTourMutations.js +96 -59
- package/dist/shared/tours/types.d.ts +4 -0
- package/dist/shared/tours/types.d.ts.map +1 -1
- package/dist/shared/tours/useTourPlayer.d.ts +1 -0
- package/dist/shared/tours/useTourPlayer.d.ts.map +1 -1
- package/dist/shared/tours/useTourPlayer.js +152 -141
- package/dist/shared-tours.js +9 -9
- package/dist/shared.js +9 -9
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeCatalog.d.ts","sourceRoot":"","sources":["../../../src/shared/tours/routeCatalog.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;
|
|
1
|
+
{"version":3,"file":"routeCatalog.d.ts","sourceRoot":"","sources":["../../../src/shared/tours/routeCatalog.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAi6BD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,MAAM,IAAI,CAkCZ;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,qBAAqB,EAAE,CAQzB;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,qBAAqB,EAAE,CAezB;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC,mBAAmB,EAAE,CAWvB;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,iBAAiB,GACtB,MAAM,GAAG,SAAS,CAyBpB;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAyBT;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAKR"}
|
|
@@ -368,6 +368,57 @@ var e = {
|
|
|
368
368
|
isModuleHome: !0
|
|
369
369
|
}
|
|
370
370
|
],
|
|
371
|
+
bigconsole: [
|
|
372
|
+
{
|
|
373
|
+
productId: "bigconsole",
|
|
374
|
+
moduleId: "bigconsole",
|
|
375
|
+
moduleLabel: "BigConsole",
|
|
376
|
+
pageId: "home",
|
|
377
|
+
pageLabel: "Overview",
|
|
378
|
+
path: "/bigconsole",
|
|
379
|
+
isModuleHome: !0
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
productId: "bigconsole",
|
|
383
|
+
moduleId: "bigconsole",
|
|
384
|
+
moduleLabel: "BigConsole",
|
|
385
|
+
pageId: "dashboards",
|
|
386
|
+
pageLabel: "Dashboards",
|
|
387
|
+
path: "/bigconsole/dashboards"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
productId: "bigconsole",
|
|
391
|
+
moduleId: "bigconsole",
|
|
392
|
+
moduleLabel: "BigConsole",
|
|
393
|
+
pageId: "datasink-builder",
|
|
394
|
+
pageLabel: "Create DataSink",
|
|
395
|
+
path: "/bigconsole/datasinks/new"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
productId: "bigconsole",
|
|
399
|
+
moduleId: "bigconsole",
|
|
400
|
+
moduleLabel: "BigConsole",
|
|
401
|
+
pageId: "parser-builder",
|
|
402
|
+
pageLabel: "Create Parser",
|
|
403
|
+
path: "/bigconsole/parsers/new"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
productId: "bigconsole",
|
|
407
|
+
moduleId: "bigconsole",
|
|
408
|
+
moduleLabel: "BigConsole",
|
|
409
|
+
pageId: "workflows",
|
|
410
|
+
pageLabel: "Workflows",
|
|
411
|
+
path: "/bigconsole/workflows/list"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
productId: "bigconsole",
|
|
415
|
+
moduleId: "bigconsole",
|
|
416
|
+
moduleLabel: "BigConsole",
|
|
417
|
+
pageId: "insights",
|
|
418
|
+
pageLabel: "AI Insights",
|
|
419
|
+
path: "/bigconsole/insights"
|
|
420
|
+
}
|
|
421
|
+
],
|
|
371
422
|
fluidgrids: [
|
|
372
423
|
{
|
|
373
424
|
productId: "fluidgrids",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesktopTourDropdown.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/tourTrigger/DesktopTourDropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DesktopTourDropdown.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/tourTrigger/DesktopTourDropdown.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIxD,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,mBAAmB,qHAgF/B,CAAC"}
|
|
@@ -1,68 +1,69 @@
|
|
|
1
1
|
import { useShellLabel as e } from "../../providers/shell/useShellLabel.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { TourLoadError as t } from "./TourLoadError.js";
|
|
3
|
+
import { TourListItemDesktop as n } from "./TourListItemDesktop.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { ExternalLink as i, Sparkles as a } from "lucide-react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
7
|
//#region src/shared/tours/tourTrigger/DesktopTourDropdown.tsx
|
|
7
|
-
var
|
|
8
|
-
let
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
ref:
|
|
8
|
+
var c = r(function({ loading: r, error: c, onRetry: l, tours: u, onStartTour: d, actions: f, onAction: p }, m) {
|
|
9
|
+
let h = e(), g = !!(f && f.length > 0);
|
|
10
|
+
return /* @__PURE__ */ s("div", {
|
|
11
|
+
ref: m,
|
|
11
12
|
className: "absolute right-0 top-full mt-2 w-80 bg-bg-elevated rounded-lg shadow-[var(--shadow-elevation-4)] border border-border-subtle z-50 animate-in fade-in slide-in-from-top-2 duration-200",
|
|
12
13
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ s("div", {
|
|
14
15
|
className: "flex items-center gap-2 px-4 py-3 border-b border-border-subtle",
|
|
15
|
-
children: [/* @__PURE__ */ a
|
|
16
|
+
children: [/* @__PURE__ */ o(a, { className: "size-4 text-action-primary-bg" }), /* @__PURE__ */ o("h3", {
|
|
16
17
|
className: "font-medium text-text-primary",
|
|
17
|
-
children:
|
|
18
|
+
children: h("tours.helpAndTours", "Help & tours")
|
|
18
19
|
})]
|
|
19
20
|
}),
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ o("div", {
|
|
21
22
|
className: "max-h-80 overflow-y-auto",
|
|
22
|
-
children:
|
|
23
|
+
children: r ? /* @__PURE__ */ o("div", {
|
|
23
24
|
className: "flex items-center justify-center py-6",
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
}) :
|
|
25
|
+
children: /* @__PURE__ */ o("div", { className: "animate-spin rounded-full size-5 border-2 border-action-primary-bg border-t-transparent" })
|
|
26
|
+
}) : c ? /* @__PURE__ */ o(t, { onRetry: l }) : u.length > 0 ? /* @__PURE__ */ o("div", {
|
|
26
27
|
className: "p-2",
|
|
27
|
-
children:
|
|
28
|
+
children: u.map((e) => /* @__PURE__ */ o(n, {
|
|
28
29
|
tour: e,
|
|
29
|
-
onStart:
|
|
30
|
+
onStart: d
|
|
30
31
|
}, e.id))
|
|
31
|
-
}) : /* @__PURE__ */
|
|
32
|
+
}) : /* @__PURE__ */ o("div", {
|
|
32
33
|
className: "px-4 py-4",
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ o("p", {
|
|
34
35
|
className: "text-sm text-text-secondary",
|
|
35
|
-
children:
|
|
36
|
+
children: h("tours.noneForPage", "No guided tours for this page yet.")
|
|
36
37
|
})
|
|
37
38
|
})
|
|
38
39
|
}),
|
|
39
|
-
|
|
40
|
+
g && /* @__PURE__ */ o("div", {
|
|
40
41
|
className: "border-t border-border-subtle p-2",
|
|
41
|
-
children:
|
|
42
|
+
children: f.map((e) => e.href ? /* @__PURE__ */ s("a", {
|
|
42
43
|
href: e.href,
|
|
43
44
|
target: "_blank",
|
|
44
45
|
rel: "noreferrer",
|
|
45
|
-
onClick: () =>
|
|
46
|
+
onClick: () => p?.(e),
|
|
46
47
|
className: "flex items-center gap-3 rounded-button px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
|
|
47
48
|
children: [
|
|
48
|
-
e.icon && /* @__PURE__ */
|
|
49
|
+
e.icon && /* @__PURE__ */ o("span", {
|
|
49
50
|
className: "flex size-4 items-center justify-center text-text-muted",
|
|
50
51
|
children: e.icon
|
|
51
52
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ o("span", {
|
|
53
54
|
className: "flex-1 truncate",
|
|
54
55
|
children: e.label
|
|
55
56
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ o(i, { className: "size-3.5 text-text-muted" })
|
|
57
58
|
]
|
|
58
|
-
}, e.id) : /* @__PURE__ */
|
|
59
|
+
}, e.id) : /* @__PURE__ */ s("button", {
|
|
59
60
|
type: "button",
|
|
60
|
-
onClick: () =>
|
|
61
|
+
onClick: () => p?.(e),
|
|
61
62
|
className: "flex w-full items-center gap-3 rounded-button px-3 py-2 text-left text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
|
|
62
|
-
children: [e.icon && /* @__PURE__ */
|
|
63
|
+
children: [e.icon && /* @__PURE__ */ o("span", {
|
|
63
64
|
className: "flex size-4 items-center justify-center text-text-muted",
|
|
64
65
|
children: e.icon
|
|
65
|
-
}), /* @__PURE__ */
|
|
66
|
+
}), /* @__PURE__ */ o("span", {
|
|
66
67
|
className: "flex-1 truncate",
|
|
67
68
|
children: e.label
|
|
68
69
|
})]
|
|
@@ -72,4 +73,4 @@ var s = n(function({ loading: n, tours: s, onStartTour: c, actions: l, onAction:
|
|
|
72
73
|
});
|
|
73
74
|
});
|
|
74
75
|
//#endregion
|
|
75
|
-
export {
|
|
76
|
+
export { c as DesktopTourDropdown };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileTourSheet.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/tourTrigger/MobileTourSheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MobileTourSheet.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/tourTrigger/MobileTourSheet.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGxD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,eAAe,iHAoG3B,CAAC"}
|
|
@@ -1,93 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { TourLoadError as e } from "./TourLoadError.js";
|
|
2
|
+
import { TourListItemMobile as t } from "./TourListItemMobile.js";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { ExternalLink as r, HelpCircle as i, Sparkles as a, X as o } from "lucide-react";
|
|
5
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
6
|
//#region src/shared/tours/tourTrigger/MobileTourSheet.tsx
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
var u = n(function({ loading: n, error: u, onRetry: d, tours: f, onClose: p, onStartTour: m, actions: h, onAction: g }, _) {
|
|
8
|
+
let v = !!(h && h.length > 0);
|
|
9
|
+
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", {
|
|
9
10
|
className: "fixed inset-0 bg-black/50 z-[100] animate-in fade-in duration-200",
|
|
10
|
-
onClick:
|
|
11
|
-
}), /* @__PURE__ */
|
|
12
|
-
ref:
|
|
11
|
+
onClick: p
|
|
12
|
+
}), /* @__PURE__ */ l("div", {
|
|
13
|
+
ref: _,
|
|
13
14
|
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",
|
|
14
15
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ c("div", {
|
|
16
17
|
className: "flex justify-center pt-3 pb-2",
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
+
children: /* @__PURE__ */ c("div", { className: "w-10 h-1 bg-border-default rounded-full" })
|
|
18
19
|
}),
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ l("div", {
|
|
20
21
|
className: "flex items-center justify-between px-4 pb-3 border-b border-border-subtle",
|
|
21
|
-
children: [/* @__PURE__ */
|
|
22
|
+
children: [/* @__PURE__ */ l("div", {
|
|
22
23
|
className: "flex items-center gap-2",
|
|
23
|
-
children: [/* @__PURE__ */
|
|
24
|
+
children: [/* @__PURE__ */ c(a, { className: "size-5 text-action-primary-bg" }), /* @__PURE__ */ c("h2", {
|
|
24
25
|
className: "text-lg font-semibold text-text-primary",
|
|
25
26
|
children: "Help & tours"
|
|
26
27
|
})]
|
|
27
|
-
}), /* @__PURE__ */
|
|
28
|
+
}), /* @__PURE__ */ c("button", {
|
|
28
29
|
type: "button",
|
|
29
|
-
onClick:
|
|
30
|
+
onClick: p,
|
|
30
31
|
className: "p-2 hover:bg-action-ghost-bg-hover rounded-full",
|
|
31
32
|
"aria-label": "Close",
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ c(o, { className: "size-5" })
|
|
33
34
|
})]
|
|
34
35
|
}),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ l("div", {
|
|
36
37
|
className: "flex-1 overflow-y-auto p-4",
|
|
37
|
-
children: [
|
|
38
|
+
children: [n ? /* @__PURE__ */ c("div", {
|
|
38
39
|
className: "flex items-center justify-center py-8",
|
|
39
|
-
children: /* @__PURE__ */
|
|
40
|
-
}) :
|
|
40
|
+
children: /* @__PURE__ */ c("div", { className: "animate-spin rounded-full size-6 border-2 border-action-primary-bg border-t-transparent" })
|
|
41
|
+
}) : u ? /* @__PURE__ */ c(e, { onRetry: d }) : f.length > 0 ? /* @__PURE__ */ l("div", {
|
|
41
42
|
className: "space-y-3",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ c("p", {
|
|
43
44
|
className: "text-sm text-text-secondary mb-4",
|
|
44
45
|
children: "Take a guided tour. Current-page tours are shown first."
|
|
45
|
-
}),
|
|
46
|
-
tour:
|
|
47
|
-
onStart:
|
|
48
|
-
},
|
|
49
|
-
}) : /* @__PURE__ */
|
|
46
|
+
}), f.map((e) => /* @__PURE__ */ c(t, {
|
|
47
|
+
tour: e,
|
|
48
|
+
onStart: m
|
|
49
|
+
}, e.id))]
|
|
50
|
+
}) : /* @__PURE__ */ l("div", {
|
|
50
51
|
className: "text-center py-6",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ c(i, { className: "size-10 mx-auto text-text-tertiary mb-2" }), /* @__PURE__ */ c("p", {
|
|
52
53
|
className: "text-text-secondary",
|
|
53
54
|
children: "No guided tours for this page yet"
|
|
54
55
|
})]
|
|
55
|
-
}),
|
|
56
|
+
}), v && /* @__PURE__ */ c("div", {
|
|
56
57
|
className: "mt-4 border-t border-border-subtle pt-3 space-y-1",
|
|
57
|
-
children:
|
|
58
|
+
children: h.map((e) => e.href ? /* @__PURE__ */ l("a", {
|
|
58
59
|
href: e.href,
|
|
59
60
|
target: "_blank",
|
|
60
61
|
rel: "noreferrer",
|
|
61
|
-
onClick: () =>
|
|
62
|
+
onClick: () => g?.(e),
|
|
62
63
|
className: "flex items-center gap-3 rounded-button px-3 py-3 text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
|
|
63
64
|
children: [
|
|
64
|
-
e.icon && /* @__PURE__ */
|
|
65
|
+
e.icon && /* @__PURE__ */ c("span", {
|
|
65
66
|
className: "flex size-5 items-center justify-center text-text-muted",
|
|
66
67
|
children: e.icon
|
|
67
68
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ c("span", {
|
|
69
70
|
className: "flex-1 truncate",
|
|
70
71
|
children: e.label
|
|
71
72
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ c(r, { className: "size-4 text-text-muted" })
|
|
73
74
|
]
|
|
74
|
-
}, e.id) : /* @__PURE__ */
|
|
75
|
+
}, e.id) : /* @__PURE__ */ l("button", {
|
|
75
76
|
type: "button",
|
|
76
|
-
onClick: () =>
|
|
77
|
+
onClick: () => g?.(e),
|
|
77
78
|
className: "flex w-full items-center gap-3 rounded-button px-3 py-3 text-left text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
|
|
78
|
-
children: [e.icon && /* @__PURE__ */
|
|
79
|
+
children: [e.icon && /* @__PURE__ */ c("span", {
|
|
79
80
|
className: "flex size-5 items-center justify-center text-text-muted",
|
|
80
81
|
children: e.icon
|
|
81
|
-
}), /* @__PURE__ */
|
|
82
|
+
}), /* @__PURE__ */ c("span", {
|
|
82
83
|
className: "flex-1 truncate",
|
|
83
84
|
children: e.label
|
|
84
85
|
})]
|
|
85
86
|
}, e.id))
|
|
86
87
|
})]
|
|
87
88
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ c("div", { className: "h-safe-area-inset-bottom" })
|
|
89
90
|
]
|
|
90
91
|
})] });
|
|
91
92
|
});
|
|
92
93
|
//#endregion
|
|
93
|
-
export {
|
|
94
|
+
export { u as MobileTourSheet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TourLoadError.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/tourTrigger/TourLoadError.tsx"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,2CAkBlE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useShellLabel as e } from "../../providers/shell/useShellLabel.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/shared/tours/tourTrigger/TourLoadError.tsx
|
|
4
|
+
function r({ onRetry: r }) {
|
|
5
|
+
let i = e();
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
role: "alert",
|
|
8
|
+
className: "space-y-3 px-4 py-4",
|
|
9
|
+
children: [/* @__PURE__ */ t("p", {
|
|
10
|
+
className: "text-sm text-text-secondary",
|
|
11
|
+
children: i("tours.loadError", "Guided tours could not be loaded. Try again.")
|
|
12
|
+
}), r ? /* @__PURE__ */ t("button", {
|
|
13
|
+
type: "button",
|
|
14
|
+
onClick: r,
|
|
15
|
+
className: "min-h-11 rounded-button border border-border-default px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
16
|
+
children: i("tours.retry", "Retry tours")
|
|
17
|
+
}) : null]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as TourLoadError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gql.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/toursContext/gql.ts"],"names":[],"mappings":"AA2EA,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"gql.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/toursContext/gql.ts"],"names":[],"mappings":"AA2EA,eAAO,MAAM,qBAAqB,gCAejC,CAAC;AAEF,eAAO,MAAM,sCAAsC,gCASlD,CAAC;AAEF,eAAO,MAAM,UAAU,gCActB,CAAC;AAEF,eAAO,MAAM,aAAa,gCAczB,CAAC;AAEF,eAAO,MAAM,SAAS,gCAcrB,CAAC;AAEF,eAAO,MAAM,aAAa,gCAczB,CAAC;AAEF,eAAO,MAAM,gBAAgB,gCAW5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTourMutations.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/toursContext/useTourMutations.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useTourMutations.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/toursContext/useTourMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AACf,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;4BAYJ,MAAM,UAAU,SAAS,GAAG,WAAW,GAAG,SAAS,YAAY,MAAM;mCAsFrE,MAAM,UAAU,MAAM;4BA2CnB,cAAc,UAAU,MAAM,YAAY,iBAAiB;EAuChF"}
|
|
@@ -1,109 +1,146 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useCallback as c } from "react";
|
|
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, useRef as l } from "react";
|
|
5
5
|
//#region src/shared/tours/toursContext/useTourMutations.ts
|
|
6
|
-
function
|
|
6
|
+
function u({ globalClient: u, userId: d, productSlug: f, moduleId: p, pageId: m, workspaceId: h, setAllTours: g, allToursRef: _, progressMutationVersionRef: v, latestProgressMutationByTourRef: y }) {
|
|
7
|
+
let b = `${d ?? ""}:${h ?? ""}`, x = l({
|
|
8
|
+
key: b,
|
|
9
|
+
epoch: 0
|
|
10
|
+
}), S = l(/* @__PURE__ */ new Map());
|
|
11
|
+
x.current.key !== b && (x.current = {
|
|
12
|
+
key: b,
|
|
13
|
+
epoch: x.current.epoch + 1
|
|
14
|
+
}, S.current.clear());
|
|
15
|
+
let C = x.current.epoch;
|
|
7
16
|
return {
|
|
8
|
-
trackProgress: c(async (
|
|
9
|
-
if (!
|
|
10
|
-
let c =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
trackProgress: c(async (t, a, o) => {
|
|
18
|
+
if (!u || !d || x.current.epoch !== C) return;
|
|
19
|
+
let c = a === "started" ? "IN_PROGRESS" : a === "completed" ? "COMPLETED" : "SKIPPED", l = _.current.find((e) => e.id === t)?.myProgress;
|
|
20
|
+
if (a === "started" && l?.status === "IN_PROGRESS") return;
|
|
21
|
+
a === "started" && S.current.set(t, (S.current.get(t) ?? 0) + 1);
|
|
22
|
+
let f = v.current + 1;
|
|
23
|
+
v.current = f, y.current.set(t, f), g((n) => {
|
|
24
|
+
let r = e(n, t, c);
|
|
25
|
+
return _.current = r, r;
|
|
14
26
|
});
|
|
15
27
|
try {
|
|
16
|
-
if (
|
|
17
|
-
await
|
|
18
|
-
mutation:
|
|
28
|
+
if (a === "started") {
|
|
29
|
+
await u.mutate({
|
|
30
|
+
mutation: i,
|
|
19
31
|
variables: {
|
|
20
|
-
tourId:
|
|
21
|
-
userId:
|
|
22
|
-
deviceType:
|
|
32
|
+
tourId: t,
|
|
33
|
+
userId: d,
|
|
34
|
+
deviceType: s()
|
|
23
35
|
}
|
|
24
36
|
});
|
|
25
37
|
return;
|
|
26
38
|
}
|
|
27
|
-
if (
|
|
28
|
-
await
|
|
29
|
-
mutation:
|
|
39
|
+
if (a === "completed") {
|
|
40
|
+
await u.mutate({
|
|
41
|
+
mutation: n,
|
|
30
42
|
variables: {
|
|
31
|
-
tourId:
|
|
32
|
-
userId:
|
|
43
|
+
tourId: t,
|
|
44
|
+
userId: d
|
|
33
45
|
}
|
|
34
46
|
});
|
|
35
47
|
return;
|
|
36
48
|
}
|
|
37
|
-
await
|
|
38
|
-
mutation:
|
|
49
|
+
await u.mutate({
|
|
50
|
+
mutation: r,
|
|
39
51
|
variables: {
|
|
40
|
-
tourId:
|
|
41
|
-
userId:
|
|
52
|
+
tourId: t,
|
|
53
|
+
userId: d
|
|
42
54
|
}
|
|
43
55
|
});
|
|
44
56
|
} catch {
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
let n =
|
|
48
|
-
...
|
|
49
|
-
myProgress:
|
|
50
|
-
} :
|
|
51
|
-
return
|
|
57
|
+
if (x.current.epoch !== C || y.current.get(t) !== f) return;
|
|
58
|
+
g((e) => {
|
|
59
|
+
let n = e.map((e) => e.id === t ? {
|
|
60
|
+
...e,
|
|
61
|
+
myProgress: l
|
|
62
|
+
} : e);
|
|
63
|
+
return _.current = n, n;
|
|
52
64
|
});
|
|
53
65
|
} finally {
|
|
54
|
-
|
|
66
|
+
x.current.epoch === C && y.current.get(t) === f && y.current.delete(t);
|
|
55
67
|
}
|
|
56
68
|
}, [
|
|
57
|
-
l,
|
|
58
69
|
u,
|
|
59
|
-
|
|
70
|
+
d,
|
|
60
71
|
g,
|
|
61
72
|
_,
|
|
62
|
-
v
|
|
73
|
+
v,
|
|
74
|
+
y,
|
|
75
|
+
C
|
|
63
76
|
]),
|
|
64
|
-
recordStepCompletion: c(async (
|
|
65
|
-
if (!
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
recordStepCompletion: c(async (e, n) => {
|
|
78
|
+
if (!u || !d || !n || x.current.epoch !== C) return;
|
|
79
|
+
let r = S.current.get(e) ?? 0;
|
|
80
|
+
try {
|
|
81
|
+
if (await u.mutate({
|
|
82
|
+
mutation: t,
|
|
68
83
|
variables: {
|
|
69
|
-
tourId:
|
|
84
|
+
tourId: e,
|
|
70
85
|
stepId: n,
|
|
71
|
-
userId:
|
|
86
|
+
userId: d
|
|
72
87
|
}
|
|
88
|
+
}), x.current.epoch !== C || (S.current.get(e) ?? 0) !== r) return;
|
|
89
|
+
g((t) => {
|
|
90
|
+
let r = t.map((t) => {
|
|
91
|
+
if (t.id !== e || !t.myProgress) return t;
|
|
92
|
+
let r = t.myProgress.completedSteps, i = Array.isArray(r) ? r.filter((e) => typeof e == "string") : [];
|
|
93
|
+
return {
|
|
94
|
+
...t,
|
|
95
|
+
myProgress: {
|
|
96
|
+
...t.myProgress,
|
|
97
|
+
currentStepId: n,
|
|
98
|
+
completedSteps: [...new Set([...i, n])]
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
return _.current = r, r;
|
|
73
103
|
});
|
|
74
104
|
} catch {}
|
|
75
|
-
}, [
|
|
105
|
+
}, [
|
|
106
|
+
u,
|
|
107
|
+
d,
|
|
108
|
+
g,
|
|
109
|
+
_,
|
|
110
|
+
C
|
|
111
|
+
]),
|
|
76
112
|
trackEvent: c(async (e, t, n) => {
|
|
77
|
-
if (!(!
|
|
78
|
-
await
|
|
79
|
-
mutation:
|
|
113
|
+
if (!(!u || !d || x.current.epoch !== C)) try {
|
|
114
|
+
await u.mutate({
|
|
115
|
+
mutation: a,
|
|
80
116
|
variables: { input: {
|
|
81
117
|
tourId: t,
|
|
82
|
-
userId:
|
|
83
|
-
sessionId:
|
|
118
|
+
userId: d,
|
|
119
|
+
sessionId: o(),
|
|
84
120
|
eventType: e,
|
|
85
121
|
stepId: n?.stepId,
|
|
86
122
|
stepOrder: n?.stepOrder,
|
|
87
|
-
productId:
|
|
88
|
-
moduleId:
|
|
89
|
-
pageId:
|
|
90
|
-
deviceType:
|
|
123
|
+
productId: f,
|
|
124
|
+
moduleId: p,
|
|
125
|
+
pageId: m,
|
|
126
|
+
deviceType: s(),
|
|
91
127
|
userAgent: typeof navigator < "u" ? navigator.userAgent : void 0,
|
|
92
128
|
duration: n?.duration,
|
|
93
129
|
metadata: n?.metadata,
|
|
94
|
-
context:
|
|
130
|
+
context: h ? { workspaceId: h } : void 0
|
|
95
131
|
} }
|
|
96
132
|
});
|
|
97
133
|
} catch {}
|
|
98
134
|
}, [
|
|
99
|
-
|
|
100
|
-
f,
|
|
135
|
+
u,
|
|
101
136
|
p,
|
|
137
|
+
m,
|
|
138
|
+
f,
|
|
102
139
|
d,
|
|
103
|
-
|
|
104
|
-
|
|
140
|
+
h,
|
|
141
|
+
C
|
|
105
142
|
])
|
|
106
143
|
};
|
|
107
144
|
}
|
|
108
145
|
//#endregion
|
|
109
|
-
export {
|
|
146
|
+
export { u as useTourMutations };
|
|
@@ -25,6 +25,8 @@ export type TourUserStatus = 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'SKIP
|
|
|
25
25
|
export interface TourUserProgressSummary {
|
|
26
26
|
id: string;
|
|
27
27
|
status: TourUserStatus;
|
|
28
|
+
completedSteps?: unknown;
|
|
29
|
+
currentStepId?: string | null;
|
|
28
30
|
}
|
|
29
31
|
export type TourTriggerType = 'MANUAL' | 'AUTO_FIRST_VISIT' | 'AUTO_ALWAYS' | 'ON_EVENT' | 'SCHEDULED';
|
|
30
32
|
export type StepPlacement = 'AUTO' | 'TOP' | 'BOTTOM' | 'LEFT' | 'RIGHT' | 'CENTER';
|
|
@@ -148,6 +150,8 @@ export interface TourPlayerContextValue extends TourPlayerState, TourPlayerActio
|
|
|
148
150
|
* Tour player provider props
|
|
149
151
|
*/
|
|
150
152
|
export interface TourPlayerProviderProps {
|
|
153
|
+
/** Stops an open tour when its authenticated user or workspace changes. */
|
|
154
|
+
scopeKey?: string;
|
|
151
155
|
children: React.ReactNode;
|
|
152
156
|
/**
|
|
153
157
|
* Callback when a tour starts
|