@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,221 +0,0 @@
1
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
- import { useState as d } from "react";
3
- import { y as I, af as P, ag as j, e as T, u as g, s as k, M as A, ah as E, ai as R, X as z } from "./index-MLgFWWYi.js";
4
- const x = "search", C = "url", B = (s) => {
5
- const { t: a } = I(), [i, l] = d(""), [p, m] = d(0), [c, v] = d(""), { isOpenDialog: D, setIsOpenDialog: O } = s, [u, b] = d(!1), [N, h] = d(""), [y, _] = d(x), w = async (n, f) => {
6
- if (u)
7
- return;
8
- b(!0), h("");
9
- const t = await fetch("/api/integrations/giphy/search", {
10
- method: "POST",
11
- headers: {
12
- "Content-Type": "application/json"
13
- },
14
- body: JSON.stringify({
15
- keyword: n,
16
- offset: f
17
- })
18
- }), r = await t.json();
19
- return t.ok ? (l(r.image || ""), m(r.nextOffset), r.image || h("No Result found")) : h((r == null ? void 0 : r.message) || "Something went wrong"), b(!1), null;
20
- }, G = async (n) => {
21
- var r;
22
- if (u)
23
- return;
24
- b(!0), h("");
25
- const f = await fetch("/api/integrations/giphy/get", {
26
- method: "POST",
27
- headers: {
28
- "Content-Type": "application/json"
29
- },
30
- body: JSON.stringify({
31
- url: n
32
- })
33
- }), t = await f.json();
34
- return f.ok ? (l(t.image || ""), t.image || h("No Result found")) : h((t == null ? void 0 : t.message) || ((r = t == null ? void 0 : t[0]) == null ? void 0 : r.message) || "Something went wrong"), b(!1), null;
35
- }, S = (n, f, t) => /* @__PURE__ */ o(
36
- "div",
37
- {
38
- className: k(
39
- "flex cursor-pointer items-center border-b-2 p-2 text-sm ",
40
- y === t ? "text-default border-emphasis" : "text-subtle border-transparent"
41
- ),
42
- onClick: () => {
43
- v(""), l(""), _(t);
44
- },
45
- children: [
46
- /* @__PURE__ */ e(z, { name: n, className: "h-4 w-4 ltr:mr-2 rtl:ml-2" }),
47
- f
48
- ]
49
- }
50
- ), M = async (n) => {
51
- n.stopPropagation(), n.preventDefault(), y === x ? w(c, 0) : y === C && G(c);
52
- };
53
- return /* @__PURE__ */ e(P, { open: D, onOpenChange: O, children: /* @__PURE__ */ o(j, { children: [
54
- /* @__PURE__ */ e("h3", { className: "leading-16 font-cal text-emphasis text-xl", id: "modal-title", children: a("add_gif_to_confirmation") }),
55
- /* @__PURE__ */ e("p", { className: "text-subtle mb-3 text-sm font-light", children: a("find_gif_spice_confirmation") }),
56
- /* @__PURE__ */ o("div", { className: "border-emphasis flex items-center border-b border-solid", children: [
57
- S("search", a("search_giphy"), x),
58
- S("link", a("add_link_from_giphy"), C)
59
- ] }),
60
- /* @__PURE__ */ o(
61
- "form",
62
- {
63
- className: "flex w-full justify-center space-x-2 space-y-2 rtl:space-x-reverse",
64
- onSubmit: M,
65
- children: [
66
- /* @__PURE__ */ e("div", { className: "relative block w-full pt-2", children: /* @__PURE__ */ e(
67
- T,
68
- {
69
- type: "text",
70
- placeholder: y === x ? a("search_giphy") : "https://media.giphy.com/media/some-id/giphy.gif",
71
- value: c,
72
- onChange: (n) => {
73
- v(n.target.value);
74
- }
75
- }
76
- ) }),
77
- /* @__PURE__ */ e(g, { type: "submit", tabIndex: -1, color: "secondary", loading: u, children: a("search") })
78
- ]
79
- }
80
- ),
81
- i && /* @__PURE__ */ e("div", { className: "flex flex-col items-center space-x-2 space-y-2 pt-3 rtl:space-x-reverse", children: /* @__PURE__ */ e("div", { className: "bg-subtle flex w-full items-center justify-center", children: u ? /* @__PURE__ */ e("div", { className: "flex h-[200px] w-full items-center justify-center bg-gray-400 pb-3 pt-3", children: /* @__PURE__ */ o(
82
- "svg",
83
- {
84
- className: k("mx-4 h-5 w-5 animate-spin", "text-inverted dark:text-emphasis"),
85
- xmlns: "http://www.w3.org/2000/svg",
86
- fill: "none",
87
- viewBox: "0 0 24 24",
88
- children: [
89
- /* @__PURE__ */ e(
90
- "circle",
91
- {
92
- className: "opacity-25",
93
- cx: "12",
94
- cy: "12",
95
- r: "10",
96
- stroke: "currentColor",
97
- strokeWidth: "4"
98
- }
99
- ),
100
- /* @__PURE__ */ e(
101
- "path",
102
- {
103
- className: "opacity-75",
104
- fill: "currentColor",
105
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
106
- }
107
- )
108
- ]
109
- }
110
- ) }) : /* @__PURE__ */ e("img", { className: "h-[200px] pb-3 pt-3", src: i, alt: `Gif from Giphy for ${c}` }) }) }),
111
- N && /* @__PURE__ */ e(A, { severity: "error", title: N, className: "my-4" }),
112
- i && y === x && /* @__PURE__ */ o("div", { className: "mt-4 flex items-center justify-between space-x-2 rtl:space-x-reverse", children: [
113
- /* @__PURE__ */ e("div", { className: "text-subtle text-sm font-light", children: "Not the perfect GIF?" }),
114
- /* @__PURE__ */ e(
115
- g,
116
- {
117
- size: "sm",
118
- color: "secondary",
119
- type: "button",
120
- loading: u,
121
- onClick: () => w(c, p),
122
- children: "Shuffle"
123
- }
124
- )
125
- ] }),
126
- /* @__PURE__ */ o(E, { noSticky: !0, children: [
127
- /* @__PURE__ */ e(
128
- R,
129
- {
130
- color: "minimal",
131
- tabIndex: -1,
132
- onClick: () => {
133
- s.setIsOpenDialog(!1);
134
- },
135
- children: a("cancel")
136
- }
137
- ),
138
- /* @__PURE__ */ e(
139
- g,
140
- {
141
- type: "button",
142
- disabled: !i,
143
- onClick: () => (s.setIsOpenDialog(!1), s.onSave(i), m(0), l(""), v(""), !1),
144
- children: a("add_gif")
145
- }
146
- )
147
- ] })
148
- ] }) });
149
- };
150
- function F(s) {
151
- const { t: a } = I(), [i, l] = d(s.defaultValue), [p, m] = d(!1);
152
- return /* @__PURE__ */ o("div", { className: "flex flex-col items-start space-x-2 space-y-2 rtl:space-x-reverse", children: [
153
- i && /* @__PURE__ */ e("div", { className: "min-h-[200px]", children: /* @__PURE__ */ e("img", { alt: "Selected Gif Image", src: i }) }),
154
- /* @__PURE__ */ o("div", { className: "flex", children: [
155
- i ? /* @__PURE__ */ e(
156
- g,
157
- {
158
- color: "minimal",
159
- type: "button",
160
- StartIcon: "pencil",
161
- onClick: () => m(!0),
162
- disabled: s.disabled,
163
- children: "Change"
164
- }
165
- ) : /* @__PURE__ */ e(
166
- g,
167
- {
168
- color: "minimal",
169
- type: "button",
170
- StartIcon: "plus",
171
- onClick: () => m(!0),
172
- disabled: s.disabled,
173
- children: "Add from Giphy"
174
- }
175
- ),
176
- i && /* @__PURE__ */ e(
177
- g,
178
- {
179
- color: "destructive",
180
- type: "button",
181
- StartIcon: "x",
182
- onClick: () => {
183
- l(""), s.onChange("");
184
- },
185
- disabled: s.disabled,
186
- children: a("remove")
187
- }
188
- )
189
- ] }),
190
- /* @__PURE__ */ e(
191
- B,
192
- {
193
- isOpenDialog: p,
194
- setIsOpenDialog: m,
195
- onSave: (c) => {
196
- l(c), s.onChange(c);
197
- }
198
- }
199
- )
200
- ] });
201
- }
202
- const J = ({
203
- getAppData: s,
204
- setAppData: a,
205
- disabled: i
206
- }) => {
207
- const l = s("thankYouPage");
208
- return /* @__PURE__ */ e(
209
- F,
210
- {
211
- defaultValue: l,
212
- disabled: i,
213
- onChange: (p) => {
214
- a("thankYouPage", p);
215
- }
216
- }
217
- );
218
- };
219
- export {
220
- J as default
221
- };
@@ -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-MLgFWWYi.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,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: "Tracking 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,72 +0,0 @@
1
- import { jsx as l, Fragment as x, jsxs as o } from "react/jsx-runtime";
2
- import { useState as N, useEffect as w } from "react";
3
- import { y as _, a1 as t, M as g, f as C, Y as P, S as p } from "./index-MLgFWWYi.js";
4
- const d = [{ label: "BTC", value: "BTC", unit: "sats" }], T = ({
5
- eventType: f,
6
- getAppData: s,
7
- setAppData: a
8
- }) => {
9
- var v, h;
10
- const { t: n } = _(), i = s("price"), c = s("currency"), [r, S] = N(
11
- d.find((e) => e.value === c) || d[0]
12
- ), b = s("paymentOption"), u = ((v = t) == null ? void 0 : v.find((e) => b === e.value)) || {
13
- label: t[0].label,
14
- value: t[0].value
15
- }, y = !!f.seatsPerTimeSlot, [m] = N(s("enabled")), O = ((h = f.recurringEvent) == null ? void 0 : h.count) !== void 0;
16
- return w(() => {
17
- !c && m && a("currency", r.value);
18
- }, [c, r, a, m]), /* @__PURE__ */ l(x, { children: O ? /* @__PURE__ */ l(g, { className: "mt-2", severity: "warning", title: n("warning_recurring_event_payment") }) : m && /* @__PURE__ */ o(x, { children: [
19
- /* @__PURE__ */ l("div", { className: "mt-2 block items-center sm:flex", children: /* @__PURE__ */ l(
20
- C,
21
- {
22
- label: "Price",
23
- labelSrOnly: !0,
24
- addOnLeading: /* @__PURE__ */ l(P, { className: "h-4 w-4" }),
25
- addOnSuffix: r.unit || r.value,
26
- type: "number",
27
- required: !0,
28
- className: "block w-full rounded-sm border-gray-300 pl-2 pr-12 text-sm",
29
- placeholder: "Price",
30
- onChange: (e) => {
31
- a("price", Number(e.target.value)), c && a("currency", c);
32
- },
33
- value: i && i > 0 ? i : void 0
34
- }
35
- ) }),
36
- /* @__PURE__ */ o("div", { className: "mt-5 w-60", children: [
37
- /* @__PURE__ */ l("label", { className: "text-default block text-sm font-medium", htmlFor: "currency", children: n("currency") }),
38
- /* @__PURE__ */ l(
39
- p,
40
- {
41
- variant: "default",
42
- options: d,
43
- value: r,
44
- className: "text-black",
45
- defaultValue: r,
46
- onChange: (e) => {
47
- e && (S(e), a("currency", e.value));
48
- }
49
- }
50
- )
51
- ] }),
52
- /* @__PURE__ */ o("div", { className: "mt-2 w-60", children: [
53
- /* @__PURE__ */ l("label", { className: "text-default block text-sm font-medium", htmlFor: "currency", children: "Payment option" }),
54
- /* @__PURE__ */ l(
55
- p,
56
- {
57
- defaultValue: u ? { ...u, label: n(u.label) } : { ...t[0], label: n(t[0].label) },
58
- options: t.map((e) => ({ ...e, label: n(e.label) || e.label })),
59
- onChange: (e) => {
60
- e && a("paymentOption", e.value);
61
- },
62
- className: "mb-1 h-[38px] w-full",
63
- isDisabled: y
64
- }
65
- )
66
- ] }),
67
- y && b === "HOLD" && /* @__PURE__ */ l(g, { className: "mt-2", severity: "warning", title: n("seats_and_no_show_fee_error") })
68
- ] }) });
69
- };
70
- export {
71
- T as default
72
- };
@@ -1,25 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { f as c } from "./index-MLgFWWYi.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,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-MLgFWWYi.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,14 +0,0 @@
1
- import { jsx as e, Fragment as a } from "react/jsx-runtime";
2
- import { x as o } from "./index-MLgFWWYi.js";
3
- function d(t) {
4
- const n = o("exchange2013_calendar");
5
- return /* @__PURE__ */ e(a, { children: t.render({
6
- onClick() {
7
- n.mutate("");
8
- },
9
- loading: n.isPending
10
- }) });
11
- }
12
- export {
13
- d as default
14
- };
@@ -1,29 +0,0 @@
1
- import { jsx as i, Fragment as a } from "react/jsx-runtime";
2
- import { useState as s } from "react";
3
- function f(n) {
4
- const o = async () => {
5
- const t = await fetch("/api/integrations/vital/token", {
6
- method: "POST",
7
- body: JSON.stringify({}),
8
- headers: {
9
- "Content-Type": "application/json"
10
- }
11
- });
12
- if (!t.ok)
13
- throw new Error("Failed to get link token");
14
- return await t.json();
15
- }, [r, e] = s(!1);
16
- return /* @__PURE__ */ i(a, { children: n.render({
17
- onClick() {
18
- e(!0), o().then((t) => {
19
- e(!1), window.open(`${t.url}&token=${t.token}`, "_self");
20
- }).catch((t) => {
21
- e(!1), console.error(t);
22
- });
23
- },
24
- loading: r
25
- }) });
26
- }
27
- export {
28
- f as default
29
- };
@@ -1,14 +0,0 @@
1
- import { jsx as e, Fragment as a } from "react/jsx-runtime";
2
- import { x as o } from "./index-MLgFWWYi.js";
3
- function d(t) {
4
- const n = o("exchange2016_calendar");
5
- return /* @__PURE__ */ e(a, { children: t.render({
6
- onClick() {
7
- n.mutate("");
8
- },
9
- loading: n.isPending
10
- }) });
11
- }
12
- export {
13
- d as default
14
- };
@@ -1,58 +0,0 @@
1
- import { jsxs as f, Fragment as l, jsx as m } from "react/jsx-runtime";
2
- import { useState as p } from "react";
3
- import { x as d, an as E, W as g } from "./index-MLgFWWYi.js";
4
- var s = /* @__PURE__ */ ((n) => (n.ACCOUNTS_STEP = "accounts", n.EVENT_TYPES_STEP = "event-types", n.CONFIGURE_STEP = "configure", n))(s || {}), i = function(n) {
5
- switch (typeof n) {
6
- case "string":
7
- return n;
8
- case "boolean":
9
- return n ? "true" : "false";
10
- case "number":
11
- return isFinite(n) ? n : "";
12
- default:
13
- return "";
14
- }
15
- }, y = function(n, t, e, o) {
16
- return t = t || "&", e = e || "=", n === null && (n = void 0), typeof n == "object" ? Object.keys(n).map(function(r) {
17
- var a = encodeURIComponent(i(r)) + e;
18
- return Array.isArray(n[r]) ? n[r].map(function(c) {
19
- return a + encodeURIComponent(i(c));
20
- }).join(t) : a + encodeURIComponent(i(n[r]));
21
- }).filter(Boolean).join(t) : o ? encodeURIComponent(i(o)) + e + encodeURIComponent(i(n)) : "";
22
- }, u;
23
- u = y;
24
- const C = ({
25
- slug: n,
26
- step: t,
27
- teamId: e
28
- }) => {
29
- const o = { slug: n };
30
- e && (o.teamId = e);
31
- const r = u(o);
32
- return `/apps/installation/${t}?${r}`;
33
- };
34
- function I(n) {
35
- const [t, e] = p(!1), o = d(null), r = () => {
36
- o.mutate({
37
- type: "office365_video",
38
- variant: "conferencing",
39
- slug: "msteams",
40
- returnTo: g + C({
41
- slug: "msteams",
42
- step: s.EVENT_TYPES_STEP
43
- })
44
- });
45
- };
46
- return /* @__PURE__ */ f(l, { children: [
47
- n.render({
48
- onClick() {
49
- e(!0);
50
- },
51
- disabled: t
52
- }),
53
- /* @__PURE__ */ m(E, { open: t, onOpenChange: e, handleSubmit: r })
54
- ] });
55
- }
56
- export {
57
- I as default
58
- };