@drawbridge/components 0.1.13 → 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 +20 -7
- package/dist/dashboard/template-socket.mjs +20 -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
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
var card_integration_exports = {};
|
|
29
|
-
__export(card_integration_exports, {
|
|
30
|
-
default: () => card_integration_default
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(card_integration_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var import_react = require("react");
|
|
35
|
-
var import_external = __toESM(require("../icons/external"));
|
|
36
|
-
var import_plus = __toESM(require("../icons/plus"));
|
|
37
|
-
var import_trash = __toESM(require("../icons/trash"));
|
|
38
|
-
var import_input_switch = __toESM(require("../shared/input-switch"));
|
|
39
|
-
var import_image = __toESM(require("next/image"));
|
|
40
|
-
var import_link = __toESM(require("./link"));
|
|
41
|
-
var import_button = __toESM(require("../shared/button"));
|
|
42
|
-
const CardIntegration = ({
|
|
43
|
-
description,
|
|
44
|
-
enabled,
|
|
45
|
-
id,
|
|
46
|
-
image,
|
|
47
|
-
label,
|
|
48
|
-
link,
|
|
49
|
-
onClickDelete,
|
|
50
|
-
onClickManage,
|
|
51
|
-
settings,
|
|
52
|
-
slug,
|
|
53
|
-
task,
|
|
54
|
-
title
|
|
55
|
-
}) => {
|
|
56
|
-
const learnMore = link && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
-
import_button.default,
|
|
58
|
-
{
|
|
59
|
-
...{
|
|
60
|
-
element: import_link.default,
|
|
61
|
-
href: link,
|
|
62
|
-
icon: import_external.default,
|
|
63
|
-
inline: true,
|
|
64
|
-
size: "small",
|
|
65
|
-
target: "_blank",
|
|
66
|
-
variant: "secondary"
|
|
67
|
-
},
|
|
68
|
-
children: "Learn more"
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
...{
|
|
75
|
-
"data-guide": "section-" + slug,
|
|
76
|
-
className: "flex flex-col justify-between space-y-4 bg-white p-6 rounded border border-gray overflow-hidden"
|
|
77
|
-
},
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
80
|
-
"div",
|
|
81
|
-
{
|
|
82
|
-
...{
|
|
83
|
-
className: "space-y-6"
|
|
84
|
-
},
|
|
85
|
-
children: [
|
|
86
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
87
|
-
"div",
|
|
88
|
-
{
|
|
89
|
-
...{
|
|
90
|
-
className: "flex items-center space-x-3"
|
|
91
|
-
},
|
|
92
|
-
children: [
|
|
93
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
-
import_image.default,
|
|
95
|
-
{
|
|
96
|
-
...{
|
|
97
|
-
alt: "Integration " + label,
|
|
98
|
-
className: "rounded overflow-hidden border border-gray",
|
|
99
|
-
height: 30,
|
|
100
|
-
src: image,
|
|
101
|
-
unoptimized: true,
|
|
102
|
-
width: 30
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: title })
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
),
|
|
110
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: description })
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
task ? task : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: id ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
115
|
-
"div",
|
|
116
|
-
{
|
|
117
|
-
...{
|
|
118
|
-
className: "flex items-center justify-between"
|
|
119
|
-
},
|
|
120
|
-
children: [
|
|
121
|
-
onClickManage instanceof Function && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
-
import_input_switch.default,
|
|
123
|
-
{
|
|
124
|
-
...{
|
|
125
|
-
className: "cursor-default",
|
|
126
|
-
disabled: !Object.keys(settings).length,
|
|
127
|
-
onChange: onClickManage,
|
|
128
|
-
readOnly: true,
|
|
129
|
-
small: true,
|
|
130
|
-
value: Boolean(enabled)
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
),
|
|
134
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
135
|
-
"div",
|
|
136
|
-
{
|
|
137
|
-
...{
|
|
138
|
-
className: "flex items-center ml-auto space-x-4"
|
|
139
|
-
},
|
|
140
|
-
children: [
|
|
141
|
-
learnMore,
|
|
142
|
-
onClickDelete instanceof Function && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
143
|
-
import_button.default,
|
|
144
|
-
{
|
|
145
|
-
...{
|
|
146
|
-
"aria-label": "Delete",
|
|
147
|
-
icon: import_trash.default,
|
|
148
|
-
inline: true,
|
|
149
|
-
onClick: onClickDelete,
|
|
150
|
-
size: "small",
|
|
151
|
-
variant: "secondary"
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
)
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
161
|
-
"div",
|
|
162
|
-
{
|
|
163
|
-
...{
|
|
164
|
-
className: "flex items-center justify-end space-x-4"
|
|
165
|
-
},
|
|
166
|
-
children: [
|
|
167
|
-
learnMore,
|
|
168
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
169
|
-
import_button.default,
|
|
170
|
-
{
|
|
171
|
-
...{
|
|
172
|
-
icon: import_plus.default,
|
|
173
|
-
inline: true,
|
|
174
|
-
onClick: onClickManage,
|
|
175
|
-
size: "small"
|
|
176
|
-
},
|
|
177
|
-
children: "Add"
|
|
178
|
-
}
|
|
179
|
-
)
|
|
180
|
-
]
|
|
181
|
-
}
|
|
182
|
-
) })
|
|
183
|
-
]
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
};
|
|
187
|
-
var card_integration_default = CardIntegration;
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment } from "react";
|
|
3
|
-
import External from "../icons/external.mjs";
|
|
4
|
-
import Plus from "../icons/plus.mjs";
|
|
5
|
-
import Trash from "../icons/trash.mjs";
|
|
6
|
-
import InputSwitch from "../shared/input-switch.mjs";
|
|
7
|
-
import Image from "next/image";
|
|
8
|
-
import Link from "./link.mjs";
|
|
9
|
-
import Button from "../shared/button.mjs";
|
|
10
|
-
const CardIntegration = ({
|
|
11
|
-
description,
|
|
12
|
-
enabled,
|
|
13
|
-
id,
|
|
14
|
-
image,
|
|
15
|
-
label,
|
|
16
|
-
link,
|
|
17
|
-
onClickDelete,
|
|
18
|
-
onClickManage,
|
|
19
|
-
settings,
|
|
20
|
-
slug,
|
|
21
|
-
task,
|
|
22
|
-
title
|
|
23
|
-
}) => {
|
|
24
|
-
const learnMore = link && /* @__PURE__ */ jsx(
|
|
25
|
-
Button,
|
|
26
|
-
{
|
|
27
|
-
...{
|
|
28
|
-
element: Link,
|
|
29
|
-
href: link,
|
|
30
|
-
icon: External,
|
|
31
|
-
inline: true,
|
|
32
|
-
size: "small",
|
|
33
|
-
target: "_blank",
|
|
34
|
-
variant: "secondary"
|
|
35
|
-
},
|
|
36
|
-
children: "Learn more"
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
return /* @__PURE__ */ jsxs(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
...{
|
|
43
|
-
"data-guide": "section-" + slug,
|
|
44
|
-
className: "flex flex-col justify-between space-y-4 bg-white p-6 rounded border border-gray overflow-hidden"
|
|
45
|
-
},
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ jsxs(
|
|
48
|
-
"div",
|
|
49
|
-
{
|
|
50
|
-
...{
|
|
51
|
-
className: "space-y-6"
|
|
52
|
-
},
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ jsxs(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
...{
|
|
58
|
-
className: "flex items-center space-x-3"
|
|
59
|
-
},
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ jsx(
|
|
62
|
-
Image,
|
|
63
|
-
{
|
|
64
|
-
...{
|
|
65
|
-
alt: "Integration " + label,
|
|
66
|
-
className: "rounded overflow-hidden border border-gray",
|
|
67
|
-
height: 30,
|
|
68
|
-
src: image,
|
|
69
|
-
unoptimized: true,
|
|
70
|
-
width: 30
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
),
|
|
74
|
-
/* @__PURE__ */ jsx("h3", { children: title })
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ jsx("p", { children: description })
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
task ? task : /* @__PURE__ */ jsx(Fragment, { children: id ? /* @__PURE__ */ jsxs(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
...{
|
|
86
|
-
className: "flex items-center justify-between"
|
|
87
|
-
},
|
|
88
|
-
children: [
|
|
89
|
-
onClickManage instanceof Function && /* @__PURE__ */ jsx(
|
|
90
|
-
InputSwitch,
|
|
91
|
-
{
|
|
92
|
-
...{
|
|
93
|
-
className: "cursor-default",
|
|
94
|
-
disabled: !Object.keys(settings).length,
|
|
95
|
-
onChange: onClickManage,
|
|
96
|
-
readOnly: true,
|
|
97
|
-
small: true,
|
|
98
|
-
value: Boolean(enabled)
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
),
|
|
102
|
-
/* @__PURE__ */ jsxs(
|
|
103
|
-
"div",
|
|
104
|
-
{
|
|
105
|
-
...{
|
|
106
|
-
className: "flex items-center ml-auto space-x-4"
|
|
107
|
-
},
|
|
108
|
-
children: [
|
|
109
|
-
learnMore,
|
|
110
|
-
onClickDelete instanceof Function && /* @__PURE__ */ jsx(
|
|
111
|
-
Button,
|
|
112
|
-
{
|
|
113
|
-
...{
|
|
114
|
-
"aria-label": "Delete",
|
|
115
|
-
icon: Trash,
|
|
116
|
-
inline: true,
|
|
117
|
-
onClick: onClickDelete,
|
|
118
|
-
size: "small",
|
|
119
|
-
variant: "secondary"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
) : /* @__PURE__ */ jsxs(
|
|
129
|
-
"div",
|
|
130
|
-
{
|
|
131
|
-
...{
|
|
132
|
-
className: "flex items-center justify-end space-x-4"
|
|
133
|
-
},
|
|
134
|
-
children: [
|
|
135
|
-
learnMore,
|
|
136
|
-
/* @__PURE__ */ jsx(
|
|
137
|
-
Button,
|
|
138
|
-
{
|
|
139
|
-
...{
|
|
140
|
-
icon: Plus,
|
|
141
|
-
inline: true,
|
|
142
|
-
onClick: onClickManage,
|
|
143
|
-
size: "small"
|
|
144
|
-
},
|
|
145
|
-
children: "Add"
|
|
146
|
-
}
|
|
147
|
-
)
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
) })
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
};
|
|
155
|
-
var card_integration_default = CardIntegration;
|
|
156
|
-
export {
|
|
157
|
-
card_integration_default as default
|
|
158
|
-
};
|
package/dist/dashboard/iframe.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var iframe_exports = {};
|
|
30
|
-
__export(iframe_exports, {
|
|
31
|
-
default: () => iframe_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(iframe_exports);
|
|
34
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_react = require("react");
|
|
36
|
-
var import_loader = __toESM(require("../shared/loader"));
|
|
37
|
-
const CONTENT_WIDTH = 390;
|
|
38
|
-
const CONTENT_HEIGHT = 693;
|
|
39
|
-
const POSITION_STYLES = {
|
|
40
|
-
center: {
|
|
41
|
-
alignItems: "center",
|
|
42
|
-
transformOrigin: "center center"
|
|
43
|
-
},
|
|
44
|
-
start: {
|
|
45
|
-
alignItems: "flex-start",
|
|
46
|
-
transformOrigin: "center top"
|
|
47
|
-
},
|
|
48
|
-
end: {
|
|
49
|
-
alignItems: "flex-end",
|
|
50
|
-
transformOrigin: "center bottom"
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
const Iframe = (0, import_react.forwardRef)(({
|
|
54
|
-
className,
|
|
55
|
-
children,
|
|
56
|
-
loading: pending,
|
|
57
|
-
origin,
|
|
58
|
-
position = "center",
|
|
59
|
-
referrer,
|
|
60
|
-
src
|
|
61
|
-
}, ref) => {
|
|
62
|
-
const [loading, setLoading] = (0, import_react.useState)(true);
|
|
63
|
-
const [scale, setScale] = (0, import_react.useState)(1);
|
|
64
|
-
const containerRef = (0, import_react.useRef)(null);
|
|
65
|
-
(0, import_react.useLayoutEffect)(() => {
|
|
66
|
-
if (!containerRef.current) return;
|
|
67
|
-
const compute = (width, height) => {
|
|
68
|
-
const next = Math.round(Math.min(width / CONTENT_WIDTH, height / CONTENT_HEIGHT) * 1e3) / 1e3;
|
|
69
|
-
setScale(next);
|
|
70
|
-
};
|
|
71
|
-
const { offsetWidth, offsetHeight } = containerRef.current;
|
|
72
|
-
compute(offsetWidth, offsetHeight);
|
|
73
|
-
let timer;
|
|
74
|
-
const observer = new ResizeObserver(([entry]) => {
|
|
75
|
-
clearTimeout(timer);
|
|
76
|
-
timer = setTimeout(() => {
|
|
77
|
-
const { width, height } = entry.contentRect;
|
|
78
|
-
compute(width, height);
|
|
79
|
-
}, 150);
|
|
80
|
-
});
|
|
81
|
-
observer.observe(containerRef.current);
|
|
82
|
-
return () => {
|
|
83
|
-
observer.disconnect();
|
|
84
|
-
clearTimeout(timer);
|
|
85
|
-
};
|
|
86
|
-
}, []);
|
|
87
|
-
const onLoad = () => {
|
|
88
|
-
setLoading(false);
|
|
89
|
-
if (ref == null ? void 0 : ref.current) {
|
|
90
|
-
ref.current.contentWindow.postMessage(
|
|
91
|
-
{
|
|
92
|
-
connect: true,
|
|
93
|
-
referrer
|
|
94
|
-
},
|
|
95
|
-
origin
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
;
|
|
99
|
-
};
|
|
100
|
-
const classes = [
|
|
101
|
-
"overflow-hidden",
|
|
102
|
-
"w-full",
|
|
103
|
-
"h-full",
|
|
104
|
-
"aspect-square",
|
|
105
|
-
"md:aspect-auto",
|
|
106
|
-
className
|
|
107
|
-
];
|
|
108
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
...{
|
|
112
|
-
className: classes.join(" "),
|
|
113
|
-
ref: containerRef,
|
|
114
|
-
style: {
|
|
115
|
-
alignItems: POSITION_STYLES[position].alignItems,
|
|
116
|
-
display: "flex",
|
|
117
|
-
justifyContent: "center",
|
|
118
|
-
touchAction: "none"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
...{
|
|
125
|
-
className: "relative h-[693px] w-[390px] shrink-0 overflow-hidden rounded-xl border-4 border-black shadow-xl bg-white",
|
|
126
|
-
style: {
|
|
127
|
-
transform: `scale(${scale})`,
|
|
128
|
-
transformOrigin: POSITION_STYLES[position].transformOrigin
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
children: [
|
|
132
|
-
(pending || loading) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
133
|
-
import_loader.default,
|
|
134
|
-
{
|
|
135
|
-
...{
|
|
136
|
-
className: "bg-purple-light"
|
|
137
|
-
},
|
|
138
|
-
children: pending ? children : null
|
|
139
|
-
}
|
|
140
|
-
),
|
|
141
|
-
!pending && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
142
|
-
"iframe",
|
|
143
|
-
{
|
|
144
|
-
...{
|
|
145
|
-
className: "absolute h-full w-full",
|
|
146
|
-
onLoad,
|
|
147
|
-
ref,
|
|
148
|
-
src
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
)
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
}
|
|
156
|
-
);
|
|
157
|
-
});
|
|
158
|
-
Iframe.displayName = "Iframe";
|
|
159
|
-
var iframe_default = Iframe;
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, useLayoutEffect, useRef, useState } from "react";
|
|
4
|
-
import LoaderComponent from "../shared/loader.mjs";
|
|
5
|
-
const CONTENT_WIDTH = 390;
|
|
6
|
-
const CONTENT_HEIGHT = 693;
|
|
7
|
-
const POSITION_STYLES = {
|
|
8
|
-
center: {
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
transformOrigin: "center center"
|
|
11
|
-
},
|
|
12
|
-
start: {
|
|
13
|
-
alignItems: "flex-start",
|
|
14
|
-
transformOrigin: "center top"
|
|
15
|
-
},
|
|
16
|
-
end: {
|
|
17
|
-
alignItems: "flex-end",
|
|
18
|
-
transformOrigin: "center bottom"
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const Iframe = forwardRef(({
|
|
22
|
-
className,
|
|
23
|
-
children,
|
|
24
|
-
loading: pending,
|
|
25
|
-
origin,
|
|
26
|
-
position = "center",
|
|
27
|
-
referrer,
|
|
28
|
-
src
|
|
29
|
-
}, ref) => {
|
|
30
|
-
const [loading, setLoading] = useState(true);
|
|
31
|
-
const [scale, setScale] = useState(1);
|
|
32
|
-
const containerRef = useRef(null);
|
|
33
|
-
useLayoutEffect(() => {
|
|
34
|
-
if (!containerRef.current) return;
|
|
35
|
-
const compute = (width, height) => {
|
|
36
|
-
const next = Math.round(Math.min(width / CONTENT_WIDTH, height / CONTENT_HEIGHT) * 1e3) / 1e3;
|
|
37
|
-
setScale(next);
|
|
38
|
-
};
|
|
39
|
-
const { offsetWidth, offsetHeight } = containerRef.current;
|
|
40
|
-
compute(offsetWidth, offsetHeight);
|
|
41
|
-
let timer;
|
|
42
|
-
const observer = new ResizeObserver(([entry]) => {
|
|
43
|
-
clearTimeout(timer);
|
|
44
|
-
timer = setTimeout(() => {
|
|
45
|
-
const { width, height } = entry.contentRect;
|
|
46
|
-
compute(width, height);
|
|
47
|
-
}, 150);
|
|
48
|
-
});
|
|
49
|
-
observer.observe(containerRef.current);
|
|
50
|
-
return () => {
|
|
51
|
-
observer.disconnect();
|
|
52
|
-
clearTimeout(timer);
|
|
53
|
-
};
|
|
54
|
-
}, []);
|
|
55
|
-
const onLoad = () => {
|
|
56
|
-
setLoading(false);
|
|
57
|
-
if (ref == null ? void 0 : ref.current) {
|
|
58
|
-
ref.current.contentWindow.postMessage(
|
|
59
|
-
{
|
|
60
|
-
connect: true,
|
|
61
|
-
referrer
|
|
62
|
-
},
|
|
63
|
-
origin
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
;
|
|
67
|
-
};
|
|
68
|
-
const classes = [
|
|
69
|
-
"overflow-hidden",
|
|
70
|
-
"w-full",
|
|
71
|
-
"h-full",
|
|
72
|
-
"aspect-square",
|
|
73
|
-
"md:aspect-auto",
|
|
74
|
-
className
|
|
75
|
-
];
|
|
76
|
-
return /* @__PURE__ */ jsx(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
...{
|
|
80
|
-
className: classes.join(" "),
|
|
81
|
-
ref: containerRef,
|
|
82
|
-
style: {
|
|
83
|
-
alignItems: POSITION_STYLES[position].alignItems,
|
|
84
|
-
display: "flex",
|
|
85
|
-
justifyContent: "center",
|
|
86
|
-
touchAction: "none"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
children: /* @__PURE__ */ jsxs(
|
|
90
|
-
"div",
|
|
91
|
-
{
|
|
92
|
-
...{
|
|
93
|
-
className: "relative h-[693px] w-[390px] shrink-0 overflow-hidden rounded-xl border-4 border-black shadow-xl bg-white",
|
|
94
|
-
style: {
|
|
95
|
-
transform: `scale(${scale})`,
|
|
96
|
-
transformOrigin: POSITION_STYLES[position].transformOrigin
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
children: [
|
|
100
|
-
(pending || loading) && /* @__PURE__ */ jsx(
|
|
101
|
-
LoaderComponent,
|
|
102
|
-
{
|
|
103
|
-
...{
|
|
104
|
-
className: "bg-purple-light"
|
|
105
|
-
},
|
|
106
|
-
children: pending ? children : null
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
!pending && /* @__PURE__ */ jsx(
|
|
110
|
-
"iframe",
|
|
111
|
-
{
|
|
112
|
-
...{
|
|
113
|
-
className: "absolute h-full w-full",
|
|
114
|
-
onLoad,
|
|
115
|
-
ref,
|
|
116
|
-
src
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
)
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
});
|
|
126
|
-
Iframe.displayName = "Iframe";
|
|
127
|
-
var iframe_default = Iframe;
|
|
128
|
-
export {
|
|
129
|
-
iframe_default as default
|
|
130
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface CardIntegrationProps {
|
|
4
|
-
description?: ReactNode;
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
// Set once the integration is added to the campaign.
|
|
7
|
-
id?: string;
|
|
8
|
-
image?: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
// The Learn more url.
|
|
11
|
-
link?: string;
|
|
12
|
-
onClickDelete?: () => void;
|
|
13
|
-
onClickManage?: () => void;
|
|
14
|
-
// The switch is disabled while settings is empty. Required once id is set.
|
|
15
|
-
settings?: Record<string, unknown>;
|
|
16
|
-
slug?: string;
|
|
17
|
-
// Replaces the controls.
|
|
18
|
-
task?: ReactNode;
|
|
19
|
-
title?: ReactNode;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare const CardIntegration: ComponentType<CardIntegrationProps>;
|
|
23
|
-
|
|
24
|
-
export default CardIntegration;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface IframeProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
// Shown over the loader while `loading`.
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
// The caller is not ready: loader only, no iframe.
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
// Target origin for the { connect, referrer } message sent on load ( needs a ref ).
|
|
10
|
-
origin?: string;
|
|
11
|
-
position?: 'center' | 'start' | 'end';
|
|
12
|
-
referrer?: string;
|
|
13
|
-
src?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare const Iframe: ForwardRefExoticComponent<IframeProps & RefAttributes<HTMLIFrameElement>>;
|
|
17
|
-
|
|
18
|
-
export default Iframe;
|