@nylas/react 1.1.4 → 1.1.6
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/add-circle-icon_2.entry-40ff1ddc.js +25 -0
- package/dist/add-circle-icon_2.entry-c9aa21bb.cjs +1 -0
- package/dist/archive-icon.entry-253f4253.js +15 -0
- package/dist/archive-icon.entry-f27eb10c.cjs +1 -0
- package/dist/{arrow-icon.entry-20b50784.js → arrow-icon.entry-ac939154.js} +2 -2
- package/dist/{arrow-icon.entry-83c3105b.cjs → arrow-icon.entry-b1ca875a.cjs} +1 -1
- package/dist/{bold-icon.entry-34b18d0d.js → bold-icon.entry-3594774b.js} +2 -2
- package/dist/{bold-icon.entry-0e3d84e1.cjs → bold-icon.entry-e815017f.cjs} +1 -1
- package/dist/{button-component_2.entry-54101987.cjs → button-component_2.entry-a2d998c4.cjs} +1 -1
- package/dist/{button-component_2.entry-8a5e99da.js → button-component_2.entry-fdca89a8.js} +6 -6
- package/dist/{calendar-agenda-fill-icon_51.entry-a351dca5.js → calendar-agenda-fill-icon_54.entry-40b74a1d.js} +1947 -1636
- package/dist/calendar-agenda-fill-icon_54.entry-d47f77af.cjs +10 -0
- package/dist/{calendar-cancel-icon.entry-f83e9b41.js → calendar-cancel-icon.entry-90a529f9.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-00756264.cjs → calendar-cancel-icon.entry-98e56632.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-1817540c.js → calendar-check-icon_2.entry-09e247b0.js} +7 -7
- package/dist/{calendar-check-icon_2.entry-6ac948fc.cjs → calendar-check-icon_2.entry-305d0f9f.cjs} +1 -1
- package/dist/{calendar-icon.entry-68e53f52.cjs → calendar-icon.entry-7570a82f.cjs} +1 -1
- package/dist/{calendar-icon.entry-362428bf.js → calendar-icon.entry-ff7dfc9b.js} +2 -2
- package/dist/{checkbox-component_2.entry-5ce9807d.cjs → checkbox-component_2.entry-2b5a2721.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-0d7c1916.js → checkbox-component_2.entry-2d8bf66e.js} +3 -3
- package/dist/{chevron-icon_3.entry-89c52603.cjs → chevron-icon_3.entry-35130198.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-37c087a7.js → chevron-icon_3.entry-e6539933.js} +6 -6
- package/dist/{clock-icon_4.entry-496058ef.cjs → clock-icon_4.entry-623c482d.cjs} +1 -1
- package/dist/{clock-icon_4.entry-2e78febe.js → clock-icon_4.entry-797aa1f7.js} +8 -8
- package/dist/constants-c549b12b-7ea4c7f5.js +763 -0
- package/dist/constants-c549b12b-c85413b1.cjs +1 -0
- package/dist/copy-icon.entry-7dd1cd70.cjs +1 -0
- package/dist/{copy-icon.entry-6d4e05b0.js → copy-icon.entry-9b8eb24d.js} +7 -7
- package/dist/{delete-icon.entry-ea06b42a.js → delete-icon.entry-3d05884f.js} +7 -7
- package/dist/{delete-icon.entry-e98b336e.cjs → delete-icon.entry-506ee04f.cjs} +1 -1
- package/dist/document-refresh-icon.entry-09b959f4.js +15 -0
- package/dist/document-refresh-icon.entry-1ff1f7ca.cjs +1 -0
- package/dist/{feedbackSync-ab657d65-e8b7c001.js → feedbackSync-b56b29ed-6a2388f3.js} +1 -1
- package/dist/{feedbackSync-ab657d65-e650e46d.cjs → feedbackSync-b56b29ed-cf8c7876.cjs} +1 -1
- package/dist/{folder-icon.entry-5c3f4e8f.cjs → folder-icon.entry-2788257d.cjs} +1 -1
- package/dist/{folder-icon.entry-6096fbf4.js → folder-icon.entry-6f9875f7.js} +2 -2
- package/dist/{forward-icon.entry-4089e3bb.cjs → forward-icon.entry-49f6a480.cjs} +1 -1
- package/dist/forward-icon.entry-a0de0be0.js +15 -0
- package/dist/{globe-icon.entry-e8ca972e.cjs → globe-icon.entry-04c890dd.cjs} +1 -1
- package/dist/{globe-icon.entry-59f4c2f9.js → globe-icon.entry-b7f1e5b8.js} +4 -4
- package/dist/google-logo-icon_4.entry-66d8a50d.cjs +1 -0
- package/dist/{google-logo-icon_4.entry-d4b8926f.js → google-logo-icon_4.entry-b2463218.js} +254 -240
- package/dist/inbox-icon.entry-11813535.cjs +1 -0
- package/dist/{inbox-icon.entry-70dae5ec.js → inbox-icon.entry-c5cb64d8.js} +2 -2
- package/dist/{index-e475e0c0.js → index-600718a1.js} +3236 -3090
- package/dist/index-8755dd64.cjs +81 -0
- package/dist/{index.es-b475d61f-68a74a28.cjs → index.es-c7ca1bad-1c8a9213.cjs} +1 -1
- package/dist/{index.es-b475d61f-bfa2cba2.js → index.es-c7ca1bad-73894e2f.js} +1 -1
- package/dist/{info-icon_2.entry-f1b1dfba.cjs → info-icon_2.entry-08125285.cjs} +1 -1
- package/dist/{info-icon_2.entry-2bb60213.js → info-icon_2.entry-e48e3cda.js} +5 -5
- package/dist/{input-color-picker.entry-5ae45a9e.js → input-color-picker.entry-54e61165.js} +3 -3
- package/dist/{input-color-picker.entry-b669f7fb.cjs → input-color-picker.entry-acfa5da8.cjs} +1 -1
- package/dist/{input-component.entry-cb958501.js → input-component.entry-54df3f66.js} +3 -3
- package/dist/{input-component.entry-eeb95361.cjs → input-component.entry-e2fbcde0.cjs} +1 -1
- package/dist/{input-dropdown.entry-0b458f68.cjs → input-dropdown.entry-1509d5c4.cjs} +1 -1
- package/dist/{input-dropdown.entry-962605f8.js → input-dropdown.entry-8dec00e3.js} +4 -4
- package/dist/italic-icon.entry-79eafb05.cjs +1 -0
- package/dist/italic-icon.entry-c9028583.js +15 -0
- package/dist/{multi-select-dropdown.entry-a66408a2.cjs → multi-select-dropdown.entry-221212e3.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-3084e1fc.js → multi-select-dropdown.entry-2ed02a88.js} +2 -2
- package/dist/nylas-booked-event-card_12.entry-5125b535.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-29e2a4b1.js → nylas-booked-event-card_12.entry-fa2b2630.js} +421 -323
- package/dist/{nylas-form-card.entry-8465eccf.cjs → nylas-form-card.entry-2019c383.cjs} +1 -1
- package/dist/{nylas-form-card.entry-33b4c295.js → nylas-form-card.entry-a114052f.js} +16 -16
- package/dist/{nylas-if-state.entry-adb6103a.cjs → nylas-if-state.entry-480c45d1.cjs} +1 -1
- package/dist/{nylas-if-state.entry-9d96fc87.js → nylas-if-state.entry-de891ced.js} +3 -3
- package/dist/{nylas-login.entry-3f7c195e.js → nylas-login.entry-9ad74f40.js} +7 -7
- package/dist/{nylas-login.entry-78b968d1.cjs → nylas-login.entry-c99a7b37.cjs} +1 -1
- package/dist/{nylas-provider.entry-b918d0f6.cjs → nylas-provider.entry-d9c4e3d2.cjs} +1 -1
- package/dist/{nylas-provider.entry-19635620.js → nylas-provider.entry-faf7ef23.js} +5 -5
- package/dist/{nylas-scheduler-editor.entry-cfed7ae2.cjs → nylas-scheduler-editor.entry-8c5543bd.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-e848771f.js → nylas-scheduler-editor.entry-9af09bc2.js} +25 -25
- package/dist/{nylas-scheduling.entry-da987c02.js → nylas-scheduling.entry-8f5718ac.js} +142 -130
- package/dist/nylas-scheduling.entry-e778f5f6.cjs +1 -0
- package/dist/{nylas-time-window-picker.entry-1f76b577.cjs → nylas-time-window-picker.entry-0f396304.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-3c6b29d9.js → nylas-time-window-picker.entry-690e753e.js} +13 -13
- package/dist/{person-icon.entry-82bbb87c.cjs → person-icon.entry-049ebaaa.cjs} +1 -1
- package/dist/{person-icon.entry-79fcd9fb.js → person-icon.entry-9c82640f.js} +2 -2
- package/dist/{play-icon.entry-3f357ea4.cjs → play-icon.entry-4b931766.cjs} +1 -1
- package/dist/play-icon.entry-5e77c87c.js +15 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +9 -9
- package/dist/{refresh-icon.entry-7ce5ec90.cjs → refresh-icon.entry-1c42e8df.cjs} +1 -1
- package/dist/{refresh-icon.entry-1427a5e6.js → refresh-icon.entry-f9d37dda.js} +2 -2
- package/dist/{register-component-679c1308-b5a96acf.cjs → register-component-3444af44-38748cf2.cjs} +1 -1
- package/dist/{register-component-679c1308-de697ecb.js → register-component-3444af44-a9df7506.js} +1 -1
- package/dist/{reply-all-icon.entry-f1165660.js → reply-all-icon.entry-c4c94341.js} +2 -2
- package/dist/{reply-all-icon.entry-cf8114db.cjs → reply-all-icon.entry-d090c34a.cjs} +1 -1
- package/dist/reply-icon.entry-69438565.js +15 -0
- package/dist/reply-icon.entry-6a5377ae.cjs +1 -0
- package/dist/scheduler-config-store-ed4a8dfd-82b439de.cjs +1 -0
- package/dist/{scheduler-config-store-2a3b403d-e5210f72.js → scheduler-config-store-ed4a8dfd-9126610f.js} +1 -2
- package/dist/scheduler-store-d4784b24-32e6da1e.cjs +1 -0
- package/dist/{scheduler-store-908886c8-b0f43cb9.js → scheduler-store-d4784b24-4558c7eb.js} +134 -126
- package/dist/sent-icon.entry-36964458.cjs +1 -0
- package/dist/sent-icon.entry-eae2a5f1.js +15 -0
- package/dist/spam-icon.entry-1f47e1cf.js +15 -0
- package/dist/spam-icon.entry-ec0b7f17.cjs +1 -0
- package/dist/{star-icon.entry-88501c8b.cjs → star-icon.entry-5fb1fdfe.cjs} +1 -1
- package/dist/{star-icon.entry-b15601ca.js → star-icon.entry-f2ba5cf7.js} +5 -5
- package/dist/{stop-icon.entry-3475e257.cjs → stop-icon.entry-c9b1f0a1.cjs} +1 -1
- package/dist/stop-icon.entry-e9c53f8f.js +15 -0
- package/dist/{textarea-component.entry-d1f4dd9a.js → textarea-component.entry-43938bc5.js} +2 -2
- package/dist/{textarea-component.entry-683c2959.cjs → textarea-component.entry-f7a089d4.cjs} +1 -1
- package/dist/{time-period-selector.entry-8cfdf750.cjs → time-period-selector.entry-9151a673.cjs} +1 -1
- package/dist/{time-period-selector.entry-e97f86fd.js → time-period-selector.entry-dcef9d6a.js} +2 -2
- package/dist/{translate-icon.entry-09c5574f.js → translate-icon.entry-5b47ef85.js} +4 -4
- package/dist/{translate-icon.entry-5757c37c.cjs → translate-icon.entry-d563b357.cjs} +1 -1
- package/dist/trash-fill-icon.entry-7d201791.cjs +1 -0
- package/dist/{trash-fill-icon.entry-470ec1ff.js → trash-fill-icon.entry-e316b456.js} +3 -3
- package/dist/{underline-icon.entry-9fe74ba7.js → underline-icon.entry-03cae3b3.js} +2 -2
- package/dist/{underline-icon.entry-6d729068.cjs → underline-icon.entry-a6751a31.cjs} +1 -1
- package/dist/{warning-icon.entry-d924f8f9.js → warning-icon.entry-b3c9b687.js} +5 -5
- package/dist/{warning-icon.entry-c1d48318.cjs → warning-icon.entry-f4936405.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon_2.entry-6753bd65.js +0 -25
- package/dist/add-circle-icon_2.entry-cd9a7f37.cjs +0 -1
- package/dist/archive-icon.entry-434d1696.js +0 -15
- package/dist/archive-icon.entry-7cb1c265.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_51.entry-1920adc2.cjs +0 -7
- package/dist/constants-c31dccfe-04b9cd8a.js +0 -3883
- package/dist/constants-c31dccfe-1a739653.cjs +0 -15
- package/dist/copy-icon.entry-a1baee33.cjs +0 -1
- package/dist/document-refresh-icon.entry-09750b52.cjs +0 -1
- package/dist/document-refresh-icon.entry-afae6621.js +0 -15
- package/dist/forward-icon.entry-da319c05.js +0 -15
- package/dist/google-logo-icon_4.entry-e2001f83.cjs +0 -1
- package/dist/inbox-icon.entry-80ee9082.cjs +0 -1
- package/dist/index-6b9d4b01.cjs +0 -81
- package/dist/italic-icon.entry-4a89e289.cjs +0 -1
- package/dist/italic-icon.entry-5be07509.js +0 -15
- package/dist/nylas-booked-event-card_12.entry-227ccf31.cjs +0 -1
- package/dist/nylas-reminder-emails.entry-ec79b757.js +0 -168
- package/dist/nylas-reminder-emails.entry-ee76db24.cjs +0 -4
- package/dist/nylas-reminder-time_2.entry-105de2d0.js +0 -108
- package/dist/nylas-reminder-time_2.entry-83ecc1d4.cjs +0 -1
- package/dist/nylas-scheduling.entry-e989cf9e.cjs +0 -1
- package/dist/play-icon.entry-97b40470.js +0 -15
- package/dist/reply-icon.entry-3a601cff.js +0 -15
- package/dist/reply-icon.entry-3db337c9.cjs +0 -1
- package/dist/scheduler-config-store-2a3b403d-e6f5bcab.cjs +0 -1
- package/dist/scheduler-store-908886c8-62d14677.cjs +0 -1
- package/dist/sent-icon.entry-2c7bd48e.js +0 -15
- package/dist/sent-icon.entry-708b9a2b.cjs +0 -1
- package/dist/spam-icon.entry-3106ed3d.js +0 -15
- package/dist/spam-icon.entry-fa8b80c6.cjs +0 -1
- package/dist/stop-icon.entry-f926a8db.js +0 -15
- package/dist/trash-fill-icon.entry-4bbfabcc.cjs +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
var
|
|
1
|
+
import { d as L, a as F, i as c, j as R } from "./index-600718a1.js";
|
|
2
|
+
var B;
|
|
3
3
|
(function(a) {
|
|
4
4
|
a.Component = "component", a.Api = "api", a.Auth = "auth";
|
|
5
|
-
})(
|
|
6
|
-
var
|
|
5
|
+
})(B || (B = {}));
|
|
6
|
+
var M;
|
|
7
7
|
(function(a) {
|
|
8
8
|
a.endtime_not_in_future = "endtime_not_in_future", a.no_booking_info = "no_booking_info", a.no_timeslot_selected = "no_timeslot_selected", a.no_timezone_selected = "no_timezone_selected", a.no_booking_id = "no_booking_id", a.no_salt = "no_salt", a.invalid_start_time = "invalid_start_time", a.invalid_end_time = "invalid_end_time", a.invalid_timezone = "invalid_timezone";
|
|
9
|
-
})(
|
|
10
|
-
var
|
|
9
|
+
})(M || (M = {}));
|
|
10
|
+
var P;
|
|
11
11
|
(function(a) {
|
|
12
12
|
a.invalid_session = "invalid_session", a.general_error = "general_error", a.internal_error = "internal_error", a.invalid_request_error = "invalid_request_error", a.timeslot_not_available = "timeslot_not_available", a.provider_error = "provider_error", a.not_found_error = "not_found_error";
|
|
13
|
-
})(
|
|
13
|
+
})(P || (P = {}));
|
|
14
14
|
class C {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.component = (e) => {
|
|
17
|
-
const t =
|
|
17
|
+
const t = B.Component, s = `${e} Error`;
|
|
18
18
|
return {
|
|
19
19
|
endtime_not_in_future: (i = '"endtime" can not be in the future') => ({
|
|
20
20
|
title: s,
|
|
@@ -63,7 +63,7 @@ class C {
|
|
|
63
63
|
})
|
|
64
64
|
};
|
|
65
65
|
}, this.api = (e) => {
|
|
66
|
-
const t =
|
|
66
|
+
const t = B.Api, s = `${e} Error`;
|
|
67
67
|
return {
|
|
68
68
|
invalid_session: (i) => ({
|
|
69
69
|
title: s,
|
|
@@ -104,7 +104,7 @@ class C {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class O {
|
|
108
108
|
constructor({ schedulerAPIURL: e, schedulerStore: t, sessionId: s, configId: i, slug: n, clientId: r }) {
|
|
109
109
|
this.errors = new C(), this.schedulerStore = t, this.schedulerAPIURL = e, this.sessionId = s, this.configId = i, this.slug = n, this.clientId = r;
|
|
110
110
|
}
|
|
@@ -153,7 +153,7 @@ class U {
|
|
|
153
153
|
this.schedulerStore.set("selectedTimezone", e);
|
|
154
154
|
}
|
|
155
155
|
selectLanguage(e) {
|
|
156
|
-
this.schedulerStore.set("selectedLanguage", e),
|
|
156
|
+
this.schedulerStore.set("selectedLanguage", e), c.changeLanguage(e);
|
|
157
157
|
}
|
|
158
158
|
async toggleAdditionalData(e) {
|
|
159
159
|
e || await this.refetchAvailability(), this.schedulerStore.set("showBookingForm", e);
|
|
@@ -212,48 +212,52 @@ class U {
|
|
|
212
212
|
return this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("confirmedEventInfo", void 0), e;
|
|
213
213
|
}
|
|
214
214
|
async bookTimeslot(e) {
|
|
215
|
-
var
|
|
215
|
+
var I;
|
|
216
216
|
this.schedulerStore.set("isLoading", !0);
|
|
217
217
|
const { selectedTimeslot: t, selectedTimezone: s, bookingInfo: i, selectedLanguage: n } = this.schedulerStore.state;
|
|
218
218
|
if (!e && !i)
|
|
219
|
-
return { error: this.errors.component(
|
|
219
|
+
return { error: this.errors.component(c.t("createBookingErrorTitle")).no_booking_info() };
|
|
220
220
|
const r = (e == null ? void 0 : e.timeslot) || t;
|
|
221
221
|
if (!r)
|
|
222
|
-
return { error: this.errors.component(
|
|
223
|
-
const o = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : s;
|
|
222
|
+
return { error: this.errors.component(c.t("createBookingErrorTitle")).no_timeslot_selected() };
|
|
223
|
+
const o = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : s, m = n || "en-US";
|
|
224
224
|
if (!o)
|
|
225
|
-
return { error: this.errors.component(
|
|
226
|
-
const
|
|
227
|
-
let
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
for (let
|
|
231
|
-
if (
|
|
232
|
-
|
|
225
|
+
return { error: this.errors.component(c.t("createBookingErrorTitle")).no_timezone_selected() };
|
|
226
|
+
const h = this.schedulerStore.get("availabilityOrderEmails");
|
|
227
|
+
let l = "";
|
|
228
|
+
if (h.length > 0) {
|
|
229
|
+
const k = (r == null ? void 0 : r.emails) || [];
|
|
230
|
+
for (let f = 0; f < h.length; f++)
|
|
231
|
+
if (k.includes(h[f])) {
|
|
232
|
+
l = h[f];
|
|
233
233
|
break;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
const d = {};
|
|
237
|
+
Object.entries((i == null ? void 0 : i.additionalFields) || {}).forEach(([k, f]) => {
|
|
238
|
+
d[k] = f.value;
|
|
239
|
+
});
|
|
240
|
+
const _ = e ? e == null ? void 0 : e.primaryParticipant : i == null ? void 0 : i.primaryParticipant, S = e ? (e == null ? void 0 : e.guests) || [] : (i == null ? void 0 : i.guests) || [], p = e ? e == null ? void 0 : e.additionalFields : d, T = this.getHeaders(), v = `/v3/scheduling/bookings${!this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : ""}`, u = await this.makeAPIRequest(decodeURIComponent(v), "POST", JSON.stringify({
|
|
241
|
+
participants: l ? [{ email: l }] : void 0,
|
|
242
|
+
additional_fields: p,
|
|
243
|
+
additional_guests: S,
|
|
244
|
+
guest: { ..._ },
|
|
241
245
|
start_time: r.start_time.getTime() / 1e3,
|
|
242
246
|
end_time: r.end_time.getTime() / 1e3,
|
|
243
247
|
timezone: o,
|
|
244
|
-
email_language: this.getTwoLetterLanguageCode(
|
|
245
|
-
}),
|
|
246
|
-
if ("error" in
|
|
248
|
+
email_language: this.getTwoLetterLanguageCode(m)
|
|
249
|
+
}), T);
|
|
250
|
+
if ("error" in u) {
|
|
247
251
|
this.schedulerStore.set("isLoading", !1);
|
|
248
|
-
const
|
|
249
|
-
let
|
|
250
|
-
if (
|
|
251
|
-
const
|
|
252
|
-
|
|
252
|
+
const k = (I = u.error) == null ? void 0 : I.type;
|
|
253
|
+
let f = u.error;
|
|
254
|
+
if (k && k in this.errors.api("Create Booking")) {
|
|
255
|
+
const E = this.getErrorMessage(f);
|
|
256
|
+
f = this.errors.api("Create Booking")[k](E);
|
|
253
257
|
}
|
|
254
|
-
return { error:
|
|
258
|
+
return { error: f };
|
|
255
259
|
}
|
|
256
|
-
return "data" in
|
|
260
|
+
return "data" in u && this.schedulerStore.set("eventInfo", u == null ? void 0 : u.data), this.schedulerStore.set("isLoading", !1), u;
|
|
257
261
|
}
|
|
258
262
|
async getUISettings() {
|
|
259
263
|
var n;
|
|
@@ -263,7 +267,7 @@ class U {
|
|
|
263
267
|
this.schedulerStore.set("isLoading", !1);
|
|
264
268
|
const r = (n = i.error) == null ? void 0 : n.type;
|
|
265
269
|
let o = i.error;
|
|
266
|
-
return r && r in this.errors.api(
|
|
270
|
+
return r && r in this.errors.api(c.t("getUISettingErrorTitle")) && (o = this.errors.api(c.t("getUISettingErrorTitle"))[r]((o == null ? void 0 : o.message) || (o == null ? void 0 : o.title) || "Something went wrong")), { error: o };
|
|
267
271
|
}
|
|
268
272
|
return "data" in i && this.schedulerStore.set("configSettings", i.data), this.schedulerStore.set("isLoading", !1), i;
|
|
269
273
|
}
|
|
@@ -284,151 +288,155 @@ class U {
|
|
|
284
288
|
return Math.min(i, e);
|
|
285
289
|
}
|
|
286
290
|
async getAvailability(e = 0, t = 0) {
|
|
287
|
-
var
|
|
291
|
+
var _, S, p, T;
|
|
288
292
|
this.schedulerStore.set("isLoading", !0);
|
|
289
293
|
const s = new URLSearchParams(), i = /* @__PURE__ */ new Date(), n = i.getTime();
|
|
290
294
|
if (t && t < n / 1e3)
|
|
291
|
-
return this.schedulerStore.set("isLoading", !1), { error: this.errors.component(
|
|
295
|
+
return this.schedulerStore.set("isLoading", !1), { error: this.errors.component(c.t("getAvailabilityErrorTitle")).endtime_not_in_future() };
|
|
292
296
|
if (!e) {
|
|
293
|
-
const
|
|
294
|
-
e = Math.floor(
|
|
297
|
+
const g = new Date(i.getFullYear(), i.getMonth(), 1);
|
|
298
|
+
e = Math.floor(g.getTime() / 1e3);
|
|
295
299
|
}
|
|
296
300
|
if (!t) {
|
|
297
|
-
const
|
|
298
|
-
t = Math.floor(
|
|
301
|
+
const g = new Date(i.getFullYear(), i.getMonth() + 1, 0);
|
|
302
|
+
t = Math.floor(g.getTime() / 1e3);
|
|
299
303
|
}
|
|
300
304
|
t = this.getEndTimeForAvailableDaysInFuture(t);
|
|
301
305
|
const r = this.getStartTimeWithMinBookingNotice(e);
|
|
302
306
|
e = r, t = r > t ? r + 1 : t, s.append("start_time", encodeURIComponent(e.toString())), s.append("end_time", encodeURIComponent(t.toString())), this.configId && !this.sessionId ? s.append("configuration_id", encodeURIComponent(this.configId)) : this.slug && this.clientId && !this.sessionId && (s.append("slug", encodeURIComponent(this.slug)), s.append("client_id", encodeURIComponent(this.clientId)));
|
|
303
307
|
const o = this.schedulerStore.get("rescheduleBookingId");
|
|
304
308
|
o && s.append("booking_id", encodeURIComponent(o));
|
|
305
|
-
const
|
|
306
|
-
if ("error" in
|
|
309
|
+
const m = s.toString(), h = `/v3/scheduling/availability${m ? `?${m}` : ""}`, l = this.getHeaders(), d = await this.makeAPIRequest(decodeURIComponent(h), "GET", void 0, l);
|
|
310
|
+
if ("error" in d) {
|
|
307
311
|
this.schedulerStore.set("availability", []), this.schedulerStore.set("isLoading", !1);
|
|
308
|
-
const
|
|
309
|
-
let v =
|
|
310
|
-
if (
|
|
311
|
-
const
|
|
312
|
-
v = this.errors.api(
|
|
312
|
+
const g = (_ = d.error) == null ? void 0 : _.type;
|
|
313
|
+
let v = d.error;
|
|
314
|
+
if (g && g in this.errors.api(c.t("getAvailabilityErrorTitle"))) {
|
|
315
|
+
const u = this.getErrorMessage(v);
|
|
316
|
+
v = this.errors.api(c.t("getAvailabilityErrorTitle"))[g](u);
|
|
313
317
|
}
|
|
314
318
|
return { error: v };
|
|
315
319
|
}
|
|
316
|
-
if ("data" in
|
|
317
|
-
const v = (((p = (
|
|
318
|
-
...
|
|
319
|
-
start_time: new Date(
|
|
320
|
-
end_time: new Date(
|
|
321
|
-
}))) || []).filter((
|
|
320
|
+
if ("data" in d) {
|
|
321
|
+
const v = (((p = (S = d.data) == null ? void 0 : S.time_slots) == null ? void 0 : p.map((I) => ({
|
|
322
|
+
...I,
|
|
323
|
+
start_time: new Date(I.start_time * 1e3),
|
|
324
|
+
end_time: new Date(I.end_time * 1e3)
|
|
325
|
+
}))) || []).filter((I) => I.start_time.getTime() > n);
|
|
322
326
|
this.schedulerStore.set("availability", v);
|
|
323
|
-
const
|
|
324
|
-
this.schedulerStore.set("availabilityOrderEmails",
|
|
327
|
+
const u = ((T = d.data) == null ? void 0 : T.order) || [];
|
|
328
|
+
this.schedulerStore.set("availabilityOrderEmails", u);
|
|
325
329
|
}
|
|
326
|
-
return this.schedulerStore.set("isLoading", !1),
|
|
330
|
+
return this.schedulerStore.set("isLoading", !1), d;
|
|
327
331
|
}
|
|
328
332
|
async cancelBooking(e, t) {
|
|
329
333
|
var o;
|
|
330
334
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
331
|
-
return { error: this.errors.component(
|
|
335
|
+
return { error: this.errors.component(c.t("cancelBookingErrorTitle")).no_booking_id() };
|
|
332
336
|
const s = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", i = `/v3/scheduling/bookings/${e}${s}`, n = this.getHeaders(), r = await this.makeAPIRequest(decodeURIComponent(i), "DELETE", JSON.stringify({
|
|
333
337
|
action: "cancel",
|
|
334
338
|
cancellation_reason: t
|
|
335
339
|
}), n);
|
|
336
340
|
if ("error" in r) {
|
|
337
341
|
this.schedulerStore.set("isLoading", !1);
|
|
338
|
-
const
|
|
339
|
-
let
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
|
|
342
|
+
const m = (o = r.error) == null ? void 0 : o.type;
|
|
343
|
+
let h = r.error;
|
|
344
|
+
if (m && m in this.errors.api(c.t("cancelBookingErrorTitle"))) {
|
|
345
|
+
const l = this.getErrorMessage(h);
|
|
346
|
+
h = this.errors.api(c.t("cancelBookingErrorTitle"))[m](l);
|
|
343
347
|
}
|
|
344
|
-
return { error:
|
|
348
|
+
return { error: h };
|
|
345
349
|
}
|
|
346
350
|
return this.schedulerStore.set("cancelledEventInfo", {
|
|
347
351
|
booking_id: e
|
|
348
352
|
}), this.schedulerStore.set("rescheduleBookingId", ""), this.schedulerStore.set("isLoading", !1), r;
|
|
349
353
|
}
|
|
350
354
|
async rescheduleBooking(e, t) {
|
|
351
|
-
var
|
|
355
|
+
var A;
|
|
352
356
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
353
|
-
return { error: this.errors.component(
|
|
354
|
-
const s = this.errors.api(
|
|
355
|
-
if (!f)
|
|
356
|
-
return { error: i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
357
|
-
const _ = c || (r == null ? void 0 : r.end_time);
|
|
357
|
+
return { error: this.errors.component(c.t("rescheduleBookingErrorTitle")).no_booking_id() };
|
|
358
|
+
const s = this.errors.api(c.t("rescheduleBookingErrorTitle")), i = this.errors.component(c.t("rescheduleBookingErrorTitle")), { bookingInfo: n, selectedTimeslot: r, selectedTimezone: o, selectedLanguage: m } = this.schedulerStore.state, { startTime: h, endTime: l, timezone: d } = t, _ = h || (r == null ? void 0 : r.start_time);
|
|
358
359
|
if (!_)
|
|
360
|
+
return { error: i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
361
|
+
const S = l || (r == null ? void 0 : r.end_time);
|
|
362
|
+
if (!S)
|
|
359
363
|
return { error: i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
360
364
|
const p = this.schedulerStore.get("availabilityOrderEmails");
|
|
361
|
-
let
|
|
365
|
+
let T = "";
|
|
362
366
|
if (p.length > 0) {
|
|
363
|
-
const
|
|
364
|
-
for (let
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
+
const b = (r == null ? void 0 : r.emails) || [];
|
|
368
|
+
for (let y = 0; y < p.length; y++)
|
|
369
|
+
if (b.includes(p[y])) {
|
|
370
|
+
T = p[y];
|
|
367
371
|
break;
|
|
368
372
|
}
|
|
369
373
|
}
|
|
370
|
-
const
|
|
371
|
-
if (!
|
|
374
|
+
const g = d || o;
|
|
375
|
+
if (!g)
|
|
372
376
|
return { error: i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
|
|
373
|
-
const v =
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
377
|
+
const v = {};
|
|
378
|
+
Object.entries((n == null ? void 0 : n.additionalFields) || {}).forEach(([b, y]) => {
|
|
379
|
+
v[b] = y.value;
|
|
380
|
+
});
|
|
381
|
+
const u = t ? t == null ? void 0 : t.primaryParticipant : n == null ? void 0 : n.primaryParticipant, I = t ? (t == null ? void 0 : t.guests) || [] : (n == null ? void 0 : n.guests) || [], k = t ? t == null ? void 0 : t.additionalFields : v, f = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", E = `/v3/scheduling/bookings/${e}${f}`, z = this.getHeaders(), w = await this.makeAPIRequest(decodeURIComponent(E), "PATCH", JSON.stringify({
|
|
382
|
+
start_time: _.getTime() / 1e3,
|
|
383
|
+
end_time: S.getTime() / 1e3,
|
|
384
|
+
timezone: g,
|
|
385
|
+
additional_fields: k,
|
|
386
|
+
guest: { ...u },
|
|
387
|
+
additional_guests: I,
|
|
388
|
+
participants: T ? [{ email: T }] : void 0,
|
|
389
|
+
email_language: this.getTwoLetterLanguageCode(m)
|
|
390
|
+
}), z);
|
|
391
|
+
if ("error" in w) {
|
|
384
392
|
this.schedulerStore.set("isLoading", !1);
|
|
385
|
-
const
|
|
386
|
-
let
|
|
387
|
-
if (
|
|
388
|
-
const
|
|
389
|
-
|
|
393
|
+
const b = (A = w.error) == null ? void 0 : A.type;
|
|
394
|
+
let y = w.error;
|
|
395
|
+
if (b && b in s) {
|
|
396
|
+
const $ = this.getErrorMessage(y);
|
|
397
|
+
y = s[b]($);
|
|
390
398
|
}
|
|
391
|
-
return { error:
|
|
399
|
+
return { error: y };
|
|
392
400
|
}
|
|
393
|
-
const
|
|
394
|
-
if ("data" in
|
|
395
|
-
this.schedulerStore.set("eventInfo",
|
|
396
|
-
else if (
|
|
397
|
-
this.schedulerStore.set("eventInfo",
|
|
401
|
+
const D = this.schedulerStore.get("reschedulingEventInfo");
|
|
402
|
+
if ("data" in w)
|
|
403
|
+
this.schedulerStore.set("eventInfo", w == null ? void 0 : w.data);
|
|
404
|
+
else if (D)
|
|
405
|
+
this.schedulerStore.set("eventInfo", D);
|
|
398
406
|
else {
|
|
399
|
-
const
|
|
407
|
+
const b = {
|
|
400
408
|
booking_id: e
|
|
401
409
|
};
|
|
402
|
-
this.schedulerStore.set("eventInfo",
|
|
410
|
+
this.schedulerStore.set("eventInfo", b);
|
|
403
411
|
}
|
|
404
|
-
return this.schedulerStore.set("isLoading", !1),
|
|
412
|
+
return this.schedulerStore.set("isLoading", !1), w;
|
|
405
413
|
}
|
|
406
414
|
async updateBooking(e) {
|
|
407
|
-
var
|
|
415
|
+
var d;
|
|
408
416
|
this.schedulerStore.set("isLoading", !0);
|
|
409
|
-
const { bookingId: t, status: s, reason: i } = e, n = this.schedulerStore.get("organizerConfirmationSalt"), r = s === "confirmed" ?
|
|
417
|
+
const { bookingId: t, status: s, reason: i } = e, n = this.schedulerStore.get("organizerConfirmationSalt"), r = s === "confirmed" ? c.t("confirmBookingErrorTitle") : c.t("rejectBookingErrorTitle");
|
|
410
418
|
if (!t)
|
|
411
419
|
return { error: this.errors.component(r).no_booking_id() };
|
|
412
420
|
if (!n)
|
|
413
421
|
return { error: this.errors.component(r).no_salt() };
|
|
414
|
-
const o = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "",
|
|
422
|
+
const o = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", m = `/v3/scheduling/bookings/${t}${o}`, h = this.getHeaders(), l = await this.makeAPIRequest(decodeURIComponent(m), "PUT", JSON.stringify({
|
|
415
423
|
status: s,
|
|
416
424
|
cancellation_reason: i,
|
|
417
425
|
salt: n
|
|
418
|
-
}),
|
|
419
|
-
if ("error" in
|
|
426
|
+
}), h);
|
|
427
|
+
if ("error" in l) {
|
|
420
428
|
this.schedulerStore.set("isLoading", !1);
|
|
421
|
-
const
|
|
422
|
-
let
|
|
423
|
-
if (
|
|
424
|
-
const p = this.getErrorMessage(
|
|
425
|
-
|
|
429
|
+
const _ = (d = l.error) == null ? void 0 : d.type;
|
|
430
|
+
let S = l.error;
|
|
431
|
+
if (_ && _ in this.errors.api(r)) {
|
|
432
|
+
const p = this.getErrorMessage(S);
|
|
433
|
+
S = this.errors.api(r)[_](p);
|
|
426
434
|
}
|
|
427
|
-
return { error:
|
|
435
|
+
return { error: S };
|
|
428
436
|
}
|
|
429
|
-
return "data" in
|
|
437
|
+
return "data" in l && s === "confirmed" ? this.schedulerStore.set("confirmedEventInfo", l == null ? void 0 : l.data) : "request_id" in l && s === "cancelled" && this.schedulerStore.set("cancelledEventInfo", {
|
|
430
438
|
booking_id: t
|
|
431
|
-
}), this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("isLoading", !1),
|
|
439
|
+
}), this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("isLoading", !1), l;
|
|
432
440
|
}
|
|
433
441
|
}
|
|
434
442
|
function N(a = {}) {
|
|
@@ -449,17 +457,17 @@ function N(a = {}) {
|
|
|
449
457
|
nylasBranding: !0,
|
|
450
458
|
...a
|
|
451
459
|
};
|
|
452
|
-
|
|
453
|
-
const t =
|
|
460
|
+
L("[defaultNylasStoreState]: ", e);
|
|
461
|
+
const t = F(e);
|
|
454
462
|
return t.onChange("availability", (s) => {
|
|
455
|
-
|
|
463
|
+
L("[availability]: ", s);
|
|
456
464
|
const i = s.map((o) => o.start_time);
|
|
457
|
-
|
|
465
|
+
L("[selectableDates]: ", i), t.set("selectableDates", i);
|
|
458
466
|
const n = s[0];
|
|
459
467
|
if (!n)
|
|
460
468
|
return;
|
|
461
469
|
const r = Math.floor((n.end_time.getTime() - n.start_time.getTime()) / 6e4);
|
|
462
|
-
|
|
470
|
+
L("[durationMinutes]: ", r), t.set("eventDuration", r);
|
|
463
471
|
}), t.reset = () => {
|
|
464
472
|
for (const s in e) {
|
|
465
473
|
const i = e[s];
|
|
@@ -469,6 +477,6 @@ function N(a = {}) {
|
|
|
469
477
|
}
|
|
470
478
|
export {
|
|
471
479
|
N as C,
|
|
472
|
-
|
|
473
|
-
|
|
480
|
+
B as E,
|
|
481
|
+
O as N
|
|
474
482
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-8755dd64.cjs");require("react");require("react-dom");const i=".sc-sent-icon-h{display:flex}",o=i,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"ca3a664814e986f46006171c0fb63441478ef5b8",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"e4d9309797e02ca60918d49c55854d51f93c1a2b",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"082bf637872a00ba8abe224cc7c8092dc371ea75",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"dd3f5647d7cdb9dfbdb480ab332917564969f546",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};e.style=o;exports.sent_icon=e;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as s, h as t } from "./index-600718a1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const o = ".sc-sent-icon-h{display:flex}", i = o, c = class {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
s(this, e), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "ca3a664814e986f46006171c0fb63441478ef5b8", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "e4d9309797e02ca60918d49c55854d51f93c1a2b", d: "M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "082bf637872a00ba8abe224cc7c8092dc371ea75", d: "M3.5 3.5L12 10.5", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "dd3f5647d7cdb9dfbdb480ab332917564969f546", d: "M3.5 20.5L12 13.5", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
c.style = i;
|
|
13
|
+
export {
|
|
14
|
+
c as sent_icon
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as e, h as t } from "./index-600718a1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const c = ".sc-spam-icon-h{display:flex}", a = c, o = class {
|
|
5
|
+
constructor(s) {
|
|
6
|
+
e(this, s), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "a8e87346312ed75a47b88790585e07d8c518c3e9", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "5cb3444afa08fc37a8cf2e268c62faf5c97379f5", d: "M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "b695c0e7aa34cf44da99cce51c17ff98b3ad8906", d: "M2 5L12 12.5L22 5", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
o.style = a;
|
|
13
|
+
export {
|
|
14
|
+
o as spam_icon
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8755dd64.cjs");require("react");require("react-dom");const c=".sc-spam-icon-h{display:flex}",i=c,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"a8e87346312ed75a47b88790585e07d8c518c3e9",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"5cb3444afa08fc37a8cf2e268c62faf5c97379f5",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"b695c0e7aa34cf44da99cce51c17ff98b3ad8906",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};t.style=i;exports.spam_icon=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-8755dd64.cjs");require("react");require("react-dom");const i=".sc-star-icon-h{display:flex}",c=i,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"acc7e88e0901acac79fd0bf4a3a355ea82b46934",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"a3a8ed61cce35a1f67c5aa22cb0aee42c965474e",d:"M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z",stroke:"auto","stroke-width":"1.5"}))}};e.style=c;exports.star_icon=e;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { r as e, h as t } from "./index-
|
|
1
|
+
import { r as e, h as t } from "./index-600718a1.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
const
|
|
4
|
+
const a = ".sc-star-icon-h{display:flex}", c = a, i = class {
|
|
5
5
|
constructor(s) {
|
|
6
6
|
e(this, s), this.width = "15", this.height = "15";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return t("svg", { key: "
|
|
9
|
+
return t("svg", { key: "acc7e88e0901acac79fd0bf4a3a355ea82b46934", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "a3a8ed61cce35a1f67c5aa22cb0aee42c965474e", d: "M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
i.style = c;
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
i as star_icon
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-8755dd64.cjs");require("react");require("react-dom");const s=".sc-stop-icon-h{display:flex}",i=s,e=class{constructor(o){t.registerInstance(this,o),this.width="15",this.height="15"}render(){return t.h("svg",{key:"f70cc744dde889a32cc0339cf4be41ae38237d0b",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"f7bd4f78d4e2efc797932d91aac355e0f9d4f309",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};e.style=i;exports.stop_icon=e;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as s, h as t } from "./index-600718a1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const e = ".sc-stop-icon-h{display:flex}", i = e, c = class {
|
|
5
|
+
constructor(o) {
|
|
6
|
+
s(this, o), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "f70cc744dde889a32cc0339cf4be41ae38237d0b", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "f7bd4f78d4e2efc797932d91aac355e0f9d4f309", d: "M4 4H20V20H4V4Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
c.style = i;
|
|
13
|
+
export {
|
|
14
|
+
c as stop_icon
|
|
15
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as s, c as l,
|
|
1
|
+
import { r as s, c as l, t as r, h as a } from "./index-600718a1.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const i = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}', n = i, o = class {
|
|
@@ -28,7 +28,7 @@ const i = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--n
|
|
|
28
28
|
this.required && !e ? this.error = `${this.label} is required.` : e.length > this.maxLength ? this.error = `${this.label} cannot exceed ${this.maxLength} characters.` : this.error = "";
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return a("label", { key: "
|
|
31
|
+
return a("label", { key: "503a9e472a4dea351f13d8e430a0ee9ecc20e3fb", part: "tc__label", class: { error: !!this.error } }, a("p", { key: "7ce9a57c8e2dc9d0c3a88edf93ba09a3b49cf149" }, a("span", { key: "8feedbb7300d0eb20192b17a0482f9c981bba120", class: "label" }, this.label), this.required && a("span", { class: "required" }, "*"), this.tooltip && a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, this.tooltip))), a("textarea", { key: "79dd6889c5da4797b26504731583db5887c21bcb", name: this.name, placeholder: this.placeholder, readOnly: this.readOnly, autoFocus: this.autoFocus, value: this.value, maxLength: this.maxLength, onInput: (e) => this.handleInput(e), class: { error: !!this.error }, part: "tc__textarea" }), this.error && a("span", { class: "error help-text" }, this.error));
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
o.style = n;
|
package/dist/{textarea-component.entry-683c2959.cjs → textarea-component.entry-f7a089d4.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8755dd64.cjs");require("react");require("react-dom");const s=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}',l=s,r=class{constructor(a){e.registerInstance(this,a),this.nylasFormInputChanged=e.createEvent(this,"nylasFormInputChanged",7),this.name="textarea",this.defaultValue=void 0,this.label="",this.placeholder="",this.required=!1,this.readOnly=!1,this.autoFocus=!1,this.maxLength=255,this.type="multi_line_text",this.tooltip="",this.value="",this.error=""}componentDidLoad(){this.value=e.sanitize(this.defaultValue||"")}handleBookingFormSubmitted(a){this.validate(this.value),this.error&&a.preventDefault()}handletriggerValidation(a){this.validate(this.value),this.error&&a.preventDefault()}handleInput(a){const t=a.target;this.value=e.sanitize(t.value),this.nylasFormInputChanged.emit({value:this.value,name:this.name,error:this.error,label:this.label,type:this.type})}validate(a){this.required&&!a?this.error=`${this.label} is required.`:a.length>this.maxLength?this.error=`${this.label} cannot exceed ${this.maxLength} characters.`:this.error=""}render(){return e.h("label",{key:"503a9e472a4dea351f13d8e430a0ee9ecc20e3fb",part:"tc__label",class:{error:!!this.error}},e.h("p",{key:"7ce9a57c8e2dc9d0c3a88edf93ba09a3b49cf149"},e.h("span",{key:"8feedbb7300d0eb20192b17a0482f9c981bba120",class:"label"},this.label),this.required&&e.h("span",{class:"required"},"*"),this.tooltip&&e.h("tooltip-component",null,e.h("info-icon",{slot:"tooltip-icon"}),e.h("span",{slot:"tooltip-content"},this.tooltip))),e.h("textarea",{key:"79dd6889c5da4797b26504731583db5887c21bcb",name:this.name,placeholder:this.placeholder,readOnly:this.readOnly,autoFocus:this.autoFocus,value:this.value,maxLength:this.maxLength,onInput:a=>this.handleInput(a),class:{error:!!this.error},part:"tc__textarea"}),this.error&&e.h("span",{class:"error help-text"},this.error))}};r.style=l;exports.textarea_component=r;
|
package/dist/{time-period-selector.entry-8cfdf750.cjs → time-period-selector.entry-9151a673.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-8755dd64.cjs");require("react");require("react-dom");const s=".time-period-selector.sc-time-period-selector{display:grid;gap:0.5rem;grid-template-columns:auto 1fr}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector,.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{width:116px}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{width:84px;display:flex;align-items:center}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){width:100%}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown){width:inherit;height:100%}.time-period-selector.sc-time-period-selector input-dropdown#time-number.sc-time-period-selector::part(id_dropdown-input){border:none;border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-input){padding:17px;gap:1rem}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-content){width:100%;max-height:200px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown){width:inherit}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem;justify-content:space-between}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}",n=s,p={hours:"hour",days:"day",weeks:"week",months:"month"},d=class{constructor(r){i.registerInstance(this,r),this.timePeriodChanged=i.createEvent(this,"timePeriodChanged",7),this.timePeriods=["hour","day","week","month"],this.defaultSelectedPeriod=void 0,this.defaultSelectedNumber=void 0,this.selectedPeriod=this.defaultSelectedPeriod,this.selectedNumber=this.defaultSelectedNumber,this.numberOptions=this.calculateOptions(this.defaultSelectedPeriod||"hour").map(e=>({label:e.toString(),value:e.toString()})),this.timePeriodOptions=this.timePeriods.map(e=>({label:e,value:e}))}componentDidLoad(){this.selectedNumber=this.defaultSelectedNumber,this.selectedPeriod=this.defaultSelectedPeriod;const r=p[this.selectedPeriod]??this.selectedPeriod,e=this.calculateOptions(r);this.numberOptions=e.map(t=>({label:t.toString(),value:t.toString()}))}calculateOptions(r){switch(r){case"hour":return Array.from({length:23},(e,t)=>t+1);case"minute":return Array.from({length:13},(e,t)=>t*5);case"day":return Array.from({length:30},(e,t)=>t+1);case"week":return Array.from({length:4},(e,t)=>t+1);case"month":return Array.from({length:12},(e,t)=>t+1);default:return[]}}inputOptionChangedHandler(r){i.debug("time-period-selector","inputOptionChangedHandler",r.detail);const{value:e,name:t}=r.detail;t==="time-number"&&(this.selectedNumber=e?parseInt(e):this.defaultSelectedNumber);const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}nylasFormDropdownChangedHandler(r){i.debug("time-period-selector","nylasFormDropdownChangedHandler",r.detail);const{value:e,name:t}=r.detail;t==="time-period"?(this.selectedPeriod=e,this.updateNumberOptionsAndSelectedNumber(e)):t==="time-number"&&(this.selectedNumber=parseInt(e));const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}updateNumberOptionsAndSelectedNumber(r){const e=this.calculateOptions(r);this.numberOptions=e.map(t=>({label:t.toString(),value:t.toString()})),this.selectedNumber=parseInt(this.numberOptions[0].value)}render(){return i.h("div",{key:"7202ca7c6b64a08199ec356eb409b247b865683b",class:"time-period-selector"},typeof this.selectedNumber=="number"&&i.h("input-dropdown",{id:"time-number",name:"time-number",inputValue:this.selectedNumber.toString(),exportparts:"id_dropdown: tps__number-dropdown, id_dropdown-input: tps__number-dropdown-button, id_dropdown-content: tps__number-dropdown-content",options:this.numberOptions,defaultInputOption:this.numberOptions.find(r=>r.value==this.selectedNumber.toString())}),typeof this.selectedPeriod=="string"&&i.h("select-dropdown",{id:"time-period",name:"time-period",options:this.timePeriodOptions,exportparts:"sd_dropdown: tps__period-dropdown, sd_dropdown-button: tps__period-dropdown-button, sd_dropdown-content: tps__period-dropdown-content",pluralizedLabel:this.selectedNumber>1?"s":"",defaultSelectedOption:this.timePeriodOptions.find(r=>r.value==this.selectedPeriod),withSearch:!1}))}get host(){return i.getElement(this)}};d.style=n;exports.time_period_selector=d;
|