@nylas/react 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-circle-icon.entry-25aecb13.js +15 -0
- package/dist/{add-circle-icon.entry-dcc45961.cjs → add-circle-icon.entry-5c49ba96.cjs} +1 -1
- package/dist/{archive-icon.entry-c4da9f4f.cjs → archive-icon.entry-0a9e8ec3.cjs} +1 -1
- package/dist/{archive-icon.entry-715e139b.js → archive-icon.entry-89e31121.js} +2 -2
- package/dist/{arrow-icon.entry-bdccce8a.cjs → arrow-icon.entry-19e5237c.cjs} +1 -1
- package/dist/{arrow-icon.entry-9311463c.js → arrow-icon.entry-9cfd86a1.js} +2 -2
- package/dist/bold-icon.entry-d591e701.cjs +1 -0
- package/dist/{bold-icon.entry-c531dff1.js → bold-icon.entry-eab3420d.js} +6 -6
- package/dist/{button-component_2.entry-5aad0ec4.js → button-component_2.entry-7cd5f9c0.js} +6 -6
- package/dist/{button-component_2.entry-db911efe.cjs → button-component_2.entry-ce4314bf.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_53.entry-6f1aa42c.js → calendar-agenda-fill-icon_54.entry-7099138a.js} +841 -727
- package/dist/calendar-agenda-fill-icon_54.entry-9228dbe7.cjs +8 -0
- package/dist/{calendar-cancel-icon.entry-59375bc4.js → calendar-cancel-icon.entry-299d6fba.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-3bd1c8e9.cjs → calendar-cancel-icon.entry-6e3d20f1.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-540dde9d.cjs → calendar-check-icon_2.entry-087dd913.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-1ca369b6.js → calendar-check-icon_2.entry-08ef8d2f.js} +5 -5
- package/dist/{calendar-icon.entry-66517be4.js → calendar-icon.entry-53b54115.js} +5 -5
- package/dist/{calendar-icon.entry-1d9773d5.cjs → calendar-icon.entry-73f9d05b.cjs} +1 -1
- package/dist/checkbox-component_3.entry-bc9768dd.cjs +1 -0
- package/dist/checkbox-component_3.entry-d828eb1d.js +149 -0
- package/dist/{chevron-icon_3.entry-afc62aa5.js → chevron-icon_3.entry-783588a9.js} +8 -8
- package/dist/chevron-icon_3.entry-e956d78c.cjs +1 -0
- package/dist/{clock-icon_4.entry-ab2c2eaf.js → clock-icon_4.entry-0e809dcb.js} +18 -18
- package/dist/{clock-icon_4.entry-f46a42fc.cjs → clock-icon_4.entry-60d41dfd.cjs} +1 -1
- package/dist/close-icon.entry-1b5d25c5.cjs +1 -0
- package/dist/close-icon.entry-fef4f624.js +15 -0
- package/dist/constants-6da0ede7-151395ad.cjs +1 -0
- package/dist/{constants-91d76d21-1638ead6.js → constants-6da0ede7-49c32ba7.js} +29 -16
- package/dist/{copy-icon.entry-c009a659.js → copy-icon.entry-25699ab8.js} +7 -7
- package/dist/{copy-icon.entry-16835c5d.cjs → copy-icon.entry-ab6530e0.cjs} +1 -1
- package/dist/{delete-icon.entry-e8815e15.js → delete-icon.entry-802084f6.js} +5 -5
- package/dist/{delete-icon.entry-3c295200.cjs → delete-icon.entry-e99e1f82.cjs} +1 -1
- package/dist/document-refresh-icon.entry-065a59f5.cjs +1 -0
- package/dist/document-refresh-icon.entry-d1604f53.js +15 -0
- package/dist/elements/index.d.ts +1 -0
- package/dist/{feedbackSync-b5d35a5b-20032e5d.js → feedbackSync-c040f483-2b6476c4.js} +1 -1
- package/dist/{feedbackSync-b5d35a5b-1343e33b.cjs → feedbackSync-c040f483-d6dd0560.cjs} +1 -1
- package/dist/{folder-icon.entry-1837e7eb.cjs → folder-icon.entry-351e61fc.cjs} +1 -1
- package/dist/{folder-icon.entry-1a70f499.js → folder-icon.entry-6c0c09ed.js} +4 -4
- package/dist/forward-icon.entry-0ccfb600.js +15 -0
- package/dist/forward-icon.entry-6b7af9cd.cjs +1 -0
- package/dist/{globe-icon.entry-5ea64e36.cjs → globe-icon.entry-2b75b66b.cjs} +1 -1
- package/dist/{globe-icon.entry-2886c103.js → globe-icon.entry-5ddcd2cb.js} +4 -4
- package/dist/{google-logo-icon_4.entry-c0413818.js → google-logo-icon_4.entry-04174684.js} +354 -342
- package/dist/google-logo-icon_4.entry-a685ff91.cjs +1 -0
- package/dist/inbox-icon.entry-0ad18b3f.js +15 -0
- package/dist/inbox-icon.entry-425d1ded.cjs +1 -0
- package/dist/{index-cd93b584.js → index-7e7c24f1.js} +3944 -3309
- package/dist/index-81719cc6.cjs +81 -0
- package/dist/{index.es-ef72cd61-0860521c.cjs → index.es-2b014ec7-0589e68a.cjs} +1 -1
- package/dist/{index.es-ef72cd61-3075f564.js → index.es-2b014ec7-72557487.js} +1 -1
- package/dist/{info-icon_2.entry-cfa2954a.cjs → info-icon_2.entry-7ec02802.cjs} +1 -1
- package/dist/{info-icon_2.entry-891619f7.js → info-icon_2.entry-a6d0e842.js} +6 -6
- package/dist/{input-color-picker.entry-58c5f4d3.js → input-color-picker.entry-d98d06ca.js} +3 -3
- package/dist/{input-color-picker.entry-5c3e8407.cjs → input-color-picker.entry-ed9a1c07.cjs} +1 -1
- package/dist/input-component.entry-2e57b00e.cjs +1 -0
- package/dist/{input-component.entry-a45cff7f.js → input-component.entry-f3aa3419.js} +7 -7
- package/dist/{input-dropdown_2.entry-0518caac.js → input-dropdown_2.entry-0d9c8475.js} +15 -15
- package/dist/input-dropdown_2.entry-6fc7df16.cjs +1 -0
- package/dist/italic-icon.entry-7a8712f2.cjs +1 -0
- package/dist/italic-icon.entry-d610e66f.js +15 -0
- package/dist/{multi-select-dropdown.entry-0b7e26c0.js → multi-select-dropdown.entry-b31d9f11.js} +4 -4
- package/dist/multi-select-dropdown.entry-eaa268b4.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-8eed168c.js → nylas-booked-event-card_12.entry-45514813.js} +395 -349
- package/dist/nylas-booked-event-card_12.entry-498de30a.cjs +1 -0
- package/dist/{nylas-form-card.entry-8842785d.js → nylas-form-card.entry-67aec298.js} +3 -3
- package/dist/{nylas-form-card.entry-2c336c14.cjs → nylas-form-card.entry-fdb3c114.cjs} +1 -1
- package/dist/{nylas-if-state.entry-e6c90919.cjs → nylas-if-state.entry-76b38c9c.cjs} +1 -1
- package/dist/{nylas-if-state.entry-fdc20d01.js → nylas-if-state.entry-ee7d92b0.js} +3 -3
- package/dist/{nylas-login.entry-16f39c90.js → nylas-login.entry-265f9d0f.js} +3 -3
- package/dist/{nylas-login.entry-dcdc4d06.cjs → nylas-login.entry-589e45d0.cjs} +1 -1
- package/dist/{nylas-provider.entry-d51de210.js → nylas-provider.entry-5605a3e0.js} +5 -5
- package/dist/{nylas-provider.entry-0cc093e4.cjs → nylas-provider.entry-cfb9627c.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-af211f07.cjs → nylas-scheduler-editor.entry-6fdfb9b5.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-d0214565.js → nylas-scheduler-editor.entry-b3e085b3.js} +38 -32
- package/dist/nylas-scheduling.entry-8cc5c353.cjs +1 -0
- package/dist/{nylas-scheduling.entry-3d3a4eb4.js → nylas-scheduling.entry-bc00beba.js} +88 -79
- package/dist/nylas-time-window-picker.entry-a77c1d67.cjs +1 -0
- package/dist/nylas-time-window-picker.entry-c421303e.js +316 -0
- package/dist/{person-icon.entry-954d4c10.cjs → person-icon.entry-36b21e95.cjs} +1 -1
- package/dist/{person-icon.entry-dcdc2118.js → person-icon.entry-85660f98.js} +2 -2
- package/dist/{play-icon.entry-e727a1d6.js → play-icon.entry-953b1bc8.js} +4 -4
- package/dist/{play-icon.entry-7e17d583.cjs → play-icon.entry-c35ade8a.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +71 -70
- package/dist/{refresh-icon.entry-f735be78.cjs → refresh-icon.entry-038501ca.cjs} +1 -1
- package/dist/{refresh-icon.entry-d5e50180.js → refresh-icon.entry-d8644f5d.js} +4 -4
- package/dist/{register-component-a169494c-62768a00.js → register-component-e9c10e19-099fb50f.js} +1 -1
- package/dist/{register-component-a169494c-3d95c4fd.cjs → register-component-e9c10e19-80bbc4dd.cjs} +1 -1
- package/dist/{reply-all-icon.entry-c847636d.cjs → reply-all-icon.entry-ead9d0ba.cjs} +1 -1
- package/dist/{reply-all-icon.entry-848cd16f.js → reply-all-icon.entry-f209daeb.js} +5 -5
- package/dist/reply-icon.entry-b7f35ecd.cjs +1 -0
- package/dist/reply-icon.entry-d37a129b.js +15 -0
- package/dist/{scheduler-config-store-ed4a8dfd-0e3f540f.cjs → scheduler-config-store-ed4a8dfd-0d4408cf.cjs} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-622802c7.js → scheduler-config-store-ed4a8dfd-35ec90c6.js} +1 -1
- package/dist/{scheduler-store-8e74959b-ffa0b3c6.js → scheduler-store-dc3a7958-7c73f5e2.js} +2 -2
- package/dist/{scheduler-store-8e74959b-c8514d9a.cjs → scheduler-store-dc3a7958-99c6bdf6.cjs} +1 -1
- package/dist/sent-icon.entry-b662ef5b.cjs +1 -0
- package/dist/sent-icon.entry-ec433cec.js +15 -0
- package/dist/spam-icon.entry-3a553ae4.js +15 -0
- package/dist/spam-icon.entry-a79819fd.cjs +1 -0
- package/dist/{star-icon.entry-f275321a.cjs → star-icon.entry-47ea44e7.cjs} +1 -1
- package/dist/{star-icon.entry-d7cd7608.js → star-icon.entry-9b22bb32.js} +4 -4
- package/dist/stop-icon.entry-1f7918b2.js +15 -0
- package/dist/{stop-icon.entry-89c2bae7.cjs → stop-icon.entry-26e2e633.cjs} +1 -1
- package/dist/{textarea-component.entry-02360e34.js → textarea-component.entry-6939d0fc.js} +5 -4
- package/dist/textarea-component.entry-da0a861e.cjs +1 -0
- package/dist/toggle-switch.entry-5ae5ba46.js +33 -0
- package/dist/toggle-switch.entry-c5fd3e33.cjs +1 -0
- package/dist/{translate-icon.entry-a7915e82.cjs → translate-icon.entry-72e0369e.cjs} +1 -1
- package/dist/{translate-icon.entry-b0b36e4c.js → translate-icon.entry-8cffa646.js} +2 -2
- package/dist/trash-fill-icon.entry-815859c6.js +15 -0
- package/dist/trash-fill-icon.entry-8620c28f.cjs +1 -0
- package/dist/{underline-icon.entry-1636f401.js → underline-icon.entry-afd9c78b.js} +2 -2
- package/dist/{underline-icon.entry-8bf17177.cjs → underline-icon.entry-ba1a9e87.cjs} +1 -1
- package/dist/{warning-icon.entry-cef2e7c1.js → warning-icon.entry-53441175.js} +7 -7
- package/dist/{warning-icon.entry-27c0cdd6.cjs → warning-icon.entry-7cbede6b.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon.entry-321c1dd1.js +0 -15
- package/dist/bold-icon.entry-06fa4738.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_53.entry-affead77.cjs +0 -6
- package/dist/checkbox-component_3.entry-3918885e.cjs +0 -1
- package/dist/checkbox-component_3.entry-cf9507ac.js +0 -153
- package/dist/chevron-icon_3.entry-27b71bd6.cjs +0 -1
- package/dist/close-icon.entry-791cb99c.js +0 -15
- package/dist/close-icon.entry-be2b5f87.cjs +0 -1
- package/dist/constants-91d76d21-0f7c85cc.cjs +0 -1
- package/dist/document-refresh-icon.entry-1628d0dd.js +0 -15
- package/dist/document-refresh-icon.entry-7d84ace4.cjs +0 -1
- package/dist/forward-icon.entry-7a9952fe.cjs +0 -1
- package/dist/forward-icon.entry-92fa4f95.js +0 -15
- package/dist/google-logo-icon_4.entry-ff5ebfd9.cjs +0 -1
- package/dist/inbox-icon.entry-893a70b6.js +0 -15
- package/dist/inbox-icon.entry-ad864253.cjs +0 -1
- package/dist/index-94416062.cjs +0 -81
- package/dist/input-component.entry-f6f257b9.cjs +0 -1
- package/dist/input-dropdown_2.entry-85077fff.cjs +0 -1
- package/dist/italic-icon.entry-7f971c72.cjs +0 -1
- package/dist/italic-icon.entry-a9a0be67.js +0 -15
- package/dist/multi-select-dropdown.entry-2c5b3f8d.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-d416f896.cjs +0 -1
- package/dist/nylas-scheduling.entry-ce1ef505.cjs +0 -1
- package/dist/nylas-time-window-picker_2.entry-24672606.js +0 -336
- package/dist/nylas-time-window-picker_2.entry-52a54abb.cjs +0 -1
- package/dist/reply-icon.entry-028435a1.cjs +0 -1
- package/dist/reply-icon.entry-9e3e5122.js +0 -15
- package/dist/sent-icon.entry-eef67c1a.cjs +0 -1
- package/dist/sent-icon.entry-f8fda6ff.js +0 -15
- package/dist/spam-icon.entry-22437325.cjs +0 -1
- package/dist/spam-icon.entry-ec4f3144.js +0 -15
- package/dist/stop-icon.entry-55779283.js +0 -15
- package/dist/textarea-component.entry-5e8cb080.cjs +0 -1
- package/dist/trash-fill-icon.entry-1fd28f47.js +0 -15
- package/dist/trash-fill-icon.entry-e933f219.cjs +0 -1
|
@@ -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-81719cc6.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:"d33f632979fb002eaeac36934da133a1fd54b7f8",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"8092526210ad80baf96d932589bf5f32cdee5b9a",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,15 +1,15 @@
|
|
|
1
|
-
import { r as l, h as t } from "./index-
|
|
1
|
+
import { r as l, h as t } from "./index-7e7c24f1.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
const s = ".sc-reply-all-icon-h{display:flex}", i = s,
|
|
4
|
+
const s = ".sc-reply-all-icon-h{display:flex}", i = s, h = class {
|
|
5
5
|
constructor(e) {
|
|
6
6
|
l(this, e), this.width = "15", this.height = "15";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return t("svg", { key: "
|
|
9
|
+
return t("svg", { key: "d33f632979fb002eaeac36934da133a1fd54b7f8", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "8092526210ad80baf96d932589bf5f32cdee5b9a", 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" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
h.style = i;
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
h as reply_all_icon
|
|
15
15
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-81719cc6.cjs");require("react");require("react-dom");const c=".sc-reply-icon-h{display:flex}",s=c,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"c71e29e3fa78e042e9b92767f3b0af3a0e938b9a",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"564cba95c6084cf6c013785df2892227018d9c70",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=s;exports.reply_icon=t;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as s, h as t } from "./index-7e7c24f1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const i = ".sc-reply-icon-h{display:flex}", c = i, h = class {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
s(this, e), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "c71e29e3fa78e042e9b92767f3b0af3a0e938b9a", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "564cba95c6084cf6c013785df2892227018d9c70", 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" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
h.style = c;
|
|
13
|
+
export {
|
|
14
|
+
h as reply_icon
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./index-
|
|
1
|
+
"use strict";const o=require("./index-81719cc6.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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as L, a as F, i as d, j as R } from "./index-
|
|
1
|
+
import { d as L, a as F, i as d, j as R } from "./index-7e7c24f1.js";
|
|
2
2
|
var B;
|
|
3
3
|
(function(o) {
|
|
4
4
|
o.Component = "component", o.Api = "api", o.Auth = "auth";
|
|
@@ -115,7 +115,7 @@ class N {
|
|
|
115
115
|
}
|
|
116
116
|
async makeAPIRequest(e, t, s, i = {}) {
|
|
117
117
|
try {
|
|
118
|
-
const r = new URL(this.schedulerAPIURL), n = "1.3.
|
|
118
|
+
const r = new URL(this.schedulerAPIURL), n = "1.3.6";
|
|
119
119
|
return r.pathname = e, await (await fetch(decodeURIComponent(r.toString()), {
|
|
120
120
|
method: t,
|
|
121
121
|
headers: {
|
package/dist/{scheduler-store-8e74959b-c8514d9a.cjs → scheduler-store-dc3a7958-99c6bdf6.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./index-94416062.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.4";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=$;
|
|
1
|
+
"use strict";const a=require("./index-81719cc6.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.6";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=$;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-81719cc6.cjs");require("react");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:"098aa96cca21e440ea4fe8d8363528fe9b1f277f",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"b981887697dbb3c37cb32993c88324bea80cc098",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"e7985ddf523274e49faee8da881e857a3aaca1ed",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"42a0ba5483a0cc9d79c1215bc5e0f31a406d256d",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};t.style=i;exports.sent_icon=t;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as s, h as t } from "./index-7e7c24f1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const a = ".sc-sent-icon-h{display:flex}", o = a, c = class {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
s(this, e), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "098aa96cca21e440ea4fe8d8363528fe9b1f277f", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "b981887697dbb3c37cb32993c88324bea80cc098", d: "M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "e7985ddf523274e49faee8da881e857a3aaca1ed", d: "M3.5 3.5L12 10.5", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "42a0ba5483a0cc9d79c1215bc5e0f31a406d256d", d: "M3.5 20.5L12 13.5", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
c.style = o;
|
|
13
|
+
export {
|
|
14
|
+
c as sent_icon
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as e, h as t } from "./index-7e7c24f1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const c = ".sc-spam-icon-h{display:flex}", o = c, i = class {
|
|
5
|
+
constructor(s) {
|
|
6
|
+
e(this, s), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "9afff7db1e837c023fb53790efccfcef7a65f93d", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "c5a7463010ca4c71cfe05a6c440233a6a015cb91", 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: "6af1f5931964cb49518df288e37377986df3844e", d: "M2 5L12 12.5L22 5", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
i.style = o;
|
|
13
|
+
export {
|
|
14
|
+
i as spam_icon
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-81719cc6.cjs");require("react");require("react-dom");const c=".sc-spam-icon-h{display:flex}",i=c,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"9afff7db1e837c023fb53790efccfcef7a65f93d",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"c5a7463010ca4c71cfe05a6c440233a6a015cb91",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.h("path",{key:"6af1f5931964cb49518df288e37377986df3844e",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};e.style=i;exports.spam_icon=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-81719cc6.cjs");require("react");require("react-dom");const i=".sc-star-icon-h{display:flex}",r=i,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"298c7143a575df19f6e9fa155cb4c5377a074d9e",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"8aa881c0befd74349f594ab11a428b9a901d53f8",d:"M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z",stroke:"auto","stroke-width":"1.5"}))}};e.style=r;exports.star_icon=e;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as i, h as t } from "./index-7e7c24f1.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
const
|
|
4
|
+
const e = ".sc-star-icon-h{display:flex}", o = e, r = class {
|
|
5
5
|
constructor(s) {
|
|
6
|
-
|
|
6
|
+
i(this, s), this.width = "15", this.height = "15";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return t("svg", { key: "
|
|
9
|
+
return t("svg", { key: "298c7143a575df19f6e9fa155cb4c5377a074d9e", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "8aa881c0befd74349f594ab11a428b9a901d53f8", d: "M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
r.style = o;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as s, h as t } from "./index-7e7c24f1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const e = ".sc-stop-icon-h{display:flex}", i = e, r = class {
|
|
5
|
+
constructor(o) {
|
|
6
|
+
s(this, o), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "21ddd8a23141367d02d6118b65e083a7c35fdae3", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "087eb49291f67ff7d7d536114007d200a86c61e9", d: "M4 4H20V20H4V4Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
r.style = i;
|
|
13
|
+
export {
|
|
14
|
+
r as stop_icon
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-81719cc6.cjs");require("react");require("react-dom");const s=".sc-stop-icon-h{display:flex}",i=s,e=class{constructor(o){t.registerInstance(this,o),this.width="15",this.height="15"}render(){return t.h("svg",{key:"21ddd8a23141367d02d6118b65e083a7c35fdae3",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"087eb49291f67ff7d7d536114007d200a86c61e9",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};e.style=i;exports.stop_icon=e;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as s, c as l, t as r, h as a } from "./index-
|
|
1
|
+
import { r as s, c as l, t as r, h as a } from "./index-7e7c24f1.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
const
|
|
4
|
+
const n = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}textarea:read-only{background-color:var(--nylas-base-100);cursor:not-allowed}', i = n, o = class {
|
|
5
5
|
constructor(e) {
|
|
6
6
|
s(this, e), this.nylasFormInputChanged = l(this, "nylasFormInputChanged", 7), this.name = "textarea", this.defaultValue = void 0, this.label = "", this.placeholder = "", this.required = !1, this.readOnly = !1, this.autoFocus = !1, this.maxLength = 255, this.type = "multi_line_text", this.tooltip = "", this.value = "", this.error = "";
|
|
7
7
|
}
|
|
@@ -15,6 +15,7 @@ const i = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--n
|
|
|
15
15
|
this.validate(this.value), this.error && e.preventDefault();
|
|
16
16
|
}
|
|
17
17
|
handleInput(e) {
|
|
18
|
+
this.error = "";
|
|
18
19
|
const t = e.target;
|
|
19
20
|
this.value = r(t.value), this.nylasFormInputChanged.emit({
|
|
20
21
|
value: this.value,
|
|
@@ -28,10 +29,10 @@ const i = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--n
|
|
|
28
29
|
this.required && !e ? this.error = `${this.label} is required.` : e.length > this.maxLength ? this.error = `${this.label} cannot exceed ${this.maxLength} characters.` : this.error = "";
|
|
29
30
|
}
|
|
30
31
|
render() {
|
|
31
|
-
return a("label", { key: "
|
|
32
|
+
return a("label", { key: "3b3dd5b1c594e2c3b3594826b1f0379925dd14e9", part: "tc__label", class: { error: !!this.error } }, a("p", { key: "0a544d90a3b087c3479412078b1a454261bf20db" }, a("span", { key: "c37a9e870a3ebe502b2db7fbf0968178fc7cc519", class: "label" }, this.label), this.required && a("span", { class: "required" }, "*"), this.tooltip && a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, this.tooltip))), a("textarea", { key: "1be0e90961ebd6110bffd347a930884768429037", name: this.name, title: this.readOnly ? "read-only field" : void 0, placeholder: this.placeholder, readOnly: this.readOnly, autoFocus: this.autoFocus, value: this.value, maxLength: this.maxLength, onInput: (e) => this.handleInput(e), class: { error: !!this.error }, part: "tc__textarea" }), this.error && a("span", { class: "error help-text" }, this.error));
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
|
-
o.style =
|
|
35
|
+
o.style = i;
|
|
35
36
|
export {
|
|
36
37
|
o as textarea_component
|
|
37
38
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-81719cc6.cjs");require("react");require("react-dom");const s=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}textarea:read-only{background-color:var(--nylas-base-100);cursor:not-allowed}',l=s,r=class{constructor(a){e.registerInstance(this,a),this.nylasFormInputChanged=e.createEvent(this,"nylasFormInputChanged",7),this.name="textarea",this.defaultValue=void 0,this.label="",this.placeholder="",this.required=!1,this.readOnly=!1,this.autoFocus=!1,this.maxLength=255,this.type="multi_line_text",this.tooltip="",this.value="",this.error=""}componentDidLoad(){this.value=e.sanitize(this.defaultValue||"")}handleBookingFormSubmitted(a){this.validate(this.value),this.error&&a.preventDefault()}handletriggerValidation(a){this.validate(this.value),this.error&&a.preventDefault()}handleInput(a){this.error="";const t=a.target;this.value=e.sanitize(t.value),this.nylasFormInputChanged.emit({value:this.value,name:this.name,error:this.error,label:this.label,type:this.type})}validate(a){this.required&&!a?this.error=`${this.label} is required.`:a.length>this.maxLength?this.error=`${this.label} cannot exceed ${this.maxLength} characters.`:this.error=""}render(){return e.h("label",{key:"3b3dd5b1c594e2c3b3594826b1f0379925dd14e9",part:"tc__label",class:{error:!!this.error}},e.h("p",{key:"0a544d90a3b087c3479412078b1a454261bf20db"},e.h("span",{key:"c37a9e870a3ebe502b2db7fbf0968178fc7cc519",class:"label"},this.label),this.required&&e.h("span",{class:"required"},"*"),this.tooltip&&e.h("tooltip-component",null,e.h("info-icon",{slot:"tooltip-icon"}),e.h("span",{slot:"tooltip-content"},this.tooltip))),e.h("textarea",{key:"1be0e90961ebd6110bffd347a930884768429037",name:this.name,title:this.readOnly?"read-only field":void 0,placeholder:this.placeholder,readOnly:this.readOnly,autoFocus:this.autoFocus,value:this.value,maxLength:this.maxLength,onInput:a=>this.handleInput(a),class:{error:!!this.error},part:"tc__textarea"}),this.error&&e.h("span",{class:"error help-text"},this.error))}};r.style=l;exports.textarea_component=r;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { r as a, c as t, h as s } from "./index-7e7c24f1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const i = '.switch{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}', c = i, r = class {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
a(this, e), this.nylasFormSwitchToggled = t(this, "nylasFormSwitchToggled", 7), this.name = "toggle-switch", this.checked = !1, this.label = "", this.isChecked = this.checked;
|
|
7
|
+
}
|
|
8
|
+
checkedChanged(e) {
|
|
9
|
+
this.isChecked = e;
|
|
10
|
+
}
|
|
11
|
+
componentWillLoad() {
|
|
12
|
+
this.isChecked = this.checked;
|
|
13
|
+
}
|
|
14
|
+
toggleCheck() {
|
|
15
|
+
this.isChecked = !this.isChecked, this.nylasFormSwitchToggled.emit({
|
|
16
|
+
checked: this.isChecked,
|
|
17
|
+
name: this.name,
|
|
18
|
+
label: this.label
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return s("label", { key: "5a4bb512a82068c6b5dfedc49769ec271acd86fa", class: "switch", part: "ts_label" }, s("input", { key: "99bbb8e63ab8c3c47e92fa75092e41cb706edd9d", type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), s("div", { key: "79bbc2ecc8f1301c051efa635c3177bf2bd97a0b", class: "slider round", part: "ts_slider" }));
|
|
23
|
+
}
|
|
24
|
+
static get watchers() {
|
|
25
|
+
return {
|
|
26
|
+
checked: ["checkedChanged"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
r.style = c;
|
|
31
|
+
export {
|
|
32
|
+
r as toggle_switch
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-81719cc6.cjs");require("react");require("react-dom");const t='.switch{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}',i=t,a=class{constructor(s){e.registerInstance(this,s),this.nylasFormSwitchToggled=e.createEvent(this,"nylasFormSwitchToggled",7),this.name="toggle-switch",this.checked=!1,this.label="",this.isChecked=this.checked}checkedChanged(s){this.isChecked=s}componentWillLoad(){this.isChecked=this.checked}toggleCheck(){this.isChecked=!this.isChecked,this.nylasFormSwitchToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return e.h("label",{key:"5a4bb512a82068c6b5dfedc49769ec271acd86fa",class:"switch",part:"ts_label"},e.h("input",{key:"99bbb8e63ab8c3c47e92fa75092e41cb706edd9d",type:"checkbox",part:"ts_input",name:this.name,checked:this.isChecked,onChange:()=>this.toggleCheck()}),e.h("div",{key:"79bbc2ecc8f1301c051efa635c3177bf2bd97a0b",class:"slider round",part:"ts_slider"}))}static get watchers(){return{checked:["checkedChanged"]}}};a.style=i;exports.toggle_switch=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-81719cc6.cjs");require("react");require("react-dom");const s=".sc-translate-icon-h{display:flex}",i=s,e=class{constructor(t){C.registerInstance(this,t),this.width="16",this.height="16"}render(){return C.h("svg",{key:"6db13b0c797d975d04f0bd2d3efd8bcf8856739b",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 20 20",fill:"none"},C.h("path",{key:"33eaa0513504f0853c5cc7f74a9da40b5de59614",fill:"currentColor",d:"M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z"}))}};e.style=i;exports.translate_icon=e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as s, h as C } from "./index-
|
|
1
|
+
import { r as s, h as C } from "./index-7e7c24f1.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const e = ".sc-translate-icon-h{display:flex}", i = e, o = class {
|
|
@@ -6,7 +6,7 @@ const e = ".sc-translate-icon-h{display:flex}", i = e, o = class {
|
|
|
6
6
|
s(this, t), this.width = "16", this.height = "16";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return C("svg", { key: "
|
|
9
|
+
return C("svg", { key: "6db13b0c797d975d04f0bd2d3efd8bcf8856739b", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 20 20", fill: "none" }, C("path", { key: "33eaa0513504f0853c5cc7f74a9da40b5de59614", fill: "currentColor", d: "M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
o.style = i;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as s, h as t } from "./index-7e7c24f1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const o = ".sc-trash-fill-icon-h{display:flex}", h = o, i = class {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
s(this, e), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "14d4542a27bd57505af117236719a4dcd6396d5f", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "874ed467bba1184fa2ee3be54ffeb02bc5b15560", d: "M3 6H5H21", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "06c19f92bde299f6d73f6c40eb4f9ec8e851281d", 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: "1af5581f75756e04fd6a6274ed5d1c2387076c28", d: "M10 11V17", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "cb31d4d19632e42114a9f760bd4723438f6f0464", d: "M14 11V17", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
i.style = h;
|
|
13
|
+
export {
|
|
14
|
+
i as trash_fill_icon
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-81719cc6.cjs");require("react");require("react-dom");const h=".sc-trash-fill-icon-h{display:flex}",i=h,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"14d4542a27bd57505af117236719a4dcd6396d5f",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"874ed467bba1184fa2ee3be54ffeb02bc5b15560",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"06c19f92bde299f6d73f6c40eb4f9ec8e851281d",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.h("path",{key:"1af5581f75756e04fd6a6274ed5d1c2387076c28",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"cb31d4d19632e42114a9f760bd4723438f6f0464",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}};e.style=i;exports.trash_fill_icon=e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as n, h as e } from "./index-
|
|
1
|
+
import { r as n, h as e } from "./index-7e7c24f1.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const i = ".sc-underline-icon-h{display:flex}", r = i, o = class {
|
|
@@ -6,7 +6,7 @@ const i = ".sc-underline-icon-h{display:flex}", r = i, o = class {
|
|
|
6
6
|
n(this, t), this.width = "15", this.height = "15";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return e("svg", { key: "
|
|
9
|
+
return e("svg", { key: "42ce18b2a4ceef02d49d6e981728a8743ee3f687", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("path", { key: "1f552e6150723ffc768fb78538bb6adaa01c5926", d: "M19 4V10C19 13.866 15.866 17 12 17C8.13401 17 5 13.866 5 10V4M8.5 4V10C8.5 13.2218 10.6766 15.9352 13.6395 16.7501M4 21H20M3 4L10.5 4M17 4L21 4", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
o.style = r;
|
|
@@ -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-81719cc6.cjs");require("react");require("react-dom");const i=".sc-underline-icon-h{display:flex}",r=i,t=class{constructor(n){e.registerInstance(this,n),this.width="15",this.height="15"}render(){return e.h("svg",{key:"42ce18b2a4ceef02d49d6e981728a8743ee3f687",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"1f552e6150723ffc768fb78538bb6adaa01c5926",d:"M19 4V10C19 13.866 15.866 17 12 17C8.13401 17 5 13.866 5 10V4M8.5 4V10C8.5 13.2218 10.6766 15.9352 13.6395 16.7501M4 21H20M3 4L10.5 4M17 4L21 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=r;exports.underline_icon=t;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as n, h as t } from "./index-7e7c24f1.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
const
|
|
5
|
-
constructor(
|
|
6
|
-
|
|
4
|
+
const s = ".sc-warning-icon-h{display:flex}", r = s, e = class {
|
|
5
|
+
constructor(i) {
|
|
6
|
+
n(this, i), this.width = "16", this.height = "16";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return t("svg", { key: "
|
|
9
|
+
return t("svg", { key: "b34f130a672a27ebfdc11770c3581748b8d187e1", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "d37f2b7155b8f15d943afa13e2c975e608a5f364", d: "M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z", fill: "currentColor" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
e.style = r;
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
e as warning_icon
|
|
15
15
|
};
|
|
@@ -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-81719cc6.cjs");require("react");require("react-dom");const n=".sc-warning-icon-h{display:flex}",r=n,t=class{constructor(i){e.registerInstance(this,i),this.width="16",this.height="16"}render(){return e.h("svg",{key:"b34f130a672a27ebfdc11770c3581748b8d187e1",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"d37f2b7155b8f15d943afa13e2c975e608a5f364",d:"M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z",fill:"currentColor"}))}};t.style=r;exports.warning_icon=t;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylas/react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"react": "^18.2.0",
|
|
24
24
|
"react-dom": "^18.2.0",
|
|
25
|
-
"@nylas/web-elements": "^1.3.
|
|
26
|
-
"@nylas/core": "^1.1.
|
|
25
|
+
"@nylas/web-elements": "^1.3.6",
|
|
26
|
+
"@nylas/core": "^1.1.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^20.8.10",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as i, h as t } from "./index-cd93b584.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const c = ".sc-add-circle-icon-h{display:flex}", s = c, h = class {
|
|
5
|
-
constructor(e) {
|
|
6
|
-
i(this, e), this.width = "24", this.height = "25";
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return t("svg", { key: "bebcd56afbd82c29d67e8e36ffc5826ab463b589", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "17e654b7803552ad184a95480bfbd4aeeaa70e89", d: "M12 2.5c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10ZM12 4a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm0 3.5a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7.5Z", fill: "currentColor" }));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
h.style = s;
|
|
13
|
-
export {
|
|
14
|
-
h as add_circle_icon
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-94416062.cjs");require("react");require("react-dom");const i=".sc-bold-icon-h{display:flex}",r=i,t=class{constructor(o){e.registerInstance(this,o),this.width="15",this.height="15"}render(){return e.h("svg",{key:"c4439b5d617da32453a9168669d24f736d5d635a",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"41d2fd4cf46119798f3430d7b4c39efd2df8a018",d:"M6 4V20M9.5 4H15.5C17.7091 4 19.5 5.79086 19.5 8C19.5 10.2091 17.7091 12 15.5 12H9.5H16.5C18.7091 12 20.5 13.7909 20.5 16C20.5 18.2091 18.7091 20 16.5 20H9.5M9.5 4V20M9.5 4H4M9.5 20H4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=r;exports.bold_icon=t;
|