@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,26 +1,26 @@
|
|
|
1
|
-
import { r as k, c as h, d, q as U, h as
|
|
2
|
-
import { R as x } from "./register-component-
|
|
3
|
-
import { T as L, a as Q, b as J } from "./constants-
|
|
1
|
+
import { r as k, c as h, d, q as U, h as a, i as c, k as K, H as g, g as _, s as X, t as fe, j as Y, v as he, w as me, x as E, y as be, z as pe, A as j, C as ue, F as ge } from "./index-72501df0.js";
|
|
2
|
+
import { R as x } from "./register-component-75f530bc-0e4e3d7a.js";
|
|
3
|
+
import { T as L, a as Q, b as J } from "./constants-35df11e7-b37e3406.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
const ye =
|
|
7
|
-
var ke = function(e, t, n,
|
|
8
|
-
var o = arguments.length,
|
|
6
|
+
const ye = ':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-booked-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.event-card-wrapper{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;margin-bottom:2rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 0;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400;border-bottom:1px solid var(--nylas-base-200);width:inherit;padding:0 0 1.5rem}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.booked-event-header .card-description{text-align:center}.booking-date-time,.booking-participants{padding:0 1rem;margin-top:1.5rem;margin-left:3rem;display:flex;flex-direction:column;justify-content:space-between;align-self:flex-start;position:relative}.booking-date-time svg,.booking-participants svg{color:var(--nylas-base-700);position:absolute;left:-10px}.booking-date-time .block,.booking-participants .block{display:block}.booking-date-time h3,.booking-participants h3{color:var(--nylas-base-600);margin:0;font-size:16px;font-weight:600;line-height:1.25rem;text-align:justify;margin-bottom:4px}.booking-date-time p,.booking-participants p{font-size:16px;margin:0;font-weight:400;text-align:justify;color:var(--nylas-base-800)}.booking-participants{margin-bottom:1.5rem}.booked-event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:1.5rem;gap:4px;margin:2rem;align-items:center;align-self:flex-end}.button-container{width:inherit}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);border-top:1px solid var(--nylas-base-200);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}', ve = ye;
|
|
7
|
+
var ke = function(e, t, n, s) {
|
|
8
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
9
9
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
10
|
-
|
|
10
|
+
i = Reflect.decorate(e, t, n, s);
|
|
11
11
|
else
|
|
12
12
|
for (var l = e.length - 1; l >= 0; l--)
|
|
13
|
-
(
|
|
14
|
-
return o > 3 &&
|
|
15
|
-
},
|
|
13
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
14
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
15
|
+
}, R = function(e, t) {
|
|
16
16
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
17
17
|
return Reflect.metadata(e, t);
|
|
18
18
|
};
|
|
19
19
|
const ee = class {
|
|
20
20
|
constructor(e) {
|
|
21
21
|
k(this, e), this.cancelBookingButtonClicked = h(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = h(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = h(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = h(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
|
|
22
|
-
var o,
|
|
23
|
-
const t = new Date(this.selectedTimeslot.start_time), n = (
|
|
22
|
+
var o, i;
|
|
23
|
+
const t = new Date(this.selectedTimeslot.start_time), n = (i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.min_cancellation_notice;
|
|
24
24
|
t.getTime() - n * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime() ? this.cancelBookedEventValidationError.emit({
|
|
25
25
|
error: {
|
|
26
26
|
title: "Cancellation Error",
|
|
@@ -43,6 +43,9 @@ const ee = class {
|
|
|
43
43
|
}
|
|
44
44
|
}, this.eventInfo = void 0, this.rescheduleBookingId = void 0, this.bookingInfo = void 0, this.configSettings = void 0, this.isLoading = void 0, this.themeConfig = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedTimeslot = void 0, this.selectedLanguage = navigator.language, this.startTime = "", this.endTime = "";
|
|
45
45
|
}
|
|
46
|
+
themeConfigChanged(e) {
|
|
47
|
+
this.applyThemeConfig(e);
|
|
48
|
+
}
|
|
46
49
|
connectedCallback() {
|
|
47
50
|
}
|
|
48
51
|
disconnectedCallback() {
|
|
@@ -60,17 +63,22 @@ const ee = class {
|
|
|
60
63
|
this.host.style.setProperty(`${t}`, n);
|
|
61
64
|
}
|
|
62
65
|
render() {
|
|
63
|
-
var n,
|
|
66
|
+
var n, s, o, i, r, l, u, m, f, p, b, v, w, T, C, y;
|
|
64
67
|
const e = (n = this.configSettings) == null ? void 0 : n.booking_type, t = e && e !== "booking";
|
|
65
|
-
return
|
|
68
|
+
return a(g, { key: "5c0d6ded922007d327b55a3536338a82302ca0be", part: "nbec" }, a("div", { key: "a0d3c60605fbf54303527bc6001477db946eb560", class: "nylas-booked-event-card" }, a("div", { key: "043a3aead5724fd56c3075d60ff0cfe470e2d551", class: "booked-event-timezone" }, a("globe-icon", { key: "f21ee01ed85b02982e013d6731bffd8a20ef0ad9" }), L[this.selectedTimezone]), a("div", { key: "5408744046d0b755044db2c88f15dfeed1ac0cd1", class: "event-card-wrapper", part: "nbec__card" }, a("div", { key: "c1e352e8395aa35c9faadadf10a82f04b10cf88e", class: "calendar-icon" }, a("calendar-check-icon", { key: "9e4464eb5a88dafa35340d8441bfc6570c880151" })), a("div", { key: "2265e9737ed82f085e348a6bde53dc68d7d7fc94", class: "booked-event-header" }, a("h2", { key: "30ba50948f9de4ef3f47c72547478c81870d85b2", slot: "card-title", part: "nbec__title" }, this.rescheduleBookingId && !this.isLoading ? `${c.t("bookingRescheduled")}` : t && !this.isLoading ? `${c.t("bookingSent")}` : `${c.t("bookingConfirmed")}`, "!"), a("div", { key: "8ae1ffd38656334a233bca8eb7b25b6e7c03c937", class: "card-description", part: "nbec__description" }, t ? c.t("bookingSentDescription") : a("span", null, c.t("bookingConfirmedDescription")))), a("div", { key: "cf6a84c9dc87e923c21468561a7601f476fd85a1", class: "booking-date-time" }, a("checkmark-circle-icon", { key: "7e42ae42fbe6c87a21f2a6031796132a5562d882" }), a("h3", { key: "d92ede4d9f33a3dd461a0e14c4965e614c23f075" }, c.t("bookingDateAndTimeHeader")), a("p", { key: "1da0c2ff11644c6718e8ca512baffbc0affb3fd5" }, (s = this.selectedTimeslot) != null && s.start_time ? K(new Date((o = this.selectedTimeslot) == null ? void 0 : o.start_time).toLocaleDateString(Q[this.selectedLanguage], { dateStyle: "full" })) : "-", " ", a("br", { key: "167cd8c78e97697766713811549588e9d6fd3fcb" }), this.startTime, " - ", this.endTime)), a("div", { key: "61d35600d07d7ffccbce3f3aa93a3bfed385637e", class: "booking-participants" }), !t && a("div", { class: "button-container" }, a("div", { class: {
|
|
66
69
|
footer: !0,
|
|
67
|
-
"no-footer": ((
|
|
68
|
-
"no-template-cols": ((
|
|
69
|
-
} }, !((T = (w = this.configSettings) == null ? void 0 : w.scheduler) != null && T.hide_cancellation_options) &&
|
|
70
|
+
"no-footer": ((r = (i = this.configSettings) == null ? void 0 : i.scheduler) == null ? void 0 : r.hide_cancellation_options) && ((u = (l = this.configSettings) == null ? void 0 : l.scheduler) == null ? void 0 : u.hide_rescheduling_options) || ((m = this.configSettings) == null ? void 0 : m.booking_type) === "organizer-confirmation",
|
|
71
|
+
"no-template-cols": ((p = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : p.hide_cancellation_options) || ((v = (b = this.configSettings) == null ? void 0 : b.scheduler) == null ? void 0 : v.hide_rescheduling_options)
|
|
72
|
+
} }, !((T = (w = this.configSettings) == null ? void 0 : w.scheduler) != null && T.hide_cancellation_options) && a("button-component", { variant: "destructive", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, `${c.t("cancelBookingButton")}`), !((y = (C = this.configSettings) == null ? void 0 : C.scheduler) != null && y.hide_rescheduling_options) && a("button-component", { variant: "basic", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, `${c.t("rescheduleBookingButton")}`))))));
|
|
70
73
|
}
|
|
71
74
|
get host() {
|
|
72
75
|
return _(this);
|
|
73
76
|
}
|
|
77
|
+
static get watchers() {
|
|
78
|
+
return {
|
|
79
|
+
themeConfig: ["themeConfigChanged"]
|
|
80
|
+
};
|
|
81
|
+
}
|
|
74
82
|
};
|
|
75
83
|
ke([
|
|
76
84
|
x({
|
|
@@ -82,15 +90,16 @@ ke([
|
|
|
82
90
|
["scheduler.selectedTimeslot", "selectedTimeslot"],
|
|
83
91
|
["scheduler.isLoading", "isLoading"],
|
|
84
92
|
["scheduler.selectedLanguage", "selectedLanguage"],
|
|
85
|
-
["scheduler.configSettings", "configSettings"]
|
|
93
|
+
["scheduler.configSettings", "configSettings"],
|
|
94
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
86
95
|
]),
|
|
87
96
|
eventToProps: {
|
|
88
97
|
cancelBookingButtonClicked: async (e, t) => {
|
|
89
98
|
t.scheduler.setCancel(e.detail.bookingId);
|
|
90
99
|
},
|
|
91
100
|
rescheduleButtonClicked: async (e, t) => {
|
|
92
|
-
const n = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler:
|
|
93
|
-
|
|
101
|
+
const n = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler: s } = e.detail;
|
|
102
|
+
s && (!n || "error" in n) && s(n);
|
|
94
103
|
},
|
|
95
104
|
rescheduleBookedEventError: async (e, t) => {
|
|
96
105
|
d("nylas-booked-event-card", "rescheduleBookedEventError", e.detail);
|
|
@@ -99,24 +108,23 @@ ke([
|
|
|
99
108
|
d("nylas-booked-event-card", "cancelBookedEventValidationError", e.detail);
|
|
100
109
|
}
|
|
101
110
|
},
|
|
102
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
103
111
|
fireRegisterEvent: !0
|
|
104
112
|
}),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
113
|
+
R("design:type", Function),
|
|
114
|
+
R("design:paramtypes", []),
|
|
115
|
+
R("design:returntype", void 0)
|
|
108
116
|
], ee.prototype, "render", null);
|
|
109
117
|
ee.style = ve;
|
|
110
|
-
const Ce =
|
|
111
|
-
var xe = function(e, t, n,
|
|
112
|
-
var o = arguments.length,
|
|
118
|
+
const Ce = ':host{display:block;height:100%;--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-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{grid-template-columns:1fr}}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family);font-size:16px}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}.button-content{display:flex;gap:4px;align-items:center}sp-infield-button{--spectrum-infield-button-background-color:transparent;--spectrum-infield-button-background-color-hover:transparent;--spectrum-infield-button-background-color-active:transparent;--spectrum-infield-button-border-color:transparent;--spectrum-infield-button-border-width:1px;--spectrum-infield-button-border-radius:0;color:var(--nylas-base-600);background:transparent;border:none;outline:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:52px;width:52px;display:flex;position:absolute;right:0;align-items:center;justify-content:center;cursor:pointer}sp-infield-button sp-icon-cross300{color:var(--nylas-base-600)}sp-infield-button.error{border-width:2px;border-color:var(--nylas-error)}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=email]::placeholder{color:var(--nylas-base-300)}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}button-component.remove-guest{position:absolute;height:51px;right:0}button-component.remove-guest.error button{border-color:var(--nylas-error)}button-component.remove-guest button{height:inherit;border-top-left-radius:initial;border-bottom-left-radius:initial;border:none !important;border-left:1px solid var(--nylas-base-300) !important}button-component.remove-guest button:hover,button-component.remove-guest button:focus{outline:1px solid var(--nylas-primary) !important;color:var(--nylas-primary)}button-component.back button{--dot-color:var(--nylas-base-800)}.guest-email-input{position:relative;display:flex;width:100%}', _e = Ce;
|
|
119
|
+
var xe = function(e, t, n, s) {
|
|
120
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
113
121
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
114
|
-
|
|
122
|
+
i = Reflect.decorate(e, t, n, s);
|
|
115
123
|
else
|
|
116
124
|
for (var l = e.length - 1; l >= 0; l--)
|
|
117
|
-
(
|
|
118
|
-
return o > 3 &&
|
|
119
|
-
},
|
|
125
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
126
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
127
|
+
}, F = function(e, t) {
|
|
120
128
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
121
129
|
return Reflect.metadata(e, t);
|
|
122
130
|
};
|
|
@@ -124,8 +132,8 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
124
132
|
constructor(e) {
|
|
125
133
|
k(this, e), this.nameChanged = h(this, "nameChanged", 7), this.emailChanged = h(this, "emailChanged", 7), this.backButtonClicked = h(this, "backButtonClicked", 7), this.detailsConfirmed = h(this, "detailsConfirmed", 7), this.bookingFormError = h(this, "bookingFormError", 7), this.bookingFormSubmitted = h(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t, n) => {
|
|
126
134
|
this.resetGuestEmailError(t);
|
|
127
|
-
const
|
|
128
|
-
|
|
135
|
+
const s = [...this.guestEmails];
|
|
136
|
+
s[t] = X(n), this.guestEmails = [...s];
|
|
129
137
|
}, this.handleGuestBlur = (t, n) => {
|
|
130
138
|
if (this.resetGuestEmailError(t), n === "") {
|
|
131
139
|
this.guestEmailErrors[t] = c.t("fieldRequired", { field: c.t("email") });
|
|
@@ -140,17 +148,17 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
140
148
|
t.preventDefault(), this.guestEmails = [...this.guestEmails, ""];
|
|
141
149
|
}, this.removeGuestButtonClickHandler = (t, n) => {
|
|
142
150
|
t.preventDefault(), this.resetGuestEmailError(n);
|
|
143
|
-
const
|
|
144
|
-
|
|
151
|
+
const s = [...this.guestEmails];
|
|
152
|
+
s.splice(n, 1), this.guestEmails = [...s];
|
|
145
153
|
}, this.handleBackButtonClicked = (t) => {
|
|
146
154
|
t.preventDefault(), this.backButtonLoading = !0, this.backButtonClicked.emit();
|
|
147
155
|
}, this.bookButtonClickedHandler = async (t) => {
|
|
148
|
-
var l,
|
|
156
|
+
var l, u, m, f, p, b, v, w, T;
|
|
149
157
|
if (t.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
|
|
150
158
|
return;
|
|
151
159
|
d("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
|
|
152
|
-
const
|
|
153
|
-
if (!
|
|
160
|
+
const s = this.name || ((u = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : u.name), o = this.email || ((f = (m = this.bookingInfo) == null ? void 0 : m.primaryParticipant) == null ? void 0 : f.email);
|
|
161
|
+
if (!s || s === "") {
|
|
154
162
|
this.isNameValid = !1, this.validationError.name = c.t("fieldRequired", { field: c.t("name") }) || "Name is required", this.bookingFormError.emit({
|
|
155
163
|
title: "Booking form error",
|
|
156
164
|
description: "Name is required"
|
|
@@ -171,7 +179,7 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
171
179
|
});
|
|
172
180
|
return;
|
|
173
181
|
}
|
|
174
|
-
let
|
|
182
|
+
let i = [];
|
|
175
183
|
if (this.guestEmails.length > 0) {
|
|
176
184
|
let C = !1;
|
|
177
185
|
if (this.guestEmails.forEach((y, B) => {
|
|
@@ -183,23 +191,23 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
183
191
|
});
|
|
184
192
|
return;
|
|
185
193
|
}
|
|
186
|
-
|
|
194
|
+
i = this.guestEmails.map((y) => ({ name: y.trim(), email: y.trim() }));
|
|
187
195
|
} else
|
|
188
|
-
(
|
|
189
|
-
const
|
|
196
|
+
(p = this.bookingInfo) != null && p.guests && (i = (b = this.bookingInfo) == null ? void 0 : b.guests);
|
|
197
|
+
const r = {};
|
|
190
198
|
if ((v = this.bookingInfo) != null && v.additionalFields) {
|
|
191
199
|
const C = ((T = (w = this.configSettings) == null ? void 0 : w.scheduler) == null ? void 0 : T.additional_fields) || {};
|
|
192
200
|
Object.entries(this.bookingInfo.additionalFields).forEach(([y, B]) => {
|
|
193
|
-
y in C && (
|
|
201
|
+
y in C && (r[y] = B.value);
|
|
194
202
|
});
|
|
195
203
|
}
|
|
196
204
|
this.detailsConfirmed.emit({
|
|
197
205
|
primaryParticipant: {
|
|
198
|
-
name:
|
|
206
|
+
name: s,
|
|
199
207
|
email: o
|
|
200
208
|
},
|
|
201
|
-
guests:
|
|
202
|
-
additionalFields: { ...
|
|
209
|
+
guests: i,
|
|
210
|
+
additionalFields: { ...r, ...this.additionalFields }
|
|
203
211
|
});
|
|
204
212
|
}, this.updateAdditionalFields = (t, n) => {
|
|
205
213
|
this.additionalFields && (this.additionalFields[t] = n);
|
|
@@ -219,6 +227,9 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
219
227
|
bookingInfoChangedHandler(e) {
|
|
220
228
|
e && e.primaryParticipant && (this.name = e.primaryParticipant.name, this.email = e.primaryParticipant.email);
|
|
221
229
|
}
|
|
230
|
+
themeConfigChanged(e) {
|
|
231
|
+
this.applyThemeConfig(e);
|
|
232
|
+
}
|
|
222
233
|
applyThemeConfig(e) {
|
|
223
234
|
if (e)
|
|
224
235
|
for (const [t, n] of Object.entries(e))
|
|
@@ -277,44 +288,45 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
277
288
|
this.updateAdditionalFields(e.detail.name, e.detail.value);
|
|
278
289
|
}
|
|
279
290
|
render() {
|
|
280
|
-
var e, t, n,
|
|
281
|
-
return
|
|
291
|
+
var e, t, n, s, o, i, r, l, u;
|
|
292
|
+
return a(g, { key: "c0b87ead82e2d0c32de6f8b21c843c41aef053d5" }, a("form", { key: "7c2eb7bb085e4b26566147a607258382e8fba216", onSubmit: (m) => this.bookButtonClickedHandler(m), noValidate: !0 }, a("div", { key: "f9e63b09939bd160f7e32c0aeec4677cb8e075ea", class: "nylas-booking-form", part: "nbf" }, a("div", { key: "a864c6847043c4210bfa4cc9ac701b6824b93141", class: "input-wrapper", part: "nbf__input-wrapper" }, a("input-component", { key: "d73094b1ef71b938c036c6e2bfad84d91b64d0b3", label: c.t("name"), name: "name", id: "name", defaultValue: ((t = (e = this.bookingInfo) == null ? void 0 : e.primaryParticipant) == null ? void 0 : t.name) || this.name, placeholder: c.t("namePlaceholder"), type: "text", required: !0, requiredError: c.t("fieldRequired", { field: c.t("name") }), patternError: c.t("invalidInputFormat", { field: c.t("name") }), part: "nbf__input-textfield" })), a("div", { key: "50fcdaeef2f68847cec3a3768b3cf1dbc7332594", class: "input-wrapper", part: "nbf__input-wrapper" }, a("input-component", { key: "99146fd92e97eef620361282309cda149821c27e", label: c.t("email"), name: "email", id: "email", pattern: S, defaultValue: ((s = (n = this.bookingInfo) == null ? void 0 : n.primaryParticipant) == null ? void 0 : s.email) || this.email, placeholder: c.t("emailPlaceholder"), type: "email", required: !0, requiredError: c.t("fieldRequired", { field: c.t("email") }), patternError: c.t("invalidInputFormat", { field: c.t("email") }), part: "nbf__input-textfield" })), ((i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.hide_additional_guests) !== !0 && a("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, this.guestEmails.map((m, f) => a("div", { class: "input-wrapper button-wrapper" }, a("label", { class: {
|
|
282
293
|
error: !!this.guestEmailErrors[f]
|
|
283
|
-
} }, c.t("guestEmail")),
|
|
294
|
+
} }, c.t("guestEmail")), a("div", { class: "guest-email-input" }, a("input", { type: "email", id: `guest-email-${f}`, maxLength: 100, class: {
|
|
284
295
|
"guest-email": !0,
|
|
285
296
|
error: !!this.guestEmailErrors[f]
|
|
286
|
-
}, placeholder: c.t("guestEmailPlaceholder"), value: m, "data-index": f, part: "nbf__input-textfield", onBlur: (
|
|
287
|
-
var
|
|
288
|
-
return this.handleGuestBlur(f, (
|
|
289
|
-
}, onInput: (
|
|
290
|
-
var
|
|
291
|
-
return this.handleGuestChange(f, (
|
|
292
|
-
} }),
|
|
297
|
+
}, placeholder: c.t("guestEmailPlaceholder"), value: m, "data-index": f, part: "nbf__input-textfield", onBlur: (p) => {
|
|
298
|
+
var b;
|
|
299
|
+
return this.handleGuestBlur(f, (b = p.target) == null ? void 0 : b.value);
|
|
300
|
+
}, onInput: (p) => {
|
|
301
|
+
var b;
|
|
302
|
+
return this.handleGuestChange(f, (b = p.target) == null ? void 0 : b.value);
|
|
303
|
+
} }), a("button-component", { variant: "basic", tooltip: "Remove guest", onClick: (p) => this.removeGuestButtonClickHandler(p, f), class: {
|
|
293
304
|
"remove-guest": !0,
|
|
294
305
|
error: !!this.guestEmailErrors[f]
|
|
295
|
-
} },
|
|
306
|
+
} }, a("close-icon", null))), a("p", { class: "help-text" }, this.guestEmailErrors[f]))), a("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (m) => this.addGuestButtonClickedHandler(m) }, a("div", { class: "button-content" }, a("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${c.t("addAnotherGuest")}` : `${c.t("addGuest")}`))), (u = Object.entries(((l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.additional_fields) || {})) == null ? void 0 : u.sort((m, f) => m[1].order - f[1].order).map((m) => {
|
|
296
307
|
var w, T, C, y, B, W;
|
|
297
|
-
const f = m[1],
|
|
308
|
+
const f = m[1], p = f.label, b = m[0], v = ((C = (T = (w = this.bookingInfo) == null ? void 0 : w.additionalFields) == null ? void 0 : T[b]) == null ? void 0 : C.value) || "";
|
|
298
309
|
switch (f.type) {
|
|
299
310
|
case "dropdown":
|
|
300
|
-
return
|
|
311
|
+
return a("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, a("select-dropdown", { label: p, name: b, id: b, withSearch: !1, defaultSelectedOption: v ? { value: v, label: v } : void 0, options: (y = f.options) == null ? void 0 : y.map((D) => ({ value: D, label: D })), required: f.required, exportparts: "sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content" }));
|
|
301
312
|
case "checkbox":
|
|
302
|
-
return
|
|
313
|
+
return a("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, a("checkbox-component", { label: p, name: b, id: b, checked: v === "true", required: f.required, part: "nbf__checkbox-component" }));
|
|
303
314
|
case "radio_button":
|
|
304
|
-
return
|
|
315
|
+
return a("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, a("radio-button-group", { label: p, name: b, id: b, defaultSelectedValue: v || ((B = f.options) == null ? void 0 : B[0]) || "", options: (W = f.options) == null ? void 0 : W.map((D) => ({ value: D, label: D })), required: f.required, part: "nbf__radio-button-group" }));
|
|
305
316
|
case "multi_line_text":
|
|
306
|
-
return
|
|
317
|
+
return a("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, a("textarea-component", { label: p, defaultValue: v, name: b, id: b, required: f.required, part: "nbf__textarea-component" }));
|
|
307
318
|
default:
|
|
308
|
-
return
|
|
319
|
+
return a("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, a("input-component", { label: p, name: b, id: b, type: f.type, defaultValue: v || "", requiredError: c.t("fieldRequired", { field: p }), required: f.required, part: "nbf__input-textfield" }));
|
|
309
320
|
}
|
|
310
|
-
})),
|
|
321
|
+
})), a("div", { key: "667449828f03a40a00dcba3eb5e245dc49eaf0a2", class: "cta" }, a("button-component", { key: "0d1eac11cdb323fb2cd8190afb95586c48062759", variant: "basic", class: "back", part: "nbf__button-outline", isLoading: this.backButtonLoading && this.isLoading, onClick: this.handleBackButtonClicked }, a("slot", { key: "c95bf612836ca7663767ac6aa4db6941a065e1cf", name: "booking-form-back-label" }, `${c.t("backButton")}`)), a("button-component", { key: "63372308ebc5f1ed82f95af257d43cdab1306d34", variant: "primary", isLoading: !this.backButtonLoading && this.isLoading, disabled: this.isLoading, part: "nbf__button-primary", type: "submit" }, a("slot", { key: "01ee90ff935a0054c2f179ecf579b83529ae736e", name: "booking-form-book-label" }, `${c.t("bookNowButton")}`)))));
|
|
311
322
|
}
|
|
312
323
|
get host() {
|
|
313
324
|
return _(this);
|
|
314
325
|
}
|
|
315
326
|
static get watchers() {
|
|
316
327
|
return {
|
|
317
|
-
bookingInfo: ["bookingInfoChangedHandler"]
|
|
328
|
+
bookingInfo: ["bookingInfoChangedHandler"],
|
|
329
|
+
themeConfig: ["themeConfigChanged"]
|
|
318
330
|
};
|
|
319
331
|
}
|
|
320
332
|
};
|
|
@@ -325,7 +337,8 @@ xe([
|
|
|
325
337
|
["scheduler.isLoading", "isLoading"],
|
|
326
338
|
["scheduler.bookingInfo", "bookingInfo"],
|
|
327
339
|
["scheduler.eventInfo", "eventInfo"],
|
|
328
|
-
["scheduler.configSettings", "configSettings"]
|
|
340
|
+
["scheduler.configSettings", "configSettings"],
|
|
341
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
329
342
|
]),
|
|
330
343
|
eventToProps: {
|
|
331
344
|
backButtonClicked: async (e, t) => {
|
|
@@ -347,24 +360,23 @@ xe([
|
|
|
347
360
|
d("nylas-booking-form", "bookingFormError", e.detail);
|
|
348
361
|
}
|
|
349
362
|
},
|
|
350
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
351
363
|
fireRegisterEvent: !0
|
|
352
364
|
}),
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
365
|
+
F("design:type", Function),
|
|
366
|
+
F("design:paramtypes", []),
|
|
367
|
+
F("design:returntype", void 0)
|
|
356
368
|
], te.prototype, "render", null);
|
|
357
369
|
te.style = _e;
|
|
358
|
-
const we =
|
|
359
|
-
var Ee = function(e, t, n,
|
|
360
|
-
var o = arguments.length,
|
|
370
|
+
const we = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:block;width:400px;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form form{width:100%}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600);padding-bottom:1.25rem}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}.footer{display:grid;grid-template-columns:1fr 1fr;width:100%;padding-top:1.25rem;gap:1rem;border-top:1px solid var(--nylas-base-200);margin-top:1.25rem}', Te = we;
|
|
371
|
+
var Ee = function(e, t, n, s) {
|
|
372
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
361
373
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
362
|
-
|
|
374
|
+
i = Reflect.decorate(e, t, n, s);
|
|
363
375
|
else
|
|
364
376
|
for (var l = e.length - 1; l >= 0; l--)
|
|
365
|
-
(
|
|
366
|
-
return o > 3 &&
|
|
367
|
-
},
|
|
377
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
378
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
379
|
+
}, P = function(e, t) {
|
|
368
380
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
369
381
|
return Reflect.metadata(e, t);
|
|
370
382
|
};
|
|
@@ -373,14 +385,14 @@ const ne = class {
|
|
|
373
385
|
var t, n;
|
|
374
386
|
k(this, e), this.goBackButtonClicked = h(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = h(this, "cancelBookingFormSubmitted", 7), this.triggerValidation = h(this, "triggerValidation", 7), this.cancelBookedEventError = h(this, "cancelBookedEventError", 7), this.cancelBookingFormError = h(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
|
|
375
387
|
this.goBackButtonClicked.emit();
|
|
376
|
-
}, this.handleSubmitCancelBooking = (
|
|
377
|
-
var
|
|
378
|
-
if (this.triggerValidation.emit({}),
|
|
388
|
+
}, this.handleSubmitCancelBooking = (s) => {
|
|
389
|
+
var r, l, u;
|
|
390
|
+
if (this.triggerValidation.emit({}), s.preventDefault(), !this.cancellationReason) {
|
|
379
391
|
this.cancellationError = c.t("cancellationErrorMessage"), this.cancelBookingFormError.emit({ title: c.t("cancelBokingFormError"), description: c.t("cancellationErrorMessage") });
|
|
380
392
|
return;
|
|
381
393
|
}
|
|
382
|
-
const o = (l = (
|
|
383
|
-
if (this.selectedTimeslot && o && new Date((
|
|
394
|
+
const o = (l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.min_cancellation_notice;
|
|
395
|
+
if (this.selectedTimeslot && o && new Date((u = this.selectedTimeslot) == null ? void 0 : u.start_time).getTime() - o * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime()) {
|
|
384
396
|
this.cancelBookedEventError.emit({
|
|
385
397
|
error: {
|
|
386
398
|
title: c.t("cancellationErrorTitle"),
|
|
@@ -390,16 +402,19 @@ const ne = class {
|
|
|
390
402
|
return;
|
|
391
403
|
}
|
|
392
404
|
d(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);
|
|
393
|
-
const
|
|
405
|
+
const i = (m) => {
|
|
394
406
|
this.cancelBookedEventError.emit(m);
|
|
395
407
|
};
|
|
396
|
-
this.cancelBookingId ? this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: "cancel", reason: this.cancellationReason, errorHandler:
|
|
408
|
+
this.cancelBookingId ? this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: "cancel", reason: this.cancellationReason, errorHandler: i }) : this.rejectBookingId && this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: "reject", reason: this.cancellationReason, errorHandler: i });
|
|
397
409
|
}, this.cancelBookingId = void 0, this.rejectBookingId = void 0, this.selectedTimeslot = void 0, this.configSettings = void 0, this.eventInfo = void 0, this.isLoading = void 0, this.themeConfig = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((n = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : n.cancellation_policy) || "Your current timeslot will become available to others.";
|
|
398
410
|
}
|
|
399
411
|
configSettingsChangedHandler(e) {
|
|
400
412
|
var t;
|
|
401
413
|
this.cancellationPolicy = ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.cancellation_policy) || "Your current timeslot will become available to others.";
|
|
402
414
|
}
|
|
415
|
+
themeConfigChanged(e) {
|
|
416
|
+
this.applyThemeConfig(e);
|
|
417
|
+
}
|
|
403
418
|
connectedCallback() {
|
|
404
419
|
d("[nylas-cancel-booking-form] Component connected");
|
|
405
420
|
}
|
|
@@ -422,14 +437,15 @@ const ne = class {
|
|
|
422
437
|
}
|
|
423
438
|
render() {
|
|
424
439
|
var e, t;
|
|
425
|
-
return
|
|
440
|
+
return a(g, { key: "a28fc058c46d2d16bc902bc3660f50316c57dece", part: "ncbf" }, a("div", { key: "84f2ba1baba4acba17364298b40dd6758f992476", class: "nylas-cancel-booking-form", part: "ncbf__card" }, a("div", { key: "3d3a21bbfafb1f6e5729dba6d2cce61c09d55d7f", class: "nylas-cancel-booking-form__calendar-icon", part: "ncbf__icon" }, a("calendar-cancel-icon", { key: "4da0905147c24eca01cf4d6e008b20db62fe1172" })), a("h3", { key: "dea90396dfe208b42228f5627421f909c94a6d3d", class: "nylas-cancel-booking-form__title", part: "ncbf__title" }, c.t("cancelBookingTitle")), a("div", { key: "4e7223a576a56dbd704b0f85b05928c4075eaa10", class: "nylas-cancel-booking-form__description", part: "ncbf__description" }, (t = (e = this.configSettings) == null ? void 0 : e.scheduler) != null && t.cancellation_policy ? this.cancellationPolicy : `${c.t("cancelBookingMessage")}`), a("form", { key: "d779a47d129a3e49d6f021c4fa148c4354e0b8e2", onSubmit: this.handleSubmitCancelBooking }, a("textarea-component", { key: "06c3d25a5fe75a4ea450703568648ca3741549c7", id: "cancel-reason", name: "cancel-reason", required: !0, label: c.t("reasonForCancellation"), class: this.cancellationError ? "error" : "", part: "ncbf__reason-textarea", defaultValue: this.cancellationReason }), a("div", { key: "19447dd729cc312c9a95c8977b50f335a3941d75", class: "footer" }, a("button-component", { key: "3c2fe7523fcd7127af466921e84722b368cb54bd", variant: "destructive", class: "cancel", type: "submit", part: "ncbf__button-cta", disabled: this.isLoading }, c.t("cancelBookingButton")), !!this.eventInfo && a("button-component", { variant: "basic", class: "back", part: "ncbf__button-outline", onClick: this.handleGoBackClicked }, c.t("goBackButton"))))));
|
|
426
441
|
}
|
|
427
442
|
get host() {
|
|
428
443
|
return _(this);
|
|
429
444
|
}
|
|
430
445
|
static get watchers() {
|
|
431
446
|
return {
|
|
432
|
-
configSettings: ["configSettingsChangedHandler"]
|
|
447
|
+
configSettings: ["configSettingsChangedHandler"],
|
|
448
|
+
themeConfig: ["themeConfigChanged"]
|
|
433
449
|
};
|
|
434
450
|
}
|
|
435
451
|
};
|
|
@@ -442,21 +458,22 @@ Ee([
|
|
|
442
458
|
["scheduler.eventInfo", "eventInfo"],
|
|
443
459
|
["scheduler.isLoading", "isLoading"],
|
|
444
460
|
["scheduler.cancelBookingId", "cancelBookingId"],
|
|
445
|
-
["scheduler.rejectBookingId", "rejectBookingId"]
|
|
461
|
+
["scheduler.rejectBookingId", "rejectBookingId"],
|
|
462
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
446
463
|
]),
|
|
447
464
|
eventToProps: {
|
|
448
465
|
cancelBookingFormSubmitted: async (e, t) => {
|
|
449
|
-
const { action: n, errorHandler:
|
|
466
|
+
const { action: n, errorHandler: s } = e.detail;
|
|
450
467
|
if (n === "cancel") {
|
|
451
468
|
const o = await t.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason);
|
|
452
|
-
|
|
469
|
+
s && (!o || "error" in o) && s(o);
|
|
453
470
|
} else if (n === "reject") {
|
|
454
471
|
const o = await t.scheduler.updateBooking({
|
|
455
472
|
bookingId: e.detail.bookingId,
|
|
456
473
|
status: "cancelled",
|
|
457
474
|
reason: e.detail.reason
|
|
458
475
|
});
|
|
459
|
-
|
|
476
|
+
s && (!o || "error" in o) && s(o);
|
|
460
477
|
}
|
|
461
478
|
},
|
|
462
479
|
goBackButtonClicked: async (e, t) => {
|
|
@@ -469,28 +486,27 @@ Ee([
|
|
|
469
486
|
d("nylas-cancel-booking-form", "cancelBookingFormError", e.detail);
|
|
470
487
|
}
|
|
471
488
|
},
|
|
472
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
473
489
|
fireRegisterEvent: !0
|
|
474
490
|
}),
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
491
|
+
P("design:type", Function),
|
|
492
|
+
P("design:paramtypes", []),
|
|
493
|
+
P("design:returntype", void 0)
|
|
478
494
|
], ne.prototype, "render", null);
|
|
479
495
|
ne.style = Te;
|
|
480
|
-
const Be =
|
|
481
|
-
var Le = function(e, t, n,
|
|
482
|
-
var o = arguments.length,
|
|
496
|
+
const Be = ':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-cancelled-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}', De = Be;
|
|
497
|
+
var Le = function(e, t, n, s) {
|
|
498
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
483
499
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
484
|
-
|
|
500
|
+
i = Reflect.decorate(e, t, n, s);
|
|
485
501
|
else
|
|
486
502
|
for (var l = e.length - 1; l >= 0; l--)
|
|
487
|
-
(
|
|
488
|
-
return o > 3 &&
|
|
489
|
-
},
|
|
503
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
504
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
505
|
+
}, O = function(e, t) {
|
|
490
506
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
491
507
|
return Reflect.metadata(e, t);
|
|
492
508
|
};
|
|
493
|
-
const
|
|
509
|
+
const ae = class {
|
|
494
510
|
constructor(e) {
|
|
495
511
|
k(this, e), this.closeCancelEventCardClicked = h(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = h(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
|
|
496
512
|
this.isClosing = !0;
|
|
@@ -500,6 +516,9 @@ const ie = class {
|
|
|
500
516
|
this.closeCancelEventCardClicked.emit({ errorHandler: t });
|
|
501
517
|
}, this.configSettings = void 0, this.themeConfig = void 0, this.cancelledEventInfo = void 0, this.isClosing = !1;
|
|
502
518
|
}
|
|
519
|
+
themeConfigChanged(e) {
|
|
520
|
+
this.applyThemeConfig(e);
|
|
521
|
+
}
|
|
503
522
|
connectedCallback() {
|
|
504
523
|
d("[nylas-cancelled-event-card] Component connected");
|
|
505
524
|
}
|
|
@@ -519,47 +538,55 @@ const ie = class {
|
|
|
519
538
|
}
|
|
520
539
|
render() {
|
|
521
540
|
var e, t;
|
|
522
|
-
return
|
|
541
|
+
return a(g, { key: "4bc5935f964686d8713ad7e7d1e40c67cdd4e12c", part: "ncec" }, a("div", { key: "56f468bfcd9045f260edbf5ff4d0b15b36d0b71b", class: "nylas-cancelled-event-card", part: "ncec__card" }, a("div", { key: "1ab411b7fe3a3be0acf4b1d959fd28ec008a209a", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "2385650a6494031b7f323c7983fc9ea889014cba" })), a("h3", { key: "0b2abe6bf9853fcda33d79b9862a4bed4a002f9e", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, c.t("bookingCancelledTitle"), "!"), a("div", { key: "bffb4124594dd368cbd3889b57919738e46c9dba", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, c.t("bookingCancelledMessage"), " ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), a("div", { key: "cec5f1eadfc6fb46ab380ec62e32a7150846ae60", class: "nylas-cancelled-event-card__cta" }, a("button-component", { key: "98d546eb6b74011e65cf7853481741da1b546427", variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${c.t("closingButton")}...` : `${c.t("closeButton")}`))));
|
|
523
542
|
}
|
|
524
543
|
get host() {
|
|
525
544
|
return _(this);
|
|
526
545
|
}
|
|
546
|
+
static get watchers() {
|
|
547
|
+
return {
|
|
548
|
+
themeConfig: ["themeConfigChanged"]
|
|
549
|
+
};
|
|
550
|
+
}
|
|
527
551
|
};
|
|
528
552
|
Le([
|
|
529
553
|
x({
|
|
530
554
|
name: "nylas-cancelled-event-card",
|
|
531
|
-
stateToProps: /* @__PURE__ */ new Map([
|
|
555
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
556
|
+
["scheduler.configSettings", "configSettings"],
|
|
557
|
+
["scheduler.themeConfig", "themeConfig"],
|
|
558
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
559
|
+
]),
|
|
532
560
|
eventToProps: {
|
|
533
561
|
closeCancelEventCardClicked: async (e, t) => {
|
|
534
|
-
const n = await t.scheduler.resetCancel(), { errorHandler:
|
|
535
|
-
|
|
562
|
+
const n = await t.scheduler.resetCancel(), { errorHandler: s } = e.detail;
|
|
563
|
+
s && (!n || "error" in n) && s(n);
|
|
536
564
|
},
|
|
537
565
|
cancelledEventCardError: async (e, t) => {
|
|
538
566
|
d("nylas-cancelled-event-card", "cancelledEventCardError", e.detail);
|
|
539
567
|
}
|
|
540
568
|
},
|
|
541
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
542
569
|
fireRegisterEvent: !0
|
|
543
570
|
}),
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
],
|
|
548
|
-
|
|
549
|
-
const Se =
|
|
550
|
-
var
|
|
551
|
-
var o = arguments.length,
|
|
571
|
+
O("design:type", Function),
|
|
572
|
+
O("design:paramtypes", []),
|
|
573
|
+
O("design:returntype", void 0)
|
|
574
|
+
], ae.prototype, "render", null);
|
|
575
|
+
ae.style = De;
|
|
576
|
+
const Se = ':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-confirmed-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-confirmed-event-card{width:inherit}}.nylas-confirmed-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-confirmed-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-confirmed-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-confirmed-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}', Ie = Se;
|
|
577
|
+
var ze = function(e, t, n, s) {
|
|
578
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
552
579
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
553
|
-
|
|
580
|
+
i = Reflect.decorate(e, t, n, s);
|
|
554
581
|
else
|
|
555
582
|
for (var l = e.length - 1; l >= 0; l--)
|
|
556
|
-
(
|
|
557
|
-
return o > 3 &&
|
|
558
|
-
},
|
|
583
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
584
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
585
|
+
}, $ = function(e, t) {
|
|
559
586
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
560
587
|
return Reflect.metadata(e, t);
|
|
561
588
|
};
|
|
562
|
-
const
|
|
589
|
+
const ie = class {
|
|
563
590
|
constructor(e) {
|
|
564
591
|
k(this, e), this.closeConfirmEventCardClicked = h(this, "closeConfirmEventCardClicked", 7), this.confirmedEventCardError = h(this, "confirmedEventCardError", 7), this.handleCloseClicked = () => {
|
|
565
592
|
this.isClosing = !0;
|
|
@@ -569,6 +596,9 @@ const ae = class {
|
|
|
569
596
|
this.closeConfirmEventCardClicked.emit({ errorHandler: t });
|
|
570
597
|
}, this.configSettings = void 0, this.themeConfig = void 0, this.confirmedEventInfo = void 0, this.isClosing = !1;
|
|
571
598
|
}
|
|
599
|
+
themeConfigChanged(e) {
|
|
600
|
+
this.applyThemeConfig(e);
|
|
601
|
+
}
|
|
572
602
|
connectedCallback() {
|
|
573
603
|
d("[nylas-confirmed-event-card] Component connected");
|
|
574
604
|
}
|
|
@@ -588,93 +618,100 @@ const ae = class {
|
|
|
588
618
|
}
|
|
589
619
|
render() {
|
|
590
620
|
var e, t;
|
|
591
|
-
return
|
|
621
|
+
return a(g, { key: "d00500caec1a93e744df13ad7136f40f2e90b39f", part: "ncec" }, a("div", { key: "ff6c310c1e1571f571b5516158520075c87cfcd5", class: "nylas-confirmed-event-card", part: "ncec__card" }, a("div", { key: "a40599aa668d1623d0a1f470fec7baf532e2439d", class: "nylas-confirmed-event-card__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "7c164343c9cbf027edf2a0a7974e52a6fb340bac" })), a("h3", { key: "22f92206b8c8c3d24035f493eef2f5e717f0f76b", class: "nylas-confirmed-event-card__title", part: "ncec__title" }, c.t("confirmedEventCardTitle"), "!"), a("div", { key: "4cdeef5903561280e75d095cda64e3dce538b042", class: "nylas-confirmed-event-card__description", part: "ncec__description" }, c.t("confirmedEventCardDescription"), " ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), a("div", { key: "eba230ecfdfcef67f882f85ba11e3de738224bb1", class: "nylas-confirmed-event-card__cta" }, a("button-component", { key: "8c4707dbdaf60fb549a9a9f95fe4f46f11474d32", variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${c.t("closingButton")}...` : `${c.t("closeButton")}`))));
|
|
592
622
|
}
|
|
593
623
|
get host() {
|
|
594
624
|
return _(this);
|
|
595
625
|
}
|
|
626
|
+
static get watchers() {
|
|
627
|
+
return {
|
|
628
|
+
themeConfig: ["themeConfigChanged"]
|
|
629
|
+
};
|
|
630
|
+
}
|
|
596
631
|
};
|
|
597
|
-
|
|
632
|
+
ze([
|
|
598
633
|
x({
|
|
599
634
|
name: "nylas-confirmed-event-card",
|
|
600
|
-
stateToProps: /* @__PURE__ */ new Map([
|
|
635
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
636
|
+
["scheduler.configSettings", "configSettings"],
|
|
637
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
638
|
+
]),
|
|
601
639
|
eventToProps: {
|
|
602
640
|
closeConfirmEventCardClicked: async (e, t) => {
|
|
603
|
-
const n = await t.scheduler.resetConfirm(), { errorHandler:
|
|
604
|
-
|
|
641
|
+
const n = await t.scheduler.resetConfirm(), { errorHandler: s } = e.detail;
|
|
642
|
+
s && (!n || "error" in n) && s(n);
|
|
605
643
|
}
|
|
606
644
|
},
|
|
607
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
608
645
|
fireRegisterEvent: !0
|
|
609
646
|
}),
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
],
|
|
614
|
-
|
|
615
|
-
const
|
|
616
|
-
function
|
|
617
|
-
function o(
|
|
618
|
-
return e(
|
|
619
|
-
}
|
|
620
|
-
return o.floor = (
|
|
621
|
-
const
|
|
622
|
-
return
|
|
623
|
-
}, o.offset = (
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
626
|
-
return
|
|
647
|
+
$("design:type", Function),
|
|
648
|
+
$("design:paramtypes", []),
|
|
649
|
+
$("design:returntype", void 0)
|
|
650
|
+
], ie.prototype, "render", null);
|
|
651
|
+
ie.style = Ie;
|
|
652
|
+
const M = /* @__PURE__ */ new Date(), N = /* @__PURE__ */ new Date();
|
|
653
|
+
function z(e, t, n, s) {
|
|
654
|
+
function o(i) {
|
|
655
|
+
return e(i = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+i)), i;
|
|
656
|
+
}
|
|
657
|
+
return o.floor = (i) => (e(i = /* @__PURE__ */ new Date(+i)), i), o.ceil = (i) => (e(i = new Date(i - 1)), t(i, 1), e(i), i), o.round = (i) => {
|
|
658
|
+
const r = o(i), l = o.ceil(i);
|
|
659
|
+
return i - r < l - i ? r : l;
|
|
660
|
+
}, o.offset = (i, r) => (t(i = /* @__PURE__ */ new Date(+i), r == null ? 1 : Math.floor(r)), i), o.range = (i, r, l) => {
|
|
661
|
+
const u = [];
|
|
662
|
+
if (i = o.ceil(i), l = l == null ? 1 : Math.floor(l), !(i < r) || !(l > 0))
|
|
663
|
+
return u;
|
|
627
664
|
let m;
|
|
628
665
|
do
|
|
629
|
-
|
|
630
|
-
while (m <
|
|
631
|
-
return
|
|
632
|
-
}, o.filter = (
|
|
633
|
-
if (
|
|
634
|
-
for (; e(
|
|
635
|
-
|
|
636
|
-
}, (
|
|
637
|
-
if (
|
|
666
|
+
u.push(m = /* @__PURE__ */ new Date(+i)), t(i, l), e(i);
|
|
667
|
+
while (m < i && i < r);
|
|
668
|
+
return u;
|
|
669
|
+
}, o.filter = (i) => z((r) => {
|
|
670
|
+
if (r >= r)
|
|
671
|
+
for (; e(r), !i(r); )
|
|
672
|
+
r.setTime(r - 1);
|
|
673
|
+
}, (r, l) => {
|
|
674
|
+
if (r >= r)
|
|
638
675
|
if (l < 0)
|
|
639
676
|
for (; ++l <= 0; )
|
|
640
|
-
for (; t(
|
|
677
|
+
for (; t(r, -1), !i(r); )
|
|
641
678
|
;
|
|
642
679
|
else
|
|
643
680
|
for (; --l >= 0; )
|
|
644
|
-
for (; t(
|
|
681
|
+
for (; t(r, 1), !i(r); )
|
|
645
682
|
;
|
|
646
|
-
}), n && (o.count = (
|
|
683
|
+
}), n && (o.count = (i, r) => (M.setTime(+i), N.setTime(+r), e(M), e(N), Math.floor(n(M, N))), o.every = (i) => (i = Math.floor(i), !isFinite(i) || !(i > 0) ? null : i > 1 ? o.filter(s ? (r) => s(r) % i === 0 : (r) => o.count(0, r) % i === 0) : o)), o;
|
|
647
684
|
}
|
|
648
|
-
const
|
|
685
|
+
const je = 1e3, oe = je * 60, Re = oe * 60, I = Re * 24, H = z(
|
|
649
686
|
(e) => e.setHours(0, 0, 0, 0),
|
|
650
687
|
(e, t) => e.setDate(e.getDate() + t),
|
|
651
|
-
(e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * oe) /
|
|
688
|
+
(e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * oe) / I,
|
|
652
689
|
(e) => e.getDate() - 1
|
|
653
690
|
);
|
|
654
|
-
|
|
691
|
+
z((e) => {
|
|
655
692
|
e.setUTCHours(0, 0, 0, 0);
|
|
656
693
|
}, (e, t) => {
|
|
657
694
|
e.setUTCDate(e.getUTCDate() + t);
|
|
658
|
-
}, (e, t) => (t - e) /
|
|
659
|
-
|
|
695
|
+
}, (e, t) => (t - e) / I, (e) => e.getUTCDate() - 1);
|
|
696
|
+
z((e) => {
|
|
660
697
|
e.setUTCHours(0, 0, 0, 0);
|
|
661
698
|
}, (e, t) => {
|
|
662
699
|
e.setUTCDate(e.getUTCDate() + t);
|
|
663
|
-
}, (e, t) => (t - e) /
|
|
664
|
-
const
|
|
665
|
-
var
|
|
666
|
-
var o = arguments.length,
|
|
700
|
+
}, (e, t) => (t - e) / I, (e) => Math.floor(e / I));
|
|
701
|
+
const Fe = ':host{display:block;min-height:444px;--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}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family)}.title h1{margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:"";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}', Pe = Fe;
|
|
702
|
+
var Oe = function(e, t, n, s) {
|
|
703
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
667
704
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
668
|
-
|
|
705
|
+
i = Reflect.decorate(e, t, n, s);
|
|
669
706
|
else
|
|
670
707
|
for (var l = e.length - 1; l >= 0; l--)
|
|
671
|
-
(
|
|
672
|
-
return o > 3 &&
|
|
708
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
709
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
673
710
|
}, A = function(e, t) {
|
|
674
711
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
675
712
|
return Reflect.metadata(e, t);
|
|
676
713
|
};
|
|
677
|
-
const
|
|
714
|
+
const se = class {
|
|
678
715
|
constructor(e) {
|
|
679
716
|
k(this, e), this.dateSelected = h(this, "dateSelected", 7), this.monthChanged = h(this, "monthChanged", 7), this.selectableDates = void 0, this.configSettings = void 0, this.themeConfig = void 0, this.selectedDate = void 0, this.selectedLanguage = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1;
|
|
680
717
|
}
|
|
@@ -688,6 +725,9 @@ const re = class {
|
|
|
688
725
|
selectedLanguageChanged(e) {
|
|
689
726
|
c.changeLanguage(e);
|
|
690
727
|
}
|
|
728
|
+
themeConfigChanged(e) {
|
|
729
|
+
this.applyThemeConfig(e);
|
|
730
|
+
}
|
|
691
731
|
connectedCallback() {
|
|
692
732
|
}
|
|
693
733
|
disconnectedCallback() {
|
|
@@ -710,9 +750,9 @@ const re = class {
|
|
|
710
750
|
this.dateSelected.emit(e);
|
|
711
751
|
}
|
|
712
752
|
changeMonth(e) {
|
|
713
|
-
var o,
|
|
753
|
+
var o, i;
|
|
714
754
|
this.month = new Date(this.month.getFullYear(), this.month.getMonth() + e, 1);
|
|
715
|
-
const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), n = (
|
|
755
|
+
const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), n = (i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.available_days_in_future;
|
|
716
756
|
Y(/* @__PURE__ */ new Date(), n).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month);
|
|
717
757
|
}
|
|
718
758
|
isSelected(e, t, n) {
|
|
@@ -722,8 +762,8 @@ const re = class {
|
|
|
722
762
|
return e && (t == null ? void 0 : t.find((n) => E(n, e))) === void 0;
|
|
723
763
|
}
|
|
724
764
|
render() {
|
|
725
|
-
var e, t, n,
|
|
726
|
-
return
|
|
765
|
+
var e, t, n, s, o, i, r;
|
|
766
|
+
return a(g, { key: "4c20e8d37a61de3397cac0625884fdd9c11cc8af", part: "ndp" }, a("div", { key: "44174b6408db8263ab96c9acb57985af0d0780d2", class: "nylas-date-picker" }, a("div", { key: "962fc8b1ab8d8794df5838e16a477b8f705e4e6f", class: "title", part: "ndp__title" }, (e = this.configSettings) != null && e.name ? a("h1", null, (t = this.configSettings) == null ? void 0 : t.name) : ((s = (n = this.configSettings) == null ? void 0 : n.organizer) == null ? void 0 : s.name) && a("h1", null, a("person-icon", null), ((i = (o = this.configSettings) == null ? void 0 : o.organizer) == null ? void 0 : i.name) || "Organizer"), a("p", { key: "422505548dffc0ee5a70811415ff030641faeeff" }, a("clock-icon", { key: "ef51faa1c20ef5caf3f3a8f7ff619c619ba72401" }), this.eventDuration ? be(this.eventDuration) : `- ${c.t("time.minutes")}`)), a("div", { key: "f593d3bbcb954bd863381e445cff053ce0085714", class: "header flex-row" }, a("h2", { key: "bc844a479c3d7e7b4a2065e91aa79baace20b302", part: "ndp__month-header" }, a("strong", { key: "da5035f141b874d58f626426b71ee7e9dd0b6424" }, pe(this.month.toLocaleDateString(void 0, { month: "long" }).toLocaleLowerCase())), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), a("div", { key: "a2721542d5155de0072aa8a191b111b7d8cd7eea", class: "pagination" }, a("button", { key: "6611b22afdc7694eedb1700d0982be6a9d6e97fd", title: "Previous month", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: !((r = this.selectableDates) != null && r.length) || this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, a("chevron-icon", { key: "d3d5d7ebd113c60aa441403bb67a2540c7923517" })), a("button", { key: "67fc130c96bfb0dc4e198784a4e7f29cf9a409c5", title: "Next month", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, a("chevron-icon", { key: "5d64178be9d3b9dc8be009155259181cc9d72381" })))), a("div", { key: "528f43c0d6d38a607bd9bdfa0db2906e0237171b", class: "dates" }, [
|
|
727
767
|
c.t("days.sunday"),
|
|
728
768
|
c.t("days.monday"),
|
|
729
769
|
c.t("days.tuesday"),
|
|
@@ -731,18 +771,18 @@ const re = class {
|
|
|
731
771
|
c.t("days.thursday"),
|
|
732
772
|
c.t("days.friday"),
|
|
733
773
|
c.t("days.saturday")
|
|
734
|
-
].map((l) =>
|
|
774
|
+
].map((l) => a("div", { class: "day", part: "ndp__day" }, l)), this.dates.map((l, u) => {
|
|
735
775
|
var f;
|
|
736
776
|
const m = this.isDisabled(l, this.selectableDates);
|
|
737
|
-
return this.isLoading ?
|
|
777
|
+
return this.isLoading ? a("button", { disabled: !0, class: {
|
|
738
778
|
"date day-skeleton": !0,
|
|
739
|
-
"current-month":
|
|
740
|
-
}, style: { animationDelay: `${
|
|
779
|
+
"current-month": j(l, this.month)
|
|
780
|
+
}, style: { animationDelay: `${u * 20}ms` }, part: "ndp__date ndp__date--disabled" }, l.getDate()) : a("button", { class: {
|
|
741
781
|
date: !0,
|
|
742
782
|
selected: !!(this.selectedDate && E(l, this.selectedDate) && this.selectableDates && ((f = this.selectableDates) == null ? void 0 : f.length) > 0),
|
|
743
783
|
"current-day": E(l, /* @__PURE__ */ new Date()),
|
|
744
|
-
"current-month":
|
|
745
|
-
}, "aria-
|
|
784
|
+
"current-month": j(l, this.month)
|
|
785
|
+
}, "aria-label": l.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: m, onClick: () => this.selectDate(l), part: `ndp__date ${this.isSelected(l, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${E(l, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${j(l, this.month) ? "ndp__date--current-month" : ""}` }, l.getDate());
|
|
746
786
|
}))));
|
|
747
787
|
}
|
|
748
788
|
get host() {
|
|
@@ -751,11 +791,12 @@ const re = class {
|
|
|
751
791
|
static get watchers() {
|
|
752
792
|
return {
|
|
753
793
|
configSettings: ["configSettingsChanged"],
|
|
754
|
-
selectedLanguage: ["selectedLanguageChanged"]
|
|
794
|
+
selectedLanguage: ["selectedLanguageChanged"],
|
|
795
|
+
themeConfig: ["themeConfigChanged"]
|
|
755
796
|
};
|
|
756
797
|
}
|
|
757
798
|
};
|
|
758
|
-
|
|
799
|
+
Oe([
|
|
759
800
|
x({
|
|
760
801
|
name: "nylas-date-picker",
|
|
761
802
|
stateToProps: /* @__PURE__ */ new Map([
|
|
@@ -764,7 +805,8 @@ Me([
|
|
|
764
805
|
["scheduler.isLoading", "isLoading"],
|
|
765
806
|
["scheduler.configSettings", "configSettings"],
|
|
766
807
|
["scheduler.eventDuration", "eventDuration"],
|
|
767
|
-
["scheduler.selectedLanguage", "selectedLanguage"]
|
|
808
|
+
["scheduler.selectedLanguage", "selectedLanguage"],
|
|
809
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
768
810
|
]),
|
|
769
811
|
eventToProps: {
|
|
770
812
|
dateSelected: async (e, t) => {
|
|
@@ -774,31 +816,33 @@ Me([
|
|
|
774
816
|
d("nylas-date-picker", "monthChanged", e.detail);
|
|
775
817
|
}
|
|
776
818
|
},
|
|
777
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
778
819
|
fireRegisterEvent: !0
|
|
779
820
|
}),
|
|
780
821
|
A("design:type", Function),
|
|
781
822
|
A("design:paramtypes", []),
|
|
782
823
|
A("design:returntype", void 0)
|
|
783
|
-
],
|
|
784
|
-
|
|
785
|
-
const
|
|
786
|
-
var Ne = function(e, t, n,
|
|
787
|
-
var o = arguments.length,
|
|
824
|
+
], se.prototype, "render", null);
|
|
825
|
+
se.style = Pe;
|
|
826
|
+
const $e = ':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-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){border:none;padding:10px}select-dropdown::part(sd_dropdown-content){max-width:306px}', Me = $e;
|
|
827
|
+
var Ne = function(e, t, n, s) {
|
|
828
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
788
829
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
789
|
-
|
|
830
|
+
i = Reflect.decorate(e, t, n, s);
|
|
790
831
|
else
|
|
791
832
|
for (var l = e.length - 1; l >= 0; l--)
|
|
792
|
-
(
|
|
793
|
-
return o > 3 &&
|
|
833
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
834
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
794
835
|
}, q = function(e, t) {
|
|
795
836
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
796
837
|
return Reflect.metadata(e, t);
|
|
797
838
|
};
|
|
798
|
-
const
|
|
839
|
+
const re = class {
|
|
799
840
|
constructor(e) {
|
|
800
841
|
k(this, e), this.timezoneChanged = h(this, "timezoneChanged", 7), this.languageChanged = h(this, "languageChanged", 7), this.themeConfig = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = navigator.language;
|
|
801
842
|
}
|
|
843
|
+
themeConfigChanged(e) {
|
|
844
|
+
this.applyThemeConfig(e);
|
|
845
|
+
}
|
|
802
846
|
connectedCallback() {
|
|
803
847
|
}
|
|
804
848
|
disconnectedCallback() {
|
|
@@ -824,13 +868,13 @@ const se = class {
|
|
|
824
868
|
t === "timezone" ? this.changeTimezone(n) : t === "language" && this.changeLanguage(n);
|
|
825
869
|
}
|
|
826
870
|
getTimezoneLabelHTML(e) {
|
|
827
|
-
const t =
|
|
828
|
-
return
|
|
871
|
+
const t = ue(e);
|
|
872
|
+
return a("span", { class: "timezone-label", style: {
|
|
829
873
|
display: "flex",
|
|
830
874
|
alignItems: "center",
|
|
831
875
|
justifyContent: "space-between",
|
|
832
876
|
width: "-webkit-fill-available"
|
|
833
|
-
} }, L[e], " ",
|
|
877
|
+
} }, L[e], " ", a("span", { class: "timezone-offset", style: {
|
|
834
878
|
fontSize: "14px",
|
|
835
879
|
fontWeight: "400",
|
|
836
880
|
color: "var(--nylas-base-500)"
|
|
@@ -845,24 +889,30 @@ const se = class {
|
|
|
845
889
|
label: J[n],
|
|
846
890
|
value: n
|
|
847
891
|
}));
|
|
848
|
-
return
|
|
892
|
+
return a(g, { key: "879a445840da85f74f8b844caede154613ec328e" }, a("div", { key: "e7c11dc083f190e0c4b541babce3129c458e4f70", class: "nylas-locale-switch", part: "nls" }, a("div", { key: "a764dca464a4dbadf24b1af73cc003558156f009", class: {
|
|
849
893
|
"select-wrapper": !0,
|
|
850
894
|
timezone: !0
|
|
851
|
-
}, part: "nls__timezone" },
|
|
895
|
+
}, part: "nls__timezone" }, a("select-dropdown", { key: "94ebb791726435cc32e78c127a43fbb92692882d", name: "timezone", options: e, defaultSelectedOption: e.find((n) => n.value == this.selectedTimezone), exportparts: "sd_dropdown: nls__timezone-dropdown, sd_dropdown-button: nls__timezone-drop-button, sd_dropdown-button-selected-label: nls__timezone-drop-button-selected-label, sd_dropdown-content: nls__timezone-drop-content, sd_dropdown_label: nls__timezone-drop-label" }, a("span", { key: "3d3923b8ba91ec563a930945bb7b07072e2fd43a", slot: "select-icon" }, a("globe-icon", { key: "70650f2e15d51241af9973eba1d73fed6c669cc0", width: "20", height: "20" })))), a("div", { key: "9a6fb1221184046119f5025c30366012642dabac", class: {
|
|
852
896
|
"select-wrapper": !0,
|
|
853
897
|
language: !0
|
|
854
|
-
}, part: "nls__language" },
|
|
898
|
+
}, part: "nls__language" }, a("select-dropdown", { key: "11d162780880afa654e46d32640e79461dabddad", name: "language", options: t, defaultSelectedOption: t.find((n) => n.value == this.selectedLanguage), exportparts: "sd_dropdown: nls__language-dropdown, sd_dropdown-button: nls__language-drop-button, sd_dropdown-content: nls__language-drop-content, sd_dropdown_label: nls__language-drop-label" }, a("span", { key: "b534eee8b7687c103c5d54b620c7d4c1b2199633", slot: "select-icon" }, a("translate-icon", { key: "774adc9377369bcff49f7e9e1acef51f12f89a8d", width: "20", height: "20" }))))));
|
|
855
899
|
}
|
|
856
900
|
get host() {
|
|
857
901
|
return _(this);
|
|
858
902
|
}
|
|
903
|
+
static get watchers() {
|
|
904
|
+
return {
|
|
905
|
+
themeConfig: ["themeConfigChanged"]
|
|
906
|
+
};
|
|
907
|
+
}
|
|
859
908
|
};
|
|
860
909
|
Ne([
|
|
861
910
|
x({
|
|
862
911
|
name: "nylas-locale-switch",
|
|
863
912
|
stateToProps: /* @__PURE__ */ new Map([
|
|
864
913
|
["scheduler.selectedLanguage", "selectedLanguage"],
|
|
865
|
-
["scheduler.selectedTimezone", "selectedTimezone"]
|
|
914
|
+
["scheduler.selectedTimezone", "selectedTimezone"],
|
|
915
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
866
916
|
]),
|
|
867
917
|
eventToProps: {
|
|
868
918
|
timezoneChanged: async (e, t) => {
|
|
@@ -872,20 +922,19 @@ Ne([
|
|
|
872
922
|
d("nylas-locale-switch", "languageChanged", e.detail), t.scheduler.selectLanguage(e.detail);
|
|
873
923
|
}
|
|
874
924
|
},
|
|
875
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
876
925
|
fireRegisterEvent: !0
|
|
877
926
|
}),
|
|
878
927
|
q("design:type", Function),
|
|
879
928
|
q("design:paramtypes", []),
|
|
880
929
|
q("design:returntype", void 0)
|
|
881
|
-
],
|
|
882
|
-
|
|
930
|
+
], re.prototype, "render", null);
|
|
931
|
+
re.style = Me;
|
|
883
932
|
const He = ".sc-nylas-logo-h{display:flex}", Ae = He, qe = class {
|
|
884
933
|
constructor(e) {
|
|
885
934
|
k(this, e), this.width = "69", this.height = "24";
|
|
886
935
|
}
|
|
887
936
|
render() {
|
|
888
|
-
return
|
|
937
|
+
return a("svg", { key: "12dffc0c444183dfd3bb8593076a6b022de4654b", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("g", { key: "89545db6a2731faffdf62b9f0826211c9827af35", "clip-path": "url(#clip0_455_3543)" }, a("path", { key: "bc169c74819239b2c40b3730a445f45d1a16f445", d: "M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z", fill: "currentColor" }), a("path", { key: "456cd298652217764f8486bca01860c4f1132e58", d: "M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z", fill: "currentColor" }), a("path", { key: "99e86fdeed7fd4e6440e749884432df26dfe1d37", d: "M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z", fill: "currentColor" }), a("path", { key: "68231e9e8a5f86804d3590ca240bcaf362df1fa6", d: "M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z", fill: "currentColor" }), a("path", { key: "80b2550211f60e218c5f52f975a060e3ac4ea84a", d: "M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z", fill: "currentColor" }), a("path", { key: "b5db41daab85f0ffd7738f492ede6189237b7d5f", d: "M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z", fill: "currentColor" }), a("path", { key: "9fc6c3fe5eb5f86e4e53126c98958f36a128030f", d: "M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z", fill: "currentColor" }), a("path", { key: "dcbcc1f9ad3d20c137644553a90ec0afc7f6bdf9", d: "M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z", fill: "currentColor" })), a("defs", { key: "569df0349b4a24ea2d0a0bee9788b0b8911dcf39" }, a("clipPath", { key: "7a24bd2f656eba24c53b46b1b65b6ae5ea11c378", id: "clip0_455_3543" }, a("rect", { key: "60a57936d17acf21b9c58a177f17f3ce3fede7f1", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
|
|
889
938
|
}
|
|
890
939
|
};
|
|
891
940
|
qe.style = Ae;
|
|
@@ -935,7 +984,7 @@ const Ve = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
935
984
|
if (this.notifications = [...this.notifications, { ...e.detail.notification }], e.detail.notification.ttl !== "none") {
|
|
936
985
|
const n = e.detail.notification.ttl ? e.detail.notification.ttl : this.ttl;
|
|
937
986
|
window.setTimeout(() => {
|
|
938
|
-
this.notifications = this.notifications.filter((
|
|
987
|
+
this.notifications = this.notifications.filter((s) => s.id !== e.detail.notification.id);
|
|
939
988
|
}, n);
|
|
940
989
|
}
|
|
941
990
|
}
|
|
@@ -943,22 +992,22 @@ const Ve = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
943
992
|
this.notifications = this.notifications.filter((t) => t.id !== e);
|
|
944
993
|
}
|
|
945
994
|
render() {
|
|
946
|
-
return
|
|
995
|
+
return a(g, { key: "03f95b47c77afb69a2696473c2bf8c3f1e1ed44a" }, a(ge, { key: "990afe9475e36dbae84a70266ef0b5188d2011de" }, this.notifications.map((e) => a("div", { class: `notif ${e.type}`, key: e.id }, a("div", { class: "content" }, a("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && a("warning-icon", null)), a("span", { class: "message" }, a("span", { class: "title" }, e.title), e.description && a("span", { class: "description" }, e.description))), a("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, a("close-icon", null)))), a("slot", { key: "49a5c13a306626b5bba79c443bb8501fe50c7ea3" })));
|
|
947
996
|
}
|
|
948
997
|
get host() {
|
|
949
998
|
return _(this);
|
|
950
999
|
}
|
|
951
1000
|
};
|
|
952
1001
|
Ge.style = Ze;
|
|
953
|
-
const We =
|
|
954
|
-
var Xe = function(e, t, n,
|
|
955
|
-
var o = arguments.length,
|
|
1002
|
+
const We = ':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}.event-card-wrapper{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 4rem;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.manage-booking-description{border-top:1px solid var(--nylas-base-200)}.manage-booking-description p{font-size:16px;margin:1rem;padding:0.5rem 1rem;font-weight:400;color:var(--nylas-base-800)}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{--dot-color:var(--nylas-base-700)}', Ue = We;
|
|
1003
|
+
var Xe = function(e, t, n, s) {
|
|
1004
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
956
1005
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
957
|
-
|
|
1006
|
+
i = Reflect.decorate(e, t, n, s);
|
|
958
1007
|
else
|
|
959
1008
|
for (var l = e.length - 1; l >= 0; l--)
|
|
960
|
-
(
|
|
961
|
-
return o > 3 &&
|
|
1009
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
1010
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
962
1011
|
}, V = function(e, t) {
|
|
963
1012
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
964
1013
|
return Reflect.metadata(e, t);
|
|
@@ -975,6 +1024,9 @@ const le = class {
|
|
|
975
1024
|
this.action = "reject", this.organizerConfirmationBookingId && !this.isLoading && this.rejectBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host });
|
|
976
1025
|
}, this.configSettings = void 0, this.isLoading = void 0, this.themeConfig = void 0, this.organizerConfirmationBookingId = void 0, this.selectedLanguage = navigator.language, this.action = null;
|
|
977
1026
|
}
|
|
1027
|
+
themeConfigChanged(e) {
|
|
1028
|
+
this.applyThemeConfig(e);
|
|
1029
|
+
}
|
|
978
1030
|
connectedCallback() {
|
|
979
1031
|
}
|
|
980
1032
|
disconnectedCallback() {
|
|
@@ -994,16 +1046,21 @@ const le = class {
|
|
|
994
1046
|
this.action = null;
|
|
995
1047
|
}
|
|
996
1048
|
render() {
|
|
997
|
-
var e, t, n,
|
|
998
|
-
return
|
|
1049
|
+
var e, t, n, s, o, i, r, l, u, m, f, p;
|
|
1050
|
+
return a(g, { key: "00063ab52436fa94923515f0e7d9b83ad32a6de5", part: "nmcc" }, a("div", { key: "86d985186bd45ad8ccccaf26f6d3fd5b95bd6647", class: "event-card-wrapper", part: "nmccc__card" }, a("div", { key: "7c0337db6d10ec6c2336a932f8c9481cf870ac17", class: "calendar-icon" }, a("calendar-check-icon", { key: "8827a672b93e82a487b79fdcee0f37abf4dd70e0" })), a("div", { key: "283251146d05e457365652f9b1484f5b4342a5c9", class: "booked-event-header" }, a("h2", { key: "df264ab4ce9d9c5c8e63731d81727aeac8d63ff7", slot: "card-title", part: "nmcc__title" }, !!this.organizerConfirmationBookingId && `${c.t("bookingPendingTitle")}!`)), a("div", { key: "543c3f981da5149ef0d79f7ab1281744806fd2ff", class: "manage-booking-description" }, a("p", { key: "bb2cbf321fd7a4bcb8db89e918ba26f16c0767eb" }, c.t("bookingPendingnDescription"))), a("div", { key: "b400ded1e5fa2b35b9ffe615e6fe525a3fc51461", class: {
|
|
999
1051
|
footer: !0,
|
|
1000
|
-
"no-footer": ((t = (e = this.configSettings) == null ? void 0 : e.scheduler) == null ? void 0 : t.hide_cancellation_options) && ((
|
|
1001
|
-
"no-template-cols": ((
|
|
1002
|
-
} }, !((m = (
|
|
1052
|
+
"no-footer": ((t = (e = this.configSettings) == null ? void 0 : e.scheduler) == null ? void 0 : t.hide_cancellation_options) && ((s = (n = this.configSettings) == null ? void 0 : n.scheduler) == null ? void 0 : s.hide_rescheduling_options),
|
|
1053
|
+
"no-template-cols": ((i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.hide_cancellation_options) || ((l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.hide_rescheduling_options)
|
|
1054
|
+
} }, !((m = (u = this.configSettings) == null ? void 0 : u.scheduler) != null && m.hide_cancellation_options) && a("button-component", { variant: "destructive", onClick: this.handleRejectBookingButtonClicked, isLoading: this.isLoading && this.action === "reject", part: "nmcc__button-outline nmcc__cancel-cta" }, `${c.t("rejectBookingButton")}`), !((p = (f = this.configSettings) == null ? void 0 : f.scheduler) != null && p.hide_rescheduling_options) && a("button-component", { variant: "basic", onClick: this.handleConfirmBookingButtonClicked, isLoading: this.isLoading && this.action === "confirm", part: "nmcc__button-outline nmcc__reschedule-cta" }, `${c.t("confirmBookingButton")}`))));
|
|
1003
1055
|
}
|
|
1004
1056
|
get host() {
|
|
1005
1057
|
return _(this);
|
|
1006
1058
|
}
|
|
1059
|
+
static get watchers() {
|
|
1060
|
+
return {
|
|
1061
|
+
themeConfig: ["themeConfigChanged"]
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1007
1064
|
};
|
|
1008
1065
|
Xe([
|
|
1009
1066
|
x({
|
|
@@ -1012,21 +1069,21 @@ Xe([
|
|
|
1012
1069
|
["scheduler.organizerConfirmationBookingId", "organizerConfirmationBookingId"],
|
|
1013
1070
|
["scheduler.configSettings", "configSettings"],
|
|
1014
1071
|
["scheduler.isLoading", "isLoading"],
|
|
1015
|
-
["scheduler.selectedLanguage", "selectedLanguage"]
|
|
1072
|
+
["scheduler.selectedLanguage", "selectedLanguage"],
|
|
1073
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
1016
1074
|
]),
|
|
1017
1075
|
eventToProps: {
|
|
1018
1076
|
rejectBookingButtonClicked: async (e, t) => {
|
|
1019
1077
|
t.scheduler.setReject(e.detail.bookingId);
|
|
1020
1078
|
},
|
|
1021
1079
|
confirmBookingButtonClicked: async (e, t) => {
|
|
1022
|
-
const { host: n } = e.detail,
|
|
1080
|
+
const { host: n } = e.detail, s = await t.scheduler.updateBooking({
|
|
1023
1081
|
bookingId: e.detail.bookingId,
|
|
1024
1082
|
status: "confirmed"
|
|
1025
1083
|
}), { errorHandler: o } = e.detail;
|
|
1026
|
-
o && (!
|
|
1084
|
+
o && (!s || "error" in s) && o(s), await n.resetAction();
|
|
1027
1085
|
}
|
|
1028
1086
|
},
|
|
1029
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
1030
1087
|
fireRegisterEvent: !0
|
|
1031
1088
|
}),
|
|
1032
1089
|
V("design:type", Function),
|
|
@@ -1034,15 +1091,15 @@ Xe([
|
|
|
1034
1091
|
V("design:returntype", void 0)
|
|
1035
1092
|
], le.prototype, "render", null);
|
|
1036
1093
|
le.style = Ue;
|
|
1037
|
-
const Ye =
|
|
1038
|
-
var Ke = function(e, t, n,
|
|
1039
|
-
var o = arguments.length,
|
|
1094
|
+
const Ye = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:block;position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}', Je = Ye;
|
|
1095
|
+
var Ke = function(e, t, n, s) {
|
|
1096
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
1040
1097
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1041
|
-
|
|
1098
|
+
i = Reflect.decorate(e, t, n, s);
|
|
1042
1099
|
else
|
|
1043
1100
|
for (var l = e.length - 1; l >= 0; l--)
|
|
1044
|
-
(
|
|
1045
|
-
return o > 3 &&
|
|
1101
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
1102
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
1046
1103
|
}, Z = function(e, t) {
|
|
1047
1104
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1048
1105
|
return Reflect.metadata(e, t);
|
|
@@ -1051,6 +1108,9 @@ const ce = class {
|
|
|
1051
1108
|
constructor(e) {
|
|
1052
1109
|
k(this, e), this.themeConfig = void 0, this.selectedDate = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = void 0, this.startTime = "", this.endTime = "";
|
|
1053
1110
|
}
|
|
1111
|
+
themeConfigChanged(e) {
|
|
1112
|
+
this.applyThemeConfig(e);
|
|
1113
|
+
}
|
|
1054
1114
|
connectedCallback() {
|
|
1055
1115
|
}
|
|
1056
1116
|
disconnectedCallback() {
|
|
@@ -1075,11 +1135,16 @@ const ce = class {
|
|
|
1075
1135
|
}
|
|
1076
1136
|
render() {
|
|
1077
1137
|
var e;
|
|
1078
|
-
return
|
|
1138
|
+
return a(g, { key: "e03c7985396173ef1d2bb0ba02ea88e958811a35", part: "nsec" }, a("div", { key: "017d6ce8fc92ef11070d94038e80095acbd90f29", class: "event-card", part: "nsec__card" }, a("div", { key: "b475d6d8481d4e85a383822ed34139a2838a686c", class: "calendar-icon", part: "nsec__icon" }, a("calendar-icon", { key: "83df23c0d499b2932c84175c45c05bb589294f74" })), a("div", { key: "e11fe3c83e6cf3fa926ec3b7e0e381625cb98b0f", class: "nylas-selected-event-card__date", part: "nsec__date" }, this.selectedDate ? K((e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(Q[this.selectedLanguage || navigator.language], { dateStyle: "full", timeZone: this.selectedTimezone })) : "-"), a("div", { key: "ed9773f2567782ab354ffe28fbbc365d3d2effa5", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), a("div", { key: "16389c36fe0ab7c55e5f71ab22ad8576dc509cae", class: "event-timezone", part: "nsec__timezone" }, a("globe-icon", { key: "2c6d9e03e0687a5912e1f674c08c19b6e612e90a" }), L[this.selectedTimezone]));
|
|
1079
1139
|
}
|
|
1080
1140
|
get host() {
|
|
1081
1141
|
return _(this);
|
|
1082
1142
|
}
|
|
1143
|
+
static get watchers() {
|
|
1144
|
+
return {
|
|
1145
|
+
themeConfig: ["themeConfigChanged"]
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1083
1148
|
};
|
|
1084
1149
|
Ke([
|
|
1085
1150
|
x({
|
|
@@ -1088,10 +1153,10 @@ Ke([
|
|
|
1088
1153
|
["scheduler.selectedDate", "selectedDate"],
|
|
1089
1154
|
["scheduler.selectedTimeslot", "selectedTimeslot"],
|
|
1090
1155
|
["scheduler.selectedTimezone", "selectedTimezone"],
|
|
1091
|
-
["scheduler.selectedLanguage", "selectedLanguage"]
|
|
1156
|
+
["scheduler.selectedLanguage", "selectedLanguage"],
|
|
1157
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
1092
1158
|
]),
|
|
1093
1159
|
eventToProps: {},
|
|
1094
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
1095
1160
|
fireRegisterEvent: !0
|
|
1096
1161
|
}),
|
|
1097
1162
|
Z("design:type", Function),
|
|
@@ -1099,15 +1164,15 @@ Ke([
|
|
|
1099
1164
|
Z("design:returntype", void 0)
|
|
1100
1165
|
], ce.prototype, "render", null);
|
|
1101
1166
|
ce.style = Je;
|
|
1102
|
-
const Qe =
|
|
1103
|
-
var tt = function(e, t, n,
|
|
1104
|
-
var o = arguments.length,
|
|
1167
|
+
const Qe = ':host{display:block;height:calc(100% - 48px);--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-wrapper{display:flex;flex-direction:column;height:100%}.timeslots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .timeslot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}', et = Qe;
|
|
1168
|
+
var tt = function(e, t, n, s) {
|
|
1169
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
1105
1170
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1106
|
-
|
|
1171
|
+
i = Reflect.decorate(e, t, n, s);
|
|
1107
1172
|
else
|
|
1108
1173
|
for (var l = e.length - 1; l >= 0; l--)
|
|
1109
|
-
(
|
|
1110
|
-
return o > 3 &&
|
|
1174
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
1175
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
1111
1176
|
}, G = function(e, t) {
|
|
1112
1177
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1113
1178
|
return Reflect.metadata(e, t);
|
|
@@ -1128,7 +1193,7 @@ const de = class {
|
|
|
1128
1193
|
selectedDateChanged(e) {
|
|
1129
1194
|
var t;
|
|
1130
1195
|
if (d("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
|
|
1131
|
-
const n = (t = this.availability) == null ? void 0 : t.filter((
|
|
1196
|
+
const n = (t = this.availability) == null ? void 0 : t.filter((s) => E(s.start_time, e)).map((s) => s);
|
|
1132
1197
|
this.times = n || [];
|
|
1133
1198
|
}
|
|
1134
1199
|
}
|
|
@@ -1138,6 +1203,9 @@ const de = class {
|
|
|
1138
1203
|
this.times = t || [];
|
|
1139
1204
|
}
|
|
1140
1205
|
}
|
|
1206
|
+
themeConfigChanged(e) {
|
|
1207
|
+
this.applyThemeConfig(e);
|
|
1208
|
+
}
|
|
1141
1209
|
connectedCallback() {
|
|
1142
1210
|
}
|
|
1143
1211
|
disconnectedCallback() {
|
|
@@ -1175,13 +1243,13 @@ const de = class {
|
|
|
1175
1243
|
return `${t.format(e.start_time)} - ${t.format(e.end_time)}`;
|
|
1176
1244
|
}
|
|
1177
1245
|
render() {
|
|
1178
|
-
return this.isLoading ?
|
|
1179
|
-
var n,
|
|
1180
|
-
return
|
|
1246
|
+
return this.isLoading ? a(g, null, a("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => a("div", { class: "timeslot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? a(g, null, a("div", { class: "empty" }, a("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? a(g, null, a("div", { class: "empty" }, a("span", null, "No time slots available for selected date"))) : this.selectedDate ? a(g, { part: "ntp" }, a("div", { class: "time-picker-wrapper" }, a("div", { class: "timeslots" }, this.times.map((e, t) => {
|
|
1247
|
+
var n, s, o, i;
|
|
1248
|
+
return a("button", { part: `ntp__timeslot ${((s = (n = this.selectedTimeslot) == null ? void 0 : n.start_time) == null ? void 0 : s.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, class: {
|
|
1181
1249
|
time: !0,
|
|
1182
|
-
selected: typeof this.selectedTimeslot < "u" && ((
|
|
1250
|
+
selected: typeof this.selectedTimeslot < "u" && ((i = (o = this.selectedTimeslot) == null ? void 0 : o.start_time) == null ? void 0 : i.getTime()) === e.start_time.getTime()
|
|
1183
1251
|
}, onClick: () => this.onClickSelectTime(e, t), onMouseEnter: () => this.handleMouseEnter(t), onMouseLeave: () => this.handleMouseLeave() }, this.hoveredTimeslotIndex == t || this.selectedTimeslotIndex == this.getTimeslotId(e.start_time, t) ? this.getTimeSlotLabel(e) : e.start_time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", timeZone: this.selectedTimezone }));
|
|
1184
|
-
})), this.selectedTimeslot &&
|
|
1252
|
+
})), this.selectedTimeslot && a("div", { class: "footer" }, a("button-component", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, a("slot", { name: "timeslot-picker-cta-label" }, c.t("nextButton")))))) : a(g, null);
|
|
1185
1253
|
}
|
|
1186
1254
|
get host() {
|
|
1187
1255
|
return _(this);
|
|
@@ -1190,7 +1258,8 @@ const de = class {
|
|
|
1190
1258
|
return {
|
|
1191
1259
|
selectedLanguage: ["selectedLanguageChanged"],
|
|
1192
1260
|
selectedDate: ["selectedDateChanged"],
|
|
1193
|
-
availability: ["availabilityChanged"]
|
|
1261
|
+
availability: ["availabilityChanged"],
|
|
1262
|
+
themeConfig: ["themeConfigChanged"]
|
|
1194
1263
|
};
|
|
1195
1264
|
}
|
|
1196
1265
|
};
|
|
@@ -1203,7 +1272,8 @@ tt([
|
|
|
1203
1272
|
["scheduler.selectedTimeslot", "selectedTimeslot"],
|
|
1204
1273
|
["scheduler.selectedTimezone", "selectedTimezone"],
|
|
1205
1274
|
["scheduler.selectedLanguage", "selectedLanguage"],
|
|
1206
|
-
["scheduler.isLoading", "isLoading"]
|
|
1275
|
+
["scheduler.isLoading", "isLoading"],
|
|
1276
|
+
["scheduler.themeConfig", "themeConfig"]
|
|
1207
1277
|
]),
|
|
1208
1278
|
eventToProps: {
|
|
1209
1279
|
timeslotSelected: async (e, t) => {
|
|
@@ -1213,7 +1283,6 @@ tt([
|
|
|
1213
1283
|
d("nylas-timeslot-picker", "timeslotConfirmed", e.detail), e.detail && t.scheduler.toggleAdditionalData(!0);
|
|
1214
1284
|
}
|
|
1215
1285
|
},
|
|
1216
|
-
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
1217
1286
|
fireRegisterEvent: !0
|
|
1218
1287
|
}),
|
|
1219
1288
|
G("design:type", Function),
|
|
@@ -1225,10 +1294,10 @@ export {
|
|
|
1225
1294
|
ee as nylas_booked_event_card,
|
|
1226
1295
|
te as nylas_booking_form,
|
|
1227
1296
|
ne as nylas_cancel_booking_form,
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1297
|
+
ae as nylas_cancelled_event_card,
|
|
1298
|
+
ie as nylas_confirmed_event_card,
|
|
1299
|
+
se as nylas_date_picker,
|
|
1300
|
+
re as nylas_locale_switch,
|
|
1232
1301
|
qe as nylas_logo,
|
|
1233
1302
|
Ge as nylas_notification,
|
|
1234
1303
|
le as nylas_organizer_confirmation_card,
|