@the-portland-company/shell 0.30.0 → 0.32.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/CHANGELOG.md +52 -0
- package/README.md +26 -0
- package/dist/app-chrome.cjs +137 -65
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +37 -8
- package/dist/app-chrome.d.ts +37 -8
- package/dist/app-chrome.js +37 -11
- package/dist/app-chrome.js.map +1 -1
- package/dist/{chunk-QL5BWYN5.js → chunk-FF6RDQY7.js} +105 -59
- package/dist/chunk-FF6RDQY7.js.map +1 -0
- package/dist/native.cjs +103 -56
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +50 -7
- package/dist/native.d.ts +50 -7
- package/dist/native.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-QL5BWYN5.js.map +0 -1
|
@@ -678,6 +678,21 @@ function useThemePreference() {
|
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
// src/native/standardNav.ts
|
|
681
|
+
var CAMPAIGN_FEATURE_AVAILABILITY = {
|
|
682
|
+
a2p: false,
|
|
683
|
+
phonebank: false,
|
|
684
|
+
canvass: false,
|
|
685
|
+
signs: false,
|
|
686
|
+
tribes: true,
|
|
687
|
+
polling: true
|
|
688
|
+
};
|
|
689
|
+
var A2P_ORIGIN = "https://a2p.politogyvrm.com/";
|
|
690
|
+
var PHONEBANK_ORIGIN = "https://phonebank.politogyvrm.com/";
|
|
691
|
+
var CANVASS_ORIGIN = "https://canvass.politogyvrm.com/";
|
|
692
|
+
var SIGNS_ORIGIN = "https://signs.politogyvrm.com/";
|
|
693
|
+
var POLLS_ORIGIN = "https://polls.politogyvrm.com/";
|
|
694
|
+
var CONTACTS_TRIBES = "https://contacts.politogyvrm.com/tribes";
|
|
695
|
+
var PETITION_MODE_ORIGIN = "https://petition-mode.politogyvrm.com/";
|
|
681
696
|
var CONTACTS_DEFAULT_CHILDREN = [
|
|
682
697
|
{ label: "Dashboard", icon: "grid", path: "/relationship/contacts/dashboard" },
|
|
683
698
|
{ label: "All Contacts", icon: "list", path: "/relationship/contacts/all" },
|
|
@@ -728,7 +743,9 @@ var APP_FORMS_CHILDREN = [
|
|
|
728
743
|
{ label: "Submissions", icon: "fileText", href: "https://forms.politogyvrm.com/?tab=submissions" }
|
|
729
744
|
];
|
|
730
745
|
var APP_SURVEYS_CHILDREN = [
|
|
731
|
-
{ label: "Surveys", icon: "list", href: "https://surveys.politogyvrm.com/surveys" }
|
|
746
|
+
{ label: "Surveys", icon: "list", href: "https://surveys.politogyvrm.com/surveys" },
|
|
747
|
+
{ label: "Canvas", icon: "edit", href: "https://surveys.politogyvrm.com/surveys?view=canvas" },
|
|
748
|
+
{ label: "Results", icon: "barChart", href: "https://surveys.politogyvrm.com/surveys?view=results" }
|
|
732
749
|
];
|
|
733
750
|
var APP_POLLS_CHILDREN = [
|
|
734
751
|
{ label: "Command Center", icon: "grid", href: "https://polls.politogyvrm.com/" },
|
|
@@ -745,59 +762,85 @@ function standardPolitogyNav(opts) {
|
|
|
745
762
|
href: abs(c.path),
|
|
746
763
|
children: c.children ? leaves(c.children) : void 0
|
|
747
764
|
}));
|
|
748
|
-
const
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
765
|
+
const orgParam = opts.activeOrgId ? `org=${opts.activeOrgId.slice(-6)}` : "";
|
|
766
|
+
const withOrg = (url) => orgParam ? `${url}${url.includes("?") ? "&" : "?"}${orgParam}` : url;
|
|
767
|
+
const buildRelationship = () => {
|
|
768
|
+
const contacts = opts.contactsItem ? {
|
|
769
|
+
label: "Contacts",
|
|
770
|
+
icon: icon("users"),
|
|
771
|
+
href: opts.contactsItem.href,
|
|
772
|
+
children: opts.contactsItem.children
|
|
773
|
+
} : {
|
|
774
|
+
label: "Contacts",
|
|
775
|
+
icon: icon("users"),
|
|
776
|
+
href: abs("/relationship/contacts/dashboard"),
|
|
777
|
+
children: leaves(CONTACTS_DEFAULT_CHILDREN)
|
|
778
|
+
};
|
|
779
|
+
return [
|
|
780
|
+
{ label: "Dashboard", icon: icon("home"), href: abs("/relationship/dashboard") },
|
|
781
|
+
contacts,
|
|
782
|
+
{
|
|
783
|
+
label: "Email Broadcast",
|
|
784
|
+
icon: icon("mail"),
|
|
785
|
+
href: abs("/relationship/email/dashboard"),
|
|
786
|
+
children: leaves(EMAIL_CHILDREN)
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
label: "SMS/MMS Blast",
|
|
790
|
+
icon: icon("messageSquare"),
|
|
791
|
+
href: abs("/relationship/sms-mms-blast/dashboard"),
|
|
792
|
+
children: leaves(SMS_CHILDREN)
|
|
793
|
+
},
|
|
794
|
+
// These two carry no top-level href in VRM core (parent row only toggles).
|
|
795
|
+
{ label: "Calls to Action", icon: icon("layout"), children: leaves(CTA_CHILDREN) },
|
|
796
|
+
{
|
|
797
|
+
label: "Forms",
|
|
798
|
+
icon: icon("activity"),
|
|
799
|
+
href: "https://forms.politogyvrm.com/",
|
|
800
|
+
children: APP_FORMS_CHILDREN.map((c) => ({ label: c.label, icon: icon(c.icon), href: c.href }))
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
label: "Surveys",
|
|
804
|
+
icon: icon("fileText"),
|
|
805
|
+
href: "https://surveys.politogyvrm.com/surveys",
|
|
806
|
+
children: APP_SURVEYS_CHILDREN.map((c) => ({ label: c.label, icon: icon(c.icon), href: c.href }))
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
label: "Polls",
|
|
810
|
+
icon: icon("barChart"),
|
|
811
|
+
href: "https://polls.politogyvrm.com/",
|
|
812
|
+
children: APP_POLLS_CHILDREN.map((c) => ({ label: c.label, icon: icon(c.icon), href: c.href }))
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
label: "Organization Settings",
|
|
816
|
+
icon: icon("briefcase"),
|
|
817
|
+
href: abs("/organization-settings"),
|
|
818
|
+
children: branches(ORG_SETTINGS_CHILDREN)
|
|
819
|
+
}
|
|
820
|
+
];
|
|
758
821
|
};
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
href: abs("/
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
label: "
|
|
770
|
-
icon: icon("
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
icon: icon("activity"),
|
|
779
|
-
href: "https://forms.politogyvrm.com/",
|
|
780
|
-
children: APP_FORMS_CHILDREN.map((c) => ({ label: c.label, icon: icon(c.icon), href: c.href }))
|
|
781
|
-
},
|
|
782
|
-
{
|
|
783
|
-
label: "Surveys",
|
|
784
|
-
icon: icon("fileText"),
|
|
785
|
-
href: "https://surveys.politogyvrm.com/surveys",
|
|
786
|
-
children: APP_SURVEYS_CHILDREN.map((c) => ({ label: c.label, icon: icon(c.icon), href: c.href }))
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
label: "Polls",
|
|
790
|
-
icon: icon("barChart"),
|
|
791
|
-
href: "https://polls.politogyvrm.com/",
|
|
792
|
-
children: APP_POLLS_CHILDREN.map((c) => ({ label: c.label, icon: icon(c.icon), href: c.href }))
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
label: "Organization Settings",
|
|
796
|
-
icon: icon("briefcase"),
|
|
797
|
-
href: abs("/organization-settings"),
|
|
798
|
-
children: branches(ORG_SETTINGS_CHILDREN)
|
|
799
|
-
}
|
|
822
|
+
const buildCampaign = () => {
|
|
823
|
+
const avail = {
|
|
824
|
+
...CAMPAIGN_FEATURE_AVAILABILITY,
|
|
825
|
+
...opts.campaignAvailability
|
|
826
|
+
};
|
|
827
|
+
const rows = [
|
|
828
|
+
{ label: "Dashboard", icon: icon("home"), href: withOrg(abs("/campaign/dashboard")) },
|
|
829
|
+
{ label: "Voter Contact", icon: icon("target"), href: withOrg(abs("/campaign/campaigns")) },
|
|
830
|
+
{ label: "A2P", icon: icon("messageSquare"), href: withOrg(A2P_ORIGIN), flag: "a2p" },
|
|
831
|
+
{ label: "Phone Banking", icon: icon("phone"), href: withOrg(PHONEBANK_ORIGIN), flag: "phonebank" },
|
|
832
|
+
{ label: "Field Canvassing", icon: icon("map"), href: withOrg(CANVASS_ORIGIN), flag: "canvass" },
|
|
833
|
+
{ label: "Sign Mapping", icon: icon("mapPin"), href: withOrg(SIGNS_ORIGIN), flag: "signs" },
|
|
834
|
+
{ label: "Tribes", icon: icon("users"), href: withOrg(CONTACTS_TRIBES), flag: "tribes" },
|
|
835
|
+
{ label: "Polling Engine", icon: icon("barChart"), href: withOrg(POLLS_ORIGIN), flag: "polling" }
|
|
836
|
+
];
|
|
837
|
+
return rows.filter((r) => !r.flag || avail[r.flag]).map(({ flag: _flag, ...item }) => item);
|
|
838
|
+
};
|
|
839
|
+
const buildPetition = () => [
|
|
840
|
+
{ label: "Dashboard", icon: icon("home"), href: withOrg(PETITION_MODE_ORIGIN) }
|
|
800
841
|
];
|
|
842
|
+
const mode = opts.mode ?? "relationship";
|
|
843
|
+
const items = mode === "campaign" ? buildCampaign() : mode === "petition" ? buildPetition() : buildRelationship();
|
|
801
844
|
if (opts.supportItem) {
|
|
802
845
|
items.push({
|
|
803
846
|
label: "Support",
|
|
@@ -1796,9 +1839,12 @@ function NavBetaBanner({ text, linkLabel, href }) {
|
|
|
1796
1839
|
role: "note",
|
|
1797
1840
|
className: "w-full border-y px-4 py-2 text-center text-sm",
|
|
1798
1841
|
style: {
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1842
|
+
// Warning amber with a darker border + text (HITL 2026-07-23). The
|
|
1843
|
+
// --beta-banner-* tokens were never emitted, so the fallbacks are the
|
|
1844
|
+
// real values: amber-100 fill, amber-500 border, amber-900 text.
|
|
1845
|
+
background: "var(--beta-banner-bg, #FEF3C7)",
|
|
1846
|
+
borderColor: "var(--beta-banner-border, #F59E0B)",
|
|
1847
|
+
color: "var(--beta-banner-text, #78350F)"
|
|
1802
1848
|
},
|
|
1803
1849
|
children: [
|
|
1804
1850
|
/* @__PURE__ */ jsx("span", { children: body }),
|
|
@@ -1809,7 +1855,7 @@ function NavBetaBanner({ text, linkLabel, href }) {
|
|
|
1809
1855
|
target: "_blank",
|
|
1810
1856
|
rel: "noreferrer",
|
|
1811
1857
|
className: "font-bold underline",
|
|
1812
|
-
style: { color: "var(--beta-banner-text)" },
|
|
1858
|
+
style: { color: "var(--beta-banner-text, #78350F)" },
|
|
1813
1859
|
children: label
|
|
1814
1860
|
}
|
|
1815
1861
|
)
|
|
@@ -1854,6 +1900,6 @@ function NavAppShell({
|
|
|
1854
1900
|
] });
|
|
1855
1901
|
}
|
|
1856
1902
|
|
|
1857
|
-
export { FuelAction, NavAppShell, NavBetaBanner, NavChromeProvider, NavDisplayAction, NavSidebar, NavTabStrip, NavThemeControl, NavTopBar, NotificationsAction, SupportAction, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, envChipClasses, isNavItemActive, standardPolitogyNav, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeFetcher, useThemePreference };
|
|
1858
|
-
//# sourceMappingURL=chunk-
|
|
1859
|
-
//# sourceMappingURL=chunk-
|
|
1903
|
+
export { CAMPAIGN_FEATURE_AVAILABILITY, FuelAction, NavAppShell, NavBetaBanner, NavChromeProvider, NavDisplayAction, NavSidebar, NavTabStrip, NavThemeControl, NavTopBar, NotificationsAction, SupportAction, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, envChipClasses, isNavItemActive, standardPolitogyNav, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeFetcher, useThemePreference };
|
|
1904
|
+
//# sourceMappingURL=chunk-FF6RDQY7.js.map
|
|
1905
|
+
//# sourceMappingURL=chunk-FF6RDQY7.js.map
|