@drawbridge/components 0.1.46 → 0.1.47
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/bridge/form-subdomain-shop.js +4 -1
- package/dist/bridge/form-subdomain-shop.mjs +4 -1
- package/dist/bridge/form-subdomain.js +23 -5
- package/dist/bridge/form-subdomain.mjs +23 -5
- package/dist/bridge/lib/entry.js +41 -0
- package/dist/bridge/lib/entry.mjs +40 -0
- package/dist/bridge/product-tile.js +4 -0
- package/dist/bridge/product-tile.mjs +4 -0
- package/dist/bridge/template-layout.js +27 -8
- package/dist/bridge/template-layout.mjs +28 -9
- package/dist/bridge/template-modal.js +11 -1
- package/dist/bridge/template-modal.mjs +11 -1
- package/dist/dashboard/avatar.js +2 -3
- package/dist/dashboard/avatar.mjs +2 -3
- package/dist/dashboard/campaign-form.js +172 -153
- package/dist/dashboard/campaign-form.mjs +172 -153
- package/dist/dashboard/campaign-share.js +347 -0
- package/dist/dashboard/campaign-share.mjs +314 -0
- package/dist/dashboard/card-affiliate.js +1 -1
- package/dist/dashboard/card-affiliate.mjs +1 -1
- package/dist/dashboard/card-campaign-switch.js +4 -1
- package/dist/dashboard/card-campaign-switch.mjs +4 -1
- package/dist/dashboard/form-organization-campaign-page.js +73 -39
- package/dist/dashboard/form-organization-campaign-page.mjs +73 -39
- package/dist/dashboard/input-combobox.js +6 -0
- package/dist/dashboard/input-combobox.mjs +6 -0
- package/dist/dashboard/input-fields.js +26 -3
- package/dist/dashboard/input-fields.mjs +26 -3
- package/dist/dashboard/input-font.js +2 -0
- package/dist/dashboard/input-font.mjs +2 -0
- package/dist/dashboard/input-group-ai.js +15 -3
- package/dist/dashboard/input-group-ai.mjs +15 -3
- package/dist/dashboard/lib/ab-tests.js +2 -2
- package/dist/dashboard/lib/ab-tests.mjs +2 -2
- package/dist/dashboard/lib/menu.js +19 -0
- package/dist/dashboard/lib/menu.mjs +18 -0
- package/dist/dashboard/menu.js +13 -2
- package/dist/dashboard/menu.mjs +13 -2
- package/dist/dashboard/preview.js +119 -52
- package/dist/dashboard/preview.mjs +119 -52
- package/dist/dashboard/recharts.js +10 -4
- package/dist/dashboard/recharts.mjs +10 -4
- package/dist/dashboard/template-dashboard.js +11 -1
- package/dist/dashboard/template-dashboard.mjs +11 -1
- package/dist/dashboard/template-design.js +209 -130
- package/dist/dashboard/template-design.mjs +210 -131
- package/dist/dashboard/template-ui.js +157 -55
- package/dist/dashboard/template-ui.mjs +158 -56
- package/dist/icons/flags.js +134 -0
- package/dist/icons/flags.mjs +115 -0
- package/dist/shared/carousel.js +14 -5
- package/dist/shared/carousel.mjs +14 -5
- package/package.json +11 -1
- package/types/bridge/form-subdomain.d.ts +13 -0
- package/types/bridge/lib/entry.d.ts +5 -0
- package/types/bridge/product-tile.d.ts +2 -0
- package/types/dashboard/campaign-share.d.ts +16 -0
- package/types/dashboard/form-organization-campaign-page.d.ts +8 -1
- package/types/dashboard/input-combobox.d.ts +2 -0
- package/types/dashboard/preview.d.ts +11 -3
- package/types/icons/flags.d.ts +5 -0
|
@@ -107,11 +107,18 @@ const TemplateModal = ({
|
|
|
107
107
|
params,
|
|
108
108
|
sms: data == null ? void 0 : data.sms,
|
|
109
109
|
preview,
|
|
110
|
+
quiet: iframe,
|
|
111
|
+
// @story campaigns/form-page
|
|
112
|
+
// The Form page's preview opens the form at its step, or an agreement, with the location step still.
|
|
113
|
+
read: panel == null ? void 0 : panel.read,
|
|
114
|
+
step: panel == null ? void 0 : panel.step,
|
|
115
|
+
still: (panel == null ? void 0 : panel.step) !== void 0,
|
|
110
116
|
style,
|
|
111
117
|
submit: copy(data, "submit"),
|
|
112
118
|
tracking
|
|
113
119
|
}
|
|
114
|
-
}
|
|
120
|
+
},
|
|
121
|
+
"form-" + ((panel == null ? void 0 : panel.step) ?? "") + "-" + ((panel == null ? void 0 : panel.read) || "")
|
|
115
122
|
),
|
|
116
123
|
buttons.recaptcha()
|
|
117
124
|
] });
|
|
@@ -550,6 +557,9 @@ const TemplateModal = ({
|
|
|
550
557
|
...{
|
|
551
558
|
button: buttons.close("submission"),
|
|
552
559
|
checkout,
|
|
560
|
+
// @story campaigns/form-page
|
|
561
|
+
// The dashboard's own previews show no Preview mode line ( Darren, 2026-11-21 ).
|
|
562
|
+
quiet: iframe,
|
|
553
563
|
tracking,
|
|
554
564
|
...panel.data
|
|
555
565
|
}
|
package/dist/dashboard/avatar.js
CHANGED
|
@@ -154,9 +154,8 @@ const Avatars = ({
|
|
|
154
154
|
{
|
|
155
155
|
...{
|
|
156
156
|
href,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
157
|
+
// Impeccable audit, 2026-11-21: the plus alone is named for what it opens.
|
|
158
|
+
title: rest > 0 ? rest + " more" : "Members"
|
|
160
159
|
},
|
|
161
160
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
162
161
|
"span",
|
|
@@ -121,9 +121,8 @@ const Avatars = ({
|
|
|
121
121
|
{
|
|
122
122
|
...{
|
|
123
123
|
href,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
124
|
+
// Impeccable audit, 2026-11-21: the plus alone is named for what it opens.
|
|
125
|
+
title: rest > 0 ? rest + " more" : "Members"
|
|
127
126
|
},
|
|
128
127
|
children: /* @__PURE__ */ jsx(
|
|
129
128
|
"span",
|
|
@@ -47,6 +47,7 @@ var import_card_task = __toESM(require("./card-task"));
|
|
|
47
47
|
var import_dropdown = __toESM(require("./dropdown"));
|
|
48
48
|
var import_link = __toESM(require("./link"));
|
|
49
49
|
var import_preview = __toESM(require("./preview"));
|
|
50
|
+
var import_ab_tests = require("./lib/ab-tests");
|
|
50
51
|
var import_empty = __toESM(require("../shared/empty"));
|
|
51
52
|
var import_badge = __toESM(require("../shared/badge"));
|
|
52
53
|
var import_button = __toESM(require("../shared/button"));
|
|
@@ -1506,6 +1507,11 @@ const After = ({
|
|
|
1506
1507
|
{
|
|
1507
1508
|
...{
|
|
1508
1509
|
id: "after",
|
|
1510
|
+
// The real page's panel: the missions and advertisements shown here.
|
|
1511
|
+
page: {
|
|
1512
|
+
advertisements: ads,
|
|
1513
|
+
missions: response === "order" ? [] : missions
|
|
1514
|
+
},
|
|
1509
1515
|
states: {
|
|
1510
1516
|
onChange: setResponse,
|
|
1511
1517
|
options: messageStates,
|
|
@@ -1552,6 +1558,7 @@ const CampaignForm = ({
|
|
|
1552
1558
|
const texts = (0, import_sms.textsOn)(organization);
|
|
1553
1559
|
const currency = ((_a = organization == null ? void 0 : organization.defaults) == null ? void 0 : _a.currency) || "usd";
|
|
1554
1560
|
const documents = (0, import_react.useMemo)(() => (0, import_form_page.readableDocuments)(campaign == null ? void 0 : campaign.agreements, texts), [campaign == null ? void 0 : campaign.agreements, texts]);
|
|
1561
|
+
const version = (0, import_react.useMemo)(() => JSON.stringify([campaign == null ? void 0 : campaign.updatedAt, sections]), [campaign == null ? void 0 : campaign.updatedAt, sections]);
|
|
1555
1562
|
(0, import_react.useEffect)(() => {
|
|
1556
1563
|
if (open !== "footer") return;
|
|
1557
1564
|
actions.footer({
|
|
@@ -1630,185 +1637,197 @@ const CampaignForm = ({
|
|
|
1630
1637
|
import_provider_font.default,
|
|
1631
1638
|
{
|
|
1632
1639
|
...style,
|
|
1633
|
-
children: (fonts) =>
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
campaign,
|
|
1649
|
-
fonts,
|
|
1650
|
-
style
|
|
1640
|
+
children: (fonts) => {
|
|
1641
|
+
var _a2;
|
|
1642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1643
|
+
import_preview.SliderLayout,
|
|
1644
|
+
{
|
|
1645
|
+
...{
|
|
1646
|
+
blank: dragging,
|
|
1647
|
+
last: lastId,
|
|
1648
|
+
// @story campaigns/form-page
|
|
1649
|
+
// Every step in the campaign's real page ( Darren, 2026-11-21 ),
|
|
1650
|
+
// loaded again after each save.
|
|
1651
|
+
...((_a2 = campaign == null ? void 0 : campaign.share) == null ? void 0 : _a2.url) && {
|
|
1652
|
+
page: {
|
|
1653
|
+
url: (0, import_ab_tests.variantPreview)(campaign),
|
|
1654
|
+
version
|
|
1651
1655
|
}
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
+
},
|
|
1657
|
+
slides: (0, import_form_page.formSlides)(parts, documents.length > 0),
|
|
1658
|
+
style
|
|
1659
|
+
},
|
|
1660
|
+
children: [
|
|
1656
1661
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1657
|
-
|
|
1662
|
+
Start,
|
|
1658
1663
|
{
|
|
1659
1664
|
...{
|
|
1665
|
+
actions,
|
|
1666
|
+
campaign,
|
|
1660
1667
|
fonts,
|
|
1661
|
-
item: location,
|
|
1662
1668
|
style
|
|
1663
1669
|
}
|
|
1664
1670
|
}
|
|
1665
1671
|
),
|
|
1666
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arrow, {})
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
variant: "gray"
|
|
1676
|
-
},
|
|
1677
|
-
children: [
|
|
1678
|
-
!age && canManage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1679
|
-
Join,
|
|
1680
|
-
{
|
|
1681
|
-
...{
|
|
1682
|
-
label: "Add an age gate",
|
|
1683
|
-
onAdd: choose([addAge]),
|
|
1684
|
-
start: true
|
|
1685
|
-
}
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arrow, {}),
|
|
1673
|
+
location && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
1674
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1675
|
+
Location,
|
|
1676
|
+
{
|
|
1677
|
+
...{
|
|
1678
|
+
fonts,
|
|
1679
|
+
item: location,
|
|
1680
|
+
style
|
|
1686
1681
|
}
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1682
|
+
}
|
|
1683
|
+
),
|
|
1684
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arrow, {})
|
|
1685
|
+
] }),
|
|
1686
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1687
|
+
import_card_section.default,
|
|
1688
|
+
{
|
|
1689
|
+
...{
|
|
1690
|
+
className: "shrink-0",
|
|
1691
|
+
"data-guide": "section-fields",
|
|
1692
|
+
title: "Fields",
|
|
1693
|
+
variant: "gray"
|
|
1694
|
+
},
|
|
1695
|
+
children: [
|
|
1696
|
+
!age && canManage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1697
|
+
Join,
|
|
1698
|
+
{
|
|
1699
|
+
...{
|
|
1700
|
+
label: "Add an age gate",
|
|
1701
|
+
onAdd: choose([addAge]),
|
|
1702
|
+
start: true
|
|
1703
|
+
}
|
|
1697
1704
|
}
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
handleClassName: GRIP,
|
|
1710
|
-
handleLabel: (section) => "Move " + section.title,
|
|
1711
|
-
items: customs,
|
|
1712
|
-
onDragging: setDragging,
|
|
1713
|
-
onSort: (sorted) => actions.reorderSections(sorted.map((section) => section.id)),
|
|
1714
|
-
renderItem: (section, _index, handle) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
1715
|
-
dragging ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1716
|
-
"div",
|
|
1717
|
-
{
|
|
1718
|
-
...{
|
|
1719
|
-
className: "h-4"
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1723
|
-
Join,
|
|
1724
|
-
{
|
|
1725
|
-
...{
|
|
1726
|
-
label: "Add a section here",
|
|
1727
|
-
onAdd: middle(section.id)
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
),
|
|
1731
|
-
step(section, fonts, handle, dragging)
|
|
1732
|
-
] }),
|
|
1733
|
-
sortableElement: "div"
|
|
1705
|
+
),
|
|
1706
|
+
age && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1707
|
+
AgeStep,
|
|
1708
|
+
{
|
|
1709
|
+
...{
|
|
1710
|
+
actions,
|
|
1711
|
+
age,
|
|
1712
|
+
canManage,
|
|
1713
|
+
fonts,
|
|
1714
|
+
style
|
|
1715
|
+
}
|
|
1734
1716
|
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1717
|
+
),
|
|
1718
|
+
information && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
1719
|
+
age && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Join, {}),
|
|
1720
|
+
step(information, fonts)
|
|
1721
|
+
] }),
|
|
1722
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1723
|
+
import_sortable.default,
|
|
1740
1724
|
{
|
|
1741
1725
|
...{
|
|
1742
|
-
|
|
1726
|
+
disabled: !canManage,
|
|
1727
|
+
handleClassName: GRIP,
|
|
1728
|
+
handleLabel: (section) => "Move " + section.title,
|
|
1729
|
+
items: customs,
|
|
1730
|
+
onDragging: setDragging,
|
|
1731
|
+
onSort: (sorted) => actions.reorderSections(sorted.map((section) => section.id)),
|
|
1732
|
+
renderItem: (section, _index, handle) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
1733
|
+
dragging ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1734
|
+
"div",
|
|
1735
|
+
{
|
|
1736
|
+
...{
|
|
1737
|
+
className: "h-4"
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1741
|
+
Join,
|
|
1742
|
+
{
|
|
1743
|
+
...{
|
|
1744
|
+
label: "Add a section here",
|
|
1745
|
+
onAdd: middle(section.id)
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
),
|
|
1749
|
+
step(section, fonts, handle, dragging)
|
|
1750
|
+
] }),
|
|
1751
|
+
sortableElement: "div"
|
|
1743
1752
|
}
|
|
1744
1753
|
}
|
|
1745
|
-
)
|
|
1754
|
+
),
|
|
1755
|
+
order && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
1756
|
+
dragging ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1757
|
+
"div",
|
|
1758
|
+
{
|
|
1759
|
+
...{
|
|
1760
|
+
className: "h-4"
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1764
|
+
Join,
|
|
1765
|
+
{
|
|
1766
|
+
...{
|
|
1767
|
+
label: "Add a section here",
|
|
1768
|
+
onAdd: middle()
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
),
|
|
1772
|
+
step(order, fonts)
|
|
1773
|
+
] }),
|
|
1774
|
+
!order && canManage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1746
1775
|
Join,
|
|
1747
1776
|
{
|
|
1748
1777
|
...{
|
|
1749
|
-
|
|
1750
|
-
|
|
1778
|
+
end: true,
|
|
1779
|
+
label: "Add an order or a section here",
|
|
1780
|
+
onAdd: choose([addOrder, addSection()])
|
|
1751
1781
|
}
|
|
1752
1782
|
}
|
|
1753
1783
|
),
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
),
|
|
1766
|
-
lastId && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1767
|
-
Footer,
|
|
1768
|
-
{
|
|
1769
|
-
...{
|
|
1770
|
-
actions,
|
|
1771
|
-
campaign,
|
|
1772
|
-
phone,
|
|
1773
|
-
texts
|
|
1784
|
+
lastId && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1785
|
+
Footer,
|
|
1786
|
+
{
|
|
1787
|
+
...{
|
|
1788
|
+
actions,
|
|
1789
|
+
campaign,
|
|
1790
|
+
phone,
|
|
1791
|
+
texts
|
|
1792
|
+
}
|
|
1774
1793
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1794
|
+
),
|
|
1795
|
+
documents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1796
|
+
Agreements,
|
|
1797
|
+
{
|
|
1798
|
+
...{
|
|
1799
|
+
campaign,
|
|
1800
|
+
documents,
|
|
1801
|
+
fonts,
|
|
1802
|
+
style
|
|
1803
|
+
}
|
|
1785
1804
|
}
|
|
1805
|
+
)
|
|
1806
|
+
]
|
|
1807
|
+
}
|
|
1808
|
+
),
|
|
1809
|
+
after && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arrow, {}),
|
|
1811
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1812
|
+
After,
|
|
1813
|
+
{
|
|
1814
|
+
...{
|
|
1815
|
+
actions,
|
|
1816
|
+
after,
|
|
1817
|
+
campaign,
|
|
1818
|
+
canManage,
|
|
1819
|
+
fonts,
|
|
1820
|
+
organization,
|
|
1821
|
+
params,
|
|
1822
|
+
style
|
|
1786
1823
|
}
|
|
1787
|
-
)
|
|
1788
|
-
]
|
|
1789
|
-
}
|
|
1790
|
-
),
|
|
1791
|
-
after && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
1792
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arrow, {}),
|
|
1793
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1794
|
-
After,
|
|
1795
|
-
{
|
|
1796
|
-
...{
|
|
1797
|
-
actions,
|
|
1798
|
-
after,
|
|
1799
|
-
campaign,
|
|
1800
|
-
canManage,
|
|
1801
|
-
fonts,
|
|
1802
|
-
organization,
|
|
1803
|
-
params,
|
|
1804
|
-
style
|
|
1805
1824
|
}
|
|
1806
|
-
|
|
1807
|
-
)
|
|
1808
|
-
]
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1825
|
+
)
|
|
1826
|
+
] })
|
|
1827
|
+
]
|
|
1828
|
+
}
|
|
1829
|
+
);
|
|
1830
|
+
}
|
|
1812
1831
|
}
|
|
1813
1832
|
);
|
|
1814
1833
|
};
|