@nylas/react 1.1.0-canary.12 → 1.1.0-canary.13
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-26980c9f.cjs +1 -0
- package/dist/add-circle-icon_22.entry-a63de90d.js +1895 -0
- package/dist/{archive-icon_7.entry-e892a458.js → archive-icon_7.entry-561a5deb.js} +13 -13
- package/dist/{archive-icon_7.entry-59d9e24f.cjs → archive-icon_7.entry-97628ff8.cjs} +1 -1
- package/dist/{arrow-icon.entry-834b8066.cjs → arrow-icon.entry-68a3ba5b.cjs} +1 -1
- package/dist/arrow-icon.entry-c9b46bbc.js +15 -0
- package/dist/{bold-icon_3.entry-0f038db3.js → bold-icon_3.entry-e5a6fea9.js} +4 -4
- package/dist/{bold-icon_3.entry-eb0fcdaa.cjs → bold-icon_3.entry-f8473940.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-27a6f628.cjs → calendar-cancel-icon.entry-1fd6b27a.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-96156441.js → calendar-cancel-icon.entry-4bc3ceb1.js} +2 -2
- package/dist/{calendar-check-icon_2.entry-b6d6d220.cjs → calendar-check-icon_2.entry-3f734e43.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-c7c13e3e.js → calendar-check-icon_2.entry-a7033bf7.js} +11 -11
- package/dist/{calendar-icon.entry-e7f6a9a8.cjs → calendar-icon.entry-2943ea63.cjs} +1 -1
- package/dist/{calendar-icon.entry-f088fb14.js → calendar-icon.entry-2f963a7d.js} +4 -4
- package/dist/{chevron-icon_3.entry-8c6e6f74.cjs → chevron-icon_3.entry-ac1be504.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-90a3e89c.js → chevron-icon_3.entry-d10c854b.js} +5 -5
- package/dist/clock-icon_2.entry-7c576457.cjs +1 -0
- package/dist/clock-icon_2.entry-c8b0693e.js +25 -0
- package/dist/close-icon.entry-5cc5ae00.cjs +1 -0
- package/dist/close-icon.entry-e01b32cc.js +15 -0
- package/dist/{constants-f34b9c6e-593e21cc.cjs → constants-f34b9c6e-0e1cb070.cjs} +1 -1
- package/dist/{constants-f34b9c6e-91f6ad05.js → constants-f34b9c6e-ada541f4.js} +1 -1
- package/dist/{document-refresh-icon.entry-ca98d879.js → document-refresh-icon.entry-a18e5222.js} +5 -5
- package/dist/document-refresh-icon.entry-b0927573.cjs +1 -0
- package/dist/elements/index.d.ts +4 -1
- package/dist/{elements-dc5b338e-60f95088.cjs → elements-dc5b338e-272b5dff.cjs} +1 -1
- package/dist/{elements-dc5b338e-68eab1e5.js → elements-dc5b338e-d6cbe948.js} +1 -1
- package/dist/{focus-visible-e8093c16-a0869441.cjs → focus-visible-e8093c16-6991ac1b.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-b5d785fc.js → focus-visible-e8093c16-d239362e.js} +1 -1
- package/dist/{forward-icon_6.entry-84ac76ac.js → forward-icon_6.entry-230c7ab2.js} +9 -9
- package/dist/{forward-icon_6.entry-4b321b9a.cjs → forward-icon_6.entry-ee238c52.cjs} +3 -3
- package/dist/{globe-icon.entry-ef04c8bf.cjs → globe-icon.entry-539f0052.cjs} +1 -1
- package/dist/{globe-icon.entry-14a60f32.js → globe-icon.entry-e8c272c0.js} +2 -2
- package/dist/{google-logo-icon_4.entry-4fa3cb8e.js → google-logo-icon_4.entry-0c46cddd.js} +103 -93
- package/dist/google-logo-icon_4.entry-a5add4b4.cjs +1 -0
- package/dist/index-53420959-71fdd6ef.js +5 -0
- package/dist/index-53420959-f15601a9.cjs +1 -0
- package/dist/index-553c0327.cjs +42 -0
- package/dist/index-cd0e2d77.js +4977 -0
- package/dist/index-ef01c714-839c3029.cjs +41 -0
- package/dist/index-ef01c714-d85134a4.js +4971 -0
- package/dist/{index.es-9190f785-60475c4c.cjs → index.es-74f70f7d-1d137fdb.cjs} +5 -5
- package/dist/{index.es-9190f785-69269065.js → index.es-74f70f7d-960f947f.js} +11 -12
- package/dist/{info-icon_2.entry-fb099090.cjs → info-icon_2.entry-00ea6504.cjs} +1 -1
- package/dist/{info-icon_2.entry-45f6f01f.js → info-icon_2.entry-42f77d4b.js} +5 -5
- package/dist/{loading-icon.entry-67c8b1fa.js → loading-icon.entry-0692e093.js} +4 -4
- package/dist/{loading-icon.entry-eaabff41.cjs → loading-icon.entry-fb7464c3.cjs} +1 -1
- package/dist/{mailbox-store-29139d89-dd9d3d1b.cjs → mailbox-store-050a2914-9c975586.cjs} +1 -1
- package/dist/{mailbox-store-29139d89-e3513416.js → mailbox-store-050a2914-cfb1b1c0.js} +2 -2
- package/dist/{nylas-additional-participants.entry-a1fb4ef4.js → nylas-additional-participants.entry-1d7bda06.js} +12 -12
- package/dist/{nylas-additional-participants.entry-6413fc87.cjs → nylas-additional-participants.entry-d97b8bb4.cjs} +1 -1
- package/dist/{nylas-booked-event-card_10.entry-e435ff63.js → nylas-booked-event-card_10.entry-041a10c7.js} +255 -252
- package/dist/nylas-booked-event-card_10.entry-dfec7c8d.cjs +1 -0
- package/dist/{nylas-custom-booking-flow.entry-3e690bb7.cjs → nylas-custom-booking-flow.entry-3ec838df.cjs} +1 -1
- package/dist/{nylas-custom-booking-flow.entry-56075ecd.js → nylas-custom-booking-flow.entry-ced72cc5.js} +3 -3
- package/dist/nylas-form-card.entry-8d594514.cjs +1 -0
- package/dist/nylas-form-card.entry-9b8176ad.js +57 -0
- package/dist/{nylas-if-state.entry-1e4b0a58.cjs → nylas-if-state.entry-445ec109.cjs} +1 -1
- package/dist/{nylas-if-state.entry-3d22bca7.js → nylas-if-state.entry-eb11630d.js} +3 -3
- package/dist/{nylas-list-folders.entry-3da37b1c.cjs → nylas-list-folders.entry-32a1e254.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-e634780d.js → nylas-list-folders.entry-822436d4.js} +3 -3
- package/dist/{nylas-list-threads.entry-26dbb8ff.js → nylas-list-threads.entry-0186e9e7.js} +4 -4
- package/dist/{nylas-list-threads.entry-ef4743af.cjs → nylas-list-threads.entry-181872dd.cjs} +1 -1
- package/dist/{nylas-login.entry-a76e4aae.cjs → nylas-login.entry-0261e74e.cjs} +1 -1
- package/dist/{nylas-login.entry-ff7d9db5.js → nylas-login.entry-7460c1d4.js} +3 -3
- package/dist/{nylas-mailbox-pagination.entry-fcb3cc47.js → nylas-mailbox-pagination.entry-107b3fbc.js} +2 -2
- package/dist/{nylas-mailbox-pagination.entry-565ee29b.cjs → nylas-mailbox-pagination.entry-eaf08163.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-3a94b1e9.cjs → nylas-mailbox-toolbar-button.entry-23fc08a6.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-ae13c538.js → nylas-mailbox-toolbar-button.entry-40e8d9ad.js} +8 -8
- package/dist/{nylas-mailbox.entry-6d86abe9.js → nylas-mailbox.entry-2199a6b4.js} +9 -10
- package/dist/nylas-mailbox.entry-de8618eb.cjs +1 -0
- package/dist/nylas-provider.entry-11a95d86.cjs +1 -0
- package/dist/{nylas-provider.entry-01e0944e.js → nylas-provider.entry-a8f8bad2.js} +9 -10
- package/dist/nylas-scheduler-editor.entry-73794266.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-8f62880a.js → nylas-scheduler-editor.entry-c58c813c.js} +28 -14
- package/dist/nylas-scheduling.entry-b449ab24.cjs +1 -0
- package/dist/{nylas-scheduling.entry-f15b3106.js → nylas-scheduling.entry-fe9d6b69.js} +91 -68
- package/dist/{nylas-threads-refresh.entry-d62d0574.cjs → nylas-threads-refresh.entry-4f17fa6c.cjs} +1 -1
- package/dist/{nylas-threads-refresh.entry-d7727ccb.js → nylas-threads-refresh.entry-c8438752.js} +4 -4
- package/dist/{nylas-threads-search.entry-eec50b1b.cjs → nylas-threads-search.entry-0ed36372.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-4803d20b.js → nylas-threads-search.entry-b1f88916.js} +4 -4
- package/dist/{nylas-view-thread.entry-2b85f8e2.js → nylas-view-thread.entry-8dfe1352.js} +3 -3
- package/dist/{nylas-view-thread.entry-5da789da.cjs → nylas-view-thread.entry-c50bea78.cjs} +1 -1
- package/dist/{people-icon.entry-b6426fe6.cjs → people-icon.entry-0875cac0.cjs} +1 -1
- package/dist/{people-icon.entry-63f63064.js → people-icon.entry-8392a21c.js} +6 -6
- package/dist/{play-icon_2.entry-a3262db3.js → play-icon_2.entry-4a15f215.js} +8 -8
- package/dist/play-icon_2.entry-d6ff1cc3.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-1ebb9376.cjs} +1 -1
- package/dist/{refresh-icon.entry-64679ef7.js → refresh-icon.entry-76b2d888.js} +4 -4
- package/dist/{register-component-83e24412-51af5293.js → register-component-e4dc8778-408dc241.js} +1 -1
- package/dist/{register-component-83e24412-d76a2962.cjs → register-component-e4dc8778-99eb91ca.cjs} +1 -1
- package/dist/{scheduler-config-store-ec3b6190-2710b76a.cjs → scheduler-config-store-ec3b6190-4abd56df.cjs} +1 -1
- package/dist/{scheduler-config-store-ec3b6190-df09ddc0.js → scheduler-config-store-ec3b6190-f292fe19.js} +1 -1
- package/dist/scheduler-store-3afbcda0-166e84ff.cjs +1 -0
- package/dist/{scheduler-store-dabdbc4f-6f6096d6.js → scheduler-store-3afbcda0-53680387.js} +130 -89
- package/dist/time-period-selector.entry-846b64bd.cjs +1 -0
- package/dist/{time-period-selector.entry-8e6954f5.js → time-period-selector.entry-f6128367.js} +3 -3
- package/dist/{translate-icon.entry-57dedacf.js → translate-icon.entry-84778350.js} +6 -6
- package/dist/{translate-icon.entry-49a653f0.cjs → translate-icon.entry-f3060124.cjs} +1 -1
- package/dist/warning-icon.entry-246eb6fb.cjs +1 -0
- package/dist/warning-icon.entry-eeaae1a7.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-cd0e2d77.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,49 +193,53 @@ 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 a = e ? e == null ? void 0 : e.primaryParticipant : t == null ? void 0 : t.primaryParticipant,
|
|
186
|
-
additional_fields:
|
|
207
|
+
const a = 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) || [], d = e ? { ...e == null ? void 0 : e.additionalFields, guests: h } : { ...t == null ? void 0 : t.additionalFields, guests: h }, _ = this.getHeaders(), m = `/v3/scheduling/bookings${this.configId ? `?configuration_id=${this.configId}` : ""}`, l = await this.makeAPIRequest(decodeURIComponent(m), "POST", JSON.stringify({
|
|
208
|
+
additional_fields: d,
|
|
187
209
|
guest: { ...a },
|
|
188
|
-
start_time:
|
|
189
|
-
end_time:
|
|
190
|
-
timezone:
|
|
191
|
-
}),
|
|
210
|
+
start_time: r.start_time.getTime() / 1e3,
|
|
211
|
+
end_time: r.end_time.getTime() / 1e3,
|
|
212
|
+
timezone: n
|
|
213
|
+
}), _);
|
|
192
214
|
if ("error" in l) {
|
|
193
215
|
this.schedulerStore.set("isLoading", !1);
|
|
194
|
-
const
|
|
195
|
-
let
|
|
196
|
-
|
|
216
|
+
const c = (u = l.error) == null ? void 0 : u.type;
|
|
217
|
+
let S = l.error;
|
|
218
|
+
if (c && c in this.errors.api("Create Booking")) {
|
|
219
|
+
const I = this.getErrorMessage(S);
|
|
220
|
+
S = this.errors.api("Create Booking")[c](I);
|
|
221
|
+
}
|
|
222
|
+
return { error: S };
|
|
197
223
|
}
|
|
198
224
|
return "data" in l && this.schedulerStore.set("eventInfo", l == null ? void 0 : l.data), this.schedulerStore.set("isLoading", !1), l;
|
|
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
|
|
232
|
+
const n = (r = t.error) == null ? void 0 : r.type;
|
|
207
233
|
let a = t.error;
|
|
208
|
-
return
|
|
234
|
+
return n && n in this.errors.api("Get UI Settings") && (a = this.errors.api("Get UI Settings")[n]((a == null ? void 0 : a.message) || (a == null ? void 0 : a.title) || "Something went wrong")), { error: a };
|
|
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 _, f, m;
|
|
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
245
|
const l = new Date(t.getFullYear(), t.getMonth(), 1);
|
|
@@ -224,78 +250,90 @@ class B {
|
|
|
224
250
|
i = Math.floor(l.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(), a = `/v3/scheduling/availability${n ? `?${n}` : ""}`, h = this.getHeaders(), d = await this.makeAPIRequest(decodeURIComponent(a), "GET", void 0, h);
|
|
254
|
+
if ("error" in d) {
|
|
229
255
|
this.schedulerStore.set("availability", []), this.schedulerStore.set("isLoading", !1);
|
|
230
|
-
const l = (
|
|
231
|
-
let
|
|
232
|
-
|
|
256
|
+
const l = (_ = d.error) == null ? void 0 : _.type;
|
|
257
|
+
let u = d.error;
|
|
258
|
+
if (l && l in this.errors.api("Get Availability")) {
|
|
259
|
+
const c = this.getErrorMessage(u);
|
|
260
|
+
u = this.errors.api("Get Availability")[l](c);
|
|
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 d) {
|
|
265
|
+
const u = (((m = (f = d.data) == null ? void 0 : f.time_slots) == null ? void 0 : m.map((c) => ({
|
|
266
|
+
...c,
|
|
267
|
+
start_time: new Date(c.start_time * 1e3),
|
|
268
|
+
end_time: new Date(c.end_time * 1e3)
|
|
269
|
+
}))) || []).filter((c) => c.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), d;
|
|
243
273
|
}
|
|
244
274
|
async cancelBooking(e) {
|
|
245
|
-
var
|
|
275
|
+
var n;
|
|
246
276
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
247
277
|
return { error: this.errors.component("Cancel Booking").no_booking_id() };
|
|
248
|
-
const i = this.configId ? `?configuration_id=${this.configId}` : "", s = `/v3/scheduling/bookings/${e}${i}`, t = this.getHeaders(),
|
|
278
|
+
const i = this.configId ? `?configuration_id=${this.configId}` : "", s = `/v3/scheduling/bookings/${e}${i}`, t = this.getHeaders(), r = await this.makeAPIRequest(decodeURIComponent(s), "DELETE", JSON.stringify({
|
|
249
279
|
action: "cancel"
|
|
250
280
|
}), t);
|
|
251
|
-
if ("error" in
|
|
281
|
+
if ("error" in r) {
|
|
252
282
|
this.schedulerStore.set("isLoading", !1);
|
|
253
|
-
const a = (
|
|
254
|
-
let
|
|
255
|
-
|
|
283
|
+
const a = (n = r.error) == null ? void 0 : n.type;
|
|
284
|
+
let h = r.error;
|
|
285
|
+
if (a && a in this.errors.api("Cancel Booking")) {
|
|
286
|
+
const d = this.getErrorMessage(h);
|
|
287
|
+
h = this.errors.api("Cancel Booking")[a](d);
|
|
288
|
+
}
|
|
289
|
+
return { error: h };
|
|
256
290
|
}
|
|
257
291
|
return this.schedulerStore.set("cancelledEventInfo", {
|
|
258
292
|
booking_id: e
|
|
259
|
-
}), this.schedulerStore.set("isLoading", !1),
|
|
293
|
+
}), this.schedulerStore.set("isLoading", !1), r;
|
|
260
294
|
}
|
|
261
295
|
async rescheduleBooking(e, i) {
|
|
262
|
-
var
|
|
296
|
+
var k;
|
|
263
297
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
264
298
|
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 (!
|
|
299
|
+
const s = this.errors.api("Reschedule Booking"), t = this.errors.component("Reschedule Booking"), { bookingInfo: r, selectedTimeslot: n, selectedTimezone: a } = this.schedulerStore.state, { startTime: h, endTime: d, timezone: _ } = i, f = h || (n == null ? void 0 : n.start_time);
|
|
300
|
+
if (!f)
|
|
267
301
|
return { error: t.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
268
|
-
const
|
|
269
|
-
if (!
|
|
302
|
+
const m = d || (n == null ? void 0 : n.end_time);
|
|
303
|
+
if (!m)
|
|
270
304
|
return { error: t.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
271
|
-
const l =
|
|
305
|
+
const l = _ || a;
|
|
272
306
|
if (!l)
|
|
273
307
|
return { error: t.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
|
|
274
|
-
const
|
|
275
|
-
start_time:
|
|
276
|
-
end_time:
|
|
308
|
+
const u = i ? i == null ? void 0 : i.primaryParticipant : r == null ? void 0 : r.primaryParticipant, c = i ? (i == null ? void 0 : i.guests) || [] : (r == null ? void 0 : r.guests) || [], S = i ? { ...i == null ? void 0 : i.additionalFields, guests: c } : { ...r == null ? void 0 : r.additionalFields, guests: c }, I = this.configId ? `?configuration_id=${this.configId}` : "", A = `/v3/scheduling/bookings/${e}${I}`, D = this.getHeaders(), g = await this.makeAPIRequest(decodeURIComponent(A), "PATCH", JSON.stringify({
|
|
309
|
+
start_time: f.getTime() / 1e3,
|
|
310
|
+
end_time: m.getTime() / 1e3,
|
|
277
311
|
time_zone: l,
|
|
278
|
-
additional_fields:
|
|
279
|
-
guest: { ...
|
|
280
|
-
}),
|
|
281
|
-
if ("error" in
|
|
312
|
+
additional_fields: S,
|
|
313
|
+
guest: { ...u }
|
|
314
|
+
}), D);
|
|
315
|
+
if ("error" in g) {
|
|
282
316
|
this.schedulerStore.set("isLoading", !1);
|
|
283
|
-
const
|
|
284
|
-
let
|
|
285
|
-
|
|
317
|
+
const p = (k = g.error) == null ? void 0 : k.type;
|
|
318
|
+
let w = g.error;
|
|
319
|
+
if (p && p in s) {
|
|
320
|
+
const z = this.getErrorMessage(w);
|
|
321
|
+
w = s[p](z);
|
|
322
|
+
}
|
|
323
|
+
return { error: w };
|
|
286
324
|
}
|
|
287
|
-
const
|
|
288
|
-
if ("data" in
|
|
289
|
-
this.schedulerStore.set("eventInfo",
|
|
290
|
-
else if (
|
|
291
|
-
this.schedulerStore.set("eventInfo",
|
|
325
|
+
const b = this.schedulerStore.get("reschedulingEventInfo");
|
|
326
|
+
if ("data" in g)
|
|
327
|
+
this.schedulerStore.set("eventInfo", g == null ? void 0 : g.data);
|
|
328
|
+
else if (b)
|
|
329
|
+
this.schedulerStore.set("eventInfo", b);
|
|
292
330
|
else {
|
|
293
|
-
const
|
|
331
|
+
const p = {
|
|
294
332
|
booking_id: e
|
|
295
333
|
};
|
|
296
|
-
this.schedulerStore.set("eventInfo",
|
|
334
|
+
this.schedulerStore.set("eventInfo", p);
|
|
297
335
|
}
|
|
298
|
-
return this.schedulerStore.set("isLoading", !1),
|
|
336
|
+
return this.schedulerStore.set("isLoading", !1), g;
|
|
299
337
|
}
|
|
300
338
|
}
|
|
301
339
|
function C(o = {}) {
|
|
@@ -307,6 +345,7 @@ function C(o = {}) {
|
|
|
307
345
|
showBookingForm: !1,
|
|
308
346
|
selectableDates: null,
|
|
309
347
|
availability: [],
|
|
348
|
+
eventDuration: 0,
|
|
310
349
|
state: "ready",
|
|
311
350
|
eventInfo: null,
|
|
312
351
|
cancelledEventInfo: null,
|
|
@@ -314,12 +353,14 @@ function C(o = {}) {
|
|
|
314
353
|
nylasBranding: !0,
|
|
315
354
|
...o
|
|
316
355
|
};
|
|
317
|
-
|
|
356
|
+
v("[defaultNylasStoreState]: ", e);
|
|
318
357
|
const i = L(e);
|
|
319
358
|
return i.onChange("availability", (s) => {
|
|
320
|
-
|
|
321
|
-
const t = s.
|
|
322
|
-
|
|
359
|
+
v("[availability]: ", s);
|
|
360
|
+
const t = s[0], r = Math.floor((t.end_time.getTime() - t.start_time.getTime()) / 6e4);
|
|
361
|
+
v("[durationMinutes]: ", r), i.set("eventDuration", r);
|
|
362
|
+
const n = s.map((a) => a.start_time);
|
|
363
|
+
v("[selectableDates]: ", n), i.set("selectableDates", n);
|
|
323
364
|
}), i.reset = () => {
|
|
324
365
|
for (const s in e) {
|
|
325
366
|
const t = e[s];
|
|
@@ -330,5 +371,5 @@ function C(o = {}) {
|
|
|
330
371
|
export {
|
|
331
372
|
C,
|
|
332
373
|
y as E,
|
|
333
|
-
|
|
374
|
+
M as N
|
|
334
375
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-553c0327.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-f6128367.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-cd0e2d77.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-cd0e2d77.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-553c0327.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-553c0327.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-cd0e2d77.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.13",
|
|
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.13",
|
|
26
26
|
"@nylas/core": "^1.1.0-canary.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|