@nylas/web-elements 1.4.2 → 1.4.4
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/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +56 -27
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4842 -4822
- package/dist/cjs/checkmark-icon_15.cjs.entry.js +3 -3
- package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +4 -4
- package/dist/cjs/input-component.cjs.entry.js +13 -2
- package/dist/cjs/input-component.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +40 -11
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-calendar_3.cjs.entry.js +53 -24
- package/dist/cjs/nylas-event-calendar_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-provider.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/{scheduler-store-d6f5cff3.js → scheduler-store-5dcefe7e.js} +2 -2
- package/dist/cjs/{scheduler-store-d6f5cff3.js.map → scheduler-store-5dcefe7e.js.map} +1 -1
- package/dist/collection/components/design-system/input-component/input-component.js +13 -2
- package/dist/collection/components/design-system/input-component/input-component.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +40 -6
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +8 -5
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-calendar/nylas-event-calendar.js +28 -17
- package/dist/collection/components/scheduler-editor/nylas-event-calendar/nylas-event-calendar.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.css +15 -0
- package/dist/collection/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.js +13 -2
- package/dist/collection/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.js +12 -4
- package/dist/collection/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/input-component2.js +13 -2
- package/dist/components/input-component2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +38 -8
- package/dist/components/nylas-date-picker2.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group2.js +2 -2
- package/dist/components/nylas-editor-tabs2.js +2 -2
- package/dist/components/nylas-event-calendar2.js +29 -18
- package/dist/components/nylas-event-calendar2.js.map +1 -1
- package/dist/components/nylas-event-capacity2.js +14 -3
- package/dist/components/nylas-event-capacity2.js.map +1 -1
- package/dist/components/nylas-event-timeslot2.js +14 -6
- package/dist/components/nylas-event-timeslot2.js.map +1 -1
- package/dist/components/nylas-event-title2.js +3 -3
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +1 -1
- package/dist/components/nylas-locale-switch2.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +1 -1
- package/dist/components/nylas-scheduling.js +3 -3
- package/dist/components/nylas-timeslot-picker2.js +9 -6
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/components/scheduler-store.js +2 -2
- package/dist/components/utils.js +1 -1
- package/dist/esm/calendar-agenda-fill-icon_36.entry.js +2 -2
- package/dist/esm/checkmark-icon_15.entry.js +5 -5
- package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
- package/dist/esm/{feedbackSync-aa8d23d1.js → feedbackSync-57bb471a.js} +2 -2
- package/dist/esm/{feedbackSync-aa8d23d1.js.map → feedbackSync-57bb471a.js.map} +1 -1
- package/dist/esm/globe-icon_2.entry.js +1 -1
- package/dist/esm/google-logo-icon_6.entry.js +7 -7
- package/dist/esm/{index.es-6d4b50d5.js → index.es-13ff6710.js} +2 -2
- package/dist/esm/{index.es-6d4b50d5.js.map → index.es-13ff6710.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/input-component.entry.js +14 -3
- package/dist/esm/input-component.entry.js.map +1 -1
- package/dist/esm/input-dropdown_2.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/multi-select-dropdown_2.entry.js +1 -1
- package/dist/esm/{nylas-api-request-c5400df5.js → nylas-api-request-2e5f4c7f.js} +2 -2
- package/dist/esm/{nylas-api-request-c5400df5.js.map → nylas-api-request-2e5f4c7f.js.map} +1 -1
- package/dist/esm/nylas-booked-event-card_12.entry.js +42 -13
- package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
- package/dist/esm/nylas-event-calendar_3.entry.js +55 -26
- package/dist/esm/nylas-event-calendar_3.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +2 -2
- package/dist/esm/nylas-if-state.entry.js +2 -2
- package/dist/esm/nylas-login.entry.js +2 -2
- package/dist/esm/nylas-provider.entry.js +3 -3
- package/dist/esm/nylas-scheduler-editor.entry.js +3 -3
- package/dist/esm/nylas-scheduling.entry.js +6 -6
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/{register-component-238f28de.js → register-component-02a05665.js} +2 -2
- package/dist/esm/{register-component-238f28de.js.map → register-component-02a05665.js.map} +1 -1
- package/dist/esm/{scheduler-store-82bb212a.js → scheduler-store-fe9e85a4.js} +3 -3
- package/dist/esm/{scheduler-store-82bb212a.js.map → scheduler-store-fe9e85a4.js.map} +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/{utils-7d962146.js → utils-e27d0e4b.js} +2 -2
- package/dist/esm/{utils-7d962146.js.map → utils-e27d0e4b.js.map} +1 -1
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/{p-12bf5148.js → p-189b24e6.js} +2 -2
- package/dist/nylas-web-elements/p-1cbe8a56.entry.js +2 -0
- package/dist/nylas-web-elements/{p-d132fbaa.entry.js.map → p-1cbe8a56.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-fdc35ad8.entry.js → p-23971057.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ba831977.entry.js → p-2dd05606.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-797578de.js → p-388c456c.js} +2 -2
- package/dist/nylas-web-elements/{p-cf650f4f.js → p-3ea1c7c9.js} +2 -2
- package/dist/nylas-web-elements/{p-de9d8218.entry.js → p-5f683e34.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c2b6e0ca.entry.js → p-68ab7563.entry.js} +2 -2
- package/dist/nylas-web-elements/p-68ab7563.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-ec2c12a9.js → p-6b7fb948.js} +2 -2
- package/dist/nylas-web-elements/{p-cfd42146.js → p-7477410d.js} +2 -2
- package/dist/nylas-web-elements/{p-b62ef1be.js → p-7d9cdd23.js} +2 -2
- package/dist/nylas-web-elements/{p-00577fba.entry.js → p-8a7a6947.entry.js} +2 -2
- package/dist/nylas-web-elements/p-97f87422.entry.js +2 -0
- package/dist/nylas-web-elements/p-97f87422.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-9999c233.entry.js → p-aaf12216.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a452d4ea.entry.js → p-b55a87fa.entry.js} +2 -2
- package/dist/nylas-web-elements/p-b55a87fa.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-888d0c66.entry.js → p-c5f86111.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-dd98c443.entry.js → p-cc6dbd73.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b59288fd.entry.js → p-d5a2cec8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-83216795.entry.js → p-deb33dfb.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-83216795.entry.js.map → p-deb33dfb.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-2531d4fa.entry.js → p-e2dc32d9.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a263330c.entry.js → p-eedabd6a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-355b34cb.entry.js → p-f57e68b1.entry.js} +2 -2
- package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +4 -0
- package/dist/types/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.d.ts +1 -0
- package/package.json +4 -5
- package/CHANGELOG.md +0 -878
- package/dist/nylas-web-elements/p-203beca4.entry.js +0 -2
- package/dist/nylas-web-elements/p-203beca4.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-a452d4ea.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-c2b6e0ca.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-d132fbaa.entry.js +0 -2
- /package/dist/nylas-web-elements/{p-12bf5148.js.map → p-189b24e6.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fdc35ad8.entry.js.map → p-23971057.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ba831977.entry.js.map → p-2dd05606.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-797578de.js.map → p-388c456c.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cf650f4f.js.map → p-3ea1c7c9.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-de9d8218.entry.js.map → p-5f683e34.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ec2c12a9.js.map → p-6b7fb948.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cfd42146.js.map → p-7477410d.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b62ef1be.js.map → p-7d9cdd23.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-00577fba.entry.js.map → p-8a7a6947.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9999c233.entry.js.map → p-aaf12216.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-888d0c66.entry.js.map → p-c5f86111.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-dd98c443.entry.js.map → p-cc6dbd73.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b59288fd.entry.js.map → p-d5a2cec8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2531d4fa.entry.js.map → p-e2dc32d9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a263330c.entry.js.map → p-eedabd6a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-355b34cb.entry.js.map → p-f57e68b1.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as s,h as e,H as n,a as i}from"./p-6f5a3998.js";import{N as o,e as r}from"./p-189b24e6.js";import{a as h}from"./p-6b7fb948.js";import{N as a,C as c}from"./p-7d9cdd23.js";import{c as u}from"./p-fc5bc07b.js";import{C as d}from"./p-14894041.js";import"./p-c79dcb59.js";class l{constructor(t,s){this.nylasAuth=t;this.nylasAuthStore=s}async validateSession(){const t=await this.isAccessTokenValid();if(!t){this.logout()}else{let t=await this.nylasAuth.getTokenInfo();if(t){const s=5*60*1e3;const e=Math.floor(Date.now()/1e3);if(t.expires_in&&t.expires_in-e<s){h("[NylasAuthConnectorMixin] Refreshing access token");t=await this.nylasAuth.refreshAccessToken();if(!t){h("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out.");this.logout();return}}this.nylasAuthStore.state.tokenInfo=t}}this.nylasAuthStore.state.isAuthenticated=t}async isAuthenticated(){return this.nylasAuth.isAuthenticated()}async getTokenInfo(){return this.nylasAuth.getTokenInfo()}async isAccessTokenValid(){return this.nylasAuth.isAccessTokenValid()}async logout(){await this.nylasAuth.logout()}async getHostedAuthRedirectURL(t,s,e){return this.nylasAuth.getHostedAuthRedirectURL(t,s,e)}async manageHostedAuthCodeExchange(t){const s=new URL(t);const e=s.searchParams.get("code");if(e){const t=await this.nylasAuth.exchangeAuthCodeForTokenInfo(e);if(t){this.nylasAuthStore.state.tokenInfo=t;this.nylasAuthStore.state.isAuthenticated=true;return t}}return null}}class f{constructor(t,s,e,n,i,o="https://api.us.nylas.com"){this.router=t;this.schedulerAPIURL=o;this.nylasAuth=s;this.nylasAuthStore=e;this.nylasSchedulerStore=n;this.nylasSchedulerConfigStore=i}init(){h("NylasConnector init")}get authStore(){return this.nylasAuthStore}get schedulerStore(){return this.nylasSchedulerStore}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get auth(){if(this._authConnector){return this._authConnector}this._authConnector=new l(this.nylasAuth,this.nylasAuthStore);return this._authConnector}get scheduler(){if(this._schedulerAPIConnector){return this._schedulerAPIConnector}this._schedulerAPIConnector=new a({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore});return this._schedulerAPIConnector}getAuth(){return this.nylasAuth}resetStores(){this.nylasAuthStore.reset()}async logout(){await this.nylasAuth.logout();this.resetStores()}}class g extends Event{constructor(t,s){super(t,s);this.oldURL=s.oldURL;this.newURL=s.newURL}}class w{constructor(){this.routeChangeListeners=[];h("HashRouter constructor")}destroy(){h("HashRouter destroy");window.removeEventListener("hashchange",this.onRouteChange.bind(this))}init(){h("HashRouter init");window.addEventListener("hashchange",this.onRouteChange.bind(this));if(typeof HashChangeEvent!=="undefined"){const t=new HashChangeEvent("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(t)}else{const t=new g("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(t)}}addRouteChangeListener(t,s){h("HashRouter addRouteChangeListener");this.routeChangeListeners.push([t,s])}navigate(t,s){h("HashRouter navigate");if(s){return window.history.pushState(null,"",`#${t}`)}window.location.hash=t}setRoute(t){h("HashRouter setRoute");window.location.hash=t}matchRoute(t,s){const e=t.split("/");const n=s.split("/");h(`HashRouter matchRoute route=${t} path=${s}`,{routeParts:e,pathParts:n});if(e[1]===""&&n[0]===""){return true}if(e.length!==n.length){return false}for(let t=0;t<e.length;t++){const s=e[t];const i=n[t];if(s.startsWith(":")){continue}if(s!==i){return false}}return true}getRouteParams(t){h("HashRouter getRouteParams");const s={};const e=t.split("/");const n=window.location.hash.split("/");e.forEach(((t,e)=>{if(t.startsWith(":")){const i=t.substring(1);s[i]=n[e]}}));return s}getRouteWithParams(t,s){h("HashRouter getRouteWithParams");let e=t;Object.keys(s).forEach((t=>{e=e.replace(`:${t}`,s[t])}));return e}getRoute(){h("HashRouter getRoute");return window.location.hash}onRouteChange(t){this.routeChangeListeners.forEach((async([s,e])=>{const n=t.newURL.indexOf("#")===-1?"":t.newURL.substring(t.newURL.indexOf("#")+1);h(`HashRouter onRouteChange route=${s} path=${n}`,{event:t});if(!this.matchRoute(s,n)){h(`HashRouter onRouteChange route=${s} path=${n} does not match`);return}const i=this.getRouteParams(s);await e(s,n,i)}))}getBasePath(){h("HashRouter getBasePath");return""}}function p(t={}){const s={isAuthenticated:false,tokenInfo:null,state:"ready",...t};const e=u(s);e.reset=()=>{for(const t in s){const n=s[t];e.set(t,n)}};return e}const y=":host{display:contents}";const R=y;const m=class{constructor(e){t(this,e);this.init=s(this,"init",7);this.loggedIn=s(this,"loggedIn",7);this.loggedOut=s(this,"loggedOut",7);this.handleAuthChange=async t=>{if(t){this.loggedIn.emit(this.host)}else{this.loggedOut.emit(this.host)}};this.authConfig=undefined;this.eventOverrides={};this.automaticComponentRegistration=true}connectedCallback(){h("[nylas-provider] connectedCallback")}async componentWillLoad(){h("[nylas-provider] componentWillLoad");this.stores={auth:p(),scheduler:c(),schedulerConfig:d()};this.baseProvider=new o(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const t=new w;this.nylasAuth=r({apiUri:"https://api.us.nylas.com",elementsApiUri:"https://elements.us.nylas.com",storageType:"indexeddb",clientId:"YOUR_CLIENT_ID",defaultScopes:[],redirectURI:"/",...this.authConfig});const s=this.baseProvider?.getStore("auth");if(!s){throw new Error("The auth store is not set")}const e=this.baseProvider?.getStore("scheduler");if(!e){throw new Error("The scheduler store is not set")}const n=this.baseProvider?.getStore("schedulerConfig");if(!n){throw new Error("The scheduler config store is not set")}this.nylasConnector=new f(t,this.nylasAuth,s,e,n);const i=this.init.emit(this.host);if(!i.defaultPrevented){await(this.nylasConnector?.auth.validateSession())}this.handleAuthChange(s.state.isAuthenticated);this.baseProvider?.componentWillLoad(this.nylasConnector)}componentDidLoad(){const t=this.baseProvider?.getStore("auth");t?.onChange("isAuthenticated",this.handleAuthChange);this.baseProvider?.componentDidLoad()}componentDisconnected(){this.baseProvider?.componentDisconnected()}async registerComponentHandler(t){this.baseProvider?.registerComponent(t.detail)}async unregisterComponentHandler(t){this.baseProvider?.unregisterComponent(t.detail)}async getNylasAuth(){return this.nylasAuth}async getNylasConnector(){return this.nylasConnector}async getAuthStore(){return this.baseProvider?.getStore("auth")}async getNylasSchedulerStore(){return this.baseProvider?.getStore("scheduler")}async getNylasSchedulerConfigStore(){return this.baseProvider?.getStore("schedulerConfig")}render(){return e(n,{key:"76eef3db651be4914d776517c3b45b4f66ae0d6e"},e("slot",{key:"fa05da1325ee5c8872fd1f6f21842563d6b4b568"}))}get host(){return i(this)}};m.style=R;export{m as nylas_provider};
|
|
2
|
+
//# sourceMappingURL=p-5f683e34.entry.js.map
|