@drawbridge/components 0.1.12 → 0.1.14
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 +364 -2
- package/dist/advertisement.js +3 -1
- package/dist/advertisement.mjs +3 -1
- package/dist/bridge/advertisements.js +2 -0
- package/dist/bridge/advertisements.mjs +2 -0
- package/dist/bridge/countdown.js +2 -1
- package/dist/bridge/countdown.mjs +2 -1
- package/dist/bridge/form-subdomain-embed.js +18 -20
- package/dist/bridge/form-subdomain-embed.mjs +18 -20
- package/dist/bridge/form-subdomain-header.js +24 -1
- package/dist/bridge/form-subdomain-header.mjs +24 -1
- package/dist/bridge/form-subdomain-missions.js +538 -0
- package/dist/bridge/form-subdomain-missions.mjs +502 -0
- package/dist/bridge/form-subdomain.js +530 -220
- package/dist/bridge/form-subdomain.mjs +533 -222
- package/dist/bridge/lib/entry.js +59 -0
- package/dist/bridge/lib/entry.mjs +29 -0
- package/dist/bridge/lib/location.js +38 -0
- package/dist/bridge/lib/location.mjs +13 -0
- package/dist/bridge/lib/order.js +71 -0
- package/dist/bridge/lib/order.mjs +44 -0
- package/dist/bridge/lib/url.js +9 -0
- package/dist/bridge/lib/url.mjs +7 -0
- package/dist/bridge/share-button.js +5 -3
- package/dist/bridge/share-button.mjs +5 -3
- package/dist/bridge/subdomain-content.js +7 -6
- package/dist/bridge/subdomain-content.mjs +7 -6
- package/dist/bridge/template-layout.js +59 -21
- package/dist/bridge/template-layout.mjs +59 -21
- package/dist/bridge/template-modal.js +42 -76
- package/dist/bridge/template-modal.mjs +39 -73
- package/dist/bridge/template-preview.js +208 -0
- package/dist/bridge/template-preview.mjs +173 -0
- package/dist/bridge/template-subdomain-gallery.js +6 -2
- package/dist/bridge/template-subdomain-gallery.mjs +6 -2
- package/dist/bridge/template-subdomain-link.js +6 -1
- package/dist/bridge/template-subdomain-link.mjs +6 -1
- package/dist/bridge/template-subdomain.js +20 -15
- package/dist/bridge/template-subdomain.mjs +20 -15
- package/dist/dashboard/accordion.js +74 -39
- package/dist/dashboard/accordion.mjs +74 -39
- package/dist/dashboard/avatar.js +109 -3
- package/dist/dashboard/avatar.mjs +106 -4
- package/dist/dashboard/buttons-subscription.js +384 -0
- package/dist/dashboard/buttons-subscription.mjs +349 -0
- package/dist/dashboard/card-campaign-switch.js +265 -0
- package/dist/dashboard/card-campaign-switch.mjs +231 -0
- package/dist/dashboard/card-order.js +28 -11
- package/dist/dashboard/card-order.mjs +28 -11
- package/dist/dashboard/card-section.js +26 -2
- package/dist/dashboard/card-section.mjs +26 -2
- package/dist/dashboard/card-tile.js +6 -7
- package/dist/dashboard/card-tile.mjs +6 -7
- package/dist/dashboard/connection-workflows.js +196 -0
- package/dist/dashboard/connection-workflows.mjs +162 -0
- package/dist/dashboard/device.js +95 -0
- package/dist/dashboard/device.mjs +72 -0
- package/dist/dashboard/form-admin-campaign.js +19 -50
- package/dist/dashboard/form-admin-campaign.mjs +20 -51
- package/dist/dashboard/form-ai.js +9 -6
- package/dist/dashboard/form-ai.mjs +9 -6
- package/dist/dashboard/form-auth.js +35 -25
- package/dist/dashboard/form-auth.mjs +36 -26
- package/dist/dashboard/form-file.js +10 -1
- package/dist/dashboard/form-file.mjs +10 -1
- package/dist/dashboard/form-filters-analytics.js +14 -1
- package/dist/dashboard/form-filters-analytics.mjs +15 -2
- package/dist/dashboard/form-organization-campaign-advertisement.js +15 -1
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +16 -2
- package/dist/dashboard/form-organization-campaign-agreement.js +215 -164
- package/dist/dashboard/form-organization-campaign-agreement.mjs +215 -164
- package/dist/dashboard/form-organization-campaign-field-email.js +0 -34
- package/dist/dashboard/form-organization-campaign-field-email.mjs +0 -34
- package/dist/dashboard/form-organization-campaign-field-list.js +466 -0
- package/dist/dashboard/form-organization-campaign-field-list.mjs +437 -0
- package/dist/dashboard/form-organization-campaign-field-phone.js +0 -34
- package/dist/dashboard/form-organization-campaign-field-phone.mjs +0 -34
- package/dist/dashboard/form-organization-campaign-field-remove.js +66 -0
- package/dist/dashboard/form-organization-campaign-field-remove.mjs +33 -0
- package/dist/dashboard/form-organization-campaign-integration-age.js +6 -12
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +6 -12
- package/dist/dashboard/form-organization-campaign-integration-enable.js +52 -24
- package/dist/dashboard/form-organization-campaign-integration-enable.mjs +54 -26
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +6 -12
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +6 -12
- package/dist/dashboard/form-organization-campaign-integration-gtm.js +6 -12
- package/dist/dashboard/form-organization-campaign-integration-gtm.mjs +6 -12
- package/dist/dashboard/form-organization-campaign-link.js +7 -1
- package/dist/dashboard/form-organization-campaign-link.mjs +7 -1
- package/dist/dashboard/form-organization-campaign-mission.js +291 -0
- package/dist/dashboard/form-organization-campaign-mission.mjs +258 -0
- package/dist/dashboard/form-organization-campaign-page-embed.js +13 -2
- package/dist/dashboard/form-organization-campaign-page-embed.mjs +12 -1
- package/dist/dashboard/form-organization-campaign-page.js +20 -11
- package/dist/dashboard/form-organization-campaign-page.mjs +20 -11
- package/dist/dashboard/form-organization-campaign-prize-edit.js +12 -1
- package/dist/dashboard/form-organization-campaign-prize-edit.mjs +12 -1
- package/dist/dashboard/form-organization-campaign-section.js +223 -0
- package/dist/dashboard/form-organization-campaign-section.mjs +194 -0
- package/dist/dashboard/form-organization-campaign.js +114 -469
- package/dist/dashboard/form-organization-campaign.mjs +113 -467
- package/dist/dashboard/form-organization-export.js +4 -7
- package/dist/dashboard/form-organization-export.mjs +4 -7
- package/dist/dashboard/form-organization-identity.js +46 -51
- package/dist/dashboard/form-organization-identity.mjs +46 -51
- package/dist/dashboard/form-organization-workflow.js +518 -686
- package/dist/dashboard/form-organization-workflow.mjs +517 -682
- package/dist/dashboard/form-organization.js +82 -110
- package/dist/dashboard/form-organization.mjs +81 -109
- package/dist/dashboard/form-otc.js +4 -5
- package/dist/dashboard/form-otc.mjs +4 -5
- package/dist/dashboard/form-payment-methods.js +20 -9
- package/dist/dashboard/form-payment-methods.mjs +20 -9
- package/dist/dashboard/form-stripe.js +30 -0
- package/dist/dashboard/form-stripe.mjs +26 -0
- package/dist/dashboard/input-array.js +4 -2
- package/dist/dashboard/input-array.mjs +4 -2
- package/dist/dashboard/input-combobox.js +7 -3
- package/dist/dashboard/input-combobox.mjs +7 -3
- package/dist/dashboard/input-date.js +7 -0
- package/dist/dashboard/input-date.mjs +7 -0
- package/dist/dashboard/input-fields.js +80 -20
- package/dist/dashboard/input-fields.mjs +80 -20
- package/dist/dashboard/input-file.js +21 -1
- package/dist/dashboard/input-file.mjs +21 -1
- package/dist/dashboard/input-font.js +10 -1
- package/dist/dashboard/input-font.mjs +10 -1
- package/dist/dashboard/lib/item-list.js +57 -0
- package/dist/dashboard/lib/item-list.mjs +33 -0
- package/dist/dashboard/lib/menu.js +50 -0
- package/dist/dashboard/lib/menu.mjs +26 -0
- package/dist/dashboard/locked.js +82 -0
- package/dist/dashboard/locked.mjs +53 -0
- package/dist/dashboard/menu.js +72 -19
- package/dist/dashboard/menu.mjs +72 -19
- package/dist/dashboard/note-ai.js +69 -0
- package/dist/dashboard/note-ai.mjs +36 -0
- package/dist/dashboard/preview.js +419 -0
- package/dist/dashboard/preview.mjs +384 -0
- package/dist/dashboard/steps.js +39 -13
- package/dist/dashboard/steps.mjs +37 -12
- package/dist/dashboard/table-contacts.js +136 -0
- package/dist/dashboard/table-contacts.mjs +103 -0
- package/dist/dashboard/template-not-found.js +4 -2
- package/dist/dashboard/template-not-found.mjs +4 -2
- package/dist/dashboard/template-socket.js +51 -7
- package/dist/dashboard/template-socket.mjs +51 -7
- package/dist/icons/desktop.js +46 -0
- package/dist/icons/desktop.mjs +27 -0
- package/dist/icons/phone.js +46 -0
- package/dist/icons/phone.mjs +27 -0
- package/dist/icons/puzzle-piece.js +46 -0
- package/dist/icons/puzzle-piece.mjs +27 -0
- package/dist/icons/tablet.js +46 -0
- package/dist/icons/tablet.mjs +27 -0
- package/dist/icons/users.js +46 -0
- package/dist/icons/users.mjs +27 -0
- package/dist/input-checkbox.js +1 -0
- package/dist/input-checkbox.mjs +1 -0
- package/dist/input-code.js +101 -0
- package/dist/input-code.mjs +78 -0
- package/dist/input-text.js +2 -1
- package/dist/input-text.mjs +2 -1
- package/dist/shared/input-checkbox-list.js +0 -1
- package/dist/shared/input-checkbox-list.mjs +0 -1
- package/dist/shared/input-switch.js +6 -1
- package/dist/shared/input-switch.mjs +6 -1
- package/dist/shared/lib/campaign.js +117 -0
- package/dist/shared/lib/campaign.mjs +91 -0
- package/dist/shared/lib/helpers.js +14 -2
- package/dist/shared/lib/helpers.mjs +13 -2
- package/package.json +133 -13
- package/types/bridge/form-subdomain-header.d.ts +2 -0
- package/types/bridge/form-subdomain-missions.d.ts +36 -0
- package/types/bridge/form-subdomain.d.ts +23 -1
- package/types/bridge/lib/entry.d.ts +26 -0
- package/types/bridge/lib/location.d.ts +13 -0
- package/types/bridge/lib/order.d.ts +30 -0
- package/types/bridge/lib/url.d.ts +19 -0
- package/types/bridge/template-modal.d.ts +1 -1
- package/types/bridge/template-preview.d.ts +10 -0
- package/types/bridge/template-subdomain-link.d.ts +2 -0
- package/types/dashboard/accordion.d.ts +2 -0
- package/types/dashboard/avatar.d.ts +18 -2
- package/types/dashboard/buttons-subscription.d.ts +22 -0
- package/types/dashboard/card-campaign-switch.d.ts +32 -0
- package/types/dashboard/card-order.d.ts +11 -0
- package/types/dashboard/card-section.d.ts +2 -0
- package/types/dashboard/connection-workflows.d.ts +33 -0
- package/types/dashboard/device.d.ts +12 -0
- package/types/dashboard/form-admin-campaign.d.ts +3 -2
- package/types/dashboard/form-ai.d.ts +2 -2
- package/types/dashboard/form-organization-campaign-agreement.d.ts +18 -12
- package/types/dashboard/form-organization-campaign-field-email.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-field-list.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-phone.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-field-remove.d.ts +22 -0
- package/types/dashboard/form-organization-campaign-field-select.d.ts +2 -1
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +2 -1
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +3 -3
- package/types/dashboard/form-organization-campaign-integration-enable.d.ts +3 -3
- package/types/dashboard/form-organization-campaign-mission.d.ts +40 -0
- package/types/dashboard/form-organization-campaign-section.d.ts +27 -0
- package/types/dashboard/form-organization-campaign.d.ts +27 -17
- package/types/dashboard/form-organization-identity.d.ts +2 -0
- package/types/dashboard/form-organization-workflow.d.ts +43 -47
- package/types/dashboard/form-organization.d.ts +7 -2
- package/types/dashboard/form-stripe.d.ts +3 -0
- package/types/dashboard/input-combobox.d.ts +2 -0
- package/types/dashboard/input-date.d.ts +2 -0
- package/types/dashboard/input-fields.d.ts +3 -2
- package/types/dashboard/input-file.d.ts +4 -0
- package/types/dashboard/lib/item-list.d.ts +14 -0
- package/types/dashboard/lib/menu.d.ts +17 -0
- package/types/dashboard/locked.d.ts +10 -0
- package/types/dashboard/menu.d.ts +10 -2
- package/types/dashboard/note-ai.d.ts +15 -0
- package/types/dashboard/preview.d.ts +33 -0
- package/types/dashboard/steps.d.ts +19 -4
- package/types/dashboard/table-cell-title.d.ts +2 -2
- package/types/dashboard/table-contacts.d.ts +2 -0
- package/types/icons/desktop.d.ts +5 -0
- package/types/icons/phone.d.ts +5 -0
- package/types/icons/puzzle-piece.d.ts +5 -0
- package/types/icons/tablet.d.ts +5 -0
- package/types/icons/users.d.ts +5 -0
- package/types/input-code.d.ts +23 -0
- package/types/shared/input-switch.d.ts +2 -0
- package/types/shared/lib/campaign.d.ts +35 -0
- package/types/shared/lib/helpers.d.ts +3 -0
- package/dist/dashboard/card-integration.js +0 -187
- package/dist/dashboard/card-integration.mjs +0 -158
- package/dist/dashboard/iframe.js +0 -159
- package/dist/dashboard/iframe.mjs +0 -130
- package/types/dashboard/card-integration.d.ts +0 -24
- package/types/dashboard/iframe.d.ts +0 -18
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var puzzle_piece_exports = {};
|
|
19
|
+
__export(puzzle_piece_exports, {
|
|
20
|
+
default: () => puzzle_piece_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(puzzle_piece_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
const PuzzlePiece = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
...{
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
strokeWidth: 1.5,
|
|
31
|
+
viewBox: "0 0 24 24",
|
|
32
|
+
...props
|
|
33
|
+
},
|
|
34
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
...{
|
|
38
|
+
d: "M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z",
|
|
39
|
+
strokeLinecap: "round",
|
|
40
|
+
strokeLinejoin: "round"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
var puzzle_piece_default = PuzzlePiece;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const PuzzlePiece = (props) => /* @__PURE__ */ jsx(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
...{
|
|
6
|
+
fill: "none",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
strokeWidth: 1.5,
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
...props
|
|
11
|
+
},
|
|
12
|
+
children: /* @__PURE__ */ jsx(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
15
|
+
...{
|
|
16
|
+
d: "M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z",
|
|
17
|
+
strokeLinecap: "round",
|
|
18
|
+
strokeLinejoin: "round"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
var puzzle_piece_default = PuzzlePiece;
|
|
25
|
+
export {
|
|
26
|
+
puzzle_piece_default as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var tablet_exports = {};
|
|
19
|
+
__export(tablet_exports, {
|
|
20
|
+
default: () => tablet_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(tablet_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
const Tablet = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
...{
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
strokeWidth: 1.5,
|
|
31
|
+
viewBox: "0 0 24 24",
|
|
32
|
+
...props
|
|
33
|
+
},
|
|
34
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
...{
|
|
38
|
+
d: "M6.75 2.25h10.5A2.25 2.25 0 0 1 19.5 4.5v15a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5v-15a2.25 2.25 0 0 1 2.25-2.25ZM10.5 18.75h3",
|
|
39
|
+
strokeLinecap: "round",
|
|
40
|
+
strokeLinejoin: "round"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
var tablet_default = Tablet;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const Tablet = (props) => /* @__PURE__ */ jsx(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
...{
|
|
6
|
+
fill: "none",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
strokeWidth: 1.5,
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
...props
|
|
11
|
+
},
|
|
12
|
+
children: /* @__PURE__ */ jsx(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
15
|
+
...{
|
|
16
|
+
d: "M6.75 2.25h10.5A2.25 2.25 0 0 1 19.5 4.5v15a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5v-15a2.25 2.25 0 0 1 2.25-2.25ZM10.5 18.75h3",
|
|
17
|
+
strokeLinecap: "round",
|
|
18
|
+
strokeLinejoin: "round"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
var tablet_default = Tablet;
|
|
25
|
+
export {
|
|
26
|
+
tablet_default as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var users_exports = {};
|
|
19
|
+
__export(users_exports, {
|
|
20
|
+
default: () => users_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(users_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
const Users = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
...{
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
strokeWidth: 1.5,
|
|
31
|
+
viewBox: "0 0 24 24",
|
|
32
|
+
...props
|
|
33
|
+
},
|
|
34
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
...{
|
|
38
|
+
d: "M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z",
|
|
39
|
+
strokeLinecap: "round",
|
|
40
|
+
strokeLinejoin: "round"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
var users_default = Users;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const Users = (props) => /* @__PURE__ */ jsx(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
...{
|
|
6
|
+
fill: "none",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
strokeWidth: 1.5,
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
...props
|
|
11
|
+
},
|
|
12
|
+
children: /* @__PURE__ */ jsx(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
15
|
+
...{
|
|
16
|
+
d: "M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z",
|
|
17
|
+
strokeLinecap: "round",
|
|
18
|
+
strokeLinejoin: "round"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
var users_default = Users;
|
|
25
|
+
export {
|
|
26
|
+
users_default as default
|
|
27
|
+
};
|
package/dist/input-checkbox.js
CHANGED
package/dist/input-checkbox.mjs
CHANGED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var input_code_exports = {};
|
|
20
|
+
__export(input_code_exports, {
|
|
21
|
+
codeDigits: () => codeDigits,
|
|
22
|
+
default: () => input_code_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(input_code_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_styles = require("./styles");
|
|
28
|
+
const codeDigits = (value, length = 6) => String(value ?? "").replace(/\D/g, "").slice(0, length);
|
|
29
|
+
const InputCode = ({
|
|
30
|
+
autoFocus,
|
|
31
|
+
disabled,
|
|
32
|
+
id,
|
|
33
|
+
length = 6,
|
|
34
|
+
name,
|
|
35
|
+
onChange,
|
|
36
|
+
onComplete,
|
|
37
|
+
style,
|
|
38
|
+
value
|
|
39
|
+
}) => {
|
|
40
|
+
const [focused, setFocused] = (0, import_react.useState)(false);
|
|
41
|
+
const digits = codeDigits(value, length);
|
|
42
|
+
const current = Math.min(digits.length, length - 1);
|
|
43
|
+
const box = (0, import_styles.inputStyle)(style);
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
...{
|
|
48
|
+
className: "relative flex gap-2" + (disabled ? " opacity-60" : "")
|
|
49
|
+
},
|
|
50
|
+
children: [
|
|
51
|
+
Array.from({ length }, (item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
...{
|
|
55
|
+
"aria-hidden": true,
|
|
56
|
+
className: "input flex items-center justify-center h-12 px-0 text-lg tabular-nums" + (focused && index === current ? " ring-1 ring-current" : ""),
|
|
57
|
+
style: box
|
|
58
|
+
},
|
|
59
|
+
children: digits[index] || ""
|
|
60
|
+
},
|
|
61
|
+
index
|
|
62
|
+
)),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
+
"input",
|
|
65
|
+
{
|
|
66
|
+
...{
|
|
67
|
+
// An `id` means a <label htmlFor> names it ( InputGroup's ); only a
|
|
68
|
+
// bare field names itself.
|
|
69
|
+
...!id && {
|
|
70
|
+
"aria-label": "Verification code"
|
|
71
|
+
},
|
|
72
|
+
autoComplete: "one-time-code",
|
|
73
|
+
autoFocus,
|
|
74
|
+
className: "absolute inset-0 w-full h-full opacity-0 cursor-text",
|
|
75
|
+
disabled,
|
|
76
|
+
id,
|
|
77
|
+
inputMode: "numeric",
|
|
78
|
+
maxLength: length,
|
|
79
|
+
name,
|
|
80
|
+
onBlur: () => setFocused(false),
|
|
81
|
+
onChange: ({ target }) => {
|
|
82
|
+
const next = codeDigits(target.value, length);
|
|
83
|
+
onChange == null ? void 0 : onChange(next);
|
|
84
|
+
if (next.length === length && next !== digits) onComplete == null ? void 0 : onComplete(next);
|
|
85
|
+
},
|
|
86
|
+
onFocus: () => setFocused(true),
|
|
87
|
+
pattern: "[0-9]*",
|
|
88
|
+
type: "text",
|
|
89
|
+
value: digits
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
var input_code_default = InputCode;
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
codeDigits
|
|
101
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { inputStyle } from "./styles.mjs";
|
|
5
|
+
const codeDigits = (value, length = 6) => String(value ?? "").replace(/\D/g, "").slice(0, length);
|
|
6
|
+
const InputCode = ({
|
|
7
|
+
autoFocus,
|
|
8
|
+
disabled,
|
|
9
|
+
id,
|
|
10
|
+
length = 6,
|
|
11
|
+
name,
|
|
12
|
+
onChange,
|
|
13
|
+
onComplete,
|
|
14
|
+
style,
|
|
15
|
+
value
|
|
16
|
+
}) => {
|
|
17
|
+
const [focused, setFocused] = useState(false);
|
|
18
|
+
const digits = codeDigits(value, length);
|
|
19
|
+
const current = Math.min(digits.length, length - 1);
|
|
20
|
+
const box = inputStyle(style);
|
|
21
|
+
return /* @__PURE__ */ jsxs(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
...{
|
|
25
|
+
className: "relative flex gap-2" + (disabled ? " opacity-60" : "")
|
|
26
|
+
},
|
|
27
|
+
children: [
|
|
28
|
+
Array.from({ length }, (item, index) => /* @__PURE__ */ jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
...{
|
|
32
|
+
"aria-hidden": true,
|
|
33
|
+
className: "input flex items-center justify-center h-12 px-0 text-lg tabular-nums" + (focused && index === current ? " ring-1 ring-current" : ""),
|
|
34
|
+
style: box
|
|
35
|
+
},
|
|
36
|
+
children: digits[index] || ""
|
|
37
|
+
},
|
|
38
|
+
index
|
|
39
|
+
)),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
"input",
|
|
42
|
+
{
|
|
43
|
+
...{
|
|
44
|
+
// An `id` means a <label htmlFor> names it ( InputGroup's ); only a
|
|
45
|
+
// bare field names itself.
|
|
46
|
+
...!id && {
|
|
47
|
+
"aria-label": "Verification code"
|
|
48
|
+
},
|
|
49
|
+
autoComplete: "one-time-code",
|
|
50
|
+
autoFocus,
|
|
51
|
+
className: "absolute inset-0 w-full h-full opacity-0 cursor-text",
|
|
52
|
+
disabled,
|
|
53
|
+
id,
|
|
54
|
+
inputMode: "numeric",
|
|
55
|
+
maxLength: length,
|
|
56
|
+
name,
|
|
57
|
+
onBlur: () => setFocused(false),
|
|
58
|
+
onChange: ({ target }) => {
|
|
59
|
+
const next = codeDigits(target.value, length);
|
|
60
|
+
onChange == null ? void 0 : onChange(next);
|
|
61
|
+
if (next.length === length && next !== digits) onComplete == null ? void 0 : onComplete(next);
|
|
62
|
+
},
|
|
63
|
+
onFocus: () => setFocused(true),
|
|
64
|
+
pattern: "[0-9]*",
|
|
65
|
+
type: "text",
|
|
66
|
+
value: digits
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
var input_code_default = InputCode;
|
|
75
|
+
export {
|
|
76
|
+
codeDigits,
|
|
77
|
+
input_code_default as default
|
|
78
|
+
};
|
package/dist/input-text.js
CHANGED
|
@@ -31,6 +31,7 @@ const InputText = ({
|
|
|
31
31
|
...rest
|
|
32
32
|
}) => {
|
|
33
33
|
const classes = ["input"];
|
|
34
|
+
const { backgroundColor, ...unbranded } = (0, import_styles.inputStyle)(style);
|
|
34
35
|
if (className) {
|
|
35
36
|
classes.push(className);
|
|
36
37
|
}
|
|
@@ -42,7 +43,7 @@ const InputText = ({
|
|
|
42
43
|
...rest,
|
|
43
44
|
className: classes.join(" "),
|
|
44
45
|
onChange: ({ target }) => onChange(target.value),
|
|
45
|
-
style:
|
|
46
|
+
style: rest.readOnly && !style ? unbranded : { backgroundColor, ...unbranded },
|
|
46
47
|
value
|
|
47
48
|
}
|
|
48
49
|
}
|
package/dist/input-text.mjs
CHANGED
|
@@ -9,6 +9,7 @@ const InputText = ({
|
|
|
9
9
|
...rest
|
|
10
10
|
}) => {
|
|
11
11
|
const classes = ["input"];
|
|
12
|
+
const { backgroundColor, ...unbranded } = inputStyle(style);
|
|
12
13
|
if (className) {
|
|
13
14
|
classes.push(className);
|
|
14
15
|
}
|
|
@@ -20,7 +21,7 @@ const InputText = ({
|
|
|
20
21
|
...rest,
|
|
21
22
|
className: classes.join(" "),
|
|
22
23
|
onChange: ({ target }) => onChange(target.value),
|
|
23
|
-
style:
|
|
24
|
+
style: rest.readOnly && !style ? unbranded : { backgroundColor, ...unbranded },
|
|
24
25
|
value
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -35,6 +35,7 @@ var import_react = require("@headlessui/react");
|
|
|
35
35
|
var import_button = __toESM(require("./button"));
|
|
36
36
|
var import_styles = require("../styles");
|
|
37
37
|
const InputSwitch = ({
|
|
38
|
+
"aria-label": ariaLabel,
|
|
38
39
|
disabled,
|
|
39
40
|
helper,
|
|
40
41
|
onChange,
|
|
@@ -56,7 +57,9 @@ const InputSwitch = ({
|
|
|
56
57
|
],
|
|
57
58
|
track: [
|
|
58
59
|
"flex items-center shrink-0 rounded-full border transition ease-in-out duration-200",
|
|
59
|
-
|
|
60
|
+
// Off keeps a black outline, as inputs have, so it reads on gray too
|
|
61
|
+
// (Darren, Dulce Local walk, 2026-10-29).
|
|
62
|
+
value ? "bg-black border-black" : "border-black",
|
|
60
63
|
small ? "h-7 w-11" : "h-10 w-16"
|
|
61
64
|
]
|
|
62
65
|
};
|
|
@@ -68,6 +71,8 @@ const InputSwitch = ({
|
|
|
68
71
|
import_react.Switch,
|
|
69
72
|
{
|
|
70
73
|
...{
|
|
74
|
+
// A switch with no text beside it ( a page header's ) names itself.
|
|
75
|
+
...ariaLabel && { "aria-label": ariaLabel },
|
|
71
76
|
as: import_button.default,
|
|
72
77
|
checked: value,
|
|
73
78
|
disabled,
|
|
@@ -3,6 +3,7 @@ import { Switch } from "@headlessui/react";
|
|
|
3
3
|
import Button from "./button.mjs";
|
|
4
4
|
import { buttonStyle, inputStyle, textStyle } from "../styles.mjs";
|
|
5
5
|
const InputSwitch = ({
|
|
6
|
+
"aria-label": ariaLabel,
|
|
6
7
|
disabled,
|
|
7
8
|
helper,
|
|
8
9
|
onChange,
|
|
@@ -24,7 +25,9 @@ const InputSwitch = ({
|
|
|
24
25
|
],
|
|
25
26
|
track: [
|
|
26
27
|
"flex items-center shrink-0 rounded-full border transition ease-in-out duration-200",
|
|
27
|
-
|
|
28
|
+
// Off keeps a black outline, as inputs have, so it reads on gray too
|
|
29
|
+
// (Darren, Dulce Local walk, 2026-10-29).
|
|
30
|
+
value ? "bg-black border-black" : "border-black",
|
|
28
31
|
small ? "h-7 w-11" : "h-10 w-16"
|
|
29
32
|
]
|
|
30
33
|
};
|
|
@@ -36,6 +39,8 @@ const InputSwitch = ({
|
|
|
36
39
|
Switch,
|
|
37
40
|
{
|
|
38
41
|
...{
|
|
42
|
+
// A switch with no text beside it ( a page header's ) names itself.
|
|
43
|
+
...ariaLabel && { "aria-label": ariaLabel },
|
|
39
44
|
as: Button,
|
|
40
45
|
checked: value,
|
|
41
46
|
disabled,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var campaign_exports = {};
|
|
19
|
+
__export(campaign_exports, {
|
|
20
|
+
awardingCard: () => awardingCard,
|
|
21
|
+
campaignSwitch: () => campaignSwitch,
|
|
22
|
+
campaignSwitches: () => campaignSwitches,
|
|
23
|
+
leadCapture: () => leadCapture
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(campaign_exports);
|
|
26
|
+
const campaignSwitches = (current, key, on) => {
|
|
27
|
+
const next = {
|
|
28
|
+
form: Boolean(current == null ? void 0 : current.form),
|
|
29
|
+
giveaway: Boolean(current == null ? void 0 : current.giveaway),
|
|
30
|
+
[key]: Boolean(on)
|
|
31
|
+
};
|
|
32
|
+
if (key === "giveaway" && next.giveaway) next.form = true;
|
|
33
|
+
if (key === "form" && !next.form) next.giveaway = false;
|
|
34
|
+
return next;
|
|
35
|
+
};
|
|
36
|
+
const campaignSwitch = (campaign, key, on) => {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const form = Boolean((_a = campaign == null ? void 0 : campaign.form) == null ? void 0 : _a.enabled);
|
|
39
|
+
const giveaway = Boolean((_b = campaign == null ? void 0 : campaign.giveaway) == null ? void 0 : _b.enabled);
|
|
40
|
+
const copy = {
|
|
41
|
+
form: on ? [
|
|
42
|
+
"Turn on the form?",
|
|
43
|
+
"Your pages show the entry form again and new leads are collected."
|
|
44
|
+
] : [
|
|
45
|
+
"Turn off the form?",
|
|
46
|
+
"Your pages stop showing the entry form. Leads, fields and settings are kept." + (giveaway ? " The giveaway turns off too, because entries come from the form." : "")
|
|
47
|
+
],
|
|
48
|
+
giveaway: on ? [
|
|
49
|
+
"Turn on the giveaway?",
|
|
50
|
+
"Entries are awarded while a range in your schedule is running." + (form ? "" : " The form turns on too, because entries come from the form.")
|
|
51
|
+
] : [
|
|
52
|
+
"Turn off the giveaway?",
|
|
53
|
+
"Entries stop being awarded. Prizes, schedule, missions and draws are kept, and come back when you turn it on."
|
|
54
|
+
]
|
|
55
|
+
}[key];
|
|
56
|
+
return {
|
|
57
|
+
body: {
|
|
58
|
+
[key]: {
|
|
59
|
+
enabled: Boolean(on)
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
message: copy[1],
|
|
63
|
+
title: copy[0]
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
const leadCapture = (campaign) => {
|
|
67
|
+
var _a, _b;
|
|
68
|
+
if (!((_a = campaign == null ? void 0 : campaign.form) == null ? void 0 : _a.enabled)) return "Off";
|
|
69
|
+
return ((_b = campaign == null ? void 0 : campaign.giveaway) == null ? void 0 : _b.enabled) ? "Form and Giveaway" : "Form";
|
|
70
|
+
};
|
|
71
|
+
const reasons = {
|
|
72
|
+
"No range is running": {
|
|
73
|
+
giveaway: ["No range is running", "Add a range to your schedule to start awarding entries"],
|
|
74
|
+
overview: "No range is running, so no entries are awarded"
|
|
75
|
+
},
|
|
76
|
+
"No prizes are published": {
|
|
77
|
+
giveaway: ["No prizes are published", "Publish a prize to start awarding entries"],
|
|
78
|
+
overview: "No prizes are published"
|
|
79
|
+
},
|
|
80
|
+
"No mission is on": {
|
|
81
|
+
giveaway: ["No mission is on", "Turn on a mission to start awarding entries"],
|
|
82
|
+
overview: "No mission is on"
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const awardingCard = (campaign, page = "overview") => {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
if (!((_a = campaign == null ? void 0 : campaign.giveaway) == null ? void 0 : _a.enabled)) return null;
|
|
88
|
+
const running = (((_b = campaign == null ? void 0 : campaign.range) == null ? void 0 : _b.title) || "Current range") + " is running";
|
|
89
|
+
if (campaign == null ? void 0 : campaign.awarding) {
|
|
90
|
+
return page === "giveaway" ? {
|
|
91
|
+
message: running,
|
|
92
|
+
title: "Schedule",
|
|
93
|
+
type: "success"
|
|
94
|
+
} : {
|
|
95
|
+
message: running,
|
|
96
|
+
title: "Awarding entries now",
|
|
97
|
+
type: "success"
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const first = ((campaign == null ? void 0 : campaign.awardingErrors) || []).map((error) => reasons[error == null ? void 0 : error.message]).find(Boolean) || reasons["No range is running"];
|
|
101
|
+
return page === "giveaway" ? {
|
|
102
|
+
message: first.giveaway[1],
|
|
103
|
+
title: first.giveaway[0],
|
|
104
|
+
type: "warning"
|
|
105
|
+
} : {
|
|
106
|
+
message: first.overview,
|
|
107
|
+
title: "Not awarding entries",
|
|
108
|
+
type: "warning"
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
112
|
+
0 && (module.exports = {
|
|
113
|
+
awardingCard,
|
|
114
|
+
campaignSwitch,
|
|
115
|
+
campaignSwitches,
|
|
116
|
+
leadCapture
|
|
117
|
+
});
|