@drawbridge/components 0.1.48 → 0.1.50
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/fields.js +0 -278
- package/dist/bridge/fields.mjs +1 -276
- package/dist/bridge/form-subdomain-shop-modal.js +274 -234
- package/dist/bridge/form-subdomain-shop-modal.mjs +275 -233
- package/dist/bridge/form-subdomain.js +0 -7
- package/dist/bridge/form-subdomain.mjs +2 -9
- package/dist/bridge/lib/age-gate.js +0 -12
- package/dist/bridge/lib/age-gate.mjs +0 -11
- package/dist/bridge/lib/checkout-kit.js +32 -2
- package/dist/bridge/lib/checkout-kit.mjs +32 -2
- package/dist/bridge/lib/entry.js +3 -3
- package/dist/bridge/lib/entry.mjs +2 -2
- package/dist/bridge/product-tile.js +6 -9
- package/dist/bridge/product-tile.mjs +6 -9
- package/dist/bridge/template-layout.js +123 -238
- package/dist/bridge/template-layout.mjs +124 -239
- package/dist/bridge/template-modal.js +73 -28
- package/dist/bridge/template-modal.mjs +74 -29
- package/dist/dashboard/buttons-subscription.js +1 -1
- package/dist/dashboard/buttons-subscription.mjs +1 -1
- package/dist/dashboard/campaign-form.js +2 -7
- package/dist/dashboard/campaign-form.mjs +2 -7
- package/dist/dashboard/card-order.js +4 -22
- package/dist/dashboard/card-order.mjs +4 -22
- package/dist/dashboard/document-blocks.js +17 -4
- package/dist/dashboard/document-blocks.mjs +17 -4
- package/dist/dashboard/form-admin-provider.js +17 -71
- package/dist/dashboard/form-admin-provider.mjs +17 -71
- package/dist/dashboard/form-file-upload.js +2 -3
- package/dist/dashboard/form-file-upload.mjs +3 -4
- package/dist/dashboard/form-organization-campaign-advertisements.js +6 -47
- package/dist/dashboard/form-organization-campaign-advertisements.mjs +6 -47
- package/dist/dashboard/form-organization-campaign-agreement.js +121 -83
- package/dist/dashboard/form-organization-campaign-agreement.mjs +121 -83
- package/dist/dashboard/form-organization-campaign.js +0 -82
- package/dist/dashboard/form-organization-campaign.mjs +0 -81
- package/dist/dashboard/form-organization-connection.js +6 -48
- package/dist/dashboard/form-organization-connection.mjs +7 -48
- package/dist/dashboard/form-organization-workflow.js +1 -72
- package/dist/dashboard/form-organization-workflow.mjs +1 -69
- package/dist/dashboard/form-otc.js +5 -4
- package/dist/dashboard/form-otc.mjs +5 -4
- package/dist/dashboard/form-stripe.js +5 -12
- package/dist/dashboard/form-stripe.mjs +5 -12
- package/dist/dashboard/input-fields.js +158 -11
- package/dist/dashboard/input-fields.mjs +158 -11
- package/dist/dashboard/input-file.js +4 -21
- package/dist/dashboard/input-file.mjs +4 -21
- package/dist/dashboard/lib/connection-controls.js +2 -5
- package/dist/dashboard/lib/connection-controls.mjs +1 -3
- package/dist/dashboard/lib/form-page.js +1 -1
- package/dist/dashboard/lib/form-page.mjs +1 -1
- package/dist/dashboard/lib/uppy.js +1 -10
- package/dist/dashboard/lib/uppy.mjs +2 -11
- package/dist/dashboard/order-sections.js +6 -456
- package/dist/dashboard/order-sections.mjs +7 -453
- package/dist/dashboard/provider-ui.js +7 -9
- package/dist/dashboard/provider-ui.mjs +7 -9
- package/dist/dashboard/template-ui.js +12 -4
- package/dist/dashboard/template-ui.mjs +12 -4
- package/dist/input-checkbox.js +10 -28
- package/dist/input-checkbox.mjs +10 -28
- package/dist/product.js +24 -96
- package/dist/product.mjs +25 -97
- package/dist/shared/lib/helpers.js +6 -54
- package/dist/shared/lib/helpers.mjs +8 -53
- package/package.json +4 -74
- package/types/bridge/fields.d.ts +2 -14
- package/types/bridge/form-subdomain-shop-modal.d.ts +3 -27
- package/types/bridge/lib/age-gate.d.ts +0 -5
- package/types/bridge/lib/checkout-kit.d.ts +10 -2
- package/types/bridge/lib/entry.d.ts +3 -3
- package/types/dashboard/card-order.d.ts +0 -6
- package/types/dashboard/document-blocks.d.ts +3 -2
- package/types/dashboard/form-admin-provider.d.ts +2 -9
- package/types/dashboard/form-file-upload.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-advertisements.d.ts +0 -3
- package/types/dashboard/form-organization-campaign-agreement.d.ts +5 -2
- package/types/dashboard/form-organization-campaign.d.ts +0 -3
- package/types/dashboard/form-organization-connection.d.ts +0 -11
- package/types/dashboard/form-otc.d.ts +1 -5
- package/types/dashboard/form-stripe.d.ts +2 -3
- package/types/dashboard/input-file.d.ts +0 -2
- package/types/dashboard/order-sections.d.ts +1 -24
- package/types/input-checkbox.d.ts +0 -2
- package/types/shared/lib/helpers.d.ts +0 -4
- package/dist/bridge/cart-drawer.js +0 -152
- package/dist/bridge/cart-drawer.mjs +0 -123
- package/dist/bridge/form-subdomain-checkout.js +0 -687
- package/dist/bridge/form-subdomain-checkout.mjs +0 -665
- package/dist/bridge/lib/cart.js +0 -79
- package/dist/bridge/lib/cart.mjs +0 -48
- package/dist/dashboard/embed-stripe.js +0 -145
- package/dist/dashboard/embed-stripe.mjs +0 -116
- package/dist/dashboard/form-organization-campaign-field-birthday.js +0 -193
- package/dist/dashboard/form-organization-campaign-field-birthday.mjs +0 -164
- package/dist/dashboard/form-organization-campaign-field-rating.js +0 -246
- package/dist/dashboard/form-organization-campaign-field-rating.mjs +0 -217
- package/dist/dashboard/form-organization-product.js +0 -1461
- package/dist/dashboard/form-organization-product.mjs +0 -1425
- package/dist/dashboard/input-gallery.js +0 -201
- package/dist/dashboard/input-gallery.mjs +0 -172
- package/dist/dashboard/lib/products.js +0 -169
- package/dist/dashboard/lib/products.mjs +0 -135
- package/dist/dashboard/lib/settings-paths.js +0 -35
- package/dist/dashboard/lib/settings-paths.mjs +0 -11
- package/dist/dashboard/shipping-rates.js +0 -404
- package/dist/dashboard/shipping-rates.mjs +0 -371
- package/dist/dashboard/template-buyer.js +0 -301
- package/dist/dashboard/template-buyer.mjs +0 -267
- package/dist/shared/order-summary.js +0 -139
- package/dist/shared/order-summary.mjs +0 -110
- package/types/bridge/cart-drawer.d.ts +0 -31
- package/types/bridge/form-subdomain-checkout.d.ts +0 -20
- package/types/bridge/lib/cart.d.ts +0 -44
- package/types/dashboard/embed-stripe.d.ts +0 -25
- package/types/dashboard/form-organization-campaign-field-birthday.d.ts +0 -31
- package/types/dashboard/form-organization-campaign-field-rating.d.ts +0 -33
- package/types/dashboard/form-organization-product.d.ts +0 -24
- package/types/dashboard/input-gallery.d.ts +0 -14
- package/types/dashboard/lib/products.d.ts +0 -14
- package/types/dashboard/lib/settings-paths.d.ts +0 -5
- package/types/dashboard/shipping-rates.d.ts +0 -26
- package/types/dashboard/template-buyer.d.ts +0 -50
- package/types/shared/order-summary.d.ts +0 -19
|
@@ -111,7 +111,7 @@ const FormOrganizationCampaignAgreement = ({
|
|
|
111
111
|
readOnly
|
|
112
112
|
}) => {
|
|
113
113
|
var _a, _b, _c, _d;
|
|
114
|
-
const { document: standard, types, values = {} } = agreement || {};
|
|
114
|
+
const { document: standard, include = [], types, values = {} } = agreement || {};
|
|
115
115
|
const tabs = TABS.filter((tab) => (types || TABS).includes(tab));
|
|
116
116
|
const saved = values.type || (values.link ? "link" : "document");
|
|
117
117
|
const { control, formState, handleSubmit, setValue } = (0, import_form.useForm)({
|
|
@@ -148,6 +148,7 @@ const FormOrganizationCampaignAgreement = ({
|
|
|
148
148
|
blocks.current ??= (0, import_document_blocks.default)({
|
|
149
149
|
data,
|
|
150
150
|
insertable: standard == null ? void 0 : standard.pieces,
|
|
151
|
+
locked: standard == null ? void 0 : standard.locked,
|
|
151
152
|
onClaim: (days) => {
|
|
152
153
|
var _a2;
|
|
153
154
|
return (_a2 = claim.current) == null ? void 0 : _a2.call(claim, days);
|
|
@@ -283,111 +284,148 @@ const FormOrganizationCampaignAgreement = ({
|
|
|
283
284
|
}
|
|
284
285
|
}
|
|
285
286
|
),
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
288
|
+
"div",
|
|
288
289
|
{
|
|
289
290
|
...{
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
291
|
+
className: "flex flex-col gap-3"
|
|
292
|
+
},
|
|
293
|
+
children: [
|
|
294
|
+
editing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
295
|
+
Field,
|
|
296
|
+
{
|
|
297
|
+
...{
|
|
298
|
+
control,
|
|
299
|
+
error: (_b = errors.document) == null ? void 0 : _b.message,
|
|
300
|
+
name: "document",
|
|
301
|
+
render: ({ onChange, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
302
|
+
"div",
|
|
303
|
+
{
|
|
304
|
+
...{
|
|
305
|
+
// What the screen leaves under the modal's other rows ( 38rem ), so the
|
|
306
|
+
// tick and Save stay in view on a laptop:
|
|
307
|
+
// the editor's toolbar stays and only the text scrolls.
|
|
308
|
+
className: "document h-[calc(100vh-38rem)] min-h-[12rem] flex flex-col [&>div]:flex-1 [&>div]:min-h-0 [&>div]:flex [&>div]:flex-col [&>div>div:has(>.ProseMirror)]:flex-1 [&>div>div:has(>.ProseMirror)]:min-h-0 [&>div>div:has(>.ProseMirror)]:overflow-y-auto",
|
|
309
|
+
"data-document": true
|
|
310
|
+
},
|
|
311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
312
|
+
import_input_editor.default,
|
|
313
|
+
{
|
|
314
|
+
...{
|
|
315
|
+
blocks: blocks.current,
|
|
316
|
+
disabled: readOnly,
|
|
317
|
+
onChange: ({ html }) => onChange(html),
|
|
318
|
+
value: value || ""
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
)
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"document"
|
|
327
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
328
|
+
Field,
|
|
329
|
+
{
|
|
330
|
+
...{
|
|
331
|
+
control,
|
|
332
|
+
error: (_c = errors.link) == null ? void 0 : _c.message,
|
|
333
|
+
label: "Link",
|
|
334
|
+
name: "link",
|
|
335
|
+
render: ({ onChange, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
336
|
+
import_input_url.default,
|
|
337
|
+
{
|
|
338
|
+
...{
|
|
339
|
+
onChange,
|
|
340
|
+
value: value || ""
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"link"
|
|
347
|
+
),
|
|
348
|
+
!editing && include.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
294
349
|
"div",
|
|
295
350
|
{
|
|
296
351
|
...{
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
// the editor's toolbar stays and only the text scrolls.
|
|
300
|
-
className: "document h-[calc(100vh-38rem)] min-h-[12rem] flex flex-col [&>div]:flex-1 [&>div]:min-h-0 [&>div]:flex [&>div]:flex-col [&>div>div:has(>.ProseMirror)]:flex-1 [&>div>div:has(>.ProseMirror)]:min-h-0 [&>div>div:has(>.ProseMirror)]:overflow-y-auto",
|
|
301
|
-
"data-document": true
|
|
352
|
+
className: "rounded bg-gray-light p-4 text-sm",
|
|
353
|
+
"data-include": id
|
|
302
354
|
},
|
|
303
|
-
children:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
357
|
+
"p",
|
|
358
|
+
{
|
|
359
|
+
...{
|
|
360
|
+
className: "font-medium"
|
|
361
|
+
},
|
|
362
|
+
children: "Your page must include:"
|
|
311
363
|
}
|
|
312
|
-
|
|
313
|
-
|
|
364
|
+
),
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
366
|
+
"ul",
|
|
367
|
+
{
|
|
368
|
+
...{
|
|
369
|
+
className: "mt-2 list-disc pl-5 space-y-1"
|
|
370
|
+
},
|
|
371
|
+
children: include.map((line) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: line }, line))
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
]
|
|
314
375
|
}
|
|
315
|
-
)
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
"document"
|
|
319
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
320
|
-
Field,
|
|
321
|
-
{
|
|
322
|
-
...{
|
|
323
|
-
control,
|
|
324
|
-
error: (_c = errors.link) == null ? void 0 : _c.message,
|
|
325
|
-
label: "Link",
|
|
326
|
-
name: "link",
|
|
327
|
-
render: ({ onChange, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
328
|
-
import_input_url.default,
|
|
376
|
+
),
|
|
377
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
378
|
+
Field,
|
|
329
379
|
{
|
|
330
380
|
...{
|
|
331
|
-
|
|
332
|
-
|
|
381
|
+
control,
|
|
382
|
+
error: (_d = errors.confirm) == null ? void 0 : _d.message,
|
|
383
|
+
name: "confirm",
|
|
384
|
+
render: ({ onChange, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
385
|
+
import_input_checkbox.default,
|
|
386
|
+
{
|
|
387
|
+
...{
|
|
388
|
+
id: "agreement-confirm-" + id,
|
|
389
|
+
label: "I confirm this is correct",
|
|
390
|
+
onChange,
|
|
391
|
+
value: Boolean(value)
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
)
|
|
333
395
|
}
|
|
334
396
|
}
|
|
335
397
|
)
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
"link"
|
|
398
|
+
]
|
|
399
|
+
}
|
|
339
400
|
)
|
|
340
401
|
]
|
|
341
402
|
}
|
|
342
403
|
),
|
|
343
|
-
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime.
|
|
404
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
344
405
|
import_fieldset.default,
|
|
345
406
|
{
|
|
346
407
|
...{
|
|
347
|
-
className: "flex
|
|
408
|
+
className: "flex justify-end pt-6 border-t border-gray",
|
|
348
409
|
disabled
|
|
349
410
|
},
|
|
350
|
-
children:
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
{
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
onChange,
|
|
365
|
-
value: Boolean(value)
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
)
|
|
411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
412
|
+
"span",
|
|
413
|
+
{
|
|
414
|
+
...{
|
|
415
|
+
className: "sm:w-40 shrink-0"
|
|
416
|
+
},
|
|
417
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
418
|
+
import_button.default,
|
|
419
|
+
{
|
|
420
|
+
...{
|
|
421
|
+
loading: formState == null ? void 0 : formState.isSubmitting,
|
|
422
|
+
type: "submit"
|
|
423
|
+
},
|
|
424
|
+
children: "Save"
|
|
369
425
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
"span",
|
|
374
|
-
{
|
|
375
|
-
...{
|
|
376
|
-
className: "sm:w-40 shrink-0"
|
|
377
|
-
},
|
|
378
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
379
|
-
import_button.default,
|
|
380
|
-
{
|
|
381
|
-
...{
|
|
382
|
-
loading: formState == null ? void 0 : formState.isSubmitting,
|
|
383
|
-
type: "submit"
|
|
384
|
-
},
|
|
385
|
-
children: "Save"
|
|
386
|
-
}
|
|
387
|
-
)
|
|
388
|
-
}
|
|
389
|
-
)
|
|
390
|
-
]
|
|
426
|
+
)
|
|
427
|
+
}
|
|
428
|
+
)
|
|
391
429
|
}
|
|
392
430
|
)
|
|
393
431
|
]
|
|
@@ -77,7 +77,7 @@ const FormOrganizationCampaignAgreement = ({
|
|
|
77
77
|
readOnly
|
|
78
78
|
}) => {
|
|
79
79
|
var _a, _b, _c, _d;
|
|
80
|
-
const { document: standard, types, values = {} } = agreement || {};
|
|
80
|
+
const { document: standard, include = [], types, values = {} } = agreement || {};
|
|
81
81
|
const tabs = TABS.filter((tab) => (types || TABS).includes(tab));
|
|
82
82
|
const saved = values.type || (values.link ? "link" : "document");
|
|
83
83
|
const { control, formState, handleSubmit, setValue } = useForm({
|
|
@@ -114,6 +114,7 @@ const FormOrganizationCampaignAgreement = ({
|
|
|
114
114
|
blocks.current ??= documentBlocks({
|
|
115
115
|
data,
|
|
116
116
|
insertable: standard == null ? void 0 : standard.pieces,
|
|
117
|
+
locked: standard == null ? void 0 : standard.locked,
|
|
117
118
|
onClaim: (days) => {
|
|
118
119
|
var _a2;
|
|
119
120
|
return (_a2 = claim.current) == null ? void 0 : _a2.call(claim, days);
|
|
@@ -249,111 +250,148 @@ const FormOrganizationCampaignAgreement = ({
|
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
252
|
),
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
/* @__PURE__ */ jsxs(
|
|
254
|
+
"div",
|
|
254
255
|
{
|
|
255
256
|
...{
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
className: "flex flex-col gap-3"
|
|
258
|
+
},
|
|
259
|
+
children: [
|
|
260
|
+
editing ? /* @__PURE__ */ jsx(
|
|
261
|
+
Field,
|
|
262
|
+
{
|
|
263
|
+
...{
|
|
264
|
+
control,
|
|
265
|
+
error: (_b = errors.document) == null ? void 0 : _b.message,
|
|
266
|
+
name: "document",
|
|
267
|
+
render: ({ onChange, value }) => /* @__PURE__ */ jsx(
|
|
268
|
+
"div",
|
|
269
|
+
{
|
|
270
|
+
...{
|
|
271
|
+
// What the screen leaves under the modal's other rows ( 38rem ), so the
|
|
272
|
+
// tick and Save stay in view on a laptop:
|
|
273
|
+
// the editor's toolbar stays and only the text scrolls.
|
|
274
|
+
className: "document h-[calc(100vh-38rem)] min-h-[12rem] flex flex-col [&>div]:flex-1 [&>div]:min-h-0 [&>div]:flex [&>div]:flex-col [&>div>div:has(>.ProseMirror)]:flex-1 [&>div>div:has(>.ProseMirror)]:min-h-0 [&>div>div:has(>.ProseMirror)]:overflow-y-auto",
|
|
275
|
+
"data-document": true
|
|
276
|
+
},
|
|
277
|
+
children: /* @__PURE__ */ jsx(
|
|
278
|
+
InputEditor,
|
|
279
|
+
{
|
|
280
|
+
...{
|
|
281
|
+
blocks: blocks.current,
|
|
282
|
+
disabled: readOnly,
|
|
283
|
+
onChange: ({ html }) => onChange(html),
|
|
284
|
+
value: value || ""
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"document"
|
|
293
|
+
) : /* @__PURE__ */ jsx(
|
|
294
|
+
Field,
|
|
295
|
+
{
|
|
296
|
+
...{
|
|
297
|
+
control,
|
|
298
|
+
error: (_c = errors.link) == null ? void 0 : _c.message,
|
|
299
|
+
label: "Link",
|
|
300
|
+
name: "link",
|
|
301
|
+
render: ({ onChange, value }) => /* @__PURE__ */ jsx(
|
|
302
|
+
InputUrl,
|
|
303
|
+
{
|
|
304
|
+
...{
|
|
305
|
+
onChange,
|
|
306
|
+
value: value || ""
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
)
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"link"
|
|
313
|
+
),
|
|
314
|
+
!editing && include.length > 0 && /* @__PURE__ */ jsxs(
|
|
260
315
|
"div",
|
|
261
316
|
{
|
|
262
317
|
...{
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
// the editor's toolbar stays and only the text scrolls.
|
|
266
|
-
className: "document h-[calc(100vh-38rem)] min-h-[12rem] flex flex-col [&>div]:flex-1 [&>div]:min-h-0 [&>div]:flex [&>div]:flex-col [&>div>div:has(>.ProseMirror)]:flex-1 [&>div>div:has(>.ProseMirror)]:min-h-0 [&>div>div:has(>.ProseMirror)]:overflow-y-auto",
|
|
267
|
-
"data-document": true
|
|
318
|
+
className: "rounded bg-gray-light p-4 text-sm",
|
|
319
|
+
"data-include": id
|
|
268
320
|
},
|
|
269
|
-
children:
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
321
|
+
children: [
|
|
322
|
+
/* @__PURE__ */ jsx(
|
|
323
|
+
"p",
|
|
324
|
+
{
|
|
325
|
+
...{
|
|
326
|
+
className: "font-medium"
|
|
327
|
+
},
|
|
328
|
+
children: "Your page must include:"
|
|
277
329
|
}
|
|
278
|
-
|
|
279
|
-
|
|
330
|
+
),
|
|
331
|
+
/* @__PURE__ */ jsx(
|
|
332
|
+
"ul",
|
|
333
|
+
{
|
|
334
|
+
...{
|
|
335
|
+
className: "mt-2 list-disc pl-5 space-y-1"
|
|
336
|
+
},
|
|
337
|
+
children: include.map((line) => /* @__PURE__ */ jsx("li", { children: line }, line))
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
]
|
|
280
341
|
}
|
|
281
|
-
)
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
"document"
|
|
285
|
-
) : /* @__PURE__ */ jsx(
|
|
286
|
-
Field,
|
|
287
|
-
{
|
|
288
|
-
...{
|
|
289
|
-
control,
|
|
290
|
-
error: (_c = errors.link) == null ? void 0 : _c.message,
|
|
291
|
-
label: "Link",
|
|
292
|
-
name: "link",
|
|
293
|
-
render: ({ onChange, value }) => /* @__PURE__ */ jsx(
|
|
294
|
-
InputUrl,
|
|
342
|
+
),
|
|
343
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
344
|
+
Field,
|
|
295
345
|
{
|
|
296
346
|
...{
|
|
297
|
-
|
|
298
|
-
|
|
347
|
+
control,
|
|
348
|
+
error: (_d = errors.confirm) == null ? void 0 : _d.message,
|
|
349
|
+
name: "confirm",
|
|
350
|
+
render: ({ onChange, value }) => /* @__PURE__ */ jsx(
|
|
351
|
+
InputCheckbox,
|
|
352
|
+
{
|
|
353
|
+
...{
|
|
354
|
+
id: "agreement-confirm-" + id,
|
|
355
|
+
label: "I confirm this is correct",
|
|
356
|
+
onChange,
|
|
357
|
+
value: Boolean(value)
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
)
|
|
299
361
|
}
|
|
300
362
|
}
|
|
301
363
|
)
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
"link"
|
|
364
|
+
]
|
|
365
|
+
}
|
|
305
366
|
)
|
|
306
367
|
]
|
|
307
368
|
}
|
|
308
369
|
),
|
|
309
|
-
!readOnly && /* @__PURE__ */
|
|
370
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
310
371
|
Fieldset,
|
|
311
372
|
{
|
|
312
373
|
...{
|
|
313
|
-
className: "flex
|
|
374
|
+
className: "flex justify-end pt-6 border-t border-gray",
|
|
314
375
|
disabled
|
|
315
376
|
},
|
|
316
|
-
children:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
{
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
onChange,
|
|
331
|
-
value: Boolean(value)
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
)
|
|
377
|
+
children: /* @__PURE__ */ jsx(
|
|
378
|
+
"span",
|
|
379
|
+
{
|
|
380
|
+
...{
|
|
381
|
+
className: "sm:w-40 shrink-0"
|
|
382
|
+
},
|
|
383
|
+
children: /* @__PURE__ */ jsx(
|
|
384
|
+
Button,
|
|
385
|
+
{
|
|
386
|
+
...{
|
|
387
|
+
loading: formState == null ? void 0 : formState.isSubmitting,
|
|
388
|
+
type: "submit"
|
|
389
|
+
},
|
|
390
|
+
children: "Save"
|
|
335
391
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
"span",
|
|
340
|
-
{
|
|
341
|
-
...{
|
|
342
|
-
className: "sm:w-40 shrink-0"
|
|
343
|
-
},
|
|
344
|
-
children: /* @__PURE__ */ jsx(
|
|
345
|
-
Button,
|
|
346
|
-
{
|
|
347
|
-
...{
|
|
348
|
-
loading: formState == null ? void 0 : formState.isSubmitting,
|
|
349
|
-
type: "submit"
|
|
350
|
-
},
|
|
351
|
-
children: "Save"
|
|
352
|
-
}
|
|
353
|
-
)
|
|
354
|
-
}
|
|
355
|
-
)
|
|
356
|
-
]
|
|
392
|
+
)
|
|
393
|
+
}
|
|
394
|
+
)
|
|
357
395
|
}
|
|
358
396
|
)
|
|
359
397
|
]
|
|
@@ -28,7 +28,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
28
28
|
var form_organization_campaign_exports = {};
|
|
29
29
|
__export(form_organization_campaign_exports, {
|
|
30
30
|
FormOrganizationCampaign: () => FormOrganizationCampaign,
|
|
31
|
-
FormOrganizationCampaignCheckout: () => FormOrganizationCampaignCheckout,
|
|
32
31
|
FormOrganizationCampaignClaimWindow: () => FormOrganizationCampaignClaimWindow,
|
|
33
32
|
FormOrganizationCampaignCopy: () => FormOrganizationCampaignCopy,
|
|
34
33
|
FormOrganizationCampaignNotifications: () => FormOrganizationCampaignNotifications,
|
|
@@ -45,7 +44,6 @@ var import_react_query = require("@tanstack/react-query");
|
|
|
45
44
|
var import_form = require("../shared/lib/form");
|
|
46
45
|
var import_yup = __toESM(require("../shared/lib/yup"));
|
|
47
46
|
var import_input_fields = require("./input-fields");
|
|
48
|
-
var import_products = require("./lib/products");
|
|
49
47
|
var import_form2 = __toESM(require("../shared/form"));
|
|
50
48
|
var import_fieldset = __toESM(require("../shared/fieldset"));
|
|
51
49
|
var import_input_group = __toESM(require("../input-group"));
|
|
@@ -230,10 +228,6 @@ const copyFields = {
|
|
|
230
228
|
// The form's one Submit text, on its last step ( the Footer's Button text ).
|
|
231
229
|
submit: ["Button text"]
|
|
232
230
|
};
|
|
233
|
-
const CHECKOUT_OPTIONS = Object.entries(import_products.CHECKOUT_LABELS).map(([value, key]) => ({
|
|
234
|
-
key,
|
|
235
|
-
value
|
|
236
|
-
}));
|
|
237
231
|
const copyPlaceholder = (key) => {
|
|
238
232
|
var _a, _b, _c, _d;
|
|
239
233
|
return ((_d = (_c = (_b = (_a = import_drawbridge_utils.constants) == null ? void 0 : _a.campaign) == null ? void 0 : _b.form) == null ? void 0 : _c.copy) == null ? void 0 : _d[key]) || (key === "submit" ? "Submit" : void 0);
|
|
@@ -855,85 +849,9 @@ const FormOrganizationCampaignSettingsShop = ({
|
|
|
855
849
|
}
|
|
856
850
|
);
|
|
857
851
|
};
|
|
858
|
-
const FormOrganizationCampaignCheckout = ({
|
|
859
|
-
disabled,
|
|
860
|
-
onSubmit,
|
|
861
|
-
values
|
|
862
|
-
}) => {
|
|
863
|
-
const { control, formState, handleSubmit } = (0, import_form.useForm)({
|
|
864
|
-
defaultValues: {
|
|
865
|
-
checkout: (values == null ? void 0 : values.checkout) || "stripe"
|
|
866
|
-
},
|
|
867
|
-
guard: false
|
|
868
|
-
});
|
|
869
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
870
|
-
import_form2.default,
|
|
871
|
-
{
|
|
872
|
-
...{
|
|
873
|
-
className: "relative w-full space-y-6",
|
|
874
|
-
onSubmit: handleSubmit(({ checkout }) => onSubmit(checkout))
|
|
875
|
-
},
|
|
876
|
-
children: [
|
|
877
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
878
|
-
import_fieldset.default,
|
|
879
|
-
{
|
|
880
|
-
...{
|
|
881
|
-
disabled: disabled || (formState == null ? void 0 : formState.isSubmitting)
|
|
882
|
-
},
|
|
883
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
884
|
-
import_form.Controller,
|
|
885
|
-
{
|
|
886
|
-
...{
|
|
887
|
-
control,
|
|
888
|
-
name: "checkout",
|
|
889
|
-
render: ({ field: { onChange, value } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
890
|
-
import_input_group.default,
|
|
891
|
-
{
|
|
892
|
-
...{
|
|
893
|
-
input: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
894
|
-
import_input_combobox.default,
|
|
895
|
-
{
|
|
896
|
-
...{
|
|
897
|
-
onChange,
|
|
898
|
-
options: CHECKOUT_OPTIONS,
|
|
899
|
-
value
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
),
|
|
903
|
-
label: "Products and checkout"
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
)
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
)
|
|
910
|
-
}
|
|
911
|
-
),
|
|
912
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
913
|
-
import_fieldset.default,
|
|
914
|
-
{
|
|
915
|
-
...{
|
|
916
|
-
disabled: disabled || (formState == null ? void 0 : formState.isSubmitting)
|
|
917
|
-
},
|
|
918
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
919
|
-
import_button.default,
|
|
920
|
-
{
|
|
921
|
-
...{
|
|
922
|
-
type: "submit"
|
|
923
|
-
},
|
|
924
|
-
children: "Save"
|
|
925
|
-
}
|
|
926
|
-
)
|
|
927
|
-
}
|
|
928
|
-
)
|
|
929
|
-
]
|
|
930
|
-
}
|
|
931
|
-
);
|
|
932
|
-
};
|
|
933
852
|
// Annotate the CommonJS export names for ESM import in node:
|
|
934
853
|
0 && (module.exports = {
|
|
935
854
|
FormOrganizationCampaign,
|
|
936
|
-
FormOrganizationCampaignCheckout,
|
|
937
855
|
FormOrganizationCampaignClaimWindow,
|
|
938
856
|
FormOrganizationCampaignCopy,
|
|
939
857
|
FormOrganizationCampaignNotifications,
|