@calcom/atoms 1.3.1 → 1.4.0-booker

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.
Files changed (122) hide show
  1. package/dist/{AddressInput-PV7ej7Dh.js → AddressInput-2hL6xvaw.js} +3 -3
  2. package/dist/{AlbyPriceComponent-yWDmVyID.js → AlbyPriceComponent-90fNQIrg.js} +19 -19
  3. package/dist/{PhoneInput-3kNrcLmH.js → PhoneInput-FnKIa4kA.js} +1 -1
  4. package/dist/cal-atoms.js +5 -36
  5. package/dist/index-YQ_KdK6G.js +83604 -0
  6. package/dist/{index-i9Hko2MN.js → index-a3d1IjXE.js} +1 -1
  7. package/dist/index-ubX_XTnt.js +1957 -0
  8. package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts +1 -1
  9. package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts.map +1 -1
  10. package/dist/packages/features/bookings/Booker/components/hooks/useBookings.d.ts +39 -0
  11. package/dist/packages/features/bookings/Booker/components/hooks/useBookings.d.ts.map +1 -1
  12. package/dist/packages/features/bookings/Booker/utils/event.d.ts +7 -0
  13. package/dist/packages/features/bookings/Booker/utils/event.d.ts.map +1 -1
  14. package/dist/packages/features/bookings/lib/handleNewBooking/test/fresh-booking.test.d.ts.map +1 -1
  15. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
  16. package/dist/packages/features/ee/round-robin/roundRobinDeleteEvents.test.d.ts +2 -0
  17. package/dist/packages/features/ee/round-robin/roundRobinDeleteEvents.test.d.ts.map +1 -0
  18. package/dist/packages/features/ee/workflows/pages/workflow.d.ts.map +1 -1
  19. package/dist/packages/features/eventtypes/components/locations/CalVideoSettings.d.ts +6 -0
  20. package/dist/packages/features/eventtypes/components/locations/CalVideoSettings.d.ts.map +1 -0
  21. package/dist/packages/features/eventtypes/components/locations/LocationSettingsContainer.d.ts +5 -0
  22. package/dist/packages/features/eventtypes/components/locations/LocationSettingsContainer.d.ts.map +1 -0
  23. package/dist/packages/features/eventtypes/components/{Locations.d.ts → locations/Locations.d.ts} +2 -2
  24. package/dist/packages/features/eventtypes/components/locations/Locations.d.ts.map +1 -0
  25. package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts +1 -1
  26. package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts.map +1 -1
  27. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +36 -0
  28. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
  29. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts +7 -0
  30. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts.map +1 -1
  31. package/dist/packages/features/eventtypes/lib/types.d.ts +10 -9
  32. package/dist/packages/features/eventtypes/lib/types.d.ts.map +1 -1
  33. package/dist/packages/features/schedules/components/DateOverrideInputDialog.d.ts.map +1 -1
  34. package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
  35. package/dist/packages/platform/atoms/booker/types.d.ts +1 -0
  36. package/dist/packages/platform/atoms/booker/types.d.ts.map +1 -1
  37. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts +7 -0
  38. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
  39. package/dist/packages/platform/atoms/index.d.ts +0 -36
  40. package/dist/packages/platform/atoms/index.d.ts.map +1 -1
  41. package/dist/packages/platform/libraries/index.d.ts +1 -0
  42. package/dist/packages/platform/libraries/index.d.ts.map +1 -1
  43. package/dist/packages/platform/libraries/repositories.d.ts +1 -0
  44. package/dist/packages/platform/libraries/repositories.d.ts.map +1 -1
  45. package/dist/packages/platform/libraries/slots.d.ts +2 -0
  46. package/dist/packages/platform/libraries/slots.d.ts.map +1 -1
  47. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.d.ts +1 -0
  48. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.d.ts.map +1 -1
  49. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.d.ts +1 -0
  50. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.d.ts.map +1 -1
  51. package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts +1 -0
  52. package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts.map +1 -1
  53. package/dist/packages/platform/types/slots/slots-2024-04-15/inputs/index.d.ts +1 -0
  54. package/dist/packages/platform/types/slots/slots-2024-04-15/inputs/index.d.ts.map +1 -1
  55. package/dist/packages/trpc/server/routers/viewer/slots/_router.d.ts +1 -0
  56. package/dist/packages/trpc/server/routers/viewer/slots/_router.d.ts.map +1 -1
  57. package/dist/packages/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots.d.ts +19 -7
  58. package/dist/packages/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots.d.ts.map +1 -1
  59. package/dist/packages/trpc/server/routers/viewer/slots/types.d.ts +21 -0
  60. package/dist/packages/trpc/server/routers/viewer/slots/types.d.ts.map +1 -1
  61. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts +2 -0
  62. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts.map +1 -1
  63. package/dist/style.css +1 -1
  64. package/package.json +1 -1
  65. package/dist/AppCard-4lsFofOP.js +0 -281
  66. package/dist/AppListCardPlatformWrapper-mavIjLoX.js +0 -9
  67. package/dist/AppListCardWebWrapper-E4rFeVUL.js +0 -74
  68. package/dist/AppSettingsInterface-1ECb-eGL.js +0 -29
  69. package/dist/AppSettingsInterface-SMx0rhrP.js +0 -75
  70. package/dist/AppSettingsInterface-vkAV3Jq-.js +0 -23
  71. package/dist/DateRangePicker-FF6QrWWv.js +0 -74
  72. package/dist/EventTypeAppCardInterface-2LX6RMKq.js +0 -24
  73. package/dist/EventTypeAppCardInterface-2bXQeyo2.js +0 -51
  74. package/dist/EventTypeAppCardInterface-3_OzEh4S.js +0 -33
  75. package/dist/EventTypeAppCardInterface-4WQGK5d3.js +0 -49
  76. package/dist/EventTypeAppCardInterface-D1OE6jGL.js +0 -858
  77. package/dist/EventTypeAppCardInterface-Dbx02Qtp.js +0 -39
  78. package/dist/EventTypeAppCardInterface-ECQy5_jF.js +0 -24
  79. package/dist/EventTypeAppCardInterface-EJ7vSpn7.js +0 -24
  80. package/dist/EventTypeAppCardInterface-Ej5y5wB2.js +0 -34
  81. package/dist/EventTypeAppCardInterface-HAuMr26j.js +0 -34
  82. package/dist/EventTypeAppCardInterface-HH9e5NM3.js +0 -34
  83. package/dist/EventTypeAppCardInterface-P6ANaRXE.js +0 -51
  84. package/dist/EventTypeAppCardInterface-SLLlwhTF.js +0 -41
  85. package/dist/EventTypeAppCardInterface-YsyyQucw.js +0 -24
  86. package/dist/EventTypeAppCardInterface-aNw-rctk.js +0 -86
  87. package/dist/EventTypeAppCardInterface-aof5TfU5.js +0 -39
  88. package/dist/EventTypeAppCardInterface-eWtAVevk.js +0 -34
  89. package/dist/EventTypeAppCardInterface-jA0StO-p.js +0 -31
  90. package/dist/EventTypeAppCardInterface-juIgeyaW.js +0 -34
  91. package/dist/EventTypeAppCardInterface-n5XUB5zh.js +0 -41
  92. package/dist/EventTypeAppCardInterface-nHnp-f_B.js +0 -24
  93. package/dist/EventTypeAppCardInterface-sCnBi-mW.js +0 -34
  94. package/dist/EventTypeAppCardInterface-tW0Vnzy2.js +0 -32
  95. package/dist/EventTypeAppCardInterface-uvXLgnEb.js +0 -34
  96. package/dist/EventTypeAppCardInterface-voyuklxT.js +0 -42
  97. package/dist/EventTypeAppCardInterface-xscYaAxr.js +0 -42
  98. package/dist/EventTypeAppCardInterface-y_jea2qd.js +0 -32
  99. package/dist/EventTypeAppSettingsInterface-2SBSbFCU.js +0 -48
  100. package/dist/EventTypeAppSettingsInterface-9LmBTR_4.js +0 -25
  101. package/dist/EventTypeAppSettingsInterface-B5891wx6.js +0 -43
  102. package/dist/EventTypeAppSettingsInterface-CN46bj0_.js +0 -78
  103. package/dist/EventTypeAppSettingsInterface-HvDJO9aW.js +0 -106
  104. package/dist/EventTypeAppSettingsInterface-LDtd3pKw.js +0 -24
  105. package/dist/EventTypeAppSettingsInterface-Lsx2he2j.js +0 -298
  106. package/dist/EventTypeAppSettingsInterface-M-phIaYV.js +0 -42
  107. package/dist/EventTypeAppSettingsInterface-Pryhal8P.js +0 -23
  108. package/dist/EventTypeAppSettingsInterface-YLFWXdQz.js +0 -72
  109. package/dist/EventTypeAppSettingsInterface-_REB8BRg.js +0 -221
  110. package/dist/EventTypeAppSettingsInterface-eMmPRmMH.js +0 -120
  111. package/dist/EventTypeAppSettingsInterface-pMt1ppeg.js +0 -23
  112. package/dist/InstallAppButton-JXhBVaYJ.js +0 -29
  113. package/dist/InstallAppButton-NOXXlDQb.js +0 -58
  114. package/dist/InstallAppButton-f_95VpK3.js +0 -14
  115. package/dist/InstallAppButton-fwJeBDlx.js +0 -14
  116. package/dist/StripePaymentForm-LAfd5yhD.js +0 -493
  117. package/dist/currencyOptions-kannG2hu.js +0 -61
  118. package/dist/index-YoOZkYTB.js +0 -30
  119. package/dist/index-YthdNsV6.js +0 -518
  120. package/dist/index-dC9oWaTb.js +0 -161409
  121. package/dist/packages/features/eventtypes/components/Locations.d.ts.map +0 -1
  122. package/dist/useIsAppEnabled-qoop3Fxe.js +0 -18
@@ -1,34 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { G as m } from "./index-dC9oWaTb.js";
3
- import { A as c } from "./AppCard-4lsFofOP.js";
4
- import { u } from "./useIsAppEnabled-qoop3Fxe.js";
5
- import l from "./EventTypeAppSettingsInterface-Pryhal8P.js";
6
- const b = function({ app: t, eventType: e }) {
7
- var p;
8
- const { getAppData: r, setAppData: s, disabled: n } = m(), { enabled: o, updateEnabled: i } = u(t);
9
- return /* @__PURE__ */ a(
10
- c,
11
- {
12
- hideSettingsIcon: !0,
13
- app: t,
14
- switchOnClick: (d) => {
15
- i(d);
16
- },
17
- switchChecked: o,
18
- teamId: ((p = e.team) == null ? void 0 : p.id) || void 0,
19
- children: /* @__PURE__ */ a(
20
- l,
21
- {
22
- eventType: e,
23
- slug: t.slug,
24
- disabled: n,
25
- getAppData: r,
26
- setAppData: s
27
- }
28
- )
29
- }
30
- );
31
- };
32
- export {
33
- b as default
34
- };
@@ -1,42 +0,0 @@
1
- import { jsx as e, Fragment as P } from "react/jsx-runtime";
2
- import { z as i, y as g, G as f, J as b, W as S } from "./index-dC9oWaTb.js";
3
- import { useMemo as v, useState as C } from "react";
4
- import { A as w } from "./AppCard-4lsFofOP.js";
5
- import E from "./EventTypeAppSettingsInterface-YLFWXdQz.js";
6
- const $ = function({
7
- app: a,
8
- eventType: p,
9
- eventTypeFormMetadata: c
10
- }) {
11
- const t = i.useSearchParams(), { t: m } = g(), s = i.usePathname(), h = v(
12
- () => `${s}${t ? `?${t.toString()}` : ""}`,
13
- [s, t]
14
- ), { getAppData: n, setAppData: d, disabled: l } = f(), [o, u] = C(n("enabled")), A = b(c), r = !o && A;
15
- return /* @__PURE__ */ e(
16
- w,
17
- {
18
- returnTo: S + h,
19
- app: a,
20
- switchChecked: o,
21
- switchOnClick: (y) => {
22
- u(y);
23
- },
24
- description: /* @__PURE__ */ e(P, { children: "Add bitcoin lightning payments to your events" }),
25
- disableSwitch: r,
26
- switchTooltip: r ? m("other_payment_app_enabled") : void 0,
27
- children: /* @__PURE__ */ e(
28
- E,
29
- {
30
- eventType: p,
31
- slug: a.slug,
32
- disabled: l,
33
- getAppData: n,
34
- setAppData: d
35
- }
36
- )
37
- }
38
- );
39
- };
40
- export {
41
- $ as default
42
- };
@@ -1,42 +0,0 @@
1
- import { jsx as e, Fragment as p } from "react/jsx-runtime";
2
- import { z as i, G as f, J as g, y as S, W as b } from "./index-dC9oWaTb.js";
3
- import { useMemo as v, useState as C } from "react";
4
- import { A as w } from "./AppCard-4lsFofOP.js";
5
- import E from "./EventTypeAppSettingsInterface-CN46bj0_.js";
6
- const $ = function({
7
- app: a,
8
- eventType: c,
9
- eventTypeFormMetadata: m
10
- }) {
11
- const t = i.useSearchParams(), s = i.usePathname(), h = v(
12
- () => `${s}${t ? `?${t.toString()}` : ""}`,
13
- [s, t]
14
- ), { getAppData: n, setAppData: d, disabled: l } = f(), [o, u] = C(n("enabled")), y = g(m), { t: A } = S(), r = !o && y;
15
- return /* @__PURE__ */ e(
16
- w,
17
- {
18
- returnTo: b + h,
19
- app: a,
20
- switchChecked: o,
21
- switchOnClick: (P) => {
22
- u(P);
23
- },
24
- description: /* @__PURE__ */ e(p, { children: "Add Paypal payment to your events" }),
25
- disableSwitch: r,
26
- switchTooltip: r ? A("other_payment_app_enabled") : void 0,
27
- children: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
28
- E,
29
- {
30
- eventType: c,
31
- slug: a.slug,
32
- disabled: l,
33
- getAppData: n,
34
- setAppData: d
35
- }
36
- ) })
37
- }
38
- );
39
- };
40
- export {
41
- $ as default
42
- };
@@ -1,32 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useState as c } from "react";
3
- import { G as m, f as l } from "./index-dC9oWaTb.js";
4
- import { A as f } from "./AppCard-4lsFofOP.js";
5
- const k = function({ app: p, eventType: i }) {
6
- var n;
7
- const { getAppData: t, setAppData: o } = m(), s = t("trackingId"), [d, a] = c(t("enabled"));
8
- return /* @__PURE__ */ r(
9
- f,
10
- {
11
- app: p,
12
- switchOnClick: (e) => {
13
- a(!!e);
14
- },
15
- switchChecked: d,
16
- teamId: ((n = i.team) == null ? void 0 : n.id) || void 0,
17
- children: /* @__PURE__ */ r(
18
- l,
19
- {
20
- name: "Tracking ID",
21
- value: s,
22
- onChange: (e) => {
23
- o("trackingId", e.target.value);
24
- }
25
- }
26
- )
27
- }
28
- );
29
- };
30
- export {
31
- k as default
32
- };
@@ -1,48 +0,0 @@
1
- import { jsxs as o, jsx as c } from "react/jsx-runtime";
2
- import { useState as m, useEffect as v } from "react";
3
- import { O as p, S as h } from "./index-dC9oWaTb.js";
4
- const S = ({}) => {
5
- const [n, u] = m(), [f, r] = m(), { data: e } = p.viewer.appBasecamp3.projects.useQuery(), d = p.viewer.appBasecamp3.projectMutation.useMutation();
6
- return v(
7
- function() {
8
- var a, i, l;
9
- r({
10
- value: e == null ? void 0 : e.projects.currentProject,
11
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
- label: (i = (a = e == null ? void 0 : e.projects) == null ? void 0 : a.find((s) => s.id === (e == null ? void 0 : e.currentProject))) == null ? void 0 : i.name
13
- }), u(
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
- (l = e == null ? void 0 : e.projects) == null ? void 0 : l.map((s) => ({
16
- value: s.id,
17
- label: s.name
18
- }))
19
- );
20
- },
21
- [e]
22
- ), /* @__PURE__ */ o("div", { className: "mt-2 text-sm", children: [
23
- /* @__PURE__ */ o("div", { className: "flex gap-3", children: [
24
- /* @__PURE__ */ c("div", { className: "items-center", children: /* @__PURE__ */ c("p", { className: "py-2", children: "Link a Basecamp project to this event:" }) }),
25
- /* @__PURE__ */ c(
26
- h,
27
- {
28
- placeholder: "Select project",
29
- options: n,
30
- isLoading: !n,
31
- className: "md:min-w-[120px]",
32
- onChange: (t) => {
33
- t && (d.mutate({ projectId: t == null ? void 0 : t.value.toString() }), r(t));
34
- },
35
- value: f
36
- }
37
- )
38
- ] }),
39
- /* @__PURE__ */ o("div", { className: "mt-2", children: [
40
- "Please note that as of now you can only link ",
41
- /* @__PURE__ */ c("span", { className: "italic", children: "one" }),
42
- " of your projects to cal.com"
43
- ] })
44
- ] });
45
- };
46
- export {
47
- S as default
48
- };
@@ -1,25 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { f as c } from "./index-dC9oWaTb.js";
3
- const s = ({
4
- getAppData: t,
5
- setAppData: e,
6
- disabled: a,
7
- slug: n
8
- }) => {
9
- const r = t("trackingId");
10
- return /* @__PURE__ */ o(
11
- c,
12
- {
13
- dataTestid: n,
14
- name: "Tracking ID",
15
- value: r,
16
- disabled: a,
17
- onChange: (i) => {
18
- e("trackingId", i.target.value);
19
- }
20
- }
21
- );
22
- };
23
- export {
24
- s as default
25
- };
@@ -1,43 +0,0 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { useState as u } from "react";
3
- import { y as p, f as h, V as v, s as x } from "./index-dC9oWaTb.js";
4
- const N = ({ eventType: n, disabled: d }) => {
5
- const { t: i } = p(), [r, c] = u(""), m = r !== "" ? `?${r}` : "", t = n.URL + m;
6
- function s({ size: a, data: f }) {
7
- const l = `https://api.qrserver.com/v1/create-qr-code/?size=${a}&data=${f}`;
8
- return /* @__PURE__ */ e(v, { content: t, children: /* @__PURE__ */ e("a", { download: !0, href: l, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e(
9
- "img",
10
- {
11
- className: x(
12
- "hover:bg-muted border-default border transition hover:shadow-sm",
13
- a >= 256 && "min-h-32"
14
- ),
15
- style: { padding: a / 16, borderRadius: a / 20 },
16
- width: a,
17
- src: l,
18
- alt: t
19
- }
20
- ) }) });
21
- }
22
- return /* @__PURE__ */ o("div", { className: "flex w-full flex-col gap-5 text-sm", children: [
23
- /* @__PURE__ */ e("div", { className: "flex w-full", children: /* @__PURE__ */ e(
24
- h,
25
- {
26
- name: "hello",
27
- disabled: d,
28
- value: r,
29
- onChange: (a) => c(a.target.value),
30
- label: i("additional_url_parameters"),
31
- containerClassName: "w-full"
32
- }
33
- ) }),
34
- /* @__PURE__ */ o("div", { className: "max-w-60 flex items-baseline gap-2", children: [
35
- /* @__PURE__ */ e(s, { size: 256, data: t }),
36
- /* @__PURE__ */ e(s, { size: 128, data: t }),
37
- /* @__PURE__ */ e(s, { size: 64, data: t })
38
- ] })
39
- ] });
40
- };
41
- export {
42
- N as default
43
- };
@@ -1,78 +0,0 @@
1
- import { jsx as l, jsxs as m, Fragment as w } from "react/jsx-runtime";
2
- import { useState as o, useEffect as _ } from "react";
3
- import { c as i, i as k, a as S } from "./currencyOptions-kannG2hu.js";
4
- import { Q as r, y as E, M as x, f as F, R as T, U as q, S as O } from "./index-dC9oWaTb.js";
5
- const H = ({
6
- getAppData: n,
7
- setAppData: t,
8
- eventType: d
9
- }) => {
10
- var p, h;
11
- const y = n("price"), a = n("currency") || i[0].value, [s, N] = o(i.find((e) => e.value === a)), [C, P] = o(
12
- k(a) ? S[a] : ""
13
- ), f = n("paymentOption"), u = ((p = r) == null ? void 0 : p.find((e) => f === e.value)) || {
14
- label: r[0].label,
15
- value: r[0].value
16
- }, b = !!d.seatsPerTimeSlot, [v, L] = o(n("enabled")), { t: c } = E(), g = ((h = d.recurringEvent) == null ? void 0 : h.count) !== void 0;
17
- return _(() => {
18
- v && (n("currency") || t("currency", i[0].value), n("paymentOption") || t("paymentOption", r[0].value));
19
- }, []), g ? /* @__PURE__ */ l(x, { className: "mt-2", severity: "warning", title: c("warning_recurring_event_payment") }) : v ? /* @__PURE__ */ m(w, { children: [
20
- /* @__PURE__ */ l("div", { className: "mt-2 block items-center sm:flex", children: /* @__PURE__ */ l(
21
- F,
22
- {
23
- label: "Price",
24
- labelSrOnly: !0,
25
- addOnLeading: C,
26
- addOnSuffix: a,
27
- step: "0.01",
28
- min: "0.5",
29
- type: "number",
30
- required: !0,
31
- className: "block w-full rounded-sm pl-2 text-sm",
32
- placeholder: "Price",
33
- "data-testid": "paypal-price-input",
34
- onChange: (e) => {
35
- t("price", T(Number(e.target.value), a)), s && t("currency", s.value);
36
- },
37
- value: y > 0 ? q(y, a) : void 0
38
- }
39
- ) }),
40
- /* @__PURE__ */ m("div", { className: "mt-5 w-60", children: [
41
- /* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: c("currency") }),
42
- /* @__PURE__ */ l(
43
- O,
44
- {
45
- variant: "default",
46
- "data-testid": "paypal-currency-select",
47
- options: i,
48
- value: s,
49
- className: "text-black",
50
- defaultValue: s,
51
- onChange: (e) => {
52
- e && (N(e), P(S[e.value]), t("currency", e.value));
53
- }
54
- }
55
- )
56
- ] }),
57
- /* @__PURE__ */ m("div", { className: "mt-4 w-60", children: [
58
- /* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: "Payment option" }),
59
- /* @__PURE__ */ l(
60
- O,
61
- {
62
- "data-testid": "paypal-payment-option-select",
63
- defaultValue: u ? { ...u, label: c(u.label) } : { ...r[0], label: c(r[0].label) },
64
- options: r.map((e) => ({ ...e, label: c(e.label) || e.label })),
65
- onChange: (e) => {
66
- e && t("paymentOption", e.value);
67
- },
68
- className: "mb-1 h-[38px] w-full",
69
- isDisabled: b
70
- }
71
- )
72
- ] }),
73
- b && f === "HOLD" && /* @__PURE__ */ l(x, { className: "mt-2", severity: "warning", title: c("seats_and_no_show_fee_error") })
74
- ] }) : null;
75
- };
76
- export {
77
- H as default
78
- };
@@ -1,106 +0,0 @@
1
- import { jsx as n, Fragment as D, jsxs as c } from "react/jsx-runtime";
2
- import { useState as f, useEffect as T } from "react";
3
- import { y as R, a2 as t, M as y, f as w, S as P } from "./index-dC9oWaTb.js";
4
- const i = [
5
- { label: "SATS", value: "BTC", unit: "SATS" },
6
- { label: "USD- US Dollar", value: "USD", unit: "USD" },
7
- { label: "EUR- Euro", value: "EUR", unit: "EUR" },
8
- { label: "JPY- Japanese Yen", value: "JPY", unit: "JPY" },
9
- { label: "CNY- Yuan Renminbi", value: "CNY", unit: "CNY" },
10
- { label: "GBP- Pounds Sterling", value: "GBP", unit: "GBP" },
11
- { label: "AED- UAE Dirham", value: "AED", unit: "AED" },
12
- { label: "ZAR- South African Rand", value: "ZAR", unit: "ZAR" },
13
- { label: "HKD- Hong Kong Dollar", value: "HKD", unit: "HKD" },
14
- { label: "BRL- Brazilian Real", value: "BRL", unit: "BRL" },
15
- { label: "AUD- Australian Dollar", value: "AUD", unit: "AUD" },
16
- { label: "CAD- Canadian Dollar", value: "CAD", unit: "CAD" },
17
- { label: "CZK- Czech Koruna", value: "CZK", unit: "CZK" },
18
- { label: "DKK- Danish Krone", value: "DKK", unit: "DKK" },
19
- { label: "NZD- New Zealand Dollar", value: "NZD", unit: "NZD" },
20
- { label: "MYR- Malaysian Ringgit", value: "MYR", unit: "MYR" },
21
- { label: "PHP- Philippine Peso", value: "PHP", unit: "PHP" },
22
- { label: "CHF- Swiss Franc", value: "CHF", unit: "CHF" },
23
- { label: "NOK- Norwegian Krone", value: "NOK", unit: "NOK" },
24
- { label: "THB- Thai Baht", value: "THB", unit: "THB" },
25
- { label: "SEK- Swedish Krona", value: "SEK", unit: "SEK" },
26
- { label: "SGD- Singapore Dollar", value: "SGD", unit: "SGD" },
27
- { label: "PLN- Polish Zloty", value: "PLN", unit: "PLN" },
28
- { label: "TWD- New Taiwan Dollar", value: "TWD", unit: "TWD" },
29
- { label: "MXN- Mexican Peso", value: "MXN", unit: "MXN" },
30
- { label: "ILS- New Isreali Shekel", value: "ILS", unit: "ILS" },
31
- { label: "NGN- Nigerian Naira", value: "NGN", unit: "NGN" }
32
- ], C = ["SATS", "BTC", "JPY"], E = (r, l) => C.includes(l.toUpperCase()) ? r : Math.round(r * 100), x = (r, l) => C.includes(l.toUpperCase()) ? r : r / 100, Y = ({
33
- eventType: r,
34
- getAppData: l,
35
- setAppData: u
36
- }) => {
37
- var h, S;
38
- const { t: a } = R(), s = l("price"), o = l("currency") || (i.length > 0 ? i[0].value : ""), [v, K] = f(
39
- i.find((e) => e.value === o) || (i.length > 0 ? {
40
- label: i[0].label,
41
- value: i[0].value
42
- } : null)
43
- ), d = l("paymentOption"), b = ((h = t) == null ? void 0 : h.find((e) => d === e.value)) || {
44
- label: t.length > 0 ? t[0].label : "",
45
- value: t.length > 0 ? t[0].value : ""
46
- }, N = !!r.seatsPerTimeSlot, [m, U] = f(l("enabled")), p = ((S = r.recurringEvent) == null ? void 0 : S.count) !== void 0;
47
- T(() => {
48
- m && !l("currency") && u("currency", i[0].value);
49
- }, [m, l, u]);
50
- const g = (e) => Math.floor(e);
51
- return /* @__PURE__ */ n(D, { children: p ? /* @__PURE__ */ n(y, { className: "mt-2", severity: "warning", title: a("warning_recurring_event_payment") }) : m && /* @__PURE__ */ c(D, { children: [
52
- /* @__PURE__ */ c("div", { className: "mt-4 inline-block", children: [
53
- /* @__PURE__ */ n("label", { className: "text-default block text-sm font-medium mb-1", htmlFor: "price", children: a("price") }),
54
- /* @__PURE__ */ n(
55
- w,
56
- {
57
- label: a("price"),
58
- className: "text-black dark:text-white w-auto",
59
- addOnClassname: "h-[38px]",
60
- min: "1",
61
- type: "number",
62
- required: !0,
63
- placeholder: "Price",
64
- onChange: (e) => {
65
- u("price", E(Number(e.target.value), o));
66
- },
67
- value: s && s > 0 ? g(x(s, o)) : void 0
68
- }
69
- )
70
- ] }),
71
- /* @__PURE__ */ c("div", { className: "mt-5 w-60", children: [
72
- /* @__PURE__ */ n("label", { className: "text-default block text-sm font-medium", htmlFor: "currency", children: a("currency") }),
73
- /* @__PURE__ */ n(
74
- P,
75
- {
76
- variant: "default",
77
- options: i,
78
- value: v,
79
- defaultValue: v,
80
- onChange: (e) => {
81
- e && (K(e), u("currency", e.value));
82
- }
83
- }
84
- )
85
- ] }),
86
- /* @__PURE__ */ c("div", { className: "mt-2 w-60", children: [
87
- /* @__PURE__ */ n("label", { className: "text-default block text-sm font-medium", htmlFor: "paymentOption", children: a("payment_option") }),
88
- /* @__PURE__ */ n(
89
- P,
90
- {
91
- defaultValue: b ? { ...b, label: a(b.label) } : t.length > 0 ? { ...t[0], label: a(t[0].label) } : void 0,
92
- options: t.map((e) => ({ ...e, label: a(e.label) || e.label })),
93
- onChange: (e) => {
94
- e && u("paymentOption", e.value);
95
- },
96
- className: "mb-1 h-[38px] w-full",
97
- isDisabled: N
98
- }
99
- )
100
- ] }),
101
- N && d === "HOLD" && /* @__PURE__ */ n(y, { className: "mt-2", severity: "warning", title: a("seats_and_no_show_fee_error") })
102
- ] }) });
103
- };
104
- export {
105
- Y as default
106
- };
@@ -1,24 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { f as g } from "./index-dC9oWaTb.js";
3
- const o = ({
4
- getAppData: t,
5
- setAppData: a,
6
- disabled: e
7
- }) => {
8
- const n = t("trackingId");
9
- return /* @__PURE__ */ i(
10
- g,
11
- {
12
- name: "Tracking ID",
13
- "data-testid": "gtm-tracking-id-input",
14
- value: n,
15
- disabled: e,
16
- onChange: (r) => {
17
- a("trackingId", r.target.value);
18
- }
19
- }
20
- );
21
- };
22
- export {
23
- o as default
24
- };