@calcom/atoms 1.7.0 → 1.8.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 (205) hide show
  1. package/dist/{AddressInput-xFwoBxsZ.js → AddressInput-E1ARKDg7.js} +5 -5
  2. package/dist/{AlbyPriceComponent-NnD6qUfW.js → AlbyPriceComponent-jBcuDvZa.js} +24 -24
  3. package/dist/{PhoneInput-uymiSRfv.js → PhoneInput-qXboae9k.js} +62 -62
  4. package/dist/cal-atoms.js +5 -36
  5. package/dist/index-GQl0OyJB.js +88695 -0
  6. package/dist/index-QBpbC_ZD.js +1957 -0
  7. package/dist/{index-WXyiFeKd.js → index-bGbS5CRI.js} +1 -1
  8. package/dist/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.d.ts.map +1 -1
  9. package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts.map +1 -1
  10. package/dist/packages/features/bookings/Booker/components/Header.d.ts.map +1 -1
  11. package/dist/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendar.d.ts.map +1 -1
  12. package/dist/packages/features/bookings/Booker/components/hooks/useBookings.d.ts +1 -1
  13. package/dist/packages/features/bookings/Booker/store.d.ts.map +1 -1
  14. package/dist/packages/features/bookings/Booker/utils/event.d.ts +39 -33
  15. package/dist/packages/features/bookings/Booker/utils/event.d.ts.map +1 -1
  16. package/dist/packages/features/bookings/lib/BookingEmailSmsHandler.d.ts +83 -0
  17. package/dist/packages/features/bookings/lib/BookingEmailSmsHandler.d.ts.map +1 -0
  18. package/dist/packages/features/bookings/lib/create-booking.d.ts +91 -91
  19. package/dist/packages/features/bookings/lib/create-recurring-booking.d.ts +91 -91
  20. package/dist/packages/features/bookings/lib/get-booking.d.ts +9 -9
  21. package/dist/packages/features/bookings/lib/getBookingToDelete.d.ts +40 -38
  22. package/dist/packages/features/bookings/lib/getBookingToDelete.d.ts.map +1 -1
  23. package/dist/packages/features/bookings/lib/getCalendarLinks.d.ts +41 -0
  24. package/dist/packages/features/bookings/lib/getCalendarLinks.d.ts.map +1 -0
  25. package/dist/packages/features/bookings/lib/getCalendarLinks.test.d.ts +2 -0
  26. package/dist/packages/features/bookings/lib/getCalendarLinks.test.d.ts.map +1 -0
  27. package/dist/packages/features/bookings/lib/handleBookingRequested.d.ts +16 -0
  28. package/dist/packages/features/bookings/lib/handleBookingRequested.d.ts.map +1 -1
  29. package/dist/packages/features/bookings/lib/handleCancelBooking.d.ts.map +1 -1
  30. package/dist/packages/features/bookings/lib/handleConfirmation.d.ts +1 -0
  31. package/dist/packages/features/bookings/lib/handleConfirmation.d.ts.map +1 -1
  32. package/dist/packages/features/bookings/lib/handleInternalNote.d.ts +2 -2
  33. package/dist/packages/features/bookings/lib/handleNewBooking/createBooking.d.ts +33 -33
  34. package/dist/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.d.ts +57 -57
  35. package/dist/packages/features/bookings/lib/handleNewBooking/getEventType.d.ts +60 -57
  36. package/dist/packages/features/bookings/lib/handleNewBooking/getEventType.d.ts.map +1 -1
  37. package/dist/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.d.ts +57 -57
  38. package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts +46 -46
  39. package/dist/packages/features/bookings/lib/handleNewBooking/originalRescheduledBookingUtils.d.ts +45 -45
  40. package/dist/packages/features/bookings/lib/handleNewBooking/scheduleNoShowTriggers.d.ts +1 -0
  41. package/dist/packages/features/bookings/lib/handleNewBooking/scheduleNoShowTriggers.d.ts.map +1 -1
  42. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts +364 -364
  43. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
  44. package/dist/packages/features/bookings/lib/handlePayment.d.ts +49 -0
  45. package/dist/packages/features/bookings/lib/handlePayment.d.ts.map +1 -0
  46. package/dist/packages/features/bookings/lib/handleSeats/create/createNewSeat.d.ts +33 -33
  47. package/dist/packages/features/bookings/lib/handleSeats/create/createNewSeat.d.ts.map +1 -1
  48. package/dist/packages/features/bookings/lib/handleSeats/handleSeats.d.ts.map +1 -1
  49. package/dist/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.d.ts +33 -33
  50. package/dist/packages/features/bookings/lib/requiresConfirmation/getBookingRequest.d.ts +39 -39
  51. package/dist/packages/features/components/controlled-dialog/index.d.ts.map +1 -1
  52. package/dist/packages/features/components/phone-input/PhoneInput.d.ts.map +1 -1
  53. package/dist/packages/features/ee/billing/api/webhook/_customer.subscription.updated.d.ts +2 -1
  54. package/dist/packages/features/ee/billing/api/webhook/_customer.subscription.updated.d.ts.map +1 -1
  55. package/dist/packages/features/ee/billing/credit-service.d.ts +5 -1
  56. package/dist/packages/features/ee/billing/credit-service.d.ts.map +1 -1
  57. package/dist/packages/features/ee/billing/organizations/index.d.ts +1 -2
  58. package/dist/packages/features/ee/billing/organizations/index.d.ts.map +1 -1
  59. package/dist/packages/features/ee/billing/organizations/internal-organization-billing.d.ts +2 -2
  60. package/dist/packages/features/ee/billing/organizations/organization-billing.repository.d.ts +32 -4
  61. package/dist/packages/features/ee/billing/organizations/organization-billing.repository.d.ts.map +1 -1
  62. package/dist/packages/features/ee/payments/server/stripe-service.d.ts +23 -0
  63. package/dist/packages/features/ee/payments/server/stripe-service.d.ts.map +1 -0
  64. package/dist/packages/features/ee/round-robin/lib/bookingLocationService.d.ts +125 -0
  65. package/dist/packages/features/ee/round-robin/lib/bookingLocationService.d.ts.map +1 -0
  66. package/dist/packages/features/ee/round-robin/lib/bookingLocationService.test.d.ts +2 -0
  67. package/dist/packages/features/ee/round-robin/lib/bookingLocationService.test.d.ts.map +1 -0
  68. package/dist/packages/features/ee/round-robin/roundRobinManualReassignment.d.ts +30 -30
  69. package/dist/packages/features/ee/round-robin/roundRobinManualReassignment.d.ts.map +1 -1
  70. package/dist/packages/features/ee/round-robin/roundRobinReassignment.d.ts.map +1 -1
  71. package/dist/packages/features/ee/workflows/api/scheduleEmailReminders.d.ts.map +1 -1
  72. package/dist/packages/features/ee/workflows/lib/constants.d.ts +3 -1
  73. package/dist/packages/features/ee/workflows/lib/constants.d.ts.map +1 -1
  74. package/dist/packages/features/ee/workflows/lib/getOptions.d.ts +1 -1
  75. package/dist/packages/features/ee/workflows/lib/reminders/emailReminderManager.d.ts +0 -3
  76. package/dist/packages/features/ee/workflows/lib/reminders/emailReminderManager.d.ts.map +1 -1
  77. package/dist/packages/features/ee/workflows/lib/reminders/reminderScheduler.d.ts +0 -3
  78. package/dist/packages/features/ee/workflows/lib/reminders/reminderScheduler.d.ts.map +1 -1
  79. package/dist/packages/features/ee/workflows/lib/reminders/scheduleMandatoryReminder.d.ts.map +1 -1
  80. package/dist/packages/features/ee/workflows/lib/reminders/smsReminderManager.d.ts.map +1 -1
  81. package/dist/packages/features/ee/workflows/lib/reminders/utils.d.ts.map +1 -1
  82. package/dist/packages/features/ee/workflows/lib/reminders/whatsappReminderManager.d.ts.map +1 -1
  83. package/dist/packages/features/ee/workflows/lib/repository/workflowReminder.d.ts +6 -6
  84. package/dist/packages/features/ee/workflows/lib/schema.d.ts +7 -2
  85. package/dist/packages/features/ee/workflows/lib/schema.d.ts.map +1 -1
  86. package/dist/packages/features/eventtypes/components/AddVerifiedEmail.d.ts +7 -0
  87. package/dist/packages/features/eventtypes/components/AddVerifiedEmail.d.ts.map +1 -0
  88. package/dist/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.d.ts +1 -1
  89. package/dist/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.d.ts.map +1 -1
  90. package/dist/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.d.ts.map +1 -1
  91. package/dist/packages/features/eventtypes/lib/eventNaming.d.ts +28 -0
  92. package/dist/packages/features/eventtypes/lib/eventNaming.d.ts.map +1 -0
  93. package/dist/packages/features/eventtypes/lib/eventNaming.test.d.ts +2 -0
  94. package/dist/packages/features/eventtypes/lib/eventNaming.test.d.ts.map +1 -0
  95. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +42 -33
  96. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
  97. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts +12 -12
  98. package/dist/packages/features/eventtypes/lib/types.d.ts +1 -1
  99. package/dist/packages/features/eventtypes/lib/types.d.ts.map +1 -1
  100. package/dist/packages/features/shell/user-dropdown/UserDropdown.d.ts +2 -2
  101. package/dist/packages/features/shell/user-dropdown/UserDropdown.d.ts.map +1 -1
  102. package/dist/packages/platform/atoms/event-types/hooks/useAddVerifiedEmail.d.ts +15 -0
  103. package/dist/packages/platform/atoms/event-types/hooks/useAddVerifiedEmail.d.ts.map +1 -0
  104. package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts +20 -17
  105. package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts.map +1 -1
  106. package/dist/packages/platform/atoms/event-types/hooks/useEventTypeForm.d.ts.map +1 -1
  107. package/dist/packages/platform/atoms/event-types/hooks/useGetVerifiedEmails.d.ts +3 -0
  108. package/dist/packages/platform/atoms/event-types/hooks/useGetVerifiedEmails.d.ts.map +1 -0
  109. package/dist/packages/platform/atoms/event-types/wrappers/EventAdvancedPlatformWrapper.d.ts.map +1 -1
  110. package/dist/packages/platform/atoms/event-types/wrappers/EventTypePlatformWrapper.d.ts.map +1 -1
  111. package/dist/packages/platform/atoms/hooks/bookings/useCreateBooking.d.ts +91 -91
  112. package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts +91 -91
  113. package/dist/packages/platform/atoms/hooks/bookings/useCreateRecurringBooking.d.ts +91 -91
  114. package/dist/packages/platform/atoms/hooks/bookings/useGetBookingForReschedule.d.ts +3 -3
  115. package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts.map +1 -1
  116. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts +39 -33
  117. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
  118. package/dist/packages/platform/atoms/hooks/schedules/useAtomSchedule.d.ts +3 -3
  119. package/dist/packages/platform/atoms/hooks/schedules/useAtomUpdateSchedule.d.ts +3 -3
  120. package/dist/packages/platform/atoms/hooks/useConnectedCalendars.d.ts.map +1 -1
  121. package/dist/packages/platform/atoms/index.d.ts +0 -36
  122. package/dist/packages/platform/atoms/index.d.ts.map +1 -1
  123. package/dist/packages/platform/atoms/lib/appendClientIdToEmail.d.ts +2 -0
  124. package/dist/packages/platform/atoms/lib/appendClientIdToEmail.d.ts.map +1 -0
  125. package/dist/packages/platform/libraries/event-types.d.ts +5 -5
  126. package/dist/packages/platform/libraries/event-types.d.ts.map +1 -1
  127. package/dist/packages/platform/libraries/index.d.ts +4 -6
  128. package/dist/packages/platform/libraries/index.d.ts.map +1 -1
  129. package/dist/packages/prisma/zod/creditexpenselog.d.ts +6 -0
  130. package/dist/packages/prisma/zod/creditexpenselog.d.ts.map +1 -1
  131. package/dist/packages/prisma/zod/impersonations.d.ts +2 -2
  132. package/dist/packages/prisma/zod/ratelimit.d.ts +2 -2
  133. package/dist/packages/prisma/zod/task.d.ts +2 -2
  134. package/dist/packages/prisma/zod/teamfeatures.d.ts +2 -2
  135. package/dist/packages/prisma/zod/userfeatures.d.ts +2 -2
  136. package/dist/packages/prisma/zod/webhookscheduledtriggers.d.ts +2 -2
  137. package/dist/packages/prisma/zod/workflow.d.ts +7 -2
  138. package/dist/packages/prisma/zod/workflow.d.ts.map +1 -1
  139. package/dist/packages/prisma/zod-utils.d.ts +52 -0
  140. package/dist/packages/prisma/zod-utils.d.ts.map +1 -1
  141. package/dist/packages/prisma-client/index.d.ts +86 -1
  142. package/dist/packages/trpc/react/hooks/useMeQuery.d.ts +2 -2
  143. package/dist/packages/trpc/react/shared.d.ts +1 -1
  144. package/dist/packages/trpc/react/shared.d.ts.map +1 -1
  145. package/dist/packages/trpc/react/trpc.d.ts.map +1 -1
  146. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts.map +1 -1
  147. package/dist/style.css +1 -1
  148. package/package.json +1 -1
  149. package/dist/AppCard--JDiTUMU.js +0 -281
  150. package/dist/AppListCardPlatformWrapper-ncgLQL4r.js +0 -9
  151. package/dist/AppListCardWebWrapper-YnM7-ccd.js +0 -74
  152. package/dist/AppSettingsInterface-EvAriEj2.js +0 -23
  153. package/dist/AppSettingsInterface-OGwTTVN7.js +0 -29
  154. package/dist/AppSettingsInterface-_WywrNHs.js +0 -75
  155. package/dist/DateRangePicker-m_y_P8tk.js +0 -74
  156. package/dist/EventTypeAppCardInterface--74geeRF.js +0 -39
  157. package/dist/EventTypeAppCardInterface--UDAdk0r.js +0 -24
  158. package/dist/EventTypeAppCardInterface-2Q1qvV5K.js +0 -32
  159. package/dist/EventTypeAppCardInterface-2r4pxyRt.js +0 -34
  160. package/dist/EventTypeAppCardInterface-3T7Bcarm.js +0 -31
  161. package/dist/EventTypeAppCardInterface-EPHC3SF7.js +0 -24
  162. package/dist/EventTypeAppCardInterface-G3OAa6sU.js +0 -41
  163. package/dist/EventTypeAppCardInterface-JQgzokgl.js +0 -32
  164. package/dist/EventTypeAppCardInterface-KDalRazj.js +0 -34
  165. package/dist/EventTypeAppCardInterface-LvigpfyE.js +0 -49
  166. package/dist/EventTypeAppCardInterface-MIro_wur.js +0 -33
  167. package/dist/EventTypeAppCardInterface-Na5tUt6e.js +0 -34
  168. package/dist/EventTypeAppCardInterface-O0yLol5y.js +0 -34
  169. package/dist/EventTypeAppCardInterface-R8-Y-hSu.js +0 -39
  170. package/dist/EventTypeAppCardInterface-YlTC8St1.js +0 -51
  171. package/dist/EventTypeAppCardInterface-_x7wFmBk.js +0 -24
  172. package/dist/EventTypeAppCardInterface-bNGYsiB0.js +0 -86
  173. package/dist/EventTypeAppCardInterface-d-rOMdsH.js +0 -34
  174. package/dist/EventTypeAppCardInterface-iHpJPDlc.js +0 -34
  175. package/dist/EventTypeAppCardInterface-jBTRuVkO.js +0 -51
  176. package/dist/EventTypeAppCardInterface-lXddHFhd.js +0 -41
  177. package/dist/EventTypeAppCardInterface-li1GK953.js +0 -858
  178. package/dist/EventTypeAppCardInterface-qO1PKt6x.js +0 -42
  179. package/dist/EventTypeAppCardInterface-rKAjvg4x.js +0 -24
  180. package/dist/EventTypeAppCardInterface-rV1vgpRv.js +0 -42
  181. package/dist/EventTypeAppCardInterface-sIqZFcBV.js +0 -34
  182. package/dist/EventTypeAppCardInterface-safQ0enm.js +0 -24
  183. package/dist/EventTypeAppSettingsInterface-7e1qbHi8.js +0 -24
  184. package/dist/EventTypeAppSettingsInterface-CLwwrZv6.js +0 -48
  185. package/dist/EventTypeAppSettingsInterface-CPvfqJkx.js +0 -221
  186. package/dist/EventTypeAppSettingsInterface-EZZkJrLi.js +0 -106
  187. package/dist/EventTypeAppSettingsInterface-JBpWa3pz.js +0 -298
  188. package/dist/EventTypeAppSettingsInterface-J_c1VzIk.js +0 -23
  189. package/dist/EventTypeAppSettingsInterface-K4kVWoog.js +0 -23
  190. package/dist/EventTypeAppSettingsInterface-LIn3bMv4.js +0 -25
  191. package/dist/EventTypeAppSettingsInterface-cbkdr04f.js +0 -42
  192. package/dist/EventTypeAppSettingsInterface-eejB8RJX.js +0 -43
  193. package/dist/EventTypeAppSettingsInterface-mOdk6pDR.js +0 -78
  194. package/dist/EventTypeAppSettingsInterface-vNhCP6vQ.js +0 -72
  195. package/dist/EventTypeAppSettingsInterface-xYWyd_Dz.js +0 -120
  196. package/dist/InstallAppButton-6HzB5_Be.js +0 -14
  197. package/dist/InstallAppButton-9sn2Jtoz.js +0 -14
  198. package/dist/InstallAppButton-J51NRgMF.js +0 -58
  199. package/dist/InstallAppButton-JXhBVaYJ.js +0 -29
  200. package/dist/StripePaymentForm-cXAJjJV3.js +0 -493
  201. package/dist/currencyOptions-kannG2hu.js +0 -61
  202. package/dist/index--iR_feQQ.js +0 -165254
  203. package/dist/index-XoFQv1cd.js +0 -518
  204. package/dist/index-tEqQSBcP.js +0 -28
  205. package/dist/useIsAppEnabled-C_9eRB94.js +0 -18
@@ -1,39 +0,0 @@
1
- import { jsx as t, jsxs as e } from "react/jsx-runtime";
2
- import { y as m, U as o } from "./index--iR_feQQ.js";
3
- import { A as u } from "./AppCard--JDiTUMU.js";
4
- import { u as h } from "./useIsAppEnabled-C_9eRB94.js";
5
- const E = function({ eventType: a, app: s }) {
6
- var n;
7
- const { getAppData: l, setAppData: i } = m(), p = l("isSunrise"), { enabled: c, updateEnabled: r } = h(s);
8
- return /* @__PURE__ */ t(
9
- u,
10
- {
11
- app: s,
12
- switchOnClick: (d) => {
13
- d ? (r(!0), i("isSunrise", !0)) : (r(!1), i("isSunrise", !1));
14
- },
15
- switchChecked: c,
16
- teamId: ((n = a.team) == null ? void 0 : n.id) || void 0,
17
- children: /* @__PURE__ */ e("div", { className: "mt-2 text-sm", children: [
18
- /* @__PURE__ */ e("div", { className: "flex", children: [
19
- /* @__PURE__ */ t("span", { className: "ltr:mr-2 rtl:ml-2", children: /* @__PURE__ */ t(o, { name: p ? "sunrise" : "sunset" }) }),
20
- "I am an AppCard for Event with Title: ",
21
- a.title
22
- ] }),
23
- " ",
24
- /* @__PURE__ */ e("div", { className: "mt-2", children: [
25
- "Edit ",
26
- /* @__PURE__ */ e("span", { className: "italic", children: [
27
- "packages/app-store/",
28
- s.slug,
29
- "/EventTypeAppCardInterface.tsx"
30
- ] }),
31
- " to play with me"
32
- ] })
33
- ] })
34
- }
35
- );
36
- };
37
- export {
38
- E as default
39
- };
@@ -1,51 +0,0 @@
1
- import { jsx as t, jsxs as h } from "react/jsx-runtime";
2
- import { y as m, f as p } from "./index--iR_feQQ.js";
3
- import { A } from "./AppCard--JDiTUMU.js";
4
- import { u as I } from "./useIsAppEnabled-C_9eRB94.js";
5
- const x = function({ app: a, eventType: s }) {
6
- var i;
7
- const { getAppData: r, setAppData: n, disabled: o } = m(), d = r("TRACKING_ID"), l = r("API_HOST"), { enabled: c, updateEnabled: u } = I(a);
8
- return /* @__PURE__ */ t(
9
- A,
10
- {
11
- hideSettingsIcon: !0,
12
- app: a,
13
- switchOnClick: (e) => {
14
- u(e);
15
- },
16
- switchChecked: c,
17
- teamId: ((i = s.team) == null ? void 0 : i.id) || void 0,
18
- children: /* @__PURE__ */ h("div", { className: "flex flex-col gap-2", children: [
19
- /* @__PURE__ */ t(
20
- p,
21
- {
22
- required: !0,
23
- disabled: o,
24
- name: "Tracking ID",
25
- value: d,
26
- placeholder: "Enter your Tracking ID",
27
- onChange: (e) => {
28
- n("TRACKING_ID", e.target.value);
29
- }
30
- }
31
- ),
32
- /* @__PURE__ */ t(
33
- p,
34
- {
35
- required: !0,
36
- disabled: o,
37
- name: "Api host",
38
- value: l,
39
- placeholder: "Enter your Api host url",
40
- onChange: (e) => {
41
- n("API_HOST", e.target.value);
42
- }
43
- }
44
- )
45
- ] })
46
- }
47
- );
48
- };
49
- export {
50
- x as default
51
- };
@@ -1,24 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { x as d, W as i } from "./index--iR_feQQ.js";
3
- import { A as m } from "./AppCard--JDiTUMU.js";
4
- import { u } from "./useIsAppEnabled-C_9eRB94.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,86 +0,0 @@
1
- import { jsx as a, Fragment as o, jsxs as u } from "react/jsx-runtime";
2
- import { x as v, w as T, y as _, G as t, W as q, J as L, f as V, S as x } from "./index--iR_feQQ.js";
3
- import { useMemo as W, useState as p } from "react";
4
- import { A as $ } from "./AppCard--JDiTUMU.js";
5
- import { c as g, i as j, a as C } from "./currencyOptions-kannG2hu.js";
6
- const z = function({ app: S, eventType: A }) {
7
- var f, h;
8
- const i = v.useSearchParams(), d = v.usePathname(), P = W(
9
- () => `${d}${i ? `?${i.toString()}` : ""}`,
10
- [d, i]
11
- ), { t: n } = T(), { getAppData: r, setAppData: c } = _(), y = r("price"), l = r("currency"), k = r("paymentOption"), N = r("enabled"), [s, O] = p(g.find((e) => e.value === l)), [w, E] = p(
12
- j(l) ? C[l] : ""
13
- ), [b, D] = p(N), m = ((f = t) == null ? void 0 : f.find((e) => k === e.value)) || {
14
- label: t[0].label,
15
- value: t[0].value
16
- }, F = ((h = A.recurringEvent) == null ? void 0 : h.count) !== void 0;
17
- return /* @__PURE__ */ a(
18
- $,
19
- {
20
- returnTo: q + P,
21
- app: S,
22
- switchChecked: b,
23
- switchOnClick: (e) => {
24
- D(e);
25
- },
26
- description: /* @__PURE__ */ a(o, { children: "Add a mock payment to your events" }),
27
- children: /* @__PURE__ */ a(o, { children: F ? /* @__PURE__ */ a(L, { className: "mt-2", severity: "warning", title: n("warning_recurring_event_payment") }) : b && /* @__PURE__ */ u(o, { children: [
28
- /* @__PURE__ */ a("div", { className: "mt-2 block items-center sm:flex", children: /* @__PURE__ */ a(
29
- V,
30
- {
31
- id: "test-mock-payment-app-price",
32
- label: "Price",
33
- labelSrOnly: !0,
34
- addOnLeading: w,
35
- addOnSuffix: l,
36
- step: "0.01",
37
- min: "0.5",
38
- type: "number",
39
- required: !0,
40
- className: "block w-full rounded-sm pl-2 text-sm",
41
- placeholder: "Price",
42
- onChange: (e) => {
43
- c("price", Number(e.target.value) * 100), s && c("currency", s.value);
44
- },
45
- value: y > 0 ? y / 100 : void 0
46
- }
47
- ) }),
48
- /* @__PURE__ */ u("div", { className: "mt-5 w-60", children: [
49
- /* @__PURE__ */ a("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: n("currency") }),
50
- /* @__PURE__ */ a(
51
- x,
52
- {
53
- id: "test-mock-payment-app-currency-id",
54
- variant: "default",
55
- options: g,
56
- value: s,
57
- className: "text-black",
58
- defaultValue: s,
59
- onChange: (e) => {
60
- e && (O(e), E(C[e.value]), c("currency", e.value));
61
- }
62
- }
63
- )
64
- ] }),
65
- /* @__PURE__ */ u("div", { className: "mt-4 w-60", children: [
66
- /* @__PURE__ */ a("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: "Payment option" }),
67
- /* @__PURE__ */ a(
68
- x,
69
- {
70
- defaultValue: m ? { ...m, label: n(m.label) } : { ...t[0], label: n(t[0].label) },
71
- options: t.map((e) => ({ ...e, label: n(e.label) || e.label })),
72
- onChange: (e) => {
73
- e && c("paymentOption", e.value);
74
- },
75
- className: "mb-1 h-[38px] w-full",
76
- isDisabled: !1
77
- }
78
- )
79
- ] })
80
- ] }) })
81
- }
82
- );
83
- };
84
- export {
85
- z as default
86
- };
@@ -1,34 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { y as m } from "./index--iR_feQQ.js";
3
- import { A as c } from "./AppCard--JDiTUMU.js";
4
- import { u } from "./useIsAppEnabled-C_9eRB94.js";
5
- import l from "./EventTypeAppSettingsInterface-LIn3bMv4.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,34 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { y as m } from "./index--iR_feQQ.js";
3
- import { A as c } from "./AppCard--JDiTUMU.js";
4
- import { u } from "./useIsAppEnabled-C_9eRB94.js";
5
- import l from "./EventTypeAppSettingsInterface-7e1qbHi8.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,51 +0,0 @@
1
- import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
- import { y as h, f as n } from "./index--iR_feQQ.js";
3
- import { A } from "./AppCard--JDiTUMU.js";
4
- import { u as I } from "./useIsAppEnabled-C_9eRB94.js";
5
- const E = function({ app: t, eventType: i }) {
6
- var d;
7
- const { getAppData: o, setAppData: s, disabled: r } = h(), l = o("MATOMO_URL"), p = o("SITE_ID"), { enabled: c, updateEnabled: m } = I(t);
8
- return /* @__PURE__ */ a(
9
- A,
10
- {
11
- hideSettingsIcon: !0,
12
- app: t,
13
- switchOnClick: (e) => {
14
- m(e);
15
- },
16
- switchChecked: c,
17
- teamId: ((d = i.team) == null ? void 0 : d.id) || void 0,
18
- children: /* @__PURE__ */ u("div", { className: "flex flex-col gap-2", children: [
19
- /* @__PURE__ */ a(
20
- n,
21
- {
22
- dataTestid: `${t.slug}-url`,
23
- name: "Matomo URL",
24
- placeholder: "Enter your Matomo URL here",
25
- value: l,
26
- disabled: r,
27
- onChange: (e) => {
28
- s("MATOMO_URL", e.target.value);
29
- }
30
- }
31
- ),
32
- /* @__PURE__ */ a(
33
- n,
34
- {
35
- dataTestid: `${t.slug}-site-id`,
36
- disabled: r,
37
- name: "Site ID",
38
- placeholder: "Enter your Site ID",
39
- value: p,
40
- onChange: (e) => {
41
- s("SITE_ID", e.target.value);
42
- }
43
- }
44
- )
45
- ] })
46
- }
47
- );
48
- };
49
- export {
50
- E as default
51
- };
@@ -1,41 +0,0 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { w as b, x as f, y, z as E, W as w } from "./index--iR_feQQ.js";
3
- import { useState as C } from "react";
4
- import { A as P } from "./AppCard--JDiTUMU.js";
5
- import { u as g } from "./useIsAppEnabled-C_9eRB94.js";
6
- import v from "./EventTypeAppSettingsInterface-xYWyd_Dz.js";
7
- const W = function({
8
- app: t,
9
- eventType: e,
10
- eventTypeFormMetadata: n
11
- }) {
12
- var o;
13
- const { t: i } = b(), r = f.usePathname(), { getAppData: a, setAppData: c, disabled: m } = y(), { enabled: d, updateEnabled: l } = g(t), u = E(n), [h] = C(a("enabled")), s = !h && u;
14
- return /* @__PURE__ */ p(
15
- P,
16
- {
17
- returnTo: `${w}${r}?tabName=apps`,
18
- app: t,
19
- switchChecked: d,
20
- switchOnClick: (A) => {
21
- l(A);
22
- },
23
- teamId: ((o = e.team) == null ? void 0 : o.id) || void 0,
24
- disableSwitch: s,
25
- switchTooltip: s ? i("other_payment_app_enabled") : void 0,
26
- children: /* @__PURE__ */ p(
27
- v,
28
- {
29
- eventType: e,
30
- slug: t.slug,
31
- disabled: m,
32
- getAppData: a,
33
- setAppData: c
34
- }
35
- )
36
- }
37
- );
38
- };
39
- export {
40
- W as default
41
- };