@calcom/atoms 1.3.0 → 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 (141) hide show
  1. package/dist/{AddressInput-sMG4Ayqp.js → AddressInput-2hL6xvaw.js} +3 -3
  2. package/dist/{AlbyPriceComponent-1rbVIc_T.js → AlbyPriceComponent-90fNQIrg.js} +19 -19
  3. package/dist/{PhoneInput-cqTlU9G5.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-SRsTKyeM.js → index-a3d1IjXE.js} +1 -1
  7. package/dist/index-ubX_XTnt.js +1957 -0
  8. package/dist/packages/features/bookings/Booker/Booker.d.ts.map +1 -1
  9. package/dist/packages/features/bookings/Booker/BookerStoreProvider.d.ts +11 -0
  10. package/dist/packages/features/bookings/Booker/BookerStoreProvider.d.ts.map +1 -0
  11. package/dist/packages/features/bookings/Booker/__tests__/test-utils.d.ts +10 -0
  12. package/dist/packages/features/bookings/Booker/__tests__/test-utils.d.ts.map +1 -0
  13. package/dist/packages/features/bookings/Booker/components/AvailableTimeSlots.d.ts +2 -1
  14. package/dist/packages/features/bookings/Booker/components/AvailableTimeSlots.d.ts.map +1 -1
  15. package/dist/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.d.ts +2 -1
  16. package/dist/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.d.ts.map +1 -1
  17. package/dist/packages/features/bookings/Booker/components/DatePicker.d.ts.map +1 -1
  18. package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts +2 -1
  19. package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts.map +1 -1
  20. package/dist/packages/features/bookings/Booker/components/Header.d.ts.map +1 -1
  21. package/dist/packages/features/bookings/Booker/components/LargeCalendar.d.ts.map +1 -1
  22. package/dist/packages/features/bookings/Booker/components/hooks/useBookerLayout.d.ts.map +1 -1
  23. package/dist/packages/features/bookings/Booker/components/hooks/useBookings.d.ts +39 -0
  24. package/dist/packages/features/bookings/Booker/components/hooks/useBookings.d.ts.map +1 -1
  25. package/dist/packages/features/bookings/Booker/store.d.ts +6 -6
  26. package/dist/packages/features/bookings/Booker/store.d.ts.map +1 -1
  27. package/dist/packages/features/bookings/Booker/utils/event.d.ts +7 -0
  28. package/dist/packages/features/bookings/Booker/utils/event.d.ts.map +1 -1
  29. package/dist/packages/features/bookings/lib/handleNewBooking/test/fresh-booking.test.d.ts.map +1 -1
  30. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
  31. package/dist/packages/features/ee/round-robin/roundRobinDeleteEvents.test.d.ts +2 -0
  32. package/dist/packages/features/ee/round-robin/roundRobinDeleteEvents.test.d.ts.map +1 -0
  33. package/dist/packages/features/ee/workflows/pages/workflow.d.ts.map +1 -1
  34. package/dist/packages/features/eventtypes/components/locations/CalVideoSettings.d.ts +6 -0
  35. package/dist/packages/features/eventtypes/components/locations/CalVideoSettings.d.ts.map +1 -0
  36. package/dist/packages/features/eventtypes/components/locations/LocationSettingsContainer.d.ts +5 -0
  37. package/dist/packages/features/eventtypes/components/locations/LocationSettingsContainer.d.ts.map +1 -0
  38. package/dist/packages/features/eventtypes/components/{Locations.d.ts → locations/Locations.d.ts} +2 -2
  39. package/dist/packages/features/eventtypes/components/locations/Locations.d.ts.map +1 -0
  40. package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts +1 -1
  41. package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts.map +1 -1
  42. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +36 -0
  43. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
  44. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts +7 -0
  45. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts.map +1 -1
  46. package/dist/packages/features/eventtypes/lib/types.d.ts +10 -9
  47. package/dist/packages/features/eventtypes/lib/types.d.ts.map +1 -1
  48. package/dist/packages/features/schedules/components/DateOverrideInputDialog.d.ts.map +1 -1
  49. package/dist/packages/platform/atoms/availability/AvailabilitySettings.d.ts.map +1 -1
  50. package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
  51. package/dist/packages/platform/atoms/booker/types.d.ts +1 -0
  52. package/dist/packages/platform/atoms/booker/types.d.ts.map +1 -1
  53. package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts.map +1 -1
  54. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts +7 -0
  55. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
  56. package/dist/packages/platform/atoms/index.d.ts +0 -36
  57. package/dist/packages/platform/atoms/index.d.ts.map +1 -1
  58. package/dist/packages/platform/libraries/index.d.ts +1 -0
  59. package/dist/packages/platform/libraries/index.d.ts.map +1 -1
  60. package/dist/packages/platform/libraries/repositories.d.ts +1 -0
  61. package/dist/packages/platform/libraries/repositories.d.ts.map +1 -1
  62. package/dist/packages/platform/libraries/slots.d.ts +2 -0
  63. package/dist/packages/platform/libraries/slots.d.ts.map +1 -1
  64. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.d.ts +1 -0
  65. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.d.ts.map +1 -1
  66. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.d.ts +1 -0
  67. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.d.ts.map +1 -1
  68. package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts +1 -0
  69. package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts.map +1 -1
  70. package/dist/packages/platform/types/event-types/inputs/private-link.input.d.ts +4 -0
  71. package/dist/packages/platform/types/event-types/inputs/private-link.input.d.ts.map +1 -1
  72. package/dist/packages/platform/types/slots/slots-2024-04-15/inputs/index.d.ts +1 -0
  73. package/dist/packages/platform/types/slots/slots-2024-04-15/inputs/index.d.ts.map +1 -1
  74. package/dist/packages/trpc/server/routers/viewer/slots/_router.d.ts +1 -0
  75. package/dist/packages/trpc/server/routers/viewer/slots/_router.d.ts.map +1 -1
  76. package/dist/packages/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots.d.ts +19 -7
  77. package/dist/packages/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots.d.ts.map +1 -1
  78. package/dist/packages/trpc/server/routers/viewer/slots/types.d.ts +21 -0
  79. package/dist/packages/trpc/server/routers/viewer/slots/types.d.ts.map +1 -1
  80. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts +2 -0
  81. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts.map +1 -1
  82. package/dist/style.css +1 -1
  83. package/package.json +1 -1
  84. package/dist/AppCard-Zx_xfVt_.js +0 -281
  85. package/dist/AppListCardPlatformWrapper-qcAFCAXX.js +0 -9
  86. package/dist/AppListCardWebWrapper-3Pbmp6y8.js +0 -74
  87. package/dist/AppSettingsInterface-4XMEEbcJ.js +0 -75
  88. package/dist/AppSettingsInterface-YsrrXooV.js +0 -29
  89. package/dist/AppSettingsInterface-odT8kPt-.js +0 -23
  90. package/dist/DateRangePicker-DJBZW9da.js +0 -74
  91. package/dist/EventTypeAppCardInterface-0K5xbIex.js +0 -49
  92. package/dist/EventTypeAppCardInterface-0OvYJLmR.js +0 -24
  93. package/dist/EventTypeAppCardInterface-0kqrhpLm.js +0 -34
  94. package/dist/EventTypeAppCardInterface-31dw8z6g.js +0 -34
  95. package/dist/EventTypeAppCardInterface-3DQk93Oh.js +0 -34
  96. package/dist/EventTypeAppCardInterface-9awj9ikp.js +0 -32
  97. package/dist/EventTypeAppCardInterface-A4ukS96V.js +0 -51
  98. package/dist/EventTypeAppCardInterface-FHw_ihqn.js +0 -34
  99. package/dist/EventTypeAppCardInterface-G_vO0W-q.js +0 -51
  100. package/dist/EventTypeAppCardInterface-HLMEZBRF.js +0 -39
  101. package/dist/EventTypeAppCardInterface-OmcE4mB3.js +0 -42
  102. package/dist/EventTypeAppCardInterface-WkoM7u6A.js +0 -41
  103. package/dist/EventTypeAppCardInterface-h4Pze3Gg.js +0 -32
  104. package/dist/EventTypeAppCardInterface-iQlInguK.js +0 -34
  105. package/dist/EventTypeAppCardInterface-lYTrL5Bl.js +0 -42
  106. package/dist/EventTypeAppCardInterface-mK2_N-dB.js +0 -34
  107. package/dist/EventTypeAppCardInterface-obLysXQC.js +0 -24
  108. package/dist/EventTypeAppCardInterface-omWnfJYA.js +0 -33
  109. package/dist/EventTypeAppCardInterface-pSepgnI-.js +0 -34
  110. package/dist/EventTypeAppCardInterface-rvCvUanb.js +0 -24
  111. package/dist/EventTypeAppCardInterface-se55G0wm.js +0 -24
  112. package/dist/EventTypeAppCardInterface-t4XO8_QR.js +0 -41
  113. package/dist/EventTypeAppCardInterface-tDBXaZGm.js +0 -39
  114. package/dist/EventTypeAppCardInterface-utbpEdvv.js +0 -31
  115. package/dist/EventTypeAppCardInterface-wk4GzNE9.js +0 -86
  116. package/dist/EventTypeAppCardInterface-xWjmxDRE.js +0 -858
  117. package/dist/EventTypeAppCardInterface-z0_lwBiz.js +0 -24
  118. package/dist/EventTypeAppSettingsInterface-2x-2dNXv.js +0 -42
  119. package/dist/EventTypeAppSettingsInterface-7bn1HSLI.js +0 -43
  120. package/dist/EventTypeAppSettingsInterface-KY9K2A4a.js +0 -24
  121. package/dist/EventTypeAppSettingsInterface-N3GZOEOV.js +0 -23
  122. package/dist/EventTypeAppSettingsInterface-SyFwT8fy.js +0 -298
  123. package/dist/EventTypeAppSettingsInterface-VPwlxALu.js +0 -78
  124. package/dist/EventTypeAppSettingsInterface-W5ejZRBB.js +0 -120
  125. package/dist/EventTypeAppSettingsInterface-WxLx9nXX.js +0 -221
  126. package/dist/EventTypeAppSettingsInterface-eqtUnnNt.js +0 -48
  127. package/dist/EventTypeAppSettingsInterface-qI5dfOri.js +0 -23
  128. package/dist/EventTypeAppSettingsInterface-sgrrOkbn.js +0 -72
  129. package/dist/EventTypeAppSettingsInterface-uSZXgZw6.js +0 -25
  130. package/dist/EventTypeAppSettingsInterface-v7Pzk2Bm.js +0 -106
  131. package/dist/InstallAppButton-JS_mFJ2c.js +0 -14
  132. package/dist/InstallAppButton-JXhBVaYJ.js +0 -29
  133. package/dist/InstallAppButton-Tmmia5nu.js +0 -14
  134. package/dist/InstallAppButton-bTw6dwGS.js +0 -58
  135. package/dist/StripePaymentForm-sHV_1oj6.js +0 -493
  136. package/dist/currencyOptions-kannG2hu.js +0 -61
  137. package/dist/index-MLgFWWYi.js +0 -161243
  138. package/dist/index-oB7xnM_T.js +0 -30
  139. package/dist/index-uQDDhsO6.js +0 -518
  140. package/dist/packages/features/eventtypes/components/Locations.d.ts.map +0 -1
  141. package/dist/useIsAppEnabled-GIoK8AkC.js +0 -18
@@ -1,24 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { z as d, W as i } from "./index-MLgFWWYi.js";
3
- import { A as m } from "./AppCard-Zx_xfVt_.js";
4
- import { u } from "./useIsAppEnabled-GIoK8AkC.js";
5
- const l = function({ app: t, eventType: e }) {
6
- var a;
7
- const p = d.usePathname(), { enabled: n, updateEnabled: r } = u(t);
8
- return /* @__PURE__ */ s(
9
- m,
10
- {
11
- returnTo: `${i}${p}?tabName=apps`,
12
- app: t,
13
- teamId: ((a = e.team) == null ? void 0 : a.id) || void 0,
14
- switchOnClick: (o) => {
15
- r(o);
16
- },
17
- switchChecked: n,
18
- hideAppCardOptions: !0
19
- }
20
- );
21
- };
22
- export {
23
- l as default
24
- };
@@ -1,42 +0,0 @@
1
- import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
- import { f as s } from "./index-MLgFWWYi.js";
3
- const p = ({
4
- getAppData: a,
5
- setAppData: t,
6
- disabled: l,
7
- slug: r
8
- }) => {
9
- const n = a("PLAUSIBLE_URL"), o = a("trackingId");
10
- return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
11
- /* @__PURE__ */ i(
12
- s,
13
- {
14
- dataTestid: `${r}-url`,
15
- name: "Plausible URL",
16
- defaultValue: "https://plausible.io/js/script.js",
17
- placeholder: "https://plausible.io/js/script.js",
18
- value: n,
19
- disabled: l,
20
- onChange: (e) => {
21
- t("PLAUSIBLE_URL", e.target.value);
22
- }
23
- }
24
- ),
25
- /* @__PURE__ */ i(
26
- s,
27
- {
28
- dataTestid: `${r}-tracking-id`,
29
- disabled: l,
30
- name: "Tracked Domain",
31
- placeholder: "yourdomain.com",
32
- value: o,
33
- onChange: (e) => {
34
- t("trackingId", e.target.value);
35
- }
36
- }
37
- )
38
- ] });
39
- };
40
- export {
41
- p as default
42
- };
@@ -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-MLgFWWYi.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,24 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { f as g } from "./index-MLgFWWYi.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
- };
@@ -1,23 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { f as o } from "./index-MLgFWWYi.js";
3
- const p = ({
4
- getAppData: t,
5
- setAppData: e,
6
- disabled: a
7
- }) => {
8
- const n = t("trackingId");
9
- return /* @__PURE__ */ i(
10
- o,
11
- {
12
- name: "Pixel ID",
13
- value: n,
14
- disabled: a,
15
- onChange: (r) => {
16
- e("trackingId", r.target.value);
17
- }
18
- }
19
- );
20
- };
21
- export {
22
- p as default
23
- };
@@ -1,298 +0,0 @@
1
- import { jsxs as u, Fragment as f, jsx as l } from "react/jsx-runtime";
2
- import { a9 as d, y as L, aa as i, M as P, f as w, R as T, U as O, S as y, ab as E, ac as x, s as B, ad as F, ae as K } from "./index-MLgFWWYi.js";
3
- import { useState as z, useEffect as G } from "react";
4
- const s = [
5
- { label: "United States dollar (USD)", value: "usd" },
6
- { label: "United Arab Emirates dirham (AED)", value: "aed" },
7
- { label: "Afghan afghani (AFN)", value: "afn" },
8
- { label: "Albanian lek (ALL)", value: "all" },
9
- { label: "Armenian dram (AMD)", value: "amd" },
10
- { label: "Netherlands Antillean guilder (ANG)", value: "ang" },
11
- { label: "Angolan kwanza (AOA)", value: "aoa" },
12
- { label: "Argentine peso (ARS)", value: "ars" },
13
- { label: "Australian dollar (AUD)", value: "aud" },
14
- { label: "Aruban florin (AWG)", value: "awg" },
15
- { label: "Azerbaijani manat (AZN)", value: "azn" },
16
- { label: "Bosnia and Herzegovina convertible mark (BAM)", value: "bam" },
17
- { label: "Barbadian dollar (BBD)", value: "bbd" },
18
- { label: "Bangladeshi taka (BDT)", value: "bdt" },
19
- { label: "Bulgarian lev (BGN)", value: "bgn" },
20
- { label: "Burundian franc (BIF)", value: "bif" },
21
- { label: "Bermudian dollar (BMD)", value: "bmd" },
22
- { label: "Brunei dollar (BND)", value: "bnd" },
23
- { label: "Bolivian boliviano (BOB)", value: "bob" },
24
- { label: "Brazilian real (BRL)", value: "brl" },
25
- { label: "Bahamian dollar (BSD)", value: "bsd" },
26
- { label: "Botswana pula (BWP)", value: "bwp" },
27
- { label: "Belarusian ruble (BYN)", value: "byn" },
28
- { label: "Belize dollar (BZD)", value: "bzd" },
29
- { label: "Canadian dollar (CAD)", value: "cad" },
30
- { label: "Congolese franc (CDF)", value: "cdf" },
31
- { label: "Swiss franc (CHF)", value: "chf" },
32
- { label: "Chilean peso (CLP)", value: "clp" },
33
- { label: "Chinese yuan (CNY)", value: "cny" },
34
- { label: "Colombian peso (COP)", value: "cop" },
35
- { label: "Costa Rican colón (CRC)", value: "crc" },
36
- { label: "Cape Verdean escudo (CVE)", value: "cve" },
37
- { label: "Czech koruna (CZK)", value: "czk" },
38
- { label: "Djiboutian franc (DJF)", value: "djf" },
39
- { label: "Danish krone (DKK)", value: "dkk" },
40
- { label: "Dominican peso (DOP)", value: "dop" },
41
- { label: "Algerian dinar (DZD)", value: "dzd" },
42
- { label: "Egyptian pound (EGP)", value: "egp" },
43
- { label: "Ethiopian birr (ETB)", value: "etb" },
44
- { label: "Euro (EUR)", value: "eur" },
45
- { label: "Fijian dollar (FJD)", value: "fjd" },
46
- { label: "Falkland Islands pound (FKP)", value: "fkp" },
47
- { label: "British pound sterling (GBP)", value: "gbp" },
48
- { label: "Georgian lari (GEL)", value: "gel" },
49
- { label: "Gibraltar pound (GIP)", value: "gip" },
50
- { label: "Gambian dalasi (GMD)", value: "gmd" },
51
- { label: "Guinean franc (GNF)", value: "gnf" },
52
- { label: "Guatemalan quetzal (GTQ)", value: "gtq" },
53
- { label: "Guyanese dollar (GYD)", value: "gyd" },
54
- { label: "Hong Kong dollar (HKD)", value: "hkd" },
55
- { label: "Honduran lempira (HNL)", value: "hnl" },
56
- { label: "Haitian gourde (HTG)", value: "htg" },
57
- { label: "Hungarian forint (HUF)", value: "huf" },
58
- { label: "Indonesian rupiah (IDR)", value: "idr" },
59
- { label: "Israeli new shekel (ILS)", value: "ils" },
60
- { label: "Indian rupee (INR)", value: "inr" },
61
- { label: "Icelandic króna (ISK)", value: "isk" },
62
- { label: "Jamaican dollar (JMD)", value: "jmd" },
63
- { label: "Japanese yen (JPY)", value: "jpy" },
64
- { label: "Kenyan shilling (KES)", value: "kes" },
65
- { label: "Kyrgyzstani som (KGS)", value: "kgs" },
66
- { label: "Cambodian riel (KHR)", value: "khr" },
67
- { label: "Comorian franc (KMF)", value: "kmf" },
68
- { label: "South Korean won (KRW)", value: "krw" },
69
- { label: "Cayman Islands dollar (KYD)", value: "kyd" },
70
- { label: "Kazakhstani tenge (KZT)", value: "kzt" },
71
- { label: "Laotian kip (LAK)", value: "lak" },
72
- { label: "Lebanese pound (LBP)", value: "lbp" },
73
- { label: "Sri Lankan rupee (LKR)", value: "lkr" },
74
- { label: "Liberian dollar (LRD)", value: "lrd" },
75
- { label: "Lesotho loti (LSL)", value: "lsl" },
76
- { label: "Moroccan dirham (MAD)", value: "mad" },
77
- { label: "Moldovan leu (MDL)", value: "mdl" },
78
- { label: "Malagasy ariary (MGA)", value: "mga" },
79
- { label: "Macedonian denar (MKD)", value: "mkd" },
80
- { label: "Myanmar kyat (MMK)", value: "mmk" },
81
- { label: "Mongolian tögrög (MNT)", value: "mnt" },
82
- { label: "Macanese pataca (MOP)", value: "mop" },
83
- { label: "Mauritian rupee (MUR)", value: "mur" },
84
- { label: "Maldivian rufiyaa (MVR)", value: "mvr" },
85
- { label: "Malawian kwacha (MWK)", value: "mwk" },
86
- { label: "Mexican peso (MXN)", value: "mxn" },
87
- { label: "Malaysian ringgit (MYR)", value: "myr" },
88
- { label: "Mozambican metical (MZN)", value: "mzn" },
89
- { label: "Namibian dollar (NAD)", value: "nad" },
90
- { label: "Nigerian naira (NGN)", value: "ngn" },
91
- { label: "Nicaraguan córdoba (NIO)", value: "nio" },
92
- { label: "Norwegian krone (NOK)", value: "nok" },
93
- { label: "Nepalese rupee (NPR)", value: "npr" },
94
- { label: "New Zealand dollar (NZD)", value: "nzd" },
95
- { label: "Panamanian balboa (PAB)", value: "pab" },
96
- { label: "Peruvian sol (PEN)", value: "pen" },
97
- { label: "Papua New Guinean kina (PGK)", value: "pgk" },
98
- { label: "Philippine peso (PHP)", value: "php" },
99
- { label: "Pakistani rupee (PKR)", value: "pkr" },
100
- { label: "Polish złoty (PLN)", value: "pln" },
101
- { label: "Paraguayan guaraní (PYG)", value: "pyg" },
102
- { label: "Qatari riyal (QAR)", value: "qar" },
103
- { label: "Romanian leu (RON)", value: "ron" },
104
- { label: "Serbian dinar (RSD)", value: "rsd" },
105
- { label: "Russian ruble (RUB)", value: "rub" },
106
- { label: "Rwandan franc (RWF)", value: "rwf" },
107
- { label: "Saudi riyal (SAR)", value: "sar" },
108
- { label: "Solomon Islands dollar (SBD)", value: "sbd" },
109
- { label: "Seychellois rupee (SCR)", value: "scr" },
110
- { label: "Swedish krona (SEK)", value: "sek" },
111
- { label: "Singapore dollar (SGD)", value: "sgd" },
112
- { label: "Saint Helena pound (SHP)", value: "shp" },
113
- { label: "Sierra Leonean leone (SLE)", value: "sle" },
114
- { label: "Somali shilling (SOS)", value: "sos" },
115
- { label: "Surinamese dollar (SRD)", value: "srd" },
116
- { label: "São Tomé and Príncipe dobra (STD)", value: "std" },
117
- { label: "Swazi lilangeni (SZL)", value: "szl" },
118
- { label: "Thai baht (THB)", value: "thb" },
119
- { label: "Tajikistani somoni (TJS)", value: "tjs" },
120
- { label: "Tongan paʻanga (TOP)", value: "top" },
121
- { label: "Turkish lira (TRY)", value: "try" },
122
- { label: "Trinidad and Tobago dollar (TTD)", value: "ttd" },
123
- { label: "New Taiwan dollar (TWD)", value: "twd" },
124
- { label: "Tanzanian shilling (TZS)", value: "tzs" },
125
- { label: "Ukrainian hryvnia (UAH)", value: "uah" },
126
- { label: "Ugandan shilling (UGX)", value: "ugx" },
127
- { label: "Uruguayan peso (UYU)", value: "uyu" },
128
- { label: "Uzbekistan som (UZS)", value: "uzs" },
129
- { label: "Vietnamese đồng (VND)", value: "vnd" },
130
- { label: "Vanuatu vatu (VUV)", value: "vuv" },
131
- { label: "Samoan tala (WST)", value: "wst" },
132
- { label: "Central African CFA franc (XAF)", value: "xaf" },
133
- { label: "East Caribbean dollar (XCD)", value: "xcd" },
134
- { label: "West African CFA franc (XOF)", value: "xof" },
135
- { label: "CFP franc (XPF)", value: "xpf" },
136
- { label: "Yemeni rial (YER)", value: "yer" },
137
- { label: "South African rand (ZAR)", value: "zar" },
138
- { label: "Zambian kwacha (ZMW)", value: "zmw" }
139
- ], V = ({
140
- getAppData: r,
141
- setAppData: e,
142
- disabled: b,
143
- eventType: h
144
- }) => {
145
- var k;
146
- const g = r("price"), o = r("currency") || s[0].value, [t, D] = z(
147
- s.find((a) => a.value === o) || {
148
- label: s[0].label,
149
- value: s[0].value
150
- }
151
- ), v = r("paymentOption"), c = d.find((a) => v === a.value), m = r("enabled"), p = () => C.find((a) => a.value === (r("refundCountCalendarDays") === !0 ? 1 : 0)), { t: n } = L(), N = ((k = h.recurringEvent) == null ? void 0 : k.count) !== void 0, S = !!h.seatsPerTimeSlot, R = (a, M) => 0 .toLocaleString(a, {
152
- style: "currency",
153
- currency: M,
154
- minimumFractionDigits: 0,
155
- maximumFractionDigits: 0
156
- }).replace(/\d/g, "").trim();
157
- G(() => {
158
- m && (r("currency") || e("currency", s[0].value), r("paymentOption") || e("paymentOption", d[0].value)), r("refundPolicy") || e("refundPolicy", i.NEVER);
159
- }, [m, r, e]);
160
- const C = [
161
- { value: 0, label: n("business_days") },
162
- { value: 1, label: n("calendar_days") }
163
- ];
164
- return /* @__PURE__ */ u(f, { children: [
165
- N && /* @__PURE__ */ l(P, { className: "mt-2", severity: "warning", title: n("warning_recurring_event_payment") }),
166
- !N && m && /* @__PURE__ */ u(f, { children: [
167
- /* @__PURE__ */ l("div", { className: "mt-4 block items-center justify-start sm:flex sm:space-x-2", children: /* @__PURE__ */ l(
168
- w,
169
- {
170
- "data-testid": "stripe-price-input",
171
- label: n("price"),
172
- className: "h-[38px]",
173
- addOnLeading: /* @__PURE__ */ l(f, { children: t.value ? R("en", t.value) : "" }),
174
- addOnSuffix: o.toUpperCase(),
175
- addOnClassname: "h-[38px]",
176
- step: "0.01",
177
- min: "0.5",
178
- type: "number",
179
- required: !0,
180
- placeholder: "Price",
181
- disabled: b,
182
- onChange: (a) => {
183
- e("price", T(Number(a.target.value), o));
184
- },
185
- value: g > 0 ? O(g, o) : void 0
186
- }
187
- ) }),
188
- /* @__PURE__ */ u("div", { className: "mt-5 w-60", children: [
189
- /* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: n("currency") }),
190
- /* @__PURE__ */ l(
191
- y,
192
- {
193
- "data-testid": "stripe-currency-select",
194
- variant: "default",
195
- options: s,
196
- innerClassNames: {
197
- input: "stripe-currency-input"
198
- },
199
- value: t,
200
- className: "text-black",
201
- defaultValue: t,
202
- onChange: (a) => {
203
- a && (D(a), e("currency", a.value));
204
- }
205
- }
206
- )
207
- ] }),
208
- /* @__PURE__ */ u("div", { className: "mt-4 w-60", children: [
209
- /* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: n("payment_option") }),
210
- /* @__PURE__ */ l(
211
- y,
212
- {
213
- "data-testid": "stripe-payment-option-select",
214
- defaultValue: c ? { ...c, label: n(c.label) } : { ...d[0], label: n(d[0].label) },
215
- options: d.map((a) => ({ ...a, label: n(a.label) || a.label })),
216
- onChange: (a) => {
217
- a && (e("paymentOption", a.value), a.value === "HOLD" && (e("refundPolicy", i.NEVER), e("refundDaysCount", void 0), e("refundCountCalendarDays", void 0)));
218
- },
219
- className: "mb-1 h-[38px] w-full",
220
- isDisabled: S || b
221
- }
222
- )
223
- ] }),
224
- S && v === "HOLD" && /* @__PURE__ */ l(P, { className: "mt-2", severity: "warning", title: n("seats_and_no_show_fee_error") }),
225
- v !== "HOLD" && /* @__PURE__ */ u("div", { className: "mt-4 w-full", children: [
226
- /* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", children: n("refund_policy") }),
227
- /* @__PURE__ */ u(
228
- E,
229
- {
230
- disabled: b || v === "HOLD",
231
- defaultValue: "never",
232
- className: "flex flex-col space-y-2",
233
- value: r("refundPolicy"),
234
- onValueChange: (a) => {
235
- e("refundPolicy", a), a !== i.DAYS && (e("refundDaysCount", void 0), e("refundCountCalendarDays", void 0));
236
- },
237
- children: [
238
- /* @__PURE__ */ l(x, { className: "w-fit", value: i.ALWAYS, label: n("always"), id: "always" }),
239
- /* @__PURE__ */ l(x, { className: "w-fit", value: i.NEVER, label: n("never"), id: "never" }),
240
- /* @__PURE__ */ u("div", { className: B("text-default mb-2 flex flex-wrap items-center text-sm"), children: [
241
- /* @__PURE__ */ l(
242
- F,
243
- {
244
- className: "min-w-4 bg-default border-default flex h-4 w-4 cursor-pointer items-center rounded-full border focus:border-2 focus:outline-none ltr:mr-2 rtl:ml-2",
245
- value: "days",
246
- id: "days",
247
- children: /* @__PURE__ */ l(K, { className: "after:bg-inverted relative flex h-4 w-4 items-center justify-center after:block after:h-2 after:w-2 after:rounded-full" })
248
- }
249
- ),
250
- /* @__PURE__ */ u("div", { className: "flex items-center", children: [
251
- /* @__PURE__ */ u("span", { className: "me-2 ms-2", children: [
252
- " ",
253
- n("if_cancelled")
254
- ] }),
255
- /* @__PURE__ */ l(
256
- w,
257
- {
258
- labelSrOnly: !0,
259
- type: "number",
260
- className: B(
261
- "border-default my-0 block w-16 text-sm [appearance:textfield] ltr:mr-2 rtl:ml-2"
262
- ),
263
- placeholder: "2",
264
- disabled: b,
265
- min: 0,
266
- defaultValue: r("refundDaysCount"),
267
- required: r("refundPolicy") === i.DAYS,
268
- value: r("refundDaysCount") ?? "",
269
- onChange: (a) => e("refundDaysCount", parseInt(a.currentTarget.value))
270
- }
271
- ),
272
- /* @__PURE__ */ l(
273
- y,
274
- {
275
- options: C,
276
- isSearchable: !1,
277
- isDisabled: b,
278
- onChange: (a) => e("refundCountCalendarDays", (a == null ? void 0 : a.value) === 1),
279
- value: p(),
280
- defaultValue: p()
281
- }
282
- ),
283
- /* @__PURE__ */ u("span", { className: "me-2 ms-2", children: [
284
- " ",
285
- n("before")
286
- ] })
287
- ] })
288
- ] })
289
- ]
290
- }
291
- )
292
- ] })
293
- ] })
294
- ] });
295
- };
296
- export {
297
- V as default
298
- };
@@ -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-MLgFWWYi.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,120 +0,0 @@
1
- import { jsxs as u, Fragment as o, jsx as n } from "react/jsx-runtime";
2
- import { useState as P, useEffect as k } from "react";
3
- import { y as x, M as p, f as w, S as K } from "./index-MLgFWWYi.js";
4
- const f = [
5
- "BIF",
6
- "CLP",
7
- "DJF",
8
- "GNF",
9
- "JPY",
10
- "KMF",
11
- "KRW",
12
- "MGA",
13
- "PYG",
14
- "RWF",
15
- "UGX",
16
- "VND",
17
- "VUV",
18
- "XAF",
19
- "XOF",
20
- "XPF"
21
- ], U = (e, a) => f.includes(a.toUpperCase()) ? e : Math.round(e * 100), _ = (e, a) => f.includes(a.toUpperCase()) ? e : e / 100, V = [
22
- {
23
- label: "on_booking_option",
24
- value: "ON_BOOKING"
25
- }
26
- ], r = [
27
- { label: "United States dollar (USD)", value: "usd" },
28
- { label: "Singapore dollar (SGD)", value: "sgd" },
29
- { label: "Malaysian ringgit (MYR)", value: "myr" },
30
- { label: "Indonesian rupiah (IDR)", value: "idr" },
31
- { label: "Japanese yen (JPY)", value: "jpy" },
32
- { label: "Hong Kong dollar (HKD)", value: "hkd" },
33
- { label: "Thai baht (THB)", value: "thb" },
34
- { label: "Australian dollar (AUD)", value: "aud" },
35
- { label: "New Zealand dollar (NZD)", value: "nzd" },
36
- { label: "British pound sterling (GBP)", value: "gbp" },
37
- { label: "Philippine peso (PHP)", value: "php" },
38
- { label: "Indian rupee (INR)", value: "inr" },
39
- { label: "Chinese yuan (CNY)", value: "cny" },
40
- { label: "Euro (EUR)", value: "eur" },
41
- { label: "Swiss franc (CHF)", value: "chf" },
42
- { label: "Danish krone (DKK)", value: "dkk" },
43
- { label: "Swedish krona (SEK)", value: "sek" },
44
- { label: "Norwegian krone (NOK)", value: "nok" },
45
- { label: "Vietnamese đồng (VND)", value: "vnd" },
46
- { label: "Canadian dollar (CAD)", value: "cad" },
47
- { label: "South Korean won (KRW)", value: "krw" }
48
- ], M = ({
49
- getAppData: e,
50
- setAppData: a,
51
- disabled: h,
52
- eventType: d
53
- }) => {
54
- var b;
55
- const m = e("price"), t = e("currency") || r[0].value, [i, g] = P(
56
- r.find((l) => l.value === t) || {
57
- label: r[0].label,
58
- value: r[0].value
59
- }
60
- ), S = e("paymentOption"), c = e("enabled"), { t: s } = x(), v = ((b = d.recurringEvent) == null ? void 0 : b.count) !== void 0, N = !!d.seatsPerTimeSlot, C = (l, y) => 0 .toLocaleString(l, {
61
- style: "currency",
62
- currency: y,
63
- minimumFractionDigits: 0,
64
- maximumFractionDigits: 0
65
- }).replace(/\d/g, "").trim();
66
- k(() => {
67
- c && (e("currency") || a("currency", r[0].value), e("paymentOption") || a("paymentOption", V[0].value));
68
- }, [c, e, a]);
69
- const F = (l) => {
70
- const O = Math.floor(l).toString();
71
- return parseInt(O);
72
- };
73
- return /* @__PURE__ */ u(o, { children: [
74
- v && /* @__PURE__ */ n(p, { className: "mt-2", severity: "warning", title: s("warning_recurring_event_payment") }),
75
- !v && c && /* @__PURE__ */ u(o, { children: [
76
- /* @__PURE__ */ n("div", { className: "mt-4 block items-center justify-start sm:flex sm:space-x-2", children: /* @__PURE__ */ n(
77
- w,
78
- {
79
- "data-testid": "stripe-price-input",
80
- label: s("price"),
81
- className: "h-[38px]",
82
- addOnLeading: /* @__PURE__ */ n(o, { children: i.value ? C("en", i.value) : "" }),
83
- addOnSuffix: t.toUpperCase(),
84
- addOnClassname: "h-[38px]",
85
- step: "1",
86
- min: "1",
87
- type: "number",
88
- required: !0,
89
- placeholder: "Price",
90
- disabled: h,
91
- onChange: (l) => {
92
- a("price", U(Number(l.target.value), t));
93
- },
94
- value: m > 0 ? F(_(m, t)) : void 0
95
- }
96
- ) }),
97
- /* @__PURE__ */ u("div", { className: "mt-5 w-60", children: [
98
- /* @__PURE__ */ n("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: s("currency") }),
99
- /* @__PURE__ */ n(
100
- K,
101
- {
102
- "data-testid": "stripe-currency-select",
103
- variant: "default",
104
- options: r,
105
- value: i,
106
- className: "text-black",
107
- defaultValue: i,
108
- onChange: (l) => {
109
- l && (g(l), a("currency", l.value));
110
- }
111
- }
112
- )
113
- ] }),
114
- N && S === "HOLD" && /* @__PURE__ */ n(p, { className: "mt-2", severity: "warning", title: s("seats_and_no_show_fee_error") })
115
- ] })
116
- ] });
117
- };
118
- export {
119
- M as default
120
- };