@nylas/web-elements 2.0.6 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +212 -212
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1044 -1044
- package/dist/cjs/{abstract-provider-b37458c4.js → abstract-provider-85a616a9.js} +2 -2
- package/dist/cjs/{abstract-provider-b37458c4.js.map → abstract-provider-85a616a9.js.map} +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_37.cjs.entry.js +55 -55
- package/dist/cjs/calendar-agenda-fill-icon_37.cjs.entry.js.map +1 -1
- package/dist/cjs/checkbox-group_4.cjs.entry.js +3 -3
- package/dist/cjs/checkmark-icon_15.cjs.entry.js +2 -2
- package/dist/cjs/{customParseFormat-61a3a302.js → customParseFormat-dc3b45aa.js} +2 -2
- package/dist/cjs/{customParseFormat-61a3a302.js.map → customParseFormat-dc3b45aa.js.map} +1 -1
- package/dist/cjs/{feedbackSync-2c4d37fe.js → feedbackSync-eaa01d21.js} +2 -2
- package/dist/cjs/feedbackSync-eaa01d21.js.map +1 -0
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +18 -18
- package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{index.es-e4fc6d92.js → index.es-a962dedb.js} +2 -2
- package/dist/cjs/{index.es-e4fc6d92.js.map → index.es-a962dedb.js.map} +1 -1
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/{nylas-api-request-5b2f7ec0.js → nylas-api-request-d263af93.js} +2 -2
- package/dist/cjs/{nylas-api-request-5b2f7ec0.js.map → nylas-api-request-d263af93.js.map} +1 -1
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +2 -2
- package/dist/cjs/nylas-date-component_2.cjs.entry.js +2 -2
- package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
- package/dist/cjs/nylas-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +6 -6
- package/dist/cjs/nylas-scheduling.cjs.entry.js +8 -8
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/{register-component-8a9c40ee.js → register-component-2eefbf66.js} +2 -2
- package/dist/cjs/{register-component-8a9c40ee.js.map → register-component-2eefbf66.js.map} +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/{utils-c923f1a8.js → utils-e37da320.js} +113 -113
- package/dist/cjs/{utils-c923f1a8.js.map → utils-e37da320.js.map} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +10 -10
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +18 -18
- 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-date-availability-picker/nylas-specific-date-availability-picker.css → nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.css} +46 -46
- package/dist/collection/components/scheduler-editor/{nylas-specific-date-availability-picker/nylas-specific-date-availability-picker.js → nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js} +41 -41
- package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js.map +1 -0
- package/dist/collection/components/scheduler-editor/{nylas-specific-date-availability-picker/test/nylas-specific-date-availability-picker.spec.js → nylas-specific-time-availability-picker/test/nylas-specific-time-availability-picker.spec.js} +48 -48
- package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/test/nylas-specific-time-availability-picker.spec.js.map +1 -0
- package/dist/collection/types/index.js.map +1 -1
- package/dist/components/index3.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group2.js +2 -2
- package/dist/components/nylas-editor-tabs2.js +15 -15
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-participants-custom-availability2.js +21 -21
- package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +5 -5
- package/dist/components/nylas-scheduling.js +4 -4
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-specific-time-availability-picker.d.ts +11 -0
- package/dist/components/nylas-specific-time-availability-picker.js +8 -0
- package/dist/components/nylas-specific-time-availability-picker.js.map +1 -0
- package/dist/components/{nylas-specific-date-availability-picker2.js → nylas-specific-time-availability-picker2.js} +41 -41
- package/dist/components/nylas-specific-time-availability-picker2.js.map +1 -0
- package/dist/components/utils.js +112 -112
- package/dist/esm/{abstract-provider-45ada3b4.js → abstract-provider-a502b54d.js} +2 -2
- package/dist/esm/{abstract-provider-45ada3b4.js.map → abstract-provider-a502b54d.js.map} +1 -1
- package/dist/esm/calendar-agenda-fill-icon_37.entry.js +55 -55
- package/dist/esm/calendar-agenda-fill-icon_37.entry.js.map +1 -1
- package/dist/esm/checkbox-group_4.entry.js +3 -3
- package/dist/esm/checkmark-icon_15.entry.js +2 -2
- package/dist/esm/{customParseFormat-eeec04f5.js → customParseFormat-b5d95b34.js} +2 -2
- package/dist/esm/{customParseFormat-eeec04f5.js.map → customParseFormat-b5d95b34.js.map} +1 -1
- package/dist/esm/{feedbackSync-0ebd0eda.js → feedbackSync-92220b42.js} +2 -2
- package/dist/esm/feedbackSync-92220b42.js.map +1 -0
- package/dist/esm/google-logo-icon_6.entry.js +18 -18
- package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
- package/dist/esm/{index.es-57d4a08f.js → index.es-488bc919.js} +2 -2
- package/dist/esm/{index.es-57d4a08f.js.map → index.es-488bc919.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-dropdown_2.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +1 -1
- package/dist/esm/{nylas-api-request-ad1909c6.js → nylas-api-request-9f7ac6c5.js} +2 -2
- package/dist/esm/{nylas-api-request-ad1909c6.js.map → nylas-api-request-9f7ac6c5.js.map} +1 -1
- package/dist/esm/nylas-booked-event-card_11.entry.js +2 -2
- package/dist/esm/nylas-date-component_2.entry.js +2 -2
- package/dist/esm/nylas-form-card.entry.js +2 -2
- package/dist/esm/nylas-notification_2.entry.js +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +6 -6
- package/dist/esm/nylas-scheduling.entry.js +8 -8
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/{register-component-0aad9e3d.js → register-component-3acd57e7.js} +2 -2
- package/dist/esm/{register-component-0aad9e3d.js.map → register-component-3acd57e7.js.map} +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/{utils-d3c0b941.js → utils-31933f5d.js} +113 -113
- package/dist/esm/{utils-d3c0b941.js.map → utils-31933f5d.js.map} +1 -1
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/{p-3216af1e.entry.js → p-20f50696.entry.js} +2 -2
- package/dist/nylas-web-elements/p-341f1a4c.entry.js +2 -0
- package/dist/nylas-web-elements/p-341f1a4c.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-1591deba.js → p-34c9fc7d.js} +2 -2
- package/dist/nylas-web-elements/{p-38fa873f.js → p-3524dab1.js} +2 -2
- package/dist/nylas-web-elements/p-3524dab1.js.map +1 -0
- package/dist/nylas-web-elements/{p-d45012f2.js → p-438d4542.js} +2 -2
- package/dist/nylas-web-elements/{p-21ab4e47.entry.js → p-536c5ef3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a4678661.entry.js → p-5a6c2efd.entry.js} +2 -2
- package/dist/nylas-web-elements/p-66a89e65.js +14 -0
- package/dist/nylas-web-elements/{p-17c5fb16.js.map → p-66a89e65.js.map} +1 -1
- package/dist/nylas-web-elements/{p-88e68e14.entry.js → p-6adb19cf.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8937a53f.entry.js → p-6bda61cf.entry.js} +3 -3
- package/dist/nylas-web-elements/p-6bda61cf.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-30d92734.entry.js → p-7c02e476.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8072aa07.js → p-803a1695.js} +2 -2
- package/dist/nylas-web-elements/{p-186bbd43.entry.js → p-81925b89.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-186bbd43.entry.js.map → p-81925b89.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-855fe5b3.entry.js → p-83d2ff21.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f83aa456.entry.js → p-8673dcf1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-24c390bd.js → p-86e217f4.js} +2 -2
- package/dist/nylas-web-elements/{p-d0f51520.entry.js → p-8d5efa5e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-0271cef3.entry.js → p-d7323440.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-59ff0231.entry.js → p-da25d877.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f0e1688e.js → p-e42db60f.js} +2 -2
- package/dist/nylas-web-elements/{p-c11e1016.entry.js → p-ff122d1e.entry.js} +2 -2
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +5 -5
- package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +3 -3
- package/dist/types/components/scheduler-editor/{nylas-specific-date-availability-picker/nylas-specific-date-availability-picker.d.ts → nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.d.ts} +7 -7
- package/dist/types/components.d.ts +19 -19
- package/dist/types/types/index.d.ts +2 -2
- package/package.json +2 -2
- package/dist/cjs/feedbackSync-2c4d37fe.js.map +0 -1
- package/dist/collection/components/scheduler-editor/nylas-specific-date-availability-picker/nylas-specific-date-availability-picker.js.map +0 -1
- package/dist/collection/components/scheduler-editor/nylas-specific-date-availability-picker/test/nylas-specific-date-availability-picker.spec.js.map +0 -1
- package/dist/components/nylas-specific-date-availability-picker.d.ts +0 -11
- package/dist/components/nylas-specific-date-availability-picker.js +0 -8
- package/dist/components/nylas-specific-date-availability-picker.js.map +0 -1
- package/dist/components/nylas-specific-date-availability-picker2.js.map +0 -1
- package/dist/esm/feedbackSync-0ebd0eda.js.map +0 -1
- package/dist/nylas-web-elements/p-17c5fb16.js +0 -14
- package/dist/nylas-web-elements/p-38fa873f.js.map +0 -1
- package/dist/nylas-web-elements/p-3ddcb355.entry.js +0 -2
- package/dist/nylas-web-elements/p-3ddcb355.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-8937a53f.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-3216af1e.entry.js.map → p-20f50696.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1591deba.js.map → p-34c9fc7d.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d45012f2.js.map → p-438d4542.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-21ab4e47.entry.js.map → p-536c5ef3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a4678661.entry.js.map → p-5a6c2efd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-88e68e14.entry.js.map → p-6adb19cf.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-30d92734.entry.js.map → p-7c02e476.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8072aa07.js.map → p-803a1695.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-855fe5b3.entry.js.map → p-83d2ff21.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f83aa456.entry.js.map → p-8673dcf1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-24c390bd.js.map → p-86e217f4.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d0f51520.entry.js.map → p-8d5efa5e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0271cef3.entry.js.map → p-d7323440.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-59ff0231.entry.js.map → p-da25d877.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f0e1688e.js.map → p-e42db60f.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c11e1016.entry.js.map → p-ff122d1e.entry.js.map} +0 -0
|
@@ -12,7 +12,7 @@ import { d as defineCustomElement$a } from './info.js';
|
|
|
12
12
|
import { d as defineCustomElement$9 } from './loading.js';
|
|
13
13
|
import { d as defineCustomElement$8 } from './nylas-availability-picker2.js';
|
|
14
14
|
import { d as defineCustomElement$7 } from './nylas-date-component2.js';
|
|
15
|
-
import { d as defineCustomElement$6 } from './nylas-specific-
|
|
15
|
+
import { d as defineCustomElement$6 } from './nylas-specific-time-availability-picker2.js';
|
|
16
16
|
import { d as defineCustomElement$5 } from './nylas-time-window-picker2.js';
|
|
17
17
|
import { d as defineCustomElement$4 } from './search.js';
|
|
18
18
|
import { d as defineCustomElement$3 } from './select-dropdown2.js';
|
|
@@ -115,21 +115,21 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
|
|
|
115
115
|
: this.selectedConfiguration?.availability?.availability_rules?.default_open_hours?.at(0)?.timezone ||
|
|
116
116
|
this.selectedConfiguration?.event_booking?.timezone ||
|
|
117
117
|
window.Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
118
|
-
const
|
|
119
|
-
const
|
|
118
|
+
const existingSpecificTimeAvailability = existingParticipant?.specific_time_availability || [];
|
|
119
|
+
const specificTimesAvailability = existingSpecificTimeAvailability?.length > 0 ? existingSpecificTimeAvailability : [];
|
|
120
120
|
this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;
|
|
121
121
|
this.selectedParticipants[event.detail.name]['tab'] = 'availability';
|
|
122
122
|
this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;
|
|
123
123
|
this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];
|
|
124
124
|
this.selectedParticipants[event.detail.name]['timezone'] = event.detail.checked ? timeZone : undefined;
|
|
125
|
-
this.selectedParticipants[event.detail.name]['
|
|
125
|
+
this.selectedParticipants[event.detail.name]['specificTimesAvailability'] = event.detail.checked ? specificTimesAvailability : [];
|
|
126
126
|
this.selectedParticipants = { ...this.selectedParticipants };
|
|
127
127
|
this.updateFormValue();
|
|
128
128
|
}
|
|
129
129
|
handleValueChanged(event) {
|
|
130
130
|
debug('[nylas-editor-tabs]', 'handleValueChanged', event);
|
|
131
131
|
const { name, value } = event.detail;
|
|
132
|
-
if (!name.startsWith('participant-availability-') && !name.startsWith('participant-specific-
|
|
132
|
+
if (!name.startsWith('participant-availability-') && !name.startsWith('participant-specific-time-availability-')) {
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
let jsonValue;
|
|
@@ -163,33 +163,33 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
|
|
|
163
163
|
this.selectedParticipants[key]['openHours'] = openHours;
|
|
164
164
|
this.selectedParticipants[key]['tab'] = 'availability';
|
|
165
165
|
}
|
|
166
|
-
else if (name.startsWith('participant-specific-
|
|
166
|
+
else if (name.startsWith('participant-specific-time-availability')) {
|
|
167
167
|
const nameParts = name.split('-');
|
|
168
168
|
if (nameParts.length < 6) {
|
|
169
|
-
console.warn(`Malformed participant specific date name format: ${name}. Expected format: "participant-specific-
|
|
169
|
+
console.warn(`Malformed participant specific date name format: ${name}. Expected format: "participant-specific-time-availability-{index}-{uniqueKey}"`);
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
172
|
const key = nameParts[5];
|
|
173
173
|
if (!this.selectedParticipants[key])
|
|
174
174
|
return;
|
|
175
|
-
const
|
|
176
|
-
this.selectedParticipants[key]['
|
|
177
|
-
this.selectedParticipants[key]['tab'] = 'specific-
|
|
175
|
+
const existingSpecificTimeAvailability = jsonValue || [];
|
|
176
|
+
this.selectedParticipants[key]['specificTimesAvailability'] = existingSpecificTimeAvailability;
|
|
177
|
+
this.selectedParticipants[key]['tab'] = 'specific-time-availability';
|
|
178
178
|
}
|
|
179
179
|
this.selectedParticipants = { ...this.selectedParticipants };
|
|
180
180
|
this.updateFormValue();
|
|
181
181
|
}
|
|
182
182
|
updateFormValue() {
|
|
183
183
|
const participantOpenHours = {};
|
|
184
|
-
const
|
|
184
|
+
const participantSpecificTimeAvailability = {};
|
|
185
185
|
Object.keys(this.selectedParticipants).forEach(key => {
|
|
186
186
|
participantOpenHours[key] = this.selectedParticipants[key].openHours;
|
|
187
|
-
|
|
187
|
+
participantSpecificTimeAvailability[key] = this.selectedParticipants[key].specificTimesAvailability || [];
|
|
188
188
|
});
|
|
189
189
|
this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);
|
|
190
190
|
this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });
|
|
191
|
-
this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(
|
|
192
|
-
this.valueChanged.emit({ value: JSON.stringify(
|
|
191
|
+
this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantSpecificTimeAvailability), `${this.name}-specific-time`);
|
|
192
|
+
this.valueChanged.emit({ value: JSON.stringify(participantSpecificTimeAvailability), name: `${this.name}-specific-time` });
|
|
193
193
|
}
|
|
194
194
|
setParticipants(participants) {
|
|
195
195
|
const selectedParticipants = {};
|
|
@@ -201,7 +201,7 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
|
|
|
201
201
|
name: participant.name || participant.email,
|
|
202
202
|
availability: participant.availability,
|
|
203
203
|
timezone: participant.timezone,
|
|
204
|
-
|
|
204
|
+
specificTimesAvailability: participant.specific_time_availability || [],
|
|
205
205
|
};
|
|
206
206
|
});
|
|
207
207
|
return selectedParticipants;
|
|
@@ -210,7 +210,7 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
|
|
|
210
210
|
return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
|
|
211
211
|
}
|
|
212
212
|
render() {
|
|
213
|
-
return (h(Host, { key: '
|
|
213
|
+
return (h(Host, { key: '72278a40aca8e3e3868b2c04abf9ec7ecb5cac10' }, h("div", { key: '82a8ddedcd2a16598f5a3cf8b8ac50e082a8303b', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: 'e2881fe998d498b865420faf97f0355fd571b702', class: "header", part: "npca__header" }, h("h3", { key: '3ca8980d00abe8001eb4ff0168c8ce249977c8da' }, instance.t('nylasParticipantCustomAvailability.headerTitle')), h("p", { key: '5fed5465662b20ce3339f95c1fda1ce6c8b72a32' }, instance.t('nylasParticipantCustomAvailability.headerSubTitle'))), h("div", { key: '1a3bd4ebcfc8e420674dcbbe39e7c77900bceb8e', class: "content", part: "npca__content" }, h("form", { key: '7dc0f391a4c56336bea907f2c2e78b6c17d06f0f', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
|
|
214
214
|
const participant = this.selectedParticipants[key];
|
|
215
215
|
const participantOpenHours = participant.availability?.open_hours || [];
|
|
216
216
|
if (!participant || !participant.name || !participant.availability)
|
|
@@ -224,10 +224,10 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
|
|
|
224
224
|
} }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("div", { class: "participant-tabs", part: "npca__participant-tabs" }, h("div", { class: `participant-tab ${participant.tab === 'availability' ? 'active' : ''}`, part: "npca__participant-tab", onClick: () => {
|
|
225
225
|
this.selectedParticipants[key].tab = 'availability';
|
|
226
226
|
this.selectedParticipants = { ...this.selectedParticipants };
|
|
227
|
-
} }, h("span", null, instance.t('nylasParticipantCustomAvailability.participantAvailabilityTab'))), h("div", { class: `participant-tab ${participant.tab === 'specific-
|
|
228
|
-
this.selectedParticipants[key].tab = 'specific-
|
|
227
|
+
} }, h("span", null, instance.t('nylasParticipantCustomAvailability.participantAvailabilityTab'))), h("div", { class: `participant-tab ${participant.tab === 'specific-time-availability' ? 'active' : ''}`, part: "npca__participant-tab", onClick: () => {
|
|
228
|
+
this.selectedParticipants[key].tab = 'specific-time-availability';
|
|
229
229
|
this.selectedParticipants = { ...this.selectedParticipants };
|
|
230
|
-
} }, h("span", null, instance.t('nylasParticipantCustomAvailability.
|
|
230
|
+
} }, h("span", null, instance.t('nylasParticipantCustomAvailability.participantSpecificTimeAvailabilityTab'))))), participant.tab === 'availability' && participant.isOpen && (h("nylas-availability-picker", { key: index, name: `participant-availability-${index}-${key}`, openHours: participantOpenHours, defaultTimezone: participant.timezone, hideHeader: true })), participant.tab === 'specific-time-availability' && participant.isOpen && (h("nylas-specific-time-availability-picker", { key: index, name: `participant-specific-time-availability-${index}-${key}`, specificTimesAvailability: participant.specificTimesAvailability }))));
|
|
231
231
|
}))))));
|
|
232
232
|
}
|
|
233
233
|
static get formAssociated() { return true; }
|
|
@@ -273,7 +273,7 @@ function defineCustomElement() {
|
|
|
273
273
|
if (typeof customElements === "undefined") {
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
|
-
const components = ["nylas-participants-custom-availability", "add-circle-icon", "button-component", "calendar-icon", "chevron-icon", "close-icon", "globe-icon", "info-icon", "loading-icon", "nylas-availability-picker", "nylas-date-component", "nylas-specific-
|
|
276
|
+
const components = ["nylas-participants-custom-availability", "add-circle-icon", "button-component", "calendar-icon", "chevron-icon", "close-icon", "globe-icon", "info-icon", "loading-icon", "nylas-availability-picker", "nylas-date-component", "nylas-specific-time-availability-picker", "nylas-time-window-picker", "search-icon", "select-dropdown", "toggle-switch", "tooltip-component"];
|
|
277
277
|
components.forEach(tagName => { switch (tagName) {
|
|
278
278
|
case "nylas-participants-custom-availability":
|
|
279
279
|
if (!customElements.get(tagName)) {
|
|
@@ -330,7 +330,7 @@ function defineCustomElement() {
|
|
|
330
330
|
defineCustomElement$7();
|
|
331
331
|
}
|
|
332
332
|
break;
|
|
333
|
-
case "nylas-specific-
|
|
333
|
+
case "nylas-specific-time-availability-picker":
|
|
334
334
|
if (!customElements.get(tagName)) {
|
|
335
335
|
defineCustomElement$6();
|
|
336
336
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-participants-custom-availability2.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,qpKAAqpK,CAAC;AACrsK,kDAAe,sCAAsC;;;;;;;;;;;;;;;;MC4BxC,mCAAmC;;;;;;;;oBAavB,iCAAiC;4BAMlB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;;;oCAuChF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;;IAI3C,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,wCAAwC,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACvF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC1C;IAGD,0BAA0B,CAAC,QAAuB,EAAE,QAAuB;QACzE,KAAK,CAAC,wCAAwC,EAAE,4BAA4B,EAAE,QAAQ,EA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,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;iEAuFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["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":["@import '../../../common/styles/variables.scss';\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 .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 }\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 .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 } 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, SpecificDateOpenHours, 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__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-date-availability';\n isOpen: boolean;\n openHours: OpenHours[];\n specificDateOpenHours: SpecificDateOpenHours[];\n name: string;\n availability?: ParticipantAvailability;\n timezone?: string;\n };\n } = this.setParticipants(this.participants);\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 }\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 }\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 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 existingSpecificDateOpenHours = existingParticipant?.specific_date_open_hours || [];\n const specificDateOpenHours = existingSpecificDateOpenHours?.length > 0 ? existingSpecificDateOpenHours : [];\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]['specificDateOpenHours'] = event.detail.checked ? specificDateOpenHours : [];\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-date-availability-')) {\n return;\n }\n\n // Parse the JSON value once - can contain { openHours: OpenHours[], timezone: string } or SpecificDateOpenHours[]\n let jsonValue;\n try {\n jsonValue = JSON.parse(value);\n } catch (error) {\n console.error(`Failed to parse JSON for participant ${name}:`, error);\n return;\n }\n\n // Validate the form\n if (this.isInternalsAvailable) {\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n }\n\n if (name.startsWith('participant-availability-')) {\n // Expected name format: \"participant-availability-{participantId}-{uniqueKey}\"\n // We extract the unique key (4th segment) to identify the specific participant\n const nameParts = name.split('-');\n if (nameParts.length < 4) {\n console.warn(`Malformed participant name format: ${name}. Expected format: \"participant-availability-{participantId}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts[3];\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 } else if (name.startsWith('participant-specific-date-availability')) {\n // Expected name format: \"participant-specific-date-availability-{index}-{uniqueKey}\"\n // Extract the unique key (6th segment) to identify the specific participant\n const nameParts = name.split('-');\n if (nameParts.length < 6) {\n console.warn(`Malformed participant specific date name format: ${name}. Expected format: \"participant-specific-date-availability-{index}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts[5];\n if (!this.selectedParticipants[key]) return;\n const existingSpecificDateOpenHours = jsonValue || [];\n this.selectedParticipants[key]['specificDateOpenHours'] = existingSpecificDateOpenHours;\n this.selectedParticipants[key]['tab'] = 'specific-date-availability';\n }\n\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participantSpecificDateOpenHours = {};\n Object.keys(this.selectedParticipants).forEach(key => {\n participantOpenHours[key] = this.selectedParticipants[key].openHours;\n participantSpecificDateOpenHours[key] = this.selectedParticipants[key].specificDateOpenHours || [];\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(participantSpecificDateOpenHours), `${this.name}-specific-date`);\n this.valueChanged.emit({ value: JSON.stringify(participantSpecificDateOpenHours), name: `${this.name}-specific-date` });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n selectedParticipants[participant.email] = {\n isOpen: false,\n setCustom: Boolean(participant.availability?.open_hours),\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n timezone: participant.timezone,\n specificDateOpenHours: participant.specific_date_open_hours || [],\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 <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 || !participant.availability) 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-tabs\" part=\"npca__participant-tabs\">\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 <div\n class={`participant-tab ${participant.tab === 'specific-date-availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'specific-date-availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantSpecificDateAvailabilityTab')}</span>\n </div>\n </div>\n )}\n {participant.tab === 'availability' && participant.isOpen && (\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-date-availability' && participant.isOpen && (\n <nylas-specific-date-availability-picker\n key={index}\n name={`participant-specific-date-availability-${index}-${key}`}\n specificDateOpenHours={participant.specificDateOpenHours}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"nylas-participants-custom-availability2.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,qpKAAqpK,CAAC;AACrsK,kDAAe,sCAAsC;;;;;;;;;;;;;;;;MC4BxC,mCAAmC;;;;;;;;oBAavB,iCAAiC;4BAMlB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;;;oCAuChF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;;IAI3C,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,wCAAwC,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACvF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;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zI,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;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;iEAuFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["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":["@import '../../../common/styles/variables.scss';\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 .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 }\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 .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 } 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__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 };\n } = this.setParticipants(this.participants);\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 }\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 }\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 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 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 (error) {\n console.error(`Failed to parse JSON for participant ${name}:`, error);\n return;\n }\n\n // Validate the form\n if (this.isInternalsAvailable) {\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n }\n\n if (name.startsWith('participant-availability-')) {\n // Expected name format: \"participant-availability-{participantId}-{uniqueKey}\"\n // We extract the unique key (4th segment) to identify the specific participant\n const nameParts = name.split('-');\n if (nameParts.length < 4) {\n console.warn(`Malformed participant name format: ${name}. Expected format: \"participant-availability-{participantId}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts[3];\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 } else if (name.startsWith('participant-specific-time-availability')) {\n // Expected name format: \"participant-specific-time-availability-{index}-{uniqueKey}\"\n // Extract the unique key (6th segment) to identify the specific participant\n const nameParts = name.split('-');\n if (nameParts.length < 6) {\n console.warn(`Malformed participant specific date name format: ${name}. Expected format: \"participant-specific-time-availability-{index}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts[5];\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\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participantSpecificTimeAvailability = {};\n Object.keys(this.selectedParticipants).forEach(key => {\n participantOpenHours[key] = this.selectedParticipants[key].openHours;\n participantSpecificTimeAvailability[key] = this.selectedParticipants[key].specificTimesAvailability || [];\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\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n selectedParticipants[participant.email] = {\n isOpen: false,\n setCustom: Boolean(participant.availability?.open_hours),\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 };\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 <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 || !participant.availability) 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-tabs\" part=\"npca__participant-tabs\">\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 <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 && (\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 specificTimesAvailability={participant.specificTimesAvailability}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -83,7 +83,7 @@ import { d as defineCustomElement$o } from './nylas-reminder-emails2.js';
|
|
|
83
83
|
import { d as defineCustomElement$n } from './nylas-reminder-time2.js';
|
|
84
84
|
import { d as defineCustomElement$m } from './nylas-scheduling-method2.js';
|
|
85
85
|
import { d as defineCustomElement$l } from './nylas-select-event-type2.js';
|
|
86
|
-
import { d as defineCustomElement$k } from './nylas-specific-
|
|
86
|
+
import { d as defineCustomElement$k } from './nylas-specific-time-availability-picker2.js';
|
|
87
87
|
import { d as defineCustomElement$j } from './nylas-time-window-picker2.js';
|
|
88
88
|
import { d as defineCustomElement$i } from './nylas-timeslot-interval2.js';
|
|
89
89
|
import { d as defineCustomElement$h } from './paintbrush-fill.js';
|
|
@@ -2667,7 +2667,7 @@ const NylasSchedulerEditor$1 = proxyCustomElement(class NylasSchedulerEditor ext
|
|
|
2667
2667
|
this.automaticComponentRegistration = true;
|
|
2668
2668
|
this.selectedLanguage = this.defaultLanguage || LANGUAGE_CODE.en;
|
|
2669
2669
|
this.langVersion = 0;
|
|
2670
|
-
this.version = "2.0
|
|
2670
|
+
this.version = "2.1.0" ;
|
|
2671
2671
|
}
|
|
2672
2672
|
connectedCallback() {
|
|
2673
2673
|
debug(`[nylas-scheduler-editor] connectedCallback`);
|
|
@@ -2771,7 +2771,7 @@ const NylasSchedulerEditor$1 = proxyCustomElement(class NylasSchedulerEditor ext
|
|
|
2771
2771
|
debug(`[nylas-scheduler-editor] componentDidLoad`);
|
|
2772
2772
|
await this.baseProvider?.componentDidLoad();
|
|
2773
2773
|
this.updateLocalization(this.localization);
|
|
2774
|
-
this.version = "2.0
|
|
2774
|
+
this.version = "2.1.0" ;
|
|
2775
2775
|
}
|
|
2776
2776
|
async componentDisconnected() {
|
|
2777
2777
|
await this.baseProvider?.componentDisconnected();
|
|
@@ -2915,7 +2915,7 @@ function defineCustomElement$1() {
|
|
|
2915
2915
|
if (typeof customElements === "undefined") {
|
|
2916
2916
|
return;
|
|
2917
2917
|
}
|
|
2918
|
-
const components = ["nylas-scheduler-editor", "add-circle-icon", "button-component", "calendar-agenda-fill-icon", "calendar-agenda-icon", "calendar-icon", "calendar-info-icon", "calendar-patterns-icon", "checkbox-component", "checkbox-group", "checkmark-icon", "chevron-icon", "clock-icon", "close-icon", "copy-icon", "delete-icon", "dragable-icon", "edit-icon", "envelope-fill-icon", "envelope-icon", "eye-icon", "feedback-icon", "flow-icon", "globe-icon", "google-logo-icon", "google-meet-icon", "info-icon", "input-color-picker", "input-component", "input-dropdown", "input-image-url", "loading-icon", "location-icon", "location-off-icon", "microsoft-logo-icon", "microsoft-teams-icon", "multi-select-dropdown", "nylas-additional-participants", "nylas-availability-picker", "nylas-booking-calendar-picker", "nylas-booking-confirmation-redirect", "nylas-booking-confirmation-type", "nylas-booking-form-config", "nylas-buffer-time", "nylas-calendar-picker", "nylas-cancellation-policy", "nylas-confirmation-email", "nylas-connected-calendars", "nylas-custom-booking-flow", "nylas-custom-event-slug", "nylas-customize-booking-settings", "nylas-date-component", "nylas-disable-emails", "nylas-editor-tabs", "nylas-editor-tabs-group", "nylas-event-calendar", "nylas-event-capacity", "nylas-event-description", "nylas-event-duration", "nylas-event-info", "nylas-event-limits", "nylas-event-location", "nylas-event-timeslot", "nylas-event-title", "nylas-feedback-form", "nylas-form-card", "nylas-limit-future-bookings", "nylas-list-configurations", "nylas-min-booking-notice", "nylas-min-cancellation-notice", "nylas-notification", "nylas-page-name", "nylas-page-styling", "nylas-participant-booking-calendars", "nylas-participants-custom-availability", "nylas-reminder-emails", "nylas-reminder-time", "nylas-scheduling-method", "nylas-select-event-type", "nylas-specific-
|
|
2918
|
+
const components = ["nylas-scheduler-editor", "add-circle-icon", "button-component", "calendar-agenda-fill-icon", "calendar-agenda-icon", "calendar-icon", "calendar-info-icon", "calendar-patterns-icon", "checkbox-component", "checkbox-group", "checkmark-icon", "chevron-icon", "clock-icon", "close-icon", "copy-icon", "delete-icon", "dragable-icon", "edit-icon", "envelope-fill-icon", "envelope-icon", "eye-icon", "feedback-icon", "flow-icon", "globe-icon", "google-logo-icon", "google-meet-icon", "info-icon", "input-color-picker", "input-component", "input-dropdown", "input-image-url", "loading-icon", "location-icon", "location-off-icon", "microsoft-logo-icon", "microsoft-teams-icon", "multi-select-dropdown", "nylas-additional-participants", "nylas-availability-picker", "nylas-booking-calendar-picker", "nylas-booking-confirmation-redirect", "nylas-booking-confirmation-type", "nylas-booking-form-config", "nylas-buffer-time", "nylas-calendar-picker", "nylas-cancellation-policy", "nylas-confirmation-email", "nylas-connected-calendars", "nylas-custom-booking-flow", "nylas-custom-event-slug", "nylas-customize-booking-settings", "nylas-date-component", "nylas-disable-emails", "nylas-editor-tabs", "nylas-editor-tabs-group", "nylas-event-calendar", "nylas-event-capacity", "nylas-event-description", "nylas-event-duration", "nylas-event-info", "nylas-event-limits", "nylas-event-location", "nylas-event-timeslot", "nylas-event-title", "nylas-feedback-form", "nylas-form-card", "nylas-limit-future-bookings", "nylas-list-configurations", "nylas-min-booking-notice", "nylas-min-cancellation-notice", "nylas-notification", "nylas-page-name", "nylas-page-styling", "nylas-participant-booking-calendars", "nylas-participants-custom-availability", "nylas-reminder-emails", "nylas-reminder-time", "nylas-scheduling-method", "nylas-select-event-type", "nylas-specific-time-availability-picker", "nylas-time-window-picker", "nylas-timeslot-interval", "paintbrush-fill-icon", "paintbrush-icon", "people-icon", "person-clipboard-icon", "plus-icon", "radio-button-group", "search-icon", "select-dropdown", "textarea-component", "time-period-selector", "toggle-switch", "tooltip-component", "translate-icon", "trash-icon", "warning-icon", "zoom-icon"];
|
|
2919
2919
|
components.forEach(tagName => { switch (tagName) {
|
|
2920
2920
|
case "nylas-scheduler-editor":
|
|
2921
2921
|
if (!customElements.get(tagName)) {
|
|
@@ -3312,7 +3312,7 @@ function defineCustomElement$1() {
|
|
|
3312
3312
|
defineCustomElement$l();
|
|
3313
3313
|
}
|
|
3314
3314
|
break;
|
|
3315
|
-
case "nylas-specific-
|
|
3315
|
+
case "nylas-specific-time-availability-picker":
|
|
3316
3316
|
if (!customElements.get(tagName)) {
|
|
3317
3317
|
defineCustomElement$k();
|
|
3318
3318
|
}
|
|
@@ -200,7 +200,7 @@ class NylaSchedulerAPIConnector {
|
|
|
200
200
|
async makeAPIRequest(path, method, body, headers = {}) {
|
|
201
201
|
try {
|
|
202
202
|
const schedulerURL = new URL(this.schedulerAPIURL);
|
|
203
|
-
const version = "2.0
|
|
203
|
+
const version = "2.1.0" ;
|
|
204
204
|
schedulerURL.pathname = path;
|
|
205
205
|
const response = await fetch(decodeURIComponent(schedulerURL.toString()), {
|
|
206
206
|
method,
|
|
@@ -917,14 +917,14 @@ const NylasScheduling$1 = proxyCustomElement(class NylasScheduling extends HTMLE
|
|
|
917
917
|
this.language = navigator.language;
|
|
918
918
|
this.showFeedbackModal = false;
|
|
919
919
|
this.bookingInfoConfirmed = null;
|
|
920
|
-
this.version = "2.0
|
|
920
|
+
this.version = "2.1.0" ;
|
|
921
921
|
}
|
|
922
922
|
connectedCallback() {
|
|
923
923
|
debug(`[nylas-scheduler] connectedCallback`);
|
|
924
924
|
}
|
|
925
925
|
async componentWillLoad() {
|
|
926
926
|
debug(`[nylas-scheduler] Component will load`);
|
|
927
|
-
this.version = "2.0
|
|
927
|
+
this.version = "2.1.0" ;
|
|
928
928
|
if (this.enableUserFeedback && !isInitialized()) {
|
|
929
929
|
init({
|
|
930
930
|
dsn: 'https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816',
|
|
@@ -982,6 +982,7 @@ const NylasScheduling$1 = proxyCustomElement(class NylasScheduling extends HTMLE
|
|
|
982
982
|
this.stores.scheduler.set('organizerConfirmationSalt', salt);
|
|
983
983
|
bookingRefExtractedEvent = this.bookingRefExtracted.emit({ configurationId: organizerConfirmationConfigId, bookingId: organizerConfirmationBookingId, salt: salt });
|
|
984
984
|
}
|
|
985
|
+
this.applyThemeConfig(this.themeConfig);
|
|
985
986
|
if ('bookingRefExtracted' in this.eventOverrides) {
|
|
986
987
|
await this.eventOverrides.bookingRefExtracted(bookingRefExtractedEvent, this.nylasSchedulerConnector);
|
|
987
988
|
if (bookingRefExtractedEvent.defaultPrevented) {
|
|
@@ -1008,7 +1009,6 @@ const NylasScheduling$1 = proxyCustomElement(class NylasScheduling extends HTMLE
|
|
|
1008
1009
|
}
|
|
1009
1010
|
}
|
|
1010
1011
|
this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector);
|
|
1011
|
-
this.applyThemeConfig(this.themeConfig);
|
|
1012
1012
|
}
|
|
1013
1013
|
async componentDidLoad() {
|
|
1014
1014
|
this.baseProvider?.componentDidLoad();
|