@nylas/web-elements 2.6.0 → 2.6.2
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 +961 -961
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +74 -70
- package/dist/cjs/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.cjs.js.map +1 -1
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +8 -7
- package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +9 -6
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.entry.cjs.js.map +1 -1
- package/dist/cjs/{version-CHszslqN.js → version-pNhv-OnX.js} +3 -3
- package/dist/cjs/{version-CHszslqN.js.map → version-pNhv-OnX.js.map} +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js +7 -6
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +8 -5
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/version.js +1 -1
- package/dist/collection/version.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group.js +1 -1
- package/dist/components/nylas-editor-tabs.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +3 -3
- package/dist/components/nylas-scheduling.js +9 -6
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/{p-CNj6i-JK.js → p-BvUse-6u.js} +3 -3
- package/dist/components/{p-CNj6i-JK.js.map → p-BvUse-6u.js.map} +1 -1
- package/dist/components/{p-DTNmzKXY.js → p-CK_YvIAV.js} +10 -9
- package/dist/components/p-CK_YvIAV.js.map +1 -0
- package/dist/components/{p-Z5I7z8cD.js → p-CmX4JCsD.js} +3 -3
- package/dist/components/{p-Z5I7z8cD.js.map → p-CmX4JCsD.js.map} +1 -1
- package/dist/esm/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.js.map +1 -1
- package/dist/esm/google-logo-icon_6.entry.js +8 -7
- package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
- package/dist/esm/nylas-scheduling.entry.js +9 -6
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/{version-CYTx0-4Z.js → version-D-6xYsvk.js} +3 -3
- package/dist/esm/{version-CYTx0-4Z.js.map → version-D-6xYsvk.js.map} +1 -1
- package/dist/nylas-web-elements/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-CYTx0-4Z.js → p-D-6xYsvk.js} +2 -2
- package/dist/nylas-web-elements/{p-CYTx0-4Z.js.map → p-D-6xYsvk.js.map} +1 -1
- package/dist/nylas-web-elements/{p-5d3ae749.entry.js → p-a6909b16.entry.js} +2 -2
- package/dist/nylas-web-elements/p-d346e3fb.entry.js +2 -0
- package/dist/nylas-web-elements/p-d346e3fb.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-f5ccd7f3.entry.js → p-f831f2f7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f5ccd7f3.entry.js.map → p-f831f2f7.entry.js.map} +1 -1
- package/dist/types/connector/shared/api/scheduler.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-DTNmzKXY.js.map +0 -1
- package/dist/nylas-web-elements/p-82b39e7c.entry.js +0 -2
- package/dist/nylas-web-elements/p-82b39e7c.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-5d3ae749.entry.js.map → p-a6909b16.entry.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import { h, F as Fragment, r as registerInstance, c as createEvent, H as Host, a
|
|
|
2
2
|
import { N as NylasBaseProvider } from './abstract-provider-C4xP8KoA.js';
|
|
3
3
|
import { N as NylasIdentityRequestWrapper } from './nylas-api-request-CWLncKIc.js';
|
|
4
4
|
import { d as dayjs, u as utc, t as timezone, a as debug, b as dataResponse, g as getCalendarRange, e as error, C as CONFIGURATION_EVENT_TYPE, L as LANGUAGE_CODE, i as instance, c as LANGUAGE_MAP } from './utils-DfIu4gMZ.js';
|
|
5
|
-
import { o as o$1, v as version, E as ErrorCategory, N as NotificationType } from './version-
|
|
5
|
+
import { o as o$1, v as version, E as ErrorCategory, N as NotificationType } from './version-D-6xYsvk.js';
|
|
6
6
|
import { c as createStore } from './index-DVBNi-yR.js';
|
|
7
7
|
|
|
8
8
|
dayjs.extend(utc);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, F as Fragment, r as registerInstance, c as createEvent, H as Host, a as getElement } from './index-0EQQA0nE.js';
|
|
2
2
|
import { N as NylasBaseProvider } from './abstract-provider-C4xP8KoA.js';
|
|
3
3
|
import { n as normalizeSupportedLanguageCode, L as LANGUAGE_CODE, i as instance, f as normalizeDateInput, h as addDaysToCurrentDate, a as debug, j as detectBrowserLanguageCode, k as compactStringToUUIDs, l as LANGUAGE_CODE_TO_LOCALE_MAP, m as capitalizeFirstLetter, c as LANGUAGE_MAP } from './utils-DfIu4gMZ.js';
|
|
4
|
-
import { E as ErrorCategory, v as version, u } from './version-
|
|
4
|
+
import { E as ErrorCategory, v as version, u } from './version-D-6xYsvk.js';
|
|
5
5
|
import { c as createStore } from './index-DVBNi-yR.js';
|
|
6
6
|
import { i as isInitialized, a as init, f as feedbackSyncIntegration, c as captureMessage, b as captureFeedback } from './feedbackSync-B8tfyAQm.js';
|
|
7
7
|
|
|
@@ -230,7 +230,7 @@ class NylaSchedulerAPIConnector {
|
|
|
230
230
|
}
|
|
231
231
|
async toggleAdditionalData(value) {
|
|
232
232
|
if (!value) {
|
|
233
|
-
await this.refetchAvailability();
|
|
233
|
+
await this.refetchAvailability(this.getViewedMonthAnchor());
|
|
234
234
|
}
|
|
235
235
|
this.schedulerStore.set('showBookingForm', value);
|
|
236
236
|
}
|
|
@@ -275,11 +275,14 @@ class NylaSchedulerAPIConnector {
|
|
|
275
275
|
additionalFields: merged,
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
getViewedMonthAnchor() {
|
|
279
|
+
return (normalizeDateInput(this.schedulerStore.get('selectedDate')) ?? normalizeDateInput(this.schedulerStore.get('selectedTimeslot')?.start_time));
|
|
280
|
+
}
|
|
281
|
+
async refetchAvailability(anchorDate = new Date()) {
|
|
279
282
|
const today = new Date();
|
|
280
|
-
const startTime = new Date(
|
|
283
|
+
const startTime = new Date(anchorDate.getFullYear(), anchorDate.getMonth(), 1).getTime() / 1000;
|
|
281
284
|
const startTimeWithOffset = startTime < today.getTime() / 1000 ? Math.floor(today.getTime() / 1000) : startTime;
|
|
282
|
-
const endTime = new Date(
|
|
285
|
+
const endTime = new Date(anchorDate.getFullYear(), anchorDate.getMonth() + 1, 1).getTime() / 1000;
|
|
283
286
|
const result = await this.getAvailability(startTimeWithOffset, endTime);
|
|
284
287
|
return result;
|
|
285
288
|
}
|
|
@@ -752,7 +755,7 @@ class NylaSchedulerAPIConnector {
|
|
|
752
755
|
const errorMessage = this.getErrorMessage(error);
|
|
753
756
|
error = this.errors.api(instance.t('validateTimeslotErrorTitle'))[errorType](errorMessage);
|
|
754
757
|
}
|
|
755
|
-
this.refetchAvailability();
|
|
758
|
+
this.refetchAvailability(timeslot.start_time);
|
|
756
759
|
return { error };
|
|
757
760
|
}
|
|
758
761
|
this.schedulerStore.set('selectedTimeslot', timeslot);
|