@nylas/web-elements 2.0.1 → 2.0.3
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/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +191 -95
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +10418 -10260
- package/dist/cjs/{abstract-provider-ca4f7e4f.js → abstract-provider-f84a6735.js} +2 -2
- package/dist/cjs/{abstract-provider-ca4f7e4f.js.map → abstract-provider-f84a6735.js.map} +1 -1
- package/dist/cjs/app-globals-ee500b74.js.map +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js +36 -21
- package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js.map +1 -1
- package/dist/cjs/{calendar-check-icon_2.cjs.entry.js → calendar-check-icon.cjs.entry.js} +3 -19
- package/dist/cjs/calendar-check-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/checkbox-component_2.cjs.entry.js +1 -1
- package/dist/cjs/checkbox-group_4.cjs.entry.js +3 -3
- package/dist/cjs/checkmark-circle-icon.cjs.entry.js +24 -0
- package/dist/cjs/checkmark-circle-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/checkmark-icon_15.cjs.entry.js +11 -7
- package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
- package/dist/cjs/{customParseFormat-bb3a23c5.js → customParseFormat-95790293.js} +2 -2
- package/dist/cjs/{customParseFormat-bb3a23c5.js.map → customParseFormat-95790293.js.map} +1 -1
- package/dist/cjs/{feedbackSync-1c5ec9aa.js → feedbackSync-4ed99749.js} +2 -2
- package/dist/cjs/{feedbackSync-1c5ec9aa.js.map → feedbackSync-4ed99749.js.map} +1 -1
- package/dist/cjs/globe-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +8 -8
- package/dist/cjs/index-e07e3a7e.js +6 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{index.es-c563f3ba.js → index.es-62161daa.js} +2 -2
- package/dist/cjs/{index.es-c563f3ba.js.map → index.es-62161daa.js.map} +1 -1
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/{nylas-api-request-4d148ff1.js → nylas-api-request-03d7f604.js} +2 -2
- package/dist/cjs/{nylas-api-request-4d148ff1.js.map → nylas-api-request-03d7f604.js.map} +1 -1
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +82 -25
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
- package/dist/cjs/nylas-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +6 -6
- package/dist/cjs/nylas-scheduling.cjs.entry.js +42 -14
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/{register-component-70744713.js → register-component-f4ad9751.js} +2 -2
- package/dist/cjs/{register-component-70744713.js.map → register-component-f4ad9751.js.map} +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/{utils-dd3b6f4c.js → utils-03b13826.js} +154 -55
- package/dist/cjs/utils-03b13826.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +11 -3
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +49 -4
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/test/nylas-booking-form.spec.js +3 -3
- package/dist/collection/components/scheduler/nylas-booking-form/test/nylas-booking-form.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +37 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +34 -2
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.css +1 -1
- package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js +34 -1
- package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +10 -4
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js +10 -2
- package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.css +13 -0
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +66 -7
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js +33 -0
- package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +20 -5
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +12 -6
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js +12 -6
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +6 -3
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js +14 -8
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-event-calendar/nylas-event-calendar.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js +8 -4
- package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/nylas-additional-participants2.js +12 -6
- package/dist/components/nylas-additional-participants2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +13 -6
- package/dist/components/nylas-booked-event-card2.js.map +1 -1
- package/dist/components/nylas-booking-confirmation-redirect2.js +12 -6
- package/dist/components/nylas-booking-confirmation-redirect2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +28 -6
- package/dist/components/nylas-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +13 -3
- package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +12 -3
- package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
- package/dist/components/nylas-confirmation-email2.js +6 -3
- package/dist/components/nylas-confirmation-email2.js.map +1 -1
- package/dist/components/nylas-confirmed-event-card2.js +18 -8
- package/dist/components/nylas-confirmed-event-card2.js.map +1 -1
- package/dist/components/nylas-custom-event-slug2.js +15 -9
- package/dist/components/nylas-custom-event-slug2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +1 -1
- package/dist/components/nylas-date-picker2.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group2.js +2 -2
- package/dist/components/nylas-editor-tabs2.js +2 -2
- package/dist/components/nylas-organizer-confirmation-card2.js +12 -5
- package/dist/components/nylas-organizer-confirmation-card2.js.map +1 -1
- package/dist/components/nylas-reminder-emails2.js +8 -4
- package/dist/components/nylas-reminder-emails2.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +2 -2
- package/dist/components/nylas-scheduling.js +42 -12
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-selected-event-card2.js +12 -5
- package/dist/components/nylas-selected-event-card2.js.map +1 -1
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/components/utils.js +153 -54
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/{abstract-provider-efe136bd.js → abstract-provider-bdb7d9b4.js} +2 -2
- package/dist/esm/{abstract-provider-efe136bd.js.map → abstract-provider-bdb7d9b4.js.map} +1 -1
- package/dist/esm/app-globals-295a87be.js.map +1 -1
- package/dist/esm/calendar-agenda-fill-icon_36.entry.js +36 -21
- package/dist/esm/calendar-agenda-fill-icon_36.entry.js.map +1 -1
- package/dist/esm/{calendar-check-icon_2.entry.js → calendar-check-icon.entry.js} +4 -19
- package/dist/esm/calendar-check-icon.entry.js.map +1 -0
- package/dist/esm/checkbox-component_2.entry.js +1 -1
- package/dist/esm/checkbox-group_4.entry.js +3 -3
- package/dist/esm/checkmark-circle-icon.entry.js +20 -0
- package/dist/esm/checkmark-circle-icon.entry.js.map +1 -0
- package/dist/esm/checkmark-icon_15.entry.js +11 -7
- package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
- package/dist/esm/{customParseFormat-edc38d83.js → customParseFormat-f0d21eb3.js} +2 -2
- package/dist/esm/{customParseFormat-edc38d83.js.map → customParseFormat-f0d21eb3.js.map} +1 -1
- package/dist/esm/{feedbackSync-e4378c0b.js → feedbackSync-b9c9e719.js} +2 -2
- package/dist/esm/{feedbackSync-e4378c0b.js.map → feedbackSync-b9c9e719.js.map} +1 -1
- package/dist/esm/globe-icon_2.entry.js +2 -2
- package/dist/esm/google-logo-icon_6.entry.js +8 -8
- package/dist/esm/index-091600eb.js +6 -2
- package/dist/esm/{index.es-6a9d55cf.js → index.es-ccb2a286.js} +2 -2
- package/dist/esm/{index.es-6a9d55cf.js.map → index.es-ccb2a286.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-dropdown_2.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +1 -1
- package/dist/esm/{nylas-api-request-f2e4e9b6.js → nylas-api-request-7d702661.js} +2 -2
- package/dist/esm/{nylas-api-request-f2e4e9b6.js.map → nylas-api-request-7d702661.js.map} +1 -1
- package/dist/esm/nylas-booked-event-card_11.entry.js +82 -25
- package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +2 -2
- package/dist/esm/nylas-notification_2.entry.js +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +6 -6
- package/dist/esm/nylas-scheduling.entry.js +43 -15
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/{register-component-a1c3d7b4.js → register-component-9d4ceee5.js} +2 -2
- package/dist/esm/{register-component-a1c3d7b4.js.map → register-component-9d4ceee5.js.map} +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/{utils-b7f9cbcc.js → utils-fb8a9ce4.js} +154 -55
- package/dist/esm/utils-fb8a9ce4.js.map +1 -0
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/{p-3ce8e281.js → p-094be30f.js} +2 -2
- package/dist/nylas-web-elements/p-18c58ea1.entry.js +2 -0
- package/dist/nylas-web-elements/p-18c58ea1.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-c12c18b2.entry.js → p-1dbaf879.entry.js} +2 -2
- package/dist/nylas-web-elements/p-2830522f.entry.js +2 -0
- package/dist/nylas-web-elements/p-2830522f.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-35297f33.entry.js → p-3b56d656.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8e7882a1.js → p-3c8b7ba1.js} +2 -2
- package/dist/nylas-web-elements/{p-3204882f.entry.js → p-3f5e1e6b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-5aae729f.js → p-4c1fafb4.js} +2 -2
- package/dist/nylas-web-elements/p-522270a2.entry.js +2 -0
- package/dist/nylas-web-elements/p-522270a2.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-67e936ce.entry.js +2 -0
- package/dist/nylas-web-elements/p-67e936ce.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-9e11eb2c.js → p-6d8e2c6b.js} +2 -2
- package/dist/nylas-web-elements/{p-3362cf82.entry.js → p-8f82f281.entry.js} +2 -2
- package/dist/nylas-web-elements/p-920812bd.entry.js +8 -0
- package/dist/nylas-web-elements/p-920812bd.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-b40f7a77.entry.js → p-a42f41f7.entry.js} +2 -2
- package/dist/nylas-web-elements/p-a6e2e49c.js.map +1 -1
- package/dist/nylas-web-elements/{p-8340d845.entry.js → p-aad611b4.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6e56eb3f.js → p-ab88518b.js} +2 -2
- package/dist/nylas-web-elements/{p-5cf6301e.entry.js → p-b3500bf1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-4d8f9740.entry.js → p-b6d863e0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-50c255fa.entry.js → p-b8cf836f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-996c827d.entry.js → p-bf37be06.entry.js} +2 -2
- package/dist/nylas-web-elements/p-de4b01ac.entry.js +2 -0
- package/dist/nylas-web-elements/p-de4b01ac.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-308e7adb.entry.js → p-f42e87c6.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-dea32251.js → p-f4825eb1.js} +2 -2
- package/dist/nylas-web-elements/p-faa30369.js +14 -0
- package/dist/nylas-web-elements/{p-59e4ab2d.js.map → p-faa30369.js.map} +1 -1
- package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +2 -0
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +7 -0
- package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +3 -0
- package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +3 -1
- package/dist/types/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.d.ts +3 -1
- package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +2 -1
- package/dist/types/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.d.ts +2 -0
- package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +6 -0
- package/dist/types/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.d.ts +3 -1
- package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +2 -1
- package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.d.ts +2 -0
- package/dist/types/components.d.ts +46 -6
- package/package.json +3 -5
- package/dist/cjs/calendar-check-icon_2.cjs.entry.js.map +0 -1
- package/dist/cjs/utils-dd3b6f4c.js.map +0 -1
- package/dist/esm/calendar-check-icon_2.entry.js.map +0 -1
- package/dist/esm/utils-b7f9cbcc.js.map +0 -1
- package/dist/nylas-web-elements/p-2b52b854.entry.js +0 -2
- package/dist/nylas-web-elements/p-2b52b854.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-59e4ab2d.js +0 -14
- package/dist/nylas-web-elements/p-8a3965ba.entry.js +0 -2
- package/dist/nylas-web-elements/p-8a3965ba.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-97128be4.entry.js +0 -8
- package/dist/nylas-web-elements/p-97128be4.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-d69f9d47.entry.js +0 -2
- package/dist/nylas-web-elements/p-d69f9d47.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-dcc8ca35.entry.js +0 -2
- package/dist/nylas-web-elements/p-dcc8ca35.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-3ce8e281.js.map → p-094be30f.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c12c18b2.entry.js.map → p-1dbaf879.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-35297f33.entry.js.map → p-3b56d656.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8e7882a1.js.map → p-3c8b7ba1.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3204882f.entry.js.map → p-3f5e1e6b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5aae729f.js.map → p-4c1fafb4.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9e11eb2c.js.map → p-6d8e2c6b.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3362cf82.entry.js.map → p-8f82f281.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b40f7a77.entry.js.map → p-a42f41f7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8340d845.entry.js.map → p-aad611b4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6e56eb3f.js.map → p-ab88518b.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5cf6301e.entry.js.map → p-b3500bf1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4d8f9740.entry.js.map → p-b6d863e0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-50c255fa.entry.js.map → p-b8cf836f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-996c827d.entry.js.map → p-bf37be06.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-308e7adb.entry.js.map → p-f42e87c6.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-dea32251.js.map → p-f4825eb1.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const utils = require('./utils-
|
|
3
|
+
const utils = require('./utils-03b13826.js');
|
|
4
4
|
|
|
5
5
|
class NylasAbstractProvider {
|
|
6
6
|
constructor(host, stores, automaticComponentRegistration = true, eventOverrides) {
|
|
@@ -281,4 +281,4 @@ class NylasBaseProvider extends NylasAbstractProvider {
|
|
|
281
281
|
|
|
282
282
|
exports.NylasBaseProvider = NylasBaseProvider;
|
|
283
283
|
|
|
284
|
-
//# sourceMappingURL=abstract-provider-
|
|
284
|
+
//# sourceMappingURL=abstract-provider-f84a6735.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"abstract-provider-ca4f7e4f.js","mappings":";;;;MA+BsB,qBAAqB;IAkEzC,YAAY,IAAiB,EAAE,MAAc,EAAE,iCAA0C,IAAI,EAAE,cAAkC;QAzC1H,mCAA8B,GAAY,IAAI,CAAC;QAO/C,yBAAoB,GAAqD,EAAE,CAAC;QAO5E,2BAAsB,GAA2E,IAAI,GAAG,EAAE,CAAC;QAO3G,+BAA0B,GAAgD,IAAI,GAAG,EAAE,CAAC;QAqBzF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,8BAA8B,GAAG,8BAA8B,CAAC;QACrE,IAA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,CAAC;oBAC/HA,WAAK,CAAC,IAAI,IAAI,CAAC,WAAW,iCAAiC,KAAK,CAAC,MAAM,4BAA4B,QAAQ,CAAC,QAAQ,EAAE,UAAU,EAAE;wBAChI,KAAK;wBACL,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;qBACpD,CAAC,CAAC;oBAGH,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE;wBACnC,MAAM,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;wBAClD,IAAI,CAAC,SAAS,EAAE;4BACdA,WAAK,CAAC,IAAI,IAAI,CAAC,WAAW,sCAAsC,SAAS,wBAAwB,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;4BAClH,OAAO;yBACR;wBAGD,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,SAA+C,CAAC,CAAC;wBACnF,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,QAAqD,CAAC,CAAC;wBAC3F,SAAS,CAAC,OAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,UAAU,CAAC;wBAC/EA,WAAK,CAAC,IAAI,IAAI,CAAC,WAAW,oCAAoC,SAAS,CAAC,IAAI,WAAW,OAAO,CAAC,QAAQ,EAAE,SAAS,QAAQ,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;qBAClK,CAAC,CAAC;iBACJ;aACF,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;IAKD,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,gBAAgB,CAAC;KAC9D;CACF;MAEY,iBAAgE,SAAQ,qBAAwB;;;;;","names":["debug","uniqueID","formatEventName"],"sources":["src/common/abstract-provider.ts"],"sourcesContent":["import { RegisteredComponent } from '@/common/register-component';\nimport { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, formatEventName, uniqueID } from '@/utils/utils';\nimport { ObservableMap } from '@stencil/store';\nimport { EventOverride } from './component-types';\nimport { HTMLStencilElement } from '@stencil/core/internal';\n\nexport type PropKey = string | number | symbol;\nexport type StoreKey = string;\nexport type StoreName<T> = keyof T;\nexport type StateKey = string;\nexport type ElementID = string;\nexport type PropStateRegistration = { elementId: ElementID; propKey: PropKey };\nexport type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];\n\nexport interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {\n nylasConnector?: BaseNylasConnectorInterface;\n stores: Stores;\n host?: HTMLElement;\n automaticComponentRegistration: boolean;\n registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;\n propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;\n eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;\n componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;\n componentDidLoad(): Promise<void>;\n componentDisconnected(): Promise<void>;\n getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];\n registerComponent(component: RegisteredComponent<any, any>): void;\n unregisterComponent(component: RegisteredComponent<any, any>): void;\n}\n\nexport abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {\n /**\n * The NylasConnector instance.\n * This is used to provide access to the NylasConnector instance to all components.\n */\n public nylasConnector?: BaseNylasConnectorInterface;\n\n /**\n * A list of stores that are used by the provider.\n * This is used to provide access to the stores to all components.\n */\n public stores: Stores;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n public host!: HTMLElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n public automaticComponentRegistration: boolean = true;\n\n /**\n * A list of registered components that are listening for store changes.\n * Each component is registered with a unique id so that we can easily track the component\n * for various other operations (see `propStateRegistrations` and `eventListenerRegistrations`).\n */\n public registeredComponents: Record<ElementID, RegisteredComponent<any, any>> = {};\n\n /**\n * A list of registered components that are listening for store changes.\n * To make lookups more efficient, we use a Map of our prop registrations that we need to map to differnet\n * state keys. When a component is unregistered, we can use this map to remove the prop registration.\n */\n public propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>> = new Map();\n\n /**\n * A list of registered event listeners.\n * To make lookups more efficient, we use a Map of our event listeners that we need to map to differnet\n * nylas connector methods. When a component is unregistered, we can use this map to remove the event listener.\n */\n public eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]> = new Map();\n\n /**\n * A list of event overrides that are used by the provider.\n * This is used to provide an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n public eventOverrides: EventOverride<Exclude<BaseNylasConnectorInterface, undefined>>;\n\n /**\n * The constructor for the AbstractNylasProvider.\n * @param host The host element (usually the HTMLElement of the provider)\n * @param stores A list of stores that are used by the provider\n * @param automaticComponentRegistration A boolean that determines if components should be automatically registered\n * @param eventOverrides A list of event overrides that are used by the provider\n */\n constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean = true, eventOverrides: EventOverride<any>) {\n this.host = host;\n this.stores = stores;\n this.automaticComponentRegistration = automaticComponentRegistration;\n this.eventOverrides = eventOverrides;\n\n debug(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides });\n\n this.registerComponent = this.registerComponent.bind(this);\n this.getStore = this.getStore.bind(this);\n\n // Init propStateRegistrations with store names\n Object.keys(this.stores).forEach(storeName => {\n this.propStateRegistrations.set(storeName, new Map());\n });\n }\n\n /**\n * This method is called before the component is loaded.\n * We're passing the NylasConnector instance to the provider so that we can\n * provide access to the NylasConnector instance to all components.\n *\n * However, because the NylasConnector is often constructed after the component's\n * constructor is called, set the NylasConnector instance here.\n * @param nylasConnector The NylasConnector instance\n */\n async componentWillLoad(nylasConnector: BaseNylasConnectorInterface) {\n debug(`[${this.hostTagName}] Will load`);\n\n // For each of our stores, configure the listeners for changes in the\n // store state.\n this.setupStoreListeners();\n\n // Set the NylasConnector instance\n this.nylasConnector = nylasConnector;\n\n /**\n * This is a very static way of registering components, but it happens fairly\n * early in the component lifecycle, so it can be beneficial to do it here.\n *\n * The big downside to this is that it will not pick up any components that\n * are dynamically added to the DOM after this method is called.\n *\n * So we should evaluate if this is the best way to register components.\n */\n const childComponents = Array.from(this.host.querySelectorAll('*')).filter(child => child.tagName.toLowerCase().startsWith('nylas-'));\n debug(`[${this.hostTagName}] Found ${childComponents.length} child component(s).`, { childComponents });\n\n const registrations = childComponents.map(async child => {\n const component = child as any; // It unfortunately makes life a whole lot easier to just cast this to any\n if (!component) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} does not have a name. Skipping.`);\n return;\n }\n\n // Skip components that don't have the `registerNylasComponent` prop\n if (!component.registerNylasComponent) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} is not a component that can be registered. Skipping.`, { component });\n return;\n }\n\n const registeredComponent: RegisteredComponent<any, any> = {\n element: component as HTMLStencilElement,\n name: component.tagName.toLowerCase(),\n getStoresToProp: component.getStoresToProp,\n storeToProps: component.storeToProps,\n stateToProps: component.stateToProps,\n authToProp: component.authToProp,\n eventToProps: component.eventToProps,\n connectorToProp: component.connectorToProp,\n localPropsToProp: component.localPropsToProp,\n };\n\n await this.registerComponent(registeredComponent);\n });\n\n await Promise.all(registrations);\n }\n\n /**\n * This method is called after the component is loaded.\n * We're using this method to add event listeners to the host element.\n */\n async componentDidLoad() {\n debug(`[~${this.hostTagName}] (componentDidLoad) Did load`);\n }\n\n /**\n * This method is called when the component is disconnected from the DOM.\n * We're using this method to dispose of the stores.\n */\n async componentDisconnected() {\n // Loop through each store and and dispose\n Object.values(this.stores).forEach(store => {\n store.dispose();\n });\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${event.detail.name}.`);\n return;\n }\n\n await this.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${event.detail.name}.`);\n return;\n }\n\n this.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to register a component with the provider\n * @param component component to register\n * @returns void\n */\n public async registerComponent(component: RegisteredComponent<any, any>): Promise<void> {\n debug(`~[${this.hostTagName}] (registerComponent) Registering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n const isReregistration = elementId && this.registeredComponents[elementId];\n\n // If this is a re-registration, clean up previous registrations first\n if (isReregistration) {\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} already registered. Updating registration.`);\n // Clean up event listeners but keep the component ID\n this.cleanupComponentRegistration(elementId, false);\n } else {\n // Set a unique data id on the element for new registrations\n component.element.dataset.nylasId = elementId || uniqueID();\n }\n\n // Register/update the component to ensure the component is tracked even while waiting for definition\n const nylasId = component.element.dataset.nylasId;\n if (nylasId) {\n this.registeredComponents[nylasId] = component;\n }\n\n // Wait for the component to be defined in the custom elements registry before we attempt to\n // complete the component registration. While this means that the component will not be loaded with\n // props immediately, it does ensure that when we do set the props, the component is ready to receive them.\n debug(`[${this.hostTagName}] (registerComponent) Waiting for \"${component.element.localName}\" component to be defined`, { component });\n try {\n await customElements.whenDefined(component.element.tagName.toLowerCase());\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.element.localName}\" is now defined`);\n } catch (error) {\n debug(`[${this.hostTagName}] (registerComponent) Error waiting for component \"${component.element.localName}\" to be defined:`, error);\n // Continue with registration anyway, as the component might be defined later\n }\n\n const eventOverrides = this.eventOverrides;\n const { stateToProps, getStoresToProp, eventToProps, storeToProps, connectorToProp, localPropsToProp, element } = component;\n\n /**\n * We allow components to map an event to a prop. These events can automatically\n * call a method on the nylasConnector instance.\n */\n eventToProps?.forEach((customEventHandler, propKey) => {\n const nylasConnector = this.nylasConnector;\n const handler = async (event: CustomEvent<any>) => {\n debug(`[${this.hostTagName}] (registerComponent) Handling \"${component.name}\" prop \"${String(propKey)}\" event.`, { event });\n if (propKey in eventOverrides) {\n debug(`[${this.hostTagName}] (registerComponent) Found event override for \"${String(propKey)}\" event. Calling override.`);\n await eventOverrides[propKey](event, nylasConnector);\n }\n\n if (!event.defaultPrevented) {\n await customEventHandler(event, nylasConnector);\n }\n\n return;\n };\n\n const elementId = component.element.dataset.nylasId;\n\n if (elementId && !this.eventListenerRegistrations.has(elementId)) {\n this.eventListenerRegistrations.set(elementId, []);\n }\n\n if (elementId) {\n this.eventListenerRegistrations.get(elementId)?.push([element, propKey, handler]);\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Setting \"${component.name}\" event \"${String(propKey)}\" to automcially call NylasConnector method.`);\n\n // We should immediately call the event handler to make sure the prop is set\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (registerComponent) Adding event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.addEventListener(eventName, handler as unknown as EventListener);\n });\n\n /**\n * This is a rather simple way for us to set the initial props for a component.\n * For each prop, we check if the prop is mapped to a store. If it is, we set\n * the prop to the store value.\n */\n stateToProps?.forEach((propKey, stateKey) => {\n const [storeName, stateName] = stateKey.split('.');\n const store = this.getStore(storeName as keyof typeof this.stores);\n const stateValue = store.state[stateName as keyof typeof store.state];\n\n // Make sure this component was registered and has a nylasId\n if (!element.dataset.nylasId) {\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.name}\" not registered. Skipping.`, { component });\n return;\n }\n\n // We need to keep track of the store and prop key so that we can update the\n // prop when the store changes\n if (!this.propStateRegistrations.has(storeName as keyof typeof this.stores)) {\n this.propStateRegistrations.set(storeName as keyof typeof this.stores, new Map());\n }\n\n if (!this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.has(stateName)) {\n this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.set(stateName, [\n {\n elementId: element.dataset.nylasId,\n propKey,\n },\n ]);\n } else {\n this.propStateRegistrations\n .get(storeName as keyof typeof this.stores)\n ?.get(stateName)\n ?.push({\n elementId: element.dataset.nylasId,\n propKey,\n });\n }\n\n // Set the prop value on the component\n (element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey}\" value.`, { stateValue });\n });\n\n /**\n * We allow components to also map props from the provider to the component.\n */\n localPropsToProp?.forEach((propKey, value) => {\n const mappedPropValue = this.host[value]; // TODO: Is this safe? We should find a way to only limit it to public properties and no methods.\n (element as { [key: string]: any })[propKey.toString()] = mappedPropValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to the value of \"${value}\" value.`, { value, mappedPropValue });\n });\n\n /**\n * We allow components to access the getStore method directly.\n */\n if (getStoresToProp) {\n (element as { [key: string]: any })[getStoresToProp?.toString()] = this.getStore;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${getStoresToProp.toString()}\" to \"getStore\" method.`);\n }\n\n /**\n * We allow components to map a store to a prop for direct access.\n */\n storeToProps?.forEach((propKey, storeKey) => {\n const store = this.getStore(storeKey);\n (element as { [key: string]: any })[propKey.toString()] = store;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${storeKey}\" store.`, { store });\n });\n\n /**\n * We allow components to map the NylasConnector instance to a prop for direct access.\n */\n if (connectorToProp) {\n (element as { [key: string]: any })[connectorToProp?.toString()] = this.nylasConnector;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${connectorToProp.toString()}\" to \"nylasConnector\" value.`, { connectorToProp });\n }\n\n /**\n * We allow components to fire an event when they are registered.\n */\n if (typeof element.registerCallback === 'function') {\n debug(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for \"${component.name}\".`);\n await element.registerCallback();\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} registered.`);\n }\n\n /**\n * Cleans up registrations for a component without fully unregistering it\n * @param elementId The ID of the element to clean up\n * @param removeFromRegistry Whether to remove the component from the registry\n */\n private cleanupComponentRegistration(elementId: string, removeFromRegistry: boolean = true): void {\n // Remove event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n if (eventListenerRegistrations) {\n eventListenerRegistrations.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n this.eventListenerRegistrations.delete(elementId);\n }\n\n // Clean up prop state registrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((props, stateKey) => {\n const filteredProps = props.filter(prop => prop.elementId !== elementId);\n if (filteredProps.length !== props.length) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Remove from registry if requested\n if (removeFromRegistry) {\n delete this.registeredComponents[elementId];\n }\n }\n\n /**\n * This is a method that is used to unregister a component with the provider.\n * @param component HTMLElement to unregister\n * @returns void\n */\n public unregisterComponent(component: RegisteredComponent<any, any>): void {\n debug(`[${this.hostTagName}] Unregistering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n if (!elementId) {\n debug(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${component.name}.`);\n return;\n }\n\n // Make sure the component is not already registered\n if (this.registeredComponents[elementId]) {\n debug(`[${this.hostTagName}] (unregisterComponent) Component ${component.name} not registered. Skipping.`);\n return;\n }\n\n // Remove the component prop registration from propStateRegistrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((_, stateKey) => {\n const props = this.propStateRegistrations.get(storeName)?.get(stateKey);\n const filteredProps = props?.filter(prop => prop.elementId !== elementId);\n if (filteredProps) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Before we unregister the component, we need to remove any event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n eventListenerRegistrations?.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (unregisterComponent) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n\n // Unregister the component\n delete this.registeredComponents[elementId];\n }\n\n /**\n * This method is used to dynamically retrieve the appropriate store\n * @param name store name\n */\n public getStore<K extends keyof Stores>(name: K): Stores[K] {\n const store = this.stores[name];\n if (!store) {\n throw new Error(`[${this.hostTagName}] Store \"${name.toString()}\" not found.`);\n }\n return store;\n }\n\n /**\n * This method is called when the component is connected to the DOM.\n * We're using this method to listen for changes in the store and update\n * the registered components with the new values.\n */\n private async setupStoreListeners() {\n const self = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n /**\n * This is a rather simple way for us to listen for changes in the store\n * and make sure our registered components are updated with the new values.\n *\n * For each store change, we loop through each registered component and\n * check if the store change is mapped to a prop on the component. If it is,\n * we set the prop to the new value.\n *\n * We call this super early in the provider lifecycle so that we can make sure\n * that all components have the correct props before they are rendered.\n */\n Object.entries(this.stores).forEach(([storeName, store]) => {\n debug(`[${self.hostTagName}] (setupStoreListeners) Listening for changes in \"${storeName}\" store.`);\n store.use({\n set(stateKey, newValue, oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" changed`, { newValue, oldValue });\n if (newValue === oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" unchanged. Skipping.`);\n return;\n }\n\n const registeredComponents = self.registeredComponents;\n if (!registeredComponents) {\n debug(`[${self.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);\n return;\n }\n\n // Get our prop registrations for this store\n const props = self.propStateRegistrations.get(storeName as keyof typeof self.stores as string)?.get(stateKey.toString()) || [];\n debug(`[${self.hostTagName}] (setupStoreListeners) Found ${props.length} prop(s) registered for \"${stateKey.toString()}\" store.`, {\n props,\n propStateRegistrations: self.propStateRegistrations,\n });\n\n // Loop through each registered component and update the prop\n props.forEach(({ elementId, propKey }) => {\n const component = registeredComponents[elementId];\n if (!component) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Component \"${elementId}\" not found. Skipping.`, { component });\n return;\n }\n\n // Get the appropriate store\n const loadedStore = self.getStore(storeName as keyof typeof self.stores as string);\n const stateValue = loadedStore.state[stateKey as unknown as keyof typeof loadedStore.state];\n (component.element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${self.hostTagName}] (setupStoreListeners) Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey.toString()}\" value.`, { stateValue });\n });\n },\n });\n });\n }\n\n /**\n * Simple getter for the host element tag name.\n */\n private get hostTagName(): string {\n return this.host?.tagName?.toLowerCase() ?? 'nylas-provider';\n }\n}\n\nexport class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {}\n"],"version":3}
|
|
1
|
+
{"file":"abstract-provider-f84a6735.js","mappings":";;;;MA+BsB,qBAAqB;IAkEzC,YAAY,IAAiB,EAAE,MAAc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CAAC;iBACJ;aACF,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;IAKD,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,gBAAgB,CAAC;KAC9D;CACF;MAEY,iBAAgE,SAAQ,qBAAwB;;;;;","names":["debug","uniqueID","formatEventName"],"sources":["src/common/abstract-provider.ts"],"sourcesContent":["import { RegisteredComponent } from '@/common/register-component';\nimport { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, formatEventName, uniqueID } from '@/utils/utils';\nimport { ObservableMap } from '@stencil/store';\nimport { EventOverride } from './component-types';\nimport { HTMLStencilElement } from '@stencil/core/internal';\n\nexport type PropKey = string | number | symbol;\nexport type StoreKey = string;\nexport type StoreName<T> = keyof T;\nexport type StateKey = string;\nexport type ElementID = string;\nexport type PropStateRegistration = { elementId: ElementID; propKey: PropKey };\nexport type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];\n\nexport interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {\n nylasConnector?: BaseNylasConnectorInterface;\n stores: Stores;\n host?: HTMLElement;\n automaticComponentRegistration: boolean;\n registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;\n propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;\n eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;\n componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;\n componentDidLoad(): Promise<void>;\n componentDisconnected(): Promise<void>;\n getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];\n registerComponent(component: RegisteredComponent<any, any>): void;\n unregisterComponent(component: RegisteredComponent<any, any>): void;\n}\n\nexport abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {\n /**\n * The NylasConnector instance.\n * This is used to provide access to the NylasConnector instance to all components.\n */\n public nylasConnector?: BaseNylasConnectorInterface;\n\n /**\n * A list of stores that are used by the provider.\n * This is used to provide access to the stores to all components.\n */\n public stores: Stores;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n public host!: HTMLElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n public automaticComponentRegistration: boolean = true;\n\n /**\n * A list of registered components that are listening for store changes.\n * Each component is registered with a unique id so that we can easily track the component\n * for various other operations (see `propStateRegistrations` and `eventListenerRegistrations`).\n */\n public registeredComponents: Record<ElementID, RegisteredComponent<any, any>> = {};\n\n /**\n * A list of registered components that are listening for store changes.\n * To make lookups more efficient, we use a Map of our prop registrations that we need to map to differnet\n * state keys. When a component is unregistered, we can use this map to remove the prop registration.\n */\n public propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>> = new Map();\n\n /**\n * A list of registered event listeners.\n * To make lookups more efficient, we use a Map of our event listeners that we need to map to differnet\n * nylas connector methods. When a component is unregistered, we can use this map to remove the event listener.\n */\n public eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]> = new Map();\n\n /**\n * A list of event overrides that are used by the provider.\n * This is used to provide an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n public eventOverrides: EventOverride<Exclude<BaseNylasConnectorInterface, undefined>>;\n\n /**\n * The constructor for the AbstractNylasProvider.\n * @param host The host element (usually the HTMLElement of the provider)\n * @param stores A list of stores that are used by the provider\n * @param automaticComponentRegistration A boolean that determines if components should be automatically registered\n * @param eventOverrides A list of event overrides that are used by the provider\n */\n constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean = true, eventOverrides: EventOverride<any>) {\n this.host = host;\n this.stores = stores;\n this.automaticComponentRegistration = automaticComponentRegistration;\n this.eventOverrides = eventOverrides;\n\n debug(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides });\n\n this.registerComponent = this.registerComponent.bind(this);\n this.getStore = this.getStore.bind(this);\n\n // Init propStateRegistrations with store names\n Object.keys(this.stores).forEach(storeName => {\n this.propStateRegistrations.set(storeName, new Map());\n });\n }\n\n /**\n * This method is called before the component is loaded.\n * We're passing the NylasConnector instance to the provider so that we can\n * provide access to the NylasConnector instance to all components.\n *\n * However, because the NylasConnector is often constructed after the component's\n * constructor is called, set the NylasConnector instance here.\n * @param nylasConnector The NylasConnector instance\n */\n async componentWillLoad(nylasConnector: BaseNylasConnectorInterface) {\n debug(`[${this.hostTagName}] Will load`);\n\n // For each of our stores, configure the listeners for changes in the\n // store state.\n this.setupStoreListeners();\n\n // Set the NylasConnector instance\n this.nylasConnector = nylasConnector;\n\n /**\n * This is a very static way of registering components, but it happens fairly\n * early in the component lifecycle, so it can be beneficial to do it here.\n *\n * The big downside to this is that it will not pick up any components that\n * are dynamically added to the DOM after this method is called.\n *\n * So we should evaluate if this is the best way to register components.\n */\n const childComponents = Array.from(this.host.querySelectorAll('*')).filter(child => child.tagName.toLowerCase().startsWith('nylas-'));\n debug(`[${this.hostTagName}] Found ${childComponents.length} child component(s).`, { childComponents });\n\n const registrations = childComponents.map(async child => {\n const component = child as any; // It unfortunately makes life a whole lot easier to just cast this to any\n if (!component) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} does not have a name. Skipping.`);\n return;\n }\n\n // Skip components that don't have the `registerNylasComponent` prop\n if (!component.registerNylasComponent) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} is not a component that can be registered. Skipping.`, { component });\n return;\n }\n\n const registeredComponent: RegisteredComponent<any, any> = {\n element: component as HTMLStencilElement,\n name: component.tagName.toLowerCase(),\n getStoresToProp: component.getStoresToProp,\n storeToProps: component.storeToProps,\n stateToProps: component.stateToProps,\n authToProp: component.authToProp,\n eventToProps: component.eventToProps,\n connectorToProp: component.connectorToProp,\n localPropsToProp: component.localPropsToProp,\n };\n\n await this.registerComponent(registeredComponent);\n });\n\n await Promise.all(registrations);\n }\n\n /**\n * This method is called after the component is loaded.\n * We're using this method to add event listeners to the host element.\n */\n async componentDidLoad() {\n debug(`[~${this.hostTagName}] (componentDidLoad) Did load`);\n }\n\n /**\n * This method is called when the component is disconnected from the DOM.\n * We're using this method to dispose of the stores.\n */\n async componentDisconnected() {\n // Loop through each store and and dispose\n Object.values(this.stores).forEach(store => {\n store.dispose();\n });\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${event.detail.name}.`);\n return;\n }\n\n await this.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${event.detail.name}.`);\n return;\n }\n\n this.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to register a component with the provider\n * @param component component to register\n * @returns void\n */\n public async registerComponent(component: RegisteredComponent<any, any>): Promise<void> {\n debug(`~[${this.hostTagName}] (registerComponent) Registering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n const isReregistration = elementId && this.registeredComponents[elementId];\n\n // If this is a re-registration, clean up previous registrations first\n if (isReregistration) {\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} already registered. Updating registration.`);\n // Clean up event listeners but keep the component ID\n this.cleanupComponentRegistration(elementId, false);\n } else {\n // Set a unique data id on the element for new registrations\n component.element.dataset.nylasId = elementId || uniqueID();\n }\n\n // Register/update the component to ensure the component is tracked even while waiting for definition\n const nylasId = component.element.dataset.nylasId;\n if (nylasId) {\n this.registeredComponents[nylasId] = component;\n }\n\n // Wait for the component to be defined in the custom elements registry before we attempt to\n // complete the component registration. While this means that the component will not be loaded with\n // props immediately, it does ensure that when we do set the props, the component is ready to receive them.\n debug(`[${this.hostTagName}] (registerComponent) Waiting for \"${component.element.localName}\" component to be defined`, { component });\n try {\n await customElements.whenDefined(component.element.tagName.toLowerCase());\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.element.localName}\" is now defined`);\n } catch (error) {\n debug(`[${this.hostTagName}] (registerComponent) Error waiting for component \"${component.element.localName}\" to be defined:`, error);\n // Continue with registration anyway, as the component might be defined later\n }\n\n const eventOverrides = this.eventOverrides;\n const { stateToProps, getStoresToProp, eventToProps, storeToProps, connectorToProp, localPropsToProp, element } = component;\n\n /**\n * We allow components to map an event to a prop. These events can automatically\n * call a method on the nylasConnector instance.\n */\n eventToProps?.forEach((customEventHandler, propKey) => {\n const nylasConnector = this.nylasConnector;\n const handler = async (event: CustomEvent<any>) => {\n debug(`[${this.hostTagName}] (registerComponent) Handling \"${component.name}\" prop \"${String(propKey)}\" event.`, { event });\n if (propKey in eventOverrides) {\n debug(`[${this.hostTagName}] (registerComponent) Found event override for \"${String(propKey)}\" event. Calling override.`);\n await eventOverrides[propKey](event, nylasConnector);\n }\n\n if (!event.defaultPrevented) {\n await customEventHandler(event, nylasConnector);\n }\n\n return;\n };\n\n const elementId = component.element.dataset.nylasId;\n\n if (elementId && !this.eventListenerRegistrations.has(elementId)) {\n this.eventListenerRegistrations.set(elementId, []);\n }\n\n if (elementId) {\n this.eventListenerRegistrations.get(elementId)?.push([element, propKey, handler]);\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Setting \"${component.name}\" event \"${String(propKey)}\" to automcially call NylasConnector method.`);\n\n // We should immediately call the event handler to make sure the prop is set\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (registerComponent) Adding event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.addEventListener(eventName, handler as unknown as EventListener);\n });\n\n /**\n * This is a rather simple way for us to set the initial props for a component.\n * For each prop, we check if the prop is mapped to a store. If it is, we set\n * the prop to the store value.\n */\n stateToProps?.forEach((propKey, stateKey) => {\n const [storeName, stateName] = stateKey.split('.');\n const store = this.getStore(storeName as keyof typeof this.stores);\n const stateValue = store.state[stateName as keyof typeof store.state];\n\n // Make sure this component was registered and has a nylasId\n if (!element.dataset.nylasId) {\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.name}\" not registered. Skipping.`, { component });\n return;\n }\n\n // We need to keep track of the store and prop key so that we can update the\n // prop when the store changes\n if (!this.propStateRegistrations.has(storeName as keyof typeof this.stores)) {\n this.propStateRegistrations.set(storeName as keyof typeof this.stores, new Map());\n }\n\n if (!this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.has(stateName)) {\n this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.set(stateName, [\n {\n elementId: element.dataset.nylasId,\n propKey,\n },\n ]);\n } else {\n this.propStateRegistrations\n .get(storeName as keyof typeof this.stores)\n ?.get(stateName)\n ?.push({\n elementId: element.dataset.nylasId,\n propKey,\n });\n }\n\n // Set the prop value on the component\n (element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey}\" value.`, { stateValue });\n });\n\n /**\n * We allow components to also map props from the provider to the component.\n */\n localPropsToProp?.forEach((propKey, value) => {\n const mappedPropValue = this.host[value]; // TODO: Is this safe? We should find a way to only limit it to public properties and no methods.\n (element as { [key: string]: any })[propKey.toString()] = mappedPropValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to the value of \"${value}\" value.`, { value, mappedPropValue });\n });\n\n /**\n * We allow components to access the getStore method directly.\n */\n if (getStoresToProp) {\n (element as { [key: string]: any })[getStoresToProp?.toString()] = this.getStore;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${getStoresToProp.toString()}\" to \"getStore\" method.`);\n }\n\n /**\n * We allow components to map a store to a prop for direct access.\n */\n storeToProps?.forEach((propKey, storeKey) => {\n const store = this.getStore(storeKey);\n (element as { [key: string]: any })[propKey.toString()] = store;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${storeKey}\" store.`, { store });\n });\n\n /**\n * We allow components to map the NylasConnector instance to a prop for direct access.\n */\n if (connectorToProp) {\n (element as { [key: string]: any })[connectorToProp?.toString()] = this.nylasConnector;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${connectorToProp.toString()}\" to \"nylasConnector\" value.`, { connectorToProp });\n }\n\n /**\n * We allow components to fire an event when they are registered.\n */\n if (typeof element.registerCallback === 'function') {\n debug(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for \"${component.name}\".`);\n await element.registerCallback();\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} registered.`);\n }\n\n /**\n * Cleans up registrations for a component without fully unregistering it\n * @param elementId The ID of the element to clean up\n * @param removeFromRegistry Whether to remove the component from the registry\n */\n private cleanupComponentRegistration(elementId: string, removeFromRegistry: boolean = true): void {\n // Remove event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n if (eventListenerRegistrations) {\n eventListenerRegistrations.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n this.eventListenerRegistrations.delete(elementId);\n }\n\n // Clean up prop state registrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((props, stateKey) => {\n const filteredProps = props.filter(prop => prop.elementId !== elementId);\n if (filteredProps.length !== props.length) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Remove from registry if requested\n if (removeFromRegistry) {\n delete this.registeredComponents[elementId];\n }\n }\n\n /**\n * This is a method that is used to unregister a component with the provider.\n * @param component HTMLElement to unregister\n * @returns void\n */\n public unregisterComponent(component: RegisteredComponent<any, any>): void {\n debug(`[${this.hostTagName}] Unregistering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n if (!elementId) {\n debug(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${component.name}.`);\n return;\n }\n\n // Make sure the component is not already registered\n if (this.registeredComponents[elementId]) {\n debug(`[${this.hostTagName}] (unregisterComponent) Component ${component.name} not registered. Skipping.`);\n return;\n }\n\n // Remove the component prop registration from propStateRegistrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((_, stateKey) => {\n const props = this.propStateRegistrations.get(storeName)?.get(stateKey);\n const filteredProps = props?.filter(prop => prop.elementId !== elementId);\n if (filteredProps) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Before we unregister the component, we need to remove any event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n eventListenerRegistrations?.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (unregisterComponent) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n\n // Unregister the component\n delete this.registeredComponents[elementId];\n }\n\n /**\n * This method is used to dynamically retrieve the appropriate store\n * @param name store name\n */\n public getStore<K extends keyof Stores>(name: K): Stores[K] {\n const store = this.stores[name];\n if (!store) {\n throw new Error(`[${this.hostTagName}] Store \"${name.toString()}\" not found.`);\n }\n return store;\n }\n\n /**\n * This method is called when the component is connected to the DOM.\n * We're using this method to listen for changes in the store and update\n * the registered components with the new values.\n */\n private async setupStoreListeners() {\n const self = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n /**\n * This is a rather simple way for us to listen for changes in the store\n * and make sure our registered components are updated with the new values.\n *\n * For each store change, we loop through each registered component and\n * check if the store change is mapped to a prop on the component. If it is,\n * we set the prop to the new value.\n *\n * We call this super early in the provider lifecycle so that we can make sure\n * that all components have the correct props before they are rendered.\n */\n Object.entries(this.stores).forEach(([storeName, store]) => {\n debug(`[${self.hostTagName}] (setupStoreListeners) Listening for changes in \"${storeName}\" store.`);\n store.use({\n set(stateKey, newValue, oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" changed`, { newValue, oldValue });\n if (newValue === oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" unchanged. Skipping.`);\n return;\n }\n\n const registeredComponents = self.registeredComponents;\n if (!registeredComponents) {\n debug(`[${self.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);\n return;\n }\n\n // Get our prop registrations for this store\n const props = self.propStateRegistrations.get(storeName as keyof typeof self.stores as string)?.get(stateKey.toString()) || [];\n debug(`[${self.hostTagName}] (setupStoreListeners) Found ${props.length} prop(s) registered for \"${stateKey.toString()}\" store.`, {\n props,\n propStateRegistrations: self.propStateRegistrations,\n });\n\n // Loop through each registered component and update the prop\n props.forEach(({ elementId, propKey }) => {\n const component = registeredComponents[elementId];\n if (!component) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Component \"${elementId}\" not found. Skipping.`, { component });\n return;\n }\n\n // Get the appropriate store\n const loadedStore = self.getStore(storeName as keyof typeof self.stores as string);\n const stateValue = loadedStore.state[stateKey as unknown as keyof typeof loadedStore.state];\n (component.element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${self.hostTagName}] (setupStoreListeners) Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey.toString()}\" value.`, { stateValue });\n });\n },\n });\n });\n }\n\n /**\n * Simple getter for the host element tag name.\n */\n private get hostTagName(): string {\n return this.host?.tagName?.toLowerCase() ?? 'nylas-provider';\n }\n}\n\nexport class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"app-globals-ee500b74.js","mappings":";;AAAe;;ACCH,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/common/global.ts","@stencil/core/internal/app-globals"],"sourcesContent":["export default async function () {}\n","import appGlobalScript from '/
|
|
1
|
+
{"file":"app-globals-ee500b74.js","mappings":";;AAAe;;ACCH,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/common/global.ts","@stencil/core/internal/app-globals"],"sourcesContent":["export default async function () {}\n","import appGlobalScript from '/Users/pooja.g/poojaguggari/github/nylas/packages/nylas-web-elements/src/common/global.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index$1 = require('./index-e07e3a7e.js');
|
|
6
|
-
const registerComponent = require('./register-component-
|
|
7
|
-
const utils = require('./utils-
|
|
6
|
+
const registerComponent = require('./register-component-f4ad9751.js');
|
|
7
|
+
const utils = require('./utils-03b13826.js');
|
|
8
8
|
const constants = require('./constants-27331d2d.js');
|
|
9
9
|
|
|
10
10
|
const iconCss$9 = ".sc-calendar-agenda-fill-icon-h{display:flex}";
|
|
@@ -654,6 +654,8 @@ const NylasBookingConfirmationRedirect = class {
|
|
|
654
654
|
this.currentRedirectUrl = '';
|
|
655
655
|
this.acceptUrl = undefined;
|
|
656
656
|
this.componentLoaded = false;
|
|
657
|
+
this.requiredError = '';
|
|
658
|
+
this.patternError = '';
|
|
657
659
|
}
|
|
658
660
|
elementNameChangedHandler(newValue) {
|
|
659
661
|
utils.debug('nylas-booking-confirmation-redirect', 'elementNameChangedHandler', newValue);
|
|
@@ -670,6 +672,8 @@ const NylasBookingConfirmationRedirect = class {
|
|
|
670
672
|
if (newVal === oldVal)
|
|
671
673
|
return;
|
|
672
674
|
utils.instance.changeLanguage(newVal);
|
|
675
|
+
this.requiredError = utils.instance.t('fieldRequired', { field: utils.instance.t('redirectUrl') });
|
|
676
|
+
this.patternError = utils.instance.t('invalidInputFormat', { field: utils.instance.t('redirectUrl') });
|
|
673
677
|
}
|
|
674
678
|
connectedCallback() {
|
|
675
679
|
utils.debug('nylas-booking-confirmation-redirect', 'connectedCallback');
|
|
@@ -727,8 +731,8 @@ const NylasBookingConfirmationRedirect = class {
|
|
|
727
731
|
if (this.acceptUrl && name === 'confirmation-redirect') {
|
|
728
732
|
this.redirectUrlErrorMessage = '';
|
|
729
733
|
if (!utils.isValidUrl(this.currentRedirectUrl)) {
|
|
730
|
-
this.internals.setValidity({ customError: true }, '
|
|
731
|
-
this.redirectUrlErrorMessage = '
|
|
734
|
+
this.internals.setValidity({ customError: true }, utils.instance.t('nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage'));
|
|
735
|
+
this.redirectUrlErrorMessage = utils.instance.t('nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage');
|
|
732
736
|
return;
|
|
733
737
|
}
|
|
734
738
|
this.internals.setValidity({});
|
|
@@ -741,8 +745,8 @@ const NylasBookingConfirmationRedirect = class {
|
|
|
741
745
|
}
|
|
742
746
|
formSubmittedHandler(_event) {
|
|
743
747
|
if (this.acceptUrl && !utils.isValidUrl(this.currentRedirectUrl)) {
|
|
744
|
-
this.internals.setValidity({ customError: true }, '
|
|
745
|
-
this.redirectUrlErrorMessage = '
|
|
748
|
+
this.internals.setValidity({ customError: true }, utils.instance.t('nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage'));
|
|
749
|
+
this.redirectUrlErrorMessage = utils.instance.t('nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage');
|
|
746
750
|
}
|
|
747
751
|
else {
|
|
748
752
|
this.internals.setValidity({});
|
|
@@ -759,7 +763,7 @@ const NylasBookingConfirmationRedirect = class {
|
|
|
759
763
|
value: 'custom',
|
|
760
764
|
},
|
|
761
765
|
];
|
|
762
|
-
return (index$1.h(index$1.Host, { key: '
|
|
766
|
+
return (index$1.h(index$1.Host, { key: '3f0b860be075b40c1c4c128b3300de4ecccd8057' }, index$1.h("div", { key: '75bd98cf98b22ede61543e1c6d4cb3e1a2fab868', class: "nylas-booking-confirmation-redirect", part: "nbcr" }, redirectOptions.length > 0 && (index$1.h("div", { class: "nylas-booking-confirmation-redirect__dropdown" }, index$1.h("span", { class: "label" }, utils.instance.t('nylasBookingConfirmationRedirect.dropdownLabel'), index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasBookingConfirmationRedirect.tooltip.desc')))), this.componentLoaded && (index$1.h("select-dropdown", { name: "confirmation-redirect-dropdown", options: redirectOptions, withSearch: false, defaultSelectedOption: redirectOptions.find(option => option.value === (this.acceptUrl ? 'custom' : 'default')), exportparts: "sd_dropdown: nbcr__dropdown, sd_dropdown-button: nbcr__dropdown-button, sd_dropdown-content: nbcr__dropdown-content" })), this.acceptUrl && (index$1.h("div", null, index$1.h("input-component", { name: "confirmation-redirect", id: "confirmation-redirect", type: "text", placeholder: utils.instance.t('nylasBookingConfirmationRedirect.customRedirectUrlPlaceholder'), required: false, part: "ic__input_wrapper: nbcr__input-textfield", requiredError: this.requiredError, patternError: this.patternError, defaultValue: this.currentRedirectUrl }), this.redirectUrlErrorMessage && index$1.h("span", { class: "error-message" }, this.redirectUrlErrorMessage))))))));
|
|
763
767
|
}
|
|
764
768
|
static get formAssociated() { return true; }
|
|
765
769
|
get host() { return index$1.getElement(this); }
|
|
@@ -4625,11 +4629,14 @@ const NylasConfirmationEmail = class {
|
|
|
4625
4629
|
render() {
|
|
4626
4630
|
const organizer = this.participantsState.find(p => p.is_organizer);
|
|
4627
4631
|
const organizerName = organizer?.name || organizer?.email;
|
|
4628
|
-
return (index$1.h(index$1.Host, { key: 'f97ea75387183c592ff2d7c125c1749cd5786540' }, index$1.h("div", { key: '9a28805654e4c8fb4778d821b92c45cb8c616730', class: "nylas-confirmation-email", part: "nce" }, index$1.h("div", { key: '3c9f7313a008cfbe506a211b46b361da4447a481', class: "header", part: "nce__header" }, index$1.h("div", { key: '4c980155e1b10a49b50202a6c34e45c3d8882e22' }, index$1.h("h3", { key: 'e56be66a98d11404875372d40ea1bca5564c1ba1' }, this.confirmationEmail?.booking_confirmed?.title ||
|
|
4629
|
-
utils.instance.t('nylasConfirmationEmail.
|
|
4632
|
+
return (index$1.h(index$1.Host, { key: 'f97ea75387183c592ff2d7c125c1749cd5786540' }, index$1.h("div", { key: '9a28805654e4c8fb4778d821b92c45cb8c616730', class: "nylas-confirmation-email", part: "nce" }, index$1.h("div", { key: '3c9f7313a008cfbe506a211b46b361da4447a481', class: "header", part: "nce__header" }, index$1.h("div", { key: '4c980155e1b10a49b50202a6c34e45c3d8882e22' }, index$1.h("h3", { key: 'e56be66a98d11404875372d40ea1bca5564c1ba1' }, this.confirmationEmail?.booking_confirmed?.title || organizerName
|
|
4633
|
+
? utils.instance.t('nylasConfirmationEmail.headerTitle_withOrganizer', { organizerName: organizerName })
|
|
4634
|
+
: utils.instance.t('nylasConfirmationEmail.headerTitle')), index$1.h("p", { key: 'bf710ceb827923da51a2ab5e79217491d39cbc66' }, utils.instance.t('nylasConfirmationEmail.headerSubTitle'))), this.isConfirmationEmailOpen ? (index$1.h("div", { class: "confirmation-email-toggle", part: "nce__confirmation-email-toggle--container" }, index$1.h("span", { class: `chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, index$1.h("chevron-icon", { width: "24", height: "24" })))) : (index$1.h("button-component", { variant: 'basic', clickHandler: event => {
|
|
4630
4635
|
event.preventDefault();
|
|
4631
4636
|
this.toggleConfirmationEmail();
|
|
4632
|
-
} }, index$1.h("edit-icon", { width: "16", height: "16" }), utils.instance.t('nylasConfirmationEmail.editButtonText')))), this.isConfirmationEmailOpen ? (index$1.h("div", { class: "nylas-confirmation-email__body", part: "nce__body" }, index$1.h("div", { class: "nylas-confirmation-email__section" }, this.nylasBranding && (index$1.h("div", { class: "nylas-confirmation-email__row" }, index$1.h("label", null, utils.instance.t('nylasConfirmationEmail.nylasBranding.label'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasConfirmationEmail.nylasBranding.tooltip.desc'))))), index$1.h("toggle-switch", { exportparts: "ts_label: nce__toggle-label, ts_input: nce_toggle-input, ts_slider: nce_toggle-slider", name: `confirmation-email-show-branding`, checked: this.confirmationEmail?.show_nylas_branding }))), index$1.h("div", { class: "nylas-confirmation-email__row" }, index$1.h("div", { class: "subsection" }, index$1.h("div", { class: "input-container" }, index$1.h("label", null, utils.instance.t('nylasConfirmationEmail.companyLogoUrl.label'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasConfirmationEmail.companyLogoUrl.tooltip.desc'))))), this.confirmationEmail && (index$1.h("input-image-url", { name: "confirmation-email-logo", exportparts: "iiu__logo-input-textfield: nce__input-image-url", errorMessage: this.invalidImageErrorMessage, imageUrl: this.confirmationEmail?.logo ?? '' }))))), index$1.h("div", { class: "nylas-confirmation-email__row full-width-col" }, index$1.h("div", { class: "subsection" }, index$1.h("h3", null, utils.instance.t('nylasConfirmationEmail.emailMessage.header')), index$1.h("div", { class: "input-container" }, index$1.h("label", { htmlFor: "title" }, utils.instance.t('nylasConfirmationEmail.emailMessage.label'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasConfirmationEmail.emailMessage.tooltip.desc'))))), index$1.h("input-component", { name: "confirmation-email-title", maxLength: 60, placeholder:
|
|
4637
|
+
} }, index$1.h("edit-icon", { width: "16", height: "16" }), utils.instance.t('nylasConfirmationEmail.editButtonText')))), this.isConfirmationEmailOpen ? (index$1.h("div", { class: "nylas-confirmation-email__body", part: "nce__body" }, index$1.h("div", { class: "nylas-confirmation-email__section" }, this.nylasBranding && (index$1.h("div", { class: "nylas-confirmation-email__row" }, index$1.h("label", null, utils.instance.t('nylasConfirmationEmail.nylasBranding.label'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasConfirmationEmail.nylasBranding.tooltip.desc'))))), index$1.h("toggle-switch", { exportparts: "ts_label: nce__toggle-label, ts_input: nce_toggle-input, ts_slider: nce_toggle-slider", name: `confirmation-email-show-branding`, checked: this.confirmationEmail?.show_nylas_branding }))), index$1.h("div", { class: "nylas-confirmation-email__row" }, index$1.h("div", { class: "subsection" }, index$1.h("div", { class: "input-container" }, index$1.h("label", null, utils.instance.t('nylasConfirmationEmail.companyLogoUrl.label'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasConfirmationEmail.companyLogoUrl.tooltip.desc'))))), this.confirmationEmail && (index$1.h("input-image-url", { name: "confirmation-email-logo", exportparts: "iiu__logo-input-textfield: nce__input-image-url", errorMessage: this.invalidImageErrorMessage, imageUrl: this.confirmationEmail?.logo ?? '' }))))), index$1.h("div", { class: "nylas-confirmation-email__row full-width-col" }, index$1.h("div", { class: "subsection" }, index$1.h("h3", null, utils.instance.t('nylasConfirmationEmail.emailMessage.header')), index$1.h("div", { class: "input-container" }, index$1.h("label", { htmlFor: "title" }, utils.instance.t('nylasConfirmationEmail.emailMessage.label'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasConfirmationEmail.emailMessage.tooltip.desc'))))), index$1.h("input-component", { name: "confirmation-email-title", maxLength: 60, placeholder: organizerName
|
|
4638
|
+
? utils.instance.t('nylasConfirmationEmail.headerTitle_withOrganizer', { organizerName: organizerName })
|
|
4639
|
+
: utils.instance.t('nylasConfirmationEmail.headerTitle'), defaultValue: this.confirmationEmail?.booking_confirmed?.title ?? '' })), index$1.h("div", { class: "input-container" }, index$1.h("textarea-component", { label: utils.instance.t('nylasConfirmationEmail.emailMessage.additionalInfoLabel'), name: "confirmation-email-body", id: "confirmation-email-body", placeholder: utils.instance.t('nylasConfirmationEmail.emailMessage.additionalInfoPlaceholder'), tooltip: utils.instance.t('nylasConfirmationEmail.emailMessage.additionalInfoTooltip'), maxLength: 500, defaultValue: this.confirmationEmail?.booking_confirmed?.body ?? '' }))))))) : (index$1.h("div", { class: "nylas-confirmation-email__summary", part: "nce__summary" }, index$1.h("p", null, index$1.h("span", { class: "summary-icon" }, index$1.h("person-clipboard-icon", null)), utils.instance.t('nylasConfirmationEmail.allHosts')), index$1.h("p", null, index$1.h("span", { class: "summary-icon" }, index$1.h("clock-icon", null)), utils.instance.t('nylasConfirmationEmail.immediatelyUponBooking')))))));
|
|
4633
4640
|
}
|
|
4634
4641
|
static get formAssociated() { return true; }
|
|
4635
4642
|
get host() { return index$1.getElement(this); }
|
|
@@ -4991,6 +4998,8 @@ const NylasCustomEventSlug = class {
|
|
|
4991
4998
|
this.urlSlug = undefined;
|
|
4992
4999
|
this.focus = false;
|
|
4993
5000
|
this.copied = false;
|
|
5001
|
+
this.requiredError = utils.instance.t('fieldRequired', { field: 'Slug' });
|
|
5002
|
+
this.patternError = utils.instance.t('invalidInputFormat', { field: 'Slug' });
|
|
4994
5003
|
}
|
|
4995
5004
|
connectedCallback() {
|
|
4996
5005
|
utils.debug('nylas-custom-event-slug', 'connectedCallback');
|
|
@@ -5036,6 +5045,8 @@ const NylasCustomEventSlug = class {
|
|
|
5036
5045
|
if (newVal === oldVal)
|
|
5037
5046
|
return;
|
|
5038
5047
|
utils.instance.changeLanguage(newVal);
|
|
5048
|
+
this.requiredError = utils.instance.t('fieldRequired', { field: 'Slug' });
|
|
5049
|
+
this.patternError = utils.instance.t('invalidInputFormat', { field: 'Slug' });
|
|
5039
5050
|
}
|
|
5040
5051
|
async nylasFormInputChangeHandler(event) {
|
|
5041
5052
|
const { name, value } = event.detail;
|
|
@@ -5053,14 +5064,14 @@ const NylasCustomEventSlug = class {
|
|
|
5053
5064
|
this.slugErrorMessage = '';
|
|
5054
5065
|
this.internals.setValidity({});
|
|
5055
5066
|
this.focus = false;
|
|
5056
|
-
if (this.requiresSlug && this.urlSlug === '') {
|
|
5057
|
-
this.internals.setValidity({ customError: true }, '
|
|
5058
|
-
this.slugErrorMessage = '
|
|
5067
|
+
if (this.requiresSlug && this.urlSlug.trim() === '') {
|
|
5068
|
+
this.internals.setValidity({ customError: true }, utils.instance.t('nylasCustomEventSlug.slugRequiredErrorMessage'));
|
|
5069
|
+
this.slugErrorMessage = utils.instance.t('nylasCustomEventSlug.slugRequiredErrorMessage');
|
|
5059
5070
|
return;
|
|
5060
5071
|
}
|
|
5061
|
-
if (!/^[A-Za-z0-
|
|
5062
|
-
this.internals.setValidity({ customError: true }, '
|
|
5063
|
-
this.slugErrorMessage = '
|
|
5072
|
+
if (!/^[A-Za-z0-9._-]*$/.test(this.urlSlug.trim())) {
|
|
5073
|
+
this.internals.setValidity({ customError: true }, utils.instance.t('nylasCustomEventSlug.slugErrorMessage'));
|
|
5074
|
+
this.slugErrorMessage = utils.instance.t('nylasCustomEventSlug.slugErrorMessage');
|
|
5064
5075
|
}
|
|
5065
5076
|
}
|
|
5066
5077
|
formSubmittedHandler(event) {
|
|
@@ -5086,7 +5097,7 @@ const NylasCustomEventSlug = class {
|
|
|
5086
5097
|
if (!this.requiresSlug)
|
|
5087
5098
|
return null;
|
|
5088
5099
|
const isComponentReady = typeof this.urlSlug !== 'undefined';
|
|
5089
|
-
return (index$1.h(index$1.Host, null, index$1.h("div", { class: "nylas-custom-event-slug", part: "nces" }, index$1.h("div", { class: "header", part: "nces__header" }, index$1.h("div", null, index$1.h("h3", null, utils.instance.t('nylasCustomEventSlug.headerTitle')), index$1.h("p", null, utils.instance.t('nylasCustomEventSlug.headerSubTitle'))), index$1.h("div", { class: "drawer-toggle", part: "nces__drawer-toggle--container" }, index$1.h("span", { class: `chevron ${this.isOpen ? 'open' : 'closed'} `, onClick: () => this.toggleDrawer() }, index$1.h("chevron-icon", { width: "24", height: "24" })))), this.isOpen && (index$1.h("div", { class: "nylas-custom-event-slug__body", part: "nces__body" }, index$1.h("div", { class: "nylas-custom-event-slug__section" }, index$1.h("div", { class: "nylas-custom-event-slug__row" }, index$1.h("div", { class: "input-container" }, index$1.h("label", null, utils.instance.t('nylasCustomEventSlug.eventSlugLabel'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasCustomEventSlug.tooltip.desc'))))), index$1.h("div", { class: { 'nylas-custom-event-slug__input-wrapper': true, 'focus': this.focus, 'error': !!this.slugErrorMessage } }, index$1.h("div", { slot: "prefix", class: "prefix" }, "/"), isComponentReady && (index$1.h("input-component", { name: "event-slug", id: "event-slug", type: "text", required: false, placeholder: "my-link-name", exportparts: "ic_input: nces__input-textfield", defaultValue: this.urlSlug })), index$1.h("div", { slot: "icon", class: { icon: true, disabled: !this.urlSlug }, onClick: () => !this.copied && !!this.urlSlug && this.copyToClipboard() }, this.copied ? (index$1.h("div", { class: "copied" }, index$1.h("checkmark-icon", { width: "12", height: "18" }), " ", utils.instance.t('nylasCustomEventSlug.copied'))) : (index$1.h("copy-icon", { width: "12", height: "18" })))), this.slugErrorMessage && index$1.h("span", { class: "error-message" }, this.slugErrorMessage)))))))));
|
|
5100
|
+
return (index$1.h(index$1.Host, null, index$1.h("div", { class: "nylas-custom-event-slug", part: "nces" }, index$1.h("div", { class: "header", part: "nces__header" }, index$1.h("div", null, index$1.h("h3", null, utils.instance.t('nylasCustomEventSlug.headerTitle')), index$1.h("p", null, utils.instance.t('nylasCustomEventSlug.headerSubTitle'))), index$1.h("div", { class: "drawer-toggle", part: "nces__drawer-toggle--container" }, index$1.h("span", { class: `chevron ${this.isOpen ? 'open' : 'closed'} `, onClick: () => this.toggleDrawer() }, index$1.h("chevron-icon", { width: "24", height: "24" })))), this.isOpen && (index$1.h("div", { class: "nylas-custom-event-slug__body", part: "nces__body" }, index$1.h("div", { class: "nylas-custom-event-slug__section" }, index$1.h("div", { class: "nylas-custom-event-slug__row" }, index$1.h("div", { class: "input-container" }, index$1.h("label", null, utils.instance.t('nylasCustomEventSlug.eventSlugLabel'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasCustomEventSlug.tooltip.desc'))))), index$1.h("div", { class: { 'nylas-custom-event-slug__input-wrapper': true, 'focus': this.focus, 'error': !!this.slugErrorMessage } }, index$1.h("div", { slot: "prefix", class: "prefix" }, "/"), isComponentReady && (index$1.h("input-component", { name: "event-slug", id: "event-slug", type: "text", required: false, placeholder: "my-link-name", exportparts: "ic_input: nces__input-textfield", defaultValue: this.urlSlug, requiredError: this.requiredError, patternError: this.patternError })), index$1.h("div", { slot: "icon", class: { icon: true, disabled: !this.urlSlug }, onClick: () => !this.copied && !!this.urlSlug && this.copyToClipboard() }, this.copied ? (index$1.h("div", { class: "copied" }, index$1.h("checkmark-icon", { width: "12", height: "18" }), " ", utils.instance.t('nylasCustomEventSlug.copied'))) : (index$1.h("copy-icon", { width: "12", height: "18" })))), this.slugErrorMessage && index$1.h("span", { class: "error-message" }, this.slugErrorMessage)))))))));
|
|
5090
5101
|
}
|
|
5091
5102
|
static get formAssociated() { return true; }
|
|
5092
5103
|
get host() { return index$1.getElement(this); }
|
|
@@ -7164,7 +7175,9 @@ const NylasReminderEmails = class {
|
|
|
7164
7175
|
recipientOptions = recipientOptions.filter(option => option.value !== 'all');
|
|
7165
7176
|
}
|
|
7166
7177
|
return (index$1.h(index$1.Host, { key: 'a14f383c9531076b75a3c8848b1a866199675f95' }, index$1.h("div", { key: 'bfa9969c2318b4f3c23bc159524da0f05b571b51', class: "cards-container" }, this.reminders.map((reminder, index) => {
|
|
7167
|
-
return reminder.type !== 'webhook' ? (index$1.h("div", { class: "nylas-reminder-email", part: "nre" }, index$1.h("div", { class: "header", part: "nre__header" }, index$1.h("div", null, index$1.h("h3", null,
|
|
7178
|
+
return reminder.type !== 'webhook' ? (index$1.h("div", { class: "nylas-reminder-email", part: "nre" }, index$1.h("div", { class: "header", part: "nre__header" }, index$1.h("div", null, index$1.h("h3", null, organizerName
|
|
7179
|
+
? utils.instance.t('nylasReminderEmails.headerTitle_withOrganizer', { organizerName: ` ${organizerName}` })
|
|
7180
|
+
: utils.instance.t('nylasReminderEmails.headerTitle')), index$1.h("p", null, utils.instance.t('nylasReminderEmails.headerSubTitle'))), !reminder.editing ? (index$1.h("button-component", { variant: 'basic', key: `edit-${index} `, clickHandler: event => {
|
|
7168
7181
|
event.preventDefault();
|
|
7169
7182
|
reminder.editing = true;
|
|
7170
7183
|
this.reminders = [...this.reminders];
|
|
@@ -7176,11 +7189,13 @@ const NylasReminderEmails = class {
|
|
|
7176
7189
|
this.reminders = [...this.reminders];
|
|
7177
7190
|
} }, index$1.h("chevron-icon", { width: "24", height: "24" }))))), reminder.editing ? (index$1.h("div", { class: "nylas-reminder-email__body", part: "nre__body" }, index$1.h("div", { class: "nylas-reminder-email__section" }, index$1.h("div", { class: "nylas-reminder-email__row" }, index$1.h("label", null, utils.instance.t('nylasReminderEmails.emailRecipients.label')), index$1.h("select-dropdown", { name: `recipient-${index}`, options: recipientOptions, defaultSelectedOption: recipientOptions.find(i => i.value === reminder.recipient) ?? recipientOptions[0], withSearch: false })), index$1.h("div", { class: "nylas-reminder-email__row" }, index$1.h("label", null, utils.instance.t('nylasReminderEmails.sendConfirmation.label'), index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, utils.instance.t('nylasReminderEmails.sendConfirmation.tooltip.desc'))))), index$1.h("div", null, index$1.h("nylas-reminder-time", { name: `reminder-time-${index}`, eventReminderTimeMinutes: reminder.minutes_before_event, exportparts: "nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" }), this.reminderErrors[`reminder-time-${index}`]?.error && (index$1.h("p", { class: "error-message" }, this.reminderErrors[`reminder-time-${index}`]?.error, ' ', index$1.h("button-component", { variant: "invisible", onClick: _e => {
|
|
7178
7191
|
this.nylasSuggestReminderMinutes.emit({ minutes: this.reminderErrors[`reminder-time-${index}`]?.suggestion });
|
|
7179
|
-
} }, this.reminderErrors[`reminder-time-${index}`]?.suggestion))))), index$1.h("div", { class: "nylas-reminder-email__block" }, index$1.h("label", null, utils.instance.t('nylasReminderEmails.emailSubject.label')), index$1.h("input-component", { name: `reminder-subject-${index}`, maxLength: 60, placeholder:
|
|
7180
|
-
|
|
7192
|
+
} }, this.reminderErrors[`reminder-time-${index}`]?.suggestion))))), index$1.h("div", { class: "nylas-reminder-email__block" }, index$1.h("label", null, utils.instance.t('nylasReminderEmails.emailSubject.label')), index$1.h("input-component", { name: `reminder-subject-${index}`, maxLength: 60, placeholder: organizerName
|
|
7193
|
+
? utils.instance.t('nylasReminderEmails.emailSubject.placeholder_withOrganizer', { organizerName: organizerName })
|
|
7194
|
+
: utils.instance.t('nylasReminderEmails.emailSubject.placeholder'), defaultValue: reminder?.email_subject || '' }))))) : (index$1.h("div", { class: "nylas-reminder-email__summary", part: "nre__summary" }, index$1.h("p", null, index$1.h("span", { class: "summary-icon" }, index$1.h("person-clipboard-icon", null)), recipientOptions.find(i => i.value === reminder.recipient)?.label), index$1.h("p", null, index$1.h("span", { class: "summary-icon" }, index$1.h("clock-icon", null)), this.formatReminderTime(reminder.minutes_before_event), " ", utils.instance.t('nylasReminderEmails.beforeTheEvent')))))) : null;
|
|
7195
|
+
})), index$1.h("button-component", { key: 'c3ed905e5bb3a2dfd208e2ee15d687af5bce77b7', class: "create-reminder", variant: 'basic', clickHandler: event => {
|
|
7181
7196
|
event.preventDefault();
|
|
7182
7197
|
this.addReminder();
|
|
7183
|
-
} }, index$1.h("plus-icon", { key: '
|
|
7198
|
+
} }, index$1.h("plus-icon", { key: '7ad8981e96e6bafc71a8ee0853412b40d04063c8', width: "16", height: "16" }), utils.instance.t('nylasReminderEmails.newReminderButtonText'))));
|
|
7184
7199
|
}
|
|
7185
7200
|
static get formAssociated() { return true; }
|
|
7186
7201
|
get host() { return index$1.getElement(this); }
|