@drawbridge/components 0.1.36 → 0.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/styles.css +355 -68
- package/dist/advertisement.js +20 -15
- package/dist/advertisement.mjs +20 -15
- package/dist/bridge/advertisements.js +2 -4
- package/dist/bridge/advertisements.mjs +3 -5
- package/dist/bridge/fields.js +6 -89
- package/dist/bridge/fields.mjs +7 -89
- package/dist/bridge/form-subdomain-embed.js +1 -5
- package/dist/bridge/form-subdomain-embed.mjs +1 -5
- package/dist/bridge/form-subdomain-header.js +14 -21
- package/dist/bridge/form-subdomain-header.mjs +14 -20
- package/dist/bridge/form-subdomain-issue.js +8 -17
- package/dist/bridge/form-subdomain-issue.mjs +8 -17
- package/dist/bridge/form-subdomain-missions.js +52 -58
- package/dist/bridge/form-subdomain-missions.mjs +54 -60
- package/dist/bridge/form-subdomain.js +94 -223
- package/dist/bridge/form-subdomain.mjs +96 -222
- package/dist/bridge/lib/entry.js +6 -61
- package/dist/bridge/lib/entry.mjs +5 -51
- package/dist/bridge/lib/order.js +0 -23
- package/dist/bridge/lib/order.mjs +0 -20
- package/dist/bridge/template-layout.js +2 -5
- package/dist/bridge/template-layout.mjs +3 -6
- package/dist/bridge/template-modal.js +15 -82
- package/dist/bridge/template-modal.mjs +16 -83
- package/dist/bridge/template-preview.js +208 -0
- package/dist/bridge/template-preview.mjs +173 -0
- package/dist/bridge/template-subdomain-gallery.js +75 -126
- package/dist/bridge/template-subdomain-gallery.mjs +75 -122
- package/dist/bridge/template-subdomain.js +14 -16
- package/dist/bridge/template-subdomain.mjs +15 -17
- package/dist/dashboard/avatar.js +0 -5
- package/dist/dashboard/avatar.mjs +0 -5
- package/dist/dashboard/card-affiliate.js +2 -3
- package/dist/dashboard/card-affiliate.mjs +2 -3
- package/dist/dashboard/card-campaign-switch.js +9 -34
- package/dist/dashboard/card-campaign-switch.mjs +8 -32
- package/dist/dashboard/card-connection.js +91 -51
- package/dist/dashboard/card-connection.mjs +89 -50
- package/dist/dashboard/card-order.js +14 -6
- package/dist/dashboard/card-order.mjs +14 -6
- package/dist/dashboard/card-section.js +26 -69
- package/dist/dashboard/card-section.mjs +26 -65
- package/dist/dashboard/card-tile.js +35 -3
- package/dist/dashboard/card-tile.mjs +34 -3
- package/dist/dashboard/device.js +95 -0
- package/dist/dashboard/device.mjs +72 -0
- package/dist/dashboard/drawer-subscription.js +14 -52
- package/dist/dashboard/drawer-subscription.mjs +14 -52
- package/dist/dashboard/drawer.js +3 -20
- package/dist/dashboard/drawer.mjs +4 -21
- package/dist/dashboard/dropdown.js +2 -6
- package/dist/dashboard/dropdown.mjs +2 -6
- package/dist/dashboard/form-admin-subscription-custom.js +8 -72
- package/dist/dashboard/form-admin-subscription-custom.mjs +8 -72
- package/dist/dashboard/form-ai.js +148 -0
- package/dist/dashboard/form-ai.mjs +148 -1
- package/dist/dashboard/form-filters-analytics.js +62 -85
- package/dist/dashboard/form-filters-analytics.mjs +61 -85
- package/dist/dashboard/form-organization-brand.js +13 -30
- package/dist/dashboard/form-organization-brand.mjs +13 -30
- package/dist/dashboard/form-organization-campaign-advertisement.js +112 -38
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +112 -38
- package/dist/dashboard/form-organization-campaign-agreement.js +210 -402
- package/dist/dashboard/form-organization-campaign-agreement.mjs +211 -398
- package/dist/dashboard/form-organization-campaign-field-list.js +425 -0
- package/dist/dashboard/form-organization-campaign-field-list.mjs +396 -0
- package/dist/dashboard/form-organization-campaign-field-number.js +7 -48
- package/dist/dashboard/form-organization-campaign-field-number.mjs +7 -48
- package/dist/dashboard/form-organization-campaign-field-select.js +4 -15
- package/dist/dashboard/form-organization-campaign-field-select.mjs +4 -15
- package/dist/dashboard/form-organization-campaign-field-text.js +6 -46
- package/dist/dashboard/form-organization-campaign-field-text.mjs +6 -46
- package/dist/dashboard/form-organization-campaign-field-textarea.js +13 -22
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +13 -22
- package/dist/dashboard/form-organization-campaign-integration-age.js +35 -2
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +35 -2
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +1 -4
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +1 -4
- package/dist/dashboard/form-organization-campaign-page-embed.js +1 -1
- package/dist/dashboard/form-organization-campaign-page-embed.mjs +1 -1
- package/dist/dashboard/form-organization-campaign-page-preview.js +2 -1
- package/dist/dashboard/form-organization-campaign-page-preview.mjs +2 -1
- package/dist/dashboard/form-organization-campaign-page-qr.js +2 -2
- package/dist/dashboard/form-organization-campaign-page-qr.mjs +2 -2
- package/dist/dashboard/form-organization-campaign-page-share.js +5 -5
- package/dist/dashboard/form-organization-campaign-page-share.mjs +5 -5
- package/dist/dashboard/form-organization-campaign-page-slug.js +3 -2
- package/dist/dashboard/form-organization-campaign-page-slug.mjs +3 -2
- package/dist/dashboard/form-organization-campaign-page.js +265 -168
- package/dist/dashboard/form-organization-campaign-page.mjs +266 -170
- package/dist/dashboard/form-organization-campaign-section.js +107 -125
- package/dist/dashboard/form-organization-campaign-section.mjs +107 -121
- package/dist/dashboard/form-organization-campaign.js +9 -119
- package/dist/dashboard/form-organization-campaign.mjs +9 -118
- package/dist/dashboard/form-organization-file-frame.js +1 -7
- package/dist/dashboard/form-organization-file-frame.mjs +1 -7
- package/dist/dashboard/form-organization-workflow.js +545 -589
- package/dist/dashboard/form-organization-workflow.mjs +545 -590
- package/dist/dashboard/form-organization.js +0 -22
- package/dist/dashboard/form-organization.mjs +0 -22
- package/dist/dashboard/form-verify-prize.js +34 -114
- package/dist/dashboard/form-verify-prize.mjs +34 -111
- package/dist/dashboard/google.js +1 -8
- package/dist/dashboard/google.mjs +1 -8
- package/dist/dashboard/input-array.js +0 -2
- package/dist/dashboard/input-array.mjs +0 -2
- package/dist/dashboard/input-combobox.js +9 -0
- package/dist/dashboard/input-combobox.mjs +9 -0
- package/dist/dashboard/input-date.js +8 -3
- package/dist/dashboard/input-date.mjs +8 -3
- package/dist/dashboard/input-editor.js +6 -17
- package/dist/dashboard/input-editor.mjs +6 -17
- package/dist/dashboard/input-fields.js +437 -287
- package/dist/dashboard/input-fields.mjs +436 -287
- package/dist/dashboard/input-file.js +2 -70
- package/dist/dashboard/input-file.mjs +2 -70
- package/dist/dashboard/input-font.js +55 -64
- package/dist/dashboard/input-font.mjs +55 -64
- package/dist/dashboard/input-resource.js +1 -4
- package/dist/dashboard/input-resource.mjs +1 -4
- package/dist/dashboard/item-row.js +92 -0
- package/dist/dashboard/item-row.mjs +63 -0
- package/dist/dashboard/lib/features.js +1 -1
- package/dist/dashboard/lib/features.mjs +1 -1
- package/dist/dashboard/lib/item-list.js +15 -0
- package/dist/dashboard/lib/item-list.mjs +14 -0
- package/dist/dashboard/lib/rail.js +17 -16
- package/dist/dashboard/lib/rail.mjs +16 -15
- package/dist/dashboard/lib/sms.js +2 -8
- package/dist/dashboard/lib/sms.mjs +1 -6
- package/dist/dashboard/list-resource.js +0 -2
- package/dist/dashboard/list-resource.mjs +0 -2
- package/dist/dashboard/menu.js +5 -54
- package/dist/dashboard/menu.mjs +5 -53
- package/dist/dashboard/modal.js +4 -19
- package/dist/dashboard/modal.mjs +5 -20
- package/dist/dashboard/order-sections.js +0 -4
- package/dist/dashboard/order-sections.mjs +0 -4
- package/dist/dashboard/preview.js +324 -838
- package/dist/dashboard/preview.mjs +324 -826
- package/dist/dashboard/provider-ui.js +12 -20
- package/dist/dashboard/provider-ui.mjs +13 -21
- package/dist/dashboard/recharts.js +28 -53
- package/dist/dashboard/recharts.mjs +28 -53
- package/dist/dashboard/swatch.js +0 -35
- package/dist/dashboard/swatch.mjs +0 -31
- package/dist/dashboard/table-contacts.js +10 -6
- package/dist/dashboard/table-contacts.mjs +10 -6
- package/dist/dashboard/table.js +3 -10
- package/dist/dashboard/table.mjs +3 -9
- package/dist/dashboard/template-dashboard.js +21 -13
- package/dist/dashboard/template-dashboard.mjs +21 -12
- package/dist/dashboard/template-rail.js +126 -198
- package/dist/dashboard/template-rail.mjs +125 -196
- package/dist/dashboard/template-socket.js +12 -0
- package/dist/dashboard/template-socket.mjs +12 -0
- package/dist/dashboard/template-ui.js +11 -20
- package/dist/dashboard/template-ui.mjs +13 -22
- package/dist/input-checkbox.js +1 -7
- package/dist/input-checkbox.mjs +1 -7
- package/dist/input-name.js +3 -3
- package/dist/input-name.mjs +3 -3
- package/dist/input-select.js +1 -3
- package/dist/input-select.mjs +1 -3
- package/dist/provider-font.js +3 -4
- package/dist/provider-font.mjs +3 -4
- package/dist/shared/badge.js +0 -15
- package/dist/shared/badge.mjs +0 -11
- package/dist/shared/carousel.js +7 -11
- package/dist/shared/carousel.mjs +7 -11
- package/dist/shared/lib/campaign.js +9 -3
- package/dist/shared/lib/campaign.mjs +9 -3
- package/dist/shared/lib/helpers.js +0 -24
- package/dist/shared/lib/helpers.mjs +0 -22
- package/dist/shared/lib/video.js +0 -6
- package/dist/shared/lib/video.mjs +0 -5
- package/dist/shared/sortable.js +10 -27
- package/dist/shared/sortable.mjs +10 -27
- package/dist/shared/tabs.js +1 -1
- package/dist/shared/tabs.mjs +1 -1
- package/dist/video.js +9 -127
- package/dist/video.mjs +11 -125
- package/package.json +20 -176
- package/types/bridge/fields.d.ts +1 -6
- package/types/bridge/form-subdomain-missions.d.ts +0 -2
- package/types/bridge/form-subdomain.d.ts +3 -62
- package/types/bridge/lib/entry.d.ts +7 -44
- package/types/bridge/lib/order.d.ts +2 -13
- package/types/bridge/subdomain-content.d.ts +0 -1
- package/types/bridge/template-preview.d.ts +10 -0
- package/types/bridge/template-subdomain-gallery.d.ts +1 -13
- package/types/dashboard/card-campaign-switch.d.ts +1 -20
- package/types/dashboard/card-connection.d.ts +8 -0
- package/types/dashboard/card-order.d.ts +2 -2
- package/types/dashboard/card-section.d.ts +1 -9
- package/types/dashboard/card-tile.d.ts +9 -4
- package/types/dashboard/device.d.ts +12 -0
- package/types/dashboard/drawer.d.ts +0 -3
- package/types/dashboard/form-ai.d.ts +17 -0
- package/types/dashboard/form-filters-analytics.d.ts +14 -0
- package/types/dashboard/form-organization-brand.d.ts +0 -3
- package/types/dashboard/form-organization-campaign-agreement.d.ts +10 -53
- package/types/dashboard/form-organization-campaign-field-list.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-number.d.ts +1 -4
- package/types/dashboard/form-organization-campaign-field-select.d.ts +1 -6
- package/types/dashboard/form-organization-campaign-field-text.d.ts +1 -5
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +1 -4
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +0 -2
- package/types/dashboard/form-organization-campaign-page.d.ts +15 -9
- package/types/dashboard/form-organization-campaign-section.d.ts +8 -24
- package/types/dashboard/form-organization-campaign.d.ts +0 -3
- package/types/dashboard/form-organization-workflow.d.ts +4 -3
- package/types/dashboard/form-organization.d.ts +2 -2
- package/types/dashboard/form-verify-prize.d.ts +3 -30
- package/types/dashboard/input-combobox.d.ts +2 -0
- package/types/dashboard/input-date.d.ts +2 -0
- package/types/dashboard/input-editor.d.ts +0 -9
- package/types/dashboard/input-fields.d.ts +5 -8
- package/types/dashboard/input-file.d.ts +0 -4
- package/types/dashboard/input-resource.d.ts +0 -1
- package/types/dashboard/item-row.d.ts +25 -0
- package/types/dashboard/lib/item-list.d.ts +5 -10
- package/types/dashboard/lib/rail.d.ts +1 -0
- package/types/dashboard/lib/sms.d.ts +0 -7
- package/types/dashboard/modal.d.ts +1 -3
- package/types/dashboard/preview.d.ts +10 -65
- package/types/dashboard/recharts.d.ts +0 -3
- package/types/dashboard/swatch.d.ts +0 -4
- package/types/dashboard/template-dashboard.d.ts +2 -3
- package/types/input-select.d.ts +0 -2
- package/types/shared/button.d.ts +1 -1
- package/types/shared/lib/helpers.d.ts +1 -22
- package/types/shared/lib/video.d.ts +0 -3
- package/types/shared/sortable.d.ts +0 -6
- package/types/video.d.ts +2 -18
- package/dist/bridge/form-subdomain-agreement.js +0 -165
- package/dist/bridge/form-subdomain-agreement.mjs +0 -132
- package/dist/dashboard/campaign-form.js +0 -1798
- package/dist/dashboard/campaign-form.mjs +0 -1769
- package/dist/dashboard/card-campaign-agreement.js +0 -172
- package/dist/dashboard/card-campaign-agreement.mjs +0 -139
- package/dist/dashboard/card-shortcut.js +0 -181
- package/dist/dashboard/card-shortcut.mjs +0 -152
- package/dist/dashboard/document-blocks.js +0 -305
- package/dist/dashboard/document-blocks.mjs +0 -270
- package/dist/dashboard/form-organization-campaign-advertisements.js +0 -374
- package/dist/dashboard/form-organization-campaign-advertisements.mjs +0 -345
- package/dist/dashboard/form-organization-campaign-design.js +0 -258
- package/dist/dashboard/form-organization-campaign-design.mjs +0 -223
- package/dist/dashboard/form-organization-campaign-field-item.js +0 -585
- package/dist/dashboard/form-organization-campaign-field-item.mjs +0 -552
- package/dist/dashboard/form-organization-campaign-field-skill.js +0 -359
- package/dist/dashboard/form-organization-campaign-field-skill.mjs +0 -330
- package/dist/dashboard/form-organization-campaign-footer.js +0 -178
- package/dist/dashboard/form-organization-campaign-footer.mjs +0 -149
- package/dist/dashboard/form-reposition.js +0 -396
- package/dist/dashboard/form-reposition.mjs +0 -359
- package/dist/dashboard/form-support.js +0 -189
- package/dist/dashboard/form-support.mjs +0 -160
- package/dist/dashboard/form-tests.js +0 -683
- package/dist/dashboard/form-tests.mjs +0 -646
- package/dist/dashboard/lib/ab-tests.js +0 -130
- package/dist/dashboard/lib/ab-tests.mjs +0 -94
- package/dist/dashboard/lib/focus.js +0 -93
- package/dist/dashboard/lib/focus.mjs +0 -69
- package/dist/dashboard/lib/form-page.js +0 -203
- package/dist/dashboard/lib/form-page.mjs +0 -155
- package/dist/dashboard/template-design.js +0 -564
- package/dist/dashboard/template-design.mjs +0 -531
- package/dist/dashboard/template-test-page.js +0 -436
- package/dist/dashboard/template-test-page.mjs +0 -407
- package/dist/dashboard/template-tests.js +0 -141
- package/dist/dashboard/template-tests.mjs +0 -112
- package/dist/dashboard/template-variant.js +0 -185
- package/dist/dashboard/template-variant.mjs +0 -156
- package/dist/icons/arrow-down-long.js +0 -47
- package/dist/icons/arrow-down-long.mjs +0 -28
- package/dist/icons/arrows-pointing-out.js +0 -46
- package/dist/icons/arrows-pointing-out.mjs +0 -27
- package/dist/icons/beaker.js +0 -46
- package/dist/icons/beaker.mjs +0 -27
- package/dist/icons/identification.js +0 -46
- package/dist/icons/identification.mjs +0 -27
- package/dist/icons/lifebuoy.js +0 -46
- package/dist/icons/lifebuoy.mjs +0 -27
- package/dist/icons/rectangle-group.js +0 -46
- package/dist/icons/rectangle-group.mjs +0 -27
- package/dist/icons/rectangle-stack.js +0 -46
- package/dist/icons/rectangle-stack.mjs +0 -27
- package/dist/icons/shopping-bag.js +0 -46
- package/dist/icons/shopping-bag.mjs +0 -27
- package/dist/icons/swatch.js +0 -46
- package/dist/icons/swatch.mjs +0 -27
- package/dist/icons/window.js +0 -46
- package/dist/icons/window.mjs +0 -27
- package/dist/icons/zoom-in.js +0 -46
- package/dist/icons/zoom-in.mjs +0 -27
- package/dist/input-answer.js +0 -60
- package/dist/input-answer.mjs +0 -27
- package/dist/shared/document-pieces.js +0 -295
- package/dist/shared/document-pieces.mjs +0 -260
- package/types/bridge/form-subdomain-agreement.d.ts +0 -27
- package/types/dashboard/campaign-form.d.ts +0 -42
- package/types/dashboard/card-campaign-agreement.d.ts +0 -26
- package/types/dashboard/card-shortcut.d.ts +0 -38
- package/types/dashboard/document-blocks.d.ts +0 -14
- package/types/dashboard/form-organization-campaign-advertisements.d.ts +0 -15
- package/types/dashboard/form-organization-campaign-design.d.ts +0 -46
- package/types/dashboard/form-organization-campaign-field-item.d.ts +0 -36
- package/types/dashboard/form-organization-campaign-field-skill.d.ts +0 -36
- package/types/dashboard/form-organization-campaign-footer.d.ts +0 -23
- package/types/dashboard/form-reposition.d.ts +0 -29
- package/types/dashboard/form-support.d.ts +0 -14
- package/types/dashboard/form-tests.d.ts +0 -78
- package/types/dashboard/lib/ab-tests.d.ts +0 -50
- package/types/dashboard/lib/escape.d.ts +0 -4
- package/types/dashboard/lib/focus.d.ts +0 -16
- package/types/dashboard/lib/form-page.d.ts +0 -25
- package/types/dashboard/template-design.d.ts +0 -30
- package/types/dashboard/template-test-page.d.ts +0 -69
- package/types/dashboard/template-tests.d.ts +0 -30
- package/types/dashboard/template-variant.d.ts +0 -18
- package/types/icons/arrow-down-long.d.ts +0 -5
- package/types/icons/arrows-pointing-out.d.ts +0 -5
- package/types/icons/beaker.d.ts +0 -5
- package/types/icons/identification.d.ts +0 -5
- package/types/icons/lifebuoy.d.ts +0 -5
- package/types/icons/rectangle-group.d.ts +0 -5
- package/types/icons/rectangle-stack.d.ts +0 -5
- package/types/icons/shopping-bag.d.ts +0 -5
- package/types/icons/swatch.d.ts +0 -5
- package/types/icons/window.d.ts +0 -5
- package/types/icons/zoom-in.d.ts +0 -5
- package/types/input-answer.d.ts +0 -15
- package/types/shared/document-pieces.d.ts +0 -34
- package/types/shared/lib/motion.d.ts +0 -2
|
@@ -401,28 +401,6 @@ const business = {
|
|
|
401
401
|
label: "Business type",
|
|
402
402
|
schema: import_yup.default.string().label("Business type").required()
|
|
403
403
|
},
|
|
404
|
-
// @story organizations/settings
|
|
405
|
-
// The organization's timezone (Pistachio): one dropdown of the timezones
|
|
406
|
-
// the browser knows. Campaigns use it for the times in their official rules.
|
|
407
|
-
timezone: {
|
|
408
|
-
input: ({ onChange, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
409
|
-
import_input_select.default,
|
|
410
|
-
{
|
|
411
|
-
...{
|
|
412
|
-
onChange,
|
|
413
|
-
options: (typeof Intl.supportedValuesOf === "function" ? Intl.supportedValuesOf("timeZone") : []).map((zone) => ({
|
|
414
|
-
label: zone.replace(/_/g, " "),
|
|
415
|
-
value: zone
|
|
416
|
-
})),
|
|
417
|
-
placeholder: "Select a timezone",
|
|
418
|
-
value: value || ""
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
),
|
|
422
|
-
label: "Timezone",
|
|
423
|
-
message: "Campaigns use it for the times in their official rules.",
|
|
424
|
-
schema: import_yup.default.string().label("Timezone").required()
|
|
425
|
-
},
|
|
426
404
|
website: {
|
|
427
405
|
input: ({ onChange, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
428
406
|
import_input_url.default,
|
|
@@ -364,28 +364,6 @@ const business = {
|
|
|
364
364
|
label: "Business type",
|
|
365
365
|
schema: yup.string().label("Business type").required()
|
|
366
366
|
},
|
|
367
|
-
// @story organizations/settings
|
|
368
|
-
// The organization's timezone (Pistachio): one dropdown of the timezones
|
|
369
|
-
// the browser knows. Campaigns use it for the times in their official rules.
|
|
370
|
-
timezone: {
|
|
371
|
-
input: ({ onChange, value }) => /* @__PURE__ */ jsx(
|
|
372
|
-
InputSelect,
|
|
373
|
-
{
|
|
374
|
-
...{
|
|
375
|
-
onChange,
|
|
376
|
-
options: (typeof Intl.supportedValuesOf === "function" ? Intl.supportedValuesOf("timeZone") : []).map((zone) => ({
|
|
377
|
-
label: zone.replace(/_/g, " "),
|
|
378
|
-
value: zone
|
|
379
|
-
})),
|
|
380
|
-
placeholder: "Select a timezone",
|
|
381
|
-
value: value || ""
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
),
|
|
385
|
-
label: "Timezone",
|
|
386
|
-
message: "Campaigns use it for the times in their official rules.",
|
|
387
|
-
schema: yup.string().label("Timezone").required()
|
|
388
|
-
},
|
|
389
367
|
website: {
|
|
390
368
|
input: ({ onChange, value }) => /* @__PURE__ */ jsx(
|
|
391
369
|
InputUrl,
|
|
@@ -28,15 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var form_verify_prize_exports = {};
|
|
30
30
|
__export(form_verify_prize_exports, {
|
|
31
|
-
PrizeDocument: () => PrizeDocument,
|
|
32
31
|
PrizeTerms: () => PrizeTerms,
|
|
33
|
-
|
|
34
|
-
default: () => form_verify_prize_default,
|
|
35
|
-
splitValues: () => splitValues
|
|
32
|
+
default: () => form_verify_prize_default
|
|
36
33
|
});
|
|
37
34
|
module.exports = __toCommonJS(form_verify_prize_exports);
|
|
38
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
var import_react = require("react");
|
|
40
36
|
var import_link = __toESM(require("./link"));
|
|
41
37
|
var import_form = require("../shared/lib/form");
|
|
42
38
|
var import_react_query = require("@tanstack/react-query");
|
|
@@ -47,55 +43,53 @@ var import_form2 = __toESM(require("../shared/form"));
|
|
|
47
43
|
var import_fieldset = __toESM(require("../shared/fieldset"));
|
|
48
44
|
var import_form_action = __toESM(require("./form-action"));
|
|
49
45
|
var import_input_group = __toESM(require("../input-group"));
|
|
50
|
-
var import_input_answer = __toESM(require("../input-answer"));
|
|
51
46
|
var import_input_text = __toESM(require("../input-text"));
|
|
52
47
|
var import_input_combobox = __toESM(require("./input-combobox"));
|
|
53
48
|
var import_address_lines = __toESM(require("../shared/address-lines"));
|
|
54
49
|
var import_card_data_item = __toESM(require("./card-data-item"));
|
|
55
50
|
var import_button = __toESM(require("../shared/button"));
|
|
56
|
-
var import_arrow_left = __toESM(require("../icons/arrow-left"));
|
|
57
|
-
var import_form_subdomain_agreement = require("../bridge/form-subdomain-agreement");
|
|
58
|
-
var import_answer_rows = require("./answer-rows");
|
|
59
51
|
const addressFieldNames = ["address", "address2", "city", "country", "postal", "province"];
|
|
60
|
-
const answerKey = (field) => (field == null ? void 0 : field.id) ? "question-" + field.id : field == null ? void 0 : field.slug;
|
|
61
52
|
const buildFieldsSchema = (fields) => {
|
|
62
53
|
return (fields || []).reduce(
|
|
63
54
|
(accumulator, field) => {
|
|
64
|
-
accumulator[
|
|
55
|
+
accumulator[field.slug] = import_yup.default.string().label(field.label).required();
|
|
65
56
|
return accumulator;
|
|
66
57
|
},
|
|
67
58
|
{}
|
|
68
59
|
);
|
|
69
60
|
};
|
|
70
61
|
const splitValues = (values, fields) => {
|
|
71
|
-
const
|
|
72
|
-
const fieldValues =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
62
|
+
const slugs = new Set((fields || []).map((f) => f.slug));
|
|
63
|
+
const fieldValues = [];
|
|
64
|
+
const address = {};
|
|
65
|
+
Object.entries(values || {}).forEach(([key, value]) => {
|
|
66
|
+
if (slugs.has(key)) {
|
|
67
|
+
fieldValues.push({
|
|
68
|
+
slug: key,
|
|
69
|
+
value
|
|
70
|
+
});
|
|
71
|
+
} else if (addressFieldNames.includes(key)) {
|
|
72
|
+
address[key] = value;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
77
75
|
return {
|
|
78
76
|
address,
|
|
79
77
|
fields: fieldValues
|
|
80
78
|
};
|
|
81
79
|
};
|
|
82
|
-
const PrizeTerms = ({ link
|
|
80
|
+
const PrizeTerms = ({ link }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
|
|
83
81
|
"You are accepting this prize",
|
|
84
|
-
|
|
82
|
+
link ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
85
83
|
"\xA0as agreed to in the following campaign\xA0",
|
|
86
84
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
85
|
import_button.default,
|
|
88
86
|
{
|
|
89
87
|
...{
|
|
88
|
+
element: import_link.default,
|
|
89
|
+
href: link,
|
|
90
90
|
inline: true,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
onClick: onRead
|
|
94
|
-
} : {
|
|
95
|
-
element: import_link.default,
|
|
96
|
-
href: link,
|
|
97
|
-
target: "_blank"
|
|
98
|
-
}
|
|
91
|
+
target: "_blank",
|
|
92
|
+
variant: "link"
|
|
99
93
|
},
|
|
100
94
|
children: "terms and conditions"
|
|
101
95
|
}
|
|
@@ -103,38 +97,6 @@ const PrizeTerms = ({ link, onRead }) => /* @__PURE__ */ (0, import_jsx_runtime.
|
|
|
103
97
|
] }) : null,
|
|
104
98
|
"."
|
|
105
99
|
] });
|
|
106
|
-
const PrizeDocument = ({ back, data, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
107
|
-
"div",
|
|
108
|
-
{
|
|
109
|
-
...{
|
|
110
|
-
className: "space-y-6"
|
|
111
|
-
},
|
|
112
|
-
children: [
|
|
113
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
114
|
-
import_button.default,
|
|
115
|
-
{
|
|
116
|
-
...{
|
|
117
|
-
icon: import_arrow_left.default,
|
|
118
|
-
inline: true,
|
|
119
|
-
onClick: back,
|
|
120
|
-
reverse: true,
|
|
121
|
-
variant: "link"
|
|
122
|
-
},
|
|
123
|
-
children: "Back"
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
127
|
-
import_form_subdomain_agreement.AgreementDocument,
|
|
128
|
-
{
|
|
129
|
-
...{
|
|
130
|
-
data,
|
|
131
|
-
value
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
100
|
const FormVerifyPrize = ({
|
|
139
101
|
action = "Accept",
|
|
140
102
|
campaign,
|
|
@@ -158,25 +120,11 @@ const FormVerifyPrize = ({
|
|
|
158
120
|
})
|
|
159
121
|
)
|
|
160
122
|
});
|
|
161
|
-
const { formState, handleSubmit
|
|
123
|
+
const { formState, handleSubmit } = methods;
|
|
162
124
|
const onSubmit = (values) => {
|
|
163
|
-
var _a;
|
|
125
|
+
var _a, _b;
|
|
164
126
|
const { address, fields: fieldValues } = splitValues(values, fields);
|
|
165
|
-
|
|
166
|
-
const read = (terms == null ? void 0 : terms.type) === "document" && (terms == null ? void 0 : terms.document) ? () => modal.open({
|
|
167
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
168
|
-
PrizeDocument,
|
|
169
|
-
{
|
|
170
|
-
...{
|
|
171
|
-
back: review,
|
|
172
|
-
data: campaign == null ? void 0 : campaign.documents,
|
|
173
|
-
value: terms.document
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
),
|
|
177
|
-
title: "Terms and conditions"
|
|
178
|
-
}) : null;
|
|
179
|
-
const review = () => modal.open({
|
|
127
|
+
modal.open({
|
|
180
128
|
message: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
181
129
|
import_form_action.default,
|
|
182
130
|
{
|
|
@@ -195,19 +143,7 @@ const FormVerifyPrize = ({
|
|
|
195
143
|
method: "POST",
|
|
196
144
|
url: ""
|
|
197
145
|
}),
|
|
198
|
-
|
|
199
|
-
// A wrong answer goes under its question, and the winner
|
|
200
|
-
// tries again as often as they need.
|
|
201
|
-
onError: (error) => {
|
|
202
|
-
var _a2;
|
|
203
|
-
if ((_a2 = error == null ? void 0 : error.data) == null ? void 0 : _a2.fields) {
|
|
204
|
-
modal.close();
|
|
205
|
-
Object.entries(error.data.fields).forEach(([key, message]) => setError(answerKey(fields.find((field) => field.id === key) || { slug: key }), { message }));
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
;
|
|
209
|
-
onError(error);
|
|
210
|
-
},
|
|
146
|
+
onError,
|
|
211
147
|
onSuccess
|
|
212
148
|
},
|
|
213
149
|
children: [
|
|
@@ -215,8 +151,7 @@ const FormVerifyPrize = ({
|
|
|
215
151
|
PrizeTerms,
|
|
216
152
|
{
|
|
217
153
|
...{
|
|
218
|
-
link: (terms == null ? void 0 :
|
|
219
|
-
onRead: read
|
|
154
|
+
link: ((_b = (_a = campaign == null ? void 0 : campaign.agreements) == null ? void 0 : _a.terms) == null ? void 0 : _b.link) || null
|
|
220
155
|
}
|
|
221
156
|
}
|
|
222
157
|
),
|
|
@@ -241,11 +176,11 @@ const FormVerifyPrize = ({
|
|
|
241
176
|
{
|
|
242
177
|
...{
|
|
243
178
|
classNameSlotRight: "w-full text-right",
|
|
244
|
-
label: ((_a2 = fields.find((f) =>
|
|
179
|
+
label: ((_a2 = fields.find((f) => f.slug === fv.slug)) == null ? void 0 : _a2.label) || fv.slug,
|
|
245
180
|
value: fv.value
|
|
246
181
|
}
|
|
247
182
|
},
|
|
248
|
-
fv.
|
|
183
|
+
fv.slug
|
|
249
184
|
);
|
|
250
185
|
})
|
|
251
186
|
}
|
|
@@ -275,7 +210,6 @@ const FormVerifyPrize = ({
|
|
|
275
210
|
),
|
|
276
211
|
title
|
|
277
212
|
});
|
|
278
|
-
review();
|
|
279
213
|
};
|
|
280
214
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
281
215
|
import_form.FormProvider,
|
|
@@ -315,24 +249,15 @@ const FormVerifyPrize = ({
|
|
|
315
249
|
{
|
|
316
250
|
...{
|
|
317
251
|
control: methods.control,
|
|
318
|
-
name:
|
|
252
|
+
name: field.slug,
|
|
319
253
|
render: ({ field: { value, onChange } }) => {
|
|
320
254
|
var _a, _b, _c, _d;
|
|
321
255
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
322
256
|
import_input_group.default,
|
|
323
257
|
{
|
|
324
258
|
...{
|
|
325
|
-
error: (_b = (_a = formState == null ? void 0 : formState.errors) == null ? void 0 : _a[
|
|
326
|
-
input: field.
|
|
327
|
-
import_input_answer.default,
|
|
328
|
-
{
|
|
329
|
-
...{
|
|
330
|
-
label: field.label,
|
|
331
|
-
onChange,
|
|
332
|
-
value
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
) : field.feature === "campaign:field:select" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
259
|
+
error: (_b = (_a = formState == null ? void 0 : formState.errors) == null ? void 0 : _a[field.slug]) == null ? void 0 : _b.message,
|
|
260
|
+
input: field.feature === "campaign:field:select" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
336
261
|
import_input_combobox.default,
|
|
337
262
|
{
|
|
338
263
|
...{
|
|
@@ -360,16 +285,14 @@ const FormVerifyPrize = ({
|
|
|
360
285
|
}
|
|
361
286
|
}
|
|
362
287
|
),
|
|
363
|
-
|
|
364
|
-
// Every prize question is required, so its label ends with *.
|
|
365
|
-
label: field.label + " *"
|
|
288
|
+
label: field.label
|
|
366
289
|
}
|
|
367
290
|
}
|
|
368
291
|
);
|
|
369
292
|
}
|
|
370
293
|
}
|
|
371
294
|
},
|
|
372
|
-
|
|
295
|
+
field.slug
|
|
373
296
|
))
|
|
374
297
|
]
|
|
375
298
|
}
|
|
@@ -415,8 +338,5 @@ const FormVerifyPrize = ({
|
|
|
415
338
|
var form_verify_prize_default = FormVerifyPrize;
|
|
416
339
|
// Annotate the CommonJS export names for ESM import in node:
|
|
417
340
|
0 && (module.exports = {
|
|
418
|
-
|
|
419
|
-
PrizeTerms,
|
|
420
|
-
answerKey,
|
|
421
|
-
splitValues
|
|
341
|
+
PrizeTerms
|
|
422
342
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Fragment } from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import Link from "./link.mjs";
|
|
5
4
|
import { useForm, FormProvider, Controller } from "../shared/lib/form.mjs";
|
|
6
5
|
import { useQueryClient } from "@tanstack/react-query";
|
|
@@ -11,55 +10,53 @@ import Form from "../shared/form.mjs";
|
|
|
11
10
|
import Fieldset from "../shared/fieldset.mjs";
|
|
12
11
|
import FormAction from "./form-action.mjs";
|
|
13
12
|
import InputGroup from "../input-group.mjs";
|
|
14
|
-
import InputAnswer from "../input-answer.mjs";
|
|
15
13
|
import InputText from "../input-text.mjs";
|
|
16
14
|
import InputCombobox from "./input-combobox.mjs";
|
|
17
15
|
import AddressLines from "../shared/address-lines.mjs";
|
|
18
16
|
import CardDataItem from "./card-data-item.mjs";
|
|
19
17
|
import Button from "../shared/button.mjs";
|
|
20
|
-
import ArrowLeft from "../icons/arrow-left.mjs";
|
|
21
|
-
import { AgreementDocument } from "../bridge/form-subdomain-agreement.mjs";
|
|
22
|
-
import { blank } from "./answer-rows.mjs";
|
|
23
18
|
const addressFieldNames = ["address", "address2", "city", "country", "postal", "province"];
|
|
24
|
-
const answerKey = (field) => (field == null ? void 0 : field.id) ? "question-" + field.id : field == null ? void 0 : field.slug;
|
|
25
19
|
const buildFieldsSchema = (fields) => {
|
|
26
20
|
return (fields || []).reduce(
|
|
27
21
|
(accumulator, field) => {
|
|
28
|
-
accumulator[
|
|
22
|
+
accumulator[field.slug] = yup.string().label(field.label).required();
|
|
29
23
|
return accumulator;
|
|
30
24
|
},
|
|
31
25
|
{}
|
|
32
26
|
);
|
|
33
27
|
};
|
|
34
28
|
const splitValues = (values, fields) => {
|
|
35
|
-
const
|
|
36
|
-
const fieldValues =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
const slugs = new Set((fields || []).map((f) => f.slug));
|
|
30
|
+
const fieldValues = [];
|
|
31
|
+
const address = {};
|
|
32
|
+
Object.entries(values || {}).forEach(([key, value]) => {
|
|
33
|
+
if (slugs.has(key)) {
|
|
34
|
+
fieldValues.push({
|
|
35
|
+
slug: key,
|
|
36
|
+
value
|
|
37
|
+
});
|
|
38
|
+
} else if (addressFieldNames.includes(key)) {
|
|
39
|
+
address[key] = value;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
41
42
|
return {
|
|
42
43
|
address,
|
|
43
44
|
fields: fieldValues
|
|
44
45
|
};
|
|
45
46
|
};
|
|
46
|
-
const PrizeTerms = ({ link
|
|
47
|
+
const PrizeTerms = ({ link }) => /* @__PURE__ */ jsxs("p", { children: [
|
|
47
48
|
"You are accepting this prize",
|
|
48
|
-
|
|
49
|
+
link ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
49
50
|
"\xA0as agreed to in the following campaign\xA0",
|
|
50
51
|
/* @__PURE__ */ jsx(
|
|
51
52
|
Button,
|
|
52
53
|
{
|
|
53
54
|
...{
|
|
55
|
+
element: Link,
|
|
56
|
+
href: link,
|
|
54
57
|
inline: true,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
onClick: onRead
|
|
58
|
-
} : {
|
|
59
|
-
element: Link,
|
|
60
|
-
href: link,
|
|
61
|
-
target: "_blank"
|
|
62
|
-
}
|
|
58
|
+
target: "_blank",
|
|
59
|
+
variant: "link"
|
|
63
60
|
},
|
|
64
61
|
children: "terms and conditions"
|
|
65
62
|
}
|
|
@@ -67,38 +64,6 @@ const PrizeTerms = ({ link, onRead }) => /* @__PURE__ */ jsxs("p", { children: [
|
|
|
67
64
|
] }) : null,
|
|
68
65
|
"."
|
|
69
66
|
] });
|
|
70
|
-
const PrizeDocument = ({ back, data, value }) => /* @__PURE__ */ jsxs(
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
...{
|
|
74
|
-
className: "space-y-6"
|
|
75
|
-
},
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ jsx(
|
|
78
|
-
Button,
|
|
79
|
-
{
|
|
80
|
-
...{
|
|
81
|
-
icon: ArrowLeft,
|
|
82
|
-
inline: true,
|
|
83
|
-
onClick: back,
|
|
84
|
-
reverse: true,
|
|
85
|
-
variant: "link"
|
|
86
|
-
},
|
|
87
|
-
children: "Back"
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ jsx(
|
|
91
|
-
AgreementDocument,
|
|
92
|
-
{
|
|
93
|
-
...{
|
|
94
|
-
data,
|
|
95
|
-
value
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
)
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
67
|
const FormVerifyPrize = ({
|
|
103
68
|
action = "Accept",
|
|
104
69
|
campaign,
|
|
@@ -122,25 +87,11 @@ const FormVerifyPrize = ({
|
|
|
122
87
|
})
|
|
123
88
|
)
|
|
124
89
|
});
|
|
125
|
-
const { formState, handleSubmit
|
|
90
|
+
const { formState, handleSubmit } = methods;
|
|
126
91
|
const onSubmit = (values) => {
|
|
127
|
-
var _a;
|
|
92
|
+
var _a, _b;
|
|
128
93
|
const { address, fields: fieldValues } = splitValues(values, fields);
|
|
129
|
-
|
|
130
|
-
const read = (terms == null ? void 0 : terms.type) === "document" && (terms == null ? void 0 : terms.document) ? () => modal.open({
|
|
131
|
-
message: /* @__PURE__ */ jsx(
|
|
132
|
-
PrizeDocument,
|
|
133
|
-
{
|
|
134
|
-
...{
|
|
135
|
-
back: review,
|
|
136
|
-
data: campaign == null ? void 0 : campaign.documents,
|
|
137
|
-
value: terms.document
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
),
|
|
141
|
-
title: "Terms and conditions"
|
|
142
|
-
}) : null;
|
|
143
|
-
const review = () => modal.open({
|
|
94
|
+
modal.open({
|
|
144
95
|
message: /* @__PURE__ */ jsxs(
|
|
145
96
|
FormAction,
|
|
146
97
|
{
|
|
@@ -159,19 +110,7 @@ const FormVerifyPrize = ({
|
|
|
159
110
|
method: "POST",
|
|
160
111
|
url: ""
|
|
161
112
|
}),
|
|
162
|
-
|
|
163
|
-
// A wrong answer goes under its question, and the winner
|
|
164
|
-
// tries again as often as they need.
|
|
165
|
-
onError: (error) => {
|
|
166
|
-
var _a2;
|
|
167
|
-
if ((_a2 = error == null ? void 0 : error.data) == null ? void 0 : _a2.fields) {
|
|
168
|
-
modal.close();
|
|
169
|
-
Object.entries(error.data.fields).forEach(([key, message]) => setError(answerKey(fields.find((field) => field.id === key) || { slug: key }), { message }));
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
;
|
|
173
|
-
onError(error);
|
|
174
|
-
},
|
|
113
|
+
onError,
|
|
175
114
|
onSuccess
|
|
176
115
|
},
|
|
177
116
|
children: [
|
|
@@ -179,8 +118,7 @@ const FormVerifyPrize = ({
|
|
|
179
118
|
PrizeTerms,
|
|
180
119
|
{
|
|
181
120
|
...{
|
|
182
|
-
link: (terms == null ? void 0 :
|
|
183
|
-
onRead: read
|
|
121
|
+
link: ((_b = (_a = campaign == null ? void 0 : campaign.agreements) == null ? void 0 : _a.terms) == null ? void 0 : _b.link) || null
|
|
184
122
|
}
|
|
185
123
|
}
|
|
186
124
|
),
|
|
@@ -205,11 +143,11 @@ const FormVerifyPrize = ({
|
|
|
205
143
|
{
|
|
206
144
|
...{
|
|
207
145
|
classNameSlotRight: "w-full text-right",
|
|
208
|
-
label: ((_a2 = fields.find((f) =>
|
|
146
|
+
label: ((_a2 = fields.find((f) => f.slug === fv.slug)) == null ? void 0 : _a2.label) || fv.slug,
|
|
209
147
|
value: fv.value
|
|
210
148
|
}
|
|
211
149
|
},
|
|
212
|
-
fv.
|
|
150
|
+
fv.slug
|
|
213
151
|
);
|
|
214
152
|
})
|
|
215
153
|
}
|
|
@@ -239,7 +177,6 @@ const FormVerifyPrize = ({
|
|
|
239
177
|
),
|
|
240
178
|
title
|
|
241
179
|
});
|
|
242
|
-
review();
|
|
243
180
|
};
|
|
244
181
|
return /* @__PURE__ */ jsx(
|
|
245
182
|
FormProvider,
|
|
@@ -279,24 +216,15 @@ const FormVerifyPrize = ({
|
|
|
279
216
|
{
|
|
280
217
|
...{
|
|
281
218
|
control: methods.control,
|
|
282
|
-
name:
|
|
219
|
+
name: field.slug,
|
|
283
220
|
render: ({ field: { value, onChange } }) => {
|
|
284
221
|
var _a, _b, _c, _d;
|
|
285
222
|
return /* @__PURE__ */ jsx(
|
|
286
223
|
InputGroup,
|
|
287
224
|
{
|
|
288
225
|
...{
|
|
289
|
-
error: (_b = (_a = formState == null ? void 0 : formState.errors) == null ? void 0 : _a[
|
|
290
|
-
input: field.
|
|
291
|
-
InputAnswer,
|
|
292
|
-
{
|
|
293
|
-
...{
|
|
294
|
-
label: field.label,
|
|
295
|
-
onChange,
|
|
296
|
-
value
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
) : field.feature === "campaign:field:select" ? /* @__PURE__ */ jsx(
|
|
226
|
+
error: (_b = (_a = formState == null ? void 0 : formState.errors) == null ? void 0 : _a[field.slug]) == null ? void 0 : _b.message,
|
|
227
|
+
input: field.feature === "campaign:field:select" ? /* @__PURE__ */ jsx(
|
|
300
228
|
InputCombobox,
|
|
301
229
|
{
|
|
302
230
|
...{
|
|
@@ -324,16 +252,14 @@ const FormVerifyPrize = ({
|
|
|
324
252
|
}
|
|
325
253
|
}
|
|
326
254
|
),
|
|
327
|
-
|
|
328
|
-
// Every prize question is required, so its label ends with *.
|
|
329
|
-
label: field.label + " *"
|
|
255
|
+
label: field.label
|
|
330
256
|
}
|
|
331
257
|
}
|
|
332
258
|
);
|
|
333
259
|
}
|
|
334
260
|
}
|
|
335
261
|
},
|
|
336
|
-
|
|
262
|
+
field.slug
|
|
337
263
|
))
|
|
338
264
|
]
|
|
339
265
|
}
|
|
@@ -378,9 +304,6 @@ const FormVerifyPrize = ({
|
|
|
378
304
|
};
|
|
379
305
|
var form_verify_prize_default = FormVerifyPrize;
|
|
380
306
|
export {
|
|
381
|
-
PrizeDocument,
|
|
382
307
|
PrizeTerms,
|
|
383
|
-
|
|
384
|
-
form_verify_prize_default as default,
|
|
385
|
-
splitValues
|
|
308
|
+
form_verify_prize_default as default
|
|
386
309
|
};
|
package/dist/dashboard/google.js
CHANGED
|
@@ -434,7 +434,6 @@ const InputMapControlPlaces = ({
|
|
|
434
434
|
const place = event == null ? void 0 : event.placePrediction.toPlace();
|
|
435
435
|
await place.fetchFields({
|
|
436
436
|
fields: [
|
|
437
|
-
"formattedAddress",
|
|
438
437
|
"location"
|
|
439
438
|
]
|
|
440
439
|
});
|
|
@@ -444,8 +443,7 @@ const InputMapControlPlaces = ({
|
|
|
444
443
|
].filter(Boolean);
|
|
445
444
|
if ((coordinates == null ? void 0 : coordinates.length) > 0) {
|
|
446
445
|
onSuccess({
|
|
447
|
-
coordinates
|
|
448
|
-
place: (place == null ? void 0 : place.formattedAddress) || null
|
|
446
|
+
coordinates
|
|
449
447
|
});
|
|
450
448
|
}
|
|
451
449
|
} catch (error) {
|
|
@@ -611,12 +609,7 @@ const InputMap = ({
|
|
|
611
609
|
{
|
|
612
610
|
...{
|
|
613
611
|
coordinates: value == null ? void 0 : value.coordinates,
|
|
614
|
-
// Resizing the circle keeps the place's name; moving it to
|
|
615
|
-
// another point drops the name, which no longer says where.
|
|
616
612
|
onCircleChanged: (object) => onChange({
|
|
617
|
-
...String(object == null ? void 0 : object.coordinates) === String(value == null ? void 0 : value.coordinates) && {
|
|
618
|
-
place: value == null ? void 0 : value.place
|
|
619
|
-
},
|
|
620
613
|
...object,
|
|
621
614
|
zoom
|
|
622
615
|
}),
|
|
@@ -401,7 +401,6 @@ const InputMapControlPlaces = ({
|
|
|
401
401
|
const place = event == null ? void 0 : event.placePrediction.toPlace();
|
|
402
402
|
await place.fetchFields({
|
|
403
403
|
fields: [
|
|
404
|
-
"formattedAddress",
|
|
405
404
|
"location"
|
|
406
405
|
]
|
|
407
406
|
});
|
|
@@ -411,8 +410,7 @@ const InputMapControlPlaces = ({
|
|
|
411
410
|
].filter(Boolean);
|
|
412
411
|
if ((coordinates == null ? void 0 : coordinates.length) > 0) {
|
|
413
412
|
onSuccess({
|
|
414
|
-
coordinates
|
|
415
|
-
place: (place == null ? void 0 : place.formattedAddress) || null
|
|
413
|
+
coordinates
|
|
416
414
|
});
|
|
417
415
|
}
|
|
418
416
|
} catch (error) {
|
|
@@ -578,12 +576,7 @@ const InputMap = ({
|
|
|
578
576
|
{
|
|
579
577
|
...{
|
|
580
578
|
coordinates: value == null ? void 0 : value.coordinates,
|
|
581
|
-
// Resizing the circle keeps the place's name; moving it to
|
|
582
|
-
// another point drops the name, which no longer says where.
|
|
583
579
|
onCircleChanged: (object) => onChange({
|
|
584
|
-
...String(object == null ? void 0 : object.coordinates) === String(value == null ? void 0 : value.coordinates) && {
|
|
585
|
-
place: value == null ? void 0 : value.place
|
|
586
|
-
},
|
|
587
580
|
...object,
|
|
588
581
|
zoom
|
|
589
582
|
}),
|
|
@@ -174,7 +174,6 @@ const InputArraySortable = ({
|
|
|
174
174
|
children,
|
|
175
175
|
control,
|
|
176
176
|
empty = "No items added",
|
|
177
|
-
handleLabel,
|
|
178
177
|
name,
|
|
179
178
|
onSort,
|
|
180
179
|
renderButton,
|
|
@@ -200,7 +199,6 @@ const InputArraySortable = ({
|
|
|
200
199
|
import_sortable.default,
|
|
201
200
|
{
|
|
202
201
|
...{
|
|
203
|
-
handleLabel,
|
|
204
202
|
items: fields,
|
|
205
203
|
onSort: (array, { from, to }) => {
|
|
206
204
|
move(from, to);
|