@nylas/react 1.1.0-canary.16 → 1.1.0-canary.17
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_2.entry-936fd73b.cjs +1 -0
- package/dist/add-circle-icon_2.entry-ce6aaa1d.js +25 -0
- package/dist/{archive-icon_7.entry-54dc5cc2.js → archive-icon_7.entry-60e900b6.js} +18 -18
- package/dist/{archive-icon_7.entry-073d9915.cjs → archive-icon_7.entry-8c8317e9.cjs} +1 -1
- package/dist/{arrow-icon.entry-869a1db9.js → arrow-icon.entry-057db95a.js} +2 -2
- package/dist/{arrow-icon.entry-bada78b8.cjs → arrow-icon.entry-2d4e9572.cjs} +1 -1
- package/dist/bold-icon_3.entry-557c6007.js +35 -0
- package/dist/{bold-icon_3.entry-cc6150c9.cjs → bold-icon_3.entry-ba732761.cjs} +1 -1
- package/dist/{button-component.entry-a0533c8b.js → button-component.entry-22d0ac2e.js} +2 -2
- package/dist/{button-component.entry-3703ecff.cjs → button-component.entry-385f9581.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-a9ab0b09.js → calendar-cancel-icon.entry-820cf967.js} +5 -5
- package/dist/{calendar-cancel-icon.entry-0f1d98b3.cjs → calendar-cancel-icon.entry-b2657caf.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-a62b5d2c.js → calendar-check-icon_2.entry-128a5d67.js} +9 -9
- package/dist/{calendar-check-icon_2.entry-6b83717e.cjs → calendar-check-icon_2.entry-b13e7cbb.cjs} +1 -1
- package/dist/{calendar-icon.entry-ddc22561.js → calendar-icon.entry-a43e6011.js} +5 -5
- package/dist/{calendar-icon.entry-08f83da9.cjs → calendar-icon.entry-d17d7cfb.cjs} +1 -1
- package/dist/calendar-info-icon_28.entry-b4f09bfe.cjs +1 -0
- package/dist/{calendar-info-icon_27.entry-f02f44b7.js → calendar-info-icon_28.entry-b71c23c5.js} +526 -700
- package/dist/{chevron-icon_3.entry-978b52d5.cjs → chevron-icon_3.entry-4807a0b1.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-f27202a2.js → chevron-icon_3.entry-e0796c69.js} +5 -5
- package/dist/{clock-icon_2.entry-b7b8ef46.cjs → clock-icon_2.entry-267614c2.cjs} +1 -1
- package/dist/{clock-icon_2.entry-2277fd45.js → clock-icon_2.entry-e959ae50.js} +7 -7
- package/dist/{constants-f34b9c6e-ccdbc4ac.cjs → constants-f34b9c6e-ebc2e19c.cjs} +1 -1
- package/dist/{constants-f34b9c6e-bbca6b6e.js → constants-f34b9c6e-efe2836b.js} +1 -1
- package/dist/{document-refresh-icon.entry-656a5e02.js → document-refresh-icon.entry-b4c217df.js} +2 -2
- package/dist/{document-refresh-icon.entry-5795e2a9.cjs → document-refresh-icon.entry-b8850675.cjs} +1 -1
- package/dist/elements/index.d.ts +1 -0
- package/dist/{elements-dc5b338e-d48368b1.cjs → elements-dc5b338e-a33785e3.cjs} +1 -1
- package/dist/{elements-dc5b338e-c4a07acc.js → elements-dc5b338e-b0a290ae.js} +1 -1
- package/dist/{focus-visible-e8093c16-10c0fa06.js → focus-visible-e8093c16-5f1ae916.js} +1 -1
- package/dist/{focus-visible-e8093c16-c86f3687.cjs → focus-visible-e8093c16-d2afb13d.cjs} +1 -1
- package/dist/{forward-icon_6.entry-07cd4b52.cjs → forward-icon_6.entry-0009e4f0.cjs} +3 -3
- package/dist/{forward-icon_6.entry-39d788af.js → forward-icon_6.entry-53683e82.js} +9 -9
- package/dist/{globe-icon.entry-60a53e89.js → globe-icon.entry-dbb47687.js} +4 -4
- package/dist/{globe-icon.entry-76c90d97.cjs → globe-icon.entry-df67eab8.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-77f3b86e.js +454 -0
- package/dist/google-logo-icon_4.entry-c5db1be3.cjs +1 -0
- package/dist/index-53420959-16700a42.cjs +1 -0
- package/dist/index-53420959-f0c4f9af.js +5 -0
- package/dist/{index-f383e3c4.js → index-5851f0a2.js} +902 -901
- package/dist/{index-6d9eeb53-38c9f47c.js → index-6d9eeb53-2f37342f.js} +2 -2
- package/dist/{index-6d9eeb53-66c114b2.cjs → index-6d9eeb53-ded66877.cjs} +1 -1
- package/dist/{index-f435e814.cjs → index-769f0fdd.cjs} +3 -3
- package/dist/{index.es-9cc0eb3c-510db795.js → index.es-9cc0eb3c-2cf4632f.js} +1 -1
- package/dist/{index.es-9cc0eb3c-09dc620b.cjs → index.es-9cc0eb3c-e8de46e6.cjs} +1 -1
- package/dist/{info-icon_2.entry-a61859ac.js → info-icon_2.entry-c27ac645.js} +3 -3
- package/dist/{info-icon_2.entry-7fe8bcd9.cjs → info-icon_2.entry-e355fb7d.cjs} +1 -1
- package/dist/{input-component.entry-12f60175.js → input-component.entry-a38a65da.js} +4 -4
- package/dist/{input-component.entry-04dcc655.cjs → input-component.entry-ef2b397d.cjs} +1 -1
- package/dist/input-dropdown_2.entry-9e50060e.cjs +1 -0
- package/dist/{input-dropdown_2.entry-0e5925a7.js → input-dropdown_2.entry-ce1da1b3.js} +35 -28
- package/dist/loading-icon.entry-175aca19.cjs +1 -0
- package/dist/loading-icon.entry-4ab88ed8.js +15 -0
- package/dist/{mailbox-store-64b4ef7c-017196a6.js → mailbox-store-64b4ef7c-47dac9aa.js} +2 -2
- package/dist/{mailbox-store-64b4ef7c-1e6c96cc.cjs → mailbox-store-64b4ef7c-ebe84c96.cjs} +1 -1
- package/dist/{nylas-booked-event-card_10.entry-5a9a4cc6.cjs → nylas-booked-event-card_10.entry-6de99d57.cjs} +1 -1
- package/dist/{nylas-booked-event-card_10.entry-2dff7f16.js → nylas-booked-event-card_10.entry-ef9c2d62.js} +9 -9
- package/dist/{nylas-custom-booking-flow.entry-36f7a943.cjs → nylas-custom-booking-flow.entry-c59c1306.cjs} +1 -1
- package/dist/{nylas-custom-booking-flow.entry-feed589b.js → nylas-custom-booking-flow.entry-f31400e2.js} +7 -7
- package/dist/{nylas-form-card.entry-49f519dd.js → nylas-form-card.entry-b189e066.js} +8 -8
- package/dist/{nylas-form-card.entry-e9f09602.cjs → nylas-form-card.entry-bc048703.cjs} +1 -1
- package/dist/{nylas-if-state.entry-127694a9.js → nylas-if-state.entry-5bdf8669.js} +3 -3
- package/dist/{nylas-if-state.entry-81916723.cjs → nylas-if-state.entry-933c79e0.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-f4c68fb9.cjs → nylas-list-folders.entry-5d1bef7f.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-e3e9ec1f.js → nylas-list-folders.entry-f0e7ae4e.js} +3 -3
- package/dist/{nylas-list-threads.entry-f0a1b9d1.cjs → nylas-list-threads.entry-3e300e7e.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-fa4b5318.js → nylas-list-threads.entry-3f7451ad.js} +3 -3
- package/dist/{nylas-login.entry-aeac716e.cjs → nylas-login.entry-dbf9e11f.cjs} +1 -1
- package/dist/{nylas-login.entry-6d17e994.js → nylas-login.entry-e3b757a0.js} +7 -7
- package/dist/{nylas-mailbox-pagination.entry-50fba238.cjs → nylas-mailbox-pagination.entry-0db12a01.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-c440f56a.js → nylas-mailbox-pagination.entry-6c845a2a.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-d3d0c870.cjs → nylas-mailbox-toolbar-button.entry-553f041a.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-14e30d36.js → nylas-mailbox-toolbar-button.entry-ec196947.js} +4 -4
- package/dist/{nylas-mailbox.entry-a59159c7.js → nylas-mailbox.entry-1552ad11.js} +7 -7
- package/dist/{nylas-mailbox.entry-2fdb3d4c.cjs → nylas-mailbox.entry-c0bbca56.cjs} +1 -1
- package/dist/{nylas-provider.entry-d7dbb5fc.js → nylas-provider.entry-6d286e92.js} +37 -37
- package/dist/{nylas-provider.entry-dfa8c7c1.cjs → nylas-provider.entry-d4bf23c2.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-67e71234.cjs → nylas-scheduler-editor.entry-00a71304.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-3b44b807.js → nylas-scheduler-editor.entry-caa1026b.js} +4 -4
- package/dist/{nylas-scheduling.entry-68f72bf7.js → nylas-scheduling.entry-19ff3d50.js} +3 -3
- package/dist/{nylas-scheduling.entry-0ce0dab9.cjs → nylas-scheduling.entry-f1fb67d2.cjs} +1 -1
- package/dist/{nylas-threads-refresh.entry-23a83bd4.js → nylas-threads-refresh.entry-6acf3c2b.js} +4 -4
- package/dist/{nylas-threads-refresh.entry-955e92c7.cjs → nylas-threads-refresh.entry-bc4c10ea.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-8f01ee4a.js → nylas-threads-search.entry-82fa1504.js} +5 -5
- package/dist/{nylas-threads-search.entry-2fb6db63.cjs → nylas-threads-search.entry-ee28712c.cjs} +1 -1
- package/dist/nylas-time-window-picker.entry-131f84b4.cjs +1 -0
- package/dist/nylas-time-window-picker.entry-3c45d82e.js +316 -0
- package/dist/{nylas-view-thread.entry-3cf0c1ac.cjs → nylas-view-thread.entry-0d9a4aa9.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-b957f88b.js → nylas-view-thread.entry-695a7b0b.js} +6 -6
- package/dist/{play-icon_2.entry-ecdf8ea4.js → play-icon_2.entry-ab47588e.js} +3 -3
- package/dist/{play-icon_2.entry-c92d5237.cjs → play-icon_2.entry-b1167d3a.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +41 -40
- package/dist/{refresh-icon.entry-76e58ccb.cjs → refresh-icon.entry-28e3ade7.cjs} +1 -1
- package/dist/{refresh-icon.entry-480d28aa.js → refresh-icon.entry-43267155.js} +5 -5
- package/dist/{register-component-a5a9ca5d-438c8a96.js → register-component-a5a9ca5d-538c35c3.js} +1 -1
- package/dist/{register-component-a5a9ca5d-ebf633cf.cjs → register-component-a5a9ca5d-8b06415c.cjs} +1 -1
- package/dist/{scheduler-config-store-4a50a03d-d5a5899e.cjs → scheduler-config-store-4a50a03d-40e87f35.cjs} +1 -1
- package/dist/{scheduler-config-store-4a50a03d-defa6368.js → scheduler-config-store-4a50a03d-4a2e2abf.js} +1 -1
- package/dist/{scheduler-store-f02ce045-de4cb1f5.js → scheduler-store-f02ce045-121c1e09.js} +1 -1
- package/dist/{scheduler-store-f02ce045-00faab09.cjs → scheduler-store-f02ce045-f11cfad9.cjs} +1 -1
- package/dist/{textarea-component.entry-1c8d11af.js → textarea-component.entry-1ec19adb.js} +4 -4
- package/dist/{textarea-component.entry-5ff249a8.cjs → textarea-component.entry-402a369b.cjs} +1 -1
- package/dist/{translate-icon.entry-a55c013b.cjs → translate-icon.entry-59f4e190.cjs} +1 -1
- package/dist/{translate-icon.entry-3741cac0.js → translate-icon.entry-d412697e.js} +6 -6
- package/dist/{warning-icon.entry-445352b5.js → warning-icon.entry-3ee1f451.js} +5 -5
- package/dist/{warning-icon.entry-1a104c52.cjs → warning-icon.entry-aa6b2c2c.cjs} +1 -1
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-035ffd48.cjs +0 -1
- package/dist/add-circle-icon_2.entry-5cadaf97.js +0 -25
- package/dist/bold-icon_3.entry-5695177e.js +0 -35
- package/dist/calendar-info-icon_27.entry-a8390790.cjs +0 -1
- package/dist/google-logo-icon_4.entry-5402eae2.cjs +0 -1
- package/dist/google-logo-icon_4.entry-d327d68f.js +0 -438
- package/dist/index-53420959-791b4e73.js +0 -5
- package/dist/index-53420959-9f979766.cjs +0 -1
- package/dist/input-dropdown_2.entry-d9bff099.cjs +0 -1
- package/dist/loading-icon.entry-51ddd748.js +0 -15
- package/dist/loading-icon.entry-f82786b4.cjs +0 -1
- package/dist/toggle-switch.entry-26d3d1c9.cjs +0 -1
- package/dist/toggle-switch.entry-339ab48b.js +0 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-769f0fdd.cjs");require("react");require("react-dom");var _={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(r.commonjsGlobal,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,h=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,b={},Z=function(s){return(s=+s)+(s>68?1900:2e3)},d=function(s){return function(o){this[s]=+o}},B=[/[+-]\d\d:?(\d\d)?|Z/,function(s){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var m=o.match(/([+-]|\d\d)/g),l=60*m[1]+(+m[2]||0);return l===0?0:m[0]==="+"?-l:l}(s)}],F=function(s){var o=b[s];return o&&(o.indexOf?o:o.s.concat(o.f))},V=function(s,o){var m,l=b.meridiem;if(l){for(var p=1;p<=24;p+=1)if(s.indexOf(l(p,0,o))>-1){m=p>12;break}}else m=s===(o?"pm":"PM");return m},q={A:[x,function(s){this.afternoon=V(s,!1)}],a:[x,function(s){this.afternoon=V(s,!0)}],S:[/\d/,function(s){this.milliseconds=100*+s}],SS:[a,function(s){this.milliseconds=10*+s}],SSS:[/\d{3}/,function(s){this.milliseconds=+s}],s:[h,d("seconds")],ss:[h,d("seconds")],m:[h,d("minutes")],mm:[h,d("minutes")],H:[h,d("hours")],h:[h,d("hours")],HH:[h,d("hours")],hh:[h,d("hours")],D:[h,d("day")],DD:[a,d("day")],Do:[x,function(s){var o=b.ordinal,m=s.match(/\d+/);if(this.day=m[0],o)for(var l=1;l<=31;l+=1)o(l).replace(/\[|\]/g,"")===s&&(this.day=l)}],M:[h,d("month")],MM:[a,d("month")],MMM:[x,function(s){var o=F("months"),m=(F("monthsShort")||o.map(function(l){return l.slice(0,3)})).indexOf(s)+1;if(m<1)throw new Error;this.month=m%12||m}],MMMM:[x,function(s){var o=F("months").indexOf(s)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(s){this.year=Z(s)}],YYYY:[/\d{4}/,d("year")],Z:B,ZZ:B};function N(s){var o,m;o=s,m=b&&b.formats;for(var l=(s=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,T,f){var c=f&&f.toUpperCase();return T||m[f]||n[f]||m[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,k,M){return k||M.slice(1)})})).match(i),p=l.length,y=0;y<p;y+=1){var C=l[y],I=q[C],v=I&&I[0],g=I&&I[1];l[y]=g?{regex:v,parser:g}:C.replace(/^\[|\]$/g,"")}return function(S){for(var T={},f=0,c=0;f<p;f+=1){var w=l[f];if(typeof w=="string")c+=w.length;else{var k=w.regex,M=w.parser,L=S.slice(c),A=k.exec(L)[0];M.call(T,A),S=S.replace(A,"")}}return function(D){var u=D.afternoon;if(u!==void 0){var Y=D.hours;u?Y<12&&(D.hours+=12):Y===12&&(D.hours=0),delete D.afternoon}}(T),T}}return function(s,o,m){m.p.customParseFormat=!0,s&&s.parseTwoDigitYear&&(Z=s.parseTwoDigitYear);var l=o.prototype,p=l.parse;l.parse=function(y){var C=y.date,I=y.utc,v=y.args;this.$u=I;var g=v[1];if(typeof g=="string"){var S=v[2]===!0,T=v[3]===!0,f=S||T,c=v[2];T&&(c=v[2]),b=this.$locale(),!S&&c&&(b=m.Ls[c]),this.$d=function(L,A,D){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*L);var u=N(A)(L),Y=u.year,E=u.month,X=u.day,G=u.hours,J=u.minutes,Q=u.seconds,ee=u.milliseconds,W=u.zone,$=new Date,P=X||(Y||E?1:$.getDate()),z=Y||$.getFullYear(),O=0;Y&&!E||(O=E>0?E-1:$.getMonth());var j=G||0,H=J||0,K=Q||0,R=ee||0;return W?new Date(Date.UTC(z,O,P,j,H,K,R+60*W.offset*1e3)):D?new Date(Date.UTC(z,O,P,j,H,K,R)):new Date(z,O,P,j,H,K,R)}catch{return new Date("")}}(C,g,I),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),f&&C!=this.format(g)&&(this.$d=new Date("")),b={}}else if(g instanceof Array)for(var w=g.length,k=1;k<=w;k+=1){v[1]=g[k-1];var M=m.apply(this,v);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}k===w&&(this.$d=new Date(""))}else p.call(this,y)}}})})(_);const te=_.exports,ie=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',se=ie;r.dayjs.extend(te);const U=class{constructor(e){r.registerInstance(this,e),this.timeChange=r.createEvent(this,"timeChange",7),this.formError=r.createEvent(this,"formError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=r.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=r.dayjs(this.times[0].value,"hh:mma");r.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=r.autocompleteTimeFormat(this.time),t=this.times.findIndex(n=>n.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const n=t.split(":");n[0]==="00"&&n[1].slice(-2)=="pm"&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),r.validateTimeFormatInput(t)?(this.err="",this.formError.emit({key:this.el.id,message:""})):(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),this.timeChange.emit({key:this.el.id,value:t})}handleTimeAutocomplete(e){var n;const t=(n=e.target)==null?void 0:n.value;if(!r.validateTimeFormatInput(t)){this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"});return}if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:i});return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t);this.timeChange.emit({key:this.el.id,value:i});return}this.timeChange.emit({key:this.el.id,value:t})}handleOnInput(e){var n;const t=(n=e.target)==null?void 0:n.value;if(r.validateTimeFormatInput(t)){if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma"),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}}}generateTimes(){const e=[];let t=r.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=r.dayjs(this.minimumStartTime,"hh:mma"));const n=t.endOf("day").diff(t,"minutes"),i=Math.round(n/15);for(let a=0;a<i+1;a++){const h=t.add(a*15,"minute");if(a==i&&h.format("hh:mma").includes("am"))break;e.push({id:a,value:h.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,n=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=n+1<t.length?n+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=n-1>=0?n-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[n];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var x;const t=this.times[e],n=(x=this.el.shadowRoot)==null?void 0:x.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const a=n.getBoundingClientRect(),h=i.getBoundingClientRect();a.top<h.top?i.scrollTop-=h.top-a.top:a.bottom>h.bottom&&(i.scrollTop+=a.bottom-h.bottom),a.left<h.left?i.scrollLeft-=h.left-a.left:a.right>h.right&&(i.scrollLeft+=a.right-h.right)}focusOption(e){var a;const t=this.times[e];if(!t)return;const n=t.id.toString(),i=(a=this.el.shadowRoot)==null?void 0:a.getElementById(n);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return r.h(r.Host,{key:"51ee1081a47b86693eb0fcd034a53333728f0a8a"},r.h("div",{key:"29616cbfd3978f2fb38d2583214e2cb67e86ecd2",class:"time-picker",part:"time-picker"},r.h("input",{key:"0eedc68542c5dd6c2d051f89b806016e31ae21d4",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&r.h("div",{class:"invalid-time-icon"}),this.showTimes&&r.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},r.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>r.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&r.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return r.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};U.style=se;exports.nylas_time_window_picker=U;
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { i as ae, R as C, r as oe, c as X, S as B, T as U, U as G, V as q, h as k, H as he, g as me } from "./index-5851f0a2.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
var J = { exports: {} };
|
|
5
|
+
(function(e, t) {
|
|
6
|
+
(function(n, i) {
|
|
7
|
+
e.exports = i();
|
|
8
|
+
})(ae, function() {
|
|
9
|
+
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d\d/, o = /\d\d?/, v = /\d*[^-_:/,()\s\d]+/, x = {}, W = function(s) {
|
|
10
|
+
return (s = +s) + (s > 68 ? 1900 : 2e3);
|
|
11
|
+
}, l = function(s) {
|
|
12
|
+
return function(a) {
|
|
13
|
+
this[s] = +a;
|
|
14
|
+
};
|
|
15
|
+
}, _ = [/[+-]\d\d:?(\d\d)?|Z/, function(s) {
|
|
16
|
+
(this.zone || (this.zone = {})).offset = function(a) {
|
|
17
|
+
if (!a || a === "Z")
|
|
18
|
+
return 0;
|
|
19
|
+
var h = a.match(/([+-]|\d\d)/g), m = 60 * h[1] + (+h[2] || 0);
|
|
20
|
+
return m === 0 ? 0 : h[0] === "+" ? -m : m;
|
|
21
|
+
}(s);
|
|
22
|
+
}], P = function(s) {
|
|
23
|
+
var a = x[s];
|
|
24
|
+
return a && (a.indexOf ? a : a.s.concat(a.f));
|
|
25
|
+
}, j = function(s, a) {
|
|
26
|
+
var h, m = x.meridiem;
|
|
27
|
+
if (m) {
|
|
28
|
+
for (var f = 1; f <= 24; f += 1)
|
|
29
|
+
if (s.indexOf(m(f, 0, a)) > -1) {
|
|
30
|
+
h = f > 12;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
} else
|
|
34
|
+
h = s === (a ? "pm" : "PM");
|
|
35
|
+
return h;
|
|
36
|
+
}, Q = { A: [v, function(s) {
|
|
37
|
+
this.afternoon = j(s, !1);
|
|
38
|
+
}], a: [v, function(s) {
|
|
39
|
+
this.afternoon = j(s, !0);
|
|
40
|
+
}], S: [/\d/, function(s) {
|
|
41
|
+
this.milliseconds = 100 * +s;
|
|
42
|
+
}], SS: [r, function(s) {
|
|
43
|
+
this.milliseconds = 10 * +s;
|
|
44
|
+
}], SSS: [/\d{3}/, function(s) {
|
|
45
|
+
this.milliseconds = +s;
|
|
46
|
+
}], s: [o, l("seconds")], ss: [o, l("seconds")], m: [o, l("minutes")], mm: [o, l("minutes")], H: [o, l("hours")], h: [o, l("hours")], HH: [o, l("hours")], hh: [o, l("hours")], D: [o, l("day")], DD: [r, l("day")], Do: [v, function(s) {
|
|
47
|
+
var a = x.ordinal, h = s.match(/\d+/);
|
|
48
|
+
if (this.day = h[0], a)
|
|
49
|
+
for (var m = 1; m <= 31; m += 1)
|
|
50
|
+
a(m).replace(/\[|\]/g, "") === s && (this.day = m);
|
|
51
|
+
}], M: [o, l("month")], MM: [r, l("month")], MMM: [v, function(s) {
|
|
52
|
+
var a = P("months"), h = (P("monthsShort") || a.map(function(m) {
|
|
53
|
+
return m.slice(0, 3);
|
|
54
|
+
})).indexOf(s) + 1;
|
|
55
|
+
if (h < 1)
|
|
56
|
+
throw new Error();
|
|
57
|
+
this.month = h % 12 || h;
|
|
58
|
+
}], MMMM: [v, function(s) {
|
|
59
|
+
var a = P("months").indexOf(s) + 1;
|
|
60
|
+
if (a < 1)
|
|
61
|
+
throw new Error();
|
|
62
|
+
this.month = a % 12 || a;
|
|
63
|
+
}], Y: [/[+-]?\d+/, l("year")], YY: [r, function(s) {
|
|
64
|
+
this.year = W(s);
|
|
65
|
+
}], YYYY: [/\d{4}/, l("year")], Z: _, ZZ: _ };
|
|
66
|
+
function ee(s) {
|
|
67
|
+
var a, h;
|
|
68
|
+
a = s, h = x && x.formats;
|
|
69
|
+
for (var m = (s = a.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, b, u) {
|
|
70
|
+
var d = u && u.toUpperCase();
|
|
71
|
+
return b || h[u] || n[u] || h[d].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(w, T, D) {
|
|
72
|
+
return T || D.slice(1);
|
|
73
|
+
});
|
|
74
|
+
})).match(i), f = m.length, p = 0; p < f; p += 1) {
|
|
75
|
+
var L = m[p], I = Q[L], y = I && I[0], g = I && I[1];
|
|
76
|
+
m[p] = g ? { regex: y, parser: g } : L.replace(/^\[|\]$/g, "");
|
|
77
|
+
}
|
|
78
|
+
return function(S) {
|
|
79
|
+
for (var b = {}, u = 0, d = 0; u < f; u += 1) {
|
|
80
|
+
var w = m[u];
|
|
81
|
+
if (typeof w == "string")
|
|
82
|
+
d += w.length;
|
|
83
|
+
else {
|
|
84
|
+
var T = w.regex, D = w.parser, E = S.slice(d), A = T.exec(E)[0];
|
|
85
|
+
D.call(b, A), S = S.replace(A, "");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return function(M) {
|
|
89
|
+
var c = M.afternoon;
|
|
90
|
+
if (c !== void 0) {
|
|
91
|
+
var Y = M.hours;
|
|
92
|
+
c ? Y < 12 && (M.hours += 12) : Y === 12 && (M.hours = 0), delete M.afternoon;
|
|
93
|
+
}
|
|
94
|
+
}(b), b;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return function(s, a, h) {
|
|
98
|
+
h.p.customParseFormat = !0, s && s.parseTwoDigitYear && (W = s.parseTwoDigitYear);
|
|
99
|
+
var m = a.prototype, f = m.parse;
|
|
100
|
+
m.parse = function(p) {
|
|
101
|
+
var L = p.date, I = p.utc, y = p.args;
|
|
102
|
+
this.$u = I;
|
|
103
|
+
var g = y[1];
|
|
104
|
+
if (typeof g == "string") {
|
|
105
|
+
var S = y[2] === !0, b = y[3] === !0, u = S || b, d = y[2];
|
|
106
|
+
b && (d = y[2]), x = this.$locale(), !S && d && (x = h.Ls[d]), this.$d = function(E, A, M) {
|
|
107
|
+
try {
|
|
108
|
+
if (["x", "X"].indexOf(A) > -1)
|
|
109
|
+
return new Date((A === "X" ? 1e3 : 1) * E);
|
|
110
|
+
var c = ee(A)(E), Y = c.year, O = c.month, te = c.day, ie = c.hours, se = c.minutes, ne = c.seconds, re = c.milliseconds, N = c.zone, z = /* @__PURE__ */ new Date(), F = te || (Y || O ? 1 : z.getDate()), H = Y || z.getFullYear(), $ = 0;
|
|
111
|
+
Y && !O || ($ = O > 0 ? O - 1 : z.getMonth());
|
|
112
|
+
var K = ie || 0, R = se || 0, V = ne || 0, Z = re || 0;
|
|
113
|
+
return N ? new Date(Date.UTC(H, $, F, K, R, V, Z + 60 * N.offset * 1e3)) : M ? new Date(Date.UTC(H, $, F, K, R, V, Z)) : new Date(H, $, F, K, R, V, Z);
|
|
114
|
+
} catch {
|
|
115
|
+
return /* @__PURE__ */ new Date("");
|
|
116
|
+
}
|
|
117
|
+
}(L, g, I), this.init(), d && d !== !0 && (this.$L = this.locale(d).$L), u && L != this.format(g) && (this.$d = /* @__PURE__ */ new Date("")), x = {};
|
|
118
|
+
} else if (g instanceof Array)
|
|
119
|
+
for (var w = g.length, T = 1; T <= w; T += 1) {
|
|
120
|
+
y[1] = g[T - 1];
|
|
121
|
+
var D = h.apply(this, y);
|
|
122
|
+
if (D.isValid()) {
|
|
123
|
+
this.$d = D.$d, this.$L = D.$L, this.init();
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
T === w && (this.$d = /* @__PURE__ */ new Date(""));
|
|
127
|
+
}
|
|
128
|
+
else
|
|
129
|
+
f.call(this, p);
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
})(J);
|
|
134
|
+
const le = J.exports, de = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', ce = de;
|
|
135
|
+
C.extend(le);
|
|
136
|
+
const ue = class {
|
|
137
|
+
constructor(e) {
|
|
138
|
+
oe(this, e), this.timeChange = X(this, "timeChange", 7), this.formError = X(this, "formError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
|
|
139
|
+
}
|
|
140
|
+
handleOutsideClick(e) {
|
|
141
|
+
!e.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
|
|
142
|
+
}
|
|
143
|
+
minimumStartTimeChangedHandler() {
|
|
144
|
+
if (this.minimumStartTime) {
|
|
145
|
+
let e = C().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4, -2)));
|
|
146
|
+
this.minimumStartTime.slice(-2).toLowerCase() === "pm" && parseInt(this.minimumStartTime) !== 12 ? e = e.add(12, "hour") : this.minimumStartTime.slice(-2).toLowerCase() === "am" && parseInt(this.minimumStartTime) === 12 && (e = e.subtract(12, "hour")), this.times = this.generateTimes();
|
|
147
|
+
const t = C(this.times[0].value, "hh:mma");
|
|
148
|
+
C(this.time, "hh:mma").isBefore(t) && (this.err = "Invalid", this.formError.emit({
|
|
149
|
+
key: this.el.id,
|
|
150
|
+
message: "Invalid"
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
componentDidRender() {
|
|
155
|
+
if (this.showTimes && this.shouldAutoScroll) {
|
|
156
|
+
const e = B(this.time), t = this.times.findIndex((n) => n.value === e);
|
|
157
|
+
t > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(t));
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
handleTimeChange(e, t) {
|
|
162
|
+
const n = t.split(":");
|
|
163
|
+
n[0] === "00" && n[1].slice(-2) == "pm" && (this.err = "Invalid", this.formError.emit({
|
|
164
|
+
key: this.el.id,
|
|
165
|
+
message: "Invalid"
|
|
166
|
+
})), U(t) ? (this.err = "", this.formError.emit({
|
|
167
|
+
key: this.el.id,
|
|
168
|
+
message: ""
|
|
169
|
+
})) : (this.err = "Invalid", this.formError.emit({
|
|
170
|
+
key: this.el.id,
|
|
171
|
+
message: "Invalid"
|
|
172
|
+
})), this.timeChange.emit({
|
|
173
|
+
key: this.el.id,
|
|
174
|
+
value: t
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
handleTimeAutocomplete(e) {
|
|
178
|
+
var n;
|
|
179
|
+
const t = (n = e.target) == null ? void 0 : n.value;
|
|
180
|
+
if (!U(t)) {
|
|
181
|
+
this.err = "Invalid", this.formError.emit({
|
|
182
|
+
key: this.el.id,
|
|
183
|
+
message: "Invalid"
|
|
184
|
+
});
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (t === "") {
|
|
188
|
+
const i = G().format("hh:mma");
|
|
189
|
+
this.timeChange.emit({
|
|
190
|
+
key: this.el.id,
|
|
191
|
+
value: i
|
|
192
|
+
});
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (!q(t)) {
|
|
196
|
+
const i = B(t);
|
|
197
|
+
this.timeChange.emit({
|
|
198
|
+
key: this.el.id,
|
|
199
|
+
value: i
|
|
200
|
+
});
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
this.timeChange.emit({
|
|
204
|
+
key: this.el.id,
|
|
205
|
+
value: t
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
handleOnInput(e) {
|
|
209
|
+
var n;
|
|
210
|
+
const t = (n = e.target) == null ? void 0 : n.value;
|
|
211
|
+
if (U(t)) {
|
|
212
|
+
if (t === "") {
|
|
213
|
+
const i = G().format("hh:mma"), r = this.times.findIndex((o) => o.value === i);
|
|
214
|
+
r > -1 && this.scrollToViewWithinParent(r);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
if (!q(t)) {
|
|
218
|
+
const i = B(t), r = this.times.findIndex((o) => o.value === i);
|
|
219
|
+
r > -1 && this.scrollToViewWithinParent(r);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
generateTimes() {
|
|
225
|
+
const e = [];
|
|
226
|
+
let t = C().set("hour", 0).set("minute", 0).set("second", 0);
|
|
227
|
+
this.minimumStartTime && (t = C(this.minimumStartTime, "hh:mma"));
|
|
228
|
+
const n = t.endOf("day").diff(t, "minutes"), i = Math.round(n / 15);
|
|
229
|
+
for (let r = 0; r < i + 1; r++) {
|
|
230
|
+
const o = t.add(r * 15, "minute");
|
|
231
|
+
if (r == i && o.format("hh:mma").includes("am"))
|
|
232
|
+
break;
|
|
233
|
+
e.push({ id: r, value: o.format("hh:mma") });
|
|
234
|
+
}
|
|
235
|
+
return e;
|
|
236
|
+
}
|
|
237
|
+
handleComboboxKeyDown(e) {
|
|
238
|
+
if (e.key === "ArrowDown") {
|
|
239
|
+
if (e.preventDefault(), !this.showTimes) {
|
|
240
|
+
this.showTimes = !0, this.shouldAutoScroll = !0;
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (this.ariaActivedescendant === "")
|
|
244
|
+
this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
|
|
245
|
+
else {
|
|
246
|
+
const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t + 1 < this.times.length ? t + 1 : 0;
|
|
247
|
+
this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
|
|
248
|
+
}
|
|
249
|
+
} else if (e.key === "ArrowUp")
|
|
250
|
+
if (e.preventDefault(), this.ariaActivedescendant === "")
|
|
251
|
+
this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
|
|
252
|
+
else {
|
|
253
|
+
const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t - 1 >= 0 ? t - 1 : this.times.length - 1;
|
|
254
|
+
this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
|
|
255
|
+
}
|
|
256
|
+
else
|
|
257
|
+
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
258
|
+
}
|
|
259
|
+
handleListboxKeydown(e) {
|
|
260
|
+
const t = this.times, n = t.findIndex((i) => i.id.toString() === this.ariaActivedescendant);
|
|
261
|
+
if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey) {
|
|
262
|
+
e.preventDefault();
|
|
263
|
+
const i = n + 1 < t.length ? n + 1 : 0;
|
|
264
|
+
this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
|
|
265
|
+
} else if (e.key === "ArrowUp" || e.key === "Tab" && e.shiftKey) {
|
|
266
|
+
e.preventDefault();
|
|
267
|
+
const i = n - 1 >= 0 ? n - 1 : t.length - 1;
|
|
268
|
+
this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
|
|
269
|
+
} else if (e.key === "Enter") {
|
|
270
|
+
if (e.preventDefault(), this.ariaActivedescendant) {
|
|
271
|
+
const i = t[n];
|
|
272
|
+
this.handleTimeChange(e, i.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
|
|
273
|
+
}
|
|
274
|
+
} else
|
|
275
|
+
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
276
|
+
}
|
|
277
|
+
scrollToViewWithinParent(e) {
|
|
278
|
+
var v;
|
|
279
|
+
const t = this.times[e], n = (v = this.el.shadowRoot) == null ? void 0 : v.getElementById(t.id.toString()), i = this.timeMenu;
|
|
280
|
+
this.ariaActivedescendant = t.id.toString();
|
|
281
|
+
const r = n.getBoundingClientRect(), o = i.getBoundingClientRect();
|
|
282
|
+
r.top < o.top ? i.scrollTop -= o.top - r.top : r.bottom > o.bottom && (i.scrollTop += r.bottom - o.bottom), r.left < o.left ? i.scrollLeft -= o.left - r.left : r.right > o.right && (i.scrollLeft += r.right - o.right);
|
|
283
|
+
}
|
|
284
|
+
focusOption(e) {
|
|
285
|
+
var r;
|
|
286
|
+
const t = this.times[e];
|
|
287
|
+
if (!t)
|
|
288
|
+
return;
|
|
289
|
+
const n = t.id.toString(), i = (r = this.el.shadowRoot) == null ? void 0 : r.getElementById(n);
|
|
290
|
+
i && (i.focus(), i.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
291
|
+
}
|
|
292
|
+
render() {
|
|
293
|
+
return k(he, { key: "51ee1081a47b86693eb0fcd034a53333728f0a8a" }, k("div", { key: "29616cbfd3978f2fb38d2583214e2cb67e86ecd2", class: "time-picker", part: "time-picker" }, k("input", { key: "0eedc68542c5dd6c2d051f89b806016e31ae21d4", type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
294
|
+
"time-input": !0,
|
|
295
|
+
error: !!this.err || this.hasError
|
|
296
|
+
}, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
|
|
297
|
+
this.showTimes = !this.showTimes, this.shouldAutoScroll = !0;
|
|
298
|
+
}, "aria-haspopup": "listbox", "aria-label": this.name, "aria-expanded": this.showTimes ? "true" : "false", placeholder: this.placeholder, onKeyDown: (e) => this.handleComboboxKeyDown(e), onInput: (e) => this.handleOnInput(e), onBlur: (e) => this.handleTimeAutocomplete(e) }), this.err && k("div", { class: "invalid-time-icon" }), this.showTimes && k("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, k("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => k("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
|
|
299
|
+
focused: this.ariaActivedescendant === e.id.toString()
|
|
300
|
+
}, onClick: (t) => {
|
|
301
|
+
this.handleTimeChange(t, e.value), this.showTimes = !1, this.timeInput.focus();
|
|
302
|
+
}, role: "option" }, `${e.value}`)))), !this.showTimes && this.err && k("p", { class: "error", id: "email-error" }, this.err)));
|
|
303
|
+
}
|
|
304
|
+
get el() {
|
|
305
|
+
return me(this);
|
|
306
|
+
}
|
|
307
|
+
static get watchers() {
|
|
308
|
+
return {
|
|
309
|
+
minimumStartTime: ["minimumStartTimeChangedHandler"]
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
ue.style = ce;
|
|
314
|
+
export {
|
|
315
|
+
ue as nylas_time_window_picker
|
|
316
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-f435e814.cjs"),f=require("./register-component-a5a9ca5d-ebf633cf.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:"d23da82f6e20bdd064fe7401ec7132546af2f45b"},e.h("sp-theme",{key:"7af6f252ef74d89e3dc791dfe8323b13df9a9f92",scale:"medium",color:"dark"},e.h("div",{key:"3feeeb134b11d39ff6530e911c305211f18b134f",class:"view-thread"},e.h("div",{key:"235b80ce3983526e0544eb1a07c0b309187b9a38",class:"header"},e.h("div",{key:"b78c5f6e8eb8d4733c8a1cf131df8682a5a18469",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"2297fb41c56a1bba769e0a60289f48b3c5f47ce2",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:"2a22974a7b7bcc878c30d47f11e296bfdf728b0b",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-769f0fdd.cjs"),b=require("./register-component-a5a9ca5d-8b06415c.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))},f=':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=f;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:"a886c18c380e985cfb63a6a4ab523a93b2160ced"},e.h("sp-theme",{key:"dba4495bbb475f8825f5ade124f84f8bbe2c7c45",scale:"medium",color:"dark"},e.h("div",{key:"05c602d7c43e31402c433cdaaaccb26c8d88fc7e",class:"view-thread"},e.h("div",{key:"0b2900754126998aa4495a916b03ad2ea4157f34",class:"header"},e.h("div",{key:"38db0766a5bc2dfc37b5269cf1e63ad25531ee8d",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"bb73a5220497288f51b7c9d31e54cb685cfe54d5",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:"7d774b36fbfc216c05ed8cabbab79ad6b80e0e87",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([b.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,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-a5a9ca5d-
|
|
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-5851f0a2.js";
|
|
2
|
+
import { R as T } from "./register-component-a5a9ca5d-538c35c3.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
function R(t, e, s, o, r) {
|
|
@@ -10,7 +10,7 @@ function R(t, e, s, o, r) {
|
|
|
10
10
|
n.message = t.data, n.parent = r, s.appendChild(n);
|
|
11
11
|
}
|
|
12
12
|
const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o, onShowContactDataClick: r, parent: n }) => {
|
|
13
|
-
var l, i, c, v,
|
|
13
|
+
var l, i, c, v, w, f, b;
|
|
14
14
|
return a(
|
|
15
15
|
m,
|
|
16
16
|
null,
|
|
@@ -26,7 +26,7 @@ const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o,
|
|
|
26
26
|
{ class: "from" },
|
|
27
27
|
a("span", { class: "name" }, e.data.from && ((v = e.data.from[0]) == null ? void 0 : v.name)),
|
|
28
28
|
" ",
|
|
29
|
-
a("span", { class: "email" }, e.data.from && ((
|
|
29
|
+
a("span", { class: "email" }, e.data.from && ((w = e.data.from[0]) == null ? void 0 : w.email))
|
|
30
30
|
),
|
|
31
31
|
a(
|
|
32
32
|
"div",
|
|
@@ -66,7 +66,7 @@ const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o,
|
|
|
66
66
|
"div",
|
|
67
67
|
{ class: "address-info" },
|
|
68
68
|
a("div", { class: "label" }, "From"),
|
|
69
|
-
a("div", { class: "value" }, g((
|
|
69
|
+
a("div", { class: "value" }, g((f = e.data) != null && f.from ? (b = e == null ? void 0 : e.data) == null ? void 0 : b.from[0] : { name: "", email: "" })),
|
|
70
70
|
e.data.to && a(
|
|
71
71
|
m,
|
|
72
72
|
null,
|
|
@@ -162,7 +162,7 @@ const C = class {
|
|
|
162
162
|
render() {
|
|
163
163
|
var r, n, l;
|
|
164
164
|
const t = this.internalMessages.length > 2 ? this.internalMessages[0] : null, e = 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];
|
|
165
|
-
return a(x, { key: "
|
|
165
|
+
return a(x, { key: "a886c18c380e985cfb63a6a4ab523a93b2160ced" }, a("sp-theme", { key: "dba4495bbb475f8825f5ade124f84f8bbe2c7c45", scale: "medium", color: "dark" }, a("div", { key: "05c602d7c43e31402c433cdaaaccb26c8d88fc7e", class: "view-thread" }, a("div", { key: "0b2900754126998aa4495a916b03ad2ea4157f34", class: "header" }, a("div", { key: "38db0766a5bc2dfc37b5269cf1e63ad25531ee8d", class: "subject" }, (r = this.thread) == null ? void 0 : r.subject), a("div", { key: "bb73a5220497288f51b7c9d31e54cb685cfe54d5", class: "folders" }, (l = (n = this.thread) == null ? void 0 : n.folders) == null ? void 0 : l.map((i) => a("sp-tag", { size: "s" }, M(i.replace("CATEGORY_", "").replace("_", " ")))))), a("div", { key: "7d774b36fbfc216c05ed8cabbab79ad6b80e0e87", class: "messages" }, t && a(u, { 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 && e.length > 0 && a(m, null, a("div", { class: "show-more" }, a("button", { type: "button", onClick: this.onShowAllEmailsClick }, a("span", { class: "avatar" }, s.length), " ", a("span", { class: "sr-only" }, "Show ", s.length, " more emails"))), a("hr", null)), s.length > 0 && this.showAllEmails && this.messages.length > 2 && s.map((i) => a(u, { message: i, attachments: this.attachments.filter((c) => c.messageId === (t == null ? void 0 : t.id)), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement })), e.length > 0 && e.map((i) => a(u, { message: i, attachments: this.attachments.filter((c) => c.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) && a("div", { class: "reply-buttons" }, a("sp-button", { variant: "cta", type: "button", onClick: this.showComposerClick }, a("span", { slot: "icon" }, a("reply-icon", null)), a("span", null, "Reply")), a("sp-button", { variant: "cta", type: "button" }, a("span", { slot: "icon" }, a("reply-all-icon", null)), a("span", null, "Reply All")), a("sp-button", { variant: "cta", type: "button" }, a("span", { slot: "icon" }, a("forward-icon", null)), a("span", null, "Forward"))), this.showComposer && o && a("div", { class: "composer" }, a("nylas-composer", { message: o.data, onClose: this.showComposerClick, onSend: (i) => {
|
|
166
166
|
d("[nylas-view-thread] Send event", { message: i.detail.message, replyBody: i.detail.replyBody });
|
|
167
167
|
} })))));
|
|
168
168
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as o, h as t } from "./index-
|
|
1
|
+
import { r as o, h as t } from "./index-5851f0a2.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const e = ".sc-play-icon-h{display:flex}", i = e, h = class {
|
|
@@ -6,7 +6,7 @@ const e = ".sc-play-icon-h{display:flex}", i = e, h = class {
|
|
|
6
6
|
o(this, s), this.width = "15", this.height = "15";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return t("svg", { key: "
|
|
9
|
+
return t("svg", { key: "75bcdddbd491974d44ddcb8c61b9a3d3e56ad857", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "5668c1fb77efb5950d65c18bfe35166a791d0f8c", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
h.style = i;
|
|
@@ -15,7 +15,7 @@ const c = ".sc-stop-icon-h{display:flex}", n = c, r = class {
|
|
|
15
15
|
o(this, s), this.width = "15", this.height = "15";
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return t("svg", { key: "
|
|
18
|
+
return t("svg", { key: "d73d0562e7851a24ef4bf2cb82444e107456d12a", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "b1507478bb4fb8f5023ff76cec9532424676dbf9", d: "M4 4H20V20H4V4Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
r.style = n;
|
|
@@ -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-769f0fdd.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:"75bcdddbd491974d44ddcb8c61b9a3d3e56ad857",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"5668c1fb77efb5950d65c18bfe35166a791d0f8c",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=n;const c=".sc-stop-icon-h{display:flex}",h=c,i=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"d73d0562e7851a24ef4bf2cb82444e107456d12a",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"b1507478bb4fb8f5023ff76cec9532424676dbf9",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=h;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-769f0fdd.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.CheckboxComponent=o.CheckboxComponent;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.InputComponent=o.InputComponent;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.NylasCancellationPolicy=o.NylasCancellationPolicy;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasComposer=o.NylasComposer;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasCustomizeBookingSettings=o.NylasCustomizeBookingSettings;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.NylasMinBookingNotice=o.NylasMinBookingNotice;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasParticipantsCustomAvailability=o.NylasParticipantsCustomAvailability;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.NylasTimeslotInterval=o.NylasTimeslotInterval;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.RadioButtonGroup=o.RadioButtonGroup;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.TextareaComponent=o.TextareaComponent;exports.TimePeriodSelector=o.TimePeriodSelector;exports.ToggleSwitch=o.ToggleSwitch;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;
|