@calcom/atoms 2.4.0 → 2.6.0
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-D1GVr1DO.js → AddressInput-INmIRs8-.js} +1 -1
- package/dist/{AlbyPriceComponent-B-wbESgj.js → AlbyPriceComponent-C_Gtm7T6.js} +1 -1
- package/dist/{AppCard-D-kSjEGA.js → AppCard-Jly1hUzJ.js} +9 -9
- package/dist/{AppListCardPlatformWrapper-CtfMFKLj.js → AppListCardPlatformWrapper-Dfvg0jJ4.js} +1 -1
- package/dist/AppListCardWebWrapper-5UxMkTRD.js +97 -0
- package/dist/{AppSettingsInterface-CFotsMaY.js → AppSettingsInterface-BW1HEirp.js} +1 -1
- package/dist/{AppSettingsInterface-4eRi58Pn.js → AppSettingsInterface-C_G2HEx1.js} +1 -1
- package/dist/{AppSettingsInterface-CrW3wxR7.js → AppSettingsInterface-DMmIDFez.js} +1 -1
- package/dist/{DateRangePicker-XmWLaFM0.js → DateRangePicker-DYZMYZrR.js} +502 -500
- package/dist/{EventTypeAppCardInterface-CktuX3wJ.js → EventTypeAppCardInterface-5SZquLGh.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DdTrRRx1.js → EventTypeAppCardInterface-AiVLQt6e.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DhGMBirk.js → EventTypeAppCardInterface-B04SMxB_.js} +3 -3
- package/dist/{EventTypeAppCardInterface-Dl9fzQiI.js → EventTypeAppCardInterface-B0Id4aDq.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DbIKdJjd.js → EventTypeAppCardInterface-BF0QRXBm.js} +4 -4
- package/dist/{EventTypeAppCardInterface-z3AKnmGs.js → EventTypeAppCardInterface-BFi1f8EH.js} +3 -3
- package/dist/{EventTypeAppCardInterface-B_j7r80d.js → EventTypeAppCardInterface-Bz6kbQBF.js} +2 -2
- package/dist/EventTypeAppCardInterface-C-9q1Pgv.js +1402 -0
- package/dist/{EventTypeAppCardInterface-hPLiLzB5.js → EventTypeAppCardInterface-C0B8brbX.js} +3 -3
- package/dist/{EventTypeAppCardInterface-xABGgTYw.js → EventTypeAppCardInterface-CPWGyDsB.js} +4 -4
- package/dist/{EventTypeAppCardInterface-CaYgiGUZ.js → EventTypeAppCardInterface-CbAAfPzI.js} +3 -3
- package/dist/{EventTypeAppCardInterface-DcLEZBoW.js → EventTypeAppCardInterface-CcH_pTPb.js} +3 -3
- package/dist/{EventTypeAppCardInterface-DYlGDde7.js → EventTypeAppCardInterface-Ccbh0lE5.js} +4 -4
- package/dist/{EventTypeAppCardInterface-C6X2h6ER.js → EventTypeAppCardInterface-CcfHXA9X.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DL7VnPRK.js → EventTypeAppCardInterface-CgHm_UTp.js} +2 -2
- package/dist/{EventTypeAppCardInterface-DUMRhvMt.js → EventTypeAppCardInterface-DHNaymv9.js} +3 -3
- package/dist/{EventTypeAppCardInterface-nx5WBzB1.js → EventTypeAppCardInterface-DIvOvqNe.js} +3 -3
- package/dist/{EventTypeAppCardInterface-DpzQdnJy.js → EventTypeAppCardInterface-DNd_P6LS.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DtGUGVYW.js → EventTypeAppCardInterface-DOJnmkX5.js} +3 -3
- package/dist/{EventTypeAppCardInterface-BikTDyfY.js → EventTypeAppCardInterface-DQOs5zow.js} +3 -3
- package/dist/{EventTypeAppCardInterface-DII9vKjZ.js → EventTypeAppCardInterface-DiEndqtB.js} +3 -3
- package/dist/{EventTypeAppCardInterface-Bk8a4fRO.js → EventTypeAppCardInterface-DzBaD2iI.js} +4 -4
- package/dist/{EventTypeAppCardInterface-BirSXlmM.js → EventTypeAppCardInterface-FUX1nD4I.js} +3 -3
- package/dist/{EventTypeAppCardInterface-C2IyGqvw.js → EventTypeAppCardInterface-J1sPid30.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DGyf22GF.js → EventTypeAppCardInterface-LlkvSyXU.js} +3 -3
- package/dist/{EventTypeAppCardInterface-6DLZO5NW.js → EventTypeAppCardInterface-VKJISMU_.js} +4 -4
- package/dist/{EventTypeAppCardInterface-BVOAdMSE.js → EventTypeAppCardInterface-mSg8w4Wv.js} +3 -3
- package/dist/{EventTypeAppCardInterface-CyNHO4Sc.js → EventTypeAppCardInterface-oELnGHj7.js} +3 -3
- package/dist/{EventTypeAppSettingsInterface-p-i-OZco.js → EventTypeAppSettingsInterface--bM-v-2f.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-VkvCySRT.js → EventTypeAppSettingsInterface-C2VeNfWl.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-CFdYoo7h.js → EventTypeAppSettingsInterface-CcopfL0O.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-BuDUgb5_.js → EventTypeAppSettingsInterface-CospBDnp.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-CgQfF6hU.js → EventTypeAppSettingsInterface-CotkiiMf.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-DDzHlg7x.js → EventTypeAppSettingsInterface-D-QGHf2b.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-DBknBQyn.js → EventTypeAppSettingsInterface-D7zovxei.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-DK-paoMT.js → EventTypeAppSettingsInterface-DEfLbYcF.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-D5kISd9x.js → EventTypeAppSettingsInterface-DYHjvMy2.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-CpbklJMh.js → EventTypeAppSettingsInterface-DesLYNzu.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-CAiOTU8i.js → EventTypeAppSettingsInterface-DoeUQnIb.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-C8nDmh7G.js → EventTypeAppSettingsInterface-Dq2HBfY2.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-DckxGY96.js → EventTypeAppSettingsInterface-fKNVuyJB.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-xozZX49q.js → EventTypeAppSettingsInterface-qTJxM2CJ.js} +1 -1
- package/dist/{InstallAppButton-B9I6WP_P.js → InstallAppButton-16Gy65tx.js} +1 -1
- package/dist/{InstallAppButton-DphdibIQ.js → InstallAppButton-B68jfFfO.js} +9 -9
- package/dist/{InstallAppButton-BftZd2sh.js → InstallAppButton-Bqr77mlF.js} +1 -1
- package/dist/{PhoneInput-CwJrDjpT.js → PhoneInput-BTpX6Hp6.js} +1 -1
- package/dist/{StripePaymentForm-CqxHoAlR.js → StripePaymentForm-vfC0WlVJ.js} +64 -64
- package/dist/cal-atoms.js +20 -20
- package/dist/{index-BsEjsNhy.js → index-C-6UACoM.js} +2 -2
- package/dist/{index-BYBZ-zEd.js → index-DjKXpoZ-.js} +77078 -79380
- package/dist/packages/dayjs/plugins/business-days-plugin.test.d.ts +2 -0
- package/dist/packages/dayjs/plugins/business-days-plugin.test.d.ts.map +1 -0
- package/dist/packages/features/bookings/Booker/BookerStoreProvider.d.ts +1 -1
- package/dist/packages/features/bookings/Booker/BookerStoreProvider.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/hooks/useAvailableTimeSlots.d.ts +14 -1
- package/dist/packages/features/bookings/Booker/hooks/useAvailableTimeSlots.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/EventManager.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/bookingCreateBodySchema.d.ts +15 -6
- package/dist/packages/features/bookings/lib/bookingCreateBodySchema.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/checkBookingLimits.d.ts +44 -2
- package/dist/packages/features/bookings/lib/checkBookingLimits.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/checkDurationLimits.d.ts +3 -2
- package/dist/packages/features/bookings/lib/checkDurationLimits.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/client/booking-event-form/booking-to-mutation-input-mapper.d.ts +2 -1
- package/dist/packages/features/bookings/lib/client/booking-event-form/booking-to-mutation-input-mapper.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/create-booking.d.ts +11 -8
- package/dist/packages/features/bookings/lib/create-booking.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/create-recurring-booking.d.ts +11 -8
- package/dist/packages/features/bookings/lib/create-recurring-booking.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/get-booking.d.ts +3 -3
- package/dist/packages/features/bookings/lib/get-location-options-for-select.test.d.ts +2 -0
- package/dist/packages/features/bookings/lib/get-location-options-for-select.test.d.ts.map +1 -0
- package/dist/packages/features/bookings/lib/getAllUserBookings.d.ts +22 -9
- package/dist/packages/features/bookings/lib/getAllUserBookings.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getBookingDataSchema.d.ts +5 -2
- package/dist/packages/features/bookings/lib/getBookingDataSchema.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getBookingDataSchemaForApi.d.ts +9 -4
- package/dist/packages/features/bookings/lib/getBookingDataSchemaForApi.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getBookingInfo.d.ts +8 -2
- package/dist/packages/features/bookings/lib/getBookingInfo.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getBookingToDelete.d.ts +7 -7
- package/dist/packages/features/bookings/lib/getLocationOptionsForSelect.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getUserBooking.d.ts +4 -1
- package/dist/packages/features/bookings/lib/getUserBooking.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleCancelBooking.integration-test.d.ts +2 -0
- package/dist/packages/features/bookings/lib/handleCancelBooking.integration-test.d.ts.map +1 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/checkBookingAndDurationLimits.d.ts +24 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/checkBookingAndDurationLimits.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/createBooking.d.ts +3 -2
- package/dist/packages/features/bookings/lib/handleNewBooking/createBooking.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.d.ts +17 -5
- package/dist/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/getBookingData.d.ts +8 -4
- package/dist/packages/features/bookings/lib/handleNewBooking/getBookingData.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/getEventType.d.ts +43 -9
- package/dist/packages/features/bookings/lib/handleNewBooking/getEventType.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.d.ts +17 -5
- package/dist/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts +20 -8
- package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/originalRescheduledBookingUtils.d.ts +14 -12
- package/dist/packages/features/bookings/lib/handleNewBooking/originalRescheduledBookingUtils.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/test/fresh-booking.test.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/test/getNewBookingHandler.d.ts +11 -8
- package/dist/packages/features/bookings/lib/handleNewBooking/test/getNewBookingHandler.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/test/spam-booking.test.d.ts +2 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/test/spam-booking.test.d.ts.map +1 -0
- package/dist/packages/features/bookings/lib/handlePayment.integration-test.d.ts +2 -0
- package/dist/packages/features/bookings/lib/handlePayment.integration-test.d.ts.map +1 -0
- package/dist/packages/features/bookings/lib/handleSeats/create/createNewSeat.d.ts +4 -3
- package/dist/packages/features/bookings/lib/handleSeats/create/createNewSeat.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleSeats/handleSeats.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.d.ts +3 -2
- package/dist/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/payment/getBooking.d.ts +6 -6
- package/dist/packages/features/bookings/lib/requiresConfirmation/getBookingRequest.d.ts +5 -4
- package/dist/packages/features/bookings/lib/requiresConfirmation/getBookingRequest.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/service/InstantBookingCreateService.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/service/InstantBookingCreateService.integration-test.d.ts +2 -0
- package/dist/packages/features/bookings/lib/service/InstantBookingCreateService.integration-test.d.ts.map +1 -0
- package/dist/packages/features/bookings/lib/service/RegularBookingService.d.ts +103 -613
- package/dist/packages/features/bookings/lib/service/RegularBookingService.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/unified-phone-fields/manage-phone-fields.test.d.ts +2 -0
- package/dist/packages/features/bookings/lib/unified-phone-fields/manage-phone-fields.test.d.ts.map +1 -0
- package/dist/packages/features/data-table/__tests__/filterSegments/get-preference.test.d.ts +2 -0
- package/dist/packages/features/data-table/__tests__/filterSegments/get-preference.test.d.ts.map +1 -0
- package/dist/packages/features/data-table/__tests__/filterSegments/get-segments.test.d.ts +2 -0
- package/dist/packages/features/data-table/__tests__/filterSegments/get-segments.test.d.ts.map +1 -0
- package/dist/packages/features/data-table/lib/__tests__/picker-date-constraints.test.d.ts +2 -0
- package/dist/packages/features/data-table/lib/__tests__/picker-date-constraints.test.d.ts.map +1 -0
- package/dist/packages/features/data-table/lib/dateRange.d.ts +22 -1
- package/dist/packages/features/data-table/lib/dateRange.d.ts.map +1 -1
- package/dist/packages/features/data-table/lib/types.d.ts +2 -0
- package/dist/packages/features/data-table/lib/types.d.ts.map +1 -1
- package/dist/packages/features/data-table/lib/utils.test.d.ts +2 -0
- package/dist/packages/features/data-table/lib/utils.test.d.ts.map +1 -0
- package/dist/packages/features/data-table/repositories/filterSegment.d.ts +12 -16
- package/dist/packages/features/data-table/repositories/filterSegment.d.ts.map +1 -1
- package/dist/packages/features/ee/billing/organizations/organization-billing.repository.d.ts +1 -1
- package/dist/packages/features/ee/billing/repository/teamBillingData/PrismaTeamBillingRepository.d.ts +3 -3
- package/dist/packages/features/ee/billing/service/dunning/dunning-state.test.d.ts +2 -0
- package/dist/packages/features/ee/billing/service/dunning/dunning-state.test.d.ts.map +1 -0
- package/dist/packages/features/ee/billing/service/proration/MonthlyProrationService.d.ts +2 -2
- package/dist/packages/features/ee/billing/service/proration/tasker/trigger/processMonthlyProrationBatch.d.ts +1 -1
- package/dist/packages/features/ee/billing/service/seatTracking/SeatChangeTrackingService.d.ts +1 -1
- package/dist/packages/features/ee/billing/service/webhookEvent/__tests__/WebhookEventService.idempotency.integration-test.d.ts +2 -0
- package/dist/packages/features/ee/billing/service/webhookEvent/__tests__/WebhookEventService.idempotency.integration-test.d.ts.map +1 -0
- package/dist/packages/features/ee/round-robin/roundRobinManualReassignment.d.ts +2 -2
- package/dist/packages/features/ee/round-robin/roundRobinManualReassignment.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/action-helper-functions.test.d.ts +2 -0
- package/dist/packages/features/ee/workflows/lib/action-helper-functions.test.d.ts.map +1 -0
- package/dist/packages/features/ee/workflows/lib/reminders/providers/twilio-provider.test.d.ts +2 -0
- package/dist/packages/features/ee/workflows/lib/reminders/providers/twilio-provider.test.d.ts.map +1 -0
- package/dist/packages/features/ee/workflows/lib/reminders/providers/twilioProvider.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/scheduleWorkflowNotifications.integration-test.d.ts +2 -0
- package/dist/packages/features/ee/workflows/lib/scheduleWorkflowNotifications.integration-test.d.ts.map +1 -0
- package/dist/packages/features/ee/workflows/lib/schema.d.ts +4 -4
- package/dist/packages/features/ee/workflows/lib/url-scanner.test.d.ts +2 -0
- package/dist/packages/features/ee/workflows/lib/url-scanner.test.d.ts.map +1 -0
- package/dist/packages/features/ee/workflows/repositories/WorkflowStepRepository.d.ts +3 -3
- package/dist/packages/features/ee/workflows/repositories/workflow-reminder-repository.d.ts +1 -1
- package/dist/packages/features/ee/workflows/repositories/workflow-repository.d.ts +13 -13
- package/dist/packages/features/ee/workflows/repositories/workflow-step-translation-repository.integration-test.d.ts +2 -0
- package/dist/packages/features/ee/workflows/repositories/workflow-step-translation-repository.integration-test.d.ts.map +1 -0
- package/dist/packages/features/eventtypes/components/tabs/availability/EventAvailabilityTab.d.ts +12 -4
- package/dist/packages/features/eventtypes/components/tabs/availability/EventAvailabilityTab.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/tabs/limits/EventLimitsTab.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/tabs/recurring/RecurringEventController.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts +1 -1
- package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/lib/apply-pending-host-changes.d.ts +12 -0
- package/dist/packages/features/eventtypes/lib/apply-pending-host-changes.d.ts.map +1 -0
- package/dist/packages/features/eventtypes/lib/defaultEvents.d.ts +78 -12
- package/dist/packages/features/eventtypes/lib/defaultEvents.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/lib/getEventTypeById.d.ts +31 -13
- package/dist/packages/features/eventtypes/lib/getEventTypeById.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/lib/getEventTypesByViewer.d.ts +1 -1
- package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +78 -308
- package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts +4 -4
- package/dist/packages/features/eventtypes/lib/types.d.ts +36 -0
- package/dist/packages/features/eventtypes/lib/types.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/repositories/EventRepository.d.ts +55 -301
- package/dist/packages/features/eventtypes/repositories/EventRepository.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/repositories/eventTypeRepository.d.ts +113 -49
- package/dist/packages/features/eventtypes/repositories/eventTypeRepository.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/service/EventTypeService.d.ts +15 -0
- package/dist/packages/features/eventtypes/service/EventTypeService.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/store/__tests__/hosts-store.test.d.ts +2 -0
- package/dist/packages/features/eventtypes/store/__tests__/hosts-store.test.d.ts.map +1 -0
- package/dist/packages/features/eventtypes/store/hosts-store-provider.d.ts +7 -0
- package/dist/packages/features/eventtypes/store/hosts-store-provider.d.ts.map +1 -0
- package/dist/packages/features/eventtypes/store/hosts-store.d.ts +25 -0
- package/dist/packages/features/eventtypes/store/hosts-store.d.ts.map +1 -0
- package/dist/packages/features/form-builder/utils/variantsConfig.d.ts.map +1 -1
- package/dist/packages/features/schedules/repositories/ScheduleRepository.d.ts +2 -2
- package/dist/packages/features/schedules/services/ScheduleService.d.ts +5 -2
- package/dist/packages/features/schedules/services/ScheduleService.d.ts.map +1 -1
- package/dist/packages/kysely/types.d.ts +67 -0
- package/dist/packages/kysely/types.d.ts.map +1 -1
- package/dist/packages/platform/atoms/connect/conferencing-apps/hooks/useAtomBulkUpdateEventTypesToDefaultLocation.d.ts +1 -1
- package/dist/packages/platform/atoms/event-types/hooks/use-tabs-navigations.test.d.ts +2 -0
- package/dist/packages/platform/atoms/event-types/hooks/use-tabs-navigations.test.d.ts.map +1 -0
- package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts +26 -9
- 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 -1
- package/dist/packages/platform/atoms/event-types/hooks/useEventTypeForm.d.ts.map +1 -1
- package/dist/packages/platform/atoms/event-types/hooks/useTabsNavigations.d.ts +27 -3
- package/dist/packages/platform/atoms/event-types/hooks/useTabsNavigations.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useCreateBooking.d.ts +11 -8
- package/dist/packages/platform/atoms/hooks/bookings/useCreateBooking.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts +13 -9
- package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useCreateRecurringBooking.d.ts +11 -8
- package/dist/packages/platform/atoms/hooks/bookings/useCreateRecurringBooking.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useGetBookingForReschedule.d.ts +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/event-types/private/useCreateEventType.d.ts +1 -1
- package/dist/packages/platform/atoms/hooks/event-types/private/useCreateTeamEventType.d.ts +1 -1
- package/dist/packages/platform/atoms/hooks/event-types/private/useDeleteEventTypeById.d.ts +1 -1
- package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts +55 -301
- package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/use-atoms-locale.d.ts +3 -0
- package/dist/packages/platform/atoms/hooks/use-atoms-locale.d.ts.map +1 -0
- package/dist/packages/platform/atoms/hooks/useMe.d.ts +1 -1
- package/dist/packages/platform/atoms/hooks/useUpdateUserTimezone.d.ts +1 -1
- package/dist/packages/platform/atoms/onboarding/onboarding-embed.d.ts.map +1 -1
- package/dist/packages/platform/atoms/src/components/ui/dialog.d.ts +4 -4
- package/dist/packages/platform/atoms/src/components/ui/switch.d.ts +1 -1
- package/dist/packages/platform/atoms/src/components/ui/toast.d.ts +5 -5
- package/dist/packages/platform/libraries/oauth.d.ts +1 -1
- package/dist/packages/platform/libraries/oauth.d.ts.map +1 -1
- package/dist/packages/platform/types/me/outputs/me.d.ts +2 -2
- package/dist/packages/platform/types/me.d.ts +2 -2
- package/dist/packages/prisma/zod/inputTypeSchemas/AccessScopeSchema.d.ts +1 -1
- package/dist/packages/prisma/zod/inputTypeSchemas/AccessScopeSchema.d.ts.map +1 -1
- package/dist/packages/prisma/zod/inputTypeSchemas/BookingLimitScalarFieldEnumSchema.d.ts +4 -0
- package/dist/packages/prisma/zod/inputTypeSchemas/BookingLimitScalarFieldEnumSchema.d.ts.map +1 -0
- package/dist/packages/prisma/zod/inputTypeSchemas/BookingScalarFieldEnumSchema.d.ts +1 -1
- package/dist/packages/prisma/zod/inputTypeSchemas/BookingScalarFieldEnumSchema.d.ts.map +1 -1
- package/dist/packages/prisma/zod/inputTypeSchemas/BookingWindowScalarFieldEnumSchema.d.ts +4 -0
- package/dist/packages/prisma/zod/inputTypeSchemas/BookingWindowScalarFieldEnumSchema.d.ts.map +1 -0
- package/dist/packages/prisma/zod/inputTypeSchemas/WebhookTriggerEventsSchema.d.ts +1 -1
- package/dist/packages/prisma/zod/inputTypeSchemas/WebhookTriggerEventsSchema.d.ts.map +1 -1
- package/dist/packages/prisma/zod/inputTypeSchemas/index.d.ts +2 -0
- package/dist/packages/prisma/zod/inputTypeSchemas/index.d.ts.map +1 -1
- package/dist/packages/prisma/zod/modelSchema/AbuseRuleGroupSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/AccessCodeSchema.d.ts +3 -3
- package/dist/packages/prisma/zod/modelSchema/AppSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/AttendeeSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/BookingLimitSchema.d.ts +32 -0
- package/dist/packages/prisma/zod/modelSchema/BookingLimitSchema.d.ts.map +1 -0
- package/dist/packages/prisma/zod/modelSchema/BookingSchema.d.ts +8 -2
- package/dist/packages/prisma/zod/modelSchema/BookingSchema.d.ts.map +1 -1
- package/dist/packages/prisma/zod/modelSchema/BookingSeatSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/BookingWindowSchema.d.ts +75 -0
- package/dist/packages/prisma/zod/modelSchema/BookingWindowSchema.d.ts.map +1 -0
- package/dist/packages/prisma/zod/modelSchema/CalendarCacheEventSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/EventTypeSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/MonthlyProrationSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/OAuthAuthorizationSchema.d.ts +3 -3
- package/dist/packages/prisma/zod/modelSchema/OAuthClientSchema.d.ts +3 -3
- package/dist/packages/prisma/zod/modelSchema/SeatChangeLogSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/TeamSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/UserSchema.d.ts +4 -4
- package/dist/packages/prisma/zod/modelSchema/WebhookSchema.d.ts +3 -3
- package/dist/packages/prisma/zod/modelSchema/WorkflowStepSchema.d.ts +2 -2
- package/dist/packages/prisma/zod/modelSchema/index.d.ts +2 -0
- package/dist/packages/prisma/zod/modelSchema/index.d.ts.map +1 -1
- package/dist/{server.browser-CDJE0vl2.js → server.browser-CCvpIGE0.js} +1 -1
- package/dist/{useIsAppEnabled-2m9tJsEA.js → useIsAppEnabled-BGd8_8Pc.js} +1 -1
- package/package.json +3 -3
- package/dist/AppListCardWebWrapper-BdxlDHBL.js +0 -72
- package/dist/EventTypeAppCardInterface-DOrvvmIe.js +0 -1074
- package/dist/packages/features/bookings/lib/handleNewBooking/test/spam-booking.integration-test.d.ts +0 -2
- package/dist/packages/features/bookings/lib/handleNewBooking/test/spam-booking.integration-test.d.ts.map +0 -1
- package/dist/packages/features/data-table/__tests__/filterSegments/get.test.d.ts +0 -2
- package/dist/packages/features/data-table/__tests__/filterSegments/get.test.d.ts.map +0 -1
|
@@ -0,0 +1,1402 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { S as o, A as ze } from "./AppCard-Jly1hUzJ.js";
|
|
3
|
+
import { u as Ie } from "./useIsAppEnabled-BGd8_8Pc.js";
|
|
4
|
+
import { n as Q, ag as se, d as T, e as k, B as F, ah as N, ai as G, aj as _e, h as z, s as ke, ak as we, a1 as Ke, al as Te, am as Be, an as Le, ao as de, ap as W, aq as We, a9 as De, aa as Ge, ab as He, o as je, p as Ve, ar as A, as as Ue, W as Me, at as he, au as Xe, av as Oe, aw as Ee, ax as Ye, ay as Pe, L as oe, af as $e } from "./index-DjKXpoZ-.js";
|
|
5
|
+
import { useState as y, useRef as Ze, useMemo as qe } from "react";
|
|
6
|
+
const Je = ({
|
|
7
|
+
fieldRules: C,
|
|
8
|
+
updateFieldRules: x
|
|
9
|
+
}) => {
|
|
10
|
+
const { t: d } = Q(), R = [
|
|
11
|
+
{ label: d("salesforce_rr_skip_field_rule_ignore"), value: se.IGNORE },
|
|
12
|
+
{ label: d("salesforce_rr_skip_field_rule_must_include"), value: se.MUST_INCLUDE }
|
|
13
|
+
], [i, c] = y({
|
|
14
|
+
field: "",
|
|
15
|
+
value: "",
|
|
16
|
+
action: se.IGNORE
|
|
17
|
+
}), [s, h] = y(null), [b, S] = y(null), w = (p) => {
|
|
18
|
+
const E = C[p];
|
|
19
|
+
h(p), S({ field: E.field, value: E.value, action: E.action });
|
|
20
|
+
}, O = () => {
|
|
21
|
+
h(null), S(null);
|
|
22
|
+
}, D = () => {
|
|
23
|
+
if (s === null || !b || !b.field.trim() || !b.value.trim()) return;
|
|
24
|
+
const p = [...C];
|
|
25
|
+
p[s] = {
|
|
26
|
+
field: b.field.trim(),
|
|
27
|
+
value: b.value.trim(),
|
|
28
|
+
action: b.action
|
|
29
|
+
}, x(p), O();
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ t(o.SubSection, { children: [
|
|
32
|
+
/* @__PURE__ */ e(
|
|
33
|
+
o.SubSectionHeader,
|
|
34
|
+
{
|
|
35
|
+
icon: "filter",
|
|
36
|
+
title: d("salesforce_rr_skip_field_rules"),
|
|
37
|
+
labelFor: "rr-skip-field-rules",
|
|
38
|
+
children: /* @__PURE__ */ e(I, {})
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ t(o.SubSectionContent, { children: [
|
|
42
|
+
/* @__PURE__ */ t("div", { className: "text-subtle flex gap-3 px-3 py-[6px] text-sm font-medium", children: [
|
|
43
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: d("field_name") }),
|
|
44
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: d("value") }),
|
|
45
|
+
/* @__PURE__ */ e("div", { className: "w-32", children: d("action") }),
|
|
46
|
+
/* @__PURE__ */ e("div", { className: "w-20" })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ t(o.SubSectionNested, { children: [
|
|
49
|
+
C.map((p, E) => {
|
|
50
|
+
const _ = s === E;
|
|
51
|
+
return /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
52
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: _ ? /* @__PURE__ */ e(
|
|
53
|
+
T,
|
|
54
|
+
{
|
|
55
|
+
value: (b == null ? void 0 : b.field) || "",
|
|
56
|
+
onChange: (r) => S((m) => m ? { ...m, field: r.target.value } : null),
|
|
57
|
+
size: "sm",
|
|
58
|
+
className: "w-full"
|
|
59
|
+
}
|
|
60
|
+
) : /* @__PURE__ */ e(T, { value: p.field, readOnly: !0, size: "sm", className: "w-full" }) }),
|
|
61
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: _ ? /* @__PURE__ */ e(
|
|
62
|
+
T,
|
|
63
|
+
{
|
|
64
|
+
value: (b == null ? void 0 : b.value) || "",
|
|
65
|
+
onChange: (r) => S((m) => m ? { ...m, value: r.target.value } : null),
|
|
66
|
+
size: "sm",
|
|
67
|
+
className: "w-full"
|
|
68
|
+
}
|
|
69
|
+
) : /* @__PURE__ */ e(T, { value: p.value, readOnly: !0, size: "sm", className: "w-full" }) }),
|
|
70
|
+
/* @__PURE__ */ e("div", { className: "w-32", children: _ ? /* @__PURE__ */ e(
|
|
71
|
+
k,
|
|
72
|
+
{
|
|
73
|
+
size: "sm",
|
|
74
|
+
className: "w-full",
|
|
75
|
+
options: R,
|
|
76
|
+
value: R.find((r) => r.value === (b == null ? void 0 : b.action)),
|
|
77
|
+
onChange: (r) => {
|
|
78
|
+
r && S((m) => m ? { ...m, action: r.value } : null);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
) : /* @__PURE__ */ e(
|
|
82
|
+
k,
|
|
83
|
+
{
|
|
84
|
+
size: "sm",
|
|
85
|
+
className: "w-full",
|
|
86
|
+
options: R,
|
|
87
|
+
value: R.find((r) => r.value === p.action),
|
|
88
|
+
isDisabled: !0
|
|
89
|
+
}
|
|
90
|
+
) }),
|
|
91
|
+
/* @__PURE__ */ e("div", { className: "flex w-20 justify-center gap-1", children: _ ? /* @__PURE__ */ t(I, { children: [
|
|
92
|
+
/* @__PURE__ */ e(
|
|
93
|
+
F,
|
|
94
|
+
{
|
|
95
|
+
size: "sm",
|
|
96
|
+
StartIcon: "check",
|
|
97
|
+
variant: "icon",
|
|
98
|
+
color: "primary",
|
|
99
|
+
onClick: () => D()
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
/* @__PURE__ */ e(
|
|
103
|
+
F,
|
|
104
|
+
{
|
|
105
|
+
size: "sm",
|
|
106
|
+
StartIcon: "x",
|
|
107
|
+
variant: "icon",
|
|
108
|
+
color: "secondary",
|
|
109
|
+
onClick: () => O()
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }) : /* @__PURE__ */ t(I, { children: [
|
|
113
|
+
/* @__PURE__ */ e(
|
|
114
|
+
F,
|
|
115
|
+
{
|
|
116
|
+
size: "sm",
|
|
117
|
+
StartIcon: "pencil",
|
|
118
|
+
variant: "icon",
|
|
119
|
+
color: "minimal",
|
|
120
|
+
onClick: () => w(E)
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
/* @__PURE__ */ e(
|
|
124
|
+
F,
|
|
125
|
+
{
|
|
126
|
+
StartIcon: "x",
|
|
127
|
+
variant: "icon",
|
|
128
|
+
size: "sm",
|
|
129
|
+
color: "minimal",
|
|
130
|
+
onClick: () => {
|
|
131
|
+
x(C.filter((r, m) => m !== E));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
] }) })
|
|
136
|
+
] }, `${p.field}-${E}`);
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ t("div", { className: "mt-2 flex gap-2", children: [
|
|
139
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
|
|
140
|
+
T,
|
|
141
|
+
{
|
|
142
|
+
size: "sm",
|
|
143
|
+
className: "w-full",
|
|
144
|
+
placeholder: d("salesforce_field_name_placeholder"),
|
|
145
|
+
value: i.field,
|
|
146
|
+
onChange: (p) => c({ ...i, field: p.target.value })
|
|
147
|
+
}
|
|
148
|
+
) }),
|
|
149
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
|
|
150
|
+
T,
|
|
151
|
+
{
|
|
152
|
+
size: "sm",
|
|
153
|
+
className: "w-full",
|
|
154
|
+
placeholder: d("value"),
|
|
155
|
+
value: i.value,
|
|
156
|
+
onChange: (p) => c({ ...i, value: p.target.value })
|
|
157
|
+
}
|
|
158
|
+
) }),
|
|
159
|
+
/* @__PURE__ */ e("div", { className: "w-32", children: /* @__PURE__ */ e(
|
|
160
|
+
k,
|
|
161
|
+
{
|
|
162
|
+
size: "sm",
|
|
163
|
+
className: "w-full",
|
|
164
|
+
options: R,
|
|
165
|
+
value: R.find((p) => p.value === i.action),
|
|
166
|
+
onChange: (p) => {
|
|
167
|
+
p && c({ ...i, action: p.value });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
) }),
|
|
171
|
+
/* @__PURE__ */ e("div", { className: "w-20" })
|
|
172
|
+
] })
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ e(
|
|
175
|
+
F,
|
|
176
|
+
{
|
|
177
|
+
className: "text-subtle mt-2 w-fit",
|
|
178
|
+
StartIcon: "plus",
|
|
179
|
+
color: "minimal",
|
|
180
|
+
size: "sm",
|
|
181
|
+
disabled: !(i.field && i.value),
|
|
182
|
+
onClick: () => {
|
|
183
|
+
x([
|
|
184
|
+
...C,
|
|
185
|
+
{
|
|
186
|
+
field: i.field.trim(),
|
|
187
|
+
value: i.value.trim(),
|
|
188
|
+
action: i.action
|
|
189
|
+
}
|
|
190
|
+
]), c({ field: "", value: "", action: se.IGNORE });
|
|
191
|
+
},
|
|
192
|
+
children: d("add_new_rule")
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
] })
|
|
196
|
+
] });
|
|
197
|
+
};
|
|
198
|
+
var J = /* @__PURE__ */ ((C) => (C.ON_BOOKING = "on_booking", C.ON_CANCEL = "on_cancel", C))(J || {});
|
|
199
|
+
const ce = ({
|
|
200
|
+
bookingAction: C,
|
|
201
|
+
optionLabel: x,
|
|
202
|
+
optionEnabled: d,
|
|
203
|
+
optionSwitchOnChange: R,
|
|
204
|
+
writeToObjectData: i,
|
|
205
|
+
updateWriteToObjectData: c,
|
|
206
|
+
hideWhenToWrite: s = !1
|
|
207
|
+
}) => {
|
|
208
|
+
const { t: h } = Q(), b = [
|
|
209
|
+
{ label: h("text"), value: N.TEXT },
|
|
210
|
+
{ label: h("date"), value: N.DATE },
|
|
211
|
+
{ label: h("phone").charAt(0).toUpperCase() + h("phone").slice(1), value: N.PHONE },
|
|
212
|
+
{ label: h("checkbox"), value: N.CHECKBOX },
|
|
213
|
+
{ label: h("picklist"), value: N.PICKLIST },
|
|
214
|
+
{ label: h("custom"), value: N.CUSTOM }
|
|
215
|
+
], S = [
|
|
216
|
+
{ label: h("only_if_field_is_empty"), value: G.FIELD_EMPTY },
|
|
217
|
+
...C === "on_cancel" ? [{ label: h("salesforce_on_every_cancellation"), value: G.EVERY_BOOKING }] : [{ label: h("on_every_booking"), value: G.EVERY_BOOKING }]
|
|
218
|
+
], w = [
|
|
219
|
+
{ label: h("true"), value: !0 },
|
|
220
|
+
{ label: h("false"), value: !1 }
|
|
221
|
+
], O = [
|
|
222
|
+
...C === "on_cancel" ? [{ label: h("booking_cancel_date"), value: _e.BOOKING_CANCEL_DATE }] : [],
|
|
223
|
+
{ label: h("booking_start_date"), value: _e.BOOKING_START_DATE },
|
|
224
|
+
{ label: h("booking_created_date"), value: _e.BOOKING_CREATED_DATE }
|
|
225
|
+
], [D, p] = y(b[0]), [E, _] = y(O[0]), [r, m] = y(
|
|
226
|
+
w[0]
|
|
227
|
+
), [M, ee] = y(S[0]), [H, le] = y({}), [X, K] = y(
|
|
228
|
+
{}
|
|
229
|
+
), [ae, j] = y(null), [ne, V] = y({}), [Y, P] = y(!1), [g, L] = y({
|
|
230
|
+
field: "",
|
|
231
|
+
fieldType: D.value,
|
|
232
|
+
value: "",
|
|
233
|
+
whenToWrite: s ? G.EVERY_BOOKING : M.value
|
|
234
|
+
}), $ = () => {
|
|
235
|
+
L({
|
|
236
|
+
field: "",
|
|
237
|
+
fieldType: b[0].value,
|
|
238
|
+
value: "",
|
|
239
|
+
whenToWrite: s ? G.EVERY_BOOKING : S[0].value
|
|
240
|
+
}), p(b[0]), _(O[0]), m(w[0]), ee(S[0]), j(null);
|
|
241
|
+
}, ue = () => {
|
|
242
|
+
if (Object.keys(i).includes(g.field.trim())) {
|
|
243
|
+
j("Field already exists");
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const l = we(g);
|
|
247
|
+
if (l) {
|
|
248
|
+
j(l);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
j(null), c({
|
|
252
|
+
...i,
|
|
253
|
+
[g.field.trim()]: {
|
|
254
|
+
fieldType: g.fieldType,
|
|
255
|
+
value: g.value,
|
|
256
|
+
whenToWrite: s ? G.EVERY_BOOKING : g.whenToWrite
|
|
257
|
+
}
|
|
258
|
+
}), $(), P(!1);
|
|
259
|
+
}, te = () => {
|
|
260
|
+
$(), P(!1);
|
|
261
|
+
}, ie = (l) => {
|
|
262
|
+
Object.keys(H).forEach((f) => {
|
|
263
|
+
H[f] && f !== l && B(f);
|
|
264
|
+
}), le((f) => ({ ...f, [l]: !0 })), K((f) => ({
|
|
265
|
+
...f,
|
|
266
|
+
[l]: {
|
|
267
|
+
field: l,
|
|
268
|
+
fieldType: i[l].fieldType,
|
|
269
|
+
value: i[l].value,
|
|
270
|
+
whenToWrite: i[l].whenToWrite
|
|
271
|
+
}
|
|
272
|
+
}));
|
|
273
|
+
}, B = (l) => {
|
|
274
|
+
le((f) => ({ ...f, [l]: !1 })), K((f) => {
|
|
275
|
+
const u = { ...f };
|
|
276
|
+
return delete u[l], u;
|
|
277
|
+
});
|
|
278
|
+
}, fe = (l) => {
|
|
279
|
+
const f = X[l];
|
|
280
|
+
if (!f) return;
|
|
281
|
+
if (!f.field.trim()) {
|
|
282
|
+
V((v) => ({ ...v, [l]: "Field name cannot be empty" }));
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (f.field !== l && Object.keys(i).includes(f.field.trim())) {
|
|
286
|
+
V((v) => ({ ...v, [l]: "Field already exists" }));
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
const u = we(f);
|
|
290
|
+
if (u) {
|
|
291
|
+
V((v) => ({ ...v, [l]: u }));
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
V((v) => ({ ...v, [l]: null }));
|
|
295
|
+
const a = { ...i };
|
|
296
|
+
f.field !== l && delete a[l], a[f.field.trim()] = {
|
|
297
|
+
fieldType: f.fieldType,
|
|
298
|
+
value: f.value,
|
|
299
|
+
whenToWrite: s ? G.EVERY_BOOKING : f.whenToWrite
|
|
300
|
+
}, c(a), B(l);
|
|
301
|
+
};
|
|
302
|
+
return /* @__PURE__ */ t(I, { children: [
|
|
303
|
+
/* @__PURE__ */ e(o.SubSectionHeader, { icon: "star", labelFor: "write-to-object-settings", title: x, children: /* @__PURE__ */ e(
|
|
304
|
+
z,
|
|
305
|
+
{
|
|
306
|
+
checked: d,
|
|
307
|
+
onCheckedChange: R,
|
|
308
|
+
id: "write-to-object-settings",
|
|
309
|
+
size: "sm"
|
|
310
|
+
}
|
|
311
|
+
) }),
|
|
312
|
+
d ? /* @__PURE__ */ t(o.SubSectionContent, { children: [
|
|
313
|
+
(Object.keys(i).length > 0 || Y) && /* @__PURE__ */ t(I, { children: [
|
|
314
|
+
/* @__PURE__ */ t("div", { className: "text-subtle flex gap-3 px-3 py-[6px] text-sm font-medium", children: [
|
|
315
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: h("field_name") }),
|
|
316
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: h("field_type") }),
|
|
317
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: h("value") }),
|
|
318
|
+
!s && /* @__PURE__ */ e("div", { className: "flex-1", children: h("when_to_write") }),
|
|
319
|
+
/* @__PURE__ */ e("div", { className: "w-20" })
|
|
320
|
+
] }),
|
|
321
|
+
/* @__PURE__ */ t(o.SubSectionNested, { children: [
|
|
322
|
+
Object.keys(i).map((l) => {
|
|
323
|
+
const f = H[l], u = X[l];
|
|
324
|
+
return /* @__PURE__ */ t("div", { children: [
|
|
325
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
326
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: f ? /* @__PURE__ */ e(
|
|
327
|
+
T,
|
|
328
|
+
{
|
|
329
|
+
value: (u == null ? void 0 : u.field) || l,
|
|
330
|
+
onChange: (a) => K((v) => ({
|
|
331
|
+
...v,
|
|
332
|
+
[l]: { ...u, field: a.target.value }
|
|
333
|
+
})),
|
|
334
|
+
size: "sm",
|
|
335
|
+
className: "w-full"
|
|
336
|
+
}
|
|
337
|
+
) : /* @__PURE__ */ e(T, { value: l, readOnly: !0, size: "sm", className: "w-full" }) }),
|
|
338
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: f ? /* @__PURE__ */ e(
|
|
339
|
+
k,
|
|
340
|
+
{
|
|
341
|
+
size: "sm",
|
|
342
|
+
className: "w-full",
|
|
343
|
+
options: b,
|
|
344
|
+
value: b.find((a) => a.value === (u == null ? void 0 : u.fieldType)),
|
|
345
|
+
onChange: (a) => {
|
|
346
|
+
a && K((v) => ({
|
|
347
|
+
...v,
|
|
348
|
+
[l]: {
|
|
349
|
+
...u,
|
|
350
|
+
fieldType: a.value,
|
|
351
|
+
...a.value === N.DATE && {
|
|
352
|
+
value: O[0].value
|
|
353
|
+
},
|
|
354
|
+
...a.value === N.CHECKBOX && {
|
|
355
|
+
value: w[0].value
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}));
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
) : /* @__PURE__ */ e(
|
|
362
|
+
k,
|
|
363
|
+
{
|
|
364
|
+
size: "sm",
|
|
365
|
+
className: "w-full",
|
|
366
|
+
value: b.find(
|
|
367
|
+
(a) => a.value === i[l].fieldType
|
|
368
|
+
),
|
|
369
|
+
isDisabled: !0
|
|
370
|
+
}
|
|
371
|
+
) }),
|
|
372
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: f ? (u == null ? void 0 : u.fieldType) === N.DATE ? /* @__PURE__ */ e(
|
|
373
|
+
k,
|
|
374
|
+
{
|
|
375
|
+
size: "sm",
|
|
376
|
+
className: "w-full",
|
|
377
|
+
options: O,
|
|
378
|
+
value: O.find((a) => a.value === u.value),
|
|
379
|
+
onChange: (a) => {
|
|
380
|
+
a && K((v) => ({
|
|
381
|
+
...v,
|
|
382
|
+
[l]: { ...u, value: a.value }
|
|
383
|
+
}));
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
) : (u == null ? void 0 : u.fieldType) === N.CHECKBOX ? /* @__PURE__ */ e(
|
|
387
|
+
k,
|
|
388
|
+
{
|
|
389
|
+
size: "sm",
|
|
390
|
+
className: "w-full",
|
|
391
|
+
options: w,
|
|
392
|
+
value: w.find((a) => a.value === u.value),
|
|
393
|
+
onChange: (a) => {
|
|
394
|
+
a && K((v) => ({
|
|
395
|
+
...v,
|
|
396
|
+
[l]: { ...u, value: a.value }
|
|
397
|
+
}));
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
) : /* @__PURE__ */ e(
|
|
401
|
+
T,
|
|
402
|
+
{
|
|
403
|
+
value: (u == null ? void 0 : u.value) || "",
|
|
404
|
+
onChange: (a) => K((v) => ({
|
|
405
|
+
...v,
|
|
406
|
+
[l]: { ...u, value: a.target.value }
|
|
407
|
+
})),
|
|
408
|
+
size: "sm",
|
|
409
|
+
className: "w-full"
|
|
410
|
+
}
|
|
411
|
+
) : i[l].fieldType === N.DATE ? /* @__PURE__ */ e(
|
|
412
|
+
k,
|
|
413
|
+
{
|
|
414
|
+
size: "sm",
|
|
415
|
+
className: "w-full",
|
|
416
|
+
value: O.find(
|
|
417
|
+
(a) => a.value === i[l].value
|
|
418
|
+
),
|
|
419
|
+
isDisabled: !0
|
|
420
|
+
}
|
|
421
|
+
) : i[l].fieldType === N.CHECKBOX ? /* @__PURE__ */ e(
|
|
422
|
+
k,
|
|
423
|
+
{
|
|
424
|
+
size: "sm",
|
|
425
|
+
className: "w-full",
|
|
426
|
+
value: w.find(
|
|
427
|
+
(a) => a.value === i[l].value
|
|
428
|
+
),
|
|
429
|
+
isDisabled: !0
|
|
430
|
+
}
|
|
431
|
+
) : /* @__PURE__ */ e(
|
|
432
|
+
T,
|
|
433
|
+
{
|
|
434
|
+
value: i[l].value,
|
|
435
|
+
readOnly: !0,
|
|
436
|
+
size: "sm",
|
|
437
|
+
className: "w-full"
|
|
438
|
+
}
|
|
439
|
+
) }),
|
|
440
|
+
!s && /* @__PURE__ */ e("div", { className: "flex-1", children: f ? /* @__PURE__ */ e(
|
|
441
|
+
k,
|
|
442
|
+
{
|
|
443
|
+
size: "sm",
|
|
444
|
+
className: "w-full",
|
|
445
|
+
options: S,
|
|
446
|
+
value: S.find(
|
|
447
|
+
(a) => a.value === (u == null ? void 0 : u.whenToWrite)
|
|
448
|
+
),
|
|
449
|
+
onChange: (a) => {
|
|
450
|
+
a && K((v) => ({
|
|
451
|
+
...v,
|
|
452
|
+
[l]: { ...u, whenToWrite: a.value }
|
|
453
|
+
}));
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
) : /* @__PURE__ */ e(
|
|
457
|
+
k,
|
|
458
|
+
{
|
|
459
|
+
size: "sm",
|
|
460
|
+
className: "w-full",
|
|
461
|
+
value: S.find(
|
|
462
|
+
(a) => a.value === i[l].whenToWrite
|
|
463
|
+
),
|
|
464
|
+
isDisabled: !0
|
|
465
|
+
}
|
|
466
|
+
) }),
|
|
467
|
+
/* @__PURE__ */ e("div", { className: "flex w-20 justify-center gap-1", children: f ? /* @__PURE__ */ t(I, { children: [
|
|
468
|
+
/* @__PURE__ */ e(
|
|
469
|
+
F,
|
|
470
|
+
{
|
|
471
|
+
size: "sm",
|
|
472
|
+
StartIcon: "check",
|
|
473
|
+
variant: "icon",
|
|
474
|
+
color: "primary",
|
|
475
|
+
onClick: () => fe(l)
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
/* @__PURE__ */ e(
|
|
479
|
+
F,
|
|
480
|
+
{
|
|
481
|
+
size: "sm",
|
|
482
|
+
StartIcon: "x",
|
|
483
|
+
variant: "icon",
|
|
484
|
+
color: "secondary",
|
|
485
|
+
onClick: () => B(l)
|
|
486
|
+
}
|
|
487
|
+
)
|
|
488
|
+
] }) : /* @__PURE__ */ t(I, { children: [
|
|
489
|
+
/* @__PURE__ */ e(
|
|
490
|
+
F,
|
|
491
|
+
{
|
|
492
|
+
size: "sm",
|
|
493
|
+
StartIcon: "pencil",
|
|
494
|
+
variant: "icon",
|
|
495
|
+
color: "minimal",
|
|
496
|
+
onClick: () => ie(l)
|
|
497
|
+
}
|
|
498
|
+
),
|
|
499
|
+
/* @__PURE__ */ e(
|
|
500
|
+
F,
|
|
501
|
+
{
|
|
502
|
+
size: "sm",
|
|
503
|
+
StartIcon: "x",
|
|
504
|
+
variant: "icon",
|
|
505
|
+
color: "minimal",
|
|
506
|
+
onClick: () => {
|
|
507
|
+
const a = { ...i };
|
|
508
|
+
delete a[l], c(a);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
] }) })
|
|
513
|
+
] }),
|
|
514
|
+
f && ne[l] && /* @__PURE__ */ e(ke, { severity: "error", className: "mt-1", message: ne[l] })
|
|
515
|
+
] }, l);
|
|
516
|
+
}),
|
|
517
|
+
Y && /* @__PURE__ */ t("div", { children: [
|
|
518
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
519
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
|
|
520
|
+
T,
|
|
521
|
+
{
|
|
522
|
+
size: "sm",
|
|
523
|
+
className: "w-full",
|
|
524
|
+
value: g.field,
|
|
525
|
+
placeholder: h("field_name"),
|
|
526
|
+
onChange: (l) => L({
|
|
527
|
+
...g,
|
|
528
|
+
field: l.target.value
|
|
529
|
+
})
|
|
530
|
+
}
|
|
531
|
+
) }),
|
|
532
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
|
|
533
|
+
k,
|
|
534
|
+
{
|
|
535
|
+
size: "sm",
|
|
536
|
+
className: "w-full",
|
|
537
|
+
options: b,
|
|
538
|
+
value: D,
|
|
539
|
+
onChange: (l) => {
|
|
540
|
+
l && (p(l), L({
|
|
541
|
+
...g,
|
|
542
|
+
fieldType: l.value,
|
|
543
|
+
...l.value === N.DATE && {
|
|
544
|
+
value: E.value
|
|
545
|
+
},
|
|
546
|
+
...l.value === N.CHECKBOX && {
|
|
547
|
+
value: r.value
|
|
548
|
+
}
|
|
549
|
+
}));
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
) }),
|
|
553
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: g.fieldType === N.DATE ? /* @__PURE__ */ e(
|
|
554
|
+
k,
|
|
555
|
+
{
|
|
556
|
+
size: "sm",
|
|
557
|
+
className: "w-full",
|
|
558
|
+
options: O,
|
|
559
|
+
value: E,
|
|
560
|
+
onChange: (l) => {
|
|
561
|
+
l && (_(l), L({
|
|
562
|
+
...g,
|
|
563
|
+
value: l.value
|
|
564
|
+
}));
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
) : g.fieldType === N.CHECKBOX ? /* @__PURE__ */ e(
|
|
568
|
+
k,
|
|
569
|
+
{
|
|
570
|
+
size: "sm",
|
|
571
|
+
className: "w-full",
|
|
572
|
+
options: w,
|
|
573
|
+
value: r,
|
|
574
|
+
onChange: (l) => {
|
|
575
|
+
l && (m(l), L({
|
|
576
|
+
...g,
|
|
577
|
+
value: l.value
|
|
578
|
+
}));
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
) : /* @__PURE__ */ e(
|
|
582
|
+
T,
|
|
583
|
+
{
|
|
584
|
+
size: "sm",
|
|
585
|
+
className: "w-full",
|
|
586
|
+
value: g.value,
|
|
587
|
+
placeholder: h("value"),
|
|
588
|
+
onChange: (l) => L({
|
|
589
|
+
...g,
|
|
590
|
+
value: l.target.value
|
|
591
|
+
})
|
|
592
|
+
}
|
|
593
|
+
) }),
|
|
594
|
+
!s && /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
|
|
595
|
+
k,
|
|
596
|
+
{
|
|
597
|
+
size: "sm",
|
|
598
|
+
className: "w-full",
|
|
599
|
+
options: S,
|
|
600
|
+
value: M,
|
|
601
|
+
onChange: (l) => {
|
|
602
|
+
l && (ee(l), L({
|
|
603
|
+
...g,
|
|
604
|
+
whenToWrite: l.value
|
|
605
|
+
}));
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
) }),
|
|
609
|
+
/* @__PURE__ */ t("div", { className: "flex w-20 justify-center gap-1", children: [
|
|
610
|
+
/* @__PURE__ */ e(
|
|
611
|
+
F,
|
|
612
|
+
{
|
|
613
|
+
size: "sm",
|
|
614
|
+
StartIcon: "check",
|
|
615
|
+
variant: "icon",
|
|
616
|
+
color: "primary",
|
|
617
|
+
disabled: !(g.field && g.fieldType && g.value !== "" && g.whenToWrite),
|
|
618
|
+
onClick: ue
|
|
619
|
+
}
|
|
620
|
+
),
|
|
621
|
+
/* @__PURE__ */ e(
|
|
622
|
+
F,
|
|
623
|
+
{
|
|
624
|
+
size: "sm",
|
|
625
|
+
StartIcon: "x",
|
|
626
|
+
variant: "icon",
|
|
627
|
+
color: "secondary",
|
|
628
|
+
onClick: te
|
|
629
|
+
}
|
|
630
|
+
)
|
|
631
|
+
] })
|
|
632
|
+
] }),
|
|
633
|
+
ae && /* @__PURE__ */ e(ke, { severity: "error", className: "mt-1", message: ae })
|
|
634
|
+
] })
|
|
635
|
+
] })
|
|
636
|
+
] }),
|
|
637
|
+
!Y && /* @__PURE__ */ e(
|
|
638
|
+
F,
|
|
639
|
+
{
|
|
640
|
+
className: "text-subtle mt-2 w-fit",
|
|
641
|
+
StartIcon: "plus",
|
|
642
|
+
color: "minimal",
|
|
643
|
+
size: "sm",
|
|
644
|
+
onClick: () => {
|
|
645
|
+
$(), P(!0);
|
|
646
|
+
},
|
|
647
|
+
children: h("add_new_field")
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
] }) : null
|
|
651
|
+
] });
|
|
652
|
+
}, re = {
|
|
653
|
+
bookerCountryFieldId: "country",
|
|
654
|
+
bookerStateFieldId: "state",
|
|
655
|
+
bookerZipFieldId: "zip",
|
|
656
|
+
bookerSubRegionFieldId: "sub_region"
|
|
657
|
+
}, be = {
|
|
658
|
+
[W.SUB_REGION]: {
|
|
659
|
+
labelKey: "salesforce_rule_sub_region",
|
|
660
|
+
descKey: "salesforce_rule_sub_region_desc",
|
|
661
|
+
categoryKey: "salesforce_tiebreaker_category_geo",
|
|
662
|
+
categoryVariant: "blue"
|
|
663
|
+
},
|
|
664
|
+
[W.COUNTRY_STATE_ZIP]: {
|
|
665
|
+
labelKey: "salesforce_rule_country_state_zip",
|
|
666
|
+
descKey: "salesforce_rule_country_state_zip_desc",
|
|
667
|
+
categoryKey: "salesforce_tiebreaker_category_geo",
|
|
668
|
+
categoryVariant: "blue"
|
|
669
|
+
},
|
|
670
|
+
[W.COUNTRY_STATE]: {
|
|
671
|
+
labelKey: "salesforce_rule_country_state",
|
|
672
|
+
descKey: "salesforce_rule_country_state_desc",
|
|
673
|
+
categoryKey: "salesforce_tiebreaker_category_geo",
|
|
674
|
+
categoryVariant: "blue"
|
|
675
|
+
},
|
|
676
|
+
[W.COUNTRY]: {
|
|
677
|
+
labelKey: "salesforce_rule_country",
|
|
678
|
+
descKey: "salesforce_rule_country_desc",
|
|
679
|
+
categoryKey: "salesforce_tiebreaker_category_geo",
|
|
680
|
+
categoryVariant: "blue"
|
|
681
|
+
},
|
|
682
|
+
[W.CHILD_ACCOUNTS_MAX]: {
|
|
683
|
+
labelKey: "salesforce_rule_child_accounts",
|
|
684
|
+
descKey: "salesforce_rule_child_accounts_desc",
|
|
685
|
+
categoryKey: "salesforce_tiebreaker_category_size",
|
|
686
|
+
categoryVariant: "green"
|
|
687
|
+
},
|
|
688
|
+
[W.OPPORTUNITIES_MAX]: {
|
|
689
|
+
labelKey: "salesforce_rule_opportunities",
|
|
690
|
+
descKey: "salesforce_rule_opportunities_desc",
|
|
691
|
+
categoryKey: "salesforce_tiebreaker_category_size",
|
|
692
|
+
categoryVariant: "green"
|
|
693
|
+
},
|
|
694
|
+
[W.CONTACTS_MAX]: {
|
|
695
|
+
labelKey: "salesforce_rule_contacts",
|
|
696
|
+
descKey: "salesforce_rule_contacts_desc",
|
|
697
|
+
categoryKey: "salesforce_tiebreaker_category_size",
|
|
698
|
+
categoryVariant: "green"
|
|
699
|
+
},
|
|
700
|
+
[W.LAST_ACTIVITY_MAX]: {
|
|
701
|
+
labelKey: "salesforce_rule_last_activity",
|
|
702
|
+
descKey: "salesforce_rule_last_activity_desc",
|
|
703
|
+
categoryKey: "salesforce_tiebreaker_category_recency",
|
|
704
|
+
categoryVariant: "orange"
|
|
705
|
+
},
|
|
706
|
+
[W.CREATED_DATE_MIN]: {
|
|
707
|
+
labelKey: "salesforce_rule_created_date",
|
|
708
|
+
descKey: "salesforce_rule_created_date_desc",
|
|
709
|
+
categoryKey: "salesforce_tiebreaker_category_age",
|
|
710
|
+
categoryVariant: "gray"
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
function Qe() {
|
|
714
|
+
return Te.map((C) => ({ id: C, enabled: !0 }));
|
|
715
|
+
}
|
|
716
|
+
function el() {
|
|
717
|
+
return [
|
|
718
|
+
{
|
|
719
|
+
labelKey: "salesforce_geo_field_country",
|
|
720
|
+
descKey: "salesforce_geo_field_country_desc",
|
|
721
|
+
identifier: re.bookerCountryFieldId,
|
|
722
|
+
usedBy: [
|
|
723
|
+
"salesforce_rule_country",
|
|
724
|
+
"salesforce_rule_country_state",
|
|
725
|
+
"salesforce_rule_country_state_zip"
|
|
726
|
+
],
|
|
727
|
+
ipFallback: !0
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
labelKey: "salesforce_geo_field_state",
|
|
731
|
+
descKey: "salesforce_geo_field_state_desc",
|
|
732
|
+
identifier: re.bookerStateFieldId,
|
|
733
|
+
usedBy: ["salesforce_rule_country_state", "salesforce_rule_country_state_zip"],
|
|
734
|
+
ipFallback: !0
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
labelKey: "salesforce_geo_field_zip",
|
|
738
|
+
descKey: "salesforce_geo_field_zip_desc",
|
|
739
|
+
identifier: re.bookerZipFieldId,
|
|
740
|
+
usedBy: ["salesforce_rule_country_state_zip"],
|
|
741
|
+
ipFallback: !1
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
labelKey: "salesforce_geo_field_sub_region",
|
|
745
|
+
descKey: "salesforce_geo_field_sub_region_desc",
|
|
746
|
+
identifier: re.bookerSubRegionFieldId,
|
|
747
|
+
usedBy: ["salesforce_rule_sub_region"],
|
|
748
|
+
ipFallback: !1
|
|
749
|
+
}
|
|
750
|
+
];
|
|
751
|
+
}
|
|
752
|
+
const ll = ({
|
|
753
|
+
open: C,
|
|
754
|
+
onOpenChange: x
|
|
755
|
+
}) => {
|
|
756
|
+
const { t: d } = Q(), R = el();
|
|
757
|
+
return /* @__PURE__ */ e(We, { open: C, onOpenChange: x, children: /* @__PURE__ */ t(De, { enableOverflow: !0, type: "creation", className: "sm:max-w-[640px]", children: [
|
|
758
|
+
/* @__PURE__ */ t("div", { children: [
|
|
759
|
+
/* @__PURE__ */ e("h1", { className: "w-full text-xl font-semibold", children: d("salesforce_geo_fields_dialog_title") }),
|
|
760
|
+
/* @__PURE__ */ e("p", { className: "text-subtle mt-2 text-sm", children: d("salesforce_geo_fields_dialog_intro") }),
|
|
761
|
+
/* @__PURE__ */ t("ul", { className: "text-emphasis ml-5 mt-3 list-disc text-sm", children: [
|
|
762
|
+
/* @__PURE__ */ e("li", { children: d("salesforce_geo_fields_dialog_hint_convention") }),
|
|
763
|
+
/* @__PURE__ */ e("li", { children: d("salesforce_geo_fields_dialog_hint_ip_fallback") }),
|
|
764
|
+
/* @__PURE__ */ e("li", { children: d("salesforce_geo_fields_dialog_hint_priority") })
|
|
765
|
+
] }),
|
|
766
|
+
/* @__PURE__ */ e("div", { className: "divide-subtle mt-6 divide-y rounded-md border border-subtle", children: R.map((i) => /* @__PURE__ */ t("div", { className: "p-4", children: [
|
|
767
|
+
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
768
|
+
/* @__PURE__ */ e("span", { className: "text-default text-sm font-semibold", children: d(i.labelKey) }),
|
|
769
|
+
i.identifier ? /* @__PURE__ */ e("code", { className: "rounded bg-subtle px-2 py-0.5 text-emphasis text-xs", children: i.identifier }) : null,
|
|
770
|
+
i.ipFallback ? /* @__PURE__ */ e(de, { variant: "blue", children: d("salesforce_geo_fields_dialog_ip_fallback_badge") }) : null
|
|
771
|
+
] }),
|
|
772
|
+
/* @__PURE__ */ e("p", { className: "text-subtle mt-1 text-sm", children: d(i.descKey) }),
|
|
773
|
+
/* @__PURE__ */ t("div", { className: "mt-2 flex flex-wrap items-center gap-1 text-subtle text-xs", children: [
|
|
774
|
+
/* @__PURE__ */ e("span", { children: d("salesforce_geo_fields_dialog_used_by") }),
|
|
775
|
+
i.usedBy.map((c, s) => /* @__PURE__ */ t("span", { className: "text-emphasis", children: [
|
|
776
|
+
d(c),
|
|
777
|
+
s < i.usedBy.length - 1 ? "," : null
|
|
778
|
+
] }, c))
|
|
779
|
+
] })
|
|
780
|
+
] }, i.labelKey)) })
|
|
781
|
+
] }),
|
|
782
|
+
/* @__PURE__ */ e(Ge, { showDivider: !0, children: /* @__PURE__ */ e(He, { color: "primary" }) })
|
|
783
|
+
] }) });
|
|
784
|
+
}, al = ({
|
|
785
|
+
rules: C,
|
|
786
|
+
onChange: x
|
|
787
|
+
}) => {
|
|
788
|
+
const { t: d } = Q(), [R] = Ke(), i = C ?? Qe(), [c, s] = y(!1), [h, b] = y(!1), S = new Set(i.map((_) => _.id)), w = Te.filter((_) => !S.has(_)), O = (_, r) => {
|
|
789
|
+
const m = [...i];
|
|
790
|
+
[m[_], m[r]] = [m[r], m[_]], x(m);
|
|
791
|
+
}, D = (_) => {
|
|
792
|
+
x(i.filter((r, m) => m !== _));
|
|
793
|
+
}, p = (_) => {
|
|
794
|
+
x([...i, { id: _, enabled: !0 }]), s(!1);
|
|
795
|
+
}, E = i.some(
|
|
796
|
+
(_) => {
|
|
797
|
+
var r;
|
|
798
|
+
return ((r = be[_.id]) == null ? void 0 : r.categoryKey) === "salesforce_tiebreaker_category_geo";
|
|
799
|
+
}
|
|
800
|
+
);
|
|
801
|
+
return /* @__PURE__ */ t("div", { className: "mt-3", children: [
|
|
802
|
+
/* @__PURE__ */ e("p", { className: "mb-3 text-sm text-subtle", children: d("salesforce_tiebreaker_rules_description") }),
|
|
803
|
+
E ? /* @__PURE__ */ e(
|
|
804
|
+
"button",
|
|
805
|
+
{
|
|
806
|
+
type: "button",
|
|
807
|
+
className: "mb-3 text-sm text-emphasis underline underline-offset-2 hover:text-default",
|
|
808
|
+
onClick: () => b(!0),
|
|
809
|
+
children: d("salesforce_how_to_use_geo_fields_link")
|
|
810
|
+
}
|
|
811
|
+
) : null,
|
|
812
|
+
/* @__PURE__ */ e(ll, { open: h, onOpenChange: b }),
|
|
813
|
+
/* @__PURE__ */ e("ul", { ref: R, className: "divide-y divide-subtle rounded-md border border-subtle", children: i.map((_, r) => {
|
|
814
|
+
const m = be[_.id];
|
|
815
|
+
return m ? /* @__PURE__ */ t(
|
|
816
|
+
"li",
|
|
817
|
+
{
|
|
818
|
+
className: "group relative flex items-center justify-between p-4 transition hover:bg-cal-muted",
|
|
819
|
+
children: [
|
|
820
|
+
r > 0 && /* @__PURE__ */ e(
|
|
821
|
+
"button",
|
|
822
|
+
{
|
|
823
|
+
type: "button",
|
|
824
|
+
className: "invisible absolute -left-[12px] -mt-4 mb-4 -ml-4 hidden h-6 w-6 scale-0 items-center justify-center rounded-md border border-subtle bg-default p-1 text-muted transition-all hover:border-emphasis hover:text-emphasis hover:shadow group-hover:visible group-hover:scale-100 sm:ml-0 sm:flex",
|
|
825
|
+
onClick: () => O(r, r - 1),
|
|
826
|
+
children: /* @__PURE__ */ e(Be, { className: "h-5 w-5" })
|
|
827
|
+
}
|
|
828
|
+
),
|
|
829
|
+
r < i.length - 1 && /* @__PURE__ */ e(
|
|
830
|
+
"button",
|
|
831
|
+
{
|
|
832
|
+
type: "button",
|
|
833
|
+
className: "invisible absolute -left-[12px] mt-8 -ml-4 hidden h-6 w-6 scale-0 items-center justify-center rounded-md border border-subtle bg-default p-1 text-muted transition-all hover:border-emphasis hover:text-emphasis hover:shadow group-hover:visible group-hover:scale-100 sm:ml-0 sm:flex",
|
|
834
|
+
onClick: () => O(r, r + 1),
|
|
835
|
+
children: /* @__PURE__ */ e(Le, { className: "h-5 w-5" })
|
|
836
|
+
}
|
|
837
|
+
),
|
|
838
|
+
/* @__PURE__ */ t("div", { children: [
|
|
839
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
840
|
+
/* @__PURE__ */ e("span", { className: "font-semibold text-default text-sm", children: d(m.labelKey) }),
|
|
841
|
+
/* @__PURE__ */ e(de, { variant: m.categoryVariant, children: d(m.categoryKey) }),
|
|
842
|
+
/* @__PURE__ */ e(de, { variant: "grayWithoutHover", children: d("salesforce_tiebreaker_priority", { priority: r + 1 }) })
|
|
843
|
+
] }),
|
|
844
|
+
/* @__PURE__ */ e("p", { className: "max-w-[280px] pt-1 text-sm text-subtle sm:max-w-[500px]", children: d(m.descKey) })
|
|
845
|
+
] }),
|
|
846
|
+
/* @__PURE__ */ e(
|
|
847
|
+
F,
|
|
848
|
+
{
|
|
849
|
+
color: "destructive",
|
|
850
|
+
variant: "icon",
|
|
851
|
+
"data-testid": "delete-tiebreaker-rule",
|
|
852
|
+
StartIcon: "trash-2",
|
|
853
|
+
onClick: () => D(r)
|
|
854
|
+
}
|
|
855
|
+
)
|
|
856
|
+
]
|
|
857
|
+
},
|
|
858
|
+
_.id
|
|
859
|
+
) : null;
|
|
860
|
+
}) }),
|
|
861
|
+
w.length > 0 && /* @__PURE__ */ t("div", { className: "relative mt-3", children: [
|
|
862
|
+
/* @__PURE__ */ e(
|
|
863
|
+
F,
|
|
864
|
+
{
|
|
865
|
+
type: "button",
|
|
866
|
+
color: "minimal",
|
|
867
|
+
size: "sm",
|
|
868
|
+
StartIcon: "plus",
|
|
869
|
+
onClick: () => s(!c),
|
|
870
|
+
children: d("salesforce_add_tiebreaker")
|
|
871
|
+
}
|
|
872
|
+
),
|
|
873
|
+
c && /* @__PURE__ */ e("ul", { className: "absolute z-10 mt-1 w-80 rounded-md border border-subtle bg-default shadow-lg", children: w.map((_) => {
|
|
874
|
+
const r = be[_];
|
|
875
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ t(
|
|
876
|
+
"button",
|
|
877
|
+
{
|
|
878
|
+
type: "button",
|
|
879
|
+
className: "w-full px-3 py-2.5 text-left hover:bg-muted",
|
|
880
|
+
onClick: () => p(_),
|
|
881
|
+
children: [
|
|
882
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
883
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-default text-sm", children: d(r.labelKey) }),
|
|
884
|
+
/* @__PURE__ */ e(de, { variant: r.categoryVariant, children: d(r.categoryKey) })
|
|
885
|
+
] }),
|
|
886
|
+
/* @__PURE__ */ e("p", { className: "mt-0.5 text-subtle text-xs", children: d(r.descKey) })
|
|
887
|
+
]
|
|
888
|
+
}
|
|
889
|
+
) }, _);
|
|
890
|
+
}) })
|
|
891
|
+
] }),
|
|
892
|
+
/* @__PURE__ */ t("div", { className: "mt-3 flex items-center gap-1 text-subtle text-xs", children: [
|
|
893
|
+
/* @__PURE__ */ e("span", { children: "↓" }),
|
|
894
|
+
/* @__PURE__ */ e("span", { children: d("salesforce_tiebreaker_fallback") })
|
|
895
|
+
] })
|
|
896
|
+
] });
|
|
897
|
+
}, nl = {}, rl = function({
|
|
898
|
+
app: x,
|
|
899
|
+
eventType: d,
|
|
900
|
+
onAppInstallSuccess: R
|
|
901
|
+
}) {
|
|
902
|
+
var ge, Ce;
|
|
903
|
+
const i = je.usePathname(), { getAppData: c, setAppData: s, disabled: h } = Ve(), { enabled: b, updateEnabled: S } = Ie(x), w = c("roundRobinLeadSkip"), O = c("roundRobinSkipCheckRecordOn") ?? A.CONTACT, D = c("ifFreeEmailDomainSkipOwnerCheck") ?? !1, p = c("skipContactCreation"), E = c("createLeadIfAccountNull"), _ = c("createNewContactUnderAccount"), r = c("createEventOn") ?? A.CONTACT, m = c("onBookingWriteToEventObject") ?? !1, M = c("onBookingWriteToEventObjectMap") ?? nl, ee = c("createEventOnLeadCheckForContact") ?? !1, H = c("onBookingChangeRecordOwner") ?? !1, le = c("onBookingChangeRecordOwnerName") ?? [], X = c("sendNoShowAttendeeData") ?? !1, K = c("sendNoShowAttendeeDataField") ?? "", ae = c("onBookingWriteToRecord") ?? !1, j = c("onBookingWriteToRecordFields") ?? {}, ne = c("ignoreGuests") ?? !1, V = c("roundRobinSkipFallbackToLeadOwner") ?? !1, Y = c("onCancelWriteToEventRecord") ?? !1, P = c("onCancelWriteToEventRecordFields") ?? {}, g = c("onCancelWriteToRecord") ?? !1, L = c("onCancelWriteToRecordFields") ?? {}, $ = c("rrSkipFieldRules") ?? [], ue = c("excludeAccountRecordTypes") ?? [], [te, ie] = y(() => ue.join(", ")), B = c("lastSyncError"), fe = c("enableFuzzyDomainMatching") ?? !1, l = c("tiebreakerRules"), f = !l || l.length > 0, u = Ze(
|
|
904
|
+
l && l.length > 0 ? l : void 0
|
|
905
|
+
);
|
|
906
|
+
l && l.length > 0 && (u.current = l);
|
|
907
|
+
const { t: a } = Q(), v = [
|
|
908
|
+
{ label: a("contact"), value: A.CONTACT },
|
|
909
|
+
{ label: a("salesforce_lead"), value: A.LEAD },
|
|
910
|
+
{ label: a("salesforce_contact_under_account"), value: A.ACCOUNT }
|
|
911
|
+
], [U, xe] = y(
|
|
912
|
+
v.find((n) => n.value === r) ?? v[0]
|
|
913
|
+
), me = [
|
|
914
|
+
{ label: a("contact"), value: A.CONTACT },
|
|
915
|
+
{ label: a("salesforce_lead"), value: A.LEAD },
|
|
916
|
+
{ label: a("account"), value: A.ACCOUNT }
|
|
917
|
+
], [pe, Re] = y(
|
|
918
|
+
me.find((n) => n.value === O) ?? me[0]
|
|
919
|
+
), { normalizedEventObjectMap: Ae, hasLegacyEventFields: Fe } = qe(() => {
|
|
920
|
+
const n = M, Z = {};
|
|
921
|
+
let Ne = !1;
|
|
922
|
+
for (const [ye, q] of Object.entries(n))
|
|
923
|
+
if (Ue(q))
|
|
924
|
+
Z[ye] = q;
|
|
925
|
+
else {
|
|
926
|
+
Ne = !0;
|
|
927
|
+
const Se = typeof q == "boolean";
|
|
928
|
+
Z[ye] = {
|
|
929
|
+
value: Se ? q : String(q ?? ""),
|
|
930
|
+
fieldType: Se ? N.CHECKBOX : N.TEXT,
|
|
931
|
+
whenToWrite: G.EVERY_BOOKING
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
return { normalizedEventObjectMap: Z, hasLegacyEventFields: Ne };
|
|
935
|
+
}, [M]), ve = () => /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
936
|
+
o.SubSectionHeader,
|
|
937
|
+
{
|
|
938
|
+
icon: "at-sign",
|
|
939
|
+
title: a("salesforce_create_new_contact_under_account"),
|
|
940
|
+
labelFor: "create-new-contact-under-account",
|
|
941
|
+
children: /* @__PURE__ */ e(
|
|
942
|
+
z,
|
|
943
|
+
{
|
|
944
|
+
size: "sm",
|
|
945
|
+
labelOnLeading: !0,
|
|
946
|
+
checked: _,
|
|
947
|
+
onCheckedChange: (n) => {
|
|
948
|
+
s("createNewContactUnderAccount", n);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
)
|
|
952
|
+
}
|
|
953
|
+
) });
|
|
954
|
+
return /* @__PURE__ */ e(
|
|
955
|
+
ze,
|
|
956
|
+
{
|
|
957
|
+
onAppInstallSuccess: R,
|
|
958
|
+
returnTo: `${Me}${i}?tabName=apps`,
|
|
959
|
+
app: x,
|
|
960
|
+
teamId: ((ge = d.team) == null ? void 0 : ge.id) || void 0,
|
|
961
|
+
switchOnClick: (n) => {
|
|
962
|
+
S(n);
|
|
963
|
+
},
|
|
964
|
+
switchChecked: b,
|
|
965
|
+
hideSettingsIcon: !0,
|
|
966
|
+
children: /* @__PURE__ */ t(o.Content, { children: [
|
|
967
|
+
B && /* @__PURE__ */ t(he, { variant: "error", className: "mb-4", children: [
|
|
968
|
+
/* @__PURE__ */ e(Xe, { className: "size-4" }),
|
|
969
|
+
/* @__PURE__ */ e(Oe, { children: a("salesforce_sync_failure", { errorCode: B.errorCode }) }),
|
|
970
|
+
/* @__PURE__ */ e(Ee, { children: `${B.errorMessage}${(Ce = B.droppedFields) != null && Ce.length ? ` (${a("salesforce_dropped_fields")}: ${B.droppedFields.join(", ")})` : ""} — ${new Date(B.timestamp).toLocaleString()}` }),
|
|
971
|
+
/* @__PURE__ */ e(Ye, { children: /* @__PURE__ */ e(
|
|
972
|
+
"button",
|
|
973
|
+
{
|
|
974
|
+
type: "button",
|
|
975
|
+
className: "text-sm font-medium underline",
|
|
976
|
+
onClick: () => s("lastSyncError", null),
|
|
977
|
+
children: a("dismiss")
|
|
978
|
+
}
|
|
979
|
+
) })
|
|
980
|
+
] }),
|
|
981
|
+
/* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
982
|
+
o.SubSectionHeader,
|
|
983
|
+
{
|
|
984
|
+
icon: "zap",
|
|
985
|
+
title: a("salesforce_add_attendees_as"),
|
|
986
|
+
justify: "start",
|
|
987
|
+
labelFor: "add-attendees-as",
|
|
988
|
+
children: /* @__PURE__ */ e(
|
|
989
|
+
k,
|
|
990
|
+
{
|
|
991
|
+
size: "sm",
|
|
992
|
+
id: "add-attendees-as",
|
|
993
|
+
className: "w-[200px]",
|
|
994
|
+
options: v,
|
|
995
|
+
value: U,
|
|
996
|
+
onChange: (n) => {
|
|
997
|
+
n && (xe(n), s("createEventOn", n.value));
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
)
|
|
1001
|
+
}
|
|
1002
|
+
) }),
|
|
1003
|
+
/* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1004
|
+
o.SubSectionHeader,
|
|
1005
|
+
{
|
|
1006
|
+
icon: "user-plus",
|
|
1007
|
+
title: a("salesforce_ignore_guests"),
|
|
1008
|
+
labelFor: "ignore-guests",
|
|
1009
|
+
children: /* @__PURE__ */ e(
|
|
1010
|
+
z,
|
|
1011
|
+
{
|
|
1012
|
+
size: "sm",
|
|
1013
|
+
labelOnLeading: !0,
|
|
1014
|
+
checked: ne,
|
|
1015
|
+
onCheckedChange: (n) => {
|
|
1016
|
+
s("ignoreGuests", n);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
)
|
|
1020
|
+
}
|
|
1021
|
+
) }),
|
|
1022
|
+
U.value === A.CONTACT ? /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1023
|
+
o.SubSectionHeader,
|
|
1024
|
+
{
|
|
1025
|
+
icon: "user-plus",
|
|
1026
|
+
title: a("skip_contact_creation", { appName: "Salesforce" }),
|
|
1027
|
+
labelFor: "skip-contact-creation",
|
|
1028
|
+
children: /* @__PURE__ */ e(
|
|
1029
|
+
z,
|
|
1030
|
+
{
|
|
1031
|
+
size: "sm",
|
|
1032
|
+
labelOnLeading: !0,
|
|
1033
|
+
checked: p,
|
|
1034
|
+
onCheckedChange: (n) => {
|
|
1035
|
+
s("skipContactCreation", n);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
)
|
|
1039
|
+
}
|
|
1040
|
+
) }) : null,
|
|
1041
|
+
U.value === A.LEAD ? /* @__PURE__ */ t(I, { children: [
|
|
1042
|
+
/* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1043
|
+
o.SubSectionHeader,
|
|
1044
|
+
{
|
|
1045
|
+
icon: "user-plus",
|
|
1046
|
+
title: a("salesforce_create_event_on_contact"),
|
|
1047
|
+
labelFor: "create-event-on-contact",
|
|
1048
|
+
children: /* @__PURE__ */ e(
|
|
1049
|
+
z,
|
|
1050
|
+
{
|
|
1051
|
+
size: "sm",
|
|
1052
|
+
labelOnLeading: !0,
|
|
1053
|
+
checked: ee,
|
|
1054
|
+
onCheckedChange: (n) => {
|
|
1055
|
+
s("createEventOnLeadCheckForContact", n);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
)
|
|
1059
|
+
}
|
|
1060
|
+
) }),
|
|
1061
|
+
/* @__PURE__ */ e(ve, {})
|
|
1062
|
+
] }) : null,
|
|
1063
|
+
U.value === A.ACCOUNT ? /* @__PURE__ */ t(I, { children: [
|
|
1064
|
+
/* @__PURE__ */ e(ve, {}),
|
|
1065
|
+
/* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1066
|
+
o.SubSectionHeader,
|
|
1067
|
+
{
|
|
1068
|
+
icon: "user-plus",
|
|
1069
|
+
title: a("salesforce_if_account_does_not_exist"),
|
|
1070
|
+
labelFor: "create-lead-if-account-null",
|
|
1071
|
+
children: /* @__PURE__ */ e(
|
|
1072
|
+
z,
|
|
1073
|
+
{
|
|
1074
|
+
size: "sm",
|
|
1075
|
+
labelOnLeading: !0,
|
|
1076
|
+
checked: E,
|
|
1077
|
+
onCheckedChange: (n) => {
|
|
1078
|
+
s("createLeadIfAccountNull", n);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
)
|
|
1082
|
+
}
|
|
1083
|
+
) })
|
|
1084
|
+
] }) : null,
|
|
1085
|
+
(U.value === A.ACCOUNT || U.value === A.LEAD) && /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1086
|
+
o.SubSectionHeader,
|
|
1087
|
+
{
|
|
1088
|
+
icon: "search",
|
|
1089
|
+
title: a("salesforce_enable_fuzzy_domain_matching"),
|
|
1090
|
+
labelFor: "enable-fuzzy-domain-matching",
|
|
1091
|
+
children: /* @__PURE__ */ e(
|
|
1092
|
+
z,
|
|
1093
|
+
{
|
|
1094
|
+
size: "sm",
|
|
1095
|
+
id: "enable-fuzzy-domain-matching",
|
|
1096
|
+
labelOnLeading: !0,
|
|
1097
|
+
checked: fe,
|
|
1098
|
+
onCheckedChange: (n) => {
|
|
1099
|
+
s("enableFuzzyDomainMatching", n);
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
)
|
|
1103
|
+
}
|
|
1104
|
+
) }),
|
|
1105
|
+
/* @__PURE__ */ t(o.SubSection, { children: [
|
|
1106
|
+
/* @__PURE__ */ e(
|
|
1107
|
+
ce,
|
|
1108
|
+
{
|
|
1109
|
+
bookingAction: J.ON_BOOKING,
|
|
1110
|
+
optionLabel: a("on_booking_write_to_event_object"),
|
|
1111
|
+
optionEnabled: m,
|
|
1112
|
+
optionSwitchOnChange: (n) => {
|
|
1113
|
+
s("onBookingWriteToEventObject", n);
|
|
1114
|
+
},
|
|
1115
|
+
writeToObjectData: Ae,
|
|
1116
|
+
updateWriteToObjectData: (n) => s("onBookingWriteToEventObjectMap", n),
|
|
1117
|
+
hideWhenToWrite: !0
|
|
1118
|
+
}
|
|
1119
|
+
),
|
|
1120
|
+
m && Fe && /* @__PURE__ */ t(he, { variant: "warning", className: "mt-2", children: [
|
|
1121
|
+
/* @__PURE__ */ e(Pe, { className: "size-4" }),
|
|
1122
|
+
/* @__PURE__ */ e(Ee, { children: a("salesforce_legacy_event_fields_warning") })
|
|
1123
|
+
] })
|
|
1124
|
+
] }),
|
|
1125
|
+
/* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1126
|
+
ce,
|
|
1127
|
+
{
|
|
1128
|
+
bookingAction: J.ON_BOOKING,
|
|
1129
|
+
optionLabel: a("salesforce_on_booking_write_to_record", { record: r }),
|
|
1130
|
+
optionEnabled: ae,
|
|
1131
|
+
writeToObjectData: j,
|
|
1132
|
+
optionSwitchOnChange: (n) => {
|
|
1133
|
+
s("onBookingWriteToRecord", n);
|
|
1134
|
+
},
|
|
1135
|
+
updateWriteToObjectData: (n) => s("onBookingWriteToRecordFields", n)
|
|
1136
|
+
}
|
|
1137
|
+
) }),
|
|
1138
|
+
/* @__PURE__ */ t(o.SubSection, { children: [
|
|
1139
|
+
/* @__PURE__ */ e(
|
|
1140
|
+
o.SubSectionHeader,
|
|
1141
|
+
{
|
|
1142
|
+
icon: "user-plus",
|
|
1143
|
+
title: a("salesforce_change_record_owner_on_booking"),
|
|
1144
|
+
labelFor: "change-record-owner-on-booking",
|
|
1145
|
+
children: /* @__PURE__ */ e(
|
|
1146
|
+
z,
|
|
1147
|
+
{
|
|
1148
|
+
size: "sm",
|
|
1149
|
+
labelOnLeading: !0,
|
|
1150
|
+
checked: H,
|
|
1151
|
+
onCheckedChange: (n) => {
|
|
1152
|
+
s("onBookingChangeRecordOwner", n);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
)
|
|
1156
|
+
}
|
|
1157
|
+
),
|
|
1158
|
+
H ? /* @__PURE__ */ e(o.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ t("div", { children: [
|
|
1159
|
+
/* @__PURE__ */ e(
|
|
1160
|
+
oe,
|
|
1161
|
+
{
|
|
1162
|
+
htmlFor: "on-booking-change-record-owner-name",
|
|
1163
|
+
className: "text-subtle text-sm font-medium",
|
|
1164
|
+
children: a("salesforce_owner_name_to_change")
|
|
1165
|
+
}
|
|
1166
|
+
),
|
|
1167
|
+
/* @__PURE__ */ e(
|
|
1168
|
+
T,
|
|
1169
|
+
{
|
|
1170
|
+
id: "on-booking-change-record-owner-name",
|
|
1171
|
+
size: "sm",
|
|
1172
|
+
value: le,
|
|
1173
|
+
onChange: (n) => s("onBookingChangeRecordOwnerName", n.target.value)
|
|
1174
|
+
}
|
|
1175
|
+
)
|
|
1176
|
+
] }) }) : null
|
|
1177
|
+
] }),
|
|
1178
|
+
/* @__PURE__ */ t(o.SubSection, { children: [
|
|
1179
|
+
/* @__PURE__ */ e(
|
|
1180
|
+
o.SubSectionHeader,
|
|
1181
|
+
{
|
|
1182
|
+
icon: "filter",
|
|
1183
|
+
title: a("salesforce_exclude_record_types"),
|
|
1184
|
+
justify: "start",
|
|
1185
|
+
children: null
|
|
1186
|
+
}
|
|
1187
|
+
),
|
|
1188
|
+
/* @__PURE__ */ e(o.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ t("div", { children: [
|
|
1189
|
+
/* @__PURE__ */ e(oe, { htmlFor: "exclude-account-record-types", className: "text-subtle text-sm font-medium", children: a("salesforce_exclude_record_types_description") }),
|
|
1190
|
+
/* @__PURE__ */ e(
|
|
1191
|
+
T,
|
|
1192
|
+
{
|
|
1193
|
+
id: "exclude-account-record-types",
|
|
1194
|
+
size: "sm",
|
|
1195
|
+
placeholder: "Partner/Alliance, Vendor",
|
|
1196
|
+
value: te,
|
|
1197
|
+
onChange: (n) => ie(n.target.value),
|
|
1198
|
+
onBlur: () => {
|
|
1199
|
+
const n = te.split(",").map((Z) => Z.trim()).filter(Boolean);
|
|
1200
|
+
s("excludeAccountRecordTypes", n), ie(n.join(", "));
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
)
|
|
1204
|
+
] }) })
|
|
1205
|
+
] }),
|
|
1206
|
+
/* @__PURE__ */ t(o.SubSection, { children: [
|
|
1207
|
+
/* @__PURE__ */ e(
|
|
1208
|
+
o.SubSectionHeader,
|
|
1209
|
+
{
|
|
1210
|
+
icon: "sliders-vertical",
|
|
1211
|
+
title: a("salesforce_tiebreaker_rules"),
|
|
1212
|
+
labelFor: "tiebreaker-rules-toggle",
|
|
1213
|
+
children: /* @__PURE__ */ e(
|
|
1214
|
+
z,
|
|
1215
|
+
{
|
|
1216
|
+
size: "sm",
|
|
1217
|
+
id: "tiebreaker-rules-toggle",
|
|
1218
|
+
labelOnLeading: !0,
|
|
1219
|
+
checked: f,
|
|
1220
|
+
onCheckedChange: (n) => {
|
|
1221
|
+
n ? s("tiebreakerRules", u.current ?? void 0) : s("tiebreakerRules", []);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
)
|
|
1225
|
+
}
|
|
1226
|
+
),
|
|
1227
|
+
f && /* @__PURE__ */ e(o.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ e(
|
|
1228
|
+
al,
|
|
1229
|
+
{
|
|
1230
|
+
rules: l,
|
|
1231
|
+
onChange: (n) => s("tiebreakerRules", n)
|
|
1232
|
+
}
|
|
1233
|
+
) })
|
|
1234
|
+
] }),
|
|
1235
|
+
d.schedulingType === $e.ROUND_ROBIN ? /* @__PURE__ */ t(I, { children: [
|
|
1236
|
+
/* @__PURE__ */ t(o.SubSection, { children: [
|
|
1237
|
+
/* @__PURE__ */ e(
|
|
1238
|
+
o.SubSectionHeader,
|
|
1239
|
+
{
|
|
1240
|
+
icon: "users",
|
|
1241
|
+
title: a("salesforce_book_directly_with_attendee_owner"),
|
|
1242
|
+
labelFor: "book-directly-with-attendee-owner",
|
|
1243
|
+
children: /* @__PURE__ */ e(
|
|
1244
|
+
z,
|
|
1245
|
+
{
|
|
1246
|
+
size: "sm",
|
|
1247
|
+
id: "book-directly-witha-attendee-owner",
|
|
1248
|
+
checked: w,
|
|
1249
|
+
onCheckedChange: (n) => {
|
|
1250
|
+
s("roundRobinLeadSkip", n), n && s("enabled", n);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
)
|
|
1254
|
+
}
|
|
1255
|
+
),
|
|
1256
|
+
w ? /* @__PURE__ */ e(o.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ t("div", { children: [
|
|
1257
|
+
/* @__PURE__ */ e(
|
|
1258
|
+
oe,
|
|
1259
|
+
{
|
|
1260
|
+
htmlFor: "round-robin-skip-check-record-on",
|
|
1261
|
+
className: "text-subtle text-sm font-medium",
|
|
1262
|
+
children: a("salesforce_check_owner_of")
|
|
1263
|
+
}
|
|
1264
|
+
),
|
|
1265
|
+
/* @__PURE__ */ e(
|
|
1266
|
+
k,
|
|
1267
|
+
{
|
|
1268
|
+
size: "sm",
|
|
1269
|
+
className: "w-60",
|
|
1270
|
+
options: me,
|
|
1271
|
+
value: pe,
|
|
1272
|
+
onChange: (n) => {
|
|
1273
|
+
n && (Re(n), s("roundRobinSkipCheckRecordOn", n.value));
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
)
|
|
1277
|
+
] }) }) : null
|
|
1278
|
+
] }),
|
|
1279
|
+
/* @__PURE__ */ e(I, { children: w ? /* @__PURE__ */ t(I, { children: [
|
|
1280
|
+
pe.value === A.CONTACT ? /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1281
|
+
o.SubSectionHeader,
|
|
1282
|
+
{
|
|
1283
|
+
icon: "users",
|
|
1284
|
+
title: a("salesforce_round_robin_skip_fallback_to_lead_owner"),
|
|
1285
|
+
labelFor: "round-robin-skip-fallback-to-lead-owner",
|
|
1286
|
+
children: /* @__PURE__ */ e(
|
|
1287
|
+
z,
|
|
1288
|
+
{
|
|
1289
|
+
id: "round-robin-skip-fallback-to-lead-owner",
|
|
1290
|
+
size: "sm",
|
|
1291
|
+
checked: V,
|
|
1292
|
+
onCheckedChange: (n) => {
|
|
1293
|
+
s("roundRobinSkipFallbackToLeadOwner", n);
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
)
|
|
1297
|
+
}
|
|
1298
|
+
) }) : null,
|
|
1299
|
+
/* @__PURE__ */ t(o.SubSection, { children: [
|
|
1300
|
+
/* @__PURE__ */ e(
|
|
1301
|
+
o.SubSectionHeader,
|
|
1302
|
+
{
|
|
1303
|
+
icon: "users",
|
|
1304
|
+
title: a("salesforce_if_free_email_domain_skip_owner_check"),
|
|
1305
|
+
labelFor: "if-free-email-domain-skip-owner-check",
|
|
1306
|
+
children: /* @__PURE__ */ e(
|
|
1307
|
+
z,
|
|
1308
|
+
{
|
|
1309
|
+
id: "if-free-email-domain-skip-owner-check",
|
|
1310
|
+
size: "sm",
|
|
1311
|
+
checked: D,
|
|
1312
|
+
onCheckedChange: (n) => {
|
|
1313
|
+
s("ifFreeEmailDomainSkipOwnerCheck", n);
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
)
|
|
1317
|
+
}
|
|
1318
|
+
),
|
|
1319
|
+
/* @__PURE__ */ e(he, { variant: "info", children: /* @__PURE__ */ e(Oe, { children: a("skip_rr_description") }) })
|
|
1320
|
+
] }),
|
|
1321
|
+
/* @__PURE__ */ e(
|
|
1322
|
+
Je,
|
|
1323
|
+
{
|
|
1324
|
+
fieldRules: $,
|
|
1325
|
+
updateFieldRules: (n) => s("rrSkipFieldRules", n)
|
|
1326
|
+
}
|
|
1327
|
+
)
|
|
1328
|
+
] }) : null })
|
|
1329
|
+
] }) : null,
|
|
1330
|
+
/* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1331
|
+
ce,
|
|
1332
|
+
{
|
|
1333
|
+
bookingAction: J.ON_CANCEL,
|
|
1334
|
+
optionLabel: a("salesforce_on_cancel_write_to_event"),
|
|
1335
|
+
optionEnabled: Y,
|
|
1336
|
+
writeToObjectData: P,
|
|
1337
|
+
optionSwitchOnChange: (n) => {
|
|
1338
|
+
s("onCancelWriteToEventRecord", n);
|
|
1339
|
+
},
|
|
1340
|
+
updateWriteToObjectData: (n) => s("onCancelWriteToEventRecordFields", n)
|
|
1341
|
+
}
|
|
1342
|
+
) }),
|
|
1343
|
+
/* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
|
|
1344
|
+
ce,
|
|
1345
|
+
{
|
|
1346
|
+
bookingAction: J.ON_CANCEL,
|
|
1347
|
+
optionLabel: a("salesforce_on_cancel_write_to_record", { record: r }),
|
|
1348
|
+
optionEnabled: g,
|
|
1349
|
+
writeToObjectData: L,
|
|
1350
|
+
optionSwitchOnChange: (n) => {
|
|
1351
|
+
s("onCancelWriteToRecord", n);
|
|
1352
|
+
},
|
|
1353
|
+
updateWriteToObjectData: (n) => s("onCancelWriteToRecordFields", n)
|
|
1354
|
+
}
|
|
1355
|
+
) }),
|
|
1356
|
+
/* @__PURE__ */ t(o.SubSection, { children: [
|
|
1357
|
+
/* @__PURE__ */ e(
|
|
1358
|
+
o.SubSectionHeader,
|
|
1359
|
+
{
|
|
1360
|
+
icon: "calendar",
|
|
1361
|
+
title: "Send no show attendee data to event object",
|
|
1362
|
+
labelFor: "send-no-show-attendee-data",
|
|
1363
|
+
children: /* @__PURE__ */ e(
|
|
1364
|
+
z,
|
|
1365
|
+
{
|
|
1366
|
+
id: "send-no-show-attendee-data",
|
|
1367
|
+
size: "sm",
|
|
1368
|
+
checked: X,
|
|
1369
|
+
onCheckedChange: (n) => {
|
|
1370
|
+
s("sendNoShowAttendeeData", n);
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
)
|
|
1374
|
+
}
|
|
1375
|
+
),
|
|
1376
|
+
X ? /* @__PURE__ */ t(o.SubSectionContent, { classNames: { container: "p-3" }, children: [
|
|
1377
|
+
/* @__PURE__ */ e(
|
|
1378
|
+
oe,
|
|
1379
|
+
{
|
|
1380
|
+
htmlFor: "send-no-show-attendee-data-field-name",
|
|
1381
|
+
className: "text-subtle text-sm font-medium",
|
|
1382
|
+
children: "Field name to check (must be checkbox data type)"
|
|
1383
|
+
}
|
|
1384
|
+
),
|
|
1385
|
+
/* @__PURE__ */ e(
|
|
1386
|
+
T,
|
|
1387
|
+
{
|
|
1388
|
+
id: "send-no-show-attendee-data-field-name",
|
|
1389
|
+
size: "sm",
|
|
1390
|
+
value: K,
|
|
1391
|
+
onChange: (n) => s("sendNoShowAttendeeDataField", n.target.value)
|
|
1392
|
+
}
|
|
1393
|
+
)
|
|
1394
|
+
] }) : null
|
|
1395
|
+
] })
|
|
1396
|
+
] })
|
|
1397
|
+
}
|
|
1398
|
+
);
|
|
1399
|
+
};
|
|
1400
|
+
export {
|
|
1401
|
+
rl as default
|
|
1402
|
+
};
|