@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,32 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { G as d } from "./index-MLgFWWYi.js";
3
- import { A as m } from "./AppCard-Zx_xfVt_.js";
4
- import { u as c } from "./useIsAppEnabled-GIoK8AkC.js";
5
- import u from "./EventTypeAppSettingsInterface-N3GZOEOV.js";
6
- const E = function({ app: t, eventType: e }) {
7
- var p;
8
- const { getAppData: r, setAppData: s, disabled: n } = d(), { enabled: o, updateEnabled: i } = c(t);
9
- return /* @__PURE__ */ a(
10
- m,
11
- {
12
- hideSettingsIcon: !0,
13
- app: t,
14
- switchOnClick: i,
15
- switchChecked: o,
16
- teamId: ((p = e.team) == null ? void 0 : p.id) || void 0,
17
- children: /* @__PURE__ */ a(
18
- u,
19
- {
20
- eventType: e,
21
- slug: t.slug,
22
- disabled: n,
23
- getAppData: r,
24
- setAppData: s
25
- }
26
- )
27
- }
28
- );
29
- };
30
- export {
31
- E as default
32
- };
@@ -1,34 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { G as l, f as m } from "./index-MLgFWWYi.js";
3
- import { A as u } from "./AppCard-Zx_xfVt_.js";
4
- import { u as h } from "./useIsAppEnabled-GIoK8AkC.js";
5
- const D = function({ app: a, eventType: d }) {
6
- var s;
7
- const { getAppData: n, setAppData: r, disabled: p } = l(), i = n("SITE_ID"), { enabled: o, updateEnabled: c } = h(a);
8
- return /* @__PURE__ */ t(
9
- u,
10
- {
11
- app: a,
12
- switchOnClick: (e) => {
13
- c(e);
14
- },
15
- switchChecked: o,
16
- teamId: ((s = d.team) == null ? void 0 : s.id) || void 0,
17
- children: /* @__PURE__ */ t("fieldset", { className: "space-y-2", disabled: p, children: /* @__PURE__ */ t(
18
- m,
19
- {
20
- disabled: p,
21
- name: "Site ID",
22
- value: i,
23
- placeholder: "Enter your Site ID",
24
- onChange: (e) => {
25
- r("SITE_ID", e.target.value);
26
- }
27
- }
28
- ) })
29
- }
30
- );
31
- };
32
- export {
33
- D 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-MLgFWWYi.js";
3
- import { useMemo as v, useState as C } from "react";
4
- import { A as w } from "./AppCard-Zx_xfVt_.js";
5
- import E from "./EventTypeAppSettingsInterface-sgrrOkbn.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,34 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { G as m } from "./index-MLgFWWYi.js";
3
- import { A as c } from "./AppCard-Zx_xfVt_.js";
4
- import { u } from "./useIsAppEnabled-GIoK8AkC.js";
5
- import l from "./EventTypeAppSettingsInterface-uSZXgZw6.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,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,33 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { G as m } from "./index-MLgFWWYi.js";
3
- import { A as c } from "./AppCard-Zx_xfVt_.js";
4
- import { u as l } from "./useIsAppEnabled-GIoK8AkC.js";
5
- import u from "./EventTypeAppSettingsInterface-7bn1HSLI.js";
6
- const g = function({ eventType: e, app: t }) {
7
- var p;
8
- const { enabled: r, updateEnabled: s } = l(t), { disabled: o, getAppData: n, setAppData: d } = m();
9
- return /* @__PURE__ */ a(
10
- c,
11
- {
12
- app: t,
13
- switchOnClick: (i) => {
14
- s(i);
15
- },
16
- switchChecked: r,
17
- teamId: ((p = e.team) == null ? void 0 : p.id) || void 0,
18
- children: /* @__PURE__ */ a(
19
- u,
20
- {
21
- eventType: e,
22
- slug: t.slug,
23
- disabled: o,
24
- getAppData: n,
25
- setAppData: d
26
- }
27
- )
28
- }
29
- );
30
- };
31
- export {
32
- g as default
33
- };
@@ -1,34 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { G as m } from "./index-MLgFWWYi.js";
3
- import { A as c } from "./AppCard-Zx_xfVt_.js";
4
- import { u } from "./useIsAppEnabled-GIoK8AkC.js";
5
- import l from "./EventTypeAppSettingsInterface-KY9K2A4a.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,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,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,41 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { y as b, z as f, G as y, J as E, W as P } from "./index-MLgFWWYi.js";
3
- import { useState as C } from "react";
4
- import { A as g } from "./AppCard-Zx_xfVt_.js";
5
- import { u as v } from "./useIsAppEnabled-GIoK8AkC.js";
6
- import w from "./EventTypeAppSettingsInterface-SyFwT8fy.js";
7
- const q = function({
8
- app: e,
9
- eventType: t,
10
- eventTypeFormMetadata: p
11
- }) {
12
- var n;
13
- const { t: i } = b(), r = f.usePathname(), { getAppData: a, setAppData: m, disabled: c } = y(), { enabled: d, updateEnabled: l } = v(e), u = E(p), [h, T] = C(a("enabled")), s = !h && u;
14
- return /* @__PURE__ */ o(
15
- g,
16
- {
17
- returnTo: `${P}${r}?tabName=apps`,
18
- app: e,
19
- switchChecked: d,
20
- switchOnClick: (A) => {
21
- l(A);
22
- },
23
- teamId: ((n = t.team) == null ? void 0 : n.id) || void 0,
24
- disableSwitch: s,
25
- switchTooltip: s ? i("other_payment_app_enabled") : void 0,
26
- children: /* @__PURE__ */ o(
27
- w,
28
- {
29
- eventType: t,
30
- slug: e.slug,
31
- disabled: c,
32
- getAppData: a,
33
- setAppData: m
34
- }
35
- )
36
- }
37
- );
38
- };
39
- export {
40
- q as default
41
- };
@@ -1,39 +0,0 @@
1
- import { jsx as t, Fragment as u } from "react/jsx-runtime";
2
- import { y as A, z as y, G as g, J as b, W as f } from "./index-MLgFWWYi.js";
3
- import { useState as P } from "react";
4
- import { A as v } from "./AppCard-Zx_xfVt_.js";
5
- import C from "./EventTypeAppSettingsInterface-v7Pzk2Bm.js";
6
- const x = function({
7
- eventType: o,
8
- app: e,
9
- eventTypeFormMetadata: p
10
- }) {
11
- const { t: i } = A(), r = y.usePathname(), { getAppData: a, setAppData: c, disabled: m } = g(), [n, d] = P(a("enabled")), l = b(p), s = !n && l;
12
- return /* @__PURE__ */ t(
13
- v,
14
- {
15
- returnTo: `${f}${r}?tabName=apps`,
16
- app: e,
17
- switchChecked: n,
18
- switchOnClick: (h) => {
19
- d(h);
20
- },
21
- description: /* @__PURE__ */ t(u, { children: "Add lightning payments to your events and booking" }),
22
- disableSwitch: s,
23
- switchTooltip: s ? i("other_payment_app_enabled") : void 0,
24
- children: /* @__PURE__ */ t(
25
- C,
26
- {
27
- eventType: o,
28
- slug: e.slug,
29
- disabled: m,
30
- getAppData: a,
31
- setAppData: c
32
- }
33
- )
34
- }
35
- );
36
- };
37
- export {
38
- x as default
39
- };
@@ -1,31 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { G as d } from "./index-MLgFWWYi.js";
3
- import { A as c } from "./AppCard-Zx_xfVt_.js";
4
- import { u as m } from "./useIsAppEnabled-GIoK8AkC.js";
5
- import l from "./EventTypeAppSettingsInterface-eqtUnnNt.js";
6
- const b = function({ app: t, eventType: p }) {
7
- const { getAppData: r, setAppData: s, disabled: a } = d(), { enabled: n, updateEnabled: o } = m(t);
8
- return /* @__PURE__ */ e(
9
- c,
10
- {
11
- app: t,
12
- switchOnClick: (i) => {
13
- o(i);
14
- },
15
- switchChecked: n,
16
- children: /* @__PURE__ */ e(
17
- l,
18
- {
19
- slug: t.slug,
20
- eventType: p,
21
- disabled: a,
22
- getAppData: r,
23
- setAppData: s
24
- }
25
- )
26
- }
27
- );
28
- };
29
- export {
30
- b as default
31
- };
@@ -1,86 +0,0 @@
1
- import { jsx as a, Fragment as o, jsxs as u } from "react/jsx-runtime";
2
- import { z as v, y as T, G as _, K as t, W as q, M as L, f as V, S as g } from "./index-MLgFWWYi.js";
3
- import { useMemo as W, useState as p } from "react";
4
- import { A as $ } from "./AppCard-Zx_xfVt_.js";
5
- import { c as x, i as j, a as C } from "./currencyOptions-kannG2hu.js";
6
- const U = 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(x.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
- g,
52
- {
53
- id: "test-mock-payment-app-currency-id",
54
- variant: "default",
55
- options: x,
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
- g,
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
- U as default
86
- };