@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
@@ -1 +1 @@
1
- {"file":"p-c8B2BLMf.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,0BAA0B,GAAG,wwMAAwwM;;;;;;;;;;;;;;;;MCgD9xM,uBAAuB,GAAAA,kBAAA,CAAA,MAAA,uBAAA,SAAAC,CAAA,CAAA;AANpC,IAAA,WAAA,GAAA;;;;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAW,cAAc;AAe7B,QAAA,IAAe,CAAA,eAAA,GAAW,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ;AAK1E,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;QA8B1B,IAAA,CAAA,QAAQ,GAAG;AAClB,YAAA,GAAG,EAAE,EAAE;YACP,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;YAC3C,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;YAC3C,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;YAC3C,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;YAC3C,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAC3C,YAAA,GAAG,EAAE,EAAE;SACR;AAIQ,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAK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,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA0ID,EAAA,uBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.scss?tag=nylas-availability-picker&encapsulation=shadow","src/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.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-availability-picker {\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 display: flex;\n align-items: center;\n gap: 4px;\n }\n }\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 @media #{$small-mobile} {\n font-size: 15px;\n }\n\n .select-timezone {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--nylas-base-200);\n padding-bottom: 1rem;\n gap: 1rem;\n\n h4 {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n margin: 0;\n font-size: 16px;\n font-weight: 500;\n line-height: 20px;\n\n @media #{$small-mobile} {\n font-size: 15px;\n }\n }\n }\n\n .availability {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n padding: 0 0.5rem;\n margin: 1rem 0;\n\n @media #{$small-mobile} {\n gap: 0.5rem;\n padding: 0;\n }\n\n .availability-day {\n display: grid;\n grid-template-columns: minmax(auto, 65px) 1fr minmax(auto, 40px);\n\n gap: 1rem;\n align-items: baseline;\n\n @media #{$mobile} {\n grid-template-columns: 78px 1fr auto;\n }\n\n @media #{$small-mobile} {\n display: inline-grid;\n gap: 8px;\n grid-template-columns: 60px 1fr auto;\n }\n\n .day {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n\n @media #{$small-mobile} {\n gap: 0.25rem;\n }\n\n input[type='checkbox'] {\n transform: scale(1.3);\n }\n }\n\n .time-ranges {\n span.unavailable {\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .time-range {\n display: flex;\n gap: 1.5rem;\n justify-content: space-between;\n align-items: baseline;\n\n @media #{$small-mobile} {\n justify-content: unset;\n gap: 0.5rem;\n }\n\n .pickers {\n display: flex;\n gap: 1rem;\n\n @media #{$small-mobile} {\n gap: 0.5rem;\n }\n\n span {\n margin-top: 0.75rem;\n }\n }\n\n &:not(:last-of-type) {\n margin-bottom: 1rem;\n }\n }\n\n .error-message {\n width: 100%;\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 button {\n border: none;\n background: transparent;\n height: 40px;\n cursor: pointer;\n color: var(--nylas-base-800);\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n}\n\nselect-dropdown {\n width: auto;\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n justify-content: initial;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { convertTo12HourFormat, convertTo24HourFormat, debug, minutesToTime, timeToMinutes } 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 { DEFAULT_OPEN_HOURS, TIMEZONE_MAP } from '@/common/constants';\nimport { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\nexport type OpenHours = {\n days: number[];\n start: string;\n end: string;\n timezone: string;\n};\n\nexport type Schedule = {\n SUN: { start: string; end: string }[];\n MON: { start: string; end: string }[];\n TUE: { start: string; end: string }[];\n WED: { start: string; end: string }[];\n THU: { start: string; end: string }[];\n FRI: { start: string; end: string }[];\n SAT: { start: string; end: string }[];\n};\n\n/**\n * The `nylas-availability-picker` component is a form input for selecting availability (open hours).\n * @part nap__header - The header of the availability picker\n * @part nap__select-timezone - The timezone selection container\n * @part nap__select-timezone-button - The timezone selection button\n * @part nap__select-timezone-dropdown-content - The timezone selection dropdown content\n * @part nap__availability - The availability container\n * @part nap__day - The day container\n * @part nap__time-ranges - The time ranges container\n * @part nap__time-range - The time range container\n * @part nap__add-time-range - The add time range button\n * @part nap__time-picker-container - The time picker container\n * @part nap__time-picker-input - The time picker input\n * @part nap__time-picker-times - The time picker times\n */\n@Component({\n tag: 'nylas-availability-picker',\n styleUrl: 'nylas-availability-picker.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasAvailabilityPicker {\n /**\n * The element <nylas-availability-picker> itself.\n */\n @Element() host!: HTMLNylasAvailabilityPickerElement;\n /**\n * @standalone\n * The name of the availability picker.\n */\n @Prop() name: string = 'availability';\n /**\n * @standalone\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The open hours to display.\n */\n @Prop() openHours?: OpenHours[];\n /**\n * @standalone\n * The default timezone or preset timezone.\n */\n @Prop() defaultTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n /**\n * @standalone\n * Hide the header of the availability picker.\n */\n @Prop() hideHeader: boolean = false;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the selected availability / open hours change.\n * The value is a stringified JSON object with the open hours and timezone.\n ```\n {\n openHours: OpenHours[],\n timezone: string\n }\n ```\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n @State() schedule = {\n SUN: [],\n MON: [{ start: '09:00am', end: '05:00pm' }],\n TUE: [{ start: '09:00am', end: '05:00pm' }],\n WED: [{ start: '09:00am', end: '05:00pm' }],\n THU: [{ start: '09:00am', end: '05:00pm' }],\n FRI: [{ start: '09:00am', end: '05:00pm' }],\n SAT: [],\n };\n /**\n * The selected timezone state.\n */\n @State() timezone: string = '';\n\n /**\n * The overlapping time ranges state. This is used to display an error message when there are overlapping time ranges.\n */\n @State() overlapDays: { [key: string]: number[] } = {};\n\n /**\n * State for tracking time window validation errors (e.g., start time after end time)\n */\n @State() timeWindowErrors: { [key: string]: string } = {};\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-availability-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('openHours')\n openHoursChanged(newValue: OpenHours[]) {\n // Only process if we have a non-empty array and timezone is already set\n // This prevents processing during initialization and handles null/undefined consistently\n if (newValue && newValue.length > 0 && this.timezone) {\n this.openHoursToSchedule(newValue);\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n const defaultOpenHours = newConfig?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS;\n // If the name is `availability`, we are setting the default open hours. If the name is `participant-****`, we are setting the participant's custom availability.\n // Set the timezone accordingly.\n const defaultOpenHoursTimezone = newConfig?.event_booking?.timezone || this.defaultTimezone;\n this.timezone = this.name === 'availability' ? defaultOpenHoursTimezone : this.defaultTimezone;\n\n // Process openHours if available, otherwise fall back to defaultOpenHours\n // The openHours watcher will handle openHours changes separately to avoid redundant calls\n if (this.openHours && this.openHours.length > 0) {\n this.openHoursToSchedule(this.openHours);\n } else if (defaultOpenHours) {\n this.openHoursToSchedule(defaultOpenHours);\n }\n }\n\n /**\n * Normalize time format to ensure consistent parsing across languages\n */\n private normalizeTimeFormat(timeStr: string): string {\n // Normalize Spanish AM/PM formats (a.m./p.m.) to English am/pm\n return timeStr.replace(/a\\.?m\\.?/gi, 'am').replace(/p\\.?m\\.?/gi, 'pm');\n }\n\n scheduleChanged(newValue: Schedule, valueChanged: boolean = true) {\n const overlapDays: { [key: string]: number[] } = {};\n Object.keys(newValue).forEach(key => {\n const dayTimeRanges = newValue[key];\n if (dayTimeRanges.length > 0) {\n // Normalize time formats before checking overlaps\n const normalizedTimeRanges = dayTimeRanges.map(range => ({\n start: this.normalizeTimeFormat(range.start),\n end: this.normalizeTimeFormat(range.end),\n }));\n const overlaps = this.getOverlaps(normalizedTimeRanges);\n if (overlaps.length > 0) {\n overlapDays[key] = overlaps;\n }\n }\n });\n this.overlapDays = overlapDays;\n\n // Clean up timeWindowErrors for non-existent time ranges\n this.cleanupTimeWindowErrors(newValue);\n\n this.updateFormValidity();\n\n if (valueChanged) {\n this.valueChanged.emit({\n value: JSON.stringify({\n openHours: this.scheduleToOpenHours(newValue),\n timezone: this.timezone,\n }),\n name: this.name,\n });\n }\n }\n\n /**\n * Clean up timeWindowErrors for time ranges that no longer exist in the schedule\n */\n private cleanupTimeWindowErrors(schedule: Schedule) {\n const newTimeWindowErrors = { ...this.timeWindowErrors };\n let hasChanges = false;\n\n // Get all valid time range keys from current schedule\n const validKeys = new Set<string>();\n Object.keys(schedule).forEach(day => {\n const timeRanges = schedule[day];\n timeRanges.forEach((_, index) => {\n validKeys.add(`${day}:${index}_start`);\n validKeys.add(`${day}:${index}_end`);\n });\n });\n\n // Remove errors for keys that no longer exist\n Object.keys(newTimeWindowErrors).forEach(errorKey => {\n if (!validKeys.has(errorKey)) {\n delete newTimeWindowErrors[errorKey];\n hasChanges = true;\n }\n });\n\n if (hasChanges) {\n this.timeWindowErrors = newTimeWindowErrors;\n }\n }\n\n /**\n * Updates form validity based on both overlap errors and time window errors\n */\n updateFormValidity() {\n const hasOverlapErrors = Object.keys(this.overlapDays).length > 0;\n const hasTimeWindowErrors = Object.keys(this.timeWindowErrors).filter(key => this.timeWindowErrors[key]).length > 0;\n\n if (hasOverlapErrors) {\n const element = this.host.shadowRoot?.getElementById(Object.keys(this.overlapDays)[0]) as HTMLInputElement;\n if (element) {\n debug('nylas-availability-picker', 'The time ranges are overlapping. Overlap: ', this.overlapDays);\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'Overlapping time ranges found', element);\n }\n } else if (hasTimeWindowErrors) {\n const firstErrorKey = Object.keys(this.timeWindowErrors).find(key => this.timeWindowErrors[key]);\n const element = this.host.shadowRoot?.getElementById(firstErrorKey!) as HTMLInputElement;\n const errorMessage = this.timeWindowErrors[firstErrorKey!];\n if (element) {\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, errorMessage, element);\n }\n } else {\n this.isInternalsAvailable && this.internals.setValidity({ customError: false });\n this.isInternalsAvailable &&\n this.internals.setFormValue(\n JSON.stringify({\n openHours: this.scheduleToOpenHours(this.schedule),\n timezone: this.timezone,\n }),\n this.name,\n );\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 @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'timezone') {\n this.timezone = value;\n const updateValue = {\n openHours: this.scheduleToOpenHours(this.schedule),\n timezone: this.timezone,\n };\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(updateValue), this.name);\n this.valueChanged.emit({\n value: JSON.stringify(updateValue),\n name: this.name,\n });\n }\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n connectedCallback() {\n debug('nylas-availability-picker', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-availability-picker', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-availability-picker', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-availability-picker', 'componentDidLoad');\n\n if (this.selectedConfiguration) {\n this.configChangedHandler(this.selectedConfiguration);\n } else {\n this.timezone = this.defaultTimezone;\n if (this.openHours && this.openHours.length > 0) {\n this.openHoursToSchedule(this.openHours);\n }\n }\n\n const updateValue = {\n openHours: this.scheduleToOpenHours(this.schedule),\n timezone: this.timezone,\n };\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(updateValue), this.name);\n\n // Set initial form validity\n this.updateFormValidity();\n }\n\n get isInternalsAvailable() {\n return typeof this.internals.setFormValue === 'function';\n }\n\n getOverlaps(timeRanges) {\n // Convert times to minutes and add to the array\n const timeRangesInMinutes = timeRanges.map((range, index) => ({\n start: timeToMinutes(range.start),\n end: timeToMinutes(range.end),\n originalIndex: index,\n }));\n\n // Sort by start time\n timeRangesInMinutes.sort((a, b) => a.start - b.start);\n const overlaps: number[] = [];\n // Check for overlap\n for (let i = 1; i < timeRangesInMinutes.length; i++) {\n if (timeRangesInMinutes[i].start < timeRangesInMinutes[i - 1].end) {\n // Add both overlapping time range indices if they are not already included\n if (!overlaps.includes(timeRangesInMinutes[i].originalIndex)) {\n overlaps.push(timeRangesInMinutes[i].originalIndex);\n }\n if (!overlaps.includes(timeRangesInMinutes[i - 1].originalIndex)) {\n overlaps.push(timeRangesInMinutes[i - 1].originalIndex);\n }\n }\n }\n return overlaps.sort((a, b) => a - b); // Return sorted list of indices\n }\n\n addTimeRange(day) {\n const currentTimeRanges = this.schedule[day];\n\n // Default working hours are from 00:00 to 23:45 for calculation purposes\n const dayStart = 0; // Start of the day in minutes (00:00)\n const dayEnd = 1425; // End of the day in minutes (23:45)\n\n if (currentTimeRanges.length === 0) {\n // If there are no existing time ranges, add one at the start of the day\n this.schedule[day] = [{ start: '09:00am', end: '05:00pm' }]; // Example range\n } else {\n // Convert all time ranges to minutes for comparison\n const timeRangesInMinutes = currentTimeRanges\n .map(range => ({\n start: timeToMinutes(range.start),\n end: timeToMinutes(range.end),\n }))\n .sort((a, b) => a.start - b.start); // Sort by start time\n\n // Attempt to add a new time range at the end of the day\n const lastRangeEnd = timeRangesInMinutes[timeRangesInMinutes.length - 1].end;\n if (lastRangeEnd + 60 <= dayEnd) {\n // There's room at the end of the day\n this.schedule[day].push({\n start: convertTo12HourFormat(minutesToTime(lastRangeEnd)),\n end: convertTo12HourFormat(minutesToTime(lastRangeEnd + 60)),\n });\n } else {\n // No room at the end, look for gaps at the beginning of the day\n let gapFound = false;\n if (timeRangesInMinutes[0].start > dayStart + 60) {\n // There's room for at least a 1-hour meeting at the beginning of the day\n this.schedule[day].push({\n start: convertTo12HourFormat(minutesToTime(dayStart)),\n end: convertTo12HourFormat(minutesToTime(dayStart + 60)),\n });\n gapFound = true;\n }\n\n if (!gapFound) {\n // Search for gaps between scheduled time ranges\n for (let i = 0; i < timeRangesInMinutes.length - 1; i++) {\n const currentEnd = timeRangesInMinutes[i].end;\n const nextStart = timeRangesInMinutes[i + 1].start;\n\n if (nextStart - currentEnd >= 60) {\n // Found a gap\n this.schedule[day].push({\n start: convertTo12HourFormat(minutesToTime(currentEnd)),\n end: convertTo12HourFormat(minutesToTime(currentEnd + 60)),\n });\n break; // Exit the loop after adding a time range\n }\n }\n }\n }\n }\n\n // Sort the updated schedule to maintain order\n this.schedule[day].sort((a, b) => timeToMinutes(a.start) - timeToMinutes(b.start));\n\n this.schedule = { ...this.schedule };\n this.scheduleChanged(this.schedule);\n }\n\n removeTimeRange(day, index) {\n // Clear any time window errors for the removed time range\n const startKey = `${day}:${index}_start`;\n const endKey = `${day}:${index}_end`;\n\n const newTimeWindowErrors = { ...this.timeWindowErrors };\n delete newTimeWindowErrors[startKey];\n delete newTimeWindowErrors[endKey];\n this.timeWindowErrors = newTimeWindowErrors;\n\n this.schedule[day].splice(index, 1);\n this.schedule = { ...this.schedule };\n this.scheduleChanged(this.schedule);\n }\n\n @Listen('timeChange')\n setTime(event: CustomEvent<{ key: string; value: string }>) {\n const { key, value } = event.detail;\n const [dayIndex, timeType] = key.split('_');\n const [day, index] = dayIndex.split(':');\n\n if (timeType === 'start') {\n this.schedule[day][index].start = value;\n } else if (timeType === 'end') {\n this.schedule[day][index].end = value;\n }\n\n // Clear any existing time window error for this specific key\n if (this.timeWindowErrors[key]) {\n const newErrors = { ...this.timeWindowErrors };\n delete newErrors[key];\n this.timeWindowErrors = newErrors;\n }\n\n this.schedule = { ...this.schedule };\n this.scheduleChanged(this.schedule);\n }\n\n @Listen('timeWindowFormError')\n setFormError(event: CustomEvent<{ key: string; message: string }>) {\n const { key, message } = event.detail;\n\n if (message) {\n // Set the error for this specific time input\n this.timeWindowErrors = {\n ...this.timeWindowErrors,\n [key]: message,\n };\n } else {\n // Clear the error for this specific time input\n const newErrors = { ...this.timeWindowErrors };\n delete newErrors[key];\n this.timeWindowErrors = newErrors;\n }\n\n // Update overall form validity\n this.updateFormValidity();\n }\n\n openHoursToSchedule(openHours: OpenHours[]) {\n const newSchedule = {\n SUN: [],\n MON: [],\n TUE: [],\n WED: [],\n THU: [],\n FRI: [],\n SAT: [],\n };\n openHours.forEach(openHour => {\n openHour.days.forEach(day => {\n const dayKey = this.getDayKey(day);\n const start12hr = this.normalizeTimeFormat(convertTo12HourFormat(openHour.start));\n const end12hr = this.normalizeTimeFormat(convertTo12HourFormat(openHour.end));\n const timeRange = { start: start12hr, end: end12hr };\n\n // Check if the time range already exists for the day\n let timeRangeExists = false;\n if (newSchedule[dayKey]) {\n // Search for an existing time range that matches the current one\n timeRangeExists = newSchedule[dayKey].some(range => range.start === timeRange.start && range.end === timeRange.end);\n }\n\n if (!timeRangeExists) {\n if (newSchedule[dayKey]) {\n newSchedule[dayKey].push(timeRange);\n } else {\n newSchedule[dayKey] = [timeRange];\n }\n }\n });\n });\n\n this.schedule = newSchedule;\n this.scheduleChanged(this.schedule, false);\n }\n\n getDayKey(dayIndex: number): string {\n const days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];\n return days[dayIndex];\n }\n\n scheduleToOpenHours(schedule: Schedule): OpenHours[] {\n const dayKeys = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];\n const openHoursMap: Map<string, { days: number[]; start: string; end: string }> = new Map();\n\n dayKeys.forEach((dayKey, index) => {\n if (schedule[dayKey]) {\n // Check if schedule for the day exists\n schedule[dayKey].forEach(timeRange => {\n const start24hr = convertTo24HourFormat(timeRange.start);\n const end24hr = convertTo24HourFormat(timeRange.end);\n const key = `${start24hr}-${end24hr}`;\n\n if (!openHoursMap.has(key)) {\n openHoursMap.set(key, { days: [index], start: start24hr, end: end24hr });\n } else {\n const entry = openHoursMap.get(key);\n if (entry) {\n entry.days.push(index);\n openHoursMap.set(key, entry);\n }\n }\n });\n }\n });\n\n const selectedOpenHours: OpenHours[] = [];\n openHoursMap.forEach((value, _key) => {\n selectedOpenHours.push({\n days: value.days,\n start: value.start,\n end: value.end,\n timezone: this.timezone,\n });\n });\n\n return selectedOpenHours;\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 @RegisterComponent<NylasAvailabilityPicker, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-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 const timezoneOptions = Object.keys(TIMEZONE_MAP).map(key => ({\n label: TIMEZONE_MAP[key],\n value: key,\n }));\n const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.timezone);\n\n return (\n <Host>\n <div class=\"nylas-availability-picker\" part=\"nap\">\n {!this.hideHeader && (\n <div class=\"header\" part=\"nap__header\">\n <h3>{i18next.t('nylasAvailabilityPicker.headerTitle')}</h3>\n <p>\n {i18next.t('nylasAvailabilityPicker.headerSubTitle')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasAvailabilityPicker.tooltip.desc')}</span>\n </tooltip-component>\n </p>\n </div>\n )}\n <div class=\"content\">\n <div class=\"select-timezone\" part=\"nap__select-timezone\">\n <h4 class=\"sub-header\">{i18next.t('nylasAvailabilityPicker.selectTimezone')}</h4>\n {selectedTimezoneOption?.label && (\n <select-dropdown\n name=\"timezone\"\n searchPlaceholder={i18next.t('search')}\n exportparts=\"sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content\"\n options={timezoneOptions}\n defaultSelectedOption={selectedTimezoneOption}\n themeConfig={this.themeConfig}\n >\n <span slot=\"select-icon\">\n <globe-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n )}\n </div>\n <div class=\"availability\" part=\"nap__availability\">\n {Object.keys(this.schedule).map(key => {\n const day = key;\n const timeRanges = this.schedule[key] as { start: string; end: string }[];\n return (\n <div class=\"availability-day\">\n <div class=\"day\" part=\"nap__day\">\n <input\n type=\"checkbox\"\n name={day}\n id={day}\n checked={timeRanges.length > 0}\n onClick={() => {\n if (timeRanges.length > 0) {\n // Clear any time window errors for this day when toggling off\n const newTimeWindowErrors = { ...this.timeWindowErrors };\n Object.keys(newTimeWindowErrors).forEach(errorKey => {\n if (errorKey.startsWith(`${day}:`)) {\n delete newTimeWindowErrors[errorKey];\n }\n });\n this.timeWindowErrors = newTimeWindowErrors;\n\n this.schedule[day] = [];\n } else {\n this.schedule[day] = [{ start: '09:00am', end: '05:00pm' }];\n }\n this.schedule = { ...this.schedule };\n this.scheduleChanged(this.schedule);\n }}\n />\n <label htmlFor={day} aria-label=\"Select day\">\n {i18next.t(`nylasAvailabilityPicker.days.${day}`)}\n </label>\n </div>\n <div class=\"time-ranges\" part=\"nap__time-ranges\">\n {timeRanges.length ? null : <span class=\"unavailable\">{i18next.t('nylasAvailabilityPicker.unavailable')}</span>}\n {timeRanges.length > 0 &&\n timeRanges.map((timeRange, timeRangeIndex) => {\n const startKey = `${key}:${timeRangeIndex}_start`;\n const endKey = `${key}:${timeRangeIndex}_end`;\n return (\n <div class=\"time-range\" part=\"nap__time-range\">\n <div class=\"pickers\">\n <nylas-time-window-picker\n id={startKey}\n hasError={this.overlapDays[day]?.includes(timeRangeIndex) || !!this.timeWindowErrors[startKey]}\n time={timeRange.start}\n name={startKey}\n key={startKey}\n language={this.selectedLanguage}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times\"\n />\n <span> - </span>\n <nylas-time-window-picker\n id={endKey}\n hasError={this.overlapDays[day]?.includes(timeRangeIndex) || !!this.timeWindowErrors[endKey]}\n time={timeRange.end}\n name={endKey}\n key={endKey}\n minimumStartTime={timeRange.start}\n language={this.selectedLanguage}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times\"\n />\n </div>\n <button onClick={() => this.removeTimeRange(day, timeRangeIndex)}>\n <close-icon />\n </button>\n </div>\n );\n })}\n {(this.overlapDays[day] || Object.keys(this.timeWindowErrors).find(key => key.startsWith(`${day}:`) && this.timeWindowErrors[key])) && (\n <div class=\"error-message\" part=\"nap__error-message\">\n {this.overlapDays[day] ? i18next.t('nylasAvailabilityPicker.errors.overlappingTimeRanges') : ''}\n {!this.overlapDays[day] && Object.keys(this.timeWindowErrors).find(key => key.startsWith(`${day}:`) && this.timeWindowErrors[key])\n ? this.timeWindowErrors[Object.keys(this.timeWindowErrors).find(key => key.startsWith(`${day}:`) && this.timeWindowErrors[key])!]\n : ''}\n </div>\n )}\n </div>\n <div>\n {timeRanges.length > 0 ? (\n <button onClick={() => this.addTimeRange(day)} part=\"nap__add-time-range\">\n <add-circle-icon />\n </button>\n ) : null}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-DbbFBnQl.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,0BAA0B,GAAG,wwMAAwwM;;;;;;;;;;;;;;;;MCgD9xM,uBAAuB,GAAAA,kBAAA,CAAA,MAAA,uBAAA,SAAAC,CAAA,CAAA;AANpC,IAAA,WAAA,GAAA;;;;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAW,cAAc;AAe7B,QAAA,IAAe,CAAA,eAAA,GAAW,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ;AAK1E,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;QA8B1B,IAAA,CAAA,QAAQ,GAAG;AAClB,YAAA,GAAG,EAAE,EAAE;YACP,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;YAC3C,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;YAC3C,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,E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,CAAmB,CAAA,iBAAA,EAAA,IAAA,CAAA,CACZ,IACP,IAAI,CACJ,CACF;AAEV,SAAC,CAAC,CACE,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvIX,UAAA,CAAA;AATC,IAAA,iBAAiB,CAA6G;AAC7H,QAAA,IAAI,EAAE,2BAA2B;QACjC,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;;;;CA0ID,EAAA,uBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.scss?tag=nylas-availability-picker&encapsulation=shadow","src/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.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-availability-picker {\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 display: flex;\n align-items: center;\n gap: 4px;\n }\n }\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 @media #{$small-mobile} {\n font-size: 15px;\n }\n\n .select-timezone {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--nylas-base-200);\n padding-bottom: 1rem;\n gap: 1rem;\n\n h4 {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n margin: 0;\n font-size: 16px;\n font-weight: 500;\n line-height: 20px;\n\n @media #{$small-mobile} {\n font-size: 15px;\n }\n }\n }\n\n .availability {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n padding: 0 0.5rem;\n margin: 1rem 0;\n\n @media #{$small-mobile} {\n gap: 0.5rem;\n padding: 0;\n }\n\n .availability-day {\n display: grid;\n grid-template-columns: minmax(auto, 65px) 1fr minmax(auto, 40px);\n\n gap: 1rem;\n align-items: baseline;\n\n @media #{$mobile} {\n grid-template-columns: 78px 1fr auto;\n }\n\n @media #{$small-mobile} {\n display: inline-grid;\n gap: 8px;\n grid-template-columns: 60px 1fr auto;\n }\n\n .day {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n\n @media #{$small-mobile} {\n gap: 0.25rem;\n }\n\n input[type='checkbox'] {\n transform: scale(1.3);\n }\n }\n\n .time-ranges {\n span.unavailable {\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .time-range {\n display: flex;\n gap: 1.5rem;\n justify-content: space-between;\n align-items: baseline;\n\n @media #{$small-mobile} {\n justify-content: unset;\n gap: 0.5rem;\n }\n\n .pickers {\n display: flex;\n gap: 1rem;\n\n @media #{$small-mobile} {\n gap: 0.5rem;\n }\n\n span {\n margin-top: 0.75rem;\n }\n }\n\n &:not(:last-of-type) {\n margin-bottom: 1rem;\n }\n }\n\n .error-message {\n width: 100%;\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 button {\n border: none;\n background: transparent;\n height: 40px;\n cursor: pointer;\n color: var(--nylas-base-800);\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n}\n\nselect-dropdown {\n width: auto;\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n justify-content: initial;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { convertTo12HourFormat, convertTo24HourFormat, debug, minutesToTime, timeToMinutes } 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 { DEFAULT_OPEN_HOURS, TIMEZONE_MAP } from '@/common/constants';\nimport { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\nexport type OpenHours = {\n days: number[];\n start: string;\n end: string;\n timezone: string;\n};\n\nexport type Schedule = {\n SUN: { start: string; end: string }[];\n MON: { start: string; end: string }[];\n TUE: { start: string; end: string }[];\n WED: { start: string; end: string }[];\n THU: { start: string; end: string }[];\n FRI: { start: string; end: string }[];\n SAT: { start: string; end: string }[];\n};\n\n/**\n * The `nylas-availability-picker` component is a form input for selecting availability (open hours).\n * @part nap__header - The header of the availability picker\n * @part nap__select-timezone - The timezone selection container\n * @part nap__select-timezone-button - The timezone selection button\n * @part nap__select-timezone-dropdown-content - The timezone selection dropdown content\n * @part nap__availability - The availability container\n * @part nap__day - The day container\n * @part nap__time-ranges - The time ranges container\n * @part nap__time-range - The time range container\n * @part nap__add-time-range - The add time range button\n * @part nap__time-picker-container - The time picker container\n * @part nap__time-picker-input - The time picker input\n * @part nap__time-picker-times - The time picker times\n */\n@Component({\n tag: 'nylas-availability-picker',\n styleUrl: 'nylas-availability-picker.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasAvailabilityPicker {\n /**\n * The element <nylas-availability-picker> itself.\n */\n @Element() host!: HTMLNylasAvailabilityPickerElement;\n /**\n * @standalone\n * The name of the availability picker.\n */\n @Prop() name: string = 'availability';\n /**\n * @standalone\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The open hours to display.\n */\n @Prop() openHours?: OpenHours[];\n /**\n * @standalone\n * The default timezone or preset timezone.\n */\n @Prop() defaultTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n /**\n * @standalone\n * Hide the header of the availability picker.\n */\n @Prop() hideHeader: boolean = false;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the selected availability / open hours change.\n * The value is a stringified JSON object with the open hours and timezone.\n ```\n {\n openHours: OpenHours[],\n timezone: string\n }\n ```\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n @State() schedule = {\n SUN: [],\n MON: [{ start: '09:00am', end: '05:00pm' }],\n TUE: [{ start: '09:00am', end: '05:00pm' }],\n WED: [{ start: '09:00am', end: '05:00pm' }],\n THU: [{ start: '09:00am', end: '05:00pm' }],\n FRI: [{ start: '09:00am', end: '05:00pm' }],\n SAT: [],\n };\n /**\n * The selected timezone state.\n */\n @State() timezone: string = '';\n\n /**\n * The overlapping time ranges state. This is used to display an error message when there are overlapping time ranges.\n */\n @State() overlapDays: { [key: string]: number[] } = {};\n\n /**\n * State for tracking time window validation errors (e.g., start time after end time)\n */\n @State() timeWindowErrors: { [key: string]: string } = {};\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-availability-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('openHours')\n openHoursChanged(newValue: OpenHours[]) {\n // Only process if we have a non-empty array and timezone is already set\n // This prevents processing during initialization and handles null/undefined consistently\n if (newValue && newValue.length > 0 && this.timezone) {\n this.openHoursToSchedule(newValue);\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n const defaultOpenHours = newConfig?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS;\n // If the name is `availability`, we are setting the default open hours. If the name is `participant-****`, we are setting the participant's custom availability.\n // Set the timezone accordingly.\n const defaultOpenHoursTimezone = newConfig?.event_booking?.timezone || this.defaultTimezone;\n this.timezone = this.name === 'availability' ? defaultOpenHoursTimezone : this.defaultTimezone;\n\n // Process openHours if available, otherwise fall back to defaultOpenHours\n // The openHours watcher will handle openHours changes separately to avoid redundant calls\n if (this.openHours && this.openHours.length > 0) {\n this.openHoursToSchedule(this.openHours);\n } else if (defaultOpenHours) {\n this.openHoursToSchedule(defaultOpenHours);\n }\n }\n\n /**\n * Normalize time format to ensure consistent parsing across languages\n */\n private normalizeTimeFormat(timeStr: string): string {\n // Normalize Spanish AM/PM formats (a.m./p.m.) to English am/pm\n return timeStr.replace(/a\\.?m\\.?/gi, 'am').replace(/p\\.?m\\.?/gi, 'pm');\n }\n\n scheduleChanged(newValue: Schedule, valueChanged: boolean = true) {\n const overlapDays: { [key: string]: number[] } = {};\n Object.keys(newValue).forEach(key => {\n const dayTimeRanges = newValue[key];\n if (dayTimeRanges.length > 0) {\n // Normalize time formats before checking overlaps\n const normalizedTimeRanges = dayTimeRanges.map(range => ({\n start: this.normalizeTimeFormat(range.start),\n end: this.normalizeTimeFormat(range.end),\n }));\n const overlaps = this.getOverlaps(normalizedTimeRanges);\n if (overlaps.length > 0) {\n overlapDays[key] = overlaps;\n }\n }\n });\n this.overlapDays = overlapDays;\n\n // Clean up timeWindowErrors for non-existent time ranges\n this.cleanupTimeWindowErrors(newValue);\n\n this.updateFormValidity();\n\n if (valueChanged) {\n this.valueChanged.emit({\n value: JSON.stringify({\n openHours: this.scheduleToOpenHours(newValue),\n timezone: this.timezone,\n }),\n name: this.name,\n });\n }\n }\n\n /**\n * Clean up timeWindowErrors for time ranges that no longer exist in the schedule\n */\n private cleanupTimeWindowErrors(schedule: Schedule) {\n const newTimeWindowErrors = { ...this.timeWindowErrors };\n let hasChanges = false;\n\n // Get all valid time range keys from current schedule\n const validKeys = new Set<string>();\n Object.keys(schedule).forEach(day => {\n const timeRanges = schedule[day];\n timeRanges.forEach((_, index) => {\n validKeys.add(`${day}:${index}_start`);\n validKeys.add(`${day}:${index}_end`);\n });\n });\n\n // Remove errors for keys that no longer exist\n Object.keys(newTimeWindowErrors).forEach(errorKey => {\n if (!validKeys.has(errorKey)) {\n delete newTimeWindowErrors[errorKey];\n hasChanges = true;\n }\n });\n\n if (hasChanges) {\n this.timeWindowErrors = newTimeWindowErrors;\n }\n }\n\n /**\n * Updates form validity based on both overlap errors and time window errors\n */\n updateFormValidity() {\n const hasOverlapErrors = Object.keys(this.overlapDays).length > 0;\n const hasTimeWindowErrors = Object.keys(this.timeWindowErrors).filter(key => this.timeWindowErrors[key]).length > 0;\n\n if (hasOverlapErrors) {\n const element = this.host.shadowRoot?.getElementById(Object.keys(this.overlapDays)[0]) as HTMLInputElement;\n if (element) {\n debug('nylas-availability-picker', 'The time ranges are overlapping. Overlap: ', this.overlapDays);\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'Overlapping time ranges found', element);\n }\n } else if (hasTimeWindowErrors) {\n const firstErrorKey = Object.keys(this.timeWindowErrors).find(key => this.timeWindowErrors[key]);\n const element = this.host.shadowRoot?.getElementById(firstErrorKey!) as HTMLInputElement;\n const errorMessage = this.timeWindowErrors[firstErrorKey!];\n if (element) {\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, errorMessage, element);\n }\n } else {\n this.isInternalsAvailable && this.internals.setValidity({ customError: false });\n this.isInternalsAvailable &&\n this.internals.setFormValue(\n JSON.stringify({\n openHours: this.scheduleToOpenHours(this.schedule),\n timezone: this.timezone,\n }),\n this.name,\n );\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 @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'timezone') {\n this.timezone = value;\n const updateValue = {\n openHours: this.scheduleToOpenHours(this.schedule),\n timezone: this.timezone,\n };\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(updateValue), this.name);\n this.valueChanged.emit({\n value: JSON.stringify(updateValue),\n name: this.name,\n });\n }\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n connectedCallback() {\n debug('nylas-availability-picker', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-availability-picker', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-availability-picker', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-availability-picker', 'componentDidLoad');\n\n if (this.selectedConfiguration) {\n this.configChangedHandler(this.selectedConfiguration);\n } else {\n this.timezone = this.defaultTimezone;\n if (this.openHours && this.openHours.length > 0) {\n this.openHoursToSchedule(this.openHours);\n }\n }\n\n const updateValue = {\n openHours: this.scheduleToOpenHours(this.schedule),\n timezone: this.timezone,\n };\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(updateValue), this.name);\n\n // Set initial form validity\n this.updateFormValidity();\n }\n\n get isInternalsAvailable() {\n return typeof this.internals.setFormValue === 'function';\n }\n\n getOverlaps(timeRanges) {\n // Convert times to minutes and add to the array\n const timeRangesInMinutes = timeRanges.map((range, index) => ({\n start: timeToMinutes(range.start),\n end: timeToMinutes(range.end),\n originalIndex: index,\n }));\n\n // Sort by start time\n timeRangesInMinutes.sort((a, b) => a.start - b.start);\n const overlaps: number[] = [];\n // Check for overlap\n for (let i = 1; i < timeRangesInMinutes.length; i++) {\n if (timeRangesInMinutes[i].start < timeRangesInMinutes[i - 1].end) {\n // Add both overlapping time range indices if they are not already included\n if (!overlaps.includes(timeRangesInMinutes[i].originalIndex)) {\n overlaps.push(timeRangesInMinutes[i].originalIndex);\n }\n if (!overlaps.includes(timeRangesInMinutes[i - 1].originalIndex)) {\n overlaps.push(timeRangesInMinutes[i - 1].originalIndex);\n }\n }\n }\n return overlaps.sort((a, b) => a - b); // Return sorted list of indices\n }\n\n addTimeRange(day) {\n const currentTimeRanges = this.schedule[day];\n\n // Default working hours are from 00:00 to 23:45 for calculation purposes\n const dayStart = 0; // Start of the day in minutes (00:00)\n const dayEnd = 1425; // End of the day in minutes (23:45)\n\n if (currentTimeRanges.length === 0) {\n // If there are no existing time ranges, add one at the start of the day\n this.schedule[day] = [{ start: '09:00am', end: '05:00pm' }]; // Example range\n } else {\n // Convert all time ranges to minutes for comparison\n const timeRangesInMinutes = currentTimeRanges\n .map(range => ({\n start: timeToMinutes(range.start),\n end: timeToMinutes(range.end),\n }))\n .sort((a, b) => a.start - b.start); // Sort by start time\n\n // Attempt to add a new time range at the end of the day\n const lastRangeEnd = timeRangesInMinutes[timeRangesInMinutes.length - 1].end;\n if (lastRangeEnd + 60 <= dayEnd) {\n // There's room at the end of the day\n this.schedule[day].push({\n start: convertTo12HourFormat(minutesToTime(lastRangeEnd)),\n end: convertTo12HourFormat(minutesToTime(lastRangeEnd + 60)),\n });\n } else {\n // No room at the end, look for gaps at the beginning of the day\n let gapFound = false;\n if (timeRangesInMinutes[0].start > dayStart + 60) {\n // There's room for at least a 1-hour meeting at the beginning of the day\n this.schedule[day].push({\n start: convertTo12HourFormat(minutesToTime(dayStart)),\n end: convertTo12HourFormat(minutesToTime(dayStart + 60)),\n });\n gapFound = true;\n }\n\n if (!gapFound) {\n // Search for gaps between scheduled time ranges\n for (let i = 0; i < timeRangesInMinutes.length - 1; i++) {\n const currentEnd = timeRangesInMinutes[i].end;\n const nextStart = timeRangesInMinutes[i + 1].start;\n\n if (nextStart - currentEnd >= 60) {\n // Found a gap\n this.schedule[day].push({\n start: convertTo12HourFormat(minutesToTime(currentEnd)),\n end: convertTo12HourFormat(minutesToTime(currentEnd + 60)),\n });\n break; // Exit the loop after adding a time range\n }\n }\n }\n }\n }\n\n // Sort the updated schedule to maintain order\n this.schedule[day].sort((a, b) => timeToMinutes(a.start) - timeToMinutes(b.start));\n\n this.schedule = { ...this.schedule };\n this.scheduleChanged(this.schedule);\n }\n\n removeTimeRange(day, index) {\n // Clear any time window errors for the removed time range\n const startKey = `${day}:${index}_start`;\n const endKey = `${day}:${index}_end`;\n\n const newTimeWindowErrors = { ...this.timeWindowErrors };\n delete newTimeWindowErrors[startKey];\n delete newTimeWindowErrors[endKey];\n this.timeWindowErrors = newTimeWindowErrors;\n\n this.schedule[day].splice(index, 1);\n this.schedule = { ...this.schedule };\n this.scheduleChanged(this.schedule);\n }\n\n @Listen('timeChange')\n setTime(event: CustomEvent<{ key: string; value: string }>) {\n const { key, value } = event.detail;\n const [dayIndex, timeType] = key.split('_');\n const [day, index] = dayIndex.split(':');\n\n if (timeType === 'start') {\n this.schedule[day][index].start = value;\n } else if (timeType === 'end') {\n this.schedule[day][index].end = value;\n }\n\n // Clear any existing time window error for this specific key\n if (this.timeWindowErrors[key]) {\n const newErrors = { ...this.timeWindowErrors };\n delete newErrors[key];\n this.timeWindowErrors = newErrors;\n }\n\n this.schedule = { ...this.schedule };\n this.scheduleChanged(this.schedule);\n }\n\n @Listen('timeWindowFormError')\n setFormError(event: CustomEvent<{ key: string; message: string }>) {\n const { key, message } = event.detail;\n\n if (message) {\n // Set the error for this specific time input\n this.timeWindowErrors = {\n ...this.timeWindowErrors,\n [key]: message,\n };\n } else {\n // Clear the error for this specific time input\n const newErrors = { ...this.timeWindowErrors };\n delete newErrors[key];\n this.timeWindowErrors = newErrors;\n }\n\n // Update overall form validity\n this.updateFormValidity();\n }\n\n openHoursToSchedule(openHours: OpenHours[]) {\n const newSchedule = {\n SUN: [],\n MON: [],\n TUE: [],\n WED: [],\n THU: [],\n FRI: [],\n SAT: [],\n };\n openHours.forEach(openHour => {\n openHour.days.forEach(day => {\n const dayKey = this.getDayKey(day);\n const start12hr = this.normalizeTimeFormat(convertTo12HourFormat(openHour.start));\n const end12hr = this.normalizeTimeFormat(convertTo12HourFormat(openHour.end));\n const timeRange = { start: start12hr, end: end12hr };\n\n // Check if the time range already exists for the day\n let timeRangeExists = false;\n if (newSchedule[dayKey]) {\n // Search for an existing time range that matches the current one\n timeRangeExists = newSchedule[dayKey].some(range => range.start === timeRange.start && range.end === timeRange.end);\n }\n\n if (!timeRangeExists) {\n if (newSchedule[dayKey]) {\n newSchedule[dayKey].push(timeRange);\n } else {\n newSchedule[dayKey] = [timeRange];\n }\n }\n });\n });\n\n this.schedule = newSchedule;\n this.scheduleChanged(this.schedule, false);\n }\n\n getDayKey(dayIndex: number): string {\n const days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];\n return days[dayIndex];\n }\n\n scheduleToOpenHours(schedule: Schedule): OpenHours[] {\n const dayKeys = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];\n const openHoursMap: Map<string, { days: number[]; start: string; end: string }> = new Map();\n\n dayKeys.forEach((dayKey, index) => {\n if (schedule[dayKey]) {\n // Check if schedule for the day exists\n schedule[dayKey].forEach(timeRange => {\n const start24hr = convertTo24HourFormat(timeRange.start);\n const end24hr = convertTo24HourFormat(timeRange.end);\n const key = `${start24hr}-${end24hr}`;\n\n if (!openHoursMap.has(key)) {\n openHoursMap.set(key, { days: [index], start: start24hr, end: end24hr });\n } else {\n const entry = openHoursMap.get(key);\n if (entry) {\n entry.days.push(index);\n openHoursMap.set(key, entry);\n }\n }\n });\n }\n });\n\n const selectedOpenHours: OpenHours[] = [];\n openHoursMap.forEach((value, _key) => {\n selectedOpenHours.push({\n days: value.days,\n start: value.start,\n end: value.end,\n timezone: this.timezone,\n });\n });\n\n return selectedOpenHours;\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 @RegisterComponent<NylasAvailabilityPicker, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-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 const timezoneOptions = Object.keys(TIMEZONE_MAP).map(key => ({\n label: TIMEZONE_MAP[key],\n value: key,\n }));\n const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.timezone);\n\n return (\n <Host>\n <div class=\"nylas-availability-picker\" part=\"nap\">\n {!this.hideHeader && (\n <div class=\"header\" part=\"nap__header\">\n <h3>{i18next.t('nylasAvailabilityPicker.headerTitle')}</h3>\n <p>\n {i18next.t('nylasAvailabilityPicker.headerSubTitle')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasAvailabilityPicker.tooltip.desc')}</span>\n </tooltip-component>\n </p>\n </div>\n )}\n <div class=\"content\">\n <div class=\"select-timezone\" part=\"nap__select-timezone\">\n <h4 class=\"sub-header\">{i18next.t('nylasAvailabilityPicker.selectTimezone')}</h4>\n {selectedTimezoneOption?.label && (\n <select-dropdown\n name=\"timezone\"\n searchPlaceholder={i18next.t('search')}\n exportparts=\"sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content\"\n options={timezoneOptions}\n defaultSelectedOption={selectedTimezoneOption}\n themeConfig={this.themeConfig}\n >\n <span slot=\"select-icon\">\n <globe-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n )}\n </div>\n <div class=\"availability\" part=\"nap__availability\">\n {Object.keys(this.schedule).map(key => {\n const day = key;\n const timeRanges = this.schedule[key] as { start: string; end: string }[];\n return (\n <div class=\"availability-day\">\n <div class=\"day\" part=\"nap__day\">\n <input\n type=\"checkbox\"\n name={day}\n id={day}\n checked={timeRanges.length > 0}\n onClick={() => {\n if (timeRanges.length > 0) {\n // Clear any time window errors for this day when toggling off\n const newTimeWindowErrors = { ...this.timeWindowErrors };\n Object.keys(newTimeWindowErrors).forEach(errorKey => {\n if (errorKey.startsWith(`${day}:`)) {\n delete newTimeWindowErrors[errorKey];\n }\n });\n this.timeWindowErrors = newTimeWindowErrors;\n\n this.schedule[day] = [];\n } else {\n this.schedule[day] = [{ start: '09:00am', end: '05:00pm' }];\n }\n this.schedule = { ...this.schedule };\n this.scheduleChanged(this.schedule);\n }}\n />\n <label htmlFor={day} aria-label=\"Select day\">\n {i18next.t(`nylasAvailabilityPicker.days.${day}`)}\n </label>\n </div>\n <div class=\"time-ranges\" part=\"nap__time-ranges\">\n {timeRanges.length ? null : <span class=\"unavailable\">{i18next.t('nylasAvailabilityPicker.unavailable')}</span>}\n {timeRanges.length > 0 &&\n timeRanges.map((timeRange, timeRangeIndex) => {\n const startKey = `${key}:${timeRangeIndex}_start`;\n const endKey = `${key}:${timeRangeIndex}_end`;\n return (\n <div class=\"time-range\" part=\"nap__time-range\">\n <div class=\"pickers\">\n <nylas-time-window-picker\n id={startKey}\n hasError={this.overlapDays[day]?.includes(timeRangeIndex) || !!this.timeWindowErrors[startKey]}\n time={timeRange.start}\n name={startKey}\n key={startKey}\n language={this.selectedLanguage}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times\"\n />\n <span> - </span>\n <nylas-time-window-picker\n id={endKey}\n hasError={this.overlapDays[day]?.includes(timeRangeIndex) || !!this.timeWindowErrors[endKey]}\n time={timeRange.end}\n name={endKey}\n key={endKey}\n minimumStartTime={timeRange.start}\n language={this.selectedLanguage}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times\"\n />\n </div>\n <button onClick={() => this.removeTimeRange(day, timeRangeIndex)}>\n <close-icon />\n </button>\n </div>\n );\n })}\n {(this.overlapDays[day] || Object.keys(this.timeWindowErrors).find(key => key.startsWith(`${day}:`) && this.timeWindowErrors[key])) && (\n <div class=\"error-message\" part=\"nap__error-message\">\n {this.overlapDays[day] ? i18next.t('nylasAvailabilityPicker.errors.overlappingTimeRanges') : ''}\n {!this.overlapDays[day] && Object.keys(this.timeWindowErrors).find(key => key.startsWith(`${day}:`) && this.timeWindowErrors[key])\n ? this.timeWindowErrors[Object.keys(this.timeWindowErrors).find(key => key.startsWith(`${day}:`) && this.timeWindowErrors[key])!]\n : ''}\n </div>\n )}\n </div>\n <div>\n {timeRanges.length > 0 ? (\n <button onClick={() => this.addTimeRange(day)} part=\"nap__add-time-range\">\n <add-circle-icon />\n </button>\n ) : null}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -7,7 +7,7 @@ import { d as defineCustomElement$5 } from './p-CEoh34h7.js';
7
7
  import { d as defineCustomElement$4 } from './p-ClTk9Ttz.js';
8
8
  import { d as defineCustomElement$3 } from './p-D7lRYhTx.js';
9
9
  import { d as defineCustomElement$2 } from './p-DeGQFlk-.js';
10
- import { d as defineCustomElement$1 } from './p-C6fgjGAL.js';
10
+ import { d as defineCustomElement$1 } from './p-DKdNE-lT.js';
11
11
 
12
12
  const nylasMinCancellationNoticeCss = ":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-min-cancellation-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-cancellation-notice{flex-direction:column;gap:0.5rem}}.nylas-min-cancellation-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-cancellation-notice label span.label-icon{margin-left:4px}.nylas-min-cancellation-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}";
13
13
 
@@ -245,6 +245,6 @@ function defineCustomElement() {
245
245
  }
246
246
 
247
247
  export { NylasMinCancellationNotice as N, defineCustomElement as d };
248
- //# sourceMappingURL=p-hDljvFV5.js.map
248
+ //# sourceMappingURL=p-DcBAJ-gA.js.map
249
249
 
250
- //# sourceMappingURL=p-hDljvFV5.js.map
250
+ //# sourceMappingURL=p-DcBAJ-gA.js.map
@@ -1 +1 @@
1
- {"file":"p-hDljvFV5.js","mappings":";;;;;;;;;;;AAAA,MAAM,6BAA6B,GAAG,4uFAA4uF;;;;;;;;;;;;;;;;MC2BrwF,0BAA0B,GAAAA,kBAAA,CAAA,MAAA,0BAAA,SAAAC,CAAA,CAAA;AANvC,IAAA,WAAA,GAAA;;;;;;AAgBU,QAAA,IAAI,CAAA,IAAA,GAAW,yBAAyB;AAmNjD;AA9KC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,+BAA+B,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QAC7E,IAAI,CAAC,IAAI,CA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MAAM,EAAE,CAAC,EAAE;AACxE,gBAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAEA,QAAO,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE;AACpE,gBAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAEA,QAAO,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE;aACvE,EACD,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAC1C,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAC1C,WAAW,EAAE,IAAI,CAAC,WAAW,GAC7B,CACH,CACG,CACD;;;;;;;;;;;;;;;;;;;;;;;;;AA9BX,UAAA,CAAA;AAVC,IAAA,iBAAiB,CAAgH;AAChI,QAAA,IAAI,EAAE,+BAA+B;QACrC,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,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAiCD,EAAA,0BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.scss?tag=nylas-min-cancellation-notice&encapsulation=shadow","src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-min-cancellation-notice {\n display: flex;\n justify-content: space-between;\n font-family: var(--nylas-font-family);\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\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\nselect-dropdown::part(sd_dropdown-button) {\n border: none;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } 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 { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-min-cancellation-notice` component is a form input for the minimum period of notice (minutes) that a guest must\n * provide to cancel a booked event.\n *\n * @part nmcn - The minimum cancellation notice container\n * @part nmcn__number-dropdown - The number dropdown container\n * @part nmcn__number-dropdown-button - The number dropdown button\n * @part nmcn__number-dropdown-content - The number dropdown content\n * @part nmcn__period-dropdown - The period dropdown container\n * @part nmcn__period-dropdown-button - The period dropdown button\n * @part nmcn__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-min-cancellation-notice',\n styleUrl: 'nylas-min-cancellation-notice.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasMinCancellationNotice {\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the min cancellation notice input.\n */\n @Prop() name: string = 'min-cancellation-notice';\n /**\n * @standalone\n * The minimum cancellation notice (minutes) stored in the configuration\n */\n @Prop() minCancellationNotice?: number;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n /**\n * The host element <nylas-min-cancellation-notice>\n */\n @Element() host!: HTMLElement;\n /**\n * The selected number of minutes for the min cancellation notice.\n */\n @State() selectedNumber;\n /**\n * The selected period for the min cancellation notice.\n */\n @State() selectedPeriod;\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-min-cancellation-notice', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newVal: Configuration) {\n const minCancellationNotice = typeof newVal?.scheduler?.min_cancellation_notice !== 'undefined' ? newVal?.scheduler?.min_cancellation_notice : this.minCancellationNotice || 0;\n if (typeof minCancellationNotice === 'number') {\n this.updateNumberAndPeriodFromMinutes(minCancellationNotice);\n }\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(minCancellationNotice?.toString(), this.name);\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 /**\n * This event is fired when the value of the min cancellation notice changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-min-cancellation-notice', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-min-cancellation-notice', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-min-cancellation-notice', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.updateNumberAndPeriodFromMinutes(this.minCancellationNotice || 0);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-min-cancellation-notice', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let totalMinutes;\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n\n if (period === 'minute') {\n totalMinutes = number;\n } else if (period === 'hour') {\n totalMinutes = number * minutesInHour;\n } else if (period === 'day') {\n totalMinutes = number * minutesInDay;\n } else if (period === 'week') {\n totalMinutes = number * minutesInWeek;\n } else if (period === 'month') {\n totalMinutes = number * minutesInMonth;\n } else {\n totalMinutes = 0;\n }\n this.valueChanged.emit({ value: totalMinutes, name: this.name });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(totalMinutes.toString(), this.name);\n }\n\n private updateNumberAndPeriodFromMinutes(minutes: number): void {\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n let number, period;\n\n if (minutes === 0) {\n number = 0;\n period = 'minute';\n } else if (minutes % minutesInMonth === 0 && minutes >= minutesInMonth) {\n number = minutes / minutesInMonth;\n period = 'month';\n } else if (minutes % minutesInWeek === 0 && minutes >= minutesInWeek) {\n number = minutes / minutesInWeek;\n period = 'week';\n } else if (minutes % minutesInDay === 0 && minutes >= minutesInDay) {\n number = minutes / minutesInDay;\n period = 'day';\n } else if (minutes % minutesInHour === 0 && minutes >= minutesInHour) {\n number = minutes / minutesInHour;\n period = 'hour';\n } else {\n number = minutes;\n period = 'minute';\n }\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @RegisterComponent<NylasMinCancellationNotice, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-min-cancellation-notice',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const showTimePeriodSelector = typeof this.selectedNumber == 'number' && typeof this.selectedPeriod == 'string';\n return (\n <Host>\n <div class=\"nylas-min-cancellation-notice\" part=\"nmcn\">\n <label>\n {i18next.t('nylasMinCancellationNotice.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasMinCancellationNotice.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n {showTimePeriodSelector && (\n <time-period-selector\n id=\"min-cancellation-notice\"\n exportparts=\"tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content\"\n timePeriods={[\n { value: 'minute', label: i18next.t('timeDuration', { context: 'minute' }) },\n { value: 'hour', label: i18next.t('timeDuration', { context: 'hour' }) },\n { value: 'day', label: i18next.t('timePeriod', { context: 'day' }) },\n { value: 'week', label: i18next.t('timePeriod', { context: 'week' }) },\n ]}\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-DcBAJ-gA.js","mappings":";;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.scss?tag=nylas-min-cancellation-notice&encapsulation=shadow","src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-min-cancellation-notice {\n display: flex;\n justify-content: space-between;\n font-family: var(--nylas-font-family);\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\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\nselect-dropdown::part(sd_dropdown-button) {\n border: none;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } 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 { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-min-cancellation-notice` component is a form input for the minimum period of notice (minutes) that a guest must\n * provide to cancel a booked event.\n *\n * @part nmcn - The minimum cancellation notice container\n * @part nmcn__number-dropdown - The number dropdown container\n * @part nmcn__number-dropdown-button - The number dropdown button\n * @part nmcn__number-dropdown-content - The number dropdown content\n * @part nmcn__period-dropdown - The period dropdown container\n * @part nmcn__period-dropdown-button - The period dropdown button\n * @part nmcn__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-min-cancellation-notice',\n styleUrl: 'nylas-min-cancellation-notice.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasMinCancellationNotice {\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the min cancellation notice input.\n */\n @Prop() name: string = 'min-cancellation-notice';\n /**\n * @standalone\n * The minimum cancellation notice (minutes) stored in the configuration\n */\n @Prop() minCancellationNotice?: number;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n /**\n * The host element <nylas-min-cancellation-notice>\n */\n @Element() host!: HTMLElement;\n /**\n * The selected number of minutes for the min cancellation notice.\n */\n @State() selectedNumber;\n /**\n * The selected period for the min cancellation notice.\n */\n @State() selectedPeriod;\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-min-cancellation-notice', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newVal: Configuration) {\n const minCancellationNotice = typeof newVal?.scheduler?.min_cancellation_notice !== 'undefined' ? newVal?.scheduler?.min_cancellation_notice : this.minCancellationNotice || 0;\n if (typeof minCancellationNotice === 'number') {\n this.updateNumberAndPeriodFromMinutes(minCancellationNotice);\n }\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(minCancellationNotice?.toString(), this.name);\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 /**\n * This event is fired when the value of the min cancellation notice changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-min-cancellation-notice', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-min-cancellation-notice', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-min-cancellation-notice', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.updateNumberAndPeriodFromMinutes(this.minCancellationNotice || 0);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-min-cancellation-notice', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let totalMinutes;\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n\n if (period === 'minute') {\n totalMinutes = number;\n } else if (period === 'hour') {\n totalMinutes = number * minutesInHour;\n } else if (period === 'day') {\n totalMinutes = number * minutesInDay;\n } else if (period === 'week') {\n totalMinutes = number * minutesInWeek;\n } else if (period === 'month') {\n totalMinutes = number * minutesInMonth;\n } else {\n totalMinutes = 0;\n }\n this.valueChanged.emit({ value: totalMinutes, name: this.name });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(totalMinutes.toString(), this.name);\n }\n\n private updateNumberAndPeriodFromMinutes(minutes: number): void {\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n let number, period;\n\n if (minutes === 0) {\n number = 0;\n period = 'minute';\n } else if (minutes % minutesInMonth === 0 && minutes >= minutesInMonth) {\n number = minutes / minutesInMonth;\n period = 'month';\n } else if (minutes % minutesInWeek === 0 && minutes >= minutesInWeek) {\n number = minutes / minutesInWeek;\n period = 'week';\n } else if (minutes % minutesInDay === 0 && minutes >= minutesInDay) {\n number = minutes / minutesInDay;\n period = 'day';\n } else if (minutes % minutesInHour === 0 && minutes >= minutesInHour) {\n number = minutes / minutesInHour;\n period = 'hour';\n } else {\n number = minutes;\n period = 'minute';\n }\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @RegisterComponent<NylasMinCancellationNotice, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-min-cancellation-notice',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const showTimePeriodSelector = typeof this.selectedNumber == 'number' && typeof this.selectedPeriod == 'string';\n return (\n <Host>\n <div class=\"nylas-min-cancellation-notice\" part=\"nmcn\">\n <label>\n {i18next.t('nylasMinCancellationNotice.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasMinCancellationNotice.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n {showTimePeriodSelector && (\n <time-period-selector\n id=\"min-cancellation-notice\"\n exportparts=\"tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content\"\n timePeriods={[\n { value: 'minute', label: i18next.t('timeDuration', { context: 'minute' }) },\n { value: 'hour', label: i18next.t('timeDuration', { context: 'hour' }) },\n { value: 'day', label: i18next.t('timePeriod', { context: 'day' }) },\n { value: 'week', label: i18next.t('timePeriod', { context: 'week' }) },\n ]}\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -7,7 +7,7 @@ import { d as defineCustomElement$5 } from './p-7S1M5IE9.js';
7
7
  import { d as defineCustomElement$4 } from './p-1vC2UMtR.js';
8
8
  import { d as defineCustomElement$3 } from './p-CEoh34h7.js';
9
9
  import { d as defineCustomElement$2 } from './p-CtDBRmwI.js';
10
- import { d as defineCustomElement$1 } from './p-C6fgjGAL.js';
10
+ import { d as defineCustomElement$1 } from './p-DKdNE-lT.js';
11
11
 
12
12
  const nylasAdditionalParticipantsCss = ":host{display:block;margin:1rem;--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-additional-participants__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem;background-color:var(--nylas-base-25)}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_group label span.org-as-participant{width:max-content}.nylas-additional-participants__error{color:var(--nylas-error);font-size:14px;font-family:var(--nylas-font-family);font-weight:400;line-height:16px;margin:0;text-align:left}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-300)}.nylas-additional-participants__input_wrapper.error{border-color:var(--nylas-error)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;border-left:1px solid var(--nylas-base-300);background:none;cursor:pointer;color:var(--nylas-base-800)}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{border:none}.nylas-additional-participants__input{flex:1;display:flex;justify-content:space-between}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__input input-dropdown{width:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown){width:100%;height:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown-input){height:100%;border-radius:var(--nylas-border-radius-2x);border:none;border-top-right-radius:initial;border-bottom-right-radius:initial;padding-left:16px}.nylas-additional-participants__input input-component::part(ic__input){background:var(--nylas-base-50)}.nylas-additional-participants__input input-component::part(ic__label){font-size:14px}.nylas-additional-participants__input input-component div.required-input{display:flex;gap:4px}.nylas-additional-participants__input input-component div.required-input label{display:flex;gap:4px;align-items:center}.nylas-additional-participants__input input-component div.required-input label tooltip-component#organizer_participant_tooltip::part(tc__content){left:-84px}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer;color:var(--nylas-base-800)}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}";
13
13
 
@@ -316,6 +316,6 @@ function defineCustomElement() {
316
316
  }
317
317
 
318
318
  export { NylasAdditionalParticipants as N, defineCustomElement as d };
319
- //# sourceMappingURL=p-CpcxmM9o.js.map
319
+ //# sourceMappingURL=p-Drzrlmky.js.map
320
320
 
321
- //# sourceMappingURL=p-CpcxmM9o.js.map
321
+ //# sourceMappingURL=p-Drzrlmky.js.map
@@ -1 +1 @@
1
- {"file":"p-CpcxmM9o.js","mappings":";;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,+uKAA+uK;;;;;;;;;;;;;;;;MC6CzwK,2BAA2B,GAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AANxC,IAAA,WAAA,GAAA;;;;;;AAYU,QAAA,IAAI,CAAA,IAAA,GAAW,cAAc;QA0C5B,IAAA,CAAA,YAAY,GAAkB,IAAI,CAAC,iBAAiB,IAAI,EAAE;AAC1D,QAAA,IAAiB,CAAA,iBAAA,GAA8B,EAAE;AACjD,QAAA,IAA6B,CAAA,6BAAA,GAAY,IAAI;AAC7C,QAAA,IAAkB,CAAA,kBAAA,GAAY,KAAK;AACnC,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAClB,QAAA,IAAa,CAAA,aAAA,GAAW,EAAE;AAC1B,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE;AAiUnC;AAjTC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,+BAA+B,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QAC7E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAK1C,IAAA,iDAAiD,CAAC,QAAiB,EAAE,SAAkB,EAAE,QAAgB,EAAA;QACvG,KAAK,CAAC,+BAA+B,EAAE,mDAAmD,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC;AAEvH,QAAA,IAAI,QAAQ,KAAK,uBAAuB,EAAE;YACxC,IAAI,CAAC,WAAW,CAAC,QAAyB,EAAE,IAA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C,MAAM,GAAG;AAC1B,cAAEA,QAAO,CAAC,CAAC,CAAC,4CAA4C,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;AAC7E,cAAEA,QAAO,CAAC,CAAC,CAAC,4CAA4C,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAC5E,CACA,CACL,CACU,CACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3GX,UAAA,CAAA;AAbC,IAAA,iBAAiB,CAAiH;AACjI,QAAA,IAAI,EAAE,+BAA+B;QACrC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,6BAA6B,EAAE,aAAa,CAAC;YAC9C,CAAC,2BAA2B,EAAE,sBAAsB,CAAC;YACrD,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;;;;CA8GD,EAAA,2BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.scss?tag=nylas-additional-participants&encapsulation=shadow","src/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n margin: 1rem;\n @include default-css-variables;\n}\n\n.nylas-additional-participants__title {\n color: var(--nylas-base-900);\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n /* 125% */\n margin: 0;\n text-align: left;\n}\n\n.nylas-additional-participants__subtitle {\n color: var(--nylas-base-600);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n /* 142.857% */\n margin: 0.25rem 0px 0px;\n text-align: left;\n}\n\n.nylas-additional-participants__content {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n background-color: var(--nylas-base-25);\n}\n\n.nylas-additional-participants__input_group {\n padding-top: 8px;\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n span.org-as-participant {\n width: max-content;\n }\n }\n}\n\n.nylas-additional-participants__error {\n color: var(--nylas-error);\n font-size: 14px;\n font-family: var(--nylas-font-family);\n font-weight: 400;\n line-height: 16px;\n margin: 0;\n text-align: left;\n}\n\n.nylas-additional-participants__input_wrapper {\n display: flex;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-300);\n\n &.error {\n border-color: var(--nylas-error);\n }\n\n button {\n padding: 12px;\n border: none;\n border-left: 1px solid var(--nylas-base-300);\n background: none;\n cursor: pointer;\n color: var(--nylas-base-800);\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n }\n}\n\n.nylas-additional-participants__input_wrapper_organizer {\n border: none;\n}\n\n.nylas-additional-participants__input {\n flex: 1;\n display: flex;\n justify-content: space-between;\n\n input {\n border: none;\n outline: none;\n background: none;\n width: 100%;\n }\n\n input-dropdown {\n width: 100%;\n }\n\n input-dropdown::part(id_dropdown) {\n width: 100%;\n height: 100%;\n }\n\n input-dropdown::part(id_dropdown-input) {\n height: 100%;\n border-radius: var(--nylas-border-radius-2x);\n border: none;\n border-top-right-radius: initial;\n border-bottom-right-radius: initial;\n padding-left: 16px;\n }\n\n input-component::part(ic__input) {\n background: var(--nylas-base-50);\n }\n\n input-component::part(ic__label) {\n font-size: 14px;\n }\n\n input-component {\n div.required-input {\n display: flex;\n gap: 4px;\n\n label {\n display: flex;\n gap: 4px;\n align-items: center;\n\n tooltip-component#organizer_participant_tooltip::part(tc__content) {\n left: -84px;\n }\n }\n }\n }\n}\n\n.nylas-additional-participants__add {\n padding: 12px;\n display: flex;\n align-items: center;\n border: none;\n background: none;\n cursor: pointer;\n color: var(--nylas-base-800);\n\n span {\n padding: 0 8px;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n }\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\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, Host, Prop, State, Watch, h, Element, Listen, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Event } from '@stencil/core';\nimport { AdditionalParticipant, Calendar, Configuration, ThemeConfig } from '@nylas/core';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\ntype Participant = {\n name?: string;\n email: string;\n is_valid?: boolean;\n is_organizer?: boolean;\n availability?: Availability;\n booking?: Booking;\n};\ntype Availability = {\n calendar_ids: string[];\n};\ntype Booking = {\n calendar_id: string;\n};\n\n/**\n * The `nylas-additional-participants` component is a form input for adding additional participants to an event.\n *\n * @part nadtnlpart__title - The title of the component.\n * @part nadtnlpart__subtitle - The subtitle of the component.\n * @part nadtnlpart__content - The content of the component.\n * @part nadtnlpart__input_group - The input group of the component.\n * @part nadtnlpart__input_wrapper - The input wrapper of the component.\n * @part nadtnlpart__input - The input of the component.\n * @part nadtnlpart__remove-participant - The remove participant button of the component.\n * @part nadtnlpart__add-participant - The add participant button of the component.\n *\n */\n@Component({\n tag: 'nylas-additional-participants',\n styleUrl: 'nylas-additional-participants.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasAdditionalParticipants {\n @Element() host!: HTMLNylasAdditionalParticipantsElement;\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'participants';\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The logged in user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The list of user's calendars.\n */\n @Prop() currentUserCalendars?: Calendar[];\n /**\n * @standalone\n * The additional participants options from the config\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n /**\n * @standalone\n * The event participants\n */\n @Prop() eventParticipants?: Participant[];\n /**\n * @standalone\n * If the config is round robin\n */\n @Prop() roundRobinConfig?: boolean;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n @AttachInternals() internals!: ElementInternals;\n @State() participants: Participant[] = this.eventParticipants ?? [];\n @State() participantErrors: { [key: string]: string } = {};\n @State() includeOrganizerAsParticipant: boolean = true;\n @State() isRoundRobinConfig: boolean = false;\n @State() error: string = '';\n @State() requiredError: string = '';\n @State() patternError: string = '';\n\n /**\n * This event is fired when the selected participants change.\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-additional-participants', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('currentUser')\n @Watch('selectedConfiguration')\n selectedConfigurationAndCurrentUserChangedHandler(newValue: unknown, _oldValue: unknown, propName: string) {\n debug('nylas-additional-participants', 'selectedConfigurationAndCurrentUserChangedHandler', newValue, this.currentUser);\n\n if (propName === 'selectedConfiguration') {\n this.updateState(newValue as Configuration, this.currentUser, false);\n } else if (propName === 'currentUser') {\n this.updateState(this.selectedConfiguration, newValue as User, false);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n this.requiredError = i18next.t('fieldRequired', { field: i18next.t('email') });\n this.patternError = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n if (this.error) {\n this.error = i18next.t('nylasAdditionalParticipants.error');\n }\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n connectedCallback() {\n debug('nylas-additional-participants', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-additional-participants', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-additional-participants', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.updateState(this.selectedConfiguration, this.currentUser, false);\n } else if (this.eventParticipants) {\n this.participants = this.eventParticipants || [];\n this.isRoundRobinConfig = this.roundRobinConfig || false;\n this.updateFormValue(true);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-additional-participants', 'disconnectedCallback');\n }\n\n private updateState(selectedConfig?: Configuration, currentUser?: User, valueChanged: boolean = true) {\n this.isRoundRobinConfig = selectedConfig?.availability?.availability_rules?.availability_method\n ? selectedConfig?.availability?.availability_rules?.availability_method !== 'collective'\n : false;\n this.participants = selectedConfig?.participants || this.eventParticipants || [];\n this.includeOrganizerAsParticipant = this.isRoundRobinConfig && this.participants.find(p => p.email === currentUser?.email) ? true : false;\n this.updateOrganizerAsParticipant(valueChanged);\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';\n }\n\n @Listen('inputOptionChanged')\n onInputOptionChanged(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-additional-participants', 'onInputOptionChanged');\n const EMAIL_REGEX = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n const index = event.detail.name;\n const participant = this.participantOptions?.find(participant => participant.email === event.detail.value);\n\n if (!participant && this.isRoundRobinConfig) {\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'For round robin configuration, participant should be selected from the dropdown.');\n this.participantErrors[index] = 'For round robin page, participant should be selected from the dropdown.';\n this.participants[index].is_valid = false;\n this.participants = [...this.participants];\n return;\n } else if (!participant && !EMAIL_REGEX.test(event.detail.value)) {\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, i18next.t('nylasAdditionalParticipants.error_email'));\n this.participantErrors[index] = i18next.t('nylasAdditionalParticipants.error_email');\n this.participants[index].is_valid = false;\n this.participants = [...this.participants];\n return;\n } else {\n this.participantErrors[index] = '';\n this.participants[index].is_valid = true;\n this.isInternalsAvailable && this.internals.setValidity({});\n }\n this.participants[index].email = event.detail.value;\n // Default to the is_primary calendar if available, otherwise first calendar for all participants\n const primaryCalendar = participant?.calendars?.find(calendar => calendar.is_primary);\n this.participants[index].availability =\n participant && primaryCalendar?.id ? { calendar_ids: [primaryCalendar.id] } : participant?.calendars[0]?.id ? { calendar_ids: [participant.calendars[0].id] } : undefined;\n // If round-robin config, set booking calendar to is_primary if available, otherwise first calendar for all participants\n this.participants[index].booking =\n participant && this.isRoundRobinConfig && primaryCalendar?.id\n ? { calendar_id: primaryCalendar.id }\n : this.isRoundRobinConfig && participant?.calendars[0]?.id\n ? { calendar_id: participant.calendars[0].id }\n : undefined;\n this.participants[index].name = participant?.name || event.detail.value;\n this.participants = [...this.participants];\n this.updateFormValue();\n }\n\n updateOrganizerAsParticipant(valueChanged: boolean = true) {\n const findCurrentUserInParticipants = this.participants.find(p => p.email === this.currentUser?.email);\n if (this.isRoundRobinConfig && !findCurrentUserInParticipants && this.currentUser?.email) {\n const bookingCalendarDefault = this.currentUserCalendars?.find(calendar => calendar.is_primary)?.id || this.currentUserCalendars?.[0]?.id || 'primary';\n this.participants = [\n {\n name: this.currentUser?.name,\n email: this.currentUser?.email,\n is_organizer: true,\n availability: {\n calendar_ids: [bookingCalendarDefault],\n },\n booking: {\n calendar_id: bookingCalendarDefault,\n },\n },\n ...this.participants,\n ];\n }\n this.updateFormValue(valueChanged);\n }\n\n addParticipant() {\n debug('nylas-additional-participants', 'addParticipant');\n this.participants = [...this.participants, { name: '', email: '', is_organizer: false }];\n this.updateFormValue();\n }\n removeParticipant(index: number) {\n debug('nylas-additional-participants', 'removeParticipant');\n this.participants = this.participants.filter((_, i) => i !== index);\n this.updateFormValue();\n }\n\n updateFormValue(valueChanged = true) {\n debug('nylas-additional-participants', 'updateFormValue');\n const participants = this.isRoundRobinConfig ? (this.includeOrganizerAsParticipant ? this.participants : this.participants.filter(p => !p.is_organizer)) : this.participants;\n if (participants.length === 0) {\n this.error = i18next.t('nylasAdditionalParticipants.error');\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, this.error);\n } else {\n this.isInternalsAvailable && this.internals.setValidity({});\n this.error = '';\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participants), this.name);\n if (valueChanged) {\n this.valueChanged.emit({ value: JSON.stringify(participants), name: this.name });\n }\n }\n }\n\n // Filter out the participants that are already added\n getArrayDifference(array1: AdditionalParticipant[], array2: Participant[]) {\n const filtered = array1.filter(participant1 => !array2.some(participant2 => participant1.email === participant2.email));\n return filtered.map(participant => {\n return { value: participant.email, label: participant.email };\n });\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 @RegisterComponent<NylasAdditionalParticipants, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-additional-participants',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.calendars', 'currentUserCalendars'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"nadtnlpart\">\n <nylas-form-card exportparts=\"nfc, nfc__header\" themeConfig={this.themeConfig}>\n <h3 slot=\"header-title\" class=\"nylas-additional-participants__title\" part=\"nadtnlpart__title\">\n {i18next.t('nylasAdditionalParticipants.headerTitle')}\n </h3>\n <p slot=\"header-subtitle\" class=\"nylas-additional-participants__subtitle\" part=\"nadtnlpart__subtitle\">\n {i18next.t('nylasAdditionalParticipants.headerSubTitle')}\n </p>\n <div slot=\"content\" class=\"nylas-additional-participants__content\" part=\"nadtnlpart__content\">\n <div>\n {this.participants.map((participant, index) => {\n return (\n <div class={'nylas-additional-participants__input_group'} part=\"nadtnlpart__input_group\">\n {!participant.is_organizer && <label>{`${i18next.t('nylasAdditionalParticipants.participant')} ${index}`}</label>}\n <div\n part=\"nadtnlpart__input_wrapper\"\n class={{\n 'nylas-additional-participants__input_wrapper': true,\n 'nylas-additional-participants__input_wrapper_organizer': participant?.is_organizer === true,\n 'nylas-additional-participants__input_wrapper_invalid': participant.is_valid === false,\n 'error': participant.is_valid === false,\n }}\n >\n <div class={{ 'nylas-additional-participants__input': true, 'organizer': participant?.is_organizer === true }} part=\"nadtnlpart__input\">\n {participant.is_organizer ? (\n <input-component\n class={'label-input'}\n name={`${index}`}\n key={index}\n label={i18next.t('nylasAdditionalParticipants.organizer')}\n required={false}\n requiredError={this.requiredError}\n patternError={this.patternError}\n readOnly={participant.is_organizer}\n defaultValue={participant.email}\n themeConfig={this.themeConfig}\n >\n {this.isRoundRobinConfig && (\n <div class=\"required-input\" slot=\"additional-input\">\n <input\n type=\"checkbox\"\n name={`organizer_participant`}\n id={`organizer_participant`}\n onClick={() => {\n this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant;\n this.updateFormValue();\n }}\n checked={this.includeOrganizerAsParticipant}\n />\n <label htmlFor={`organizer_participant`} aria-label=\"Include as participant\">\n <span class=\"org-as-participant\" part=\"nadtnlpart__org-as-participant\">\n {i18next.t('nylasAdditionalParticipants.organizerAsParticipant')}\n </span>\n <tooltip-component id=\"organizer_participant_tooltip\">\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n <strong>{i18next.t('nylasAdditionalParticipants.tooltip.includeOrganizer')}:</strong>{' '}\n {i18next.t('nylasAdditionalParticipants.tooltip.includeOrganizerDesc')} <br />\n <strong>{i18next.t('nylasAdditionalParticipants.tooltip.excludeOrganizer')}:</strong>{' '}\n {i18next.t('nylasAdditionalParticipants.tooltip.excludeOrganizerDesc')}\n </span>\n </tooltip-component>\n </label>\n </div>\n )}\n </input-component>\n ) : (\n <input-dropdown\n id={`${index}`}\n name={`${index}`}\n filterable={true}\n inputValue={participant.email}\n options={this.getArrayDifference(this.participantOptions || [], this.participants)}\n themeConfig={this.themeConfig}\n />\n )}\n {!participant.is_organizer && (\n <button onClick={() => this.removeParticipant(index)} part=\"nadtnlpart__remove-participant\">\n <close-icon />\n </button>\n )}\n </div>\n </div>\n {!participant.is_valid && (\n <p class=\"nylas-additional-participants__error\" part=\"nadtnlpart__error\">\n {this.participantErrors[index]}\n </p>\n )}\n </div>\n );\n })}\n <p class=\"nylas-additional-participants__error\" part=\"nadtnlpart__error\">\n {this.error}\n </p>\n </div>\n <button class=\"nylas-additional-participants__add\" part=\"nadtnlpart__add-participant\" onClick={() => this.addParticipant()}>\n <add-circle-icon />{' '}\n <span>\n {this.participants.length > 1\n ? i18next.t('nylasAdditionalParticipants.addParticipant', { context: 'next' })\n : i18next.t('nylasAdditionalParticipants.addParticipant', { context: 'first' })}\n </span>\n </button>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-Drzrlmky.js","mappings":";;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,+uKAA+uK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QAAA,IAAI,EAAE,+BAA+B;QACrC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,6BAA6B,EAAE,aAAa,CAAC;YAC9C,CAAC,2BAA2B,EAAE,sBAAsB,CAAC;YACrD,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;;;;CA8GD,EAAA,2BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.scss?tag=nylas-additional-participants&encapsulation=shadow","src/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n margin: 1rem;\n @include default-css-variables;\n}\n\n.nylas-additional-participants__title {\n color: var(--nylas-base-900);\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n /* 125% */\n margin: 0;\n text-align: left;\n}\n\n.nylas-additional-participants__subtitle {\n color: var(--nylas-base-600);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n /* 142.857% */\n margin: 0.25rem 0px 0px;\n text-align: left;\n}\n\n.nylas-additional-participants__content {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n background-color: var(--nylas-base-25);\n}\n\n.nylas-additional-participants__input_group {\n padding-top: 8px;\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n span.org-as-participant {\n width: max-content;\n }\n }\n}\n\n.nylas-additional-participants__error {\n color: var(--nylas-error);\n font-size: 14px;\n font-family: var(--nylas-font-family);\n font-weight: 400;\n line-height: 16px;\n margin: 0;\n text-align: left;\n}\n\n.nylas-additional-participants__input_wrapper {\n display: flex;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-300);\n\n &.error {\n border-color: var(--nylas-error);\n }\n\n button {\n padding: 12px;\n border: none;\n border-left: 1px solid var(--nylas-base-300);\n background: none;\n cursor: pointer;\n color: var(--nylas-base-800);\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n }\n}\n\n.nylas-additional-participants__input_wrapper_organizer {\n border: none;\n}\n\n.nylas-additional-participants__input {\n flex: 1;\n display: flex;\n justify-content: space-between;\n\n input {\n border: none;\n outline: none;\n background: none;\n width: 100%;\n }\n\n input-dropdown {\n width: 100%;\n }\n\n input-dropdown::part(id_dropdown) {\n width: 100%;\n height: 100%;\n }\n\n input-dropdown::part(id_dropdown-input) {\n height: 100%;\n border-radius: var(--nylas-border-radius-2x);\n border: none;\n border-top-right-radius: initial;\n border-bottom-right-radius: initial;\n padding-left: 16px;\n }\n\n input-component::part(ic__input) {\n background: var(--nylas-base-50);\n }\n\n input-component::part(ic__label) {\n font-size: 14px;\n }\n\n input-component {\n div.required-input {\n display: flex;\n gap: 4px;\n\n label {\n display: flex;\n gap: 4px;\n align-items: center;\n\n tooltip-component#organizer_participant_tooltip::part(tc__content) {\n left: -84px;\n }\n }\n }\n }\n}\n\n.nylas-additional-participants__add {\n padding: 12px;\n display: flex;\n align-items: center;\n border: none;\n background: none;\n cursor: pointer;\n color: var(--nylas-base-800);\n\n span {\n padding: 0 8px;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n }\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\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, Host, Prop, State, Watch, h, Element, Listen, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Event } from '@stencil/core';\nimport { AdditionalParticipant, Calendar, Configuration, ThemeConfig } from '@nylas/core';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\ntype Participant = {\n name?: string;\n email: string;\n is_valid?: boolean;\n is_organizer?: boolean;\n availability?: Availability;\n booking?: Booking;\n};\ntype Availability = {\n calendar_ids: string[];\n};\ntype Booking = {\n calendar_id: string;\n};\n\n/**\n * The `nylas-additional-participants` component is a form input for adding additional participants to an event.\n *\n * @part nadtnlpart__title - The title of the component.\n * @part nadtnlpart__subtitle - The subtitle of the component.\n * @part nadtnlpart__content - The content of the component.\n * @part nadtnlpart__input_group - The input group of the component.\n * @part nadtnlpart__input_wrapper - The input wrapper of the component.\n * @part nadtnlpart__input - The input of the component.\n * @part nadtnlpart__remove-participant - The remove participant button of the component.\n * @part nadtnlpart__add-participant - The add participant button of the component.\n *\n */\n@Component({\n tag: 'nylas-additional-participants',\n styleUrl: 'nylas-additional-participants.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasAdditionalParticipants {\n @Element() host!: HTMLNylasAdditionalParticipantsElement;\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'participants';\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The logged in user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The list of user's calendars.\n */\n @Prop() currentUserCalendars?: Calendar[];\n /**\n * @standalone\n * The additional participants options from the config\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n /**\n * @standalone\n * The event participants\n */\n @Prop() eventParticipants?: Participant[];\n /**\n * @standalone\n * If the config is round robin\n */\n @Prop() roundRobinConfig?: boolean;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n @AttachInternals() internals!: ElementInternals;\n @State() participants: Participant[] = this.eventParticipants ?? [];\n @State() participantErrors: { [key: string]: string } = {};\n @State() includeOrganizerAsParticipant: boolean = true;\n @State() isRoundRobinConfig: boolean = false;\n @State() error: string = '';\n @State() requiredError: string = '';\n @State() patternError: string = '';\n\n /**\n * This event is fired when the selected participants change.\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-additional-participants', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('currentUser')\n @Watch('selectedConfiguration')\n selectedConfigurationAndCurrentUserChangedHandler(newValue: unknown, _oldValue: unknown, propName: string) {\n debug('nylas-additional-participants', 'selectedConfigurationAndCurrentUserChangedHandler', newValue, this.currentUser);\n\n if (propName === 'selectedConfiguration') {\n this.updateState(newValue as Configuration, this.currentUser, false);\n } else if (propName === 'currentUser') {\n this.updateState(this.selectedConfiguration, newValue as User, false);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n this.requiredError = i18next.t('fieldRequired', { field: i18next.t('email') });\n this.patternError = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n if (this.error) {\n this.error = i18next.t('nylasAdditionalParticipants.error');\n }\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n connectedCallback() {\n debug('nylas-additional-participants', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-additional-participants', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-additional-participants', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.updateState(this.selectedConfiguration, this.currentUser, false);\n } else if (this.eventParticipants) {\n this.participants = this.eventParticipants || [];\n this.isRoundRobinConfig = this.roundRobinConfig || false;\n this.updateFormValue(true);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-additional-participants', 'disconnectedCallback');\n }\n\n private updateState(selectedConfig?: Configuration, currentUser?: User, valueChanged: boolean = true) {\n this.isRoundRobinConfig = selectedConfig?.availability?.availability_rules?.availability_method\n ? selectedConfig?.availability?.availability_rules?.availability_method !== 'collective'\n : false;\n this.participants = selectedConfig?.participants || this.eventParticipants || [];\n this.includeOrganizerAsParticipant = this.isRoundRobinConfig && this.participants.find(p => p.email === currentUser?.email) ? true : false;\n this.updateOrganizerAsParticipant(valueChanged);\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';\n }\n\n @Listen('inputOptionChanged')\n onInputOptionChanged(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-additional-participants', 'onInputOptionChanged');\n const EMAIL_REGEX = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n const index = event.detail.name;\n const participant = this.participantOptions?.find(participant => participant.email === event.detail.value);\n\n if (!participant && this.isRoundRobinConfig) {\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'For round robin configuration, participant should be selected from the dropdown.');\n this.participantErrors[index] = 'For round robin page, participant should be selected from the dropdown.';\n this.participants[index].is_valid = false;\n this.participants = [...this.participants];\n return;\n } else if (!participant && !EMAIL_REGEX.test(event.detail.value)) {\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, i18next.t('nylasAdditionalParticipants.error_email'));\n this.participantErrors[index] = i18next.t('nylasAdditionalParticipants.error_email');\n this.participants[index].is_valid = false;\n this.participants = [...this.participants];\n return;\n } else {\n this.participantErrors[index] = '';\n this.participants[index].is_valid = true;\n this.isInternalsAvailable && this.internals.setValidity({});\n }\n this.participants[index].email = event.detail.value;\n // Default to the is_primary calendar if available, otherwise first calendar for all participants\n const primaryCalendar = participant?.calendars?.find(calendar => calendar.is_primary);\n this.participants[index].availability =\n participant && primaryCalendar?.id ? { calendar_ids: [primaryCalendar.id] } : participant?.calendars[0]?.id ? { calendar_ids: [participant.calendars[0].id] } : undefined;\n // If round-robin config, set booking calendar to is_primary if available, otherwise first calendar for all participants\n this.participants[index].booking =\n participant && this.isRoundRobinConfig && primaryCalendar?.id\n ? { calendar_id: primaryCalendar.id }\n : this.isRoundRobinConfig && participant?.calendars[0]?.id\n ? { calendar_id: participant.calendars[0].id }\n : undefined;\n this.participants[index].name = participant?.name || event.detail.value;\n this.participants = [...this.participants];\n this.updateFormValue();\n }\n\n updateOrganizerAsParticipant(valueChanged: boolean = true) {\n const findCurrentUserInParticipants = this.participants.find(p => p.email === this.currentUser?.email);\n if (this.isRoundRobinConfig && !findCurrentUserInParticipants && this.currentUser?.email) {\n const bookingCalendarDefault = this.currentUserCalendars?.find(calendar => calendar.is_primary)?.id || this.currentUserCalendars?.[0]?.id || 'primary';\n this.participants = [\n {\n name: this.currentUser?.name,\n email: this.currentUser?.email,\n is_organizer: true,\n availability: {\n calendar_ids: [bookingCalendarDefault],\n },\n booking: {\n calendar_id: bookingCalendarDefault,\n },\n },\n ...this.participants,\n ];\n }\n this.updateFormValue(valueChanged);\n }\n\n addParticipant() {\n debug('nylas-additional-participants', 'addParticipant');\n this.participants = [...this.participants, { name: '', email: '', is_organizer: false }];\n this.updateFormValue();\n }\n removeParticipant(index: number) {\n debug('nylas-additional-participants', 'removeParticipant');\n this.participants = this.participants.filter((_, i) => i !== index);\n this.updateFormValue();\n }\n\n updateFormValue(valueChanged = true) {\n debug('nylas-additional-participants', 'updateFormValue');\n const participants = this.isRoundRobinConfig ? (this.includeOrganizerAsParticipant ? this.participants : this.participants.filter(p => !p.is_organizer)) : this.participants;\n if (participants.length === 0) {\n this.error = i18next.t('nylasAdditionalParticipants.error');\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, this.error);\n } else {\n this.isInternalsAvailable && this.internals.setValidity({});\n this.error = '';\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participants), this.name);\n if (valueChanged) {\n this.valueChanged.emit({ value: JSON.stringify(participants), name: this.name });\n }\n }\n }\n\n // Filter out the participants that are already added\n getArrayDifference(array1: AdditionalParticipant[], array2: Participant[]) {\n const filtered = array1.filter(participant1 => !array2.some(participant2 => participant1.email === participant2.email));\n return filtered.map(participant => {\n return { value: participant.email, label: participant.email };\n });\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 @RegisterComponent<NylasAdditionalParticipants, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-additional-participants',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.calendars', 'currentUserCalendars'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"nadtnlpart\">\n <nylas-form-card exportparts=\"nfc, nfc__header\" themeConfig={this.themeConfig}>\n <h3 slot=\"header-title\" class=\"nylas-additional-participants__title\" part=\"nadtnlpart__title\">\n {i18next.t('nylasAdditionalParticipants.headerTitle')}\n </h3>\n <p slot=\"header-subtitle\" class=\"nylas-additional-participants__subtitle\" part=\"nadtnlpart__subtitle\">\n {i18next.t('nylasAdditionalParticipants.headerSubTitle')}\n </p>\n <div slot=\"content\" class=\"nylas-additional-participants__content\" part=\"nadtnlpart__content\">\n <div>\n {this.participants.map((participant, index) => {\n return (\n <div class={'nylas-additional-participants__input_group'} part=\"nadtnlpart__input_group\">\n {!participant.is_organizer && <label>{`${i18next.t('nylasAdditionalParticipants.participant')} ${index}`}</label>}\n <div\n part=\"nadtnlpart__input_wrapper\"\n class={{\n 'nylas-additional-participants__input_wrapper': true,\n 'nylas-additional-participants__input_wrapper_organizer': participant?.is_organizer === true,\n 'nylas-additional-participants__input_wrapper_invalid': participant.is_valid === false,\n 'error': participant.is_valid === false,\n }}\n >\n <div class={{ 'nylas-additional-participants__input': true, 'organizer': participant?.is_organizer === true }} part=\"nadtnlpart__input\">\n {participant.is_organizer ? (\n <input-component\n class={'label-input'}\n name={`${index}`}\n key={index}\n label={i18next.t('nylasAdditionalParticipants.organizer')}\n required={false}\n requiredError={this.requiredError}\n patternError={this.patternError}\n readOnly={participant.is_organizer}\n defaultValue={participant.email}\n themeConfig={this.themeConfig}\n >\n {this.isRoundRobinConfig && (\n <div class=\"required-input\" slot=\"additional-input\">\n <input\n type=\"checkbox\"\n name={`organizer_participant`}\n id={`organizer_participant`}\n onClick={() => {\n this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant;\n this.updateFormValue();\n }}\n checked={this.includeOrganizerAsParticipant}\n />\n <label htmlFor={`organizer_participant`} aria-label=\"Include as participant\">\n <span class=\"org-as-participant\" part=\"nadtnlpart__org-as-participant\">\n {i18next.t('nylasAdditionalParticipants.organizerAsParticipant')}\n </span>\n <tooltip-component id=\"organizer_participant_tooltip\">\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n <strong>{i18next.t('nylasAdditionalParticipants.tooltip.includeOrganizer')}:</strong>{' '}\n {i18next.t('nylasAdditionalParticipants.tooltip.includeOrganizerDesc')} <br />\n <strong>{i18next.t('nylasAdditionalParticipants.tooltip.excludeOrganizer')}:</strong>{' '}\n {i18next.t('nylasAdditionalParticipants.tooltip.excludeOrganizerDesc')}\n </span>\n </tooltip-component>\n </label>\n </div>\n )}\n </input-component>\n ) : (\n <input-dropdown\n id={`${index}`}\n name={`${index}`}\n filterable={true}\n inputValue={participant.email}\n options={this.getArrayDifference(this.participantOptions || [], this.participants)}\n themeConfig={this.themeConfig}\n />\n )}\n {!participant.is_organizer && (\n <button onClick={() => this.removeParticipant(index)} part=\"nadtnlpart__remove-participant\">\n <close-icon />\n </button>\n )}\n </div>\n </div>\n {!participant.is_valid && (\n <p class=\"nylas-additional-participants__error\" part=\"nadtnlpart__error\">\n {this.participantErrors[index]}\n </p>\n )}\n </div>\n );\n })}\n <p class=\"nylas-additional-participants__error\" part=\"nadtnlpart__error\">\n {this.error}\n </p>\n </div>\n <button class=\"nylas-additional-participants__add\" part=\"nadtnlpart__add-participant\" onClick={() => this.addParticipant()}>\n <add-circle-icon />{' '}\n <span>\n {this.participants.length > 1\n ? i18next.t('nylasAdditionalParticipants.addParticipant', { context: 'next' })\n : i18next.t('nylasAdditionalParticipants.addParticipant', { context: 'first' })}\n </span>\n </button>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"],"version":3}