@nylas/web-elements 2.5.17 → 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.
Files changed (64) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1 -1
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +312 -268
  3. package/dist/cjs/google-logo-icon_6.cjs.entry.js +1 -1
  4. package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +15 -3
  5. package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
  7. package/dist/cjs/nylas-scheduling.cjs.entry.js +41 -1
  8. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  9. package/dist/cjs/nylas-scheduling.entry.cjs.js.map +1 -1
  10. package/dist/cjs/{version-Dvnf44vW.js → version-Xu0ORQw8.js} +3 -3
  11. package/dist/cjs/{version-Dvnf44vW.js.map → version-Xu0ORQw8.js.map} +1 -1
  12. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +48 -3
  13. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
  14. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +20 -1
  15. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
  16. package/dist/collection/connector/shared/api/scheduler.js +21 -0
  17. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  18. package/dist/collection/version.js +1 -1
  19. package/dist/collection/version.js.map +1 -1
  20. package/dist/components/nylas-booking-form.js +1 -1
  21. package/dist/components/nylas-editor-tabs-group.js +1 -1
  22. package/dist/components/nylas-editor-tabs.js +1 -1
  23. package/dist/components/nylas-scheduler-editor.js +3 -3
  24. package/dist/components/nylas-scheduling.js +42 -2
  25. package/dist/components/nylas-scheduling.js.map +1 -1
  26. package/dist/components/{p-2UDpTS-K.js → p-BGCZ4yg1.js} +3 -3
  27. package/dist/components/{p-2UDpTS-K.js.map → p-BGCZ4yg1.js.map} +1 -1
  28. package/dist/components/{p-CdAJ8ry_.js → p-DQNm7dzQ.js} +3 -3
  29. package/dist/components/{p-CdAJ8ry_.js.map → p-DQNm7dzQ.js.map} +1 -1
  30. package/dist/components/{p-Ctot3asB.js → p-DRXHxMKj.js} +3 -3
  31. package/dist/components/{p-Ctot3asB.js.map → p-DRXHxMKj.js.map} +1 -1
  32. package/dist/components/{p-B3cnALr8.js → p-WABPA0YV.js} +17 -5
  33. package/dist/components/p-WABPA0YV.js.map +1 -0
  34. package/dist/esm/google-logo-icon_6.entry.js +1 -1
  35. package/dist/esm/nylas-booked-event-card_11.entry.js +15 -3
  36. package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
  37. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  38. package/dist/esm/nylas-scheduling.entry.js +41 -1
  39. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  40. package/dist/esm/{version-B5EM2UED.js → version-iQhY7wWk.js} +3 -3
  41. package/dist/esm/{version-B5EM2UED.js.map → version-iQhY7wWk.js.map} +1 -1
  42. package/dist/nylas-web-elements/nylas-scheduling.entry.esm.js.map +1 -1
  43. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  44. package/dist/nylas-web-elements/{p-0ae1a52e.entry.js → p-1401a68f.entry.js} +3 -3
  45. package/dist/nylas-web-elements/p-4d04cfe9.entry.js +2 -0
  46. package/dist/nylas-web-elements/p-4d04cfe9.entry.js.map +1 -0
  47. package/dist/nylas-web-elements/{p-3a8194c2.entry.js → p-7b8b7718.entry.js} +2 -2
  48. package/dist/nylas-web-elements/p-cb33346f.entry.js +2 -0
  49. package/dist/nylas-web-elements/p-cb33346f.entry.js.map +1 -0
  50. package/dist/nylas-web-elements/{p-B5EM2UED.js → p-iQhY7wWk.js} +2 -2
  51. package/dist/nylas-web-elements/{p-B5EM2UED.js.map → p-iQhY7wWk.js.map} +1 -1
  52. package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +2 -0
  53. package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +1 -0
  54. package/dist/types/components.d.ts +10 -0
  55. package/dist/types/connector/shared/api/scheduler.d.ts +2 -0
  56. package/dist/types/version.d.ts +1 -1
  57. package/package.json +1 -1
  58. package/dist/components/p-B3cnALr8.js.map +0 -1
  59. package/dist/nylas-web-elements/p-9c8a524c.entry.js +0 -2
  60. package/dist/nylas-web-elements/p-9c8a524c.entry.js.map +0 -1
  61. package/dist/nylas-web-elements/p-c7f4c268.entry.js +0 -2
  62. package/dist/nylas-web-elements/p-c7f4c268.entry.js.map +0 -1
  63. /package/dist/nylas-web-elements/{p-0ae1a52e.entry.js.map → p-1401a68f.entry.js.map} +0 -0
  64. /package/dist/nylas-web-elements/{p-3a8194c2.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-Dvnf44vW.js');
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: 'ff7be9b66b5a472cae4a9ee6bd0ac7f4d7d55080' }, index.h("form", { key: 'efc1dc1cf3790f1b7d1da15c95d0e7c01b8e09b7', onSubmit: e => this.bookButtonClickedHandler(e), ref: el => (this.formRef = el), noValidate: true }, index.h("div", { key: 'b054882d9b3e86432666ca2a4c78be28527141d7', class: "nylas-booking-form", part: "nbf" }, index.h("div", { key: '72cc111b5b14e75419decf4a35c8c062619747c3', class: "input-wrapper", part: "nbf__input-wrapper" }, index.h("input-component", { key: '8e0622d77d38733b46637c22296bc22ad9594b98', 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: 'b33b7f03f3986e09b8f8cd25e7c2f50613283693', class: "input-wrapper", part: "nbf__input-wrapper" }, index.h("input-component", { key: 'ff9d6627901004d5d82682fc475d798aeb50f35c', 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: '0cf431d2b0cf104b9abf6e15071b5d4bc5a004b7', 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: {
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: '2b149ffe1bdd0117dc23f75bd6aa21f28a9b9652', class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: e => this.addGuestButtonClickedHandler(e) }, index.h("div", { key: 'd30ef6a29786a6faa4ef8e1b5f0b6d96d494fb7f', class: "button-content" }, index.h("add-circle-icon", { key: 'a6d1d9cdfef40554a443a8a9b3685fd16e0ea8f4', slot: "icon" }), this.guestEmails.length > 0 ? `${utils.instance.t('addAnotherGuest')}` : `${utils.instance.t('addGuest')}`))))), Object.entries((this.configSettings?.scheduler?.additional_fields || {}))
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: 'cc4eef64c581d709dd04aa9a1911b8e16395bfca', class: "cta" }, showConsentMessage && index.h("div", { key: '646406e9b164645b733f70720d024bf9f38c42c7', class: "consent-disclaimer" }, utils.instance.t('notetakerConsentMessage')), index.h("button-component", { key: '0a50849e94a7024c79cb32ab28d7259006bbe886', variant: 'basic', class: "back", part: "nbf__button-outline", isLoading: this.backButtonLoading && this.isLoading, onClick: this.handleBackButtonClicked }, index.h("slot", { key: '4a20f06c8173c9c18be25b3303852139f76eb812', name: "booking-form-back-label" }, `${utils.instance.t('backButton')}`)), index.h("button-component", { key: '334c1bab37af898e49867205c84baedeb612860b', variant: 'primary', isLoading: !this.backButtonLoading && this.isLoading, disabled: this.isLoading, part: "nbf__button-primary", type: "submit" }, index.h("slot", { key: '3f421a94afaf0f2e2defdd5f03d04e0553cf6b24', name: "booking-form-book-label" }, `${utils.instance.t('bookNowButton')}`))))));
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
  },