@nylas/react 1.1.7 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-circle-icon.entry-0f0cd6d8.cjs +1 -0
- package/dist/add-circle-icon.entry-d2b7178c.js +15 -0
- package/dist/{archive-icon.entry-769e863b.js → archive-icon.entry-602d3c58.js} +1 -1
- package/dist/{archive-icon.entry-10ebbf9a.cjs → archive-icon.entry-ec25f93a.cjs} +1 -1
- package/dist/{arrow-icon.entry-024d613a.cjs → arrow-icon.entry-7bcb6442.cjs} +1 -1
- package/dist/{arrow-icon.entry-1ebd553a.js → arrow-icon.entry-d4dd38b3.js} +1 -1
- package/dist/{bold-icon.entry-17c78a12.js → bold-icon.entry-5fc41386.js} +1 -1
- package/dist/{bold-icon.entry-8bc27b72.cjs → bold-icon.entry-fc1d34a6.cjs} +1 -1
- package/dist/{button-component_2.entry-5cd0adf0.cjs → button-component_2.entry-d23be43d.cjs} +1 -1
- package/dist/{button-component_2.entry-1095ad9f.js → button-component_2.entry-d62ae520.js} +1 -1
- package/dist/{calendar-agenda-fill-icon_54.entry-6b2114d5.js → calendar-agenda-fill-icon_54.entry-1a42103a.js} +2158 -2492
- package/dist/calendar-agenda-fill-icon_54.entry-95ccb99e.cjs +9 -0
- package/dist/{calendar-cancel-icon.entry-d27593a5.js → calendar-cancel-icon.entry-1566c286.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-4c58ea10.cjs → calendar-cancel-icon.entry-bf9fc719.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-4a35f416.cjs → calendar-check-icon_2.entry-4c3e78a6.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-38e1140b.js → calendar-check-icon_2.entry-82407a92.js} +1 -1
- package/dist/{calendar-icon.entry-002ee369.cjs → calendar-icon.entry-359c064c.cjs} +1 -1
- package/dist/{calendar-icon.entry-4543de86.js → calendar-icon.entry-c3c23413.js} +1 -1
- package/dist/{checkbox-component_2.entry-cf15106d.js → checkbox-component_2.entry-97e97789.js} +1 -1
- package/dist/{checkbox-component_2.entry-ad4ab088.cjs → checkbox-component_2.entry-f974e789.cjs} +1 -1
- package/dist/chevron-icon_3.entry-2453084c.cjs +1 -0
- package/dist/{chevron-icon_3.entry-5e60a853.js → chevron-icon_3.entry-a6189c37.js} +26 -22
- package/dist/{clock-icon_4.entry-8348282a.cjs → clock-icon_4.entry-5162dfec.cjs} +1 -1
- package/dist/{clock-icon_4.entry-d03310ae.js → clock-icon_4.entry-ad679142.js} +1 -1
- package/dist/close-icon.entry-2c6cdf35.js +15 -0
- package/dist/close-icon.entry-38dc2638.cjs +1 -0
- package/dist/{constants-c549b12b-7ea4c7f5.js → constants-35df11e7-b37e3406.js} +1 -1
- package/dist/{constants-c549b12b-c85413b1.cjs → constants-35df11e7-d87ad6d9.cjs} +1 -1
- package/dist/{copy-icon.entry-3ea78e28.js → copy-icon.entry-6630ce5a.js} +1 -1
- package/dist/{copy-icon.entry-5337f980.cjs → copy-icon.entry-79df1d0e.cjs} +1 -1
- package/dist/{delete-icon.entry-480ac215.js → delete-icon.entry-716f906c.js} +1 -1
- package/dist/{delete-icon.entry-87b2daaa.cjs → delete-icon.entry-f9a265b6.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-6be2b468.cjs → document-refresh-icon.entry-bb91822a.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-665a7947.js → document-refresh-icon.entry-fa775295.js} +1 -1
- package/dist/{feedbackSync-b56b29ed-36483932.js → feedbackSync-adc893c2-5965d5ba.js} +1 -1
- package/dist/{feedbackSync-b56b29ed-599103b9.cjs → feedbackSync-adc893c2-70d06afc.cjs} +1 -1
- package/dist/{folder-icon.entry-89f0974f.cjs → folder-icon.entry-82a02de7.cjs} +1 -1
- package/dist/{folder-icon.entry-9bf864d7.js → folder-icon.entry-9cf7590f.js} +1 -1
- package/dist/{forward-icon.entry-699c55d9.cjs → forward-icon.entry-034ec3be.cjs} +1 -1
- package/dist/{forward-icon.entry-2b0167a7.js → forward-icon.entry-ebd5e108.js} +1 -1
- package/dist/{globe-icon.entry-5d962e7a.js → globe-icon.entry-48837e22.js} +1 -1
- package/dist/{globe-icon.entry-3d08a9c4.cjs → globe-icon.entry-b67c68d5.cjs} +1 -1
- package/dist/{google-logo-icon_4.entry-ec724f2e.js → google-logo-icon_4.entry-819d7d0d.js} +354 -333
- package/dist/google-logo-icon_4.entry-b637470a.cjs +1 -0
- package/dist/{inbox-icon.entry-45414f66.cjs → inbox-icon.entry-7f91d971.cjs} +1 -1
- package/dist/{inbox-icon.entry-2020fa96.js → inbox-icon.entry-c611c154.js} +1 -1
- package/dist/{index-2b208d5d.js → index-72501df0.js} +2416 -2347
- package/dist/index-92ba1b80.cjs +81 -0
- package/dist/{index.es-c7ca1bad-67a99f41.cjs → index.es-28b1b2ec-595c0513.cjs} +1 -1
- package/dist/{index.es-c7ca1bad-70899f2a.js → index.es-28b1b2ec-5a87db22.js} +1 -1
- package/dist/{info-icon_2.entry-b98a2882.js → info-icon_2.entry-4ad69286.js} +1 -1
- package/dist/{info-icon_2.entry-237205a0.cjs → info-icon_2.entry-4c70ab61.cjs} +1 -1
- package/dist/{input-color-picker.entry-8fe3482d.cjs → input-color-picker.entry-46bf04e1.cjs} +1 -1
- package/dist/{input-color-picker.entry-684413c1.js → input-color-picker.entry-4e5760ce.js} +1 -1
- package/dist/{input-component.entry-bcd13373.cjs → input-component.entry-1019ce99.cjs} +1 -1
- package/dist/{input-component.entry-00b97287.js → input-component.entry-dca1013f.js} +1 -1
- package/dist/{input-dropdown.entry-b26475c4.cjs → input-dropdown.entry-e535fb5e.cjs} +1 -1
- package/dist/{input-dropdown.entry-3c39e23a.js → input-dropdown.entry-f14c59e7.js} +1 -1
- package/dist/{italic-icon.entry-2199bb17.js → italic-icon.entry-2ab53839.js} +1 -1
- package/dist/{italic-icon.entry-14081a02.cjs → italic-icon.entry-726cc194.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-7b66d2ae.cjs → multi-select-dropdown.entry-6820d249.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-2141b848.js → multi-select-dropdown.entry-a097d3cb.js} +1 -1
- package/dist/nylas-booked-event-card_12.entry-c684905b.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-2d88375a.js → nylas-booked-event-card_12.entry-ccd85ff4.js} +316 -247
- package/dist/{nylas-form-card.entry-1e9225b0.cjs → nylas-form-card.entry-8eb47f3d.cjs} +1 -1
- package/dist/{nylas-form-card.entry-a8a44a3b.js → nylas-form-card.entry-afdfee47.js} +2 -2
- package/dist/{nylas-if-state.entry-32b11afa.js → nylas-if-state.entry-7caad39f.js} +2 -2
- package/dist/{nylas-if-state.entry-473230a6.cjs → nylas-if-state.entry-be7978de.cjs} +1 -1
- package/dist/{nylas-login.entry-995b6f99.cjs → nylas-login.entry-bce4f689.cjs} +1 -1
- package/dist/{nylas-login.entry-d663205c.js → nylas-login.entry-dcf85f93.js} +2 -2
- package/dist/{nylas-provider.entry-c24474c3.js → nylas-provider.entry-97882e4b.js} +4 -4
- package/dist/{nylas-provider.entry-050f20bd.cjs → nylas-provider.entry-f02017da.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-3b834bb1.cjs → nylas-scheduler-editor.entry-cc6f4060.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-5c0a5fb4.js → nylas-scheduler-editor.entry-dcfdd6bf.js} +8 -9
- package/dist/{nylas-scheduling.entry-04c3951e.js → nylas-scheduling.entry-2b842e93.js} +40 -37
- package/dist/nylas-scheduling.entry-e0e9c8e8.cjs +1 -0
- package/dist/{nylas-time-window-picker.entry-678a7dbf.js → nylas-time-window-picker.entry-96f5fe9a.js} +1 -1
- package/dist/{nylas-time-window-picker.entry-337d03c1.cjs → nylas-time-window-picker.entry-a8780f2e.cjs} +1 -1
- package/dist/{person-icon.entry-3fee5bc4.cjs → person-icon.entry-2f8e00fd.cjs} +1 -1
- package/dist/{person-icon.entry-902b2c0d.js → person-icon.entry-3ec67feb.js} +1 -1
- package/dist/{play-icon.entry-a7f648f7.cjs → play-icon.entry-1abf79e9.cjs} +1 -1
- package/dist/{play-icon.entry-1078da37.js → play-icon.entry-a840bdca.js} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-5399f64b.js → refresh-icon.entry-11fcb673.js} +1 -1
- package/dist/{refresh-icon.entry-06f9d181.cjs → refresh-icon.entry-af7f54b4.cjs} +1 -1
- package/dist/{register-component-3444af44-3d6e535a.js → register-component-75f530bc-0e4e3d7a.js} +1 -1
- package/dist/{register-component-3444af44-6d269634.cjs → register-component-75f530bc-61b6f2dd.cjs} +1 -1
- package/dist/{reply-all-icon.entry-a3a20f76.js → reply-all-icon.entry-5c8b3356.js} +1 -1
- package/dist/{reply-all-icon.entry-70ffe5be.cjs → reply-all-icon.entry-cc2ad940.cjs} +1 -1
- package/dist/{reply-icon.entry-a08c0e57.cjs → reply-icon.entry-840acade.cjs} +1 -1
- package/dist/{reply-icon.entry-302ed745.js → reply-icon.entry-d048736f.js} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-34c4c119.cjs → scheduler-config-store-ed4a8dfd-161a3efd.cjs} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-81687f55.js → scheduler-config-store-ed4a8dfd-f74e58ae.js} +1 -1
- package/dist/{scheduler-store-2e7db190-c648278f.js → scheduler-store-d84b82a0-11faba86.js} +2 -2
- package/dist/{scheduler-store-2e7db190-fb6a20a1.cjs → scheduler-store-d84b82a0-7a7fe186.cjs} +1 -1
- package/dist/{sent-icon.entry-6396b793.cjs → sent-icon.entry-987760ce.cjs} +1 -1
- package/dist/{sent-icon.entry-4d7b65ba.js → sent-icon.entry-fd3b9ad9.js} +1 -1
- package/dist/{spam-icon.entry-8648a315.cjs → spam-icon.entry-3ce4f9fc.cjs} +1 -1
- package/dist/{spam-icon.entry-45e7b83b.js → spam-icon.entry-4665415c.js} +1 -1
- package/dist/{star-icon.entry-61c36332.js → star-icon.entry-0f446ac7.js} +1 -1
- package/dist/{star-icon.entry-1c416cef.cjs → star-icon.entry-a3ba4703.cjs} +1 -1
- package/dist/{stop-icon.entry-089ac3ba.js → stop-icon.entry-72c964b2.js} +1 -1
- package/dist/{stop-icon.entry-d68aa652.cjs → stop-icon.entry-9c13e00a.cjs} +1 -1
- package/dist/{textarea-component.entry-8f5d835f.js → textarea-component.entry-d414e219.js} +1 -1
- package/dist/{textarea-component.entry-502c8659.cjs → textarea-component.entry-ff04b5fa.cjs} +1 -1
- package/dist/{time-period-selector.entry-001a1c59.cjs → time-period-selector.entry-2ce3347a.cjs} +1 -1
- package/dist/{time-period-selector.entry-7da7d316.js → time-period-selector.entry-53edc0ba.js} +1 -1
- package/dist/{translate-icon.entry-5166d376.js → translate-icon.entry-84a78b9a.js} +1 -1
- package/dist/{translate-icon.entry-4ee80d22.cjs → translate-icon.entry-9bab13ad.cjs} +1 -1
- package/dist/{trash-fill-icon.entry-49844a82.js → trash-fill-icon.entry-2881a44c.js} +1 -1
- package/dist/{trash-fill-icon.entry-2f814465.cjs → trash-fill-icon.entry-84f52290.cjs} +1 -1
- package/dist/{underline-icon.entry-181f1d7e.js → underline-icon.entry-23eca319.js} +1 -1
- package/dist/{underline-icon.entry-4ba93e7b.cjs → underline-icon.entry-5a8410ef.cjs} +1 -1
- package/dist/{warning-icon.entry-44ac5566.cjs → warning-icon.entry-1966042d.cjs} +1 -1
- package/dist/{warning-icon.entry-2406b765.js → warning-icon.entry-abf9e5dc.js} +1 -1
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-5814b516.cjs +0 -1
- package/dist/add-circle-icon_2.entry-5db67b5b.js +0 -25
- package/dist/add-circle-icon_2.entry-95b23b9d.js +0 -25
- package/dist/add-circle-icon_2.entry-ae11c837.cjs +0 -1
- package/dist/archive-icon.entry-2ead8ef0.cjs +0 -1
- package/dist/archive-icon.entry-b28d195c.js +0 -15
- package/dist/arrow-icon.entry-8de38831.cjs +0 -1
- package/dist/arrow-icon.entry-e29d7a6c.js +0 -15
- package/dist/bold-icon.entry-316f5e61.js +0 -15
- package/dist/bold-icon.entry-caf96585.cjs +0 -1
- package/dist/button-component_2.entry-531a725d.js +0 -26
- package/dist/button-component_2.entry-64a41161.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_54.entry-84e72636.js +0 -5656
- package/dist/calendar-agenda-fill-icon_54.entry-abb96e20.cjs +0 -10
- package/dist/calendar-agenda-fill-icon_54.entry-f5577fdb.cjs +0 -10
- package/dist/calendar-cancel-icon.entry-f11e5aaa.cjs +0 -1
- package/dist/calendar-cancel-icon.entry-f1a6f9bc.js +0 -15
- package/dist/calendar-check-icon_2.entry-52187599.cjs +0 -1
- package/dist/calendar-check-icon_2.entry-7f17a3a6.js +0 -25
- package/dist/calendar-icon.entry-3c5c97d4.cjs +0 -1
- package/dist/calendar-icon.entry-b76e26e6.js +0 -15
- package/dist/checkbox-component_2.entry-b24885e9.cjs +0 -1
- package/dist/checkbox-component_2.entry-e4a3dd2d.js +0 -79
- package/dist/chevron-icon_3.entry-582df6f7.cjs +0 -1
- package/dist/chevron-icon_3.entry-59d8b408.cjs +0 -1
- package/dist/chevron-icon_3.entry-cab72db3.js +0 -143
- package/dist/clock-icon_4.entry-f6b9f85d.js +0 -45
- package/dist/clock-icon_4.entry-fcbc39b0.cjs +0 -1
- package/dist/copy-icon.entry-430beab4.js +0 -15
- package/dist/copy-icon.entry-74a59fc5.cjs +0 -1
- package/dist/delete-icon.entry-9c1af040.js +0 -15
- package/dist/delete-icon.entry-e320cde1.cjs +0 -1
- package/dist/document-refresh-icon.entry-930ee2b7.js +0 -15
- package/dist/document-refresh-icon.entry-fcde4ff6.cjs +0 -1
- package/dist/feedbackSync-b56b29ed-7a7c650e.cjs +0 -448
- package/dist/feedbackSync-b56b29ed-9e38fdb6.js +0 -6035
- package/dist/folder-icon.entry-977e50eb.cjs +0 -1
- package/dist/folder-icon.entry-b80d8fd7.js +0 -15
- package/dist/forward-icon.entry-c4c20f31.cjs +0 -1
- package/dist/forward-icon.entry-eb64aa16.js +0 -15
- package/dist/globe-icon.entry-5ef1dc42.cjs +0 -1
- package/dist/globe-icon.entry-667987bd.js +0 -15
- package/dist/google-logo-icon_4.entry-12f1492f.cjs +0 -1
- package/dist/google-logo-icon_4.entry-bd4d2237.cjs +0 -1
- package/dist/google-logo-icon_4.entry-fc38681e.js +0 -729
- package/dist/inbox-icon.entry-49353988.js +0 -15
- package/dist/inbox-icon.entry-b556231f.cjs +0 -1
- package/dist/index-290b2932.cjs +0 -81
- package/dist/index-bf124f70.cjs +0 -81
- package/dist/index-fb096a02.js +0 -13011
- package/dist/index.es-c7ca1bad-b7a3e6bd.cjs +0 -7
- package/dist/index.es-c7ca1bad-cb3a99a7.js +0 -3129
- package/dist/info-icon_2.entry-caf64c28.cjs +0 -1
- package/dist/info-icon_2.entry-d935e5c2.js +0 -34
- package/dist/input-color-picker.entry-752534de.js +0 -48
- package/dist/input-color-picker.entry-f856fce3.cjs +0 -1
- package/dist/input-component.entry-4400f98e.js +0 -70
- package/dist/input-component.entry-d486907a.cjs +0 -1
- package/dist/input-dropdown.entry-bea3c690.js +0 -134
- package/dist/input-dropdown.entry-d3d4e50e.cjs +0 -1
- package/dist/italic-icon.entry-63726952.cjs +0 -1
- package/dist/italic-icon.entry-a3c87e5e.js +0 -15
- package/dist/multi-select-dropdown.entry-8a2c4b42.cjs +0 -1
- package/dist/multi-select-dropdown.entry-cdd97d65.js +0 -95
- package/dist/nylas-booked-event-card_12.entry-20c254bb.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-90a0b6c7.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-bbd7cfb0.js +0 -1237
- package/dist/nylas-form-card.entry-d6287d76.cjs +0 -1
- package/dist/nylas-form-card.entry-fadd7718.js +0 -57
- package/dist/nylas-if-state.entry-8be8107e.js +0 -94
- package/dist/nylas-if-state.entry-9c341f13.cjs +0 -1
- package/dist/nylas-login.entry-b9c2fb27.cjs +0 -1
- package/dist/nylas-login.entry-e3a9c5c1.js +0 -73
- package/dist/nylas-provider.entry-5b54f2cc.cjs +0 -1
- package/dist/nylas-provider.entry-ca3e06ce.js +0 -264
- package/dist/nylas-scheduler-editor.entry-b86f49a1.js +0 -1447
- package/dist/nylas-scheduler-editor.entry-d52db29e.cjs +0 -2
- package/dist/nylas-scheduling.entry-a5c4b050.js +0 -412
- package/dist/nylas-scheduling.entry-d549c5c3.cjs +0 -1
- package/dist/nylas-scheduling.entry-ed12a4f6.cjs +0 -1
- package/dist/nylas-time-window-picker.entry-4aefade8.cjs +0 -1
- package/dist/nylas-time-window-picker.entry-ecc3ee10.js +0 -316
- package/dist/person-icon.entry-9680bc2b.js +0 -15
- package/dist/person-icon.entry-dede7140.cjs +0 -1
- package/dist/play-icon.entry-c8f3a5d8.cjs +0 -1
- package/dist/play-icon.entry-dacc3aa6.js +0 -15
- package/dist/refresh-icon.entry-555a38ec.cjs +0 -1
- package/dist/refresh-icon.entry-d4dcfc3a.js +0 -15
- package/dist/register-component-3444af44-4a273c0a.js +0 -109
- package/dist/register-component-3444af44-d3e7252a.cjs +0 -1
- package/dist/reply-all-icon.entry-bb2a88ad.js +0 -15
- package/dist/reply-all-icon.entry-f8a32be1.cjs +0 -1
- package/dist/reply-icon.entry-423fb307.js +0 -15
- package/dist/reply-icon.entry-d2da8972.cjs +0 -1
- package/dist/scheduler-config-store-ed4a8dfd-474f6252.cjs +0 -1
- package/dist/scheduler-config-store-ed4a8dfd-fe2b9d18.js +0 -26
- package/dist/scheduler-store-5fbba021-09da63cf.cjs +0 -1
- package/dist/scheduler-store-5fbba021-6298edf3.js +0 -484
- package/dist/sent-icon.entry-6ed4170a.js +0 -15
- package/dist/sent-icon.entry-db89fd38.cjs +0 -1
- package/dist/spam-icon.entry-81073952.js +0 -15
- package/dist/spam-icon.entry-cf05a2a7.cjs +0 -1
- package/dist/star-icon.entry-8279e6a9.cjs +0 -1
- package/dist/star-icon.entry-bb26cc4e.js +0 -15
- package/dist/stop-icon.entry-f62d063b.js +0 -15
- package/dist/stop-icon.entry-f88a5a2a.cjs +0 -1
- package/dist/textarea-component.entry-d4a682fa.js +0 -37
- package/dist/textarea-component.entry-e06ee834.cjs +0 -1
- package/dist/time-period-selector.entry-837b9be3.js +0 -80
- package/dist/time-period-selector.entry-c5b6d0c9.cjs +0 -1
- package/dist/translate-icon.entry-c1a623d8.cjs +0 -1
- package/dist/translate-icon.entry-e5cfae44.js +0 -15
- package/dist/trash-fill-icon.entry-85e0e841.js +0 -15
- package/dist/trash-fill-icon.entry-def90241.cjs +0 -1
- package/dist/underline-icon.entry-72dadbdf.cjs +0 -1
- package/dist/underline-icon.entry-f7a75755.js +0 -15
- package/dist/warning-icon.entry-5b6aeb2b.cjs +0 -1
- package/dist/warning-icon.entry-ef601856.js +0 -15
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bf124f70.cjs"),i=require("./register-component-3444af44-d3e7252a.cjs");require("react");require("react-dom");const b=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}',y=b;var m=function(a,n,t,r){var d=arguments.length,s=d<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,t):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,n,t,r);else for(var l=a.length-1;l>=0;l--)(c=a[l])&&(s=(d<3?c(s):d>3?c(n,t,s):c(n,t))||s);return d>3&&s&&Object.defineProperty(n,t,s),s},o=function(a,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,n)};const f=class{constructor(a){e.registerInstance(this,a),a.$hostElement$["s-ei"]?this.internals=a.$hostElement$["s-ei"]:(this.internals=a.$hostElement$.attachInternals(),a.$hostElement$["s-ei"]=this.internals)}connectedCallback(){e.debug("nylas-event-card","connectedCallback")}componentWillLoad(){e.debug("nylas-event-card","componentWillLoad")}componentDidLoad(){e.debug("nylas-event-card","componentDidLoad")}disconnectedCallback(){e.debug("nylas-event-card","disconnectedCallback");const a=["header-title","header-subtitle","content"];e.checkForMissingSlots(a,this.host)}render(){return e.h(e.Host,{key:"5ccd047d1a8bb515dea8aa7b9d7d39265afc31c9"},e.h("div",{key:"c40f52eaa4d099d92d65b0df662cd2de1b5f35c7",class:"nylas-form-card",part:"nfc"},e.h("div",{key:"545dabd81dce9b4f6f5f1d129071e1136f62e609",class:"nylas-form-card__header",part:"nfc__header"},e.h("slot",{key:"2be9b24f91316235be7132a6466cd16b9dfe813c",name:"header-title"}),e.h("slot",{key:"3414a084465efc50a3856291dff61d8ef3b3c617",name:"header-subtitle"})),e.h("div",{key:"cc07650a55afd7fc5d2429ff3611168977775bc8",class:"nylas-form-card__content"},e.h("slot",{key:"d50dd8dfbfea1ad84876495e72dd03102e2bc0dc",name:"content"}))))}static get formAssociated(){return!0}get host(){return e.getElement(this)}};m([i.RegisterComponent({name:"nylas-form-card",eventToProps:{},fireRegisterEvent:!0}),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],f.prototype,"render",null);f.style=y;exports.nylas_form_card=f;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { r as b, d as c, K as y, h as n, H as m, g as p } from "./index-2b208d5d.js";
|
|
2
|
-
import { R as u } from "./register-component-3444af44-3d6e535a.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const h = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}', v = h;
|
|
6
|
-
var _ = function(e, a, t, r) {
|
|
7
|
-
var d = arguments.length, s = d < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, t) : r, l;
|
|
8
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
9
|
-
s = Reflect.decorate(e, a, t, r);
|
|
10
|
-
else
|
|
11
|
-
for (var o = e.length - 1; o >= 0; o--)
|
|
12
|
-
(l = e[o]) && (s = (d < 3 ? l(s) : d > 3 ? l(a, t, s) : l(a, t)) || s);
|
|
13
|
-
return d > 3 && s && Object.defineProperty(a, t, s), s;
|
|
14
|
-
}, f = function(e, a) {
|
|
15
|
-
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
16
|
-
return Reflect.metadata(e, a);
|
|
17
|
-
};
|
|
18
|
-
const i = class {
|
|
19
|
-
constructor(e) {
|
|
20
|
-
b(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
|
|
21
|
-
}
|
|
22
|
-
connectedCallback() {
|
|
23
|
-
c("nylas-event-card", "connectedCallback");
|
|
24
|
-
}
|
|
25
|
-
componentWillLoad() {
|
|
26
|
-
c("nylas-event-card", "componentWillLoad");
|
|
27
|
-
}
|
|
28
|
-
componentDidLoad() {
|
|
29
|
-
c("nylas-event-card", "componentDidLoad");
|
|
30
|
-
}
|
|
31
|
-
disconnectedCallback() {
|
|
32
|
-
c("nylas-event-card", "disconnectedCallback"), y(["header-title", "header-subtitle", "content"], this.host);
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return n(m, { key: "5ccd047d1a8bb515dea8aa7b9d7d39265afc31c9" }, n("div", { key: "c40f52eaa4d099d92d65b0df662cd2de1b5f35c7", class: "nylas-form-card", part: "nfc" }, n("div", { key: "545dabd81dce9b4f6f5f1d129071e1136f62e609", class: "nylas-form-card__header", part: "nfc__header" }, n("slot", { key: "2be9b24f91316235be7132a6466cd16b9dfe813c", name: "header-title" }), n("slot", { key: "3414a084465efc50a3856291dff61d8ef3b3c617", name: "header-subtitle" })), n("div", { key: "cc07650a55afd7fc5d2429ff3611168977775bc8", class: "nylas-form-card__content" }, n("slot", { key: "d50dd8dfbfea1ad84876495e72dd03102e2bc0dc", name: "content" }))));
|
|
36
|
-
}
|
|
37
|
-
static get formAssociated() {
|
|
38
|
-
return !0;
|
|
39
|
-
}
|
|
40
|
-
get host() {
|
|
41
|
-
return p(this);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
_([
|
|
45
|
-
u({
|
|
46
|
-
name: "nylas-form-card",
|
|
47
|
-
eventToProps: {},
|
|
48
|
-
fireRegisterEvent: !0
|
|
49
|
-
}),
|
|
50
|
-
f("design:type", Function),
|
|
51
|
-
f("design:paramtypes", []),
|
|
52
|
-
f("design:returntype", void 0)
|
|
53
|
-
], i.prototype, "render", null);
|
|
54
|
-
i.style = v;
|
|
55
|
-
export {
|
|
56
|
-
i as nylas_form_card
|
|
57
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { r as h, d as o, h as l, H as u } from "./index-fb096a02.js";
|
|
2
|
-
import { R as m } from "./register-component-3444af44-4a273c0a.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const p = ":host{display:block}div{height:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fade-in{animation:fadeIn 1.5s}.fade-out{animation:fadeOut 1.5s}@keyframes slideIn{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes slideOut{0%{transform:translateY(0)}100%{transform:translateY(100%)}}.slide-in{animation:slideIn 1.5s}.slide-out{animation:slideOut 1.5s}@keyframes swipeIn{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes swipeOut{0%{transform:translateX(0)}100%{transform:translateX(100%)}}.swipe-in{animation:swipeIn 1.5s}.swipe-out{animation:swipeOut 1.5s}", y = p;
|
|
6
|
-
var S = function(e, s, n, a) {
|
|
7
|
-
var t = arguments.length, i = t < 3 ? s : a === null ? a = Object.getOwnPropertyDescriptor(s, n) : a, r;
|
|
8
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
9
|
-
i = Reflect.decorate(e, s, n, a);
|
|
10
|
-
else
|
|
11
|
-
for (var f = e.length - 1; f >= 0; f--)
|
|
12
|
-
(r = e[f]) && (i = (t < 3 ? r(i) : t > 3 ? r(s, n, i) : r(s, n)) || i);
|
|
13
|
-
return t > 3 && i && Object.defineProperty(s, n, i), i;
|
|
14
|
-
}, d = function(e, s) {
|
|
15
|
-
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
16
|
-
return Reflect.metadata(e, s);
|
|
17
|
-
};
|
|
18
|
-
const c = class {
|
|
19
|
-
constructor(e) {
|
|
20
|
-
h(this, e), this.state = void 0, this.isStateSet = void 0, this.isBoolean = void 0, this.getStore = void 0, this.transition = "none", this.show = !1, this.classes = {}, this.initTransition = this.initTransition.bind(this);
|
|
21
|
-
}
|
|
22
|
-
connectedCallback() {
|
|
23
|
-
}
|
|
24
|
-
disconnectedCallback() {
|
|
25
|
-
}
|
|
26
|
-
async componentWillLoad() {
|
|
27
|
-
o("[nylas-if-state] Component will load"), this.watchStore(!0);
|
|
28
|
-
}
|
|
29
|
-
async componentDidLoad() {
|
|
30
|
-
o("[nylas-if-state] Component did load");
|
|
31
|
-
}
|
|
32
|
-
shouldRender() {
|
|
33
|
-
const [e, s] = this.state ? this.state.split(".") : ["", ""], n = this.getStore;
|
|
34
|
-
if (typeof n > "u")
|
|
35
|
-
return o(`[nylas-if-state] Store name: ${e} | State name: ${s}`, { getStore: n }), !1;
|
|
36
|
-
const a = n(e);
|
|
37
|
-
if (typeof a > "u")
|
|
38
|
-
return o(`[nylas-if-state] Store name: ${e} | State name: ${s}`, { store: a }), !1;
|
|
39
|
-
const t = a.state[s];
|
|
40
|
-
return typeof this.isStateSet == "boolean" ? this.isStateSet === !1 && (typeof t > "u" || t === null || t.length === 0) || this.isStateSet === !0 && typeof t < "u" && t !== null : typeof this.isBoolean == "boolean" ? this.isBoolean === !0 && typeof t < "u" && t === !0 || this.isBoolean === !1 && typeof t < "u" && t === !1 : !1;
|
|
41
|
-
}
|
|
42
|
-
onGetStoreChange() {
|
|
43
|
-
this.watchStore(!0);
|
|
44
|
-
}
|
|
45
|
-
watchStore(e = !1) {
|
|
46
|
-
const [s, n] = this.state ? this.state.split(".") : ["", ""], a = this.getStore;
|
|
47
|
-
if (typeof a > "u")
|
|
48
|
-
return o(`[nylas-if-state] Store name: ${s} | State name: ${n}`, { getStore: a }), null;
|
|
49
|
-
const t = a(s);
|
|
50
|
-
if (typeof t > "u")
|
|
51
|
-
return o(`[nylas-if-state] Store name: ${s} | State name: ${n}`, { store: t }), null;
|
|
52
|
-
e === !0 && this.initTransition(), t.onChange(n, this.initTransition);
|
|
53
|
-
}
|
|
54
|
-
initTransition() {
|
|
55
|
-
const e = this.shouldRender();
|
|
56
|
-
switch (this.transition) {
|
|
57
|
-
case "fade":
|
|
58
|
-
case "slide":
|
|
59
|
-
case "swipe":
|
|
60
|
-
this.classes = {
|
|
61
|
-
[`${this.transition}-in`]: e,
|
|
62
|
-
[`${this.transition}-out`]: !e
|
|
63
|
-
}, setTimeout(() => {
|
|
64
|
-
this.show = e;
|
|
65
|
-
}, 150);
|
|
66
|
-
break;
|
|
67
|
-
default:
|
|
68
|
-
this.show = this.shouldRender();
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
render() {
|
|
73
|
-
return l(u, { key: "4ab162229644e4d5d9d571af164b417c3e503e2c" }, l("div", { key: "f5b4dd56ac193ba63be4a7040bdb61d7a2e1da04", class: this.classes }, this.show && l("slot", null)));
|
|
74
|
-
}
|
|
75
|
-
static get watchers() {
|
|
76
|
-
return {
|
|
77
|
-
getStore: ["onGetStoreChange"]
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
S([
|
|
82
|
-
m({
|
|
83
|
-
name: "nylas-if-state",
|
|
84
|
-
getStoresToProp: "getStore",
|
|
85
|
-
fireRegisterEvent: !0
|
|
86
|
-
}),
|
|
87
|
-
d("design:type", Function),
|
|
88
|
-
d("design:paramtypes", []),
|
|
89
|
-
d("design:returntype", void 0)
|
|
90
|
-
], c.prototype, "render", null);
|
|
91
|
-
c.style = y;
|
|
92
|
-
export {
|
|
93
|
-
c as nylas_if_state
|
|
94
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-290b2932.cjs"),u=require("./register-component-3444af44-6d269634.cjs");require("react");require("react-dom");const c=":host{display:block}div{height:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fade-in{animation:fadeIn 1.5s}.fade-out{animation:fadeOut 1.5s}@keyframes slideIn{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes slideOut{0%{transform:translateY(0)}100%{transform:translateY(100%)}}.slide-in{animation:slideIn 1.5s}.slide-out{animation:slideOut 1.5s}@keyframes swipeIn{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes swipeOut{0%{transform:translateX(0)}100%{transform:translateX(100%)}}.swipe-in{animation:swipeIn 1.5s}.swipe-out{animation:swipeOut 1.5s}",h=c;var m=function(e,n,s,a){var t=arguments.length,o=t<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,s):a,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,n,s,a);else for(var f=e.length-1;f>=0;f--)(r=e[f])&&(o=(t<3?r(o):t>3?r(n,s,o):r(n,s))||o);return t>3&&o&&Object.defineProperty(n,s,o),o},l=function(e,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,n)};const d=class{constructor(e){i.registerInstance(this,e),this.state=void 0,this.isStateSet=void 0,this.isBoolean=void 0,this.getStore=void 0,this.transition="none",this.show=!1,this.classes={},this.initTransition=this.initTransition.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){i.debug("[nylas-if-state] Component will load"),this.watchStore(!0)}async componentDidLoad(){i.debug("[nylas-if-state] Component did load")}shouldRender(){const[e,n]=this.state?this.state.split("."):["",""],s=this.getStore;if(typeof s>"u")return i.debug(`[nylas-if-state] Store name: ${e} | State name: ${n}`,{getStore:s}),!1;const a=s(e);if(typeof a>"u")return i.debug(`[nylas-if-state] Store name: ${e} | State name: ${n}`,{store:a}),!1;const t=a.state[n];return typeof this.isStateSet=="boolean"?this.isStateSet===!1&&(typeof t>"u"||t===null||t.length===0)||this.isStateSet===!0&&typeof t<"u"&&t!==null:typeof this.isBoolean=="boolean"?this.isBoolean===!0&&typeof t<"u"&&t===!0||this.isBoolean===!1&&typeof t<"u"&&t===!1:!1}onGetStoreChange(){this.watchStore(!0)}watchStore(e=!1){const[n,s]=this.state?this.state.split("."):["",""],a=this.getStore;if(typeof a>"u")return i.debug(`[nylas-if-state] Store name: ${n} | State name: ${s}`,{getStore:a}),null;const t=a(n);if(typeof t>"u")return i.debug(`[nylas-if-state] Store name: ${n} | State name: ${s}`,{store:t}),null;e===!0&&this.initTransition(),t.onChange(s,this.initTransition)}initTransition(){const e=this.shouldRender();switch(this.transition){case"fade":case"slide":case"swipe":this.classes={[`${this.transition}-in`]:e,[`${this.transition}-out`]:!e},setTimeout(()=>{this.show=e},150);break;default:this.show=this.shouldRender();break}}render(){return i.h(i.Host,{key:"4ab162229644e4d5d9d571af164b417c3e503e2c"},i.h("div",{key:"f5b4dd56ac193ba63be4a7040bdb61d7a2e1da04",class:this.classes},this.show&&i.h("slot",null)))}static get watchers(){return{getStore:["onGetStoreChange"]}}};m([u.RegisterComponent({name:"nylas-if-state",getStoresToProp:"getStore",fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],d.prototype,"render",null);d.style=h;exports.nylas_if_state=d;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-bf124f70.cjs"),h=require("./register-component-3444af44-d3e7252a.cjs");require("react");require("react-dom");const u=":host{font-family:'Arial', sans-serif;background:var(--nylas-color-primary-50);color:var(--nylas-color-primary-800);margin:0;display:contents}input{box-sizing:border-box}.login-container{display:flex;justify-content:center;align-items:center;height:100%}.login-box{width:300px;padding:20px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-color-primary-50);text-align:center}.login-box h1{margin-top:0;margin-bottom:0.5em}.login-box p{margin-bottom:1em}.login-methods button{display:block;width:100%;padding:10px 10px 10px 50px;margin-bottom:10px;border:none;border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-color-primary-300);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-600);cursor:pointer;transition:background 0.3s ease;position:relative;text-align:left}.login-methods button svg{position:absolute;left:16px;top:50%;transform:translateY(-50%)}.login-methods button:hover{background:var(--nylas-color-primary-200);}.login-form label{display:block;margin-bottom:5px;text-align:left}.login-form input{width:100%;padding:10px;margin-bottom:10px;border:1px solid var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-800);}.login-form button{width:100%;padding:10px;border:none;border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-500);color:var(--nylas-color-primary-50);cursor:pointer;transition:background 0.3s ease}.login-form button:hover{background:var(--nylas-color-primary-600);}",p=u;var g=function(n,o,i,e){var a=arguments.length,r=a<3?o:e===null?e=Object.getOwnPropertyDescriptor(o,i):e,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(n,o,i,e);else for(var l=n.length-1;l>=0;l--)(s=n[l])&&(r=(a<3?s(r):a>3?s(o,i,r):s(o,i))||r);return a>3&&r&&Object.defineProperty(o,i,r),r},c=function(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)};const d=class{constructor(n){t.registerInstance(this,n),this.buttonClick=t.createEvent(this,"buttonClick",7),this._handleLoginRedirect=async()=>{var e;const o=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes));this.buttonClick.emit({url:o}).defaultPrevented||o&&(window.location.href=o)},this._onGoogleButtonClick=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,void 0,"google"));i&&(window.location.href=i)},this._onMicrosoftButtonClick=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,void 0,"microsoft"));i&&(window.location.href=i)},this._onFormSubmit=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,this.email));i&&(window.location.href=i)},this.isAuthenticated=!1,this.nylasConnector=void 0,this.scopes=void 0,this.loginMethod="redirect",this.companyName="Nylas",this.logoUrl="https://www.nylas.com/wp-content/uploads/main-logo.svg",this.logoWidth="min-content",this.providers="google,microsoft",this.buttonText="Login",this.email=""}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){}async componentDidLoad(){var o;await((o=this.nylasConnector)==null?void 0:o.auth.manageHostedAuthCodeExchange(window.location.href))&&window.history.replaceState({},document.title,window.location.pathname)}render(){var o;const n=((o=this.providers)==null?void 0:o.split(","))||[];return t.h(t.Host,{key:"0e8ae3287facdc3e67109cd57cb80a761897de76"},this.loginMethod==="redirect"&&t.h("div",{class:"redirect-container"},!this.isAuthenticated&&t.h("button",{part:"button",onClick:this._handleLoginRedirect},this.buttonText)),this.loginMethod==="emebded"&&t.h("main",{class:"login-container"},t.h("section",{class:"login-box"},t.h("header",null,t.h("img",{src:this.logoUrl,alt:`${this.companyName} logo`,width:"100%",style:{minWidth:this.logoWidth}}),t.h("h1",null,"Welcome")),t.h("p",null,"Log in to your account to continue to ",this.companyName),t.h("div",{class:"login-methods"},n.includes("google")&&t.h("button",{class:"login-google",onClick:this._onGoogleButtonClick},t.h("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 256 262"},t.h("path",{fill:"#4285F4",d:"M255.6 131.6c0-8.2-.8-16.2-2.2-23.9H130v45.3h70.3c-3 16.1-12.4 29.7-26.3 38.9v32.4h42.6c25-23 39.4-56.7 39.4-97.7z"}),t.h("path",{fill:"#34A853",d:"M130 262c35.3 0 64.9-11.7 86.5-31.7l-42.6-32.4c-11.7 7.9-26.7 12.6-43.9 12.6-33.7 0-62.3-22.7-72.5-53.4H14.5v33.3A130.3 130.3 0 00130 262z"}),t.h("path",{fill:"#FBBC05",d:"M57.5 158.1a72.7 72.7 0 010-54.2V70.6H14.5a130.4 130.4 0 000 120.8l43-33.3z"}),t.h("path",{fill:"#EA4335",d:"M130 51.6c19 0 36 6.5 49.4 19.2l37-36C195 13.1 165.2 0 130 0A130.3 130.3 0 0014.5 70.6l43 33.3c10.2-30.7 38.8-53.3 72.5-53.3z"})),"Continue with Google"),n.includes("microsoft")&&t.h("button",{class:"login-microsoft",onClick:this._onMicrosoftButtonClick},t.h("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 448 512"},t.h("path",{fill:"#F3F3F3",d:"M0 32v192h192V32H0zm256 0v192h192V32H256zm192 256v192h-192V288h192zM0 224v192h192V224H0z"})),"Continue with Microsoft")),t.h("form",{class:"login-form",method:"POST",onSubmit:this._onFormSubmit},t.h("label",{htmlFor:"email"},"Email"),t.h("input",{type:"email",id:"email",name:"email",required:!0,value:this.email}),t.h("button",{type:"submit"},"Next")))))}};g([h.RegisterComponent({name:"nylas-login",connectorToProp:"nylasConnector",stateToProps:new Map([["auth.isAuthenticated","isAuthenticated"]]),fireRegisterEvent:!0}),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],d.prototype,"render",null);d.style=p;exports.nylas_login=d;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { r as h, c as p, h as o, H as u } from "./index-2b208d5d.js";
|
|
2
|
-
import { R as m } from "./register-component-3444af44-3d6e535a.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const g = ":host{font-family:'Arial', sans-serif;background:var(--nylas-color-primary-50);color:var(--nylas-color-primary-800);margin:0;display:contents}input{box-sizing:border-box}.login-container{display:flex;justify-content:center;align-items:center;height:100%}.login-box{width:300px;padding:20px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-color-primary-50);text-align:center}.login-box h1{margin-top:0;margin-bottom:0.5em}.login-box p{margin-bottom:1em}.login-methods button{display:block;width:100%;padding:10px 10px 10px 50px;margin-bottom:10px;border:none;border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-color-primary-300);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-600);cursor:pointer;transition:background 0.3s ease;position:relative;text-align:left}.login-methods button svg{position:absolute;left:16px;top:50%;transform:translateY(-50%)}.login-methods button:hover{background:var(--nylas-color-primary-200);}.login-form label{display:block;margin-bottom:5px;text-align:left}.login-form input{width:100%;padding:10px;margin-bottom:10px;border:1px solid var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-800);}.login-form button{width:100%;padding:10px;border:none;border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-500);color:var(--nylas-color-primary-50);cursor:pointer;transition:background 0.3s ease}.login-form button:hover{background:var(--nylas-color-primary-600);}", y = g;
|
|
6
|
-
var f = function(n, t, i, e) {
|
|
7
|
-
var a = arguments.length, r = a < 3 ? t : e === null ? e = Object.getOwnPropertyDescriptor(t, i) : e, s;
|
|
8
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
9
|
-
r = Reflect.decorate(n, t, i, e);
|
|
10
|
-
else
|
|
11
|
-
for (var l = n.length - 1; l >= 0; l--)
|
|
12
|
-
(s = n[l]) && (r = (a < 3 ? s(r) : a > 3 ? s(t, i, r) : s(t, i)) || r);
|
|
13
|
-
return a > 3 && r && Object.defineProperty(t, i, r), r;
|
|
14
|
-
}, c = function(n, t) {
|
|
15
|
-
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
16
|
-
return Reflect.metadata(n, t);
|
|
17
|
-
};
|
|
18
|
-
const d = class {
|
|
19
|
-
constructor(n) {
|
|
20
|
-
h(this, n), this.buttonClick = p(this, "buttonClick", 7), this._handleLoginRedirect = async () => {
|
|
21
|
-
var e;
|
|
22
|
-
const t = await ((e = this.nylasConnector) == null ? void 0 : e.auth.getHostedAuthRedirectURL(this.scopes));
|
|
23
|
-
this.buttonClick.emit({ url: t }).defaultPrevented || t && (window.location.href = t);
|
|
24
|
-
}, this._onGoogleButtonClick = async (t) => {
|
|
25
|
-
var e;
|
|
26
|
-
t.preventDefault();
|
|
27
|
-
const i = await ((e = this.nylasConnector) == null ? void 0 : e.auth.getHostedAuthRedirectURL(this.scopes, void 0, "google"));
|
|
28
|
-
i && (window.location.href = i);
|
|
29
|
-
}, this._onMicrosoftButtonClick = async (t) => {
|
|
30
|
-
var e;
|
|
31
|
-
t.preventDefault();
|
|
32
|
-
const i = await ((e = this.nylasConnector) == null ? void 0 : e.auth.getHostedAuthRedirectURL(this.scopes, void 0, "microsoft"));
|
|
33
|
-
i && (window.location.href = i);
|
|
34
|
-
}, this._onFormSubmit = async (t) => {
|
|
35
|
-
var e;
|
|
36
|
-
t.preventDefault();
|
|
37
|
-
const i = await ((e = this.nylasConnector) == null ? void 0 : e.auth.getHostedAuthRedirectURL(this.scopes, this.email));
|
|
38
|
-
i && (window.location.href = i);
|
|
39
|
-
}, this.isAuthenticated = !1, this.nylasConnector = void 0, this.scopes = void 0, this.loginMethod = "redirect", this.companyName = "Nylas", this.logoUrl = "https://www.nylas.com/wp-content/uploads/main-logo.svg", this.logoWidth = "min-content", this.providers = "google,microsoft", this.buttonText = "Login", this.email = "";
|
|
40
|
-
}
|
|
41
|
-
connectedCallback() {
|
|
42
|
-
}
|
|
43
|
-
disconnectedCallback() {
|
|
44
|
-
}
|
|
45
|
-
componentWillLoad() {
|
|
46
|
-
}
|
|
47
|
-
async componentDidLoad() {
|
|
48
|
-
var t;
|
|
49
|
-
await ((t = this.nylasConnector) == null ? void 0 : t.auth.manageHostedAuthCodeExchange(window.location.href)) && window.history.replaceState({}, document.title, window.location.pathname);
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
var t;
|
|
53
|
-
const n = ((t = this.providers) == null ? void 0 : t.split(",")) || [];
|
|
54
|
-
return o(u, { key: "0e8ae3287facdc3e67109cd57cb80a761897de76" }, this.loginMethod === "redirect" && o("div", { class: "redirect-container" }, !this.isAuthenticated && o("button", { part: "button", onClick: this._handleLoginRedirect }, this.buttonText)), this.loginMethod === "emebded" && o("main", { class: "login-container" }, o("section", { class: "login-box" }, o("header", null, o("img", { src: this.logoUrl, alt: `${this.companyName} logo`, width: "100%", style: {
|
|
55
|
-
minWidth: this.logoWidth
|
|
56
|
-
} }), o("h1", null, "Welcome")), o("p", null, "Log in to your account to continue to ", this.companyName), o("div", { class: "login-methods" }, n.includes("google") && o("button", { class: "login-google", onClick: this._onGoogleButtonClick }, o("svg", { xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "img", width: "18", height: "18", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 256 262" }, o("path", { fill: "#4285F4", d: "M255.6 131.6c0-8.2-.8-16.2-2.2-23.9H130v45.3h70.3c-3 16.1-12.4 29.7-26.3 38.9v32.4h42.6c25-23 39.4-56.7 39.4-97.7z" }), o("path", { fill: "#34A853", d: "M130 262c35.3 0 64.9-11.7 86.5-31.7l-42.6-32.4c-11.7 7.9-26.7 12.6-43.9 12.6-33.7 0-62.3-22.7-72.5-53.4H14.5v33.3A130.3 130.3 0 00130 262z" }), o("path", { fill: "#FBBC05", d: "M57.5 158.1a72.7 72.7 0 010-54.2V70.6H14.5a130.4 130.4 0 000 120.8l43-33.3z" }), o("path", { fill: "#EA4335", d: "M130 51.6c19 0 36 6.5 49.4 19.2l37-36C195 13.1 165.2 0 130 0A130.3 130.3 0 0014.5 70.6l43 33.3c10.2-30.7 38.8-53.3 72.5-53.3z" })), "Continue with Google"), n.includes("microsoft") && o("button", { class: "login-microsoft", onClick: this._onMicrosoftButtonClick }, o("svg", { xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "img", width: "18", height: "18", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 448 512" }, o("path", { fill: "#F3F3F3", d: "M0 32v192h192V32H0zm256 0v192h192V32H256zm192 256v192h-192V288h192zM0 224v192h192V224H0z" })), "Continue with Microsoft")), o("form", { class: "login-form", method: "POST", onSubmit: this._onFormSubmit }, o("label", { htmlFor: "email" }, "Email"), o("input", { type: "email", id: "email", name: "email", required: !0, value: this.email }), o("button", { type: "submit" }, "Next")))));
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
f([
|
|
60
|
-
m({
|
|
61
|
-
name: "nylas-login",
|
|
62
|
-
connectorToProp: "nylasConnector",
|
|
63
|
-
stateToProps: /* @__PURE__ */ new Map([["auth.isAuthenticated", "isAuthenticated"]]),
|
|
64
|
-
fireRegisterEvent: !0
|
|
65
|
-
}),
|
|
66
|
-
c("design:type", Function),
|
|
67
|
-
c("design:paramtypes", []),
|
|
68
|
-
c("design:returntype", void 0)
|
|
69
|
-
], d.prototype, "render", null);
|
|
70
|
-
d.style = y;
|
|
71
|
-
export {
|
|
72
|
-
d as nylas_login
|
|
73
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-bf124f70.cjs"),l=require("./index.es-c7ca1bad-b7a3e6bd.cjs"),d=require("./scheduler-store-2e7db190-fb6a20a1.cjs"),y=require("./scheduler-config-store-ed4a8dfd-34c4c119.cjs");require("react");require("react-dom");class f{constructor(e,t){this.nylasAuth=e,this.nylasAuthStore=t}async validateSession(){const e=await this.isAccessTokenValid();if(!e)this.logout();else{let t=await this.nylasAuth.getTokenInfo();if(t){const r=Math.floor(Date.now()/1e3);if(t.expires_in&&t.expires_in-r<3e5&&(o.debug("[NylasAuthConnectorMixin] Refreshing access token"),t=await this.nylasAuth.refreshAccessToken(),!t)){o.debug("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."),this.logout();return}this.nylasAuthStore.state.tokenInfo=t}}this.nylasAuthStore.state.isAuthenticated=e}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(e,t,n){return this.nylasAuth.getHostedAuthRedirectURL(e,t,n)}async manageHostedAuthCodeExchange(e){const n=new URL(e).searchParams.get("code");if(n){const r=await this.nylasAuth.exchangeAuthCodeForTokenInfo(n);if(r)return this.nylasAuthStore.state.tokenInfo=r,this.nylasAuthStore.state.isAuthenticated=!0,r}return null}}class C{constructor(e,t,n,r,i,a="https://api.us.nylas.com"){this.router=e,this.schedulerAPIURL=a,this.nylasAuth=t,this.nylasAuthStore=n,this.nylasSchedulerStore=r,this.nylasSchedulerConfigStore=i}init(){o.debug("NylasConnector init")}get authStore(){return this.nylasAuthStore}get schedulerStore(){return this.nylasSchedulerStore}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get auth(){return this._authConnector?this._authConnector:(this._authConnector=new f(this.nylasAuth,this.nylasAuthStore),this._authConnector)}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new d.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore}),this._schedulerAPIConnector)}getAuth(){return this.nylasAuth}resetStores(){this.nylasAuthStore.reset()}async logout(){await this.nylasAuth.logout(),this.resetStores()}}class A extends Event{constructor(e,t){super(e,t),this.oldURL=t.oldURL,this.newURL=t.newURL}}class R{constructor(){this.routeChangeListeners=[],o.debug("HashRouter constructor")}destroy(){o.debug("HashRouter destroy"),window.removeEventListener("hashchange",this.onRouteChange.bind(this))}init(){if(o.debug("HashRouter init"),window.addEventListener("hashchange",this.onRouteChange.bind(this)),typeof HashChangeEvent<"u"){const e=new HashChangeEvent("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(e)}else{const e=new A("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(e)}}addRouteChangeListener(e,t){o.debug("HashRouter addRouteChangeListener"),this.routeChangeListeners.push([e,t])}navigate(e,t){if(o.debug("HashRouter navigate"),t)return window.history.pushState(null,"",`#${e}`);window.location.hash=e}setRoute(e){o.debug("HashRouter setRoute"),window.location.hash=e}matchRoute(e,t){const n=e.split("/"),r=t.split("/");if(o.debug(`HashRouter matchRoute route=${e} path=${t}`,{routeParts:n,pathParts:r}),n[1]===""&&r[0]==="")return!0;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const a=n[i],h=r[i];if(!a.startsWith(":")&&a!==h)return!1}return!0}getRouteParams(e){o.debug("HashRouter getRouteParams");const t={},n=e.split("/"),r=window.location.hash.split("/");return n.forEach((i,a)=>{if(i.startsWith(":")){const h=i.substring(1);t[h]=r[a]}}),t}getRouteWithParams(e,t){o.debug("HashRouter getRouteWithParams");let n=e;return Object.keys(t).forEach(r=>{n=n.replace(`:${r}`,t[r])}),n}getRoute(){return o.debug("HashRouter getRoute"),window.location.hash}onRouteChange(e){this.routeChangeListeners.forEach(async([t,n])=>{const r=e.newURL.indexOf("#")===-1?"":e.newURL.substring(e.newURL.indexOf("#")+1);if(o.debug(`HashRouter onRouteChange route=${t} path=${r}`,{event:e}),!this.matchRoute(t,r)){o.debug(`HashRouter onRouteChange route=${t} path=${r} does not match`);return}const i=this.getRouteParams(t);await n(t,r,i)})}getBasePath(){return o.debug("HashRouter getBasePath"),""}}function S(s={}){const e={isAuthenticated:!1,tokenInfo:null,state:"ready",...s},t=o.createStore(e);return t.reset=()=>{for(const n in e){const r=e[n];t.set(n,r)}},t}const b=":host{display:contents}",w=b,g=class{constructor(s){o.registerInstance(this,s),this.init=o.createEvent(this,"init",7),this.loggedIn=o.createEvent(this,"loggedIn",7),this.loggedOut=o.createEvent(this,"loggedOut",7),this.handleAuthChange=async e=>{e?this.loggedIn.emit(this.host):this.loggedOut.emit(this.host)},this.authConfig=void 0,this.eventOverrides={},this.automaticComponentRegistration=!0}connectedCallback(){o.debug("[nylas-provider] connectedCallback")}async componentWillLoad(){var i,a,h,u,c;o.debug("[nylas-provider] componentWillLoad"),this.stores={auth:S(),scheduler:d.CreateNylasSchedulerStore(),schedulerConfig:y.CreateNylasSchedulerConfigStore()},this.baseProvider=new l.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const s=new R;this.nylasAuth=l.es({apiUri:"https://api.us.nylas.com",elementsApiUri:"https://elements.us.nylas.com",storageType:"indexeddb",clientId:"YOUR_CLIENT_ID",defaultScopes:[],redirectURI:"/",...this.authConfig});const e=(i=this.baseProvider)==null?void 0:i.getStore("auth");if(!e)throw new Error("The auth store is not set");const t=(a=this.baseProvider)==null?void 0:a.getStore("scheduler");if(!t)throw new Error("The scheduler store is not set");const n=(h=this.baseProvider)==null?void 0:h.getStore("schedulerConfig");if(!n)throw new Error("The scheduler config store is not set");this.nylasConnector=new C(s,this.nylasAuth,e,t,n),this.init.emit(this.host).defaultPrevented||await((u=this.nylasConnector)==null?void 0:u.auth.validateSession()),this.handleAuthChange(e.state.isAuthenticated),(c=this.baseProvider)==null||c.componentWillLoad(this.nylasConnector)}componentDidLoad(){var e,t;const s=(e=this.baseProvider)==null?void 0:e.getStore("auth");s==null||s.onChange("isAuthenticated",this.handleAuthChange),(t=this.baseProvider)==null||t.componentDidLoad()}componentDisconnected(){var s;(s=this.baseProvider)==null||s.componentDisconnected()}async registerComponentHandler(s){var e;(e=this.baseProvider)==null||e.registerComponent(s.detail)}async unregisterComponentHandler(s){var e;(e=this.baseProvider)==null||e.unregisterComponent(s.detail)}async getNylasAuth(){return this.nylasAuth}async getNylasConnector(){return this.nylasConnector}async getAuthStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("auth")}async getNylasSchedulerStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("scheduler")}async getNylasSchedulerConfigStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("schedulerConfig")}render(){return o.h(o.Host,{key:"a07ace4fe61c7f7ee20b723d1858f7ebac56ff95"},o.h("slot",{key:"7c10f2b5cf18450c28617b3f35215b720f1d8bd2"}))}get host(){return o.getElement(this)}};g.style=w;exports.nylas_provider=g;
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { r as g, c as u, d as r, h as d, H as y, g as f, a as C } from "./index-fb096a02.js";
|
|
2
|
-
import { N as A, e as R } from "./index.es-c7ca1bad-70899f2a.js";
|
|
3
|
-
import { C as S, N as p } from "./scheduler-store-2e7db190-c648278f.js";
|
|
4
|
-
import { C as m } from "./scheduler-config-store-ed4a8dfd-81687f55.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "react-dom";
|
|
7
|
-
class w {
|
|
8
|
-
constructor(t, e) {
|
|
9
|
-
this.nylasAuth = t, this.nylasAuthStore = e;
|
|
10
|
-
}
|
|
11
|
-
async validateSession() {
|
|
12
|
-
const t = await this.isAccessTokenValid();
|
|
13
|
-
if (!t)
|
|
14
|
-
this.logout();
|
|
15
|
-
else {
|
|
16
|
-
let e = await this.nylasAuth.getTokenInfo();
|
|
17
|
-
if (e) {
|
|
18
|
-
const o = Math.floor(Date.now() / 1e3);
|
|
19
|
-
if (e.expires_in && e.expires_in - o < 3e5 && (r("[NylasAuthConnectorMixin] Refreshing access token"), e = await this.nylasAuth.refreshAccessToken(), !e)) {
|
|
20
|
-
r("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."), this.logout();
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
this.nylasAuthStore.state.tokenInfo = e;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
this.nylasAuthStore.state.isAuthenticated = t;
|
|
27
|
-
}
|
|
28
|
-
async isAuthenticated() {
|
|
29
|
-
return this.nylasAuth.isAuthenticated();
|
|
30
|
-
}
|
|
31
|
-
async getTokenInfo() {
|
|
32
|
-
return this.nylasAuth.getTokenInfo();
|
|
33
|
-
}
|
|
34
|
-
async isAccessTokenValid() {
|
|
35
|
-
return this.nylasAuth.isAccessTokenValid();
|
|
36
|
-
}
|
|
37
|
-
async logout() {
|
|
38
|
-
await this.nylasAuth.logout();
|
|
39
|
-
}
|
|
40
|
-
async getHostedAuthRedirectURL(t, e, n) {
|
|
41
|
-
return this.nylasAuth.getHostedAuthRedirectURL(t, e, n);
|
|
42
|
-
}
|
|
43
|
-
async manageHostedAuthCodeExchange(t) {
|
|
44
|
-
const n = new URL(t).searchParams.get("code");
|
|
45
|
-
if (n) {
|
|
46
|
-
const o = await this.nylasAuth.exchangeAuthCodeForTokenInfo(n);
|
|
47
|
-
if (o)
|
|
48
|
-
return this.nylasAuthStore.state.tokenInfo = o, this.nylasAuthStore.state.isAuthenticated = !0, o;
|
|
49
|
-
}
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
class P {
|
|
54
|
-
constructor(t, e, n, o, a, i = "https://api.us.nylas.com") {
|
|
55
|
-
this.router = t, this.schedulerAPIURL = i, this.nylasAuth = e, this.nylasAuthStore = n, this.nylasSchedulerStore = o, this.nylasSchedulerConfigStore = a;
|
|
56
|
-
}
|
|
57
|
-
init() {
|
|
58
|
-
r("NylasConnector init");
|
|
59
|
-
}
|
|
60
|
-
get authStore() {
|
|
61
|
-
return this.nylasAuthStore;
|
|
62
|
-
}
|
|
63
|
-
get schedulerStore() {
|
|
64
|
-
return this.nylasSchedulerStore;
|
|
65
|
-
}
|
|
66
|
-
get schedulerConfigStore() {
|
|
67
|
-
return this.nylasSchedulerConfigStore;
|
|
68
|
-
}
|
|
69
|
-
get auth() {
|
|
70
|
-
return this._authConnector ? this._authConnector : (this._authConnector = new w(this.nylasAuth, this.nylasAuthStore), this._authConnector);
|
|
71
|
-
}
|
|
72
|
-
get scheduler() {
|
|
73
|
-
return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new p({
|
|
74
|
-
schedulerAPIURL: this.schedulerAPIURL,
|
|
75
|
-
schedulerStore: this.schedulerStore
|
|
76
|
-
}), this._schedulerAPIConnector);
|
|
77
|
-
}
|
|
78
|
-
getAuth() {
|
|
79
|
-
return this.nylasAuth;
|
|
80
|
-
}
|
|
81
|
-
resetStores() {
|
|
82
|
-
this.nylasAuthStore.reset();
|
|
83
|
-
}
|
|
84
|
-
async logout() {
|
|
85
|
-
await this.nylasAuth.logout(), this.resetStores();
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
class v extends Event {
|
|
89
|
-
constructor(t, e) {
|
|
90
|
-
super(t, e), this.oldURL = e.oldURL, this.newURL = e.newURL;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
class L {
|
|
94
|
-
constructor() {
|
|
95
|
-
this.routeChangeListeners = [], r("HashRouter constructor");
|
|
96
|
-
}
|
|
97
|
-
destroy() {
|
|
98
|
-
r("HashRouter destroy"), window.removeEventListener("hashchange", this.onRouteChange.bind(this));
|
|
99
|
-
}
|
|
100
|
-
init() {
|
|
101
|
-
if (r("HashRouter init"), window.addEventListener("hashchange", this.onRouteChange.bind(this)), typeof HashChangeEvent < "u") {
|
|
102
|
-
const t = new HashChangeEvent("hashchange", { oldURL: "", newURL: window.location.href });
|
|
103
|
-
this.onRouteChange(t);
|
|
104
|
-
} else {
|
|
105
|
-
const t = new v("hashchange", { oldURL: "", newURL: window.location.href });
|
|
106
|
-
this.onRouteChange(t);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
addRouteChangeListener(t, e) {
|
|
110
|
-
r("HashRouter addRouteChangeListener"), this.routeChangeListeners.push([t, e]);
|
|
111
|
-
}
|
|
112
|
-
navigate(t, e) {
|
|
113
|
-
if (r("HashRouter navigate"), e)
|
|
114
|
-
return window.history.pushState(null, "", `#${t}`);
|
|
115
|
-
window.location.hash = t;
|
|
116
|
-
}
|
|
117
|
-
setRoute(t) {
|
|
118
|
-
r("HashRouter setRoute"), window.location.hash = t;
|
|
119
|
-
}
|
|
120
|
-
matchRoute(t, e) {
|
|
121
|
-
const n = t.split("/"), o = e.split("/");
|
|
122
|
-
if (r(`HashRouter matchRoute route=${t} path=${e}`, { routeParts: n, pathParts: o }), n[1] === "" && o[0] === "")
|
|
123
|
-
return !0;
|
|
124
|
-
if (n.length !== o.length)
|
|
125
|
-
return !1;
|
|
126
|
-
for (let a = 0; a < n.length; a++) {
|
|
127
|
-
const i = n[a], h = o[a];
|
|
128
|
-
if (!i.startsWith(":") && i !== h)
|
|
129
|
-
return !1;
|
|
130
|
-
}
|
|
131
|
-
return !0;
|
|
132
|
-
}
|
|
133
|
-
getRouteParams(t) {
|
|
134
|
-
r("HashRouter getRouteParams");
|
|
135
|
-
const e = {}, n = t.split("/"), o = window.location.hash.split("/");
|
|
136
|
-
return n.forEach((a, i) => {
|
|
137
|
-
if (a.startsWith(":")) {
|
|
138
|
-
const h = a.substring(1);
|
|
139
|
-
e[h] = o[i];
|
|
140
|
-
}
|
|
141
|
-
}), e;
|
|
142
|
-
}
|
|
143
|
-
getRouteWithParams(t, e) {
|
|
144
|
-
r("HashRouter getRouteWithParams");
|
|
145
|
-
let n = t;
|
|
146
|
-
return Object.keys(e).forEach((o) => {
|
|
147
|
-
n = n.replace(`:${o}`, e[o]);
|
|
148
|
-
}), n;
|
|
149
|
-
}
|
|
150
|
-
getRoute() {
|
|
151
|
-
return r("HashRouter getRoute"), window.location.hash;
|
|
152
|
-
}
|
|
153
|
-
onRouteChange(t) {
|
|
154
|
-
this.routeChangeListeners.forEach(async ([e, n]) => {
|
|
155
|
-
const o = t.newURL.indexOf("#") === -1 ? "" : t.newURL.substring(t.newURL.indexOf("#") + 1);
|
|
156
|
-
if (r(`HashRouter onRouteChange route=${e} path=${o}`, { event: t }), !this.matchRoute(e, o)) {
|
|
157
|
-
r(`HashRouter onRouteChange route=${e} path=${o} does not match`);
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
const a = this.getRouteParams(e);
|
|
161
|
-
await n(e, o, a);
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
getBasePath() {
|
|
165
|
-
return r("HashRouter getBasePath"), "";
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
function b(s = {}) {
|
|
169
|
-
const t = {
|
|
170
|
-
isAuthenticated: !1,
|
|
171
|
-
tokenInfo: null,
|
|
172
|
-
state: "ready",
|
|
173
|
-
...s
|
|
174
|
-
}, e = C(t);
|
|
175
|
-
return e.reset = () => {
|
|
176
|
-
for (const n in t) {
|
|
177
|
-
const o = t[n];
|
|
178
|
-
e.set(n, o);
|
|
179
|
-
}
|
|
180
|
-
}, e;
|
|
181
|
-
}
|
|
182
|
-
const H = ":host{display:contents}", I = H, k = class {
|
|
183
|
-
constructor(s) {
|
|
184
|
-
g(this, s), this.init = u(this, "init", 7), this.loggedIn = u(this, "loggedIn", 7), this.loggedOut = u(this, "loggedOut", 7), this.handleAuthChange = async (t) => {
|
|
185
|
-
t ? this.loggedIn.emit(this.host) : this.loggedOut.emit(this.host);
|
|
186
|
-
}, this.authConfig = void 0, this.eventOverrides = {}, this.automaticComponentRegistration = !0;
|
|
187
|
-
}
|
|
188
|
-
connectedCallback() {
|
|
189
|
-
r("[nylas-provider] connectedCallback");
|
|
190
|
-
}
|
|
191
|
-
async componentWillLoad() {
|
|
192
|
-
var a, i, h, c, l;
|
|
193
|
-
r("[nylas-provider] componentWillLoad"), this.stores = {
|
|
194
|
-
auth: b(),
|
|
195
|
-
scheduler: S(),
|
|
196
|
-
schedulerConfig: m()
|
|
197
|
-
}, this.baseProvider = new A(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
|
|
198
|
-
const s = new L();
|
|
199
|
-
this.nylasAuth = R({
|
|
200
|
-
apiUri: "https://api.us.nylas.com",
|
|
201
|
-
elementsApiUri: "https://elements.us.nylas.com",
|
|
202
|
-
storageType: "indexeddb",
|
|
203
|
-
clientId: "YOUR_CLIENT_ID",
|
|
204
|
-
defaultScopes: [],
|
|
205
|
-
redirectURI: "/",
|
|
206
|
-
...this.authConfig
|
|
207
|
-
});
|
|
208
|
-
const t = (a = this.baseProvider) == null ? void 0 : a.getStore("auth");
|
|
209
|
-
if (!t)
|
|
210
|
-
throw new Error("The auth store is not set");
|
|
211
|
-
const e = (i = this.baseProvider) == null ? void 0 : i.getStore("scheduler");
|
|
212
|
-
if (!e)
|
|
213
|
-
throw new Error("The scheduler store is not set");
|
|
214
|
-
const n = (h = this.baseProvider) == null ? void 0 : h.getStore("schedulerConfig");
|
|
215
|
-
if (!n)
|
|
216
|
-
throw new Error("The scheduler config store is not set");
|
|
217
|
-
this.nylasConnector = new P(s, this.nylasAuth, t, e, n), this.init.emit(this.host).defaultPrevented || await ((c = this.nylasConnector) == null ? void 0 : c.auth.validateSession()), this.handleAuthChange(t.state.isAuthenticated), (l = this.baseProvider) == null || l.componentWillLoad(this.nylasConnector);
|
|
218
|
-
}
|
|
219
|
-
componentDidLoad() {
|
|
220
|
-
var t, e;
|
|
221
|
-
const s = (t = this.baseProvider) == null ? void 0 : t.getStore("auth");
|
|
222
|
-
s == null || s.onChange("isAuthenticated", this.handleAuthChange), (e = this.baseProvider) == null || e.componentDidLoad();
|
|
223
|
-
}
|
|
224
|
-
componentDisconnected() {
|
|
225
|
-
var s;
|
|
226
|
-
(s = this.baseProvider) == null || s.componentDisconnected();
|
|
227
|
-
}
|
|
228
|
-
async registerComponentHandler(s) {
|
|
229
|
-
var t;
|
|
230
|
-
(t = this.baseProvider) == null || t.registerComponent(s.detail);
|
|
231
|
-
}
|
|
232
|
-
async unregisterComponentHandler(s) {
|
|
233
|
-
var t;
|
|
234
|
-
(t = this.baseProvider) == null || t.unregisterComponent(s.detail);
|
|
235
|
-
}
|
|
236
|
-
async getNylasAuth() {
|
|
237
|
-
return this.nylasAuth;
|
|
238
|
-
}
|
|
239
|
-
async getNylasConnector() {
|
|
240
|
-
return this.nylasConnector;
|
|
241
|
-
}
|
|
242
|
-
async getAuthStore() {
|
|
243
|
-
var s;
|
|
244
|
-
return (s = this.baseProvider) == null ? void 0 : s.getStore("auth");
|
|
245
|
-
}
|
|
246
|
-
async getNylasSchedulerStore() {
|
|
247
|
-
var s;
|
|
248
|
-
return (s = this.baseProvider) == null ? void 0 : s.getStore("scheduler");
|
|
249
|
-
}
|
|
250
|
-
async getNylasSchedulerConfigStore() {
|
|
251
|
-
var s;
|
|
252
|
-
return (s = this.baseProvider) == null ? void 0 : s.getStore("schedulerConfig");
|
|
253
|
-
}
|
|
254
|
-
render() {
|
|
255
|
-
return d(y, { key: "a07ace4fe61c7f7ee20b723d1858f7ebac56ff95" }, d("slot", { key: "7c10f2b5cf18450c28617b3f35215b720f1d8bd2" }));
|
|
256
|
-
}
|
|
257
|
-
get host() {
|
|
258
|
-
return f(this);
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
k.style = I;
|
|
262
|
-
export {
|
|
263
|
-
k as nylas_provider
|
|
264
|
-
};
|