@nylas/react 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-circle-icon.entry-d2b7178c.js → add-circle-icon.entry-0ea05c5b.js} +1 -1
- package/dist/{add-circle-icon.entry-0f0cd6d8.cjs → add-circle-icon.entry-10f2c319.cjs} +1 -1
- package/dist/{archive-icon.entry-ec25f93a.cjs → archive-icon.entry-7eeea6f4.cjs} +1 -1
- package/dist/{archive-icon.entry-602d3c58.js → archive-icon.entry-a0af58f2.js} +1 -1
- package/dist/{arrow-icon.entry-d4dd38b3.js → arrow-icon.entry-7fd7c18e.js} +1 -1
- package/dist/{arrow-icon.entry-7bcb6442.cjs → arrow-icon.entry-954f2ba8.cjs} +1 -1
- package/dist/{bold-icon.entry-5fc41386.js → bold-icon.entry-690ecac8.js} +1 -1
- package/dist/{bold-icon.entry-fc1d34a6.cjs → bold-icon.entry-e970c498.cjs} +1 -1
- package/dist/{button-component_2.entry-d62ae520.js → button-component_2.entry-b57d03fc.js} +1 -1
- package/dist/{button-component_2.entry-d23be43d.cjs → button-component_2.entry-b7d39903.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_54.entry-1a42103a.js → calendar-agenda-fill-icon_53.entry-7792b45c.js} +448 -447
- package/dist/calendar-agenda-fill-icon_53.entry-89e5ac45.cjs +9 -0
- package/dist/{calendar-cancel-icon.entry-1566c286.js → calendar-cancel-icon.entry-5757c056.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-bf9fc719.cjs → calendar-cancel-icon.entry-8cd02237.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-4c3e78a6.cjs → calendar-check-icon_2.entry-4f59d206.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-82407a92.js → calendar-check-icon_2.entry-6864b9d5.js} +1 -1
- package/dist/{calendar-icon.entry-359c064c.cjs → calendar-icon.entry-0b1edb49.cjs} +1 -1
- package/dist/{calendar-icon.entry-c3c23413.js → calendar-icon.entry-3798880d.js} +1 -1
- package/dist/checkbox-component_3.entry-10293364.cjs +1 -0
- package/dist/checkbox-component_3.entry-3d9fa7b5.js +140 -0
- package/dist/{chevron-icon_3.entry-a6189c37.js → chevron-icon_3.entry-43e83594.js} +11 -11
- package/dist/{chevron-icon_3.entry-2453084c.cjs → chevron-icon_3.entry-a5175d87.cjs} +1 -1
- package/dist/{clock-icon_4.entry-ad679142.js → clock-icon_4.entry-219733d8.js} +1 -1
- package/dist/{clock-icon_4.entry-5162dfec.cjs → clock-icon_4.entry-76751b46.cjs} +1 -1
- package/dist/{close-icon.entry-2c6cdf35.js → close-icon.entry-286fc5ca.js} +1 -1
- package/dist/{close-icon.entry-38dc2638.cjs → close-icon.entry-cecd3cdd.cjs} +1 -1
- package/dist/{constants-35df11e7-b37e3406.js → constants-54af2051-767e8462.js} +28 -4
- package/dist/{constants-35df11e7-d87ad6d9.cjs → constants-54af2051-a3596673.cjs} +1 -1
- package/dist/{copy-icon.entry-6630ce5a.js → copy-icon.entry-121dd297.js} +1 -1
- package/dist/{copy-icon.entry-79df1d0e.cjs → copy-icon.entry-d4835d9a.cjs} +1 -1
- package/dist/{delete-icon.entry-f9a265b6.cjs → delete-icon.entry-14249f70.cjs} +1 -1
- package/dist/{delete-icon.entry-716f906c.js → delete-icon.entry-497ac8a2.js} +1 -1
- package/dist/{document-refresh-icon.entry-bb91822a.cjs → document-refresh-icon.entry-c0eacb66.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-fa775295.js → document-refresh-icon.entry-f265bb1b.js} +1 -1
- package/dist/elements/index.d.ts +1 -0
- package/dist/{feedbackSync-adc893c2-5965d5ba.js → feedbackSync-e5cb0245-d84015c5.js} +1 -1
- package/dist/{feedbackSync-adc893c2-70d06afc.cjs → feedbackSync-e5cb0245-ea7ddac9.cjs} +1 -1
- package/dist/{folder-icon.entry-9cf7590f.js → folder-icon.entry-d22b3e80.js} +1 -1
- package/dist/{folder-icon.entry-82a02de7.cjs → folder-icon.entry-e4806f0a.cjs} +1 -1
- package/dist/{forward-icon.entry-034ec3be.cjs → forward-icon.entry-42b98c73.cjs} +1 -1
- package/dist/{forward-icon.entry-ebd5e108.js → forward-icon.entry-b6711af7.js} +1 -1
- package/dist/{globe-icon.entry-b67c68d5.cjs → globe-icon.entry-18605371.cjs} +1 -1
- package/dist/{globe-icon.entry-48837e22.js → globe-icon.entry-4c5d6be0.js} +1 -1
- package/dist/google-logo-icon_4.entry-007f2813.cjs +1 -0
- package/dist/{google-logo-icon_4.entry-819d7d0d.js → google-logo-icon_4.entry-c3bae7b7.js} +176 -168
- package/dist/{inbox-icon.entry-7f91d971.cjs → inbox-icon.entry-02c59267.cjs} +1 -1
- package/dist/{inbox-icon.entry-c611c154.js → inbox-icon.entry-ae4383af.js} +1 -1
- package/dist/{index-72501df0.js → index-ad112f6a.js} +167 -161
- package/dist/{index-92ba1b80.cjs → index-bbbc79ad.cjs} +17 -17
- package/dist/{index.es-28b1b2ec-5a87db22.js → index.es-e9d66a9b-62be34ce.js} +214 -211
- package/dist/{index.es-28b1b2ec-595c0513.cjs → index.es-e9d66a9b-a29322e0.cjs} +5 -5
- package/dist/{info-icon_2.entry-4ad69286.js → info-icon_2.entry-3f143408.js} +5 -5
- package/dist/{info-icon_2.entry-4c70ab61.cjs → info-icon_2.entry-d10f1df5.cjs} +1 -1
- package/dist/{input-color-picker.entry-46bf04e1.cjs → input-color-picker.entry-45caaa1d.cjs} +1 -1
- package/dist/{input-color-picker.entry-4e5760ce.js → input-color-picker.entry-8ce41f49.js} +1 -1
- package/dist/{input-component.entry-1019ce99.cjs → input-component.entry-37b106dc.cjs} +1 -1
- package/dist/{input-component.entry-dca1013f.js → input-component.entry-6db98fb0.js} +1 -1
- package/dist/{input-dropdown.entry-e535fb5e.cjs → input-dropdown.entry-1a2cdf40.cjs} +1 -1
- package/dist/{input-dropdown.entry-f14c59e7.js → input-dropdown.entry-ec3d04ad.js} +1 -1
- package/dist/{italic-icon.entry-2ab53839.js → italic-icon.entry-36d1e644.js} +1 -1
- package/dist/{italic-icon.entry-726cc194.cjs → italic-icon.entry-b5e4eec9.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-6820d249.cjs → multi-select-dropdown.entry-00e43a89.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-a097d3cb.js → multi-select-dropdown.entry-6f22740f.js} +1 -1
- package/dist/nylas-booked-event-card_12.entry-4f115674.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-ccd85ff4.js → nylas-booked-event-card_12.entry-cb6b2ce6.js} +428 -423
- package/dist/{nylas-form-card.entry-afdfee47.js → nylas-form-card.entry-07e46491.js} +11 -11
- package/dist/{nylas-form-card.entry-8eb47f3d.cjs → nylas-form-card.entry-e2749723.cjs} +1 -1
- package/dist/{nylas-if-state.entry-be7978de.cjs → nylas-if-state.entry-88e01248.cjs} +1 -1
- package/dist/{nylas-if-state.entry-7caad39f.js → nylas-if-state.entry-e34c5cbb.js} +2 -2
- package/dist/{nylas-login.entry-dcf85f93.js → nylas-login.entry-a30bbd87.js} +3 -3
- package/dist/{nylas-login.entry-bce4f689.cjs → nylas-login.entry-ab50ca6a.cjs} +1 -1
- package/dist/{nylas-provider.entry-97882e4b.js → nylas-provider.entry-070f8090.js} +5 -5
- package/dist/{nylas-provider.entry-f02017da.cjs → nylas-provider.entry-7f4a1520.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-dcfdd6bf.js → nylas-scheduler-editor.entry-23e68865.js} +12 -12
- package/dist/nylas-scheduler-editor.entry-287ca230.cjs +2 -0
- package/dist/{nylas-scheduling.entry-2b842e93.js → nylas-scheduling.entry-19fca55a.js} +10 -10
- package/dist/{nylas-scheduling.entry-e0e9c8e8.cjs → nylas-scheduling.entry-c882ee9a.cjs} +1 -1
- package/dist/nylas-time-window-picker_2.entry-3d24eec4.js +336 -0
- package/dist/nylas-time-window-picker_2.entry-9a216230.cjs +1 -0
- package/dist/{person-icon.entry-3ec67feb.js → person-icon.entry-a6d86572.js} +1 -1
- package/dist/{person-icon.entry-2f8e00fd.cjs → person-icon.entry-b26a199b.cjs} +1 -1
- package/dist/{play-icon.entry-1abf79e9.cjs → play-icon.entry-5fc66fe6.cjs} +1 -1
- package/dist/{play-icon.entry-a840bdca.js → play-icon.entry-87939760.js} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +73 -72
- package/dist/{refresh-icon.entry-af7f54b4.cjs → refresh-icon.entry-3a8ae0f6.cjs} +1 -1
- package/dist/{refresh-icon.entry-11fcb673.js → refresh-icon.entry-820111be.js} +1 -1
- package/dist/{register-component-75f530bc-0e4e3d7a.js → register-component-5d7bcc15-35e4a5a0.js} +12 -12
- package/dist/{register-component-75f530bc-61b6f2dd.cjs → register-component-5d7bcc15-d9900fbc.cjs} +1 -1
- package/dist/{reply-all-icon.entry-5c8b3356.js → reply-all-icon.entry-5fbf1103.js} +1 -1
- package/dist/{reply-all-icon.entry-cc2ad940.cjs → reply-all-icon.entry-864494e2.cjs} +1 -1
- package/dist/{reply-icon.entry-d048736f.js → reply-icon.entry-7c136d06.js} +1 -1
- package/dist/{reply-icon.entry-840acade.cjs → reply-icon.entry-93084ffd.cjs} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-161a3efd.cjs → scheduler-config-store-ed4a8dfd-b2986359.cjs} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-f74e58ae.js → scheduler-config-store-ed4a8dfd-f7f53255.js} +1 -1
- package/dist/scheduler-store-20151a77-2dfd28c2.cjs +1 -0
- package/dist/{scheduler-store-d84b82a0-11faba86.js → scheduler-store-20151a77-4f7ffb6f.js} +127 -124
- package/dist/{sent-icon.entry-987760ce.cjs → sent-icon.entry-18afc1f9.cjs} +1 -1
- package/dist/{sent-icon.entry-fd3b9ad9.js → sent-icon.entry-60f1b814.js} +1 -1
- package/dist/{spam-icon.entry-3ce4f9fc.cjs → spam-icon.entry-9d41427e.cjs} +1 -1
- package/dist/{spam-icon.entry-4665415c.js → spam-icon.entry-b580b108.js} +1 -1
- package/dist/{star-icon.entry-0f446ac7.js → star-icon.entry-7cbe5a81.js} +1 -1
- package/dist/{star-icon.entry-a3ba4703.cjs → star-icon.entry-8792026f.cjs} +1 -1
- package/dist/{stop-icon.entry-9c13e00a.cjs → stop-icon.entry-5b605364.cjs} +1 -1
- package/dist/{stop-icon.entry-72c964b2.js → stop-icon.entry-ae629874.js} +1 -1
- package/dist/{textarea-component.entry-ff04b5fa.cjs → textarea-component.entry-2dae13db.cjs} +1 -1
- package/dist/{textarea-component.entry-d414e219.js → textarea-component.entry-fa87a032.js} +2 -2
- package/dist/{time-period-selector.entry-53edc0ba.js → time-period-selector.entry-0de79682.js} +2 -2
- package/dist/{time-period-selector.entry-2ce3347a.cjs → time-period-selector.entry-b1f5523b.cjs} +1 -1
- package/dist/{translate-icon.entry-84a78b9a.js → translate-icon.entry-07e9c2cf.js} +1 -1
- package/dist/{translate-icon.entry-9bab13ad.cjs → translate-icon.entry-22ef3602.cjs} +1 -1
- package/dist/{trash-fill-icon.entry-2881a44c.js → trash-fill-icon.entry-81ee0fdf.js} +1 -1
- package/dist/{trash-fill-icon.entry-84f52290.cjs → trash-fill-icon.entry-d332cf5d.cjs} +1 -1
- package/dist/{underline-icon.entry-23eca319.js → underline-icon.entry-dce1c48b.js} +1 -1
- package/dist/{underline-icon.entry-5a8410ef.cjs → underline-icon.entry-e381e3d2.cjs} +1 -1
- package/dist/{warning-icon.entry-abf9e5dc.js → warning-icon.entry-76d03910.js} +1 -1
- package/dist/{warning-icon.entry-1966042d.cjs → warning-icon.entry-b55e52d0.cjs} +1 -1
- package/package.json +3 -3
- package/dist/calendar-agenda-fill-icon_54.entry-95ccb99e.cjs +0 -9
- package/dist/checkbox-component_2.entry-97e97789.js +0 -79
- package/dist/checkbox-component_2.entry-f974e789.cjs +0 -1
- package/dist/google-logo-icon_4.entry-b637470a.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-c684905b.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-cc6f4060.cjs +0 -2
- package/dist/nylas-time-window-picker.entry-96f5fe9a.js +0 -316
- package/dist/nylas-time-window-picker.entry-a8780f2e.cjs +0 -1
- package/dist/scheduler-store-d84b82a0-7a7fe186.cjs +0 -1
package/dist/react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as e, _ as l, $ as i, a0 as c, a1 as t, a2 as r, a3 as
|
|
1
|
+
import { Z as e, _ as l, $ as i, a0 as c, a1 as t, a2 as r, a3 as b, a4 as I, a5 as y, a6 as N, a7 as d, a8 as C, a9 as m, aa as p, ab as g, ac as k, ad as u, ae as P, af as f, ag as E, ah as h, ai as v, aj as S, ak as B, al as F, am as T, an as L, ao as w, ap as D, aq as A, ar as R, as as M, at as x, au as G, av as W, aw as z, ax as O, ay as U, az as q, aA as V, aB as X, aC as Z, aD as j, aE as H, aF as J, aG as K, aH as Q, aI as Y, aJ as _, aK as $, aL as aa, aM as sa, aN as oa, aO as na, aP as ea, aQ as la, aR as ia, aS as ca, aT as ta, aU as ra, aV as ba, aW as Ia, aX as ya, aY as Na, aZ as da, a_ as Ca, a$ as ma, b0 as pa, b1 as ga, b2 as ka, b3 as ua, b4 as Pa, b5 as fa, b6 as Ea, b7 as ha, b8 as va, N as Sa, b9 as Ba, ba as Fa, bb as Ta, bc as La, bd as wa, be as Da, bf as Aa, bg as Ra, bh as Ma, bi as xa, bj as Ga, bk as Wa, bl as za, bm as Oa, bn as Ua, bo as qa, bp as Va, bq as Xa, br as Za, bs as ja, bt as Ha, bu as Ja, bv as Ka, bw as Qa, bx as Ya, by as _a, bz as $a, bA as as, bB as ss, bC as os, bD as ns, bE as es, bF as ls, bG as is, bH as cs, bI as ts, bJ as rs, bK as bs, bL as Is, bM as ys, bN as Ns, bO as ds, bP as Cs, bQ as ms, bR as ps, bS as gs, bT as ks, bU as us, bV as Ps, bW as fs, bX as Es, W as hs, X as vs, Y as Ss, V as Bs } from "./index-ad112f6a.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
export {
|
|
@@ -8,15 +8,15 @@ export {
|
|
|
8
8
|
c as BoldIcon,
|
|
9
9
|
t as ButtonComponent,
|
|
10
10
|
r as CalendarAgendaFillIcon,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
b as CalendarAgendaIcon,
|
|
12
|
+
I as CalendarCancelIcon,
|
|
13
13
|
y as CalendarCheckIcon,
|
|
14
14
|
N as CalendarIcon,
|
|
15
15
|
d as CalendarInfoIcon,
|
|
16
16
|
C as CalendarPatternsIcon,
|
|
17
17
|
m as CheckboxComponent,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
p as CheckmarkCircleIcon,
|
|
19
|
+
g as CheckmarkIcon,
|
|
20
20
|
k as ChevronIcon,
|
|
21
21
|
u as ClockIcon,
|
|
22
22
|
P as CloseIcon,
|
|
@@ -30,8 +30,8 @@ export {
|
|
|
30
30
|
T as EyeIcon,
|
|
31
31
|
L as FeedbackIcon,
|
|
32
32
|
w as FlowIcon,
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
D as FolderIcon,
|
|
34
|
+
A as ForwardIcon,
|
|
35
35
|
R as GlobeIcon,
|
|
36
36
|
M as GoogleLogoIcon,
|
|
37
37
|
x as GoogleMeetIcon,
|
|
@@ -42,13 +42,13 @@ export {
|
|
|
42
42
|
U as InputDropdown,
|
|
43
43
|
q as InputImageUrl,
|
|
44
44
|
V as ItalicIcon,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
X as LoadingIcon,
|
|
46
|
+
Z as LocationIcon,
|
|
47
|
+
j as LocationOffIcon,
|
|
48
|
+
H as MicrosoftLogoIcon,
|
|
49
|
+
J as MicrosoftTeamsIcon,
|
|
50
|
+
K as MultiSelectDropdown,
|
|
51
|
+
Q as NylasAdditionalParticipants,
|
|
52
52
|
Y as NylasAvailabilityPicker,
|
|
53
53
|
_ as NylasBookedEventCard,
|
|
54
54
|
$ as NylasBookingCalendarPicker,
|
|
@@ -62,75 +62,76 @@ export {
|
|
|
62
62
|
ca as NylasCancellationPolicy,
|
|
63
63
|
ta as NylasCancelledEventCard,
|
|
64
64
|
ra as NylasConfirmationEmail,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
ba as NylasConfirmedEventCard,
|
|
66
|
+
Ia as NylasConnectedCalendars,
|
|
67
67
|
ya as NylasCustomBookingFlow,
|
|
68
68
|
Na as NylasCustomEventSlug,
|
|
69
69
|
da as NylasCustomizeBookingSettings,
|
|
70
|
-
Ca as
|
|
71
|
-
ma as
|
|
70
|
+
Ca as NylasDateComponent,
|
|
71
|
+
ma as NylasDatePicker,
|
|
72
|
+
pa as NylasEditorTabs,
|
|
72
73
|
ga as NylasEventDescription,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
ka as NylasEventDuration,
|
|
75
|
+
ua as NylasEventInfo,
|
|
76
|
+
Pa as NylasEventLimits,
|
|
77
|
+
fa as NylasEventLocation,
|
|
78
|
+
Ea as NylasEventTitle,
|
|
79
|
+
ha as NylasFeedbackForm,
|
|
80
|
+
va as NylasFormCard,
|
|
81
|
+
Sa as NylasIdentityRequestWrapper,
|
|
82
|
+
Ba as NylasIfState,
|
|
83
|
+
Fa as NylasLimitFutureBookings,
|
|
84
|
+
Ta as NylasListConfigurations,
|
|
85
|
+
La as NylasLocaleSwitch,
|
|
86
|
+
wa as NylasLogin,
|
|
87
|
+
Da as NylasLogo,
|
|
87
88
|
Aa as NylasMinBookingNotice,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
Ra as NylasMinCancellationNotice,
|
|
90
|
+
Ma as NylasNotification,
|
|
91
|
+
xa as NylasOrganizerConfirmationCard,
|
|
92
|
+
Ga as NylasPageName,
|
|
93
|
+
Wa as NylasPageStyling,
|
|
94
|
+
za as NylasParticipantBookingCalendars,
|
|
95
|
+
Oa as NylasParticipantsCustomAvailability,
|
|
96
|
+
Ua as NylasProvider,
|
|
97
|
+
qa as NylasReminderEmails,
|
|
98
|
+
Va as NylasReminderTime,
|
|
99
|
+
Xa as NylasSchedulerEditor,
|
|
99
100
|
Za as NylasScheduling,
|
|
100
101
|
ja as NylasSchedulingMethod,
|
|
101
102
|
Ha as NylasSelectedEventCard,
|
|
102
103
|
Ja as NylasTimeWindowPicker,
|
|
103
104
|
Ka as NylasTimeslotInterval,
|
|
104
105
|
Qa as NylasTimeslotPicker,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
106
|
+
Ya as PaintbrushFillIcon,
|
|
107
|
+
_a as PaintbrushIcon,
|
|
108
|
+
$a as PeopleIcon,
|
|
109
|
+
as as PersonClipboardIcon,
|
|
110
|
+
ss as PersonIcon,
|
|
111
|
+
os as PlayIcon,
|
|
112
|
+
ns as PlusIcon,
|
|
113
|
+
es as RadioButtonGroup,
|
|
114
|
+
ls as RefreshIcon,
|
|
115
|
+
is as ReplyAllIcon,
|
|
116
|
+
cs as ReplyIcon,
|
|
117
|
+
ts as SearchIcon,
|
|
118
|
+
rs as SelectDropdown,
|
|
119
|
+
bs as SentIcon,
|
|
119
120
|
Is as SpamIcon,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
ys as StarIcon,
|
|
122
|
+
Ns as StopIcon,
|
|
123
|
+
ds as TextareaComponent,
|
|
124
|
+
Cs as TimePeriodSelector,
|
|
125
|
+
ms as ToggleSwitch,
|
|
126
|
+
ps as TooltipComponent,
|
|
126
127
|
gs as TranslateIcon,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
128
|
+
ks as TrashFillIcon,
|
|
129
|
+
us as TrashIcon,
|
|
130
|
+
Ps as UnderlineIcon,
|
|
131
|
+
fs as WarningIcon,
|
|
132
|
+
Es as ZoomIcon,
|
|
133
|
+
hs as applyPolyfills,
|
|
134
|
+
vs as defineCustomElements,
|
|
135
|
+
Ss as setNonce,
|
|
136
|
+
Bs as useNylasMailboxElement
|
|
136
137
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bbbc79ad.cjs");require("react");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",i=t,c=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"2e53f7097cb59c8a341225fdde738395247fe681",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6e99de42fd10abc8e6c9f705ea770431ac131d66",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};c.style=i;exports.refresh_icon=c;
|
package/dist/{register-component-75f530bc-0e4e3d7a.js → register-component-5d7bcc15-35e4a5a0.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { d, P as m, g as P } from "./index-
|
|
2
|
-
function b(e, o,
|
|
3
|
-
return new CustomEvent(
|
|
1
|
+
import { d, P as m, g as P } from "./index-ad112f6a.js";
|
|
2
|
+
function b(e, o, c = "registerComponent") {
|
|
3
|
+
return new CustomEvent(c, {
|
|
4
4
|
bubbles: !0,
|
|
5
5
|
composed: !0,
|
|
6
6
|
detail: o
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
|
-
function T(e, o,
|
|
10
|
-
return new CustomEvent(
|
|
9
|
+
function T(e, o, c = "unregisterComponent") {
|
|
10
|
+
return new CustomEvent(c, {
|
|
11
11
|
bubbles: !0,
|
|
12
12
|
composed: !0,
|
|
13
13
|
detail: o
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
function v(e) {
|
|
17
|
-
return (o,
|
|
17
|
+
return (o, c) => {
|
|
18
18
|
const r = e.name;
|
|
19
|
-
d(`[${r}] Registering component ${r} being called on ${
|
|
19
|
+
d(`[${r}] Registering component ${r} being called on ${c}`);
|
|
20
20
|
const u = o.componentWillLoad;
|
|
21
21
|
if (!u) {
|
|
22
22
|
m(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);
|
|
@@ -33,7 +33,7 @@ function v(e) {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
if (e.storeToProps && e.stateToProps) {
|
|
36
|
-
const n = Array.from(e.storeToProps.values()), t = Array.from(e.stateToProps.values()), s = n.filter((
|
|
36
|
+
const n = Array.from(e.storeToProps.values()), t = Array.from(e.stateToProps.values()), s = n.filter((i) => t.includes(i));
|
|
37
37
|
if (s.length > 0) {
|
|
38
38
|
m(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${s.join(", ")}`);
|
|
39
39
|
return;
|
|
@@ -92,15 +92,15 @@ function v(e) {
|
|
|
92
92
|
element: t,
|
|
93
93
|
...e,
|
|
94
94
|
eventToProps: a
|
|
95
|
-
},
|
|
96
|
-
return t.dispatchEvent(
|
|
95
|
+
}, i = b(o, s, e.registrationEventName);
|
|
96
|
+
return t.dispatchEvent(i) && d(`[${r}] Component ${r} successfully fired registration event`), n;
|
|
97
97
|
}, o.disconnectedCallback = function() {
|
|
98
98
|
const n = l == null ? void 0 : l.call(this), t = P(this), s = {
|
|
99
99
|
element: t,
|
|
100
100
|
...e,
|
|
101
101
|
eventToProps: a
|
|
102
|
-
},
|
|
103
|
-
return t.dispatchEvent(
|
|
102
|
+
}, i = T(o, s, e.unregistrationEventName);
|
|
103
|
+
return t.dispatchEvent(i) && d(`[${r}] Component ${r} successfully fired unregistration event`), n;
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
106
|
}
|
package/dist/{register-component-75f530bc-61b6f2dd.cjs → register-component-5d7bcc15-d9900fbc.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./index-
|
|
1
|
+
"use strict";const s=require("./index-bbbc79ad.cjs");function m(e,o,i="registerComponent"){return new CustomEvent(i,{bubbles:!0,composed:!0,detail:o})}function P(e,o,i="unregisterComponent"){return new CustomEvent(i,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,i)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${i}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),u=n.filter(c=>t.includes(c));if(u.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${u.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),u={element:t,...e,eventToProps:d},c=m(o,u,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),u={element:t,...e,eventToProps:d},c=P(o,u,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bbbc79ad.cjs");require("react");require("react-dom");const i=".sc-reply-all-icon-h{display:flex}",s=i,t=class{constructor(l){e.registerInstance(this,l),this.width="15",this.height="15"}render(){return e.h("svg",{key:"731c2f8765e8d12717f1e021f6ea9fda06bdd336",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"79807cd8dd4aaa49fc2c6be33b18974b9d7874f7",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};t.style=s;exports.reply_all_icon=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bbbc79ad.cjs");require("react");require("react-dom");const s=".sc-reply-icon-h{display:flex}",c=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"c28f9fd8ada1318b9d8c35dc2361f105ef2daba1",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"07d39c83f7b5423b81583d4909d1763877369b8d",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};t.style=c;exports.reply_icon=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./index-
|
|
1
|
+
"use strict";const o=require("./index-bbbc79ad.cjs");function s(n={}){const r={selectedConfiguration:{},configurations:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],requiresSlug:!1,...n},e=o.createStore(r);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async i=>{i||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./index-bbbc79ad.cjs");exports.ErrorCategory=void 0;(function(o){o.Component="component",o.Api="api",o.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var D;(function(o){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.no_salt="no_salt",o.invalid_start_time="invalid_start_time",o.invalid_end_time="invalid_end_time",o.invalid_timezone="invalid_timezone"})(D||(D={}));var A;(function(o){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"})(A||(A={}));class P{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})}},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 ${constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:s,configId:i,slug:r,clientId:n}){this.errors=new P,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=s,this.configId=i,this.slug=r,this.clientId=n}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,s,i={}){try{const r=new URL(this.schedulerAPIURL),n="1.3.2";return r.pathname=e,await(await fetch(decodeURIComponent(r.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":n,...i},body:s})).json()}catch(r){return{error:{message:r.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,i,r,n;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)||((n=(r=e==null?void 0:e.provider_error)==null?void 0:r.error)==null?void 0:n.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),a.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(r=>new Date(r.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 I;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:s,bookingInfo:i,selectedLanguage:r}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_booking_info()};const n=(e==null?void 0:e.timeslot)||t;if(!n)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const l=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s,c=r||"en-US";if(!l)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_timezone_selected()};const u=this.schedulerStore.get("availabilityOrderEmails");let d="";if(u.length>0){const b=(n==null?void 0:n.emails)||[];for(let f=0;f<u.length;f++)if(b.includes(u[f])){d=u[f];break}}const h={};Object.entries((i==null?void 0:i.additionalFields)||{}).forEach(([b,f])=>{h[b]=f.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)||[],p=e?e==null?void 0:e.additionalFields:h,T=this.getHeaders(),v=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`,g=await this.makeAPIRequest(decodeURIComponent(v),"POST",JSON.stringify({participants:d?[{email:d}]:void 0,additional_fields:p,additional_guests:S,guest:{..._},start_time:n.start_time.getTime()/1e3,end_time:n.end_time.getTime()/1e3,timezone:l,email_language:this.getTwoLetterLanguageCode(c)}),T);if("error"in g){this.schedulerStore.set("isLoading",!1);const b=(I=g.error)==null?void 0:I.type;let f=g.error;if(b&&b in this.errors.api("Create Booking")){const E=this.getErrorMessage(f);f=this.errors.api("Create Booking")[b](E)}return{error:f}}return"data"in g&&this.schedulerStore.set("eventInfo",g==null?void 0:g.data),this.schedulerStore.set("isLoading",!1),g}async getUISettings(){var n;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}`,r=await this.makeAPIRequest(i,"GET",void 0,t);if("error"in r){this.schedulerStore.set("isLoading",!1);const l=(n=r.error)==null?void 0:n.type;let c=r.error;return l&&l in this.errors.api(a.instance.t("getUISettingErrorTitle"))&&(c=this.errors.api(a.instance.t("getUISettingErrorTitle"))[l]((c==null?void 0:c.message)||(c==null?void 0:c.title)||"Something went wrong")),{error:c}}return"data"in r&&this.schedulerStore.set("configSettings",r.data),this.schedulerStore.set("isLoading",!1),r}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){var r;const t=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.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 n,l;const t=new Date,s=(l=(n=this.schedulerStore.get("configSettings"))==null?void 0:n.scheduler)==null?void 0:l.available_days_in_future,i=Math.floor(a.addDaysToCurrentDate(t,s).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,t=0){var _,S,p,T;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,r=i.getTime();if(t&&t<r/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(a.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const m=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(m.getTime()/1e3)}if(!t){const m=new Date(i.getFullYear(),i.getMonth()+1,0);t=Math.floor(m.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const n=this.getStartTimeWithMinBookingNotice(e);e=n,t=n>t?n+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 c=s.toString(),u=`/v3/scheduling/availability${c?`?${c}`:""}`,d=this.getHeaders(),h=await this.makeAPIRequest(decodeURIComponent(u),"GET",void 0,d);if("error"in h){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const m=(_=h.error)==null?void 0:_.type;let v=h.error;if(m&&m in this.errors.api(a.instance.t("getAvailabilityErrorTitle"))){const g=this.getErrorMessage(v);v=this.errors.api(a.instance.t("getAvailabilityErrorTitle"))[m](g)}return{error:v}}if("data"in h){const v=(((p=(S=h.data)==null?void 0:S.time_slots)==null?void 0:p.map(I=>({...I,start_time:new Date(I.start_time*1e3),end_time:new Date(I.end_time*1e3)})))||[]).filter(I=>I.start_time.getTime()>r);this.schedulerStore.set("availability",v);const g=((T=h.data)==null?void 0:T.order)||[];this.schedulerStore.set("availabilityOrderEmails",g)}return this.schedulerStore.set("isLoading",!1),h}async cancelBooking(e,t){var l;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(a.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}`,r=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),r);if("error"in n){this.schedulerStore.set("isLoading",!1);const c=(l=n.error)==null?void 0:l.type;let u=n.error;if(c&&c in this.errors.api(a.instance.t("cancelBookingErrorTitle"))){const d=this.getErrorMessage(u);u=this.errors.api(a.instance.t("cancelBookingErrorTitle"))[c](d)}return{error:u}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(e,t){var B;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(a.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const s=this.errors.api(a.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(a.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:r,selectedTimeslot:n,selectedTimezone:l,selectedLanguage:c}=this.schedulerStore.state,{startTime:u,endTime:d,timezone:h}=t,_=u||(n==null?void 0:n.start_time);if(!_)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const S=d||(n==null?void 0:n.end_time);if(!S)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const p=this.schedulerStore.get("availabilityOrderEmails");let T="";if(p.length>0){const k=(n==null?void 0:n.emails)||[];for(let y=0;y<p.length;y++)if(k.includes(p[y])){T=p[y];break}}const m=h||l;if(!m)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const v={};Object.entries((r==null?void 0:r.additionalFields)||{}).forEach(([k,y])=>{v[k]=y.value});const g=t?t==null?void 0:t.primaryParticipant:r==null?void 0:r.primaryParticipant,I=t?(t==null?void 0:t.guests)||[]:(r==null?void 0:r.guests)||[],b=t?t==null?void 0:t.additionalFields:v,f=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",E=`/v3/scheduling/bookings/${e}${f}`,C=this.getHeaders(),w=await this.makeAPIRequest(decodeURIComponent(E),"PATCH",JSON.stringify({start_time:_.getTime()/1e3,end_time:S.getTime()/1e3,timezone:m,additional_fields:b,guest:{...g},additional_guests:I,participants:T?[{email:T}]:void 0,email_language:this.getTwoLetterLanguageCode(c)}),C);if("error"in w){this.schedulerStore.set("isLoading",!1);const k=(B=w.error)==null?void 0:B.type;let y=w.error;if(k&&k in s){const M=this.getErrorMessage(y);y=s[k](M)}return{error:y}}const L=this.schedulerStore.get("reschedulingEventInfo");if("data"in w)this.schedulerStore.set("eventInfo",w==null?void 0:w.data);else if(L)this.schedulerStore.set("eventInfo",L);else{const k={booking_id:e};this.schedulerStore.set("eventInfo",k)}return this.schedulerStore.set("isLoading",!1),w}async updateBooking(e){var h;this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:s,reason:i}=e,r=this.schedulerStore.get("organizerConfirmationSalt"),n=s==="confirmed"?a.instance.t("confirmBookingErrorTitle"):a.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(n).no_booking_id()};if(!r)return{error:this.errors.component(n).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}`:"",c=`/v3/scheduling/bookings/${t}${l}`,u=this.getHeaders(),d=await this.makeAPIRequest(decodeURIComponent(c),"PUT",JSON.stringify({status:s,cancellation_reason:i,salt:r}),u);if("error"in d){this.schedulerStore.set("isLoading",!1);const _=(h=d.error)==null?void 0:h.type;let S=d.error;if(_&&_ in this.errors.api(n)){const p=this.getErrorMessage(S);S=this.errors.api(n)[_](p)}return{error:S}}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}}function z(o={}){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,...o};a.debug("[defaultNylasStoreState]: ",e);const t=a.createStore(e);return t.onChange("availability",s=>{a.debug("[availability]: ",s);const i=s.map(l=>l.start_time);a.debug("[selectableDates]: ",i),t.set("selectableDates",i);const r=s[0];if(!r)return;const n=Math.floor((r.end_time.getTime()-r.start_time.getTime())/6e4);a.debug("[durationMinutes]: ",n),t.set("eventDuration",n)}),t.reset=()=>{for(const s in e){const i=e[s];t.set(s,i)}},t}exports.CreateNylasSchedulerStore=z;exports.NylaSchedulerAPIConnector=$;
|