@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, c as createEvent, H as Host, a as getElement } from './index-091600eb.js';
|
|
2
|
-
import { L as LANGUAGE_CODE } from './constants-
|
|
3
|
-
import { a as dayjs, i as instance, O as autocompleteTimeFormat, P as validateTimeFormatInput, F as convertTo12HourFormat, Q as roundToNearest15Minutes, R as validateExactTimeFormat, G as convertTo24HourFormat } from './utils-
|
|
4
|
-
import { c as customParseFormat } from './customParseFormat-
|
|
2
|
+
import { L as LANGUAGE_CODE } from './constants-f51538ef.js';
|
|
3
|
+
import { a as dayjs, i as instance, O as autocompleteTimeFormat, P as validateTimeFormatInput, F as convertTo12HourFormat, Q as roundToNearest15Minutes, R as validateExactTimeFormat, G as convertTo24HourFormat } from './utils-bb88dd4d.js';
|
|
4
|
+
import { c as customParseFormat } from './customParseFormat-d1de5ed0.js';
|
|
5
5
|
|
|
6
6
|
const iconCss = ".sc-globe-icon-h{display:flex}";
|
|
7
7
|
const GlobeIconStyle0 = iconCss;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, c as createEvent, H as Host, a as getElement } from './index-091600eb.js';
|
|
2
|
-
import { R as RegisterComponent } from './register-component-
|
|
3
|
-
import { b as debug, i as instance, m as mergeDeep, n as parsePreviewLink, g as getCalendarRange } from './utils-
|
|
4
|
-
import { D as DEFAULT_OPEN_HOURS, e as editorTabComponentNames, C as CONFIGURATION_EVENT_TYPE, b as editorGroupTabComponentNames } from './constants-
|
|
5
|
-
import { i as isInitialized, a as init, c as captureMessage, b as captureFeedback, f as feedbackSyncIntegration } from './feedbackSync-
|
|
2
|
+
import { R as RegisterComponent } from './register-component-62d792d4.js';
|
|
3
|
+
import { b as debug, i as instance, m as mergeDeep, n as parsePreviewLink, g as getCalendarRange } from './utils-bb88dd4d.js';
|
|
4
|
+
import { D as DEFAULT_OPEN_HOURS, e as editorTabComponentNames, C as CONFIGURATION_EVENT_TYPE, b as editorGroupTabComponentNames } from './constants-f51538ef.js';
|
|
5
|
+
import { i as isInitialized, a as init, c as captureMessage, b as captureFeedback, f as feedbackSyncIntegration } from './feedbackSync-172f942c.js';
|
|
6
6
|
|
|
7
7
|
const iconCss$1 = ".sc-google-logo-icon-h{display:flex}";
|
|
8
8
|
const GoogleLogoIconStyle0 = iconCss$1;
|
|
@@ -384,7 +384,7 @@ const NylasEditorTabs = class {
|
|
|
384
384
|
if (this.enableUserFeedback && !isInitialized()) {
|
|
385
385
|
init({
|
|
386
386
|
dsn: 'https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816',
|
|
387
|
-
release: "
|
|
387
|
+
release: "2.0.0",
|
|
388
388
|
integrations: integrations => [
|
|
389
389
|
...integrations.filter(_integration => false),
|
|
390
390
|
feedbackSyncIntegration({
|
|
@@ -441,7 +441,7 @@ const NylasEditorTabs = class {
|
|
|
441
441
|
captureContext: {
|
|
442
442
|
tags: {
|
|
443
443
|
'nylas-web-element': 'nylas-scheduler-editor',
|
|
444
|
-
'nylas-web-element-version': "
|
|
444
|
+
'nylas-web-element-version': "2.0.0",
|
|
445
445
|
'nylas-config-id': this.selectedConfiguration?.id,
|
|
446
446
|
'nylas-slug': this.selectedConfiguration?.slug,
|
|
447
447
|
'host-url': window.location.href,
|
|
@@ -961,7 +961,6 @@ const NylasEditorTabsGroup = class {
|
|
|
961
961
|
name: participant.name,
|
|
962
962
|
email: participant.email,
|
|
963
963
|
is_organizer: !!participant.is_organizer,
|
|
964
|
-
timezone: '',
|
|
965
964
|
})),
|
|
966
965
|
eventTimeslot: this.selectedGroupEvent?.event?.when
|
|
967
966
|
? {
|
|
@@ -1011,7 +1010,7 @@ const NylasEditorTabsGroup = class {
|
|
|
1011
1010
|
if (this.enableUserFeedback && !isInitialized()) {
|
|
1012
1011
|
init({
|
|
1013
1012
|
dsn: 'https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816',
|
|
1014
|
-
release: "
|
|
1013
|
+
release: "2.0.0",
|
|
1015
1014
|
integrations: integrations => [
|
|
1016
1015
|
...integrations.filter(_integration => false),
|
|
1017
1016
|
feedbackSyncIntegration({
|
|
@@ -1064,7 +1063,7 @@ const NylasEditorTabsGroup = class {
|
|
|
1064
1063
|
captureContext: {
|
|
1065
1064
|
tags: {
|
|
1066
1065
|
'nylas-web-element': 'nylas-scheduler-editor',
|
|
1067
|
-
'nylas-web-element-version': "
|
|
1066
|
+
'nylas-web-element-version': "2.0.0",
|
|
1068
1067
|
},
|
|
1069
1068
|
extra: {
|
|
1070
1069
|
configId: this.selectedConfiguration?.id,
|
|
@@ -1133,7 +1132,7 @@ const NylasEditorTabsGroup = class {
|
|
|
1133
1132
|
location: !conferencing ? formState.location : undefined,
|
|
1134
1133
|
participants: formState.participants,
|
|
1135
1134
|
organizer: organizer,
|
|
1136
|
-
conferencing: !formState.location ? conferencing :
|
|
1135
|
+
conferencing: !formState.location ? conferencing : {},
|
|
1137
1136
|
when: formState.eventTimeslot.when,
|
|
1138
1137
|
recurrence: formState.eventTimeslot.recurrence,
|
|
1139
1138
|
calendar_id: organizerDefaultCal?.id || 'primary',
|
|
@@ -1296,9 +1295,9 @@ const NylasEditorTabsGroup = class {
|
|
|
1296
1295
|
}
|
|
1297
1296
|
render() {
|
|
1298
1297
|
debug('[nylas-editor-tabs-group]', 'render', this.formState);
|
|
1299
|
-
return (h(Host, { key: '
|
|
1298
|
+
return (h(Host, { key: '2f1b119172917fda91ffa866f37a14355f2828c0' }, h("form", { key: '103788b60f9351f7b20bcb06e1e93f89a29a9332', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el), noValidate: true }, this.mode === 'app' ? (h("div", { class: "return-to-calendar-view", part: "editor__return-to-calendar-view net__return-to-calendar-view" }, h("button-component", { id: "return-to-calendar-view-button", variant: "invisible", part: "nset__header__back-button", type: "button", onClick: e => {
|
|
1300
1299
|
this.setActiveTab(e, TabGroup.CalendarView);
|
|
1301
|
-
} }, h("chevron-icon", { width: "16", height: "16" }), h("span", null, instance.t('returnToCalendarView'))))) : null, this.mode === 'app' ? (h("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, h("div", { class: "tabs", part: "editor__tabs net__tabs" }, 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) }, h("flow-icon", { width: "16", height: "16" }), instance.t('bookingOptionsTab')), 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 ? h("calendar-agenda-fill-icon", { width: "16", height: "16" }) : h("calendar-agenda-icon", { width: "16", height: "16" }), instance.t('bookingFormTab')), 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 ? h("envelope-fill-icon", { width: "16", height: "16" }) : h("envelope-icon", { width: "16", height: "16" }), instance.t('communicationsTab')), 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 ? h("paintbrush-fill-icon", { width: "16", height: "16" }) : h("paintbrush-icon", { width: "16", height: "16" }), instance.t('pageStylesTab'))), h("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, h(TabContentsGroup, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: this.selectedConfiguration?.id ?? 'new', i18next: instance })))) : (h("div", { class: "composable", key: this.selectedConfiguration?.id }, h("slot", null))), h("div", { key: '
|
|
1300
|
+
} }, h("chevron-icon", { width: "16", height: "16" }), h("span", null, instance.t('returnToCalendarView'))))) : null, this.mode === 'app' ? (h("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, h("div", { class: "tabs", part: "editor__tabs net__tabs" }, 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) }, h("flow-icon", { width: "16", height: "16" }), instance.t('bookingOptionsTab')), 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 ? h("calendar-agenda-fill-icon", { width: "16", height: "16" }) : h("calendar-agenda-icon", { width: "16", height: "16" }), instance.t('bookingFormTab')), 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 ? h("envelope-fill-icon", { width: "16", height: "16" }) : h("envelope-icon", { width: "16", height: "16" }), instance.t('communicationsTab')), 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 ? h("paintbrush-fill-icon", { width: "16", height: "16" }) : h("paintbrush-icon", { width: "16", height: "16" }), instance.t('pageStylesTab'))), h("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, h(TabContentsGroup, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: this.selectedConfiguration?.id ?? 'new', i18next: instance })))) : (h("div", { class: "composable", key: this.selectedConfiguration?.id }, h("slot", null))), h("div", { key: '5c98656ec4f4b3bb61f675dbfe43121b1cf230cf', class: "footer", part: "editor__footer net__footer" }, h("div", { key: 'cca7ec210ba25fd6e8d6f090871bd03acd86f3b2', class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && (h("button-component", { title: "Share your feedback", id: "report-issue", variant: 'basic', onClick: e => this.onFeedbackClick(e) }, h("feedback-icon", null))), this.activeTab === TabGroup.CalendarView && (h("button-component", { title: "Go to page settings", id: "page-settings", variant: 'basic', onClick: e => this.setActiveTab(e, TabGroup.BookingOptions) }, instance.t('pageSettingsButton')))), h("div", { key: '53bf5ccc9597574dade9a81c08a4b316ebbb8f1e', class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, h("p", { key: 'a3acb4bbfb391483d9d8914ff5f07922c05e7dbd', class: {
|
|
1302
1301
|
'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,
|
|
1303
1302
|
'saved-changes': this.changesSaved,
|
|
1304
1303
|
'error': this.error !== '',
|
|
@@ -1307,17 +1306,17 @@ const NylasEditorTabsGroup = class {
|
|
|
1307
1306
|
? instance.t('unsavedChangesLabel')
|
|
1308
1307
|
: this.error == '' && this.changesSaved
|
|
1309
1308
|
? `${instance.t('changesSavedLabel')}!`
|
|
1310
|
-
: ''), h("div", { key: '
|
|
1309
|
+
: ''), h("div", { key: '81e083f0560967f3d8b68f1e0cafef645c7ae288', class: "footer-buttons__row" }, this.schedulerPreviewLink !== '' && this.action === 'edit' && (h("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: event => {
|
|
1311
1310
|
event.preventDefault();
|
|
1312
1311
|
const previewEvent = this.previewButtonClicked.emit(this.host);
|
|
1313
1312
|
if (!previewEvent.defaultPrevented) {
|
|
1314
1313
|
window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');
|
|
1315
1314
|
}
|
|
1316
|
-
}, variant: 'basic' }, h("eye-icon", null))), h("button-component", { key: '
|
|
1315
|
+
}, variant: 'basic' }, h("eye-icon", null))), h("button-component", { key: '59a4f7e7238f88a4a07e0bc1ab79bed788da74c9', type: "button", disabled: this.isLoading, clickHandler: event => {
|
|
1317
1316
|
event.preventDefault();
|
|
1318
1317
|
this.cancelButtonClick.emit();
|
|
1319
1318
|
this.error = '';
|
|
1320
|
-
}, variant: 'basic', part: "editor__footer-cancel net__footer-cancel" }, instance.t('backButton')), h("button-component", { key: '
|
|
1319
|
+
}, variant: 'basic', part: "editor__footer-cancel net__footer-cancel" }, instance.t('backButton')), h("button-component", { key: '3ed3bc81b39988173e13f2c3346defed31b96148', type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? (h("span", null, instance.t('savingButtonText'), h("loading-icon", null), ' ')) : this.action === 'create' ? (`${instance.t('createButtonText')}`) : (`${instance.t('saveChangesButtonText')}`)))))), this.showFeedbackModal && h("nylas-feedback-form", null)));
|
|
1321
1320
|
}
|
|
1322
1321
|
get host() { return getElement(this); }
|
|
1323
1322
|
static get watchers() { return {
|
|
@@ -1666,11 +1665,13 @@ __decorate$1([
|
|
|
1666
1665
|
},
|
|
1667
1666
|
createButtonClick: async (_, connector) => {
|
|
1668
1667
|
connector.schedulerConfigStore.resetSelectedConfiguration();
|
|
1669
|
-
|
|
1670
|
-
|
|
1668
|
+
const enabledEventTypes = Object.entries(connector.schedulerConfigStore.state.enableEventTypes || {}).filter(([_key, value]) => value);
|
|
1669
|
+
if (enabledEventTypes.length === 1) {
|
|
1670
|
+
connector.schedulerConfigStore.state.action = 'create';
|
|
1671
|
+
connector.schedulerConfigStore.state.selectedEventType = CONFIGURATION_EVENT_TYPE[enabledEventTypes[0][0]];
|
|
1671
1672
|
}
|
|
1672
1673
|
else {
|
|
1673
|
-
connector.schedulerConfigStore.state.action = 'create';
|
|
1674
|
+
connector.schedulerConfigStore.state.action = 'create-select';
|
|
1674
1675
|
}
|
|
1675
1676
|
},
|
|
1676
1677
|
deleteButtonClick: async (event, connector) => {
|
|
@@ -1732,6 +1733,13 @@ const NylasSelectEventType = class {
|
|
|
1732
1733
|
this.participantOptions = undefined;
|
|
1733
1734
|
this.name = 'select-event-type';
|
|
1734
1735
|
this.selectedLanguage = undefined;
|
|
1736
|
+
this.enableEventTypes = {
|
|
1737
|
+
one_on_one: true,
|
|
1738
|
+
collective: true,
|
|
1739
|
+
max_fairness: true,
|
|
1740
|
+
max_availability: true,
|
|
1741
|
+
group: true,
|
|
1742
|
+
};
|
|
1735
1743
|
}
|
|
1736
1744
|
connectedCallback() {
|
|
1737
1745
|
debug('nylas-select-event-type', 'connectedCallback');
|
|
@@ -1756,7 +1764,14 @@ const NylasSelectEventType = class {
|
|
|
1756
1764
|
instance.changeLanguage(newVal);
|
|
1757
1765
|
}
|
|
1758
1766
|
render() {
|
|
1759
|
-
const
|
|
1767
|
+
const eventTypeKey = {
|
|
1768
|
+
'one-on-one': 'one_on_one',
|
|
1769
|
+
'collective': 'collective',
|
|
1770
|
+
'max-fairness': 'max_fairness',
|
|
1771
|
+
'max-availability': 'max_availability',
|
|
1772
|
+
'group': 'group',
|
|
1773
|
+
};
|
|
1774
|
+
const allEventTypes = [
|
|
1760
1775
|
{
|
|
1761
1776
|
label: instance.t('nylasSelectEventType.eventTypeOptions.oneOnOne.label'),
|
|
1762
1777
|
value: CONFIGURATION_EVENT_TYPE.one_on_one,
|
|
@@ -1783,19 +1798,27 @@ const NylasSelectEventType = class {
|
|
|
1783
1798
|
description: instance.t('nylasSelectEventType.eventTypeOptions.group.desc'),
|
|
1784
1799
|
},
|
|
1785
1800
|
];
|
|
1801
|
+
const conditionalEventTypes = [CONFIGURATION_EVENT_TYPE.collective, CONFIGURATION_EVENT_TYPE.max_availability, CONFIGURATION_EVENT_TYPE.max_fairness];
|
|
1786
1802
|
const hasAdditionalParticipants = this.participantOptions &&
|
|
1787
1803
|
this.participantOptions?.length > 0 &&
|
|
1788
1804
|
!!this.participantOptions[0].email &&
|
|
1789
1805
|
!!this.participantOptions[0].name &&
|
|
1790
1806
|
!!this.participantOptions[0].calendars &&
|
|
1791
1807
|
this.participantOptions[0].calendars.length > 0;
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1794
|
-
|
|
1808
|
+
const eventTypes = this.enableEventTypes
|
|
1809
|
+
? allEventTypes.filter(eventType => {
|
|
1810
|
+
const key = eventType.value;
|
|
1811
|
+
const keyType = eventTypeKey[key];
|
|
1812
|
+
console.log('key', key, this.enableEventTypes ? this.enableEventTypes[keyType] : 'no enableEventTypes');
|
|
1813
|
+
if (conditionalEventTypes.includes(key) && !hasAdditionalParticipants) {
|
|
1814
|
+
return false;
|
|
1815
|
+
}
|
|
1816
|
+
return this.enableEventTypes && this.enableEventTypes[keyType];
|
|
1817
|
+
})
|
|
1818
|
+
: allEventTypes;
|
|
1819
|
+
return (h(Host, null, h("div", { class: "nylas-select-event-type", part: "nset" }, h("div", { class: "header", part: "nset__header" }, h("h2", null, instance.t('nylasSelectEventType.createEventHeaderTitle')), h("button-component", { variant: "invisible", part: "nset__header__back-button", onClick: _event => {
|
|
1795
1820
|
this.returnToAllSchedulingPagesEvent.emit();
|
|
1796
|
-
} }, h("chevron-icon", {
|
|
1797
|
-
.filter(e => defaultEventTypes.includes(e.value) || (hasAdditionalParticipants && conditionalEventTypes.includes(e.value)))
|
|
1798
|
-
.map(eventType => (h("div", { class: "event-type-option", onClick: _event => {
|
|
1821
|
+
} }, h("chevron-icon", { width: "16", height: "16" }), h("span", null, instance.t('nylasSelectEventType.returnToAllSchedulingPages')))), h("div", { class: "content", part: "nset__content" }, h("h3", null, instance.t('nylasSelectEventType.eventTypeHeaderTitle')), h("div", { class: "event-type", part: "nset__content__event-type" }, eventTypes.length === 0 && h("p", null, instance.t('nylasSelectEventType.noEventTypesEnabled')), eventTypes.map(eventType => (h("div", { class: "event-type-option", onClick: _event => {
|
|
1799
1822
|
this.createEventTypeSelected.emit({ eventType: eventType.value });
|
|
1800
1823
|
}, part: `nset__content__event-type-option-${eventType.value}` }, h("h4", null, eventType.label), h("p", null, eventType.description)))))))));
|
|
1801
1824
|
}
|
|
@@ -1811,6 +1834,7 @@ __decorate([
|
|
|
1811
1834
|
stateToProps: new Map([
|
|
1812
1835
|
['schedulerConfig.selectedLanguage', 'selectedLanguage'],
|
|
1813
1836
|
['schedulerConfig.additionalParticipants', 'participantOptions'],
|
|
1837
|
+
['schedulerConfig.enableEventTypes', 'enableEventTypes'],
|
|
1814
1838
|
]),
|
|
1815
1839
|
eventToProps: {
|
|
1816
1840
|
returnToAllSchedulingPagesEvent: async (_event, connector) => {
|