@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.
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +179 -146
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4998 -4993
- package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js +4 -4
- package/dist/cjs/checkmark-icon_15.cjs.entry.js +4 -4
- package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
- package/dist/cjs/{constants-3b9fb535.js → constants-27331d2d.js} +1 -5
- package/dist/cjs/constants-27331d2d.js.map +1 -0
- package/dist/cjs/{customParseFormat-4dbd51f6.js → customParseFormat-22da9017.js} +2 -2
- package/dist/cjs/{customParseFormat-4dbd51f6.js.map → customParseFormat-22da9017.js.map} +1 -1
- package/dist/cjs/{feedbackSync-670798db.js → feedbackSync-adabe7d6.js} +2 -2
- package/dist/cjs/{feedbackSync-670798db.js.map → feedbackSync-adabe7d6.js.map} +1 -1
- package/dist/cjs/globe-icon_2.cjs.entry.js +3 -3
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +49 -25
- package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{index.es-cbc1ecb6.js → index.es-7848228a.js} +2 -2
- package/dist/cjs/{index.es-cbc1ecb6.js.map → index.es-7848228a.js.map} +1 -1
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/multi-select-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/{nylas-api-request-af6121b4.js → nylas-api-request-976db0f4.js} +2 -2
- package/dist/cjs/{nylas-api-request-af6121b4.js.map → nylas-api-request-976db0f4.js.map} +1 -1
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-calendar_3.cjs.entry.js +4 -4
- package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +22 -16
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +7 -7
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/{register-component-5e87c463.js → register-component-d2f37e40.js} +2 -2
- package/dist/cjs/{register-component-5e87c463.js.map → register-component-d2f37e40.js.map} +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/{utils-0dfca9ec.js → utils-d522ef01.js} +10 -1
- package/dist/cjs/utils-d522ef01.js.map +1 -0
- package/dist/collection/common/constants.js +0 -1
- package/dist/collection/common/constants.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js +6 -7
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +6 -3
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js +4 -5
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +0 -8
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +43 -10
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.js +52 -7
- package/dist/collection/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +1 -1
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/components/constants.js +1 -5
- package/dist/components/constants.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group2.js +8 -9
- package/dist/components/nylas-editor-tabs-group2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +2 -2
- package/dist/components/nylas-event-description2.js +1 -1
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +6 -3
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +22 -14
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +3 -3
- package/dist/components/nylas-select-event-type2.js +32 -8
- package/dist/components/nylas-select-event-type2.js.map +1 -1
- package/dist/components/nylas-timeslot-interval2.js +1 -1
- package/dist/components/utils.js +9 -0
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/calendar-agenda-fill-icon_36.entry.js +4 -4
- package/dist/esm/checkmark-icon_15.entry.js +4 -4
- package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
- package/dist/esm/{constants-3d8016e3.js → constants-f51538ef.js} +2 -6
- package/dist/esm/constants-f51538ef.js.map +1 -0
- package/dist/esm/{customParseFormat-129be926.js → customParseFormat-d1de5ed0.js} +2 -2
- package/dist/esm/{customParseFormat-129be926.js.map → customParseFormat-d1de5ed0.js.map} +1 -1
- package/dist/esm/{feedbackSync-d943ffc7.js → feedbackSync-172f942c.js} +2 -2
- package/dist/esm/{feedbackSync-d943ffc7.js.map → feedbackSync-172f942c.js.map} +1 -1
- package/dist/esm/globe-icon_2.entry.js +3 -3
- package/dist/esm/google-logo-icon_6.entry.js +49 -25
- package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
- package/dist/esm/{index.es-4615d47c.js → index.es-fc8588de.js} +2 -2
- package/dist/esm/{index.es-4615d47c.js.map → index.es-fc8588de.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 +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/multi-select-dropdown_2.entry.js +1 -1
- package/dist/esm/{nylas-api-request-acf12b47.js → nylas-api-request-3d7ced61.js} +2 -2
- package/dist/esm/{nylas-api-request-acf12b47.js.map → nylas-api-request-3d7ced61.js.map} +1 -1
- package/dist/esm/nylas-booked-event-card_12.entry.js +3 -3
- package/dist/esm/nylas-event-calendar_3.entry.js +4 -4
- package/dist/esm/nylas-form-card.entry.js +2 -2
- package/dist/esm/nylas-scheduler-editor.entry.js +22 -16
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +7 -7
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/{register-component-083eb961.js → register-component-62d792d4.js} +2 -2
- package/dist/esm/{register-component-083eb961.js.map → register-component-62d792d4.js.map} +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/{utils-6c05ecaf.js → utils-bb88dd4d.js} +10 -1
- package/dist/esm/utils-bb88dd4d.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-865721fd.entry.js → p-05204c68.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2b38054f.entry.js → p-0d422938.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c59787f4.js → p-0d6ecada.js} +2 -2
- package/dist/nylas-web-elements/{p-e2632a60.js → p-198f05a6.js} +2 -2
- package/dist/nylas-web-elements/p-1d8c55c6.entry.js +11 -0
- package/dist/nylas-web-elements/p-1d8c55c6.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-4e1e01e4.entry.js → p-29f601d9.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-60b48bf7.js → p-3a3c5e17.js} +2 -2
- package/dist/nylas-web-elements/{p-6bb6a0b8.entry.js → p-447837c2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-faa723fc.entry.js → p-49c8d4d9.entry.js} +2 -2
- package/dist/nylas-web-elements/p-49c8d4d9.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-7e885253.js +2 -0
- package/dist/nylas-web-elements/p-7e885253.js.map +1 -0
- package/dist/nylas-web-elements/{p-3cc1072e.js → p-84109239.js} +2 -2
- package/dist/nylas-web-elements/{p-d16cd88b.entry.js → p-a7d2a211.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bea31f39.entry.js → p-a9107606.entry.js} +2 -2
- package/dist/nylas-web-elements/p-a9107606.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-a9a0dd64.entry.js → p-ab96941e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6fc7d11b.entry.js → p-af94512e.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-bfe2bdbd.js → p-b3ca5d4d.js} +2 -2
- package/dist/nylas-web-elements/{p-80d57b5a.entry.js → p-cd24a45e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6364eb02.entry.js → p-e9369c76.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b2241c3c.entry.js → p-f00d1bb3.entry.js} +2 -2
- package/dist/nylas-web-elements/p-f73e34dd.js +14 -0
- package/dist/nylas-web-elements/{p-2b97a896.js.map → p-f73e34dd.js.map} +1 -1
- package/dist/types/common/constants.d.ts +216 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.d.ts +0 -2
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.d.ts +1 -2
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +3 -1
- package/dist/types/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.d.ts +2 -1
- package/dist/types/components.d.ts +18 -2
- package/dist/types/stores/scheduler-config-store.d.ts +2 -1
- package/package.json +1 -1
- package/dist/cjs/constants-3b9fb535.js.map +0 -1
- package/dist/cjs/utils-0dfca9ec.js.map +0 -1
- package/dist/esm/constants-3d8016e3.js.map +0 -1
- package/dist/esm/utils-6c05ecaf.js.map +0 -1
- package/dist/nylas-web-elements/p-2b97a896.js +0 -14
- package/dist/nylas-web-elements/p-35b7d082.entry.js +0 -11
- package/dist/nylas-web-elements/p-35b7d082.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-6f7cb609.js +0 -2
- package/dist/nylas-web-elements/p-6f7cb609.js.map +0 -1
- package/dist/nylas-web-elements/p-bea31f39.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-faa723fc.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-865721fd.entry.js.map → p-05204c68.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2b38054f.entry.js.map → p-0d422938.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c59787f4.js.map → p-0d6ecada.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e2632a60.js.map → p-198f05a6.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4e1e01e4.entry.js.map → p-29f601d9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-60b48bf7.js.map → p-3a3c5e17.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6bb6a0b8.entry.js.map → p-447837c2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3cc1072e.js.map → p-84109239.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d16cd88b.entry.js.map → p-a7d2a211.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a9a0dd64.entry.js.map → p-ab96941e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6fc7d11b.entry.js.map → p-af94512e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bfe2bdbd.js.map → p-b3ca5d4d.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-80d57b5a.entry.js.map → p-cd24a45e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6364eb02.entry.js.map → p-e9369c76.entry.js.map} +0 -0
- /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-
|
|
7
|
-
const utils = require('./utils-
|
|
8
|
-
const customParseFormat = require('./customParseFormat-
|
|
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-
|
|
7
|
-
const utils = require('./utils-
|
|
8
|
-
const constants = require('./constants-
|
|
9
|
-
const feedbackSync = require('./feedbackSync-
|
|
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: "
|
|
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': "
|
|
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: "
|
|
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': "
|
|
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 :
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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
|
-
|
|
1674
|
-
|
|
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
|
|
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
|
|
1797
|
-
|
|
1798
|
-
|
|
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", {
|
|
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) => {
|