@danxbot/ui 14.1.0 → 14.2.0
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/index.js
CHANGED
|
@@ -46810,9 +46810,9 @@ const $j = [
|
|
|
46810
46810
|
{ value: "simulated", label: "Simulated" },
|
|
46811
46811
|
{ value: "live", label: "Live" }
|
|
46812
46812
|
];
|
|
46813
|
-
function HK({ onOpenUseCaseLedger: e } = {}) {
|
|
46814
|
-
const { canAccessDevTools:
|
|
46815
|
-
return
|
|
46813
|
+
function HK({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
|
|
46814
|
+
const { canAccessDevTools: n, roles: r, viewingAsRoleId: o, setViewingAsRoleId: s, effectiveRole: i, isImpersonating: a } = mi(), { networkSpeed: l, dataSource: c } = Fj(), [u, f] = Ee(!1), [d, p] = Ee(!1);
|
|
46815
|
+
return n ? /* @__PURE__ */ h(
|
|
46816
46816
|
Gn,
|
|
46817
46817
|
{
|
|
46818
46818
|
align: "end",
|
|
@@ -46820,7 +46820,7 @@ function HK({ onOpenUseCaseLedger: e } = {}) {
|
|
|
46820
46820
|
Et,
|
|
46821
46821
|
{
|
|
46822
46822
|
size: "sm",
|
|
46823
|
-
variant:
|
|
46823
|
+
variant: a ? "subtle" : "outline",
|
|
46824
46824
|
"aria-label": "Developer tools",
|
|
46825
46825
|
children: [
|
|
46826
46826
|
/* @__PURE__ */ h(me, { name: "eye", size: "sm" }),
|
|
@@ -46836,13 +46836,13 @@ function HK({ onOpenUseCaseLedger: e } = {}) {
|
|
|
46836
46836
|
{
|
|
46837
46837
|
"aria-label": "View the app as a role",
|
|
46838
46838
|
placeholder: "Your actual role",
|
|
46839
|
-
value:
|
|
46840
|
-
onValueChange: (
|
|
46841
|
-
children:
|
|
46839
|
+
value: o,
|
|
46840
|
+
onValueChange: (m) => s(m ?? null),
|
|
46841
|
+
children: r.map((m) => /* @__PURE__ */ h(Mr, { value: m.id, children: m.label }, m.id))
|
|
46842
46842
|
}
|
|
46843
46843
|
)
|
|
46844
46844
|
] }),
|
|
46845
|
-
|
|
46845
|
+
a && /* @__PURE__ */ O(
|
|
46846
46846
|
"div",
|
|
46847
46847
|
{
|
|
46848
46848
|
role: "status",
|
|
@@ -46852,7 +46852,7 @@ function HK({ onOpenUseCaseLedger: e } = {}) {
|
|
|
46852
46852
|
/* @__PURE__ */ O("p", { className: "text-xs text-warning-text", children: [
|
|
46853
46853
|
"Viewing as",
|
|
46854
46854
|
" ",
|
|
46855
|
-
/* @__PURE__ */ h("strong", { className: "font-semibold", children:
|
|
46855
|
+
/* @__PURE__ */ h("strong", { className: "font-semibold", children: i?.label ?? "an unknown role" }),
|
|
46856
46856
|
". Screens and permissions reflect that role, not your own."
|
|
46857
46857
|
] })
|
|
46858
46858
|
]
|
|
@@ -46863,65 +46863,65 @@ function HK({ onOpenUseCaseLedger: e } = {}) {
|
|
|
46863
46863
|
{
|
|
46864
46864
|
variant: "outline",
|
|
46865
46865
|
size: "sm",
|
|
46866
|
-
disabled: !
|
|
46867
|
-
onClick: () =>
|
|
46866
|
+
disabled: !a,
|
|
46867
|
+
onClick: () => s(null),
|
|
46868
46868
|
children: [
|
|
46869
46869
|
/* @__PURE__ */ h(me, { name: "rotate-ccw", size: "sm" }),
|
|
46870
46870
|
"Reset to actual"
|
|
46871
46871
|
]
|
|
46872
46872
|
}
|
|
46873
46873
|
),
|
|
46874
|
-
/* @__PURE__ */ O(
|
|
46875
|
-
/* @__PURE__ */
|
|
46876
|
-
|
|
46877
|
-
|
|
46878
|
-
|
|
46879
|
-
|
|
46880
|
-
|
|
46881
|
-
|
|
46882
|
-
|
|
46883
|
-
|
|
46884
|
-
|
|
46885
|
-
|
|
46886
|
-
|
|
46887
|
-
|
|
46888
|
-
/* @__PURE__ */
|
|
46889
|
-
|
|
46890
|
-
|
|
46891
|
-
|
|
46892
|
-
|
|
46893
|
-
|
|
46894
|
-
|
|
46895
|
-
|
|
46896
|
-
|
|
46897
|
-
|
|
46898
|
-
|
|
46899
|
-
|
|
46900
|
-
/* @__PURE__ */ h(
|
|
46874
|
+
t && /* @__PURE__ */ O(lt, { children: [
|
|
46875
|
+
/* @__PURE__ */ O("div", { className: "flex flex-col gap-2 border-t border-border-subtle pt-4", children: [
|
|
46876
|
+
/* @__PURE__ */ h("span", { className: "text-2xs font-semibold tracking-widest text-tertiary uppercase", children: "Data source" }),
|
|
46877
|
+
/* @__PURE__ */ h(
|
|
46878
|
+
vo,
|
|
46879
|
+
{
|
|
46880
|
+
"aria-label": "Data source",
|
|
46881
|
+
value: c,
|
|
46882
|
+
onValueChange: (m) => dw({ dataSource: m }),
|
|
46883
|
+
children: Lj.map((m) => /* @__PURE__ */ h(Mr, { value: m.value, children: m.label }, m.value))
|
|
46884
|
+
}
|
|
46885
|
+
),
|
|
46886
|
+
c === "live" && /* @__PURE__ */ h("p", { className: "text-2xs text-tertiary", children: "No live backend is configured in this demo — stores keep answering with simulated data. A consuming app wires its own fetcher per store to make this real." })
|
|
46887
|
+
] }),
|
|
46888
|
+
/* @__PURE__ */ O("div", { className: "flex flex-col gap-2 border-t border-border-subtle pt-4", children: [
|
|
46889
|
+
/* @__PURE__ */ h("span", { className: "text-2xs font-semibold tracking-widest text-tertiary uppercase", children: "Network speed" }),
|
|
46890
|
+
/* @__PURE__ */ h(
|
|
46891
|
+
vo,
|
|
46892
|
+
{
|
|
46893
|
+
"aria-label": "Network speed",
|
|
46894
|
+
value: l,
|
|
46895
|
+
onValueChange: (m) => dw({ networkSpeed: m }),
|
|
46896
|
+
children: $j.map((m) => /* @__PURE__ */ h(Mr, { value: m.value, children: m.label }, m.value))
|
|
46897
|
+
}
|
|
46898
|
+
)
|
|
46899
|
+
] }),
|
|
46900
|
+
/* @__PURE__ */ h("div", { className: "flex flex-col gap-2 border-t border-border-subtle pt-4", children: /* @__PURE__ */ h(
|
|
46901
46901
|
YE,
|
|
46902
46902
|
{
|
|
46903
46903
|
trigger: /* @__PURE__ */ O(Et, { variant: "outline", size: "sm", children: [
|
|
46904
46904
|
/* @__PURE__ */ h(me, { name: "refresh-cw", size: "sm" }),
|
|
46905
46905
|
"Regenerate demo data"
|
|
46906
46906
|
] }),
|
|
46907
|
-
open:
|
|
46908
|
-
onOpenChange:
|
|
46907
|
+
open: u,
|
|
46908
|
+
onOpenChange: f,
|
|
46909
46909
|
title: "Regenerate demo data?",
|
|
46910
46910
|
description: "Every user, team, role and permission reverts to its seed. The use-case ledger is untouched — this never erases product history.",
|
|
46911
46911
|
confirmLabel: "Regenerate",
|
|
46912
|
-
loading:
|
|
46912
|
+
loading: d,
|
|
46913
46913
|
onConfirm: () => {
|
|
46914
|
-
|
|
46915
|
-
|
|
46914
|
+
p(!0), Tj("demo").finally(() => {
|
|
46915
|
+
p(!1), f(!1);
|
|
46916
46916
|
});
|
|
46917
46917
|
}
|
|
46918
46918
|
}
|
|
46919
|
-
)
|
|
46920
|
-
|
|
46921
|
-
|
|
46922
|
-
|
|
46923
|
-
|
|
46924
|
-
] })
|
|
46919
|
+
) })
|
|
46920
|
+
] }),
|
|
46921
|
+
e && /* @__PURE__ */ h("div", { className: "flex flex-col gap-2 border-t border-border-subtle pt-4", children: /* @__PURE__ */ O(Et, { variant: "ghost", size: "sm", onClick: e, children: [
|
|
46922
|
+
/* @__PURE__ */ h(me, { name: "list-checks", size: "sm" }),
|
|
46923
|
+
"Open Use Case Ledger"
|
|
46924
|
+
] }) })
|
|
46925
46925
|
] })
|
|
46926
46926
|
}
|
|
46927
46927
|
) : null;
|