@nylas/web-elements 2.5.12 → 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.
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +14 -21
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +15 -15
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js.map +1 -1
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +1 -1
- package/dist/cjs/{version-FXnnI00G.js → version-1ZdVKLpt.js} +3 -3
- package/dist/cjs/{version-FXnnI00G.js.map → version-1ZdVKLpt.js.map} +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +11 -12
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js +4 -3
- package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js.map +1 -1
- package/dist/collection/version.js +1 -1
- package/dist/collection/version.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group.js +1 -1
- package/dist/components/nylas-editor-tabs.js +1 -1
- package/dist/components/nylas-participants-custom-availability.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +5 -5
- package/dist/components/nylas-scheduling.js +1 -1
- package/dist/components/nylas-specific-time-availability-picker.js +1 -1
- package/dist/components/{p-Cl71OI5D.js → p-Bi06RVaz.js} +3 -3
- package/dist/components/{p-Cl71OI5D.js.map → p-Bi06RVaz.js.map} +1 -1
- package/dist/components/{p-Czoh6-K4.js → p-DW9sxBeM.js} +6 -5
- package/dist/components/p-DW9sxBeM.js.map +1 -0
- package/dist/components/{p-77cQPnsG.js → p-Di0G82W0.js} +5 -5
- package/dist/components/{p-77cQPnsG.js.map → p-Di0G82W0.js.map} +1 -1
- package/dist/components/{p-Cm6e2qUq.js → p-p9sl0FFV.js} +3 -3
- package/dist/components/{p-Cm6e2qUq.js.map → p-p9sl0FFV.js.map} +1 -1
- package/dist/components/{p-pY2yw_Ql.js → p-tx39yUB3.js} +14 -15
- package/dist/components/p-tx39yUB3.js.map +1 -0
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js +15 -15
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js.map +1 -1
- package/dist/esm/google-logo-icon_6.entry.js +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
- package/dist/esm/nylas-scheduling.entry.js +1 -1
- package/dist/esm/{version-BEjJeakd.js → version-CEtdwas_.js} +3 -3
- package/dist/esm/{version-BEjJeakd.js.map → version-CEtdwas_.js.map} +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-32e39f3d.entry.js → p-28182324.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7c1bc27a.entry.js → p-72e72392.entry.js} +2 -2
- package/dist/nylas-web-elements/p-72e72392.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-fe855b8f.entry.js → p-74747365.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ad0e7f3b.entry.js → p-9a42cebd.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-BEjJeakd.js → p-CEtdwas_.js} +2 -2
- package/dist/nylas-web-elements/{p-BEjJeakd.js.map → p-CEtdwas_.js.map} +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-Czoh6-K4.js.map +0 -1
- package/dist/components/p-pY2yw_Ql.js.map +0 -1
- package/dist/nylas-web-elements/p-7c1bc27a.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-32e39f3d.entry.js.map → p-28182324.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fe855b8f.entry.js.map → p-74747365.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ad0e7f3b.entry.js.map → p-9a42cebd.entry.js.map} +0 -0
|
@@ -116,7 +116,8 @@ const NylasSpecificTimeAvailabilityPicker = proxyCustomElement(class NylasSpecif
|
|
|
116
116
|
if (this.specificTimesAvailability[0].timezone) {
|
|
117
117
|
this.timezone = this.specificTimesAvailability[0].timezone;
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const sortedAvailability = [...this.specificTimesAvailability].sort((a, b) => (a.date === b.date ? a.start.localeCompare(b.start) : a.date.localeCompare(b.date)));
|
|
120
|
+
const entries = sortedAvailability.map((item, index) => {
|
|
120
121
|
const isUnavailable = item.start === '00:00' && item.end === '00:00';
|
|
121
122
|
return {
|
|
122
123
|
id: `specific-time-${index}`,
|
|
@@ -329,11 +330,11 @@ const NylasSpecificTimeAvailabilityPicker = proxyCustomElement(class NylasSpecif
|
|
|
329
330
|
value: key,
|
|
330
331
|
}));
|
|
331
332
|
const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.timezone);
|
|
332
|
-
return (h(Host, { key: '
|
|
333
|
+
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
|
|
333
334
|
? instance.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')
|
|
334
335
|
: instance.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable'), title: entry.isUnavailable
|
|
335
336
|
? instance.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')
|
|
336
|
-
: 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: '
|
|
337
|
+
: 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'))))))));
|
|
337
338
|
}
|
|
338
339
|
static get formAssociated() { return true; }
|
|
339
340
|
get host() { return this; }
|
|
@@ -457,6 +458,6 @@ function defineCustomElement() {
|
|
|
457
458
|
}
|
|
458
459
|
|
|
459
460
|
export { NylasSpecificTimeAvailabilityPicker as N, defineCustomElement as d };
|
|
460
|
-
//# sourceMappingURL=p-
|
|
461
|
+
//# sourceMappingURL=p-DW9sxBeM.js.map
|
|
461
462
|
|
|
462
|
-
//# sourceMappingURL=p-
|
|
463
|
+
//# sourceMappingURL=p-DW9sxBeM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-DW9sxBeM.js","mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,uuTAAuuT;;;;;;;;;;;;;;;;MCezwT,mCAAmC,GAAAA,kBAAA,CAAA,MAAA,mCAAA,SAAAC,CAAA,CAAA;AANhD,IAAA,WAAA,GAAA;;;;;;AAgBU,QAAA,IAAI,CAAA,IAAA,GAAW,4BAA4B;AA8B3C,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAM3B,QAAA,IAAe,CAAA,eAAA,GAAW,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ;AAmBzE,QAAA,IAAmB,CAAA,mBAAA,GAMvB,EAAE;AAKE,QAAA,IAAgB,CAAA,gBAAA,GAA8B,EAAE;AAKhD,QAAA,IAAQ,CAAA,QAAA,GAAW,EAA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iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAsLD,EAAA,mCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.scss?tag=nylas-specific-time-availability-picker&encapsulation=shadow","src/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n}\n\n.nylas-specific-time-availability-picker {\n display: flex;\n margin: 1rem;\n flex-direction: column;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n\n .content {\n padding: 1.5rem;\n border-radius: var(--nylas-border-radius-2x);\n color: var(--nylas-base-900);\n font-size: 16px;\n font-family: var(--nylas-font-family);\n background: var(--nylas-base-25);\n display: flex;\n flex-direction: column;\n gap: 1.5rem;\n\n @media (max-width: 768px) {\n padding: 1rem;\n gap: 1.25rem;\n }\n }\n\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .timezone-selector {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: 1.25rem;\n background: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n\n @media (max-width: 768px) {\n padding: 1rem;\n }\n\n .sub-header {\n margin: 0;\n font-size: 0.9375rem;\n font-weight: 600;\n line-height: 1.5;\n color: var(--nylas-base-900);\n }\n\n .timezone-description {\n margin: 0;\n font-size: 0.8125rem;\n line-height: 1.5;\n color: var(--nylas-base-600);\n }\n\n select-dropdown {\n margin-top: 0.25rem;\n }\n\n .timezone-error {\n margin-top: 0.5rem;\n }\n }\n\n .specific-times-section {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n padding: 1.25rem;\n background: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n\n .section-header {\n margin: 0 0 0.5rem 0;\n font-size: 0.9375rem;\n font-weight: 600;\n line-height: 1.5;\n color: var(--nylas-base-900);\n }\n\n .section-description {\n margin: 0 0 1rem 0;\n font-size: 0.8125rem;\n line-height: 1.5;\n color: var(--nylas-base-600);\n }\n }\n\n .specific-times {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n }\n\n .empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 2rem 1rem;\n text-align: center;\n\n .empty-icon {\n margin-bottom: 1.5rem;\n opacity: 0.4;\n color: var(--nylas-base-400);\n }\n\n .empty-title {\n margin: 0 0 0.5rem 0;\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--nylas-base-700);\n line-height: 1.5;\n }\n\n .empty-subtitle {\n margin: 0;\n font-size: 0.875rem;\n color: var(--nylas-base-500);\n line-height: 1.5;\n max-width: 300px;\n }\n }\n\n .specific-time-entry {\n display: flex;\n flex-direction: column;\n gap: 0;\n padding: 1rem;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-0);\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n\n &:hover {\n border-color: var(--nylas-base-300);\n }\n\n &:focus-within {\n border-color: var(--nylas-primary);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n\n .entry-content {\n display: grid;\n grid-template: 1fr auto / auto 1fr;\n gap: 0.75rem;\n align-items: center;\n\n @media (max-width: 768px) {\n grid-template: unset;\n grid-template-areas:\n 'date'\n 'time_or_unavailable'\n 'actions';\n grid-template-columns: 1fr auto auto;\n gap: 0.75rem;\n }\n }\n\n .date-input-container {\n flex: 0 0 auto;\n\n @media (max-width: 768px) {\n grid-area: date;\n }\n\n .date-input {\n width: 100%;\n }\n\n nylas-date-component::part(ic__date) {\n border: 1px solid var(--nylas-base-200);\n height: 48px;\n display: flex;\n align-items: center;\n border-radius: var(--nylas-border-radius);\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n\n &:focus-within {\n border-color: var(--nylas-primary);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n }\n }\n\n .time-pickers {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n flex: 1;\n min-width: 0;\n\n @media (max-width: 768px) {\n grid-area: time_or_unavailable;\n }\n\n nylas-time-window-picker {\n flex: 1;\n min-width: 0;\n }\n\n .time-separator {\n font-size: 0.875rem;\n color: var(--nylas-base-600);\n font-weight: 500;\n flex-shrink: 0;\n line-height: 1;\n user-select: none;\n }\n }\n\n .unavailable-text {\n flex: 1;\n display: flex;\n align-items: center;\n padding: 0 1rem;\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-50);\n border: 1px solid var(--nylas-base-200);\n min-height: 48px;\n\n @media (max-width: 768px) {\n grid-area: time_or_unavailable;\n }\n\n .unavailable-label {\n font-size: 0.875rem;\n color: var(--nylas-base-600);\n font-weight: 500;\n }\n }\n\n .action-buttons {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n grid-column: 2;\n justify-content: end;\n\n @media (max-width: 768px) {\n grid-area: actions;\n justify-self: end;\n }\n }\n\n .toggle-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n padding: 0;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-0);\n color: var(--nylas-base-500);\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n\n &:hover {\n background: var(--nylas-base-50);\n border-color: var(--nylas-primary);\n color: var(--nylas-primary);\n }\n\n &:focus {\n outline: none;\n border-color: var(--nylas-primary);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n\n &:active {\n background: var(--nylas-base-100);\n }\n\n &.unavailable {\n background: var(--nylas-error-50);\n border-color: var(--nylas-error-200);\n color: var(--nylas-error);\n\n &:hover {\n background: var(--nylas-error-100);\n border-color: var(--nylas-error);\n }\n }\n }\n\n .remove-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n padding: 0;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-0);\n color: var(--nylas-base-400);\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n\n &:hover {\n background: var(--nylas-error-50);\n border-color: var(--nylas-error-200);\n color: var(--nylas-error);\n }\n\n &:focus {\n outline: none;\n border-color: var(--nylas-primary);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n\n &:active {\n background: var(--nylas-error-100);\n }\n }\n\n .error-message {\n width: 100%;\n padding: 0.5rem 0.75rem;\n background: var(--nylas-error-50);\n color: var(--nylas-error);\n font-size: 0.8125rem;\n line-height: 1.5;\n border-radius: var(--nylas-border-radius);\n border: 1px solid var(--nylas-error-200);\n margin-top: 0.5rem;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n }\n }\n\n .add-button-container {\n display: flex;\n justify-content: flex-start;\n margin-top: 0.5rem;\n\n button-component {\n width: 100%;\n\n @media (max-width: 768px) {\n font-size: 0.875rem;\n }\n }\n }\n}\n\n// Override button-component styles for the add button\n::part(nstap__add-button) {\n border: 1px dashed var(--nylas-base-200);\n background: var(--nylas-base-0);\n color: var(--nylas-base-700);\n\n &:hover {\n border-color: var(--nylas-primary);\n background: var(--nylas-base-50);\n color: var(--nylas-primary);\n }\n}\n\n// Custom styling for time picker components\n::part(nstap__time-picker-container) {\n flex: 1;\n min-width: 0;\n}\n\n::part(nstap__time-picker-input) {\n width: 100%;\n font-size: 0.875rem;\n min-height: 48px;\n display: flex;\n align-items: center;\n border-radius: var(--nylas-border-radius);\n}\n\n// Custom styling for date input component\n::part(nstap__date-input) {\n width: 100%;\n}\n\n::part(nstap__date-field) {\n width: 100%;\n font-size: 0.875rem;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 0.5rem 0.75rem;\n\n &:focus {\n border-color: var(--nylas-primary);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n}\n\n::part(nstap__date-wrapper) {\n margin: 0;\n}\n\n::part(nstap__date-label) {\n margin: 0;\n padding: 0;\n\n p {\n display: none; // Hide label since we don't need it\n }\n}\n","import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop, Watch, State, Listen } from '@stencil/core';\nimport { RegisterComponent } from '@/common/register-component';\nimport { LANGUAGE_CODE, TIMEZONE_MAP } from '@/common/constants';\nimport { Configuration, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { debug, convertTo12HourFormat, convertTo24HourFormat, timeToMinutes } from '@/utils/utils';\nimport i18next from '@/utils/i18n';\n\n@Component({\n tag: 'nylas-specific-time-availability-picker',\n styleUrl: 'nylas-specific-time-availability-picker.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasSpecificTimeAvailabilityPicker {\n /**\n * The element <nylas-specific-time-availability-picker> itself.\n */\n @Element() host!: HTMLNylasSpecificTimeAvailabilityPickerElement;\n\n /**\n * @standalone\n * The name of the specific date availability picker.\n */\n @Prop() name: string = 'specific-time-availability';\n\n /**\n * @standalone\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * @standalone\n * The specific date open hours.\n */\n @Prop() specificTimesAvailability?: SpecificTimeAvailability[];\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * @standalone\n * Hide the header of the specific time availability picker.\n */\n @Prop() hideHeader: boolean = false;\n\n /**\n * @standalone\n * The default timezone or preset timezone.\n */\n @Prop() defaultTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * @standalone\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The event is fired when the specific date open hours change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * Internal state for managing specific date entries\n */\n @State() specificDateEntries: Array<{\n id: string;\n date: string;\n startTime: string;\n endTime: string;\n isUnavailable: boolean;\n }> = [];\n\n /**\n * State for tracking validation errors\n */\n @State() validationErrors: { [key: string]: string } = {};\n\n /**\n * The selected timezone state.\n */\n @State() timezone: string = '';\n\n connectedCallback() {\n debug('nylas-specific-time-availability-picker', '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-specific-time-availability-picker', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-specific-time-availability-picker', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-specific-time-availability-picker', 'componentDidLoad');\n\n // Initialize timezone\n if (this.selectedConfiguration) {\n this.timezone = this.selectedConfiguration?.event_booking?.timezone || this.defaultTimezone;\n this.configChangedHandler(this.selectedConfiguration);\n } else {\n this.timezone = this.defaultTimezone;\n if (this.specificTimesAvailability && this.specificTimesAvailability.length > 0) {\n this.loadSpecificTimeAvailability();\n }\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals.setFormValue === 'function';\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-specific-time-availability-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('defaultTimezone')\n defaultTimezoneChanged(newValue: string) {\n if (newValue && newValue !== this.timezone) {\n this.timezone = newValue;\n this.emitValueChanged();\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n debug('nylas-specific-time-availability-picker', 'configChangedHandler', newConfig);\n // Load specific date open hours from the configuration participants\n this.loadSpecificTimeAvailability();\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n loadSpecificTimeAvailability() {\n if (!this.specificTimesAvailability || this.specificTimesAvailability.length === 0) {\n return;\n }\n\n // If timezone is provided in the first entry, use it\n if (this.specificTimesAvailability[0].timezone) {\n this.timezone = this.specificTimesAvailability[0].timezone;\n }\n\n // Display entries in chronological order (date, then start time). Configurations edited\n // over time accumulate entries in insertion order, which buried e.g. a second window for\n // an earlier date at the bottom of the list — admins auditing the date-sorted top of the\n // list could not see everything configured for a given date.\n const sortedAvailability = [...this.specificTimesAvailability].sort((a, b) => (a.date === b.date ? a.start.localeCompare(b.start) : a.date.localeCompare(b.date)));\n\n const entries = sortedAvailability.map((item, index) => {\n // Check if both start and end are \"00:00\" - this indicates an unavailable day\n const isUnavailable = item.start === '00:00' && item.end === '00:00';\n\n return {\n id: `specific-time-${index}`,\n date: item.date,\n startTime: isUnavailable ? '09:00am' : convertTo12HourFormat(item.start),\n endTime: isUnavailable ? '05:00pm' : convertTo12HourFormat(item.end),\n isUnavailable,\n };\n });\n\n this.specificDateEntries = entries;\n this.emitValueChanged();\n }\n\n addSpecificTimeAvailability() {\n // Initialize with incremental dates based on existing entries\n // First entry: today, second entry: tomorrow, third entry: day after, etc.\n const today = new Date();\n const targetDate = new Date(today);\n targetDate.setDate(today.getDate() + this.specificDateEntries.length);\n const formattedDate = targetDate.toISOString().split('T')[0];\n\n const newEntry = {\n id: `specific-time-${Date.now()}`,\n date: formattedDate,\n startTime: '09:00am',\n endTime: '05:00pm',\n isUnavailable: false,\n timezone: this.timezone,\n };\n\n this.specificDateEntries = [...this.specificDateEntries, newEntry];\n\n // Clear any global validation errors since we're adding a new valid entry\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n\n this.emitValueChanged();\n }\n\n removeSpecificTimeAvailability(id: string) {\n this.specificDateEntries = this.specificDateEntries.filter(entry => entry.id !== id);\n\n // Clear validation error for the removed entry\n if (this.validationErrors[id]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[id];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n\n toggleAvailability(id: string) {\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === id) {\n return { ...entry, isUnavailable: !entry.isUnavailable };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry since availability state changed\n if (this.validationErrors[id]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[id];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n\n /**\n * Validates a single date entry\n */\n validateEntry(entry: (typeof this.specificDateEntries)[0]): string | null {\n // Check if date is empty or invalid\n if (!entry.date) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.dateRequired');\n }\n\n const dateObj = new Date(entry.date);\n if (isNaN(dateObj.getTime())) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.invalidDateFormat');\n }\n\n // If unavailable, no need to validate times\n if (entry.isUnavailable) {\n return null;\n }\n\n // Validate start and end times are present\n if (!entry.startTime || !entry.endTime) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.timesRequired');\n }\n\n // Validate start time is before end time\n const startMinutes = timeToMinutes(entry.startTime);\n const endMinutes = timeToMinutes(entry.endTime);\n\n if (startMinutes >= endMinutes) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.startTimeBeforeEndTime');\n }\n\n return null;\n }\n\n /**\n * Validates that timezone is set when there are entries\n */\n validateTimezone(): string | null {\n if (this.specificDateEntries.length > 0 && !this.timezone) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.timezoneRequired');\n }\n return null;\n }\n\n /**\n * Validates all entries and updates validation state\n */\n validateAllEntries() {\n const errors: { [key: string]: string } = {};\n let hasErrors = false;\n\n // Validate timezone first\n const timezoneError = this.validateTimezone();\n if (timezoneError) {\n errors['timezone'] = timezoneError;\n hasErrors = true;\n }\n\n this.specificDateEntries.forEach(entry => {\n const error = this.validateEntry(entry);\n if (error) {\n errors[entry.id] = error;\n hasErrors = true;\n }\n });\n\n this.validationErrors = errors;\n\n // Update form validity\n if (hasErrors) {\n // Prioritize timezone error, then entry errors\n const firstErrorKey = errors['timezone'] ? 'timezone' : Object.keys(errors)[0];\n const firstErrorElement =\n firstErrorKey === 'timezone'\n ? (this.host.shadowRoot?.querySelector('.timezone-selector') as HTMLElement)\n : (this.host.shadowRoot?.querySelector(`[data-entry-id=\"${firstErrorKey}\"]`) as HTMLElement);\n\n if (this.isInternalsAvailable && firstErrorElement) {\n this.internals.setValidity({ customError: true }, 'Please fix validation errors', firstErrorElement);\n }\n } else {\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n }\n\n return !hasErrors;\n }\n\n @Listen('timeChange')\n handleTimeChange(event: CustomEvent<{ key: string; value: string }>) {\n const { key, value } = event.detail;\n const [entryId, timeType] = key.split('_');\n\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === entryId) {\n return {\n ...entry,\n [timeType === 'start' ? 'startTime' : 'endTime']: value,\n };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry\n if (this.validationErrors[entryId]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n }\n\n // Clear form validity errors related to time\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n\n this.emitValueChanged();\n }\n\n @Listen('timeWindowFormError')\n setFormError(event: CustomEvent<{ key: string; message: string }>) {\n const { key, message } = event.detail;\n const [entryId] = key.split('_');\n\n if (message) {\n // Set validation error for this entry\n this.validationErrors = {\n ...this.validationErrors,\n [entryId]: message,\n };\n\n const element = this.host.shadowRoot?.getElementById(key);\n if (element && this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, message, element as HTMLInputElement);\n }\n } else {\n // Clear validation error for this entry\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n }\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'specific-time-timezone') {\n this.timezone = value;\n\n // Clear timezone validation error if it exists\n if (this.validationErrors['timezone']) {\n const newErrors = { ...this.validationErrors };\n delete newErrors['timezone'];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n }\n\n @Listen('nylasFormInputChanged')\n handleFormInputChange(event: CustomEvent<{ value: string; name: string; label: string; type: string; error: string }>) {\n const { name, value } = event.detail;\n\n // Check if this is a date input for our component\n if (name.startsWith('date-') && name.includes('specific-time-')) {\n const entryId = name.replace('date-', '');\n\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === entryId) {\n return { ...entry, date: value };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry\n if (this.validationErrors[entryId]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n }\n\n emitValueChanged() {\n // Validate all entries before emitting\n const isValid = this.validateAllEntries();\n\n const specificTimesAvailability = this.specificDateEntries\n .filter(entry => entry.date && (entry.isUnavailable || (entry.startTime && entry.endTime)))\n .map(entry => ({\n date: entry.date,\n start: entry.isUnavailable ? '00:00' : convertTo24HourFormat(entry.startTime),\n end: entry.isUnavailable ? '00:00' : convertTo24HourFormat(entry.endTime),\n timezone: this.timezone,\n }));\n\n const value = JSON.stringify(specificTimesAvailability);\n\n if (this.isInternalsAvailable && isValid) {\n this.internals.setFormValue(value, this.name);\n }\n\n this.valueChanged.emit({\n value,\n name: this.name,\n });\n }\n\n @RegisterComponent<NylasSpecificTimeAvailabilityPicker, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-specific-time-availability-picker',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n const timezoneOptions = Object.keys(TIMEZONE_MAP).map(key => ({\n label: TIMEZONE_MAP[key],\n value: key,\n }));\n const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.timezone);\n\n return (\n <Host>\n <div class=\"nylas-specific-time-availability-picker\" part=\"nstap\">\n {!this.hideHeader && (\n <div class=\"header\" part=\"nstap__header\">\n <h3>{i18next.t('nylasSpecificTimeAvailabilityPicker.headerTitle')}</h3>\n <p>\n {i18next.t('nylasSpecificTimeAvailabilityPicker.headerDescription')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasSpecificTimeAvailabilityPicker.tooltip.desc')}</span>\n </tooltip-component>\n </p>\n </div>\n )}\n <div class=\"content\" part=\"nstap__content\">\n <section class=\"timezone-selector\" part=\"nstap__timezone-selector\" aria-labelledby=\"timezone-header\">\n <h4 id=\"timezone-header\" class=\"sub-header\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.selectTimezone')}\n </h4>\n <p class=\"timezone-description\">{i18next.t('nylasSpecificTimeAvailabilityPicker.timezoneDescription')}</p>\n {selectedTimezoneOption?.label && (\n <select-dropdown\n name=\"specific-time-timezone\"\n searchPlaceholder={i18next.t('search')}\n exportparts=\"sd_dropdown: nstap__timezone-container, sd_dropdown-button: nstap__timezone-button, sd_dropdown-content: nstap__timezone-dropdown-content\"\n options={timezoneOptions}\n defaultSelectedOption={selectedTimezoneOption}\n themeConfig={this.themeConfig}\n aria-label={i18next.t('nylasSpecificTimeAvailabilityPicker.selectTimezone')}\n >\n <span slot=\"select-icon\" aria-hidden=\"true\">\n <globe-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n )}\n {this.validationErrors['timezone'] && (\n <div class=\"error-message timezone-error\" part=\"nstap__error-message\" role=\"alert\" aria-live=\"polite\">\n {this.validationErrors['timezone']}\n </div>\n )}\n </section>\n <section class=\"specific-times-section\" part=\"nstap__specific-times-section\" aria-labelledby=\"specific-times-header\">\n <h4 id=\"specific-times-header\" class=\"section-header\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.specificTimesHeader')}\n </h4>\n <p class=\"section-description\">{i18next.t('nylasSpecificTimeAvailabilityPicker.specificTimesDescription')}</p>\n <div class=\"specific-times\" part=\"nstap__specific-times\" role=\"list\">\n {this.specificDateEntries.length === 0 ? (\n <div class=\"empty-state\" part=\"nstap__empty-state\">\n <div class=\"empty-icon\" part=\"nstap__empty-icon\">\n <calendar-icon width=\"32\" height=\"32\" />\n </div>\n <h3 class=\"empty-title\" part=\"nstap__empty-title\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')}\n </h3>\n <p class=\"empty-subtitle\" part=\"nstap__empty-subtitle\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')}\n </p>\n </div>\n ) : (\n this.specificDateEntries.map((entry, index) => (\n <article\n class=\"specific-time-entry\"\n part=\"nstap__specific-time-entry\"\n key={entry.id}\n data-entry-id={entry.id}\n role=\"listitem\"\n aria-label={`Specific time availability entry ${index + 1}`}\n >\n <div class=\"entry-content\" part=\"nstap__entry-content\">\n <div class=\"date-input-container\" part=\"nstap__date-input-container\">\n <nylas-date-component\n name={`date-${entry.id}`}\n defaultValue={entry.date}\n placeholder=\"yyyy-mm-dd\"\n part=\"nstap__date-input\"\n class=\"date-input\"\n themeConfig={this.themeConfig}\n exportparts=\"ic__date: nstap__date-field, ic__input_wrapper: nstap__date-wrapper, ic__label: nstap__date-label\"\n aria-label={`Date for entry ${index + 1}`}\n />\n </div>\n {entry.isUnavailable ? (\n <div class=\"unavailable-text\" part=\"nstap__unavailable-text\" role=\"status\">\n <span class=\"unavailable-label\">{i18next.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')}</span>\n </div>\n ) : (\n <div class=\"time-pickers\" part=\"nstap__time-pickers\" role=\"group\" aria-label=\"Time range\">\n <nylas-time-window-picker\n id={`${entry.id}_start`}\n time={entry.startTime}\n name={`${entry.id}_start`}\n key={`${entry.id}_start`}\n language={this.selectedLanguage}\n hasError={!!this.validationErrors[entry.id]}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times\"\n aria-label={`Start time for entry ${index + 1}`}\n />\n <span class=\"time-separator\" aria-hidden=\"true\">\n -\n </span>\n <nylas-time-window-picker\n id={`${entry.id}_end`}\n time={entry.endTime}\n name={`${entry.id}_end`}\n key={`${entry.id}_end`}\n minimumStartTime={entry.startTime}\n language={this.selectedLanguage}\n hasError={!!this.validationErrors[entry.id]}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times\"\n aria-label={`End time for entry ${index + 1}`}\n />\n </div>\n )}\n <div class=\"action-buttons\" part=\"nstap__action-buttons\">\n <button\n type=\"button\"\n class={{ 'toggle-button': true, 'unavailable': entry.isUnavailable }}\n part=\"nstap__toggle-button\"\n onClick={() => this.toggleAvailability(entry.id)}\n aria-label={\n entry.isUnavailable\n ? i18next.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')\n : i18next.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable')\n }\n title={\n entry.isUnavailable\n ? i18next.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')\n : i18next.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable')\n }\n >\n <calendar-icon width=\"20\" height=\"20\" aria-hidden=\"true\" />\n </button>\n <button\n type=\"button\"\n class=\"remove-button\"\n part=\"nstap__remove-button\"\n onClick={() => this.removeSpecificTimeAvailability(entry.id)}\n aria-label={`Remove specific time entry ${index + 1}`}\n title=\"Remove\"\n >\n <close-icon width=\"16\" height=\"16\" aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n {this.validationErrors[entry.id] && (\n <div class=\"error-message\" part=\"nstap__error-message\" role=\"alert\" aria-live=\"polite\">\n {this.validationErrors[entry.id]}\n </div>\n )}\n </article>\n ))\n )}\n </div>\n <div class=\"add-button-container\" part=\"nstap__add-button-container\">\n <button-component\n id=\"add-specific-time-open-hour\"\n onClick={() => this.addSpecificTimeAvailability()}\n part=\"nstap__add-button\"\n variant=\"basic\"\n aria-label={i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability')}\n >\n <add-circle-icon width=\"24\" height=\"24\" aria-hidden=\"true\" />\n {i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability')}\n </button-component>\n </div>\n </section>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@ import { R as RegisterComponent } from './p-CpP2uaEo.js';
|
|
|
3
3
|
import { a as debug, J as mergeDeep, K as removeUndefinedProperties, M as editorTabComponentNames, D as DEFAULT_OPEN_HOURS, N as parsePreviewLink, O as CONFIGURATION_EVENT_TYPE } from './p-BCUF1qcs.js';
|
|
4
4
|
import { E as ErrorCategory, u } from './p-CWplx7sA.js';
|
|
5
5
|
import { i as instance } from './p-BjxQTsOy.js';
|
|
6
|
-
import { i as isInitialized, a as init, c as captureMessage, b as captureFeedback, v as version, f as feedbackSyncIntegration } from './p-
|
|
6
|
+
import { i as isInitialized, a as init, c as captureMessage, b as captureFeedback, v as version, f as feedbackSyncIntegration } from './p-Bi06RVaz.js';
|
|
7
7
|
import { d as defineCustomElement$1o } from './p-Dl0Yur5r.js';
|
|
8
8
|
import { d as defineCustomElement$1n } from './p-BVH0Klhu.js';
|
|
9
9
|
import { d as defineCustomElement$1m } from './p-hipsVOV5.js';
|
|
@@ -69,11 +69,11 @@ import { d as defineCustomElement$r } from './p-DjFQHhGY.js';
|
|
|
69
69
|
import { d as defineCustomElement$q } from './p-B2_cvJns.js';
|
|
70
70
|
import { d as defineCustomElement$p } from './p-DvPuyp-I.js';
|
|
71
71
|
import { d as defineCustomElement$o } from './p-D8f8zHZu.js';
|
|
72
|
-
import { d as defineCustomElement$n } from './p-
|
|
72
|
+
import { d as defineCustomElement$n } from './p-tx39yUB3.js';
|
|
73
73
|
import { d as defineCustomElement$m } from './p-uQf7jw6y.js';
|
|
74
74
|
import { d as defineCustomElement$l } from './p-D6yyOiee.js';
|
|
75
75
|
import { d as defineCustomElement$k } from './p-umrdj-23.js';
|
|
76
|
-
import { d as defineCustomElement$j } from './p-
|
|
76
|
+
import { d as defineCustomElement$j } from './p-DW9sxBeM.js';
|
|
77
77
|
import { d as defineCustomElement$i } from './p-D_CPIneS.js';
|
|
78
78
|
import { d as defineCustomElement$h } from './p-D_8c_n1h.js';
|
|
79
79
|
import { d as defineCustomElement$g } from './p-ByDfkWkX.js';
|
|
@@ -1433,6 +1433,6 @@ function defineCustomElement() {
|
|
|
1433
1433
|
}
|
|
1434
1434
|
|
|
1435
1435
|
export { NylasEditorTabs as N, defineCustomElement as d };
|
|
1436
|
-
//# sourceMappingURL=p-
|
|
1436
|
+
//# sourceMappingURL=p-Di0G82W0.js.map
|
|
1437
1437
|
|
|
1438
|
-
//# sourceMappingURL=p-
|
|
1438
|
+
//# sourceMappingURL=p-Di0G82W0.js.map
|