@nylas/web-elements 1.4.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +179 -146
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4998 -4993
  3. package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js +4 -4
  4. package/dist/cjs/checkmark-icon_15.cjs.entry.js +4 -4
  5. package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
  6. package/dist/cjs/{constants-3b9fb535.js → constants-27331d2d.js} +1 -5
  7. package/dist/cjs/constants-27331d2d.js.map +1 -0
  8. package/dist/cjs/{customParseFormat-4dbd51f6.js → customParseFormat-22da9017.js} +2 -2
  9. package/dist/cjs/{customParseFormat-4dbd51f6.js.map → customParseFormat-22da9017.js.map} +1 -1
  10. package/dist/cjs/{feedbackSync-670798db.js → feedbackSync-adabe7d6.js} +2 -2
  11. package/dist/cjs/{feedbackSync-670798db.js.map → feedbackSync-adabe7d6.js.map} +1 -1
  12. package/dist/cjs/globe-icon_2.cjs.entry.js +3 -3
  13. package/dist/cjs/google-logo-icon_6.cjs.entry.js +49 -25
  14. package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
  15. package/dist/cjs/index.cjs.js +2 -2
  16. package/dist/cjs/{index.es-cbc1ecb6.js → index.es-7848228a.js} +2 -2
  17. package/dist/cjs/{index.es-cbc1ecb6.js.map → index.es-7848228a.js.map} +1 -1
  18. package/dist/cjs/input-component.cjs.entry.js +1 -1
  19. package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/multi-select-dropdown_2.cjs.entry.js +1 -1
  22. package/dist/cjs/{nylas-api-request-af6121b4.js → nylas-api-request-976db0f4.js} +2 -2
  23. package/dist/cjs/{nylas-api-request-af6121b4.js.map → nylas-api-request-976db0f4.js.map} +1 -1
  24. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +3 -3
  25. package/dist/cjs/nylas-event-calendar_3.cjs.entry.js +4 -4
  26. package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
  27. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +22 -16
  28. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  29. package/dist/cjs/nylas-scheduling.cjs.entry.js +7 -7
  30. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  31. package/dist/cjs/{register-component-5e87c463.js → register-component-d2f37e40.js} +2 -2
  32. package/dist/cjs/{register-component-5e87c463.js.map → register-component-d2f37e40.js.map} +1 -1
  33. package/dist/cjs/textarea-component.cjs.entry.js +1 -1
  34. package/dist/cjs/{utils-0dfca9ec.js → utils-d522ef01.js} +10 -1
  35. package/dist/cjs/utils-d522ef01.js.map +1 -0
  36. package/dist/collection/common/constants.js +0 -1
  37. package/dist/collection/common/constants.js.map +1 -1
  38. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +1 -1
  39. package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js +6 -7
  40. package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js.map +1 -1
  41. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +1 -1
  42. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  43. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +6 -3
  44. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
  45. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js +4 -5
  46. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
  47. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +0 -8
  48. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +43 -10
  49. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  50. package/dist/collection/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.js +52 -7
  51. package/dist/collection/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.js.map +1 -1
  52. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +1 -1
  53. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  54. package/dist/components/constants.js +1 -5
  55. package/dist/components/constants.js.map +1 -1
  56. package/dist/components/nylas-editor-tabs-group2.js +8 -9
  57. package/dist/components/nylas-editor-tabs-group2.js.map +1 -1
  58. package/dist/components/nylas-editor-tabs2.js +2 -2
  59. package/dist/components/nylas-event-description2.js +1 -1
  60. package/dist/components/nylas-event-description2.js.map +1 -1
  61. package/dist/components/nylas-list-configurations2.js +6 -3
  62. package/dist/components/nylas-list-configurations2.js.map +1 -1
  63. package/dist/components/nylas-scheduler-editor.js +22 -14
  64. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  65. package/dist/components/nylas-scheduling.js +3 -3
  66. package/dist/components/nylas-select-event-type2.js +32 -8
  67. package/dist/components/nylas-select-event-type2.js.map +1 -1
  68. package/dist/components/nylas-timeslot-interval2.js +1 -1
  69. package/dist/components/utils.js +9 -0
  70. package/dist/components/utils.js.map +1 -1
  71. package/dist/esm/calendar-agenda-fill-icon_36.entry.js +4 -4
  72. package/dist/esm/checkmark-icon_15.entry.js +4 -4
  73. package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
  74. package/dist/esm/{constants-3d8016e3.js → constants-f51538ef.js} +2 -6
  75. package/dist/esm/constants-f51538ef.js.map +1 -0
  76. package/dist/esm/{customParseFormat-129be926.js → customParseFormat-d1de5ed0.js} +2 -2
  77. package/dist/esm/{customParseFormat-129be926.js.map → customParseFormat-d1de5ed0.js.map} +1 -1
  78. package/dist/esm/{feedbackSync-d943ffc7.js → feedbackSync-172f942c.js} +2 -2
  79. package/dist/esm/{feedbackSync-d943ffc7.js.map → feedbackSync-172f942c.js.map} +1 -1
  80. package/dist/esm/globe-icon_2.entry.js +3 -3
  81. package/dist/esm/google-logo-icon_6.entry.js +49 -25
  82. package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
  83. package/dist/esm/{index.es-4615d47c.js → index.es-fc8588de.js} +2 -2
  84. package/dist/esm/{index.es-4615d47c.js.map → index.es-fc8588de.js.map} +1 -1
  85. package/dist/esm/index.js +2 -2
  86. package/dist/esm/input-component.entry.js +1 -1
  87. package/dist/esm/input-dropdown_2.entry.js +2 -2
  88. package/dist/esm/loader.js +1 -1
  89. package/dist/esm/multi-select-dropdown_2.entry.js +1 -1
  90. package/dist/esm/{nylas-api-request-acf12b47.js → nylas-api-request-3d7ced61.js} +2 -2
  91. package/dist/esm/{nylas-api-request-acf12b47.js.map → nylas-api-request-3d7ced61.js.map} +1 -1
  92. package/dist/esm/nylas-booked-event-card_12.entry.js +3 -3
  93. package/dist/esm/nylas-event-calendar_3.entry.js +4 -4
  94. package/dist/esm/nylas-form-card.entry.js +2 -2
  95. package/dist/esm/nylas-scheduler-editor.entry.js +22 -16
  96. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  97. package/dist/esm/nylas-scheduling.entry.js +7 -7
  98. package/dist/esm/nylas-web-elements.js +1 -1
  99. package/dist/esm/{register-component-083eb961.js → register-component-62d792d4.js} +2 -2
  100. package/dist/esm/{register-component-083eb961.js.map → register-component-62d792d4.js.map} +1 -1
  101. package/dist/esm/textarea-component.entry.js +1 -1
  102. package/dist/esm/{utils-6c05ecaf.js → utils-bb88dd4d.js} +10 -1
  103. package/dist/esm/utils-bb88dd4d.js.map +1 -0
  104. package/dist/nylas-web-elements/index.esm.js +1 -1
  105. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  106. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  107. package/dist/nylas-web-elements/{p-865721fd.entry.js → p-05204c68.entry.js} +2 -2
  108. package/dist/nylas-web-elements/{p-2b38054f.entry.js → p-0d422938.entry.js} +2 -2
  109. package/dist/nylas-web-elements/{p-c59787f4.js → p-0d6ecada.js} +2 -2
  110. package/dist/nylas-web-elements/{p-e2632a60.js → p-198f05a6.js} +2 -2
  111. package/dist/nylas-web-elements/p-1d8c55c6.entry.js +11 -0
  112. package/dist/nylas-web-elements/p-1d8c55c6.entry.js.map +1 -0
  113. package/dist/nylas-web-elements/{p-4e1e01e4.entry.js → p-29f601d9.entry.js} +2 -2
  114. package/dist/nylas-web-elements/{p-60b48bf7.js → p-3a3c5e17.js} +2 -2
  115. package/dist/nylas-web-elements/{p-6bb6a0b8.entry.js → p-447837c2.entry.js} +2 -2
  116. package/dist/nylas-web-elements/{p-faa723fc.entry.js → p-49c8d4d9.entry.js} +2 -2
  117. package/dist/nylas-web-elements/p-49c8d4d9.entry.js.map +1 -0
  118. package/dist/nylas-web-elements/p-7e885253.js +2 -0
  119. package/dist/nylas-web-elements/p-7e885253.js.map +1 -0
  120. package/dist/nylas-web-elements/{p-3cc1072e.js → p-84109239.js} +2 -2
  121. package/dist/nylas-web-elements/{p-d16cd88b.entry.js → p-a7d2a211.entry.js} +2 -2
  122. package/dist/nylas-web-elements/{p-bea31f39.entry.js → p-a9107606.entry.js} +2 -2
  123. package/dist/nylas-web-elements/p-a9107606.entry.js.map +1 -0
  124. package/dist/nylas-web-elements/{p-a9a0dd64.entry.js → p-ab96941e.entry.js} +2 -2
  125. package/dist/nylas-web-elements/{p-6fc7d11b.entry.js → p-af94512e.entry.js} +3 -3
  126. package/dist/nylas-web-elements/{p-bfe2bdbd.js → p-b3ca5d4d.js} +2 -2
  127. package/dist/nylas-web-elements/{p-80d57b5a.entry.js → p-cd24a45e.entry.js} +2 -2
  128. package/dist/nylas-web-elements/{p-6364eb02.entry.js → p-e9369c76.entry.js} +2 -2
  129. package/dist/nylas-web-elements/{p-b2241c3c.entry.js → p-f00d1bb3.entry.js} +2 -2
  130. package/dist/nylas-web-elements/p-f73e34dd.js +14 -0
  131. package/dist/nylas-web-elements/{p-2b97a896.js.map → p-f73e34dd.js.map} +1 -1
  132. package/dist/types/common/constants.d.ts +216 -1
  133. package/dist/types/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.d.ts +0 -2
  134. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.d.ts +1 -2
  135. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +3 -1
  136. package/dist/types/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.d.ts +2 -1
  137. package/dist/types/components.d.ts +18 -2
  138. package/dist/types/stores/scheduler-config-store.d.ts +2 -1
  139. package/package.json +1 -1
  140. package/dist/cjs/constants-3b9fb535.js.map +0 -1
  141. package/dist/cjs/utils-0dfca9ec.js.map +0 -1
  142. package/dist/esm/constants-3d8016e3.js.map +0 -1
  143. package/dist/esm/utils-6c05ecaf.js.map +0 -1
  144. package/dist/nylas-web-elements/p-2b97a896.js +0 -14
  145. package/dist/nylas-web-elements/p-35b7d082.entry.js +0 -11
  146. package/dist/nylas-web-elements/p-35b7d082.entry.js.map +0 -1
  147. package/dist/nylas-web-elements/p-6f7cb609.js +0 -2
  148. package/dist/nylas-web-elements/p-6f7cb609.js.map +0 -1
  149. package/dist/nylas-web-elements/p-bea31f39.entry.js.map +0 -1
  150. package/dist/nylas-web-elements/p-faa723fc.entry.js.map +0 -1
  151. /package/dist/nylas-web-elements/{p-865721fd.entry.js.map → p-05204c68.entry.js.map} +0 -0
  152. /package/dist/nylas-web-elements/{p-2b38054f.entry.js.map → p-0d422938.entry.js.map} +0 -0
  153. /package/dist/nylas-web-elements/{p-c59787f4.js.map → p-0d6ecada.js.map} +0 -0
  154. /package/dist/nylas-web-elements/{p-e2632a60.js.map → p-198f05a6.js.map} +0 -0
  155. /package/dist/nylas-web-elements/{p-4e1e01e4.entry.js.map → p-29f601d9.entry.js.map} +0 -0
  156. /package/dist/nylas-web-elements/{p-60b48bf7.js.map → p-3a3c5e17.js.map} +0 -0
  157. /package/dist/nylas-web-elements/{p-6bb6a0b8.entry.js.map → p-447837c2.entry.js.map} +0 -0
  158. /package/dist/nylas-web-elements/{p-3cc1072e.js.map → p-84109239.js.map} +0 -0
  159. /package/dist/nylas-web-elements/{p-d16cd88b.entry.js.map → p-a7d2a211.entry.js.map} +0 -0
  160. /package/dist/nylas-web-elements/{p-a9a0dd64.entry.js.map → p-ab96941e.entry.js.map} +0 -0
  161. /package/dist/nylas-web-elements/{p-6fc7d11b.entry.js.map → p-af94512e.entry.js.map} +0 -0
  162. /package/dist/nylas-web-elements/{p-bfe2bdbd.js.map → p-b3ca5d4d.js.map} +0 -0
  163. /package/dist/nylas-web-elements/{p-80d57b5a.entry.js.map → p-cd24a45e.entry.js.map} +0 -0
  164. /package/dist/nylas-web-elements/{p-6364eb02.entry.js.map → p-e9369c76.entry.js.map} +0 -0
  165. /package/dist/nylas-web-elements/{p-b2241c3c.entry.js.map → p-f00d1bb3.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"nylas-event-description2.js","mappings":";;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,u6LAAu6L,CAAC;AACz8L,oCAAe,wBAAwB;;;;;;;;;;;;;;;;MC8B1B,qBAAqB;;;;;;;;gCAeI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW;oBAMnE,aAAa;;sCAUM,KAAK;2BAKhB,KAAK;2BAKL,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW,IAAI,EAAE;0BACrF,KAAK;+BAI6CA,kBAAsB,CAAC,GAAG,CAAC,KAAK,KAAK;YACpH,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;8BAI6E,IAAI,CAAC,eAAe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;SACzD,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAyED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["eventDescriptionTokens","i18next"],"sources":["src/components/scheduler-editor/nylas-event-description/nylas-event-description.scss?tag=nylas-event-description&encapsulation=shadow","src/components/scheduler-editor/nylas-event-description/nylas-event-description.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-description {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\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%;\n\n /* 21px */\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n\n &::-webkit-resizer {\n display: none;\n }\n }\n\n div.event-description {\n padding: 12px 16px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n white-space: nowrap;\n scrollbar-width: thin;\n min-height: 50px;\n overflow-y: auto;\n white-space: pre-wrap;\n line-height: 1.5;\n\n /* Preserves line breaks */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n outline: none;\n }\n }\n\n span.add-additional-fields {\n display: flex;\n align-items: center;\n gap: 8px;\n\n button-component {\n button {\n height: 35px;\n }\n }\n }\n\n span.help-text {\n display: inline-block;\n gap: 4px;\n align-items: center;\n color: var(--nylas-base-500);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n position: relative;\n\n span.label-icon {\n display: inline-block;\n\n tooltip-component {\n &::part(tc__container) {\n position: unset;\n }\n\n &::part(tc__content) {\n position: absolute;\n top: 4px;\n left: 50%;\n transform: translateX(-50%);\n }\n }\n }\n }\n\n .highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 2px 5px;\n margin-left: 4px;\n margin-bottom: 4px;\n display: inline-block;\n vertical-align: baseline;\n }\n\n .token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n margin-top: 28px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n bottom: 108px;\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: var(--nylas-base-900);\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { EVENT_TITLE_TOKENS as eventDescriptionTokens } from '@/common/constants';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-description` component is a form input for the description of an event.\n * @part nedesc - The event description container\n * @part nedesc__textarea - The event description textarea\n */\n@Component({\n tag: 'nylas-event-description',\n styleUrl: 'nylas-event-description.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventDescription {\n /**\n * The host element <nylas-event-description>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event description stored in the configuration\n */\n @Prop() eventDescription?: string = this.selectedConfiguration?.event_booking?.description;\n\n /**\n * @standalone\n * The name of the event description input.\n */\n @Prop() name: string = 'description';\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Hide the auto popolate button\n */\n @Prop() hideAutoPopulateButton: boolean = false;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n\n /**\n * The selected event description state. This defaults to the event description from the configuration or an empty string.\n */\n @State() description: string = this.eventDescription || this.selectedConfiguration?.event_booking?.description || '';\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventDescriptionTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event description with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the description textarea element\n private descriptionRef!: HTMLDivElement;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-description', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const description = newValue?.event_booking?.description || this.eventDescription || '';\n const additionalFields = newValue?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n this.description = description;\n if (description) {\n this.updateEventDescriptionFromProp(description);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\n }\n\n /**\n * Event emitted when the event description changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-description', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-description', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-description', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.description = this.eventDescription || '';\n this.updateEventDescriptionFromProp(this.description);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-description', 'disconnectedCallback');\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventDescriptionFromProp(newValue: string) {\n debug('nylas-event-description', 'updateEventDescriptionFromProp', newValue);\n const description = newValue || this.description;\n if (this.descriptionRef) {\n this.descriptionRef.innerHTML = this.highlightTokens(description);\n }\n }\n\n highlightTokens(description: string) {\n let outputHtml = description;\n [...eventDescriptionTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n console.warn('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event description with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventDescription(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the description, reset the description to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.descriptionRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n } else {\n const textNode = selection?.node;\n const offset = selection?.focusOffset || 0;\n\n if (!textNode || offset === -1 || this.descriptionRef.childNodes.length === 0) {\n // If no text node exists or invalid selection, create new line at start\n const newTextNode = document.createTextNode('\\n');\n this.descriptionRef.insertBefore(newTextNode, this.descriptionRef.firstChild);\n\n // Set cursor after newline\n const range = document.createRange();\n range.setStart(newTextNode, 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n } else if (textNode.nodeType === Node.TEXT_NODE) {\n const text = textNode.nodeValue || '';\n // Insert newline at cursor position\n const newText = text.slice(0, offset) + '\\n' + text.slice(offset);\n textNode.nodeValue = newText;\n\n // Move cursor after the newline\n const range = document.createRange();\n range.setStart(textNode, offset + 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n }\n this.descriptionRef.focus();\n }\n } else if (event.key === 'ArrowDown') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n }\n if (this.descriptionRef.textContent === '' || selection?.allSelected) {\n this.descriptionRef.innerHTML = '';\n this.updateEventDescription('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.descriptionRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.descriptionRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event description with the selected token\n this.updateEventDescription(this.descriptionRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventDescription(text: string) {\n const value = text.replace(/ +/g, ' ');\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n handleAddAdditionalFields() {\n if (this.additionalFieldTokens.length === 0) {\n return;\n }\n\n // Remove any existing additional fields section while preserving content before and after\n const baseDescription = this.descriptionRef.innerHTML;\n const startMarker = '--- Additional Fields ---';\n const endMarker = '--- End Additional Fields ---';\n\n const startIndex = baseDescription.indexOf(startMarker);\n const endIndex = baseDescription.indexOf(endMarker);\n\n // Add the additional fields block with start and end markers\n let additionalFieldsBlock = startMarker + '\\n';\n this.additionalFieldTokens.forEach(token => {\n additionalFieldsBlock += `${token.description}: ${token.value}\\n`;\n });\n additionalFieldsBlock += endMarker;\n\n let description;\n if (startIndex !== -1 && endIndex !== -1) {\n // Replace existing block while maintaining text positions\n description = baseDescription.substring(0, startIndex) + additionalFieldsBlock + baseDescription.substring(endIndex + endMarker.length);\n } else {\n // First time adding the block\n description = baseDescription + additionalFieldsBlock;\n }\n\n this.updateEventDescriptionFromProp(description);\n this.updateEventDescription(description);\n }\n\n @RegisterComponent<NylasEventDescription, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-description',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-description\" part=\"nedesc\">\n <label htmlFor=\"description\">\n {i18next.t('nylasEventDescription.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventDescription.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div\n id=\"event-description\"\n class={{ 'event-description': true }}\n part=\"nedesc__textarea\"\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ref={el => (this.descriptionRef = el as HTMLDivElement)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"nedesc__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.description') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" width=\"13\" height=\"13\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {!this.hideAutoPopulateButton && (\n <span class=\"add-additional-fields\">\n <button-component variant=\"basic\" onClick={() => this.handleAddAdditionalFields()}>\n {i18next.t('nylasEventDescription.addAdditionalFields.buttonText')}\n </button-component>\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventDescription.addAdditionalFields.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-event-description2.js","mappings":";;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,u6LAAu6L,CAAC;AACz8L,oCAAe,wBAAwB;;;;;;;;;;;;;;;;MC8B1B,qBAAqB;;;;;;;;gCAeI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW;oBAMnE,aAAa;;sCAUM,KAAK;2BAKhB,KAAK;2BAK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AAO,CAAC,CAAC,CAAC,wDAAwD,CAAC,OAAE,gBAAO,YAAY,CAAQ,CAC5F,CACW,CACf,CACF,CACR,CACG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAxED;IATC,iBAAiB,CAA2G;QAC3H,IAAI,EAAE,yBAAyB;QAC/B,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;SACzD,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAyED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["eventDescriptionTokens","i18next"],"sources":["src/components/scheduler-editor/nylas-event-description/nylas-event-description.scss?tag=nylas-event-description&encapsulation=shadow","src/components/scheduler-editor/nylas-event-description/nylas-event-description.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-description {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\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%;\n\n /* 21px */\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n\n &::-webkit-resizer {\n display: none;\n }\n }\n\n div.event-description {\n padding: 12px 16px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n white-space: nowrap;\n scrollbar-width: thin;\n min-height: 50px;\n overflow-y: auto;\n white-space: pre-wrap;\n line-height: 1.5;\n\n /* Preserves line breaks */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n outline: none;\n }\n }\n\n span.add-additional-fields {\n display: flex;\n align-items: center;\n gap: 8px;\n\n button-component {\n button {\n height: 35px;\n }\n }\n }\n\n span.help-text {\n display: inline-block;\n gap: 4px;\n align-items: center;\n color: var(--nylas-base-500);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n position: relative;\n\n span.label-icon {\n display: inline-block;\n\n tooltip-component {\n &::part(tc__container) {\n position: unset;\n }\n\n &::part(tc__content) {\n position: absolute;\n top: 4px;\n left: 50%;\n transform: translateX(-50%);\n }\n }\n }\n }\n\n .highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 2px 5px;\n margin-left: 4px;\n margin-bottom: 4px;\n display: inline-block;\n vertical-align: baseline;\n }\n\n .token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n margin-top: 28px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n bottom: 108px;\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: var(--nylas-base-900);\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { EVENT_TITLE_TOKENS as eventDescriptionTokens } from '@/common/constants';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-description` component is a form input for the description of an event.\n * @part nedesc - The event description container\n * @part nedesc__textarea - The event description textarea\n */\n@Component({\n tag: 'nylas-event-description',\n styleUrl: 'nylas-event-description.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventDescription {\n /**\n * The host element <nylas-event-description>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event description stored in the configuration\n */\n @Prop() eventDescription?: string = this.selectedConfiguration?.event_booking?.description;\n\n /**\n * @standalone\n * The name of the event description input.\n */\n @Prop() name: string = 'description';\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Hide the auto popolate button\n */\n @Prop() hideAutoPopulateButton: boolean = false;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n\n /**\n * The selected event description state. This defaults to the event description from the configuration or an empty string.\n */\n @State() description: string = this.eventDescription || this.selectedConfiguration?.event_booking?.description || '';\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventDescriptionTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event description with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the description textarea element\n private descriptionRef!: HTMLDivElement;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-description', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const description = newValue?.event_booking?.description || this.eventDescription || '';\n const additionalFields = newValue?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n this.description = description;\n if (description) {\n this.updateEventDescriptionFromProp(description);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\n }\n\n /**\n * Event emitted when the event description changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-description', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-description', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-description', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.description = this.eventDescription || '';\n this.updateEventDescriptionFromProp(this.description);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-description', 'disconnectedCallback');\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventDescriptionFromProp(newValue: string) {\n debug('nylas-event-description', 'updateEventDescriptionFromProp', newValue);\n const description = newValue || this.description;\n if (this.descriptionRef) {\n this.descriptionRef.innerHTML = this.highlightTokens(description);\n }\n }\n\n highlightTokens(description: string) {\n let outputHtml = description;\n [...eventDescriptionTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n console.warn('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event description with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventDescription(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the description, reset the description to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.descriptionRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n } else {\n const textNode = selection?.node;\n const offset = selection?.focusOffset || 0;\n\n if (!textNode || offset === -1 || this.descriptionRef.childNodes.length === 0) {\n // If no text node exists or invalid selection, create new line at start\n const newTextNode = document.createTextNode('\\n');\n this.descriptionRef.insertBefore(newTextNode, this.descriptionRef.firstChild);\n\n // Set cursor after newline\n const range = document.createRange();\n range.setStart(newTextNode, 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n } else if (textNode.nodeType === Node.TEXT_NODE) {\n const text = textNode.nodeValue || '';\n // Insert newline at cursor position\n const newText = text.slice(0, offset) + '\\n' + text.slice(offset);\n textNode.nodeValue = newText;\n\n // Move cursor after the newline\n const range = document.createRange();\n range.setStart(textNode, offset + 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n }\n this.descriptionRef.focus();\n }\n } else if (event.key === 'ArrowDown') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n }\n if (this.descriptionRef.textContent === '' || selection?.allSelected) {\n this.descriptionRef.innerHTML = '';\n this.updateEventDescription('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.descriptionRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.descriptionRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event description with the selected token\n this.updateEventDescription(this.descriptionRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventDescription(text: string) {\n const value = text.replace(/ +/g, ' ');\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n handleAddAdditionalFields() {\n if (this.additionalFieldTokens.length === 0) {\n return;\n }\n\n // Remove any existing additional fields section while preserving content before and after\n const baseDescription = this.descriptionRef.innerHTML;\n const startMarker = '--- Additional Fields ---';\n const endMarker = '--- End Additional Fields ---';\n\n const startIndex = baseDescription.indexOf(startMarker);\n const endIndex = baseDescription.indexOf(endMarker);\n\n // Add the additional fields block with start and end markers\n let additionalFieldsBlock = startMarker + '\\n';\n this.additionalFieldTokens.forEach(token => {\n additionalFieldsBlock += `${token.description}: ${token.value}\\n`;\n });\n additionalFieldsBlock += endMarker;\n\n let description;\n if (startIndex !== -1 && endIndex !== -1) {\n // Replace existing block while maintaining text positions\n description = baseDescription.substring(0, startIndex) + additionalFieldsBlock + baseDescription.substring(endIndex + endMarker.length);\n } else {\n // First time adding the block\n description = baseDescription + additionalFieldsBlock;\n }\n\n this.updateEventDescriptionFromProp(description);\n this.updateEventDescription(description);\n }\n\n @RegisterComponent<NylasEventDescription, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-description',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-description\" part=\"nedesc\">\n <label htmlFor=\"description\">\n {i18next.t('nylasEventDescription.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventDescription.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div\n id=\"event-description\"\n class={{ 'event-description': true }}\n part=\"nedesc__textarea\"\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ref={el => (this.descriptionRef = el as HTMLDivElement)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"nedesc__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.description') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" width=\"13\" height=\"13\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {!this.noTemplates && !this.hideAutoPopulateButton && (\n <span class=\"add-additional-fields\">\n <button-component variant=\"basic\" onClick={() => this.handleAddAdditionalFields()}>\n {i18next.t('nylasEventDescription.addAdditionalFields.buttonText')}\n </button-component>\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventDescription.addAdditionalFields.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { R as RegisterComponent } from './register-component.js';
3
3
  import { b as instance, a as debug, F as parsePreviewLink, M as getCalendarRange } from './utils.js';
4
+ import { C as CONFIGURATION_EVENT_TYPE } from './constants.js';
4
5
  import { d as defineCustomElement$b } from './button-component2.js';
5
6
  import { d as defineCustomElement$a } from './calendar.js';
6
7
  import { d as defineCustomElement$9 } from './chevron.js';
@@ -255,11 +256,13 @@ __decorate([
255
256
  },
256
257
  createButtonClick: async (_, connector) => {
257
258
  connector.schedulerConfigStore.resetSelectedConfiguration();
258
- if (connector.schedulerConfigStore.state.experimentalFeatures?.group_events) {
259
- connector.schedulerConfigStore.state.action = 'create-select';
259
+ const enabledEventTypes = Object.entries(connector.schedulerConfigStore.state.enableEventTypes || {}).filter(([_key, value]) => value);
260
+ if (enabledEventTypes.length === 1) {
261
+ connector.schedulerConfigStore.state.action = 'create';
262
+ connector.schedulerConfigStore.state.selectedEventType = CONFIGURATION_EVENT_TYPE[enabledEventTypes[0][0]];
260
263
  }
261
264
  else {
262
- connector.schedulerConfigStore.state.action = 'create';
265
+ connector.schedulerConfigStore.state.action = 'create-select';
263
266
  }
264
267
  },
265
268
  deleteButtonClick: async (event, connector) => {
@@ -1 +1 @@
1
- {"file":"nylas-list-configurations2.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,0BAA0B,GAAG,+0PAA+0P,CAAC;AACn3P,sCAAe,0BAA0B;;;;;;;;;;;;;;;;MCkB5B,uBAAuB;;;;;;;;;8BAS+B,EAAE;;oCAWW,EAAE;;qBAuCvB,SAAS;qBAKjC,EAAE;6BAKK,IAAI;+BAKP,EAAE;qCAKG,KAAK;qCAKN,EAAE;uCAKC,KAAK;;IAGjD,0CAA0C,CAAC,MAAqB,EAAE,MAAqB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AC,QAAQ,EAAE;qBAC7B,CAAC;oBACF,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS,CAAC,eAAe,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;oBACvF,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE;wBAEnC,OAAO;qBACR;iBACF;gBACD,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;aACtD;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDA8KD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.scss?tag=nylas-list-configurations&encapsulation=shadow","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: grid;\n grid-auto-flow: row;\n width: 100%;\n font-family: inherit;\n font-optical-sizing: auto;\n @include default-css-variables;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n gap: 1rem;\n\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n align-items: unset;\n }\n\n h2 {\n margin: 0;\n font-size: 1.25rem;\n color: var(--nylas-base-900);\n font-weight: 600;\n }\n\n p {\n margin: 0;\n font-size: 16px;\n color: var(--nylas-base-700);\n }\n\n .actions {\n justify-self: end;\n\n @media #{$mobile} {\n width: 100%;\n }\n }\n}\n\n.configurations {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n background: var(--nylas-base-0);\n height: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n overflow-y: hidden;\n\n .table-container {\n overflow-y: auto;\n flex: 1;\n\n @media #{$mobile} {\n min-height: 624px; // This is to ensure the dropdowns are not cut off\n }\n\n table {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n font-family: inherit;\n height: max-content;\n\n &.no-configurations {\n height: 100%;\n }\n\n tr {\n color: var(--nylas-base-800);\n border-bottom: 1px solid var(--nylas-base-200);\n font-family: inherit;\n\n &.hide {\n display: none;\n }\n }\n\n th {\n font-weight: 600;\n text-transform: uppercase;\n font-size: 14px;\n line-height: 20px;\n }\n\n tr.no-configurations {\n td {\n >div {\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n padding: var(--nylas-border-radius-3x);\n\n h3 {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-700);\n }\n\n p {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-600);\n }\n\n calendar-icon {\n margin-bottom: 1rem;\n color: var(--nylas-base-200);\n }\n }\n }\n }\n\n th,\n td {\n text-align: left;\n padding: 1rem;\n font-family: inherit;\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n text-align: right;\n\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n }\n\n select-dropdown.last {\n &::part(sd_dropdown-content) {\n bottom: 54px;\n }\n }\n }\n\n .title {\n width: 100%;\n max-width: 300px;\n\n @media #{$mobile} {\n max-width: 96px;\n }\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &.config-event-title {\n font-weight: 600;\n }\n\n &.config-event-description {\n font-size: 0.75rem;\n }\n }\n }\n }\n }\n\n .pagination {\n padding: 1rem;\n position: sticky;\n top: 100%;\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n background: white;\n width: calc(100% - 2rem);\n z-index: 2;\n\n td.arrows {\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n }\n\n button {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n height: 3vh;\n width: 3vh;\n min-width: 3em;\n min-height: 3em;\n cursor: pointer;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-300);\n\n background-color: transparent;\n color: var(--nylas-base-800);\n cursor: pointer;\n\n &:hover:not(:disabled) {\n border: 1px solid var(--nylas-primary);\n }\n\n &:active {\n border: 1px solid var(--nylas-base-800);\n }\n\n &:disabled {\n border: 1px solid var(--nylas-base-100);\n background-color: transparent;\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n\n &.right {\n transform: rotate(180deg);\n }\n }\n }\n}\n\n.error-container {\n margin-top: 1.5rem;\n\n .error {\n color: var(--nylas-error);\n padding: 0.5rem 0;\n margin: 1rem 0 0;\n }\n}\n\nbutton-component#copy {\n button {\n width: 108px;\n }\n}\n\nselect-dropdown {\n width: auto;\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n display: block;\n height: 48px;\n padding: 0px 16px 8px;\n\n @media #{$mobile} {\n width: 92px;\n }\n}\n\nselect-dropdown::part(sd_dropdown-content) {\n width: 120px;\n right: 0;\n}\n\nselect-dropdown::part(sd_dropdown-labelhtml) {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n color: var(--nylas-base-900);\n\n &:hover {\n color: var(--nylas-primary);\n }\n}\n\n.card-wrapper {\n position: absolute;\n top: 0;\n left: 0;\n height: calc(100% + 4rem);\n width: -webkit-fill-available;\n width: -moz-available;\n width: fill-available;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n z-index: 2;\n\n border-radius: var(--nylas-border-radius-2x);\n\n @media #{$mobile} {\n justify-content: start;\n height: 100%;\n }\n}\n\n.card-modal {\n background: var(--nylas-base-0);\n display: flex;\n flex-direction: column;\n font-family: var(--nylas-font-family);\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n border-radius: var(--nylas-border-radius-3x);\n padding: 32px;\n width: 562px;\n\n @media #{$mobile} {\n width: auto;\n border-radius: 0px;\n }\n\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.description {\n &.title-desc {\n margin-bottom: 2rem;\n }\n\n p {\n margin: 0;\n font-size: 18px;\n color: var(--nylas-base-600);\n }\n}\n\n.footer {\n margin-top: 1rem;\n padding-top: 1rem;\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n box-sizing: border-box;\n background-color: var(--nylas-base-25);\n width: 100%;\n border-radius: 0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x);\n}\n\n.close-button {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n\n button-component {\n button {\n padding: 0;\n height: auto;\n\n &:hover {\n background-color: transparent !important;\n }\n }\n }\n}\n\nbutton-component {\n --dot-color: var(--nylas-base-700);\n}","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getCalendarRange, parsePreviewLink } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, GroupConfiguration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-list-configurations` component displays a list of scheduling pages.\n *\n * @part nlc__create-new-cta - The create new configuration CTA.\n */\n@Component({\n tag: 'nylas-list-configurations',\n styleUrl: 'nylas-list-configurations.scss',\n shadow: true,\n})\nexport class NylasListConfigurations {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasListConfigurationsElement;\n\n /**\n * The list of configurations to display.\n */\n @Prop() configurations: (Configuration | GroupConfiguration)[] = [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n\n /**\n * The next cursor for list configurations, if any.\n */\n @Prop() listConfigurationsNextCursor?: string | null;\n\n /**\n * Event emitted when the component is initialized.\n */\n @Event() initListConfigurations!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n cursor?: string;\n }>;\n\n /**\n * Event emitted when the user clicks the create event button.\n */\n @Event() createButtonClick!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the edit event button.\n */\n @Event() editButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration | GroupConfiguration;\n }>;\n\n /**\n * Event emitted when the user clicks the delete event button.\n */\n @Event() deleteButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration | GroupConfiguration;\n }>;\n\n /**\n * The current state of the component.\n */\n @State() private state: 'loading' | 'loaded' | 'error' = 'loading';\n\n /**\n * The error message to display.\n */\n @State() private error: string = '';\n\n /**\n * Current cursor for list configurations\n */\n @State() currentCursor: string | null = null;\n\n /**\n * The list of previous cursors for list configurations\n */\n @State() previousCursors: string[] = [];\n\n /**\n * State to identiy if the next button should be disabled\n */\n @State() disableNextPageButton: boolean = false;\n\n /**\n * State to store the configuration id to delete and to show the delete confirmation modal\n */\n @State() deleteConfigurationId: string = '';\n\n /**\n * State to show Delete button loading state\n */\n @State() showDeleteButtonLoading: boolean = false;\n\n @Watch('listConfigurationsNextCursor')\n listConfigurationsNextCursorChangedHandler(newVal: string | null, oldVal: string | null) {\n if (!newVal || newVal === oldVal) {\n if (newVal === null) {\n this.disableNextPageButton = true;\n }\n return;\n }\n this.disableNextPageButton = false;\n this.currentCursor = newVal;\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 connectedCallback() {\n debug('[nylas-list-configurations]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-list-configurations]', 'componentWillLoad');\n\n // If we have configurations, we will set the state to loaded.\n if (this.configurations && this.configurations.length > 0) {\n this.state = 'loaded';\n }\n }\n\n componentDidLoad() {\n debug('[nylas-list-configurations]', 'componentDidLoad');\n\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit({\n host: this.host,\n });\n }\n\n disconnectedCallback() {\n debug('[nylas-list-configurations]', 'disconnectedCallback');\n }\n\n @Listen('nylasFormDropdownChanged')\n async handleNylasFormDropdownChanged(event: CustomEvent) {\n debug('[nylas-list-configurations]', 'handleNylasFormDropdownChanged', event.detail);\n const { value } = event.detail;\n const [action, index] = value.split('-');\n event.preventDefault();\n switch (action) {\n case 'delete':\n this.deleteConfigurationId = this.configurations[index]?.id;\n break;\n case 'preview':\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.configurations[index]), '_blank');\n break;\n case 'copy':\n await navigator.clipboard.writeText(parsePreviewLink(this.schedulerPreviewLink, this.configurations[index]));\n break;\n default:\n break;\n }\n }\n\n @Method()\n async registerCallback() {\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit({\n host: this.host,\n });\n }\n\n @Method()\n async getState() {\n return this.state;\n }\n\n @Method()\n async setState(state: 'loading' | 'loaded' | 'error') {\n this.state = state;\n }\n\n @Method()\n async setError(error: string) {\n this.error = error;\n }\n\n @Method()\n async hideDeleteConfirmation() {\n this.deleteConfigurationId = '';\n this.showDeleteButtonLoading = false;\n }\n\n closeModal(e: Event) {\n e.preventDefault();\n this.deleteConfigurationId = '';\n }\n\n handleConfirmDeleteButtonClicked(e: Event) {\n e.preventDefault();\n this.showDeleteButtonLoading = true;\n const config = this.configurations.find(config => config.id === this.deleteConfigurationId);\n if (config && config?.id) {\n this.deleteButtonClick.emit({ host: this.host, configuration: config });\n }\n }\n\n private getDurationString(duration: number) {\n if (!duration) return '—';\n const hours = Math.floor(duration / 60);\n const minutes = duration % 60;\n return `${hours ? hours : ''} ${hours ? `${hours > 1 ? 'hours' : 'hour'}` : ''} ${minutes ? minutes : ''} ${minutes ? `${minutes > 1 ? 'mins' : 'min'}` : ''}`;\n }\n\n getActionLabelHTML(action: string) {\n const actionStyle = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '0.5rem',\n };\n const dangerStyle = {\n color: 'var(--nylas-error)',\n };\n switch (action) {\n case 'preview':\n return (\n <span style={actionStyle}>\n <eye-icon width=\"16\" height=\"16\"></eye-icon>\n {i18next.t('nylasListConfigurations.previewButtonText')}\n </span>\n );\n case 'copy':\n return (\n <span style={actionStyle}>\n <copy-icon width=\"16\" height=\"16\" />\n {i18next.t('nylasListConfigurations.copyLinkButtonText')}\n </span>\n );\n case 'delete':\n return (\n <span style={{ ...actionStyle, ...dangerStyle }}>\n <delete-icon width=\"15\" height=\"17\"></delete-icon>\n {i18next.t('nylasListConfigurations.deleteButtonText')}\n </span>\n );\n default:\n return '';\n }\n }\n\n previousPageClickedHandler() {\n if (this.previousCursors.length === 0) return;\n\n this.currentCursor = this.previousCursors.pop() || null;\n const prevCursor = this.previousCursors[this.previousCursors.length - 1] || undefined;\n this.initListConfigurations.emit({\n host: this.host,\n cursor: prevCursor,\n });\n }\n\n nextPageClickedHandler() {\n if (!this.currentCursor) return;\n\n this.previousCursors = [...this.previousCursors, this.currentCursor];\n this.initListConfigurations.emit({\n host: this.host,\n cursor: this.currentCursor,\n });\n }\n\n @RegisterComponent<NylasListConfigurations, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-list-configurations',\n stateToProps: new Map([\n ['schedulerConfig.configurations', 'configurations'],\n ['schedulerConfig.listConfigurationsNextCursor', 'listConfigurationsNextCursor'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n eventToProps: {\n initListConfigurations: async (event, connector) => {\n const { host, cursor } = event.detail;\n await host.setState('loading');\n const [data, error] = await connector.schedulerConfig.getConfigurations(cursor);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n return;\n }\n await host.setState('loaded');\n // setCursor here\n },\n createButtonClick: async (_, connector) => {\n connector.schedulerConfigStore.resetSelectedConfiguration();\n if (connector.schedulerConfigStore.state.experimentalFeatures?.group_events) {\n connector.schedulerConfigStore.state.action = 'create-select';\n } else {\n connector.schedulerConfigStore.state.action = 'create';\n }\n },\n deleteButtonClick: async (event, connector) => {\n const { host, configuration } = event.detail;\n const [data, error] = await connector.schedulerConfig.deleteConfiguration(configuration.id);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n }\n await host.hideDeleteConfirmation();\n },\n editButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n connector.schedulerConfigStore.state.selectedConfiguration = configuration;\n if (configuration.type === 'group') {\n const { startTime, endTime } = getCalendarRange(new Date().toISOString(), 'week');\n connector.schedulerConfigStore.state.calendarViewDateRange = {\n start_time: startTime.toString(),\n end_time: endTime.toString(),\n };\n const [data, error] = await connector.schedulerConfig.getGroupEvents(configuration.id);\n if (!data && error && error.message) {\n // handle error\n return;\n }\n }\n connector.schedulerConfigStore.state.action = 'edit';\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"header\">\n <div class=\"description\">\n <h2>{i18next.t('allSchedulingPages')}</h2>\n <p>{i18next.t('createAndManageSchedulingPages')}</p>\n </div>\n {this.configurations && this.configurations.length > 0 && (\n <div class=\"actions\">\n <button-component\n part=\"nlc__create-new-cta\"\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n {i18next.t('createNewSchedulingPageButtonText')}\n </button-component>\n </div>\n )}\n </div>\n <div class=\"configurations\">\n <div class=\"table-container\">\n <table\n class={{\n 'no-configurations': this.state !== 'loading' && (!this.configurations || this.configurations.length === 0),\n }}\n >\n <tr\n class={{\n hide: this.state === 'loading' || (this.configurations && this.configurations.length === 0),\n }}\n >\n <th>{i18next.t('pageTitle')}</th>\n <th>{i18next.t('durationTitle')}</th>\n <th></th>\n </tr>\n {this.state === 'loading' && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <h3>{i18next.t('loading')}...</h3>\n <p>{i18next.t('loadingPagesDescription')}</p>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <calendar-icon width=\"48\" height=\"48\"></calendar-icon>\n <h3>{i18next.t('noSchedulingPages')}</h3>\n <p>{i18next.t('createFirstSchedulingPage')}</p>\n <button-component\n part=\"nlc__create-new-cta\"\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n {i18next.t('createNewSchedulingPageButtonText')}\n </button-component>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' &&\n this.configurations?.map((config, i) => {\n const lastTwo = (i === this.configurations.length - 1 || i === this.configurations.length - 2) && this.configurations.length > 3;\n const groupConfig = config as GroupConfiguration;\n const regularConfig = config as Configuration;\n return (\n <tr key={config?.id}>\n <td>\n <div class=\"title\">\n <div class=\"config-event-title\" title={regularConfig?.event_booking?.title}>\n {regularConfig?.event_booking?.title || groupConfig?.name}\n </div>\n <div class={'config-event-description'}>{regularConfig?.event_booking?.description}</div>\n </div>\n </td>\n <td>\n <div class=\"duration\">{this.getDurationString(regularConfig?.availability?.duration_minutes)}</div>\n </td>\n <td>\n <div class=\"actions\">\n <button-component\n variant={'basic'}\n key={`edit-${i}`}\n clickHandler={event => {\n event.preventDefault();\n this.editButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n <edit-icon width=\"16\" height=\"16\"></edit-icon>\n {i18next.t('editSchedulingPageButtonText')}\n </button-component>\n <select-dropdown\n class={{\n last: lastTwo,\n }}\n name=\"actions\"\n options={[\n { value: `preview-${i}`, label: 'Preview', labelHTML: this.getActionLabelHTML('preview') },\n { value: `copy-${i}`, label: 'Copy link', labelHTML: this.getActionLabelHTML('copy') },\n { value: `delete-${i}`, label: 'Delete', labelHTML: this.getActionLabelHTML('delete') },\n ]}\n defaultSelectedOption={{ value: '', label: '' }}\n dropdownButtonText=\"...\"\n withSearch={false}\n withChevron={false}\n exportparts=\"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete\"\n ></select-dropdown>\n </div>\n </td>\n </tr>\n );\n })}\n </table>\n </div>\n <div class=\"pagination\">\n <button class=\"arrow left\" onClick={() => this.previousPageClickedHandler()} disabled={this.previousCursors.length <= 0}>\n <chevron-icon />\n </button>\n <button class=\"arrow right\" onClick={() => this.nextPageClickedHandler()} disabled={this.disableNextPageButton}>\n <chevron-icon />\n </button>\n </div>\n </div>\n {this.state === 'error' && (\n <div class=\"error-container\">\n <p class={'error'}>{this.error}</p>\n </div>\n )}\n {!!this.deleteConfigurationId && (\n <div class=\"card-wrapper\">\n <div class=\"card-modal\">\n <div class=\"close-button\">\n <button-component tooltip=\"Close\" id=\"close\" variant={'invisible'} onClick={e => this.closeModal(e)} part=\"nfbf__close-button\">\n <close-icon />\n </button-component>\n </div>\n <div class=\"header\">\n <h2 slot=\"card-title\" part=\"nfbf__title\">\n {i18next.t('deleteSchedulingPageTitle')}\n </h2>\n </div>\n <div class=\"description title-desc\">\n <p>{i18next.t('deleteSchedulingPageDescription')}</p>\n </div>\n <div\n class={{\n footer: true,\n }}\n >\n <button-component variant={'basic'} onClick={e => this.closeModal(e)} part=\"nfbf__button-outline nfbf__cancel-cta\">\n {`${i18next.t('deleteSchedulingPageCancelButton')}`}\n </button-component>\n <button-component\n variant={'destructive'}\n onClick={e => this.handleConfirmDeleteButtonClicked(e)}\n disabled={this.showDeleteButtonLoading}\n isLoading={this.showDeleteButtonLoading}\n part=\"nfbf__button-outline nfbf__reschedule-cta\"\n >\n {`${i18next.t('deleteSchedulingPageConfirmButton')}`}\n </button-component>\n </div>\n </div>\n </div>\n )}\n </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,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAC7B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;iBACpC;gBACD,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAC;aACrC;YACD,eAAe,EAAE,OAAO,KAAK,EAAE,SAAS;gBACtC,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBACvC,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,qBAAqB,GAAG,aAAa,CAAC;gBAC3E,IAAI,aAAa,CAAC,IAAI,KAAK,OAAO,EAAE;oBAClC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,CAAC;oBAClF,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,qBAAqB,GAAG;wBAC3D,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE;wBAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE;qBAC7B,CAAC;oBACF,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS,CAAC,eAAe,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;oBACvF,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE;wBAEnC,OAAO;qBACR;iBACF;gBACD,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;aACtD;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDA8KD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.scss?tag=nylas-list-configurations&encapsulation=shadow","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: grid;\n grid-auto-flow: row;\n width: 100%;\n font-family: inherit;\n font-optical-sizing: auto;\n @include default-css-variables;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n gap: 1rem;\n\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n align-items: unset;\n }\n\n h2 {\n margin: 0;\n font-size: 1.25rem;\n color: var(--nylas-base-900);\n font-weight: 600;\n }\n\n p {\n margin: 0;\n font-size: 16px;\n color: var(--nylas-base-700);\n }\n\n .actions {\n justify-self: end;\n\n @media #{$mobile} {\n width: 100%;\n }\n }\n}\n\n.configurations {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n background: var(--nylas-base-0);\n height: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n overflow-y: hidden;\n\n .table-container {\n overflow-y: auto;\n flex: 1;\n\n @media #{$mobile} {\n min-height: 624px; // This is to ensure the dropdowns are not cut off\n }\n\n table {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n font-family: inherit;\n height: max-content;\n\n &.no-configurations {\n height: 100%;\n }\n\n tr {\n color: var(--nylas-base-800);\n border-bottom: 1px solid var(--nylas-base-200);\n font-family: inherit;\n\n &.hide {\n display: none;\n }\n }\n\n th {\n font-weight: 600;\n text-transform: uppercase;\n font-size: 14px;\n line-height: 20px;\n }\n\n tr.no-configurations {\n td {\n >div {\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n padding: var(--nylas-border-radius-3x);\n\n h3 {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-700);\n }\n\n p {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-600);\n }\n\n calendar-icon {\n margin-bottom: 1rem;\n color: var(--nylas-base-200);\n }\n }\n }\n }\n\n th,\n td {\n text-align: left;\n padding: 1rem;\n font-family: inherit;\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n text-align: right;\n\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n }\n\n select-dropdown.last {\n &::part(sd_dropdown-content) {\n bottom: 54px;\n }\n }\n }\n\n .title {\n width: 100%;\n max-width: 300px;\n\n @media #{$mobile} {\n max-width: 96px;\n }\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &.config-event-title {\n font-weight: 600;\n }\n\n &.config-event-description {\n font-size: 0.75rem;\n }\n }\n }\n }\n }\n\n .pagination {\n padding: 1rem;\n position: sticky;\n top: 100%;\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n background: white;\n width: calc(100% - 2rem);\n z-index: 2;\n\n td.arrows {\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n }\n\n button {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n height: 3vh;\n width: 3vh;\n min-width: 3em;\n min-height: 3em;\n cursor: pointer;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-300);\n\n background-color: transparent;\n color: var(--nylas-base-800);\n cursor: pointer;\n\n &:hover:not(:disabled) {\n border: 1px solid var(--nylas-primary);\n }\n\n &:active {\n border: 1px solid var(--nylas-base-800);\n }\n\n &:disabled {\n border: 1px solid var(--nylas-base-100);\n background-color: transparent;\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n\n &.right {\n transform: rotate(180deg);\n }\n }\n }\n}\n\n.error-container {\n margin-top: 1.5rem;\n\n .error {\n color: var(--nylas-error);\n padding: 0.5rem 0;\n margin: 1rem 0 0;\n }\n}\n\nbutton-component#copy {\n button {\n width: 108px;\n }\n}\n\nselect-dropdown {\n width: auto;\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n display: block;\n height: 48px;\n padding: 0px 16px 8px;\n\n @media #{$mobile} {\n width: 92px;\n }\n}\n\nselect-dropdown::part(sd_dropdown-content) {\n width: 120px;\n right: 0;\n}\n\nselect-dropdown::part(sd_dropdown-labelhtml) {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n color: var(--nylas-base-900);\n\n &:hover {\n color: var(--nylas-primary);\n }\n}\n\n.card-wrapper {\n position: absolute;\n top: 0;\n left: 0;\n height: calc(100% + 4rem);\n width: -webkit-fill-available;\n width: -moz-available;\n width: fill-available;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n z-index: 2;\n\n border-radius: var(--nylas-border-radius-2x);\n\n @media #{$mobile} {\n justify-content: start;\n height: 100%;\n }\n}\n\n.card-modal {\n background: var(--nylas-base-0);\n display: flex;\n flex-direction: column;\n font-family: var(--nylas-font-family);\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n border-radius: var(--nylas-border-radius-3x);\n padding: 32px;\n width: 562px;\n\n @media #{$mobile} {\n width: auto;\n border-radius: 0px;\n }\n\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.description {\n &.title-desc {\n margin-bottom: 2rem;\n }\n\n p {\n margin: 0;\n font-size: 18px;\n color: var(--nylas-base-600);\n }\n}\n\n.footer {\n margin-top: 1rem;\n padding-top: 1rem;\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n box-sizing: border-box;\n background-color: var(--nylas-base-25);\n width: 100%;\n border-radius: 0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x);\n}\n\n.close-button {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n\n button-component {\n button {\n padding: 0;\n height: auto;\n\n &:hover {\n background-color: transparent !important;\n }\n }\n }\n}\n\nbutton-component {\n --dot-color: var(--nylas-base-700);\n}","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getCalendarRange, parsePreviewLink } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, GroupConfiguration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { CONFIGURATION_EVENT_TYPE, LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-list-configurations` component displays a list of scheduling pages.\n *\n * @part nlc__create-new-cta - The create new configuration CTA.\n */\n@Component({\n tag: 'nylas-list-configurations',\n styleUrl: 'nylas-list-configurations.scss',\n shadow: true,\n})\nexport class NylasListConfigurations {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasListConfigurationsElement;\n\n /**\n * The list of configurations to display.\n */\n @Prop() configurations: (Configuration | GroupConfiguration)[] = [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n\n /**\n * The next cursor for list configurations, if any.\n */\n @Prop() listConfigurationsNextCursor?: string | null;\n\n /**\n * Event emitted when the component is initialized.\n */\n @Event() initListConfigurations!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n cursor?: string;\n }>;\n\n /**\n * Event emitted when the user clicks the create event button.\n */\n @Event() createButtonClick!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the edit event button.\n */\n @Event() editButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration | GroupConfiguration;\n }>;\n\n /**\n * Event emitted when the user clicks the delete event button.\n */\n @Event() deleteButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration | GroupConfiguration;\n }>;\n\n /**\n * The current state of the component.\n */\n @State() private state: 'loading' | 'loaded' | 'error' = 'loading';\n\n /**\n * The error message to display.\n */\n @State() private error: string = '';\n\n /**\n * Current cursor for list configurations\n */\n @State() currentCursor: string | null = null;\n\n /**\n * The list of previous cursors for list configurations\n */\n @State() previousCursors: string[] = [];\n\n /**\n * State to identiy if the next button should be disabled\n */\n @State() disableNextPageButton: boolean = false;\n\n /**\n * State to store the configuration id to delete and to show the delete confirmation modal\n */\n @State() deleteConfigurationId: string = '';\n\n /**\n * State to show Delete button loading state\n */\n @State() showDeleteButtonLoading: boolean = false;\n\n @Watch('listConfigurationsNextCursor')\n listConfigurationsNextCursorChangedHandler(newVal: string | null, oldVal: string | null) {\n if (!newVal || newVal === oldVal) {\n if (newVal === null) {\n this.disableNextPageButton = true;\n }\n return;\n }\n this.disableNextPageButton = false;\n this.currentCursor = newVal;\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 connectedCallback() {\n debug('[nylas-list-configurations]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-list-configurations]', 'componentWillLoad');\n\n // If we have configurations, we will set the state to loaded.\n if (this.configurations && this.configurations.length > 0) {\n this.state = 'loaded';\n }\n }\n\n componentDidLoad() {\n debug('[nylas-list-configurations]', 'componentDidLoad');\n\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit({\n host: this.host,\n });\n }\n\n disconnectedCallback() {\n debug('[nylas-list-configurations]', 'disconnectedCallback');\n }\n\n @Listen('nylasFormDropdownChanged')\n async handleNylasFormDropdownChanged(event: CustomEvent) {\n debug('[nylas-list-configurations]', 'handleNylasFormDropdownChanged', event.detail);\n const { value } = event.detail;\n const [action, index] = value.split('-');\n event.preventDefault();\n switch (action) {\n case 'delete':\n this.deleteConfigurationId = this.configurations[index]?.id;\n break;\n case 'preview':\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.configurations[index]), '_blank');\n break;\n case 'copy':\n await navigator.clipboard.writeText(parsePreviewLink(this.schedulerPreviewLink, this.configurations[index]));\n break;\n default:\n break;\n }\n }\n\n @Method()\n async registerCallback() {\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit({\n host: this.host,\n });\n }\n\n @Method()\n async getState() {\n return this.state;\n }\n\n @Method()\n async setState(state: 'loading' | 'loaded' | 'error') {\n this.state = state;\n }\n\n @Method()\n async setError(error: string) {\n this.error = error;\n }\n\n @Method()\n async hideDeleteConfirmation() {\n this.deleteConfigurationId = '';\n this.showDeleteButtonLoading = false;\n }\n\n closeModal(e: Event) {\n e.preventDefault();\n this.deleteConfigurationId = '';\n }\n\n handleConfirmDeleteButtonClicked(e: Event) {\n e.preventDefault();\n this.showDeleteButtonLoading = true;\n const config = this.configurations.find(config => config.id === this.deleteConfigurationId);\n if (config && config?.id) {\n this.deleteButtonClick.emit({ host: this.host, configuration: config });\n }\n }\n\n private getDurationString(duration: number) {\n if (!duration) return '—';\n const hours = Math.floor(duration / 60);\n const minutes = duration % 60;\n return `${hours ? hours : ''} ${hours ? `${hours > 1 ? 'hours' : 'hour'}` : ''} ${minutes ? minutes : ''} ${minutes ? `${minutes > 1 ? 'mins' : 'min'}` : ''}`;\n }\n\n getActionLabelHTML(action: string) {\n const actionStyle = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '0.5rem',\n };\n const dangerStyle = {\n color: 'var(--nylas-error)',\n };\n switch (action) {\n case 'preview':\n return (\n <span style={actionStyle}>\n <eye-icon width=\"16\" height=\"16\"></eye-icon>\n {i18next.t('nylasListConfigurations.previewButtonText')}\n </span>\n );\n case 'copy':\n return (\n <span style={actionStyle}>\n <copy-icon width=\"16\" height=\"16\" />\n {i18next.t('nylasListConfigurations.copyLinkButtonText')}\n </span>\n );\n case 'delete':\n return (\n <span style={{ ...actionStyle, ...dangerStyle }}>\n <delete-icon width=\"15\" height=\"17\"></delete-icon>\n {i18next.t('nylasListConfigurations.deleteButtonText')}\n </span>\n );\n default:\n return '';\n }\n }\n\n previousPageClickedHandler() {\n if (this.previousCursors.length === 0) return;\n\n this.currentCursor = this.previousCursors.pop() || null;\n const prevCursor = this.previousCursors[this.previousCursors.length - 1] || undefined;\n this.initListConfigurations.emit({\n host: this.host,\n cursor: prevCursor,\n });\n }\n\n nextPageClickedHandler() {\n if (!this.currentCursor) return;\n\n this.previousCursors = [...this.previousCursors, this.currentCursor];\n this.initListConfigurations.emit({\n host: this.host,\n cursor: this.currentCursor,\n });\n }\n\n @RegisterComponent<NylasListConfigurations, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-list-configurations',\n stateToProps: new Map([\n ['schedulerConfig.configurations', 'configurations'],\n ['schedulerConfig.listConfigurationsNextCursor', 'listConfigurationsNextCursor'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n eventToProps: {\n initListConfigurations: async (event, connector) => {\n const { host, cursor } = event.detail;\n await host.setState('loading');\n const [data, error] = await connector.schedulerConfig.getConfigurations(cursor);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n return;\n }\n await host.setState('loaded');\n // setCursor here\n },\n createButtonClick: async (_, connector) => {\n connector.schedulerConfigStore.resetSelectedConfiguration();\n const enabledEventTypes = Object.entries(connector.schedulerConfigStore.state.enableEventTypes || {}).filter(([_key, value]) => value);\n if (enabledEventTypes.length === 1) {\n connector.schedulerConfigStore.state.action = 'create';\n connector.schedulerConfigStore.state.selectedEventType = CONFIGURATION_EVENT_TYPE[enabledEventTypes[0][0]];\n } else {\n connector.schedulerConfigStore.state.action = 'create-select';\n }\n },\n deleteButtonClick: async (event, connector) => {\n const { host, configuration } = event.detail;\n const [data, error] = await connector.schedulerConfig.deleteConfiguration(configuration.id);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n }\n await host.hideDeleteConfirmation();\n },\n editButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n connector.schedulerConfigStore.state.selectedConfiguration = configuration;\n if (configuration.type === 'group') {\n const { startTime, endTime } = getCalendarRange(new Date().toISOString(), 'week');\n connector.schedulerConfigStore.state.calendarViewDateRange = {\n start_time: startTime.toString(),\n end_time: endTime.toString(),\n };\n const [data, error] = await connector.schedulerConfig.getGroupEvents(configuration.id);\n if (!data && error && error.message) {\n // handle error\n return;\n }\n }\n connector.schedulerConfigStore.state.action = 'edit';\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"header\">\n <div class=\"description\">\n <h2>{i18next.t('allSchedulingPages')}</h2>\n <p>{i18next.t('createAndManageSchedulingPages')}</p>\n </div>\n {this.configurations && this.configurations.length > 0 && (\n <div class=\"actions\">\n <button-component\n part=\"nlc__create-new-cta\"\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n {i18next.t('createNewSchedulingPageButtonText')}\n </button-component>\n </div>\n )}\n </div>\n <div class=\"configurations\">\n <div class=\"table-container\">\n <table\n class={{\n 'no-configurations': this.state !== 'loading' && (!this.configurations || this.configurations.length === 0),\n }}\n >\n <tr\n class={{\n hide: this.state === 'loading' || (this.configurations && this.configurations.length === 0),\n }}\n >\n <th>{i18next.t('pageTitle')}</th>\n <th>{i18next.t('durationTitle')}</th>\n <th></th>\n </tr>\n {this.state === 'loading' && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <h3>{i18next.t('loading')}...</h3>\n <p>{i18next.t('loadingPagesDescription')}</p>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <calendar-icon width=\"48\" height=\"48\"></calendar-icon>\n <h3>{i18next.t('noSchedulingPages')}</h3>\n <p>{i18next.t('createFirstSchedulingPage')}</p>\n <button-component\n part=\"nlc__create-new-cta\"\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n {i18next.t('createNewSchedulingPageButtonText')}\n </button-component>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' &&\n this.configurations?.map((config, i) => {\n const lastTwo = (i === this.configurations.length - 1 || i === this.configurations.length - 2) && this.configurations.length > 3;\n const groupConfig = config as GroupConfiguration;\n const regularConfig = config as Configuration;\n return (\n <tr key={config?.id}>\n <td>\n <div class=\"title\">\n <div class=\"config-event-title\" title={regularConfig?.event_booking?.title}>\n {regularConfig?.event_booking?.title || groupConfig?.name}\n </div>\n <div class={'config-event-description'}>{regularConfig?.event_booking?.description}</div>\n </div>\n </td>\n <td>\n <div class=\"duration\">{this.getDurationString(regularConfig?.availability?.duration_minutes)}</div>\n </td>\n <td>\n <div class=\"actions\">\n <button-component\n variant={'basic'}\n key={`edit-${i}`}\n clickHandler={event => {\n event.preventDefault();\n this.editButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n <edit-icon width=\"16\" height=\"16\"></edit-icon>\n {i18next.t('editSchedulingPageButtonText')}\n </button-component>\n <select-dropdown\n class={{\n last: lastTwo,\n }}\n name=\"actions\"\n options={[\n { value: `preview-${i}`, label: 'Preview', labelHTML: this.getActionLabelHTML('preview') },\n { value: `copy-${i}`, label: 'Copy link', labelHTML: this.getActionLabelHTML('copy') },\n { value: `delete-${i}`, label: 'Delete', labelHTML: this.getActionLabelHTML('delete') },\n ]}\n defaultSelectedOption={{ value: '', label: '' }}\n dropdownButtonText=\"...\"\n withSearch={false}\n withChevron={false}\n exportparts=\"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete\"\n ></select-dropdown>\n </div>\n </td>\n </tr>\n );\n })}\n </table>\n </div>\n <div class=\"pagination\">\n <button class=\"arrow left\" onClick={() => this.previousPageClickedHandler()} disabled={this.previousCursors.length <= 0}>\n <chevron-icon />\n </button>\n <button class=\"arrow right\" onClick={() => this.nextPageClickedHandler()} disabled={this.disableNextPageButton}>\n <chevron-icon />\n </button>\n </div>\n </div>\n {this.state === 'error' && (\n <div class=\"error-container\">\n <p class={'error'}>{this.error}</p>\n </div>\n )}\n {!!this.deleteConfigurationId && (\n <div class=\"card-wrapper\">\n <div class=\"card-modal\">\n <div class=\"close-button\">\n <button-component tooltip=\"Close\" id=\"close\" variant={'invisible'} onClick={e => this.closeModal(e)} part=\"nfbf__close-button\">\n <close-icon />\n </button-component>\n </div>\n <div class=\"header\">\n <h2 slot=\"card-title\" part=\"nfbf__title\">\n {i18next.t('deleteSchedulingPageTitle')}\n </h2>\n </div>\n <div class=\"description title-desc\">\n <p>{i18next.t('deleteSchedulingPageDescription')}</p>\n </div>\n <div\n class={{\n footer: true,\n }}\n >\n <button-component variant={'basic'} onClick={e => this.closeModal(e)} part=\"nfbf__button-outline nfbf__cancel-cta\">\n {`${i18next.t('deleteSchedulingPageCancelButton')}`}\n </button-component>\n <button-component\n variant={'destructive'}\n onClick={e => this.handleConfirmDeleteButtonClicked(e)}\n disabled={this.showDeleteButtonLoading}\n isLoading={this.showDeleteButtonLoading}\n part=\"nfbf__button-outline nfbf__reschedule-cta\"\n >\n {`${i18next.t('deleteSchedulingPageConfirmButton')}`}\n </button-component>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}