@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.
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +12 -19
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +13 -13
- 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-BspChjso.js → version-1ZdVKLpt.js} +3 -3
- package/dist/cjs/{version-BspChjso.js.map → version-1ZdVKLpt.js.map} +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +9 -10
- 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-KPbwxUCV.js → p-Bi06RVaz.js} +3 -3
- package/dist/components/{p-KPbwxUCV.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-Csux9e4C.js → p-Di0G82W0.js} +5 -5
- package/dist/components/{p-Csux9e4C.js.map → p-Di0G82W0.js.map} +1 -1
- package/dist/components/{p-BDVZl2EG.js → p-p9sl0FFV.js} +3 -3
- package/dist/components/{p-BDVZl2EG.js.map → p-p9sl0FFV.js.map} +1 -1
- package/dist/components/{p-B6bT8J6p.js → p-tx39yUB3.js} +12 -13
- package/dist/components/p-tx39yUB3.js.map +1 -0
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js +13 -13
- 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-xO_cryq5.js → version-CEtdwas_.js} +3 -3
- package/dist/esm/{version-xO_cryq5.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-ca824e25.entry.js → p-28182324.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ccc9d9d2.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-e0de5436.entry.js → p-74747365.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-0716662b.entry.js → p-9a42cebd.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-xO_cryq5.js → p-CEtdwas_.js} +2 -2
- package/dist/nylas-web-elements/{p-xO_cryq5.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-B6bT8J6p.js.map +0 -1
- package/dist/components/p-Czoh6-K4.js.map +0 -1
- package/dist/nylas-web-elements/p-ccc9d9d2.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-ca824e25.entry.js.map → p-28182324.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e0de5436.entry.js.map → p-74747365.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0716662b.entry.js.map → p-9a42cebd.entry.js.map} +0 -0
|
@@ -26612,7 +26612,7 @@ const LQ = () => ({
|
|
|
26612
26612
|
lazyLoadIntegration: CX,
|
|
26613
26613
|
getModalIntegration: () => DQ,
|
|
26614
26614
|
getScreenshotIntegration: () => LQ
|
|
26615
|
-
}), Yr = "2.5.
|
|
26615
|
+
}), Yr = "2.5.15", $Q = ".sc-add-circle-icon-h{display:flex}", BQ = De(class extends Ae {
|
|
26616
26616
|
constructor() {
|
|
26617
26617
|
super(), this.__registerHost(), this.width = "24", this.height = "25";
|
|
26618
26618
|
}
|
|
@@ -37277,17 +37277,17 @@ const XN = De(class extends Ae {
|
|
|
37277
37277
|
if (!this.specificTimesAvailability || this.specificTimesAvailability.length === 0)
|
|
37278
37278
|
return;
|
|
37279
37279
|
this.specificTimesAvailability[0].timezone && (this.timezone = this.specificTimesAvailability[0].timezone);
|
|
37280
|
-
const
|
|
37281
|
-
const
|
|
37280
|
+
const t = [...this.specificTimesAvailability].sort((i, a) => i.date === a.date ? i.start.localeCompare(a.start) : i.date.localeCompare(a.date)).map((i, a) => {
|
|
37281
|
+
const r = i.start === "00:00" && i.end === "00:00";
|
|
37282
37282
|
return {
|
|
37283
|
-
id: `specific-time-${
|
|
37284
|
-
date:
|
|
37285
|
-
startTime:
|
|
37286
|
-
endTime:
|
|
37287
|
-
isUnavailable:
|
|
37283
|
+
id: `specific-time-${a}`,
|
|
37284
|
+
date: i.date,
|
|
37285
|
+
startTime: r ? "09:00am" : bi(i.start),
|
|
37286
|
+
endTime: r ? "05:00pm" : bi(i.end),
|
|
37287
|
+
isUnavailable: r
|
|
37288
37288
|
};
|
|
37289
37289
|
});
|
|
37290
|
-
this.specificDateEntries =
|
|
37290
|
+
this.specificDateEntries = t, this.emitValueChanged();
|
|
37291
37291
|
}
|
|
37292
37292
|
addSpecificTimeAvailability() {
|
|
37293
37293
|
const e = /* @__PURE__ */ new Date(), t = new Date(e);
|
|
@@ -37411,7 +37411,7 @@ const XN = De(class extends Ae {
|
|
|
37411
37411
|
label: Va[i],
|
|
37412
37412
|
value: i
|
|
37413
37413
|
})), t = e.find((i) => i.value === this.timezone);
|
|
37414
|
-
return c(Ke, { key: "
|
|
37414
|
+
return c(Ke, { key: "4d134c2b81e17dc6238e06bb89f3d1bfa2b757bb" }, c("div", { key: "f58418df34f1c1070ac356be9e5267df60ba30b3", class: "nylas-specific-time-availability-picker", part: "nstap" }, !this.hideHeader && c("div", { key: "52c61a7f8efc2ee41b96c7cd30db184dac379371", class: "header", part: "nstap__header" }, c("h3", { key: "daaa78a82642cd1389dce9e57a7f4bc53be45976" }, w.t("nylasSpecificTimeAvailabilityPicker.headerTitle")), c("p", { key: "751c1e9596150aa5f0a38778f6236dc0defba68d" }, w.t("nylasSpecificTimeAvailabilityPicker.headerDescription"), c("tooltip-component", { key: "813fe27ad1696a3208c02807aa643c45e4736669" }, c("info-icon", { key: "36c4f8b642df2d8ab6f271696848edf82882f21a", slot: "tooltip-icon" }), c("span", { key: "7b14bb5499644014a51346ec4f1ecd83a6495548", slot: "tooltip-content" }, w.t("nylasSpecificTimeAvailabilityPicker.tooltip.desc"))))), c("div", { key: "9c351dd740cafdba11b2d7c275432f007b5360bf", class: "content", part: "nstap__content" }, c("section", { key: "9d0eb572d83273cf6e468d5f3104360e348dd6e7", class: "timezone-selector", part: "nstap__timezone-selector", "aria-labelledby": "timezone-header" }, c("h4", { key: "299b34a534d35dfee2f2cc762d8a475b464adcaa", id: "timezone-header", class: "sub-header" }, w.t("nylasSpecificTimeAvailabilityPicker.selectTimezone")), c("p", { key: "85e8d70c2f394e183043766c323962eeaa265011", class: "timezone-description" }, w.t("nylasSpecificTimeAvailabilityPicker.timezoneDescription")), (t == null ? void 0 : t.label) && c("select-dropdown", { key: "18a900c77b84a5a562156bc95b294986eae28a65", name: "specific-time-timezone", searchPlaceholder: w.t("search"), exportparts: "sd_dropdown: nstap__timezone-container, sd_dropdown-button: nstap__timezone-button, sd_dropdown-content: nstap__timezone-dropdown-content", options: e, defaultSelectedOption: t, themeConfig: this.themeConfig, "aria-label": w.t("nylasSpecificTimeAvailabilityPicker.selectTimezone") }, c("span", { key: "718b4f834b19633e519c5a5cf10a27c0c1d0d3e0", slot: "select-icon", "aria-hidden": "true" }, c("globe-icon", { key: "a1d2ec8303c79815c08faeb08800d45e24c1b833", width: "20", height: "20" }))), this.validationErrors.timezone && c("div", { key: "e19aed18519b769fd26013a9f991a389c01e1a7c", class: "error-message timezone-error", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors.timezone)), c("section", { key: "234cf3184d76a414bcfa2c2e59d51172fe89d03c", class: "specific-times-section", part: "nstap__specific-times-section", "aria-labelledby": "specific-times-header" }, c("h4", { key: "d5e8db5b614d13e8a40e89dd2e70b49826ab638e", id: "specific-times-header", class: "section-header" }, w.t("nylasSpecificTimeAvailabilityPicker.specificTimesHeader")), c("p", { key: "523927778ec5002da4ddba94814446722f3f801c", class: "section-description" }, w.t("nylasSpecificTimeAvailabilityPicker.specificTimesDescription")), c("div", { key: "e2855d2f066bbee3b1e1884ddc0b3948673199c2", class: "specific-times", part: "nstap__specific-times", role: "list" }, this.specificDateEntries.length === 0 ? c("div", { class: "empty-state", part: "nstap__empty-state" }, c("div", { class: "empty-icon", part: "nstap__empty-icon" }, c("calendar-icon", { width: "32", height: "32" })), c("h3", { class: "empty-title", part: "nstap__empty-title" }, w.t("nylasSpecificTimeAvailabilityPicker.emptyState.title")), c("p", { class: "empty-subtitle", part: "nstap__empty-subtitle" }, w.t("nylasSpecificTimeAvailabilityPicker.emptyState.subtitle"))) : this.specificDateEntries.map((i, a) => c("article", { class: "specific-time-entry", part: "nstap__specific-time-entry", key: i.id, "data-entry-id": i.id, role: "listitem", "aria-label": `Specific time availability entry ${a + 1}` }, c("div", { class: "entry-content", part: "nstap__entry-content" }, c("div", { class: "date-input-container", part: "nstap__date-input-container" }, c("nylas-date-component", { name: `date-${i.id}`, defaultValue: i.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 ${a + 1}` })), i.isUnavailable ? c("div", { class: "unavailable-text", part: "nstap__unavailable-text", role: "status" }, c("span", { class: "unavailable-label" }, w.t("nylasSpecificTimeAvailabilityPicker.entireDayUnavailable"))) : c("div", { class: "time-pickers", part: "nstap__time-pickers", role: "group", "aria-label": "Time range" }, c("nylas-time-window-picker", { id: `${i.id}_start`, time: i.startTime, name: `${i.id}_start`, key: `${i.id}_start`, language: this.selectedLanguage, hasError: !!this.validationErrors[i.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 ${a + 1}` }), c("span", { class: "time-separator", "aria-hidden": "true" }, "-"), c("nylas-time-window-picker", { id: `${i.id}_end`, time: i.endTime, name: `${i.id}_end`, key: `${i.id}_end`, minimumStartTime: i.startTime, language: this.selectedLanguage, hasError: !!this.validationErrors[i.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 ${a + 1}` })), c("div", { class: "action-buttons", part: "nstap__action-buttons" }, c("button", { type: "button", class: { "toggle-button": !0, unavailable: i.isUnavailable }, part: "nstap__toggle-button", onClick: () => this.toggleAvailability(i.id), "aria-label": i.isUnavailable ? w.t("nylasSpecificTimeAvailabilityPicker.markAsAvailable") : w.t("nylasSpecificTimeAvailabilityPicker.markAsUnavailable"), title: i.isUnavailable ? w.t("nylasSpecificTimeAvailabilityPicker.markAsAvailable") : w.t("nylasSpecificTimeAvailabilityPicker.markAsUnavailable") }, c("calendar-icon", { width: "20", height: "20", "aria-hidden": "true" })), c("button", { type: "button", class: "remove-button", part: "nstap__remove-button", onClick: () => this.removeSpecificTimeAvailability(i.id), "aria-label": `Remove specific time entry ${a + 1}`, title: "Remove" }, c("close-icon", { width: "16", height: "16", "aria-hidden": "true" })))), this.validationErrors[i.id] && c("div", { class: "error-message", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors[i.id])))), c("div", { key: "7090e167621c9277ff45fc8d2297a908bd73e03e", class: "add-button-container", part: "nstap__add-button-container" }, c("button-component", { key: "0ccb4dbfd2bcad2f41ba238686519c4376b567e2", id: "add-specific-time-open-hour", onClick: () => this.addSpecificTimeAvailability(), part: "nstap__add-button", variant: "basic", "aria-label": w.t("nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability") }, c("add-circle-icon", { key: "823d017d2df65f36830d818a8fde664c69d12cdb", width: "24", height: "24", "aria-hidden": "true" }), w.t("nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability")))))));
|
|
37415
37415
|
}
|
|
37416
37416
|
static get formAssociated() {
|
|
37417
37417
|
return !0;
|
|
@@ -37589,13 +37589,6 @@ const QN = De(class extends Ae {
|
|
|
37589
37589
|
Un(`Failed to parse JSON for participant ${t}:`, d);
|
|
37590
37590
|
return;
|
|
37591
37591
|
}
|
|
37592
|
-
if (this.isInternalsAvailable)
|
|
37593
|
-
if (this.participantFormRef.checkValidity())
|
|
37594
|
-
this.internals.setValidity({});
|
|
37595
|
-
else {
|
|
37596
|
-
this.internals.setValidity({ customError: !0 }, "Please fix the overlapping time ranges.");
|
|
37597
|
-
return;
|
|
37598
|
-
}
|
|
37599
37592
|
if (t.startsWith("participant-availability-")) {
|
|
37600
37593
|
const d = t.split("-");
|
|
37601
37594
|
if (d.length < 4) {
|
|
@@ -37628,7 +37621,7 @@ const QN = De(class extends Ae {
|
|
|
37628
37621
|
}));
|
|
37629
37622
|
}
|
|
37630
37623
|
}
|
|
37631
|
-
this.selectedParticipants = { ...this.selectedParticipants }, this.updateFormValue();
|
|
37624
|
+
this.selectedParticipants = { ...this.selectedParticipants }, this.updateFormValue(), this.isInternalsAvailable && !this.validationError && (this.participantFormRef.checkValidity() ? this.internals.setValidity({}) : this.internals.setValidity({ customError: !0 }, "Please fix the overlapping time ranges."));
|
|
37632
37625
|
}
|
|
37633
37626
|
updateFormValue() {
|
|
37634
37627
|
const e = {}, t = {}, i = {};
|
|
@@ -37668,7 +37661,7 @@ const QN = De(class extends Ae {
|
|
|
37668
37661
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
|
|
37669
37662
|
}
|
|
37670
37663
|
render() {
|
|
37671
|
-
return c(Ke, { key: "
|
|
37664
|
+
return c(Ke, { key: "5e62c290e9bec1901728c12d6d8cbb298b97da2b" }, c("div", { key: "3a7a5d5fda480e55df91e86b87d464b8ee142595", class: "nylas-participants-custom-availability", part: "npca" }, c("div", { key: "7ef83dde9d4ccd2ff36e948a3e27e2e30c457137", class: "header", part: "npca__header" }, c("h3", { key: "5784dbfb95cb7f66a02d995e3f4d53bd4c82b753" }, w.t("nylasParticipantCustomAvailability.headerTitle")), c("p", { key: "e8a803be4c48b789ae499749224a6dbd3f7e1681" }, w.t("nylasParticipantCustomAvailability.headerSubTitle"))), this.validationError && c("div", { key: "f10b45081c034f106237e1fdeb9a92f9bfd8c6ac", class: "validation-error", part: "npca__validation-error" }, c("span", { key: "4d17c47cc99364711ba9bc10aa0e2bafe6c7ffc4" }, this.validationError)), c("div", { key: "bab32e3f7a3f58564269087b34bb223916503a3f", class: "content", part: "npca__content" }, c("form", { key: "f3ade0977a820e63960511ab2c4e8f8bc69b04dd", ref: (e) => this.participantFormRef = e }, Object.keys(this.selectedParticipants).map((e, t) => {
|
|
37672
37665
|
var r;
|
|
37673
37666
|
const i = this.selectedParticipants[e], a = ((r = i.availability) == null ? void 0 : r.open_hours) || [];
|
|
37674
37667
|
if (!(!i || !i.name))
|
|
@@ -26103,7 +26103,7 @@ const oF = () => ({
|
|
|
26103
26103
|
lazyLoadIntegration: VR,
|
|
26104
26104
|
getModalIntegration: () => eF,
|
|
26105
26105
|
getScreenshotIntegration: () => oF
|
|
26106
|
-
}), No = "2.5.
|
|
26106
|
+
}), No = "2.5.15", lF = (t, e, n) => {
|
|
26107
26107
|
const i = t.get(e);
|
|
26108
26108
|
i ? i.includes(n) || i.push(n) : t.set(e, [n]);
|
|
26109
26109
|
}, cF = (t, e) => {
|
|
@@ -8127,15 +8127,6 @@ const NylasParticipantsCustomAvailability = class {
|
|
|
8127
8127
|
utils.error(`Failed to parse JSON for participant ${name}:`, err);
|
|
8128
8128
|
return;
|
|
8129
8129
|
}
|
|
8130
|
-
if (this.isInternalsAvailable) {
|
|
8131
|
-
if (!this.participantFormRef.checkValidity()) {
|
|
8132
|
-
this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
|
|
8133
|
-
return;
|
|
8134
|
-
}
|
|
8135
|
-
else {
|
|
8136
|
-
this.internals.setValidity({});
|
|
8137
|
-
}
|
|
8138
|
-
}
|
|
8139
8130
|
if (name.startsWith('participant-availability-')) {
|
|
8140
8131
|
const nameParts = name.split('-');
|
|
8141
8132
|
if (nameParts.length < 4) {
|
|
@@ -8180,6 +8171,14 @@ const NylasParticipantsCustomAvailability = class {
|
|
|
8180
8171
|
}
|
|
8181
8172
|
this.selectedParticipants = { ...this.selectedParticipants };
|
|
8182
8173
|
this.updateFormValue();
|
|
8174
|
+
if (this.isInternalsAvailable && !this.validationError) {
|
|
8175
|
+
if (!this.participantFormRef.checkValidity()) {
|
|
8176
|
+
this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
|
|
8177
|
+
}
|
|
8178
|
+
else {
|
|
8179
|
+
this.internals.setValidity({});
|
|
8180
|
+
}
|
|
8181
|
+
}
|
|
8183
8182
|
}
|
|
8184
8183
|
updateFormValue() {
|
|
8185
8184
|
const participantOpenHours = {};
|
|
@@ -8240,7 +8239,7 @@ const NylasParticipantsCustomAvailability = class {
|
|
|
8240
8239
|
return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
|
|
8241
8240
|
}
|
|
8242
8241
|
render() {
|
|
8243
|
-
return (index$1.h(index$1.Host, { key: '
|
|
8242
|
+
return (index$1.h(index$1.Host, { key: '5e62c290e9bec1901728c12d6d8cbb298b97da2b' }, index$1.h("div", { key: '3a7a5d5fda480e55df91e86b87d464b8ee142595', class: "nylas-participants-custom-availability", part: "npca" }, index$1.h("div", { key: '7ef83dde9d4ccd2ff36e948a3e27e2e30c457137', class: "header", part: "npca__header" }, index$1.h("h3", { key: '5784dbfb95cb7f66a02d995e3f4d53bd4c82b753' }, utils.instance.t('nylasParticipantCustomAvailability.headerTitle')), index$1.h("p", { key: 'e8a803be4c48b789ae499749224a6dbd3f7e1681' }, utils.instance.t('nylasParticipantCustomAvailability.headerSubTitle'))), this.validationError && (index$1.h("div", { key: 'f10b45081c034f106237e1fdeb9a92f9bfd8c6ac', class: "validation-error", part: "npca__validation-error" }, index$1.h("span", { key: '4d17c47cc99364711ba9bc10aa0e2bafe6c7ffc4' }, this.validationError))), index$1.h("div", { key: 'bab32e3f7a3f58564269087b34bb223916503a3f', class: "content", part: "npca__content" }, index$1.h("form", { key: 'f3ade0977a820e63960511ab2c4e8f8bc69b04dd', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
|
|
8244
8243
|
const participant = this.selectedParticipants[key];
|
|
8245
8244
|
const participantOpenHours = participant.availability?.open_hours || [];
|
|
8246
8245
|
if (!participant || !participant.name)
|
|
@@ -8832,7 +8831,8 @@ const NylasSpecificTimeAvailabilityPicker = class {
|
|
|
8832
8831
|
if (this.specificTimesAvailability[0].timezone) {
|
|
8833
8832
|
this.timezone = this.specificTimesAvailability[0].timezone;
|
|
8834
8833
|
}
|
|
8835
|
-
const
|
|
8834
|
+
const sortedAvailability = [...this.specificTimesAvailability].sort((a, b) => (a.date === b.date ? a.start.localeCompare(b.start) : a.date.localeCompare(b.date)));
|
|
8835
|
+
const entries = sortedAvailability.map((item, index) => {
|
|
8836
8836
|
const isUnavailable = item.start === '00:00' && item.end === '00:00';
|
|
8837
8837
|
return {
|
|
8838
8838
|
id: `specific-time-${index}`,
|
|
@@ -9045,11 +9045,11 @@ const NylasSpecificTimeAvailabilityPicker = class {
|
|
|
9045
9045
|
value: key,
|
|
9046
9046
|
}));
|
|
9047
9047
|
const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.timezone);
|
|
9048
|
-
return (index$1.h(index$1.Host, { key: '
|
|
9048
|
+
return (index$1.h(index$1.Host, { key: '4d134c2b81e17dc6238e06bb89f3d1bfa2b757bb' }, index$1.h("div", { key: 'f58418df34f1c1070ac356be9e5267df60ba30b3', class: "nylas-specific-time-availability-picker", part: "nstap" }, !this.hideHeader && (index$1.h("div", { key: '52c61a7f8efc2ee41b96c7cd30db184dac379371', class: "header", part: "nstap__header" }, index$1.h("h3", { key: 'daaa78a82642cd1389dce9e57a7f4bc53be45976' }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.headerTitle')), index$1.h("p", { key: '751c1e9596150aa5f0a38778f6236dc0defba68d' }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.headerDescription'), index$1.h("tooltip-component", { key: '813fe27ad1696a3208c02807aa643c45e4736669' }, index$1.h("info-icon", { key: '36c4f8b642df2d8ab6f271696848edf82882f21a', slot: "tooltip-icon" }), index$1.h("span", { key: '7b14bb5499644014a51346ec4f1ecd83a6495548', slot: "tooltip-content" }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.tooltip.desc')))))), index$1.h("div", { key: '9c351dd740cafdba11b2d7c275432f007b5360bf', class: "content", part: "nstap__content" }, index$1.h("section", { key: '9d0eb572d83273cf6e468d5f3104360e348dd6e7', class: "timezone-selector", part: "nstap__timezone-selector", "aria-labelledby": "timezone-header" }, index$1.h("h4", { key: '299b34a534d35dfee2f2cc762d8a475b464adcaa', id: "timezone-header", class: "sub-header" }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.selectTimezone')), index$1.h("p", { key: '85e8d70c2f394e183043766c323962eeaa265011', class: "timezone-description" }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.timezoneDescription')), selectedTimezoneOption?.label && (index$1.h("select-dropdown", { key: '18a900c77b84a5a562156bc95b294986eae28a65', name: "specific-time-timezone", searchPlaceholder: utils.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": utils.instance.t('nylasSpecificTimeAvailabilityPicker.selectTimezone') }, index$1.h("span", { key: '718b4f834b19633e519c5a5cf10a27c0c1d0d3e0', slot: "select-icon", "aria-hidden": "true" }, index$1.h("globe-icon", { key: 'a1d2ec8303c79815c08faeb08800d45e24c1b833', width: "20", height: "20" })))), this.validationErrors['timezone'] && (index$1.h("div", { key: 'e19aed18519b769fd26013a9f991a389c01e1a7c', class: "error-message timezone-error", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors['timezone']))), index$1.h("section", { key: '234cf3184d76a414bcfa2c2e59d51172fe89d03c', class: "specific-times-section", part: "nstap__specific-times-section", "aria-labelledby": "specific-times-header" }, index$1.h("h4", { key: 'd5e8db5b614d13e8a40e89dd2e70b49826ab638e', id: "specific-times-header", class: "section-header" }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.specificTimesHeader')), index$1.h("p", { key: '523927778ec5002da4ddba94814446722f3f801c', class: "section-description" }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.specificTimesDescription')), index$1.h("div", { key: 'e2855d2f066bbee3b1e1884ddc0b3948673199c2', class: "specific-times", part: "nstap__specific-times", role: "list" }, this.specificDateEntries.length === 0 ? (index$1.h("div", { class: "empty-state", part: "nstap__empty-state" }, index$1.h("div", { class: "empty-icon", part: "nstap__empty-icon" }, index$1.h("calendar-icon", { width: "32", height: "32" })), index$1.h("h3", { class: "empty-title", part: "nstap__empty-title" }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')), index$1.h("p", { class: "empty-subtitle", part: "nstap__empty-subtitle" }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')))) : (this.specificDateEntries.map((entry, index) => (index$1.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}` }, index$1.h("div", { class: "entry-content", part: "nstap__entry-content" }, index$1.h("div", { class: "date-input-container", part: "nstap__date-input-container" }, index$1.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 ? (index$1.h("div", { class: "unavailable-text", part: "nstap__unavailable-text", role: "status" }, index$1.h("span", { class: "unavailable-label" }, utils.instance.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')))) : (index$1.h("div", { class: "time-pickers", part: "nstap__time-pickers", role: "group", "aria-label": "Time range" }, index$1.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}` }), index$1.h("span", { class: "time-separator", "aria-hidden": "true" }, "-"), index$1.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}` }))), index$1.h("div", { class: "action-buttons", part: "nstap__action-buttons" }, index$1.h("button", { type: "button", class: { 'toggle-button': true, 'unavailable': entry.isUnavailable }, part: "nstap__toggle-button", onClick: () => this.toggleAvailability(entry.id), "aria-label": entry.isUnavailable
|
|
9049
9049
|
? utils.instance.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')
|
|
9050
9050
|
: utils.instance.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable'), title: entry.isUnavailable
|
|
9051
9051
|
? utils.instance.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')
|
|
9052
|
-
: utils.instance.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable') }, index$1.h("calendar-icon", { width: "20", height: "20", "aria-hidden": "true" })), index$1.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" }, index$1.h("close-icon", { width: "16", height: "16", "aria-hidden": "true" })))), this.validationErrors[entry.id] && (index$1.h("div", { class: "error-message", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors[entry.id]))))))), index$1.h("div", { key: '
|
|
9052
|
+
: utils.instance.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable') }, index$1.h("calendar-icon", { width: "20", height: "20", "aria-hidden": "true" })), index$1.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" }, index$1.h("close-icon", { width: "16", height: "16", "aria-hidden": "true" })))), this.validationErrors[entry.id] && (index$1.h("div", { class: "error-message", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors[entry.id]))))))), index$1.h("div", { key: '7090e167621c9277ff45fc8d2297a908bd73e03e', class: "add-button-container", part: "nstap__add-button-container" }, index$1.h("button-component", { key: '0ccb4dbfd2bcad2f41ba238686519c4376b567e2', id: "add-specific-time-open-hour", onClick: () => this.addSpecificTimeAvailability(), part: "nstap__add-button", variant: "basic", "aria-label": utils.instance.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability') }, index$1.h("add-circle-icon", { key: '823d017d2df65f36830d818a8fde664c69d12cdb', width: "24", height: "24", "aria-hidden": "true" }), utils.instance.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability'))))))));
|
|
9053
9053
|
}
|
|
9054
9054
|
static get formAssociated() { return true; }
|
|
9055
9055
|
get host() { return index$1.getElement(this); }
|