@drawbridge/components 0.1.36 → 0.1.37
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 +355 -68
- package/dist/advertisement.js +20 -15
- package/dist/advertisement.mjs +20 -15
- package/dist/bridge/advertisements.js +2 -4
- package/dist/bridge/advertisements.mjs +3 -5
- package/dist/bridge/fields.js +6 -89
- package/dist/bridge/fields.mjs +7 -89
- package/dist/bridge/form-subdomain-embed.js +1 -5
- package/dist/bridge/form-subdomain-embed.mjs +1 -5
- package/dist/bridge/form-subdomain-header.js +14 -21
- package/dist/bridge/form-subdomain-header.mjs +14 -20
- package/dist/bridge/form-subdomain-issue.js +8 -17
- package/dist/bridge/form-subdomain-issue.mjs +8 -17
- package/dist/bridge/form-subdomain-missions.js +52 -58
- package/dist/bridge/form-subdomain-missions.mjs +54 -60
- package/dist/bridge/form-subdomain.js +94 -223
- package/dist/bridge/form-subdomain.mjs +96 -222
- package/dist/bridge/lib/entry.js +6 -61
- package/dist/bridge/lib/entry.mjs +5 -51
- package/dist/bridge/lib/order.js +0 -23
- package/dist/bridge/lib/order.mjs +0 -20
- package/dist/bridge/template-layout.js +2 -5
- package/dist/bridge/template-layout.mjs +3 -6
- package/dist/bridge/template-modal.js +15 -82
- package/dist/bridge/template-modal.mjs +16 -83
- package/dist/bridge/template-preview.js +208 -0
- package/dist/bridge/template-preview.mjs +173 -0
- package/dist/bridge/template-subdomain-gallery.js +75 -126
- package/dist/bridge/template-subdomain-gallery.mjs +75 -122
- package/dist/bridge/template-subdomain.js +14 -16
- package/dist/bridge/template-subdomain.mjs +15 -17
- package/dist/dashboard/avatar.js +0 -5
- package/dist/dashboard/avatar.mjs +0 -5
- package/dist/dashboard/card-affiliate.js +2 -3
- package/dist/dashboard/card-affiliate.mjs +2 -3
- package/dist/dashboard/card-campaign-switch.js +9 -34
- package/dist/dashboard/card-campaign-switch.mjs +8 -32
- package/dist/dashboard/card-connection.js +91 -51
- package/dist/dashboard/card-connection.mjs +89 -50
- package/dist/dashboard/card-order.js +14 -6
- package/dist/dashboard/card-order.mjs +14 -6
- package/dist/dashboard/card-section.js +26 -69
- package/dist/dashboard/card-section.mjs +26 -65
- package/dist/dashboard/card-tile.js +35 -3
- package/dist/dashboard/card-tile.mjs +34 -3
- package/dist/dashboard/device.js +95 -0
- package/dist/dashboard/device.mjs +72 -0
- package/dist/dashboard/drawer-subscription.js +14 -52
- package/dist/dashboard/drawer-subscription.mjs +14 -52
- package/dist/dashboard/drawer.js +3 -20
- package/dist/dashboard/drawer.mjs +4 -21
- package/dist/dashboard/dropdown.js +2 -6
- package/dist/dashboard/dropdown.mjs +2 -6
- package/dist/dashboard/form-admin-subscription-custom.js +8 -72
- package/dist/dashboard/form-admin-subscription-custom.mjs +8 -72
- package/dist/dashboard/form-ai.js +148 -0
- package/dist/dashboard/form-ai.mjs +148 -1
- package/dist/dashboard/form-filters-analytics.js +62 -85
- package/dist/dashboard/form-filters-analytics.mjs +61 -85
- package/dist/dashboard/form-organization-brand.js +13 -30
- package/dist/dashboard/form-organization-brand.mjs +13 -30
- package/dist/dashboard/form-organization-campaign-advertisement.js +112 -38
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +112 -38
- package/dist/dashboard/form-organization-campaign-agreement.js +210 -402
- package/dist/dashboard/form-organization-campaign-agreement.mjs +211 -398
- package/dist/dashboard/form-organization-campaign-field-list.js +425 -0
- package/dist/dashboard/form-organization-campaign-field-list.mjs +396 -0
- package/dist/dashboard/form-organization-campaign-field-number.js +7 -48
- package/dist/dashboard/form-organization-campaign-field-number.mjs +7 -48
- package/dist/dashboard/form-organization-campaign-field-select.js +4 -15
- package/dist/dashboard/form-organization-campaign-field-select.mjs +4 -15
- package/dist/dashboard/form-organization-campaign-field-text.js +6 -46
- package/dist/dashboard/form-organization-campaign-field-text.mjs +6 -46
- package/dist/dashboard/form-organization-campaign-field-textarea.js +13 -22
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +13 -22
- package/dist/dashboard/form-organization-campaign-integration-age.js +35 -2
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +35 -2
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +1 -4
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +1 -4
- 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 +2 -1
- package/dist/dashboard/form-organization-campaign-page-preview.mjs +2 -1
- 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 +3 -2
- package/dist/dashboard/form-organization-campaign-page-slug.mjs +3 -2
- package/dist/dashboard/form-organization-campaign-page.js +265 -168
- package/dist/dashboard/form-organization-campaign-page.mjs +266 -170
- package/dist/dashboard/form-organization-campaign-section.js +107 -125
- package/dist/dashboard/form-organization-campaign-section.mjs +107 -121
- package/dist/dashboard/form-organization-campaign.js +9 -119
- package/dist/dashboard/form-organization-campaign.mjs +9 -118
- package/dist/dashboard/form-organization-file-frame.js +1 -7
- package/dist/dashboard/form-organization-file-frame.mjs +1 -7
- package/dist/dashboard/form-organization-workflow.js +545 -589
- package/dist/dashboard/form-organization-workflow.mjs +545 -590
- package/dist/dashboard/form-organization.js +0 -22
- package/dist/dashboard/form-organization.mjs +0 -22
- package/dist/dashboard/form-verify-prize.js +34 -114
- package/dist/dashboard/form-verify-prize.mjs +34 -111
- package/dist/dashboard/google.js +1 -8
- package/dist/dashboard/google.mjs +1 -8
- package/dist/dashboard/input-array.js +0 -2
- package/dist/dashboard/input-array.mjs +0 -2
- package/dist/dashboard/input-combobox.js +9 -0
- package/dist/dashboard/input-combobox.mjs +9 -0
- package/dist/dashboard/input-date.js +8 -3
- package/dist/dashboard/input-date.mjs +8 -3
- package/dist/dashboard/input-editor.js +6 -17
- package/dist/dashboard/input-editor.mjs +6 -17
- package/dist/dashboard/input-fields.js +437 -287
- package/dist/dashboard/input-fields.mjs +436 -287
- package/dist/dashboard/input-file.js +2 -70
- package/dist/dashboard/input-file.mjs +2 -70
- package/dist/dashboard/input-font.js +55 -64
- package/dist/dashboard/input-font.mjs +55 -64
- package/dist/dashboard/input-resource.js +1 -4
- package/dist/dashboard/input-resource.mjs +1 -4
- package/dist/dashboard/item-row.js +92 -0
- package/dist/dashboard/item-row.mjs +63 -0
- package/dist/dashboard/lib/features.js +1 -1
- package/dist/dashboard/lib/features.mjs +1 -1
- package/dist/dashboard/lib/item-list.js +15 -0
- package/dist/dashboard/lib/item-list.mjs +14 -0
- package/dist/dashboard/lib/rail.js +17 -16
- package/dist/dashboard/lib/rail.mjs +16 -15
- package/dist/dashboard/lib/sms.js +2 -8
- package/dist/dashboard/lib/sms.mjs +1 -6
- package/dist/dashboard/list-resource.js +0 -2
- package/dist/dashboard/list-resource.mjs +0 -2
- package/dist/dashboard/menu.js +5 -54
- package/dist/dashboard/menu.mjs +5 -53
- package/dist/dashboard/modal.js +4 -19
- package/dist/dashboard/modal.mjs +5 -20
- package/dist/dashboard/order-sections.js +0 -4
- package/dist/dashboard/order-sections.mjs +0 -4
- package/dist/dashboard/preview.js +324 -838
- package/dist/dashboard/preview.mjs +324 -826
- package/dist/dashboard/provider-ui.js +12 -20
- package/dist/dashboard/provider-ui.mjs +13 -21
- package/dist/dashboard/recharts.js +28 -53
- package/dist/dashboard/recharts.mjs +28 -53
- package/dist/dashboard/swatch.js +0 -35
- package/dist/dashboard/swatch.mjs +0 -31
- package/dist/dashboard/table-contacts.js +10 -6
- package/dist/dashboard/table-contacts.mjs +10 -6
- package/dist/dashboard/table.js +3 -10
- package/dist/dashboard/table.mjs +3 -9
- package/dist/dashboard/template-dashboard.js +21 -13
- package/dist/dashboard/template-dashboard.mjs +21 -12
- package/dist/dashboard/template-rail.js +126 -198
- package/dist/dashboard/template-rail.mjs +125 -196
- package/dist/dashboard/template-socket.js +12 -0
- package/dist/dashboard/template-socket.mjs +12 -0
- package/dist/dashboard/template-ui.js +11 -20
- package/dist/dashboard/template-ui.mjs +13 -22
- package/dist/input-checkbox.js +1 -7
- package/dist/input-checkbox.mjs +1 -7
- package/dist/input-name.js +3 -3
- package/dist/input-name.mjs +3 -3
- package/dist/input-select.js +1 -3
- package/dist/input-select.mjs +1 -3
- package/dist/provider-font.js +3 -4
- package/dist/provider-font.mjs +3 -4
- package/dist/shared/badge.js +0 -15
- package/dist/shared/badge.mjs +0 -11
- package/dist/shared/carousel.js +7 -11
- package/dist/shared/carousel.mjs +7 -11
- package/dist/shared/lib/campaign.js +9 -3
- package/dist/shared/lib/campaign.mjs +9 -3
- package/dist/shared/lib/helpers.js +0 -24
- package/dist/shared/lib/helpers.mjs +0 -22
- package/dist/shared/lib/video.js +0 -6
- package/dist/shared/lib/video.mjs +0 -5
- package/dist/shared/sortable.js +10 -27
- package/dist/shared/sortable.mjs +10 -27
- package/dist/shared/tabs.js +1 -1
- package/dist/shared/tabs.mjs +1 -1
- package/dist/video.js +9 -127
- package/dist/video.mjs +11 -125
- package/package.json +20 -176
- package/types/bridge/fields.d.ts +1 -6
- package/types/bridge/form-subdomain-missions.d.ts +0 -2
- package/types/bridge/form-subdomain.d.ts +3 -62
- package/types/bridge/lib/entry.d.ts +7 -44
- package/types/bridge/lib/order.d.ts +2 -13
- package/types/bridge/subdomain-content.d.ts +0 -1
- package/types/bridge/template-preview.d.ts +10 -0
- package/types/bridge/template-subdomain-gallery.d.ts +1 -13
- package/types/dashboard/card-campaign-switch.d.ts +1 -20
- package/types/dashboard/card-connection.d.ts +8 -0
- package/types/dashboard/card-order.d.ts +2 -2
- package/types/dashboard/card-section.d.ts +1 -9
- package/types/dashboard/card-tile.d.ts +9 -4
- package/types/dashboard/device.d.ts +12 -0
- package/types/dashboard/drawer.d.ts +0 -3
- package/types/dashboard/form-ai.d.ts +17 -0
- package/types/dashboard/form-filters-analytics.d.ts +14 -0
- package/types/dashboard/form-organization-brand.d.ts +0 -3
- package/types/dashboard/form-organization-campaign-agreement.d.ts +10 -53
- package/types/dashboard/form-organization-campaign-field-list.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-number.d.ts +1 -4
- package/types/dashboard/form-organization-campaign-field-select.d.ts +1 -6
- package/types/dashboard/form-organization-campaign-field-text.d.ts +1 -5
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +1 -4
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +0 -2
- package/types/dashboard/form-organization-campaign-page.d.ts +15 -9
- package/types/dashboard/form-organization-campaign-section.d.ts +8 -24
- package/types/dashboard/form-organization-campaign.d.ts +0 -3
- package/types/dashboard/form-organization-workflow.d.ts +4 -3
- package/types/dashboard/form-organization.d.ts +2 -2
- package/types/dashboard/form-verify-prize.d.ts +3 -30
- package/types/dashboard/input-combobox.d.ts +2 -0
- package/types/dashboard/input-date.d.ts +2 -0
- package/types/dashboard/input-editor.d.ts +0 -9
- package/types/dashboard/input-fields.d.ts +5 -8
- package/types/dashboard/input-file.d.ts +0 -4
- package/types/dashboard/input-resource.d.ts +0 -1
- package/types/dashboard/item-row.d.ts +25 -0
- package/types/dashboard/lib/item-list.d.ts +5 -10
- package/types/dashboard/lib/rail.d.ts +1 -0
- package/types/dashboard/lib/sms.d.ts +0 -7
- package/types/dashboard/modal.d.ts +1 -3
- package/types/dashboard/preview.d.ts +10 -65
- package/types/dashboard/recharts.d.ts +0 -3
- package/types/dashboard/swatch.d.ts +0 -4
- package/types/dashboard/template-dashboard.d.ts +2 -3
- package/types/input-select.d.ts +0 -2
- package/types/shared/button.d.ts +1 -1
- package/types/shared/lib/helpers.d.ts +1 -22
- package/types/shared/lib/video.d.ts +0 -3
- package/types/shared/sortable.d.ts +0 -6
- package/types/video.d.ts +2 -18
- package/dist/bridge/form-subdomain-agreement.js +0 -165
- package/dist/bridge/form-subdomain-agreement.mjs +0 -132
- package/dist/dashboard/campaign-form.js +0 -1798
- package/dist/dashboard/campaign-form.mjs +0 -1769
- package/dist/dashboard/card-campaign-agreement.js +0 -172
- package/dist/dashboard/card-campaign-agreement.mjs +0 -139
- package/dist/dashboard/card-shortcut.js +0 -181
- package/dist/dashboard/card-shortcut.mjs +0 -152
- package/dist/dashboard/document-blocks.js +0 -305
- package/dist/dashboard/document-blocks.mjs +0 -270
- package/dist/dashboard/form-organization-campaign-advertisements.js +0 -374
- package/dist/dashboard/form-organization-campaign-advertisements.mjs +0 -345
- package/dist/dashboard/form-organization-campaign-design.js +0 -258
- package/dist/dashboard/form-organization-campaign-design.mjs +0 -223
- package/dist/dashboard/form-organization-campaign-field-item.js +0 -585
- package/dist/dashboard/form-organization-campaign-field-item.mjs +0 -552
- package/dist/dashboard/form-organization-campaign-field-skill.js +0 -359
- package/dist/dashboard/form-organization-campaign-field-skill.mjs +0 -330
- package/dist/dashboard/form-organization-campaign-footer.js +0 -178
- package/dist/dashboard/form-organization-campaign-footer.mjs +0 -149
- package/dist/dashboard/form-reposition.js +0 -396
- package/dist/dashboard/form-reposition.mjs +0 -359
- package/dist/dashboard/form-support.js +0 -189
- package/dist/dashboard/form-support.mjs +0 -160
- package/dist/dashboard/form-tests.js +0 -683
- package/dist/dashboard/form-tests.mjs +0 -646
- package/dist/dashboard/lib/ab-tests.js +0 -130
- package/dist/dashboard/lib/ab-tests.mjs +0 -94
- package/dist/dashboard/lib/focus.js +0 -93
- package/dist/dashboard/lib/focus.mjs +0 -69
- package/dist/dashboard/lib/form-page.js +0 -203
- package/dist/dashboard/lib/form-page.mjs +0 -155
- package/dist/dashboard/template-design.js +0 -564
- package/dist/dashboard/template-design.mjs +0 -531
- package/dist/dashboard/template-test-page.js +0 -436
- package/dist/dashboard/template-test-page.mjs +0 -407
- package/dist/dashboard/template-tests.js +0 -141
- package/dist/dashboard/template-tests.mjs +0 -112
- package/dist/dashboard/template-variant.js +0 -185
- package/dist/dashboard/template-variant.mjs +0 -156
- package/dist/icons/arrow-down-long.js +0 -47
- package/dist/icons/arrow-down-long.mjs +0 -28
- package/dist/icons/arrows-pointing-out.js +0 -46
- package/dist/icons/arrows-pointing-out.mjs +0 -27
- package/dist/icons/beaker.js +0 -46
- package/dist/icons/beaker.mjs +0 -27
- package/dist/icons/identification.js +0 -46
- package/dist/icons/identification.mjs +0 -27
- package/dist/icons/lifebuoy.js +0 -46
- package/dist/icons/lifebuoy.mjs +0 -27
- package/dist/icons/rectangle-group.js +0 -46
- package/dist/icons/rectangle-group.mjs +0 -27
- package/dist/icons/rectangle-stack.js +0 -46
- package/dist/icons/rectangle-stack.mjs +0 -27
- package/dist/icons/shopping-bag.js +0 -46
- package/dist/icons/shopping-bag.mjs +0 -27
- package/dist/icons/swatch.js +0 -46
- package/dist/icons/swatch.mjs +0 -27
- package/dist/icons/window.js +0 -46
- package/dist/icons/window.mjs +0 -27
- package/dist/icons/zoom-in.js +0 -46
- package/dist/icons/zoom-in.mjs +0 -27
- package/dist/input-answer.js +0 -60
- package/dist/input-answer.mjs +0 -27
- package/dist/shared/document-pieces.js +0 -295
- package/dist/shared/document-pieces.mjs +0 -260
- package/types/bridge/form-subdomain-agreement.d.ts +0 -27
- package/types/dashboard/campaign-form.d.ts +0 -42
- package/types/dashboard/card-campaign-agreement.d.ts +0 -26
- package/types/dashboard/card-shortcut.d.ts +0 -38
- package/types/dashboard/document-blocks.d.ts +0 -14
- package/types/dashboard/form-organization-campaign-advertisements.d.ts +0 -15
- package/types/dashboard/form-organization-campaign-design.d.ts +0 -46
- package/types/dashboard/form-organization-campaign-field-item.d.ts +0 -36
- package/types/dashboard/form-organization-campaign-field-skill.d.ts +0 -36
- package/types/dashboard/form-organization-campaign-footer.d.ts +0 -23
- package/types/dashboard/form-reposition.d.ts +0 -29
- package/types/dashboard/form-support.d.ts +0 -14
- package/types/dashboard/form-tests.d.ts +0 -78
- package/types/dashboard/lib/ab-tests.d.ts +0 -50
- package/types/dashboard/lib/escape.d.ts +0 -4
- package/types/dashboard/lib/focus.d.ts +0 -16
- package/types/dashboard/lib/form-page.d.ts +0 -25
- package/types/dashboard/template-design.d.ts +0 -30
- package/types/dashboard/template-test-page.d.ts +0 -69
- package/types/dashboard/template-tests.d.ts +0 -30
- package/types/dashboard/template-variant.d.ts +0 -18
- package/types/icons/arrow-down-long.d.ts +0 -5
- package/types/icons/arrows-pointing-out.d.ts +0 -5
- package/types/icons/beaker.d.ts +0 -5
- package/types/icons/identification.d.ts +0 -5
- package/types/icons/lifebuoy.d.ts +0 -5
- package/types/icons/rectangle-group.d.ts +0 -5
- package/types/icons/rectangle-stack.d.ts +0 -5
- package/types/icons/shopping-bag.d.ts +0 -5
- package/types/icons/swatch.d.ts +0 -5
- package/types/icons/window.d.ts +0 -5
- package/types/icons/zoom-in.d.ts +0 -5
- package/types/input-answer.d.ts +0 -15
- package/types/shared/document-pieces.d.ts +0 -34
- package/types/shared/lib/motion.d.ts +0 -2
|
@@ -58,7 +58,7 @@ const TemplateSubdomain = ({
|
|
|
58
58
|
style,
|
|
59
59
|
tracking
|
|
60
60
|
}) => {
|
|
61
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
61
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
62
62
|
const [scrollProgress, setScrollProgress] = (0, import_react.useState)(0);
|
|
63
63
|
(0, import_react.useEffect)(() => {
|
|
64
64
|
let ticking = false;
|
|
@@ -77,10 +77,10 @@ const TemplateSubdomain = ({
|
|
|
77
77
|
window.addEventListener("scroll", onScroll, { passive: true });
|
|
78
78
|
return () => window.removeEventListener("scroll", onScroll);
|
|
79
79
|
}, []);
|
|
80
|
-
const gallery = (
|
|
80
|
+
const gallery = (data == null ? void 0 : data.gallery) || [];
|
|
81
81
|
const countdown = (0, import_entry.giveawayOn)(data) ? data == null ? void 0 : data.countdown : null;
|
|
82
|
-
const logo = (
|
|
83
|
-
const opacity = (
|
|
82
|
+
const logo = (_a = data == null ? void 0 : data.images) == null ? void 0 : _a.logo;
|
|
83
|
+
const opacity = (_d = (_c = (_b = style == null ? void 0 : style.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) == null ? void 0 : _d.replace(")", ",.9)");
|
|
84
84
|
const controlPaddingTop = 56 - 32 * scrollProgress;
|
|
85
85
|
const controlBackgroundOpacity = 0.8 * scrollProgress;
|
|
86
86
|
const classes = (0, import_react.useMemo)(
|
|
@@ -111,12 +111,12 @@ const TemplateSubdomain = ({
|
|
|
111
111
|
...{
|
|
112
112
|
className: [
|
|
113
113
|
"relative w-full min-h-dvh",
|
|
114
|
-
...((
|
|
114
|
+
...((_e = data == null ? void 0 : data.links) == null ? void 0 : _e.length) > 0 || ((_f = data == null ? void 0 : data.products) == null ? void 0 : _f.length) > 0 ? ["space-y-4 lg:space-y-0"] : [""]
|
|
115
115
|
].join(" "),
|
|
116
116
|
style: {
|
|
117
117
|
...fonts.body,
|
|
118
118
|
...(style == null ? void 0 : style.background) && {
|
|
119
|
-
backgroundColor: (
|
|
119
|
+
backgroundColor: (_h = (_g = style == null ? void 0 : style.background) == null ? void 0 : _g.color) == null ? void 0 : _h.rgb
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
},
|
|
@@ -142,7 +142,7 @@ const TemplateSubdomain = ({
|
|
|
142
142
|
...{
|
|
143
143
|
className: "lg:hidden absolute inset-0",
|
|
144
144
|
style: {
|
|
145
|
-
background: "linear-gradient(to bottom, " + ((
|
|
145
|
+
background: "linear-gradient(to bottom, " + ((_j = (_i = style.background.color) == null ? void 0 : _i.rgb) == null ? void 0 : _j.replace(")", ", " + controlBackgroundOpacity + ")")) + ", transparent)"
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
}
|
|
@@ -164,7 +164,7 @@ const TemplateSubdomain = ({
|
|
|
164
164
|
import_image.default,
|
|
165
165
|
{
|
|
166
166
|
...{
|
|
167
|
-
alt: (0, import_helpers.imageAlt)(logo, (
|
|
167
|
+
alt: (0, import_helpers.imageAlt)(logo, (_k = data == null ? void 0 : data.descriptions) == null ? void 0 : _k.logo),
|
|
168
168
|
className: "object-cover object-center rounded-full overflow-hidden ml-1 lg:ml-0",
|
|
169
169
|
fill: true,
|
|
170
170
|
priority: true,
|
|
@@ -183,7 +183,7 @@ const TemplateSubdomain = ({
|
|
|
183
183
|
className: "flex items-center space-x-2 z-30"
|
|
184
184
|
},
|
|
185
185
|
children: [
|
|
186
|
-
((
|
|
186
|
+
((_l = data == null ? void 0 : data.products) == null ? void 0 : _l.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
|
|
187
187
|
buttons.menu
|
|
188
188
|
]
|
|
189
189
|
}
|
|
@@ -199,6 +199,7 @@ const TemplateSubdomain = ({
|
|
|
199
199
|
{
|
|
200
200
|
...{
|
|
201
201
|
compact: ((_n = data == null ? void 0 : data.links) == null ? void 0 : _n.length) > 0 || ((_o = data == null ? void 0 : data.products) == null ? void 0 : _o.length) > 0,
|
|
202
|
+
descriptions: (_p = data == null ? void 0 : data.descriptions) == null ? void 0 : _p.gallery,
|
|
202
203
|
gallery,
|
|
203
204
|
modal,
|
|
204
205
|
preview,
|
|
@@ -218,7 +219,7 @@ const TemplateSubdomain = ({
|
|
|
218
219
|
},
|
|
219
220
|
children: [
|
|
220
221
|
render,
|
|
221
|
-
|
|
222
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
222
223
|
"div",
|
|
223
224
|
{
|
|
224
225
|
...{
|
|
@@ -325,7 +326,7 @@ const TemplateSubdomain = ({
|
|
|
325
326
|
fonts,
|
|
326
327
|
gallery,
|
|
327
328
|
linksSection: ((data == null ? void 0 : data.links) || []).length > 0 ? data.links.map(({ descriptions, file, icon, slug, title, url }, key) => {
|
|
328
|
-
var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2,
|
|
329
|
+
var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2, _p2, _q, _r;
|
|
329
330
|
return (0, import_url.safeHref)(url) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
330
331
|
import_template_subdomain_link.default,
|
|
331
332
|
{
|
|
@@ -362,7 +363,7 @@ const TemplateSubdomain = ({
|
|
|
362
363
|
backgroundColor: ((_e3 = (_d3 = (_c3 = style == null ? void 0 : style.button) == null ? void 0 : _c3.background) == null ? void 0 : _d3.color) == null ? void 0 : _e3.rgb) || ((_g3 = (_f3 = style == null ? void 0 : style.text) == null ? void 0 : _f3.color) == null ? void 0 : _g3.rgb),
|
|
363
364
|
borderColor: ((_j3 = (_i3 = (_h3 = style == null ? void 0 : style.button) == null ? void 0 : _h3.background) == null ? void 0 : _i3.color) == null ? void 0 : _j3.rgb) || ((_l3 = (_k3 = style == null ? void 0 : style.text) == null ? void 0 : _k3.color) == null ? void 0 : _l3.rgb),
|
|
364
365
|
borderRadius: ((_m3 = style == null ? void 0 : style.button) == null ? void 0 : _m3.radius) != null ? style.button.radius / 4 + "px" : void 0,
|
|
365
|
-
color: ((
|
|
366
|
+
color: ((_p2 = (_o2 = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o2.color) == null ? void 0 : _p2.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
|
|
366
367
|
}
|
|
367
368
|
},
|
|
368
369
|
target: "_blank",
|
|
@@ -424,10 +425,7 @@ const TemplateSubdomain = ({
|
|
|
424
425
|
] });
|
|
425
426
|
}
|
|
426
427
|
},
|
|
427
|
-
gallery.map((item) =>
|
|
428
|
-
var _a2;
|
|
429
|
-
return (_a2 = item.file) == null ? void 0 : _a2.id;
|
|
430
|
-
}).join(",")
|
|
428
|
+
(_m = data == null ? void 0 : data.gallery) == null ? void 0 : _m.map((item) => item.id).join(",")
|
|
431
429
|
)
|
|
432
430
|
]
|
|
433
431
|
}
|
|
@@ -12,7 +12,7 @@ import Countdown from "./countdown.mjs";
|
|
|
12
12
|
import FormSubdomainShop from "./form-subdomain-shop.mjs";
|
|
13
13
|
import Image from "next/image";
|
|
14
14
|
import SubdomainContent from "./subdomain-content.mjs";
|
|
15
|
-
import {
|
|
15
|
+
import { imageAlt } from "../shared/lib/helpers.mjs";
|
|
16
16
|
const TemplateSubdomain = ({
|
|
17
17
|
buttons,
|
|
18
18
|
cart,
|
|
@@ -26,7 +26,7 @@ const TemplateSubdomain = ({
|
|
|
26
26
|
style,
|
|
27
27
|
tracking
|
|
28
28
|
}) => {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
30
30
|
const [scrollProgress, setScrollProgress] = useState(0);
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
let ticking = false;
|
|
@@ -45,10 +45,10 @@ const TemplateSubdomain = ({
|
|
|
45
45
|
window.addEventListener("scroll", onScroll, { passive: true });
|
|
46
46
|
return () => window.removeEventListener("scroll", onScroll);
|
|
47
47
|
}, []);
|
|
48
|
-
const gallery =
|
|
48
|
+
const gallery = (data == null ? void 0 : data.gallery) || [];
|
|
49
49
|
const countdown = giveawayOn(data) ? data == null ? void 0 : data.countdown : null;
|
|
50
|
-
const logo = (
|
|
51
|
-
const opacity = (
|
|
50
|
+
const logo = (_a = data == null ? void 0 : data.images) == null ? void 0 : _a.logo;
|
|
51
|
+
const opacity = (_d = (_c = (_b = style == null ? void 0 : style.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) == null ? void 0 : _d.replace(")", ",.9)");
|
|
52
52
|
const controlPaddingTop = 56 - 32 * scrollProgress;
|
|
53
53
|
const controlBackgroundOpacity = 0.8 * scrollProgress;
|
|
54
54
|
const classes = useMemo(
|
|
@@ -79,12 +79,12 @@ const TemplateSubdomain = ({
|
|
|
79
79
|
...{
|
|
80
80
|
className: [
|
|
81
81
|
"relative w-full min-h-dvh",
|
|
82
|
-
...((
|
|
82
|
+
...((_e = data == null ? void 0 : data.links) == null ? void 0 : _e.length) > 0 || ((_f = data == null ? void 0 : data.products) == null ? void 0 : _f.length) > 0 ? ["space-y-4 lg:space-y-0"] : [""]
|
|
83
83
|
].join(" "),
|
|
84
84
|
style: {
|
|
85
85
|
...fonts.body,
|
|
86
86
|
...(style == null ? void 0 : style.background) && {
|
|
87
|
-
backgroundColor: (
|
|
87
|
+
backgroundColor: (_h = (_g = style == null ? void 0 : style.background) == null ? void 0 : _g.color) == null ? void 0 : _h.rgb
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
},
|
|
@@ -110,7 +110,7 @@ const TemplateSubdomain = ({
|
|
|
110
110
|
...{
|
|
111
111
|
className: "lg:hidden absolute inset-0",
|
|
112
112
|
style: {
|
|
113
|
-
background: "linear-gradient(to bottom, " + ((
|
|
113
|
+
background: "linear-gradient(to bottom, " + ((_j = (_i = style.background.color) == null ? void 0 : _i.rgb) == null ? void 0 : _j.replace(")", ", " + controlBackgroundOpacity + ")")) + ", transparent)"
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -132,7 +132,7 @@ const TemplateSubdomain = ({
|
|
|
132
132
|
Image,
|
|
133
133
|
{
|
|
134
134
|
...{
|
|
135
|
-
alt: imageAlt(logo, (
|
|
135
|
+
alt: imageAlt(logo, (_k = data == null ? void 0 : data.descriptions) == null ? void 0 : _k.logo),
|
|
136
136
|
className: "object-cover object-center rounded-full overflow-hidden ml-1 lg:ml-0",
|
|
137
137
|
fill: true,
|
|
138
138
|
priority: true,
|
|
@@ -151,7 +151,7 @@ const TemplateSubdomain = ({
|
|
|
151
151
|
className: "flex items-center space-x-2 z-30"
|
|
152
152
|
},
|
|
153
153
|
children: [
|
|
154
|
-
((
|
|
154
|
+
((_l = data == null ? void 0 : data.products) == null ? void 0 : _l.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
|
|
155
155
|
buttons.menu
|
|
156
156
|
]
|
|
157
157
|
}
|
|
@@ -167,6 +167,7 @@ const TemplateSubdomain = ({
|
|
|
167
167
|
{
|
|
168
168
|
...{
|
|
169
169
|
compact: ((_n = data == null ? void 0 : data.links) == null ? void 0 : _n.length) > 0 || ((_o = data == null ? void 0 : data.products) == null ? void 0 : _o.length) > 0,
|
|
170
|
+
descriptions: (_p = data == null ? void 0 : data.descriptions) == null ? void 0 : _p.gallery,
|
|
170
171
|
gallery,
|
|
171
172
|
modal,
|
|
172
173
|
preview,
|
|
@@ -186,7 +187,7 @@ const TemplateSubdomain = ({
|
|
|
186
187
|
},
|
|
187
188
|
children: [
|
|
188
189
|
render,
|
|
189
|
-
|
|
190
|
+
/* @__PURE__ */ jsxs(
|
|
190
191
|
"div",
|
|
191
192
|
{
|
|
192
193
|
...{
|
|
@@ -293,7 +294,7 @@ const TemplateSubdomain = ({
|
|
|
293
294
|
fonts,
|
|
294
295
|
gallery,
|
|
295
296
|
linksSection: ((data == null ? void 0 : data.links) || []).length > 0 ? data.links.map(({ descriptions, file, icon, slug, title, url }, key) => {
|
|
296
|
-
var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2,
|
|
297
|
+
var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2, _p2, _q, _r;
|
|
297
298
|
return safeHref(url) && /* @__PURE__ */ jsx(
|
|
298
299
|
TemplateSubdomainLink,
|
|
299
300
|
{
|
|
@@ -330,7 +331,7 @@ const TemplateSubdomain = ({
|
|
|
330
331
|
backgroundColor: ((_e3 = (_d3 = (_c3 = style == null ? void 0 : style.button) == null ? void 0 : _c3.background) == null ? void 0 : _d3.color) == null ? void 0 : _e3.rgb) || ((_g3 = (_f3 = style == null ? void 0 : style.text) == null ? void 0 : _f3.color) == null ? void 0 : _g3.rgb),
|
|
331
332
|
borderColor: ((_j3 = (_i3 = (_h3 = style == null ? void 0 : style.button) == null ? void 0 : _h3.background) == null ? void 0 : _i3.color) == null ? void 0 : _j3.rgb) || ((_l3 = (_k3 = style == null ? void 0 : style.text) == null ? void 0 : _k3.color) == null ? void 0 : _l3.rgb),
|
|
332
333
|
borderRadius: ((_m3 = style == null ? void 0 : style.button) == null ? void 0 : _m3.radius) != null ? style.button.radius / 4 + "px" : void 0,
|
|
333
|
-
color: ((
|
|
334
|
+
color: ((_p2 = (_o2 = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o2.color) == null ? void 0 : _p2.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
|
|
334
335
|
}
|
|
335
336
|
},
|
|
336
337
|
target: "_blank",
|
|
@@ -392,10 +393,7 @@ const TemplateSubdomain = ({
|
|
|
392
393
|
] });
|
|
393
394
|
}
|
|
394
395
|
},
|
|
395
|
-
gallery.map((item) =>
|
|
396
|
-
var _a2;
|
|
397
|
-
return (_a2 = item.file) == null ? void 0 : _a2.id;
|
|
398
|
-
}).join(",")
|
|
396
|
+
(_m = data == null ? void 0 : data.gallery) == null ? void 0 : _m.map((item) => item.id).join(",")
|
|
399
397
|
)
|
|
400
398
|
]
|
|
401
399
|
}
|
package/dist/dashboard/avatar.js
CHANGED
|
@@ -70,11 +70,6 @@ const Avatar = ({
|
|
|
70
70
|
...{
|
|
71
71
|
alt: name || title || email || "",
|
|
72
72
|
fill: true,
|
|
73
|
-
// A large avatar heads its page ( the account, a member ) and can be
|
|
74
|
-
// its largest paint: load it at once ( the console's LCP warning ).
|
|
75
|
-
...size === "large" && {
|
|
76
|
-
loading: "eager"
|
|
77
|
-
},
|
|
78
73
|
sizes: px + "px",
|
|
79
74
|
src,
|
|
80
75
|
unoptimized: Boolean(url)
|
|
@@ -37,11 +37,6 @@ const Avatar = ({
|
|
|
37
37
|
...{
|
|
38
38
|
alt: name || title || email || "",
|
|
39
39
|
fill: true,
|
|
40
|
-
// A large avatar heads its page ( the account, a member ) and can be
|
|
41
|
-
// its largest paint: load it at once ( the console's LCP warning ).
|
|
42
|
-
...size === "large" && {
|
|
43
|
-
loading: "eager"
|
|
44
|
-
},
|
|
45
40
|
sizes: px + "px",
|
|
46
41
|
src,
|
|
47
42
|
unoptimized: Boolean(url)
|
|
@@ -143,7 +143,7 @@ const CardAffiliate = ({
|
|
|
143
143
|
{
|
|
144
144
|
affiliate: affiliate == null ? void 0 : affiliate.id,
|
|
145
145
|
campaign: page == null ? void 0 : page.campaign,
|
|
146
|
-
|
|
146
|
+
page: page == null ? void 0 : page.id
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
encodeValuesOnly: true
|
|
@@ -227,8 +227,7 @@ const CardAffiliate = ({
|
|
|
227
227
|
{
|
|
228
228
|
...{
|
|
229
229
|
element: import_link.default,
|
|
230
|
-
|
|
231
|
-
href: "/organizations/" + (page == null ? void 0 : page.organization) + "/campaigns/" + (page == null ? void 0 : page.campaign) + "/page",
|
|
230
|
+
href: "/organizations/" + (page == null ? void 0 : page.organization) + "/campaigns/" + (page == null ? void 0 : page.campaign) + "/pages/" + (page == null ? void 0 : page.id),
|
|
232
231
|
inline: true,
|
|
233
232
|
variant: "link"
|
|
234
233
|
},
|
|
@@ -111,7 +111,7 @@ const CardAffiliate = ({
|
|
|
111
111
|
{
|
|
112
112
|
affiliate: affiliate == null ? void 0 : affiliate.id,
|
|
113
113
|
campaign: page == null ? void 0 : page.campaign,
|
|
114
|
-
|
|
114
|
+
page: page == null ? void 0 : page.id
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
117
|
encodeValuesOnly: true
|
|
@@ -195,8 +195,7 @@ const CardAffiliate = ({
|
|
|
195
195
|
{
|
|
196
196
|
...{
|
|
197
197
|
element: Link,
|
|
198
|
-
|
|
199
|
-
href: "/organizations/" + (page == null ? void 0 : page.organization) + "/campaigns/" + (page == null ? void 0 : page.campaign) + "/page",
|
|
198
|
+
href: "/organizations/" + (page == null ? void 0 : page.organization) + "/campaigns/" + (page == null ? void 0 : page.campaign) + "/pages/" + (page == null ? void 0 : page.id),
|
|
200
199
|
inline: true,
|
|
201
200
|
variant: "link"
|
|
202
201
|
},
|
|
@@ -28,8 +28,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
28
28
|
var card_campaign_switch_exports = {};
|
|
29
29
|
__export(card_campaign_switch_exports, {
|
|
30
30
|
CardLeadCapture: () => CardLeadCapture,
|
|
31
|
-
HeaderCampaignSwitch: () => HeaderCampaignSwitch
|
|
32
|
-
SwitchRow: () => SwitchRow
|
|
31
|
+
HeaderCampaignSwitch: () => HeaderCampaignSwitch
|
|
33
32
|
});
|
|
34
33
|
module.exports = __toCommonJS(card_campaign_switch_exports);
|
|
35
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -43,8 +42,6 @@ var import_form_action = __toESM(require("./form-action"));
|
|
|
43
42
|
var import_input_switch = __toESM(require("../shared/input-switch"));
|
|
44
43
|
var import_tooltip = __toESM(require("../shared/tooltip"));
|
|
45
44
|
var import_lock = __toESM(require("../icons/lock"));
|
|
46
|
-
var import_button = __toESM(require("../shared/button"));
|
|
47
|
-
var import_link = __toESM(require("./link"));
|
|
48
45
|
const useCampaignSwitch = ({ campaign, onError, onSuccess }) => {
|
|
49
46
|
const queryClient = (0, import_react_query.useQueryClient)();
|
|
50
47
|
const modal = (0, import_hooks.useModal)({
|
|
@@ -52,22 +49,16 @@ const useCampaignSwitch = ({ campaign, onError, onSuccess }) => {
|
|
|
52
49
|
});
|
|
53
50
|
return (key, on) => {
|
|
54
51
|
const { body, message, title } = (0, import_campaign.campaignSwitch)(campaign, key, on);
|
|
55
|
-
const send = () => (0, import_fetch.request)({
|
|
56
|
-
body,
|
|
57
|
-
endpoint: "/organization/" + (campaign == null ? void 0 : campaign.organization) + "/campaign/" + (campaign == null ? void 0 : campaign.id),
|
|
58
|
-
method: "PUT"
|
|
59
|
-
});
|
|
60
|
-
if (key === "giveaway" && on && (campaign == null ? void 0 : campaign.ordering)) {
|
|
61
|
-
send().then(onSuccess, onError);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
;
|
|
65
52
|
modal.open({
|
|
66
53
|
message: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
54
|
import_form_action.default,
|
|
68
55
|
{
|
|
69
56
|
...{
|
|
70
|
-
callback:
|
|
57
|
+
callback: () => (0, import_fetch.request)({
|
|
58
|
+
body,
|
|
59
|
+
endpoint: "/organization/" + (campaign == null ? void 0 : campaign.organization) + "/campaign/" + (campaign == null ? void 0 : campaign.id),
|
|
60
|
+
method: "PUT"
|
|
61
|
+
}),
|
|
71
62
|
onError,
|
|
72
63
|
onSuccess
|
|
73
64
|
},
|
|
@@ -108,7 +99,7 @@ const SwitchLock = ({ disabled, onChange, value }) => /* @__PURE__ */ (0, import
|
|
|
108
99
|
]
|
|
109
100
|
}
|
|
110
101
|
);
|
|
111
|
-
const
|
|
102
|
+
const Row = ({ description, lock, onChange, title, value }) => {
|
|
112
103
|
const input = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
113
104
|
SwitchLock,
|
|
114
105
|
{
|
|
@@ -146,19 +137,6 @@ const SwitchRow = ({ description, href, lock, onChange, title, value }) => {
|
|
|
146
137
|
]
|
|
147
138
|
}
|
|
148
139
|
),
|
|
149
|
-
href && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
150
|
-
import_button.default,
|
|
151
|
-
{
|
|
152
|
-
...{
|
|
153
|
-
element: import_link.default,
|
|
154
|
-
href,
|
|
155
|
-
inline: true,
|
|
156
|
-
size: "small",
|
|
157
|
-
variant: "secondary"
|
|
158
|
-
},
|
|
159
|
-
children: "Manage"
|
|
160
|
-
}
|
|
161
|
-
),
|
|
162
140
|
lock ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
163
141
|
import_tooltip.default,
|
|
164
142
|
{
|
|
@@ -220,7 +198,6 @@ const HeaderCampaignSwitch = ({
|
|
|
220
198
|
const CardLeadCapture = ({
|
|
221
199
|
campaign,
|
|
222
200
|
disabled,
|
|
223
|
-
hrefs,
|
|
224
201
|
onError,
|
|
225
202
|
onSuccess
|
|
226
203
|
}) => {
|
|
@@ -272,11 +249,10 @@ const CardLeadCapture = ({
|
|
|
272
249
|
children: rows.map(({ description, key, title }) => {
|
|
273
250
|
var _a;
|
|
274
251
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
275
|
-
|
|
252
|
+
Row,
|
|
276
253
|
{
|
|
277
254
|
...{
|
|
278
255
|
description,
|
|
279
|
-
href: hrefs == null ? void 0 : hrefs[key],
|
|
280
256
|
lock: (0, import_campaign.switchLock)(campaign, key, disabled),
|
|
281
257
|
onChange: (value) => flip(key, value),
|
|
282
258
|
title,
|
|
@@ -297,6 +273,5 @@ const CardLeadCapture = ({
|
|
|
297
273
|
// Annotate the CommonJS export names for ESM import in node:
|
|
298
274
|
0 && (module.exports = {
|
|
299
275
|
CardLeadCapture,
|
|
300
|
-
HeaderCampaignSwitch
|
|
301
|
-
SwitchRow
|
|
276
|
+
HeaderCampaignSwitch
|
|
302
277
|
});
|
|
@@ -9,8 +9,6 @@ import FormAction from "./form-action.mjs";
|
|
|
9
9
|
import InputSwitch from "../shared/input-switch.mjs";
|
|
10
10
|
import Tooltip from "../shared/tooltip.mjs";
|
|
11
11
|
import Lock from "../icons/lock.mjs";
|
|
12
|
-
import Button from "../shared/button.mjs";
|
|
13
|
-
import Link from "./link.mjs";
|
|
14
12
|
const useCampaignSwitch = ({ campaign, onError, onSuccess }) => {
|
|
15
13
|
const queryClient = useQueryClient();
|
|
16
14
|
const modal = useModal({
|
|
@@ -18,22 +16,16 @@ const useCampaignSwitch = ({ campaign, onError, onSuccess }) => {
|
|
|
18
16
|
});
|
|
19
17
|
return (key, on) => {
|
|
20
18
|
const { body, message, title } = campaignSwitch(campaign, key, on);
|
|
21
|
-
const send = () => request({
|
|
22
|
-
body,
|
|
23
|
-
endpoint: "/organization/" + (campaign == null ? void 0 : campaign.organization) + "/campaign/" + (campaign == null ? void 0 : campaign.id),
|
|
24
|
-
method: "PUT"
|
|
25
|
-
});
|
|
26
|
-
if (key === "giveaway" && on && (campaign == null ? void 0 : campaign.ordering)) {
|
|
27
|
-
send().then(onSuccess, onError);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
;
|
|
31
19
|
modal.open({
|
|
32
20
|
message: /* @__PURE__ */ jsx(
|
|
33
21
|
FormAction,
|
|
34
22
|
{
|
|
35
23
|
...{
|
|
36
|
-
callback:
|
|
24
|
+
callback: () => request({
|
|
25
|
+
body,
|
|
26
|
+
endpoint: "/organization/" + (campaign == null ? void 0 : campaign.organization) + "/campaign/" + (campaign == null ? void 0 : campaign.id),
|
|
27
|
+
method: "PUT"
|
|
28
|
+
}),
|
|
37
29
|
onError,
|
|
38
30
|
onSuccess
|
|
39
31
|
},
|
|
@@ -74,7 +66,7 @@ const SwitchLock = ({ disabled, onChange, value }) => /* @__PURE__ */ jsxs(
|
|
|
74
66
|
]
|
|
75
67
|
}
|
|
76
68
|
);
|
|
77
|
-
const
|
|
69
|
+
const Row = ({ description, lock, onChange, title, value }) => {
|
|
78
70
|
const input = /* @__PURE__ */ jsx(
|
|
79
71
|
SwitchLock,
|
|
80
72
|
{
|
|
@@ -112,19 +104,6 @@ const SwitchRow = ({ description, href, lock, onChange, title, value }) => {
|
|
|
112
104
|
]
|
|
113
105
|
}
|
|
114
106
|
),
|
|
115
|
-
href && /* @__PURE__ */ jsx(
|
|
116
|
-
Button,
|
|
117
|
-
{
|
|
118
|
-
...{
|
|
119
|
-
element: Link,
|
|
120
|
-
href,
|
|
121
|
-
inline: true,
|
|
122
|
-
size: "small",
|
|
123
|
-
variant: "secondary"
|
|
124
|
-
},
|
|
125
|
-
children: "Manage"
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
107
|
lock ? /* @__PURE__ */ jsx(
|
|
129
108
|
Tooltip,
|
|
130
109
|
{
|
|
@@ -186,7 +165,6 @@ const HeaderCampaignSwitch = ({
|
|
|
186
165
|
const CardLeadCapture = ({
|
|
187
166
|
campaign,
|
|
188
167
|
disabled,
|
|
189
|
-
hrefs,
|
|
190
168
|
onError,
|
|
191
169
|
onSuccess
|
|
192
170
|
}) => {
|
|
@@ -238,11 +216,10 @@ const CardLeadCapture = ({
|
|
|
238
216
|
children: rows.map(({ description, key, title }) => {
|
|
239
217
|
var _a;
|
|
240
218
|
return /* @__PURE__ */ jsx(
|
|
241
|
-
|
|
219
|
+
Row,
|
|
242
220
|
{
|
|
243
221
|
...{
|
|
244
222
|
description,
|
|
245
|
-
href: hrefs == null ? void 0 : hrefs[key],
|
|
246
223
|
lock: switchLock(campaign, key, disabled),
|
|
247
224
|
onChange: (value) => flip(key, value),
|
|
248
225
|
title,
|
|
@@ -262,6 +239,5 @@ const CardLeadCapture = ({
|
|
|
262
239
|
};
|
|
263
240
|
export {
|
|
264
241
|
CardLeadCapture,
|
|
265
|
-
HeaderCampaignSwitch
|
|
266
|
-
SwitchRow
|
|
242
|
+
HeaderCampaignSwitch
|
|
267
243
|
};
|