@drawbridge/components 0.1.34 → 0.1.35
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/components/styles.css +68 -355
- package/dist/advertisement.js +15 -20
- package/dist/advertisement.mjs +15 -20
- package/dist/bridge/advertisements.js +4 -2
- package/dist/bridge/advertisements.mjs +5 -3
- package/dist/bridge/fields.js +89 -6
- package/dist/bridge/fields.mjs +89 -7
- package/dist/bridge/form-subdomain-agreement.js +165 -0
- package/dist/bridge/form-subdomain-agreement.mjs +132 -0
- package/dist/bridge/form-subdomain-embed.js +5 -1
- package/dist/bridge/form-subdomain-embed.mjs +5 -1
- package/dist/bridge/form-subdomain-header.js +21 -14
- package/dist/bridge/form-subdomain-header.mjs +20 -14
- package/dist/bridge/form-subdomain-issue.js +17 -8
- package/dist/bridge/form-subdomain-issue.mjs +17 -8
- package/dist/bridge/form-subdomain-missions.js +58 -52
- package/dist/bridge/form-subdomain-missions.mjs +60 -54
- package/dist/bridge/form-subdomain.js +223 -94
- package/dist/bridge/form-subdomain.mjs +222 -96
- package/dist/bridge/lib/entry.js +61 -6
- package/dist/bridge/lib/entry.mjs +51 -5
- package/dist/bridge/lib/order.js +23 -0
- package/dist/bridge/lib/order.mjs +20 -0
- package/dist/bridge/template-layout.js +5 -2
- package/dist/bridge/template-layout.mjs +6 -3
- package/dist/bridge/template-modal.js +82 -15
- package/dist/bridge/template-modal.mjs +83 -16
- package/dist/bridge/template-subdomain-gallery.js +126 -75
- package/dist/bridge/template-subdomain-gallery.mjs +122 -75
- package/dist/bridge/template-subdomain.js +16 -14
- package/dist/bridge/template-subdomain.mjs +17 -15
- package/dist/dashboard/avatar.js +5 -0
- package/dist/dashboard/avatar.mjs +5 -0
- package/dist/dashboard/campaign-form.js +1798 -0
- package/dist/dashboard/campaign-form.mjs +1769 -0
- package/dist/dashboard/card-affiliate.js +3 -2
- package/dist/dashboard/card-affiliate.mjs +3 -2
- package/dist/dashboard/card-campaign-agreement.js +172 -0
- package/dist/dashboard/card-campaign-agreement.mjs +139 -0
- package/dist/dashboard/card-campaign-switch.js +34 -9
- package/dist/dashboard/card-campaign-switch.mjs +32 -8
- package/dist/dashboard/card-order.js +6 -14
- package/dist/dashboard/card-order.mjs +6 -14
- package/dist/dashboard/card-section.js +69 -26
- package/dist/dashboard/card-section.mjs +65 -26
- package/dist/dashboard/card-shortcut.js +181 -0
- package/dist/dashboard/card-shortcut.mjs +152 -0
- package/dist/dashboard/card-tile.js +3 -35
- package/dist/dashboard/card-tile.mjs +3 -34
- package/dist/dashboard/document-blocks.js +305 -0
- package/dist/dashboard/document-blocks.mjs +270 -0
- package/dist/dashboard/drawer-subscription.js +52 -14
- package/dist/dashboard/drawer-subscription.mjs +52 -14
- package/dist/dashboard/drawer.js +20 -3
- package/dist/dashboard/drawer.mjs +21 -4
- package/dist/dashboard/dropdown.js +6 -2
- package/dist/dashboard/dropdown.mjs +6 -2
- package/dist/dashboard/form-admin-subscription-custom.js +72 -8
- package/dist/dashboard/form-admin-subscription-custom.mjs +72 -8
- package/dist/dashboard/form-ai.js +0 -148
- package/dist/dashboard/form-ai.mjs +1 -148
- package/dist/dashboard/form-filters-analytics.js +88 -37
- package/dist/dashboard/form-filters-analytics.mjs +85 -38
- package/dist/dashboard/form-organization-brand.js +30 -13
- package/dist/dashboard/form-organization-brand.mjs +30 -13
- package/dist/dashboard/form-organization-campaign-advertisement.js +38 -112
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +38 -112
- package/dist/dashboard/form-organization-campaign-advertisements.js +374 -0
- package/dist/dashboard/form-organization-campaign-advertisements.mjs +345 -0
- package/dist/dashboard/form-organization-campaign-agreement.js +414 -210
- package/dist/dashboard/form-organization-campaign-agreement.mjs +411 -212
- package/dist/dashboard/form-organization-campaign-design.js +258 -0
- package/dist/dashboard/form-organization-campaign-design.mjs +223 -0
- package/dist/dashboard/form-organization-campaign-field-item.js +585 -0
- package/dist/dashboard/form-organization-campaign-field-item.mjs +552 -0
- package/dist/dashboard/form-organization-campaign-field-number.js +48 -7
- package/dist/dashboard/form-organization-campaign-field-number.mjs +48 -7
- package/dist/dashboard/form-organization-campaign-field-select.js +15 -4
- package/dist/dashboard/form-organization-campaign-field-select.mjs +15 -4
- package/dist/dashboard/form-organization-campaign-field-skill.js +359 -0
- package/dist/dashboard/form-organization-campaign-field-skill.mjs +330 -0
- package/dist/dashboard/form-organization-campaign-field-text.js +46 -6
- package/dist/dashboard/form-organization-campaign-field-text.mjs +46 -6
- package/dist/dashboard/form-organization-campaign-field-textarea.js +22 -13
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +22 -13
- package/dist/dashboard/form-organization-campaign-footer.js +178 -0
- package/dist/dashboard/form-organization-campaign-footer.mjs +149 -0
- package/dist/dashboard/form-organization-campaign-integration-age.js +2 -35
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +2 -35
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +4 -1
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +4 -1
- package/dist/dashboard/form-organization-campaign-page-embed.js +1 -1
- package/dist/dashboard/form-organization-campaign-page-embed.mjs +1 -1
- package/dist/dashboard/form-organization-campaign-page-preview.js +1 -2
- package/dist/dashboard/form-organization-campaign-page-preview.mjs +1 -2
- package/dist/dashboard/form-organization-campaign-page-qr.js +2 -2
- package/dist/dashboard/form-organization-campaign-page-qr.mjs +2 -2
- package/dist/dashboard/form-organization-campaign-page-share.js +5 -5
- package/dist/dashboard/form-organization-campaign-page-share.mjs +5 -5
- package/dist/dashboard/form-organization-campaign-page-slug.js +2 -3
- package/dist/dashboard/form-organization-campaign-page-slug.mjs +2 -3
- package/dist/dashboard/form-organization-campaign-page.js +168 -265
- package/dist/dashboard/form-organization-campaign-page.mjs +170 -266
- package/dist/dashboard/form-organization-campaign-section.js +125 -107
- package/dist/dashboard/form-organization-campaign-section.mjs +121 -107
- package/dist/dashboard/form-organization-campaign.js +119 -9
- package/dist/dashboard/form-organization-campaign.mjs +118 -9
- package/dist/dashboard/form-organization-file-frame.js +7 -1
- package/dist/dashboard/form-organization-file-frame.mjs +7 -1
- package/dist/dashboard/form-organization-workflow.js +587 -530
- package/dist/dashboard/form-organization-workflow.mjs +588 -531
- package/dist/dashboard/form-organization.js +22 -0
- package/dist/dashboard/form-organization.mjs +22 -0
- package/dist/dashboard/form-reposition.js +396 -0
- package/dist/dashboard/form-reposition.mjs +359 -0
- package/dist/dashboard/form-support.js +189 -0
- package/dist/dashboard/form-support.mjs +160 -0
- package/dist/dashboard/form-tests.js +683 -0
- package/dist/dashboard/form-tests.mjs +646 -0
- package/dist/dashboard/form-verify-prize.js +114 -34
- package/dist/dashboard/form-verify-prize.mjs +111 -34
- package/dist/dashboard/google.js +8 -1
- package/dist/dashboard/google.mjs +8 -1
- package/dist/dashboard/input-array.js +2 -0
- package/dist/dashboard/input-array.mjs +2 -0
- package/dist/dashboard/input-editor.js +17 -6
- package/dist/dashboard/input-editor.mjs +17 -6
- package/dist/dashboard/input-fields.js +287 -437
- package/dist/dashboard/input-fields.mjs +287 -436
- package/dist/dashboard/input-file.js +70 -2
- package/dist/dashboard/input-file.mjs +70 -2
- package/dist/dashboard/input-font.js +64 -55
- package/dist/dashboard/input-font.mjs +64 -55
- package/dist/dashboard/input-resource.js +4 -1
- package/dist/dashboard/input-resource.mjs +4 -1
- package/dist/dashboard/lib/ab-tests.js +130 -0
- package/dist/dashboard/lib/ab-tests.mjs +94 -0
- package/dist/dashboard/lib/features.js +1 -1
- package/dist/dashboard/lib/features.mjs +1 -1
- package/dist/dashboard/lib/focus.js +93 -0
- package/dist/dashboard/lib/focus.mjs +69 -0
- package/dist/dashboard/lib/form-page.js +203 -0
- package/dist/dashboard/lib/form-page.mjs +155 -0
- package/dist/dashboard/lib/item-list.js +0 -15
- package/dist/dashboard/lib/item-list.mjs +0 -14
- package/dist/dashboard/lib/rail.js +16 -17
- package/dist/dashboard/lib/rail.mjs +15 -16
- package/dist/dashboard/lib/sms.js +8 -2
- package/dist/dashboard/lib/sms.mjs +6 -1
- package/dist/dashboard/list-resource.js +2 -0
- package/dist/dashboard/list-resource.mjs +2 -0
- package/dist/dashboard/menu.js +54 -5
- package/dist/dashboard/menu.mjs +53 -5
- package/dist/dashboard/modal.js +19 -4
- package/dist/dashboard/modal.mjs +20 -5
- package/dist/dashboard/order-sections.js +4 -0
- package/dist/dashboard/order-sections.mjs +4 -0
- package/dist/dashboard/preview.js +838 -324
- package/dist/dashboard/preview.mjs +826 -324
- package/dist/dashboard/provider-ui.js +20 -12
- package/dist/dashboard/provider-ui.mjs +21 -13
- package/dist/dashboard/recharts.js +53 -28
- package/dist/dashboard/recharts.mjs +53 -28
- package/dist/dashboard/swatch.js +35 -0
- package/dist/dashboard/swatch.mjs +31 -0
- package/dist/dashboard/table-contacts.js +6 -10
- package/dist/dashboard/table-contacts.mjs +6 -10
- package/dist/dashboard/table.js +10 -3
- package/dist/dashboard/table.mjs +9 -3
- package/dist/dashboard/template-dashboard.js +12 -7
- package/dist/dashboard/template-dashboard.mjs +11 -7
- package/dist/dashboard/template-design.js +564 -0
- package/dist/dashboard/template-design.mjs +531 -0
- package/dist/dashboard/template-rail.js +198 -126
- package/dist/dashboard/template-rail.mjs +196 -125
- package/dist/dashboard/template-socket.js +0 -3
- package/dist/dashboard/template-socket.mjs +0 -3
- package/dist/dashboard/template-test-page.js +436 -0
- package/dist/dashboard/template-test-page.mjs +407 -0
- package/dist/dashboard/template-tests.js +141 -0
- package/dist/dashboard/template-tests.mjs +112 -0
- package/dist/dashboard/template-ui.js +20 -11
- package/dist/dashboard/template-ui.mjs +22 -13
- package/dist/dashboard/template-variant.js +185 -0
- package/dist/dashboard/template-variant.mjs +156 -0
- package/dist/icons/arrow-down-long.js +47 -0
- package/dist/icons/arrow-down-long.mjs +28 -0
- package/dist/icons/arrows-pointing-out.js +46 -0
- package/dist/icons/arrows-pointing-out.mjs +27 -0
- package/dist/icons/beaker.js +46 -0
- package/dist/icons/beaker.mjs +27 -0
- package/dist/icons/identification.js +46 -0
- package/dist/icons/identification.mjs +27 -0
- package/dist/icons/lifebuoy.js +46 -0
- package/dist/icons/lifebuoy.mjs +27 -0
- package/dist/icons/rectangle-group.js +46 -0
- package/dist/icons/rectangle-group.mjs +27 -0
- package/dist/icons/rectangle-stack.js +46 -0
- package/dist/icons/rectangle-stack.mjs +27 -0
- package/dist/icons/shopping-bag.js +46 -0
- package/dist/icons/shopping-bag.mjs +27 -0
- package/dist/icons/swatch.js +46 -0
- package/dist/icons/swatch.mjs +27 -0
- package/dist/icons/window.js +46 -0
- package/dist/icons/window.mjs +27 -0
- package/dist/icons/zoom-in.js +46 -0
- package/dist/icons/zoom-in.mjs +27 -0
- package/dist/input-answer.js +60 -0
- package/dist/input-answer.mjs +27 -0
- package/dist/input-checkbox.js +7 -1
- package/dist/input-checkbox.mjs +7 -1
- package/dist/input-name.js +3 -3
- package/dist/input-name.mjs +3 -3
- package/dist/input-select.js +3 -1
- package/dist/input-select.mjs +3 -1
- package/dist/provider-font.js +4 -3
- package/dist/provider-font.mjs +4 -3
- package/dist/shared/badge.js +15 -0
- package/dist/shared/badge.mjs +11 -0
- package/dist/shared/carousel.js +11 -7
- package/dist/shared/carousel.mjs +11 -7
- package/dist/shared/document-pieces.js +295 -0
- package/dist/shared/document-pieces.mjs +260 -0
- package/dist/shared/lib/campaign.js +3 -9
- package/dist/shared/lib/campaign.mjs +3 -9
- package/dist/shared/lib/helpers.js +24 -0
- package/dist/shared/lib/helpers.mjs +22 -0
- package/dist/shared/lib/video.js +6 -0
- package/dist/shared/lib/video.mjs +5 -0
- package/dist/shared/sortable.js +27 -10
- package/dist/shared/sortable.mjs +27 -10
- package/dist/shared/tabs.js +1 -1
- package/dist/shared/tabs.mjs +1 -1
- package/dist/video.js +127 -9
- package/dist/video.mjs +125 -11
- package/package.json +176 -20
- package/types/bridge/fields.d.ts +6 -1
- package/types/bridge/form-subdomain-agreement.d.ts +27 -0
- package/types/bridge/form-subdomain-missions.d.ts +2 -0
- package/types/bridge/form-subdomain.d.ts +62 -3
- package/types/bridge/lib/entry.d.ts +44 -7
- package/types/bridge/lib/order.d.ts +13 -2
- package/types/bridge/subdomain-content.d.ts +1 -0
- package/types/bridge/template-subdomain-gallery.d.ts +13 -1
- package/types/dashboard/campaign-form.d.ts +42 -0
- package/types/dashboard/card-campaign-agreement.d.ts +26 -0
- package/types/dashboard/card-campaign-switch.d.ts +20 -1
- package/types/dashboard/card-order.d.ts +2 -2
- package/types/dashboard/card-section.d.ts +9 -1
- package/types/dashboard/card-shortcut.d.ts +38 -0
- package/types/dashboard/card-tile.d.ts +4 -9
- package/types/dashboard/document-blocks.d.ts +14 -0
- package/types/dashboard/drawer.d.ts +3 -0
- package/types/dashboard/form-ai.d.ts +0 -17
- package/types/dashboard/form-organization-brand.d.ts +3 -0
- package/types/dashboard/form-organization-campaign-advertisements.d.ts +15 -0
- package/types/dashboard/form-organization-campaign-agreement.d.ts +53 -10
- package/types/dashboard/form-organization-campaign-design.d.ts +46 -0
- package/types/dashboard/form-organization-campaign-field-item.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-number.d.ts +4 -1
- package/types/dashboard/form-organization-campaign-field-select.d.ts +6 -1
- package/types/dashboard/form-organization-campaign-field-skill.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-text.d.ts +5 -1
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +4 -1
- package/types/dashboard/form-organization-campaign-footer.d.ts +23 -0
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +2 -1
- package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +2 -0
- package/types/dashboard/form-organization-campaign-page.d.ts +9 -15
- package/types/dashboard/form-organization-campaign-section.d.ts +24 -8
- package/types/dashboard/form-organization-campaign.d.ts +3 -0
- package/types/dashboard/form-organization-workflow.d.ts +3 -0
- package/types/dashboard/form-organization.d.ts +2 -2
- package/types/dashboard/form-reposition.d.ts +29 -0
- package/types/dashboard/form-support.d.ts +14 -0
- package/types/dashboard/form-tests.d.ts +78 -0
- package/types/dashboard/form-verify-prize.d.ts +30 -3
- package/types/dashboard/input-editor.d.ts +9 -0
- package/types/dashboard/input-fields.d.ts +8 -5
- package/types/dashboard/input-file.d.ts +4 -0
- package/types/dashboard/input-resource.d.ts +1 -0
- package/types/dashboard/lib/ab-tests.d.ts +50 -0
- package/types/dashboard/lib/escape.d.ts +4 -0
- package/types/dashboard/lib/focus.d.ts +16 -0
- package/types/dashboard/lib/form-page.d.ts +25 -0
- package/types/dashboard/lib/item-list.d.ts +10 -5
- package/types/dashboard/lib/rail.d.ts +0 -1
- package/types/dashboard/lib/sms.d.ts +7 -0
- package/types/dashboard/modal.d.ts +3 -1
- package/types/dashboard/preview.d.ts +65 -10
- package/types/dashboard/recharts.d.ts +3 -0
- package/types/dashboard/swatch.d.ts +4 -0
- package/types/dashboard/template-dashboard.d.ts +3 -0
- package/types/dashboard/template-design.d.ts +30 -0
- package/types/dashboard/template-test-page.d.ts +69 -0
- package/types/dashboard/template-tests.d.ts +30 -0
- package/types/dashboard/template-variant.d.ts +18 -0
- package/types/icons/arrow-down-long.d.ts +5 -0
- package/types/icons/arrows-pointing-out.d.ts +5 -0
- package/types/icons/beaker.d.ts +5 -0
- package/types/icons/identification.d.ts +5 -0
- package/types/icons/lifebuoy.d.ts +5 -0
- package/types/icons/rectangle-group.d.ts +5 -0
- package/types/icons/rectangle-stack.d.ts +5 -0
- package/types/icons/shopping-bag.d.ts +5 -0
- package/types/icons/swatch.d.ts +5 -0
- package/types/icons/window.d.ts +5 -0
- package/types/icons/zoom-in.d.ts +5 -0
- package/types/input-answer.d.ts +15 -0
- package/types/input-select.d.ts +2 -0
- package/types/shared/button.d.ts +1 -1
- package/types/shared/document-pieces.d.ts +34 -0
- package/types/shared/lib/helpers.d.ts +22 -1
- package/types/shared/lib/motion.d.ts +2 -0
- package/types/shared/lib/video.d.ts +3 -0
- package/types/shared/sortable.d.ts +6 -0
- package/types/video.d.ts +18 -2
- package/dist/bridge/template-preview.js +0 -208
- package/dist/bridge/template-preview.mjs +0 -173
- package/dist/dashboard/device.js +0 -95
- package/dist/dashboard/device.mjs +0 -72
- package/dist/dashboard/form-organization-campaign-field-list.js +0 -425
- package/dist/dashboard/form-organization-campaign-field-list.mjs +0 -396
- package/dist/dashboard/item-row.js +0 -92
- package/dist/dashboard/item-row.mjs +0 -63
- package/types/bridge/template-preview.d.ts +0 -10
- package/types/dashboard/device.d.ts +0 -12
- package/types/dashboard/form-organization-campaign-field-list.d.ts +0 -36
- package/types/dashboard/item-row.d.ts +0 -25
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { agreementContent, agreementTitles, agreementWording } from "../../bridge/lib/entry.mjs";
|
|
2
|
+
const MAX_SECTIONS = 3;
|
|
3
|
+
const MAX_ADS = 5;
|
|
4
|
+
const adsLimit = (count) => count >= MAX_ADS ? "A campaign can have up to " + MAX_ADS + " advertisements." : null;
|
|
5
|
+
const advertisementsKey = (params) => ["campaign-advertisements", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign];
|
|
6
|
+
const AFTER = ["message", "missions", "advertisements"];
|
|
7
|
+
const once = ["email", "name", "note", "phone", "pickup"];
|
|
8
|
+
const addedOnce = (slug, keys = []) => once.includes(slug) && (keys || []).includes(slug);
|
|
9
|
+
const planLocked = (section) => Boolean(section == null ? void 0 : section.task) && Boolean((section == null ? void 0 : section.locked) || (section == null ? void 0 : section.disabled));
|
|
10
|
+
const giveawayLocked = (section) => (section == null ? void 0 : section.type) === "order" && Boolean(section == null ? void 0 : section.giveaway);
|
|
11
|
+
const sectionOn = (section) => (section == null ? void 0 : section.enabled) !== false && !giveawayLocked(section) && !planLocked(section);
|
|
12
|
+
const formParts = (sections = []) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const list = Array.isArray(sections) ? sections : [];
|
|
15
|
+
const checks = ((_a = list.find((section) => (section == null ? void 0 : section.type) === "eligibility")) == null ? void 0 : _a.items) || [];
|
|
16
|
+
return {
|
|
17
|
+
after: list.find((section) => (section == null ? void 0 : section.type) === "after") || null,
|
|
18
|
+
age: checks.find((item) => (item == null ? void 0 : item.slug) === "age") || null,
|
|
19
|
+
customs: list.filter((section) => (section == null ? void 0 : section.type) === "section"),
|
|
20
|
+
information: list.find((section) => (section == null ? void 0 : section.type) === "information") || null,
|
|
21
|
+
location: checks.find((item) => (item == null ? void 0 : item.slug) === "geocode") || null,
|
|
22
|
+
order: list.find((section) => (section == null ? void 0 : section.type) === "order") || null
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const asks = (section) => ((section == null ? void 0 : section.items) || []).some((field) => (section == null ? void 0 : section.type) !== "order" || (field == null ? void 0 : field.slug) === "list");
|
|
26
|
+
const lastStepId = (steps = []) => {
|
|
27
|
+
var _a;
|
|
28
|
+
return ((_a = [...steps].reverse().find((section) => sectionOn(section) && asks(section))) == null ? void 0 : _a.id) || null;
|
|
29
|
+
};
|
|
30
|
+
const asksPhone = (sections = []) => (Array.isArray(sections) ? sections : []).some((section) => ((section == null ? void 0 : section.items) || []).some((field) => (field == null ? void 0 : field.slug) === "phone"));
|
|
31
|
+
const ageRange = (settings = {}) => (settings == null ? void 0 : settings.max) ? "Ages " + (settings == null ? void 0 : settings.min) + "\u2013" + settings.max : "Ages " + (settings == null ? void 0 : settings.min) + " and older";
|
|
32
|
+
const locationText = (item) => {
|
|
33
|
+
var _a;
|
|
34
|
+
return [item == null ? void 0 : item.label, (_a = item == null ? void 0 : item.settings) == null ? void 0 : _a.place].filter(Boolean).join(" of ");
|
|
35
|
+
};
|
|
36
|
+
const priced = (field) => {
|
|
37
|
+
var _a;
|
|
38
|
+
return (((_a = field == null ? void 0 : field.settings) == null ? void 0 : _a.items) || []).some((item) => typeof (item == null ? void 0 : item.price) === "number");
|
|
39
|
+
};
|
|
40
|
+
const showsTotal = (items = []) => (items || []).some((field) => (field == null ? void 0 : field.slug) === "list" && priced(field));
|
|
41
|
+
const footerAgreements = ({ agreements = {}, phone, texts }) => {
|
|
42
|
+
var _a;
|
|
43
|
+
return [
|
|
44
|
+
["terms", (_a = agreementTitles) == null ? void 0 : _a.terms],
|
|
45
|
+
["marketing", agreementWording.marketing],
|
|
46
|
+
["sms", agreementWording.sms]
|
|
47
|
+
].filter(([key]) => {
|
|
48
|
+
var _a2, _b, _c;
|
|
49
|
+
return Boolean((_b = (_a2 = agreements == null ? void 0 : agreements[key]) == null ? void 0 : _a2.values) == null ? void 0 : _b.enabled) && (key === "sms" ? Boolean(texts && phone) : Boolean(agreementContent((_c = agreements == null ? void 0 : agreements[key]) == null ? void 0 : _c.values)));
|
|
50
|
+
}).map(([key, fallback]) => {
|
|
51
|
+
var _a2, _b;
|
|
52
|
+
return {
|
|
53
|
+
key,
|
|
54
|
+
// Terms must be ticked, so it ends with *, as on the share form.
|
|
55
|
+
label: (((_b = (_a2 = agreements == null ? void 0 : agreements[key]) == null ? void 0 : _a2.values) == null ? void 0 : _b.label) || fallback) + (key === "terms" ? " *" : "")
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const footerRows = (agreements = {}, texts) => Object.keys(agreements || {}).filter((key) => texts || key !== "sms");
|
|
60
|
+
const agreementRows = (agreements = {}, texts) => footerRows(agreements, texts).map((id) => {
|
|
61
|
+
var _a, _b, _c, _d;
|
|
62
|
+
return {
|
|
63
|
+
id,
|
|
64
|
+
on: Boolean((_b = (_a = agreements == null ? void 0 : agreements[id]) == null ? void 0 : _a.values) == null ? void 0 : _b.enabled),
|
|
65
|
+
title: ((_c = agreements[id]) == null ? void 0 : _c.title) || ((_d = agreementTitles) == null ? void 0 : _d[id]) || id
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
const readableDocuments = (agreements = {}, texts) => footerRows(agreements, texts).filter((id) => {
|
|
69
|
+
var _a, _b, _c, _d;
|
|
70
|
+
return ((_b = (_a = agreements[id]) == null ? void 0 : _a.values) == null ? void 0 : _b.enabled) && (((_d = (_c = agreements[id]) == null ? void 0 : _c.values) == null ? void 0 : _d.type) || "document") === "document";
|
|
71
|
+
}).map((id) => {
|
|
72
|
+
var _a, _b, _c;
|
|
73
|
+
return {
|
|
74
|
+
key: ((_b = (_a = agreements[id]) == null ? void 0 : _a.document) == null ? void 0 : _b.name) || ((_c = agreements[id]) == null ? void 0 : _c.title) || id,
|
|
75
|
+
value: id
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
const privacyLink = (agreements = {}) => {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
return ((_b = (_a = agreements == null ? void 0 : agreements.privacy) == null ? void 0 : _a.values) == null ? void 0 : _b.enabled) && agreementContent(agreements.privacy.values) ? agreements.privacy.values.label || "Privacy policy" : null;
|
|
81
|
+
};
|
|
82
|
+
const afterRows = (order, response) => {
|
|
83
|
+
const rows = Array.isArray(order) && order.length ? order.filter((key) => AFTER.includes(key)) : AFTER;
|
|
84
|
+
return response === "order" ? rows.filter((key) => key !== "missions") : rows;
|
|
85
|
+
};
|
|
86
|
+
const rowLabel = (field) => {
|
|
87
|
+
var _a;
|
|
88
|
+
return ((field == null ? void 0 : field.label) || (field == null ? void 0 : field.title) || "") + ((field == null ? void 0 : field.slug) !== "list" && ((_a = field == null ? void 0 : field.attributes) == null ? void 0 : _a.required) !== false ? "\xA0*" : "");
|
|
89
|
+
};
|
|
90
|
+
const itemPrice = (field) => {
|
|
91
|
+
var _a, _b, _c;
|
|
92
|
+
return (field == null ? void 0 : field.slug) === "list" && ((_b = (_a = field == null ? void 0 : field.settings) == null ? void 0 : _a.items) == null ? void 0 : _b.length) === 1 && typeof ((_c = field.settings.items[0]) == null ? void 0 : _c.price) === "number" ? field.settings.items[0].price : null;
|
|
93
|
+
};
|
|
94
|
+
const itemGroup = (field) => {
|
|
95
|
+
var _a;
|
|
96
|
+
return (field == null ? void 0 : field.slug) === "list" && (((_a = field == null ? void 0 : field.settings) == null ? void 0 : _a.items) || []).length > 1;
|
|
97
|
+
};
|
|
98
|
+
const counted = (number, total) => (number || 0) + " of " + (total || 0);
|
|
99
|
+
const formSlides = ({ after, age, customs = [], information, location, order } = {}, agreements) => {
|
|
100
|
+
var _a;
|
|
101
|
+
return [
|
|
102
|
+
{
|
|
103
|
+
id: "start",
|
|
104
|
+
title: "Entry button"
|
|
105
|
+
},
|
|
106
|
+
location && {
|
|
107
|
+
id: "location",
|
|
108
|
+
title: "Location"
|
|
109
|
+
},
|
|
110
|
+
age && age.enabled !== false && {
|
|
111
|
+
id: "age",
|
|
112
|
+
title: ((_a = age.settings) == null ? void 0 : _a.title) || "Confirm your age"
|
|
113
|
+
},
|
|
114
|
+
...[information, ...customs || [], order].filter((section) => section && sectionOn(section)).map((section) => ({
|
|
115
|
+
id: section.id,
|
|
116
|
+
title: section.title
|
|
117
|
+
})),
|
|
118
|
+
agreements && {
|
|
119
|
+
id: "agreements",
|
|
120
|
+
title: "Agreements"
|
|
121
|
+
},
|
|
122
|
+
after && {
|
|
123
|
+
id: "after",
|
|
124
|
+
title: "After entry"
|
|
125
|
+
}
|
|
126
|
+
].filter(Boolean);
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
AFTER,
|
|
130
|
+
MAX_ADS,
|
|
131
|
+
MAX_SECTIONS,
|
|
132
|
+
addedOnce,
|
|
133
|
+
adsLimit,
|
|
134
|
+
advertisementsKey,
|
|
135
|
+
afterRows,
|
|
136
|
+
ageRange,
|
|
137
|
+
agreementRows,
|
|
138
|
+
asksPhone,
|
|
139
|
+
counted,
|
|
140
|
+
footerAgreements,
|
|
141
|
+
footerRows,
|
|
142
|
+
formParts,
|
|
143
|
+
formSlides,
|
|
144
|
+
giveawayLocked,
|
|
145
|
+
itemGroup,
|
|
146
|
+
itemPrice,
|
|
147
|
+
lastStepId,
|
|
148
|
+
locationText,
|
|
149
|
+
planLocked,
|
|
150
|
+
privacyLink,
|
|
151
|
+
readableDocuments,
|
|
152
|
+
rowLabel,
|
|
153
|
+
sectionOn,
|
|
154
|
+
showsTotal
|
|
155
|
+
};
|
|
@@ -17,23 +17,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var item_list_exports = {};
|
|
19
19
|
__export(item_list_exports, {
|
|
20
|
-
itemSummary: () => itemSummary,
|
|
21
20
|
itemsBody: () => itemsBody
|
|
22
21
|
});
|
|
23
22
|
module.exports = __toCommonJS(item_list_exports);
|
|
24
|
-
var import_drawbridge_utils = require("@drawbridge/drawbridge-utils");
|
|
25
|
-
var import_fields_validate = require("@drawbridge/drawbridge-utils/fields-validate");
|
|
26
|
-
const itemSummary = (item = {}, prices, currency) => {
|
|
27
|
-
var _a;
|
|
28
|
-
return [
|
|
29
|
-
prices && typeof (item == null ? void 0 : item.price) === "number" && (0, import_drawbridge_utils.formatCurrency)({
|
|
30
|
-
code: currency.toUpperCase(),
|
|
31
|
-
display: "parts",
|
|
32
|
-
value: item.price
|
|
33
|
-
}),
|
|
34
|
-
((_a = item == null ? void 0 : item.attributes) == null ? void 0 : _a.max) && import_fields_validate.errors.limit(item.attributes.max)
|
|
35
|
-
].filter(Boolean).join(" \xB7 ");
|
|
36
|
-
};
|
|
37
23
|
const itemsBody = (items = []) => items.map((item) => {
|
|
38
24
|
var _a, _b;
|
|
39
25
|
return {
|
|
@@ -52,6 +38,5 @@ const itemsBody = (items = []) => items.map((item) => {
|
|
|
52
38
|
});
|
|
53
39
|
// Annotate the CommonJS export names for ESM import in node:
|
|
54
40
|
0 && (module.exports = {
|
|
55
|
-
itemSummary,
|
|
56
41
|
itemsBody
|
|
57
42
|
});
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import { formatCurrency } from "@drawbridge/drawbridge-utils";
|
|
2
|
-
import { errors } from "@drawbridge/drawbridge-utils/fields-validate";
|
|
3
|
-
const itemSummary = (item = {}, prices, currency) => {
|
|
4
|
-
var _a;
|
|
5
|
-
return [
|
|
6
|
-
prices && typeof (item == null ? void 0 : item.price) === "number" && formatCurrency({
|
|
7
|
-
code: currency.toUpperCase(),
|
|
8
|
-
display: "parts",
|
|
9
|
-
value: item.price
|
|
10
|
-
}),
|
|
11
|
-
((_a = item == null ? void 0 : item.attributes) == null ? void 0 : _a.max) && errors.limit(item.attributes.max)
|
|
12
|
-
].filter(Boolean).join(" \xB7 ");
|
|
13
|
-
};
|
|
14
1
|
const itemsBody = (items = []) => items.map((item) => {
|
|
15
2
|
var _a, _b;
|
|
16
3
|
return {
|
|
@@ -28,6 +15,5 @@ const itemsBody = (items = []) => items.map((item) => {
|
|
|
28
15
|
};
|
|
29
16
|
});
|
|
30
17
|
export {
|
|
31
|
-
itemSummary,
|
|
32
18
|
itemsBody
|
|
33
19
|
};
|
|
@@ -22,7 +22,7 @@ __export(rail_exports, {
|
|
|
22
22
|
railItems: () => railItems,
|
|
23
23
|
railOnScreen: () => railOnScreen,
|
|
24
24
|
railOverlap: () => railOverlap,
|
|
25
|
-
|
|
25
|
+
railSupport: () => railSupport,
|
|
26
26
|
railView: () => railView
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(rail_exports);
|
|
@@ -35,16 +35,21 @@ const railItems = ({
|
|
|
35
35
|
params = {},
|
|
36
36
|
path = ""
|
|
37
37
|
}) => {
|
|
38
|
-
var _a, _b, _c, _d, _e, _f;
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
39
39
|
if (path.startsWith("/admin")) return [];
|
|
40
40
|
if (!params.organization) return ((_a = account == null ? void 0 : account.tasks) == null ? void 0 : _a.items) || [];
|
|
41
|
-
if (!params.campaign) return
|
|
42
|
-
|
|
41
|
+
if (!params.campaign) return [
|
|
42
|
+
...params.brand ? ((_b = page == null ? void 0 : page.tasks) == null ? void 0 : _b.items) || [] : [],
|
|
43
|
+
...((_c = organization == null ? void 0 : organization.tasks) == null ? void 0 : _c.items) || []
|
|
44
|
+
];
|
|
45
|
+
const list = ((_d = organization == null ? void 0 : organization.tasks) == null ? void 0 : _d.list) || {};
|
|
43
46
|
const others = Object.keys(list).filter((key) => !["billing", "campaigns"].includes(key));
|
|
44
47
|
return [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
...((
|
|
48
|
+
// The page's own notices: on its builder, or on Design the main page's
|
|
49
|
+
// ( useRailPage, template-rail.js ).
|
|
50
|
+
...params.page || /\/design$/.test(path) ? ((_e = page == null ? void 0 : page.tasks) == null ? void 0 : _e.items) || [] : [],
|
|
51
|
+
...required((_f = list.billing) == null ? void 0 : _f.items),
|
|
52
|
+
...((_g = campaign == null ? void 0 : campaign.tasks) == null ? void 0 : _g.items) || [],
|
|
48
53
|
...others.flatMap((key) => {
|
|
49
54
|
var _a2;
|
|
50
55
|
return required((_a2 = list[key]) == null ? void 0 : _a2.items);
|
|
@@ -52,17 +57,11 @@ const railItems = ({
|
|
|
52
57
|
];
|
|
53
58
|
};
|
|
54
59
|
const railCount = (items = []) => required(items).length;
|
|
55
|
-
const railFirst = (items = []) => required(items)[0]
|
|
56
|
-
const railView = ({ guide, panel }) => panel === "guide" && !guide ? "next" : panel || null;
|
|
60
|
+
const railFirst = (items = []) => required(items)[0];
|
|
61
|
+
const railView = ({ guide, panel, support }) => panel === "guide" && !guide || panel === "support" && !support ? "next" : panel || null;
|
|
62
|
+
const railSupport = ({ organization, params = {}, path = "" }) => Boolean(params.organization && (organization == null ? void 0 : organization.support) === true && !path.startsWith("/admin"));
|
|
57
63
|
const railOverlap = (a, b) => a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
|
|
58
64
|
const railOnScreen = (rect, { height, width }) => rect.bottom > 0 && rect.right > 0 && rect.top < height && rect.left < width;
|
|
59
|
-
const railTabTarget = ({ active, items, shift }) => {
|
|
60
|
-
if (items.length === 0) return null;
|
|
61
|
-
const first = items[0];
|
|
62
|
-
const last = items[items.length - 1];
|
|
63
|
-
if (shift) return active === first || !items.includes(active) ? last : null;
|
|
64
|
-
return active === last ? first : null;
|
|
65
|
-
};
|
|
66
65
|
// Annotate the CommonJS export names for ESM import in node:
|
|
67
66
|
0 && (module.exports = {
|
|
68
67
|
railCount,
|
|
@@ -70,6 +69,6 @@ const railTabTarget = ({ active, items, shift }) => {
|
|
|
70
69
|
railItems,
|
|
71
70
|
railOnScreen,
|
|
72
71
|
railOverlap,
|
|
73
|
-
|
|
72
|
+
railSupport,
|
|
74
73
|
railView
|
|
75
74
|
});
|
|
@@ -7,16 +7,21 @@ const railItems = ({
|
|
|
7
7
|
params = {},
|
|
8
8
|
path = ""
|
|
9
9
|
}) => {
|
|
10
|
-
var _a, _b, _c, _d, _e, _f;
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
11
11
|
if (path.startsWith("/admin")) return [];
|
|
12
12
|
if (!params.organization) return ((_a = account == null ? void 0 : account.tasks) == null ? void 0 : _a.items) || [];
|
|
13
|
-
if (!params.campaign) return
|
|
14
|
-
|
|
13
|
+
if (!params.campaign) return [
|
|
14
|
+
...params.brand ? ((_b = page == null ? void 0 : page.tasks) == null ? void 0 : _b.items) || [] : [],
|
|
15
|
+
...((_c = organization == null ? void 0 : organization.tasks) == null ? void 0 : _c.items) || []
|
|
16
|
+
];
|
|
17
|
+
const list = ((_d = organization == null ? void 0 : organization.tasks) == null ? void 0 : _d.list) || {};
|
|
15
18
|
const others = Object.keys(list).filter((key) => !["billing", "campaigns"].includes(key));
|
|
16
19
|
return [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
...((
|
|
20
|
+
// The page's own notices: on its builder, or on Design the main page's
|
|
21
|
+
// ( useRailPage, template-rail.js ).
|
|
22
|
+
...params.page || /\/design$/.test(path) ? ((_e = page == null ? void 0 : page.tasks) == null ? void 0 : _e.items) || [] : [],
|
|
23
|
+
...required((_f = list.billing) == null ? void 0 : _f.items),
|
|
24
|
+
...((_g = campaign == null ? void 0 : campaign.tasks) == null ? void 0 : _g.items) || [],
|
|
20
25
|
...others.flatMap((key) => {
|
|
21
26
|
var _a2;
|
|
22
27
|
return required((_a2 = list[key]) == null ? void 0 : _a2.items);
|
|
@@ -24,23 +29,17 @@ const railItems = ({
|
|
|
24
29
|
];
|
|
25
30
|
};
|
|
26
31
|
const railCount = (items = []) => required(items).length;
|
|
27
|
-
const railFirst = (items = []) => required(items)[0]
|
|
28
|
-
const railView = ({ guide, panel }) => panel === "guide" && !guide ? "next" : panel || null;
|
|
32
|
+
const railFirst = (items = []) => required(items)[0];
|
|
33
|
+
const railView = ({ guide, panel, support }) => panel === "guide" && !guide || panel === "support" && !support ? "next" : panel || null;
|
|
34
|
+
const railSupport = ({ organization, params = {}, path = "" }) => Boolean(params.organization && (organization == null ? void 0 : organization.support) === true && !path.startsWith("/admin"));
|
|
29
35
|
const railOverlap = (a, b) => a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
|
|
30
36
|
const railOnScreen = (rect, { height, width }) => rect.bottom > 0 && rect.right > 0 && rect.top < height && rect.left < width;
|
|
31
|
-
const railTabTarget = ({ active, items, shift }) => {
|
|
32
|
-
if (items.length === 0) return null;
|
|
33
|
-
const first = items[0];
|
|
34
|
-
const last = items[items.length - 1];
|
|
35
|
-
if (shift) return active === first || !items.includes(active) ? last : null;
|
|
36
|
-
return active === last ? first : null;
|
|
37
|
-
};
|
|
38
37
|
export {
|
|
39
38
|
railCount,
|
|
40
39
|
railFirst,
|
|
41
40
|
railItems,
|
|
42
41
|
railOnScreen,
|
|
43
42
|
railOverlap,
|
|
44
|
-
|
|
43
|
+
railSupport,
|
|
45
44
|
railView
|
|
46
45
|
};
|
|
@@ -18,13 +18,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
18
18
|
var sms_exports = {};
|
|
19
19
|
__export(sms_exports, {
|
|
20
20
|
smsBrandLine: () => smsBrandLine,
|
|
21
|
-
smsNumberActive: () => smsNumberActive
|
|
21
|
+
smsNumberActive: () => smsNumberActive,
|
|
22
|
+
textsOn: () => textsOn
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(sms_exports);
|
|
25
|
+
const textsOn = (organization) => {
|
|
26
|
+
var _a;
|
|
27
|
+
return ((_a = organization == null ? void 0 : organization.identityDefaults) == null ? void 0 : _a.sms) !== false;
|
|
28
|
+
};
|
|
24
29
|
const smsNumberActive = (organization) => ((organization == null ? void 0 : organization.identityItems) || []).some((row) => (row == null ? void 0 : row.type) === "sms" && (row == null ? void 0 : row.status) === "verified");
|
|
25
30
|
const smsBrandLine = (brand, message) => brand && !String(message || "").trim().toLowerCase().startsWith(String(brand).trim().toLowerCase()) ? brand : null;
|
|
26
31
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
32
|
0 && (module.exports = {
|
|
28
33
|
smsBrandLine,
|
|
29
|
-
smsNumberActive
|
|
34
|
+
smsNumberActive,
|
|
35
|
+
textsOn
|
|
30
36
|
});
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
const textsOn = (organization) => {
|
|
2
|
+
var _a;
|
|
3
|
+
return ((_a = organization == null ? void 0 : organization.identityDefaults) == null ? void 0 : _a.sms) !== false;
|
|
4
|
+
};
|
|
1
5
|
const smsNumberActive = (organization) => ((organization == null ? void 0 : organization.identityItems) || []).some((row) => (row == null ? void 0 : row.type) === "sms" && (row == null ? void 0 : row.status) === "verified");
|
|
2
6
|
const smsBrandLine = (brand, message) => brand && !String(message || "").trim().toLowerCase().startsWith(String(brand).trim().toLowerCase()) ? brand : null;
|
|
3
7
|
export {
|
|
4
8
|
smsBrandLine,
|
|
5
|
-
smsNumberActive
|
|
9
|
+
smsNumberActive,
|
|
10
|
+
textsOn
|
|
6
11
|
};
|
package/dist/dashboard/menu.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(menu_exports, {
|
|
|
34
34
|
MenuApp: () => MenuApp,
|
|
35
35
|
MenuCampaign: () => MenuCampaign,
|
|
36
36
|
MenuOrganization: () => MenuOrganization,
|
|
37
|
+
MenuRail: () => MenuRail,
|
|
37
38
|
releaseId: () => releaseId
|
|
38
39
|
});
|
|
39
40
|
module.exports = __toCommonJS(menu_exports);
|
|
@@ -68,18 +69,25 @@ var import_queue = __toESM(require("../icons/queue"));
|
|
|
68
69
|
var import_share = __toESM(require("../icons/share"));
|
|
69
70
|
var import_star = __toESM(require("../icons/star"));
|
|
70
71
|
var import_users = __toESM(require("../icons/users"));
|
|
72
|
+
var import_book_open = __toESM(require("../icons/book-open"));
|
|
73
|
+
var import_lifebuoy = __toESM(require("../icons/lifebuoy"));
|
|
74
|
+
var import_task = __toESM(require("../icons/task"));
|
|
71
75
|
var import_menu = require("./lib/menu");
|
|
72
76
|
const icons = {
|
|
77
|
+
// The rail's three, as the phone menu's rows (MenuRail).
|
|
78
|
+
"book-open": import_book_open.default,
|
|
73
79
|
chart: import_chart.default,
|
|
74
80
|
document: import_document.default,
|
|
75
81
|
flag: import_flag.default,
|
|
76
82
|
home: import_home.default,
|
|
83
|
+
lifebuoy: import_lifebuoy.default,
|
|
77
84
|
link: import_link2.default,
|
|
78
85
|
// Connections (Darren, Dulce Local walk, 2026-10-29).
|
|
79
86
|
"puzzle-piece": import_puzzle_piece.default,
|
|
80
87
|
queue: import_queue.default,
|
|
81
88
|
share: import_share.default,
|
|
82
89
|
star: import_star.default,
|
|
90
|
+
task: import_task.default,
|
|
83
91
|
users: import_users.default
|
|
84
92
|
};
|
|
85
93
|
const Reveal = ({
|
|
@@ -692,12 +700,51 @@ const MenuRelease = ({
|
|
|
692
700
|
]
|
|
693
701
|
}
|
|
694
702
|
);
|
|
703
|
+
const MenuRail = ({
|
|
704
|
+
onClick = () => {
|
|
705
|
+
},
|
|
706
|
+
rows = []
|
|
707
|
+
}) => rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
708
|
+
"nav",
|
|
709
|
+
{
|
|
710
|
+
...{
|
|
711
|
+
// Named for what it holds, not "Rail": the rail itself is the other
|
|
712
|
+
// navigation of that name, beside the page from md.
|
|
713
|
+
"aria-label": "Next steps and help",
|
|
714
|
+
className: "relative z-[3] px-6 py-3 space-y-1 border-t border-gray-dark md:hidden"
|
|
715
|
+
},
|
|
716
|
+
children: rows.map(({ count, icon, onClick: open, title }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
717
|
+
MenuItem,
|
|
718
|
+
{
|
|
719
|
+
...{
|
|
720
|
+
...count > 0 && {
|
|
721
|
+
badge: {
|
|
722
|
+
text: count,
|
|
723
|
+
type: "warning"
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
element: "button",
|
|
727
|
+
icon,
|
|
728
|
+
onClick: () => {
|
|
729
|
+
open();
|
|
730
|
+
onClick();
|
|
731
|
+
},
|
|
732
|
+
title
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
title
|
|
736
|
+
))
|
|
737
|
+
}
|
|
738
|
+
);
|
|
695
739
|
const MenuAccountDropdown = ({
|
|
696
740
|
account,
|
|
697
741
|
balance,
|
|
698
742
|
actions,
|
|
699
743
|
modal,
|
|
700
|
-
onClick
|
|
744
|
+
onClick,
|
|
745
|
+
// @story support/availability
|
|
746
|
+
// The organization has the rail's Support, which replaces the website's.
|
|
747
|
+
support = false
|
|
701
748
|
}) => {
|
|
702
749
|
var _a, _b, _c, _d, _e;
|
|
703
750
|
const app = (0, import_react_query.useQuery)({
|
|
@@ -719,7 +766,7 @@ const MenuAccountDropdown = ({
|
|
|
719
766
|
title: "Account"
|
|
720
767
|
}
|
|
721
768
|
];
|
|
722
|
-
if (process.env.NEXT_PUBLIC_SUPPORT_URI) {
|
|
769
|
+
if (process.env.NEXT_PUBLIC_SUPPORT_URI && !support) {
|
|
723
770
|
items.push({
|
|
724
771
|
"data-guide": "menu-item-account-support",
|
|
725
772
|
element: import_link.default,
|
|
@@ -844,14 +891,15 @@ const MenuAccountDropdown = ({
|
|
|
844
891
|
}
|
|
845
892
|
),
|
|
846
893
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
847
|
-
|
|
894
|
+
import_react2.Disclosure,
|
|
848
895
|
{
|
|
849
896
|
...{
|
|
897
|
+
as: "div",
|
|
850
898
|
// No space-y: the always-drawn panel would leave its gap under a closed menu;
|
|
851
899
|
// the gap rides inside the panel's reveal.
|
|
852
900
|
className: "flex flex-col justify-between p-6" + (banded ? "" : " border-t border-gray-dark")
|
|
853
901
|
},
|
|
854
|
-
children:
|
|
902
|
+
children: ({ open }) => {
|
|
855
903
|
var _a2, _b2;
|
|
856
904
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
857
905
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -962,7 +1010,7 @@ const MenuAccountDropdown = ({
|
|
|
962
1010
|
}
|
|
963
1011
|
)
|
|
964
1012
|
] });
|
|
965
|
-
}
|
|
1013
|
+
}
|
|
966
1014
|
}
|
|
967
1015
|
)
|
|
968
1016
|
] });
|
|
@@ -975,5 +1023,6 @@ const MenuAccountDropdown = ({
|
|
|
975
1023
|
MenuApp,
|
|
976
1024
|
MenuCampaign,
|
|
977
1025
|
MenuOrganization,
|
|
1026
|
+
MenuRail,
|
|
978
1027
|
releaseId
|
|
979
1028
|
});
|
package/dist/dashboard/menu.mjs
CHANGED
|
@@ -30,18 +30,25 @@ import Queue from "../icons/queue.mjs";
|
|
|
30
30
|
import Share from "../icons/share.mjs";
|
|
31
31
|
import Star from "../icons/star.mjs";
|
|
32
32
|
import Users from "../icons/users.mjs";
|
|
33
|
+
import BookOpen from "../icons/book-open.mjs";
|
|
34
|
+
import Lifebuoy from "../icons/lifebuoy.mjs";
|
|
35
|
+
import Task from "../icons/task.mjs";
|
|
33
36
|
import { menuRow } from "./lib/menu.mjs";
|
|
34
37
|
const icons = {
|
|
38
|
+
// The rail's three, as the phone menu's rows (MenuRail).
|
|
39
|
+
"book-open": BookOpen,
|
|
35
40
|
chart: Chart,
|
|
36
41
|
document: Document,
|
|
37
42
|
flag: Flag,
|
|
38
43
|
home: Home,
|
|
44
|
+
lifebuoy: Lifebuoy,
|
|
39
45
|
link: LinkIcon,
|
|
40
46
|
// Connections (Darren, Dulce Local walk, 2026-10-29).
|
|
41
47
|
"puzzle-piece": PuzzlePiece,
|
|
42
48
|
queue: Queue,
|
|
43
49
|
share: Share,
|
|
44
50
|
star: Star,
|
|
51
|
+
task: Task,
|
|
45
52
|
users: Users
|
|
46
53
|
};
|
|
47
54
|
const Reveal = ({
|
|
@@ -654,12 +661,51 @@ const MenuRelease = ({
|
|
|
654
661
|
]
|
|
655
662
|
}
|
|
656
663
|
);
|
|
664
|
+
const MenuRail = ({
|
|
665
|
+
onClick = () => {
|
|
666
|
+
},
|
|
667
|
+
rows = []
|
|
668
|
+
}) => rows.length > 0 && /* @__PURE__ */ jsx(
|
|
669
|
+
"nav",
|
|
670
|
+
{
|
|
671
|
+
...{
|
|
672
|
+
// Named for what it holds, not "Rail": the rail itself is the other
|
|
673
|
+
// navigation of that name, beside the page from md.
|
|
674
|
+
"aria-label": "Next steps and help",
|
|
675
|
+
className: "relative z-[3] px-6 py-3 space-y-1 border-t border-gray-dark md:hidden"
|
|
676
|
+
},
|
|
677
|
+
children: rows.map(({ count, icon, onClick: open, title }) => /* @__PURE__ */ jsx(
|
|
678
|
+
MenuItem,
|
|
679
|
+
{
|
|
680
|
+
...{
|
|
681
|
+
...count > 0 && {
|
|
682
|
+
badge: {
|
|
683
|
+
text: count,
|
|
684
|
+
type: "warning"
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
element: "button",
|
|
688
|
+
icon,
|
|
689
|
+
onClick: () => {
|
|
690
|
+
open();
|
|
691
|
+
onClick();
|
|
692
|
+
},
|
|
693
|
+
title
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
title
|
|
697
|
+
))
|
|
698
|
+
}
|
|
699
|
+
);
|
|
657
700
|
const MenuAccountDropdown = ({
|
|
658
701
|
account,
|
|
659
702
|
balance,
|
|
660
703
|
actions,
|
|
661
704
|
modal,
|
|
662
|
-
onClick
|
|
705
|
+
onClick,
|
|
706
|
+
// @story support/availability
|
|
707
|
+
// The organization has the rail's Support, which replaces the website's.
|
|
708
|
+
support = false
|
|
663
709
|
}) => {
|
|
664
710
|
var _a, _b, _c, _d, _e;
|
|
665
711
|
const app = useQuery({
|
|
@@ -681,7 +727,7 @@ const MenuAccountDropdown = ({
|
|
|
681
727
|
title: "Account"
|
|
682
728
|
}
|
|
683
729
|
];
|
|
684
|
-
if (process.env.NEXT_PUBLIC_SUPPORT_URI) {
|
|
730
|
+
if (process.env.NEXT_PUBLIC_SUPPORT_URI && !support) {
|
|
685
731
|
items.push({
|
|
686
732
|
"data-guide": "menu-item-account-support",
|
|
687
733
|
element: Link,
|
|
@@ -806,14 +852,15 @@ const MenuAccountDropdown = ({
|
|
|
806
852
|
}
|
|
807
853
|
),
|
|
808
854
|
/* @__PURE__ */ jsx(
|
|
809
|
-
|
|
855
|
+
Disclosure,
|
|
810
856
|
{
|
|
811
857
|
...{
|
|
858
|
+
as: "div",
|
|
812
859
|
// No space-y: the always-drawn panel would leave its gap under a closed menu;
|
|
813
860
|
// the gap rides inside the panel's reveal.
|
|
814
861
|
className: "flex flex-col justify-between p-6" + (banded ? "" : " border-t border-gray-dark")
|
|
815
862
|
},
|
|
816
|
-
children:
|
|
863
|
+
children: ({ open }) => {
|
|
817
864
|
var _a2, _b2;
|
|
818
865
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
819
866
|
/* @__PURE__ */ jsx(
|
|
@@ -924,7 +971,7 @@ const MenuAccountDropdown = ({
|
|
|
924
971
|
}
|
|
925
972
|
)
|
|
926
973
|
] });
|
|
927
|
-
}
|
|
974
|
+
}
|
|
928
975
|
}
|
|
929
976
|
)
|
|
930
977
|
] });
|
|
@@ -936,5 +983,6 @@ export {
|
|
|
936
983
|
MenuApp,
|
|
937
984
|
MenuCampaign,
|
|
938
985
|
MenuOrganization,
|
|
986
|
+
MenuRail,
|
|
939
987
|
releaseId
|
|
940
988
|
};
|