@calcom/atoms 1.0.97-beta-1 → 1.0.97-beta-3

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 (103) hide show
  1. package/dist/{AddressInput-MxFRI9cW.js → AddressInput-LPJtHhnk.js} +9 -8
  2. package/dist/{AlbyPriceComponent-B7reGN3c.js → AlbyPriceComponent-VO8iEUWb.js} +53 -52
  3. package/dist/AppCard-cTyZ7qdO.js +162 -0
  4. package/dist/AppListCardPlatformWrapper-ErlT9yQV.js +9 -0
  5. package/dist/{AppListCardWebWrapper-3ZmWWW_L.js → AppListCardWebWrapper-nLRKr-Qu.js} +10 -9
  6. package/dist/AppSettingsInterface-1iuEhZRw.js +23 -0
  7. package/dist/AppSettingsInterface-9nYzo3Ef.js +29 -0
  8. package/dist/AppSettingsInterface-Y7iloRRd.js +75 -0
  9. package/dist/{DateRangePicker-GTmIREkF.js → DateRangePicker-zh9gM3ld.js} +784 -783
  10. package/dist/EventTypeAppCardInterface-0tcE4MHz.js +32 -0
  11. package/dist/EventTypeAppCardInterface-2xzo_8rb.js +453 -0
  12. package/dist/EventTypeAppCardInterface-3xv7ZK_G.js +41 -0
  13. package/dist/{EventTypeAppCardInterface-h1_dvQG9.js → EventTypeAppCardInterface-4dkcilsD.js} +17 -16
  14. package/dist/EventTypeAppCardInterface-A7WN14Mn.js +34 -0
  15. package/dist/EventTypeAppCardInterface-BbJv67UJ.js +49 -0
  16. package/dist/EventTypeAppCardInterface-D42_2WwA.js +42 -0
  17. package/dist/EventTypeAppCardInterface-F9zy0_KX.js +24 -0
  18. package/dist/EventTypeAppCardInterface-LB9yguQb.js +39 -0
  19. package/dist/EventTypeAppCardInterface-PGX33FFN.js +42 -0
  20. package/dist/EventTypeAppCardInterface-PaCD78C8.js +33 -0
  21. package/dist/EventTypeAppCardInterface-QiaQ-GmU.js +51 -0
  22. package/dist/EventTypeAppCardInterface-S5bK4a_4.js +24 -0
  23. package/dist/EventTypeAppCardInterface-SXV5NhVT.js +24 -0
  24. package/dist/EventTypeAppCardInterface-SdCRwS0b.js +34 -0
  25. package/dist/EventTypeAppCardInterface-TV1GspR-.js +41 -0
  26. package/dist/EventTypeAppCardInterface-WrBEdjss.js +86 -0
  27. package/dist/EventTypeAppCardInterface-Xl60vAW7.js +34 -0
  28. package/dist/EventTypeAppCardInterface-bY6zHj23.js +34 -0
  29. package/dist/EventTypeAppCardInterface-bpyx9DoB.js +34 -0
  30. package/dist/EventTypeAppCardInterface-dSD0TA4p.js +34 -0
  31. package/dist/EventTypeAppCardInterface-hulmgxtc.js +24 -0
  32. package/dist/EventTypeAppCardInterface-n8fugRqn.js +32 -0
  33. package/dist/EventTypeAppCardInterface-qqnnC5vq.js +24 -0
  34. package/dist/EventTypeAppCardInterface-rVMclz_u.js +34 -0
  35. package/dist/EventTypeAppCardInterface-zXewU-bg.js +31 -0
  36. package/dist/EventTypeAppSettingsInterface-2oHFXxC0.js +221 -0
  37. package/dist/{EventTypeAppSettingsInterface-cXn8l171.js → EventTypeAppSettingsInterface-5hQr6WTa.js} +7 -6
  38. package/dist/{EventTypeAppSettingsInterface-9raltJka.js → EventTypeAppSettingsInterface-CwuQI4XA.js} +39 -38
  39. package/dist/EventTypeAppSettingsInterface-HGPywPcZ.js +43 -0
  40. package/dist/EventTypeAppSettingsInterface-MLox-zIr.js +78 -0
  41. package/dist/EventTypeAppSettingsInterface-azMpYm3v.js +48 -0
  42. package/dist/{EventTypeAppSettingsInterface-Hre_gkKY.js → EventTypeAppSettingsInterface-ccBCyO4S.js} +6 -5
  43. package/dist/EventTypeAppSettingsInterface-jCOnJXVq.js +42 -0
  44. package/dist/EventTypeAppSettingsInterface-rUp-tPsO.js +72 -0
  45. package/dist/{EventTypeAppSettingsInterface-2wY9yPcf.js → EventTypeAppSettingsInterface-sOLaF1pR.js} +6 -5
  46. package/dist/{EventTypeAppSettingsInterface-eKcoM9Xa.js → EventTypeAppSettingsInterface-v8a7XnIr.js} +6 -5
  47. package/dist/{EventTypeAppSettingsInterface-Fn4VS9pl.js → EventTypeAppSettingsInterface-xlYsU6Vi.js} +72 -71
  48. package/dist/InstallAppButton-34JAPxwK.js +14 -0
  49. package/dist/{InstallAppButton-Ho1cJkMm.js → InstallAppButton-JXhBVaYJ.js} +8 -8
  50. package/dist/InstallAppButton-ihX89_K4.js +58 -0
  51. package/dist/InstallAppButton-zjD9dbE7.js +14 -0
  52. package/dist/{PhoneInput-DNq9V1s5.js → PhoneInput-saKL4loW.js} +97 -96
  53. package/dist/{StripePaymentForm-lGjXjqLX.js → StripePaymentForm-dfxxUj2E.js} +100 -99
  54. package/dist/cal-atoms.js +6 -6
  55. package/dist/{framer-features--8Hvyv45.js → framer-features-K_TB52kd.js} +11 -11
  56. package/dist/{index-fsA0kHyy.js → index-81plgMPe.js} +1 -1
  57. package/dist/{index-cfay3a2W.js → index-IPz9Apiv.js} +1 -1
  58. package/dist/{index-Bj_kD41n.js → index-engsJK56.js} +108 -107
  59. package/dist/{index-OYPUcfnB.js → index-ite7gJ1a.js} +2 -2
  60. package/dist/{index-M6WUZF2M.js → index-ykl8OQ78.js} +66312 -66946
  61. package/dist/{isSupportedCountry-aizVo7Oo.js → isSupportedCountry-RPoEk3Bi.js} +1 -1
  62. package/dist/{useIsAppEnabled-OmKRsE8Z.js → useIsAppEnabled-jQTpW-EN.js} +1 -1
  63. package/globals.min.css +22 -2
  64. package/package.json +1 -1
  65. package/dist/AppCard-ImfOuDL_.js +0 -161
  66. package/dist/AppListCardPlatformWrapper-Kgk0fNGU.js +0 -8
  67. package/dist/AppSettingsInterface-4JMt22o1.js +0 -22
  68. package/dist/AppSettingsInterface-8TqZVnNL.js +0 -74
  69. package/dist/AppSettingsInterface-MQ_fkHJx.js +0 -28
  70. package/dist/EventTypeAppCardInterface-0O_KGHxp.js +0 -40
  71. package/dist/EventTypeAppCardInterface-0Z1NiGs_.js +0 -23
  72. package/dist/EventTypeAppCardInterface-0bkDiimc.js +0 -33
  73. package/dist/EventTypeAppCardInterface-4bmGNjTO.js +0 -452
  74. package/dist/EventTypeAppCardInterface-6Hs2WiRN.js +0 -23
  75. package/dist/EventTypeAppCardInterface-6QhUsfck.js +0 -38
  76. package/dist/EventTypeAppCardInterface-CSZJxMAi.js +0 -48
  77. package/dist/EventTypeAppCardInterface-D5NE1JH-.js +0 -33
  78. package/dist/EventTypeAppCardInterface-GpzdxrTy.js +0 -41
  79. package/dist/EventTypeAppCardInterface-HDqpiB_E.js +0 -33
  80. package/dist/EventTypeAppCardInterface-IsJt3HGB.js +0 -30
  81. package/dist/EventTypeAppCardInterface-K_hBnKz2.js +0 -23
  82. package/dist/EventTypeAppCardInterface-QuKynjTF.js +0 -23
  83. package/dist/EventTypeAppCardInterface-Uk-367hU.js +0 -33
  84. package/dist/EventTypeAppCardInterface-UrOLCYHp.js +0 -31
  85. package/dist/EventTypeAppCardInterface-WhX3MQGL.js +0 -33
  86. package/dist/EventTypeAppCardInterface-_a5TsCGC.js +0 -41
  87. package/dist/EventTypeAppCardInterface-_e0oMnpF.js +0 -33
  88. package/dist/EventTypeAppCardInterface-bfOpI-Cg.js +0 -23
  89. package/dist/EventTypeAppCardInterface-dQBcQRe5.js +0 -85
  90. package/dist/EventTypeAppCardInterface-jDIOSF5p.js +0 -31
  91. package/dist/EventTypeAppCardInterface-pgZqPYuy.js +0 -40
  92. package/dist/EventTypeAppCardInterface-rJaUyBaK.js +0 -32
  93. package/dist/EventTypeAppCardInterface-sAMfJ4Zp.js +0 -50
  94. package/dist/EventTypeAppCardInterface-xkCoWuR1.js +0 -33
  95. package/dist/EventTypeAppSettingsInterface-0MtsVqm9.js +0 -71
  96. package/dist/EventTypeAppSettingsInterface-4AylQiBj.js +0 -47
  97. package/dist/EventTypeAppSettingsInterface-Br_BvYU4.js +0 -77
  98. package/dist/EventTypeAppSettingsInterface-CkbhDi5X.js +0 -42
  99. package/dist/EventTypeAppSettingsInterface-nwSw369C.js +0 -220
  100. package/dist/EventTypeAppSettingsInterface-x-GvtrwY.js +0 -41
  101. package/dist/InstallAppButton-7AfVFA1y.js +0 -13
  102. package/dist/InstallAppButton-PfrQUF7k.js +0 -13
  103. package/dist/InstallAppButton-R3hBMMGj.js +0 -57
@@ -0,0 +1,34 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { J as m } from "./index-ykl8OQ78.js";
3
+ import { A as c } from "./AppCard-cTyZ7qdO.js";
4
+ import { u } from "./useIsAppEnabled-jQTpW-EN.js";
5
+ import l from "./EventTypeAppSettingsInterface-5hQr6WTa.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
+ };
@@ -0,0 +1,31 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { J as d } from "./index-ykl8OQ78.js";
3
+ import { A as c } from "./AppCard-cTyZ7qdO.js";
4
+ import { u as m } from "./useIsAppEnabled-jQTpW-EN.js";
5
+ import l from "./EventTypeAppSettingsInterface-azMpYm3v.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
+ };
@@ -0,0 +1,221 @@
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { useState as d } from "react";
3
+ import { y as I, ao as j, ap as M, j as T, z as g, Z as C, N as A, aq as E, ar as z, a4 as R } from "./index-ykl8OQ78.js";
4
+ const y = "search", k = "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(""), [x, _] = d(y), 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: C(
39
+ "flex cursor-pointer items-center border-b-2 p-2 text-sm ",
40
+ x === t ? "text-default border-emphasis" : "text-subtle border-transparent"
41
+ ),
42
+ onClick: () => {
43
+ v(""), l(""), _(t);
44
+ },
45
+ children: [
46
+ /* @__PURE__ */ e(R, { name: n, className: "h-4 w-4 ltr:mr-2 rtl:ml-2" }),
47
+ f
48
+ ]
49
+ }
50
+ ), P = async (n) => {
51
+ n.stopPropagation(), n.preventDefault(), x === y ? w(c, 0) : x === k && G(c);
52
+ };
53
+ return /* @__PURE__ */ e(j, { open: D, onOpenChange: O, children: /* @__PURE__ */ o(M, { 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"), y),
58
+ S("link", a("add_link_from_giphy"), k)
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: P,
65
+ children: [
66
+ /* @__PURE__ */ e("div", { className: "relative block w-full pt-2", children: /* @__PURE__ */ e(
67
+ T,
68
+ {
69
+ type: "text",
70
+ placeholder: x === y ? 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: C("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 && x === y && /* @__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, { children: [
127
+ /* @__PURE__ */ e(
128
+ z,
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,24 +1,25 @@
1
- import { x as i, k as c } from "./index-M6WUZF2M.js";
2
- const g = ({
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { k as c } from "./index-ykl8OQ78.js";
3
+ const s = ({
3
4
  getAppData: t,
4
5
  setAppData: e,
5
6
  disabled: a,
6
7
  slug: n
7
8
  }) => {
8
9
  const r = t("trackingId");
9
- return /* @__PURE__ */ i.jsx(
10
+ return /* @__PURE__ */ o(
10
11
  c,
11
12
  {
12
13
  dataTestid: n,
13
14
  name: "Tracking ID",
14
15
  value: r,
15
16
  disabled: a,
16
- onChange: (s) => {
17
- e("trackingId", s.target.value);
17
+ onChange: (i) => {
18
+ e("trackingId", i.target.value);
18
19
  }
19
20
  }
20
21
  );
21
22
  };
22
23
  export {
23
- g as default
24
+ s as default
24
25
  };
@@ -1,6 +1,7 @@
1
- import { z as C, x as l, O as b, k as F, S as O } from "./index-M6WUZF2M.js";
1
+ import { jsxs as u, Fragment as o, jsx as n } from "react/jsx-runtime";
2
2
  import { useState as k, useEffect as P } from "react";
3
- const y = [
3
+ import { y as x, N as p, k as w, S as K } from "./index-ykl8OQ78.js";
4
+ const h = [
4
5
  "BIF",
5
6
  "CLP",
6
7
  "DJF",
@@ -17,7 +18,7 @@ const y = [
17
18
  "XAF",
18
19
  "XOF",
19
20
  "XPF"
20
- ], j = (e, n) => y.includes(n.toUpperCase()) ? e : Math.round(e * 100), w = (e, n) => y.includes(n.toUpperCase()) ? e : e / 100, K = [
21
+ ], U = (e, a) => h.includes(a.toUpperCase()) ? e : Math.round(e * 100), _ = (e, a) => h.includes(a.toUpperCase()) ? e : e / 100, V = [
21
22
  {
22
23
  label: "on_booking_option",
23
24
  value: "ON_BOOKING"
@@ -44,41 +45,41 @@ const y = [
44
45
  { label: "Vietnamese đồng (VND)", value: "vnd" },
45
46
  { label: "Canadian dollar (CAD)", value: "cad" },
46
47
  { label: "South Korean won (KRW)", value: "krw" }
47
- ], V = ({
48
+ ], R = ({
48
49
  getAppData: e,
49
- setAppData: n,
50
- disabled: p,
51
- eventType: u
50
+ setAppData: a,
51
+ disabled: f,
52
+ eventType: d
52
53
  }) => {
53
- var m;
54
- const o = e("price"), t = e("currency") || r[0].value, [s, h] = k(
55
- r.find((a) => a.value === t) || {
54
+ var b;
55
+ const m = e("price"), t = e("currency") || r[0].value, [i, g] = k(
56
+ r.find((l) => l.value === t) || {
56
57
  label: r[0].label,
57
58
  value: r[0].value
58
59
  }
59
- ), f = e("paymentOption"), c = e("enabled"), { t: i } = C(), d = ((m = u.recurringEvent) == null ? void 0 : m.count) !== void 0, g = !!u.seatsPerTimeSlot, x = (a, v) => 0 .toLocaleString(a, {
60
+ ), N = e("paymentOption"), c = e("enabled"), { t: s } = x(), v = ((b = d.recurringEvent) == null ? void 0 : b.count) !== void 0, S = !!d.seatsPerTimeSlot, C = (l, y) => 0 .toLocaleString(l, {
60
61
  style: "currency",
61
- currency: v,
62
+ currency: y,
62
63
  minimumFractionDigits: 0,
63
64
  maximumFractionDigits: 0
64
65
  }).replace(/\d/g, "").trim();
65
66
  P(() => {
66
- c && (e("currency") || n("currency", r[0].value), e("paymentOption") || n("paymentOption", K[0].value));
67
- }, [c, e, n]);
68
- const S = (a) => {
69
- const N = Math.floor(a).toString();
70
- return parseInt(N);
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);
71
72
  };
72
- return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
73
- d && /* @__PURE__ */ l.jsx(b, { className: "mt-2", severity: "warning", title: i("warning_recurring_event_payment") }),
74
- !d && c && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
75
- /* @__PURE__ */ l.jsx("div", { className: "mt-4 block items-center justify-start sm:flex sm:space-x-2", children: /* @__PURE__ */ l.jsx(
76
- F,
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,
77
78
  {
78
79
  "data-testid": "stripe-price-input",
79
- label: i("price"),
80
+ label: s("price"),
80
81
  className: "h-[38px]",
81
- addOnLeading: /* @__PURE__ */ l.jsx(l.Fragment, { children: s.value ? x("en", s.value) : "" }),
82
+ addOnLeading: /* @__PURE__ */ n(o, { children: i.value ? C("en", i.value) : "" }),
82
83
  addOnSuffix: t.toUpperCase(),
83
84
  addOnClassname: "h-[38px]",
84
85
  step: "1",
@@ -86,34 +87,34 @@ const y = [
86
87
  type: "number",
87
88
  required: !0,
88
89
  placeholder: "Price",
89
- disabled: p,
90
- onChange: (a) => {
91
- n("price", j(Number(a.target.value), t));
90
+ disabled: f,
91
+ onChange: (l) => {
92
+ a("price", U(Number(l.target.value), t));
92
93
  },
93
- value: o > 0 ? S(w(o, t)) : void 0
94
+ value: m > 0 ? F(_(m, t)) : void 0
94
95
  }
95
96
  ) }),
96
- /* @__PURE__ */ l.jsxs("div", { className: "mt-5 w-60", children: [
97
- /* @__PURE__ */ l.jsx("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: i("currency") }),
98
- /* @__PURE__ */ l.jsx(
99
- O,
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,
100
101
  {
101
102
  "data-testid": "stripe-currency-select",
102
103
  variant: "default",
103
104
  options: r,
104
- value: s,
105
+ value: i,
105
106
  className: "text-black",
106
- defaultValue: s,
107
- onChange: (a) => {
108
- a && (h(a), n("currency", a.value));
107
+ defaultValue: i,
108
+ onChange: (l) => {
109
+ l && (g(l), a("currency", l.value));
109
110
  }
110
111
  }
111
112
  )
112
113
  ] }),
113
- g && f === "HOLD" && /* @__PURE__ */ l.jsx(b, { className: "mt-2", severity: "warning", title: i("seats_and_no_show_fee_error") })
114
+ S && N === "HOLD" && /* @__PURE__ */ n(p, { className: "mt-2", severity: "warning", title: s("seats_and_no_show_fee_error") })
114
115
  ] })
115
116
  ] });
116
117
  };
117
118
  export {
118
- V as default
119
+ R as default
119
120
  };
@@ -0,0 +1,43 @@
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { useState as f } from "react";
3
+ import { y as p, k as h, Y as v, Z as x } from "./index-ykl8OQ78.js";
4
+ const N = ({ eventType: n, disabled: d }) => {
5
+ const { t: i } = p(), [r, c] = f(""), m = r !== "" ? `?${r}` : "", t = n.URL + m;
6
+ function s({ size: a, data: u }) {
7
+ const l = `https://api.qrserver.com/v1/create-qr-code/?size=${a}&data=${u}`;
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
+ };
@@ -0,0 +1,78 @@
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 { U as r, y as E, N as x, k as F, V as T, X as V, S as N } from "./index-ykl8OQ78.js";
5
+ const I = ({
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, O] = 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, q] = 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 ? V(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
+ N,
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 && (O(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
+ N,
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
+ I as default
78
+ };
@@ -0,0 +1,48 @@
1
+ import { jsxs as o, jsx as c } from "react/jsx-runtime";
2
+ import { useState as m, useEffect as v } from "react";
3
+ import { R as p, S as h } from "./index-ykl8OQ78.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,12 +1,13 @@
1
- import { x as s, k as i } from "./index-M6WUZF2M.js";
2
- const g = ({
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { k as o } from "./index-ykl8OQ78.js";
3
+ const p = ({
3
4
  getAppData: t,
4
5
  setAppData: e,
5
6
  disabled: a
6
7
  }) => {
7
8
  const n = t("trackingId");
8
- return /* @__PURE__ */ s.jsx(
9
- i,
9
+ return /* @__PURE__ */ i(
10
+ o,
10
11
  {
11
12
  name: "Tracking ID",
12
13
  value: n,
@@ -18,5 +19,5 @@ const g = ({
18
19
  );
19
20
  };
20
21
  export {
21
- g as default
22
+ p as default
22
23
  };