@nylas/react 1.4.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/add-circle-icon_2.entry-8a1c55bc.cjs +1 -0
- package/dist/{add-circle-icon_2.entry-615fc101.js → add-circle-icon_2.entry-b4bbcfee.js} +3 -3
- package/dist/archive-icon.entry-a2492cf3.js +16 -0
- package/dist/archive-icon.entry-e48d2356.cjs +1 -0
- package/dist/{arrow-icon.entry-da152ec2.js → arrow-icon.entry-9414299f.js} +5 -5
- package/dist/arrow-icon.entry-b1ecb2aa.cjs +1 -0
- package/dist/{bold-icon.entry-61046c15.js → bold-icon.entry-b72aed9f.js} +4 -4
- package/dist/{bold-icon.entry-58679992.cjs → bold-icon.entry-c781e9c1.cjs} +1 -1
- package/dist/{button-component_2.entry-db53e00a.js → button-component_2.entry-36e49459.js} +9 -9
- package/dist/{button-component_2.entry-53bfdc19.cjs → button-component_2.entry-73f76545.cjs} +1 -1
- package/dist/calendar-agenda-fill-icon_36.entry-e9b92e0e.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_36.entry-76796ea7.js → calendar-agenda-fill-icon_36.entry-efa7ad26.js} +100 -100
- package/dist/{calendar-cancel-icon.entry-e5032d71.cjs → calendar-cancel-icon.entry-01c388eb.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-f3b8ae99.js → calendar-cancel-icon.entry-0f739a8a.js} +4 -4
- package/dist/{calendar-check-icon_2.entry-7303362a.cjs → calendar-check-icon_2.entry-5febbadf.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-27dc91f7.js → calendar-check-icon_2.entry-dfb0036d.js} +3 -3
- package/dist/{calendar-icon.entry-4f432baf.cjs → calendar-icon.entry-9743e0b7.cjs} +1 -1
- package/dist/{calendar-icon.entry-48fc45d6.js → calendar-icon.entry-f197396d.js} +2 -2
- package/dist/{checkbox-component.entry-8fad4faf.cjs → checkbox-component.entry-1aa5782f.cjs} +1 -1
- package/dist/{checkbox-component.entry-a15ffc4c.js → checkbox-component.entry-72a6aa72.js} +4 -4
- package/dist/checkmark-icon_15.entry-35dd97b7.cjs +5 -0
- package/dist/{checkmark-icon_15.entry-9f926a70.js → checkmark-icon_15.entry-5c09cff5.js} +225 -223
- package/dist/{chevron-icon_3.entry-5130fbba.js → chevron-icon_3.entry-4a72f211.js} +6 -6
- package/dist/chevron-icon_3.entry-e0608b7c.cjs +1 -0
- package/dist/{clock-icon_4.entry-40a393c9.js → clock-icon_4.entry-0afe79c2.js} +8 -8
- package/dist/{clock-icon_4.entry-ac65deae.cjs → clock-icon_4.entry-202ce025.cjs} +1 -1
- package/dist/constants-f51538ef-cd2a67c4.cjs +1 -0
- package/dist/{constants-3d8016e3-3c080f00.js → constants-f51538ef-e0a5f026.js} +27 -32
- package/dist/{customParseFormat-a4d9ea69-763f219e.cjs → customParseFormat-d1de5ed0-65a0bba3.cjs} +1 -1
- package/dist/{customParseFormat-a4d9ea69-7caebeb2.js → customParseFormat-d1de5ed0-c0ef002d.js} +1 -1
- package/dist/{delete-icon.entry-78e44eba.js → delete-icon.entry-580bfcc9.js} +4 -4
- package/dist/{delete-icon.entry-770dac8c.cjs → delete-icon.entry-762ac892.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-d331f844.cjs → document-refresh-icon.entry-4e0f0c61.cjs} +1 -1
- package/dist/document-refresh-icon.entry-e500b4e3.js +16 -0
- package/dist/elements/index.d.ts +0 -8
- package/dist/{feedbackSync-57bb471a-ee800a95.js → feedbackSync-172f942c-42124493.js} +1 -1
- package/dist/{feedbackSync-57bb471a-5afb7715.cjs → feedbackSync-172f942c-62f72bd2.cjs} +1 -1
- package/dist/{folder-icon.entry-163e0aee.cjs → folder-icon.entry-2694e253.cjs} +1 -1
- package/dist/{folder-icon.entry-42650400.js → folder-icon.entry-54c3cc66.js} +2 -2
- package/dist/{forward-icon.entry-d60b6e31.js → forward-icon.entry-5e540f05.js} +5 -5
- package/dist/{forward-icon.entry-0a499b38.cjs → forward-icon.entry-f07102d8.cjs} +1 -1
- package/dist/{globe-icon_2.entry-19359092.cjs → globe-icon_2.entry-14a4c168.cjs} +1 -1
- package/dist/{globe-icon_2.entry-5afa8049.js → globe-icon_2.entry-aaceb196.js} +90 -80
- package/dist/{google-logo-icon_6.entry-d2febb78.js → google-logo-icon_6.entry-00d40db2.js} +473 -439
- package/dist/google-logo-icon_6.entry-fa76ffe3.cjs +2 -0
- package/dist/{google-meet-icon_5.entry-4a94137f.cjs → google-meet-icon_5.entry-6c20e149.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-7b1b36f2.js → google-meet-icon_5.entry-f1f05903.js} +12 -12
- package/dist/inbox-icon.entry-9a4628f2.cjs +1 -0
- package/dist/inbox-icon.entry-aa78ba8c.js +16 -0
- package/dist/index-1e75512f.cjs +57 -0
- package/dist/{index-9243e481.js → index-e8380973.js} +5687 -4802
- package/dist/{index.es-13ff6710-0f748bd2.cjs → index.es-fc8588de-034ead51.cjs} +6 -6
- package/dist/{index.es-13ff6710-73fa05e6.js → index.es-fc8588de-c943eef6.js} +827 -1065
- package/dist/{info-icon_2.entry-ba869bab.js → info-icon_2.entry-b3b313ab.js} +3 -3
- package/dist/{info-icon_2.entry-6667923a.cjs → info-icon_2.entry-bbcefb9a.cjs} +1 -1
- package/dist/{input-component.entry-7396acf1.js → input-component.entry-401b9ba5.js} +9 -9
- package/dist/{input-component.entry-db84f917.cjs → input-component.entry-ec8e8e7c.cjs} +1 -1
- package/dist/input-dropdown_2.entry-8cb11601.cjs +1 -0
- package/dist/{input-dropdown_2.entry-20f2031b.js → input-dropdown_2.entry-c37f392c.js} +6 -6
- package/dist/italic-icon.entry-0e85d0d9.js +16 -0
- package/dist/italic-icon.entry-6675558a.cjs +1 -0
- package/dist/{multi-select-dropdown_2.entry-81740b34.js → multi-select-dropdown_2.entry-3eecf18a.js} +22 -16
- package/dist/{multi-select-dropdown_2.entry-8e07b42b.cjs → multi-select-dropdown_2.entry-e37c501d.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-e56c8e92.js → nylas-booked-event-card_12.entry-e7464ae7.js} +226 -224
- package/dist/nylas-booked-event-card_12.entry-fddc9ab8.cjs +1 -0
- package/dist/{nylas-event-calendar_3.entry-2504c7c0.js → nylas-event-calendar_3.entry-9abd46c2.js} +2360 -2238
- package/dist/nylas-event-calendar_3.entry-e6669bbf.cjs +11 -0
- package/dist/{nylas-form-card.entry-98903549.js → nylas-form-card.entry-a3186807.js} +3 -3
- package/dist/{nylas-form-card.entry-c406e3d3.cjs → nylas-form-card.entry-cbb00fba.cjs} +1 -1
- package/dist/nylas-scheduler-editor.entry-5c92901a.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-670cc0b8.js → nylas-scheduler-editor.entry-7b188a38.js} +83 -50
- package/dist/nylas-scheduling.entry-970240f6.cjs +1 -0
- package/dist/nylas-scheduling.entry-e9929b03.js +968 -0
- package/dist/{person-icon.entry-bdaa899b.cjs → person-icon.entry-8998fdb8.cjs} +1 -1
- package/dist/{person-icon.entry-3bca6e51.js → person-icon.entry-d2856f08.js} +4 -4
- package/dist/{play-icon.entry-ecc86e85.cjs → play-icon.entry-99eb969b.cjs} +1 -1
- package/dist/play-icon.entry-f949a80f.js +16 -0
- package/dist/{radio-button-group.entry-9851076c.js → radio-button-group.entry-bc3b12fd.js} +2 -2
- package/dist/{radio-button-group.entry-6965ad34.cjs → radio-button-group.entry-d66edd04.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +96 -104
- package/dist/{refresh-icon.entry-90d52ab3.cjs → refresh-icon.entry-99d1982d.cjs} +1 -1
- package/dist/{refresh-icon.entry-d776c4a7.js → refresh-icon.entry-d6df8b1c.js} +2 -2
- package/dist/{register-component-02a05665-2e992621.js → register-component-62d792d4-448b6a43.js} +1 -1
- package/dist/{register-component-02a05665-75652287.cjs → register-component-62d792d4-c6e7d129.cjs} +1 -1
- package/dist/{reply-all-icon.entry-24f7c0fe.js → reply-all-icon.entry-7ebf01a0.js} +2 -2
- package/dist/{reply-all-icon.entry-6e49eb03.cjs → reply-all-icon.entry-d7c44139.cjs} +1 -1
- package/dist/{reply-icon.entry-7fff25c9.cjs → reply-icon.entry-058c00e8.cjs} +1 -1
- package/dist/{reply-icon.entry-d5d26d65.js → reply-icon.entry-d1622d85.js} +5 -5
- package/dist/sent-icon.entry-6c604512.cjs +1 -0
- package/dist/sent-icon.entry-fe12bc2f.js +16 -0
- package/dist/spam-icon.entry-45e5292e.cjs +1 -0
- package/dist/spam-icon.entry-b97c7709.js +16 -0
- package/dist/{star-icon.entry-3c57a35c.cjs → star-icon.entry-4db13fdb.cjs} +1 -1
- package/dist/{star-icon.entry-c2e743a9.js → star-icon.entry-98b80645.js} +6 -6
- package/dist/{stop-icon.entry-0b9563d5.js → stop-icon.entry-0290fd30.js} +2 -2
- package/dist/{stop-icon.entry-cf4c4e63.cjs → stop-icon.entry-9d7b53fd.cjs} +1 -1
- package/dist/{textarea-component.entry-2eccc173.cjs → textarea-component.entry-9b474ab5.cjs} +1 -1
- package/dist/{textarea-component.entry-60e7a4d0.js → textarea-component.entry-a62c257b.js} +2 -2
- package/dist/{toggle-switch.entry-612744fd.cjs → toggle-switch.entry-5dbfcd48.cjs} +1 -1
- package/dist/{toggle-switch.entry-0a6b01e6.js → toggle-switch.entry-e423b793.js} +2 -2
- package/dist/{translate-icon.entry-ede5f77d.js → translate-icon.entry-60c55a2e.js} +4 -4
- package/dist/{translate-icon.entry-8adc4146.cjs → translate-icon.entry-f82fa6fc.cjs} +1 -1
- package/dist/trash-fill-icon.entry-095caae3.cjs +1 -0
- package/dist/trash-fill-icon.entry-825055fd.js +16 -0
- package/dist/{underline-icon.entry-d2fe2da6.cjs → underline-icon.entry-0807a43d.cjs} +1 -1
- package/dist/{underline-icon.entry-b2b43ba2.js → underline-icon.entry-40028bc6.js} +2 -2
- package/dist/{warning-icon.entry-0a5c7337.js → warning-icon.entry-24e37759.js} +2 -2
- package/dist/{warning-icon.entry-85822f4d.cjs → warning-icon.entry-fce7c14f.cjs} +1 -1
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-e616ece6.cjs +0 -1
- package/dist/archive-icon.entry-41938a61.cjs +0 -1
- package/dist/archive-icon.entry-bd81d2d9.js +0 -16
- package/dist/arrow-icon.entry-4103be57.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_36.entry-917e4a9d.cjs +0 -6
- package/dist/checkmark-icon_15.entry-08c8b107.cjs +0 -5
- package/dist/chevron-icon_3.entry-2f75c3c4.cjs +0 -1
- package/dist/constants-3d8016e3-fd6c3848.cjs +0 -1
- package/dist/document-refresh-icon.entry-f6dfe744.js +0 -16
- package/dist/google-logo-icon_6.entry-896a10a5.cjs +0 -2
- package/dist/inbox-icon.entry-24ec450f.cjs +0 -1
- package/dist/inbox-icon.entry-b71acde0.js +0 -16
- package/dist/index-efb6db79.cjs +0 -57
- package/dist/input-dropdown_2.entry-0c219620.cjs +0 -1
- package/dist/italic-icon.entry-a9324a8a.cjs +0 -1
- package/dist/italic-icon.entry-c42f8112.js +0 -16
- package/dist/notebook-store-b61693cd-5657061b.js +0 -14
- package/dist/notebook-store-b61693cd-6515d345.cjs +0 -5
- package/dist/nylas-booked-event-card_12.entry-7c7afae5.cjs +0 -1
- package/dist/nylas-call-summary.entry-4bf7284f.cjs +0 -1
- package/dist/nylas-call-summary.entry-ad6fb46a.js +0 -16
- package/dist/nylas-event-calendar_3.entry-f747f6a8.cjs +0 -6
- package/dist/nylas-if-state.entry-6b071705.cjs +0 -1
- package/dist/nylas-if-state.entry-7468854a.js +0 -95
- package/dist/nylas-key-points.entry-7af8da1a.cjs +0 -1
- package/dist/nylas-key-points.entry-c186445e.js +0 -29
- package/dist/nylas-login.entry-171bd025.cjs +0 -1
- package/dist/nylas-login.entry-d85c1473.js +0 -74
- package/dist/nylas-provider.entry-ab1f6886.js +0 -265
- package/dist/nylas-provider.entry-e4231b93.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-d522ca98.cjs +0 -2
- package/dist/nylas-scheduling.entry-9e81c6fc.js +0 -439
- package/dist/nylas-scheduling.entry-c52edb14.cjs +0 -1
- package/dist/nylas-transcript.entry-a1fa7e17.cjs +0 -6
- package/dist/nylas-transcript.entry-fb39b5af.js +0 -128
- package/dist/nylas-video-player.entry-25e8cd9a.js +0 -39
- package/dist/nylas-video-player.entry-89842545.cjs +0 -1
- package/dist/nylas-video-preview.entry-28a0bd60.cjs +0 -1
- package/dist/nylas-video-preview.entry-80171531.js +0 -16
- package/dist/play-icon.entry-d548464e.js +0 -16
- package/dist/scheduler-config-store-d6729d8d-50920e8c.js +0 -29
- package/dist/scheduler-config-store-d6729d8d-a0bdda83.cjs +0 -1
- package/dist/scheduler-store-fe9e85a4-1dcfddfa.js +0 -533
- package/dist/scheduler-store-fe9e85a4-baabf78a.cjs +0 -1
- package/dist/sent-icon.entry-42ce5bcb.cjs +0 -1
- package/dist/sent-icon.entry-858fe83e.js +0 -16
- package/dist/spam-icon.entry-0827144e.js +0 -16
- package/dist/spam-icon.entry-bf1a48b6.cjs +0 -1
- package/dist/trash-fill-icon.entry-b6456ec8.cjs +0 -1
- package/dist/trash-fill-icon.entry-d48f72c5.js +0 -16
|
@@ -1,533 +0,0 @@
|
|
|
1
|
-
import { d as A, a as z, i as c, l as F } from "./index-9243e481.js";
|
|
2
|
-
var M;
|
|
3
|
-
(function(l) {
|
|
4
|
-
l.Error = "error", l.Warning = "warning", l.Info = "info", l.Success = "success";
|
|
5
|
-
})(M || (M = {}));
|
|
6
|
-
var P;
|
|
7
|
-
(function(l) {
|
|
8
|
-
l.Component = "component", l.Api = "api", l.Auth = "auth";
|
|
9
|
-
})(P || (P = {}));
|
|
10
|
-
var $;
|
|
11
|
-
(function(l) {
|
|
12
|
-
l.endtime_not_in_future = "endtime_not_in_future", l.no_booking_info = "no_booking_info", l.no_timeslot_selected = "no_timeslot_selected", l.no_timezone_selected = "no_timezone_selected", l.no_booking_id = "no_booking_id", l.no_salt = "no_salt", l.invalid_start_time = "invalid_start_time", l.invalid_end_time = "invalid_end_time", l.invalid_timezone = "invalid_timezone", l.no_config_id = "no_config_id";
|
|
13
|
-
})($ || ($ = {}));
|
|
14
|
-
class C {
|
|
15
|
-
constructor() {
|
|
16
|
-
this.component = (e) => {
|
|
17
|
-
const t = P.Component, s = `${e} Error`;
|
|
18
|
-
return {
|
|
19
|
-
endtime_not_in_future: (i = '"endtime" can not be in the future') => ({
|
|
20
|
-
title: s,
|
|
21
|
-
message: i,
|
|
22
|
-
category: t
|
|
23
|
-
}),
|
|
24
|
-
no_booking_info: (i = "No booking info provided") => ({
|
|
25
|
-
title: s,
|
|
26
|
-
message: i,
|
|
27
|
-
category: t
|
|
28
|
-
}),
|
|
29
|
-
no_timeslot_selected: (i = "No timeslot selected") => ({
|
|
30
|
-
title: s,
|
|
31
|
-
message: i,
|
|
32
|
-
category: t
|
|
33
|
-
}),
|
|
34
|
-
no_timezone_selected: (i = "No timezone selected") => ({
|
|
35
|
-
title: s,
|
|
36
|
-
message: i,
|
|
37
|
-
category: t
|
|
38
|
-
}),
|
|
39
|
-
no_booking_id: (i = "No booking id provided") => ({
|
|
40
|
-
title: s,
|
|
41
|
-
message: i,
|
|
42
|
-
category: t
|
|
43
|
-
}),
|
|
44
|
-
no_salt: (i = "No salt provided") => ({
|
|
45
|
-
title: s,
|
|
46
|
-
message: i,
|
|
47
|
-
category: t
|
|
48
|
-
}),
|
|
49
|
-
invalid_start_time: (i = "Invalid start time") => ({
|
|
50
|
-
title: s,
|
|
51
|
-
message: i,
|
|
52
|
-
category: t
|
|
53
|
-
}),
|
|
54
|
-
invalid_end_time: (i = "Invalid end time") => ({
|
|
55
|
-
title: s,
|
|
56
|
-
message: i,
|
|
57
|
-
category: t
|
|
58
|
-
}),
|
|
59
|
-
invalid_timezone: (i = "Invalid timezone") => ({
|
|
60
|
-
title: s,
|
|
61
|
-
message: i,
|
|
62
|
-
category: t
|
|
63
|
-
}),
|
|
64
|
-
no_config_id: (i = "No configuration id provided") => ({
|
|
65
|
-
title: s,
|
|
66
|
-
message: i,
|
|
67
|
-
category: t
|
|
68
|
-
})
|
|
69
|
-
};
|
|
70
|
-
}, this.api = (e) => {
|
|
71
|
-
const t = P.Api, s = `${e} Error`;
|
|
72
|
-
return {
|
|
73
|
-
invalid_session: (i) => ({
|
|
74
|
-
title: s,
|
|
75
|
-
message: i,
|
|
76
|
-
category: t
|
|
77
|
-
}),
|
|
78
|
-
general_error: (i) => ({
|
|
79
|
-
title: s,
|
|
80
|
-
message: i,
|
|
81
|
-
category: t
|
|
82
|
-
}),
|
|
83
|
-
internal_error: (i) => ({
|
|
84
|
-
title: s,
|
|
85
|
-
message: i,
|
|
86
|
-
category: t
|
|
87
|
-
}),
|
|
88
|
-
invalid_request_error: (i) => ({
|
|
89
|
-
title: s,
|
|
90
|
-
message: i,
|
|
91
|
-
category: t
|
|
92
|
-
}),
|
|
93
|
-
timeslot_not_available: (i) => ({
|
|
94
|
-
title: s,
|
|
95
|
-
message: i,
|
|
96
|
-
category: t
|
|
97
|
-
}),
|
|
98
|
-
provider_error: (i) => ({
|
|
99
|
-
title: s,
|
|
100
|
-
message: i,
|
|
101
|
-
category: t
|
|
102
|
-
}),
|
|
103
|
-
not_found_error: (i) => ({
|
|
104
|
-
title: s,
|
|
105
|
-
message: i,
|
|
106
|
-
category: t
|
|
107
|
-
})
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
class O {
|
|
113
|
-
constructor({ schedulerAPIURL: e, schedulerStore: t, sessionId: s, configId: i, slug: n, clientId: r }) {
|
|
114
|
-
this.errors = new C(), this.schedulerStore = t, this.schedulerAPIURL = e, this.sessionId = s, this.configId = i, this.slug = n, this.clientId = r;
|
|
115
|
-
}
|
|
116
|
-
getHeaders() {
|
|
117
|
-
return this.sessionId ? {
|
|
118
|
-
Authorization: `Bearer ${this.sessionId}`
|
|
119
|
-
} : {};
|
|
120
|
-
}
|
|
121
|
-
async makeAPIRequest(e, t, s, i = {}) {
|
|
122
|
-
try {
|
|
123
|
-
const n = new URL(this.schedulerAPIURL), r = "1.4.3";
|
|
124
|
-
return n.pathname = e, await (await fetch(decodeURIComponent(n.toString()), {
|
|
125
|
-
method: t,
|
|
126
|
-
headers: {
|
|
127
|
-
"Content-Type": "application/json",
|
|
128
|
-
Origin: window.location.origin,
|
|
129
|
-
"X-Source": "nylas-scheduling",
|
|
130
|
-
"X-Nylas-Web-Elements-Version": r,
|
|
131
|
-
...i
|
|
132
|
-
},
|
|
133
|
-
body: s
|
|
134
|
-
})).json();
|
|
135
|
-
} catch (n) {
|
|
136
|
-
return {
|
|
137
|
-
error: {
|
|
138
|
-
message: n.message,
|
|
139
|
-
title: "API request failed",
|
|
140
|
-
type: "api"
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
getErrorMessage(e) {
|
|
146
|
-
var s, i, n, r;
|
|
147
|
-
let t = (e == null ? void 0 : e.message) || (e == null ? void 0 : e.title) || "Something went wrong";
|
|
148
|
-
return (e == null ? void 0 : e.type) === "provider_error" && (t = ((i = (s = e == null ? void 0 : e.provider_error) == null ? void 0 : s.error) == null ? void 0 : i.message) || ((r = (n = e == null ? void 0 : e.provider_error) == null ? void 0 : n.error) == null ? void 0 : r.title) || "Something went wrong"), t;
|
|
149
|
-
}
|
|
150
|
-
setConfigId(e) {
|
|
151
|
-
this.configId = e;
|
|
152
|
-
}
|
|
153
|
-
selectDate(e) {
|
|
154
|
-
this.schedulerStore.set("selectedDate", e), this.schedulerStore.set("selectedTimeslot", null);
|
|
155
|
-
}
|
|
156
|
-
selectTime(e) {
|
|
157
|
-
this.schedulerStore.set("selectedTimeslot", e);
|
|
158
|
-
}
|
|
159
|
-
selectTimezone(e) {
|
|
160
|
-
this.schedulerStore.set("selectedTimezone", e);
|
|
161
|
-
}
|
|
162
|
-
selectLanguage(e) {
|
|
163
|
-
this.schedulerStore.set("selectedLanguage", e), c.changeLanguage(e);
|
|
164
|
-
}
|
|
165
|
-
async toggleAdditionalData(e) {
|
|
166
|
-
e || await this.refetchAvailability(), this.schedulerStore.set("showBookingForm", e);
|
|
167
|
-
}
|
|
168
|
-
setParticipantName(e) {
|
|
169
|
-
const { bookingInfo: t } = this.schedulerStore.state;
|
|
170
|
-
this.schedulerStore.set("bookingInfo", {
|
|
171
|
-
...t,
|
|
172
|
-
primaryParticipant: {
|
|
173
|
-
...t == null ? void 0 : t.primaryParticipant,
|
|
174
|
-
name: e
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
setParticipantEmail(e) {
|
|
179
|
-
const { bookingInfo: t } = this.schedulerStore.state;
|
|
180
|
-
this.schedulerStore.set("bookingInfo", {
|
|
181
|
-
...t,
|
|
182
|
-
primaryParticipant: {
|
|
183
|
-
...t == null ? void 0 : t.primaryParticipant,
|
|
184
|
-
email: e
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
async refetchAvailability() {
|
|
189
|
-
const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth(), 1).getTime() / 1e3, s = t < e.getTime() / 1e3 ? Math.floor(e.getTime() / 1e3) : t, i = new Date(e.getFullYear(), e.getMonth() + 1, 1).getTime() / 1e3;
|
|
190
|
-
return await this.getAvailability(s, i);
|
|
191
|
-
}
|
|
192
|
-
async resetStoreStateAndFetchAvailability() {
|
|
193
|
-
const e = /* @__PURE__ */ new Date(), t = await this.refetchAvailability(), s = this.schedulerStore.get("availability").find((n) => new Date(n.start_time) > /* @__PURE__ */ new Date());
|
|
194
|
-
let i = e;
|
|
195
|
-
return s && (i = s.start_time), this.schedulerStore.set("selectedDate", i), this.schedulerStore.set("eventInfo", null), this.schedulerStore.set("showBookingForm", !1), this.schedulerStore.set("selectedTimeslot", null), t;
|
|
196
|
-
}
|
|
197
|
-
async setReschedule(e) {
|
|
198
|
-
this.schedulerStore.set("isLoading", !0);
|
|
199
|
-
const t = this.schedulerStore.state.eventInfo;
|
|
200
|
-
return t && this.schedulerStore.set("reschedulingEventInfo", t), this.schedulerStore.set("rescheduleBookingId", e), await this.getUISettings(), await this.resetStoreStateAndFetchAvailability().finally(() => {
|
|
201
|
-
this.schedulerStore.set("isLoading", !1);
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
async setCancel(e) {
|
|
205
|
-
this.schedulerStore.set("cancelBookingId", e);
|
|
206
|
-
}
|
|
207
|
-
async setReject(e) {
|
|
208
|
-
this.schedulerStore.set("rejectBookingId", e);
|
|
209
|
-
}
|
|
210
|
-
async resetCancel() {
|
|
211
|
-
const e = await this.resetStoreStateAndFetchAvailability();
|
|
212
|
-
return this.schedulerStore.set("cancelBookingId", ""), this.schedulerStore.set("rejectBookingId", ""), this.schedulerStore.set("cancelledEventInfo", null), e;
|
|
213
|
-
}
|
|
214
|
-
async goBack() {
|
|
215
|
-
this.schedulerStore.set("cancelBookingId", "");
|
|
216
|
-
}
|
|
217
|
-
async resetConfirm() {
|
|
218
|
-
const e = await this.resetStoreStateAndFetchAvailability();
|
|
219
|
-
return this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("confirmedEventInfo", void 0), e;
|
|
220
|
-
}
|
|
221
|
-
async bookTimeslot(e) {
|
|
222
|
-
var E, p, L;
|
|
223
|
-
this.schedulerStore.set("isLoading", !0);
|
|
224
|
-
const { selectedTimeslot: t, selectedTimezone: s, bookingInfo: i, selectedLanguage: n } = this.schedulerStore.state;
|
|
225
|
-
if (!e && !i)
|
|
226
|
-
return { error: this.errors.component(c.t("createBookingErrorTitle")).no_booking_info() };
|
|
227
|
-
const r = (e == null ? void 0 : e.timeslot) || t;
|
|
228
|
-
if (!r)
|
|
229
|
-
return { error: this.errors.component(c.t("createBookingErrorTitle")).no_timeslot_selected() };
|
|
230
|
-
const a = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : s, o = n || "en-US";
|
|
231
|
-
if (!a)
|
|
232
|
-
return { error: this.errors.component(c.t("createBookingErrorTitle")).no_timezone_selected() };
|
|
233
|
-
const h = [...this.schedulerStore.get("availabilityOrderEmails")];
|
|
234
|
-
let d = "";
|
|
235
|
-
const m = (r == null ? void 0 : r.emails) || [], f = {};
|
|
236
|
-
Object.entries((i == null ? void 0 : i.additionalFields) || {}).forEach(([u, w]) => {
|
|
237
|
-
f[u] = w.value;
|
|
238
|
-
});
|
|
239
|
-
const _ = e ? e == null ? void 0 : e.primaryParticipant : i == null ? void 0 : i.primaryParticipant, S = e ? (e == null ? void 0 : e.guests) || [] : (i == null ? void 0 : i.guests) || [], y = e ? e == null ? void 0 : e.additionalFields : f, g = this.getHeaders(), b = `/v3/scheduling/bookings${!this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : ""}`;
|
|
240
|
-
if (h.length === 0) {
|
|
241
|
-
const u = await this.makeAPIRequest(decodeURIComponent(b), "POST", JSON.stringify({
|
|
242
|
-
additional_fields: y,
|
|
243
|
-
additional_guests: S,
|
|
244
|
-
guest: { ..._ },
|
|
245
|
-
start_time: r.start_time.getTime() / 1e3,
|
|
246
|
-
end_time: r.end_time.getTime() / 1e3,
|
|
247
|
-
timezone: a,
|
|
248
|
-
event_id: (r == null ? void 0 : r.event_id) || void 0,
|
|
249
|
-
master_id: (r == null ? void 0 : r.master_id) || void 0,
|
|
250
|
-
calendar_id: (r == null ? void 0 : r.calendar_id) || void 0,
|
|
251
|
-
email_language: this.getTwoLetterLanguageCode(o)
|
|
252
|
-
}), g);
|
|
253
|
-
return this.schedulerStore.set("isLoading", !1), "data" in u ? (this.schedulerStore.set("eventInfo", u.data), u) : { error: u.error };
|
|
254
|
-
}
|
|
255
|
-
for (; h.length > 0; ) {
|
|
256
|
-
if (d = h.shift(), !m.includes(d))
|
|
257
|
-
continue;
|
|
258
|
-
const u = await this.makeAPIRequest(decodeURIComponent(b), "POST", JSON.stringify({
|
|
259
|
-
participants: d ? [{ email: d }] : void 0,
|
|
260
|
-
additional_fields: y,
|
|
261
|
-
additional_guests: S,
|
|
262
|
-
guest: { ..._ },
|
|
263
|
-
start_time: r.start_time.getTime() / 1e3,
|
|
264
|
-
end_time: r.end_time.getTime() / 1e3,
|
|
265
|
-
timezone: a,
|
|
266
|
-
email_language: this.getTwoLetterLanguageCode(o)
|
|
267
|
-
}), g);
|
|
268
|
-
if ("data" in u)
|
|
269
|
-
return this.schedulerStore.set("isLoading", !1), this.schedulerStore.set("eventInfo", u == null ? void 0 : u.data), u;
|
|
270
|
-
if ((p = (E = u.error) == null ? void 0 : E.message) != null && p.startsWith("The selected timeslot is unavailable"))
|
|
271
|
-
continue;
|
|
272
|
-
{
|
|
273
|
-
this.schedulerStore.set("isLoading", !1);
|
|
274
|
-
const w = (L = u.error) == null ? void 0 : L.type;
|
|
275
|
-
let I = u.error;
|
|
276
|
-
if (w && w in this.errors.api(c.t("createBookingErrorTitle"))) {
|
|
277
|
-
const B = this.getErrorMessage(I);
|
|
278
|
-
I = this.errors.api(c.t("createBookingErrorTitle"))[w](B);
|
|
279
|
-
}
|
|
280
|
-
return { error: I };
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
return this.schedulerStore.set("isLoading", !1), {
|
|
284
|
-
error: this.errors.api(c.t("createBookingErrorTitle")).timeslot_not_available("The selected timeslot is unavailable")
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
async getUISettings() {
|
|
288
|
-
var r;
|
|
289
|
-
this.schedulerStore.set("isLoading", !0);
|
|
290
|
-
const e = this.schedulerStore.get("rescheduleBookingId"), t = this.getHeaders();
|
|
291
|
-
let s = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "";
|
|
292
|
-
e && s ? s += `&booking_id=${e}` : e && (s += `?booking_id=${e}`);
|
|
293
|
-
const i = `/v3/scheduling/ui-settings${s}`, n = await this.makeAPIRequest(i, "GET", void 0, t);
|
|
294
|
-
if ("error" in n) {
|
|
295
|
-
this.schedulerStore.set("isLoading", !1);
|
|
296
|
-
const a = (r = n.error) == null ? void 0 : r.type;
|
|
297
|
-
let o = n.error;
|
|
298
|
-
return a && a in this.errors.api(c.t("getUISettingErrorTitle")) && (o = this.errors.api(c.t("getUISettingErrorTitle"))[a]((o == null ? void 0 : o.message) || (o == null ? void 0 : o.title) || "Something went wrong")), { error: o };
|
|
299
|
-
}
|
|
300
|
-
return "data" in n && this.schedulerStore.set("configSettings", n.data), this.schedulerStore.set("isLoading", !1), n;
|
|
301
|
-
}
|
|
302
|
-
getTwoLetterLanguageCode(e) {
|
|
303
|
-
return e.split("-")[0];
|
|
304
|
-
}
|
|
305
|
-
getStartTimeWithMinBookingNotice(e) {
|
|
306
|
-
var n;
|
|
307
|
-
const t = (n = this.schedulerStore.get("configSettings")) == null ? void 0 : n.scheduler, s = t == null ? void 0 : t.min_booking_notice;
|
|
308
|
-
if (!s)
|
|
309
|
-
return e;
|
|
310
|
-
const i = (/* @__PURE__ */ new Date()).getTime();
|
|
311
|
-
return e < (i + s * 60 * 1e3) / 1e3 ? Math.floor((i + s * 60 * 1e3) / 1e3) : e;
|
|
312
|
-
}
|
|
313
|
-
getEndTimeForAvailableDaysInFuture(e) {
|
|
314
|
-
var r, a;
|
|
315
|
-
const t = /* @__PURE__ */ new Date(), s = (a = (r = this.schedulerStore.get("configSettings")) == null ? void 0 : r.scheduler) == null ? void 0 : a.available_days_in_future, i = Math.floor(F(t, s).getTime() / 1e3);
|
|
316
|
-
return Math.min(i, e);
|
|
317
|
-
}
|
|
318
|
-
async getAvailability(e = 0, t = 0) {
|
|
319
|
-
var f, _, S, y;
|
|
320
|
-
this.schedulerStore.set("isLoading", !0);
|
|
321
|
-
const s = new URLSearchParams(), i = /* @__PURE__ */ new Date(), n = i.getTime();
|
|
322
|
-
if (t && t < n / 1e3)
|
|
323
|
-
return this.schedulerStore.set("isLoading", !1), { error: this.errors.component(c.t("getAvailabilityErrorTitle")).endtime_not_in_future() };
|
|
324
|
-
if (!e) {
|
|
325
|
-
const g = new Date(i.getFullYear(), i.getMonth(), 1);
|
|
326
|
-
e = Math.floor(g.getTime() / 1e3);
|
|
327
|
-
}
|
|
328
|
-
if (!t) {
|
|
329
|
-
const g = new Date(i.getFullYear(), i.getMonth() + 1, 0);
|
|
330
|
-
t = Math.floor(g.getTime() / 1e3);
|
|
331
|
-
}
|
|
332
|
-
t = this.getEndTimeForAvailableDaysInFuture(t);
|
|
333
|
-
const r = this.getStartTimeWithMinBookingNotice(e);
|
|
334
|
-
e = r, t = r > t ? r + 1 : t, s.append("start_time", encodeURIComponent(e.toString())), s.append("end_time", encodeURIComponent(t.toString())), this.configId && !this.sessionId ? s.append("configuration_id", encodeURIComponent(this.configId)) : this.slug && this.clientId && !this.sessionId && (s.append("slug", encodeURIComponent(this.slug)), s.append("client_id", encodeURIComponent(this.clientId)));
|
|
335
|
-
const a = this.schedulerStore.get("rescheduleBookingId");
|
|
336
|
-
a && s.append("booking_id", encodeURIComponent(a));
|
|
337
|
-
const o = s.toString(), h = `/v3/scheduling/availability${o ? `?${o}` : ""}`, d = this.getHeaders(), m = await this.makeAPIRequest(decodeURIComponent(h), "GET", void 0, d);
|
|
338
|
-
if ("error" in m) {
|
|
339
|
-
this.schedulerStore.set("availability", []), this.schedulerStore.set("isLoading", !1);
|
|
340
|
-
const g = (f = m.error) == null ? void 0 : f.type;
|
|
341
|
-
let k = m.error;
|
|
342
|
-
if (g && g in this.errors.api(c.t("getAvailabilityErrorTitle"))) {
|
|
343
|
-
const b = this.getErrorMessage(k);
|
|
344
|
-
k = this.errors.api(c.t("getAvailabilityErrorTitle"))[g](b);
|
|
345
|
-
}
|
|
346
|
-
return { error: k };
|
|
347
|
-
}
|
|
348
|
-
if ("data" in m) {
|
|
349
|
-
const b = (((S = (_ = m.data) == null ? void 0 : _.time_slots) == null ? void 0 : S.map((p) => ({
|
|
350
|
-
...p,
|
|
351
|
-
start_time: new Date(p.start_time * 1e3),
|
|
352
|
-
end_time: new Date(p.end_time * 1e3)
|
|
353
|
-
}))) || []).filter((p) => p.start_time.getTime() > n).sort((p, L) => p.start_time.getTime() - L.start_time.getTime());
|
|
354
|
-
this.schedulerStore.set("availability", b);
|
|
355
|
-
const E = ((y = m.data) == null ? void 0 : y.order) || [];
|
|
356
|
-
this.schedulerStore.set("availabilityOrderEmails", E);
|
|
357
|
-
}
|
|
358
|
-
return this.schedulerStore.set("isLoading", !1), m;
|
|
359
|
-
}
|
|
360
|
-
async cancelBooking(e, t) {
|
|
361
|
-
var a;
|
|
362
|
-
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
363
|
-
return { error: this.errors.component(c.t("cancelBookingErrorTitle")).no_booking_id() };
|
|
364
|
-
const s = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", i = `/v3/scheduling/bookings/${e}${s}`, n = this.getHeaders(), r = await this.makeAPIRequest(decodeURIComponent(i), "DELETE", JSON.stringify({
|
|
365
|
-
action: "cancel",
|
|
366
|
-
cancellation_reason: t
|
|
367
|
-
}), n);
|
|
368
|
-
if ("error" in r) {
|
|
369
|
-
this.schedulerStore.set("isLoading", !1);
|
|
370
|
-
const o = (a = r.error) == null ? void 0 : a.type;
|
|
371
|
-
let h = r.error;
|
|
372
|
-
if (o && o in this.errors.api(c.t("cancelBookingErrorTitle"))) {
|
|
373
|
-
const d = this.getErrorMessage(h);
|
|
374
|
-
h = this.errors.api(c.t("cancelBookingErrorTitle"))[o](d);
|
|
375
|
-
}
|
|
376
|
-
return { error: h };
|
|
377
|
-
}
|
|
378
|
-
return this.schedulerStore.set("cancelledEventInfo", {
|
|
379
|
-
booking_id: e
|
|
380
|
-
}), this.schedulerStore.set("rescheduleBookingId", ""), this.schedulerStore.set("isLoading", !1), r;
|
|
381
|
-
}
|
|
382
|
-
async rescheduleBooking(e, t) {
|
|
383
|
-
var D;
|
|
384
|
-
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
385
|
-
return { error: this.errors.component(c.t("rescheduleBookingErrorTitle")).no_booking_id() };
|
|
386
|
-
const s = this.errors.api(c.t("rescheduleBookingErrorTitle")), i = this.errors.component(c.t("rescheduleBookingErrorTitle")), { bookingInfo: n, selectedTimeslot: r, selectedTimezone: a, selectedLanguage: o } = this.schedulerStore.state, { startTime: h, endTime: d, timezone: m } = t, f = h || (r == null ? void 0 : r.start_time);
|
|
387
|
-
if (!f)
|
|
388
|
-
return { error: i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
389
|
-
const _ = d || (r == null ? void 0 : r.end_time);
|
|
390
|
-
if (!_)
|
|
391
|
-
return { error: i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
392
|
-
const S = this.schedulerStore.get("availabilityOrderEmails");
|
|
393
|
-
let y = "";
|
|
394
|
-
if (S.length > 0) {
|
|
395
|
-
const T = (r == null ? void 0 : r.emails) || [];
|
|
396
|
-
for (let v = 0; v < S.length; v++)
|
|
397
|
-
if (T.includes(S[v])) {
|
|
398
|
-
y = S[v];
|
|
399
|
-
break;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
const g = m || a;
|
|
403
|
-
if (!g)
|
|
404
|
-
return { error: i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
|
|
405
|
-
const k = {};
|
|
406
|
-
Object.entries((n == null ? void 0 : n.additionalFields) || {}).forEach(([T, v]) => {
|
|
407
|
-
k[T] = v.value;
|
|
408
|
-
});
|
|
409
|
-
const b = t ? t == null ? void 0 : t.primaryParticipant : n == null ? void 0 : n.primaryParticipant, E = t ? (t == null ? void 0 : t.guests) || [] : (n == null ? void 0 : n.guests) || [], p = t ? t == null ? void 0 : t.additionalFields : k, L = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", u = `/v3/scheduling/bookings/${e}${L}`, w = this.getHeaders(), I = await this.makeAPIRequest(decodeURIComponent(u), "PATCH", JSON.stringify({
|
|
410
|
-
start_time: f.getTime() / 1e3,
|
|
411
|
-
end_time: _.getTime() / 1e3,
|
|
412
|
-
timezone: g,
|
|
413
|
-
additional_fields: p,
|
|
414
|
-
guest: { ...b },
|
|
415
|
-
additional_guests: E,
|
|
416
|
-
participants: y ? [{ email: y }] : void 0,
|
|
417
|
-
email_language: this.getTwoLetterLanguageCode(o)
|
|
418
|
-
}), w);
|
|
419
|
-
if ("error" in I) {
|
|
420
|
-
this.schedulerStore.set("isLoading", !1);
|
|
421
|
-
const T = (D = I.error) == null ? void 0 : D.type;
|
|
422
|
-
let v = I.error;
|
|
423
|
-
if (T && T in s) {
|
|
424
|
-
const R = this.getErrorMessage(v);
|
|
425
|
-
v = s[T](R);
|
|
426
|
-
}
|
|
427
|
-
return { error: v };
|
|
428
|
-
}
|
|
429
|
-
const B = this.schedulerStore.get("reschedulingEventInfo");
|
|
430
|
-
if ("data" in I)
|
|
431
|
-
this.schedulerStore.set("eventInfo", I == null ? void 0 : I.data);
|
|
432
|
-
else if (B)
|
|
433
|
-
this.schedulerStore.set("eventInfo", B);
|
|
434
|
-
else {
|
|
435
|
-
const T = {
|
|
436
|
-
booking_id: e
|
|
437
|
-
};
|
|
438
|
-
this.schedulerStore.set("eventInfo", T);
|
|
439
|
-
}
|
|
440
|
-
return this.schedulerStore.set("isLoading", !1), I;
|
|
441
|
-
}
|
|
442
|
-
async updateBooking(e) {
|
|
443
|
-
var m;
|
|
444
|
-
this.schedulerStore.set("isLoading", !0);
|
|
445
|
-
const { bookingId: t, status: s, reason: i } = e, n = this.schedulerStore.get("organizerConfirmationSalt"), r = s === "confirmed" ? c.t("confirmBookingErrorTitle") : c.t("rejectBookingErrorTitle");
|
|
446
|
-
if (!t)
|
|
447
|
-
return { error: this.errors.component(r).no_booking_id() };
|
|
448
|
-
if (!n)
|
|
449
|
-
return { error: this.errors.component(r).no_salt() };
|
|
450
|
-
const a = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", o = `/v3/scheduling/bookings/${t}${a}`, h = this.getHeaders(), d = await this.makeAPIRequest(decodeURIComponent(o), "PUT", JSON.stringify({
|
|
451
|
-
status: s,
|
|
452
|
-
cancellation_reason: i,
|
|
453
|
-
salt: n
|
|
454
|
-
}), h);
|
|
455
|
-
if ("error" in d) {
|
|
456
|
-
this.schedulerStore.set("isLoading", !1);
|
|
457
|
-
const f = (m = d.error) == null ? void 0 : m.type;
|
|
458
|
-
let _ = d.error;
|
|
459
|
-
if (f && f in this.errors.api(r)) {
|
|
460
|
-
const S = this.getErrorMessage(_);
|
|
461
|
-
_ = this.errors.api(r)[f](S);
|
|
462
|
-
}
|
|
463
|
-
return { error: _ };
|
|
464
|
-
}
|
|
465
|
-
return "data" in d && s === "confirmed" ? this.schedulerStore.set("confirmedEventInfo", d == null ? void 0 : d.data) : "request_id" in d && s === "cancelled" && this.schedulerStore.set("cancelledEventInfo", {
|
|
466
|
-
booking_id: t
|
|
467
|
-
}), this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("isLoading", !1), d;
|
|
468
|
-
}
|
|
469
|
-
async validateGroupEventTimeslot(e) {
|
|
470
|
-
var r, a;
|
|
471
|
-
this.schedulerStore.set("isLoading", !0);
|
|
472
|
-
const t = (r = this.schedulerStore.get("configSettings")) == null ? void 0 : r.configuration_id;
|
|
473
|
-
if (!t)
|
|
474
|
-
return { error: this.errors.component(c.t("validateTimeslotErrorTitle")).no_config_id() };
|
|
475
|
-
const s = this.getHeaders(), i = `/v3/scheduling/configurations/${t}/group-events/validate-timeslot`, n = await this.makeAPIRequest(decodeURIComponent(i), "POST", JSON.stringify({
|
|
476
|
-
...e,
|
|
477
|
-
start_time: e.start_time.getTime() / 1e3,
|
|
478
|
-
end_time: e.end_time.getTime() / 1e3
|
|
479
|
-
}), s);
|
|
480
|
-
if ("error" in n) {
|
|
481
|
-
this.schedulerStore.set("isLoading", !1);
|
|
482
|
-
const o = (a = n.error) == null ? void 0 : a.type;
|
|
483
|
-
let h = n.error;
|
|
484
|
-
if (o && o in this.errors.api(c.t("validateTimeslotErrorTitle"))) {
|
|
485
|
-
const d = this.getErrorMessage(h);
|
|
486
|
-
h = this.errors.api(c.t("validateTimeslotErrorTitle"))[o](d);
|
|
487
|
-
}
|
|
488
|
-
return this.refetchAvailability(), { error: h };
|
|
489
|
-
}
|
|
490
|
-
return this.schedulerStore.set("selectedTimeslot", e), this.schedulerStore.set("showBookingForm", !0), this.schedulerStore.set("isLoading", !1), n;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
function N(l = {}) {
|
|
494
|
-
const e = {
|
|
495
|
-
selectedDate: null,
|
|
496
|
-
selectedLanguage: navigator.language,
|
|
497
|
-
selectedTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
498
|
-
selectedTimeslot: null,
|
|
499
|
-
showBookingForm: !1,
|
|
500
|
-
availabilityOrderEmails: [],
|
|
501
|
-
selectableDates: null,
|
|
502
|
-
availability: [],
|
|
503
|
-
eventDuration: 0,
|
|
504
|
-
state: "ready",
|
|
505
|
-
eventInfo: null,
|
|
506
|
-
cancelledEventInfo: null,
|
|
507
|
-
isLoading: !1,
|
|
508
|
-
nylasBranding: !0,
|
|
509
|
-
...l
|
|
510
|
-
};
|
|
511
|
-
A("[defaultNylasStoreState]: ", e);
|
|
512
|
-
const t = z(e);
|
|
513
|
-
return t.onChange("availability", (s) => {
|
|
514
|
-
A("[availability]: ", s);
|
|
515
|
-
const i = s.map((a) => a.start_time);
|
|
516
|
-
A("[selectableDates]: ", i), t.set("selectableDates", i);
|
|
517
|
-
const n = s[0];
|
|
518
|
-
if (!n)
|
|
519
|
-
return;
|
|
520
|
-
const r = Math.floor((n.end_time.getTime() - n.start_time.getTime()) / 6e4);
|
|
521
|
-
A("[durationMinutes]: ", r), t.set("eventDuration", r);
|
|
522
|
-
}), t.reset = () => {
|
|
523
|
-
for (const s in e) {
|
|
524
|
-
const i = e[s];
|
|
525
|
-
t.set(s, i);
|
|
526
|
-
}
|
|
527
|
-
}, t;
|
|
528
|
-
}
|
|
529
|
-
export {
|
|
530
|
-
N as C,
|
|
531
|
-
P as E,
|
|
532
|
-
O as N
|
|
533
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./index-efb6db79.cjs");var P;(function(c){c.Error="error",c.Warning="warning",c.Info="info",c.Success="success"})(P||(P={}));exports.ErrorCategory=void 0;(function(c){c.Component="component",c.Api="api",c.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var D;(function(c){c.endtime_not_in_future="endtime_not_in_future",c.no_booking_info="no_booking_info",c.no_timeslot_selected="no_timeslot_selected",c.no_timezone_selected="no_timezone_selected",c.no_booking_id="no_booking_id",c.no_salt="no_salt",c.invalid_start_time="invalid_start_time",c.invalid_end_time="invalid_end_time",c.invalid_timezone="invalid_timezone",c.no_config_id="no_config_id"})(D||(D={}));class ${constructor(){this.component=e=>{const t=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:s,message:i,category:t}),no_booking_info:(i="No booking info provided")=>({title:s,message:i,category:t}),no_timeslot_selected:(i="No timeslot selected")=>({title:s,message:i,category:t}),no_timezone_selected:(i="No timezone selected")=>({title:s,message:i,category:t}),no_booking_id:(i="No booking id provided")=>({title:s,message:i,category:t}),no_salt:(i="No salt provided")=>({title:s,message:i,category:t}),invalid_start_time:(i="Invalid start time")=>({title:s,message:i,category:t}),invalid_end_time:(i="Invalid end time")=>({title:s,message:i,category:t}),invalid_timezone:(i="Invalid timezone")=>({title:s,message:i,category:t}),no_config_id:(i="No configuration id provided")=>({title:s,message:i,category:t})}},this.api=e=>{const t=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:i=>({title:s,message:i,category:t}),general_error:i=>({title:s,message:i,category:t}),internal_error:i=>({title:s,message:i,category:t}),invalid_request_error:i=>({title:s,message:i,category:t}),timeslot_not_available:i=>({title:s,message:i,category:t}),provider_error:i=>({title:s,message:i,category:t}),not_found_error:i=>({title:s,message:i,category:t})}}}}class C{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:s,configId:i,slug:n,clientId:r}){this.errors=new $,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=s,this.configId=i,this.slug=n,this.clientId=r}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,s,i={}){try{const n=new URL(this.schedulerAPIURL),r="1.4.3";return n.pathname=e,await(await fetch(decodeURIComponent(n.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":r,...i},body:s})).json()}catch(n){return{error:{message:n.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,i,n,r;let t=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(t=((i=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:i.message)||((r=(n=e==null?void 0:e.provider_error)==null?void 0:n.error)==null?void 0:r.title)||"Something went wrong"),t}setConfigId(e){this.configId=e}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e),o.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(s,i)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(n=>new Date(n.start_time)>new Date);let i=e;return s&&(i=s.start_time),this.schedulerStore.set("selectedDate",i),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.getUISettings(),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("rejectBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async goBack(){this.schedulerStore.set("cancelBookingId","")}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("confirmedEventInfo",void 0),e}async bookTimeslot(e){var w,p,L;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:s,bookingInfo:i,selectedLanguage:n}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(o.instance.t("createBookingErrorTitle")).no_booking_info()};const r=(e==null?void 0:e.timeslot)||t;if(!r)return{error:this.errors.component(o.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const l=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s,a=n||"en-US";if(!l)return{error:this.errors.component(o.instance.t("createBookingErrorTitle")).no_timezone_selected()};const h=[...this.schedulerStore.get("availabilityOrderEmails")];let d="";const m=(r==null?void 0:r.emails)||[],f={};Object.entries((i==null?void 0:i.additionalFields)||{}).forEach(([u,E])=>{f[u]=E.value});const _=e?e==null?void 0:e.primaryParticipant:i==null?void 0:i.primaryParticipant,S=e?(e==null?void 0:e.guests)||[]:(i==null?void 0:i.guests)||[],y=e?e==null?void 0:e.additionalFields:f,g=this.getHeaders(),k=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`;if(h.length===0){const u=await this.makeAPIRequest(decodeURIComponent(k),"POST",JSON.stringify({additional_fields:y,additional_guests:S,guest:{..._},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:l,event_id:(r==null?void 0:r.event_id)||void 0,master_id:(r==null?void 0:r.master_id)||void 0,calendar_id:(r==null?void 0:r.calendar_id)||void 0,email_language:this.getTwoLetterLanguageCode(a)}),g);return this.schedulerStore.set("isLoading",!1),"data"in u?(this.schedulerStore.set("eventInfo",u.data),u):{error:u.error}}for(;h.length>0;){if(d=h.shift(),!m.includes(d))continue;const u=await this.makeAPIRequest(decodeURIComponent(k),"POST",JSON.stringify({participants:d?[{email:d}]:void 0,additional_fields:y,additional_guests:S,guest:{..._},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:l,email_language:this.getTwoLetterLanguageCode(a)}),g);if("data"in u)return this.schedulerStore.set("isLoading",!1),this.schedulerStore.set("eventInfo",u==null?void 0:u.data),u;if((p=(w=u.error)==null?void 0:w.message)!=null&&p.startsWith("The selected timeslot is unavailable"))continue;{this.schedulerStore.set("isLoading",!1);const E=(L=u.error)==null?void 0:L.type;let I=u.error;if(E&&E in this.errors.api(o.instance.t("createBookingErrorTitle"))){const A=this.getErrorMessage(I);I=this.errors.api(o.instance.t("createBookingErrorTitle"))[E](A)}return{error:I}}}return this.schedulerStore.set("isLoading",!1),{error:this.errors.api(o.instance.t("createBookingErrorTitle")).timeslot_not_available("The selected timeslot is unavailable")}}async getUISettings(){var r;this.schedulerStore.set("isLoading",!0);const e=this.schedulerStore.get("rescheduleBookingId"),t=this.getHeaders();let s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";e&&s?s+=`&booking_id=${e}`:e&&(s+=`?booking_id=${e}`);const i=`/v3/scheduling/ui-settings${s}`,n=await this.makeAPIRequest(i,"GET",void 0,t);if("error"in n){this.schedulerStore.set("isLoading",!1);const l=(r=n.error)==null?void 0:r.type;let a=n.error;return l&&l in this.errors.api(o.instance.t("getUISettingErrorTitle"))&&(a=this.errors.api(o.instance.t("getUISettingErrorTitle"))[l]((a==null?void 0:a.message)||(a==null?void 0:a.title)||"Something went wrong")),{error:a}}return"data"in n&&this.schedulerStore.set("configSettings",n.data),this.schedulerStore.set("isLoading",!1),n}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){var n;const t=(n=this.schedulerStore.get("configSettings"))==null?void 0:n.scheduler,s=t==null?void 0:t.min_booking_notice;if(!s)return e;const i=new Date().getTime();return e<(i+s*60*1e3)/1e3?Math.floor((i+s*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){var r,l;const t=new Date,s=(l=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.scheduler)==null?void 0:l.available_days_in_future,i=Math.floor(o.addDaysToCurrentDate(t,s).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,t=0){var f,_,S,y;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,n=i.getTime();if(t&&t<n/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(o.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const g=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(g.getTime()/1e3)}if(!t){const g=new Date(i.getFullYear(),i.getMonth()+1,0);t=Math.floor(g.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const r=this.getStartTimeWithMinBookingNotice(e);e=r,t=r>t?r+1:t,s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(t.toString())),this.configId&&!this.sessionId?s.append("configuration_id",encodeURIComponent(this.configId)):this.slug&&this.clientId&&!this.sessionId&&(s.append("slug",encodeURIComponent(this.slug)),s.append("client_id",encodeURIComponent(this.clientId)));const l=this.schedulerStore.get("rescheduleBookingId");l&&s.append("booking_id",encodeURIComponent(l));const a=s.toString(),h=`/v3/scheduling/availability${a?`?${a}`:""}`,d=this.getHeaders(),m=await this.makeAPIRequest(decodeURIComponent(h),"GET",void 0,d);if("error"in m){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const g=(f=m.error)==null?void 0:f.type;let b=m.error;if(g&&g in this.errors.api(o.instance.t("getAvailabilityErrorTitle"))){const k=this.getErrorMessage(b);b=this.errors.api(o.instance.t("getAvailabilityErrorTitle"))[g](k)}return{error:b}}if("data"in m){const k=(((S=(_=m.data)==null?void 0:_.time_slots)==null?void 0:S.map(p=>({...p,start_time:new Date(p.start_time*1e3),end_time:new Date(p.end_time*1e3)})))||[]).filter(p=>p.start_time.getTime()>n).sort((p,L)=>p.start_time.getTime()-L.start_time.getTime());this.schedulerStore.set("availability",k);const w=((y=m.data)==null?void 0:y.order)||[];this.schedulerStore.set("availabilityOrderEmails",w)}return this.schedulerStore.set("isLoading",!1),m}async cancelBooking(e,t){var l;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(o.instance.t("cancelBookingErrorTitle")).no_booking_id()};const s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",i=`/v3/scheduling/bookings/${e}${s}`,n=this.getHeaders(),r=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),n);if("error"in r){this.schedulerStore.set("isLoading",!1);const a=(l=r.error)==null?void 0:l.type;let h=r.error;if(a&&a in this.errors.api(o.instance.t("cancelBookingErrorTitle"))){const d=this.getErrorMessage(h);h=this.errors.api(o.instance.t("cancelBookingErrorTitle"))[a](d)}return{error:h}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),r}async rescheduleBooking(e,t){var B;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(o.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const s=this.errors.api(o.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(o.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:n,selectedTimeslot:r,selectedTimezone:l,selectedLanguage:a}=this.schedulerStore.state,{startTime:h,endTime:d,timezone:m}=t,f=h||(r==null?void 0:r.start_time);if(!f)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const _=d||(r==null?void 0:r.end_time);if(!_)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const S=this.schedulerStore.get("availabilityOrderEmails");let y="";if(S.length>0){const T=(r==null?void 0:r.emails)||[];for(let v=0;v<S.length;v++)if(T.includes(S[v])){y=S[v];break}}const g=m||l;if(!g)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const b={};Object.entries((n==null?void 0:n.additionalFields)||{}).forEach(([T,v])=>{b[T]=v.value});const k=t?t==null?void 0:t.primaryParticipant:n==null?void 0:n.primaryParticipant,w=t?(t==null?void 0:t.guests)||[]:(n==null?void 0:n.guests)||[],p=t?t==null?void 0:t.additionalFields:b,L=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",u=`/v3/scheduling/bookings/${e}${L}`,E=this.getHeaders(),I=await this.makeAPIRequest(decodeURIComponent(u),"PATCH",JSON.stringify({start_time:f.getTime()/1e3,end_time:_.getTime()/1e3,timezone:g,additional_fields:p,guest:{...k},additional_guests:w,participants:y?[{email:y}]:void 0,email_language:this.getTwoLetterLanguageCode(a)}),E);if("error"in I){this.schedulerStore.set("isLoading",!1);const T=(B=I.error)==null?void 0:B.type;let v=I.error;if(T&&T in s){const M=this.getErrorMessage(v);v=s[T](M)}return{error:v}}const A=this.schedulerStore.get("reschedulingEventInfo");if("data"in I)this.schedulerStore.set("eventInfo",I==null?void 0:I.data);else if(A)this.schedulerStore.set("eventInfo",A);else{const T={booking_id:e};this.schedulerStore.set("eventInfo",T)}return this.schedulerStore.set("isLoading",!1),I}async updateBooking(e){var m;this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:s,reason:i}=e,n=this.schedulerStore.get("organizerConfirmationSalt"),r=s==="confirmed"?o.instance.t("confirmBookingErrorTitle"):o.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(r).no_booking_id()};if(!n)return{error:this.errors.component(r).no_salt()};const l=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",a=`/v3/scheduling/bookings/${t}${l}`,h=this.getHeaders(),d=await this.makeAPIRequest(decodeURIComponent(a),"PUT",JSON.stringify({status:s,cancellation_reason:i,salt:n}),h);if("error"in d){this.schedulerStore.set("isLoading",!1);const f=(m=d.error)==null?void 0:m.type;let _=d.error;if(f&&f in this.errors.api(r)){const S=this.getErrorMessage(_);_=this.errors.api(r)[f](S)}return{error:_}}return"data"in d&&s==="confirmed"?this.schedulerStore.set("confirmedEventInfo",d==null?void 0:d.data):"request_id"in d&&s==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),d}async validateGroupEventTimeslot(e){var r,l;this.schedulerStore.set("isLoading",!0);const t=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.configuration_id;if(!t)return{error:this.errors.component(o.instance.t("validateTimeslotErrorTitle")).no_config_id()};const s=this.getHeaders(),i=`/v3/scheduling/configurations/${t}/group-events/validate-timeslot`,n=await this.makeAPIRequest(decodeURIComponent(i),"POST",JSON.stringify({...e,start_time:e.start_time.getTime()/1e3,end_time:e.end_time.getTime()/1e3}),s);if("error"in n){this.schedulerStore.set("isLoading",!1);const a=(l=n.error)==null?void 0:l.type;let h=n.error;if(a&&a in this.errors.api(o.instance.t("validateTimeslotErrorTitle"))){const d=this.getErrorMessage(h);h=this.errors.api(o.instance.t("validateTimeslotErrorTitle"))[a](d)}return this.refetchAvailability(),{error:h}}return this.schedulerStore.set("selectedTimeslot",e),this.schedulerStore.set("showBookingForm",!0),this.schedulerStore.set("isLoading",!1),n}}function R(c={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...c};o.debug("[defaultNylasStoreState]: ",e);const t=o.createStore(e);return t.onChange("availability",s=>{o.debug("[availability]: ",s);const i=s.map(l=>l.start_time);o.debug("[selectableDates]: ",i),t.set("selectableDates",i);const n=s[0];if(!n)return;const r=Math.floor((n.end_time.getTime()-n.start_time.getTime())/6e4);o.debug("[durationMinutes]: ",r),t.set("eventDuration",r)}),t.reset=()=>{for(const s in e){const i=e[s];t.set(s,i)}},t}exports.CreateNylasSchedulerStore=R;exports.NylaSchedulerAPIConnector=C;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-efb6db79.cjs");require("react");require("react/jsx-runtime");require("react-dom");const c=".sc-sent-icon-h{display:flex}",i=c,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"fe1f3a8dccc7ed5b4b008b3e7ba2b6aa32bf75df",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"319aeb3c8bdce5002c624d4926ec3cb0525d396c",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"d05924ef434bb7976571e3f9fe2b00ffaac6c770",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"0268790deda555924f82a772dcd49783aec96c82",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};t.style=i;exports.sent_icon=t;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { r as s, h as t } from "./index-9243e481.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const o = ".sc-sent-icon-h{display:flex}", c = o, i = class {
|
|
6
|
-
constructor(e) {
|
|
7
|
-
s(this, e), this.width = "15", this.height = "15";
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return t("svg", { key: "fe1f3a8dccc7ed5b4b008b3e7ba2b6aa32bf75df", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "319aeb3c8bdce5002c624d4926ec3cb0525d396c", d: "M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "d05924ef434bb7976571e3f9fe2b00ffaac6c770", d: "M3.5 3.5L12 10.5", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "0268790deda555924f82a772dcd49783aec96c82", d: "M3.5 20.5L12 13.5", stroke: "auto", "stroke-width": "1.5" }));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
i.style = c;
|
|
14
|
-
export {
|
|
15
|
-
i as sent_icon
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { r as e, h as t } from "./index-9243e481.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const o = ".sc-spam-icon-h{display:flex}", i = o, c = class {
|
|
6
|
-
constructor(s) {
|
|
7
|
-
e(this, s), this.width = "15", this.height = "15";
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return t("svg", { key: "84d7e0e5235fe887cc3d239ce69e0986a1d3014d", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "b0b2350a1cf0d3ba1fdc3d099c9882ca095e1369", d: "M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "a2b5344063a37dc44ff52d46354443f774bc7c86", d: "M2 5L12 12.5L22 5", stroke: "auto", "stroke-width": "1.5" }));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
c.style = i;
|
|
14
|
-
export {
|
|
15
|
-
c as spam_icon
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-efb6db79.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-spam-icon-h{display:flex}",c=i,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"84d7e0e5235fe887cc3d239ce69e0986a1d3014d",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"b0b2350a1cf0d3ba1fdc3d099c9882ca095e1369",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"a2b5344063a37dc44ff52d46354443f774bc7c86",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};t.style=c;exports.spam_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-efb6db79.cjs");require("react");require("react/jsx-runtime");require("react-dom");const a=".sc-trash-fill-icon-h{display:flex}",i=a,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"8a7e9df694b6cb8ad4ffdac16eda2f6f8c90913f",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"c4f9f76f3deed708c969f7c2784647196414c6c8",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"a5561ec74252af4054839f86642f85ac191f7edb",d:"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"2eaaba52f039b93e5a65e8a7d5d97a9265e77f55",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"536c90ff05cc5e11b8e4c3c1a7b6656ea8acf8c8",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}};t.style=i;exports.trash_fill_icon=t;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { r as s, h as t } from "./index-9243e481.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const a = ".sc-trash-fill-icon-h{display:flex}", o = a, c = class {
|
|
6
|
-
constructor(e) {
|
|
7
|
-
s(this, e), this.width = "15", this.height = "15";
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return t("svg", { key: "8a7e9df694b6cb8ad4ffdac16eda2f6f8c90913f", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "c4f9f76f3deed708c969f7c2784647196414c6c8", d: "M3 6H5H21", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "a5561ec74252af4054839f86642f85ac191f7edb", d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "2eaaba52f039b93e5a65e8a7d5d97a9265e77f55", d: "M10 11V17", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "536c90ff05cc5e11b8e4c3c1a7b6656ea8acf8c8", d: "M14 11V17", stroke: "auto", "stroke-width": "1.5" }));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
c.style = o;
|
|
14
|
-
export {
|
|
15
|
-
c as trash_fill_icon
|
|
16
|
-
};
|