@drawbridge/components 0.1.0 → 0.1.2
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/advertisement.mjs +4 -4
- package/dist/bridge/advertisements.mjs +3 -3
- package/dist/bridge/fields.mjs +7 -7
- package/dist/bridge/form-subdomain-embed.mjs +9 -9
- package/dist/bridge/form-subdomain-header.mjs +3 -3
- package/dist/bridge/form-subdomain-issue.mjs +10 -10
- package/dist/bridge/form-subdomain-prize.mjs +7 -7
- package/dist/bridge/form-subdomain-shop-modal.mjs +13 -13
- package/dist/bridge/form-subdomain-shop.mjs +1 -1
- package/dist/bridge/form-subdomain.mjs +16 -16
- package/dist/bridge/product-tile.mjs +2 -2
- package/dist/bridge/share-button.mjs +1 -1
- package/dist/bridge/template-layout.mjs +14 -14
- package/dist/bridge/template-modal.mjs +15 -15
- package/dist/bridge/template-not-found.mjs +1 -1
- package/dist/bridge/template-subdomain-gallery.mjs +5 -5
- package/dist/bridge/template-subdomain-link.mjs +1 -1
- package/dist/bridge/template-subdomain.mjs +7 -7
- package/dist/dashboard/accordion.mjs +5 -5
- package/dist/dashboard/card-affiliate.mjs +11 -11
- package/dist/dashboard/card-connection.mjs +5 -5
- package/dist/dashboard/card-integration.mjs +6 -6
- package/dist/dashboard/card-metric.mjs +3 -3
- package/dist/dashboard/card-note.mjs +4 -4
- package/dist/dashboard/card-order.mjs +1 -1
- package/dist/dashboard/card-overage.mjs +4 -4
- package/dist/dashboard/card-payment-method.mjs +1 -1
- package/dist/dashboard/card-plan.mjs +5 -5
- package/dist/dashboard/card-product.mjs +1 -1
- package/dist/dashboard/card-score.mjs +2 -2
- package/dist/dashboard/card-setting.mjs +2 -2
- package/dist/dashboard/card-task.mjs +3 -3
- package/dist/dashboard/card-template.mjs +1 -1
- package/dist/dashboard/card-tile.mjs +7 -7
- package/dist/dashboard/card-utm.mjs +4 -4
- package/dist/dashboard/carousel-tiles.mjs +2 -2
- package/dist/dashboard/code-formatter.mjs +2 -2
- package/dist/dashboard/drawer-subscription.mjs +14 -14
- package/dist/dashboard/drawer.mjs +4 -4
- package/dist/dashboard/dropdown.mjs +4 -4
- package/dist/dashboard/form-action.mjs +4 -4
- package/dist/dashboard/form-address.mjs +6 -6
- package/dist/dashboard/form-admin-campaign.mjs +8 -8
- package/dist/dashboard/form-admin-invoice-refund.mjs +8 -8
- package/dist/dashboard/form-admin-oauth.mjs +11 -11
- package/dist/dashboard/form-admin-organization.mjs +8 -8
- package/dist/dashboard/form-admin-provider.mjs +10 -10
- package/dist/dashboard/form-admin-referrer.mjs +7 -7
- package/dist/dashboard/form-admin-subscription-custom.mjs +11 -11
- package/dist/dashboard/form-admin-template.mjs +11 -11
- package/dist/dashboard/form-admin-user-credit.mjs +7 -7
- package/dist/dashboard/form-admin-user-permissions.mjs +7 -7
- package/dist/dashboard/form-admin-user-status.mjs +7 -7
- package/dist/dashboard/form-admin-utm.mjs +12 -12
- package/dist/dashboard/form-ai.mjs +16 -16
- package/dist/dashboard/form-auth.mjs +11 -11
- package/dist/dashboard/form-credit.mjs +1 -1
- package/dist/dashboard/form-file-upload.mjs +14 -14
- package/dist/dashboard/form-file.mjs +11 -11
- package/dist/dashboard/form-filters-analytics.mjs +9 -9
- package/dist/dashboard/form-filters.mjs +9 -9
- package/dist/dashboard/form-note.mjs +7 -7
- package/dist/dashboard/form-notification.mjs +5 -5
- package/dist/dashboard/form-organization-affiliate.mjs +8 -8
- package/dist/dashboard/form-organization-brand.mjs +9 -9
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +14 -14
- package/dist/dashboard/form-organization-campaign-agreement.mjs +11 -11
- package/dist/dashboard/form-organization-campaign-draw.mjs +12 -12
- package/dist/dashboard/form-organization-campaign-field-email.mjs +10 -10
- package/dist/dashboard/form-organization-campaign-field-name.mjs +7 -7
- package/dist/dashboard/form-organization-campaign-field-number.mjs +8 -8
- package/dist/dashboard/form-organization-campaign-field-phone.mjs +9 -9
- package/dist/dashboard/form-organization-campaign-field-select.mjs +9 -9
- package/dist/dashboard/form-organization-campaign-field-text.mjs +8 -8
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +8 -8
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +8 -8
- package/dist/dashboard/form-organization-campaign-integration-enable.mjs +5 -5
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +9 -9
- package/dist/dashboard/form-organization-campaign-integration-gtm.mjs +8 -8
- package/dist/dashboard/form-organization-campaign-lead.mjs +7 -7
- package/dist/dashboard/form-organization-campaign-link.mjs +11 -11
- package/dist/dashboard/form-organization-campaign-page-affiliates.mjs +6 -6
- package/dist/dashboard/form-organization-campaign-page-embed.mjs +7 -7
- package/dist/dashboard/form-organization-campaign-page-preview.mjs +8 -8
- package/dist/dashboard/form-organization-campaign-page-qr.mjs +14 -14
- package/dist/dashboard/form-organization-campaign-page-share.mjs +15 -15
- package/dist/dashboard/form-organization-campaign-page-slug.mjs +8 -8
- package/dist/dashboard/form-organization-campaign-page.mjs +10 -10
- package/dist/dashboard/form-organization-campaign-prize-edit.mjs +16 -16
- package/dist/dashboard/form-organization-campaign-prize.mjs +7 -7
- package/dist/dashboard/form-organization-campaign-range.mjs +10 -10
- package/dist/dashboard/form-organization-campaign.mjs +13 -13
- package/dist/dashboard/form-organization-connection.mjs +14 -14
- package/dist/dashboard/form-organization-export.mjs +9 -9
- package/dist/dashboard/form-organization-file-frame.mjs +9 -9
- package/dist/dashboard/form-organization-file.mjs +11 -11
- package/dist/dashboard/form-organization-identity.mjs +15 -15
- package/dist/dashboard/form-organization-member.mjs +9 -9
- package/dist/dashboard/form-organization-segment.mjs +12 -12
- package/dist/dashboard/form-organization-workflow.mjs +18 -18
- package/dist/dashboard/form-organization.mjs +11 -11
- package/dist/dashboard/form-otc.mjs +7 -7
- package/dist/dashboard/form-payment-methods.mjs +7 -7
- package/dist/dashboard/form-profile.mjs +7 -7
- package/dist/dashboard/form-stripe-promotion.mjs +7 -7
- package/dist/dashboard/form-stripe.mjs +5 -5
- package/dist/dashboard/form-verify-prize.mjs +13 -13
- package/dist/dashboard/google.mjs +5 -5
- package/dist/dashboard/guard-navigation.mjs +3 -3
- package/dist/dashboard/guide.mjs +4 -4
- package/dist/dashboard/iframe.mjs +1 -1
- package/dist/dashboard/input-address-saved.mjs +7 -7
- package/dist/dashboard/input-array.mjs +5 -5
- package/dist/dashboard/input-color.mjs +2 -2
- package/dist/dashboard/input-combobox.mjs +5 -5
- package/dist/dashboard/input-date.mjs +4 -4
- package/dist/dashboard/input-editor.mjs +6 -6
- package/dist/dashboard/input-fields.mjs +20 -20
- package/dist/dashboard/input-file.mjs +6 -6
- package/dist/dashboard/input-font.mjs +6 -6
- package/dist/dashboard/input-group-ai.mjs +5 -5
- package/dist/dashboard/input-radio.mjs +2 -2
- package/dist/dashboard/input-resource.mjs +5 -5
- package/dist/dashboard/input-secret.mjs +6 -6
- package/dist/dashboard/input-time.mjs +2 -2
- package/dist/dashboard/lib/table-actions.mjs +1 -1
- package/dist/dashboard/lib/uppy.mjs +1 -1
- package/dist/dashboard/link-back.mjs +4 -4
- package/dist/dashboard/link.mjs +1 -1
- package/dist/dashboard/list-resource.mjs +4 -4
- package/dist/dashboard/list.mjs +3 -3
- package/dist/dashboard/menu.js +65 -9
- package/dist/dashboard/menu.mjs +76 -21
- package/dist/dashboard/modal.mjs +5 -5
- package/dist/dashboard/notes.mjs +7 -7
- package/dist/dashboard/notice.mjs +3 -3
- package/dist/dashboard/paged.mjs +7 -7
- package/dist/dashboard/provider-resource.mjs +2 -2
- package/dist/dashboard/provider-ui.mjs +6 -6
- package/dist/dashboard/provider.mjs +1 -1
- package/dist/dashboard/recharts.mjs +1 -1
- package/dist/dashboard/steps.mjs +6 -6
- package/dist/dashboard/swatch.mjs +3 -3
- package/dist/dashboard/table-cell-title.mjs +6 -6
- package/dist/dashboard/table.mjs +15 -15
- package/dist/dashboard/template-dashboard.mjs +13 -13
- package/dist/dashboard/template-not-found.mjs +3 -3
- package/dist/dashboard/template-socket.mjs +3 -3
- package/dist/dashboard/template-suspended.mjs +1 -1
- package/dist/dashboard/template-ui.js +4 -1
- package/dist/dashboard/template-ui.mjs +16 -13
- package/dist/dashboard/wrapper-ai.mjs +1 -1
- package/dist/icons/social.mjs +14 -14
- package/dist/input-checkbox.mjs +3 -3
- package/dist/input-group.mjs +2 -2
- package/dist/input-name.mjs +2 -2
- package/dist/input-number.mjs +4 -4
- package/dist/input-phone.mjs +2 -2
- package/dist/input-select.mjs +2 -2
- package/dist/input-text.mjs +1 -1
- package/dist/input-textarea.mjs +1 -1
- package/dist/product.mjs +6 -6
- package/dist/provider-font.mjs +1 -1
- package/dist/shared/badge.mjs +1 -1
- package/dist/shared/button.mjs +2 -2
- package/dist/shared/card-asset.mjs +3 -3
- package/dist/shared/card-prize.mjs +4 -4
- package/dist/shared/carousel.mjs +2 -2
- package/dist/shared/copy-to-clipboard.mjs +4 -4
- package/dist/shared/empty.mjs +1 -1
- package/dist/shared/error.mjs +1 -1
- package/dist/shared/fieldset.mjs +1 -1
- package/dist/shared/input-checkbox-list.mjs +3 -3
- package/dist/shared/input-range.mjs +1 -1
- package/dist/shared/input-switch.mjs +2 -2
- package/dist/shared/input-url.mjs +1 -1
- package/dist/shared/lib/helpers.mjs +2 -2
- package/dist/shared/lib/icon-labels.mjs +7 -7
- package/dist/shared/lib/yup.mjs +1 -1
- package/dist/shared/loader.mjs +2 -2
- package/dist/shared/overlay.mjs +2 -2
- package/dist/shared/sortable.mjs +1 -1
- package/dist/shared/tabs.mjs +3 -3
- package/dist/video.mjs +2 -2
- package/package.json +299 -3
package/dist/dashboard/menu.js
CHANGED
|
@@ -33,7 +33,8 @@ __export(menu_exports, {
|
|
|
33
33
|
MenuAdmin: () => MenuAdmin,
|
|
34
34
|
MenuApp: () => MenuApp,
|
|
35
35
|
MenuCampaign: () => MenuCampaign,
|
|
36
|
-
MenuOrganization: () => MenuOrganization
|
|
36
|
+
MenuOrganization: () => MenuOrganization,
|
|
37
|
+
releaseId: () => releaseId
|
|
37
38
|
});
|
|
38
39
|
module.exports = __toCommonJS(menu_exports);
|
|
39
40
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -56,6 +57,7 @@ var import_arrow_right = __toESM(require("../icons/arrow-right"));
|
|
|
56
57
|
var import_provider_resource = __toESM(require("./provider-resource"));
|
|
57
58
|
var import_wrapper_ai = __toESM(require("./wrapper-ai"));
|
|
58
59
|
var import_button = __toESM(require("../shared/button"));
|
|
60
|
+
var import_external = __toESM(require("../icons/external"));
|
|
59
61
|
const MenuItem = ({
|
|
60
62
|
active,
|
|
61
63
|
badge,
|
|
@@ -522,6 +524,46 @@ const MenuAccountProcessButton = ({
|
|
|
522
524
|
}
|
|
523
525
|
);
|
|
524
526
|
};
|
|
527
|
+
const releaseId = (link) => {
|
|
528
|
+
var _a;
|
|
529
|
+
return ((_a = String(link || "").match(/\/task\/(\d+)/)) == null ? void 0 : _a[1]) || null;
|
|
530
|
+
};
|
|
531
|
+
const MenuRelease = ({
|
|
532
|
+
link
|
|
533
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
534
|
+
"a",
|
|
535
|
+
{
|
|
536
|
+
...{
|
|
537
|
+
className: "flex items-center gap-1.5 px-6 py-1.5 bg-yellow-dark text-black text-xs hover:underline",
|
|
538
|
+
href: link,
|
|
539
|
+
rel: "noopener noreferrer",
|
|
540
|
+
target: "_blank"
|
|
541
|
+
},
|
|
542
|
+
children: [
|
|
543
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
544
|
+
"span",
|
|
545
|
+
{
|
|
546
|
+
...{
|
|
547
|
+
className: "flex-1"
|
|
548
|
+
},
|
|
549
|
+
children: [
|
|
550
|
+
"Release ",
|
|
551
|
+
releaseId(link)
|
|
552
|
+
]
|
|
553
|
+
}
|
|
554
|
+
),
|
|
555
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
556
|
+
import_external.default,
|
|
557
|
+
{
|
|
558
|
+
...{
|
|
559
|
+
"aria-hidden": true,
|
|
560
|
+
className: "w-3 h-3 shrink-0"
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
)
|
|
564
|
+
]
|
|
565
|
+
}
|
|
566
|
+
);
|
|
525
567
|
const MenuAccountDropdown = ({
|
|
526
568
|
account,
|
|
527
569
|
balance,
|
|
@@ -530,8 +572,13 @@ const MenuAccountDropdown = ({
|
|
|
530
572
|
modal,
|
|
531
573
|
onClick
|
|
532
574
|
}) => {
|
|
533
|
-
var _a, _b, _c, _d, _e, _f;
|
|
534
|
-
const
|
|
575
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
576
|
+
const app = (0, import_react_query.useQuery)({
|
|
577
|
+
queryKey: ["app"]
|
|
578
|
+
});
|
|
579
|
+
const release = (_a = app == null ? void 0 : app.data) == null ? void 0 : _a.release;
|
|
580
|
+
const banded = Boolean(releaseId(release));
|
|
581
|
+
const inbox = Number(((_c = (_b = account == null ? void 0 : account.data) == null ? void 0 : _b.totals) == null ? void 0 : _c.inbox) || 0);
|
|
535
582
|
const items = [
|
|
536
583
|
{
|
|
537
584
|
...inbox && {
|
|
@@ -569,7 +616,7 @@ const MenuAccountDropdown = ({
|
|
|
569
616
|
onClick: actions.signout,
|
|
570
617
|
title: "Logout"
|
|
571
618
|
});
|
|
572
|
-
if ((0, import_helpers.isAdmin)((
|
|
619
|
+
if ((0, import_helpers.isAdmin)((_d = account == null ? void 0 : account.data) == null ? void 0 : _d.permissions)) {
|
|
573
620
|
items.unshift({
|
|
574
621
|
element: import_link.default,
|
|
575
622
|
href: "/admin",
|
|
@@ -606,7 +653,7 @@ const MenuAccountDropdown = ({
|
|
|
606
653
|
}
|
|
607
654
|
};
|
|
608
655
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
609
|
-
!Boolean((
|
|
656
|
+
!Boolean((_e = balance == null ? void 0 : balance.data) == null ? void 0 : _e.ai) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
610
657
|
"div",
|
|
611
658
|
{
|
|
612
659
|
...{
|
|
@@ -670,11 +717,19 @@ const MenuAccountDropdown = ({
|
|
|
670
717
|
}
|
|
671
718
|
}
|
|
672
719
|
),
|
|
720
|
+
banded && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
721
|
+
MenuRelease,
|
|
722
|
+
{
|
|
723
|
+
...{
|
|
724
|
+
link: release
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
),
|
|
673
728
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
674
729
|
"div",
|
|
675
730
|
{
|
|
676
731
|
...{
|
|
677
|
-
className: "flex flex-col justify-between
|
|
732
|
+
className: "flex flex-col justify-between p-6 space-y-4" + (banded ? "" : " border-t border-gray-dark")
|
|
678
733
|
},
|
|
679
734
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react2.Disclosure, { children: [
|
|
680
735
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -718,8 +773,8 @@ const MenuAccountDropdown = ({
|
|
|
718
773
|
import_avatar.default,
|
|
719
774
|
{
|
|
720
775
|
...{
|
|
721
|
-
email: (
|
|
722
|
-
image: (
|
|
776
|
+
email: (_f = account == null ? void 0 : account.data) == null ? void 0 : _f.email,
|
|
777
|
+
image: (_g = account == null ? void 0 : account.data) == null ? void 0 : _g.image,
|
|
723
778
|
name: (0, import_helpers.formatUserName)(account == null ? void 0 : account.data)
|
|
724
779
|
}
|
|
725
780
|
}
|
|
@@ -774,5 +829,6 @@ const MenuAccountDropdown = ({
|
|
|
774
829
|
MenuAdmin,
|
|
775
830
|
MenuApp,
|
|
776
831
|
MenuCampaign,
|
|
777
|
-
MenuOrganization
|
|
832
|
+
MenuOrganization,
|
|
833
|
+
releaseId
|
|
778
834
|
});
|
package/dist/dashboard/menu.mjs
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Fragment } from "react";
|
|
4
|
-
import Link from "./link";
|
|
4
|
+
import Link from "./link.mjs";
|
|
5
5
|
import { Disclosure, DisclosureButton, DisclosurePanel } from "@headlessui/react";
|
|
6
6
|
import { useQuery } from "@tanstack/react-query";
|
|
7
7
|
import { formatCurrency } from "@drawbridge/drawbridge-utils";
|
|
8
8
|
import { request } from "@drawbridge/drawbridge-utils/fetch";
|
|
9
9
|
import { menuEndpoint } from "@drawbridge/drawbridge-utils/oauth";
|
|
10
|
-
import { formatUserName, isAdmin } from "../shared/lib/helpers";
|
|
11
|
-
import Badge from "../shared/badge";
|
|
12
|
-
import Empty from "../shared/empty";
|
|
13
|
-
import Avatar from "./avatar";
|
|
14
|
-
import Indicator from "../shared/indicator";
|
|
15
|
-
import ListResource from "./list-resource";
|
|
16
|
-
import Lock from "../icons/lock";
|
|
17
|
-
import Loader from "../icons/loader";
|
|
18
|
-
import ArrowRight from "../icons/arrow-right";
|
|
19
|
-
import ProviderResource from "./provider-resource";
|
|
20
|
-
import WrapperAI from "./wrapper-ai";
|
|
21
|
-
import Button from "../shared/button";
|
|
10
|
+
import { formatUserName, isAdmin } from "../shared/lib/helpers.mjs";
|
|
11
|
+
import Badge from "../shared/badge.mjs";
|
|
12
|
+
import Empty from "../shared/empty.mjs";
|
|
13
|
+
import Avatar from "./avatar.mjs";
|
|
14
|
+
import Indicator from "../shared/indicator.mjs";
|
|
15
|
+
import ListResource from "./list-resource.mjs";
|
|
16
|
+
import Lock from "../icons/lock.mjs";
|
|
17
|
+
import Loader from "../icons/loader.mjs";
|
|
18
|
+
import ArrowRight from "../icons/arrow-right.mjs";
|
|
19
|
+
import ProviderResource from "./provider-resource.mjs";
|
|
20
|
+
import WrapperAI from "./wrapper-ai.mjs";
|
|
21
|
+
import Button from "../shared/button.mjs";
|
|
22
|
+
import External from "../icons/external.mjs";
|
|
22
23
|
const MenuItem = ({
|
|
23
24
|
active,
|
|
24
25
|
badge,
|
|
@@ -485,6 +486,46 @@ const MenuAccountProcessButton = ({
|
|
|
485
486
|
}
|
|
486
487
|
);
|
|
487
488
|
};
|
|
489
|
+
const releaseId = (link) => {
|
|
490
|
+
var _a;
|
|
491
|
+
return ((_a = String(link || "").match(/\/task\/(\d+)/)) == null ? void 0 : _a[1]) || null;
|
|
492
|
+
};
|
|
493
|
+
const MenuRelease = ({
|
|
494
|
+
link
|
|
495
|
+
}) => /* @__PURE__ */ jsxs(
|
|
496
|
+
"a",
|
|
497
|
+
{
|
|
498
|
+
...{
|
|
499
|
+
className: "flex items-center gap-1.5 px-6 py-1.5 bg-yellow-dark text-black text-xs hover:underline",
|
|
500
|
+
href: link,
|
|
501
|
+
rel: "noopener noreferrer",
|
|
502
|
+
target: "_blank"
|
|
503
|
+
},
|
|
504
|
+
children: [
|
|
505
|
+
/* @__PURE__ */ jsxs(
|
|
506
|
+
"span",
|
|
507
|
+
{
|
|
508
|
+
...{
|
|
509
|
+
className: "flex-1"
|
|
510
|
+
},
|
|
511
|
+
children: [
|
|
512
|
+
"Release ",
|
|
513
|
+
releaseId(link)
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
),
|
|
517
|
+
/* @__PURE__ */ jsx(
|
|
518
|
+
External,
|
|
519
|
+
{
|
|
520
|
+
...{
|
|
521
|
+
"aria-hidden": true,
|
|
522
|
+
className: "w-3 h-3 shrink-0"
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
)
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
);
|
|
488
529
|
const MenuAccountDropdown = ({
|
|
489
530
|
account,
|
|
490
531
|
balance,
|
|
@@ -493,8 +534,13 @@ const MenuAccountDropdown = ({
|
|
|
493
534
|
modal,
|
|
494
535
|
onClick
|
|
495
536
|
}) => {
|
|
496
|
-
var _a, _b, _c, _d, _e, _f;
|
|
497
|
-
const
|
|
537
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
538
|
+
const app = useQuery({
|
|
539
|
+
queryKey: ["app"]
|
|
540
|
+
});
|
|
541
|
+
const release = (_a = app == null ? void 0 : app.data) == null ? void 0 : _a.release;
|
|
542
|
+
const banded = Boolean(releaseId(release));
|
|
543
|
+
const inbox = Number(((_c = (_b = account == null ? void 0 : account.data) == null ? void 0 : _b.totals) == null ? void 0 : _c.inbox) || 0);
|
|
498
544
|
const items = [
|
|
499
545
|
{
|
|
500
546
|
...inbox && {
|
|
@@ -532,7 +578,7 @@ const MenuAccountDropdown = ({
|
|
|
532
578
|
onClick: actions.signout,
|
|
533
579
|
title: "Logout"
|
|
534
580
|
});
|
|
535
|
-
if (isAdmin((
|
|
581
|
+
if (isAdmin((_d = account == null ? void 0 : account.data) == null ? void 0 : _d.permissions)) {
|
|
536
582
|
items.unshift({
|
|
537
583
|
element: Link,
|
|
538
584
|
href: "/admin",
|
|
@@ -569,7 +615,7 @@ const MenuAccountDropdown = ({
|
|
|
569
615
|
}
|
|
570
616
|
};
|
|
571
617
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
572
|
-
!Boolean((
|
|
618
|
+
!Boolean((_e = balance == null ? void 0 : balance.data) == null ? void 0 : _e.ai) && /* @__PURE__ */ jsx(
|
|
573
619
|
"div",
|
|
574
620
|
{
|
|
575
621
|
...{
|
|
@@ -633,11 +679,19 @@ const MenuAccountDropdown = ({
|
|
|
633
679
|
}
|
|
634
680
|
}
|
|
635
681
|
),
|
|
682
|
+
banded && /* @__PURE__ */ jsx(
|
|
683
|
+
MenuRelease,
|
|
684
|
+
{
|
|
685
|
+
...{
|
|
686
|
+
link: release
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
),
|
|
636
690
|
/* @__PURE__ */ jsx(
|
|
637
691
|
"div",
|
|
638
692
|
{
|
|
639
693
|
...{
|
|
640
|
-
className: "flex flex-col justify-between
|
|
694
|
+
className: "flex flex-col justify-between p-6 space-y-4" + (banded ? "" : " border-t border-gray-dark")
|
|
641
695
|
},
|
|
642
696
|
children: /* @__PURE__ */ jsxs(Disclosure, { children: [
|
|
643
697
|
/* @__PURE__ */ jsx(
|
|
@@ -681,8 +735,8 @@ const MenuAccountDropdown = ({
|
|
|
681
735
|
Avatar,
|
|
682
736
|
{
|
|
683
737
|
...{
|
|
684
|
-
email: (
|
|
685
|
-
image: (
|
|
738
|
+
email: (_f = account == null ? void 0 : account.data) == null ? void 0 : _f.email,
|
|
739
|
+
image: (_g = account == null ? void 0 : account.data) == null ? void 0 : _g.image,
|
|
686
740
|
name: formatUserName(account == null ? void 0 : account.data)
|
|
687
741
|
}
|
|
688
742
|
}
|
|
@@ -736,5 +790,6 @@ export {
|
|
|
736
790
|
MenuAdmin,
|
|
737
791
|
MenuApp,
|
|
738
792
|
MenuCampaign,
|
|
739
|
-
MenuOrganization
|
|
793
|
+
MenuOrganization,
|
|
794
|
+
releaseId
|
|
740
795
|
};
|
package/dist/dashboard/modal.mjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Fragment, useEffect } from "react";
|
|
4
4
|
import { Transition } from "@headlessui/react";
|
|
5
|
-
import Times from "../icons/times";
|
|
6
|
-
import Button from "../shared/button";
|
|
7
|
-
import { FormScope } from "../shared/lib/form";
|
|
8
|
-
import Overlay from "../shared/overlay";
|
|
9
|
-
import { useModal } from "./lib/hooks";
|
|
5
|
+
import Times from "../icons/times.mjs";
|
|
6
|
+
import Button from "../shared/button.mjs";
|
|
7
|
+
import { FormScope } from "../shared/lib/form.mjs";
|
|
8
|
+
import Overlay from "../shared/overlay.mjs";
|
|
9
|
+
import { useModal } from "./lib/hooks.mjs";
|
|
10
10
|
let open = 0;
|
|
11
11
|
const Modal = ({
|
|
12
12
|
active = false,
|
package/dist/dashboard/notes.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { useQueryClient } from "@tanstack/react-query";
|
|
4
|
-
import { useCallbacks } from "./lib/hooks";
|
|
5
|
-
import Paged from "./paged";
|
|
6
|
-
import CardNote from "./card-note";
|
|
7
|
-
import FormNote from "./form-note";
|
|
8
|
-
import LinkBack from "./link-back";
|
|
9
|
-
import Plus from "../icons/plus";
|
|
10
|
-
import Button from "../shared/button";
|
|
4
|
+
import { useCallbacks } from "./lib/hooks.mjs";
|
|
5
|
+
import Paged from "./paged.mjs";
|
|
6
|
+
import CardNote from "./card-note.mjs";
|
|
7
|
+
import FormNote from "./form-note.mjs";
|
|
8
|
+
import LinkBack from "./link-back.mjs";
|
|
9
|
+
import Plus from "../icons/plus.mjs";
|
|
10
|
+
import Button from "../shared/button.mjs";
|
|
11
11
|
const Notes = ({
|
|
12
12
|
endpoint = "",
|
|
13
13
|
limit = 12,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useEffect } from "react";
|
|
4
4
|
import { Transition } from "@headlessui/react";
|
|
5
|
-
import Times from "../icons/times";
|
|
6
|
-
import Link from "./link";
|
|
7
|
-
import Button from "../shared/button";
|
|
5
|
+
import Times from "../icons/times.mjs";
|
|
6
|
+
import Link from "./link.mjs";
|
|
7
|
+
import Button from "../shared/button.mjs";
|
|
8
8
|
const Notice = ({
|
|
9
9
|
active,
|
|
10
10
|
queryClient,
|
package/dist/dashboard/paged.mjs
CHANGED
|
@@ -4,13 +4,13 @@ import { useEffect, useRef, useState } from "react";
|
|
|
4
4
|
import { usePathname, useSearchParams } from "next/navigation";
|
|
5
5
|
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
|
6
6
|
import { request } from "@drawbridge/drawbridge-utils/fetch";
|
|
7
|
-
import Empty from "../shared/empty";
|
|
8
|
-
import Loader from "../shared/loader";
|
|
9
|
-
import ArrowLeft from "../icons/arrow-left";
|
|
10
|
-
import ArrowRight from "../icons/arrow-right";
|
|
11
|
-
import Badge from "../shared/badge";
|
|
12
|
-
import Button from "../shared/button";
|
|
13
|
-
import WrapperGradient from "../wrapper-gradient";
|
|
7
|
+
import Empty from "../shared/empty.mjs";
|
|
8
|
+
import Loader from "../shared/loader.mjs";
|
|
9
|
+
import ArrowLeft from "../icons/arrow-left.mjs";
|
|
10
|
+
import ArrowRight from "../icons/arrow-right.mjs";
|
|
11
|
+
import Badge from "../shared/badge.mjs";
|
|
12
|
+
import Button from "../shared/button.mjs";
|
|
13
|
+
import WrapperGradient from "../wrapper-gradient.mjs";
|
|
14
14
|
const Pagination = ({
|
|
15
15
|
className = null,
|
|
16
16
|
counter: counterOverride = void 0,
|
|
@@ -3,8 +3,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { notFound } from "next/navigation";
|
|
4
4
|
import { isTransientError, request } from "@drawbridge/drawbridge-utils/fetch";
|
|
5
5
|
import { useQuery } from "@tanstack/react-query";
|
|
6
|
-
import Loader from "../shared/loader";
|
|
7
|
-
import TemplateNotFound from "./template-not-found";
|
|
6
|
+
import Loader from "../shared/loader.mjs";
|
|
7
|
+
import TemplateNotFound from "./template-not-found.mjs";
|
|
8
8
|
const ProviderResource = ({
|
|
9
9
|
cache,
|
|
10
10
|
children,
|
|
@@ -4,12 +4,12 @@ import { Fragment, useEffect, useRef } from "react";
|
|
|
4
4
|
import { useQueries, useQueryClient } from "@tanstack/react-query";
|
|
5
5
|
import { isTransientError, request, setMemoryToken } from "@drawbridge/drawbridge-utils/fetch";
|
|
6
6
|
import { io } from "socket.io-client";
|
|
7
|
-
import TemplateNotFound from "./template-not-found";
|
|
8
|
-
import Drawer from "./drawer";
|
|
9
|
-
import GuardNavigation from "./guard-navigation";
|
|
10
|
-
import Modal from "./modal";
|
|
11
|
-
import Notice from "./notice";
|
|
12
|
-
import { LogoLoader } from "../shared/loader";
|
|
7
|
+
import TemplateNotFound from "./template-not-found.mjs";
|
|
8
|
+
import Drawer from "./drawer.mjs";
|
|
9
|
+
import GuardNavigation from "./guard-navigation.mjs";
|
|
10
|
+
import Modal from "./modal.mjs";
|
|
11
|
+
import Notice from "./notice.mjs";
|
|
12
|
+
import { LogoLoader } from "../shared/loader.mjs";
|
|
13
13
|
const ProviderUi = ({
|
|
14
14
|
children,
|
|
15
15
|
token
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import dynamic from "next/dynamic";
|
|
5
|
-
import { LoaderDynamic } from "../shared/loader";
|
|
5
|
+
import { LoaderDynamic } from "../shared/loader.mjs";
|
|
6
6
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
7
7
|
const ReactQueryDevtools = dynamic(
|
|
8
8
|
() => import("@tanstack/react-query-devtools").then((mod) => mod.ReactQueryDevtools),
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { capitalize } from "@drawbridge/drawbridge-utils";
|
|
4
4
|
import { AreaChart, Area, BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from "recharts";
|
|
5
|
-
import Empty from "../shared/empty";
|
|
5
|
+
import Empty from "../shared/empty.mjs";
|
|
6
6
|
const ChartEmpty = ({ message }) => /* @__PURE__ */ jsx(
|
|
7
7
|
Empty,
|
|
8
8
|
{
|
package/dist/dashboard/steps.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { capitalize, formatDateString } from "@drawbridge/drawbridge-utils";
|
|
3
|
-
import Accordion from "./accordion";
|
|
4
|
-
import Paged from "./paged";
|
|
5
|
-
import Empty from "../shared/empty";
|
|
6
|
-
import CodeFormater from "./code-formatter";
|
|
7
|
-
import CardTask from "./card-task";
|
|
8
|
-
import Indicator from "../shared/indicator";
|
|
3
|
+
import Accordion from "./accordion.mjs";
|
|
4
|
+
import Paged from "./paged.mjs";
|
|
5
|
+
import Empty from "../shared/empty.mjs";
|
|
6
|
+
import CodeFormater from "./code-formatter.mjs";
|
|
7
|
+
import CardTask from "./card-task.mjs";
|
|
8
|
+
import Indicator from "../shared/indicator.mjs";
|
|
9
9
|
const badgeType = (status) => {
|
|
10
10
|
if (status === "succeeded") return "success";
|
|
11
11
|
if (status === "failed") return "error";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useCopyToClipboard } from "./lib/hooks";
|
|
4
|
-
import Tooltip from "../shared/tooltip";
|
|
5
|
-
import Button from "../shared/button";
|
|
3
|
+
import { useCopyToClipboard } from "./lib/hooks.mjs";
|
|
4
|
+
import Tooltip from "../shared/tooltip.mjs";
|
|
5
|
+
import Button from "../shared/button.mjs";
|
|
6
6
|
const Swatch = ({
|
|
7
7
|
color,
|
|
8
8
|
label,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
|
-
import Avatar from "./avatar";
|
|
4
|
-
import Badge from "../shared/badge";
|
|
5
|
-
import CardAsset from "../shared/card-asset";
|
|
6
|
-
import Error from "../shared/error";
|
|
7
|
-
import Indicator from "../shared/indicator";
|
|
8
|
-
import Tooltip from "../shared/tooltip";
|
|
3
|
+
import Avatar from "./avatar.mjs";
|
|
4
|
+
import Badge from "../shared/badge.mjs";
|
|
5
|
+
import CardAsset from "../shared/card-asset.mjs";
|
|
6
|
+
import Error from "../shared/error.mjs";
|
|
7
|
+
import Indicator from "../shared/indicator.mjs";
|
|
8
|
+
import Tooltip from "../shared/tooltip.mjs";
|
|
9
9
|
const TableCellTitleContext = createContext(null);
|
|
10
10
|
const TableCellTitle = (props) => {
|
|
11
11
|
const {
|
package/dist/dashboard/table.mjs
CHANGED
|
@@ -4,22 +4,22 @@ import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-tabl
|
|
|
4
4
|
import { useQueryClient } from "@tanstack/react-query";
|
|
5
5
|
import { formatDateString } from "@drawbridge/drawbridge-utils";
|
|
6
6
|
import { request } from "@drawbridge/drawbridge-utils/fetch";
|
|
7
|
-
import Link from "./link";
|
|
7
|
+
import Link from "./link.mjs";
|
|
8
8
|
import { forwardRef, useMemo } from "react";
|
|
9
|
-
import { useModal } from "./lib/hooks";
|
|
10
|
-
import { iconLabel } from "../shared/lib/icon-labels";
|
|
11
|
-
import BarsArrowDown from "../icons/bars-arrow-down";
|
|
12
|
-
import BarsArrowUp from "../icons/bars-arrow-up";
|
|
13
|
-
import Badge from "../shared/badge";
|
|
14
|
-
import Button from "../shared/button";
|
|
15
|
-
import CopyToClipboard from "../shared/copy-to-clipboard";
|
|
16
|
-
import { TableCellTitleContext } from "./table-cell-title";
|
|
17
|
-
import Progress from "../shared/progress";
|
|
18
|
-
import Dropdown from "./dropdown";
|
|
19
|
-
import FormAction from "./form-action";
|
|
20
|
-
import Warning from "../icons/warning";
|
|
21
|
-
import Tooltip from "../shared/tooltip";
|
|
22
|
-
import { useWrapperGradient } from "../wrapper-gradient";
|
|
9
|
+
import { useModal } from "./lib/hooks.mjs";
|
|
10
|
+
import { iconLabel } from "../shared/lib/icon-labels.mjs";
|
|
11
|
+
import BarsArrowDown from "../icons/bars-arrow-down.mjs";
|
|
12
|
+
import BarsArrowUp from "../icons/bars-arrow-up.mjs";
|
|
13
|
+
import Badge from "../shared/badge.mjs";
|
|
14
|
+
import Button from "../shared/button.mjs";
|
|
15
|
+
import CopyToClipboard from "../shared/copy-to-clipboard.mjs";
|
|
16
|
+
import { TableCellTitleContext } from "./table-cell-title.mjs";
|
|
17
|
+
import Progress from "../shared/progress.mjs";
|
|
18
|
+
import Dropdown from "./dropdown.mjs";
|
|
19
|
+
import FormAction from "./form-action.mjs";
|
|
20
|
+
import Warning from "../icons/warning.mjs";
|
|
21
|
+
import Tooltip from "../shared/tooltip.mjs";
|
|
22
|
+
import { useWrapperGradient } from "../wrapper-gradient.mjs";
|
|
23
23
|
const STICKY_ACTIONS_FADE_BASE = "before:content-[''] before:absolute before:right-full before:top-0 before:bottom-0 before:w-8 before:bg-gradient-to-l before:from-30% before:to-transparent before:pointer-events-none";
|
|
24
24
|
const STICKY_ACTIONS_FADE_BODY = STICKY_ACTIONS_FADE_BASE + " before:from-white";
|
|
25
25
|
const STICKY_ACTIONS_FADE_HEADER = STICKY_ACTIONS_FADE_BASE + " before:from-gray-light";
|
|
@@ -3,20 +3,20 @@ import { isValidElement, useState } from "react";
|
|
|
3
3
|
import { keepPreviousData, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { notFound } from "next/navigation";
|
|
5
5
|
import { isTransientError } from "@drawbridge/drawbridge-utils/fetch";
|
|
6
|
-
import { useDrawer } from "./lib/hooks";
|
|
7
|
-
import { iconLabel } from "../shared/lib/icon-labels";
|
|
8
|
-
import ProviderResource from "./provider-resource";
|
|
9
|
-
import ArrowRight from "../icons/arrow-right";
|
|
10
|
-
import LoaderIcon from "../icons/loader";
|
|
11
|
-
import Refresh from "../icons/refresh";
|
|
12
|
-
import Empty from "../shared/empty";
|
|
13
|
-
import Badge from "../shared/badge";
|
|
14
|
-
import Button from "../shared/button";
|
|
15
|
-
import List from "./list";
|
|
16
|
-
import LinkBack from "./link-back";
|
|
17
|
-
import WrapperGradient from "../wrapper-gradient";
|
|
6
|
+
import { useDrawer } from "./lib/hooks.mjs";
|
|
7
|
+
import { iconLabel } from "../shared/lib/icon-labels.mjs";
|
|
8
|
+
import ProviderResource from "./provider-resource.mjs";
|
|
9
|
+
import ArrowRight from "../icons/arrow-right.mjs";
|
|
10
|
+
import LoaderIcon from "../icons/loader.mjs";
|
|
11
|
+
import Refresh from "../icons/refresh.mjs";
|
|
12
|
+
import Empty from "../shared/empty.mjs";
|
|
13
|
+
import Badge from "../shared/badge.mjs";
|
|
14
|
+
import Button from "../shared/button.mjs";
|
|
15
|
+
import List from "./list.mjs";
|
|
16
|
+
import LinkBack from "./link-back.mjs";
|
|
17
|
+
import WrapperGradient from "../wrapper-gradient.mjs";
|
|
18
18
|
import Image from "next/image";
|
|
19
|
-
import Link from "./link";
|
|
19
|
+
import Link from "./link.mjs";
|
|
20
20
|
const Refetch = ({
|
|
21
21
|
invalidate = []
|
|
22
22
|
}) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import LogoMark from "../icons/logo-mark";
|
|
4
|
-
import Link from "./link";
|
|
5
|
-
import Button from "../shared/button";
|
|
3
|
+
import LogoMark from "../icons/logo-mark.mjs";
|
|
4
|
+
import Link from "./link.mjs";
|
|
5
|
+
import Button from "../shared/button.mjs";
|
|
6
6
|
const TemplateNotFound = ({
|
|
7
7
|
button = "Back to organizations",
|
|
8
8
|
href = "/organizations",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useParams } from "next/navigation";
|
|
4
4
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
5
|
-
import { useSocketRoom } from "./lib/hooks";
|
|
6
|
-
import { isAdmin } from "../shared/lib/helpers";
|
|
7
|
-
import TemplateSuspended from "./template-suspended";
|
|
5
|
+
import { useSocketRoom } from "./lib/hooks.mjs";
|
|
6
|
+
import { isAdmin } from "../shared/lib/helpers.mjs";
|
|
7
|
+
import TemplateSuspended from "./template-suspended.mjs";
|
|
8
8
|
const TemplateSocketAccount = ({
|
|
9
9
|
children
|
|
10
10
|
}) => {
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { useRouter } from "next/navigation";
|
|
5
5
|
import { useQueryClient } from "@tanstack/react-query";
|
|
6
|
-
import { useModal } from "./lib/hooks";
|
|
6
|
+
import { useModal } from "./lib/hooks.mjs";
|
|
7
7
|
const suspension = {
|
|
8
8
|
message: /* @__PURE__ */ jsxs(
|
|
9
9
|
"div",
|
|
@@ -228,7 +228,10 @@ const TemplateUiHeader = ({
|
|
|
228
228
|
const TemplateUiBand = ({
|
|
229
229
|
record
|
|
230
230
|
}) => {
|
|
231
|
-
const alert = (0, import_helpers.alertFor)(
|
|
231
|
+
const alert = (0, import_helpers.alertFor)({
|
|
232
|
+
error: record == null ? void 0 : record.error,
|
|
233
|
+
status: record == null ? void 0 : record.status
|
|
234
|
+
});
|
|
232
235
|
if (!alert) return null;
|
|
233
236
|
const { icon: Icon, message } = alert;
|
|
234
237
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -3,18 +3,18 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Fragment, useContext, useMemo, useState } from "react";
|
|
4
4
|
import { useParams, usePathname } from "next/navigation";
|
|
5
5
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
|
-
import { useModal } from "./lib/hooks";
|
|
7
|
-
import WrapperGradient from "../wrapper-gradient";
|
|
8
|
-
import Guide from "./guide";
|
|
9
|
-
import { MenuAccount, MenuAccountDropdown, MenuAdmin, MenuApp, MenuCampaign, MenuOrganization } from "./menu";
|
|
10
|
-
import MenuIcon from "../icons/menu";
|
|
11
|
-
import Switch from "../icons/switch";
|
|
12
|
-
import Times from "../icons/times";
|
|
13
|
-
import Link from "./link";
|
|
14
|
-
import ArrowLeft from "../icons/arrow-left";
|
|
15
|
-
import Button from "../shared/button";
|
|
16
|
-
import { FormScope } from "../shared/lib/form";
|
|
17
|
-
import { alertFor } from "../shared/lib/helpers";
|
|
6
|
+
import { useModal } from "./lib/hooks.mjs";
|
|
7
|
+
import WrapperGradient from "../wrapper-gradient.mjs";
|
|
8
|
+
import Guide from "./guide.mjs";
|
|
9
|
+
import { MenuAccount, MenuAccountDropdown, MenuAdmin, MenuApp, MenuCampaign, MenuOrganization } from "./menu.mjs";
|
|
10
|
+
import MenuIcon from "../icons/menu.mjs";
|
|
11
|
+
import Switch from "../icons/switch.mjs";
|
|
12
|
+
import Times from "../icons/times.mjs";
|
|
13
|
+
import Link from "./link.mjs";
|
|
14
|
+
import ArrowLeft from "../icons/arrow-left.mjs";
|
|
15
|
+
import Button from "../shared/button.mjs";
|
|
16
|
+
import { FormScope } from "../shared/lib/form.mjs";
|
|
17
|
+
import { alertFor } from "../shared/lib/helpers.mjs";
|
|
18
18
|
const offsets = {
|
|
19
19
|
header: "h-16 md:h-20",
|
|
20
20
|
paddingTop: "pt-16 md:pt-0"
|
|
@@ -196,7 +196,10 @@ const TemplateUiHeader = ({
|
|
|
196
196
|
const TemplateUiBand = ({
|
|
197
197
|
record
|
|
198
198
|
}) => {
|
|
199
|
-
const alert = alertFor(
|
|
199
|
+
const alert = alertFor({
|
|
200
|
+
error: record == null ? void 0 : record.error,
|
|
201
|
+
status: record == null ? void 0 : record.status
|
|
202
|
+
});
|
|
200
203
|
if (!alert) return null;
|
|
201
204
|
const { icon: Icon, message } = alert;
|
|
202
205
|
return /* @__PURE__ */ jsxs(
|