@the-portland-company/shell 0.35.2 → 0.35.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/app-chrome.cjs +70 -10
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.js +1 -1
- package/dist/chrome.css +40 -0
- package/dist/{chunk-HCJVMFLL.js → chunk-HZXYGEEA.js} +72 -12
- package/dist/chunk-HZXYGEEA.js.map +1 -0
- package/dist/native.cjs +70 -10
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +4 -13
- package/dist/native.d.ts +4 -13
- package/dist/native.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-HCJVMFLL.js.map +0 -1
package/dist/app-chrome.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { standardPolitogyNav, NavAppShell, NavChromeProvider, FuelAction, NavDisplayAction, TopBarWidgetSlot, SupportAction, NotificationsAction, useChromeMe, useThemePreference, useNavChromeFetcher, useChromeOrgs } from './chunk-
|
|
2
|
+
import { standardPolitogyNav, NavAppShell, NavChromeProvider, FuelAction, NavDisplayAction, TopBarWidgetSlot, SupportAction, NotificationsAction, useChromeMe, useThemePreference, useNavChromeFetcher, useChromeOrgs } from './chunk-HZXYGEEA.js';
|
|
3
3
|
import './chunk-LL7RCJQN.js';
|
|
4
4
|
import { createContext, useMemo, useContext, useState, useEffect, useCallback } from 'react';
|
|
5
5
|
import { DevNotesMenu, createDevNotesClient, DevNotesProvider, DevNotesTaskListModal, DevNotesOverlay } from '@the-portland-company/devnotes';
|
package/dist/chrome.css
CHANGED
|
@@ -322,3 +322,43 @@
|
|
|
322
322
|
--skeleton-base: #212121;
|
|
323
323
|
--skeleton-shine: #2B2B2B;
|
|
324
324
|
}
|
|
325
|
+
|
|
326
|
+
/* ---------------------------------------------------------------------------
|
|
327
|
+
Third-party top-bar widget slots (<TopBarWidgetSlot>, e.g. DevNotes).
|
|
328
|
+
|
|
329
|
+
Such a widget ships its OWN launcher button, so it does not carry
|
|
330
|
+
topBarIconButtonClass and rendered as a 6px rounded square beside four 32px
|
|
331
|
+
circles — measured on forms, contacts, polls, surveys AND app (2026-07-24).
|
|
332
|
+
VRM core used to hide it with an app-side `.vrm-topbar-actions` override,
|
|
333
|
+
which is precisely the app-side patching Reference/UI-Platform forbids: the
|
|
334
|
+
moment VRM moved onto the shared frame the override went away and the square
|
|
335
|
+
button reappeared. It belongs here, once, for every app.
|
|
336
|
+
|
|
337
|
+
These values are topBarIconButtonClass expressed as CSS. `!important` is
|
|
338
|
+
required because the widget's own utility classes (h-8 w-8 rounded-md …) are
|
|
339
|
+
authored by the third-party package and would otherwise win.
|
|
340
|
+
--------------------------------------------------------------------------- */
|
|
341
|
+
.topbar-widget-slot button {
|
|
342
|
+
height: var(--topbar-icon-button-size, 32px) !important;
|
|
343
|
+
min-height: var(--topbar-icon-button-size, 32px) !important;
|
|
344
|
+
width: var(--topbar-icon-button-size, 32px) !important;
|
|
345
|
+
min-width: var(--topbar-icon-button-size, 32px) !important;
|
|
346
|
+
padding: 0 !important;
|
|
347
|
+
display: inline-flex !important;
|
|
348
|
+
align-items: center !important;
|
|
349
|
+
justify-content: center !important;
|
|
350
|
+
border: 1px solid var(--line) !important;
|
|
351
|
+
border-radius: 9999px !important;
|
|
352
|
+
background: transparent !important;
|
|
353
|
+
color: var(--topbar-icon-color, var(--muted)) !important;
|
|
354
|
+
}
|
|
355
|
+
.topbar-widget-slot button:hover {
|
|
356
|
+
color: var(--topbar-icon-hover-color, var(--foreground)) !important;
|
|
357
|
+
background: var(--topbar-icon-hover-bg, transparent) !important;
|
|
358
|
+
}
|
|
359
|
+
/* The launcher's own count bubble nests in an inner `relative` span around just
|
|
360
|
+
the glyph. Neutralize that so the badge anchors to the 32px trigger like
|
|
361
|
+
every other slot's (UI-Platform "Badge Counters": one universal placement). */
|
|
362
|
+
.topbar-widget-slot button > span.relative {
|
|
363
|
+
position: static !important;
|
|
364
|
+
}
|
|
@@ -1192,10 +1192,10 @@ function useThemePreference() {
|
|
|
1192
1192
|
|
|
1193
1193
|
// src/native/standardNav.ts
|
|
1194
1194
|
var CAMPAIGN_FEATURE_AVAILABILITY = {
|
|
1195
|
-
a2p:
|
|
1196
|
-
phonebank:
|
|
1197
|
-
canvass:
|
|
1198
|
-
signs:
|
|
1195
|
+
a2p: true,
|
|
1196
|
+
phonebank: true,
|
|
1197
|
+
canvass: true,
|
|
1198
|
+
signs: true,
|
|
1199
1199
|
tribes: true,
|
|
1200
1200
|
polling: true
|
|
1201
1201
|
};
|
|
@@ -1264,6 +1264,32 @@ var APP_POLLS_CHILDREN = [
|
|
|
1264
1264
|
{ label: "Command Center", icon: "grid", href: "https://polls.politogyvrm.com/" },
|
|
1265
1265
|
{ label: "New Poll", icon: "edit", href: "https://polls.politogyvrm.com/polls/new" }
|
|
1266
1266
|
];
|
|
1267
|
+
var APP_A2P_CHILDREN = [
|
|
1268
|
+
{ label: "Dashboard", icon: "grid", path: "dashboard" },
|
|
1269
|
+
{ label: "Compose", icon: "edit", path: "compose" },
|
|
1270
|
+
{ label: "Recipients", icon: "user", path: "recipients" },
|
|
1271
|
+
{ label: "Tech Check", icon: "activity", path: "tech-check" },
|
|
1272
|
+
{ label: "Status", icon: "clock", path: "status" },
|
|
1273
|
+
{ label: "Conversations", icon: "messageSquare", path: "conversations" }
|
|
1274
|
+
];
|
|
1275
|
+
var APP_PHONEBANK_CHILDREN = [
|
|
1276
|
+
{ label: "Dashboard", icon: "grid", path: "" },
|
|
1277
|
+
{ label: "Campaigns", icon: "phone", path: "campaigns" },
|
|
1278
|
+
{ label: "Inbound", icon: "messageSquare", path: "inbound" },
|
|
1279
|
+
{ label: "Reports", icon: "barChart", path: "reports" }
|
|
1280
|
+
];
|
|
1281
|
+
var APP_CANVASS_CHILDREN = [
|
|
1282
|
+
{ label: "Dashboard", icon: "grid", path: "" },
|
|
1283
|
+
{ label: "Campaigns", icon: "target", path: "campaigns" },
|
|
1284
|
+
{ label: "Canvassers", icon: "users", path: "canvassers" }
|
|
1285
|
+
];
|
|
1286
|
+
var APP_SIGNS_CHILDREN = [
|
|
1287
|
+
{ label: "Map", icon: "map", path: "" },
|
|
1288
|
+
{ label: "Placements", icon: "list", path: "placements" },
|
|
1289
|
+
{ label: "Review Queue", icon: "fileText", path: "review" },
|
|
1290
|
+
{ label: "Recovery", icon: "flag", path: "recovery" },
|
|
1291
|
+
{ label: "Reports", icon: "barChart", path: "reports" }
|
|
1292
|
+
];
|
|
1267
1293
|
function standardPolitogyNav(opts) {
|
|
1268
1294
|
const base = opts.coreBaseUrl.replace(/\/+$/, "");
|
|
1269
1295
|
const abs = (path) => `${base}${path.startsWith("/") ? path : `/${path}`}`;
|
|
@@ -1337,13 +1363,45 @@ function standardPolitogyNav(opts) {
|
|
|
1337
1363
|
...CAMPAIGN_FEATURE_AVAILABILITY,
|
|
1338
1364
|
...opts.campaignAvailability
|
|
1339
1365
|
};
|
|
1366
|
+
const appLeaves = (origin, children) => {
|
|
1367
|
+
const base2 = origin.replace(/\/+$/, "");
|
|
1368
|
+
return children.map((c) => ({
|
|
1369
|
+
label: c.label,
|
|
1370
|
+
icon: icon(c.icon),
|
|
1371
|
+
href: withOrg(c.path ? `${base2}/${c.path}` : `${base2}/`)
|
|
1372
|
+
}));
|
|
1373
|
+
};
|
|
1340
1374
|
const rows = [
|
|
1341
1375
|
{ label: "Dashboard", icon: icon("home"), href: withOrg(abs("/campaign/dashboard")) },
|
|
1342
1376
|
{ label: "Voter Contact", icon: icon("target"), href: withOrg(abs("/campaign/campaigns")) },
|
|
1343
|
-
{
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1377
|
+
{
|
|
1378
|
+
label: "A2P",
|
|
1379
|
+
icon: icon("messageSquare"),
|
|
1380
|
+
href: withOrg(A2P_ORIGIN),
|
|
1381
|
+
children: appLeaves(A2P_ORIGIN, APP_A2P_CHILDREN),
|
|
1382
|
+
flag: "a2p"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
label: "Phone Banking",
|
|
1386
|
+
icon: icon("phone"),
|
|
1387
|
+
href: withOrg(PHONEBANK_ORIGIN),
|
|
1388
|
+
children: appLeaves(PHONEBANK_ORIGIN, APP_PHONEBANK_CHILDREN),
|
|
1389
|
+
flag: "phonebank"
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
label: "Field Canvassing",
|
|
1393
|
+
icon: icon("map"),
|
|
1394
|
+
href: withOrg(CANVASS_ORIGIN),
|
|
1395
|
+
children: appLeaves(CANVASS_ORIGIN, APP_CANVASS_CHILDREN),
|
|
1396
|
+
flag: "canvass"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
label: "Sign Mapping",
|
|
1400
|
+
icon: icon("mapPin"),
|
|
1401
|
+
href: withOrg(SIGNS_ORIGIN),
|
|
1402
|
+
children: appLeaves(SIGNS_ORIGIN, APP_SIGNS_CHILDREN),
|
|
1403
|
+
flag: "signs"
|
|
1404
|
+
},
|
|
1347
1405
|
{ label: "Tribes", icon: icon("users"), href: withOrg(CONTACTS_TRIBES), flag: "tribes" },
|
|
1348
1406
|
{ label: "Polling Engine", icon: icon("barChart"), href: withOrg(POLLS_ORIGIN), flag: "polling" }
|
|
1349
1407
|
];
|
|
@@ -1366,6 +1424,7 @@ function standardPolitogyNav(opts) {
|
|
|
1366
1424
|
}
|
|
1367
1425
|
var safeHref = (h) => h && /^(https?:|mailto:|tel:|\/|#|\.)/i.test(h.trim()) ? h : "#";
|
|
1368
1426
|
var DefaultLink = ({ href, children, ...rest }) => /* @__PURE__ */ jsx("a", { href: safeHref(href), ...rest, children });
|
|
1427
|
+
var ACTIVE_IGNORED_PARAMS = /* @__PURE__ */ new Set(["org"]);
|
|
1369
1428
|
function isNavItemActive(pathname, href) {
|
|
1370
1429
|
let targetPath = href;
|
|
1371
1430
|
let targetSearch = "";
|
|
@@ -1386,10 +1445,11 @@ function isNavItemActive(pathname, href) {
|
|
|
1386
1445
|
targetSearch = href.slice(qi);
|
|
1387
1446
|
}
|
|
1388
1447
|
}
|
|
1389
|
-
|
|
1448
|
+
const want = new URLSearchParams(targetSearch);
|
|
1449
|
+
for (const k of ACTIVE_IGNORED_PARAMS) want.delete(k);
|
|
1450
|
+
if (Array.from(want).length > 0) {
|
|
1390
1451
|
if (typeof window === "undefined") return false;
|
|
1391
1452
|
if (pathname !== targetPath) return false;
|
|
1392
|
-
const want = new URLSearchParams(targetSearch);
|
|
1393
1453
|
const have = new URLSearchParams(window.location.search);
|
|
1394
1454
|
for (const [k, v] of want) if (have.get(k) !== v) return false;
|
|
1395
1455
|
return true;
|
|
@@ -2429,5 +2489,5 @@ function NavAppShell({
|
|
|
2429
2489
|
}
|
|
2430
2490
|
|
|
2431
2491
|
export { CAMPAIGN_FEATURE_AVAILABILITY, CORE_APP_ORIGIN, CORE_BILLING_PATH, FuelAction, NavAppShell, NavBetaBanner, NavChromeProvider, NavDisplayAction, NavSidebar, NavTabStrip, NavThemeControl, NavTopBar, NotificationsAction, SupportAction, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, envChipClasses, isNavItemActive, standardPolitogyNav, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeFetcher, useThemePreference };
|
|
2432
|
-
//# sourceMappingURL=chunk-
|
|
2433
|
-
//# sourceMappingURL=chunk-
|
|
2492
|
+
//# sourceMappingURL=chunk-HZXYGEEA.js.map
|
|
2493
|
+
//# sourceMappingURL=chunk-HZXYGEEA.js.map
|