@nylas/web-elements 2.5.13 → 2.5.15

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 (54) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +12 -19
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1 -1
  3. package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +13 -13
  4. package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js.map +1 -1
  5. package/dist/cjs/google-logo-icon_6.cjs.entry.js +1 -1
  6. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
  7. package/dist/cjs/nylas-scheduling.cjs.entry.js +1 -1
  8. package/dist/cjs/{version-BspChjso.js → version-1ZdVKLpt.js} +3 -3
  9. package/dist/cjs/{version-BspChjso.js.map → version-1ZdVKLpt.js.map} +1 -1
  10. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +9 -10
  11. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
  12. package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js +4 -3
  13. package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js.map +1 -1
  14. package/dist/collection/version.js +1 -1
  15. package/dist/collection/version.js.map +1 -1
  16. package/dist/components/nylas-editor-tabs-group.js +1 -1
  17. package/dist/components/nylas-editor-tabs.js +1 -1
  18. package/dist/components/nylas-participants-custom-availability.js +1 -1
  19. package/dist/components/nylas-scheduler-editor.js +5 -5
  20. package/dist/components/nylas-scheduling.js +1 -1
  21. package/dist/components/nylas-specific-time-availability-picker.js +1 -1
  22. package/dist/components/{p-KPbwxUCV.js → p-Bi06RVaz.js} +3 -3
  23. package/dist/components/{p-KPbwxUCV.js.map → p-Bi06RVaz.js.map} +1 -1
  24. package/dist/components/{p-Czoh6-K4.js → p-DW9sxBeM.js} +6 -5
  25. package/dist/components/p-DW9sxBeM.js.map +1 -0
  26. package/dist/components/{p-Csux9e4C.js → p-Di0G82W0.js} +5 -5
  27. package/dist/components/{p-Csux9e4C.js.map → p-Di0G82W0.js.map} +1 -1
  28. package/dist/components/{p-BDVZl2EG.js → p-p9sl0FFV.js} +3 -3
  29. package/dist/components/{p-BDVZl2EG.js.map → p-p9sl0FFV.js.map} +1 -1
  30. package/dist/components/{p-B6bT8J6p.js → p-tx39yUB3.js} +12 -13
  31. package/dist/components/p-tx39yUB3.js.map +1 -0
  32. package/dist/esm/calendar-agenda-fill-icon_39.entry.js +13 -13
  33. package/dist/esm/calendar-agenda-fill-icon_39.entry.js.map +1 -1
  34. package/dist/esm/google-logo-icon_6.entry.js +1 -1
  35. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  36. package/dist/esm/nylas-scheduling.entry.js +1 -1
  37. package/dist/esm/{version-xO_cryq5.js → version-CEtdwas_.js} +3 -3
  38. package/dist/esm/{version-xO_cryq5.js.map → version-CEtdwas_.js.map} +1 -1
  39. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  40. package/dist/nylas-web-elements/{p-ca824e25.entry.js → p-28182324.entry.js} +2 -2
  41. package/dist/nylas-web-elements/{p-ccc9d9d2.entry.js → p-72e72392.entry.js} +2 -2
  42. package/dist/nylas-web-elements/p-72e72392.entry.js.map +1 -0
  43. package/dist/nylas-web-elements/{p-e0de5436.entry.js → p-74747365.entry.js} +2 -2
  44. package/dist/nylas-web-elements/{p-0716662b.entry.js → p-9a42cebd.entry.js} +2 -2
  45. package/dist/nylas-web-elements/{p-xO_cryq5.js → p-CEtdwas_.js} +2 -2
  46. package/dist/nylas-web-elements/{p-xO_cryq5.js.map → p-CEtdwas_.js.map} +1 -1
  47. package/dist/types/version.d.ts +1 -1
  48. package/package.json +1 -1
  49. package/dist/components/p-B6bT8J6p.js.map +0 -1
  50. package/dist/components/p-Czoh6-K4.js.map +0 -1
  51. package/dist/nylas-web-elements/p-ccc9d9d2.entry.js.map +0 -1
  52. /package/dist/nylas-web-elements/{p-ca824e25.entry.js.map → p-28182324.entry.js.map} +0 -0
  53. /package/dist/nylas-web-elements/{p-e0de5436.entry.js.map → p-74747365.entry.js.map} +0 -0
  54. /package/dist/nylas-web-elements/{p-0716662b.entry.js.map → p-9a42cebd.entry.js.map} +0 -0
@@ -12,7 +12,7 @@ import { d as defineCustomElement$a } from './p-d3kelm3z.js';
12
12
  import { d as defineCustomElement$9 } from './p-C7ZpwRD0.js';
13
13
  import { d as defineCustomElement$8 } from './p-w9ANRXbn.js';
14
14
  import { d as defineCustomElement$7 } from './p-Ch03cZa9.js';
15
- import { d as defineCustomElement$6 } from './p-Czoh6-K4.js';
15
+ import { d as defineCustomElement$6 } from './p-DW9sxBeM.js';
16
16
  import { d as defineCustomElement$5 } from './p-D_CPIneS.js';
17
17
  import { d as defineCustomElement$4 } from './p-DBHtQK2b.js';
18
18
  import { d as defineCustomElement$3 } from './p-wphqTozF.js';
@@ -159,15 +159,6 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
159
159
  error(`Failed to parse JSON for participant ${name}:`, err);
160
160
  return;
161
161
  }
162
- if (this.isInternalsAvailable) {
163
- if (!this.participantFormRef.checkValidity()) {
164
- this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
165
- return;
166
- }
167
- else {
168
- this.internals.setValidity({});
169
- }
170
- }
171
162
  if (name.startsWith('participant-availability-')) {
172
163
  const nameParts = name.split('-');
173
164
  if (nameParts.length < 4) {
@@ -212,6 +203,14 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
212
203
  }
213
204
  this.selectedParticipants = { ...this.selectedParticipants };
214
205
  this.updateFormValue();
206
+ if (this.isInternalsAvailable && !this.validationError) {
207
+ if (!this.participantFormRef.checkValidity()) {
208
+ this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
209
+ }
210
+ else {
211
+ this.internals.setValidity({});
212
+ }
213
+ }
215
214
  }
216
215
  updateFormValue() {
217
216
  const participantOpenHours = {};
@@ -272,7 +271,7 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
272
271
  return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
273
272
  }
274
273
  render() {
275
- return (h(Host, { key: '5ff7155db08b5adcfe1168adf8452f426f4fb66d' }, h("div", { key: '376210b2869e4e9c518ba6f6ab29aff086df8a86', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '0a7a2492da0927c3fc2eff3e5b74ee8dd873f5ce', class: "header", part: "npca__header" }, h("h3", { key: 'f38db5fea6b75ebf696c86371437149421f375b0' }, instance.t('nylasParticipantCustomAvailability.headerTitle')), h("p", { key: 'b64aa2227fc6c761161baee71df7ccfa1d4a0c0b' }, instance.t('nylasParticipantCustomAvailability.headerSubTitle'))), this.validationError && (h("div", { key: '902126476a17af8e5c5303bd7acd86ae95063c68', class: "validation-error", part: "npca__validation-error" }, h("span", { key: 'b3595b86576e9894e97127bad821714cc9f4a0ea' }, this.validationError))), h("div", { key: 'a03b0815c38caaa5255293efe25a2f8b5e65349a', class: "content", part: "npca__content" }, h("form", { key: '92b375ef71cd62bf4ed37b3fcee09c718e79bc3b', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
274
+ return (h(Host, { key: '5e62c290e9bec1901728c12d6d8cbb298b97da2b' }, h("div", { key: '3a7a5d5fda480e55df91e86b87d464b8ee142595', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '7ef83dde9d4ccd2ff36e948a3e27e2e30c457137', class: "header", part: "npca__header" }, h("h3", { key: '5784dbfb95cb7f66a02d995e3f4d53bd4c82b753' }, instance.t('nylasParticipantCustomAvailability.headerTitle')), h("p", { key: 'e8a803be4c48b789ae499749224a6dbd3f7e1681' }, instance.t('nylasParticipantCustomAvailability.headerSubTitle'))), this.validationError && (h("div", { key: 'f10b45081c034f106237e1fdeb9a92f9bfd8c6ac', class: "validation-error", part: "npca__validation-error" }, h("span", { key: '4d17c47cc99364711ba9bc10aa0e2bafe6c7ffc4' }, this.validationError))), h("div", { key: 'bab32e3f7a3f58564269087b34bb223916503a3f', class: "content", part: "npca__content" }, h("form", { key: 'f3ade0977a820e63960511ab2c4e8f8bc69b04dd', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
276
275
  const participant = this.selectedParticipants[key];
277
276
  const participantOpenHours = participant.availability?.open_hours || [];
278
277
  if (!participant || !participant.name)
@@ -434,6 +433,6 @@ function defineCustomElement() {
434
433
  }
435
434
 
436
435
  export { NylasParticipantsCustomAvailability as N, defineCustomElement as d };
437
- //# sourceMappingURL=p-B6bT8J6p.js.map
436
+ //# sourceMappingURL=p-tx39yUB3.js.map
438
437
 
439
- //# sourceMappingURL=p-B6bT8J6p.js.map
438
+ //# sourceMappingURL=p-tx39yUB3.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-tx39yUB3.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,ixNAAixN;;;;;;;;;;;;;;;;MC8BnzN,mCAAmC,GAAAA,kBAAA,CAAA,MAAA,mCAAA,SAAAC,CAAA,CAAA;AANhD,IAAA,WAAA,GAAA;;;;;;AAmBU,QAAA,IAAI,CAAA,IAAA,GAAW,iCAAiC;QAMhD,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;QA4B3E,IAAoB,CAAA,oBAAA,GAYzB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;AAKlC,QAAA,IAAe,CAAA,eAAA,GAAW,EAAE;AAoatC;AAhaC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,wCAAwC,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QACtF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,E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,GAAG,CAAE,CAAA,EAC9D,eAAe,EAAE,WAAW,CAAC,QAAQ,EACrC,yBAAyB,EAAE,WAAW,CAAC,yBAAyB,EAChE,UAAU,EAAE,IAAI,GAChB,CACH,CACG;AAEV,SAAC,CAAC,CACG,CACH,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;AAxHX,UAAA,CAAA;AAVC,IAAA,iBAAiB,CAAyH;AACzI,QAAA,IAAI,EAAE,wCAAwC;QAC9C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA2HD,EAAA,mCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.scss?tag=nylas-participants-custom-availability&encapsulation=shadow","src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-participants-custom-availability {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n .header {\n padding: 1rem;\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n }\n }\n .validation-error {\n margin: 0;\n padding: 0.75rem 1rem;\n background-color: var(--nylas-color-red-50);\n\n span {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 20px;\n color: var(--nylas-error);\n display: block;\n }\n }\n .content {\n .participant-container {\n padding-top: 8px;\n border-top: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-900);\n background-color: var(--nylas-base-25);\n\n .participant-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 16px 12px;\n p {\n margin: 0;\n }\n .participant-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n nylas-availability-picker::part(nap) {\n margin: 0;\n border: none;\n }\n nylas-specific-time-availability-picker::part(nstap) {\n margin: 0;\n border: none;\n }\n .participant-only-specific-time-container {\n padding: 8px 16px;\n border-top: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-50);\n\n .participant-only-specific-time-checkbox {\n label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-900);\n cursor: pointer;\n\n input[type='checkbox'] {\n width: 16px;\n height: 16px;\n cursor: pointer;\n accent-color: var(--nylas-primary);\n }\n\n span {\n flex: 1;\n }\n\n tooltip-component {\n display: flex;\n align-items: center;\n }\n }\n }\n }\n }\n .participant-tabs {\n justify-content: space-between;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n padding: 8px 16px;\n border-top: 1px solid var(--nylas-base-200);\n\n &.single-tab {\n grid-template-columns: 1fr;\n }\n }\n .participant-tab {\n cursor: pointer;\n padding: 8px 16px;\n border-radius: var(--nylas-border-radius-2x);\n background-color: var(--nylas-base-100);\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--nylas-base-600);\n &.active {\n background-color: var(--nylas-primary);\n color: var(--nylas-base-100);\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, error } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, OpenHours, Participant, ParticipantAvailability, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__validation-error - The validation error message container\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n tab: 'availability' | 'specific-time-availability';\n isOpen: boolean;\n openHours: OpenHours[];\n specificTimesAvailability: SpecificTimeAvailability[];\n name: string;\n availability?: ParticipantAvailability;\n timezone?: string;\n onlySpecificTimeAvailability?: boolean;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * The validation error message for the component.\n */\n @State() validationError: string = '';\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n // Run validation on initial load\n this.updateFormValue();\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n\n // Check if this is a toggle for \"only specific time availability\"\n if (event.detail.name.startsWith('only-specific-time-')) {\n const participantEmail = event.detail.name.replace('only-specific-time-', '');\n if (this.selectedParticipants[participantEmail]) {\n this.selectedParticipants[participantEmail]['onlySpecificTimeAvailability'] = event.detail.checked;\n // When enabling only specific time, switch to specific time tab\n if (event.detail.checked) {\n this.selectedParticipants[participantEmail]['tab'] = 'specific-time-availability';\n }\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n return;\n }\n\n const existingParticipant = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name);\n const existingOpenHours = existingParticipant?.availability?.open_hours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n const timeZone =\n existingOpenHours && existingOpenHours.length > 0\n ? existingParticipant?.timezone\n : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours?.at(0)?.timezone ||\n this.selectedConfiguration?.event_booking?.timezone ||\n window.Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n const existingSpecificTimeAvailability = existingParticipant?.specific_time_availability || [];\n const specificTimesAvailability = existingSpecificTimeAvailability?.length > 0 ? existingSpecificTimeAvailability : [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['tab'] = 'availability';\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants[event.detail.name]['timezone'] = event.detail.checked ? timeZone : undefined;\n this.selectedParticipants[event.detail.name]['specificTimesAvailability'] = event.detail.checked ? specificTimesAvailability : [];\n // Reset onlySpecificTimeAvailability to false when custom availability is turned off\n this.selectedParticipants[event.detail.name]['onlySpecificTimeAvailability'] = event.detail.checked\n ? this.selectedParticipants[event.detail.name]['onlySpecificTimeAvailability'] || false\n : false;\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-availability-') && !name.startsWith('participant-specific-time-availability-')) {\n return;\n }\n\n // Parse the JSON value once - can contain { openHours: OpenHours[], timezone: string } or SpecificTimeAvailability[]\n let jsonValue;\n try {\n jsonValue = JSON.parse(value);\n } catch (err) {\n error(`Failed to parse JSON for participant ${name}:`, err);\n return;\n }\n\n if (name.startsWith('participant-availability-')) {\n // Expected name format: \"participant-availability-{participantId}-{uniqueKey}\"\n // The unique key is the participant email, which may itself contain hyphens,\n // so rejoin everything after the fixed prefix and index segments\n const nameParts = name.split('-');\n if (nameParts.length < 4) {\n debug(`Malformed participant name format: ${name}. Expected format: \"participant-availability-{participantId}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts.slice(3).join('-');\n if (!this.selectedParticipants[key]) return;\n const existingOpenHours = jsonValue.openHours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n this.selectedParticipants[key]['openHours'] = openHours;\n this.selectedParticipants[key]['tab'] = 'availability';\n if (jsonValue.timezone) {\n this.selectedParticipants[key]['timezone'] = jsonValue.timezone;\n // Also sync to specific times availability so it is consistent\n this.selectedParticipants[key]['specificTimesAvailability'] = (this.selectedParticipants[key]['specificTimesAvailability'] || []).map(entry => ({\n ...entry,\n timezone: jsonValue.timezone,\n }));\n }\n } else if (name.startsWith('participant-specific-time-availability')) {\n // Expected name format: \"participant-specific-time-availability-{index}-{uniqueKey}\"\n // The unique key is the participant email, which may itself contain hyphens,\n // so rejoin everything after the fixed prefix and index segments\n const nameParts = name.split('-');\n if (nameParts.length < 6) {\n debug(`Malformed participant specific date name format: ${name}. Expected format: \"participant-specific-time-availability-{index}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts.slice(5).join('-');\n if (!this.selectedParticipants[key]) return;\n const existingSpecificTimeAvailability = jsonValue || [];\n this.selectedParticipants[key]['specificTimesAvailability'] = existingSpecificTimeAvailability;\n this.selectedParticipants[key]['tab'] = 'specific-time-availability';\n\n // Sync timezone from specific time availability\n if (existingSpecificTimeAvailability.length > 0 && existingSpecificTimeAvailability[0].timezone) {\n const newTimezone = existingSpecificTimeAvailability[0].timezone;\n this.selectedParticipants[key]['timezone'] = newTimezone;\n // Also sync to open hours so it is consistent\n this.selectedParticipants[key]['openHours'] = (this.selectedParticipants[key]['openHours'] || []).map(entry => ({\n ...entry,\n timezone: newTimezone,\n }));\n }\n }\n\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n\n // Report (but never gate on) child picker validity AFTER the state update and emit.\n // Historically this check ran before the update and returned early, which silently\n // discarded the user's edit whenever ANY participant's picker was invalid — the child\n // picker still showed the edit while the saved payload resurrected the old entries\n // (e.g. deleted specific-time windows coming back as \"ghost\" availability).\n if (this.isInternalsAvailable && !this.validationError) {\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n } else {\n this.internals.setValidity({});\n }\n }\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participantSpecificTimeAvailability = {};\n const participantOnlySpecificTimeAvailability = {};\n Object.keys(this.selectedParticipants).forEach(key => {\n participantOpenHours[key] = this.selectedParticipants[key].openHours;\n participantSpecificTimeAvailability[key] = this.selectedParticipants[key].specificTimesAvailability || [];\n participantOnlySpecificTimeAvailability[key] = this.selectedParticipants[key].onlySpecificTimeAvailability || false;\n });\n\n // Validate that participants with \"only specific time availability\" have at least one specific time entry\n const invalidParticipants = Object.keys(this.selectedParticipants).filter(key => {\n const participant = this.selectedParticipants[key];\n return participant.onlySpecificTimeAvailability && (!participant.specificTimesAvailability || participant.specificTimesAvailability.length === 0);\n });\n\n if (invalidParticipants.length > 0) {\n const participantNames = invalidParticipants.map(key => this.selectedParticipants[key].name).join(', ');\n const errorMessage = i18next.t('nylasParticipantCustomAvailability.specificTimeRequired', { participantName: participantNames });\n this.validationError = errorMessage;\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, errorMessage);\n }\n } else {\n this.validationError = '';\n if (this.isInternalsAvailable) {\n this.internals.setValidity({});\n }\n }\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantSpecificTimeAvailability), `${this.name}-specific-time`);\n this.valueChanged.emit({ value: JSON.stringify(participantSpecificTimeAvailability), name: `${this.name}-specific-time` });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOnlySpecificTimeAvailability), `${this.name}-only-specific-time`);\n this.valueChanged.emit({ value: JSON.stringify(participantOnlySpecificTimeAvailability), name: `${this.name}-only-specific-time` });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n const onlySpecificTime = participant.only_specific_time_availability || false;\n const hasOpenHours = Boolean(participant.availability?.open_hours && participant.availability.open_hours.length > 0);\n const hasSpecificTime = Boolean(participant.specific_time_availability && participant.specific_time_availability.length > 0);\n const hasCustomAvailability = hasOpenHours || hasSpecificTime;\n\n selectedParticipants[participant.email] = {\n isOpen: hasCustomAvailability, // Open the section if custom availability is configured\n setCustom: hasOpenHours,\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n timezone: participant.timezone,\n specificTimesAvailability: participant.specific_time_availability || [],\n onlySpecificTimeAvailability: onlySpecificTime,\n // Default to specific-time-availability tab if only specific time is enabled\n tab: onlySpecificTime ? 'specific-time-availability' : 'availability',\n };\n });\n return selectedParticipants;\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';\n }\n\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>{i18next.t('nylasParticipantCustomAvailability.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantCustomAvailability.headerSubTitle')}</p>\n </div>\n {this.validationError && (\n <div class=\"validation-error\" part=\"npca__validation-error\">\n <span>{this.validationError}</span>\n </div>\n )}\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n const participantOpenHours = participant.availability?.open_hours || [];\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>{i18next.t('nylasParticipantCustomAvailability.participantOpenHoursTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n themeConfig={this.themeConfig}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <div class=\"participant-only-specific-time-container\">\n <div class=\"participant-only-specific-time-checkbox\">\n <label>\n <input\n type=\"checkbox\"\n checked={participant.onlySpecificTimeAvailability}\n onChange={(e: any) => {\n this.selectedParticipants[key]['onlySpecificTimeAvailability'] = e.target.checked;\n if (e.target.checked) {\n this.selectedParticipants[key]['tab'] = 'specific-time-availability';\n }\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }}\n />\n <span>{i18next.t('nylasParticipantCustomAvailability.onlySpecificTimeAvailability', { participantName: participant.name })}</span>\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" width=\"14\" height=\"14\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasParticipantCustomAvailability.onlySpecificTimeAvailabilityTooltip', { participantName: participant.name })}\n </span>\n </tooltip-component>\n </label>\n </div>\n </div>\n )}\n {participant.isOpen && (\n <div class={`participant-tabs ${participant.onlySpecificTimeAvailability ? 'single-tab' : ''}`} part=\"npca__participant-tabs\">\n {!participant.onlySpecificTimeAvailability && (\n <div\n class={`participant-tab ${participant.tab === 'availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantAvailabilityTab')}</span>\n </div>\n )}\n <div\n class={`participant-tab ${participant.tab === 'specific-time-availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'specific-time-availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantSpecificTimeAvailabilityTab')}</span>\n </div>\n </div>\n )}\n {participant.tab === 'availability' && participant.isOpen && !participant.onlySpecificTimeAvailability && (\n <nylas-availability-picker\n key={index}\n name={`participant-availability-${index}-${key}`}\n openHours={participantOpenHours}\n defaultTimezone={participant.timezone}\n hideHeader={true}\n />\n )}\n {participant.tab === 'specific-time-availability' && participant.isOpen && (\n <nylas-specific-time-availability-picker\n key={index}\n name={`participant-specific-time-availability-${index}-${key}`}\n defaultTimezone={participant.timezone}\n specificTimesAvailability={participant.specificTimesAvailability}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -8125,15 +8125,6 @@ const NylasParticipantsCustomAvailability = class {
8125
8125
  error(`Failed to parse JSON for participant ${name}:`, err);
8126
8126
  return;
8127
8127
  }
8128
- if (this.isInternalsAvailable) {
8129
- if (!this.participantFormRef.checkValidity()) {
8130
- this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
8131
- return;
8132
- }
8133
- else {
8134
- this.internals.setValidity({});
8135
- }
8136
- }
8137
8128
  if (name.startsWith('participant-availability-')) {
8138
8129
  const nameParts = name.split('-');
8139
8130
  if (nameParts.length < 4) {
@@ -8178,6 +8169,14 @@ const NylasParticipantsCustomAvailability = class {
8178
8169
  }
8179
8170
  this.selectedParticipants = { ...this.selectedParticipants };
8180
8171
  this.updateFormValue();
8172
+ if (this.isInternalsAvailable && !this.validationError) {
8173
+ if (!this.participantFormRef.checkValidity()) {
8174
+ this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
8175
+ }
8176
+ else {
8177
+ this.internals.setValidity({});
8178
+ }
8179
+ }
8181
8180
  }
8182
8181
  updateFormValue() {
8183
8182
  const participantOpenHours = {};
@@ -8238,7 +8237,7 @@ const NylasParticipantsCustomAvailability = class {
8238
8237
  return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
8239
8238
  }
8240
8239
  render() {
8241
- return (h(Host, { key: '5ff7155db08b5adcfe1168adf8452f426f4fb66d' }, h("div", { key: '376210b2869e4e9c518ba6f6ab29aff086df8a86', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '0a7a2492da0927c3fc2eff3e5b74ee8dd873f5ce', class: "header", part: "npca__header" }, h("h3", { key: 'f38db5fea6b75ebf696c86371437149421f375b0' }, instance.t('nylasParticipantCustomAvailability.headerTitle')), h("p", { key: 'b64aa2227fc6c761161baee71df7ccfa1d4a0c0b' }, instance.t('nylasParticipantCustomAvailability.headerSubTitle'))), this.validationError && (h("div", { key: '902126476a17af8e5c5303bd7acd86ae95063c68', class: "validation-error", part: "npca__validation-error" }, h("span", { key: 'b3595b86576e9894e97127bad821714cc9f4a0ea' }, this.validationError))), h("div", { key: 'a03b0815c38caaa5255293efe25a2f8b5e65349a', class: "content", part: "npca__content" }, h("form", { key: '92b375ef71cd62bf4ed37b3fcee09c718e79bc3b', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
8240
+ return (h(Host, { key: '5e62c290e9bec1901728c12d6d8cbb298b97da2b' }, h("div", { key: '3a7a5d5fda480e55df91e86b87d464b8ee142595', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '7ef83dde9d4ccd2ff36e948a3e27e2e30c457137', class: "header", part: "npca__header" }, h("h3", { key: '5784dbfb95cb7f66a02d995e3f4d53bd4c82b753' }, instance.t('nylasParticipantCustomAvailability.headerTitle')), h("p", { key: 'e8a803be4c48b789ae499749224a6dbd3f7e1681' }, instance.t('nylasParticipantCustomAvailability.headerSubTitle'))), this.validationError && (h("div", { key: 'f10b45081c034f106237e1fdeb9a92f9bfd8c6ac', class: "validation-error", part: "npca__validation-error" }, h("span", { key: '4d17c47cc99364711ba9bc10aa0e2bafe6c7ffc4' }, this.validationError))), h("div", { key: 'bab32e3f7a3f58564269087b34bb223916503a3f', class: "content", part: "npca__content" }, h("form", { key: 'f3ade0977a820e63960511ab2c4e8f8bc69b04dd', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
8242
8241
  const participant = this.selectedParticipants[key];
8243
8242
  const participantOpenHours = participant.availability?.open_hours || [];
8244
8243
  if (!participant || !participant.name)
@@ -8830,7 +8829,8 @@ const NylasSpecificTimeAvailabilityPicker = class {
8830
8829
  if (this.specificTimesAvailability[0].timezone) {
8831
8830
  this.timezone = this.specificTimesAvailability[0].timezone;
8832
8831
  }
8833
- const entries = this.specificTimesAvailability.map((item, index) => {
8832
+ const sortedAvailability = [...this.specificTimesAvailability].sort((a, b) => (a.date === b.date ? a.start.localeCompare(b.start) : a.date.localeCompare(b.date)));
8833
+ const entries = sortedAvailability.map((item, index) => {
8834
8834
  const isUnavailable = item.start === '00:00' && item.end === '00:00';
8835
8835
  return {
8836
8836
  id: `specific-time-${index}`,
@@ -9043,11 +9043,11 @@ const NylasSpecificTimeAvailabilityPicker = class {
9043
9043
  value: key,
9044
9044
  }));
9045
9045
  const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.timezone);
9046
- return (h(Host, { key: 'eebdadc4785b92c186738ac7b9cb2dde9fbce996' }, h("div", { key: 'a620af13300146972ef0e2ccd3d393bd0f34625e', class: "nylas-specific-time-availability-picker", part: "nstap" }, !this.hideHeader && (h("div", { key: '6b7c3c7a73e202ef6fb288e880a9eacba3759778', class: "header", part: "nstap__header" }, h("h3", { key: '01e13ae3a10ab877dc039afcdd69f48e1023d752' }, instance.t('nylasSpecificTimeAvailabilityPicker.headerTitle')), h("p", { key: '38fbec12451c9bd136a2e21b09ca9d439d9afb9d' }, instance.t('nylasSpecificTimeAvailabilityPicker.headerDescription'), h("tooltip-component", { key: '502f37259467a4cd486637e2ca1f9112768a7757' }, h("info-icon", { key: 'ebe5b465510530a9e7a054d284d0a327d869e626', slot: "tooltip-icon" }), h("span", { key: '95d0e593802256fb05a7500b0b77faa8b0c2a1be', slot: "tooltip-content" }, instance.t('nylasSpecificTimeAvailabilityPicker.tooltip.desc')))))), h("div", { key: '89b15e038648d7dc07fb395cba589dd20db92ad3', class: "content", part: "nstap__content" }, h("section", { key: 'aba6b14123776917164a523f01c94e6c593e1927', class: "timezone-selector", part: "nstap__timezone-selector", "aria-labelledby": "timezone-header" }, h("h4", { key: '02f309870da12e5fc010be80a9048ac0bb173a19', id: "timezone-header", class: "sub-header" }, instance.t('nylasSpecificTimeAvailabilityPicker.selectTimezone')), h("p", { key: '1c4e5e41f0981067e881f61c2b53e83cc1fe65d8', class: "timezone-description" }, instance.t('nylasSpecificTimeAvailabilityPicker.timezoneDescription')), selectedTimezoneOption?.label && (h("select-dropdown", { key: '3ed2f26ce1fffb9e7eeed1facb40b72161c325d4', name: "specific-time-timezone", searchPlaceholder: instance.t('search'), exportparts: "sd_dropdown: nstap__timezone-container, sd_dropdown-button: nstap__timezone-button, sd_dropdown-content: nstap__timezone-dropdown-content", options: timezoneOptions, defaultSelectedOption: selectedTimezoneOption, themeConfig: this.themeConfig, "aria-label": instance.t('nylasSpecificTimeAvailabilityPicker.selectTimezone') }, h("span", { key: 'b4105b6d343c0e8c8bbd26f33e35b34a36e00821', slot: "select-icon", "aria-hidden": "true" }, h("globe-icon", { key: 'e72ffc953f138b7b8c81fa9601d12f82cd878a38', width: "20", height: "20" })))), this.validationErrors['timezone'] && (h("div", { key: '87c4c33e678fa738c845ed6fef29ddd617b2c424', class: "error-message timezone-error", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors['timezone']))), h("section", { key: 'b05db49af28232963b451e24a2ea364848e87b3e', class: "specific-times-section", part: "nstap__specific-times-section", "aria-labelledby": "specific-times-header" }, h("h4", { key: 'f0b566bd768e9bc0751a160e07b5da422bac336f', id: "specific-times-header", class: "section-header" }, instance.t('nylasSpecificTimeAvailabilityPicker.specificTimesHeader')), h("p", { key: 'aff99e63618a61037ba64cedfe4facc354991ef2', class: "section-description" }, instance.t('nylasSpecificTimeAvailabilityPicker.specificTimesDescription')), h("div", { key: '28c04af5aa3e9b481ba111865bc8869d7b2038c0', class: "specific-times", part: "nstap__specific-times", role: "list" }, this.specificDateEntries.length === 0 ? (h("div", { class: "empty-state", part: "nstap__empty-state" }, h("div", { class: "empty-icon", part: "nstap__empty-icon" }, h("calendar-icon", { width: "32", height: "32" })), h("h3", { class: "empty-title", part: "nstap__empty-title" }, instance.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')), h("p", { class: "empty-subtitle", part: "nstap__empty-subtitle" }, instance.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')))) : (this.specificDateEntries.map((entry, index) => (h("article", { class: "specific-time-entry", part: "nstap__specific-time-entry", key: entry.id, "data-entry-id": entry.id, role: "listitem", "aria-label": `Specific time availability entry ${index + 1}` }, h("div", { class: "entry-content", part: "nstap__entry-content" }, h("div", { class: "date-input-container", part: "nstap__date-input-container" }, h("nylas-date-component", { name: `date-${entry.id}`, defaultValue: entry.date, placeholder: "yyyy-mm-dd", part: "nstap__date-input", class: "date-input", themeConfig: this.themeConfig, exportparts: "ic__date: nstap__date-field, ic__input_wrapper: nstap__date-wrapper, ic__label: nstap__date-label", "aria-label": `Date for entry ${index + 1}` })), entry.isUnavailable ? (h("div", { class: "unavailable-text", part: "nstap__unavailable-text", role: "status" }, h("span", { class: "unavailable-label" }, instance.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')))) : (h("div", { class: "time-pickers", part: "nstap__time-pickers", role: "group", "aria-label": "Time range" }, h("nylas-time-window-picker", { id: `${entry.id}_start`, time: entry.startTime, name: `${entry.id}_start`, key: `${entry.id}_start`, language: this.selectedLanguage, hasError: !!this.validationErrors[entry.id], themeConfig: this.themeConfig, exportparts: "time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times", "aria-label": `Start time for entry ${index + 1}` }), h("span", { class: "time-separator", "aria-hidden": "true" }, "-"), h("nylas-time-window-picker", { id: `${entry.id}_end`, time: entry.endTime, name: `${entry.id}_end`, key: `${entry.id}_end`, minimumStartTime: entry.startTime, language: this.selectedLanguage, hasError: !!this.validationErrors[entry.id], themeConfig: this.themeConfig, exportparts: "time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times", "aria-label": `End time for entry ${index + 1}` }))), h("div", { class: "action-buttons", part: "nstap__action-buttons" }, h("button", { type: "button", class: { 'toggle-button': true, 'unavailable': entry.isUnavailable }, part: "nstap__toggle-button", onClick: () => this.toggleAvailability(entry.id), "aria-label": entry.isUnavailable
9046
+ return (h(Host, { key: '4d134c2b81e17dc6238e06bb89f3d1bfa2b757bb' }, h("div", { key: 'f58418df34f1c1070ac356be9e5267df60ba30b3', class: "nylas-specific-time-availability-picker", part: "nstap" }, !this.hideHeader && (h("div", { key: '52c61a7f8efc2ee41b96c7cd30db184dac379371', class: "header", part: "nstap__header" }, h("h3", { key: 'daaa78a82642cd1389dce9e57a7f4bc53be45976' }, instance.t('nylasSpecificTimeAvailabilityPicker.headerTitle')), h("p", { key: '751c1e9596150aa5f0a38778f6236dc0defba68d' }, instance.t('nylasSpecificTimeAvailabilityPicker.headerDescription'), h("tooltip-component", { key: '813fe27ad1696a3208c02807aa643c45e4736669' }, h("info-icon", { key: '36c4f8b642df2d8ab6f271696848edf82882f21a', slot: "tooltip-icon" }), h("span", { key: '7b14bb5499644014a51346ec4f1ecd83a6495548', slot: "tooltip-content" }, instance.t('nylasSpecificTimeAvailabilityPicker.tooltip.desc')))))), h("div", { key: '9c351dd740cafdba11b2d7c275432f007b5360bf', class: "content", part: "nstap__content" }, h("section", { key: '9d0eb572d83273cf6e468d5f3104360e348dd6e7', class: "timezone-selector", part: "nstap__timezone-selector", "aria-labelledby": "timezone-header" }, h("h4", { key: '299b34a534d35dfee2f2cc762d8a475b464adcaa', id: "timezone-header", class: "sub-header" }, instance.t('nylasSpecificTimeAvailabilityPicker.selectTimezone')), h("p", { key: '85e8d70c2f394e183043766c323962eeaa265011', class: "timezone-description" }, instance.t('nylasSpecificTimeAvailabilityPicker.timezoneDescription')), selectedTimezoneOption?.label && (h("select-dropdown", { key: '18a900c77b84a5a562156bc95b294986eae28a65', name: "specific-time-timezone", searchPlaceholder: instance.t('search'), exportparts: "sd_dropdown: nstap__timezone-container, sd_dropdown-button: nstap__timezone-button, sd_dropdown-content: nstap__timezone-dropdown-content", options: timezoneOptions, defaultSelectedOption: selectedTimezoneOption, themeConfig: this.themeConfig, "aria-label": instance.t('nylasSpecificTimeAvailabilityPicker.selectTimezone') }, h("span", { key: '718b4f834b19633e519c5a5cf10a27c0c1d0d3e0', slot: "select-icon", "aria-hidden": "true" }, h("globe-icon", { key: 'a1d2ec8303c79815c08faeb08800d45e24c1b833', width: "20", height: "20" })))), this.validationErrors['timezone'] && (h("div", { key: 'e19aed18519b769fd26013a9f991a389c01e1a7c', class: "error-message timezone-error", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors['timezone']))), h("section", { key: '234cf3184d76a414bcfa2c2e59d51172fe89d03c', class: "specific-times-section", part: "nstap__specific-times-section", "aria-labelledby": "specific-times-header" }, h("h4", { key: 'd5e8db5b614d13e8a40e89dd2e70b49826ab638e', id: "specific-times-header", class: "section-header" }, instance.t('nylasSpecificTimeAvailabilityPicker.specificTimesHeader')), h("p", { key: '523927778ec5002da4ddba94814446722f3f801c', class: "section-description" }, instance.t('nylasSpecificTimeAvailabilityPicker.specificTimesDescription')), h("div", { key: 'e2855d2f066bbee3b1e1884ddc0b3948673199c2', class: "specific-times", part: "nstap__specific-times", role: "list" }, this.specificDateEntries.length === 0 ? (h("div", { class: "empty-state", part: "nstap__empty-state" }, h("div", { class: "empty-icon", part: "nstap__empty-icon" }, h("calendar-icon", { width: "32", height: "32" })), h("h3", { class: "empty-title", part: "nstap__empty-title" }, instance.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')), h("p", { class: "empty-subtitle", part: "nstap__empty-subtitle" }, instance.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')))) : (this.specificDateEntries.map((entry, index) => (h("article", { class: "specific-time-entry", part: "nstap__specific-time-entry", key: entry.id, "data-entry-id": entry.id, role: "listitem", "aria-label": `Specific time availability entry ${index + 1}` }, h("div", { class: "entry-content", part: "nstap__entry-content" }, h("div", { class: "date-input-container", part: "nstap__date-input-container" }, h("nylas-date-component", { name: `date-${entry.id}`, defaultValue: entry.date, placeholder: "yyyy-mm-dd", part: "nstap__date-input", class: "date-input", themeConfig: this.themeConfig, exportparts: "ic__date: nstap__date-field, ic__input_wrapper: nstap__date-wrapper, ic__label: nstap__date-label", "aria-label": `Date for entry ${index + 1}` })), entry.isUnavailable ? (h("div", { class: "unavailable-text", part: "nstap__unavailable-text", role: "status" }, h("span", { class: "unavailable-label" }, instance.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')))) : (h("div", { class: "time-pickers", part: "nstap__time-pickers", role: "group", "aria-label": "Time range" }, h("nylas-time-window-picker", { id: `${entry.id}_start`, time: entry.startTime, name: `${entry.id}_start`, key: `${entry.id}_start`, language: this.selectedLanguage, hasError: !!this.validationErrors[entry.id], themeConfig: this.themeConfig, exportparts: "time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times", "aria-label": `Start time for entry ${index + 1}` }), h("span", { class: "time-separator", "aria-hidden": "true" }, "-"), h("nylas-time-window-picker", { id: `${entry.id}_end`, time: entry.endTime, name: `${entry.id}_end`, key: `${entry.id}_end`, minimumStartTime: entry.startTime, language: this.selectedLanguage, hasError: !!this.validationErrors[entry.id], themeConfig: this.themeConfig, exportparts: "time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times", "aria-label": `End time for entry ${index + 1}` }))), h("div", { class: "action-buttons", part: "nstap__action-buttons" }, h("button", { type: "button", class: { 'toggle-button': true, 'unavailable': entry.isUnavailable }, part: "nstap__toggle-button", onClick: () => this.toggleAvailability(entry.id), "aria-label": entry.isUnavailable
9047
9047
  ? instance.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')
9048
9048
  : instance.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable'), title: entry.isUnavailable
9049
9049
  ? instance.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')
9050
- : instance.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable') }, h("calendar-icon", { width: "20", height: "20", "aria-hidden": "true" })), h("button", { type: "button", class: "remove-button", part: "nstap__remove-button", onClick: () => this.removeSpecificTimeAvailability(entry.id), "aria-label": `Remove specific time entry ${index + 1}`, title: "Remove" }, h("close-icon", { width: "16", height: "16", "aria-hidden": "true" })))), this.validationErrors[entry.id] && (h("div", { class: "error-message", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors[entry.id]))))))), h("div", { key: '6c055484d6da9537f29a92f75aafb94b3f53b2bc', class: "add-button-container", part: "nstap__add-button-container" }, h("button-component", { key: '95cd31c30c35c15c06787a12dc749bca5e8702ec', id: "add-specific-time-open-hour", onClick: () => this.addSpecificTimeAvailability(), part: "nstap__add-button", variant: "basic", "aria-label": instance.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability') }, h("add-circle-icon", { key: '7922cee5395f9768aaab93a0bf3ff437ce870b48', width: "24", height: "24", "aria-hidden": "true" }), instance.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability'))))))));
9050
+ : instance.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable') }, h("calendar-icon", { width: "20", height: "20", "aria-hidden": "true" })), h("button", { type: "button", class: "remove-button", part: "nstap__remove-button", onClick: () => this.removeSpecificTimeAvailability(entry.id), "aria-label": `Remove specific time entry ${index + 1}`, title: "Remove" }, h("close-icon", { width: "16", height: "16", "aria-hidden": "true" })))), this.validationErrors[entry.id] && (h("div", { class: "error-message", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors[entry.id]))))))), h("div", { key: '7090e167621c9277ff45fc8d2297a908bd73e03e', class: "add-button-container", part: "nstap__add-button-container" }, h("button-component", { key: '0ccb4dbfd2bcad2f41ba238686519c4376b567e2', id: "add-specific-time-open-hour", onClick: () => this.addSpecificTimeAvailability(), part: "nstap__add-button", variant: "basic", "aria-label": instance.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability') }, h("add-circle-icon", { key: '823d017d2df65f36830d818a8fde664c69d12cdb', width: "24", height: "24", "aria-hidden": "true" }), instance.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability'))))))));
9051
9051
  }
9052
9052
  static get formAssociated() { return true; }
9053
9053
  get host() { return getElement(this); }