@calcom/atoms 1.1.0-booker → 1.1.1-debug-dont-use
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-6TIOefqU.js → AddressInput-CVMPei2D.js} +3 -3
- package/dist/{AlbyPriceComponent-zZlkVZTy.js → AlbyPriceComponent-E6ULoDL6.js} +29 -29
- package/dist/AppCard-cTGNOAHy.js +281 -0
- package/dist/AppListCardPlatformWrapper-NSThSuXk.js +9 -0
- package/dist/AppListCardWebWrapper-XwKnQn63.js +74 -0
- package/dist/AppSettingsInterface-YBMLeXt4.js +23 -0
- package/dist/AppSettingsInterface-ZH3XhiYG.js +75 -0
- package/dist/AppSettingsInterface-x5iDZUBe.js +29 -0
- package/dist/DateRangePicker-f_B5u4e9.js +2405 -0
- package/dist/EventTypeAppCardInterface--fNkLgYH.js +858 -0
- package/dist/EventTypeAppCardInterface-0cii-lHS.js +34 -0
- package/dist/EventTypeAppCardInterface-0gSJQJit.js +32 -0
- package/dist/EventTypeAppCardInterface-2TR5xhf8.js +33 -0
- package/dist/EventTypeAppCardInterface-9C3Wfgpy.js +24 -0
- package/dist/EventTypeAppCardInterface-C6ns7UmL.js +51 -0
- package/dist/EventTypeAppCardInterface-F5At064k.js +41 -0
- package/dist/EventTypeAppCardInterface-JCEQYUtS.js +31 -0
- package/dist/EventTypeAppCardInterface-L_OQx-GG.js +34 -0
- package/dist/EventTypeAppCardInterface-NMuTJqnR.js +32 -0
- package/dist/EventTypeAppCardInterface-Q8BoN8IR.js +24 -0
- package/dist/EventTypeAppCardInterface-TSa1z_cz.js +24 -0
- package/dist/EventTypeAppCardInterface-V2CVt-gp.js +39 -0
- package/dist/EventTypeAppCardInterface-VdYfOsab.js +51 -0
- package/dist/EventTypeAppCardInterface-VxD1hz61.js +34 -0
- package/dist/EventTypeAppCardInterface-Zei_gfk9.js +42 -0
- package/dist/EventTypeAppCardInterface-_2yZa06r.js +34 -0
- package/dist/EventTypeAppCardInterface-_mJKoptx.js +41 -0
- package/dist/EventTypeAppCardInterface-cZjp0yNN.js +34 -0
- package/dist/EventTypeAppCardInterface-ix9-eOy7.js +34 -0
- package/dist/EventTypeAppCardInterface-omHgFR_2.js +24 -0
- package/dist/EventTypeAppCardInterface-pS7YojCs.js +34 -0
- package/dist/EventTypeAppCardInterface-qaVZIE5N.js +49 -0
- package/dist/EventTypeAppCardInterface-ugSSelEX.js +42 -0
- package/dist/EventTypeAppCardInterface-wPiG1Uab.js +24 -0
- package/dist/EventTypeAppCardInterface-x8x6_qO2.js +86 -0
- package/dist/EventTypeAppSettingsInterface-A-zPsqPN.js +298 -0
- package/dist/EventTypeAppSettingsInterface-Mw0nUm2I.js +48 -0
- package/dist/EventTypeAppSettingsInterface-N-387tFo.js +120 -0
- package/dist/EventTypeAppSettingsInterface-SrOLSflD.js +43 -0
- package/dist/EventTypeAppSettingsInterface-TxRlEgaM.js +78 -0
- package/dist/EventTypeAppSettingsInterface-USUuP18O.js +24 -0
- package/dist/EventTypeAppSettingsInterface-_jGTLesb.js +72 -0
- package/dist/EventTypeAppSettingsInterface-aGQavYPZ.js +42 -0
- package/dist/EventTypeAppSettingsInterface-mf5L8PKf.js +25 -0
- package/dist/EventTypeAppSettingsInterface-uJw6TEuG.js +221 -0
- package/dist/EventTypeAppSettingsInterface-wRyNHA8Z.js +23 -0
- package/dist/EventTypeAppSettingsInterface-xfI4WyE9.js +23 -0
- package/dist/InstallAppButton-3pRRFAeS.js +14 -0
- package/dist/InstallAppButton-JXhBVaYJ.js +29 -0
- package/dist/InstallAppButton-sMIEaIrB.js +58 -0
- package/dist/InstallAppButton-xME8ESsW.js +14 -0
- package/dist/{PhoneInput-_EJl7Rqu.js → PhoneInput-_96ULuJw.js} +1 -1
- package/dist/StripePaymentForm-1ANfOJyB.js +493 -0
- package/dist/cal-atoms.js +36 -5
- package/dist/currencyOptions-kannG2hu.js +61 -0
- package/dist/index-VZRHTsae.js +28 -0
- package/dist/index-ZQlxzdt5.js +157233 -0
- package/dist/index-me6CfU0W.js +518 -0
- package/dist/{index-_P-UqUYu.js → index-qcnOr3S-.js} +1 -1
- package/dist/packages/features/bookings/Booker/components/hooks/useCalendars.d.ts +4 -0
- package/dist/packages/features/bookings/Booker/components/hooks/useCalendars.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/store.d.ts +3 -1
- package/dist/packages/features/bookings/Booker/store.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/types.d.ts +1 -0
- package/dist/packages/features/bookings/Booker/types.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/book-event-form/booking-to-mutation-input-mapper.d.ts +2 -1
- package/dist/packages/features/bookings/lib/book-event-form/booking-to-mutation-input-mapper.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getBookingDataSchema.d.ts +3 -0
- package/dist/packages/features/bookings/lib/getBookingDataSchema.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getBookingDataSchemaForApi.d.ts +5 -0
- package/dist/packages/features/bookings/lib/getBookingDataSchemaForApi.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getBookingInfo.d.ts +2 -0
- package/dist/packages/features/bookings/lib/getBookingInfo.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getUserBooking.d.ts +1 -0
- package/dist/packages/features/bookings/lib/getUserBooking.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/getBookingData.d.ts +4 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/getBookingData.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
- package/dist/packages/features/data-table/lib/__tests__/server.test.d.ts +2 -0
- package/dist/packages/features/data-table/lib/__tests__/server.test.d.ts.map +1 -0
- package/dist/packages/features/data-table/lib/server.d.ts +8 -0
- package/dist/packages/features/data-table/lib/server.d.ts.map +1 -1
- package/dist/packages/features/ee/round-robin/assignmentReason/AssignmentReasonRecorder.d.ts +3 -1
- package/dist/packages/features/ee/round-robin/assignmentReason/AssignmentReasonRecorder.d.ts.map +1 -1
- package/dist/packages/features/ee/round-robin/assignmentReason/appAssignmentReasonHandler.d.ts +2 -1
- package/dist/packages/features/ee/round-robin/assignmentReason/appAssignmentReasonHandler.d.ts.map +1 -1
- package/dist/packages/features/ee/round-robin/roundRobinReassignment.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/api/scheduleSMSReminders.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/api/scheduleWhatsappReminders.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/getWorkflowReminders.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/Locations.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/tabs/advanced/RequiresConfirmationController.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +985 -1
- package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts +166 -0
- package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts.map +1 -0
- package/dist/packages/features/eventtypes/lib/types.d.ts +1 -0
- package/dist/packages/features/eventtypes/lib/types.d.ts.map +1 -1
- package/dist/packages/features/schedules/components/Schedule.d.ts.map +1 -1
- package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
- package/dist/packages/platform/atoms/cal-provider/BaseCalProvider.d.ts.map +1 -1
- package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts +1 -0
- package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts.map +1 -1
- package/dist/packages/platform/atoms/event-types/hooks/useAtomUpdateEventType.d.ts +1 -0
- package/dist/packages/platform/atoms/event-types/hooks/useAtomUpdateEventType.d.ts.map +1 -1
- package/dist/packages/platform/atoms/event-types/hooks/useEventTypeForm.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts +1 -0
- package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
- package/dist/packages/platform/atoms/index.d.ts +34 -0
- package/dist/packages/platform/atoms/index.d.ts.map +1 -1
- package/dist/packages/platform/libraries/repositories.d.ts +1 -1
- package/dist/packages/platform/libraries/repositories.d.ts.map +1 -1
- package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.d.ts.map +1 -1
- package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.d.ts +6 -0
- package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.d.ts.map +1 -1
- package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots.input.d.ts +0 -4
- package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots.input.d.ts.map +1 -1
- package/dist/packages/prisma/zod/calendarcache.d.ts +3 -0
- package/dist/packages/prisma/zod/calendarcache.d.ts.map +1 -1
- package/dist/packages/prisma/zod/calvideosettings.d.ts +3 -0
- package/dist/packages/prisma/zod/calvideosettings.d.ts.map +1 -1
- package/dist/packages/prisma/zod/custom/booking.d.ts +9 -0
- package/dist/packages/prisma/zod/custom/booking.d.ts.map +1 -1
- package/dist/packages/prisma-client/index.d.ts +65 -0
- package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts +1 -1
- package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts.map +1 -1
- package/dist/packages/trpc/server/routers/viewer/slots/util.test.d.ts +2 -0
- package/dist/packages/trpc/server/routers/viewer/slots/util.test.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/useIsAppEnabled-V8Jl9FX-.js +18 -0
- package/package.json +1 -1
- package/dist/index-4kA2xtz7.js +0 -1957
- package/dist/index-ESVL5ZDq.js +0 -82852
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { s as d, W as i } from "./index-ZQlxzdt5.js";
|
|
3
|
+
import { A as m } from "./AppCard-cTGNOAHy.js";
|
|
4
|
+
import { u } from "./useIsAppEnabled-V8Jl9FX-.js";
|
|
5
|
+
const l = function({ app: t, eventType: e }) {
|
|
6
|
+
var a;
|
|
7
|
+
const p = d.usePathname(), { enabled: n, updateEnabled: r } = u(t);
|
|
8
|
+
return /* @__PURE__ */ s(
|
|
9
|
+
m,
|
|
10
|
+
{
|
|
11
|
+
returnTo: `${i}${p}?tabName=apps`,
|
|
12
|
+
app: t,
|
|
13
|
+
teamId: ((a = e.team) == null ? void 0 : a.id) || void 0,
|
|
14
|
+
switchOnClick: (o) => {
|
|
15
|
+
r(o);
|
|
16
|
+
},
|
|
17
|
+
switchChecked: n,
|
|
18
|
+
hideAppCardOptions: !0
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
l as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { t as l, f as m } from "./index-ZQlxzdt5.js";
|
|
3
|
+
import { A as u } from "./AppCard-cTGNOAHy.js";
|
|
4
|
+
import { u as I } from "./useIsAppEnabled-V8Jl9FX-.js";
|
|
5
|
+
const D = function({ app: t, eventType: n }) {
|
|
6
|
+
var a;
|
|
7
|
+
const { getAppData: o, setAppData: r, disabled: d } = l(), s = o("SITE_ID"), { enabled: i, updateEnabled: c } = I(t);
|
|
8
|
+
return /* @__PURE__ */ p(
|
|
9
|
+
u,
|
|
10
|
+
{
|
|
11
|
+
app: t,
|
|
12
|
+
switchOnClick: (e) => {
|
|
13
|
+
c(e);
|
|
14
|
+
},
|
|
15
|
+
switchChecked: i,
|
|
16
|
+
teamId: ((a = n.team) == null ? void 0 : a.id) || void 0,
|
|
17
|
+
children: /* @__PURE__ */ p(
|
|
18
|
+
m,
|
|
19
|
+
{
|
|
20
|
+
disabled: d,
|
|
21
|
+
name: "Site ID",
|
|
22
|
+
value: s,
|
|
23
|
+
placeholder: "Enter your Site ID",
|
|
24
|
+
onChange: (e) => {
|
|
25
|
+
r("SITE_ID", e.target.value);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
D as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { t as h, f as n } from "./index-ZQlxzdt5.js";
|
|
3
|
+
import { A as I } from "./AppCard-cTGNOAHy.js";
|
|
4
|
+
import { u as C } from "./useIsAppEnabled-V8Jl9FX-.js";
|
|
5
|
+
const R = function({ app: s, eventType: o }) {
|
|
6
|
+
var i;
|
|
7
|
+
const { getAppData: p, setAppData: r, disabled: t } = h(), c = p("SITE_ID"), d = p("SCRIPT_URL"), { enabled: l, updateEnabled: u } = C(s);
|
|
8
|
+
return /* @__PURE__ */ a(
|
|
9
|
+
I,
|
|
10
|
+
{
|
|
11
|
+
app: s,
|
|
12
|
+
switchOnClick: (e) => {
|
|
13
|
+
u(e);
|
|
14
|
+
},
|
|
15
|
+
switchChecked: l,
|
|
16
|
+
teamId: ((i = o.team) == null ? void 0 : i.id) || void 0,
|
|
17
|
+
children: /* @__PURE__ */ m("fieldset", { className: "space-y-2", disabled: t, children: [
|
|
18
|
+
/* @__PURE__ */ a(
|
|
19
|
+
n,
|
|
20
|
+
{
|
|
21
|
+
disabled: t,
|
|
22
|
+
name: "Script URL",
|
|
23
|
+
value: d,
|
|
24
|
+
defaultValue: "https://us.umami.is/script.js",
|
|
25
|
+
placeholder: "Enter the script source URL",
|
|
26
|
+
onChange: (e) => {
|
|
27
|
+
r("SCRIPT_URL", e.target.value);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ a(
|
|
32
|
+
n,
|
|
33
|
+
{
|
|
34
|
+
disabled: t,
|
|
35
|
+
name: "Site ID",
|
|
36
|
+
value: c,
|
|
37
|
+
placeholder: "Enter your Site ID",
|
|
38
|
+
onChange: (e) => {
|
|
39
|
+
r("SITE_ID", e.target.value);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
R as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as e, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { s as i, q as g, t as f, v as b, W as v } from "./index-ZQlxzdt5.js";
|
|
3
|
+
import { useMemo as S, useState as C } from "react";
|
|
4
|
+
import { A as w } from "./AppCard-cTGNOAHy.js";
|
|
5
|
+
import E from "./EventTypeAppSettingsInterface-_jGTLesb.js";
|
|
6
|
+
const W = function({
|
|
7
|
+
app: a,
|
|
8
|
+
eventType: p,
|
|
9
|
+
eventTypeFormMetadata: c
|
|
10
|
+
}) {
|
|
11
|
+
const t = i.useSearchParams(), { t: m } = g(), s = i.usePathname(), h = S(
|
|
12
|
+
() => `${s}${t ? `?${t.toString()}` : ""}`,
|
|
13
|
+
[s, t]
|
|
14
|
+
), { getAppData: n, setAppData: d, disabled: l } = f(), [o, u] = C(n("enabled")), A = b(c), r = !o && A;
|
|
15
|
+
return /* @__PURE__ */ e(
|
|
16
|
+
w,
|
|
17
|
+
{
|
|
18
|
+
returnTo: v + h,
|
|
19
|
+
app: a,
|
|
20
|
+
switchChecked: o,
|
|
21
|
+
switchOnClick: (y) => {
|
|
22
|
+
u(y);
|
|
23
|
+
},
|
|
24
|
+
description: /* @__PURE__ */ e(P, { children: "Add bitcoin lightning payments to your events" }),
|
|
25
|
+
disableSwitch: r,
|
|
26
|
+
switchTooltip: r ? m("other_payment_app_enabled") : void 0,
|
|
27
|
+
children: /* @__PURE__ */ e(
|
|
28
|
+
E,
|
|
29
|
+
{
|
|
30
|
+
eventType: p,
|
|
31
|
+
slug: a.slug,
|
|
32
|
+
disabled: l,
|
|
33
|
+
getAppData: n,
|
|
34
|
+
setAppData: d
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
W as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { s as d, W as i } from "./index-ZQlxzdt5.js";
|
|
3
|
+
import { A as m } from "./AppCard-cTGNOAHy.js";
|
|
4
|
+
import { u } from "./useIsAppEnabled-V8Jl9FX-.js";
|
|
5
|
+
const l = function({ app: t, eventType: e }) {
|
|
6
|
+
var a;
|
|
7
|
+
const p = d.usePathname(), { enabled: n, updateEnabled: r } = u(t);
|
|
8
|
+
return /* @__PURE__ */ s(
|
|
9
|
+
m,
|
|
10
|
+
{
|
|
11
|
+
returnTo: `${i}${p}?tabName=apps`,
|
|
12
|
+
app: t,
|
|
13
|
+
teamId: ((a = e.team) == null ? void 0 : a.id) || void 0,
|
|
14
|
+
switchOnClick: (o) => {
|
|
15
|
+
r(o);
|
|
16
|
+
},
|
|
17
|
+
switchChecked: n,
|
|
18
|
+
hideAppCardOptions: !0
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
l as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as t, Fragment as o, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { s as v, q as F, t as T, w as a, W as _, x as L, f as V, S as x } from "./index-ZQlxzdt5.js";
|
|
3
|
+
import { useMemo as W, useState as p } from "react";
|
|
4
|
+
import { A as $ } from "./AppCard-cTGNOAHy.js";
|
|
5
|
+
import { c as g, i as j, a as C } from "./currencyOptions-kannG2hu.js";
|
|
6
|
+
const H = function({ app: S, eventType: A }) {
|
|
7
|
+
var f, h;
|
|
8
|
+
const i = v.useSearchParams(), d = v.usePathname(), P = W(
|
|
9
|
+
() => `${d}${i ? `?${i.toString()}` : ""}`,
|
|
10
|
+
[d, i]
|
|
11
|
+
), { t: n } = F(), { getAppData: r, setAppData: c } = T(), y = r("price"), l = r("currency"), k = r("paymentOption"), N = r("enabled"), [s, O] = p(g.find((e) => e.value === l)), [w, E] = p(
|
|
12
|
+
j(l) ? C[l] : ""
|
|
13
|
+
), [b, q] = p(N), m = ((f = a) == null ? void 0 : f.find((e) => k === e.value)) || {
|
|
14
|
+
label: a[0].label,
|
|
15
|
+
value: a[0].value
|
|
16
|
+
}, D = ((h = A.recurringEvent) == null ? void 0 : h.count) !== void 0;
|
|
17
|
+
return /* @__PURE__ */ t(
|
|
18
|
+
$,
|
|
19
|
+
{
|
|
20
|
+
returnTo: _ + P,
|
|
21
|
+
app: S,
|
|
22
|
+
switchChecked: b,
|
|
23
|
+
switchOnClick: (e) => {
|
|
24
|
+
q(e);
|
|
25
|
+
},
|
|
26
|
+
description: /* @__PURE__ */ t(o, { children: "Add a mock payment to your events" }),
|
|
27
|
+
children: /* @__PURE__ */ t(o, { children: D ? /* @__PURE__ */ t(L, { className: "mt-2", severity: "warning", title: n("warning_recurring_event_payment") }) : b && /* @__PURE__ */ u(o, { children: [
|
|
28
|
+
/* @__PURE__ */ t("div", { className: "mt-2 block items-center sm:flex", children: /* @__PURE__ */ t(
|
|
29
|
+
V,
|
|
30
|
+
{
|
|
31
|
+
id: "test-mock-payment-app-price",
|
|
32
|
+
label: "Price",
|
|
33
|
+
labelSrOnly: !0,
|
|
34
|
+
addOnLeading: w,
|
|
35
|
+
addOnSuffix: l,
|
|
36
|
+
step: "0.01",
|
|
37
|
+
min: "0.5",
|
|
38
|
+
type: "number",
|
|
39
|
+
required: !0,
|
|
40
|
+
className: "block w-full rounded-sm pl-2 text-sm",
|
|
41
|
+
placeholder: "Price",
|
|
42
|
+
onChange: (e) => {
|
|
43
|
+
c("price", Number(e.target.value) * 100), s && c("currency", s.value);
|
|
44
|
+
},
|
|
45
|
+
value: y > 0 ? y / 100 : void 0
|
|
46
|
+
}
|
|
47
|
+
) }),
|
|
48
|
+
/* @__PURE__ */ u("div", { className: "mt-5 w-60", children: [
|
|
49
|
+
/* @__PURE__ */ t("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: n("currency") }),
|
|
50
|
+
/* @__PURE__ */ t(
|
|
51
|
+
x,
|
|
52
|
+
{
|
|
53
|
+
id: "test-mock-payment-app-currency-id",
|
|
54
|
+
variant: "default",
|
|
55
|
+
options: g,
|
|
56
|
+
value: s,
|
|
57
|
+
className: "text-black",
|
|
58
|
+
defaultValue: s,
|
|
59
|
+
onChange: (e) => {
|
|
60
|
+
e && (O(e), E(C[e.value]), c("currency", e.value));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ u("div", { className: "mt-4 w-60", children: [
|
|
66
|
+
/* @__PURE__ */ t("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: "Payment option" }),
|
|
67
|
+
/* @__PURE__ */ t(
|
|
68
|
+
x,
|
|
69
|
+
{
|
|
70
|
+
defaultValue: m ? { ...m, label: n(m.label) } : { ...a[0], label: n(a[0].label) },
|
|
71
|
+
options: a.map((e) => ({ ...e, label: n(e.label) || e.label })),
|
|
72
|
+
onChange: (e) => {
|
|
73
|
+
e && c("paymentOption", e.value);
|
|
74
|
+
},
|
|
75
|
+
className: "mb-1 h-[38px] w-full",
|
|
76
|
+
isDisabled: !1
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
] }) })
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
H as default
|
|
86
|
+
};
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { jsxs as u, Fragment as f, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { a1 as d, q as L, a2 as i, x as P, f as w, G as T, J as O, S as y, a3 as E, a4 as x, M as B, a5 as F, a6 as G } from "./index-ZQlxzdt5.js";
|
|
3
|
+
import { useState as K, useEffect as z } from "react";
|
|
4
|
+
const s = [
|
|
5
|
+
{ label: "United States dollar (USD)", value: "usd" },
|
|
6
|
+
{ label: "United Arab Emirates dirham (AED)", value: "aed" },
|
|
7
|
+
{ label: "Afghan afghani (AFN)", value: "afn" },
|
|
8
|
+
{ label: "Albanian lek (ALL)", value: "all" },
|
|
9
|
+
{ label: "Armenian dram (AMD)", value: "amd" },
|
|
10
|
+
{ label: "Netherlands Antillean guilder (ANG)", value: "ang" },
|
|
11
|
+
{ label: "Angolan kwanza (AOA)", value: "aoa" },
|
|
12
|
+
{ label: "Argentine peso (ARS)", value: "ars" },
|
|
13
|
+
{ label: "Australian dollar (AUD)", value: "aud" },
|
|
14
|
+
{ label: "Aruban florin (AWG)", value: "awg" },
|
|
15
|
+
{ label: "Azerbaijani manat (AZN)", value: "azn" },
|
|
16
|
+
{ label: "Bosnia and Herzegovina convertible mark (BAM)", value: "bam" },
|
|
17
|
+
{ label: "Barbadian dollar (BBD)", value: "bbd" },
|
|
18
|
+
{ label: "Bangladeshi taka (BDT)", value: "bdt" },
|
|
19
|
+
{ label: "Bulgarian lev (BGN)", value: "bgn" },
|
|
20
|
+
{ label: "Burundian franc (BIF)", value: "bif" },
|
|
21
|
+
{ label: "Bermudian dollar (BMD)", value: "bmd" },
|
|
22
|
+
{ label: "Brunei dollar (BND)", value: "bnd" },
|
|
23
|
+
{ label: "Bolivian boliviano (BOB)", value: "bob" },
|
|
24
|
+
{ label: "Brazilian real (BRL)", value: "brl" },
|
|
25
|
+
{ label: "Bahamian dollar (BSD)", value: "bsd" },
|
|
26
|
+
{ label: "Botswana pula (BWP)", value: "bwp" },
|
|
27
|
+
{ label: "Belarusian ruble (BYN)", value: "byn" },
|
|
28
|
+
{ label: "Belize dollar (BZD)", value: "bzd" },
|
|
29
|
+
{ label: "Canadian dollar (CAD)", value: "cad" },
|
|
30
|
+
{ label: "Congolese franc (CDF)", value: "cdf" },
|
|
31
|
+
{ label: "Swiss franc (CHF)", value: "chf" },
|
|
32
|
+
{ label: "Chilean peso (CLP)", value: "clp" },
|
|
33
|
+
{ label: "Chinese yuan (CNY)", value: "cny" },
|
|
34
|
+
{ label: "Colombian peso (COP)", value: "cop" },
|
|
35
|
+
{ label: "Costa Rican colón (CRC)", value: "crc" },
|
|
36
|
+
{ label: "Cape Verdean escudo (CVE)", value: "cve" },
|
|
37
|
+
{ label: "Czech koruna (CZK)", value: "czk" },
|
|
38
|
+
{ label: "Djiboutian franc (DJF)", value: "djf" },
|
|
39
|
+
{ label: "Danish krone (DKK)", value: "dkk" },
|
|
40
|
+
{ label: "Dominican peso (DOP)", value: "dop" },
|
|
41
|
+
{ label: "Algerian dinar (DZD)", value: "dzd" },
|
|
42
|
+
{ label: "Egyptian pound (EGP)", value: "egp" },
|
|
43
|
+
{ label: "Ethiopian birr (ETB)", value: "etb" },
|
|
44
|
+
{ label: "Euro (EUR)", value: "eur" },
|
|
45
|
+
{ label: "Fijian dollar (FJD)", value: "fjd" },
|
|
46
|
+
{ label: "Falkland Islands pound (FKP)", value: "fkp" },
|
|
47
|
+
{ label: "British pound sterling (GBP)", value: "gbp" },
|
|
48
|
+
{ label: "Georgian lari (GEL)", value: "gel" },
|
|
49
|
+
{ label: "Gibraltar pound (GIP)", value: "gip" },
|
|
50
|
+
{ label: "Gambian dalasi (GMD)", value: "gmd" },
|
|
51
|
+
{ label: "Guinean franc (GNF)", value: "gnf" },
|
|
52
|
+
{ label: "Guatemalan quetzal (GTQ)", value: "gtq" },
|
|
53
|
+
{ label: "Guyanese dollar (GYD)", value: "gyd" },
|
|
54
|
+
{ label: "Hong Kong dollar (HKD)", value: "hkd" },
|
|
55
|
+
{ label: "Honduran lempira (HNL)", value: "hnl" },
|
|
56
|
+
{ label: "Haitian gourde (HTG)", value: "htg" },
|
|
57
|
+
{ label: "Hungarian forint (HUF)", value: "huf" },
|
|
58
|
+
{ label: "Indonesian rupiah (IDR)", value: "idr" },
|
|
59
|
+
{ label: "Israeli new shekel (ILS)", value: "ils" },
|
|
60
|
+
{ label: "Indian rupee (INR)", value: "inr" },
|
|
61
|
+
{ label: "Icelandic króna (ISK)", value: "isk" },
|
|
62
|
+
{ label: "Jamaican dollar (JMD)", value: "jmd" },
|
|
63
|
+
{ label: "Japanese yen (JPY)", value: "jpy" },
|
|
64
|
+
{ label: "Kenyan shilling (KES)", value: "kes" },
|
|
65
|
+
{ label: "Kyrgyzstani som (KGS)", value: "kgs" },
|
|
66
|
+
{ label: "Cambodian riel (KHR)", value: "khr" },
|
|
67
|
+
{ label: "Comorian franc (KMF)", value: "kmf" },
|
|
68
|
+
{ label: "South Korean won (KRW)", value: "krw" },
|
|
69
|
+
{ label: "Cayman Islands dollar (KYD)", value: "kyd" },
|
|
70
|
+
{ label: "Kazakhstani tenge (KZT)", value: "kzt" },
|
|
71
|
+
{ label: "Laotian kip (LAK)", value: "lak" },
|
|
72
|
+
{ label: "Lebanese pound (LBP)", value: "lbp" },
|
|
73
|
+
{ label: "Sri Lankan rupee (LKR)", value: "lkr" },
|
|
74
|
+
{ label: "Liberian dollar (LRD)", value: "lrd" },
|
|
75
|
+
{ label: "Lesotho loti (LSL)", value: "lsl" },
|
|
76
|
+
{ label: "Moroccan dirham (MAD)", value: "mad" },
|
|
77
|
+
{ label: "Moldovan leu (MDL)", value: "mdl" },
|
|
78
|
+
{ label: "Malagasy ariary (MGA)", value: "mga" },
|
|
79
|
+
{ label: "Macedonian denar (MKD)", value: "mkd" },
|
|
80
|
+
{ label: "Myanmar kyat (MMK)", value: "mmk" },
|
|
81
|
+
{ label: "Mongolian tögrög (MNT)", value: "mnt" },
|
|
82
|
+
{ label: "Macanese pataca (MOP)", value: "mop" },
|
|
83
|
+
{ label: "Mauritian rupee (MUR)", value: "mur" },
|
|
84
|
+
{ label: "Maldivian rufiyaa (MVR)", value: "mvr" },
|
|
85
|
+
{ label: "Malawian kwacha (MWK)", value: "mwk" },
|
|
86
|
+
{ label: "Mexican peso (MXN)", value: "mxn" },
|
|
87
|
+
{ label: "Malaysian ringgit (MYR)", value: "myr" },
|
|
88
|
+
{ label: "Mozambican metical (MZN)", value: "mzn" },
|
|
89
|
+
{ label: "Namibian dollar (NAD)", value: "nad" },
|
|
90
|
+
{ label: "Nigerian naira (NGN)", value: "ngn" },
|
|
91
|
+
{ label: "Nicaraguan córdoba (NIO)", value: "nio" },
|
|
92
|
+
{ label: "Norwegian krone (NOK)", value: "nok" },
|
|
93
|
+
{ label: "Nepalese rupee (NPR)", value: "npr" },
|
|
94
|
+
{ label: "New Zealand dollar (NZD)", value: "nzd" },
|
|
95
|
+
{ label: "Panamanian balboa (PAB)", value: "pab" },
|
|
96
|
+
{ label: "Peruvian sol (PEN)", value: "pen" },
|
|
97
|
+
{ label: "Papua New Guinean kina (PGK)", value: "pgk" },
|
|
98
|
+
{ label: "Philippine peso (PHP)", value: "php" },
|
|
99
|
+
{ label: "Pakistani rupee (PKR)", value: "pkr" },
|
|
100
|
+
{ label: "Polish złoty (PLN)", value: "pln" },
|
|
101
|
+
{ label: "Paraguayan guaraní (PYG)", value: "pyg" },
|
|
102
|
+
{ label: "Qatari riyal (QAR)", value: "qar" },
|
|
103
|
+
{ label: "Romanian leu (RON)", value: "ron" },
|
|
104
|
+
{ label: "Serbian dinar (RSD)", value: "rsd" },
|
|
105
|
+
{ label: "Russian ruble (RUB)", value: "rub" },
|
|
106
|
+
{ label: "Rwandan franc (RWF)", value: "rwf" },
|
|
107
|
+
{ label: "Saudi riyal (SAR)", value: "sar" },
|
|
108
|
+
{ label: "Solomon Islands dollar (SBD)", value: "sbd" },
|
|
109
|
+
{ label: "Seychellois rupee (SCR)", value: "scr" },
|
|
110
|
+
{ label: "Swedish krona (SEK)", value: "sek" },
|
|
111
|
+
{ label: "Singapore dollar (SGD)", value: "sgd" },
|
|
112
|
+
{ label: "Saint Helena pound (SHP)", value: "shp" },
|
|
113
|
+
{ label: "Sierra Leonean leone (SLE)", value: "sle" },
|
|
114
|
+
{ label: "Somali shilling (SOS)", value: "sos" },
|
|
115
|
+
{ label: "Surinamese dollar (SRD)", value: "srd" },
|
|
116
|
+
{ label: "São Tomé and Príncipe dobra (STD)", value: "std" },
|
|
117
|
+
{ label: "Swazi lilangeni (SZL)", value: "szl" },
|
|
118
|
+
{ label: "Thai baht (THB)", value: "thb" },
|
|
119
|
+
{ label: "Tajikistani somoni (TJS)", value: "tjs" },
|
|
120
|
+
{ label: "Tongan paʻanga (TOP)", value: "top" },
|
|
121
|
+
{ label: "Turkish lira (TRY)", value: "try" },
|
|
122
|
+
{ label: "Trinidad and Tobago dollar (TTD)", value: "ttd" },
|
|
123
|
+
{ label: "New Taiwan dollar (TWD)", value: "twd" },
|
|
124
|
+
{ label: "Tanzanian shilling (TZS)", value: "tzs" },
|
|
125
|
+
{ label: "Ukrainian hryvnia (UAH)", value: "uah" },
|
|
126
|
+
{ label: "Ugandan shilling (UGX)", value: "ugx" },
|
|
127
|
+
{ label: "Uruguayan peso (UYU)", value: "uyu" },
|
|
128
|
+
{ label: "Uzbekistan som (UZS)", value: "uzs" },
|
|
129
|
+
{ label: "Vietnamese đồng (VND)", value: "vnd" },
|
|
130
|
+
{ label: "Vanuatu vatu (VUV)", value: "vuv" },
|
|
131
|
+
{ label: "Samoan tala (WST)", value: "wst" },
|
|
132
|
+
{ label: "Central African CFA franc (XAF)", value: "xaf" },
|
|
133
|
+
{ label: "East Caribbean dollar (XCD)", value: "xcd" },
|
|
134
|
+
{ label: "West African CFA franc (XOF)", value: "xof" },
|
|
135
|
+
{ label: "CFP franc (XPF)", value: "xpf" },
|
|
136
|
+
{ label: "Yemeni rial (YER)", value: "yer" },
|
|
137
|
+
{ label: "South African rand (ZAR)", value: "zar" },
|
|
138
|
+
{ label: "Zambian kwacha (ZMW)", value: "zmw" }
|
|
139
|
+
], V = ({
|
|
140
|
+
getAppData: r,
|
|
141
|
+
setAppData: e,
|
|
142
|
+
disabled: b,
|
|
143
|
+
eventType: h
|
|
144
|
+
}) => {
|
|
145
|
+
var k;
|
|
146
|
+
const g = r("price"), o = r("currency") || s[0].value, [t, D] = K(
|
|
147
|
+
s.find((a) => a.value === o) || {
|
|
148
|
+
label: s[0].label,
|
|
149
|
+
value: s[0].value
|
|
150
|
+
}
|
|
151
|
+
), v = r("paymentOption"), c = d.find((a) => v === a.value), m = r("enabled"), p = () => C.find((a) => a.value === (r("refundCountCalendarDays") === !0 ? 1 : 0)), { t: n } = L(), N = ((k = h.recurringEvent) == null ? void 0 : k.count) !== void 0, S = !!h.seatsPerTimeSlot, M = (a, R) => 0 .toLocaleString(a, {
|
|
152
|
+
style: "currency",
|
|
153
|
+
currency: R,
|
|
154
|
+
minimumFractionDigits: 0,
|
|
155
|
+
maximumFractionDigits: 0
|
|
156
|
+
}).replace(/\d/g, "").trim();
|
|
157
|
+
z(() => {
|
|
158
|
+
m && (r("currency") || e("currency", s[0].value), r("paymentOption") || e("paymentOption", d[0].value)), r("refundPolicy") || e("refundPolicy", i.NEVER);
|
|
159
|
+
}, [m, r, e]);
|
|
160
|
+
const C = [
|
|
161
|
+
{ value: 0, label: n("business_days") },
|
|
162
|
+
{ value: 1, label: n("calendar_days") }
|
|
163
|
+
];
|
|
164
|
+
return /* @__PURE__ */ u(f, { children: [
|
|
165
|
+
N && /* @__PURE__ */ l(P, { className: "mt-2", severity: "warning", title: n("warning_recurring_event_payment") }),
|
|
166
|
+
!N && m && /* @__PURE__ */ u(f, { children: [
|
|
167
|
+
/* @__PURE__ */ l("div", { className: "mt-4 block items-center justify-start sm:flex sm:space-x-2", children: /* @__PURE__ */ l(
|
|
168
|
+
w,
|
|
169
|
+
{
|
|
170
|
+
"data-testid": "stripe-price-input",
|
|
171
|
+
label: n("price"),
|
|
172
|
+
className: "h-[38px]",
|
|
173
|
+
addOnLeading: /* @__PURE__ */ l(f, { children: t.value ? M("en", t.value) : "" }),
|
|
174
|
+
addOnSuffix: o.toUpperCase(),
|
|
175
|
+
addOnClassname: "h-[38px]",
|
|
176
|
+
step: "0.01",
|
|
177
|
+
min: "0.5",
|
|
178
|
+
type: "number",
|
|
179
|
+
required: !0,
|
|
180
|
+
placeholder: "Price",
|
|
181
|
+
disabled: b,
|
|
182
|
+
onChange: (a) => {
|
|
183
|
+
e("price", T(Number(a.target.value), o));
|
|
184
|
+
},
|
|
185
|
+
value: g > 0 ? O(g, o) : void 0
|
|
186
|
+
}
|
|
187
|
+
) }),
|
|
188
|
+
/* @__PURE__ */ u("div", { className: "mt-5 w-60", children: [
|
|
189
|
+
/* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: n("currency") }),
|
|
190
|
+
/* @__PURE__ */ l(
|
|
191
|
+
y,
|
|
192
|
+
{
|
|
193
|
+
"data-testid": "stripe-currency-select",
|
|
194
|
+
variant: "default",
|
|
195
|
+
options: s,
|
|
196
|
+
innerClassNames: {
|
|
197
|
+
input: "stripe-currency-input"
|
|
198
|
+
},
|
|
199
|
+
value: t,
|
|
200
|
+
className: "text-black",
|
|
201
|
+
defaultValue: t,
|
|
202
|
+
onChange: (a) => {
|
|
203
|
+
a && (D(a), e("currency", a.value));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
] }),
|
|
208
|
+
/* @__PURE__ */ u("div", { className: "mt-4 w-60", children: [
|
|
209
|
+
/* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: n("payment_option") }),
|
|
210
|
+
/* @__PURE__ */ l(
|
|
211
|
+
y,
|
|
212
|
+
{
|
|
213
|
+
"data-testid": "stripe-payment-option-select",
|
|
214
|
+
defaultValue: c ? { ...c, label: n(c.label) } : { ...d[0], label: n(d[0].label) },
|
|
215
|
+
options: d.map((a) => ({ ...a, label: n(a.label) || a.label })),
|
|
216
|
+
onChange: (a) => {
|
|
217
|
+
a && (e("paymentOption", a.value), a.value === "HOLD" && (e("refundPolicy", i.NEVER), e("refundDaysCount", void 0), e("refundCountCalendarDays", void 0)));
|
|
218
|
+
},
|
|
219
|
+
className: "mb-1 h-[38px] w-full",
|
|
220
|
+
isDisabled: S || b
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
] }),
|
|
224
|
+
S && v === "HOLD" && /* @__PURE__ */ l(P, { className: "mt-2", severity: "warning", title: n("seats_and_no_show_fee_error") }),
|
|
225
|
+
v !== "HOLD" && /* @__PURE__ */ u("div", { className: "mt-4 w-full", children: [
|
|
226
|
+
/* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", children: n("refund_policy") }),
|
|
227
|
+
/* @__PURE__ */ u(
|
|
228
|
+
E,
|
|
229
|
+
{
|
|
230
|
+
disabled: b || v === "HOLD",
|
|
231
|
+
defaultValue: "never",
|
|
232
|
+
className: "flex flex-col space-y-2",
|
|
233
|
+
value: r("refundPolicy"),
|
|
234
|
+
onValueChange: (a) => {
|
|
235
|
+
e("refundPolicy", a), a !== i.DAYS && (e("refundDaysCount", void 0), e("refundCountCalendarDays", void 0));
|
|
236
|
+
},
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ l(x, { className: "w-fit", value: i.ALWAYS, label: n("always"), id: "always" }),
|
|
239
|
+
/* @__PURE__ */ l(x, { className: "w-fit", value: i.NEVER, label: n("never"), id: "never" }),
|
|
240
|
+
/* @__PURE__ */ u("div", { className: B("text-default mb-2 flex flex-wrap items-center text-sm"), children: [
|
|
241
|
+
/* @__PURE__ */ l(
|
|
242
|
+
F,
|
|
243
|
+
{
|
|
244
|
+
className: "min-w-4 bg-default border-default flex h-4 w-4 cursor-pointer items-center rounded-full border focus:border-2 focus:outline-none ltr:mr-2 rtl:ml-2",
|
|
245
|
+
value: "days",
|
|
246
|
+
id: "days",
|
|
247
|
+
children: /* @__PURE__ */ l(G, { className: "after:bg-inverted relative flex h-4 w-4 items-center justify-center after:block after:h-2 after:w-2 after:rounded-full" })
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
/* @__PURE__ */ u("div", { className: "flex items-center", children: [
|
|
251
|
+
/* @__PURE__ */ u("span", { className: "me-2 ms-2", children: [
|
|
252
|
+
" ",
|
|
253
|
+
n("if_cancelled")
|
|
254
|
+
] }),
|
|
255
|
+
/* @__PURE__ */ l(
|
|
256
|
+
w,
|
|
257
|
+
{
|
|
258
|
+
labelSrOnly: !0,
|
|
259
|
+
type: "number",
|
|
260
|
+
className: B(
|
|
261
|
+
"border-default my-0 block w-16 text-sm [appearance:textfield] ltr:mr-2 rtl:ml-2"
|
|
262
|
+
),
|
|
263
|
+
placeholder: "2",
|
|
264
|
+
disabled: b,
|
|
265
|
+
min: 0,
|
|
266
|
+
defaultValue: r("refundDaysCount"),
|
|
267
|
+
required: r("refundPolicy") === i.DAYS,
|
|
268
|
+
value: r("refundDaysCount") ?? "",
|
|
269
|
+
onChange: (a) => e("refundDaysCount", parseInt(a.currentTarget.value))
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ l(
|
|
273
|
+
y,
|
|
274
|
+
{
|
|
275
|
+
options: C,
|
|
276
|
+
isSearchable: !1,
|
|
277
|
+
isDisabled: b,
|
|
278
|
+
onChange: (a) => e("refundCountCalendarDays", (a == null ? void 0 : a.value) === 1),
|
|
279
|
+
value: p(),
|
|
280
|
+
defaultValue: p()
|
|
281
|
+
}
|
|
282
|
+
),
|
|
283
|
+
/* @__PURE__ */ u("span", { className: "me-2 ms-2", children: [
|
|
284
|
+
" ",
|
|
285
|
+
n("before")
|
|
286
|
+
] })
|
|
287
|
+
] })
|
|
288
|
+
] })
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
|
+
] })
|
|
293
|
+
] })
|
|
294
|
+
] });
|
|
295
|
+
};
|
|
296
|
+
export {
|
|
297
|
+
V as default
|
|
298
|
+
};
|
|
@@ -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 { y as p, S as h } from "./index-ZQlxzdt5.js";
|
|
4
|
+
const P = ({}) => {
|
|
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
|
+
P as default
|
|
48
|
+
};
|