@nylas/web-elements 1.4.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +179 -146
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4998 -4993
  3. package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js +4 -4
  4. package/dist/cjs/checkmark-icon_15.cjs.entry.js +4 -4
  5. package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
  6. package/dist/cjs/{constants-3b9fb535.js → constants-27331d2d.js} +1 -5
  7. package/dist/cjs/constants-27331d2d.js.map +1 -0
  8. package/dist/cjs/{customParseFormat-4dbd51f6.js → customParseFormat-22da9017.js} +2 -2
  9. package/dist/cjs/{customParseFormat-4dbd51f6.js.map → customParseFormat-22da9017.js.map} +1 -1
  10. package/dist/cjs/{feedbackSync-670798db.js → feedbackSync-adabe7d6.js} +2 -2
  11. package/dist/cjs/{feedbackSync-670798db.js.map → feedbackSync-adabe7d6.js.map} +1 -1
  12. package/dist/cjs/globe-icon_2.cjs.entry.js +3 -3
  13. package/dist/cjs/google-logo-icon_6.cjs.entry.js +49 -25
  14. package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
  15. package/dist/cjs/index.cjs.js +2 -2
  16. package/dist/cjs/{index.es-cbc1ecb6.js → index.es-7848228a.js} +2 -2
  17. package/dist/cjs/{index.es-cbc1ecb6.js.map → index.es-7848228a.js.map} +1 -1
  18. package/dist/cjs/input-component.cjs.entry.js +1 -1
  19. package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/multi-select-dropdown_2.cjs.entry.js +1 -1
  22. package/dist/cjs/{nylas-api-request-af6121b4.js → nylas-api-request-976db0f4.js} +2 -2
  23. package/dist/cjs/{nylas-api-request-af6121b4.js.map → nylas-api-request-976db0f4.js.map} +1 -1
  24. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +3 -3
  25. package/dist/cjs/nylas-event-calendar_3.cjs.entry.js +4 -4
  26. package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
  27. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +22 -16
  28. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  29. package/dist/cjs/nylas-scheduling.cjs.entry.js +7 -7
  30. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  31. package/dist/cjs/{register-component-5e87c463.js → register-component-d2f37e40.js} +2 -2
  32. package/dist/cjs/{register-component-5e87c463.js.map → register-component-d2f37e40.js.map} +1 -1
  33. package/dist/cjs/textarea-component.cjs.entry.js +1 -1
  34. package/dist/cjs/{utils-0dfca9ec.js → utils-d522ef01.js} +10 -1
  35. package/dist/cjs/utils-d522ef01.js.map +1 -0
  36. package/dist/collection/common/constants.js +0 -1
  37. package/dist/collection/common/constants.js.map +1 -1
  38. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +1 -1
  39. package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js +6 -7
  40. package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js.map +1 -1
  41. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +1 -1
  42. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  43. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +6 -3
  44. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
  45. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js +4 -5
  46. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
  47. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +0 -8
  48. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +43 -10
  49. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  50. package/dist/collection/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.js +52 -7
  51. package/dist/collection/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.js.map +1 -1
  52. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +1 -1
  53. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  54. package/dist/components/constants.js +1 -5
  55. package/dist/components/constants.js.map +1 -1
  56. package/dist/components/nylas-editor-tabs-group2.js +8 -9
  57. package/dist/components/nylas-editor-tabs-group2.js.map +1 -1
  58. package/dist/components/nylas-editor-tabs2.js +2 -2
  59. package/dist/components/nylas-event-description2.js +1 -1
  60. package/dist/components/nylas-event-description2.js.map +1 -1
  61. package/dist/components/nylas-list-configurations2.js +6 -3
  62. package/dist/components/nylas-list-configurations2.js.map +1 -1
  63. package/dist/components/nylas-scheduler-editor.js +22 -14
  64. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  65. package/dist/components/nylas-scheduling.js +3 -3
  66. package/dist/components/nylas-select-event-type2.js +32 -8
  67. package/dist/components/nylas-select-event-type2.js.map +1 -1
  68. package/dist/components/nylas-timeslot-interval2.js +1 -1
  69. package/dist/components/utils.js +9 -0
  70. package/dist/components/utils.js.map +1 -1
  71. package/dist/esm/calendar-agenda-fill-icon_36.entry.js +4 -4
  72. package/dist/esm/checkmark-icon_15.entry.js +4 -4
  73. package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
  74. package/dist/esm/{constants-3d8016e3.js → constants-f51538ef.js} +2 -6
  75. package/dist/esm/constants-f51538ef.js.map +1 -0
  76. package/dist/esm/{customParseFormat-129be926.js → customParseFormat-d1de5ed0.js} +2 -2
  77. package/dist/esm/{customParseFormat-129be926.js.map → customParseFormat-d1de5ed0.js.map} +1 -1
  78. package/dist/esm/{feedbackSync-d943ffc7.js → feedbackSync-172f942c.js} +2 -2
  79. package/dist/esm/{feedbackSync-d943ffc7.js.map → feedbackSync-172f942c.js.map} +1 -1
  80. package/dist/esm/globe-icon_2.entry.js +3 -3
  81. package/dist/esm/google-logo-icon_6.entry.js +49 -25
  82. package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
  83. package/dist/esm/{index.es-4615d47c.js → index.es-fc8588de.js} +2 -2
  84. package/dist/esm/{index.es-4615d47c.js.map → index.es-fc8588de.js.map} +1 -1
  85. package/dist/esm/index.js +2 -2
  86. package/dist/esm/input-component.entry.js +1 -1
  87. package/dist/esm/input-dropdown_2.entry.js +2 -2
  88. package/dist/esm/loader.js +1 -1
  89. package/dist/esm/multi-select-dropdown_2.entry.js +1 -1
  90. package/dist/esm/{nylas-api-request-acf12b47.js → nylas-api-request-3d7ced61.js} +2 -2
  91. package/dist/esm/{nylas-api-request-acf12b47.js.map → nylas-api-request-3d7ced61.js.map} +1 -1
  92. package/dist/esm/nylas-booked-event-card_12.entry.js +3 -3
  93. package/dist/esm/nylas-event-calendar_3.entry.js +4 -4
  94. package/dist/esm/nylas-form-card.entry.js +2 -2
  95. package/dist/esm/nylas-scheduler-editor.entry.js +22 -16
  96. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  97. package/dist/esm/nylas-scheduling.entry.js +7 -7
  98. package/dist/esm/nylas-web-elements.js +1 -1
  99. package/dist/esm/{register-component-083eb961.js → register-component-62d792d4.js} +2 -2
  100. package/dist/esm/{register-component-083eb961.js.map → register-component-62d792d4.js.map} +1 -1
  101. package/dist/esm/textarea-component.entry.js +1 -1
  102. package/dist/esm/{utils-6c05ecaf.js → utils-bb88dd4d.js} +10 -1
  103. package/dist/esm/utils-bb88dd4d.js.map +1 -0
  104. package/dist/nylas-web-elements/index.esm.js +1 -1
  105. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  106. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  107. package/dist/nylas-web-elements/{p-865721fd.entry.js → p-05204c68.entry.js} +2 -2
  108. package/dist/nylas-web-elements/{p-2b38054f.entry.js → p-0d422938.entry.js} +2 -2
  109. package/dist/nylas-web-elements/{p-c59787f4.js → p-0d6ecada.js} +2 -2
  110. package/dist/nylas-web-elements/{p-e2632a60.js → p-198f05a6.js} +2 -2
  111. package/dist/nylas-web-elements/p-1d8c55c6.entry.js +11 -0
  112. package/dist/nylas-web-elements/p-1d8c55c6.entry.js.map +1 -0
  113. package/dist/nylas-web-elements/{p-4e1e01e4.entry.js → p-29f601d9.entry.js} +2 -2
  114. package/dist/nylas-web-elements/{p-60b48bf7.js → p-3a3c5e17.js} +2 -2
  115. package/dist/nylas-web-elements/{p-6bb6a0b8.entry.js → p-447837c2.entry.js} +2 -2
  116. package/dist/nylas-web-elements/{p-faa723fc.entry.js → p-49c8d4d9.entry.js} +2 -2
  117. package/dist/nylas-web-elements/p-49c8d4d9.entry.js.map +1 -0
  118. package/dist/nylas-web-elements/p-7e885253.js +2 -0
  119. package/dist/nylas-web-elements/p-7e885253.js.map +1 -0
  120. package/dist/nylas-web-elements/{p-3cc1072e.js → p-84109239.js} +2 -2
  121. package/dist/nylas-web-elements/{p-d16cd88b.entry.js → p-a7d2a211.entry.js} +2 -2
  122. package/dist/nylas-web-elements/{p-bea31f39.entry.js → p-a9107606.entry.js} +2 -2
  123. package/dist/nylas-web-elements/p-a9107606.entry.js.map +1 -0
  124. package/dist/nylas-web-elements/{p-a9a0dd64.entry.js → p-ab96941e.entry.js} +2 -2
  125. package/dist/nylas-web-elements/{p-6fc7d11b.entry.js → p-af94512e.entry.js} +3 -3
  126. package/dist/nylas-web-elements/{p-bfe2bdbd.js → p-b3ca5d4d.js} +2 -2
  127. package/dist/nylas-web-elements/{p-80d57b5a.entry.js → p-cd24a45e.entry.js} +2 -2
  128. package/dist/nylas-web-elements/{p-6364eb02.entry.js → p-e9369c76.entry.js} +2 -2
  129. package/dist/nylas-web-elements/{p-b2241c3c.entry.js → p-f00d1bb3.entry.js} +2 -2
  130. package/dist/nylas-web-elements/p-f73e34dd.js +14 -0
  131. package/dist/nylas-web-elements/{p-2b97a896.js.map → p-f73e34dd.js.map} +1 -1
  132. package/dist/types/common/constants.d.ts +216 -1
  133. package/dist/types/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.d.ts +0 -2
  134. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.d.ts +1 -2
  135. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +3 -1
  136. package/dist/types/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.d.ts +2 -1
  137. package/dist/types/components.d.ts +18 -2
  138. package/dist/types/stores/scheduler-config-store.d.ts +2 -1
  139. package/package.json +1 -1
  140. package/dist/cjs/constants-3b9fb535.js.map +0 -1
  141. package/dist/cjs/utils-0dfca9ec.js.map +0 -1
  142. package/dist/esm/constants-3d8016e3.js.map +0 -1
  143. package/dist/esm/utils-6c05ecaf.js.map +0 -1
  144. package/dist/nylas-web-elements/p-2b97a896.js +0 -14
  145. package/dist/nylas-web-elements/p-35b7d082.entry.js +0 -11
  146. package/dist/nylas-web-elements/p-35b7d082.entry.js.map +0 -1
  147. package/dist/nylas-web-elements/p-6f7cb609.js +0 -2
  148. package/dist/nylas-web-elements/p-6f7cb609.js.map +0 -1
  149. package/dist/nylas-web-elements/p-bea31f39.entry.js.map +0 -1
  150. package/dist/nylas-web-elements/p-faa723fc.entry.js.map +0 -1
  151. /package/dist/nylas-web-elements/{p-865721fd.entry.js.map → p-05204c68.entry.js.map} +0 -0
  152. /package/dist/nylas-web-elements/{p-2b38054f.entry.js.map → p-0d422938.entry.js.map} +0 -0
  153. /package/dist/nylas-web-elements/{p-c59787f4.js.map → p-0d6ecada.js.map} +0 -0
  154. /package/dist/nylas-web-elements/{p-e2632a60.js.map → p-198f05a6.js.map} +0 -0
  155. /package/dist/nylas-web-elements/{p-4e1e01e4.entry.js.map → p-29f601d9.entry.js.map} +0 -0
  156. /package/dist/nylas-web-elements/{p-60b48bf7.js.map → p-3a3c5e17.js.map} +0 -0
  157. /package/dist/nylas-web-elements/{p-6bb6a0b8.entry.js.map → p-447837c2.entry.js.map} +0 -0
  158. /package/dist/nylas-web-elements/{p-3cc1072e.js.map → p-84109239.js.map} +0 -0
  159. /package/dist/nylas-web-elements/{p-d16cd88b.entry.js.map → p-a7d2a211.entry.js.map} +0 -0
  160. /package/dist/nylas-web-elements/{p-a9a0dd64.entry.js.map → p-ab96941e.entry.js.map} +0 -0
  161. /package/dist/nylas-web-elements/{p-6fc7d11b.entry.js.map → p-af94512e.entry.js.map} +0 -0
  162. /package/dist/nylas-web-elements/{p-bfe2bdbd.js.map → p-b3ca5d4d.js.map} +0 -0
  163. /package/dist/nylas-web-elements/{p-80d57b5a.entry.js.map → p-cd24a45e.entry.js.map} +0 -0
  164. /package/dist/nylas-web-elements/{p-6364eb02.entry.js.map → p-e9369c76.entry.js.map} +0 -0
  165. /package/dist/nylas-web-elements/{p-b2241c3c.entry.js.map → p-f00d1bb3.entry.js.map} +0 -0
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e07e3a7e.js');
6
- const constants = require('./constants-3b9fb535.js');
7
- const utils = require('./utils-0dfca9ec.js');
8
- const customParseFormat = require('./customParseFormat-4dbd51f6.js');
6
+ const constants = require('./constants-27331d2d.js');
7
+ const utils = require('./utils-d522ef01.js');
8
+ const customParseFormat = require('./customParseFormat-22da9017.js');
9
9
 
10
10
  const iconCss = ".sc-globe-icon-h{display:flex}";
11
11
  const GlobeIconStyle0 = iconCss;
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e07e3a7e.js');
6
- const registerComponent = require('./register-component-5e87c463.js');
7
- const utils = require('./utils-0dfca9ec.js');
8
- const constants = require('./constants-3b9fb535.js');
9
- const feedbackSync = require('./feedbackSync-670798db.js');
6
+ const registerComponent = require('./register-component-d2f37e40.js');
7
+ const utils = require('./utils-d522ef01.js');
8
+ const constants = require('./constants-27331d2d.js');
9
+ const feedbackSync = require('./feedbackSync-adabe7d6.js');
10
10
 
11
11
  const iconCss$1 = ".sc-google-logo-icon-h{display:flex}";
12
12
  const GoogleLogoIconStyle0 = iconCss$1;
@@ -388,7 +388,7 @@ const NylasEditorTabs = class {
388
388
  if (this.enableUserFeedback && !feedbackSync.isInitialized()) {
389
389
  feedbackSync.init({
390
390
  dsn: 'https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816',
391
- release: "1.4.5",
391
+ release: "2.0.0",
392
392
  integrations: integrations => [
393
393
  ...integrations.filter(_integration => false),
394
394
  feedbackSync.feedbackSyncIntegration({
@@ -445,7 +445,7 @@ const NylasEditorTabs = class {
445
445
  captureContext: {
446
446
  tags: {
447
447
  'nylas-web-element': 'nylas-scheduler-editor',
448
- 'nylas-web-element-version': "1.4.5",
448
+ 'nylas-web-element-version': "2.0.0",
449
449
  'nylas-config-id': this.selectedConfiguration?.id,
450
450
  'nylas-slug': this.selectedConfiguration?.slug,
451
451
  'host-url': window.location.href,
@@ -965,7 +965,6 @@ const NylasEditorTabsGroup = class {
965
965
  name: participant.name,
966
966
  email: participant.email,
967
967
  is_organizer: !!participant.is_organizer,
968
- timezone: '',
969
968
  })),
970
969
  eventTimeslot: this.selectedGroupEvent?.event?.when
971
970
  ? {
@@ -1015,7 +1014,7 @@ const NylasEditorTabsGroup = class {
1015
1014
  if (this.enableUserFeedback && !feedbackSync.isInitialized()) {
1016
1015
  feedbackSync.init({
1017
1016
  dsn: 'https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816',
1018
- release: "1.4.5",
1017
+ release: "2.0.0",
1019
1018
  integrations: integrations => [
1020
1019
  ...integrations.filter(_integration => false),
1021
1020
  feedbackSync.feedbackSyncIntegration({
@@ -1068,7 +1067,7 @@ const NylasEditorTabsGroup = class {
1068
1067
  captureContext: {
1069
1068
  tags: {
1070
1069
  'nylas-web-element': 'nylas-scheduler-editor',
1071
- 'nylas-web-element-version': "1.4.5",
1070
+ 'nylas-web-element-version': "2.0.0",
1072
1071
  },
1073
1072
  extra: {
1074
1073
  configId: this.selectedConfiguration?.id,
@@ -1137,7 +1136,7 @@ const NylasEditorTabsGroup = class {
1137
1136
  location: !conferencing ? formState.location : undefined,
1138
1137
  participants: formState.participants,
1139
1138
  organizer: organizer,
1140
- conferencing: !formState.location ? conferencing : undefined,
1139
+ conferencing: !formState.location ? conferencing : {},
1141
1140
  when: formState.eventTimeslot.when,
1142
1141
  recurrence: formState.eventTimeslot.recurrence,
1143
1142
  calendar_id: organizerDefaultCal?.id || 'primary',
@@ -1300,9 +1299,9 @@ const NylasEditorTabsGroup = class {
1300
1299
  }
1301
1300
  render() {
1302
1301
  utils.debug('[nylas-editor-tabs-group]', 'render', this.formState);
1303
- return (index.h(index.Host, { key: '9b79ba6f8696d5c7bcc9eb1d8c4b3cebddc6e4a9' }, index.h("form", { key: 'e70dade70b4bf2a9a5974e70a335b6f04ea24ed6', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el), noValidate: true }, this.mode === 'app' ? (index.h("div", { class: "return-to-calendar-view", part: "editor__return-to-calendar-view net__return-to-calendar-view" }, index.h("button-component", { id: "return-to-calendar-view-button", variant: "invisible", part: "nset__header__back-button", type: "button", onClick: e => {
1302
+ return (index.h(index.Host, { key: '2f1b119172917fda91ffa866f37a14355f2828c0' }, index.h("form", { key: '103788b60f9351f7b20bcb06e1e93f89a29a9332', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el), noValidate: true }, this.mode === 'app' ? (index.h("div", { class: "return-to-calendar-view", part: "editor__return-to-calendar-view net__return-to-calendar-view" }, index.h("button-component", { id: "return-to-calendar-view-button", variant: "invisible", part: "nset__header__back-button", type: "button", onClick: e => {
1304
1303
  this.setActiveTab(e, TabGroup.CalendarView);
1305
- } }, index.h("chevron-icon", { width: "16", height: "16" }), index.h("span", null, utils.instance.t('returnToCalendarView'))))) : null, this.mode === 'app' ? (index.h("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, index.h("div", { class: "tabs", part: "editor__tabs net__tabs" }, index.h("button", { name: TabGroup.BookingOptions, class: { tab: true, active: this.activeTab == TabGroup.BookingOptions, hide: this.hideTab(TabGroup.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: e => this.setActiveTab(e, TabGroup.BookingOptions) }, index.h("flow-icon", { width: "16", height: "16" }), utils.instance.t('bookingOptionsTab')), index.h("button", { name: TabGroup.BookingForm, class: { tab: true, active: this.activeTab == TabGroup.BookingForm, hide: this.hideTab(TabGroup.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: e => this.setActiveTab(e, TabGroup.BookingForm) }, this.activeTab == TabGroup.BookingForm ? index.h("calendar-agenda-fill-icon", { width: "16", height: "16" }) : index.h("calendar-agenda-icon", { width: "16", height: "16" }), utils.instance.t('bookingFormTab')), index.h("button", { name: TabGroup.Communications, class: { tab: true, active: this.activeTab == TabGroup.Communications, hide: this.hideTab(TabGroup.Communications) }, onClick: e => this.setActiveTab(e, TabGroup.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == TabGroup.Communications ? index.h("envelope-fill-icon", { width: "16", height: "16" }) : index.h("envelope-icon", { width: "16", height: "16" }), utils.instance.t('communicationsTab')), index.h("button", { name: TabGroup.PageStyles, class: { tab: true, active: this.activeTab == TabGroup.PageStyles, hide: this.hideTab(TabGroup.PageStyles) }, onClick: e => this.setActiveTab(e, TabGroup.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == TabGroup.PageStyles ? index.h("paintbrush-fill-icon", { width: "16", height: "16" }) : index.h("paintbrush-icon", { width: "16", height: "16" }), utils.instance.t('pageStylesTab'))), index.h("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, index.h(TabContentsGroup, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: this.selectedConfiguration?.id ?? 'new', i18next: utils.instance })))) : (index.h("div", { class: "composable", key: this.selectedConfiguration?.id }, index.h("slot", null))), index.h("div", { key: '3e14a9cecdd8200a4a388595c69450fc1fc2d024', class: "footer", part: "editor__footer net__footer" }, index.h("div", { key: 'fa88541076507a351a9189d3937e380b042adb2a', class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && (index.h("button-component", { title: "Share your feedback", id: "report-issue", variant: 'basic', onClick: e => this.onFeedbackClick(e) }, index.h("feedback-icon", null))), this.activeTab === TabGroup.CalendarView && (index.h("button-component", { title: "Go to page settings", id: "page-settings", variant: 'basic', onClick: e => this.setActiveTab(e, TabGroup.BookingOptions) }, utils.instance.t('pageSettingsButton')))), index.h("div", { key: '5c2436da8cc3deb362e42ba4ff8ac228b89263dc', class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, index.h("p", { key: '132875a26da363e4b402879b8344fce6311c1702', class: {
1304
+ } }, index.h("chevron-icon", { width: "16", height: "16" }), index.h("span", null, utils.instance.t('returnToCalendarView'))))) : null, this.mode === 'app' ? (index.h("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, index.h("div", { class: "tabs", part: "editor__tabs net__tabs" }, index.h("button", { name: TabGroup.BookingOptions, class: { tab: true, active: this.activeTab == TabGroup.BookingOptions, hide: this.hideTab(TabGroup.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: e => this.setActiveTab(e, TabGroup.BookingOptions) }, index.h("flow-icon", { width: "16", height: "16" }), utils.instance.t('bookingOptionsTab')), index.h("button", { name: TabGroup.BookingForm, class: { tab: true, active: this.activeTab == TabGroup.BookingForm, hide: this.hideTab(TabGroup.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: e => this.setActiveTab(e, TabGroup.BookingForm) }, this.activeTab == TabGroup.BookingForm ? index.h("calendar-agenda-fill-icon", { width: "16", height: "16" }) : index.h("calendar-agenda-icon", { width: "16", height: "16" }), utils.instance.t('bookingFormTab')), index.h("button", { name: TabGroup.Communications, class: { tab: true, active: this.activeTab == TabGroup.Communications, hide: this.hideTab(TabGroup.Communications) }, onClick: e => this.setActiveTab(e, TabGroup.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == TabGroup.Communications ? index.h("envelope-fill-icon", { width: "16", height: "16" }) : index.h("envelope-icon", { width: "16", height: "16" }), utils.instance.t('communicationsTab')), index.h("button", { name: TabGroup.PageStyles, class: { tab: true, active: this.activeTab == TabGroup.PageStyles, hide: this.hideTab(TabGroup.PageStyles) }, onClick: e => this.setActiveTab(e, TabGroup.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == TabGroup.PageStyles ? index.h("paintbrush-fill-icon", { width: "16", height: "16" }) : index.h("paintbrush-icon", { width: "16", height: "16" }), utils.instance.t('pageStylesTab'))), index.h("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, index.h(TabContentsGroup, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: this.selectedConfiguration?.id ?? 'new', i18next: utils.instance })))) : (index.h("div", { class: "composable", key: this.selectedConfiguration?.id }, index.h("slot", null))), index.h("div", { key: '5c98656ec4f4b3bb61f675dbfe43121b1cf230cf', class: "footer", part: "editor__footer net__footer" }, index.h("div", { key: 'cca7ec210ba25fd6e8d6f090871bd03acd86f3b2', class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && (index.h("button-component", { title: "Share your feedback", id: "report-issue", variant: 'basic', onClick: e => this.onFeedbackClick(e) }, index.h("feedback-icon", null))), this.activeTab === TabGroup.CalendarView && (index.h("button-component", { title: "Go to page settings", id: "page-settings", variant: 'basic', onClick: e => this.setActiveTab(e, TabGroup.BookingOptions) }, utils.instance.t('pageSettingsButton')))), index.h("div", { key: '53bf5ccc9597574dade9a81c08a4b316ebbb8f1e', class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, index.h("p", { key: 'a3acb4bbfb391483d9d8914ff5f07922c05e7dbd', class: {
1306
1305
  'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,
1307
1306
  'saved-changes': this.changesSaved,
1308
1307
  'error': this.error !== '',
@@ -1311,17 +1310,17 @@ const NylasEditorTabsGroup = class {
1311
1310
  ? utils.instance.t('unsavedChangesLabel')
1312
1311
  : this.error == '' && this.changesSaved
1313
1312
  ? `${utils.instance.t('changesSavedLabel')}!`
1314
- : ''), index.h("div", { key: 'f30fa484009f4d4729551014e86ec4a0d2ae7824', class: "footer-buttons__row" }, this.schedulerPreviewLink !== '' && this.action === 'edit' && (index.h("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: event => {
1313
+ : ''), index.h("div", { key: '81e083f0560967f3d8b68f1e0cafef645c7ae288', class: "footer-buttons__row" }, this.schedulerPreviewLink !== '' && this.action === 'edit' && (index.h("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: event => {
1315
1314
  event.preventDefault();
1316
1315
  const previewEvent = this.previewButtonClicked.emit(this.host);
1317
1316
  if (!previewEvent.defaultPrevented) {
1318
1317
  window.open(utils.parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');
1319
1318
  }
1320
- }, variant: 'basic' }, index.h("eye-icon", null))), index.h("button-component", { key: 'de0c92614c21e3d7ad2d1e982186df2858e99981', type: "button", disabled: this.isLoading, clickHandler: event => {
1319
+ }, variant: 'basic' }, index.h("eye-icon", null))), index.h("button-component", { key: '59a4f7e7238f88a4a07e0bc1ab79bed788da74c9', type: "button", disabled: this.isLoading, clickHandler: event => {
1321
1320
  event.preventDefault();
1322
1321
  this.cancelButtonClick.emit();
1323
1322
  this.error = '';
1324
- }, variant: 'basic', part: "editor__footer-cancel net__footer-cancel" }, utils.instance.t('backButton')), index.h("button-component", { key: '5edfb977d8feed310347b968cdb7505f9bc7eb1f', type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? (index.h("span", null, utils.instance.t('savingButtonText'), index.h("loading-icon", null), ' ')) : this.action === 'create' ? (`${utils.instance.t('createButtonText')}`) : (`${utils.instance.t('saveChangesButtonText')}`)))))), this.showFeedbackModal && index.h("nylas-feedback-form", null)));
1323
+ }, variant: 'basic', part: "editor__footer-cancel net__footer-cancel" }, utils.instance.t('backButton')), index.h("button-component", { key: '3ed3bc81b39988173e13f2c3346defed31b96148', type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? (index.h("span", null, utils.instance.t('savingButtonText'), index.h("loading-icon", null), ' ')) : this.action === 'create' ? (`${utils.instance.t('createButtonText')}`) : (`${utils.instance.t('saveChangesButtonText')}`)))))), this.showFeedbackModal && index.h("nylas-feedback-form", null)));
1325
1324
  }
1326
1325
  get host() { return index.getElement(this); }
1327
1326
  static get watchers() { return {
@@ -1670,11 +1669,13 @@ __decorate$1([
1670
1669
  },
1671
1670
  createButtonClick: async (_, connector) => {
1672
1671
  connector.schedulerConfigStore.resetSelectedConfiguration();
1673
- if (connector.schedulerConfigStore.state.experimentalFeatures?.group_events) {
1674
- connector.schedulerConfigStore.state.action = 'create-select';
1672
+ const enabledEventTypes = Object.entries(connector.schedulerConfigStore.state.enableEventTypes || {}).filter(([_key, value]) => value);
1673
+ if (enabledEventTypes.length === 1) {
1674
+ connector.schedulerConfigStore.state.action = 'create';
1675
+ connector.schedulerConfigStore.state.selectedEventType = constants.CONFIGURATION_EVENT_TYPE[enabledEventTypes[0][0]];
1675
1676
  }
1676
1677
  else {
1677
- connector.schedulerConfigStore.state.action = 'create';
1678
+ connector.schedulerConfigStore.state.action = 'create-select';
1678
1679
  }
1679
1680
  },
1680
1681
  deleteButtonClick: async (event, connector) => {
@@ -1736,6 +1737,13 @@ const NylasSelectEventType = class {
1736
1737
  this.participantOptions = undefined;
1737
1738
  this.name = 'select-event-type';
1738
1739
  this.selectedLanguage = undefined;
1740
+ this.enableEventTypes = {
1741
+ one_on_one: true,
1742
+ collective: true,
1743
+ max_fairness: true,
1744
+ max_availability: true,
1745
+ group: true,
1746
+ };
1739
1747
  }
1740
1748
  connectedCallback() {
1741
1749
  utils.debug('nylas-select-event-type', 'connectedCallback');
@@ -1760,7 +1768,14 @@ const NylasSelectEventType = class {
1760
1768
  utils.instance.changeLanguage(newVal);
1761
1769
  }
1762
1770
  render() {
1763
- const eventTypes = [
1771
+ const eventTypeKey = {
1772
+ 'one-on-one': 'one_on_one',
1773
+ 'collective': 'collective',
1774
+ 'max-fairness': 'max_fairness',
1775
+ 'max-availability': 'max_availability',
1776
+ 'group': 'group',
1777
+ };
1778
+ const allEventTypes = [
1764
1779
  {
1765
1780
  label: utils.instance.t('nylasSelectEventType.eventTypeOptions.oneOnOne.label'),
1766
1781
  value: constants.CONFIGURATION_EVENT_TYPE.one_on_one,
@@ -1787,19 +1802,27 @@ const NylasSelectEventType = class {
1787
1802
  description: utils.instance.t('nylasSelectEventType.eventTypeOptions.group.desc'),
1788
1803
  },
1789
1804
  ];
1805
+ const conditionalEventTypes = [constants.CONFIGURATION_EVENT_TYPE.collective, constants.CONFIGURATION_EVENT_TYPE.max_availability, constants.CONFIGURATION_EVENT_TYPE.max_fairness];
1790
1806
  const hasAdditionalParticipants = this.participantOptions &&
1791
1807
  this.participantOptions?.length > 0 &&
1792
1808
  !!this.participantOptions[0].email &&
1793
1809
  !!this.participantOptions[0].name &&
1794
1810
  !!this.participantOptions[0].calendars &&
1795
1811
  this.participantOptions[0].calendars.length > 0;
1796
- const conditionalEventTypes = [constants.CONFIGURATION_EVENT_TYPE.collective, constants.CONFIGURATION_EVENT_TYPE.max_availability, constants.CONFIGURATION_EVENT_TYPE.max_fairness];
1797
- const defaultEventTypes = [constants.CONFIGURATION_EVENT_TYPE.one_on_one, constants.CONFIGURATION_EVENT_TYPE.group];
1798
- return (index.h(index.Host, { key: '4cd1ea6564b67ff7547499e504214684a61350c3' }, index.h("div", { key: '2e591b78dcbd4e832ed63a837d0e03edde75e97c', class: "nylas-select-event-type", part: "nset" }, index.h("div", { key: '9b866ca6a3e3bc025ba13d8f023e825c4c042d14', class: "header", part: "nset__header" }, index.h("h2", { key: '0a8390189a308bb1ef7c51ca3efa0b5b8d2aa165' }, utils.instance.t('nylasSelectEventType.createEventHeaderTitle')), index.h("button-component", { key: '0a7d6503aa2ea9c137aa59f4a211a88f816844cd', variant: "invisible", part: "nset__header__back-button", onClick: _event => {
1812
+ const eventTypes = this.enableEventTypes
1813
+ ? allEventTypes.filter(eventType => {
1814
+ const key = eventType.value;
1815
+ const keyType = eventTypeKey[key];
1816
+ console.log('key', key, this.enableEventTypes ? this.enableEventTypes[keyType] : 'no enableEventTypes');
1817
+ if (conditionalEventTypes.includes(key) && !hasAdditionalParticipants) {
1818
+ return false;
1819
+ }
1820
+ return this.enableEventTypes && this.enableEventTypes[keyType];
1821
+ })
1822
+ : allEventTypes;
1823
+ return (index.h(index.Host, null, index.h("div", { class: "nylas-select-event-type", part: "nset" }, index.h("div", { class: "header", part: "nset__header" }, index.h("h2", null, utils.instance.t('nylasSelectEventType.createEventHeaderTitle')), index.h("button-component", { variant: "invisible", part: "nset__header__back-button", onClick: _event => {
1799
1824
  this.returnToAllSchedulingPagesEvent.emit();
1800
- } }, index.h("chevron-icon", { key: '5a81b33f22799f77657f9a8196ec1d72e255865c', width: "16", height: "16" }), index.h("span", { key: 'df5b805d76b1040bacae5e68eebd2ff7a74b2810' }, utils.instance.t('nylasSelectEventType.returnToAllSchedulingPages')))), index.h("div", { key: 'ff48e355eb9baac896bf6e3de2dafbfbd91f57c0', class: "content", part: "nset__content" }, index.h("h3", { key: 'd387519b40557886ece52327429e6e58aa133689' }, utils.instance.t('nylasSelectEventType.eventTypeHeaderTitle')), index.h("div", { key: 'a3384ed668259f02114efd375cfcaad125f1efe7', class: "event-type", part: "nset__content__event-type" }, eventTypes
1801
- .filter(e => defaultEventTypes.includes(e.value) || (hasAdditionalParticipants && conditionalEventTypes.includes(e.value)))
1802
- .map(eventType => (index.h("div", { class: "event-type-option", onClick: _event => {
1825
+ } }, index.h("chevron-icon", { width: "16", height: "16" }), index.h("span", null, utils.instance.t('nylasSelectEventType.returnToAllSchedulingPages')))), index.h("div", { class: "content", part: "nset__content" }, index.h("h3", null, utils.instance.t('nylasSelectEventType.eventTypeHeaderTitle')), index.h("div", { class: "event-type", part: "nset__content__event-type" }, eventTypes.length === 0 && index.h("p", null, utils.instance.t('nylasSelectEventType.noEventTypesEnabled')), eventTypes.map(eventType => (index.h("div", { class: "event-type-option", onClick: _event => {
1803
1826
  this.createEventTypeSelected.emit({ eventType: eventType.value });
1804
1827
  }, part: `nset__content__event-type-option-${eventType.value}` }, index.h("h4", null, eventType.label), index.h("p", null, eventType.description)))))))));
1805
1828
  }
@@ -1815,6 +1838,7 @@ __decorate([
1815
1838
  stateToProps: new Map([
1816
1839
  ['schedulerConfig.selectedLanguage', 'selectedLanguage'],
1817
1840
  ['schedulerConfig.additionalParticipants', 'participantOptions'],
1841
+ ['schedulerConfig.enableEventTypes', 'enableEventTypes'],
1818
1842
  ]),
1819
1843
  eventToProps: {
1820
1844
  returnToAllSchedulingPagesEvent: async (_event, connector) => {