@nylas/react 1.1.0-canary.13 → 1.1.0-canary.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-circle-icon_22.entry-a63de90d.js → add-circle-icon_22.entry-ab0d5ede.js} +5 -5
- package/dist/{add-circle-icon_22.entry-26980c9f.cjs → add-circle-icon_22.entry-c165f0de.cjs} +1 -1
- package/dist/{archive-icon_7.entry-561a5deb.js → archive-icon_7.entry-0dfc9782.js} +1 -1
- package/dist/{archive-icon_7.entry-97628ff8.cjs → archive-icon_7.entry-60311199.cjs} +1 -1
- package/dist/{arrow-icon.entry-68a3ba5b.cjs → arrow-icon.entry-eb53c4cb.cjs} +1 -1
- package/dist/{arrow-icon.entry-c9b46bbc.js → arrow-icon.entry-f38f3014.js} +1 -1
- package/dist/{bold-icon_3.entry-e5a6fea9.js → bold-icon_3.entry-20e74265.js} +1 -1
- package/dist/{bold-icon_3.entry-f8473940.cjs → bold-icon_3.entry-d5100ffa.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-4bc3ceb1.js → calendar-cancel-icon.entry-0bdee178.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-1fd6b27a.cjs → calendar-cancel-icon.entry-e5d1bc0a.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-3f734e43.cjs → calendar-check-icon_2.entry-10af2017.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-a7033bf7.js → calendar-check-icon_2.entry-f18a2ddb.js} +1 -1
- package/dist/{calendar-icon.entry-2f963a7d.js → calendar-icon.entry-12ca0ae4.js} +1 -1
- package/dist/{calendar-icon.entry-2943ea63.cjs → calendar-icon.entry-bc6f0808.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-d10c854b.js → chevron-icon_3.entry-55eb864f.js} +1 -1
- package/dist/{chevron-icon_3.entry-ac1be504.cjs → chevron-icon_3.entry-a18c373d.cjs} +1 -1
- package/dist/{clock-icon_2.entry-7c576457.cjs → clock-icon_2.entry-7cddf901.cjs} +1 -1
- package/dist/{clock-icon_2.entry-c8b0693e.js → clock-icon_2.entry-ffc9e057.js} +1 -1
- package/dist/{close-icon.entry-e01b32cc.js → close-icon.entry-7c67181c.js} +1 -1
- package/dist/{close-icon.entry-5cc5ae00.cjs → close-icon.entry-918dd254.cjs} +1 -1
- package/dist/{constants-f34b9c6e-0e1cb070.cjs → constants-f34b9c6e-108993e8.cjs} +1 -1
- package/dist/{constants-f34b9c6e-ada541f4.js → constants-f34b9c6e-37cabe82.js} +1 -1
- package/dist/{document-refresh-icon.entry-b0927573.cjs → document-refresh-icon.entry-d1f6259a.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-a18e5222.js → document-refresh-icon.entry-e4636c8e.js} +1 -1
- package/dist/{elements-dc5b338e-272b5dff.cjs → elements-dc5b338e-a37a0510.cjs} +1 -1
- package/dist/{elements-dc5b338e-d6cbe948.js → elements-dc5b338e-c6f2806c.js} +1 -1
- package/dist/{focus-visible-e8093c16-d239362e.js → focus-visible-e8093c16-b0821d89.js} +1 -1
- package/dist/{focus-visible-e8093c16-6991ac1b.cjs → focus-visible-e8093c16-b62197ad.cjs} +1 -1
- package/dist/{forward-icon_6.entry-230c7ab2.js → forward-icon_6.entry-2a694e7c.js} +2 -2
- package/dist/{forward-icon_6.entry-ee238c52.cjs → forward-icon_6.entry-b81b22f6.cjs} +1 -1
- package/dist/{globe-icon.entry-539f0052.cjs → globe-icon.entry-c037589b.cjs} +1 -1
- package/dist/{globe-icon.entry-e8c272c0.js → globe-icon.entry-e794eb52.js} +1 -1
- package/dist/{google-logo-icon_4.entry-a5add4b4.cjs → google-logo-icon_4.entry-748af8c3.cjs} +1 -1
- package/dist/{google-logo-icon_4.entry-0c46cddd.js → google-logo-icon_4.entry-b4464873.js} +3 -3
- package/dist/index-53420959-31867ccf.js +5 -0
- package/dist/index-53420959-535906ce.cjs +1 -0
- package/dist/{index-553c0327.cjs → index-6a4ee4f8.cjs} +2 -2
- package/dist/{index-cd0e2d77.js → index-d61429c6.js} +40 -40
- package/dist/{index-ef01c714-d85134a4.js → index-ef01c714-1e2feefc.js} +2 -2
- package/dist/{index-ef01c714-839c3029.cjs → index-ef01c714-54e17405.cjs} +1 -1
- package/dist/{index.es-74f70f7d-1d137fdb.cjs → index.es-74f70f7d-a22eba35.cjs} +1 -1
- package/dist/{index.es-74f70f7d-960f947f.js → index.es-74f70f7d-da0e7fcf.js} +1 -1
- package/dist/{info-icon_2.entry-00ea6504.cjs → info-icon_2.entry-23e3fa8a.cjs} +1 -1
- package/dist/{info-icon_2.entry-42f77d4b.js → info-icon_2.entry-647915bb.js} +1 -1
- package/dist/{loading-icon.entry-0692e093.js → loading-icon.entry-1ddd0244.js} +1 -1
- package/dist/{loading-icon.entry-fb7464c3.cjs → loading-icon.entry-98d65a5d.cjs} +1 -1
- package/dist/{mailbox-store-050a2914-cfb1b1c0.js → mailbox-store-050a2914-6fef25fb.js} +2 -2
- package/dist/{mailbox-store-050a2914-9c975586.cjs → mailbox-store-050a2914-bd0a86bb.cjs} +1 -1
- package/dist/{nylas-additional-participants.entry-1d7bda06.js → nylas-additional-participants.entry-0f93e24e.js} +2 -2
- package/dist/{nylas-additional-participants.entry-d97b8bb4.cjs → nylas-additional-participants.entry-3c598863.cjs} +1 -1
- package/dist/nylas-booked-event-card_10.entry-912e4a89.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-041a10c7.js → nylas-booked-event-card_10.entry-9f7869af.js} +13 -13
- package/dist/{nylas-custom-booking-flow.entry-ced72cc5.js → nylas-custom-booking-flow.entry-69638c50.js} +2 -2
- package/dist/{nylas-custom-booking-flow.entry-3ec838df.cjs → nylas-custom-booking-flow.entry-877cac85.cjs} +1 -1
- package/dist/{nylas-form-card.entry-8d594514.cjs → nylas-form-card.entry-4349d07d.cjs} +1 -1
- package/dist/{nylas-form-card.entry-9b8176ad.js → nylas-form-card.entry-b2da5266.js} +2 -2
- package/dist/{nylas-if-state.entry-eb11630d.js → nylas-if-state.entry-62474acb.js} +2 -2
- package/dist/{nylas-if-state.entry-445ec109.cjs → nylas-if-state.entry-9eade180.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-822436d4.js → nylas-list-folders.entry-348a784b.js} +2 -2
- package/dist/{nylas-list-folders.entry-32a1e254.cjs → nylas-list-folders.entry-b32ec92a.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-181872dd.cjs → nylas-list-threads.entry-7e8044b2.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-0186e9e7.js → nylas-list-threads.entry-ec1c5fb6.js} +2 -2
- package/dist/{nylas-login.entry-0261e74e.cjs → nylas-login.entry-0495d0b5.cjs} +1 -1
- package/dist/{nylas-login.entry-7460c1d4.js → nylas-login.entry-f6f1e306.js} +2 -2
- package/dist/{nylas-mailbox-pagination.entry-eaf08163.cjs → nylas-mailbox-pagination.entry-22385ead.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-107b3fbc.js → nylas-mailbox-pagination.entry-24c82c53.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-40e8d9ad.js → nylas-mailbox-toolbar-button.entry-b13b2a58.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-23fc08a6.cjs → nylas-mailbox-toolbar-button.entry-e8e52474.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-2199a6b4.js → nylas-mailbox.entry-0365fbb0.js} +3 -3
- package/dist/{nylas-mailbox.entry-de8618eb.cjs → nylas-mailbox.entry-77f4c37e.cjs} +1 -1
- package/dist/{nylas-provider.entry-a8f8bad2.js → nylas-provider.entry-11239372.js} +5 -5
- package/dist/{nylas-provider.entry-11a95d86.cjs → nylas-provider.entry-d454a4d1.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-73794266.cjs → nylas-scheduler-editor.entry-16473950.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-c58c813c.js → nylas-scheduler-editor.entry-c4d38853.js} +4 -4
- package/dist/{nylas-scheduling.entry-b449ab24.cjs → nylas-scheduling.entry-5b156a28.cjs} +1 -1
- package/dist/{nylas-scheduling.entry-fe9d6b69.js → nylas-scheduling.entry-cc2535a9.js} +3 -3
- package/dist/{nylas-threads-refresh.entry-c8438752.js → nylas-threads-refresh.entry-5a6378fe.js} +2 -2
- package/dist/{nylas-threads-refresh.entry-4f17fa6c.cjs → nylas-threads-refresh.entry-725ef87d.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-b1f88916.js → nylas-threads-search.entry-5e7b6a03.js} +2 -2
- package/dist/{nylas-threads-search.entry-0ed36372.cjs → nylas-threads-search.entry-a2553cbe.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-8dfe1352.js → nylas-view-thread.entry-249f0b65.js} +2 -2
- package/dist/{nylas-view-thread.entry-c50bea78.cjs → nylas-view-thread.entry-98f8e35b.cjs} +1 -1
- package/dist/{people-icon.entry-0875cac0.cjs → people-icon.entry-0ab4b752.cjs} +1 -1
- package/dist/{people-icon.entry-8392a21c.js → people-icon.entry-0ed95db0.js} +1 -1
- package/dist/{play-icon_2.entry-4a15f215.js → play-icon_2.entry-433a8722.js} +1 -1
- package/dist/{play-icon_2.entry-d6ff1cc3.cjs → play-icon_2.entry-f9c0b647.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-1ebb9376.cjs → refresh-icon.entry-508a246d.cjs} +1 -1
- package/dist/{refresh-icon.entry-76b2d888.js → refresh-icon.entry-b5bee0f4.js} +1 -1
- package/dist/{register-component-e4dc8778-408dc241.js → register-component-e4dc8778-53fe0729.js} +1 -1
- package/dist/{register-component-e4dc8778-99eb91ca.cjs → register-component-e4dc8778-7812a275.cjs} +1 -1
- package/dist/{scheduler-config-store-ec3b6190-f292fe19.js → scheduler-config-store-ec3b6190-01892765.js} +1 -1
- package/dist/{scheduler-config-store-ec3b6190-4abd56df.cjs → scheduler-config-store-ec3b6190-435c84ca.cjs} +1 -1
- package/dist/{scheduler-store-3afbcda0-166e84ff.cjs → scheduler-store-04e15f8a-5d06eaf3.cjs} +1 -1
- package/dist/{scheduler-store-3afbcda0-53680387.js → scheduler-store-04e15f8a-69eb8d7a.js} +61 -60
- package/dist/{time-period-selector.entry-846b64bd.cjs → time-period-selector.entry-77a6debf.cjs} +1 -1
- package/dist/{time-period-selector.entry-f6128367.js → time-period-selector.entry-a29c8ffa.js} +1 -1
- package/dist/{translate-icon.entry-84778350.js → translate-icon.entry-c34bad94.js} +1 -1
- package/dist/{translate-icon.entry-f3060124.cjs → translate-icon.entry-f77cfd3d.cjs} +1 -1
- package/dist/{warning-icon.entry-246eb6fb.cjs → warning-icon.entry-f73b31bf.cjs} +1 -1
- package/dist/{warning-icon.entry-eeaae1a7.js → warning-icon.entry-f781a623.js} +1 -1
- package/package.json +2 -2
- package/dist/index-53420959-71fdd6ef.js +0 -5
- package/dist/index-53420959-f15601a9.cjs +0 -1
- package/dist/nylas-booked-event-card_10.entry-dfec7c8d.cjs +0 -1
package/dist/{nylas-threads-search.entry-0ed36372.cjs → nylas-threads-search.entry-a2553cbe.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-6a4ee4f8.cjs"),h=require("./register-component-e4dc8778-7812a275.cjs");require("react");require("react-dom");const u=":host{display:block}sp-search{width:100%;border:0}",y=u;var p=function(t,e,s,n){var c=arguments.length,r=c<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,s,n);else for(var i=t.length-1;i>=0;i--)(o=t[i])&&(r=(c<3?o(r):c>3?o(e,s,r):o(e,s))||r);return c>3&&r&&Object.defineProperty(e,s,r),r},d=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)};const l=class{constructor(t){a.registerInstance(this,t),this.search=a.createEvent(this,"search",7),this.onSearch=async e=>{e.preventDefault(),e.stopPropagation();const n=e.target.value;n!==this.internalQuery&&(this.internalQuery=n,this.search.emit(this.internalQuery))},this.query="",this.internalQuery=""}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){a.debug("[nylas-threads-search] Component will load")}async componentDidLoad(){a.debug("[nylas-threads-search] Component did load")}onQueryChange(){this.internalQuery=this.query}render(){return a.h(a.Host,{key:"68e8680d1bc8e1759d107a55cbb7800af9649e26"},a.h("sp-theme",{key:"3db0639a471c232768415572cea28a1c1b585f92",scale:"medium",color:"dark"},a.h("sp-search",{key:"b1de12d2a5d4983d656c1c16dfa67796621ded10",quiet:!0,onSubmit:this.onSearch,onBlur:this.onSearch,value:this.internalQuery})))}static get watchers(){return{query:["onQueryChange"]}}};p([h.RegisterComponent({name:"nylas-pagination",stateToProps:new Map([["mailbox.searchQuery","query"]]),eventToProps:{search:async(t,e)=>{await e.threads.getThreads({search_query_native:t.detail||void 0,page_token:void 0})}},fireRegisterEvent:!0}),d("design:type",Function),d("design:paramtypes",[]),d("design:returntype",void 0)],l.prototype,"render",null);l.style=y;exports.nylas_threads_search=l;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as k, c as p, d, h as a, t as M, F as m, H as x, g as E, o as D, a as S, p as g } from "./index-
|
|
2
|
-
import { R as T } from "./register-component-e4dc8778-
|
|
1
|
+
import { r as k, c as p, d, h as a, t as M, F as m, H as x, g as E, o as D, a as S, p as g } from "./index-d61429c6.js";
|
|
2
|
+
import { R as T } from "./register-component-e4dc8778-53fe0729.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
function R(t, e, s, o, r) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-553c0327.cjs"),f=require("./register-component-e4dc8778-99eb91ca.cjs");require("react");require("react-dom");function w(t,a,s,o,r){if(!o||!s||s.children.length>0)return;e.debug("[nylas-view-thread] Rendering email",{message:t,attachments:a,viewEmailElement:o});const n=o.cloneNode(!0);n.message=t.data,n.parent=r,s.appendChild(n)}const c=({viewEmailElement:t,message:a,attachments:s,onMessageClick:o,onShowContactDataClick:r,parent:n})=>{var l,i,d,g,u,v,y;return e.h(e.Fragment,null,e.h("div",{key:a.id,class:"message"},e.h("div",{class:"sub-header","data-id":a.data.id,onClick:o},e.h("div",{class:"avatar"},a.data.from&&((l=a.data.from[0])==null?void 0:l.name)&&((d=(i=a.data.from[0])==null?void 0:i.name[0])==null?void 0:d.toUpperCase())),e.h("div",{class:"from"},e.h("span",{class:"name"},a.data.from&&((g=a.data.from[0])==null?void 0:g.name))," ",e.h("span",{class:"email"},a.data.from&&((u=a.data.from[0])==null?void 0:u.email))),e.h("div",{class:"date"},new Date(a.data.date*1e3).toLocaleTimeString(void 0,{timeStyle:"short"})," ","(",e.formatTimeAgo(new Date(a.data.date*1e3)),")"),e.h("sp-button-group",{class:"buttons"},e.h("nylas-summarize-message-button",{message:a.data})),a.collapse&&e.h("div",{class:"snippet"},a.data.snippet),!a.collapse&&a.data.to&&e.h("div",{class:"to"},e.h("span",null,"to")," ",e.formatParticipants(a.data.to)," ",e.h("button",{type:"button",value:a.data.id,onClick:r,class:{expand:!0,"expand--showContactData":a.showContactData}},e.h("chevron-icon",null)))),a.showContactData&&e.h("div",{class:"address-info"},e.h("div",{class:"label"},"From"),e.h("div",{class:"value"},e.formatRecipient((v=a.data)!=null&&v.from?(y=a==null?void 0:a.data)==null?void 0:y.from[0]:{name:"",email:""})),a.data.to&&e.h(e.Fragment,null,e.h("div",{class:"label"},"To"),e.h("div",{class:"value"},a.data.to.map(h=>e.h("div",null,e.formatRecipient(h))))),typeof a.data.cc<"u"&&a.data.cc.length>0&&e.h(e.Fragment,null,e.h("div",{class:"label"},"CC"),e.h("div",{class:"value"},a.data.cc.map(h=>e.h("div",null,e.formatRecipient(h)))))),!a.collapse&&t&&e.h("div",{key:a.id,ref:h=>w(a,s,h,t,n)}),!a.collapse&&!t&&e.h("nylas-view-email",{key:a.id,message:a.data,parent:n})),e.h("hr",null))},b=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}',C=b;var k=function(t,a,s,o){var r=arguments.length,n=r<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,s):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,a,s,o);else for(var i=t.length-1;i>=0;i--)(l=t[i])&&(n=(r<3?l(n):r>3?l(a,s,n):l(a,s))||n);return r>3&&n&&Object.defineProperty(a,s,n),n},m=function(t,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,a)};const p=class{constructor(t){e.registerInstance(this,t),this.threadSelected=e.createEvent(this,"threadSelected",7),this.showContactDataClicked=e.createEvent(this,"showContactDataClicked",7),this.messageClicked=e.createEvent(this,"messageClicked",7),this.nylasViewEmailElement=null,this.nylasComposerElement=null,this.onShowContactDataClick=a=>{a.stopPropagation();const o=a.target.value,r=this.internalMessages.find(l=>l.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.showContactDataClicked.emit(r.data).defaultPrevented||(r.showContactData=!r.showContactData,this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] show contact data clicked ${o} ${r.showContactData?"collapsed":"expanded"}`)},this.onMessageClick=a=>{var l;const o=a.target.dataset.id,r=this.internalMessages.find(i=>i.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.messageClicked.emit(r.data).defaultPrevented||(r.id!==((l=this.internalMessages[this.internalMessages.length-1])==null?void 0:l.id)&&(r.collapse=!r.collapse,r.collapse&&(r.showContactData=!1)),this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] message clicked ${o} ${r.collapse?"collapsed":"expanded"}`)},this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails},this.showComposerClick=()=>{this.showComposer=!this.showComposer},this.draft=void 0,this.thread=void 0,this.messages=[],this.attachments=[],this.state="loading",this.internalMessages=[],this.showAllEmails=!1,this.showComposer=!1}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){e.debug("[nylas-view-thread] Component will load"),this.updateInternalMessages(this.messages);const t=this.host.querySelector("template.nylas-view-email");if(!t){e.debug("[nylas-view-thread] Could not find template");return}const a=document.importNode(t.content,!0);this.nylasViewEmailElement=a.querySelector("nylas-view-email");const s=this.host.querySelector("template.nylas-composer");if(!s){e.debug("[nylas-view-thread] Could not find composer template");return}const o=document.importNode(s.content,!0);this.nylasComposerElement=o.querySelector("nylas-composer")}async componentDidLoad(){e.debug("[nylas-view-thread] Component did load")}async threadChanged(t){e.debug("[nylas-view-thread] Thread changed",{thread:t}),this.internalMessages=[],this.threadSelected.emit(t).defaultPrevented||e.debug("[nylas-view-thread] Default event not prevented, initializing")}updateInternalMessages(t){e.debug("[nylas-view-thread] Updating internal messages",{messages:t});const a=t.sort((s,o)=>s.date>o.date?1:-1).map((s,o)=>({id:s.id,data:s,collapse:o!==t.length-1,showContactData:!1}));this.internalMessages=a}render(){var r,n,l;const t=this.internalMessages.length>2?this.internalMessages[0]:null,a=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length),s=this.internalMessages.slice(1,this.internalMessages.length-2),o=this.internalMessages[this.internalMessages.length-1];return e.h(e.Host,{key:"0ca88dfdd89757807989ac245c9caffe748a8470"},e.h("sp-theme",{key:"ca9e6baaa286280553e320885394df7ca24d3ca0",scale:"medium",color:"dark"},e.h("div",{key:"dc21c4dfd2b7c17bcfd33a0c6ea2bbdf4988e69d",class:"view-thread"},e.h("div",{key:"7b4cb76fe861eb5b84c95e7f9b57f35fe738bfef",class:"header"},e.h("div",{key:"dd0d6a31ef7521be968ec6f6044634226389dca4",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"208433705edff4d5edcc9db18c62721dfd508378",class:"folders"},(l=(n=this.thread)==null?void 0:n.folders)==null?void 0:l.map(i=>e.h("sp-tag",{size:"s"},e.toTitleCase(i.replace("CATEGORY_","").replace("_"," ")))))),e.h("div",{key:"7ad7fff2d563593c18bd21f7f342208fb0235b33",class:"messages"},t&&e.h(c,{message:t,attachments:this.attachments.filter(i=>i.messageId===t.id),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),s.length>0&&this.messages.length>1&&!this.showAllEmails&&a.length>0&&e.h(e.Fragment,null,e.h("div",{class:"show-more"},e.h("button",{type:"button",onClick:this.onShowAllEmailsClick},e.h("span",{class:"avatar"},s.length)," ",e.h("span",{class:"sr-only"},"Show ",s.length," more emails"))),e.h("hr",null)),s.length>0&&this.showAllEmails&&this.messages.length>2&&s.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})),a.length>0&&a.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),!(this.showComposer&&o)&&e.h("div",{class:"reply-buttons"},e.h("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e.h("span",{slot:"icon"},e.h("reply-icon",null)),e.h("span",null,"Reply")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("reply-all-icon",null)),e.h("span",null,"Reply All")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("forward-icon",null)),e.h("span",null,"Forward"))),this.showComposer&&o&&e.h("div",{class:"composer"},e.h("nylas-composer",{message:o.data,onClose:this.showComposerClick,onSend:i=>{e.debug("[nylas-view-thread] Send event",{message:i.detail.message,replyBody:i.detail.replyBody})}})))))}get host(){return e.getElement(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};k([f.RegisterComponent({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(t,a)=>{e.debug("[nylas-view-thread] Nylas init event. Fetching thread messages.",{event:t});const s=t.detail;s&&s.id&&await a.messages.getThreadMessages(s.id)}},fireRegisterEvent:!0}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],p.prototype,"render",null);p.style=C;exports.nylas_view_thread=p;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-6a4ee4f8.cjs"),f=require("./register-component-e4dc8778-7812a275.cjs");require("react");require("react-dom");function w(t,a,s,o,r){if(!o||!s||s.children.length>0)return;e.debug("[nylas-view-thread] Rendering email",{message:t,attachments:a,viewEmailElement:o});const n=o.cloneNode(!0);n.message=t.data,n.parent=r,s.appendChild(n)}const c=({viewEmailElement:t,message:a,attachments:s,onMessageClick:o,onShowContactDataClick:r,parent:n})=>{var l,i,d,g,u,v,y;return e.h(e.Fragment,null,e.h("div",{key:a.id,class:"message"},e.h("div",{class:"sub-header","data-id":a.data.id,onClick:o},e.h("div",{class:"avatar"},a.data.from&&((l=a.data.from[0])==null?void 0:l.name)&&((d=(i=a.data.from[0])==null?void 0:i.name[0])==null?void 0:d.toUpperCase())),e.h("div",{class:"from"},e.h("span",{class:"name"},a.data.from&&((g=a.data.from[0])==null?void 0:g.name))," ",e.h("span",{class:"email"},a.data.from&&((u=a.data.from[0])==null?void 0:u.email))),e.h("div",{class:"date"},new Date(a.data.date*1e3).toLocaleTimeString(void 0,{timeStyle:"short"})," ","(",e.formatTimeAgo(new Date(a.data.date*1e3)),")"),e.h("sp-button-group",{class:"buttons"},e.h("nylas-summarize-message-button",{message:a.data})),a.collapse&&e.h("div",{class:"snippet"},a.data.snippet),!a.collapse&&a.data.to&&e.h("div",{class:"to"},e.h("span",null,"to")," ",e.formatParticipants(a.data.to)," ",e.h("button",{type:"button",value:a.data.id,onClick:r,class:{expand:!0,"expand--showContactData":a.showContactData}},e.h("chevron-icon",null)))),a.showContactData&&e.h("div",{class:"address-info"},e.h("div",{class:"label"},"From"),e.h("div",{class:"value"},e.formatRecipient((v=a.data)!=null&&v.from?(y=a==null?void 0:a.data)==null?void 0:y.from[0]:{name:"",email:""})),a.data.to&&e.h(e.Fragment,null,e.h("div",{class:"label"},"To"),e.h("div",{class:"value"},a.data.to.map(h=>e.h("div",null,e.formatRecipient(h))))),typeof a.data.cc<"u"&&a.data.cc.length>0&&e.h(e.Fragment,null,e.h("div",{class:"label"},"CC"),e.h("div",{class:"value"},a.data.cc.map(h=>e.h("div",null,e.formatRecipient(h)))))),!a.collapse&&t&&e.h("div",{key:a.id,ref:h=>w(a,s,h,t,n)}),!a.collapse&&!t&&e.h("nylas-view-email",{key:a.id,message:a.data,parent:n})),e.h("hr",null))},b=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}',C=b;var k=function(t,a,s,o){var r=arguments.length,n=r<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,s):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,a,s,o);else for(var i=t.length-1;i>=0;i--)(l=t[i])&&(n=(r<3?l(n):r>3?l(a,s,n):l(a,s))||n);return r>3&&n&&Object.defineProperty(a,s,n),n},m=function(t,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,a)};const p=class{constructor(t){e.registerInstance(this,t),this.threadSelected=e.createEvent(this,"threadSelected",7),this.showContactDataClicked=e.createEvent(this,"showContactDataClicked",7),this.messageClicked=e.createEvent(this,"messageClicked",7),this.nylasViewEmailElement=null,this.nylasComposerElement=null,this.onShowContactDataClick=a=>{a.stopPropagation();const o=a.target.value,r=this.internalMessages.find(l=>l.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.showContactDataClicked.emit(r.data).defaultPrevented||(r.showContactData=!r.showContactData,this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] show contact data clicked ${o} ${r.showContactData?"collapsed":"expanded"}`)},this.onMessageClick=a=>{var l;const o=a.target.dataset.id,r=this.internalMessages.find(i=>i.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.messageClicked.emit(r.data).defaultPrevented||(r.id!==((l=this.internalMessages[this.internalMessages.length-1])==null?void 0:l.id)&&(r.collapse=!r.collapse,r.collapse&&(r.showContactData=!1)),this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] message clicked ${o} ${r.collapse?"collapsed":"expanded"}`)},this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails},this.showComposerClick=()=>{this.showComposer=!this.showComposer},this.draft=void 0,this.thread=void 0,this.messages=[],this.attachments=[],this.state="loading",this.internalMessages=[],this.showAllEmails=!1,this.showComposer=!1}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){e.debug("[nylas-view-thread] Component will load"),this.updateInternalMessages(this.messages);const t=this.host.querySelector("template.nylas-view-email");if(!t){e.debug("[nylas-view-thread] Could not find template");return}const a=document.importNode(t.content,!0);this.nylasViewEmailElement=a.querySelector("nylas-view-email");const s=this.host.querySelector("template.nylas-composer");if(!s){e.debug("[nylas-view-thread] Could not find composer template");return}const o=document.importNode(s.content,!0);this.nylasComposerElement=o.querySelector("nylas-composer")}async componentDidLoad(){e.debug("[nylas-view-thread] Component did load")}async threadChanged(t){e.debug("[nylas-view-thread] Thread changed",{thread:t}),this.internalMessages=[],this.threadSelected.emit(t).defaultPrevented||e.debug("[nylas-view-thread] Default event not prevented, initializing")}updateInternalMessages(t){e.debug("[nylas-view-thread] Updating internal messages",{messages:t});const a=t.sort((s,o)=>s.date>o.date?1:-1).map((s,o)=>({id:s.id,data:s,collapse:o!==t.length-1,showContactData:!1}));this.internalMessages=a}render(){var r,n,l;const t=this.internalMessages.length>2?this.internalMessages[0]:null,a=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length),s=this.internalMessages.slice(1,this.internalMessages.length-2),o=this.internalMessages[this.internalMessages.length-1];return e.h(e.Host,{key:"0ca88dfdd89757807989ac245c9caffe748a8470"},e.h("sp-theme",{key:"ca9e6baaa286280553e320885394df7ca24d3ca0",scale:"medium",color:"dark"},e.h("div",{key:"dc21c4dfd2b7c17bcfd33a0c6ea2bbdf4988e69d",class:"view-thread"},e.h("div",{key:"7b4cb76fe861eb5b84c95e7f9b57f35fe738bfef",class:"header"},e.h("div",{key:"dd0d6a31ef7521be968ec6f6044634226389dca4",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"208433705edff4d5edcc9db18c62721dfd508378",class:"folders"},(l=(n=this.thread)==null?void 0:n.folders)==null?void 0:l.map(i=>e.h("sp-tag",{size:"s"},e.toTitleCase(i.replace("CATEGORY_","").replace("_"," ")))))),e.h("div",{key:"7ad7fff2d563593c18bd21f7f342208fb0235b33",class:"messages"},t&&e.h(c,{message:t,attachments:this.attachments.filter(i=>i.messageId===t.id),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),s.length>0&&this.messages.length>1&&!this.showAllEmails&&a.length>0&&e.h(e.Fragment,null,e.h("div",{class:"show-more"},e.h("button",{type:"button",onClick:this.onShowAllEmailsClick},e.h("span",{class:"avatar"},s.length)," ",e.h("span",{class:"sr-only"},"Show ",s.length," more emails"))),e.h("hr",null)),s.length>0&&this.showAllEmails&&this.messages.length>2&&s.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})),a.length>0&&a.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),!(this.showComposer&&o)&&e.h("div",{class:"reply-buttons"},e.h("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e.h("span",{slot:"icon"},e.h("reply-icon",null)),e.h("span",null,"Reply")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("reply-all-icon",null)),e.h("span",null,"Reply All")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("forward-icon",null)),e.h("span",null,"Forward"))),this.showComposer&&o&&e.h("div",{class:"composer"},e.h("nylas-composer",{message:o.data,onClose:this.showComposerClick,onSend:i=>{e.debug("[nylas-view-thread] Send event",{message:i.detail.message,replyBody:i.detail.replyBody})}})))))}get host(){return e.getElement(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};k([f.RegisterComponent({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(t,a)=>{e.debug("[nylas-view-thread] Nylas init event. Fetching thread messages.",{event:t});const s=t.detail;s&&s.id&&await a.messages.getThreadMessages(s.id)}},fireRegisterEvent:!0}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],p.prototype,"render",null);p.style=C;exports.nylas_view_thread=p;
|
|
@@ -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-6a4ee4f8.cjs");require("react");require("react-dom");const i=".sc-people-icon-h{display:flex}",o=i,t=class{constructor(c){e.registerInstance(this,c),this.width="20",this.height="20"}render(){return e.h("svg",{key:"21f5c83078e58144ee7c9f5a6565541f3c36fe35",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,fill:"none",viewBox:"0 0 20 20"},e.h("path",{key:"a5d9d7f7955cf989f7eecde224c03cb25de7a1a9",fill:"currentColor",d:"M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"}))}};t.style=o;exports.people_icon=t;
|
|
@@ -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-6a4ee4f8.cjs");require("react");require("react-dom");const o=".sc-play-icon-h{display:flex}",n=o,s=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"1bd5a580b847a4c98fb007663b45f429bbd55a3e",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"f4e93263c3fd8256e78a38be380ad163f1dfbefd",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=n;const h=".sc-stop-icon-h{display:flex}",r=h,i=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"0ff510fbb93840a431b7610d9c3e79b0a18ca65b",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"86c9d470f0656be196d4bfff3bac936ffac0ebf5",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=r;exports.play_icon=s;exports.stop_icon=i;
|
package/dist/react.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-6a4ee4f8.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.ChevronIcon=o.ChevronIcon;exports.ClockIcon=o.ClockIcon;exports.CloseIcon=o.CloseIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.InputDropdown=o.InputDropdown;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasComposer=o.NylasComposer;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventLocation=o.NylasEventLocation;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasListFolders=o.NylasListFolders;exports.NylasListThreads=o.NylasListThreads;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMailbox=o.NylasMailbox;exports.NylasMailboxPagination=o.NylasMailboxPagination;exports.NylasMailboxToolbarButton=o.NylasMailboxToolbarButton;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasProvider=o.NylasProvider;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasSummarizeMessageButton=o.NylasSummarizeMessageButton;exports.NylasThreadsRefresh=o.NylasThreadsRefresh;exports.NylasThreadsSearch=o.NylasThreadsSearch;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.NylasViewEmail=o.NylasViewEmail;exports.NylasViewThread=o.NylasViewThread;exports.PeopleIcon=o.PeopleIcon;exports.PersonIcon=o.PersonIcon;exports.PlayIcon=o.PlayIcon;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TimePeriodSelector=o.TimePeriodSelector;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, a0 as l, a1 as c, a2 as i, a3 as r, a4 as t, a5 as y, a6 as N, a7 as I, a8 as d, a9 as b, aa as C, ab as m, ac as p, ad as f, ae as h, af as u, ag as g, ah as k, ai as P, aj as S, ak as E, al as L, am as T, an as v, ao as w, ap as B, aq as F, ar as M, as as D, at as x, au as A, av as R, aw as W, ax as G, ay as V, az as j, aA as q, aB as z, aC as O, aD as U, aE as X, aF as Y, aG as Z, aH as _, aI as $, aJ as H, aK as J, aL as K, N as Q, aM as aa, aN as sa, aO as oa, aP as na, aQ as ea, aR as la, aS as ca, aT as ia, aU as ra, aV as ta, aW as ya, aX as Na, aY as Ia, aZ as da, a_ as ba, a$ as Ca, b0 as ma, b1 as pa, b2 as fa, b3 as ha, b4 as ua, b5 as ga, b6 as ka, b7 as Pa, b8 as Sa, b9 as Ea, ba as La, bb as Ta, bc as va, bd as wa, be as Ba, bf as Fa, bg as Ma, bh as Da, bi as xa, bj as Aa, bk as Ra, bl as Wa, bm as Ga, bn as Va, bo as ja, bp as qa, Y as za, Z as Oa, _ as Ua, X as Xa } from "./index-
|
|
1
|
+
import { $ as e, a0 as l, a1 as c, a2 as i, a3 as r, a4 as t, a5 as y, a6 as N, a7 as I, a8 as d, a9 as b, aa as C, ab as m, ac as p, ad as f, ae as h, af as u, ag as g, ah as k, ai as P, aj as S, ak as E, al as L, am as T, an as v, ao as w, ap as B, aq as F, ar as M, as as D, at as x, au as A, av as R, aw as W, ax as G, ay as V, az as j, aA as q, aB as z, aC as O, aD as U, aE as X, aF as Y, aG as Z, aH as _, aI as $, aJ as H, aK as J, aL as K, N as Q, aM as aa, aN as sa, aO as oa, aP as na, aQ as ea, aR as la, aS as ca, aT as ia, aU as ra, aV as ta, aW as ya, aX as Na, aY as Ia, aZ as da, a_ as ba, a$ as Ca, b0 as ma, b1 as pa, b2 as fa, b3 as ha, b4 as ua, b5 as ga, b6 as ka, b7 as Pa, b8 as Sa, b9 as Ea, ba as La, bb as Ta, bc as va, bd as wa, be as Ba, bf as Fa, bg as Ma, bh as Da, bi as xa, bj as Aa, bk as Ra, bl as Wa, bm as Ga, bn as Va, bo as ja, bp as qa, Y as za, Z as Oa, _ as Ua, X as Xa } from "./index-d61429c6.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
export {
|
|
@@ -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-6a4ee4f8.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:"ff21d2187a982b6410165e4e51d23bc8f7296d24",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:"ba8d5de9ffc1095b2ca6fd0c3181301a7d6e33d2",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-e4dc8778-99eb91ca.cjs → register-component-e4dc8778-7812a275.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./index-
|
|
1
|
+
"use strict";const s=require("./index-6a4ee4f8.cjs");function m(e,o,u="registerComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function P(e,o,u="unregisterComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,u)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${u}`);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()),i=n.filter(c=>t.includes(c));if(i.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${i.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),i={element:t,...e,eventToProps:d},c=m(o,i,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),i={element:t,...e,eventToProps:d},c=P(o,i,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./index-
|
|
1
|
+
"use strict";const i=require("./index-6a4ee4f8.cjs");function c(n={}){const o={selectedConfiguration:{},configurations:[],calendars:[],currentUser:null,action:null,...n},e=i.createStore(o);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async r=>{r||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=c;
|
package/dist/{scheduler-store-3afbcda0-166e84ff.cjs → scheduler-store-04e15f8a-5d06eaf3.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const v=require("./index-553c0327.cjs");exports.ErrorCategory=void 0;(function(o){o.Component="component",o.Api="api",o.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var P;(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.invalid_start_time="invalid_start_time",o.invalid_end_time="invalid_end_time",o.invalid_timezone="invalid_timezone"})(P||(P={}));var k;(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"})(k||(k={}));class z{constructor(){this.component=e=>{const i=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(t='"endtime" can not be in the future')=>({title:s,message:t,category:i}),no_booking_info:(t="No booking info provided")=>({title:s,message:t,category:i}),no_timeslot_selected:(t="No timeslot selected")=>({title:s,message:t,category:i}),no_timezone_selected:(t="No timezone selected")=>({title:s,message:t,category:i}),no_booking_id:(t="No booking id provided")=>({title:s,message:t,category:i}),invalid_start_time:(t="Invalid start time")=>({title:s,message:t,category:i}),invalid_end_time:(t="Invalid end time")=>({title:s,message:t,category:i}),invalid_timezone:(t="Invalid timezone")=>({title:s,message:t,category:i})}},this.api=e=>{const i=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:t=>({title:s,message:t,category:i}),general_error:t=>({title:s,message:t,category:i}),internal_error:t=>({title:s,message:t,category:i}),invalid_request_error:t=>({title:s,message:t,category:i}),timeslot_not_available:t=>({title:s,message:t,category:i}),provider_error:t=>({title:s,message:t,category:i}),not_found_error:t=>({title:s,message:t,category:i})}}}}class C{constructor({schedulerAPIURL:e,schedulerStore:i,sessionId:s,configId:t}){this.errors=new z,this.schedulerStore=i,this.schedulerAPIURL=e,this.sessionId=s,this.configId=t}getHeaders(){return this.configId?{}:{Authorization:`Bearer ${this.sessionId}`}}async makeAPIRequest(e,i,s,t={}){try{const r=new URL(this.schedulerAPIURL);return r.pathname=e,await(await fetch(decodeURIComponent(r.toString()),{method:i,headers:{"Content-Type":"application/json",Origin:window.location.origin,...t},body:s})).json()}catch(r){return{error:{message:r.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,t,r,n;let i=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(i=((t=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:t.message)||((n=(r=e==null?void 0:e.provider_error)==null?void 0:r.error)==null?void 0:n.title)||"Something went wrong"),i}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)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:i}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...i,primaryParticipant:{...i==null?void 0:i.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:i}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...i,primaryParticipant:{...i==null?void 0:i.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,i=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(i,s)}async resetStoreStateAndFetchAvailability(){const e=new Date,i=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(r=>new Date(r.start_time)>new Date);let t=e;return s&&(t=s.start_time),this.schedulerStore.set("selectedDate",t),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),i}async setReschedule(e){const i=this.schedulerStore.state.eventInfo;i&&this.schedulerStore.set("reschedulingEventInfo",i);const s=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("rescheduleBookingId",e),s}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async bookTimeslot(e){var h;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:i,selectedTimezone:s,bookingInfo:t}=this.schedulerStore.state;if(!e&&!t)return{error:this.errors.component("Booking").no_booking_info()};const r=(e==null?void 0:e.timeslot)||i;if(!r)return{error:this.errors.component("Create Booking").no_timeslot_selected()};const n=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s;if(!n)return{error:this.errors.component("Create Booking").no_timezone_selected()};const a=e?e==null?void 0:e.primaryParticipant:t==null?void 0:t.primaryParticipant,u=e?(e==null?void 0:e.guests)||[]:(t==null?void 0:t.guests)||[],d=e?{...e==null?void 0:e.additionalFields,guests:u}:{...t==null?void 0:t.additionalFields,guests:u},_=this.getHeaders(),m=`/v3/scheduling/bookings${this.configId?`?configuration_id=${this.configId}`:""}`,l=await this.makeAPIRequest(decodeURIComponent(m),"POST",JSON.stringify({additional_fields:d,guest:{...a},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:n}),_);if("error"in l){this.schedulerStore.set("isLoading",!1);const c=(h=l.error)==null?void 0:h.type;let S=l.error;if(c&&c in this.errors.api("Create Booking")){const y=this.getErrorMessage(S);S=this.errors.api("Create Booking")[c](y)}return{error:S}}return"data"in l&&this.schedulerStore.set("eventInfo",l==null?void 0:l.data),this.schedulerStore.set("isLoading",!1),l}async getUISettings(){var r;this.schedulerStore.set("isLoading",!0);const e=this.getHeaders(),s=`/v3/scheduling/ui-settings${this.configId?`?configuration_id=${this.configId}`:""}`,t=await this.makeAPIRequest(s,"GET",void 0,e);if("error"in t){this.schedulerStore.set("isLoading",!1);const n=(r=t.error)==null?void 0:r.type;let a=t.error;return n&&n in this.errors.api("Get UI Settings")&&(a=this.errors.api("Get UI Settings")[n]((a==null?void 0:a.message)||(a==null?void 0:a.title)||"Something went wrong")),{error:a}}return"data"in t&&this.schedulerStore.set("configSettings",t.data),this.schedulerStore.set("isLoading",!1),t}async getAvailability(e=0,i=0){var _,f,m;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,t=new Date,r=t.getTime();if(i&&i<r/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component("Get Availability").endtime_not_in_future()};if(!e){const l=new Date(t.getFullYear(),t.getMonth(),1);e=Math.floor(l.getTime()/1e3)}if(!i){const l=new Date(t.getFullYear(),t.getMonth()+1,0);i=Math.floor(l.getTime()/1e3)}s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(i.toString())),this.configId&&s.append("configuration_id",encodeURIComponent(this.configId));const n=s.toString(),a=`/v3/scheduling/availability${n?`?${n}`:""}`,u=this.getHeaders(),d=await this.makeAPIRequest(decodeURIComponent(a),"GET",void 0,u);if("error"in d){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const l=(_=d.error)==null?void 0:_.type;let h=d.error;if(l&&l in this.errors.api("Get Availability")){const c=this.getErrorMessage(h);h=this.errors.api("Get Availability")[l](c)}return{error:h}}if("data"in d){const h=(((m=(f=d.data)==null?void 0:f.time_slots)==null?void 0:m.map(c=>({...c,start_time:new Date(c.start_time*1e3),end_time:new Date(c.end_time*1e3)})))||[]).filter(c=>c.start_time.getTime()>r);this.schedulerStore.set("availability",h)}return this.schedulerStore.set("isLoading",!1),d}async cancelBooking(e){var n;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component("Cancel Booking").no_booking_id()};const i=this.configId?`?configuration_id=${this.configId}`:"",s=`/v3/scheduling/bookings/${e}${i}`,t=this.getHeaders(),r=await this.makeAPIRequest(decodeURIComponent(s),"DELETE",JSON.stringify({action:"cancel"}),t);if("error"in r){this.schedulerStore.set("isLoading",!1);const a=(n=r.error)==null?void 0:n.type;let u=r.error;if(a&&a in this.errors.api("Cancel Booking")){const d=this.getErrorMessage(u);u=this.errors.api("Cancel Booking")[a](d)}return{error:u}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("isLoading",!1),r}async rescheduleBooking(e,i){var b;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component("Reschedule Booking").no_booking_id()};const s=this.errors.api("Reschedule Booking"),t=this.errors.component("Reschedule Booking"),{bookingInfo:r,selectedTimeslot:n,selectedTimezone:a}=this.schedulerStore.state,{startTime:u,endTime:d,timezone:_}=i,f=u||(n==null?void 0:n.start_time);if(!f)return{error:t.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const m=d||(n==null?void 0:n.end_time);if(!m)return{error:t.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const l=_||a;if(!l)return{error:t.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const h=i?i==null?void 0:i.primaryParticipant:r==null?void 0:r.primaryParticipant,c=i?(i==null?void 0:i.guests)||[]:(r==null?void 0:r.guests)||[],S=i?{...i==null?void 0:i.additionalFields,guests:c}:{...r==null?void 0:r.additionalFields,guests:c},y=this.configId?`?configuration_id=${this.configId}`:"",A=`/v3/scheduling/bookings/${e}${y}`,T=this.getHeaders(),g=await this.makeAPIRequest(decodeURIComponent(A),"PATCH",JSON.stringify({start_time:f.getTime()/1e3,end_time:m.getTime()/1e3,time_zone:l,additional_fields:S,guest:{...h}}),T);if("error"in g){this.schedulerStore.set("isLoading",!1);const p=(b=g.error)==null?void 0:b.type;let I=g.error;if(p&&p in s){const D=this.getErrorMessage(I);I=s[p](D)}return{error:I}}const w=this.schedulerStore.get("reschedulingEventInfo");if("data"in g)this.schedulerStore.set("eventInfo",g==null?void 0:g.data);else if(w)this.schedulerStore.set("eventInfo",w);else{const p={booking_id:e};this.schedulerStore.set("eventInfo",p)}return this.schedulerStore.set("isLoading",!1),g}}function L(o={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...o};v.debug("[defaultNylasStoreState]: ",e);const i=v.createStore(e);return i.onChange("availability",s=>{v.debug("[availability]: ",s);const t=s[0],r=Math.floor((t.end_time.getTime()-t.start_time.getTime())/6e4);v.debug("[durationMinutes]: ",r),i.set("eventDuration",r);const n=s.map(a=>a.start_time);v.debug("[selectableDates]: ",n),i.set("selectableDates",n)}),i.reset=()=>{for(const s in e){const t=e[s];i.set(s,t)}},i}exports.CreateNylasSchedulerStore=L;exports.NylaSchedulerAPIConnector=C;
|
|
1
|
+
"use strict";const v=require("./index-6a4ee4f8.cjs");exports.ErrorCategory=void 0;(function(o){o.Component="component",o.Api="api",o.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var P;(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.invalid_start_time="invalid_start_time",o.invalid_end_time="invalid_end_time",o.invalid_timezone="invalid_timezone"})(P||(P={}));var k;(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"})(k||(k={}));class z{constructor(){this.component=e=>{const i=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(t='"endtime" can not be in the future')=>({title:s,message:t,category:i}),no_booking_info:(t="No booking info provided")=>({title:s,message:t,category:i}),no_timeslot_selected:(t="No timeslot selected")=>({title:s,message:t,category:i}),no_timezone_selected:(t="No timezone selected")=>({title:s,message:t,category:i}),no_booking_id:(t="No booking id provided")=>({title:s,message:t,category:i}),invalid_start_time:(t="Invalid start time")=>({title:s,message:t,category:i}),invalid_end_time:(t="Invalid end time")=>({title:s,message:t,category:i}),invalid_timezone:(t="Invalid timezone")=>({title:s,message:t,category:i})}},this.api=e=>{const i=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:t=>({title:s,message:t,category:i}),general_error:t=>({title:s,message:t,category:i}),internal_error:t=>({title:s,message:t,category:i}),invalid_request_error:t=>({title:s,message:t,category:i}),timeslot_not_available:t=>({title:s,message:t,category:i}),provider_error:t=>({title:s,message:t,category:i}),not_found_error:t=>({title:s,message:t,category:i})}}}}class C{constructor({schedulerAPIURL:e,schedulerStore:i,sessionId:s,configId:t}){this.errors=new z,this.schedulerStore=i,this.schedulerAPIURL=e,this.sessionId=s,this.configId=t}getHeaders(){return this.configId?{}:{Authorization:`Bearer ${this.sessionId}`}}async makeAPIRequest(e,i,s,t={}){try{const r=new URL(this.schedulerAPIURL);return r.pathname=e,await(await fetch(decodeURIComponent(r.toString()),{method:i,headers:{"Content-Type":"application/json",Origin:window.location.origin,...t},body:s})).json()}catch(r){return{error:{message:r.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,t,r,n;let i=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(i=((t=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:t.message)||((n=(r=e==null?void 0:e.provider_error)==null?void 0:r.error)==null?void 0:n.title)||"Something went wrong"),i}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)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:i}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...i,primaryParticipant:{...i==null?void 0:i.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:i}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...i,primaryParticipant:{...i==null?void 0:i.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,i=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(i,s)}async resetStoreStateAndFetchAvailability(){const e=new Date,i=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(r=>new Date(r.start_time)>new Date);let t=e;return s&&(t=s.start_time),this.schedulerStore.set("selectedDate",t),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),i}async setReschedule(e){const i=this.schedulerStore.state.eventInfo;i&&this.schedulerStore.set("reschedulingEventInfo",i);const s=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("rescheduleBookingId",e),s}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async bookTimeslot(e){var h;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:i,selectedTimezone:s,bookingInfo:t}=this.schedulerStore.state;if(!e&&!t)return{error:this.errors.component("Booking").no_booking_info()};const r=(e==null?void 0:e.timeslot)||i;if(!r)return{error:this.errors.component("Create Booking").no_timeslot_selected()};const n=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s;if(!n)return{error:this.errors.component("Create Booking").no_timezone_selected()};const l=e?e==null?void 0:e.primaryParticipant:t==null?void 0:t.primaryParticipant,u=e?(e==null?void 0:e.guests)||[]:(t==null?void 0:t.guests)||[],c=e?{...e==null?void 0:e.additionalFields,guests:u}:{...t==null?void 0:t.additionalFields,guests:u},g=this.getHeaders(),_=`/v3/scheduling/bookings${this.configId?`?configuration_id=${this.configId}`:""}`,a=await this.makeAPIRequest(decodeURIComponent(_),"POST",JSON.stringify({additional_fields:c,guest:{...l},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:n}),g);if("error"in a){this.schedulerStore.set("isLoading",!1);const d=(h=a.error)==null?void 0:h.type;let S=a.error;if(d&&d in this.errors.api("Create Booking")){const y=this.getErrorMessage(S);S=this.errors.api("Create Booking")[d](y)}return{error:S}}return"data"in a&&this.schedulerStore.set("eventInfo",a==null?void 0:a.data),this.schedulerStore.set("isLoading",!1),a}async getUISettings(){var r;this.schedulerStore.set("isLoading",!0);const e=this.getHeaders(),s=`/v3/scheduling/ui-settings${this.configId?`?configuration_id=${this.configId}`:""}`,t=await this.makeAPIRequest(s,"GET",void 0,e);if("error"in t){this.schedulerStore.set("isLoading",!1);const n=(r=t.error)==null?void 0:r.type;let l=t.error;return n&&n in this.errors.api("Get UI Settings")&&(l=this.errors.api("Get UI Settings")[n]((l==null?void 0:l.message)||(l==null?void 0:l.title)||"Something went wrong")),{error:l}}return"data"in t&&this.schedulerStore.set("configSettings",t.data),this.schedulerStore.set("isLoading",!1),t}async getAvailability(e=0,i=0){var g,f,_;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,t=new Date,r=t.getTime();if(i&&i<r/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component("Get Availability").endtime_not_in_future()};if(!e){const a=new Date(t.getFullYear(),t.getMonth(),1);e=Math.floor(a.getTime()/1e3)}if(!i){const a=new Date(t.getFullYear(),t.getMonth()+1,0);i=Math.floor(a.getTime()/1e3)}s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(i.toString())),this.configId&&s.append("configuration_id",encodeURIComponent(this.configId));const n=s.toString(),l=`/v3/scheduling/availability${n?`?${n}`:""}`,u=this.getHeaders(),c=await this.makeAPIRequest(decodeURIComponent(l),"GET",void 0,u);if("error"in c){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const a=(g=c.error)==null?void 0:g.type;let h=c.error;if(a&&a in this.errors.api("Get Availability")){const d=this.getErrorMessage(h);h=this.errors.api("Get Availability")[a](d)}return{error:h}}if("data"in c){const h=(((_=(f=c.data)==null?void 0:f.time_slots)==null?void 0:_.map(d=>({...d,start_time:new Date(d.start_time*1e3),end_time:new Date(d.end_time*1e3)})))||[]).filter(d=>d.start_time.getTime()>r);this.schedulerStore.set("availability",h)}return this.schedulerStore.set("isLoading",!1),c}async cancelBooking(e,i){var l;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component("Cancel Booking").no_booking_id()};const s=this.configId?`?configuration_id=${this.configId}`:"",t=`/v3/scheduling/bookings/${e}${s}`,r=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(t),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:i}),r);if("error"in n){this.schedulerStore.set("isLoading",!1);const u=(l=n.error)==null?void 0:l.type;let c=n.error;if(u&&u in this.errors.api("Cancel Booking")){const g=this.getErrorMessage(c);c=this.errors.api("Cancel Booking")[u](g)}return{error:c}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(e,i){var b;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component("Reschedule Booking").no_booking_id()};const s=this.errors.api("Reschedule Booking"),t=this.errors.component("Reschedule Booking"),{bookingInfo:r,selectedTimeslot:n,selectedTimezone:l}=this.schedulerStore.state,{startTime:u,endTime:c,timezone:g}=i,f=u||(n==null?void 0:n.start_time);if(!f)return{error:t.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const _=c||(n==null?void 0:n.end_time);if(!_)return{error:t.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const a=g||l;if(!a)return{error:t.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const h=i?i==null?void 0:i.primaryParticipant:r==null?void 0:r.primaryParticipant,d=i?(i==null?void 0:i.guests)||[]:(r==null?void 0:r.guests)||[],S=i?{...i==null?void 0:i.additionalFields,guests:d}:{...r==null?void 0:r.additionalFields,guests:d},y=this.configId?`?configuration_id=${this.configId}`:"",A=`/v3/scheduling/bookings/${e}${y}`,T=this.getHeaders(),m=await this.makeAPIRequest(decodeURIComponent(A),"PATCH",JSON.stringify({start_time:f.getTime()/1e3,end_time:_.getTime()/1e3,time_zone:a,additional_fields:S,guest:{...h}}),T);if("error"in m){this.schedulerStore.set("isLoading",!1);const p=(b=m.error)==null?void 0:b.type;let I=m.error;if(p&&p in s){const D=this.getErrorMessage(I);I=s[p](D)}return{error:I}}const w=this.schedulerStore.get("reschedulingEventInfo");if("data"in m)this.schedulerStore.set("eventInfo",m==null?void 0:m.data);else if(w)this.schedulerStore.set("eventInfo",w);else{const p={booking_id:e};this.schedulerStore.set("eventInfo",p)}return this.schedulerStore.set("isLoading",!1),m}}function L(o={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...o};v.debug("[defaultNylasStoreState]: ",e);const i=v.createStore(e);return i.onChange("availability",s=>{v.debug("[availability]: ",s);const t=s[0],r=Math.floor((t.end_time.getTime()-t.start_time.getTime())/6e4);v.debug("[durationMinutes]: ",r),i.set("eventDuration",r);const n=s.map(l=>l.start_time);v.debug("[selectableDates]: ",n),i.set("selectableDates",n)}),i.reset=()=>{for(const s in e){const t=e[s];i.set(s,t)}},i}exports.CreateNylasSchedulerStore=L;exports.NylaSchedulerAPIConnector=C;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as v, e as L } from "./index-
|
|
1
|
+
import { d as v, e as L } from "./index-d61429c6.js";
|
|
2
2
|
var y;
|
|
3
3
|
(function(o) {
|
|
4
4
|
o.Component = "component", o.Api = "api", o.Auth = "auth";
|
|
@@ -204,24 +204,24 @@ class M {
|
|
|
204
204
|
const n = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : s;
|
|
205
205
|
if (!n)
|
|
206
206
|
return { error: this.errors.component("Create Booking").no_timezone_selected() };
|
|
207
|
-
const
|
|
208
|
-
additional_fields:
|
|
209
|
-
guest: { ...
|
|
207
|
+
const l = e ? e == null ? void 0 : e.primaryParticipant : t == null ? void 0 : t.primaryParticipant, h = e ? (e == null ? void 0 : e.guests) || [] : (t == null ? void 0 : t.guests) || [], c = e ? { ...e == null ? void 0 : e.additionalFields, guests: h } : { ...t == null ? void 0 : t.additionalFields, guests: h }, g = this.getHeaders(), _ = `/v3/scheduling/bookings${this.configId ? `?configuration_id=${this.configId}` : ""}`, a = await this.makeAPIRequest(decodeURIComponent(_), "POST", JSON.stringify({
|
|
208
|
+
additional_fields: c,
|
|
209
|
+
guest: { ...l },
|
|
210
210
|
start_time: r.start_time.getTime() / 1e3,
|
|
211
211
|
end_time: r.end_time.getTime() / 1e3,
|
|
212
212
|
timezone: n
|
|
213
|
-
}),
|
|
214
|
-
if ("error" in
|
|
213
|
+
}), g);
|
|
214
|
+
if ("error" in a) {
|
|
215
215
|
this.schedulerStore.set("isLoading", !1);
|
|
216
|
-
const
|
|
217
|
-
let S =
|
|
218
|
-
if (
|
|
216
|
+
const d = (u = a.error) == null ? void 0 : u.type;
|
|
217
|
+
let S = a.error;
|
|
218
|
+
if (d && d in this.errors.api("Create Booking")) {
|
|
219
219
|
const I = this.getErrorMessage(S);
|
|
220
|
-
S = this.errors.api("Create Booking")[
|
|
220
|
+
S = this.errors.api("Create Booking")[d](I);
|
|
221
221
|
}
|
|
222
222
|
return { error: S };
|
|
223
223
|
}
|
|
224
|
-
return "data" in
|
|
224
|
+
return "data" in a && this.schedulerStore.set("eventInfo", a == null ? void 0 : a.data), this.schedulerStore.set("isLoading", !1), a;
|
|
225
225
|
}
|
|
226
226
|
async getUISettings() {
|
|
227
227
|
var r;
|
|
@@ -230,92 +230,93 @@ class M {
|
|
|
230
230
|
if ("error" in t) {
|
|
231
231
|
this.schedulerStore.set("isLoading", !1);
|
|
232
232
|
const n = (r = t.error) == null ? void 0 : r.type;
|
|
233
|
-
let
|
|
234
|
-
return n && n in this.errors.api("Get UI Settings") && (
|
|
233
|
+
let l = t.error;
|
|
234
|
+
return n && n in this.errors.api("Get UI Settings") && (l = this.errors.api("Get UI Settings")[n]((l == null ? void 0 : l.message) || (l == null ? void 0 : l.title) || "Something went wrong")), { error: l };
|
|
235
235
|
}
|
|
236
236
|
return "data" in t && this.schedulerStore.set("configSettings", t.data), this.schedulerStore.set("isLoading", !1), t;
|
|
237
237
|
}
|
|
238
238
|
async getAvailability(e = 0, i = 0) {
|
|
239
|
-
var
|
|
239
|
+
var g, f, _;
|
|
240
240
|
this.schedulerStore.set("isLoading", !0);
|
|
241
241
|
const s = new URLSearchParams(), t = /* @__PURE__ */ new Date(), r = t.getTime();
|
|
242
242
|
if (i && i < r / 1e3)
|
|
243
243
|
return this.schedulerStore.set("isLoading", !1), { error: this.errors.component("Get Availability").endtime_not_in_future() };
|
|
244
244
|
if (!e) {
|
|
245
|
-
const
|
|
246
|
-
e = Math.floor(
|
|
245
|
+
const a = new Date(t.getFullYear(), t.getMonth(), 1);
|
|
246
|
+
e = Math.floor(a.getTime() / 1e3);
|
|
247
247
|
}
|
|
248
248
|
if (!i) {
|
|
249
|
-
const
|
|
250
|
-
i = Math.floor(
|
|
249
|
+
const a = new Date(t.getFullYear(), t.getMonth() + 1, 0);
|
|
250
|
+
i = Math.floor(a.getTime() / 1e3);
|
|
251
251
|
}
|
|
252
252
|
s.append("start_time", encodeURIComponent(e.toString())), s.append("end_time", encodeURIComponent(i.toString())), this.configId && s.append("configuration_id", encodeURIComponent(this.configId));
|
|
253
|
-
const n = s.toString(),
|
|
254
|
-
if ("error" in
|
|
253
|
+
const n = s.toString(), l = `/v3/scheduling/availability${n ? `?${n}` : ""}`, h = this.getHeaders(), c = await this.makeAPIRequest(decodeURIComponent(l), "GET", void 0, h);
|
|
254
|
+
if ("error" in c) {
|
|
255
255
|
this.schedulerStore.set("availability", []), this.schedulerStore.set("isLoading", !1);
|
|
256
|
-
const
|
|
257
|
-
let u =
|
|
258
|
-
if (
|
|
259
|
-
const
|
|
260
|
-
u = this.errors.api("Get Availability")[
|
|
256
|
+
const a = (g = c.error) == null ? void 0 : g.type;
|
|
257
|
+
let u = c.error;
|
|
258
|
+
if (a && a in this.errors.api("Get Availability")) {
|
|
259
|
+
const d = this.getErrorMessage(u);
|
|
260
|
+
u = this.errors.api("Get Availability")[a](d);
|
|
261
261
|
}
|
|
262
262
|
return { error: u };
|
|
263
263
|
}
|
|
264
|
-
if ("data" in
|
|
265
|
-
const u = (((
|
|
266
|
-
...
|
|
267
|
-
start_time: new Date(
|
|
268
|
-
end_time: new Date(
|
|
269
|
-
}))) || []).filter((
|
|
264
|
+
if ("data" in c) {
|
|
265
|
+
const u = (((_ = (f = c.data) == null ? void 0 : f.time_slots) == null ? void 0 : _.map((d) => ({
|
|
266
|
+
...d,
|
|
267
|
+
start_time: new Date(d.start_time * 1e3),
|
|
268
|
+
end_time: new Date(d.end_time * 1e3)
|
|
269
|
+
}))) || []).filter((d) => d.start_time.getTime() > r);
|
|
270
270
|
this.schedulerStore.set("availability", u);
|
|
271
271
|
}
|
|
272
|
-
return this.schedulerStore.set("isLoading", !1),
|
|
272
|
+
return this.schedulerStore.set("isLoading", !1), c;
|
|
273
273
|
}
|
|
274
|
-
async cancelBooking(e) {
|
|
275
|
-
var
|
|
274
|
+
async cancelBooking(e, i) {
|
|
275
|
+
var l;
|
|
276
276
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
277
277
|
return { error: this.errors.component("Cancel Booking").no_booking_id() };
|
|
278
|
-
const
|
|
279
|
-
action: "cancel"
|
|
280
|
-
|
|
281
|
-
|
|
278
|
+
const s = this.configId ? `?configuration_id=${this.configId}` : "", t = `/v3/scheduling/bookings/${e}${s}`, r = this.getHeaders(), n = await this.makeAPIRequest(decodeURIComponent(t), "DELETE", JSON.stringify({
|
|
279
|
+
action: "cancel",
|
|
280
|
+
cancellation_reason: i
|
|
281
|
+
}), r);
|
|
282
|
+
if ("error" in n) {
|
|
282
283
|
this.schedulerStore.set("isLoading", !1);
|
|
283
|
-
const
|
|
284
|
-
let
|
|
285
|
-
if (
|
|
286
|
-
const
|
|
287
|
-
|
|
284
|
+
const h = (l = n.error) == null ? void 0 : l.type;
|
|
285
|
+
let c = n.error;
|
|
286
|
+
if (h && h in this.errors.api("Cancel Booking")) {
|
|
287
|
+
const g = this.getErrorMessage(c);
|
|
288
|
+
c = this.errors.api("Cancel Booking")[h](g);
|
|
288
289
|
}
|
|
289
|
-
return { error:
|
|
290
|
+
return { error: c };
|
|
290
291
|
}
|
|
291
292
|
return this.schedulerStore.set("cancelledEventInfo", {
|
|
292
293
|
booking_id: e
|
|
293
|
-
}), this.schedulerStore.set("isLoading", !1),
|
|
294
|
+
}), this.schedulerStore.set("isLoading", !1), n;
|
|
294
295
|
}
|
|
295
296
|
async rescheduleBooking(e, i) {
|
|
296
297
|
var k;
|
|
297
298
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
298
299
|
return { error: this.errors.component("Reschedule Booking").no_booking_id() };
|
|
299
|
-
const s = this.errors.api("Reschedule Booking"), t = this.errors.component("Reschedule Booking"), { bookingInfo: r, selectedTimeslot: n, selectedTimezone:
|
|
300
|
+
const s = this.errors.api("Reschedule Booking"), t = this.errors.component("Reschedule Booking"), { bookingInfo: r, selectedTimeslot: n, selectedTimezone: l } = this.schedulerStore.state, { startTime: h, endTime: c, timezone: g } = i, f = h || (n == null ? void 0 : n.start_time);
|
|
300
301
|
if (!f)
|
|
301
302
|
return { error: t.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
302
|
-
const
|
|
303
|
-
if (!
|
|
303
|
+
const _ = c || (n == null ? void 0 : n.end_time);
|
|
304
|
+
if (!_)
|
|
304
305
|
return { error: t.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
305
|
-
const
|
|
306
|
-
if (!
|
|
306
|
+
const a = g || l;
|
|
307
|
+
if (!a)
|
|
307
308
|
return { error: t.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
|
|
308
|
-
const u = i ? i == null ? void 0 : i.primaryParticipant : r == null ? void 0 : r.primaryParticipant,
|
|
309
|
+
const u = i ? i == null ? void 0 : i.primaryParticipant : r == null ? void 0 : r.primaryParticipant, d = i ? (i == null ? void 0 : i.guests) || [] : (r == null ? void 0 : r.guests) || [], S = i ? { ...i == null ? void 0 : i.additionalFields, guests: d } : { ...r == null ? void 0 : r.additionalFields, guests: d }, I = this.configId ? `?configuration_id=${this.configId}` : "", A = `/v3/scheduling/bookings/${e}${I}`, D = this.getHeaders(), m = await this.makeAPIRequest(decodeURIComponent(A), "PATCH", JSON.stringify({
|
|
309
310
|
start_time: f.getTime() / 1e3,
|
|
310
|
-
end_time:
|
|
311
|
-
time_zone:
|
|
311
|
+
end_time: _.getTime() / 1e3,
|
|
312
|
+
time_zone: a,
|
|
312
313
|
additional_fields: S,
|
|
313
314
|
guest: { ...u }
|
|
314
315
|
}), D);
|
|
315
|
-
if ("error" in
|
|
316
|
+
if ("error" in m) {
|
|
316
317
|
this.schedulerStore.set("isLoading", !1);
|
|
317
|
-
const p = (k =
|
|
318
|
-
let w =
|
|
318
|
+
const p = (k = m.error) == null ? void 0 : k.type;
|
|
319
|
+
let w = m.error;
|
|
319
320
|
if (p && p in s) {
|
|
320
321
|
const z = this.getErrorMessage(w);
|
|
321
322
|
w = s[p](z);
|
|
@@ -323,8 +324,8 @@ class M {
|
|
|
323
324
|
return { error: w };
|
|
324
325
|
}
|
|
325
326
|
const b = this.schedulerStore.get("reschedulingEventInfo");
|
|
326
|
-
if ("data" in
|
|
327
|
-
this.schedulerStore.set("eventInfo",
|
|
327
|
+
if ("data" in m)
|
|
328
|
+
this.schedulerStore.set("eventInfo", m == null ? void 0 : m.data);
|
|
328
329
|
else if (b)
|
|
329
330
|
this.schedulerStore.set("eventInfo", b);
|
|
330
331
|
else {
|
|
@@ -333,7 +334,7 @@ class M {
|
|
|
333
334
|
};
|
|
334
335
|
this.schedulerStore.set("eventInfo", p);
|
|
335
336
|
}
|
|
336
|
-
return this.schedulerStore.set("isLoading", !1),
|
|
337
|
+
return this.schedulerStore.set("isLoading", !1), m;
|
|
337
338
|
}
|
|
338
339
|
}
|
|
339
340
|
function C(o = {}) {
|
|
@@ -359,7 +360,7 @@ function C(o = {}) {
|
|
|
359
360
|
v("[availability]: ", s);
|
|
360
361
|
const t = s[0], r = Math.floor((t.end_time.getTime() - t.start_time.getTime()) / 6e4);
|
|
361
362
|
v("[durationMinutes]: ", r), i.set("eventDuration", r);
|
|
362
|
-
const n = s.map((
|
|
363
|
+
const n = s.map((l) => l.start_time);
|
|
363
364
|
v("[selectableDates]: ", n), i.set("selectableDates", n);
|
|
364
365
|
}), i.reset = () => {
|
|
365
366
|
for (const s in e) {
|
package/dist/{time-period-selector.entry-846b64bd.cjs → time-period-selector.entry-77a6debf.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-6a4ee4f8.cjs");require("react");require("react-dom");const s=".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}",n=s,i=class{constructor(e){d.registerInstance(this,e),this.timePeriodChanged=d.createEvent(this,"timePeriodChanged",7),this.timePeriods=["hour","day","week","month"],this.defaultSelectedPeriod="hour",this.defaultSelectedNumber=1,this.selectedPeriod=this.defaultSelectedPeriod,this.selectedNumber=this.defaultSelectedNumber,this.numberOptions=this.calculateOptions("hour").map(t=>({label:t.toString(),value:t.toString()})),this.timePeriodOptions=this.timePeriods.map(t=>({label:t,value:t}))}defaultSelectedPeriodChangedHandler(e){this.selectedPeriod=e,this.updateNumberOptionsAndSelectedNumber(e)}defaultSelectedNumberChangedHandler(e){this.selectedNumber=e}timePeriodsChangedHandler(e){this.timePeriodOptions=e.map(t=>({label:t,value:t}))}calculateOptions(e){switch(e){case"hour":return Array.from({length:23},(t,r)=>r+1);case"minute":return Array.from({length:13},(t,r)=>r*5);case"day":return Array.from({length:30},(t,r)=>r+1);case"week":return Array.from({length:4},(t,r)=>r+1);case"month":return Array.from({length:12},(t,r)=>r+1);default:return[]}}selectedOptionChangedHandler(e){d.debug("time-period-selector","selectedOptionChangedHandler",e.detail);const{value:t,name:r}=e.detail;r==="time-period"?(this.selectedPeriod=t,this.updateNumberOptionsAndSelectedNumber(t)):r==="time-number"&&(this.selectedNumber=parseInt(t));const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}updateNumberOptionsAndSelectedNumber(e){const t=this.calculateOptions(e);this.numberOptions=t.map(r=>({label:r.toString(),value:r.toString()})),this.selectedNumber=parseInt(this.numberOptions[0].value)}render(){return d.h("div",{key:"7edc10024c638d484dd2645c1afeff0bbe6c0762",class:"time-period-selector"},d.h("select-dropdown",{key:"de189ba330463c98b0a1b6131ef3607ce35f4680",id:"time-number",name:"time-number",exportparts:"sd__dropdown: tps__number-dropdown, sd__dropdown-button: tps__number-dropdown-button, sd__dropdown-content: tps__number-dropdown-content",options:this.numberOptions,defaultSelectedOption:this.numberOptions.find(e=>e.value==this.selectedNumber.toString())??this.numberOptions[0],withSearch:!1}),d.h("select-dropdown",{key:"707a1ab8d07469c3f38af8c8b9b129be7af833fc",id:"time-period",name:"time-period",options:this.timePeriodOptions,exportparts:"sd__dropdown: tps__period-dropdown, sd__dropdown-button: tps__period-dropdown-button, sd__dropdown-content: tps__period-dropdown-content",pluralizedLabel:this.selectedNumber>1?"s":"",defaultSelectedOption:this.timePeriodOptions.find(e=>e.value==this.selectedPeriod)??this.timePeriodOptions[0],withSearch:!1}))}get host(){return d.getElement(this)}static get watchers(){return{defaultSelectedPeriod:["defaultSelectedPeriodChangedHandler"],defaultSelectedNumber:["defaultSelectedNumberChangedHandler"],timePeriods:["timePeriodsChangedHandler"]}}};i.style=n;exports.time_period_selector=i;
|
package/dist/{time-period-selector.entry-f6128367.js → time-period-selector.entry-a29c8ffa.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as i, c as s, d as n, h as d, g as l } from "./index-
|
|
1
|
+
import { r as i, c as s, d as n, h as d, g as l } from "./index-d61429c6.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const a = ".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}", c = a, p = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-6a4ee4f8.cjs");require("react");require("react-dom");const s=".sc-translate-icon-h{display:flex}",i=s,e=class{constructor(t){C.registerInstance(this,t),this.width="16",this.height="16"}render(){return C.h("svg",{key:"d42f42f767a1f4cc2b449a9743cdf5272ac5a1e6",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 20 20",fill:"none"},C.h("path",{key:"993c96c2069b894c5cbe039354f49b450839099b",fill:"currentColor",d:"M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z"}))}};e.style=i;exports.translate_icon=e;
|
|
@@ -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-6a4ee4f8.cjs");require("react");require("react-dom");const n=".sc-warning-icon-h{display:flex}",r=n,t=class{constructor(i){e.registerInstance(this,i),this.width="16",this.height="16"}render(){return e.h("svg",{key:"5efea10ef5c62bb2e34d25c1d8274ada7418ee9e",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"0d79a3af2ca6a4e574af41ba8b2f54fbf185e15e",d:"M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z",fill:"currentColor"}))}};t.style=r;exports.warning_icon=t;
|