@drawbridge/components 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bridge/form-subdomain-embed.js +1 -0
- package/dist/bridge/form-subdomain-embed.mjs +1 -0
- package/dist/bridge/form-subdomain.js +5 -2
- package/dist/bridge/form-subdomain.mjs +5 -2
- package/dist/bridge/template-modal.js +2 -2
- package/dist/bridge/template-modal.mjs +2 -2
- package/dist/dashboard/buttons-subscription.js +27 -66
- package/dist/dashboard/buttons-subscription.mjs +27 -65
- package/dist/dashboard/card-payment-method.js +1 -1
- package/dist/dashboard/card-payment-method.mjs +1 -1
- package/dist/dashboard/card-section.js +2 -2
- package/dist/dashboard/card-section.mjs +2 -2
- package/dist/dashboard/card-setting.js +3 -4
- package/dist/dashboard/card-setting.mjs +3 -4
- package/dist/dashboard/card-task.js +4 -22
- package/dist/dashboard/card-task.mjs +4 -22
- package/dist/dashboard/card-tile.js +6 -6
- package/dist/dashboard/card-tile.mjs +6 -6
- package/dist/dashboard/drawer.js +2 -7
- package/dist/dashboard/drawer.mjs +3 -8
- package/dist/dashboard/form-organization-campaign-integration-gtm.js +6 -5
- package/dist/dashboard/form-organization-campaign-integration-gtm.mjs +6 -5
- package/dist/dashboard/form-organization-campaign.js +1 -1
- package/dist/dashboard/form-organization-campaign.mjs +1 -1
- package/dist/dashboard/form-organization-identity.js +3 -3
- package/dist/dashboard/form-organization-identity.mjs +3 -3
- package/dist/dashboard/form-organization-workflow.js +9 -7
- package/dist/dashboard/form-organization-workflow.mjs +9 -7
- package/dist/dashboard/form-organization.js +40 -3
- package/dist/dashboard/form-organization.mjs +40 -3
- package/dist/dashboard/guide.js +238 -0
- package/dist/dashboard/guide.mjs +209 -0
- package/dist/dashboard/input-combobox.js +2 -7
- package/dist/dashboard/input-combobox.mjs +2 -7
- package/dist/dashboard/list.js +1 -1
- package/dist/dashboard/list.mjs +1 -1
- package/dist/dashboard/menu.js +96 -188
- package/dist/dashboard/menu.mjs +97 -189
- package/dist/dashboard/modal.js +3 -9
- package/dist/dashboard/modal.mjs +4 -10
- package/dist/dashboard/notice.js +3 -5
- package/dist/dashboard/notice.mjs +3 -5
- package/dist/dashboard/table-cell-title.js +0 -2
- package/dist/dashboard/table-cell-title.mjs +0 -2
- package/dist/dashboard/table.js +20 -61
- package/dist/dashboard/table.mjs +20 -61
- package/dist/dashboard/template-dashboard.js +133 -35
- package/dist/dashboard/template-dashboard.mjs +134 -36
- package/dist/dashboard/template-socket.js +3 -19
- package/dist/dashboard/template-socket.mjs +3 -19
- package/dist/dashboard/template-ui.js +186 -150
- package/dist/dashboard/template-ui.mjs +187 -151
- package/dist/shared/lib/helpers.js +2 -9
- package/dist/shared/lib/helpers.mjs +2 -9
- package/dist/shared/overlay.js +3 -5
- package/dist/shared/overlay.mjs +3 -5
- package/package.json +13 -28
- package/types/dashboard/card-task.d.ts +1 -5
- package/types/dashboard/guide.d.ts +23 -0
- package/types/dashboard/table.d.ts +1 -3
- package/types/dashboard/template-dashboard.d.ts +1 -4
- package/types/dashboard/template-ui.d.ts +2 -2
- package/dist/dashboard/lib/escape.js +0 -48
- package/dist/dashboard/lib/escape.mjs +0 -25
- package/dist/dashboard/lib/rail.js +0 -75
- package/dist/dashboard/lib/rail.mjs +0 -46
- package/dist/dashboard/lib/throttle.js +0 -57
- package/dist/dashboard/lib/throttle.mjs +0 -34
- package/dist/dashboard/template-rail.js +0 -674
- package/dist/dashboard/template-rail.mjs +0 -640
- package/dist/icons/book-open.js +0 -46
- package/dist/icons/book-open.mjs +0 -27
- package/dist/icons/task.js +0 -46
- package/dist/icons/task.mjs +0 -27
- package/dist/shared/lib/motion.js +0 -27
- package/dist/shared/lib/motion.mjs +0 -4
- package/types/dashboard/lib/rail.d.ts +0 -32
- package/types/dashboard/lib/throttle.d.ts +0 -5
- package/types/dashboard/template-rail.d.ts +0 -36
- package/types/icons/book-open.d.ts +0 -5
- package/types/icons/task.d.ts +0 -5
|
@@ -824,7 +824,7 @@ const FormSubdomainSection = ({
|
|
|
824
824
|
const lists = fields.filter((field) => (field == null ? void 0 : field.slug) === "list");
|
|
825
825
|
const prices = ((_a = section == null ? void 0 : section.settings) == null ? void 0 : _a.prices) !== false;
|
|
826
826
|
const currency = ((_b = section == null ? void 0 : section.settings) == null ? void 0 : _b.currency) || "usd";
|
|
827
|
-
const smsConsent = Boolean(last) && (Boolean((_d = (_c = values == null ? void 0 : values.agreements) == null ? void 0 : _c.sms) == null ? void 0 : _d.enabled) || slugs.includes("phone"));
|
|
827
|
+
const smsConsent = Boolean(last) && (values == null ? void 0 : values.sms) !== false && (Boolean((_d = (_c = values == null ? void 0 : values.agreements) == null ? void 0 : _c.sms) == null ? void 0 : _d.enabled) || slugs.includes("phone"));
|
|
828
828
|
const marketingConsent = Boolean(last) && Boolean((_f = (_e = values == null ? void 0 : values.agreements) == null ? void 0 : _e.marketing) == null ? void 0 : _f.enabled);
|
|
829
829
|
const termsConsent = Boolean(last) && Boolean((_h = (_g = values == null ? void 0 : values.agreements) == null ? void 0 : _g.terms) == null ? void 0 : _h.enabled);
|
|
830
830
|
const schema = (0, import_react.useMemo)(
|
|
@@ -1141,6 +1141,8 @@ const FormSubdomain = ({
|
|
|
1141
1141
|
},
|
|
1142
1142
|
params,
|
|
1143
1143
|
preview,
|
|
1144
|
+
// The share payload's `sms` : false while texts are off on the platform.
|
|
1145
|
+
sms,
|
|
1144
1146
|
step: start = 0,
|
|
1145
1147
|
style,
|
|
1146
1148
|
tracking
|
|
@@ -1289,7 +1291,8 @@ const FormSubdomain = ({
|
|
|
1289
1291
|
slugs,
|
|
1290
1292
|
style,
|
|
1291
1293
|
values: {
|
|
1292
|
-
agreements
|
|
1294
|
+
agreements,
|
|
1295
|
+
sms
|
|
1293
1296
|
}
|
|
1294
1297
|
}
|
|
1295
1298
|
},
|
|
@@ -790,7 +790,7 @@ const FormSubdomainSection = ({
|
|
|
790
790
|
const lists = fields.filter((field) => (field == null ? void 0 : field.slug) === "list");
|
|
791
791
|
const prices = ((_a = section == null ? void 0 : section.settings) == null ? void 0 : _a.prices) !== false;
|
|
792
792
|
const currency = ((_b = section == null ? void 0 : section.settings) == null ? void 0 : _b.currency) || "usd";
|
|
793
|
-
const smsConsent = Boolean(last) && (Boolean((_d = (_c = values == null ? void 0 : values.agreements) == null ? void 0 : _c.sms) == null ? void 0 : _d.enabled) || slugs.includes("phone"));
|
|
793
|
+
const smsConsent = Boolean(last) && (values == null ? void 0 : values.sms) !== false && (Boolean((_d = (_c = values == null ? void 0 : values.agreements) == null ? void 0 : _c.sms) == null ? void 0 : _d.enabled) || slugs.includes("phone"));
|
|
794
794
|
const marketingConsent = Boolean(last) && Boolean((_f = (_e = values == null ? void 0 : values.agreements) == null ? void 0 : _e.marketing) == null ? void 0 : _f.enabled);
|
|
795
795
|
const termsConsent = Boolean(last) && Boolean((_h = (_g = values == null ? void 0 : values.agreements) == null ? void 0 : _g.terms) == null ? void 0 : _h.enabled);
|
|
796
796
|
const schema = useMemo(
|
|
@@ -1107,6 +1107,8 @@ const FormSubdomain = ({
|
|
|
1107
1107
|
},
|
|
1108
1108
|
params,
|
|
1109
1109
|
preview,
|
|
1110
|
+
// The share payload's `sms` : false while texts are off on the platform.
|
|
1111
|
+
sms,
|
|
1110
1112
|
step: start = 0,
|
|
1111
1113
|
style,
|
|
1112
1114
|
tracking
|
|
@@ -1255,7 +1257,8 @@ const FormSubdomain = ({
|
|
|
1255
1257
|
slugs,
|
|
1256
1258
|
style,
|
|
1257
1259
|
values: {
|
|
1258
|
-
agreements
|
|
1260
|
+
agreements,
|
|
1261
|
+
sms
|
|
1259
1262
|
}
|
|
1260
1263
|
}
|
|
1261
1264
|
},
|
|
@@ -49,7 +49,6 @@ var import_arrow_right = __toESM(require("../icons/arrow-right"));
|
|
|
49
49
|
var import_flag = __toESM(require("../icons/flag"));
|
|
50
50
|
var import_warning = __toESM(require("../icons/warning"));
|
|
51
51
|
var import_entry = require("./lib/entry");
|
|
52
|
-
var import_motion = require("../shared/lib/motion");
|
|
53
52
|
const TemplateModal = ({
|
|
54
53
|
buttons,
|
|
55
54
|
cart,
|
|
@@ -133,6 +132,7 @@ const TemplateModal = ({
|
|
|
133
132
|
fields: data == null ? void 0 : data.fields,
|
|
134
133
|
integrations: data == null ? void 0 : data.integrations,
|
|
135
134
|
params,
|
|
135
|
+
sms: data == null ? void 0 : data.sms,
|
|
136
136
|
preview,
|
|
137
137
|
style,
|
|
138
138
|
tracking
|
|
@@ -566,7 +566,7 @@ const TemplateModal = ({
|
|
|
566
566
|
{
|
|
567
567
|
...{
|
|
568
568
|
transition: true,
|
|
569
|
-
className: "z-40 fixed inset-0 flex flex-col w-full scroll-smooth overflow-y-auto hide-scrollbar pt-6 lg:p-6 pointer-events-none data-[closed]:translate-y-full
|
|
569
|
+
className: "z-40 fixed inset-0 flex flex-col w-full scroll-smooth overflow-y-auto hide-scrollbar pt-6 lg:p-6 pointer-events-none transition duration-200 ease-in data-[closed]:translate-y-full"
|
|
570
570
|
},
|
|
571
571
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
572
572
|
"div",
|
|
@@ -17,7 +17,6 @@ import ArrowRight from "../icons/arrow-right.mjs";
|
|
|
17
17
|
import Flag from "../icons/flag.mjs";
|
|
18
18
|
import Warning from "../icons/warning.mjs";
|
|
19
19
|
import { copy, formOn, giveawayOn, panelTitle } from "./lib/entry.mjs";
|
|
20
|
-
import { motion } from "../shared/lib/motion.mjs";
|
|
21
20
|
const TemplateModal = ({
|
|
22
21
|
buttons,
|
|
23
22
|
cart,
|
|
@@ -101,6 +100,7 @@ const TemplateModal = ({
|
|
|
101
100
|
fields: data == null ? void 0 : data.fields,
|
|
102
101
|
integrations: data == null ? void 0 : data.integrations,
|
|
103
102
|
params,
|
|
103
|
+
sms: data == null ? void 0 : data.sms,
|
|
104
104
|
preview,
|
|
105
105
|
style,
|
|
106
106
|
tracking
|
|
@@ -534,7 +534,7 @@ const TemplateModal = ({
|
|
|
534
534
|
{
|
|
535
535
|
...{
|
|
536
536
|
transition: true,
|
|
537
|
-
className: "z-40 fixed inset-0 flex flex-col w-full scroll-smooth overflow-y-auto hide-scrollbar pt-6 lg:p-6 pointer-events-none data-[closed]:translate-y-full
|
|
537
|
+
className: "z-40 fixed inset-0 flex flex-col w-full scroll-smooth overflow-y-auto hide-scrollbar pt-6 lg:p-6 pointer-events-none transition duration-200 ease-in data-[closed]:translate-y-full"
|
|
538
538
|
},
|
|
539
539
|
children: /* @__PURE__ */ jsx(
|
|
540
540
|
"div",
|
|
@@ -31,7 +31,6 @@ __export(buttons_subscription_exports, {
|
|
|
31
31
|
SubscriptionBadge: () => SubscriptionBadge,
|
|
32
32
|
SubscriptionButtons: () => SubscriptionButtons,
|
|
33
33
|
default: () => buttons_subscription_default,
|
|
34
|
-
formatPeriod: () => formatPeriod,
|
|
35
34
|
useSubscriptionActions: () => useSubscriptionActions
|
|
36
35
|
});
|
|
37
36
|
module.exports = __toCommonJS(buttons_subscription_exports);
|
|
@@ -57,72 +56,30 @@ const dateOptions = {
|
|
|
57
56
|
month: "short",
|
|
58
57
|
year: "numeric"
|
|
59
58
|
};
|
|
60
|
-
const shortDate = {
|
|
61
|
-
day: "numeric",
|
|
62
|
-
month: "short"
|
|
63
|
-
};
|
|
64
|
-
const formatPeriod = ({ end, start }) => {
|
|
65
|
-
const from = new Date(start);
|
|
66
|
-
const to = new Date(end);
|
|
67
|
-
const sameYear = from.getFullYear() === to.getFullYear();
|
|
68
|
-
return (0, import_drawbridge_utils.formatDateString)({
|
|
69
|
-
date: start,
|
|
70
|
-
options: shortDate
|
|
71
|
-
}) + " \u2013 " + (0, import_drawbridge_utils.formatDateString)({
|
|
72
|
-
date: end,
|
|
73
|
-
options: !sameYear ? dateOptions : from.getMonth() === to.getMonth() ? {
|
|
74
|
-
day: "numeric"
|
|
75
|
-
} : shortDate
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
59
|
const SubscriptionBadge = ({
|
|
79
|
-
period,
|
|
80
60
|
plan,
|
|
81
61
|
subscription
|
|
82
|
-
}) =>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
children: title
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
(warning || (period == null ? void 0 : period.start) && (period == null ? void 0 : period.end)) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
|
-
"span",
|
|
107
|
-
{
|
|
108
|
-
...{
|
|
109
|
-
className: "shrink-0"
|
|
110
|
-
},
|
|
111
|
-
children: (subscription == null ? void 0 : subscription.pending) ? "\xA0\u2014 downgrades " + (0, import_drawbridge_utils.formatDateString)({
|
|
112
|
-
date: subscription.pending.effectiveAt,
|
|
113
|
-
options: dateOptions
|
|
114
|
-
}) : warning ? "\xA0\u2014 cancels " + (0, import_drawbridge_utils.formatDateString)({
|
|
115
|
-
date: subscription.canceledAt,
|
|
116
|
-
options: dateOptions
|
|
117
|
-
}) : "\xA0\xB7 " + formatPeriod(period)
|
|
118
|
-
}
|
|
119
|
-
)
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
};
|
|
62
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
63
|
+
import_badge.default,
|
|
64
|
+
{
|
|
65
|
+
...((subscription == null ? void 0 : subscription.pending) || (subscription == null ? void 0 : subscription.canceledAt)) && {
|
|
66
|
+
type: "warning"
|
|
67
|
+
},
|
|
68
|
+
children: [
|
|
69
|
+
(0, import_drawbridge_utils.capitalize)(plan == null ? void 0 : plan.title),
|
|
70
|
+
(subscription == null ? void 0 : subscription.pending) && " \u2014 downgrades " + (0, import_drawbridge_utils.formatDateString)({
|
|
71
|
+
date: subscription.pending.effectiveAt,
|
|
72
|
+
options: dateOptions
|
|
73
|
+
}),
|
|
74
|
+
!(subscription == null ? void 0 : subscription.pending) && (subscription == null ? void 0 : subscription.canceledAt) && " \u2014 cancels " + (0, import_drawbridge_utils.formatDateString)({
|
|
75
|
+
date: subscription.canceledAt,
|
|
76
|
+
options: dateOptions
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
124
81
|
const useSubscriptionActions = (params) => {
|
|
125
|
-
var _a, _b;
|
|
82
|
+
var _a, _b, _c;
|
|
126
83
|
const queryClient = (0, import_react_query.useQueryClient)();
|
|
127
84
|
const query = (0, import_react_query.useQuery)({
|
|
128
85
|
enabled: false,
|
|
@@ -130,6 +87,7 @@ const useSubscriptionActions = (params) => {
|
|
|
130
87
|
});
|
|
131
88
|
const plan = (_a = query == null ? void 0 : query.data) == null ? void 0 : _a.plan;
|
|
132
89
|
const subscription = (_b = query == null ? void 0 : query.data) == null ? void 0 : _b.subscription;
|
|
90
|
+
const smsNumber = (((_c = query == null ? void 0 : query.data) == null ? void 0 : _c.identityItems) || []).find((row) => (row == null ? void 0 : row.type) === "sms");
|
|
133
91
|
const drawer = (0, import_hooks.useDrawer)({
|
|
134
92
|
queryClient
|
|
135
93
|
});
|
|
@@ -240,8 +198,12 @@ const useSubscriptionActions = (params) => {
|
|
|
240
198
|
},
|
|
241
199
|
children: [
|
|
242
200
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Your subscription will cancel at the end of your current billing period. You'll keep all paid features until then." }),
|
|
243
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "After it cancels, your campaigns
|
|
244
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
201
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "After it cancels, your campaigns, pages, brands and prizes will be drafted, and your workflows will be paused. They won't be deleted, but you'll need to reactivate each one if you re-subscribe." }),
|
|
202
|
+
smsNumber && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
|
|
203
|
+
"Your SMS number, ",
|
|
204
|
+
smsNumber.number,
|
|
205
|
+
", is released when it cancels and may be assigned to someone else."
|
|
206
|
+
] })
|
|
245
207
|
]
|
|
246
208
|
}
|
|
247
209
|
),
|
|
@@ -424,6 +386,5 @@ var buttons_subscription_default = SubscriptionButtons;
|
|
|
424
386
|
0 && (module.exports = {
|
|
425
387
|
SubscriptionBadge,
|
|
426
388
|
SubscriptionButtons,
|
|
427
|
-
formatPeriod,
|
|
428
389
|
useSubscriptionActions
|
|
429
390
|
});
|
|
@@ -21,72 +21,30 @@ const dateOptions = {
|
|
|
21
21
|
month: "short",
|
|
22
22
|
year: "numeric"
|
|
23
23
|
};
|
|
24
|
-
const shortDate = {
|
|
25
|
-
day: "numeric",
|
|
26
|
-
month: "short"
|
|
27
|
-
};
|
|
28
|
-
const formatPeriod = ({ end, start }) => {
|
|
29
|
-
const from = new Date(start);
|
|
30
|
-
const to = new Date(end);
|
|
31
|
-
const sameYear = from.getFullYear() === to.getFullYear();
|
|
32
|
-
return formatDateString({
|
|
33
|
-
date: start,
|
|
34
|
-
options: shortDate
|
|
35
|
-
}) + " \u2013 " + formatDateString({
|
|
36
|
-
date: end,
|
|
37
|
-
options: !sameYear ? dateOptions : from.getMonth() === to.getMonth() ? {
|
|
38
|
-
day: "numeric"
|
|
39
|
-
} : shortDate
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
24
|
const SubscriptionBadge = ({
|
|
43
|
-
period,
|
|
44
25
|
plan,
|
|
45
26
|
subscription
|
|
46
|
-
}) =>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
children: title
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
(warning || (period == null ? void 0 : period.start) && (period == null ? void 0 : period.end)) && /* @__PURE__ */ jsx(
|
|
70
|
-
"span",
|
|
71
|
-
{
|
|
72
|
-
...{
|
|
73
|
-
className: "shrink-0"
|
|
74
|
-
},
|
|
75
|
-
children: (subscription == null ? void 0 : subscription.pending) ? "\xA0\u2014 downgrades " + formatDateString({
|
|
76
|
-
date: subscription.pending.effectiveAt,
|
|
77
|
-
options: dateOptions
|
|
78
|
-
}) : warning ? "\xA0\u2014 cancels " + formatDateString({
|
|
79
|
-
date: subscription.canceledAt,
|
|
80
|
-
options: dateOptions
|
|
81
|
-
}) : "\xA0\xB7 " + formatPeriod(period)
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
};
|
|
27
|
+
}) => /* @__PURE__ */ jsxs(
|
|
28
|
+
Badge,
|
|
29
|
+
{
|
|
30
|
+
...((subscription == null ? void 0 : subscription.pending) || (subscription == null ? void 0 : subscription.canceledAt)) && {
|
|
31
|
+
type: "warning"
|
|
32
|
+
},
|
|
33
|
+
children: [
|
|
34
|
+
capitalize(plan == null ? void 0 : plan.title),
|
|
35
|
+
(subscription == null ? void 0 : subscription.pending) && " \u2014 downgrades " + formatDateString({
|
|
36
|
+
date: subscription.pending.effectiveAt,
|
|
37
|
+
options: dateOptions
|
|
38
|
+
}),
|
|
39
|
+
!(subscription == null ? void 0 : subscription.pending) && (subscription == null ? void 0 : subscription.canceledAt) && " \u2014 cancels " + formatDateString({
|
|
40
|
+
date: subscription.canceledAt,
|
|
41
|
+
options: dateOptions
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
88
46
|
const useSubscriptionActions = (params) => {
|
|
89
|
-
var _a, _b;
|
|
47
|
+
var _a, _b, _c;
|
|
90
48
|
const queryClient = useQueryClient();
|
|
91
49
|
const query = useQuery({
|
|
92
50
|
enabled: false,
|
|
@@ -94,6 +52,7 @@ const useSubscriptionActions = (params) => {
|
|
|
94
52
|
});
|
|
95
53
|
const plan = (_a = query == null ? void 0 : query.data) == null ? void 0 : _a.plan;
|
|
96
54
|
const subscription = (_b = query == null ? void 0 : query.data) == null ? void 0 : _b.subscription;
|
|
55
|
+
const smsNumber = (((_c = query == null ? void 0 : query.data) == null ? void 0 : _c.identityItems) || []).find((row) => (row == null ? void 0 : row.type) === "sms");
|
|
97
56
|
const drawer = useDrawer({
|
|
98
57
|
queryClient
|
|
99
58
|
});
|
|
@@ -204,8 +163,12 @@ const useSubscriptionActions = (params) => {
|
|
|
204
163
|
},
|
|
205
164
|
children: [
|
|
206
165
|
/* @__PURE__ */ jsx("p", { children: "Your subscription will cancel at the end of your current billing period. You'll keep all paid features until then." }),
|
|
207
|
-
/* @__PURE__ */ jsx("p", { children: "After it cancels, your campaigns
|
|
208
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ jsx("p", { children: "After it cancels, your campaigns, pages, brands and prizes will be drafted, and your workflows will be paused. They won't be deleted, but you'll need to reactivate each one if you re-subscribe." }),
|
|
167
|
+
smsNumber && /* @__PURE__ */ jsxs("p", { children: [
|
|
168
|
+
"Your SMS number, ",
|
|
169
|
+
smsNumber.number,
|
|
170
|
+
", is released when it cancels and may be assigned to someone else."
|
|
171
|
+
] })
|
|
209
172
|
]
|
|
210
173
|
}
|
|
211
174
|
),
|
|
@@ -388,6 +351,5 @@ export {
|
|
|
388
351
|
SubscriptionBadge,
|
|
389
352
|
SubscriptionButtons,
|
|
390
353
|
buttons_subscription_default as default,
|
|
391
|
-
formatPeriod,
|
|
392
354
|
useSubscriptionActions
|
|
393
355
|
};
|
|
@@ -81,7 +81,7 @@ const CardSection = ({
|
|
|
81
81
|
"div",
|
|
82
82
|
{
|
|
83
83
|
...{
|
|
84
|
-
className: "grid grid-cols-1 gap-6 items-start
|
|
84
|
+
className: "grid grid-cols-1 gap-6 items-start xl:grid-cols-2"
|
|
85
85
|
},
|
|
86
86
|
children: import_react.Children.toArray(children).map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
87
|
"div",
|
|
@@ -89,7 +89,7 @@ const CardSection = ({
|
|
|
89
89
|
...{
|
|
90
90
|
// The first column ( the form ) runs with the page; the others
|
|
91
91
|
// stay in view beside it while it scrolls.
|
|
92
|
-
className: "min-w-0" + (index ? "
|
|
92
|
+
className: "min-w-0" + (index ? " xl:sticky xl:top-6" : "")
|
|
93
93
|
},
|
|
94
94
|
children: child
|
|
95
95
|
},
|
|
@@ -59,7 +59,7 @@ const CardSection = ({
|
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
61
61
|
...{
|
|
62
|
-
className: "grid grid-cols-1 gap-6 items-start
|
|
62
|
+
className: "grid grid-cols-1 gap-6 items-start xl:grid-cols-2"
|
|
63
63
|
},
|
|
64
64
|
children: Children.toArray(children).map((child, index) => /* @__PURE__ */ jsx(
|
|
65
65
|
"div",
|
|
@@ -67,7 +67,7 @@ const CardSection = ({
|
|
|
67
67
|
...{
|
|
68
68
|
// The first column ( the form ) runs with the page; the others
|
|
69
69
|
// stay in view beside it while it scrolls.
|
|
70
|
-
className: "min-w-0" + (index ? "
|
|
70
|
+
className: "min-w-0" + (index ? " xl:sticky xl:top-6" : "")
|
|
71
71
|
},
|
|
72
72
|
children: child
|
|
73
73
|
},
|
|
@@ -55,9 +55,7 @@ const CardSetting = ({
|
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
57
|
...{
|
|
58
|
-
className: "flex items-center gap-4 py-3 first:pt-0 last:pb-0"
|
|
59
|
-
// On the row, so the guide's ring takes in the label, value and button.
|
|
60
|
-
"data-guide": guide
|
|
58
|
+
className: "flex items-center gap-4 py-3 first:pt-0 last:pb-0"
|
|
61
59
|
},
|
|
62
60
|
children: [
|
|
63
61
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -71,7 +69,8 @@ const CardSetting = ({
|
|
|
71
69
|
"span",
|
|
72
70
|
{
|
|
73
71
|
...{
|
|
74
|
-
className: "text-gray-dark break-words @md:w-[33cqw] @md:shrink-0"
|
|
72
|
+
className: "text-gray-dark break-words @md:w-[33cqw] @md:shrink-0",
|
|
73
|
+
"data-guide": guide
|
|
75
74
|
},
|
|
76
75
|
children: label
|
|
77
76
|
}
|
|
@@ -23,9 +23,7 @@ const CardSetting = ({
|
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
...{
|
|
26
|
-
className: "flex items-center gap-4 py-3 first:pt-0 last:pb-0"
|
|
27
|
-
// On the row, so the guide's ring takes in the label, value and button.
|
|
28
|
-
"data-guide": guide
|
|
26
|
+
className: "flex items-center gap-4 py-3 first:pt-0 last:pb-0"
|
|
29
27
|
},
|
|
30
28
|
children: [
|
|
31
29
|
/* @__PURE__ */ jsxs(
|
|
@@ -39,7 +37,8 @@ const CardSetting = ({
|
|
|
39
37
|
"span",
|
|
40
38
|
{
|
|
41
39
|
...{
|
|
42
|
-
className: "text-gray-dark break-words @md:w-[33cqw] @md:shrink-0"
|
|
40
|
+
className: "text-gray-dark break-words @md:w-[33cqw] @md:shrink-0",
|
|
41
|
+
"data-guide": guide
|
|
43
42
|
},
|
|
44
43
|
children: label
|
|
45
44
|
}
|
|
@@ -32,16 +32,12 @@ __export(card_task_exports, {
|
|
|
32
32
|
module.exports = __toCommonJS(card_task_exports);
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react_query = require("@tanstack/react-query");
|
|
35
|
-
var import_badge = __toESM(require("../shared/badge"));
|
|
36
35
|
var import_button = __toESM(require("../shared/button"));
|
|
37
36
|
var import_link = __toESM(require("./link"));
|
|
38
37
|
var import_hooks = require("./lib/hooks");
|
|
39
38
|
const CardTask = ({
|
|
40
|
-
badge,
|
|
41
39
|
className,
|
|
42
40
|
message,
|
|
43
|
-
// stack: the button under the words, for a card too narrow to sit them side by side.
|
|
44
|
-
stack = false,
|
|
45
41
|
title,
|
|
46
42
|
type = "default",
|
|
47
43
|
...rest
|
|
@@ -50,8 +46,6 @@ const CardTask = ({
|
|
|
50
46
|
const types = {
|
|
51
47
|
default: "bg-gray border border-black",
|
|
52
48
|
error: "bg-red-light border border-red",
|
|
53
|
-
// White: purple is Drawbridge AI's (Darren, 2026-11-07).
|
|
54
|
-
recommended: "bg-white border border-gray",
|
|
55
49
|
success: "bg-green-light border border-green",
|
|
56
50
|
warning: "bg-yellow-light border border-yellow"
|
|
57
51
|
};
|
|
@@ -60,7 +54,7 @@ const CardTask = ({
|
|
|
60
54
|
queryClient
|
|
61
55
|
});
|
|
62
56
|
const classes = [
|
|
63
|
-
|
|
57
|
+
"flex flex-col items-start justify-between w-full rounded py-3 px-4 gap-4 md:flex-row md:items-center",
|
|
64
58
|
types[type]
|
|
65
59
|
];
|
|
66
60
|
if (className) {
|
|
@@ -105,22 +99,10 @@ const CardTask = ({
|
|
|
105
99
|
"div",
|
|
106
100
|
{
|
|
107
101
|
...{
|
|
108
|
-
className:
|
|
102
|
+
className: "break-word"
|
|
109
103
|
},
|
|
110
104
|
children: [
|
|
111
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
112
|
-
badge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
113
|
-
import_badge.default,
|
|
114
|
-
{
|
|
115
|
-
...{
|
|
116
|
-
className: "float-right ml-3 mb-1",
|
|
117
|
-
type: "primary"
|
|
118
|
-
},
|
|
119
|
-
children: badge
|
|
120
|
-
}
|
|
121
|
-
),
|
|
122
|
-
title
|
|
123
|
-
] }),
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: title }),
|
|
124
106
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
107
|
"div",
|
|
126
108
|
{
|
|
@@ -137,7 +119,7 @@ const CardTask = ({
|
|
|
137
119
|
"div",
|
|
138
120
|
{
|
|
139
121
|
...{
|
|
140
|
-
className:
|
|
122
|
+
className: "w-full md:w-auto shrink-0"
|
|
141
123
|
},
|
|
142
124
|
children: button()
|
|
143
125
|
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient } from "@tanstack/react-query";
|
|
3
|
-
import Badge from "../shared/badge.mjs";
|
|
4
3
|
import Button from "../shared/button.mjs";
|
|
5
4
|
import Link from "./link.mjs";
|
|
6
5
|
import { useModal } from "./lib/hooks.mjs";
|
|
7
6
|
const CardTask = ({
|
|
8
|
-
badge,
|
|
9
7
|
className,
|
|
10
8
|
message,
|
|
11
|
-
// stack: the button under the words, for a card too narrow to sit them side by side.
|
|
12
|
-
stack = false,
|
|
13
9
|
title,
|
|
14
10
|
type = "default",
|
|
15
11
|
...rest
|
|
@@ -18,8 +14,6 @@ const CardTask = ({
|
|
|
18
14
|
const types = {
|
|
19
15
|
default: "bg-gray border border-black",
|
|
20
16
|
error: "bg-red-light border border-red",
|
|
21
|
-
// White: purple is Drawbridge AI's (Darren, 2026-11-07).
|
|
22
|
-
recommended: "bg-white border border-gray",
|
|
23
17
|
success: "bg-green-light border border-green",
|
|
24
18
|
warning: "bg-yellow-light border border-yellow"
|
|
25
19
|
};
|
|
@@ -28,7 +22,7 @@ const CardTask = ({
|
|
|
28
22
|
queryClient
|
|
29
23
|
});
|
|
30
24
|
const classes = [
|
|
31
|
-
|
|
25
|
+
"flex flex-col items-start justify-between w-full rounded py-3 px-4 gap-4 md:flex-row md:items-center",
|
|
32
26
|
types[type]
|
|
33
27
|
];
|
|
34
28
|
if (className) {
|
|
@@ -73,22 +67,10 @@ const CardTask = ({
|
|
|
73
67
|
"div",
|
|
74
68
|
{
|
|
75
69
|
...{
|
|
76
|
-
className:
|
|
70
|
+
className: "break-word"
|
|
77
71
|
},
|
|
78
72
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
badge && /* @__PURE__ */ jsx(
|
|
81
|
-
Badge,
|
|
82
|
-
{
|
|
83
|
-
...{
|
|
84
|
-
className: "float-right ml-3 mb-1",
|
|
85
|
-
type: "primary"
|
|
86
|
-
},
|
|
87
|
-
children: badge
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
title
|
|
91
|
-
] }),
|
|
73
|
+
/* @__PURE__ */ jsx("p", { children: title }),
|
|
92
74
|
/* @__PURE__ */ jsx(
|
|
93
75
|
"div",
|
|
94
76
|
{
|
|
@@ -105,7 +87,7 @@ const CardTask = ({
|
|
|
105
87
|
"div",
|
|
106
88
|
{
|
|
107
89
|
...{
|
|
108
|
-
className:
|
|
90
|
+
className: "w-full md:w-auto shrink-0"
|
|
109
91
|
},
|
|
110
92
|
children: button()
|
|
111
93
|
}
|