@calcom/atoms 1.1.2 → 1.2.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 (81) hide show
  1. package/dist/{AddressInput-cAznNQd3.js → AddressInput-_Diya_zo.js} +3 -3
  2. package/dist/{AlbyPriceComponent-oZ0IVf6c.js → AlbyPriceComponent-fIgFEUXN.js} +19 -19
  3. package/dist/{PhoneInput-eRYuhuju.js → PhoneInput-MNv3E3Ho.js} +1 -1
  4. package/dist/cal-atoms.js +5 -36
  5. package/dist/index-TYx-qK4G.js +83374 -0
  6. package/dist/{index-D-baW2SF.js → index-ghibukoV.js} +1 -1
  7. package/dist/index-mKRiKaF6.js +1957 -0
  8. package/dist/packages/features/bookings/lib/handleNewBooking/scheduleNoShowTriggers.integration-test.d.ts +2 -0
  9. package/dist/packages/features/bookings/lib/handleNewBooking/scheduleNoShowTriggers.integration-test.d.ts.map +1 -0
  10. package/dist/packages/features/eventtypes/components/CreateEventTypeForm.d.ts.map +1 -1
  11. package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts.map +1 -1
  12. package/dist/packages/platform/atoms/index.d.ts +0 -36
  13. package/dist/packages/platform/atoms/index.d.ts.map +1 -1
  14. package/dist/style.css +1 -1
  15. package/fonts/26a46d62cd723877-s.woff2 +0 -0
  16. package/fonts/55c55f0601d81cf3-s.woff2 +0 -0
  17. package/fonts/581909926a08bbc8-s.woff2 +0 -0
  18. package/fonts/6d93bde91c0c2823-s.woff2 +0 -0
  19. package/fonts/90475aac776488b6-s.p.woff2 +0 -0
  20. package/fonts/97e0cb1ae144a2a9-s.woff2 +0 -0
  21. package/fonts/a34f9d1faa5f3315-s.p.woff2 +0 -0
  22. package/fonts/df0a9ae256c0569c-s.woff2 +0 -0
  23. package/globals.min.css +2 -2
  24. package/package.json +3 -2
  25. package/dist/AppCard-vSAp__lv.js +0 -281
  26. package/dist/AppListCardPlatformWrapper-gpEo1mhs.js +0 -9
  27. package/dist/AppListCardWebWrapper-2mtvbrZI.js +0 -74
  28. package/dist/AppSettingsInterface-76krfbgC.js +0 -29
  29. package/dist/AppSettingsInterface-U3J8XNfT.js +0 -23
  30. package/dist/AppSettingsInterface-qR8wrA8Z.js +0 -75
  31. package/dist/DateRangePicker-S8PasnBw.js +0 -74
  32. package/dist/EventTypeAppCardInterface--cvud7p5.js +0 -34
  33. package/dist/EventTypeAppCardInterface-3WyRAq4g.js +0 -858
  34. package/dist/EventTypeAppCardInterface-5GqOLlXa.js +0 -24
  35. package/dist/EventTypeAppCardInterface-7BjnHZSW.js +0 -42
  36. package/dist/EventTypeAppCardInterface-9RRfsmxD.js +0 -41
  37. package/dist/EventTypeAppCardInterface-AqVT1BoP.js +0 -34
  38. package/dist/EventTypeAppCardInterface-AzUqjRAw.js +0 -32
  39. package/dist/EventTypeAppCardInterface-CWeqREZU.js +0 -24
  40. package/dist/EventTypeAppCardInterface-FoNtZTXA.js +0 -39
  41. package/dist/EventTypeAppCardInterface-GC7AOQgo.js +0 -34
  42. package/dist/EventTypeAppCardInterface-HQMqzp7c.js +0 -49
  43. package/dist/EventTypeAppCardInterface-N7WcmdT4.js +0 -34
  44. package/dist/EventTypeAppCardInterface-R0X4nckV.js +0 -32
  45. package/dist/EventTypeAppCardInterface-Uu3O27xa.js +0 -34
  46. package/dist/EventTypeAppCardInterface-V8atUcK-.js +0 -34
  47. package/dist/EventTypeAppCardInterface-Y07gIvmX.js +0 -31
  48. package/dist/EventTypeAppCardInterface-Z-LBRQAn.js +0 -51
  49. package/dist/EventTypeAppCardInterface-aYTZV5EF.js +0 -41
  50. package/dist/EventTypeAppCardInterface-bEYxRxeM.js +0 -51
  51. package/dist/EventTypeAppCardInterface-dKaaMNor.js +0 -86
  52. package/dist/EventTypeAppCardInterface-lguZWNvV.js +0 -24
  53. package/dist/EventTypeAppCardInterface-p0blDTaQ.js +0 -24
  54. package/dist/EventTypeAppCardInterface-rppYuGVz.js +0 -33
  55. package/dist/EventTypeAppCardInterface-tkKsbhWo.js +0 -39
  56. package/dist/EventTypeAppCardInterface-utvbMc02.js +0 -42
  57. package/dist/EventTypeAppCardInterface-wXpCgFPS.js +0 -34
  58. package/dist/EventTypeAppCardInterface-zGyldaa9.js +0 -24
  59. package/dist/EventTypeAppSettingsInterface-7hS6GTO2.js +0 -48
  60. package/dist/EventTypeAppSettingsInterface-FQeyEBxu.js +0 -72
  61. package/dist/EventTypeAppSettingsInterface-HK0lsJ28.js +0 -42
  62. package/dist/EventTypeAppSettingsInterface-MG2xFbSG.js +0 -23
  63. package/dist/EventTypeAppSettingsInterface-Ra9cL5JB.js +0 -25
  64. package/dist/EventTypeAppSettingsInterface-XL4D2Dyv.js +0 -24
  65. package/dist/EventTypeAppSettingsInterface-ZIUpW8te.js +0 -78
  66. package/dist/EventTypeAppSettingsInterface-afhCdPkJ.js +0 -79
  67. package/dist/EventTypeAppSettingsInterface-bA-Dmxj2.js +0 -298
  68. package/dist/EventTypeAppSettingsInterface-g5jo9GKH.js +0 -43
  69. package/dist/EventTypeAppSettingsInterface-sazwK3zk.js +0 -120
  70. package/dist/EventTypeAppSettingsInterface-sbAmbLiK.js +0 -221
  71. package/dist/EventTypeAppSettingsInterface-ycOpDd2-.js +0 -23
  72. package/dist/InstallAppButton-0Gg9ocXb.js +0 -14
  73. package/dist/InstallAppButton-JHaJ7T7H.js +0 -58
  74. package/dist/InstallAppButton-JN6i4iBH.js +0 -14
  75. package/dist/InstallAppButton-JXhBVaYJ.js +0 -29
  76. package/dist/StripePaymentForm-B1BkBzO9.js +0 -493
  77. package/dist/currencyOptions-kannG2hu.js +0 -61
  78. package/dist/index-GkJhe-oj.js +0 -160851
  79. package/dist/index-V8Hhry6U.js +0 -518
  80. package/dist/index-l2YMCxIx.js +0 -30
  81. package/dist/useIsAppEnabled-oIf6wORY.js +0 -18
@@ -1,281 +0,0 @@
1
- import { jsx as l, Fragment as D, jsxs as a } from "react/jsx-runtime";
2
- import { ao as V, ap as v, s as u, X as N, aq as W, O as A, y as H, x as T, ar as q, u as j, a6 as C, as as L, G as F, am as U, at as g, q as G } from "./index-GkJhe-oj.js";
3
- import * as c from "react";
4
- var y = c.forwardRef((e, r) => {
5
- const { children: t, ...n } = e, s = c.Children.toArray(t), i = s.find(Q);
6
- if (i) {
7
- const o = i.props.children, f = s.map((d) => d === i ? c.Children.count(o) > 1 ? c.Children.only(null) : c.isValidElement(o) ? o.props.children : null : d);
8
- return /* @__PURE__ */ l(x, { ...n, ref: r, children: c.isValidElement(o) ? c.cloneElement(o, void 0, f) : null });
9
- }
10
- return /* @__PURE__ */ l(x, { ...n, ref: r, children: t });
11
- });
12
- y.displayName = "Slot";
13
- var x = c.forwardRef((e, r) => {
14
- const { children: t, ...n } = e;
15
- if (c.isValidElement(t)) {
16
- const s = Z(t);
17
- return c.cloneElement(t, {
18
- ...X(n, t.props),
19
- // @ts-ignore
20
- ref: r ? V(r, s) : s
21
- });
22
- }
23
- return c.Children.count(t) > 1 ? c.Children.only(null) : null;
24
- });
25
- x.displayName = "SlotClone";
26
- var M = ({ children: e }) => /* @__PURE__ */ l(D, { children: e });
27
- function Q(e) {
28
- return c.isValidElement(e) && e.type === M;
29
- }
30
- function X(e, r) {
31
- const t = { ...r };
32
- for (const n in r) {
33
- const s = e[n], i = r[n];
34
- /^on[A-Z]/.test(n) ? s && i ? t[n] = (...f) => {
35
- i(...f), s(...f);
36
- } : s && (t[n] = s) : n === "style" ? t[n] = { ...s, ...i } : n === "className" && (t[n] = [s, i].filter(Boolean).join(" "));
37
- }
38
- return { ...e, ...t };
39
- }
40
- function Z(e) {
41
- var n, s;
42
- let r = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, t = r && "isReactWarning" in r && r.isReactWarning;
43
- return t ? e.ref : (r = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
44
- }
45
- const p = ({
46
- children: e,
47
- ref: r,
48
- className: t
49
- }) => {
50
- const [n] = v();
51
- return /* @__PURE__ */ l("div", { ref: n, className: u("bg-muted flex flex-col gap-4 rounded-2xl p-4", t), children: e });
52
- }, R = ({
53
- children: e,
54
- ref: r,
55
- as: t
56
- }) => /* @__PURE__ */ l(t ? y : "h2", { ref: r, className: "text-emphasis text-base font-semibold leading-none", children: e }), _ = ({
57
- children: e,
58
- ref: r,
59
- as: t
60
- }) => /* @__PURE__ */ l(t ? y : "h3", { ref: r, className: "text-subtle line-clamp-1 text-sm", children: e }), b = ({
61
- ref: e,
62
- name: r,
63
- size: t = "md",
64
- iconSlot: n
65
- }) => /* @__PURE__ */ l(
66
- "div",
67
- {
68
- ref: e,
69
- className: u(
70
- "bg-default border-subtle border-subtle flex items-center justify-center border",
71
- t === "sm" && "rounded-md p-1",
72
- t === "md" && "rounded-[10px] p-1.5"
73
- ),
74
- children: n || /* @__PURE__ */ l(N, { name: r, className: u(t === "sm" && "h-4 w-4", t === "md" && "h-6 w-6") })
75
- }
76
- ), J = ({
77
- children: e,
78
- ref: r,
79
- icon: t,
80
- title: n,
81
- description: s,
82
- iconSlot: i,
83
- rawHeading: o
84
- }) => /* @__PURE__ */ a("div", { ref: r, className: "flex items-center justify-between gap-3", children: [
85
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
86
- t && !i && /* @__PURE__ */ l(b, { name: t }),
87
- i && /* @__PURE__ */ l(b, { iconSlot: i }),
88
- /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
89
- n && /* @__PURE__ */ l(R, { children: n }),
90
- s && /* @__PURE__ */ l(_, { children: s }),
91
- o && o
92
- ] })
93
- ] }),
94
- e
95
- ] }), K = ({ children: e, ref: r }) => /* @__PURE__ */ l("div", { ref: r, className: "flex flex-col gap-4", children: e }), Y = ({ children: e, ref: r }) => {
96
- const [t] = v();
97
- return /* @__PURE__ */ l("div", { ref: t, className: "border-muted bg-default flex flex-col gap-4 rounded-xl border p-3", children: e });
98
- }, z = ({
99
- children: e,
100
- ref: r,
101
- icon: t,
102
- title: n,
103
- classNames: s,
104
- justify: i = "between",
105
- labelFor: o
106
- }) => /* @__PURE__ */ a(
107
- "div",
108
- {
109
- ref: r,
110
- className: u(
111
- "flex items-center gap-2",
112
- i === "between" ? "justify-between" : "justify-start",
113
- s == null ? void 0 : s.container
114
- ),
115
- children: [
116
- /* @__PURE__ */ a("div", { className: u("flex items-center gap-2", s == null ? void 0 : s.title), children: [
117
- t && /* @__PURE__ */ l(b, { name: t, size: "sm" }),
118
- /* @__PURE__ */ l("div", { className: u("flex", s == null ? void 0 : s.title), children: /* @__PURE__ */ l("h4", { className: "text-default text-sm font-medium leading-none", id: o, children: n }) })
119
- ] }),
120
- e
121
- ]
122
- }
123
- ), $ = ({
124
- children: e,
125
- ref: r,
126
- invert: t,
127
- classNames: n
128
- }) => /* @__PURE__ */ l(
129
- "div",
130
- {
131
- ref: r,
132
- className: u(
133
- "bg-muted flex flex-col rounded-lg px-[6px] py-1",
134
- t && "bg-default border-subtle border",
135
- n == null ? void 0 : n.container
136
- ),
137
- children: e
138
- }
139
- ), ee = ({
140
- children: e,
141
- ref: r
142
- }) => /* @__PURE__ */ l("div", { ref: r, className: "bg-default border-subtle flex flex-col gap-2 rounded-xl border p-2", children: e }), h = Object.assign(p, {
143
- Header: J,
144
- Content: K,
145
- Title: R,
146
- Description: _,
147
- SubSection: Y,
148
- SubSectionHeader: z,
149
- SubSectionContent: $,
150
- SubSectionNested: ee
151
- });
152
- function te(e) {
153
- const { status: r } = W.useSession();
154
- return A.viewer.apps.appById.useQuery(
155
- { appId: e },
156
- {
157
- enabled: r === "authenticated"
158
- }
159
- );
160
- }
161
- function ne({
162
- appId: e,
163
- className: r,
164
- returnTo: t,
165
- teamId: n
166
- }) {
167
- const { t: s } = H(), { data: i } = te(e), o = A.useUtils(), f = T(null, {
168
- returnTo: t,
169
- onSuccess: (d) => {
170
- o.viewer.apps.appById.invalidate({ appId: e }), o.viewer.apps.integrations.invalidate({
171
- extendsFeature: "EventType",
172
- ...n && { teamId: n }
173
- }), !(d != null && d.setupPending) && C(s("app_successfully_installed"), "success");
174
- },
175
- onError: (d) => {
176
- d instanceof Error && C(d.message || s("app_could_not_be_installed"), "error");
177
- }
178
- });
179
- return i ? /* @__PURE__ */ l(
180
- q,
181
- {
182
- type: i.type,
183
- teamsPlanRequired: i.teamsPlanRequired,
184
- wrapperClassName: u("[@media(max-width:260px)]:w-full", r),
185
- render: ({ useDefaultComponent: d, ...m }) => (d && (m = {
186
- ...m,
187
- onClick: () => {
188
- f.mutate({
189
- type: i.type,
190
- variant: i.variant,
191
- slug: i.slug,
192
- ...n && { teamId: n }
193
- });
194
- }
195
- }), /* @__PURE__ */ l(
196
- j,
197
- {
198
- loading: f.isPending,
199
- color: "secondary",
200
- className: "[@media(max-width:260px)]:w-full [@media(max-width:260px)]:justify-center",
201
- StartIcon: "plus",
202
- ...m,
203
- children: s("add")
204
- }
205
- ))
206
- }
207
- ) : null;
208
- }
209
- function se({
210
- app: e,
211
- description: r,
212
- switchOnClick: t,
213
- switchChecked: n,
214
- children: s,
215
- returnTo: i,
216
- teamId: o,
217
- disableSwitch: f,
218
- switchTooltip: d,
219
- hideSettingsIcon: m = !1,
220
- hideAppCardOptions: E = !1
221
- }) {
222
- const { t: w } = L(), [I] = v(), { setAppData: P, LockedIcon: O, disabled: k } = F(), B = U();
223
- return /* @__PURE__ */ a(h, { className: u(!(e != null && e.isInstalled) && "rounded-xl"), children: [
224
- /* @__PURE__ */ l(
225
- h.Header,
226
- {
227
- rawHeading: /* @__PURE__ */ a("div", { children: [
228
- /* @__PURE__ */ a("div", { className: "flex w-full items-center gap-1", children: [
229
- /* @__PURE__ */ l(h.Title, { children: e == null ? void 0 : e.name }),
230
- !(e != null && e.isInstalled) && /* @__PURE__ */ l("span", { className: "bg-emphasis ml-1 rounded px-1 py-0.5 text-xs font-medium leading-3 tracking-[0.01em]", children: (e == null ? void 0 : e.categories[0].charAt(0).toUpperCase()) + (e == null ? void 0 : e.categories[0].slice(1)) })
231
- ] }),
232
- /* @__PURE__ */ l(h.Description, { children: e == null ? void 0 : e.description })
233
- ] }),
234
- iconSlot: /* @__PURE__ */ l(g, { href: `/apps/${e.slug}`, className: "flex h-8 w-8 items-center justify-center", children: /* @__PURE__ */ l(
235
- "img",
236
- {
237
- className: u(
238
- (e == null ? void 0 : e.logo.includes("-dark")) && "dark:invert",
239
- "max-h-full max-w-full object-contain"
240
- ),
241
- src: e == null ? void 0 : e.logo,
242
- alt: e == null ? void 0 : e.name
243
- }
244
- ) }),
245
- children: /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("div", { children: e != null && e.isInstalled || e.credentialOwner ? /* @__PURE__ */ l("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ l(
246
- G,
247
- {
248
- size: "sm",
249
- disabled: !e.enabled || k || f,
250
- onCheckedChange: (S) => {
251
- t && t(S), P("enabled", S);
252
- },
253
- checked: n,
254
- LockedIcon: O,
255
- "data-testid": `${e.slug}-app-switch`,
256
- tooltip: d
257
- }
258
- ) }) : /* @__PURE__ */ l(
259
- ne,
260
- {
261
- className: "ml-auto flex items-center",
262
- appId: e.slug,
263
- returnTo: i,
264
- teamId: o
265
- }
266
- ) }) })
267
- }
268
- ),
269
- E ? null : (e == null ? void 0 : e.isInstalled) && n && /* @__PURE__ */ l("div", { ref: I, children: e.isSetupAlready === void 0 || e.isSetupAlready ? /* @__PURE__ */ a("div", { className: "relative text-sm [&_input]:mb-0 [&_input]:leading-4", children: [
270
- !m && !B && /* @__PURE__ */ l(g, { href: `/apps/${e.slug}/setup`, className: "absolute right-4 top-4", children: /* @__PURE__ */ l(N, { name: "settings", className: "text-default h-4 w-4", "aria-hidden": "true" }) }),
271
- s
272
- ] }) : /* @__PURE__ */ a("div", { className: "flex h-64 w-full flex-col items-center justify-center gap-4 ", children: [
273
- /* @__PURE__ */ l("p", { children: w("this_app_is_not_setup_already") }),
274
- /* @__PURE__ */ l(g, { href: `/apps/${e.slug}/setup`, children: /* @__PURE__ */ l(j, { StartIcon: "settings", children: w("setup") }) })
275
- ] }) })
276
- ] });
277
- }
278
- export {
279
- se as A,
280
- h as S
281
- };
@@ -1,9 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { A as p } from "./index-GkJhe-oj.js";
3
- function s(o) {
4
- const t = `https://app.cal.com${o.logo}`;
5
- return /* @__PURE__ */ r(p, { ...o, logo: t });
6
- }
7
- export {
8
- s as default
9
- };
@@ -1,74 +0,0 @@
1
- import { jsx as P } from "react/jsx-runtime";
2
- import { Z as i, z as y, _ as A, a0 as R, A as $ } from "./index-GkJhe-oj.js";
3
- import { useMemo as Q, useEffect as d, useCallback as b, useState as L, useRef as w } from "react";
4
- i.string().or(i.number()).or(i.array(i.number())).transform((r) => typeof r == "string" ? r.split(",").map((o) => Number(o)) : Array.isArray(r) ? r : [r]);
5
- i.preprocess((r) => i.string().parse(r).split(","), i.string().array()).or(i.string().array());
6
- function x(r) {
7
- const o = y.useRouter(), c = A(), u = y.usePathname(), a = r.safeParse(c);
8
- let s = Q(() => ({}), []);
9
- d(() => {
10
- a.success && a.data && Object.entries(a.data).forEach(([e, t]) => {
11
- if (e in c || !t)
12
- return;
13
- const n = new URLSearchParams(s);
14
- n.set(String(e), String(t)), o.replace(`${u}?${n.toString()}`);
15
- });
16
- }, [a, r, o, u, c, s]), a.success ? s = a.data : a.success || console.error(a.error);
17
- const m = b(
18
- function(t, n) {
19
- const p = new URLSearchParams(s);
20
- p.set(String(t), String(n)), o.replace(`${u}?${p.toString()}`);
21
- },
22
- // eslint-disable-next-line react-hooks/exhaustive-deps
23
- [s, o]
24
- );
25
- function l(e) {
26
- const t = new URLSearchParams(s);
27
- t.delete(String(e)), o.replace(`${u}?${t.toString()}`);
28
- }
29
- function f(e, t) {
30
- const n = s[e];
31
- if (Array.isArray(n)) {
32
- if (n.includes(t))
33
- return;
34
- m(e, [...n, t]);
35
- } else
36
- m(e, [t]);
37
- }
38
- function h(e, t) {
39
- const n = s[e];
40
- if (Array.isArray(n) && n.length > 1) {
41
- const p = n.filter((S) => S !== t);
42
- m(e, p);
43
- } else
44
- l(e);
45
- }
46
- function g() {
47
- u !== null && o.replace(u);
48
- }
49
- return {
50
- data: s,
51
- setQuery: m,
52
- removeByKey: l,
53
- pushItemToKey: f,
54
- removeItemByKeyAndValue: h,
55
- removeAllQueryParams: g
56
- };
57
- }
58
- const C = i.object({ hl: i.string().optional() });
59
- function j(r) {
60
- const { slug: o, shouldHighlight: c } = r, {
61
- data: { hl: u }
62
- } = x(C), a = y.useRouter(), [s, m] = L(c && u === o), l = w(null), f = R(), h = y.usePathname();
63
- return d(() => (c && s && f !== null && h !== null && (l.current = setTimeout(() => {
64
- const g = new URLSearchParams(f.toString());
65
- g.delete("hl"), g.delete("category"), m(!1);
66
- const e = g.toString();
67
- a.replace(`${h}${e !== "" ? `?${e}` : ""}`);
68
- }, 3e3)), () => {
69
- l.current && (clearTimeout(l.current), l.current = null);
70
- }), [s, h, a, f, c]), /* @__PURE__ */ P($, { ...r });
71
- }
72
- export {
73
- j as default
74
- };
@@ -1,29 +0,0 @@
1
- import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { useState as s } from "react";
3
- import { y as i, f as l, u as m } from "./index-GkJhe-oj.js";
4
- function h() {
5
- const { t: a } = i(), n = "metric", [e, c] = s("");
6
- return /* @__PURE__ */ o("div", { className: "space-y-4 text-sm", children: [
7
- /* @__PURE__ */ t(
8
- l,
9
- {
10
- placeholder: "San Francisco",
11
- value: e,
12
- name: "Enter City",
13
- onChange: async (r) => {
14
- c(r.target.value);
15
- }
16
- }
17
- ),
18
- /* @__PURE__ */ t(
19
- m,
20
- {
21
- href: `webcal://weather-in-calendar.com/cal/weather-cal.php?city=${e}&units=${n}&temperature=day`,
22
- children: a("add_to_calendar")
23
- }
24
- )
25
- ] });
26
- }
27
- export {
28
- h as default
29
- };
@@ -1,23 +0,0 @@
1
- import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { useState as p } from "react";
3
- import { y as r, f as u, u as i } from "./index-GkJhe-oj.js";
4
- function d() {
5
- const { t: e } = r(), [s, n] = p("");
6
- return /* @__PURE__ */ o("div", { className: "space-y-4 px-4 pb-4 pt-4 text-sm", children: [
7
- /* @__PURE__ */ t(
8
- u,
9
- {
10
- placeholder: "Some Input",
11
- value: s,
12
- name: "Enter Input",
13
- onChange: async (a) => {
14
- n(a.target.value);
15
- }
16
- }
17
- ),
18
- /* @__PURE__ */ t(i, { children: e("submit") })
19
- ] });
20
- }
21
- export {
22
- d as default
23
- };
@@ -1,75 +0,0 @@
1
- import { jsxs as a, jsx as e, Fragment as r } from "react/jsx-runtime";
2
- import { u as i, y as o } from "./index-GkJhe-oj.js";
3
- function d({ template: t }) {
4
- return /* @__PURE__ */ a("div", { className: "min-h-16 bg-default border-subtle sticky flex flex-col justify-between gap-4 rounded-md border p-5", children: [
5
- /* @__PURE__ */ a("div", { className: "flex items-start justify-start", children: [
6
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "mr-4 flex h-12 w-12 items-center justify-center rounded-md p-1", children: /* @__PURE__ */ e("img", { className: "h-8", alt: t.app, src: `/api/app-store/zapier/${t.icon}` }) }) }),
7
- /* @__PURE__ */ e("div", { className: "mr-4", children: /* @__PURE__ */ a("div", { children: [
8
- /* @__PURE__ */ e("p", { className: "text-emphasis truncate text-sm font-medium leading-4", children: t.app }),
9
- /* @__PURE__ */ e("p", { className: "text-subtle mt-[2px] text-sm", children: t.text })
10
- ] }) })
11
- ] }),
12
- /* @__PURE__ */ e("div", { className: "hidden w-full sm:block", children: /* @__PURE__ */ e("div", { className: "float-right", children: /* @__PURE__ */ e(i, { color: "secondary", className: " w-[90px]", target: "_blank", href: t.link, children: "Use Zap" }) }) }),
13
- /* @__PURE__ */ e("div", { className: "mt-2 block w-full sm:hidden", children: /* @__PURE__ */ e("div", { className: "float-right", children: /* @__PURE__ */ e(i, { color: "secondary", className: "w-[90px]", target: "_blank", href: t.link, children: "Use Zap" }) }) })
14
- ] });
15
- }
16
- const n = [
17
- {
18
- icon: "gmail.svg",
19
- app: "Gmail",
20
- text: "Send emails via Gmail for scheduled events",
21
- link: "https://zapier.com/app/editor/template/1071345"
22
- },
23
- {
24
- icon: "googleSheets.svg",
25
- app: "Google Sheets",
26
- text: "Create Google Sheets rows for scheduled events",
27
- link: "https://zapier.com/app/editor/template/1082047"
28
- },
29
- {
30
- icon: "salesforce.svg",
31
- app: "Salesforce",
32
- text: "Create Salesforce leads from new bookings",
33
- link: "https://zapier.com/app/editor/template/1082050"
34
- },
35
- {
36
- icon: "todoist.svg",
37
- app: "Todoist",
38
- text: "Create Todoist tasks for scheduled events",
39
- link: "https://zapier.com/app/editor/template/1082073"
40
- },
41
- {
42
- icon: "gmail.svg",
43
- app: "Gmail",
44
- text: "Send emails via Gmail for rescheduled events",
45
- link: "https://zapier.com/app/editor/template/1083605"
46
- },
47
- {
48
- icon: "gmail.svg",
49
- app: "Gmail",
50
- text: "Send emails via Gmail for cancelled events",
51
- link: "https://zapier.com/app/editor/template/1083609"
52
- },
53
- {
54
- icon: "gmail.svg",
55
- app: "Gmail",
56
- text: "Send emails via Gmail after scheduled meetings end",
57
- link: "https://zapier.com/app/editor/template/1083613"
58
- },
59
- {
60
- icon: "googleCalendar.svg",
61
- app: "Google Calendar",
62
- text: "Add new bookings to Google Calendar",
63
- link: "https://zapier.com/app/editor/template/1083651"
64
- }
65
- ];
66
- function m() {
67
- const { t } = o();
68
- return /* @__PURE__ */ a(r, { children: [
69
- /* @__PURE__ */ e("div", { className: "text-sm font-semibold leading-4 ", children: t("get_started_zapier_templates") }),
70
- /* @__PURE__ */ e("div", { className: "mt-4 grid gap-4 md:grid-cols-2", children: n.map((s, l) => /* @__PURE__ */ e(d, { template: s }, l)) })
71
- ] });
72
- }
73
- export {
74
- m as default
75
- };
@@ -1,74 +0,0 @@
1
- import { jsx as i, jsxs as c, Fragment as f } from "react/jsx-runtime";
2
- import { r as h, s as m, $ as y, t as d, u as g, v as n, w as k } from "./index-GkJhe-oj.js";
3
- function w({
4
- className: s,
5
- dates: t,
6
- minDate: a,
7
- maxDate: u,
8
- onDatesChange: e,
9
- disabled: b,
10
- withoutPopover: p,
11
- "data-testid": v,
12
- strictlyBottom: o,
13
- allowPastDates: l = !1
14
- }) {
15
- function $(r) {
16
- if (l)
17
- if (t != null && t.endDate)
18
- e({ startDate: r, endDate: void 0 });
19
- else {
20
- const x = t.startDate ? r < t.startDate ? r : t.startDate : r, L = t.startDate ? r < t.startDate ? t.startDate : r : void 0;
21
- e({ startDate: x, endDate: L });
22
- }
23
- else
24
- t.startDate ? t.endDate ? r.getTime() === t.startDate.getTime() || r.getTime() === t.endDate.getTime() ? e({ startDate: r, endDate: void 0 }) : r < t.startDate ? e({ startDate: r, endDate: void 0 }) : e({ startDate: t.startDate, endDate: r }) : r < t.startDate ? e({ startDate: r, endDate: t.startDate }) : e({ startDate: t.startDate, endDate: r }) : e({ startDate: r, endDate: void 0 });
25
- }
26
- const D = /* @__PURE__ */ i(
27
- h,
28
- {
29
- initialFocus: !0,
30
- fromDate: l && a === null ? void 0 : a ?? /* @__PURE__ */ new Date(),
31
- toDate: u,
32
- mode: "range",
33
- defaultMonth: t == null ? void 0 : t.startDate,
34
- selected: { from: t == null ? void 0 : t.startDate, to: t == null ? void 0 : t.endDate },
35
- onDayClick: (r) => $(r),
36
- numberOfMonths: 1,
37
- disabled: b,
38
- "data-testid": v
39
- }
40
- );
41
- return p ? D : /* @__PURE__ */ i("div", { className: m("grid gap-2", s), children: /* @__PURE__ */ c(y, { children: [
42
- /* @__PURE__ */ i(d, { asChild: !0, children: /* @__PURE__ */ i(
43
- g,
44
- {
45
- "data-testid": "date-range",
46
- color: "secondary",
47
- EndIcon: "calendar",
48
- className: m("justify-between text-left font-normal", !t && "text-subtle"),
49
- children: t != null && t.startDate ? t != null && t.endDate ? /* @__PURE__ */ c(f, { children: [
50
- n(t.startDate, "LLL dd, y"),
51
- " - ",
52
- n(t.endDate, "LLL dd, y")
53
- ] }) : /* @__PURE__ */ c(f, { children: [
54
- n(t.startDate, "LLL dd, y"),
55
- " - End"
56
- ] }) : /* @__PURE__ */ i("span", { children: "Pick a date" })
57
- }
58
- ) }),
59
- /* @__PURE__ */ i(
60
- k,
61
- {
62
- className: "bg-default text-emphasis z-50 w-auto rounded-md border p-0 outline-none",
63
- align: "start",
64
- sideOffset: 4,
65
- side: o ? "bottom" : void 0,
66
- avoidCollisions: !o,
67
- children: D
68
- }
69
- )
70
- ] }) });
71
- }
72
- export {
73
- w as DatePickerWithRange
74
- };
@@ -1,34 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { G as m } from "./index-GkJhe-oj.js";
3
- import { A as c } from "./AppCard-vSAp__lv.js";
4
- import { u } from "./useIsAppEnabled-oIf6wORY.js";
5
- import l from "./EventTypeAppSettingsInterface-ycOpDd2-.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
- };