@nylas/web-elements 0.0.0-canary-20251006194336 → 0.0.0-canary-20251007161342

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.
Files changed (138) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1920 -1830
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1058 -968
  3. package/dist/cjs/calendar-agenda-fill-icon_37.cjs.entry.js +1 -1
  4. package/dist/cjs/calendar-agenda-fill-icon_37.cjs.entry.js.map +1 -1
  5. package/dist/cjs/info-icon.tooltip-component.entry.cjs.js.map +1 -1
  6. package/dist/cjs/info-icon_2.cjs.entry.js +150 -6
  7. package/dist/cjs/info-icon_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  10. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +180 -8
  11. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js.map +1 -1
  12. package/dist/collection/components/design-system/tooltip-component/tooltip-component.css +64 -52
  13. package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.css +4 -1
  14. package/dist/components/nylas-additional-participants.js +1 -1
  15. package/dist/components/nylas-availability-picker.js +1 -1
  16. package/dist/components/nylas-booking-calendar-picker.js +1 -1
  17. package/dist/components/nylas-booking-confirmation-redirect.js +1 -1
  18. package/dist/components/nylas-booking-confirmation-type.js +1 -1
  19. package/dist/components/nylas-booking-form.js +1 -1
  20. package/dist/components/nylas-buffer-time.js +1 -1
  21. package/dist/components/nylas-cancel-booking-form.js +1 -1
  22. package/dist/components/nylas-cancellation-policy.js +1 -1
  23. package/dist/components/nylas-confirmation-email.js +1 -1
  24. package/dist/components/nylas-connected-calendars.js +1 -1
  25. package/dist/components/nylas-custom-event-slug.js +1 -1
  26. package/dist/components/nylas-customize-booking-settings.js +1 -1
  27. package/dist/components/nylas-disable-emails.js +1 -1
  28. package/dist/components/nylas-editor-tabs-group.js +1 -1
  29. package/dist/components/nylas-editor-tabs.js +1 -1
  30. package/dist/components/nylas-event-calendar.js +1 -1
  31. package/dist/components/nylas-event-capacity.js +1 -1
  32. package/dist/components/nylas-event-description.js +1 -1
  33. package/dist/components/nylas-event-location.js +1 -1
  34. package/dist/components/nylas-event-title.js +1 -1
  35. package/dist/components/nylas-feedback-form.js +1 -1
  36. package/dist/components/nylas-limit-future-bookings.js +1 -1
  37. package/dist/components/nylas-min-booking-notice.js +1 -1
  38. package/dist/components/nylas-min-cancellation-notice.js +1 -1
  39. package/dist/components/nylas-page-name.js +1 -1
  40. package/dist/components/nylas-participant-booking-calendars.js +1 -1
  41. package/dist/components/nylas-participants-custom-availability.js +1 -1
  42. package/dist/components/nylas-reminder-emails.js +1 -1
  43. package/dist/components/nylas-scheduler-editor.js +32 -32
  44. package/dist/components/nylas-scheduling-method.js +1 -1
  45. package/dist/components/nylas-scheduling.js +5 -5
  46. package/dist/components/nylas-specific-time-availability-picker.js +1 -1
  47. package/dist/components/nylas-timeslot-interval.js +1 -1
  48. package/dist/components/{p-rxJJy5Oo.js → p-3545RJLr.js} +3 -3
  49. package/dist/components/{p-rxJJy5Oo.js.map → p-3545RJLr.js.map} +1 -1
  50. package/dist/components/{p-Cn55Fpla.js → p-7BhSS-Bd.js} +4 -4
  51. package/dist/components/{p-Cn55Fpla.js.map → p-7BhSS-Bd.js.map} +1 -1
  52. package/dist/components/{p-uQkH95_y.js → p-8_2du_nN.js} +3 -3
  53. package/dist/components/{p-uQkH95_y.js.map → p-8_2du_nN.js.map} +1 -1
  54. package/dist/components/{p-BozYWwCV.js → p-BCGUSoeG.js} +5 -5
  55. package/dist/components/{p-BozYWwCV.js.map → p-BCGUSoeG.js.map} +1 -1
  56. package/dist/components/{p-_d4igWlQ.js → p-BCIPr2QS.js} +3 -3
  57. package/dist/components/{p-_d4igWlQ.js.map → p-BCIPr2QS.js.map} +1 -1
  58. package/dist/components/{p-BECn9Pde.js → p-BMmV9VHf.js} +3 -3
  59. package/dist/components/{p-BECn9Pde.js.map → p-BMmV9VHf.js.map} +1 -1
  60. package/dist/components/{p-Bd6ktb2T.js → p-BQ7rKcsT.js} +3 -3
  61. package/dist/components/{p-Bd6ktb2T.js.map → p-BQ7rKcsT.js.map} +1 -1
  62. package/dist/components/{p-D4eqsyJm.js → p-BZgNerLB.js} +3 -3
  63. package/dist/components/{p-D4eqsyJm.js.map → p-BZgNerLB.js.map} +1 -1
  64. package/dist/components/{p-CFr7S7xZ.js → p-BbiXF9bo.js} +3 -3
  65. package/dist/components/{p-CFr7S7xZ.js.map → p-BbiXF9bo.js.map} +1 -1
  66. package/dist/components/{p-C0MruP24.js → p-BcOFblKk.js} +4 -4
  67. package/dist/components/{p-C0MruP24.js.map → p-BcOFblKk.js.map} +1 -1
  68. package/dist/components/{p-CjhVAUET.js → p-Bfqgcme8.js} +3 -3
  69. package/dist/components/{p-CjhVAUET.js.map → p-Bfqgcme8.js.map} +1 -1
  70. package/dist/components/{p-DP89yVjq.js → p-BjzdJtGW.js} +30 -30
  71. package/dist/components/{p-DP89yVjq.js.map → p-BjzdJtGW.js.map} +1 -1
  72. package/dist/components/{p-BsfPlCjP.js → p-Blck8Bcs.js} +4 -4
  73. package/dist/components/p-Blck8Bcs.js.map +1 -0
  74. package/dist/components/{p-D0DW7WaN.js → p-ByHRNvMZ.js} +3 -3
  75. package/dist/components/{p-D0DW7WaN.js.map → p-ByHRNvMZ.js.map} +1 -1
  76. package/dist/components/{p-Lm5wEjg5.js → p-C05AC9Oo.js} +3 -3
  77. package/dist/components/{p-Lm5wEjg5.js.map → p-C05AC9Oo.js.map} +1 -1
  78. package/dist/components/{p-CCycsGz-.js → p-CF2aDTBc.js} +4 -4
  79. package/dist/components/{p-CCycsGz-.js.map → p-CF2aDTBc.js.map} +1 -1
  80. package/dist/components/{p-DqTU9p1H.js → p-CRtNpnB8.js} +23 -23
  81. package/dist/components/{p-DqTU9p1H.js.map → p-CRtNpnB8.js.map} +1 -1
  82. package/dist/components/{p-4TFwsEyH.js → p-CZB1eeSS.js} +3 -3
  83. package/dist/components/{p-4TFwsEyH.js.map → p-CZB1eeSS.js.map} +1 -1
  84. package/dist/components/{p-GONArOts.js → p-CekZ56Hp.js} +3 -3
  85. package/dist/components/{p-GONArOts.js.map → p-CekZ56Hp.js.map} +1 -1
  86. package/dist/components/{p-DdWVjiOc.js → p-CjPPHFwZ.js} +3 -3
  87. package/dist/components/{p-DdWVjiOc.js.map → p-CjPPHFwZ.js.map} +1 -1
  88. package/dist/components/{p-Ddn7OFh6.js → p-Cok725Bi.js} +3 -3
  89. package/dist/components/{p-Ddn7OFh6.js.map → p-Cok725Bi.js.map} +1 -1
  90. package/dist/components/{p-2YQ61G9I.js → p-Cs7HqJ7u.js} +4 -4
  91. package/dist/components/{p-2YQ61G9I.js.map → p-Cs7HqJ7u.js.map} +1 -1
  92. package/dist/components/{p-BH-NeWHo.js → p-D6pAwX0V.js} +3 -3
  93. package/dist/components/{p-BH-NeWHo.js.map → p-D6pAwX0V.js.map} +1 -1
  94. package/dist/components/{p-CMYBbZIf.js → p-D80tLNpo.js} +8 -8
  95. package/dist/components/{p-CMYBbZIf.js.map → p-D80tLNpo.js.map} +1 -1
  96. package/dist/components/{p-CmT8m71G.js → p-DASjycch.js} +4 -4
  97. package/dist/components/{p-CmT8m71G.js.map → p-DASjycch.js.map} +1 -1
  98. package/dist/components/p-DKdNE-lT.js +191 -0
  99. package/dist/components/p-DKdNE-lT.js.map +1 -0
  100. package/dist/components/{p-c8B2BLMf.js → p-DbbFBnQl.js} +3 -3
  101. package/dist/components/{p-c8B2BLMf.js.map → p-DbbFBnQl.js.map} +1 -1
  102. package/dist/components/{p-hDljvFV5.js → p-DcBAJ-gA.js} +3 -3
  103. package/dist/components/{p-hDljvFV5.js.map → p-DcBAJ-gA.js.map} +1 -1
  104. package/dist/components/{p-CpcxmM9o.js → p-Drzrlmky.js} +3 -3
  105. package/dist/components/{p-CpcxmM9o.js.map → p-Drzrlmky.js.map} +1 -1
  106. package/dist/components/{p-CcXk4esK.js → p-DwiTuOmm.js} +3 -3
  107. package/dist/components/{p-CcXk4esK.js.map → p-DwiTuOmm.js.map} +1 -1
  108. package/dist/components/{p-Do_nkNrq.js → p-DzLGxevU.js} +3 -3
  109. package/dist/components/{p-Do_nkNrq.js.map → p-DzLGxevU.js.map} +1 -1
  110. package/dist/components/{p-DkowyBip.js → p-I7R8QIAX.js} +3 -3
  111. package/dist/components/{p-DkowyBip.js.map → p-I7R8QIAX.js.map} +1 -1
  112. package/dist/components/{p-Bh9O62dp.js → p-clfLpsrR.js} +3 -3
  113. package/dist/components/{p-Bh9O62dp.js.map → p-clfLpsrR.js.map} +1 -1
  114. package/dist/components/{p-Cef4ZiLB.js → p-jfGWG79j.js} +3 -3
  115. package/dist/components/{p-Cef4ZiLB.js.map → p-jfGWG79j.js.map} +1 -1
  116. package/dist/components/textarea-component.js +1 -1
  117. package/dist/components/tooltip-component.js +1 -1
  118. package/dist/esm/calendar-agenda-fill-icon_37.entry.js +1 -1
  119. package/dist/esm/calendar-agenda-fill-icon_37.entry.js.map +1 -1
  120. package/dist/esm/info-icon.tooltip-component.entry.js.map +1 -1
  121. package/dist/esm/info-icon_2.entry.js +150 -6
  122. package/dist/esm/info-icon_2.entry.js.map +1 -1
  123. package/dist/esm/loader.js +1 -1
  124. package/dist/esm/nylas-web-elements.js +1 -1
  125. package/dist/nylas-web-elements/info-icon.tooltip-component.entry.esm.js.map +1 -1
  126. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  127. package/dist/nylas-web-elements/p-3036b46c.entry.js +2 -0
  128. package/dist/nylas-web-elements/p-3036b46c.entry.js.map +1 -0
  129. package/dist/nylas-web-elements/{p-2c5fd494.entry.js → p-52c3551d.entry.js} +2 -2
  130. package/dist/nylas-web-elements/{p-2c5fd494.entry.js.map → p-52c3551d.entry.js.map} +1 -1
  131. package/dist/types/components/design-system/tooltip-component/toolitp-component.d.ts +25 -3
  132. package/dist/types/components.d.ts +8 -4
  133. package/package.json +2 -2
  134. package/dist/components/p-BsfPlCjP.js.map +0 -1
  135. package/dist/components/p-C6fgjGAL.js +0 -43
  136. package/dist/components/p-C6fgjGAL.js.map +0 -1
  137. package/dist/nylas-web-elements/p-4ebae0d7.entry.js +0 -2
  138. package/dist/nylas-web-elements/p-4ebae0d7.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"file":"p-Blck8Bcs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,iyNAAiyN;;;;;;;;;;;;;;;;MCen0N,mCAAmC,GAAAA,kBAAA,CAAA,MAAA,mCAAA,SAAAC,CAAA,CAAA;AANhD,IAAA,WAAA,GAAA;;;;;;AAgBU,QAAA,IAAI,CAAA,IAAA,GAAW,4BAA4B;AA8B3C,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAmB1B,QAAA,IAAmB,CAAA,mBAAA,GAMvB,EAAE;AAKE,QAAA,IAAgB,CAAA,gBAAA,GAA8B,EAAE;AAgc1D;IA9bC,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,yCAAyC,EAAE,mBAAmB,CAAC;;IAGvE,oBAAoB,GAAA;AAClB,QAAA,KAAK,CAAC,yCAAyC,EAAE,sBAAsB,CAAC;;IAG1E,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,yCAAyC,EAAE,mBAAmB,CAAC;QACrE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;;IAG3C,gBAAgB,GAAA;AACd,QAAA,KAAK,CAAC,yCAAyC,EAAE,kBAAkB,CAAC;AACpE,QAAA,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAC9B,YAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,qBAAqB,CAAC;;AAChD,aAAA,IAAI,IAAI,CAAC,yBAAyB,IAAI,IAAI,CAAC,yBAAyB,CAAC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A,EAAA,0CAAA,EAAA,EAAE,EAAC,6BAA6B,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAC,mBAAmB,EAAC,OAAO,EAAC,OAAO,EAAA,EAC5I,CAAA,CAAA,iBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAiB,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAG,CAAA,EACzCA,QAAO,CAAC,CAAC,CAAC,iEAAiE,CAAC,CAC5D,CACf,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;AAnHX,UAAA,CAAA;AATC,IAAA,iBAAiB,CAAyH;AACzI,QAAA,IAAI,EAAE,yCAAyC;QAC/C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAsHD,EAAA,mCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.scss?tag=nylas-specific-time-availability-picker&encapsulation=shadow","src/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n}\n\n.nylas-specific-time-availability-picker {\n display: flex;\n margin: 1rem;\n flex-direction: column;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n\n .content {\n padding: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n color: var(--nylas-base-900);\n font-size: 16px;\n font-family: var(--nylas-font-family);\n background: var(--nylas-base-25);\n }\n\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .specific-times {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n .empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 2rem 1rem;\n text-align: center;\n\n .empty-icon {\n margin-bottom: 1.5rem;\n opacity: 0.4;\n color: var(--nylas-base-400);\n }\n\n .empty-title {\n margin: 0 0 0.5rem 0;\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--nylas-base-700);\n line-height: 1.5;\n }\n\n .empty-subtitle {\n margin: 0;\n font-size: 0.875rem;\n color: var(--nylas-base-500);\n line-height: 1.5;\n max-width: 300px;\n }\n }\n\n .specific-time-entry {\n display: flex;\n flex-direction: column;\n gap: 0;\n padding: 12px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-0);\n\n &:last-of-type {\n margin-bottom: 1rem;\n }\n\n .entry-content {\n display: grid;\n grid-template-columns: 160px auto 30px 30px;\n gap: 12px;\n\n @media (max-width: 768px) {\n grid-template-areas:\n 'date calendar_toggle remove'\n 'time_or_unavailable time_or_unavailable time_or_unavailable';\n grid-template-columns: 1fr auto auto;\n grid-template-rows: 1fr 1fr;\n }\n }\n\n .date-input-container {\n flex: 0 0 auto;\n width: 160px;\n @media (max-width: 768px) {\n grid-area: date;\n }\n .date-input {\n width: 100%;\n }\n nylas-date-component::part(ic__date) {\n border: 1px solid var(--nylas-base-200);\n height: 50px;\n display: flex;\n align-items: center;\n }\n }\n\n .time-pickers {\n display: grid;\n grid-template-columns: auto 10px 1fr;\n width: 342px;\n gap: 14px;\n flex: 1;\n min-width: 0;\n\n @media (max-width: 768px) {\n flex: 1;\n width: auto;\n grid-area: time_or_unavailable;\n }\n\n .time-separator {\n font-size: 0.875rem;\n color: var(--nylas-base-600);\n font-weight: 500;\n flex-shrink: 0;\n line-height: 1;\n padding: 0 0px 0px 6px;\n margin-top: 18px;\n }\n }\n\n .unavailable-text {\n flex: 1;\n display: flex;\n align-items: center;\n padding: 0 15px;\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-50);\n min-height: 50px;\n @media (max-width: 768px) {\n grid-area: time_or_unavailable;\n }\n .unavailable-label {\n font-size: 0.875rem;\n color: var(--nylas-base-500);\n font-style: italic;\n }\n }\n\n .toggle-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 48px;\n padding-left: 8px;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--nylas-base-400);\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n @media (max-width: 768px) {\n grid-area: calendar_toggle;\n }\n &:hover {\n color: var(--nylas-primary);\n }\n\n &:focus {\n outline: none;\n }\n\n &.unavailable {\n color: var(--nylas-error);\n\n &:hover {\n color: var(--nylas-error);\n }\n }\n }\n\n .remove-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 48px;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--nylas-base-400);\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n @media (max-width: 768px) {\n grid-area: remove;\n }\n &:hover {\n color: var(--nylas-error);\n }\n\n &:focus {\n outline: none;\n background: var(--nylas-base-100);\n box-shadow: 0 0 0 2px var(--nylas-primary);\n }\n\n &:active {\n background: var(--nylas-base-200);\n }\n }\n\n .error-message {\n width: -webkit-fill-available;\n padding: 4px 8px;\n background: var(--nylas-error-50);\n color: var(--nylas-error);\n font-size: 12px;\n border-radius: 4px;\n border: 1px solid var(--nylas-error-200);\n margin-top: 8px;\n }\n }\n\n .add-button-container {\n display: flex;\n justify-content: flex-start;\n button-component {\n width: 100%;\n }\n }\n}\n\n// Override button-component styles for the add button\n::part(nstap__add-button) {\n border: 1px dashed var(--nylas-base-200);\n background: var(--nylas-base-0);\n color: var(--nylas-base-700);\n\n &:hover {\n border-color: var(--nylas-primary);\n background: var(--nylas-base-50);\n color: var(--nylas-primary);\n }\n}\n\n// Custom styling for time picker components\n::part(nstap__time-picker-container) {\n flex: 1;\n min-width: 0;\n}\n\n::part(nstap__time-picker-input) {\n width: 100%;\n font-size: 0.875rem;\n min-height: 50px;\n display: flex;\n align-items: center;\n}\n\n// Custom styling for date input component\n::part(nstap__date-input) {\n width: 100%;\n}\n\n::part(nstap__date-field) {\n width: 100%;\n font-size: 0.875rem;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 0.5rem 0.75rem;\n\n &:focus {\n border-color: var(--nylas-primary);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n}\n\n::part(nstap__date-wrapper) {\n margin: 0;\n}\n\n::part(nstap__date-label) {\n margin: 0;\n padding: 0;\n\n p {\n display: none; // Hide label since we don't need it\n }\n}\n","import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop, Watch, State, Listen } from '@stencil/core';\nimport { RegisterComponent } from '@/common/register-component';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { Configuration, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { debug, convertTo12HourFormat, convertTo24HourFormat, timeToMinutes } from '@/utils/utils';\nimport i18next from '@/utils/i18n';\n\n@Component({\n tag: 'nylas-specific-time-availability-picker',\n styleUrl: 'nylas-specific-time-availability-picker.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasSpecificTimeAvailabilityPicker {\n /**\n * The element <nylas-specific-time-availability-picker> itself.\n */\n @Element() host!: HTMLNylasSpecificTimeAvailabilityPickerElement;\n\n /**\n * @standalone\n * The name of the specific date availability picker.\n */\n @Prop() name: string = 'specific-time-availability';\n\n /**\n * @standalone\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * @standalone\n * The specific date open hours.\n */\n @Prop() specificTimesAvailability?: SpecificTimeAvailability[];\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * @standalone\n * Hide the header of the specific time availability picker.\n */\n @Prop() hideHeader: boolean = false;\n\n /**\n * @standalone\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The event is fired when the specific date open hours change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * Internal state for managing specific date entries\n */\n @State() specificDateEntries: Array<{\n id: string;\n date: string;\n startTime: string;\n endTime: string;\n isUnavailable: boolean;\n }> = [];\n\n /**\n * State for tracking validation errors\n */\n @State() validationErrors: { [key: string]: string } = {};\n\n connectedCallback() {\n debug('nylas-specific-time-availability-picker', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-specific-time-availability-picker', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-specific-time-availability-picker', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-specific-time-availability-picker', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.configChangedHandler(this.selectedConfiguration);\n } else if (this.specificTimesAvailability && this.specificTimesAvailability.length > 0) {\n this.loadSpecificTimeAvailability();\n }\n this.applyThemeConfig(this.themeConfig);\n }\n\n get isInternalsAvailable() {\n return typeof this.internals.setFormValue === 'function';\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-specific-time-availability-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n debug('nylas-specific-time-availability-picker', 'configChangedHandler', newConfig);\n // Load specific date open hours from the configuration participants\n this.loadSpecificTimeAvailability();\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n loadSpecificTimeAvailability() {\n if (!this.specificTimesAvailability || this.specificTimesAvailability.length === 0) {\n return;\n }\n\n const entries = this.specificTimesAvailability.map((item, index) => {\n // Check if both start and end are \"00:00\" - this indicates an unavailable day\n const isUnavailable = item.start === '00:00' && item.end === '00:00';\n\n return {\n id: `specific-time-${index}`,\n date: item.date,\n startTime: isUnavailable ? '09:00am' : convertTo12HourFormat(item.start),\n endTime: isUnavailable ? '05:00pm' : convertTo12HourFormat(item.end),\n isUnavailable,\n };\n });\n\n this.specificDateEntries = entries;\n this.emitValueChanged();\n }\n\n addSpecificTimeAvailability() {\n // Initialize with incremental dates based on existing entries\n // First entry: today, second entry: tomorrow, third entry: day after, etc.\n const today = new Date();\n const targetDate = new Date(today);\n targetDate.setDate(today.getDate() + this.specificDateEntries.length);\n const formattedDate = targetDate.toISOString().split('T')[0];\n\n const newEntry = {\n id: `specific-time-${Date.now()}`,\n date: formattedDate,\n startTime: '09:00am',\n endTime: '05:00pm',\n isUnavailable: false,\n };\n\n this.specificDateEntries = [...this.specificDateEntries, newEntry];\n\n // Clear any global validation errors since we're adding a new valid entry\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n\n this.emitValueChanged();\n }\n\n removeSpecificTimeAvailability(id: string) {\n this.specificDateEntries = this.specificDateEntries.filter(entry => entry.id !== id);\n\n // Clear validation error for the removed entry\n if (this.validationErrors[id]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[id];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n\n toggleAvailability(id: string) {\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === id) {\n return { ...entry, isUnavailable: !entry.isUnavailable };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry since availability state changed\n if (this.validationErrors[id]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[id];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n\n /**\n * Validates a single date entry\n */\n validateEntry(entry: (typeof this.specificDateEntries)[0]): string | null {\n // Check if date is empty or invalid\n if (!entry.date) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.dateRequired');\n }\n\n const dateObj = new Date(entry.date);\n if (isNaN(dateObj.getTime())) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.invalidDateFormat');\n }\n\n // If unavailable, no need to validate times\n if (entry.isUnavailable) {\n return null;\n }\n\n // Validate start and end times are present\n if (!entry.startTime || !entry.endTime) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.timesRequired');\n }\n\n // Validate start time is before end time\n const startMinutes = timeToMinutes(entry.startTime);\n const endMinutes = timeToMinutes(entry.endTime);\n\n if (startMinutes >= endMinutes) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.startTimeBeforeEndTime');\n }\n\n return null;\n }\n\n /**\n * Validates all entries and updates validation state\n */\n validateAllEntries() {\n const errors: { [key: string]: string } = {};\n let hasErrors = false;\n\n this.specificDateEntries.forEach(entry => {\n const error = this.validateEntry(entry);\n if (error) {\n errors[entry.id] = error;\n hasErrors = true;\n }\n });\n\n this.validationErrors = errors;\n\n // Update form validity\n if (hasErrors) {\n const firstErrorElement = this.host.shadowRoot?.querySelector(`[data-entry-id=\"${Object.keys(errors)[0]}\"]`) as HTMLElement;\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, 'Please fix validation errors', firstErrorElement);\n }\n } else {\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n }\n\n return !hasErrors;\n }\n\n @Listen('timeChange')\n handleTimeChange(event: CustomEvent<{ key: string; value: string }>) {\n const { key, value } = event.detail;\n const [entryId, timeType] = key.split('_');\n\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === entryId) {\n return {\n ...entry,\n [timeType === 'start' ? 'startTime' : 'endTime']: value,\n };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry\n if (this.validationErrors[entryId]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n }\n\n // Clear form validity errors related to time\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n\n this.emitValueChanged();\n }\n\n @Listen('timeWindowFormError')\n setFormError(event: CustomEvent<{ key: string; message: string }>) {\n const { key, message } = event.detail;\n const [entryId] = key.split('_');\n\n if (message) {\n // Set validation error for this entry\n this.validationErrors = {\n ...this.validationErrors,\n [entryId]: message,\n };\n\n const element = this.host.shadowRoot?.getElementById(key);\n if (element && this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, message, element as HTMLInputElement);\n }\n } else {\n // Clear validation error for this entry\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n }\n }\n\n @Listen('nylasFormInputChanged')\n handleFormInputChange(event: CustomEvent<{ value: string; name: string; label: string; type: string; error: string }>) {\n const { name, value } = event.detail;\n\n // Check if this is a date input for our component\n if (name.startsWith('date-') && name.includes('specific-time-')) {\n const entryId = name.replace('date-', '');\n\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === entryId) {\n return { ...entry, date: value };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry\n if (this.validationErrors[entryId]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n }\n\n emitValueChanged() {\n // Validate all entries before emitting\n const isValid = this.validateAllEntries();\n\n const specificTimesAvailability = this.specificDateEntries\n .filter(entry => entry.date && (entry.isUnavailable || (entry.startTime && entry.endTime)))\n .map(entry => ({\n date: entry.date,\n start: entry.isUnavailable ? '00:00' : convertTo24HourFormat(entry.startTime),\n end: entry.isUnavailable ? '00:00' : convertTo24HourFormat(entry.endTime),\n }));\n\n const value = JSON.stringify(specificTimesAvailability);\n\n if (this.isInternalsAvailable && isValid) {\n this.internals.setFormValue(value, this.name);\n }\n\n this.valueChanged.emit({\n value,\n name: this.name,\n });\n }\n\n @RegisterComponent<NylasSpecificTimeAvailabilityPicker, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-specific-time-availability-picker',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-specific-time-availability-picker\" part=\"nstap\">\n {!this.hideHeader && (\n <div class=\"header\" part=\"nstap__header\">\n <h3>{i18next.t('nylasSpecificTimeAvailabilityPicker.headerTitle')}</h3>\n <p>\n {i18next.t('nylasSpecificTimeAvailabilityPicker.headerDescription')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasSpecificTimeAvailabilityPicker.tooltip.desc')}</span>\n </tooltip-component>\n </p>\n </div>\n )}\n <div class=\"content\" part=\"nstap__content\">\n <div class=\"specific-times\" part=\"nstap__specific-times\">\n {this.specificDateEntries.length === 0 ? (\n <div class=\"empty-state\" part=\"nstap__empty-state\">\n <div class=\"empty-icon\" part=\"nstap__empty-icon\">\n <calendar-icon width=\"32\" height=\"32\" />\n </div>\n <h3 class=\"empty-title\" part=\"nstap__empty-title\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')}\n </h3>\n <p class=\"empty-subtitle\" part=\"nstap__empty-subtitle\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')}\n </p>\n </div>\n ) : (\n this.specificDateEntries.map(entry => (\n <div class=\"specific-time-entry\" part=\"nstap__specific-time-entry\" key={entry.id} data-entry-id={entry.id}>\n <div class=\"entry-content\" part=\"nstap__entry-content\">\n <div class=\"date-input-container\" part=\"nstap__date-input-container\">\n <nylas-date-component\n name={`date-${entry.id}`}\n defaultValue={entry.date}\n placeholder=\"yyyy-mm-dd\"\n part=\"nstap__date-input\"\n class=\"date-input\"\n themeConfig={this.themeConfig}\n exportparts=\"ic__date: nstap__date-field, ic__input_wrapper: nstap__date-wrapper, ic__label: nstap__date-label\"\n />\n </div>\n {entry.isUnavailable ? (\n <div class=\"unavailable-text\" part=\"nstap__unavailable-text\">\n <span class=\"unavailable-label\">{i18next.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')}</span>\n </div>\n ) : (\n <div class=\"time-pickers\" part=\"nstap__time-pickers\">\n <nylas-time-window-picker\n id={`${entry.id}_start`}\n time={entry.startTime}\n name={`${entry.id}_start`}\n key={`${entry.id}_start`}\n language={this.selectedLanguage}\n hasError={!!this.validationErrors[entry.id]}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times\"\n />\n <span class=\"time-separator\">-</span>\n <nylas-time-window-picker\n id={`${entry.id}_end`}\n time={entry.endTime}\n name={`${entry.id}_end`}\n key={`${entry.id}_end`}\n minimumStartTime={entry.startTime}\n language={this.selectedLanguage}\n hasError={!!this.validationErrors[entry.id]}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times\"\n />\n </div>\n )}\n <button\n type=\"button\"\n class={{ 'toggle-button': true, 'unavailable': entry.isUnavailable }}\n part=\"nstap__toggle-button\"\n onClick={() => this.toggleAvailability(entry.id)}\n title={\n entry.isUnavailable\n ? i18next.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')\n : i18next.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable')\n }\n >\n <calendar-icon width=\"20\" height=\"20\" />\n </button>\n <button\n type=\"button\"\n class=\"remove-button\"\n part=\"nstap__remove-button\"\n onClick={() => this.removeSpecificTimeAvailability(entry.id)}\n aria-label=\"Remove specific date\"\n >\n <close-icon width=\"16\" height=\"16\" />\n </button>\n </div>\n {this.validationErrors[entry.id] && (\n <div class=\"error-message\" part=\"nstap__error-message\">\n {this.validationErrors[entry.id]}\n </div>\n )}\n </div>\n ))\n )}\n </div>\n <div class=\"add-button-container\" part=\"nstap__add-button-container\">\n <button-component id=\"add-specific-time-open-hour\" onClick={() => this.addSpecificTimeAvailability()} part=\"nstap__add-button\" variant=\"basic\">\n <add-circle-icon width=\"24\" height=\"24\" />\n {i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability')}\n </button-component>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -10,7 +10,7 @@ import { d as defineCustomElement$6 } from './p-AMYgy5xP.js';
10
10
  import { d as defineCustomElement$5 } from './p-Bq0LsxvJ.js';
11
11
  import { d as defineCustomElement$4 } from './p-ClTk9Ttz.js';
12
12
  import { d as defineCustomElement$3 } from './p-D7lRYhTx.js';
13
- import { d as defineCustomElement$2 } from './p-C6fgjGAL.js';
13
+ import { d as defineCustomElement$2 } from './p-DKdNE-lT.js';
14
14
  import { d as defineCustomElement$1 } from './p-BzYcGDVo.js';
15
15
 
16
16
  const nylasEventLocationCss = ":host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}@media screen and (max-width: 768px){.nylas-event-location div.location-input{grid-template-columns:1fr}}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;background-color:var(--nylas-base-0);color:var(--nylas-base-900)}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
@@ -397,6 +397,6 @@ function defineCustomElement() {
397
397
  }
398
398
 
399
399
  export { NylasEventLocation as N, defineCustomElement as d };
400
- //# sourceMappingURL=p-D0DW7WaN.js.map
400
+ //# sourceMappingURL=p-ByHRNvMZ.js.map
401
401
 
402
- //# sourceMappingURL=p-D0DW7WaN.js.map
402
+ //# sourceMappingURL=p-ByHRNvMZ.js.map
@@ -1 +1 @@
1
- {"file":"p-D0DW7WaN.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,k6HAAk6H;;;;;;;;;;;;;;;;MC0Bn7H,kBAAkB,GAAAA,kBAAA,CAAA,MAAA,kBAAA,SAAAC,CAAA,CAAA;AAN/B,IAAA,WAAA,GAAA;;;;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAW,UAAU;QAiDxB,IAAA,CAAA,QAAQ,GAAW,IAAI,CAAC,aAAa,IAAI,EAAE;QAI3C,IAAA,CAAA,OAAO,GAAW,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE;AAQ9F,QAAA,IAAA,CAAA,iBAAiB,GAAW,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,WAAW,EAAE,QAAQ,IAAI,EAAE;QAKjF,IAAA,CAAA,eAAe,GAAG;YACzB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAEC,QAAO,CAAC,CAAC,CAAC,2CAA2C,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YACtH,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAEA,QAAO,CAAC,CAAC,CAAC,6CAA6C,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,E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A,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption!: string;\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? this.currentUser?.provider ?? '';\n\n /**\n * The state to store location options.\n */\n @State() locationOptions = [\n { value: 'none', label: i18next.t('nylasEventLocation.conferenceOptions.none'), labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: i18next.t('nylasEventLocation.conferenceOptions.custom'), labelHTML: this.getLabelHTML('custom') },\n ];\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-location', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const configLocation = newValue?.event_booking?.location || this.eventLocation;\n const configConferencing = newValue?.event_booking?.conferencing || this.eventConferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n @Watch('currentUser')\n currentUserChangedHandler(newValue: User) {\n debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);\n if (newValue?.provider) {\n this.userProviderState = newValue?.provider;\n this.setLocationOptionsForProvider(this.userProviderState);\n }\n }\n\n @Watch('conferenceProviders')\n conferenceProvidersChanged(newValue: Record<string, string>) {\n if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const locOptionValues = this.locationOptions.map(option => option.value);\n locOptionValues.forEach(option => {\n const index = this.locationOptions.findIndex(i => i.value === option);\n this.locationOptions[index].label = i18next.t(`nylasEventLocation.conferenceOptions.${option}`);\n this.locationOptions[index].labelHTML = this.getLabelHTML(option);\n });\n this.locationOptions = [...this.locationOptions];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration?.event_booking) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');\n this.location = this.eventLocation ?? '';\n }\n\n this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';\n this.setLocationOptionsForProvider(this.userProviderState);\n const formElement = this.internals?.form;\n // Set the initial form value\n if (formElement) {\n const formData = new FormData(formElement);\n formData.set('conference', this.getConferencePayload());\n formData.set(this.name, this.location);\n }\n\n if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n getConferencePayload() {\n if (this.selectedLocationOption === 'custom' || this.selectedLocationOption === 'none') {\n return JSON.stringify(null);\n }\n const grantId = this.conferenceProviders?.[this.selectedLocationOption];\n const payload = {\n provider: PROVIDER_CONFERENCE_MAP[this.selectedLocationOption],\n autocreate: grantId\n ? {\n conf_grant_id: grantId,\n }\n : {},\n };\n return JSON.stringify(payload);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none': {\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'custom': {\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'google': {\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'microsoft': {\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'zoom': {\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n }\n\n setLocationOptionsForProvider(provider: string) {\n switch (provider) {\n case 'google':\n if (!this.locationOptions.some(option => option.value === 'google')) {\n this.locationOptions.push({ value: 'google', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('google') });\n }\n break;\n case 'microsoft':\n if (!this.locationOptions.some(option => option.value === 'microsoft')) {\n this.locationOptions.push({ value: 'microsoft', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('microsoft') });\n }\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference | null, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {i18next.t(`nylasEventLocation.conferenceOptions.${location}`)}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n {i18next.t('nylasEventLocation.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventLocation.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {/* {defaultOption && defaultOption?.label && ( */}\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={this.locationOptions}\n defaultSelectedOption={defaultOption}\n themeConfig={this.themeConfig}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n {/* )} */}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-ByHRNvMZ.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,k6HAAk6H;;;;;;;;;;;;;;;;MC0Bn7H,kBAAkB,GAAAA,kBAAA,CAAA,MAAA,kBAAA,SAAAC,CAAA,CAAA;AAN/B,IAAA,WAAA,GAAA;;;;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAW,UAAU;QAiDxB,IAAA,CAAA,QAAQ,GAAW,IAAI,CAAC,aAAa,IAAI,EAAE;QAI3C,IAAA,CAAA,OAAO,GAAW,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE;AAQ9F,QAAA,IAAA,CAAA,iBAAiB,GAAW,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,WAAW,EAAE,QAAQ,IAAI,EAAE;QAKjF,IAAA,CAAA,eAAe,GAAG;YACzB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAEC,QAAO,CAAC,CAAC,CAAC,2CAA2C,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YACtH,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAEA,QAAO,CAAC,CAAC,CAAC,6CAA6C,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;SAC7H;AAgVF;AAnUC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,sBAAs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;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption!: string;\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? this.currentUser?.provider ?? '';\n\n /**\n * The state to store location options.\n */\n @State() locationOptions = [\n { value: 'none', label: i18next.t('nylasEventLocation.conferenceOptions.none'), labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: i18next.t('nylasEventLocation.conferenceOptions.custom'), labelHTML: this.getLabelHTML('custom') },\n ];\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-location', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const configLocation = newValue?.event_booking?.location || this.eventLocation;\n const configConferencing = newValue?.event_booking?.conferencing || this.eventConferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n @Watch('currentUser')\n currentUserChangedHandler(newValue: User) {\n debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);\n if (newValue?.provider) {\n this.userProviderState = newValue?.provider;\n this.setLocationOptionsForProvider(this.userProviderState);\n }\n }\n\n @Watch('conferenceProviders')\n conferenceProvidersChanged(newValue: Record<string, string>) {\n if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const locOptionValues = this.locationOptions.map(option => option.value);\n locOptionValues.forEach(option => {\n const index = this.locationOptions.findIndex(i => i.value === option);\n this.locationOptions[index].label = i18next.t(`nylasEventLocation.conferenceOptions.${option}`);\n this.locationOptions[index].labelHTML = this.getLabelHTML(option);\n });\n this.locationOptions = [...this.locationOptions];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration?.event_booking) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');\n this.location = this.eventLocation ?? '';\n }\n\n this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';\n this.setLocationOptionsForProvider(this.userProviderState);\n const formElement = this.internals?.form;\n // Set the initial form value\n if (formElement) {\n const formData = new FormData(formElement);\n formData.set('conference', this.getConferencePayload());\n formData.set(this.name, this.location);\n }\n\n if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n getConferencePayload() {\n if (this.selectedLocationOption === 'custom' || this.selectedLocationOption === 'none') {\n return JSON.stringify(null);\n }\n const grantId = this.conferenceProviders?.[this.selectedLocationOption];\n const payload = {\n provider: PROVIDER_CONFERENCE_MAP[this.selectedLocationOption],\n autocreate: grantId\n ? {\n conf_grant_id: grantId,\n }\n : {},\n };\n return JSON.stringify(payload);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none': {\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'custom': {\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'google': {\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'microsoft': {\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'zoom': {\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n }\n\n setLocationOptionsForProvider(provider: string) {\n switch (provider) {\n case 'google':\n if (!this.locationOptions.some(option => option.value === 'google')) {\n this.locationOptions.push({ value: 'google', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('google') });\n }\n break;\n case 'microsoft':\n if (!this.locationOptions.some(option => option.value === 'microsoft')) {\n this.locationOptions.push({ value: 'microsoft', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('microsoft') });\n }\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference | null, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {i18next.t(`nylasEventLocation.conferenceOptions.${location}`)}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n {i18next.t('nylasEventLocation.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventLocation.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {/* {defaultOption && defaultOption?.label && ( */}\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={this.locationOptions}\n defaultSelectedOption={defaultOption}\n themeConfig={this.themeConfig}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n {/* )} */}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -6,7 +6,7 @@ import { d as defineCustomElement$5 } from './p-7S1M5IE9.js';
6
6
  import { d as defineCustomElement$4 } from './p-Dl0kJKrG.js';
7
7
  import { d as defineCustomElement$3 } from './p-ClTk9Ttz.js';
8
8
  import { d as defineCustomElement$2 } from './p-D7lRYhTx.js';
9
- import { d as defineCustomElement$1 } from './p-C6fgjGAL.js';
9
+ import { d as defineCustomElement$1 } from './p-DKdNE-lT.js';
10
10
 
11
11
  const nylasTimeslotIntervalCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-timeslot-interval{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-timeslot-interval .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px;background-color:var(--nylas-base-25)}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label tooltip-component{display:flex}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown{margin-bottom:1.5rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
12
12
 
@@ -254,6 +254,6 @@ function defineCustomElement() {
254
254
  }
255
255
 
256
256
  export { NylasTimeslotInterval as N, defineCustomElement as d };
257
- //# sourceMappingURL=p-Lm5wEjg5.js.map
257
+ //# sourceMappingURL=p-C05AC9Oo.js.map
258
258
 
259
- //# sourceMappingURL=p-Lm5wEjg5.js.map
259
+ //# sourceMappingURL=p-C05AC9Oo.js.map
@@ -1 +1 @@
1
- {"file":"p-Lm5wEjg5.js","mappings":";;;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,m6HAAm6H;;;;;;;;;;;;;;;;ACSp8H,MAAM,qBAAqB,GAAG,EAAE;MAkBnB,qBAAqB,GAAAA,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AANlC,IAAA,WAAA,GAAA;;;;;;AAiBU,QAAA,IAAI,CAAA,IAAA,GAAW,mBAAmB;QAMlC,IAAoB,CAAA,oBAAA,GAAY,IAAI,CAAC,qBAAqB,EAAE,YAAY,EAAE,gBAAgB;AAmCzF,QA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AAW,EAAEA,QAAO,CAAC,CAAC,CAAC,+DAA+D,CAAC;AACxF,iBAAA;AACD,gBAAA;AACE,oBAAA,KAAK,EAAE,UAAU;AACjB,oBAAA,KAAK,EAAEA,QAAO,CAAC,CAAC,CAAC,8DAA8D,CAAC;AAChF,oBAAA,WAAW,EAAEA,QAAO,CAAC,CAAC,CAAC,6DAA6D,CAAC;AACtF,iBAAA;AACF,aAAA,EACD,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,CAAA,CACH,CACG,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;AApEX,UAAA,CAAA;AATC,IAAA,iBAAiB,CAA2G;AAC3H,QAAA,IAAI,EAAE,yBAAyB;QAC/B,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAuED,EAAA,qBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.scss?tag=nylas-timeslot-interval&encapsulation=shadow","src/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-timeslot-interval {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n }\n }\n\n .nylas-timeslot-interval__dropdown {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 4px;\n background-color: var(--nylas-base-25);\n\n span.label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n\n tooltip-component {\n display: flex;\n }\n }\n\n select-dropdown {\n margin-bottom: 1.5rem;\n }\n\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: unset;\n }\n\n select-dropdown::part(sd_dropdown-button) {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1rem;\n }\n\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: calc(100% - 2rem);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\nconst defaultRoundToMinutes = 15;\n/**\n * The `nylas-timeslot-interval` component allows users to set their time slot interval preferences.\n * This component provides an option to set both `interval_minutes` and `round_to` in the configuration.\n *\n * @part nti - The timeslot interval container\n * @part nti__header - The header of the timeslot interval picker\n * @part nti__input-label - The input label of the timeslot interval picker\n * @part nti__dropdown - The dropdown container\n * @part nti__dropdown-button - The dropdown button\n * @part nti__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-timeslot-interval',\n styleUrl: 'nylas-timeslot-interval.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasTimeslotInterval {\n @Element() host!: HTMLNylasTimeslotIntervalElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the calendar picker.\n */\n @Prop() name: string = 'timeslot-interval';\n\n /**\n * @standalone\n * The event duration in minutes.\n */\n @Prop() eventDurationMinutes?: number = this.selectedConfiguration?.availability?.duration_minutes;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The internal event duration minutes state.\n */\n @State() internalEventDurationMinutes!: number;\n\n /**\n * The selected interval minutes.\n */\n @State() selectedInterval!: number;\n\n /**\n * The selected round to minutes.\n */\n @State() selectedRoundTo!: boolean;\n\n /***\n * The state to store that component is ready to render.\n */\n @State() componentLoaded: boolean = false;\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-timeslot-interval', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-timeslot-interval', 'selectedConfigurationChangedHandler', newValue);\n this.internalEventDurationMinutes = newValue?.availability?.duration_minutes ?? this.eventDurationMinutes ?? 30;\n const internalIntervalMinutes = newValue?.availability?.interval_minutes ?? this.internalEventDurationMinutes ?? 30;\n this.selectedInterval = newValue?.availability?.interval_minutes ?? internalIntervalMinutes ?? 10;\n const roundToMinutes = newValue?.availability?.round_to || null;\n this.selectedRoundTo = roundToMinutes && roundToMinutes === internalIntervalMinutes ? true : false;\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-timeslot-interval', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-timeslot-interval', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-timeslot-interval', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-timeslot-interval', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.internalEventDurationMinutes = this.eventDurationMinutes ?? 30;\n const internalIntervalMinutes = this.internalEventDurationMinutes;\n this.selectedInterval = internalIntervalMinutes ?? 10;\n this.selectedRoundTo = false;\n }\n this.componentLoaded = true;\n }\n\n componentWillUpdate() {\n debug('nylas-timeslot-interval', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-timeslot-interval', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-timeslot-interval', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-timeslot-interval', 'componentDidRender');\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-timeslot-interval', 'nylasFormDropdownChangedHandler', event.detail);\n const value = event.detail.value;\n if (value === 'duration') {\n this.selectedInterval = this.internalEventDurationMinutes ?? 10;\n } else {\n this.selectedInterval = parseInt(event.detail.value);\n }\n\n this.valueChanged.emit({\n value: JSON.stringify({\n interval: this.selectedInterval,\n roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes,\n }),\n name: this.name,\n });\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes }), this.name);\n }\n }\n\n @Listen('nylasFormRadioChanged')\n nylasFormRadioChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-timeslot-interval', 'nylasFormRadioChangedHandler', event.detail);\n const value = event.detail.value;\n if (value === 'no-rounding') {\n this.selectedRoundTo = false;\n } else {\n this.selectedRoundTo = true;\n }\n\n this.valueChanged.emit({\n value: JSON.stringify({\n interval: this.selectedInterval,\n roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes,\n }),\n name: this.name,\n });\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes }), this.name);\n }\n }\n\n @RegisterComponent<NylasTimeslotInterval, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-timeslot-interval',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n const intervalPreferenceOptions = [\n { value: 'duration', label: i18next.t('nylasTimeslotInterval.lengthOfMeeting') },\n { value: '5', label: `5 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '10', label: `10 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '15', label: `15 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '20', label: `20 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '30', label: `30 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '45', label: `45 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '60', label: `60 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n ];\n\n const defaultSelectedInterval =\n typeof this.selectedInterval !== 'undefined'\n ? this.selectedInterval == this.internalEventDurationMinutes\n ? intervalPreferenceOptions[0]\n : intervalPreferenceOptions.find(op => op.value == this.selectedInterval.toString()) ?? intervalPreferenceOptions[0]\n : undefined;\n\n return (\n <Host>\n <div class=\"nylas-timeslot-interval\" part=\"nti\">\n <div class=\"header\" part=\"nti__header\">\n <h3>{i18next.t('nylasTimeslotInterval.headerTitle')}</h3>\n </div>\n\n <div class=\"nylas-timeslot-interval__dropdown\">\n <span class=\"label\" part=\"nti__input-label\">\n {i18next.t('nylasTimeslotInterval.timeslotInterval.label')}\n </span>\n {defaultSelectedInterval?.label && (\n <select-dropdown\n name=\"interval-minutes\"\n options={intervalPreferenceOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content\"\n defaultSelectedOption={defaultSelectedInterval}\n themeConfig={this.themeConfig}\n />\n )}\n <span slot=\"label\" class=\"label\" part=\"nti__input-label\">\n {i18next.t('nylasTimeslotInterval.timeslotRounding.label')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasTimeslotInterval.timeslotRounding.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n {this.componentLoaded && (\n <radio-button-group\n name=\"interval-preference\"\n defaultSelectedValue={this.selectedRoundTo ? 'rounding' : 'no-rounding'}\n options={[\n {\n value: 'no-rounding',\n label: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.noRounding.label'),\n description: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.noRounding.desc'),\n },\n {\n value: 'rounding',\n label: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.rounding.label'),\n description: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.rounding.desc'),\n },\n ]}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-C05AC9Oo.js","mappings":";;;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,m6HAAm6H;;;;;;;;;;;;;;;;ACSp8H,MAAM,qBAAqB,GAAG,EAAE;MAkBnB,qBAAqB,GAAAA,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AANlC,IAAA,WAAA,GAAA;;;;;;AAiBU,QAAA,IAAI,CAAA,IAAA,GAAW,mBAAmB;QAMlC,IAAoB,CAAA,oBAAA,GAAY,IAAI,CAAC,qBAAqB,EAAE,YAAY,EAAE,gBAAgB;AAmCzF,QAAA,IAAe,CAAA,eAAA,GAAY,KAAK;AA4N1C;AA5MC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,yBAAyB,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QACvE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAI1C,IAAA,mCAAmC,CAAC,QAAuB,EAAA;AACzD,QAAA,KAAK,CAAC,yBAAyB,EAAE,qCAAqC,EAAE,QAAQ,CAAC;AACjF,QAAA,IAAI,CAAC,4BAA4B,GAAG,QAAQ,EAAE,YAAY,EAAE,gBAAgB,IAAI,IAAI,CAAC,oBAAoB,IAAI,EAAE;AAC/G,QAAA,MAAM,uBAAuB,GAAG,QAAQ,EAAE,YAAY,EAAE,gBAAgB,IAAI,IAAI,CAAC,4BAA4B,IAAI,EAAE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,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAuED,EAAA,qBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.scss?tag=nylas-timeslot-interval&encapsulation=shadow","src/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-timeslot-interval {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n }\n }\n\n .nylas-timeslot-interval__dropdown {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 4px;\n background-color: var(--nylas-base-25);\n\n span.label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n\n tooltip-component {\n display: flex;\n }\n }\n\n select-dropdown {\n margin-bottom: 1.5rem;\n }\n\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: unset;\n }\n\n select-dropdown::part(sd_dropdown-button) {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1rem;\n }\n\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: calc(100% - 2rem);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\nconst defaultRoundToMinutes = 15;\n/**\n * The `nylas-timeslot-interval` component allows users to set their time slot interval preferences.\n * This component provides an option to set both `interval_minutes` and `round_to` in the configuration.\n *\n * @part nti - The timeslot interval container\n * @part nti__header - The header of the timeslot interval picker\n * @part nti__input-label - The input label of the timeslot interval picker\n * @part nti__dropdown - The dropdown container\n * @part nti__dropdown-button - The dropdown button\n * @part nti__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-timeslot-interval',\n styleUrl: 'nylas-timeslot-interval.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasTimeslotInterval {\n @Element() host!: HTMLNylasTimeslotIntervalElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the calendar picker.\n */\n @Prop() name: string = 'timeslot-interval';\n\n /**\n * @standalone\n * The event duration in minutes.\n */\n @Prop() eventDurationMinutes?: number = this.selectedConfiguration?.availability?.duration_minutes;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The internal event duration minutes state.\n */\n @State() internalEventDurationMinutes!: number;\n\n /**\n * The selected interval minutes.\n */\n @State() selectedInterval!: number;\n\n /**\n * The selected round to minutes.\n */\n @State() selectedRoundTo!: boolean;\n\n /***\n * The state to store that component is ready to render.\n */\n @State() componentLoaded: boolean = false;\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-timeslot-interval', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-timeslot-interval', 'selectedConfigurationChangedHandler', newValue);\n this.internalEventDurationMinutes = newValue?.availability?.duration_minutes ?? this.eventDurationMinutes ?? 30;\n const internalIntervalMinutes = newValue?.availability?.interval_minutes ?? this.internalEventDurationMinutes ?? 30;\n this.selectedInterval = newValue?.availability?.interval_minutes ?? internalIntervalMinutes ?? 10;\n const roundToMinutes = newValue?.availability?.round_to || null;\n this.selectedRoundTo = roundToMinutes && roundToMinutes === internalIntervalMinutes ? true : false;\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-timeslot-interval', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-timeslot-interval', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-timeslot-interval', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-timeslot-interval', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.internalEventDurationMinutes = this.eventDurationMinutes ?? 30;\n const internalIntervalMinutes = this.internalEventDurationMinutes;\n this.selectedInterval = internalIntervalMinutes ?? 10;\n this.selectedRoundTo = false;\n }\n this.componentLoaded = true;\n }\n\n componentWillUpdate() {\n debug('nylas-timeslot-interval', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-timeslot-interval', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-timeslot-interval', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-timeslot-interval', 'componentDidRender');\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-timeslot-interval', 'nylasFormDropdownChangedHandler', event.detail);\n const value = event.detail.value;\n if (value === 'duration') {\n this.selectedInterval = this.internalEventDurationMinutes ?? 10;\n } else {\n this.selectedInterval = parseInt(event.detail.value);\n }\n\n this.valueChanged.emit({\n value: JSON.stringify({\n interval: this.selectedInterval,\n roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes,\n }),\n name: this.name,\n });\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes }), this.name);\n }\n }\n\n @Listen('nylasFormRadioChanged')\n nylasFormRadioChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-timeslot-interval', 'nylasFormRadioChangedHandler', event.detail);\n const value = event.detail.value;\n if (value === 'no-rounding') {\n this.selectedRoundTo = false;\n } else {\n this.selectedRoundTo = true;\n }\n\n this.valueChanged.emit({\n value: JSON.stringify({\n interval: this.selectedInterval,\n roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes,\n }),\n name: this.name,\n });\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes }), this.name);\n }\n }\n\n @RegisterComponent<NylasTimeslotInterval, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-timeslot-interval',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n const intervalPreferenceOptions = [\n { value: 'duration', label: i18next.t('nylasTimeslotInterval.lengthOfMeeting') },\n { value: '5', label: `5 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '10', label: `10 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '15', label: `15 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '20', label: `20 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '30', label: `30 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '45', label: `45 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '60', label: `60 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n ];\n\n const defaultSelectedInterval =\n typeof this.selectedInterval !== 'undefined'\n ? this.selectedInterval == this.internalEventDurationMinutes\n ? intervalPreferenceOptions[0]\n : intervalPreferenceOptions.find(op => op.value == this.selectedInterval.toString()) ?? intervalPreferenceOptions[0]\n : undefined;\n\n return (\n <Host>\n <div class=\"nylas-timeslot-interval\" part=\"nti\">\n <div class=\"header\" part=\"nti__header\">\n <h3>{i18next.t('nylasTimeslotInterval.headerTitle')}</h3>\n </div>\n\n <div class=\"nylas-timeslot-interval__dropdown\">\n <span class=\"label\" part=\"nti__input-label\">\n {i18next.t('nylasTimeslotInterval.timeslotInterval.label')}\n </span>\n {defaultSelectedInterval?.label && (\n <select-dropdown\n name=\"interval-minutes\"\n options={intervalPreferenceOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content\"\n defaultSelectedOption={defaultSelectedInterval}\n themeConfig={this.themeConfig}\n />\n )}\n <span slot=\"label\" class=\"label\" part=\"nti__input-label\">\n {i18next.t('nylasTimeslotInterval.timeslotRounding.label')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasTimeslotInterval.timeslotRounding.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n {this.componentLoaded && (\n <radio-button-group\n name=\"interval-preference\"\n defaultSelectedValue={this.selectedRoundTo ? 'rounding' : 'no-rounding'}\n options={[\n {\n value: 'no-rounding',\n label: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.noRounding.label'),\n description: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.noRounding.desc'),\n },\n {\n value: 'rounding',\n label: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.rounding.label'),\n description: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.rounding.desc'),\n },\n ]}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3,10 +3,10 @@ import { R as RegisterComponent } from './p-Bav8j0p4.js';
3
3
  import { a as debug, b as instance } from './p-DAil6KUW.js';
4
4
  import { d as defineCustomElement$6 } from './p-PeEnpB8P.js';
5
5
  import { d as defineCustomElement$5 } from './p-7S1M5IE9.js';
6
- import { d as defineCustomElement$4 } from './p-Do_nkNrq.js';
6
+ import { d as defineCustomElement$4 } from './p-DzLGxevU.js';
7
7
  import { d as defineCustomElement$3 } from './p-ClTk9Ttz.js';
8
8
  import { d as defineCustomElement$2 } from './p-D7lRYhTx.js';
9
- import { d as defineCustomElement$1 } from './p-C6fgjGAL.js';
9
+ import { d as defineCustomElement$1 } from './p-DKdNE-lT.js';
10
10
 
11
11
  const nylasParticipantBookingCalendarsCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-participant-booking-calendars{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);color:var(--nylas-base-900)}.nylas-participant-booking-calendars .header{padding:1rem}.nylas-participant-booking-calendars .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participant-booking-calendars .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left;display:flex;align-items:center;gap:4px}.nylas-participant-booking-calendars .content .participant-container{padding-top:12px;border-top:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.nylas-participant-booking-calendars .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 16px}.nylas-participant-booking-calendars .content .participant-container .participant-title p{margin:0}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}nylas-booking-calendar-picker::part(nbcp){margin:0;border:none;border-top:1px solid var(--nylas-base-200);border-top-right-radius:0;border-top-left-radius:0}";
12
12
 
@@ -273,6 +273,6 @@ function defineCustomElement() {
273
273
  }
274
274
 
275
275
  export { NylasParticipantBookingCalendars as N, defineCustomElement as d };
276
- //# sourceMappingURL=p-CCycsGz-.js.map
276
+ //# sourceMappingURL=p-CF2aDTBc.js.map
277
277
 
278
- //# sourceMappingURL=p-CCycsGz-.js.map
278
+ //# sourceMappingURL=p-CF2aDTBc.js.map
@@ -1 +1 @@
1
- {"file":"p-CCycsGz-.js","mappings":";;;;;;;;;;AAAA,MAAM,mCAAmC,GAAG,6jJAA6jJ;;;;;;;;;;;;;;;;MCyB5lJ,gCAAgC,GAAAA,kBAAA,CAAA,MAAA,gCAAA,SAAAC,CAAA,CAAA;AAN7C,IAAA,WAAA,GAAA;;;;;;AAkBU,QAAA,IAAI,CAAA,IAAA,GAAW,+BAA+B;QAM9C,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;QAyC3E,IAAiB,CAAA,iBAAA,GAMtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;AAKlC,QAAA,IAAoB,CAAA,oBAAA,GAEzB,EAAE;AAKG,Q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CACC,CACH,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/CX,UAAA,CAAA;AAZC,IAAA,iBAAiB,CAAsH;AACtI,QAAA,IAAI,EAAE,qCAAqC;QAC3C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAkDD,EAAA,gCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.scss?tag=nylas-participant-booking-calendars&encapsulation=shadow","src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-participant-booking-calendars {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-900);\n\n .header {\n padding: 1rem;\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .content {\n .participant-container {\n padding-top: 12px;\n border-top: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n\n .participant-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 16px 16px;\n\n p {\n margin: 0;\n }\n\n .participant-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n }\n }\n}\n\nnylas-booking-calendar-picker::part(nbcp) {\n margin: 0;\n border: none;\n border-top: 1px solid var(--nylas-base-200);\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { AdditionalParticipant, Calendar, Configuration, Participant, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participant-booking-calendars` component is a form input for selecting calendars to check availability for participants.\n *\n * @part npbc - The participant booking calendars host.\n * @part npbc__header - The header.\n * @part npbc__content - The content.\n * @part npbc__participant-container - The participant container.\n * @part npbc__participant-title - The participant title.\n * @part npbc__participant-toggle-container - The participant toggle container.\n */\n@Component({\n tag: 'nylas-participant-booking-calendars',\n styleUrl: 'nylas-participant-booking-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantBookingCalendars {\n @Element() host!: HTMLNylasParticipantBookingCalendarsElement;\n private bookingCalendarsFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-booking-calendars';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * @standalone\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendar?: Calendar;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendar: {\n [key: string]: string;\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participant-booking-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-participant-booking-calendars', 'calendarsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participant-booking-calendars', 'participantsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(newValue, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-participant-booking-calendars', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const participantCalendars = {};\n const showAdditionalParticipantBookingCalendars = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n if (availableParticipantOptions && showAdditionalParticipantBookingCalendars) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendar[participant.email] = participant.booking?.calendar_id ?? 'primary';\n const calendars = participantOption.calendars ?? [];\n participantCalendars[participant.email] = calendars;\n });\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n remainingParticipants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendar[participant.email] = participant?.booking?.calendar_id ?? 'primary';\n }\n });\n }\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendar[organizer.email] = organizer?.booking?.calendar_id ?? 'primary';\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participant-booking-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participant-booking-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participant-booking-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participant-booking-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n } else {\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-booking-')) {\n return;\n }\n // Validate the form\n if (!this.bookingCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, i18next.t('nylasParticipantBookingCalendars.selectAtLeastOneCalendar'));\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-booking-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendar'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key]?.calendar;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n calendar: participant.booking?.calendar_id || 'primary',\n name: participant.name || participant.email,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantBookingCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participant-booking-calendars',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participant-booking-calendars\" part=\"npbc\">\n <div class=\"header\" part=\"npbc__header\">\n <h3>{i18next.t('nylasParticipantBookingCalendars.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantBookingCalendars.headerSubTitle')}</p>\n </div>\n <div class=\"content\" part=\"npbc__content\">\n <form ref={el => (this.bookingCalendarsFormRef = el as HTMLFormElement)}>\n {this.participantCalendars &&\n Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npbc__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npbc__participant-title\">\n <p>{i18next.t('nylasParticipantBookingCalendars.participantBookingCalendarTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npbc__participant-toggle-container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-booking-calendar-picker\n key={key}\n name={`participant-booking-${key}`}\n calendars={participantCalendars}\n hideHeader={true}\n defaultBookingCalendar={this.participantDefaultSelectedCalendar[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-CF2aDTBc.js","mappings":";;;;;;;;;;AAAA,MAAM,mCAAmC,GAAG,6jJAA6jJ;;;;;;;;;;;;;;;;MCyB5lJ,gCAAgC,GAAAA,kBAAA,CAAA,MAAA,gCAAA,SAAAC,CAAA,CAAA;AAN7C,IAAA,WAAA,GAAA;;;;;;AAkBU,QAAA,IAAI,CAAA,IAAA,GAAW,+BAA+B;QAM9C,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;QAyC3E,IAAiB,CAAA,iBAAA,GAMtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;AAKlC,QAAA,IAAoB,CAAA,oBAAA,GAEzB,EAAE;AAKG,QAAA,IAAkC,CAAA,kCAAA,GAEvC,EAAE;AA+NP;AA3NC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,qCAAqC,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QACnF,IAAI,CAAC,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AAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAkDD,EAAA,gCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.scss?tag=nylas-participant-booking-calendars&encapsulation=shadow","src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-participant-booking-calendars {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-900);\n\n .header {\n padding: 1rem;\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .content {\n .participant-container {\n padding-top: 12px;\n border-top: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n\n .participant-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 16px 16px;\n\n p {\n margin: 0;\n }\n\n .participant-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n }\n }\n}\n\nnylas-booking-calendar-picker::part(nbcp) {\n margin: 0;\n border: none;\n border-top: 1px solid var(--nylas-base-200);\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { AdditionalParticipant, Calendar, Configuration, Participant, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participant-booking-calendars` component is a form input for selecting calendars to check availability for participants.\n *\n * @part npbc - The participant booking calendars host.\n * @part npbc__header - The header.\n * @part npbc__content - The content.\n * @part npbc__participant-container - The participant container.\n * @part npbc__participant-title - The participant title.\n * @part npbc__participant-toggle-container - The participant toggle container.\n */\n@Component({\n tag: 'nylas-participant-booking-calendars',\n styleUrl: 'nylas-participant-booking-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantBookingCalendars {\n @Element() host!: HTMLNylasParticipantBookingCalendarsElement;\n private bookingCalendarsFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-booking-calendars';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * @standalone\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendar?: Calendar;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendar: {\n [key: string]: string;\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participant-booking-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-participant-booking-calendars', 'calendarsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participant-booking-calendars', 'participantsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(newValue, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-participant-booking-calendars', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const participantCalendars = {};\n const showAdditionalParticipantBookingCalendars = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n if (availableParticipantOptions && showAdditionalParticipantBookingCalendars) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendar[participant.email] = participant.booking?.calendar_id ?? 'primary';\n const calendars = participantOption.calendars ?? [];\n participantCalendars[participant.email] = calendars;\n });\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n remainingParticipants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendar[participant.email] = participant?.booking?.calendar_id ?? 'primary';\n }\n });\n }\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendar[organizer.email] = organizer?.booking?.calendar_id ?? 'primary';\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participant-booking-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participant-booking-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participant-booking-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participant-booking-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n } else {\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-booking-')) {\n return;\n }\n // Validate the form\n if (!this.bookingCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, i18next.t('nylasParticipantBookingCalendars.selectAtLeastOneCalendar'));\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-booking-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendar'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key]?.calendar;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n calendar: participant.booking?.calendar_id || 'primary',\n name: participant.name || participant.email,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantBookingCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participant-booking-calendars',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participant-booking-calendars\" part=\"npbc\">\n <div class=\"header\" part=\"npbc__header\">\n <h3>{i18next.t('nylasParticipantBookingCalendars.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantBookingCalendars.headerSubTitle')}</p>\n </div>\n <div class=\"content\" part=\"npbc__content\">\n <form ref={el => (this.bookingCalendarsFormRef = el as HTMLFormElement)}>\n {this.participantCalendars &&\n Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npbc__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npbc__participant-title\">\n <p>{i18next.t('nylasParticipantBookingCalendars.participantBookingCalendarTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npbc__participant-toggle-container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-booking-calendar-picker\n key={key}\n name={`participant-booking-${key}`}\n calendars={participantCalendars}\n hideHeader={true}\n defaultBookingCalendar={this.participantDefaultSelectedCalendar[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}