@nylas/web-elements 2.5.16 → 2.5.18
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 +1 -1
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +316 -270
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +1 -1
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +15 -3
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +44 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.entry.cjs.js.map +1 -1
- package/dist/cjs/{version-Cc3rTMtG.js → version-Xu0ORQw8.js} +3 -3
- package/dist/cjs/{version-Cc3rTMtG.js.map → version-Xu0ORQw8.js.map} +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +48 -3
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +20 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +24 -0
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/version.js +1 -1
- package/dist/collection/version.js.map +1 -1
- package/dist/components/nylas-booking-form.js +1 -1
- package/dist/components/nylas-editor-tabs-group.js +1 -1
- package/dist/components/nylas-editor-tabs.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +3 -3
- package/dist/components/nylas-scheduling.js +45 -2
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/{p-BJsBeE4_.js → p-BGCZ4yg1.js} +3 -3
- package/dist/components/{p-BJsBeE4_.js.map → p-BGCZ4yg1.js.map} +1 -1
- package/dist/components/{p-DRMxunL6.js → p-DQNm7dzQ.js} +3 -3
- package/dist/components/{p-DRMxunL6.js.map → p-DQNm7dzQ.js.map} +1 -1
- package/dist/components/{p-KzMRmaBa.js → p-DRXHxMKj.js} +3 -3
- package/dist/components/{p-KzMRmaBa.js.map → p-DRXHxMKj.js.map} +1 -1
- package/dist/components/{p-B3cnALr8.js → p-WABPA0YV.js} +17 -5
- package/dist/components/p-WABPA0YV.js.map +1 -0
- package/dist/esm/google-logo-icon_6.entry.js +1 -1
- package/dist/esm/nylas-booked-event-card_11.entry.js +15 -3
- package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
- package/dist/esm/nylas-scheduling.entry.js +44 -1
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/{version-Ce04N_Lo.js → version-iQhY7wWk.js} +3 -3
- package/dist/esm/{version-Ce04N_Lo.js.map → version-iQhY7wWk.js.map} +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-ff693a85.entry.js → p-1401a68f.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4d04cfe9.entry.js +2 -0
- package/dist/nylas-web-elements/p-4d04cfe9.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-71137e94.entry.js → p-7b8b7718.entry.js} +2 -2
- package/dist/nylas-web-elements/p-cb33346f.entry.js +2 -0
- package/dist/nylas-web-elements/p-cb33346f.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-Ce04N_Lo.js → p-iQhY7wWk.js} +2 -2
- package/dist/nylas-web-elements/{p-Ce04N_Lo.js.map → p-iQhY7wWk.js.map} +1 -1
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +2 -0
- package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +1 -0
- package/dist/types/components.d.ts +10 -0
- package/dist/types/connector/shared/api/scheduler.d.ts +2 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-B3cnALr8.js.map +0 -1
- package/dist/nylas-web-elements/p-b607eace.entry.js +0 -2
- package/dist/nylas-web-elements/p-b607eace.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-c7f4c268.entry.js +0 -2
- package/dist/nylas-web-elements/p-c7f4c268.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-ff693a85.entry.js.map → p-1401a68f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-71137e94.entry.js.map → p-7b8b7718.entry.js.map} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var index = require('./index-9TuL48qE.js');
|
|
4
4
|
var registerComponent = require('./register-component-DjG8kzjz.js');
|
|
5
5
|
var utils = require('./utils-BDriE9YY.js');
|
|
6
|
-
var version = require('./version-
|
|
6
|
+
var version = require('./version-Xu0ORQw8.js');
|
|
7
7
|
var feedbackSync = require('./feedbackSync-Bcx7mZ9-.js');
|
|
8
8
|
|
|
9
9
|
const iconCss$1 = ".sc-google-logo-icon-h{display:flex}";
|
|
@@ -197,6 +197,8 @@ const NylasBookingForm = class {
|
|
|
197
197
|
index.registerInstance(this, hostRef);
|
|
198
198
|
this.nameChanged = index.createEvent(this, "nameChanged", 7);
|
|
199
199
|
this.emailChanged = index.createEvent(this, "emailChanged", 7);
|
|
200
|
+
this.guestEmailsChanged = index.createEvent(this, "guestEmailsChanged", 7);
|
|
201
|
+
this.additionalFieldsChanged = index.createEvent(this, "additionalFieldsChanged", 7);
|
|
200
202
|
this.backButtonClicked = index.createEvent(this, "backButtonClicked", 7);
|
|
201
203
|
this.detailsConfirmed = index.createEvent(this, "detailsConfirmed", 7);
|
|
202
204
|
this.bookingFormError = index.createEvent(this, "bookingFormError", 7);
|
|
@@ -220,6 +222,7 @@ const NylasBookingForm = class {
|
|
|
220
222
|
const guests = [...this.guestEmails];
|
|
221
223
|
guests[guestIndex] = utils.sanitizeHtml(email);
|
|
222
224
|
this.guestEmails = [...guests];
|
|
225
|
+
this.guestEmailsChanged.emit(this.guestEmails);
|
|
223
226
|
};
|
|
224
227
|
this.handleGuestBlur = (guestIndex, email) => {
|
|
225
228
|
this.resetGuestEmailError(guestIndex);
|
|
@@ -236,6 +239,7 @@ const NylasBookingForm = class {
|
|
|
236
239
|
this.addGuestButtonClickedHandler = e => {
|
|
237
240
|
e.preventDefault();
|
|
238
241
|
this.guestEmails = [...this.guestEmails, ''];
|
|
242
|
+
this.guestEmailsChanged.emit(this.guestEmails);
|
|
239
243
|
};
|
|
240
244
|
this.removeGuestButtonClickHandler = (e, guestIndex) => {
|
|
241
245
|
e.preventDefault();
|
|
@@ -243,6 +247,7 @@ const NylasBookingForm = class {
|
|
|
243
247
|
const guests = [...this.guestEmails];
|
|
244
248
|
guests.splice(guestIndex, 1);
|
|
245
249
|
this.guestEmails = [...guests];
|
|
250
|
+
this.guestEmailsChanged.emit(this.guestEmails);
|
|
246
251
|
};
|
|
247
252
|
this.handleBackButtonClicked = e => {
|
|
248
253
|
e.preventDefault();
|
|
@@ -335,6 +340,7 @@ const NylasBookingForm = class {
|
|
|
335
340
|
this.updateAdditionalFields = (name, value) => {
|
|
336
341
|
if (this.additionalFields) {
|
|
337
342
|
this.additionalFields[name] = value;
|
|
343
|
+
this.additionalFieldsChanged.emit({ ...this.additionalFields });
|
|
338
344
|
}
|
|
339
345
|
};
|
|
340
346
|
}
|
|
@@ -505,7 +511,7 @@ const NylasBookingForm = class {
|
|
|
505
511
|
render() {
|
|
506
512
|
const isGroupEvent = !!this.selectedTimeslot?.event_id && !!this.selectedTimeslot?.capacity;
|
|
507
513
|
const showConsentMessage = this.configSettings?.scheduler?.notetaker_settings?.show_ui_consent_message === true;
|
|
508
|
-
return (index.h(index.Host, { key: '
|
|
514
|
+
return (index.h(index.Host, { key: '37cd9b82bc20430f4fc22ec1fc9395d40476d402' }, index.h("form", { key: 'f9755c802b42d73ea9aaf48d4fb11c69faeb75de', onSubmit: e => this.bookButtonClickedHandler(e), ref: el => (this.formRef = el), noValidate: true }, index.h("div", { key: 'a0e74316cd25d942e033ec831fa4ed770be0df5a', class: "nylas-booking-form", part: "nbf" }, index.h("div", { key: '8a9cd8f75bfa974a47e5e2a3832828226f6ef2e6', class: "input-wrapper", part: "nbf__input-wrapper" }, index.h("input-component", { key: '3433a1edb0c011b8ae998af579210604329af86a', label: utils.instance.t('name'), name: "name", id: "name", defaultValue: this.bookingInfo?.primaryParticipant?.name || this.configSettings?.booking?.guest?.name || this.name, placeholder: utils.instance.t('namePlaceholder'), type: "text", readOnly: this.bookingInfo?.primaryParticipant?.nameReadOnly || false, required: true, requiredError: this.nameRequiredError, patternError: this.namePatternError, themeConfig: this.themeConfig, part: "nbf__input-textfield" })), index.h("div", { key: '17f91b7c2207442cb9206a3480674ba78c89052a', class: "input-wrapper", part: "nbf__input-wrapper" }, index.h("input-component", { key: 'a9418226c0756deefabace1218a1bd1ec3c6157b', label: utils.instance.t('email'), name: "email", id: "email", pattern: emailRegex, defaultValue: this.bookingInfo?.primaryParticipant?.email || this.configSettings?.booking?.guest?.email || this.email, placeholder: utils.instance.t('emailPlaceholder'), type: "email", readOnly: this.bookingInfo?.primaryParticipant?.emailReadOnly || false, required: true, requiredError: this.emailRequiredError, patternError: this.emailPatternError, themeConfig: this.themeConfig, part: "nbf__input-textfield" })), this.configSettings?.scheduler?.hide_additional_guests !== true && (index.h("div", { key: '512f56515ec34e71ac685b1cd54a744922adcf52', class: "input-wrapper", part: "nbf__input-wrapper" }, this.guestEmails.map((email, index$1) => (index.h("div", { class: "input-wrapper button-wrapper" }, index.h("label", { class: {
|
|
509
515
|
error: !!this.guestEmailErrors[index$1],
|
|
510
516
|
} }, utils.instance.t('guestEmail')), index.h("div", { class: "guest-email-input" }, index.h("input", { type: "email", id: `guest-email-${index$1}`, maxLength: 100, class: {
|
|
511
517
|
'guest-email': true,
|
|
@@ -513,7 +519,7 @@ const NylasBookingForm = class {
|
|
|
513
519
|
}, placeholder: utils.instance.t('guestEmailPlaceholder'), value: email, "data-index": index$1, part: "nbf__input-textfield", onBlur: (e) => this.handleGuestBlur(index$1, e.target?.value), onInput: (e) => this.handleGuestChange(index$1, e.target?.value) }), index.h("button-component", { variant: "basic", tooltip: "Remove guest", onClick: (e) => this.removeGuestButtonClickHandler(e, index$1), class: {
|
|
514
520
|
'remove-guest': true,
|
|
515
521
|
'error': !!this.guestEmailErrors[index$1],
|
|
516
|
-
} }, index.h("close-icon", null))), index.h("p", { class: "help-text" }, this.guestEmailErrors[index$1])))), !isGroupEvent && (index.h("button-component", { key: '
|
|
522
|
+
} }, index.h("close-icon", null))), index.h("p", { class: "help-text" }, this.guestEmailErrors[index$1])))), !isGroupEvent && (index.h("button-component", { key: '189869ec5a18043e9bef8c282058cbb26bfcad93', class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: e => this.addGuestButtonClickedHandler(e) }, index.h("div", { key: '68f7e68b8ff5081068bd64e2aa8366508ad3a7b4', class: "button-content" }, index.h("add-circle-icon", { key: 'fb5b3dba51aed878bf60b6e6f40771938a6de433', slot: "icon" }), this.guestEmails.length > 0 ? `${utils.instance.t('addAnotherGuest')}` : `${utils.instance.t('addGuest')}`))))), Object.entries((this.configSettings?.scheduler?.additional_fields || {}))
|
|
517
523
|
?.sort((a, b) => a[1].order - b[1].order)
|
|
518
524
|
.map(x => {
|
|
519
525
|
const field = x[1];
|
|
@@ -544,7 +550,7 @@ const NylasBookingForm = class {
|
|
|
544
550
|
default:
|
|
545
551
|
return (index.h("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, index.h("input-component", { label: label, name: key, id: key, type: field.type, readOnly: fieldReadOnly, defaultValue: defaultValue || '', requiredError: utils.instance.t('fieldRequired', { field: label }), patternError: utils.instance.t('invalidInputFormat', { field: label }), required: field.required, part: "nbf__input-textfield", themeConfig: this.themeConfig })));
|
|
546
552
|
}
|
|
547
|
-
})), index.h("div", { key: '
|
|
553
|
+
})), index.h("div", { key: '7ebcde54517afad0f17e89e0170f230dbc7ff3ce', class: "cta" }, showConsentMessage && index.h("div", { key: '39aa8a18b033e3e82f6dc0750229360947ef1f0e', class: "consent-disclaimer" }, utils.instance.t('notetakerConsentMessage')), index.h("button-component", { key: '62ca6bd8f36a3a81ad43027bdb2b87421654f139', variant: 'basic', class: "back", part: "nbf__button-outline", isLoading: this.backButtonLoading && this.isLoading, onClick: this.handleBackButtonClicked }, index.h("slot", { key: 'ff4131f111581812c9caa5c71f57ba0d24222fe2', name: "booking-form-back-label" }, `${utils.instance.t('backButton')}`)), index.h("button-component", { key: '2ac93336ea230bad436de88688b87ce7c0741996', variant: 'primary', isLoading: !this.backButtonLoading && this.isLoading, disabled: this.isLoading, part: "nbf__button-primary", type: "submit" }, index.h("slot", { key: '91dd3cda59aa2387d5ac239263189cde4a310267', name: "booking-form-book-label" }, `${utils.instance.t('bookNowButton')}`))))));
|
|
548
554
|
}
|
|
549
555
|
get host() { return index.getElement(this); }
|
|
550
556
|
static get watchers() { return {
|
|
@@ -576,6 +582,12 @@ __decorate$8([
|
|
|
576
582
|
emailChanged: async (event, nylasSchedulerConnector) => {
|
|
577
583
|
nylasSchedulerConnector.scheduler.setParticipantEmail(event.detail);
|
|
578
584
|
},
|
|
585
|
+
guestEmailsChanged: async (event, nylasSchedulerConnector) => {
|
|
586
|
+
nylasSchedulerConnector.scheduler.setGuests(event.detail);
|
|
587
|
+
},
|
|
588
|
+
additionalFieldsChanged: async (event, nylasSchedulerConnector) => {
|
|
589
|
+
nylasSchedulerConnector.scheduler.setAdditionalFields(event.detail);
|
|
590
|
+
},
|
|
579
591
|
detailsConfirmed: async (event, _nylasSchedulerConnector) => {
|
|
580
592
|
utils.debug('nylas-booking-form', 'detailsConfirmed', event.detail);
|
|
581
593
|
},
|