@nylas/react 1.1.0-canary.12 → 1.1.0-canary.14
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_22.entry-ab0d5ede.js +1895 -0
- package/dist/add-circle-icon_22.entry-c165f0de.cjs +1 -0
- package/dist/{archive-icon_7.entry-e892a458.js → archive-icon_7.entry-0dfc9782.js} +13 -13
- package/dist/{archive-icon_7.entry-59d9e24f.cjs → archive-icon_7.entry-60311199.cjs} +1 -1
- package/dist/{arrow-icon.entry-834b8066.cjs → arrow-icon.entry-eb53c4cb.cjs} +1 -1
- package/dist/arrow-icon.entry-f38f3014.js +15 -0
- package/dist/{bold-icon_3.entry-0f038db3.js → bold-icon_3.entry-20e74265.js} +4 -4
- package/dist/{bold-icon_3.entry-eb0fcdaa.cjs → bold-icon_3.entry-d5100ffa.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-96156441.js → calendar-cancel-icon.entry-0bdee178.js} +2 -2
- package/dist/{calendar-cancel-icon.entry-27a6f628.cjs → calendar-cancel-icon.entry-e5d1bc0a.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-b6d6d220.cjs → calendar-check-icon_2.entry-10af2017.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-c7c13e3e.js → calendar-check-icon_2.entry-f18a2ddb.js} +11 -11
- package/dist/{calendar-icon.entry-f088fb14.js → calendar-icon.entry-12ca0ae4.js} +4 -4
- package/dist/{calendar-icon.entry-e7f6a9a8.cjs → calendar-icon.entry-bc6f0808.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-90a3e89c.js → chevron-icon_3.entry-55eb864f.js} +5 -5
- package/dist/{chevron-icon_3.entry-8c6e6f74.cjs → chevron-icon_3.entry-a18c373d.cjs} +1 -1
- package/dist/clock-icon_2.entry-7cddf901.cjs +1 -0
- package/dist/clock-icon_2.entry-ffc9e057.js +25 -0
- package/dist/close-icon.entry-7c67181c.js +15 -0
- package/dist/close-icon.entry-918dd254.cjs +1 -0
- package/dist/{constants-f34b9c6e-593e21cc.cjs → constants-f34b9c6e-108993e8.cjs} +1 -1
- package/dist/{constants-f34b9c6e-91f6ad05.js → constants-f34b9c6e-37cabe82.js} +1 -1
- package/dist/document-refresh-icon.entry-d1f6259a.cjs +1 -0
- package/dist/{document-refresh-icon.entry-ca98d879.js → document-refresh-icon.entry-e4636c8e.js} +5 -5
- package/dist/elements/index.d.ts +4 -1
- package/dist/{elements-dc5b338e-60f95088.cjs → elements-dc5b338e-a37a0510.cjs} +1 -1
- package/dist/{elements-dc5b338e-68eab1e5.js → elements-dc5b338e-c6f2806c.js} +1 -1
- package/dist/{focus-visible-e8093c16-b5d785fc.js → focus-visible-e8093c16-b0821d89.js} +1 -1
- package/dist/{focus-visible-e8093c16-a0869441.cjs → focus-visible-e8093c16-b62197ad.cjs} +1 -1
- package/dist/{forward-icon_6.entry-84ac76ac.js → forward-icon_6.entry-2a694e7c.js} +9 -9
- package/dist/{forward-icon_6.entry-4b321b9a.cjs → forward-icon_6.entry-b81b22f6.cjs} +3 -3
- package/dist/{globe-icon.entry-ef04c8bf.cjs → globe-icon.entry-c037589b.cjs} +1 -1
- package/dist/{globe-icon.entry-14a60f32.js → globe-icon.entry-e794eb52.js} +2 -2
- package/dist/google-logo-icon_4.entry-748af8c3.cjs +1 -0
- package/dist/{google-logo-icon_4.entry-4fa3cb8e.js → google-logo-icon_4.entry-b4464873.js} +103 -93
- package/dist/index-53420959-31867ccf.js +5 -0
- package/dist/index-53420959-535906ce.cjs +1 -0
- package/dist/index-6a4ee4f8.cjs +42 -0
- package/dist/index-d61429c6.js +4977 -0
- package/dist/index-ef01c714-1e2feefc.js +4971 -0
- package/dist/index-ef01c714-54e17405.cjs +41 -0
- package/dist/{index.es-9190f785-60475c4c.cjs → index.es-74f70f7d-a22eba35.cjs} +5 -5
- package/dist/{index.es-9190f785-69269065.js → index.es-74f70f7d-da0e7fcf.js} +11 -12
- package/dist/{info-icon_2.entry-fb099090.cjs → info-icon_2.entry-23e3fa8a.cjs} +1 -1
- package/dist/{info-icon_2.entry-45f6f01f.js → info-icon_2.entry-647915bb.js} +5 -5
- package/dist/{loading-icon.entry-67c8b1fa.js → loading-icon.entry-1ddd0244.js} +4 -4
- package/dist/{loading-icon.entry-eaabff41.cjs → loading-icon.entry-98d65a5d.cjs} +1 -1
- package/dist/{mailbox-store-29139d89-e3513416.js → mailbox-store-050a2914-6fef25fb.js} +2 -2
- package/dist/{mailbox-store-29139d89-dd9d3d1b.cjs → mailbox-store-050a2914-bd0a86bb.cjs} +1 -1
- package/dist/{nylas-additional-participants.entry-a1fb4ef4.js → nylas-additional-participants.entry-0f93e24e.js} +12 -12
- package/dist/{nylas-additional-participants.entry-6413fc87.cjs → nylas-additional-participants.entry-3c598863.cjs} +1 -1
- package/dist/nylas-booked-event-card_10.entry-912e4a89.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-e435ff63.js → nylas-booked-event-card_10.entry-9f7869af.js} +255 -252
- package/dist/{nylas-custom-booking-flow.entry-56075ecd.js → nylas-custom-booking-flow.entry-69638c50.js} +3 -3
- package/dist/{nylas-custom-booking-flow.entry-3e690bb7.cjs → nylas-custom-booking-flow.entry-877cac85.cjs} +1 -1
- package/dist/nylas-form-card.entry-4349d07d.cjs +1 -0
- package/dist/nylas-form-card.entry-b2da5266.js +57 -0
- package/dist/{nylas-if-state.entry-3d22bca7.js → nylas-if-state.entry-62474acb.js} +3 -3
- package/dist/{nylas-if-state.entry-1e4b0a58.cjs → nylas-if-state.entry-9eade180.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-e634780d.js → nylas-list-folders.entry-348a784b.js} +3 -3
- package/dist/{nylas-list-folders.entry-3da37b1c.cjs → nylas-list-folders.entry-b32ec92a.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-ef4743af.cjs → nylas-list-threads.entry-7e8044b2.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-26dbb8ff.js → nylas-list-threads.entry-ec1c5fb6.js} +4 -4
- package/dist/{nylas-login.entry-a76e4aae.cjs → nylas-login.entry-0495d0b5.cjs} +1 -1
- package/dist/{nylas-login.entry-ff7d9db5.js → nylas-login.entry-f6f1e306.js} +3 -3
- package/dist/{nylas-mailbox-pagination.entry-565ee29b.cjs → nylas-mailbox-pagination.entry-22385ead.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-fcb3cc47.js → nylas-mailbox-pagination.entry-24c82c53.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-ae13c538.js → nylas-mailbox-toolbar-button.entry-b13b2a58.js} +8 -8
- package/dist/{nylas-mailbox-toolbar-button.entry-3a94b1e9.cjs → nylas-mailbox-toolbar-button.entry-e8e52474.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-6d86abe9.js → nylas-mailbox.entry-0365fbb0.js} +9 -10
- package/dist/nylas-mailbox.entry-77f4c37e.cjs +1 -0
- package/dist/{nylas-provider.entry-01e0944e.js → nylas-provider.entry-11239372.js} +9 -10
- package/dist/nylas-provider.entry-d454a4d1.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-16473950.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-8f62880a.js → nylas-scheduler-editor.entry-c4d38853.js} +28 -14
- package/dist/nylas-scheduling.entry-5b156a28.cjs +1 -0
- package/dist/{nylas-scheduling.entry-f15b3106.js → nylas-scheduling.entry-cc2535a9.js} +91 -68
- package/dist/{nylas-threads-refresh.entry-d7727ccb.js → nylas-threads-refresh.entry-5a6378fe.js} +4 -4
- package/dist/{nylas-threads-refresh.entry-d62d0574.cjs → nylas-threads-refresh.entry-725ef87d.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-4803d20b.js → nylas-threads-search.entry-5e7b6a03.js} +4 -4
- package/dist/{nylas-threads-search.entry-eec50b1b.cjs → nylas-threads-search.entry-a2553cbe.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-2b85f8e2.js → nylas-view-thread.entry-249f0b65.js} +3 -3
- package/dist/{nylas-view-thread.entry-5da789da.cjs → nylas-view-thread.entry-98f8e35b.cjs} +1 -1
- package/dist/{people-icon.entry-b6426fe6.cjs → people-icon.entry-0ab4b752.cjs} +1 -1
- package/dist/{people-icon.entry-63f63064.js → people-icon.entry-0ed95db0.js} +6 -6
- package/dist/{play-icon_2.entry-a3262db3.js → play-icon_2.entry-433a8722.js} +8 -8
- package/dist/play-icon_2.entry-f9c0b647.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +87 -84
- package/dist/{refresh-icon.entry-542f680c.cjs → refresh-icon.entry-508a246d.cjs} +1 -1
- package/dist/{refresh-icon.entry-64679ef7.js → refresh-icon.entry-b5bee0f4.js} +4 -4
- package/dist/{register-component-83e24412-51af5293.js → register-component-e4dc8778-53fe0729.js} +1 -1
- package/dist/{register-component-83e24412-d76a2962.cjs → register-component-e4dc8778-7812a275.cjs} +1 -1
- package/dist/{scheduler-config-store-ec3b6190-df09ddc0.js → scheduler-config-store-ec3b6190-01892765.js} +1 -1
- package/dist/{scheduler-config-store-ec3b6190-2710b76a.cjs → scheduler-config-store-ec3b6190-435c84ca.cjs} +1 -1
- package/dist/scheduler-store-04e15f8a-5d06eaf3.cjs +1 -0
- package/dist/{scheduler-store-dabdbc4f-6f6096d6.js → scheduler-store-04e15f8a-69eb8d7a.js} +135 -93
- package/dist/time-period-selector.entry-77a6debf.cjs +1 -0
- package/dist/{time-period-selector.entry-8e6954f5.js → time-period-selector.entry-a29c8ffa.js} +3 -3
- package/dist/{translate-icon.entry-57dedacf.js → translate-icon.entry-c34bad94.js} +6 -6
- package/dist/{translate-icon.entry-49a653f0.cjs → translate-icon.entry-f77cfd3d.cjs} +1 -1
- package/dist/warning-icon.entry-f73b31bf.cjs +1 -0
- package/dist/warning-icon.entry-f781a623.js +15 -0
- package/package.json +2 -2
- package/dist/add-circle-icon_21.entry-172d31c3.js +0 -6726
- package/dist/add-circle-icon_21.entry-71af48f1.cjs +0 -41
- package/dist/arrow-icon.entry-060b9b4f.js +0 -15
- package/dist/close-icon.entry-175b9674.cjs +0 -1
- package/dist/close-icon.entry-e694948f.js +0 -15
- package/dist/document-refresh-icon.entry-a54c74b9.cjs +0 -1
- package/dist/global-37eeb0cd-6c5934cf.cjs +0 -1
- package/dist/global-37eeb0cd-b42e0abc.js +0 -4
- package/dist/google-logo-icon_4.entry-ffeec491.cjs +0 -1
- package/dist/index-3a004ec1.cjs +0 -37
- package/dist/index-4c7e8f2f.js +0 -4045
- package/dist/index-92989ac4-69175657.js +0 -902
- package/dist/index-92989ac4-6f32ff2a.cjs +0 -6
- package/dist/nylas-booked-event-card_10.entry-ce660783.cjs +0 -1
- package/dist/nylas-form-card.entry-33ff95e1.js +0 -54
- package/dist/nylas-form-card.entry-64d7be4d.cjs +0 -1
- package/dist/nylas-mailbox.entry-8f41c35a.cjs +0 -1
- package/dist/nylas-provider.entry-65f0f8da.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-7dc20e4d.cjs +0 -2
- package/dist/nylas-scheduling.entry-1b6628a3.cjs +0 -1
- package/dist/play-icon_2.entry-2b8094d7.cjs +0 -1
- package/dist/scheduler-store-dabdbc4f-404dc261.cjs +0 -1
- package/dist/time-period-selector.entry-c5faae46.cjs +0 -1
- package/dist/warning-icon.entry-a7977526.js +0 -15
- package/dist/warning-icon.entry-bce861bd.cjs +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { d as
|
|
1
|
+
import { d as v, e as L } from "./index-d61429c6.js";
|
|
2
2
|
var y;
|
|
3
3
|
(function(o) {
|
|
4
4
|
o.Component = "component", o.Api = "api", o.Auth = "auth";
|
|
5
5
|
})(y || (y = {}));
|
|
6
|
-
var
|
|
6
|
+
var P;
|
|
7
7
|
(function(o) {
|
|
8
8
|
o.endtime_not_in_future = "endtime_not_in_future", o.no_booking_info = "no_booking_info", o.no_timeslot_selected = "no_timeslot_selected", o.no_timezone_selected = "no_timezone_selected", o.no_booking_id = "no_booking_id", o.invalid_start_time = "invalid_start_time", o.invalid_end_time = "invalid_end_time", o.invalid_timezone = "invalid_timezone";
|
|
9
|
-
})(
|
|
10
|
-
var
|
|
9
|
+
})(P || (P = {}));
|
|
10
|
+
var T;
|
|
11
11
|
(function(o) {
|
|
12
|
-
o.invalid_session = "invalid_session", o.general_error = "general_error", o.internal_error = "internal_error", o.invalid_request_error = "invalid_request_error", o.timeslot_not_available = "timeslot_not_available";
|
|
13
|
-
})(
|
|
14
|
-
class
|
|
12
|
+
o.invalid_session = "invalid_session", o.general_error = "general_error", o.internal_error = "internal_error", o.invalid_request_error = "invalid_request_error", o.timeslot_not_available = "timeslot_not_available", o.provider_error = "provider_error", o.not_found_error = "not_found_error";
|
|
13
|
+
})(T || (T = {}));
|
|
14
|
+
class R {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.component = (e) => {
|
|
17
|
-
const i = y.Component, s = `${e}
|
|
17
|
+
const i = y.Component, s = `${e} Error`;
|
|
18
18
|
return {
|
|
19
19
|
endtime_not_in_future: (t = '"endtime" can not be in the future') => ({
|
|
20
20
|
title: s,
|
|
@@ -58,7 +58,7 @@ class D {
|
|
|
58
58
|
})
|
|
59
59
|
};
|
|
60
60
|
}, this.api = (e) => {
|
|
61
|
-
const i = y.Api, s = `${e}
|
|
61
|
+
const i = y.Api, s = `${e} Error`;
|
|
62
62
|
return {
|
|
63
63
|
invalid_session: (t) => ({
|
|
64
64
|
title: s,
|
|
@@ -84,14 +84,24 @@ class D {
|
|
|
84
84
|
title: s,
|
|
85
85
|
message: t,
|
|
86
86
|
category: i
|
|
87
|
+
}),
|
|
88
|
+
provider_error: (t) => ({
|
|
89
|
+
title: s,
|
|
90
|
+
message: t,
|
|
91
|
+
category: i
|
|
92
|
+
}),
|
|
93
|
+
not_found_error: (t) => ({
|
|
94
|
+
title: s,
|
|
95
|
+
message: t,
|
|
96
|
+
category: i
|
|
87
97
|
})
|
|
88
98
|
};
|
|
89
99
|
};
|
|
90
100
|
}
|
|
91
101
|
}
|
|
92
|
-
class
|
|
102
|
+
class M {
|
|
93
103
|
constructor({ schedulerAPIURL: e, schedulerStore: i, sessionId: s, configId: t }) {
|
|
94
|
-
this.errors = new
|
|
104
|
+
this.errors = new R(), this.schedulerStore = i, this.schedulerAPIURL = e, this.sessionId = s, this.configId = t;
|
|
95
105
|
}
|
|
96
106
|
getHeaders() {
|
|
97
107
|
return this.configId ? {} : {
|
|
@@ -100,8 +110,8 @@ class B {
|
|
|
100
110
|
}
|
|
101
111
|
async makeAPIRequest(e, i, s, t = {}) {
|
|
102
112
|
try {
|
|
103
|
-
const
|
|
104
|
-
return
|
|
113
|
+
const r = new URL(this.schedulerAPIURL);
|
|
114
|
+
return r.pathname = e, await (await fetch(decodeURIComponent(r.toString()), {
|
|
105
115
|
method: i,
|
|
106
116
|
headers: {
|
|
107
117
|
"Content-Type": "application/json",
|
|
@@ -110,16 +120,24 @@ class B {
|
|
|
110
120
|
},
|
|
111
121
|
body: s
|
|
112
122
|
})).json();
|
|
113
|
-
} catch (
|
|
123
|
+
} catch (r) {
|
|
114
124
|
return {
|
|
115
125
|
error: {
|
|
116
|
-
message:
|
|
126
|
+
message: r.message,
|
|
117
127
|
title: "API request failed",
|
|
118
128
|
type: "api"
|
|
119
129
|
}
|
|
120
130
|
};
|
|
121
131
|
}
|
|
122
132
|
}
|
|
133
|
+
getErrorMessage(e) {
|
|
134
|
+
var s, t, r, n;
|
|
135
|
+
let i = (e == null ? void 0 : e.message) || (e == null ? void 0 : e.title) || "Something went wrong";
|
|
136
|
+
return (e == null ? void 0 : e.type) === "provider_error" && (i = ((t = (s = e == null ? void 0 : e.provider_error) == null ? void 0 : s.error) == null ? void 0 : t.message) || ((n = (r = e == null ? void 0 : e.provider_error) == null ? void 0 : r.error) == null ? void 0 : n.title) || "Something went wrong"), i;
|
|
137
|
+
}
|
|
138
|
+
setConfigId(e) {
|
|
139
|
+
this.configId = e;
|
|
140
|
+
}
|
|
123
141
|
selectDate(e) {
|
|
124
142
|
this.schedulerStore.set("selectedDate", e), this.schedulerStore.set("selectedTimeslot", null);
|
|
125
143
|
}
|
|
@@ -129,8 +147,8 @@ class B {
|
|
|
129
147
|
selectTimezone(e) {
|
|
130
148
|
this.schedulerStore.set("selectedTimezone", e);
|
|
131
149
|
}
|
|
132
|
-
toggleAdditionalData(e) {
|
|
133
|
-
this.schedulerStore.set("showBookingForm", e);
|
|
150
|
+
async toggleAdditionalData(e) {
|
|
151
|
+
e || await this.refetchAvailability(), this.schedulerStore.set("showBookingForm", e);
|
|
134
152
|
}
|
|
135
153
|
setParticipantName(e) {
|
|
136
154
|
const { bookingInfo: i } = this.schedulerStore.state;
|
|
@@ -152,10 +170,14 @@ class B {
|
|
|
152
170
|
}
|
|
153
171
|
});
|
|
154
172
|
}
|
|
173
|
+
async refetchAvailability() {
|
|
174
|
+
const e = /* @__PURE__ */ new Date(), i = new Date(e.getFullYear(), e.getMonth(), 1).getTime() / 1e3, s = new Date(e.getFullYear(), e.getMonth() + 1, 1).getTime() / 1e3;
|
|
175
|
+
return await this.getAvailability(i, s);
|
|
176
|
+
}
|
|
155
177
|
async resetStoreStateAndFetchAvailability() {
|
|
156
|
-
const e = /* @__PURE__ */ new Date(), i =
|
|
157
|
-
let
|
|
158
|
-
return
|
|
178
|
+
const e = /* @__PURE__ */ new Date(), i = await this.refetchAvailability(), s = this.schedulerStore.get("availability").find((r) => new Date(r.start_time) > /* @__PURE__ */ new Date());
|
|
179
|
+
let t = e;
|
|
180
|
+
return s && (t = s.start_time), this.schedulerStore.set("selectedDate", t), this.schedulerStore.set("eventInfo", null), this.schedulerStore.set("showBookingForm", !1), this.schedulerStore.set("selectedTimeslot", null), i;
|
|
159
181
|
}
|
|
160
182
|
async setReschedule(e) {
|
|
161
183
|
const i = this.schedulerStore.state.eventInfo;
|
|
@@ -171,129 +193,146 @@ class B {
|
|
|
171
193
|
return this.schedulerStore.set("cancelBookingId", ""), this.schedulerStore.set("cancelledEventInfo", null), e;
|
|
172
194
|
}
|
|
173
195
|
async bookTimeslot(e) {
|
|
174
|
-
var
|
|
196
|
+
var u;
|
|
175
197
|
this.schedulerStore.set("isLoading", !0);
|
|
176
198
|
const { selectedTimeslot: i, selectedTimezone: s, bookingInfo: t } = this.schedulerStore.state;
|
|
177
199
|
if (!e && !t)
|
|
178
200
|
return { error: this.errors.component("Booking").no_booking_info() };
|
|
179
|
-
const
|
|
180
|
-
if (!n)
|
|
181
|
-
return { error: this.errors.component("Create Booking").no_timeslot_selected() };
|
|
182
|
-
const r = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : s;
|
|
201
|
+
const r = (e == null ? void 0 : e.timeslot) || i;
|
|
183
202
|
if (!r)
|
|
203
|
+
return { error: this.errors.component("Create Booking").no_timeslot_selected() };
|
|
204
|
+
const n = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : s;
|
|
205
|
+
if (!n)
|
|
184
206
|
return { error: this.errors.component("Create Booking").no_timezone_selected() };
|
|
185
|
-
const
|
|
186
|
-
additional_fields:
|
|
187
|
-
guest: { ...
|
|
188
|
-
start_time:
|
|
189
|
-
end_time:
|
|
190
|
-
timezone:
|
|
191
|
-
}),
|
|
192
|
-
if ("error" in
|
|
207
|
+
const l = e ? e == null ? void 0 : e.primaryParticipant : t == null ? void 0 : t.primaryParticipant, h = e ? (e == null ? void 0 : e.guests) || [] : (t == null ? void 0 : t.guests) || [], c = e ? { ...e == null ? void 0 : e.additionalFields, guests: h } : { ...t == null ? void 0 : t.additionalFields, guests: h }, g = this.getHeaders(), _ = `/v3/scheduling/bookings${this.configId ? `?configuration_id=${this.configId}` : ""}`, a = await this.makeAPIRequest(decodeURIComponent(_), "POST", JSON.stringify({
|
|
208
|
+
additional_fields: c,
|
|
209
|
+
guest: { ...l },
|
|
210
|
+
start_time: r.start_time.getTime() / 1e3,
|
|
211
|
+
end_time: r.end_time.getTime() / 1e3,
|
|
212
|
+
timezone: n
|
|
213
|
+
}), g);
|
|
214
|
+
if ("error" in a) {
|
|
193
215
|
this.schedulerStore.set("isLoading", !1);
|
|
194
|
-
const
|
|
195
|
-
let
|
|
196
|
-
|
|
216
|
+
const d = (u = a.error) == null ? void 0 : u.type;
|
|
217
|
+
let S = a.error;
|
|
218
|
+
if (d && d in this.errors.api("Create Booking")) {
|
|
219
|
+
const I = this.getErrorMessage(S);
|
|
220
|
+
S = this.errors.api("Create Booking")[d](I);
|
|
221
|
+
}
|
|
222
|
+
return { error: S };
|
|
197
223
|
}
|
|
198
|
-
return "data" in
|
|
224
|
+
return "data" in a && this.schedulerStore.set("eventInfo", a == null ? void 0 : a.data), this.schedulerStore.set("isLoading", !1), a;
|
|
199
225
|
}
|
|
200
226
|
async getUISettings() {
|
|
201
|
-
var
|
|
227
|
+
var r;
|
|
202
228
|
this.schedulerStore.set("isLoading", !0);
|
|
203
229
|
const e = this.getHeaders(), s = `/v3/scheduling/ui-settings${this.configId ? `?configuration_id=${this.configId}` : ""}`, t = await this.makeAPIRequest(s, "GET", void 0, e);
|
|
204
230
|
if ("error" in t) {
|
|
205
231
|
this.schedulerStore.set("isLoading", !1);
|
|
206
|
-
const
|
|
207
|
-
let
|
|
208
|
-
return
|
|
232
|
+
const n = (r = t.error) == null ? void 0 : r.type;
|
|
233
|
+
let l = t.error;
|
|
234
|
+
return n && n in this.errors.api("Get UI Settings") && (l = this.errors.api("Get UI Settings")[n]((l == null ? void 0 : l.message) || (l == null ? void 0 : l.title) || "Something went wrong")), { error: l };
|
|
209
235
|
}
|
|
210
236
|
return "data" in t && this.schedulerStore.set("configSettings", t.data), this.schedulerStore.set("isLoading", !1), t;
|
|
211
237
|
}
|
|
212
238
|
async getAvailability(e = 0, i = 0) {
|
|
213
|
-
var
|
|
239
|
+
var g, f, _;
|
|
214
240
|
this.schedulerStore.set("isLoading", !0);
|
|
215
|
-
const s = new URLSearchParams(), t = /* @__PURE__ */ new Date(),
|
|
216
|
-
if (i && i <
|
|
241
|
+
const s = new URLSearchParams(), t = /* @__PURE__ */ new Date(), r = t.getTime();
|
|
242
|
+
if (i && i < r / 1e3)
|
|
217
243
|
return this.schedulerStore.set("isLoading", !1), { error: this.errors.component("Get Availability").endtime_not_in_future() };
|
|
218
244
|
if (!e) {
|
|
219
|
-
const
|
|
220
|
-
e = Math.floor(
|
|
245
|
+
const a = new Date(t.getFullYear(), t.getMonth(), 1);
|
|
246
|
+
e = Math.floor(a.getTime() / 1e3);
|
|
221
247
|
}
|
|
222
248
|
if (!i) {
|
|
223
|
-
const
|
|
224
|
-
i = Math.floor(
|
|
249
|
+
const a = new Date(t.getFullYear(), t.getMonth() + 1, 0);
|
|
250
|
+
i = Math.floor(a.getTime() / 1e3);
|
|
225
251
|
}
|
|
226
252
|
s.append("start_time", encodeURIComponent(e.toString())), s.append("end_time", encodeURIComponent(i.toString())), this.configId && s.append("configuration_id", encodeURIComponent(this.configId));
|
|
227
|
-
const
|
|
228
|
-
if ("error" in
|
|
253
|
+
const n = s.toString(), l = `/v3/scheduling/availability${n ? `?${n}` : ""}`, h = this.getHeaders(), c = await this.makeAPIRequest(decodeURIComponent(l), "GET", void 0, h);
|
|
254
|
+
if ("error" in c) {
|
|
229
255
|
this.schedulerStore.set("availability", []), this.schedulerStore.set("isLoading", !1);
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
|
|
256
|
+
const a = (g = c.error) == null ? void 0 : g.type;
|
|
257
|
+
let u = c.error;
|
|
258
|
+
if (a && a in this.errors.api("Get Availability")) {
|
|
259
|
+
const d = this.getErrorMessage(u);
|
|
260
|
+
u = this.errors.api("Get Availability")[a](d);
|
|
261
|
+
}
|
|
262
|
+
return { error: u };
|
|
233
263
|
}
|
|
234
|
-
if ("data" in
|
|
235
|
-
const
|
|
236
|
-
...
|
|
237
|
-
start_time: new Date(
|
|
238
|
-
end_time: new Date(
|
|
239
|
-
}))) || []).filter((
|
|
240
|
-
this.schedulerStore.set("availability",
|
|
264
|
+
if ("data" in c) {
|
|
265
|
+
const u = (((_ = (f = c.data) == null ? void 0 : f.time_slots) == null ? void 0 : _.map((d) => ({
|
|
266
|
+
...d,
|
|
267
|
+
start_time: new Date(d.start_time * 1e3),
|
|
268
|
+
end_time: new Date(d.end_time * 1e3)
|
|
269
|
+
}))) || []).filter((d) => d.start_time.getTime() > r);
|
|
270
|
+
this.schedulerStore.set("availability", u);
|
|
241
271
|
}
|
|
242
|
-
return this.schedulerStore.set("isLoading", !1),
|
|
272
|
+
return this.schedulerStore.set("isLoading", !1), c;
|
|
243
273
|
}
|
|
244
|
-
async cancelBooking(e) {
|
|
245
|
-
var
|
|
274
|
+
async cancelBooking(e, i) {
|
|
275
|
+
var l;
|
|
246
276
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
247
277
|
return { error: this.errors.component("Cancel Booking").no_booking_id() };
|
|
248
|
-
const
|
|
249
|
-
action: "cancel"
|
|
250
|
-
|
|
278
|
+
const s = this.configId ? `?configuration_id=${this.configId}` : "", t = `/v3/scheduling/bookings/${e}${s}`, r = this.getHeaders(), n = await this.makeAPIRequest(decodeURIComponent(t), "DELETE", JSON.stringify({
|
|
279
|
+
action: "cancel",
|
|
280
|
+
cancellation_reason: i
|
|
281
|
+
}), r);
|
|
251
282
|
if ("error" in n) {
|
|
252
283
|
this.schedulerStore.set("isLoading", !1);
|
|
253
|
-
const
|
|
284
|
+
const h = (l = n.error) == null ? void 0 : l.type;
|
|
254
285
|
let c = n.error;
|
|
255
|
-
|
|
286
|
+
if (h && h in this.errors.api("Cancel Booking")) {
|
|
287
|
+
const g = this.getErrorMessage(c);
|
|
288
|
+
c = this.errors.api("Cancel Booking")[h](g);
|
|
289
|
+
}
|
|
290
|
+
return { error: c };
|
|
256
291
|
}
|
|
257
292
|
return this.schedulerStore.set("cancelledEventInfo", {
|
|
258
293
|
booking_id: e
|
|
259
294
|
}), this.schedulerStore.set("isLoading", !1), n;
|
|
260
295
|
}
|
|
261
296
|
async rescheduleBooking(e, i) {
|
|
262
|
-
var
|
|
297
|
+
var k;
|
|
263
298
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
264
299
|
return { error: this.errors.component("Reschedule Booking").no_booking_id() };
|
|
265
|
-
const s = this.errors.api("Reschedule Booking"), t = this.errors.component("Reschedule Booking"), { bookingInfo:
|
|
266
|
-
if (!
|
|
300
|
+
const s = this.errors.api("Reschedule Booking"), t = this.errors.component("Reschedule Booking"), { bookingInfo: r, selectedTimeslot: n, selectedTimezone: l } = this.schedulerStore.state, { startTime: h, endTime: c, timezone: g } = i, f = h || (n == null ? void 0 : n.start_time);
|
|
301
|
+
if (!f)
|
|
267
302
|
return { error: t.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
268
|
-
const _ =
|
|
303
|
+
const _ = c || (n == null ? void 0 : n.end_time);
|
|
269
304
|
if (!_)
|
|
270
305
|
return { error: t.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
271
|
-
const
|
|
272
|
-
if (!
|
|
306
|
+
const a = g || l;
|
|
307
|
+
if (!a)
|
|
273
308
|
return { error: t.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
|
|
274
|
-
const
|
|
275
|
-
start_time:
|
|
309
|
+
const u = i ? i == null ? void 0 : i.primaryParticipant : r == null ? void 0 : r.primaryParticipant, d = i ? (i == null ? void 0 : i.guests) || [] : (r == null ? void 0 : r.guests) || [], S = i ? { ...i == null ? void 0 : i.additionalFields, guests: d } : { ...r == null ? void 0 : r.additionalFields, guests: d }, I = this.configId ? `?configuration_id=${this.configId}` : "", A = `/v3/scheduling/bookings/${e}${I}`, D = this.getHeaders(), m = await this.makeAPIRequest(decodeURIComponent(A), "PATCH", JSON.stringify({
|
|
310
|
+
start_time: f.getTime() / 1e3,
|
|
276
311
|
end_time: _.getTime() / 1e3,
|
|
277
|
-
time_zone:
|
|
278
|
-
additional_fields:
|
|
279
|
-
guest: { ...
|
|
280
|
-
}),
|
|
312
|
+
time_zone: a,
|
|
313
|
+
additional_fields: S,
|
|
314
|
+
guest: { ...u }
|
|
315
|
+
}), D);
|
|
281
316
|
if ("error" in m) {
|
|
282
317
|
this.schedulerStore.set("isLoading", !1);
|
|
283
|
-
const
|
|
284
|
-
let
|
|
285
|
-
|
|
318
|
+
const p = (k = m.error) == null ? void 0 : k.type;
|
|
319
|
+
let w = m.error;
|
|
320
|
+
if (p && p in s) {
|
|
321
|
+
const z = this.getErrorMessage(w);
|
|
322
|
+
w = s[p](z);
|
|
323
|
+
}
|
|
324
|
+
return { error: w };
|
|
286
325
|
}
|
|
287
|
-
const
|
|
326
|
+
const b = this.schedulerStore.get("reschedulingEventInfo");
|
|
288
327
|
if ("data" in m)
|
|
289
328
|
this.schedulerStore.set("eventInfo", m == null ? void 0 : m.data);
|
|
290
|
-
else if (
|
|
291
|
-
this.schedulerStore.set("eventInfo",
|
|
329
|
+
else if (b)
|
|
330
|
+
this.schedulerStore.set("eventInfo", b);
|
|
292
331
|
else {
|
|
293
|
-
const
|
|
332
|
+
const p = {
|
|
294
333
|
booking_id: e
|
|
295
334
|
};
|
|
296
|
-
this.schedulerStore.set("eventInfo",
|
|
335
|
+
this.schedulerStore.set("eventInfo", p);
|
|
297
336
|
}
|
|
298
337
|
return this.schedulerStore.set("isLoading", !1), m;
|
|
299
338
|
}
|
|
@@ -307,6 +346,7 @@ function C(o = {}) {
|
|
|
307
346
|
showBookingForm: !1,
|
|
308
347
|
selectableDates: null,
|
|
309
348
|
availability: [],
|
|
349
|
+
eventDuration: 0,
|
|
310
350
|
state: "ready",
|
|
311
351
|
eventInfo: null,
|
|
312
352
|
cancelledEventInfo: null,
|
|
@@ -314,12 +354,14 @@ function C(o = {}) {
|
|
|
314
354
|
nylasBranding: !0,
|
|
315
355
|
...o
|
|
316
356
|
};
|
|
317
|
-
|
|
357
|
+
v("[defaultNylasStoreState]: ", e);
|
|
318
358
|
const i = L(e);
|
|
319
359
|
return i.onChange("availability", (s) => {
|
|
320
|
-
|
|
321
|
-
const t = s.
|
|
322
|
-
|
|
360
|
+
v("[availability]: ", s);
|
|
361
|
+
const t = s[0], r = Math.floor((t.end_time.getTime() - t.start_time.getTime()) / 6e4);
|
|
362
|
+
v("[durationMinutes]: ", r), i.set("eventDuration", r);
|
|
363
|
+
const n = s.map((l) => l.start_time);
|
|
364
|
+
v("[selectableDates]: ", n), i.set("selectableDates", n);
|
|
323
365
|
}), i.reset = () => {
|
|
324
366
|
for (const s in e) {
|
|
325
367
|
const t = e[s];
|
|
@@ -330,5 +372,5 @@ function C(o = {}) {
|
|
|
330
372
|
export {
|
|
331
373
|
C,
|
|
332
374
|
y as E,
|
|
333
|
-
|
|
375
|
+
M as N
|
|
334
376
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-6a4ee4f8.cjs");require("react");require("react-dom");const s=".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-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#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}",n=s,i=class{constructor(e){d.registerInstance(this,e),this.timePeriodChanged=d.createEvent(this,"timePeriodChanged",7),this.timePeriods=["hour","day","week","month"],this.defaultSelectedPeriod="hour",this.defaultSelectedNumber=1,this.selectedPeriod=this.defaultSelectedPeriod,this.selectedNumber=this.defaultSelectedNumber,this.numberOptions=this.calculateOptions("hour").map(t=>({label:t.toString(),value:t.toString()})),this.timePeriodOptions=this.timePeriods.map(t=>({label:t,value:t}))}defaultSelectedPeriodChangedHandler(e){this.selectedPeriod=e,this.updateNumberOptionsAndSelectedNumber(e)}defaultSelectedNumberChangedHandler(e){this.selectedNumber=e}timePeriodsChangedHandler(e){this.timePeriodOptions=e.map(t=>({label:t,value:t}))}calculateOptions(e){switch(e){case"hour":return Array.from({length:23},(t,r)=>r+1);case"minute":return Array.from({length:13},(t,r)=>r*5);case"day":return Array.from({length:30},(t,r)=>r+1);case"week":return Array.from({length:4},(t,r)=>r+1);case"month":return Array.from({length:12},(t,r)=>r+1);default:return[]}}selectedOptionChangedHandler(e){d.debug("time-period-selector","selectedOptionChangedHandler",e.detail);const{value:t,name:r}=e.detail;r==="time-period"?(this.selectedPeriod=t,this.updateNumberOptionsAndSelectedNumber(t)):r==="time-number"&&(this.selectedNumber=parseInt(t));const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}updateNumberOptionsAndSelectedNumber(e){const t=this.calculateOptions(e);this.numberOptions=t.map(r=>({label:r.toString(),value:r.toString()})),this.selectedNumber=parseInt(this.numberOptions[0].value)}render(){return d.h("div",{key:"7edc10024c638d484dd2645c1afeff0bbe6c0762",class:"time-period-selector"},d.h("select-dropdown",{key:"de189ba330463c98b0a1b6131ef3607ce35f4680",id:"time-number",name:"time-number",exportparts:"sd__dropdown: tps__number-dropdown, sd__dropdown-button: tps__number-dropdown-button, sd__dropdown-content: tps__number-dropdown-content",options:this.numberOptions,defaultSelectedOption:this.numberOptions.find(e=>e.value==this.selectedNumber.toString())??this.numberOptions[0],withSearch:!1}),d.h("select-dropdown",{key:"707a1ab8d07469c3f38af8c8b9b129be7af833fc",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(e=>e.value==this.selectedPeriod)??this.timePeriodOptions[0],withSearch:!1}))}get host(){return d.getElement(this)}static get watchers(){return{defaultSelectedPeriod:["defaultSelectedPeriodChangedHandler"],defaultSelectedNumber:["defaultSelectedNumberChangedHandler"],timePeriods:["timePeriodsChangedHandler"]}}};i.style=n;exports.time_period_selector=i;
|
package/dist/{time-period-selector.entry-8e6954f5.js → time-period-selector.entry-a29c8ffa.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as i, c as s, d as n, h as d, g as l } from "./index-
|
|
1
|
+
import { r as i, c as s, d as n, h as d, g as l } from "./index-d61429c6.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const a = ".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-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#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}", c = a, p = class {
|
|
@@ -28,7 +28,7 @@ const a = ".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem
|
|
|
28
28
|
case "hour":
|
|
29
29
|
return Array.from({ length: 23 }, (t, r) => r + 1);
|
|
30
30
|
case "minute":
|
|
31
|
-
return Array.from({ length:
|
|
31
|
+
return Array.from({ length: 13 }, (t, r) => r * 5);
|
|
32
32
|
case "day":
|
|
33
33
|
return Array.from({ length: 30 }, (t, r) => r + 1);
|
|
34
34
|
case "week":
|
|
@@ -57,7 +57,7 @@ const a = ".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem
|
|
|
57
57
|
})), this.selectedNumber = parseInt(this.numberOptions[0].value);
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
return d("div", { key: "
|
|
60
|
+
return d("div", { key: "7edc10024c638d484dd2645c1afeff0bbe6c0762", class: "time-period-selector" }, d("select-dropdown", { key: "de189ba330463c98b0a1b6131ef3607ce35f4680", id: "time-number", name: "time-number", exportparts: "sd__dropdown: tps__number-dropdown, sd__dropdown-button: tps__number-dropdown-button, sd__dropdown-content: tps__number-dropdown-content", options: this.numberOptions, defaultSelectedOption: this.numberOptions.find((e) => e.value == this.selectedNumber.toString()) ?? this.numberOptions[0], withSearch: !1 }), d("select-dropdown", { key: "707a1ab8d07469c3f38af8c8b9b129be7af833fc", 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((e) => e.value == this.selectedPeriod) ?? this.timePeriodOptions[0], withSearch: !1 }));
|
|
61
61
|
}
|
|
62
62
|
get host() {
|
|
63
63
|
return l(this);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as s, h as C } from "./index-d61429c6.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
const
|
|
4
|
+
const e = ".sc-translate-icon-h{display:flex}", c = e, i = class {
|
|
5
5
|
constructor(t) {
|
|
6
|
-
|
|
6
|
+
s(this, t), this.width = "16", this.height = "16";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return C("svg", { key: "
|
|
9
|
+
return C("svg", { key: "d42f42f767a1f4cc2b449a9743cdf5272ac5a1e6", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 20 20", fill: "none" }, C("path", { key: "993c96c2069b894c5cbe039354f49b450839099b", fill: "currentColor", d: "M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
i.style = c;
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
i as translate_icon
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-6a4ee4f8.cjs");require("react");require("react-dom");const s=".sc-translate-icon-h{display:flex}",i=s,e=class{constructor(t){C.registerInstance(this,t),this.width="16",this.height="16"}render(){return C.h("svg",{key:"d42f42f767a1f4cc2b449a9743cdf5272ac5a1e6",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 20 20",fill:"none"},C.h("path",{key:"993c96c2069b894c5cbe039354f49b450839099b",fill:"currentColor",d:"M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z"}))}};e.style=i;exports.translate_icon=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-6a4ee4f8.cjs");require("react");require("react-dom");const n=".sc-warning-icon-h{display:flex}",r=n,t=class{constructor(i){e.registerInstance(this,i),this.width="16",this.height="16"}render(){return e.h("svg",{key:"5efea10ef5c62bb2e34d25c1d8274ada7418ee9e",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"0d79a3af2ca6a4e574af41ba8b2f54fbf185e15e",d:"M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z",fill:"currentColor"}))}};t.style=r;exports.warning_icon=t;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as i, h as t } from "./index-d61429c6.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const n = ".sc-warning-icon-h{display:flex}", s = n, r = class {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
i(this, e), this.width = "16", this.height = "16";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "5efea10ef5c62bb2e34d25c1d8274ada7418ee9e", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "0d79a3af2ca6a4e574af41ba8b2f54fbf185e15e", d: "M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z", fill: "currentColor" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
r.style = s;
|
|
13
|
+
export {
|
|
14
|
+
r as warning_icon
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylas/react",
|
|
3
|
-
"version": "1.1.0-canary.
|
|
3
|
+
"version": "1.1.0-canary.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"react": "^18.2.0",
|
|
24
24
|
"react-dom": "^18.2.0",
|
|
25
|
-
"@nylas/web-elements": "^1.1.0-canary.
|
|
25
|
+
"@nylas/web-elements": "^1.1.0-canary.14",
|
|
26
26
|
"@nylas/core": "^1.1.0-canary.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|