@calcom/atoms 1.3.0-booker → 1.3.1
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.
- package/dist/{AddressInput-WXZaR4AM.js → AddressInput-PV7ej7Dh.js} +3 -3
- package/dist/{AlbyPriceComponent-HWQCTeD1.js → AlbyPriceComponent-yWDmVyID.js} +19 -19
- package/dist/AppCard-4lsFofOP.js +281 -0
- package/dist/AppListCardPlatformWrapper-mavIjLoX.js +9 -0
- package/dist/AppListCardWebWrapper-E4rFeVUL.js +74 -0
- package/dist/AppSettingsInterface-1ECb-eGL.js +29 -0
- package/dist/AppSettingsInterface-SMx0rhrP.js +75 -0
- package/dist/AppSettingsInterface-vkAV3Jq-.js +23 -0
- package/dist/DateRangePicker-FF6QrWWv.js +74 -0
- package/dist/EventTypeAppCardInterface-2LX6RMKq.js +24 -0
- package/dist/EventTypeAppCardInterface-2bXQeyo2.js +51 -0
- package/dist/EventTypeAppCardInterface-3_OzEh4S.js +33 -0
- package/dist/EventTypeAppCardInterface-4WQGK5d3.js +49 -0
- package/dist/EventTypeAppCardInterface-D1OE6jGL.js +858 -0
- package/dist/EventTypeAppCardInterface-Dbx02Qtp.js +39 -0
- package/dist/EventTypeAppCardInterface-ECQy5_jF.js +24 -0
- package/dist/EventTypeAppCardInterface-EJ7vSpn7.js +24 -0
- package/dist/EventTypeAppCardInterface-Ej5y5wB2.js +34 -0
- package/dist/EventTypeAppCardInterface-HAuMr26j.js +34 -0
- package/dist/EventTypeAppCardInterface-HH9e5NM3.js +34 -0
- package/dist/EventTypeAppCardInterface-P6ANaRXE.js +51 -0
- package/dist/EventTypeAppCardInterface-SLLlwhTF.js +41 -0
- package/dist/EventTypeAppCardInterface-YsyyQucw.js +24 -0
- package/dist/EventTypeAppCardInterface-aNw-rctk.js +86 -0
- package/dist/EventTypeAppCardInterface-aof5TfU5.js +39 -0
- package/dist/EventTypeAppCardInterface-eWtAVevk.js +34 -0
- package/dist/EventTypeAppCardInterface-jA0StO-p.js +31 -0
- package/dist/EventTypeAppCardInterface-juIgeyaW.js +34 -0
- package/dist/EventTypeAppCardInterface-n5XUB5zh.js +41 -0
- package/dist/EventTypeAppCardInterface-nHnp-f_B.js +24 -0
- package/dist/EventTypeAppCardInterface-sCnBi-mW.js +34 -0
- package/dist/EventTypeAppCardInterface-tW0Vnzy2.js +32 -0
- package/dist/EventTypeAppCardInterface-uvXLgnEb.js +34 -0
- package/dist/EventTypeAppCardInterface-voyuklxT.js +42 -0
- package/dist/EventTypeAppCardInterface-xscYaAxr.js +42 -0
- package/dist/EventTypeAppCardInterface-y_jea2qd.js +32 -0
- package/dist/EventTypeAppSettingsInterface-2SBSbFCU.js +48 -0
- package/dist/EventTypeAppSettingsInterface-9LmBTR_4.js +25 -0
- package/dist/EventTypeAppSettingsInterface-B5891wx6.js +43 -0
- package/dist/EventTypeAppSettingsInterface-CN46bj0_.js +78 -0
- package/dist/EventTypeAppSettingsInterface-HvDJO9aW.js +106 -0
- package/dist/EventTypeAppSettingsInterface-LDtd3pKw.js +24 -0
- package/dist/EventTypeAppSettingsInterface-Lsx2he2j.js +298 -0
- package/dist/EventTypeAppSettingsInterface-M-phIaYV.js +42 -0
- package/dist/EventTypeAppSettingsInterface-Pryhal8P.js +23 -0
- package/dist/EventTypeAppSettingsInterface-YLFWXdQz.js +72 -0
- package/dist/EventTypeAppSettingsInterface-_REB8BRg.js +221 -0
- package/dist/EventTypeAppSettingsInterface-eMmPRmMH.js +120 -0
- package/dist/EventTypeAppSettingsInterface-pMt1ppeg.js +23 -0
- package/dist/InstallAppButton-JXhBVaYJ.js +29 -0
- package/dist/InstallAppButton-NOXXlDQb.js +58 -0
- package/dist/InstallAppButton-f_95VpK3.js +14 -0
- package/dist/InstallAppButton-fwJeBDlx.js +14 -0
- package/dist/{PhoneInput-6J6htPeB.js → PhoneInput-3kNrcLmH.js} +1 -1
- package/dist/StripePaymentForm-LAfd5yhD.js +493 -0
- package/dist/cal-atoms.js +36 -5
- package/dist/currencyOptions-kannG2hu.js +61 -0
- package/dist/index-YoOZkYTB.js +30 -0
- package/dist/index-YthdNsV6.js +518 -0
- package/dist/index-dC9oWaTb.js +161409 -0
- package/dist/{index-aGnAhRxt.js → index-i9Hko2MN.js} +1 -1
- package/dist/packages/features/bookings/Booker/Booker.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/BookerStoreProvider.d.ts +11 -0
- package/dist/packages/features/bookings/Booker/BookerStoreProvider.d.ts.map +1 -0
- package/dist/packages/features/bookings/Booker/__tests__/test-utils.d.ts +10 -0
- package/dist/packages/features/bookings/Booker/__tests__/test-utils.d.ts.map +1 -0
- package/dist/packages/features/bookings/Booker/components/AvailableTimeSlots.d.ts +2 -1
- package/dist/packages/features/bookings/Booker/components/AvailableTimeSlots.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.d.ts +2 -1
- package/dist/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/DatePicker.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts +2 -1
- package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/Header.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/LargeCalendar.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/hooks/useBookerLayout.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/hooks/useBookings.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/store.d.ts +6 -6
- package/dist/packages/features/bookings/Booker/store.d.ts.map +1 -1
- package/dist/packages/platform/atoms/availability/AvailabilitySettings.d.ts.map +1 -1
- package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts.map +1 -1
- package/dist/packages/platform/atoms/index.d.ts +36 -0
- package/dist/packages/platform/atoms/index.d.ts.map +1 -1
- package/dist/packages/platform/types/event-types/inputs/private-link.input.d.ts +4 -0
- package/dist/packages/platform/types/event-types/inputs/private-link.input.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/useIsAppEnabled-qoop3Fxe.js +18 -0
- package/package.json +1 -1
- package/dist/index-7pq3HQ5u.js +0 -1957
- package/dist/index-SbGDY58y.js +0 -83444
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { X as n, e as o, s as c } from "./index-dC9oWaTb.js";
|
|
3
3
|
function r({ value: s, onChange: t, ...a }) {
|
|
4
4
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center", children: [
|
|
5
5
|
/* @__PURE__ */ e(
|
|
@@ -11,14 +11,14 @@ function r({ value: s, onChange: t, ...a }) {
|
|
|
11
11
|
}
|
|
12
12
|
),
|
|
13
13
|
/* @__PURE__ */ e(
|
|
14
|
-
|
|
14
|
+
o,
|
|
15
15
|
{
|
|
16
16
|
...a,
|
|
17
17
|
value: s,
|
|
18
18
|
onChange: (l) => {
|
|
19
19
|
t(l.target.value);
|
|
20
20
|
},
|
|
21
|
-
className:
|
|
21
|
+
className: c("pl-10", a == null ? void 0 : a.className)
|
|
22
22
|
}
|
|
23
23
|
)
|
|
24
24
|
] });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as z, jsxs as er } from "react/jsx-runtime";
|
|
2
2
|
import J from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { V as tr, Y as nr } from "./index-dC9oWaTb.js";
|
|
4
4
|
const K = function(s, r = !0) {
|
|
5
5
|
if (s.destroyed)
|
|
6
6
|
throw new Error("Hash instance has been destroyed");
|
|
@@ -67,8 +67,8 @@ class ir extends sr {
|
|
|
67
67
|
(function(b, y, E, x) {
|
|
68
68
|
if (typeof b.setBigUint64 == "function")
|
|
69
69
|
return b.setBigUint64(y, E, x);
|
|
70
|
-
const B = BigInt(32), k = BigInt(4294967295), _ = Number(E >> B & k),
|
|
71
|
-
b.setUint32(y + (x ? 4 : 0), _, x), b.setUint32(y + j,
|
|
70
|
+
const B = BigInt(32), k = BigInt(4294967295), _ = Number(E >> B & k), C = Number(E & k), j = x ? 0 : 4;
|
|
71
|
+
b.setUint32(y + (x ? 4 : 0), _, x), b.setUint32(y + j, C, x);
|
|
72
72
|
})(c, f - 8, BigInt(8 * this.length), u), this.process(c, 0);
|
|
73
73
|
const g = N(r), m = this.outputLen;
|
|
74
74
|
if (m % 4)
|
|
@@ -347,8 +347,8 @@ Q = function(s, r) {
|
|
|
347
347
|
}
|
|
348
348
|
return Uint8Array.from(t);
|
|
349
349
|
} }, r.base58check = (e) => c(B(4, (t) => e(e(t))), r.base58);
|
|
350
|
-
const
|
|
351
|
-
function
|
|
350
|
+
const C = c(f("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), u("")), j = [996825010, 642813549, 513874426, 1027748829, 705979059];
|
|
351
|
+
function S(e) {
|
|
352
352
|
const t = e >> 25;
|
|
353
353
|
let n = (33554431 & e) << 5;
|
|
354
354
|
for (let o = 0; o < j.length; o++)
|
|
@@ -362,16 +362,16 @@ Q = function(s, r) {
|
|
|
362
362
|
const d = e.charCodeAt(h);
|
|
363
363
|
if (d < 33 || d > 126)
|
|
364
364
|
throw new Error(`Invalid prefix (${e})`);
|
|
365
|
-
a =
|
|
365
|
+
a = S(a) ^ d >> 5;
|
|
366
366
|
}
|
|
367
|
-
a =
|
|
367
|
+
a = S(a);
|
|
368
368
|
for (let h = 0; h < o; h++)
|
|
369
|
-
a =
|
|
369
|
+
a = S(a) ^ 31 & e.charCodeAt(h);
|
|
370
370
|
for (let h of t)
|
|
371
|
-
a =
|
|
371
|
+
a = S(a) ^ h;
|
|
372
372
|
for (let h = 0; h < 6; h++)
|
|
373
|
-
a =
|
|
374
|
-
return a ^= n,
|
|
373
|
+
a = S(a);
|
|
374
|
+
return a ^= n, C.encode(b([a % 2 ** 30], 30, 5, !1));
|
|
375
375
|
}
|
|
376
376
|
function O(e) {
|
|
377
377
|
const t = e === "bech32" ? 1 : 734539939, n = E(5), o = n.decode, a = n.encode, h = x(o);
|
|
@@ -389,7 +389,7 @@ Q = function(s, r) {
|
|
|
389
389
|
const G = w.slice(0, v), D = w.slice(v + 1);
|
|
390
390
|
if (D.length < 6)
|
|
391
391
|
throw new Error("Data must be at least 6 characters long");
|
|
392
|
-
const M =
|
|
392
|
+
const M = C.decode(D).slice(0, -6), P = H(G, M, t);
|
|
393
393
|
if (!D.endsWith(P))
|
|
394
394
|
throw new Error(`Invalid checksum in ${w}: expected "${P}"`);
|
|
395
395
|
return { prefix: G, words: M };
|
|
@@ -402,7 +402,7 @@ Q = function(s, r) {
|
|
|
402
402
|
const v = w.length + 7 + p.length;
|
|
403
403
|
if ($ !== !1 && v > $)
|
|
404
404
|
throw new TypeError(`Length ${v} exceeds limit ${$}`);
|
|
405
|
-
return `${w = w.toLowerCase()}1${
|
|
405
|
+
return `${w = w.toLowerCase()}1${C.encode(p)}${H(w, p, t)}`;
|
|
406
406
|
}, decode: d, decodeToBytes: function(w) {
|
|
407
407
|
const { prefix: p, words: $ } = d(w, !1);
|
|
408
408
|
return { prefix: p, words: $, bytes: o($) };
|
|
@@ -431,20 +431,20 @@ Q = function(s, r) {
|
|
|
431
431
|
BigInt(1e3), BigInt(1e6), BigInt(1e9), BigInt(1e12);
|
|
432
432
|
BigInt("2100000000000000000");
|
|
433
433
|
BigInt(1e11);
|
|
434
|
-
const
|
|
435
|
-
for (let s = 0, r = Object.keys(
|
|
436
|
-
r[s],
|
|
434
|
+
const Y = { payment_hash: 1, payment_secret: 16, description: 13, payee: 19, description_hash: 23, expiry: 6, min_final_cltv_expiry: 24, fallback_address: 9, route_hint: 3, feature_bits: 5, metadata: 27 };
|
|
435
|
+
for (let s = 0, r = Object.keys(Y); s < r.length; s++)
|
|
436
|
+
r[s], Y[r[s]].toString();
|
|
437
437
|
const V = async (s) => {
|
|
438
438
|
const r = "https://getalby.com/api/rates/" + s.toLowerCase() + ".json";
|
|
439
439
|
return (await (await fetch(r)).json()).rate_float / 1e8;
|
|
440
|
-
},
|
|
440
|
+
}, X = async ({ satoshi: s, currency: r }) => {
|
|
441
441
|
const i = await V(r);
|
|
442
442
|
return Number(s) * i;
|
|
443
443
|
};
|
|
444
|
-
var fr = { __proto__: null, getFiatBtcRate: V, getFiatValue:
|
|
444
|
+
var fr = { __proto__: null, getFiatBtcRate: V, getFiatValue: X, getSatoshiValue: async ({ amount: s, currency: r }) => {
|
|
445
445
|
const i = await V(r);
|
|
446
446
|
return Math.floor(Number(s) / i);
|
|
447
|
-
}, getFormattedFiatValue: async ({ satoshi: s, currency: r, locale: i }) => (i || (i = "en"), (await
|
|
447
|
+
}, getFormattedFiatValue: async ({ satoshi: s, currency: r, locale: i }) => (i || (i = "en"), (await X({ satoshi: s, currency: r })).toLocaleString(i, { style: "currency", currency: r })) };
|
|
448
448
|
function wr({ displaySymbol: s, price: r, formattedPrice: i }) {
|
|
449
449
|
const [c, f] = J.useState("loading...");
|
|
450
450
|
return J.useEffect(() => {
|
|
@@ -0,0 +1,281 @@
|
|
|
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-dC9oWaTb.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
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
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-dC9oWaTb.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
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
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-dC9oWaTb.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
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
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-dC9oWaTb.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
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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-dC9oWaTb.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
|
+
};
|