@calcom/atoms 1.1.1-debug-dont-use → 1.1.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.
Files changed (153) hide show
  1. package/dist/{AddressInput-CVMPei2D.js → AddressInput-NzvfumUI.js} +1 -1
  2. package/dist/{AlbyPriceComponent-E6ULoDL6.js → AlbyPriceComponent-1-urrKvw.js} +1 -1
  3. package/dist/{AppCard-cTGNOAHy.js → AppCard-hN4JJeXf.js} +1 -1
  4. package/dist/{AppListCardPlatformWrapper-NSThSuXk.js → AppListCardPlatformWrapper-SELRmds-.js} +1 -1
  5. package/dist/{AppListCardWebWrapper-XwKnQn63.js → AppListCardWebWrapper-qtbixhdy.js} +1 -1
  6. package/dist/{AppSettingsInterface-YBMLeXt4.js → AppSettingsInterface-OjtqSpP5.js} +1 -1
  7. package/dist/{AppSettingsInterface-x5iDZUBe.js → AppSettingsInterface-SAdoqRc6.js} +1 -1
  8. package/dist/{AppSettingsInterface-ZH3XhiYG.js → AppSettingsInterface-z-BTopkU.js} +1 -1
  9. package/dist/{DateRangePicker-f_B5u4e9.js → DateRangePicker-ZFK77aaF.js} +1 -1
  10. package/dist/{EventTypeAppCardInterface-NMuTJqnR.js → EventTypeAppCardInterface--mLJhYJz.js} +4 -4
  11. package/dist/{EventTypeAppCardInterface-TSa1z_cz.js → EventTypeAppCardInterface-2Cc6ahQQ.js} +3 -3
  12. package/dist/{EventTypeAppCardInterface-0gSJQJit.js → EventTypeAppCardInterface-51K1dlPD.js} +2 -2
  13. package/dist/{EventTypeAppCardInterface-pS7YojCs.js → EventTypeAppCardInterface-95cvERUq.js} +3 -3
  14. package/dist/{EventTypeAppCardInterface-cZjp0yNN.js → EventTypeAppCardInterface-9IGJ0PSa.js} +4 -4
  15. package/dist/{EventTypeAppCardInterface-VxD1hz61.js → EventTypeAppCardInterface-AmIuaGxY.js} +4 -4
  16. package/dist/{EventTypeAppCardInterface-_mJKoptx.js → EventTypeAppCardInterface-GjUOq6hk.js} +4 -4
  17. package/dist/{EventTypeAppCardInterface-JCEQYUtS.js → EventTypeAppCardInterface-H4K3MAjp.js} +4 -4
  18. package/dist/{EventTypeAppCardInterface-Zei_gfk9.js → EventTypeAppCardInterface-IBHBvzdh.js} +3 -3
  19. package/dist/{EventTypeAppCardInterface-VdYfOsab.js → EventTypeAppCardInterface-K87MBo9I.js} +3 -3
  20. package/dist/{EventTypeAppCardInterface-L_OQx-GG.js → EventTypeAppCardInterface-OYjSCuch.js} +4 -4
  21. package/dist/{EventTypeAppCardInterface-9C3Wfgpy.js → EventTypeAppCardInterface-QQqZv8fE.js} +3 -3
  22. package/dist/{EventTypeAppCardInterface-x8x6_qO2.js → EventTypeAppCardInterface-U75u_cIJ.js} +2 -2
  23. package/dist/{EventTypeAppCardInterface-omHgFR_2.js → EventTypeAppCardInterface-Xoik_E4N.js} +3 -3
  24. package/dist/{EventTypeAppCardInterface-F5At064k.js → EventTypeAppCardInterface-YDDBcspM.js} +4 -4
  25. package/dist/{EventTypeAppCardInterface-qaVZIE5N.js → EventTypeAppCardInterface-bFnvA6B_.js} +3 -3
  26. package/dist/EventTypeAppCardInterface-d-hNtzhT.js +696 -0
  27. package/dist/{EventTypeAppCardInterface-2TR5xhf8.js → EventTypeAppCardInterface-dqDNZgqG.js} +4 -4
  28. package/dist/{EventTypeAppCardInterface-C6ns7UmL.js → EventTypeAppCardInterface-j0fTh3VO.js} +3 -3
  29. package/dist/{EventTypeAppCardInterface-V2CVt-gp.js → EventTypeAppCardInterface-nqLtZdvT.js} +3 -3
  30. package/dist/{EventTypeAppCardInterface-ix9-eOy7.js → EventTypeAppCardInterface-q5C_2X2L.js} +4 -4
  31. package/dist/{EventTypeAppCardInterface-ugSSelEX.js → EventTypeAppCardInterface-qtTTM8pf.js} +3 -3
  32. package/dist/{EventTypeAppCardInterface-0cii-lHS.js → EventTypeAppCardInterface-s9iRBeJU.js} +4 -4
  33. package/dist/{EventTypeAppCardInterface-_2yZa06r.js → EventTypeAppCardInterface-tAOaIu7e.js} +3 -3
  34. package/dist/{EventTypeAppCardInterface-Q8BoN8IR.js → EventTypeAppCardInterface-vFmAxtJ_.js} +3 -3
  35. package/dist/EventTypeAppCardInterface-y8QjZ8hH.js +24 -0
  36. package/dist/{EventTypeAppSettingsInterface-A-zPsqPN.js → EventTypeAppSettingsInterface-9IDAwqSZ.js} +1 -1
  37. package/dist/{EventTypeAppSettingsInterface-uJw6TEuG.js → EventTypeAppSettingsInterface-CCyIJ5PA.js} +1 -1
  38. package/dist/{EventTypeAppSettingsInterface-TxRlEgaM.js → EventTypeAppSettingsInterface-GlYSNMSh.js} +1 -1
  39. package/dist/{EventTypeAppSettingsInterface-aGQavYPZ.js → EventTypeAppSettingsInterface-ININd3TP.js} +1 -1
  40. package/dist/{EventTypeAppSettingsInterface-SrOLSflD.js → EventTypeAppSettingsInterface-MZ6AuQlx.js} +1 -1
  41. package/dist/{EventTypeAppSettingsInterface-N-387tFo.js → EventTypeAppSettingsInterface-bWUcZj4D.js} +1 -1
  42. package/dist/{EventTypeAppSettingsInterface-USUuP18O.js → EventTypeAppSettingsInterface-hcNF3TE1.js} +1 -1
  43. package/dist/{EventTypeAppSettingsInterface-Mw0nUm2I.js → EventTypeAppSettingsInterface-iXuGB_YY.js} +1 -1
  44. package/dist/{EventTypeAppSettingsInterface-wRyNHA8Z.js → EventTypeAppSettingsInterface-lsxcvaFv.js} +1 -1
  45. package/dist/{EventTypeAppSettingsInterface-mf5L8PKf.js → EventTypeAppSettingsInterface-n2bRxRf2.js} +1 -1
  46. package/dist/{EventTypeAppSettingsInterface-_jGTLesb.js → EventTypeAppSettingsInterface-osAZr0qh.js} +1 -1
  47. package/dist/{EventTypeAppSettingsInterface-xfI4WyE9.js → EventTypeAppSettingsInterface-z1Quk5hj.js} +1 -1
  48. package/dist/{InstallAppButton-3pRRFAeS.js → InstallAppButton-3vFrgQZL.js} +1 -1
  49. package/dist/{InstallAppButton-xME8ESsW.js → InstallAppButton-ZZMl6U2j.js} +1 -1
  50. package/dist/{InstallAppButton-sMIEaIrB.js → InstallAppButton-lv0Q-gWg.js} +1 -1
  51. package/dist/{PhoneInput-_96ULuJw.js → PhoneInput-95NAC5-_.js} +1 -1
  52. package/dist/{StripePaymentForm-1ANfOJyB.js → StripePaymentForm-14dnyzc0.js} +1 -1
  53. package/dist/cal-atoms.js +1 -1
  54. package/dist/{index-qcnOr3S-.js → index-H0BzYsH6.js} +1 -1
  55. package/dist/{index-VZRHTsae.js → index-UNLJJou7.js} +1 -1
  56. package/dist/{index-ZQlxzdt5.js → index-WCahCkE1.js} +47741 -47865
  57. package/dist/{index-me6CfU0W.js → index-_7uRh17g.js} +2 -2
  58. package/dist/packages/features/bookings/Booker/components/hooks/useCalendars.d.ts +0 -4
  59. package/dist/packages/features/bookings/Booker/components/hooks/useCalendars.d.ts.map +1 -1
  60. package/dist/packages/features/bookings/Booker/store.d.ts +1 -3
  61. package/dist/packages/features/bookings/Booker/store.d.ts.map +1 -1
  62. package/dist/packages/features/bookings/Booker/types.d.ts +0 -1
  63. package/dist/packages/features/bookings/Booker/types.d.ts.map +1 -1
  64. package/dist/packages/features/bookings/lib/book-event-form/booking-to-mutation-input-mapper.d.ts +1 -2
  65. package/dist/packages/features/bookings/lib/book-event-form/booking-to-mutation-input-mapper.d.ts.map +1 -1
  66. package/dist/packages/features/bookings/lib/create-booking.d.ts +49 -46
  67. package/dist/packages/features/bookings/lib/create-booking.d.ts.map +1 -1
  68. package/dist/packages/features/bookings/lib/create-recurring-booking.d.ts +49 -46
  69. package/dist/packages/features/bookings/lib/create-recurring-booking.d.ts.map +1 -1
  70. package/dist/packages/features/bookings/lib/getBookingDataSchema.d.ts +0 -3
  71. package/dist/packages/features/bookings/lib/getBookingDataSchema.d.ts.map +1 -1
  72. package/dist/packages/features/bookings/lib/getBookingDataSchemaForApi.d.ts +0 -5
  73. package/dist/packages/features/bookings/lib/getBookingDataSchemaForApi.d.ts.map +1 -1
  74. package/dist/packages/features/bookings/lib/getBookingInfo.d.ts +0 -2
  75. package/dist/packages/features/bookings/lib/getBookingInfo.d.ts.map +1 -1
  76. package/dist/packages/features/bookings/lib/getUserBooking.d.ts +0 -1
  77. package/dist/packages/features/bookings/lib/getUserBooking.d.ts.map +1 -1
  78. package/dist/packages/features/bookings/lib/handleNewBooking/createBooking.d.ts +1 -0
  79. package/dist/packages/features/bookings/lib/handleNewBooking/createBooking.d.ts.map +1 -1
  80. package/dist/packages/features/bookings/lib/handleNewBooking/getBookingData.d.ts +0 -4
  81. package/dist/packages/features/bookings/lib/handleNewBooking/getBookingData.d.ts.map +1 -1
  82. package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts.map +1 -1
  83. package/dist/packages/features/bookings/lib/handleNewBooking/originalRescheduledBookingUtils.d.ts +1 -0
  84. package/dist/packages/features/bookings/lib/handleNewBooking/originalRescheduledBookingUtils.d.ts.map +1 -1
  85. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts +49 -46
  86. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
  87. package/dist/packages/features/bookings/lib/handleSeats/create/createNewSeat.d.ts +1 -0
  88. package/dist/packages/features/bookings/lib/handleSeats/create/createNewSeat.d.ts.map +1 -1
  89. package/dist/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.d.ts +1 -0
  90. package/dist/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.d.ts.map +1 -1
  91. package/dist/packages/features/bookings/lib/requiresConfirmation/getBookingRequest.d.ts +1 -0
  92. package/dist/packages/features/bookings/lib/requiresConfirmation/getBookingRequest.d.ts.map +1 -1
  93. package/dist/packages/features/data-table/lib/server.d.ts +0 -8
  94. package/dist/packages/features/data-table/lib/server.d.ts.map +1 -1
  95. package/dist/packages/features/ee/round-robin/assignmentReason/AssignmentReasonRecorder.d.ts +1 -3
  96. package/dist/packages/features/ee/round-robin/assignmentReason/AssignmentReasonRecorder.d.ts.map +1 -1
  97. package/dist/packages/features/ee/round-robin/assignmentReason/appAssignmentReasonHandler.d.ts +1 -2
  98. package/dist/packages/features/ee/round-robin/assignmentReason/appAssignmentReasonHandler.d.ts.map +1 -1
  99. package/dist/packages/features/ee/round-robin/roundRobinReassignment.d.ts.map +1 -1
  100. package/dist/packages/features/ee/workflows/api/scheduleSMSReminders.d.ts.map +1 -1
  101. package/dist/packages/features/ee/workflows/api/scheduleWhatsappReminders.d.ts.map +1 -1
  102. package/dist/packages/features/ee/workflows/lib/getWorkflowReminders.d.ts.map +1 -1
  103. package/dist/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.d.ts.map +1 -1
  104. package/dist/packages/features/eventtypes/components/Locations.d.ts.map +1 -1
  105. package/dist/packages/features/eventtypes/components/tabs/advanced/RequiresConfirmationController.d.ts.map +1 -1
  106. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +1 -985
  107. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
  108. package/dist/packages/features/eventtypes/lib/types.d.ts +0 -1
  109. package/dist/packages/features/eventtypes/lib/types.d.ts.map +1 -1
  110. package/dist/packages/features/schedules/components/Schedule.d.ts.map +1 -1
  111. package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
  112. package/dist/packages/platform/atoms/cal-provider/BaseCalProvider.d.ts.map +1 -1
  113. package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts +0 -1
  114. package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts.map +1 -1
  115. package/dist/packages/platform/atoms/event-types/hooks/useAtomUpdateEventType.d.ts +0 -1
  116. package/dist/packages/platform/atoms/event-types/hooks/useAtomUpdateEventType.d.ts.map +1 -1
  117. package/dist/packages/platform/atoms/event-types/hooks/useEventTypeForm.d.ts.map +1 -1
  118. package/dist/packages/platform/atoms/hooks/bookings/useCreateBooking.d.ts +49 -46
  119. package/dist/packages/platform/atoms/hooks/bookings/useCreateBooking.d.ts.map +1 -1
  120. package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts +49 -47
  121. package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts.map +1 -1
  122. package/dist/packages/platform/atoms/hooks/bookings/useCreateRecurringBooking.d.ts +49 -46
  123. package/dist/packages/platform/atoms/hooks/bookings/useCreateRecurringBooking.d.ts.map +1 -1
  124. package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts.map +1 -1
  125. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
  126. package/dist/packages/platform/libraries/repositories.d.ts +1 -1
  127. package/dist/packages/platform/libraries/repositories.d.ts.map +1 -1
  128. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.d.ts.map +1 -1
  129. package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.d.ts +0 -6
  130. package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.d.ts.map +1 -1
  131. package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots.input.d.ts +4 -0
  132. package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots.input.d.ts.map +1 -1
  133. package/dist/packages/prisma/zod/booking.d.ts +3 -0
  134. package/dist/packages/prisma/zod/booking.d.ts.map +1 -1
  135. package/dist/packages/prisma/zod/calendarcache.d.ts +0 -3
  136. package/dist/packages/prisma/zod/calendarcache.d.ts.map +1 -1
  137. package/dist/packages/prisma/zod/calvideosettings.d.ts +0 -3
  138. package/dist/packages/prisma/zod/calvideosettings.d.ts.map +1 -1
  139. package/dist/packages/prisma/zod/custom/booking.d.ts +0 -9
  140. package/dist/packages/prisma/zod/custom/booking.d.ts.map +1 -1
  141. package/dist/packages/prisma-client/index.d.ts +105 -72
  142. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts +1 -1
  143. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts.map +1 -1
  144. package/dist/{useIsAppEnabled-V8Jl9FX-.js → useIsAppEnabled-C8lVT7D4.js} +1 -1
  145. package/package.json +1 -1
  146. package/dist/EventTypeAppCardInterface--fNkLgYH.js +0 -858
  147. package/dist/EventTypeAppCardInterface-wPiG1Uab.js +0 -24
  148. package/dist/packages/features/data-table/lib/__tests__/server.test.d.ts +0 -2
  149. package/dist/packages/features/data-table/lib/__tests__/server.test.d.ts.map +0 -1
  150. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts +0 -166
  151. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts.map +0 -1
  152. package/dist/packages/trpc/server/routers/viewer/slots/util.test.d.ts +0 -2
  153. package/dist/packages/trpc/server/routers/viewer/slots/util.test.d.ts.map +0 -1
@@ -0,0 +1,696 @@
1
+ import { jsxs as c, Fragment as N, jsx as e } from "react/jsx-runtime";
2
+ import { q as $, X as r, Y as K, Z as U, p as h, I as f, S as v, r as z, _ as q, s as ie, t as ce, $ as u, W as se, L as G, a0 as de, x as re } from "./index-WCahCkE1.js";
3
+ import { useState as S } from "react";
4
+ import { S as a, A as ue } from "./AppCard-hN4JJeXf.js";
5
+ import { u as he } from "./useIsAppEnabled-C8lVT7D4.js";
6
+ var M = /* @__PURE__ */ ((_) => (_.ON_BOOKING = "on_booking", _.ON_CANCEL = "on_cancel", _))(M || {});
7
+ const Y = ({
8
+ bookingAction: _,
9
+ optionLabel: x,
10
+ optionEnabled: w,
11
+ optionSwitchOnChange: y,
12
+ writeToObjectData: t,
13
+ updateWriteToObjectData: o
14
+ }) => {
15
+ const { t: d } = $(), g = [
16
+ { label: d("text"), value: r.TEXT },
17
+ { label: d("date"), value: r.DATE },
18
+ { label: d("phone").charAt(0).toUpperCase() + d("phone").slice(1), value: r.PHONE },
19
+ { label: d("checkbox"), value: r.CHECKBOX },
20
+ { label: d("picklist"), value: r.PICKLIST },
21
+ { label: d("custom"), value: r.CUSTOM }
22
+ ], O = [
23
+ { label: d("only_if_field_is_empty"), value: K.FIELD_EMPTY },
24
+ ..._ === "on_cancel" ? [{ label: d("salesforce_on_every_cancellation"), value: K.EVERY_BOOKING }] : [{ label: d("on_every_booking"), value: K.EVERY_BOOKING }]
25
+ ], k = [
26
+ { label: d("true"), value: !0 },
27
+ { label: d("false"), value: !1 }
28
+ ], T = [
29
+ ..._ === "on_cancel" ? [{ label: d("booking_cancel_date"), value: U.BOOKING_CANCEL_DATE }] : [],
30
+ { label: d("booking_start_date"), value: U.BOOKING_START_DATE },
31
+ { label: d("booking_created_date"), value: U.BOOKING_CREATED_DATE }
32
+ ], [F, B] = S(g[0]), [A, L] = S(T[0]), [E, R] = S(
33
+ k[0]
34
+ ), [b, D] = S(O[0]), [s, p] = S({
35
+ field: "",
36
+ fieldType: F.value,
37
+ value: "",
38
+ whenToWrite: b.value
39
+ });
40
+ return /* @__PURE__ */ c(N, { children: [
41
+ /* @__PURE__ */ e(a.SubSectionHeader, { icon: "star", labelFor: "write-to-object-settings", title: x, children: /* @__PURE__ */ e(
42
+ h,
43
+ {
44
+ checked: w,
45
+ onCheckedChange: y,
46
+ id: "write-to-object-settings",
47
+ size: "sm"
48
+ }
49
+ ) }),
50
+ w ? /* @__PURE__ */ c(a.SubSectionContent, { children: [
51
+ /* @__PURE__ */ c("div", { className: "text-subtle flex gap-3 px-3 py-[6px] text-sm font-medium", children: [
52
+ /* @__PURE__ */ e("div", { className: "flex-1", children: d("field_name") }),
53
+ /* @__PURE__ */ e("div", { className: "flex-1", children: d("field_type") }),
54
+ /* @__PURE__ */ e("div", { className: "flex-1", children: d("value") }),
55
+ /* @__PURE__ */ e("div", { className: "flex-1", children: d("when_to_write") }),
56
+ /* @__PURE__ */ e("div", { className: "w-10" })
57
+ ] }),
58
+ /* @__PURE__ */ c(a.SubSectionNested, { children: [
59
+ Object.keys(t).map((l) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
60
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(f, { value: l, readOnly: !0, size: "sm", className: "w-full" }) }),
61
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
62
+ v,
63
+ {
64
+ size: "sm",
65
+ className: "w-full",
66
+ value: g.find(
67
+ (m) => m.value === t[l].fieldType
68
+ ),
69
+ isDisabled: !0
70
+ }
71
+ ) }),
72
+ /* @__PURE__ */ e("div", { className: "flex-1", children: t[l].fieldType === r.DATE ? /* @__PURE__ */ e(
73
+ v,
74
+ {
75
+ size: "sm",
76
+ className: "w-full",
77
+ value: T.find(
78
+ (m) => m.value === t[l].value
79
+ ),
80
+ isDisabled: !0
81
+ }
82
+ ) : t[l].fieldType === r.CHECKBOX ? /* @__PURE__ */ e(
83
+ v,
84
+ {
85
+ size: "sm",
86
+ className: "w-full",
87
+ value: k.find(
88
+ (m) => m.value === t[l].value
89
+ ),
90
+ isDisabled: !0
91
+ }
92
+ ) : /* @__PURE__ */ e(
93
+ f,
94
+ {
95
+ value: t[l].value,
96
+ readOnly: !0,
97
+ size: "sm",
98
+ className: "w-full"
99
+ }
100
+ ) }),
101
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
102
+ v,
103
+ {
104
+ size: "sm",
105
+ className: "w-full",
106
+ value: O.find(
107
+ (m) => m.value === t[l].whenToWrite
108
+ ),
109
+ isDisabled: !0
110
+ }
111
+ ) }),
112
+ /* @__PURE__ */ e("div", { className: "flex w-10 justify-center", children: /* @__PURE__ */ e(
113
+ z,
114
+ {
115
+ size: "sm",
116
+ StartIcon: "x",
117
+ variant: "icon",
118
+ color: "minimal",
119
+ onClick: () => {
120
+ const m = t;
121
+ delete t[l], o(m);
122
+ }
123
+ }
124
+ ) })
125
+ ] }, l)),
126
+ /* @__PURE__ */ c("div", { className: "flex gap-2", children: [
127
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
128
+ f,
129
+ {
130
+ size: "sm",
131
+ className: "w-full",
132
+ value: s.field,
133
+ onChange: (l) => p({
134
+ ...s,
135
+ field: l.target.value
136
+ })
137
+ }
138
+ ) }),
139
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
140
+ v,
141
+ {
142
+ size: "sm",
143
+ className: "w-full",
144
+ options: g,
145
+ value: F,
146
+ onChange: (l) => {
147
+ l && (B(l), p({
148
+ ...s,
149
+ fieldType: l.value,
150
+ ...l.value === r.DATE && { value: A.value },
151
+ ...l.value === r.CHECKBOX && {
152
+ value: E.value
153
+ }
154
+ }));
155
+ }
156
+ }
157
+ ) }),
158
+ /* @__PURE__ */ e("div", { className: "flex-1", children: s.fieldType === r.DATE ? /* @__PURE__ */ e(
159
+ v,
160
+ {
161
+ size: "sm",
162
+ className: "w-full",
163
+ options: T,
164
+ value: A,
165
+ onChange: (l) => {
166
+ l && (L(l), p({
167
+ ...s,
168
+ value: l.value
169
+ }));
170
+ }
171
+ }
172
+ ) : s.fieldType === r.CHECKBOX ? /* @__PURE__ */ e(
173
+ v,
174
+ {
175
+ size: "sm",
176
+ className: "w-full",
177
+ options: k,
178
+ value: E,
179
+ onChange: (l) => {
180
+ l && (R(l), p({
181
+ ...s,
182
+ value: l.value
183
+ }));
184
+ }
185
+ }
186
+ ) : /* @__PURE__ */ e(
187
+ f,
188
+ {
189
+ size: "sm",
190
+ className: "w-full",
191
+ value: s.value,
192
+ onChange: (l) => p({
193
+ ...s,
194
+ value: l.target.value
195
+ })
196
+ }
197
+ ) }),
198
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
199
+ v,
200
+ {
201
+ size: "sm",
202
+ className: "w-full",
203
+ options: O,
204
+ value: b,
205
+ onChange: (l) => {
206
+ l && (D(l), p({
207
+ ...s,
208
+ whenToWrite: l.value
209
+ }));
210
+ }
211
+ }
212
+ ) }),
213
+ /* @__PURE__ */ e("div", { className: "w-10" })
214
+ ] })
215
+ ] }),
216
+ /* @__PURE__ */ e(
217
+ z,
218
+ {
219
+ className: "text-subtle mt-2 w-fit",
220
+ StartIcon: "plus",
221
+ color: "minimal",
222
+ size: "sm",
223
+ disabled: !(s.field && s.fieldType && s.value !== "" && s.whenToWrite),
224
+ onClick: () => {
225
+ if (Object.keys(t).includes(s.field.trim())) {
226
+ q("Field already exists", "error");
227
+ return;
228
+ }
229
+ o({
230
+ ...t,
231
+ [s.field.trim()]: {
232
+ fieldType: s.fieldType,
233
+ value: s.value,
234
+ whenToWrite: s.whenToWrite
235
+ }
236
+ }), p({
237
+ field: "",
238
+ fieldType: g[0].value,
239
+ value: "",
240
+ whenToWrite: O[0].value
241
+ });
242
+ },
243
+ children: d("add_new_field")
244
+ }
245
+ )
246
+ ] }) : null
247
+ ] });
248
+ }, Ce = function({ app: x, eventType: w }) {
249
+ var V;
250
+ const y = ie.usePathname(), { getAppData: t, setAppData: o, disabled: d } = ce(), { enabled: g, updateEnabled: O } = he(x), k = t("roundRobinLeadSkip"), T = t("roundRobinSkipCheckRecordOn") ?? u.CONTACT, F = t("ifFreeEmailDomainSkipOwnerCheck") ?? !1, B = t("skipContactCreation"), A = t("createLeadIfAccountNull"), L = t("createNewContactUnderAccount"), E = t("createEventOn") ?? u.CONTACT, R = t("onBookingWriteToEventObject") ?? !1, b = t("onBookingWriteToEventObjectMap") ?? {}, D = t("createEventOnLeadCheckForContact") ?? !1, s = t("onBookingChangeRecordOwner") ?? !1, p = t("onBookingChangeRecordOwnerName") ?? [], l = t("sendNoShowAttendeeData") ?? !1, m = t("sendNoShowAttendeeDataField") ?? "", Z = t("onBookingWriteToRecord") ?? !1, J = t("onBookingWriteToRecordFields") ?? {}, Q = t("ignoreGuests") ?? !1, ee = t("roundRobinSkipFallbackToLeadOwner") ?? !1, ne = t("onCancelWriteToEventRecord") ?? !1, le = t("onCancelWriteToEventRecordFields") ?? {}, { t: i } = $(), I = [
251
+ { label: i("contact"), value: u.CONTACT },
252
+ { label: i("salesforce_lead"), value: u.LEAD },
253
+ { label: i("salesforce_contact_under_account"), value: u.ACCOUNT }
254
+ ], [W, ae] = S(
255
+ I.find((n) => n.value === E) ?? I[0]
256
+ ), H = [
257
+ { label: i("contact"), value: u.CONTACT },
258
+ { label: i("salesforce_lead"), value: u.LEAD },
259
+ { label: i("account"), value: u.ACCOUNT }
260
+ ], [P, te] = S(
261
+ H.find((n) => n.value === T) ?? H[0]
262
+ ), [C, j] = S({
263
+ field: "",
264
+ value: ""
265
+ }), X = () => /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
266
+ a.SubSectionHeader,
267
+ {
268
+ icon: "at-sign",
269
+ title: i("salesforce_create_new_contact_under_account"),
270
+ labelFor: "create-new-contact-under-account",
271
+ children: /* @__PURE__ */ e(
272
+ h,
273
+ {
274
+ size: "sm",
275
+ labelOnLeading: !0,
276
+ checked: L,
277
+ onCheckedChange: (n) => {
278
+ o("createNewContactUnderAccount", n);
279
+ }
280
+ }
281
+ )
282
+ }
283
+ ) });
284
+ return /* @__PURE__ */ e(
285
+ ue,
286
+ {
287
+ returnTo: `${se}${y}?tabName=apps`,
288
+ app: x,
289
+ teamId: ((V = w.team) == null ? void 0 : V.id) || void 0,
290
+ switchOnClick: (n) => {
291
+ O(n);
292
+ },
293
+ switchChecked: g,
294
+ hideSettingsIcon: !0,
295
+ children: /* @__PURE__ */ c(a.Content, { children: [
296
+ /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
297
+ a.SubSectionHeader,
298
+ {
299
+ icon: "zap",
300
+ title: i("salesforce_add_attendees_as"),
301
+ justify: "start",
302
+ labelFor: "add-attendees-as",
303
+ children: /* @__PURE__ */ e(
304
+ v,
305
+ {
306
+ size: "sm",
307
+ id: "add-attendees-as",
308
+ className: "w-[200px]",
309
+ options: I,
310
+ value: W,
311
+ onChange: (n) => {
312
+ n && (ae(n), o("createEventOn", n.value));
313
+ }
314
+ }
315
+ )
316
+ }
317
+ ) }),
318
+ /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
319
+ a.SubSectionHeader,
320
+ {
321
+ icon: "user-plus",
322
+ title: i("salesforce_ignore_guests"),
323
+ labelFor: "ignore-guests",
324
+ children: /* @__PURE__ */ e(
325
+ h,
326
+ {
327
+ size: "sm",
328
+ labelOnLeading: !0,
329
+ checked: Q,
330
+ onCheckedChange: (n) => {
331
+ o("ignoreGuests", n);
332
+ }
333
+ }
334
+ )
335
+ }
336
+ ) }),
337
+ W.value === u.CONTACT ? /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
338
+ a.SubSectionHeader,
339
+ {
340
+ icon: "user-plus",
341
+ title: i("skip_contact_creation", { appName: "Salesforce" }),
342
+ labelFor: "skip-contact-creation",
343
+ children: /* @__PURE__ */ e(
344
+ h,
345
+ {
346
+ size: "sm",
347
+ labelOnLeading: !0,
348
+ checked: B,
349
+ onCheckedChange: (n) => {
350
+ o("skipContactCreation", n);
351
+ }
352
+ }
353
+ )
354
+ }
355
+ ) }) : null,
356
+ W.value === u.LEAD ? /* @__PURE__ */ c(N, { children: [
357
+ /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
358
+ a.SubSectionHeader,
359
+ {
360
+ icon: "user-plus",
361
+ title: i("salesforce_create_event_on_contact"),
362
+ labelFor: "create-event-on-contact",
363
+ children: /* @__PURE__ */ e(
364
+ h,
365
+ {
366
+ size: "sm",
367
+ labelOnLeading: !0,
368
+ checked: D,
369
+ onCheckedChange: (n) => {
370
+ o("createEventOnLeadCheckForContact", n);
371
+ }
372
+ }
373
+ )
374
+ }
375
+ ) }),
376
+ /* @__PURE__ */ e(X, {})
377
+ ] }) : null,
378
+ W.value === u.ACCOUNT ? /* @__PURE__ */ c(N, { children: [
379
+ /* @__PURE__ */ e(X, {}),
380
+ /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
381
+ a.SubSectionHeader,
382
+ {
383
+ icon: "user-plus",
384
+ title: i("salesforce_if_account_does_not_exist"),
385
+ labelFor: "create-lead-if-account-null",
386
+ children: /* @__PURE__ */ e(
387
+ h,
388
+ {
389
+ size: "sm",
390
+ labelOnLeading: !0,
391
+ checked: A,
392
+ onCheckedChange: (n) => {
393
+ o("createLeadIfAccountNull", n);
394
+ }
395
+ }
396
+ )
397
+ }
398
+ ) })
399
+ ] }) : null,
400
+ /* @__PURE__ */ c(a.SubSection, { children: [
401
+ /* @__PURE__ */ e(a.SubSectionHeader, { icon: "badge-check", title: i("on_booking_write_to_event_object"), children: /* @__PURE__ */ e(
402
+ h,
403
+ {
404
+ size: "sm",
405
+ labelOnLeading: !0,
406
+ checked: R,
407
+ onCheckedChange: (n) => {
408
+ o("onBookingWriteToEventObject", n);
409
+ }
410
+ }
411
+ ) }),
412
+ R ? /* @__PURE__ */ c(a.SubSectionContent, { children: [
413
+ /* @__PURE__ */ c("div", { className: "text-subtle flex gap-3 px-3 py-[6px] text-sm font-medium", children: [
414
+ /* @__PURE__ */ e("div", { className: "flex-1", children: i("field_name") }),
415
+ /* @__PURE__ */ e("div", { className: "flex-1", children: i("value") }),
416
+ /* @__PURE__ */ e("div", { className: "w-10" })
417
+ ] }),
418
+ /* @__PURE__ */ c(a.SubSectionNested, { children: [
419
+ Object.keys(b).map((n) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
420
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(f, { value: n, readOnly: !0, size: "sm", className: "w-full" }) }),
421
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
422
+ f,
423
+ {
424
+ value: b[n],
425
+ readOnly: !0,
426
+ size: "sm",
427
+ className: "w-full"
428
+ }
429
+ ) }),
430
+ /* @__PURE__ */ e("div", { className: "flex w-10 justify-center", children: /* @__PURE__ */ e(
431
+ z,
432
+ {
433
+ StartIcon: "x",
434
+ variant: "icon",
435
+ size: "sm",
436
+ color: "minimal",
437
+ onClick: () => {
438
+ const oe = b;
439
+ delete b[n], o("onBookingWriteToEventObjectMap", oe);
440
+ }
441
+ }
442
+ ) })
443
+ ] }, n)),
444
+ /* @__PURE__ */ c("div", { className: "mt-2 flex gap-4", children: [
445
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
446
+ f,
447
+ {
448
+ size: "sm",
449
+ className: "w-full",
450
+ value: C.field,
451
+ onChange: (n) => j({
452
+ ...C,
453
+ field: n.target.value
454
+ })
455
+ }
456
+ ) }),
457
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
458
+ f,
459
+ {
460
+ size: "sm",
461
+ className: "w-full",
462
+ value: C.value,
463
+ onChange: (n) => j({
464
+ ...C,
465
+ value: n.target.value
466
+ })
467
+ }
468
+ ) }),
469
+ /* @__PURE__ */ e("div", { className: "w-10" })
470
+ ] })
471
+ ] }),
472
+ /* @__PURE__ */ e(
473
+ z,
474
+ {
475
+ className: "text-subtle mt-2 w-fit",
476
+ size: "sm",
477
+ color: "secondary",
478
+ disabled: !(C.field && C.value),
479
+ onClick: () => {
480
+ if (Object.keys(b).includes(
481
+ C.field.trim()
482
+ )) {
483
+ q("Field already exists", "error");
484
+ return;
485
+ }
486
+ o("onBookingWriteToEventObjectMap", {
487
+ ...b,
488
+ [C.field.trim()]: C.value.trim()
489
+ }), j({ field: "", value: "" });
490
+ },
491
+ children: i("add_new_field")
492
+ }
493
+ )
494
+ ] }) : null
495
+ ] }),
496
+ /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
497
+ Y,
498
+ {
499
+ bookingAction: M.ON_BOOKING,
500
+ optionLabel: i("salesforce_on_booking_write_to_record", { record: E }),
501
+ optionEnabled: Z,
502
+ writeToObjectData: J,
503
+ optionSwitchOnChange: (n) => {
504
+ o("onBookingWriteToRecord", n);
505
+ },
506
+ updateWriteToObjectData: (n) => o("onBookingWriteToRecordFields", n)
507
+ }
508
+ ) }),
509
+ /* @__PURE__ */ c(a.SubSection, { children: [
510
+ /* @__PURE__ */ e(
511
+ a.SubSectionHeader,
512
+ {
513
+ icon: "user-plus",
514
+ title: i("salesforce_change_record_owner_on_booking"),
515
+ labelFor: "change-record-owner-on-booking",
516
+ children: /* @__PURE__ */ e(
517
+ h,
518
+ {
519
+ size: "sm",
520
+ labelOnLeading: !0,
521
+ checked: s,
522
+ onCheckedChange: (n) => {
523
+ o("onBookingChangeRecordOwner", n);
524
+ }
525
+ }
526
+ )
527
+ }
528
+ ),
529
+ s ? /* @__PURE__ */ e(a.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ c("div", { children: [
530
+ /* @__PURE__ */ e(
531
+ G,
532
+ {
533
+ htmlFor: "on-booking-change-record-owner-name",
534
+ className: "text-subtle text-sm font-medium",
535
+ children: i("salesforce_owner_name_to_change")
536
+ }
537
+ ),
538
+ /* @__PURE__ */ e(
539
+ f,
540
+ {
541
+ id: "on-booking-change-record-owner-name",
542
+ size: "sm",
543
+ value: p,
544
+ onChange: (n) => o("onBookingChangeRecordOwnerName", n.target.value)
545
+ }
546
+ )
547
+ ] }) }) : null
548
+ ] }),
549
+ w.schedulingType === de.ROUND_ROBIN ? /* @__PURE__ */ c(N, { children: [
550
+ /* @__PURE__ */ c(a.SubSection, { children: [
551
+ /* @__PURE__ */ e(
552
+ a.SubSectionHeader,
553
+ {
554
+ icon: "users",
555
+ title: i("salesforce_book_directly_with_attendee_owner"),
556
+ labelFor: "book-directly-with-attendee-owner",
557
+ children: /* @__PURE__ */ e(
558
+ h,
559
+ {
560
+ size: "sm",
561
+ id: "book-directly-witha-attendee-owner",
562
+ checked: k,
563
+ onCheckedChange: (n) => {
564
+ o("roundRobinLeadSkip", n), n && o("enabled", n);
565
+ }
566
+ }
567
+ )
568
+ }
569
+ ),
570
+ k ? /* @__PURE__ */ e(a.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ c("div", { children: [
571
+ /* @__PURE__ */ e(
572
+ G,
573
+ {
574
+ htmlFor: "round-robin-skip-check-record-on",
575
+ className: "text-subtle text-sm font-medium",
576
+ children: i("salesforce_check_owner_of")
577
+ }
578
+ ),
579
+ /* @__PURE__ */ e(
580
+ v,
581
+ {
582
+ size: "sm",
583
+ className: "w-60",
584
+ options: H,
585
+ value: P,
586
+ onChange: (n) => {
587
+ n && (te(n), o("roundRobinSkipCheckRecordOn", n.value));
588
+ }
589
+ }
590
+ )
591
+ ] }) }) : null
592
+ ] }),
593
+ /* @__PURE__ */ e(N, { children: k ? /* @__PURE__ */ c(N, { children: [
594
+ P.value === u.CONTACT ? /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
595
+ a.SubSectionHeader,
596
+ {
597
+ icon: "users",
598
+ title: i("salesforce_round_robin_skip_fallback_to_lead_owner"),
599
+ labelFor: "round-robin-skip-fallback-to-lead-owner",
600
+ children: /* @__PURE__ */ e(
601
+ h,
602
+ {
603
+ id: "round-robin-skip-fallback-to-lead-owner",
604
+ size: "sm",
605
+ checked: ee,
606
+ onCheckedChange: (n) => {
607
+ o("roundRobinSkipFallbackToLeadOwner", n);
608
+ }
609
+ }
610
+ )
611
+ }
612
+ ) }) : null,
613
+ /* @__PURE__ */ c(a.SubSection, { children: [
614
+ /* @__PURE__ */ e(
615
+ a.SubSectionHeader,
616
+ {
617
+ icon: "users",
618
+ title: i("salesforce_if_free_email_domain_skip_owner_check"),
619
+ labelFor: "if-free-email-domain-skip-owner-check",
620
+ children: /* @__PURE__ */ e(
621
+ h,
622
+ {
623
+ id: "if-free-email-domain-skip-owner-check",
624
+ size: "sm",
625
+ checked: F,
626
+ onCheckedChange: (n) => {
627
+ o("ifFreeEmailDomainSkipOwnerCheck", n);
628
+ }
629
+ }
630
+ )
631
+ }
632
+ ),
633
+ /* @__PURE__ */ e(re, { severity: "info", title: i("skip_rr_description") })
634
+ ] })
635
+ ] }) : null })
636
+ ] }) : null,
637
+ /* @__PURE__ */ e(a.SubSection, { children: /* @__PURE__ */ e(
638
+ Y,
639
+ {
640
+ bookingAction: M.ON_CANCEL,
641
+ optionLabel: i("salesforce_on_cancel_write_to_event"),
642
+ optionEnabled: ne,
643
+ writeToObjectData: le,
644
+ optionSwitchOnChange: (n) => {
645
+ o("onCancelWriteToEventRecord", n);
646
+ },
647
+ updateWriteToObjectData: (n) => o("onCancelWriteToEventRecordFields", n)
648
+ }
649
+ ) }),
650
+ /* @__PURE__ */ c(a.SubSection, { children: [
651
+ /* @__PURE__ */ e(
652
+ a.SubSectionHeader,
653
+ {
654
+ icon: "calendar",
655
+ title: "Send no show attendee data to event object",
656
+ labelFor: "send-no-show-attendee-data",
657
+ children: /* @__PURE__ */ e(
658
+ h,
659
+ {
660
+ id: "send-no-show-attendee-data",
661
+ size: "sm",
662
+ checked: l,
663
+ onCheckedChange: (n) => {
664
+ o("sendNoShowAttendeeData", n);
665
+ }
666
+ }
667
+ )
668
+ }
669
+ ),
670
+ l ? /* @__PURE__ */ c(a.SubSectionContent, { classNames: { container: "p-3" }, children: [
671
+ /* @__PURE__ */ e(
672
+ G,
673
+ {
674
+ htmlFor: "send-no-show-attendee-data-field-name",
675
+ className: "text-subtle text-sm font-medium",
676
+ children: "Field name to check (must be checkbox data type)"
677
+ }
678
+ ),
679
+ /* @__PURE__ */ e(
680
+ f,
681
+ {
682
+ id: "send-no-show-attendee-data-field-name",
683
+ size: "sm",
684
+ value: m,
685
+ onChange: (n) => o("sendNoShowAttendeeDataField", n.target.value)
686
+ }
687
+ )
688
+ ] }) : null
689
+ ] })
690
+ ] })
691
+ }
692
+ );
693
+ };
694
+ export {
695
+ Ce as default
696
+ };