@calcom/atoms 1.0.97-beta-1 → 1.0.97-beta-2
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-MxFRI9cW.js → AddressInput-Vp5Ny4rZ.js} +9 -8
- package/dist/{AlbyPriceComponent-B7reGN3c.js → AlbyPriceComponent-i0xkINen.js} +53 -52
- package/dist/AppCard-9m9p6YSL.js +162 -0
- package/dist/AppListCardPlatformWrapper-6V24t85e.js +9 -0
- package/dist/{AppListCardWebWrapper-3ZmWWW_L.js → AppListCardWebWrapper-iB6tYray.js} +10 -9
- package/dist/AppSettingsInterface-9Bv_J1St.js +23 -0
- package/dist/AppSettingsInterface-HdXxgvUo.js +29 -0
- package/dist/AppSettingsInterface-Z5mD4vz9.js +75 -0
- package/dist/{DateRangePicker-GTmIREkF.js → DateRangePicker-ZPLEXLdF.js} +784 -783
- package/dist/EventTypeAppCardInterface-3A0BLKpG.js +34 -0
- package/dist/EventTypeAppCardInterface-5wb9HPk4.js +86 -0
- package/dist/EventTypeAppCardInterface-9_6R5KQl.js +24 -0
- package/dist/EventTypeAppCardInterface-E9mqlk3L.js +39 -0
- package/dist/EventTypeAppCardInterface-Ez8jijO4.js +42 -0
- package/dist/EventTypeAppCardInterface-HpWHgRBK.js +34 -0
- package/dist/EventTypeAppCardInterface-IN5BDME5.js +49 -0
- package/dist/EventTypeAppCardInterface-J-UrzGuv.js +51 -0
- package/dist/EventTypeAppCardInterface-KTeZawOA.js +34 -0
- package/dist/EventTypeAppCardInterface-NPXzuwrD.js +34 -0
- package/dist/EventTypeAppCardInterface-RWqrIPbF.js +34 -0
- package/dist/EventTypeAppCardInterface-SveyRKGJ.js +33 -0
- package/dist/EventTypeAppCardInterface-W9_JNxow.js +41 -0
- package/dist/{EventTypeAppCardInterface-h1_dvQG9.js → EventTypeAppCardInterface-WQmKWesQ.js} +17 -16
- package/dist/EventTypeAppCardInterface-XsjP04H8.js +32 -0
- package/dist/EventTypeAppCardInterface-ZoFvLu0T.js +41 -0
- package/dist/EventTypeAppCardInterface-_pC5hr_u.js +24 -0
- package/dist/EventTypeAppCardInterface-bScBMMgD.js +34 -0
- package/dist/EventTypeAppCardInterface-c4h7EQ2a.js +31 -0
- package/dist/EventTypeAppCardInterface-eXFFG8at.js +24 -0
- package/dist/EventTypeAppCardInterface-ec7t7O8E.js +42 -0
- package/dist/EventTypeAppCardInterface-fXPOexR7.js +24 -0
- package/dist/EventTypeAppCardInterface-o81innc9.js +34 -0
- package/dist/EventTypeAppCardInterface-rULr-Mfj.js +32 -0
- package/dist/EventTypeAppCardInterface-uHpKaOQS.js +453 -0
- package/dist/EventTypeAppCardInterface-wxpzyeqk.js +24 -0
- package/dist/EventTypeAppSettingsInterface-10UpznIO.js +78 -0
- package/dist/EventTypeAppSettingsInterface-3F_4vyUK.js +72 -0
- package/dist/{EventTypeAppSettingsInterface-9raltJka.js → EventTypeAppSettingsInterface-659frs2F.js} +39 -38
- package/dist/{EventTypeAppSettingsInterface-eKcoM9Xa.js → EventTypeAppSettingsInterface-NnKlcbB9.js} +6 -5
- package/dist/EventTypeAppSettingsInterface-P6VrsG5d.js +221 -0
- package/dist/{EventTypeAppSettingsInterface-2wY9yPcf.js → EventTypeAppSettingsInterface-SsbpYCOY.js} +6 -5
- package/dist/{EventTypeAppSettingsInterface-cXn8l171.js → EventTypeAppSettingsInterface-TYPdYPPl.js} +7 -6
- package/dist/EventTypeAppSettingsInterface-XXAdH79U.js +42 -0
- package/dist/{EventTypeAppSettingsInterface-Fn4VS9pl.js → EventTypeAppSettingsInterface-ZKoyhNO9.js} +72 -71
- package/dist/EventTypeAppSettingsInterface-g9gv0z2h.js +48 -0
- package/dist/{EventTypeAppSettingsInterface-Hre_gkKY.js → EventTypeAppSettingsInterface-jq-VsbFe.js} +6 -5
- package/dist/EventTypeAppSettingsInterface-ubeZQTeO.js +43 -0
- package/dist/InstallAppButton-6P2Fv_oM.js +58 -0
- package/dist/{InstallAppButton-Ho1cJkMm.js → InstallAppButton-JXhBVaYJ.js} +8 -8
- package/dist/InstallAppButton-Ym2oci2C.js +14 -0
- package/dist/InstallAppButton-_dz8RUxd.js +14 -0
- package/dist/{PhoneInput-DNq9V1s5.js → PhoneInput-Af_8DURS.js} +97 -96
- package/dist/{StripePaymentForm-lGjXjqLX.js → StripePaymentForm-B4nw6Pkd.js} +100 -99
- package/dist/cal-atoms.js +6 -6
- package/dist/{framer-features--8Hvyv45.js → framer-features-sahHu1Ou.js} +11 -11
- package/dist/{index-fsA0kHyy.js → index-DcCG9gCb.js} +1 -1
- package/dist/{index-cfay3a2W.js → index-GYjzMn-V.js} +1 -1
- package/dist/{index-Bj_kD41n.js → index-Xu6D4ii2.js} +108 -107
- package/dist/{index-M6WUZF2M.js → index-jTqJooNt.js} +67433 -68186
- package/dist/{index-OYPUcfnB.js → index-xyYlazhP.js} +2 -2
- package/dist/{isSupportedCountry-aizVo7Oo.js → isSupportedCountry-UcFlf7mS.js} +1 -1
- package/dist/{useIsAppEnabled-OmKRsE8Z.js → useIsAppEnabled-1m8rIQ8P.js} +1 -1
- package/package.json +1 -1
- package/dist/AppCard-ImfOuDL_.js +0 -161
- package/dist/AppListCardPlatformWrapper-Kgk0fNGU.js +0 -8
- package/dist/AppSettingsInterface-4JMt22o1.js +0 -22
- package/dist/AppSettingsInterface-8TqZVnNL.js +0 -74
- package/dist/AppSettingsInterface-MQ_fkHJx.js +0 -28
- package/dist/EventTypeAppCardInterface-0O_KGHxp.js +0 -40
- package/dist/EventTypeAppCardInterface-0Z1NiGs_.js +0 -23
- package/dist/EventTypeAppCardInterface-0bkDiimc.js +0 -33
- package/dist/EventTypeAppCardInterface-4bmGNjTO.js +0 -452
- package/dist/EventTypeAppCardInterface-6Hs2WiRN.js +0 -23
- package/dist/EventTypeAppCardInterface-6QhUsfck.js +0 -38
- package/dist/EventTypeAppCardInterface-CSZJxMAi.js +0 -48
- package/dist/EventTypeAppCardInterface-D5NE1JH-.js +0 -33
- package/dist/EventTypeAppCardInterface-GpzdxrTy.js +0 -41
- package/dist/EventTypeAppCardInterface-HDqpiB_E.js +0 -33
- package/dist/EventTypeAppCardInterface-IsJt3HGB.js +0 -30
- package/dist/EventTypeAppCardInterface-K_hBnKz2.js +0 -23
- package/dist/EventTypeAppCardInterface-QuKynjTF.js +0 -23
- package/dist/EventTypeAppCardInterface-Uk-367hU.js +0 -33
- package/dist/EventTypeAppCardInterface-UrOLCYHp.js +0 -31
- package/dist/EventTypeAppCardInterface-WhX3MQGL.js +0 -33
- package/dist/EventTypeAppCardInterface-_a5TsCGC.js +0 -41
- package/dist/EventTypeAppCardInterface-_e0oMnpF.js +0 -33
- package/dist/EventTypeAppCardInterface-bfOpI-Cg.js +0 -23
- package/dist/EventTypeAppCardInterface-dQBcQRe5.js +0 -85
- package/dist/EventTypeAppCardInterface-jDIOSF5p.js +0 -31
- package/dist/EventTypeAppCardInterface-pgZqPYuy.js +0 -40
- package/dist/EventTypeAppCardInterface-rJaUyBaK.js +0 -32
- package/dist/EventTypeAppCardInterface-sAMfJ4Zp.js +0 -50
- package/dist/EventTypeAppCardInterface-xkCoWuR1.js +0 -33
- package/dist/EventTypeAppSettingsInterface-0MtsVqm9.js +0 -71
- package/dist/EventTypeAppSettingsInterface-4AylQiBj.js +0 -47
- package/dist/EventTypeAppSettingsInterface-Br_BvYU4.js +0 -77
- package/dist/EventTypeAppSettingsInterface-CkbhDi5X.js +0 -42
- package/dist/EventTypeAppSettingsInterface-nwSw369C.js +0 -220
- package/dist/EventTypeAppSettingsInterface-x-GvtrwY.js +0 -41
- package/dist/InstallAppButton-7AfVFA1y.js +0 -13
- package/dist/InstallAppButton-PfrQUF7k.js +0 -13
- package/dist/InstallAppButton-R3hBMMGj.js +0 -57
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import { jsx as n, jsxs as l, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { G as ce, J as de, _ as c, y as re, $ as v, a0 as _, a1 as U, W as se, S as m, w as d, I as h, z as f, a2 as M, a3 as he, N as ue } from "./index-jTqJooNt.js";
|
|
3
|
+
import { useState as g } from "react";
|
|
4
|
+
import { A as ve } from "./AppCard-9m9p6YSL.js";
|
|
5
|
+
import { u as me } from "./useIsAppEnabled-1m8rIQ8P.js";
|
|
6
|
+
const ke = function({ app: W, eventType: R }) {
|
|
7
|
+
var P;
|
|
8
|
+
const G = ce.usePathname(), { getAppData: o, setAppData: t, disabled: pe } = de(), { enabled: K, updateEnabled: V } = me(W), D = o("roundRobinLeadSkip"), Y = o("roundRobinSkipCheckRecordOn") ?? c.CONTACT, z = o("ifFreeEmailDomainSkipOwnerCheck") ?? !1, $ = o("skipContactCreation"), H = o("createLeadIfAccountNull"), J = o("createNewContactUnderAccount"), F = o("createEventOn") ?? c.CONTACT, B = o("onBookingWriteToEventObject") ?? !1, p = o("onBookingWriteToEventObjectMap") ?? {}, X = o("createEventOnLeadCheckForContact") ?? !1, L = o("onBookingChangeRecordOwner") ?? !1, q = o("onBookingChangeRecordOwnerName") ?? [], y = o("sendNoShowAttendeeData") ?? !1, Q = o("sendNoShowAttendeeDataField") ?? "", j = o("onBookingWriteToRecord") ?? !1, r = o("onBookingWriteToRecordFields") ?? {}, Z = o("ignoreGuests") ?? !1, { t: a } = re(), k = [
|
|
9
|
+
{ label: a("contact"), value: c.CONTACT },
|
|
10
|
+
{ label: a("salesforce_lead"), value: c.LEAD },
|
|
11
|
+
{ label: a("salesforce_contact_under_account"), value: c.ACCOUNT }
|
|
12
|
+
], [b, ee] = g(
|
|
13
|
+
k.find((e) => e.value === F) ?? k[0]
|
|
14
|
+
), T = [
|
|
15
|
+
{ label: a("text"), value: v.TEXT },
|
|
16
|
+
{ label: a("date"), value: v.DATE },
|
|
17
|
+
{ label: a("phone").charAt(0).toUpperCase() + a("phone").slice(1), value: v.PHONE },
|
|
18
|
+
{ label: a("custom"), value: v.CUSTOM },
|
|
19
|
+
{ label: a("picklist"), value: v.PICKLIST }
|
|
20
|
+
], [O, ne] = g(T[0]), N = [
|
|
21
|
+
{ label: a("on_every_booking"), value: _.EVERY_BOOKING },
|
|
22
|
+
{ label: a("only_if_field_is_empty"), value: _.FIELD_EMPTY }
|
|
23
|
+
], [ae, le] = g(N[0]), w = [
|
|
24
|
+
{ label: a("booking_start_date"), value: U.BOOKING_START_DATE },
|
|
25
|
+
{ label: a("booking_created_date"), value: U.BOOKING_CREATED_DATE }
|
|
26
|
+
], [I, te] = g(w[0]), [i, C] = g({
|
|
27
|
+
field: "",
|
|
28
|
+
fieldType: O.value,
|
|
29
|
+
value: "",
|
|
30
|
+
whenToWrite: _.FIELD_EMPTY
|
|
31
|
+
}), E = [
|
|
32
|
+
{ label: a("contact"), value: c.CONTACT },
|
|
33
|
+
{ label: a("salesforce_lead"), value: c.LEAD },
|
|
34
|
+
{ label: a("account"), value: c.ACCOUNT }
|
|
35
|
+
], [oe, ie] = g(
|
|
36
|
+
E.find((e) => e.value === Y) ?? E[0]
|
|
37
|
+
), [s, A] = g({
|
|
38
|
+
field: "",
|
|
39
|
+
value: ""
|
|
40
|
+
}), x = () => /* @__PURE__ */ n(
|
|
41
|
+
d,
|
|
42
|
+
{
|
|
43
|
+
label: a("salesforce_create_new_contact_under_account"),
|
|
44
|
+
labelOnLeading: !0,
|
|
45
|
+
checked: J,
|
|
46
|
+
onCheckedChange: (e) => {
|
|
47
|
+
t("createNewContactUnderAccount", e);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ n(
|
|
52
|
+
ve,
|
|
53
|
+
{
|
|
54
|
+
returnTo: `${se}${G}?tabName=apps`,
|
|
55
|
+
app: W,
|
|
56
|
+
teamId: ((P = R.team) == null ? void 0 : P.id) || void 0,
|
|
57
|
+
switchOnClick: (e) => {
|
|
58
|
+
V(e);
|
|
59
|
+
},
|
|
60
|
+
switchChecked: K,
|
|
61
|
+
hideSettingsIcon: !0,
|
|
62
|
+
children: /* @__PURE__ */ l(S, { children: [
|
|
63
|
+
/* @__PURE__ */ l("div", { className: "mb-4 ml-2", children: [
|
|
64
|
+
/* @__PURE__ */ n("label", { className: "text-emphasis mb-2 align-text-top text-sm font-medium", children: a("salesforce_create_record_as") }),
|
|
65
|
+
/* @__PURE__ */ n(
|
|
66
|
+
m,
|
|
67
|
+
{
|
|
68
|
+
className: "mt-2 w-60",
|
|
69
|
+
options: k,
|
|
70
|
+
value: b,
|
|
71
|
+
onChange: (e) => {
|
|
72
|
+
e && (ee(e), t("createEventOn", e.value));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(
|
|
78
|
+
d,
|
|
79
|
+
{
|
|
80
|
+
label: a("salesforce_ignore_guests"),
|
|
81
|
+
labelOnLeading: !0,
|
|
82
|
+
checked: Z,
|
|
83
|
+
onCheckedChange: (e) => {
|
|
84
|
+
t("ignoreGuests", e);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
) }),
|
|
88
|
+
b.value === c.CONTACT ? /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
89
|
+
d,
|
|
90
|
+
{
|
|
91
|
+
label: a("skip_contact_creation", { appName: "Salesforce" }),
|
|
92
|
+
labelOnLeading: !0,
|
|
93
|
+
checked: $,
|
|
94
|
+
onCheckedChange: (e) => {
|
|
95
|
+
t("skipContactCreation", e);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
) }) : null,
|
|
99
|
+
b.value === c.LEAD ? /* @__PURE__ */ l("div", { children: [
|
|
100
|
+
/* @__PURE__ */ n(
|
|
101
|
+
d,
|
|
102
|
+
{
|
|
103
|
+
label: a("salesforce_create_event_on_contact"),
|
|
104
|
+
labelOnLeading: !0,
|
|
105
|
+
checked: X,
|
|
106
|
+
onCheckedChange: (e) => {
|
|
107
|
+
t("createEventOnLeadCheckForContact", e);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ n("div", { className: "mt-4", children: /* @__PURE__ */ n(x, {}) })
|
|
112
|
+
] }) : null,
|
|
113
|
+
b.value === c.ACCOUNT ? /* @__PURE__ */ l(S, { children: [
|
|
114
|
+
/* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(x, {}) }),
|
|
115
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
116
|
+
d,
|
|
117
|
+
{
|
|
118
|
+
label: a("salesforce_if_account_does_not_exist"),
|
|
119
|
+
labelOnLeading: !0,
|
|
120
|
+
checked: H,
|
|
121
|
+
onCheckedChange: (e) => {
|
|
122
|
+
t("createLeadIfAccountNull", e);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
) })
|
|
126
|
+
] }) : null,
|
|
127
|
+
/* @__PURE__ */ l("div", { className: "mt-4", children: [
|
|
128
|
+
/* @__PURE__ */ n(
|
|
129
|
+
d,
|
|
130
|
+
{
|
|
131
|
+
label: a("on_booking_write_to_event_object"),
|
|
132
|
+
labelOnLeading: !0,
|
|
133
|
+
checked: B,
|
|
134
|
+
onCheckedChange: (e) => {
|
|
135
|
+
t("onBookingWriteToEventObject", e);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
B ? /* @__PURE__ */ l("div", { className: "ml-2 mt-2", children: [
|
|
140
|
+
/* @__PURE__ */ l("div", { className: "grid grid-cols-3 gap-4", children: [
|
|
141
|
+
/* @__PURE__ */ n("div", { children: a("field_name") }),
|
|
142
|
+
/* @__PURE__ */ n("div", { children: a("value") })
|
|
143
|
+
] }),
|
|
144
|
+
/* @__PURE__ */ l("div", { children: [
|
|
145
|
+
Object.keys(p).map((e) => /* @__PURE__ */ l("div", { className: "mt-2 grid grid-cols-3 gap-4", children: [
|
|
146
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(h, { value: e, readOnly: !0 }) }),
|
|
147
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(h, { value: p[e], readOnly: !0 }) }),
|
|
148
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
149
|
+
f,
|
|
150
|
+
{
|
|
151
|
+
StartIcon: "trash",
|
|
152
|
+
variant: "icon",
|
|
153
|
+
color: "destructive",
|
|
154
|
+
onClick: () => {
|
|
155
|
+
const u = p;
|
|
156
|
+
delete p[e], t("onBookingWriteToEventObjectMap", u);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
) })
|
|
160
|
+
] }, e)),
|
|
161
|
+
/* @__PURE__ */ l("div", { className: "mt-2 grid grid-cols-3 gap-4", children: [
|
|
162
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
163
|
+
h,
|
|
164
|
+
{
|
|
165
|
+
value: s.field,
|
|
166
|
+
onChange: (e) => A({
|
|
167
|
+
...s,
|
|
168
|
+
field: e.target.value
|
|
169
|
+
})
|
|
170
|
+
}
|
|
171
|
+
) }),
|
|
172
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
173
|
+
h,
|
|
174
|
+
{
|
|
175
|
+
value: s.value,
|
|
176
|
+
onChange: (e) => A({
|
|
177
|
+
...s,
|
|
178
|
+
value: e.target.value
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
) })
|
|
182
|
+
] })
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ n(
|
|
185
|
+
f,
|
|
186
|
+
{
|
|
187
|
+
className: "mt-2",
|
|
188
|
+
size: "sm",
|
|
189
|
+
disabled: !(s.field && s.value),
|
|
190
|
+
onClick: () => {
|
|
191
|
+
if (Object.keys(p).includes(
|
|
192
|
+
s.field.trim()
|
|
193
|
+
)) {
|
|
194
|
+
M("Field already exists", "error");
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
t("onBookingWriteToEventObjectMap", {
|
|
198
|
+
...p,
|
|
199
|
+
[s.field.trim()]: s.value.trim()
|
|
200
|
+
}), A({ field: "", value: "" });
|
|
201
|
+
},
|
|
202
|
+
children: a("add_new_field")
|
|
203
|
+
}
|
|
204
|
+
)
|
|
205
|
+
] }) : null
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ l("div", { className: "mt-4", children: [
|
|
208
|
+
/* @__PURE__ */ n(
|
|
209
|
+
d,
|
|
210
|
+
{
|
|
211
|
+
label: a("salesforce_on_booking_write_to_record", { record: F }),
|
|
212
|
+
labelOnLeading: !0,
|
|
213
|
+
checked: j,
|
|
214
|
+
onCheckedChange: (e) => {
|
|
215
|
+
t("onBookingWriteToRecord", e);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
j ? /* @__PURE__ */ l("div", { className: "ml-2 mt-2", children: [
|
|
220
|
+
/* @__PURE__ */ l("div", { className: "grid grid-cols-5 gap-4", children: [
|
|
221
|
+
/* @__PURE__ */ n("div", { children: a("field_name") }),
|
|
222
|
+
/* @__PURE__ */ n("div", { children: a("field_type") }),
|
|
223
|
+
/* @__PURE__ */ n("div", { children: a("value") }),
|
|
224
|
+
/* @__PURE__ */ n("div", { children: a("when_to_write") })
|
|
225
|
+
] }),
|
|
226
|
+
/* @__PURE__ */ l("div", { children: [
|
|
227
|
+
Object.keys(r).map((e) => /* @__PURE__ */ l("div", { className: "mt-2 grid grid-cols-5 gap-4", children: [
|
|
228
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(h, { value: e, readOnly: !0 }) }),
|
|
229
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
230
|
+
m,
|
|
231
|
+
{
|
|
232
|
+
value: T.find(
|
|
233
|
+
(u) => u.value === r[e].fieldType
|
|
234
|
+
),
|
|
235
|
+
isDisabled: !0
|
|
236
|
+
}
|
|
237
|
+
) }),
|
|
238
|
+
/* @__PURE__ */ n("div", { children: r[e].fieldType === v.DATE ? /* @__PURE__ */ n(
|
|
239
|
+
m,
|
|
240
|
+
{
|
|
241
|
+
value: w.find(
|
|
242
|
+
(u) => u.value === r[e].value
|
|
243
|
+
),
|
|
244
|
+
isDisabled: !0
|
|
245
|
+
}
|
|
246
|
+
) : /* @__PURE__ */ n(h, { value: r[e].value, readOnly: !0 }) }),
|
|
247
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
248
|
+
m,
|
|
249
|
+
{
|
|
250
|
+
value: N.find(
|
|
251
|
+
(u) => u.value === r[e].whenToWrite
|
|
252
|
+
),
|
|
253
|
+
isDisabled: !0
|
|
254
|
+
}
|
|
255
|
+
) }),
|
|
256
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
257
|
+
f,
|
|
258
|
+
{
|
|
259
|
+
StartIcon: "trash",
|
|
260
|
+
variant: "icon",
|
|
261
|
+
color: "destructive",
|
|
262
|
+
onClick: () => {
|
|
263
|
+
const u = r;
|
|
264
|
+
delete r[e], t("onBookingWriteToRecordFields", u);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
) })
|
|
268
|
+
] }, e)),
|
|
269
|
+
/* @__PURE__ */ l("div", { className: "mt-2 grid grid-cols-5 gap-4", children: [
|
|
270
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
271
|
+
h,
|
|
272
|
+
{
|
|
273
|
+
value: i.field,
|
|
274
|
+
onChange: (e) => C({
|
|
275
|
+
...i,
|
|
276
|
+
field: e.target.value
|
|
277
|
+
})
|
|
278
|
+
}
|
|
279
|
+
) }),
|
|
280
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
281
|
+
m,
|
|
282
|
+
{
|
|
283
|
+
options: T,
|
|
284
|
+
value: O,
|
|
285
|
+
onChange: (e) => {
|
|
286
|
+
e && (ne(e), C({
|
|
287
|
+
...i,
|
|
288
|
+
fieldType: e.value,
|
|
289
|
+
...e.value === v.DATE && { value: I.value }
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
) }),
|
|
294
|
+
/* @__PURE__ */ n("div", { children: O.value === v.DATE ? /* @__PURE__ */ n(
|
|
295
|
+
m,
|
|
296
|
+
{
|
|
297
|
+
options: w,
|
|
298
|
+
value: I,
|
|
299
|
+
onChange: (e) => {
|
|
300
|
+
e && (te(e), C({
|
|
301
|
+
...i,
|
|
302
|
+
value: e.value
|
|
303
|
+
}));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
) : /* @__PURE__ */ n(
|
|
307
|
+
h,
|
|
308
|
+
{
|
|
309
|
+
value: i.value,
|
|
310
|
+
onChange: (e) => C({
|
|
311
|
+
...i,
|
|
312
|
+
value: e.target.value
|
|
313
|
+
})
|
|
314
|
+
}
|
|
315
|
+
) }),
|
|
316
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
317
|
+
m,
|
|
318
|
+
{
|
|
319
|
+
options: N,
|
|
320
|
+
value: ae,
|
|
321
|
+
onChange: (e) => {
|
|
322
|
+
e && (le(e), C({
|
|
323
|
+
...i,
|
|
324
|
+
whenToWrite: e.value
|
|
325
|
+
}));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
) })
|
|
329
|
+
] })
|
|
330
|
+
] }),
|
|
331
|
+
/* @__PURE__ */ n(
|
|
332
|
+
f,
|
|
333
|
+
{
|
|
334
|
+
className: "mt-2",
|
|
335
|
+
size: "sm",
|
|
336
|
+
disabled: !(i.field && i.fieldType && i.value && i.whenToWrite),
|
|
337
|
+
onClick: () => {
|
|
338
|
+
if (Object.keys(r).includes(
|
|
339
|
+
s.field.trim()
|
|
340
|
+
)) {
|
|
341
|
+
M("Field already exists", "error");
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
t("onBookingWriteToRecordFields", {
|
|
345
|
+
...r,
|
|
346
|
+
[i.field.trim()]: {
|
|
347
|
+
fieldType: i.fieldType,
|
|
348
|
+
value: i.value,
|
|
349
|
+
whenToWrite: i.whenToWrite
|
|
350
|
+
}
|
|
351
|
+
}), C({
|
|
352
|
+
field: "",
|
|
353
|
+
fieldType: O.value,
|
|
354
|
+
value: "",
|
|
355
|
+
whenToWrite: _.FIELD_EMPTY
|
|
356
|
+
});
|
|
357
|
+
},
|
|
358
|
+
children: a("add_new_field")
|
|
359
|
+
}
|
|
360
|
+
)
|
|
361
|
+
] }) : null
|
|
362
|
+
] }),
|
|
363
|
+
/* @__PURE__ */ n("div", { className: "mt-4", children: /* @__PURE__ */ n(
|
|
364
|
+
d,
|
|
365
|
+
{
|
|
366
|
+
label: "Change record owner on booking",
|
|
367
|
+
labelOnLeading: !0,
|
|
368
|
+
checked: L,
|
|
369
|
+
onCheckedChange: (e) => {
|
|
370
|
+
t("onBookingChangeRecordOwner", e);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
) }),
|
|
374
|
+
L ? /* @__PURE__ */ l("div", { className: "ml-2 mt-2", children: [
|
|
375
|
+
/* @__PURE__ */ n("p", { className: "mb-2", children: a("salesforce_owner_name_to_change") }),
|
|
376
|
+
/* @__PURE__ */ n(
|
|
377
|
+
h,
|
|
378
|
+
{
|
|
379
|
+
value: q,
|
|
380
|
+
onChange: (e) => t("onBookingChangeRecordOwnerName", e.target.value)
|
|
381
|
+
}
|
|
382
|
+
)
|
|
383
|
+
] }) : null,
|
|
384
|
+
R.schedulingType === he.ROUND_ROBIN ? /* @__PURE__ */ l("div", { className: "mt-4", children: [
|
|
385
|
+
/* @__PURE__ */ n(
|
|
386
|
+
d,
|
|
387
|
+
{
|
|
388
|
+
label: a("salesforce_book_directly_with_attendee_owner"),
|
|
389
|
+
labelOnLeading: !0,
|
|
390
|
+
checked: D,
|
|
391
|
+
onCheckedChange: (e) => {
|
|
392
|
+
t("roundRobinLeadSkip", e), e && t("enabled", e);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
),
|
|
396
|
+
D ? /* @__PURE__ */ l(S, { children: [
|
|
397
|
+
/* @__PURE__ */ l("div", { className: "my-4 ml-2", children: [
|
|
398
|
+
/* @__PURE__ */ n("label", { className: "text-emphasis mb-2 align-text-top text-sm font-medium", children: a("salesforce_check_owner_of") }),
|
|
399
|
+
/* @__PURE__ */ n(
|
|
400
|
+
m,
|
|
401
|
+
{
|
|
402
|
+
className: "mt-2 w-60",
|
|
403
|
+
options: E,
|
|
404
|
+
value: oe,
|
|
405
|
+
onChange: (e) => {
|
|
406
|
+
e && (ie(e), t("roundRobinSkipCheckRecordOn", e.value));
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
)
|
|
410
|
+
] }),
|
|
411
|
+
/* @__PURE__ */ n("div", { className: "my-4", children: /* @__PURE__ */ n(
|
|
412
|
+
d,
|
|
413
|
+
{
|
|
414
|
+
label: a("salesforce_if_free_email_domain_skip_owner_check"),
|
|
415
|
+
labelOnLeading: !0,
|
|
416
|
+
checked: z,
|
|
417
|
+
onCheckedChange: (e) => {
|
|
418
|
+
t("ifFreeEmailDomainSkipOwnerCheck", e);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
) })
|
|
422
|
+
] }) : null,
|
|
423
|
+
/* @__PURE__ */ n(ue, { className: "mt-2", severity: "neutral", title: a("skip_rr_description") })
|
|
424
|
+
] }) : null,
|
|
425
|
+
/* @__PURE__ */ l("div", { className: "ml-2 mt-4", children: [
|
|
426
|
+
/* @__PURE__ */ n(
|
|
427
|
+
d,
|
|
428
|
+
{
|
|
429
|
+
label: "Send no show attendee data to event object",
|
|
430
|
+
checked: y,
|
|
431
|
+
onCheckedChange: (e) => {
|
|
432
|
+
t("sendNoShowAttendeeData", e);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
y ? /* @__PURE__ */ l("div", { className: "mt-2", children: [
|
|
437
|
+
/* @__PURE__ */ n("p", { className: "mb-2", children: "Field name to check (must be checkbox data type)" }),
|
|
438
|
+
/* @__PURE__ */ n(
|
|
439
|
+
h,
|
|
440
|
+
{
|
|
441
|
+
value: Q,
|
|
442
|
+
onChange: (e) => t("sendNoShowAttendeeDataField", e.target.value)
|
|
443
|
+
}
|
|
444
|
+
)
|
|
445
|
+
] }) : null
|
|
446
|
+
] })
|
|
447
|
+
] })
|
|
448
|
+
}
|
|
449
|
+
);
|
|
450
|
+
};
|
|
451
|
+
export {
|
|
452
|
+
ke as default
|
|
453
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { G as d, W as i } from "./index-jTqJooNt.js";
|
|
3
|
+
import { A as m } from "./AppCard-9m9p6YSL.js";
|
|
4
|
+
import { u } from "./useIsAppEnabled-1m8rIQ8P.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,78 @@
|
|
|
1
|
+
import { jsx as l, jsxs as m, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { useState as o, useEffect as _ } from "react";
|
|
3
|
+
import { c as i, i as k, a as S } from "./currencyOptions-kannG2hu.js";
|
|
4
|
+
import { U as r, y as E, N as x, k as F, V as T, X as V, S as N } from "./index-jTqJooNt.js";
|
|
5
|
+
const I = ({
|
|
6
|
+
getAppData: n,
|
|
7
|
+
setAppData: t,
|
|
8
|
+
eventType: d
|
|
9
|
+
}) => {
|
|
10
|
+
var p, h;
|
|
11
|
+
const y = n("price"), a = n("currency") || i[0].value, [s, O] = o(i.find((e) => e.value === a)), [C, P] = o(
|
|
12
|
+
k(a) ? S[a] : ""
|
|
13
|
+
), f = n("paymentOption"), u = ((p = r) == null ? void 0 : p.find((e) => f === e.value)) || {
|
|
14
|
+
label: r[0].label,
|
|
15
|
+
value: r[0].value
|
|
16
|
+
}, b = !!d.seatsPerTimeSlot, [v, q] = o(n("enabled")), { t: c } = E(), g = ((h = d.recurringEvent) == null ? void 0 : h.count) !== void 0;
|
|
17
|
+
return _(() => {
|
|
18
|
+
v && (n("currency") || t("currency", i[0].value), n("paymentOption") || t("paymentOption", r[0].value));
|
|
19
|
+
}, []), g ? /* @__PURE__ */ l(x, { className: "mt-2", severity: "warning", title: c("warning_recurring_event_payment") }) : v ? /* @__PURE__ */ m(w, { children: [
|
|
20
|
+
/* @__PURE__ */ l("div", { className: "mt-2 block items-center sm:flex", children: /* @__PURE__ */ l(
|
|
21
|
+
F,
|
|
22
|
+
{
|
|
23
|
+
label: "Price",
|
|
24
|
+
labelSrOnly: !0,
|
|
25
|
+
addOnLeading: C,
|
|
26
|
+
addOnSuffix: a,
|
|
27
|
+
step: "0.01",
|
|
28
|
+
min: "0.5",
|
|
29
|
+
type: "number",
|
|
30
|
+
required: !0,
|
|
31
|
+
className: "block w-full rounded-sm pl-2 text-sm",
|
|
32
|
+
placeholder: "Price",
|
|
33
|
+
"data-testid": "paypal-price-input",
|
|
34
|
+
onChange: (e) => {
|
|
35
|
+
t("price", T(Number(e.target.value), a)), s && t("currency", s.value);
|
|
36
|
+
},
|
|
37
|
+
value: y > 0 ? V(y, a) : void 0
|
|
38
|
+
}
|
|
39
|
+
) }),
|
|
40
|
+
/* @__PURE__ */ m("div", { className: "mt-5 w-60", children: [
|
|
41
|
+
/* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: c("currency") }),
|
|
42
|
+
/* @__PURE__ */ l(
|
|
43
|
+
N,
|
|
44
|
+
{
|
|
45
|
+
variant: "default",
|
|
46
|
+
"data-testid": "paypal-currency-select",
|
|
47
|
+
options: i,
|
|
48
|
+
value: s,
|
|
49
|
+
className: "text-black",
|
|
50
|
+
defaultValue: s,
|
|
51
|
+
onChange: (e) => {
|
|
52
|
+
e && (O(e), P(S[e.value]), t("currency", e.value));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ m("div", { className: "mt-4 w-60", children: [
|
|
58
|
+
/* @__PURE__ */ l("label", { className: "text-default mb-1 block text-sm font-medium", htmlFor: "currency", children: "Payment option" }),
|
|
59
|
+
/* @__PURE__ */ l(
|
|
60
|
+
N,
|
|
61
|
+
{
|
|
62
|
+
"data-testid": "paypal-payment-option-select",
|
|
63
|
+
defaultValue: u ? { ...u, label: c(u.label) } : { ...r[0], label: c(r[0].label) },
|
|
64
|
+
options: r.map((e) => ({ ...e, label: c(e.label) || e.label })),
|
|
65
|
+
onChange: (e) => {
|
|
66
|
+
e && t("paymentOption", e.value);
|
|
67
|
+
},
|
|
68
|
+
className: "mb-1 h-[38px] w-full",
|
|
69
|
+
isDisabled: b
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] }),
|
|
73
|
+
b && f === "HOLD" && /* @__PURE__ */ l(x, { className: "mt-2", severity: "warning", title: c("seats_and_no_show_fee_error") })
|
|
74
|
+
] }) : null;
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
I as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as l, Fragment as x, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useEffect as w } from "react";
|
|
3
|
+
import { y as _, a9 as t, N as g, k as C, a5 as P, S as p } from "./index-jTqJooNt.js";
|
|
4
|
+
const d = [{ label: "BTC", value: "BTC", unit: "sats" }], T = ({
|
|
5
|
+
eventType: b,
|
|
6
|
+
getAppData: s,
|
|
7
|
+
setAppData: a
|
|
8
|
+
}) => {
|
|
9
|
+
var v, h;
|
|
10
|
+
const { t: n } = _(), i = s("price"), c = s("currency"), [r, S] = N(
|
|
11
|
+
d.find((e) => e.value === c) || d[0]
|
|
12
|
+
), f = s("paymentOption"), u = ((v = t) == null ? void 0 : v.find((e) => f === e.value)) || {
|
|
13
|
+
label: t[0].label,
|
|
14
|
+
value: t[0].value
|
|
15
|
+
}, y = !!b.seatsPerTimeSlot, [m] = N(s("enabled")), O = ((h = b.recurringEvent) == null ? void 0 : h.count) !== void 0;
|
|
16
|
+
return w(() => {
|
|
17
|
+
!c && m && a("currency", r.value);
|
|
18
|
+
}, [c, r, a, m]), /* @__PURE__ */ l(x, { children: O ? /* @__PURE__ */ l(g, { className: "mt-2", severity: "warning", title: n("warning_recurring_event_payment") }) : m && /* @__PURE__ */ o(x, { children: [
|
|
19
|
+
/* @__PURE__ */ l("div", { className: "mt-2 block items-center sm:flex", children: /* @__PURE__ */ l(
|
|
20
|
+
C,
|
|
21
|
+
{
|
|
22
|
+
label: "Price",
|
|
23
|
+
labelSrOnly: !0,
|
|
24
|
+
addOnLeading: /* @__PURE__ */ l(P, { className: "h-4 w-4" }),
|
|
25
|
+
addOnSuffix: r.unit || r.value,
|
|
26
|
+
type: "number",
|
|
27
|
+
required: !0,
|
|
28
|
+
className: "block w-full rounded-sm border-gray-300 pl-2 pr-12 text-sm",
|
|
29
|
+
placeholder: "Price",
|
|
30
|
+
onChange: (e) => {
|
|
31
|
+
a("price", Number(e.target.value)), c && a("currency", c);
|
|
32
|
+
},
|
|
33
|
+
value: i && i > 0 ? i : void 0
|
|
34
|
+
}
|
|
35
|
+
) }),
|
|
36
|
+
/* @__PURE__ */ o("div", { className: "mt-5 w-60", children: [
|
|
37
|
+
/* @__PURE__ */ l("label", { className: "text-default block text-sm font-medium", htmlFor: "currency", children: n("currency") }),
|
|
38
|
+
/* @__PURE__ */ l(
|
|
39
|
+
p,
|
|
40
|
+
{
|
|
41
|
+
variant: "default",
|
|
42
|
+
options: d,
|
|
43
|
+
value: r,
|
|
44
|
+
className: "text-black",
|
|
45
|
+
defaultValue: r,
|
|
46
|
+
onChange: (e) => {
|
|
47
|
+
e && (S(e), a("currency", e.value));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ o("div", { className: "mt-2 w-60", children: [
|
|
53
|
+
/* @__PURE__ */ l("label", { className: "text-default block text-sm font-medium", htmlFor: "currency", children: "Payment option" }),
|
|
54
|
+
/* @__PURE__ */ l(
|
|
55
|
+
p,
|
|
56
|
+
{
|
|
57
|
+
defaultValue: u ? { ...u, label: n(u.label) } : { ...t[0], label: n(t[0].label) },
|
|
58
|
+
options: t.map((e) => ({ ...e, label: n(e.label) || e.label })),
|
|
59
|
+
onChange: (e) => {
|
|
60
|
+
e && a("paymentOption", e.value);
|
|
61
|
+
},
|
|
62
|
+
className: "mb-1 h-[38px] w-full",
|
|
63
|
+
isDisabled: y
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }),
|
|
67
|
+
y && f === "HOLD" && /* @__PURE__ */ l(g, { className: "mt-2", severity: "warning", title: n("seats_and_no_show_fee_error") })
|
|
68
|
+
] }) });
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
T as default
|
|
72
|
+
};
|