@nylas/web-elements 0.0.0-canary-20241015194719 → 0.0.0-canary-20241017202051
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/input-image-url/input-image-url.es.js +365 -365
- package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +46 -48
- package/dist/cdn/nylas-confirmation-email/nylas-confirmation-email.es.js +86 -82
- package/dist/cdn/nylas-custom-booking-flow/nylas-custom-booking-flow.es.js +1 -1
- package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +4710 -4700
- package/dist/cdn/nylas-event-duration/nylas-event-duration.es.js +228 -228
- package/dist/cdn/nylas-event-info/nylas-event-info.es.js +2 -2
- package/dist/cdn/nylas-event-limits/nylas-event-limits.es.js +2 -2
- package/dist/cdn/nylas-form-card/nylas-form-card.es.js +1 -1
- package/dist/cdn/nylas-reminder-emails/nylas-reminder-emails.es.js +2289 -2281
- package/dist/cdn/nylas-reminder-time/nylas-reminder-time.es.js +2253 -2245
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +53 -43
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4 -3
- package/dist/cdn/nylas-timeslot-picker/nylas-timeslot-picker.es.js +4 -3
- package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js +60 -54
- package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +2 -2
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/design-system/input-image-url/input-image-url.js +20 -2
- package/dist/collection/components/design-system/input-image-url/input-image-url.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +2 -2
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +12 -16
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js +106 -0
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +52 -28
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js +33 -0
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +5 -3
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js +55 -0
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +23 -30
- package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-reminder-time/test/nylas-reminder-time.spec.js +37 -0
- package/dist/collection/components/scheduler-editor/nylas-reminder-time/test/nylas-reminder-time.spec.js.map +1 -0
- package/dist/components/input-image-url2.js +6 -2
- package/dist/components/input-image-url2.js.map +1 -1
- package/dist/components/nylas-additional-participants2.js +12 -16
- package/dist/components/nylas-additional-participants2.js.map +1 -1
- package/dist/components/nylas-confirmation-email2.js +14 -5
- package/dist/components/nylas-confirmation-email2.js.map +1 -1
- package/dist/components/nylas-event-duration2.js +5 -3
- package/dist/components/nylas-event-duration2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +1 -1
- package/dist/components/nylas-event-limits2.js +1 -1
- package/dist/components/nylas-form-card2.js +1 -1
- package/dist/components/nylas-reminder-time2.js +23 -29
- package/dist/components/nylas-reminder-time2.js.map +1 -1
- package/dist/components/nylas-timeslot-picker2.js +2 -2
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/esm/calendar-agenda-fill-icon_54.entry.js +60 -54
- package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nylas-booked-event-card_12.entry.js +2 -2
- package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +1 -1
- package/dist/esm/nylas-web-elements.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-1ce8b1c3.entry.js +8 -0
- package/dist/nylas-web-elements/p-1ce8b1c3.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-698d229c.entry.js → p-7a1d51ab.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-698d229c.entry.js.map → p-7a1d51ab.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-bbf86b8c.entry.js +2 -0
- package/dist/types/components/design-system/input-image-url/input-image-url.d.ts +4 -0
- package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.d.ts +5 -1
- package/dist/types/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.d.ts +1 -1
- package/dist/types/components.d.ts +18 -6
- package/package.json +3 -3
- package/dist/nylas-web-elements/p-b9a8d404.entry.js +0 -8
- package/dist/nylas-web-elements/p-b9a8d404.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-f4334e3a.entry.js +0 -2
- /package/dist/nylas-web-elements/{p-f4334e3a.entry.js.map → p-bbf86b8c.entry.js.map} +0 -0
|
@@ -207,6 +207,7 @@ var __metadata$w = (undefined && undefined.__metadata) || function (k, v) {
|
|
|
207
207
|
const InputImageUrl = class {
|
|
208
208
|
constructor(hostRef) {
|
|
209
209
|
index$1.registerInstance(this, hostRef);
|
|
210
|
+
this.nylasFormInputImageUrlInvalid = index$1.createEvent(this, "nylasFormInputImageUrlInvalid", 7);
|
|
210
211
|
this.valueChanged = index$1.createEvent(this, "valueChanged", 7);
|
|
211
212
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
212
213
|
this.internals = hostRef.$hostElement$["s-ei"];
|
|
@@ -275,12 +276,15 @@ const InputImageUrl = class {
|
|
|
275
276
|
this.valueChanged.emit({ value: this.currentImageUrl, name: this.name });
|
|
276
277
|
})
|
|
277
278
|
.catch(() => {
|
|
278
|
-
this.internals.setValidity({ customError: true }, 'Invalid image URL.');
|
|
279
279
|
this.errorMessage = 'Invalid image URL.';
|
|
280
|
+
this.nylasFormInputImageUrlInvalid.emit({ value: 'Invalid image URL.', name: this.name });
|
|
281
|
+
if (typeof this.internals.setValidity === 'function') {
|
|
282
|
+
this.internals.setValidity({ customError: true }, 'Invalid image URL.');
|
|
283
|
+
}
|
|
280
284
|
});
|
|
281
285
|
}
|
|
282
286
|
render() {
|
|
283
|
-
return (index$1.h(index$1.Host, { key: '
|
|
287
|
+
return (index$1.h(index$1.Host, { key: '27db94b782ae96518852a8486821a7f6544492a2' }, index$1.h("div", { key: '3923ce12503dd454e716e002b693b8e5f7e7e991', class: "logo-container" }, index$1.h("div", { key: '004c0dfb0e5ec721e356b4915fbdd75f84a67301', class: "input-container" }, index$1.h("input-component", { key: 'f06812996be4fd6384fffc2c095e62ba7067881d', name: this.name, id: this.name, type: "text", required: false, exportparts: "ic_input: iiu__logo-input-textfield", defaultValue: this.imageUrl ?? '' }), this.errorMessage && index$1.h("span", { class: "error-message" }, this.errorMessage)), this.currentImageUrl && !this.errorMessage && (index$1.h("div", { class: "logo" }, index$1.h("img", { src: this.currentImageUrl, alt: "Logo" }))))));
|
|
284
288
|
}
|
|
285
289
|
static get formAssociated() { return true; }
|
|
286
290
|
get host() { return index$1.getElement(this); }
|
|
@@ -421,20 +425,23 @@ const NylasAdditionalParticipants = class {
|
|
|
421
425
|
disconnectedCallback() {
|
|
422
426
|
utils.debug('nylas-additional-participants', 'disconnectedCallback');
|
|
423
427
|
}
|
|
428
|
+
get isInternalsAvailable() {
|
|
429
|
+
return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
|
|
430
|
+
}
|
|
424
431
|
onInputOptionChanged(event) {
|
|
425
432
|
utils.debug('nylas-additional-participants', 'onInputOptionChanged');
|
|
426
|
-
const EMAIL_REGEX = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,
|
|
433
|
+
const EMAIL_REGEX = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
427
434
|
const index = event.detail.name;
|
|
428
435
|
const participant = this.participantOptions?.find(participant => participant.email === event.detail.value);
|
|
429
436
|
if (!participant && this.isRoundRobinConfig) {
|
|
430
|
-
this.internals.setValidity({ customError: true }, 'For round robin configuration, participant should be selected from the dropdown.');
|
|
437
|
+
this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'For round robin configuration, participant should be selected from the dropdown.');
|
|
431
438
|
this.participantErrors[index] = 'For round robin page, participant should be selected from the dropdown.';
|
|
432
439
|
this.participants[index].is_valid = false;
|
|
433
440
|
this.participants = [...this.participants];
|
|
434
441
|
return;
|
|
435
442
|
}
|
|
436
443
|
else if (!participant && !EMAIL_REGEX.test(event.detail.value)) {
|
|
437
|
-
this.internals.setValidity({ customError: true }, 'Please enter a valid email address');
|
|
444
|
+
this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'Please enter a valid email address');
|
|
438
445
|
this.participantErrors[index] = 'Please enter a valid email address';
|
|
439
446
|
this.participants[index].is_valid = false;
|
|
440
447
|
this.participants = [...this.participants];
|
|
@@ -443,7 +450,7 @@ const NylasAdditionalParticipants = class {
|
|
|
443
450
|
else {
|
|
444
451
|
this.participantErrors[index] = '';
|
|
445
452
|
this.participants[index].is_valid = true;
|
|
446
|
-
this.internals.setValidity({});
|
|
453
|
+
this.isInternalsAvailable && this.internals.setValidity({});
|
|
447
454
|
}
|
|
448
455
|
this.participants[index].email = event.detail.value;
|
|
449
456
|
this.participants[index].availability = participant ? { calendar_ids: ['primary'] } : undefined;
|
|
@@ -482,24 +489,17 @@ const NylasAdditionalParticipants = class {
|
|
|
482
489
|
this.participants = this.participants.filter((_, i) => i !== index);
|
|
483
490
|
this.updateFormValue();
|
|
484
491
|
}
|
|
485
|
-
validate(email, index) {
|
|
486
|
-
utils.debug('nylas-additional-participants', 'validate');
|
|
487
|
-
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
488
|
-
const valid = regex.test(String(email).toLowerCase());
|
|
489
|
-
this.participants[index].is_valid = valid;
|
|
490
|
-
this.updateFormValue();
|
|
491
|
-
}
|
|
492
492
|
updateFormValue() {
|
|
493
493
|
utils.debug('nylas-additional-participants', 'updateFormValue');
|
|
494
494
|
const participants = this.isRoundRobinConfig ? (this.includeOrganizerAsParticipant ? this.participants : this.participants.filter(p => !p.is_organizer)) : this.participants;
|
|
495
495
|
if (participants.length === 0) {
|
|
496
|
-
this.internals.setValidity({ customError: true }, 'Please add at least one participant');
|
|
496
|
+
this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'Please add at least one participant');
|
|
497
497
|
this.error = 'Please add at least one participant';
|
|
498
498
|
}
|
|
499
499
|
else {
|
|
500
|
-
this.internals.setValidity({});
|
|
500
|
+
this.isInternalsAvailable && this.internals.setValidity({});
|
|
501
501
|
this.error = '';
|
|
502
|
-
this.internals.setFormValue(JSON.stringify(participants), this.name);
|
|
502
|
+
this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participants), this.name);
|
|
503
503
|
this.valueChanged.emit({ value: JSON.stringify(participants), name: this.name });
|
|
504
504
|
}
|
|
505
505
|
}
|
|
@@ -510,7 +510,7 @@ const NylasAdditionalParticipants = class {
|
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
512
|
render() {
|
|
513
|
-
return (index$1.h(index$1.Host, { key: '
|
|
513
|
+
return (index$1.h(index$1.Host, { key: '16a28d7d8ee91b685a22472d8a90721a5074d798', part: "nap" }, index$1.h("nylas-form-card", { key: '9fde59eadfcdf05c3b4add30a5c35f9b21d00c30' }, index$1.h("h3", { key: '82e3c3ad537ef4c60d19695f11e481bac2ed31ae', slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Participants"), index$1.h("p", { key: '4df3d661d2c6801ba8e88d82853ae562ed3be8e8', slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add people in your team or organization to join the event."), index$1.h("div", { key: '3ccb34354c025b52760433683812acf37b480e77', slot: "content", class: "nylas-additional-participants__content" }, index$1.h("div", { key: '007cf8396921637cf230cc26d73de147169cd250' }, this.participants.map((participant, index) => {
|
|
514
514
|
return (index$1.h("div", { class: 'nylas-additional-participants__input_group', part: "nap__input_group" }, !participant.is_organizer && index$1.h("label", null, `Participant ${index}`), index$1.h("div", { part: "nap__input_wrapper", class: {
|
|
515
515
|
'nylas-additional-participants__input_wrapper': true,
|
|
516
516
|
'nylas-additional-participants__input_wrapper_organizer': participant?.is_organizer === true,
|
|
@@ -520,7 +520,7 @@ const NylasAdditionalParticipants = class {
|
|
|
520
520
|
this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant;
|
|
521
521
|
this.updateFormValue();
|
|
522
522
|
}, checked: this.includeOrganizerAsParticipant }), index$1.h("label", { htmlFor: `organizer_participant`, "aria-label": "Include as participant" }, "Participant", index$1.h("tooltip-component", { id: "organizer_participant_tooltip" }, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, index$1.h("strong", null, "Include Organizer:"), " The organizer (you) will be included in the round-robin rotation. ", index$1.h("br", null), index$1.h("strong", null, "Exclude Organizer:"), " The organizer (you) will not be included in the round-robin rotation."))))))) : (index$1.h("input-dropdown", { id: `${index}`, name: `${index}`, filterable: true, inputValue: participant.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) })), !participant.is_organizer && (index$1.h("button", { onClick: () => this.removeParticipant(index), part: "nap__remove-participant" }, index$1.h("close-icon", null))))), !participant.is_valid && (index$1.h("p", { class: "nylas-additional-participants__error", part: "nap__error" }, this.participantErrors[index]))));
|
|
523
|
-
}), index$1.h("p", { key: '
|
|
523
|
+
}), index$1.h("p", { key: 'f1dd954c137093fa9e474f3886e4b5320aeb5e2e', class: "nylas-additional-participants__error", part: "nap__error" }, this.error)), index$1.h("button", { key: '859585010fc9fce314b856f5e7e07ac8b8c47b88', class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, index$1.h("add-circle-icon", { key: 'aec7eb5de30e66bca29b73962f356109471c2e9e' }), " ", index$1.h("span", { key: 'f07ecfaa4db46f7954d734314c46f2d773158730' }, "Add ", this.participants.length > 1 ? 'another' : 'a', " participant"))))));
|
|
524
524
|
}
|
|
525
525
|
static get formAssociated() { return true; }
|
|
526
526
|
get host() { return index$1.getElement(this); }
|
|
@@ -5382,9 +5382,9 @@ const NylasConfirmationEmail = class {
|
|
|
5382
5382
|
}
|
|
5383
5383
|
this.selectedConfiguration = undefined;
|
|
5384
5384
|
this.confirmationEmailTemplate = {};
|
|
5385
|
-
this.isOpen = false;
|
|
5386
5385
|
this.participants = [];
|
|
5387
5386
|
this.name = 'confirmation-email-template';
|
|
5387
|
+
this.isOpen = false;
|
|
5388
5388
|
this.confirmationEmail = undefined;
|
|
5389
5389
|
this.isConfirmationEmailOpen = this.isOpen;
|
|
5390
5390
|
this.participantsState = this.participants;
|
|
@@ -5437,8 +5437,17 @@ const NylasConfirmationEmail = class {
|
|
|
5437
5437
|
const { value, name } = event.detail;
|
|
5438
5438
|
if (name === 'confirmation-email-logo') {
|
|
5439
5439
|
this.confirmationEmail = { ...this.confirmationEmail, logo: value };
|
|
5440
|
-
this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);
|
|
5441
5440
|
this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });
|
|
5441
|
+
if (typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function') {
|
|
5442
|
+
this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);
|
|
5443
|
+
this.internals.setValidity({});
|
|
5444
|
+
}
|
|
5445
|
+
}
|
|
5446
|
+
}
|
|
5447
|
+
async nylasFormInputImageUrlInvalidHandler(event) {
|
|
5448
|
+
const { value, name } = event.detail;
|
|
5449
|
+
if (name === 'confirmation-email-logo' && typeof this.internals.setValidity === 'function') {
|
|
5450
|
+
this.internals.setValidity({ customError: true }, value || 'Invalid image URL.');
|
|
5442
5451
|
}
|
|
5443
5452
|
}
|
|
5444
5453
|
updateConfirmationFormValue() {
|
|
@@ -5458,7 +5467,7 @@ const NylasConfirmationEmail = class {
|
|
|
5458
5467
|
render() {
|
|
5459
5468
|
const organizer = this.participantsState.find(p => p.is_organizer);
|
|
5460
5469
|
const organizerName = organizer?.name || organizer?.email;
|
|
5461
|
-
return (index$1.h(index$1.Host, { key: '
|
|
5470
|
+
return (index$1.h(index$1.Host, { key: 'bc4803b94f914d083bd33cf4cecd0cac70b0658c' }, index$1.h("div", { key: '6445d38b903bffd19b4db004e850f6488ed4c27f', class: "nylas-confirmation-email", part: "nce" }, index$1.h("div", { key: '7ce1ccd72ef83717aec42fe0b533902e3a254796', class: "header", part: "nce__header" }, index$1.h("div", { key: 'cbceb816c30deebc4e053a7abd1da1c82c171ebe' }, index$1.h("h3", { key: '36f5b00d5a98d325341ff06b2bb3ba3cf951e94f' }, this.confirmationEmail?.booking_confirmed?.title ?? `Booking confirmed with ${organizerName ? ` ${organizerName}` : ''}`), index$1.h("p", { key: '6f72022d71e5f4e3c03d0f6d07d7f0f5bc0f9686' }, "Booking confirmation email")), this.isConfirmationEmailOpen ? (index$1.h("div", { class: "confirmation-email-toggle", part: "nce__confirmation-email-toggle--container" }, index$1.h("span", { class: `chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, index$1.h("chevron-icon", { width: "24", height: "24" })))) : (index$1.h("button-component", { variant: 'basic', clickHandler: event => {
|
|
5462
5471
|
event.preventDefault();
|
|
5463
5472
|
this.toggleConfirmationEmail();
|
|
5464
5473
|
} }, index$1.h("edit-icon", { width: "16", height: "16" }), "Edit"))), this.isConfirmationEmailOpen ? (index$1.h("div", { class: "nylas-confirmation-email__body", part: "nce__body" }, index$1.h("div", { class: "nylas-confirmation-email__section" }, index$1.h("div", { class: "nylas-confirmation-email__row" }, index$1.h("label", null, "Send confirmation email", index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, "You and your guests will receive a confirmation email immediately upon booking.")))), index$1.h("span", { class: "selected-value" }, "Immediately upon booking")), index$1.h("div", { class: "nylas-confirmation-email__row" }, index$1.h("div", { class: "subsection" }, index$1.h("div", { class: "input-container" }, index$1.h("label", null, "Company logo URL", index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, "This logo appears in the booking confirmation email. The URL must be publicly accessible. The image will be scaled down to a max size of 200px x 100px.")))), this.confirmationEmail && (index$1.h("input-image-url", { name: "confirmation-email-logo", exportparts: "iiu__logo-input-textfield: nce__input-image-url", imageUrl: this.confirmationEmail?.logo ?? '' }))))), index$1.h("div", { class: "nylas-confirmation-email__row full-width-col" }, index$1.h("div", { class: "subsection" }, index$1.h("h3", null, "Email message"), index$1.h("div", { class: "input-container" }, index$1.h("label", { htmlFor: "title" }, "Custom email title", index$1.h("span", { class: "label-icon" }, index$1.h("tooltip-component", null, index$1.h("info-icon", { slot: "tooltip-icon" }), index$1.h("span", { slot: "tooltip-content" }, "An email title is a headline within the body of the email. This doesn't change the subject line.")))), index$1.h("input-component", { name: "confirmation-email-title", maxLength: 60, placeholder: `Booking confirmed ${organizerName ? `with ${organizerName}` : ''}`, defaultValue: this.confirmationEmail?.booking_confirmed?.title ?? '' })), index$1.h("div", { class: "input-container" }, index$1.h("textarea-component", { label: "Additional info", name: "confirmation-email-body", id: "confirmation-email-body", placeholder: "Default body", tooltip: "Scheduler adds the content of the box to the email body.", maxLength: 500, defaultValue: this.confirmationEmail?.booking_confirmed?.body ?? '' }))))))) : (index$1.h("div", { class: "nylas-confirmation-email__summary", part: "nce__summary" }, index$1.h("p", null, index$1.h("span", { class: "summary-icon" }, index$1.h("person-clipboard-icon", null)), "All host & guests"), index$1.h("p", null, index$1.h("span", { class: "summary-icon" }, index$1.h("clock-icon", null)), "Immediately on booking"))))));
|
|
@@ -6192,7 +6201,6 @@ const NylasEventDuration = class {
|
|
|
6192
6201
|
componentWillLoad() {
|
|
6193
6202
|
utils.debug('nylas-event-duration', 'componentWillLoad');
|
|
6194
6203
|
this.host.setAttribute('name', this.name);
|
|
6195
|
-
this.setDurationMintueOptions();
|
|
6196
6204
|
}
|
|
6197
6205
|
componentDidLoad() {
|
|
6198
6206
|
utils.debug('nylas-event-duration', 'componentDidLoad');
|
|
@@ -6202,7 +6210,10 @@ const NylasEventDuration = class {
|
|
|
6202
6210
|
this.duration = this.duration ? this.duration : this.eventDurationMinutes ? (this.eventDurationMinutes >= 60 ? this.eventDurationMinutes / 60 : this.eventDurationMinutes) : 30;
|
|
6203
6211
|
this.durationMinutes = this.durationMinutes ? this.durationMinutes : this.duration ? this.duration : 30;
|
|
6204
6212
|
this.durationIncrement = this.durationIncrement ? this.durationIncrement : this.duration >= 60 ? 60 : 1;
|
|
6205
|
-
this.
|
|
6213
|
+
this.setDurationMintueOptions();
|
|
6214
|
+
if (typeof this.internals.setFormValue === 'function') {
|
|
6215
|
+
this.internals.setFormValue(this.durationMinutes.toString(), 'duration');
|
|
6216
|
+
}
|
|
6206
6217
|
}
|
|
6207
6218
|
disconnectedCallback() {
|
|
6208
6219
|
utils.debug('nylas-event-duration', 'disconnectedCallback');
|
|
@@ -6252,7 +6263,7 @@ const NylasEventDuration = class {
|
|
|
6252
6263
|
{ value: 1, label: 'minute' },
|
|
6253
6264
|
{ value: 60, label: 'hour' },
|
|
6254
6265
|
];
|
|
6255
|
-
return (index$1.h(index$1.Host, { key: '
|
|
6266
|
+
return (index$1.h(index$1.Host, { key: 'f6b60528b9c3f2978ac12beae9bf049a9b90fec5' }, index$1.h("div", { key: 'f7c778d981fa1d33ceed820d500e6820a4f1223c', class: "nylas-event-duration", part: "ned" }, index$1.h("label", { key: 'f461dcfeda616f50820d6cdacb5dfded22ec7aff', htmlFor: "duration" }, "Event duration", index$1.h("span", { key: '086d2458ad14f00f718fb9106c45d63576c9f734', class: "required" }, "*")), index$1.h("div", { key: 'cf27800dec77fbe74c9428de92fa042a419ddb25', class: "nylas-event-duration__wrapper" }, index$1.h("input-dropdown", { key: '06ed64927a69ca96bb9f9cc5cfede6d55c310598', name: 'event-duration', options: this.durationMinutesOptions, inputValue: this.duration.toString(), exportparts: "id_dropdown: ned__input_dropdown, id_dropdown-input: ned__input_dropdown-input, id_dropdown-content: ned__input_dropdown-content", defaultInputOption: this.durationMinutesOptions.find(i => i.value == this.duration) }), this.durationIncrement && (index$1.h("select-dropdown", { name: 'event-duration', options: durationOptions, pluralizedLabel: this.duration > 1 ? 's' : '', exportparts: "sd_dropdown: ned__dropdown, sd_dropdown-button: ned__dropdown-button, sd_dropdown-content: ned__dropdown-content", defaultSelectedOption: durationOptions.find(i => i.value == this.durationIncrement), withSearch: false }))))));
|
|
6256
6267
|
}
|
|
6257
6268
|
static get formAssociated() { return true; }
|
|
6258
6269
|
get host() { return index$1.getElement(this); }
|
|
@@ -6317,7 +6328,7 @@ const NylasEventInfo = class {
|
|
|
6317
6328
|
utils.debug('nylas-event-info', 'disconnectedCallback');
|
|
6318
6329
|
}
|
|
6319
6330
|
render() {
|
|
6320
|
-
return (index$1.h(index$1.Host, { key: '
|
|
6331
|
+
return (index$1.h(index$1.Host, { key: 'be80a4e687ce223a8e52bbabc2e8acadcb194b11' }, index$1.h("nylas-form-card", { key: 'c96b77795ec2516889acf0f78c5eb723b26dd89c', exportparts: "nfc__header: nei__header" }, index$1.h("h1", { key: '890113187adcd6be1ab1d1beb489fe3a80124617', slot: "header-title", class: "nylas-event-info__title", part: "nei__title" }, "Event information"), index$1.h("div", { key: '44eaaae3833654530706dc93077b43a7597acc2c', slot: "content", class: "nylas-event-info__content" }, index$1.h("slot", { key: '7af737a67cb007c0ede7db5aa075828311d98da3', name: "inputs" })))));
|
|
6321
6332
|
}
|
|
6322
6333
|
static get formAssociated() { return true; }
|
|
6323
6334
|
get el() { return index$1.getElement(this); }
|
|
@@ -6376,7 +6387,7 @@ const NylasEventLimits = class {
|
|
|
6376
6387
|
utils.debug('nylas-event-limits', 'disconnectedCallback');
|
|
6377
6388
|
}
|
|
6378
6389
|
render() {
|
|
6379
|
-
return (index$1.h(index$1.Host, { key: '
|
|
6390
|
+
return (index$1.h(index$1.Host, { key: '6a28113e3b403869e77cc3a2c9c3a1bea217dc52' }, index$1.h("nylas-form-card", { key: 'cf9004d044222d796ae59df58737ad9719a20576', exportparts: "nfc__header: nel__header" }, index$1.h("h1", { key: 'ffeeb7a5741c9f07fb4f9bd84016b1707e2b55b7', slot: "header-title", class: "nylas-event-limits__title" }, "Event limits"), index$1.h("div", { key: '7b51592d95736f860ec805950275a18e9d914c32', slot: "content", class: "nylas-event-limits__content" }, index$1.h("slot", { key: '53e9098d736eedf5b22e1b8ae712ec22c8ca865e', name: "inputs" })))));
|
|
6380
6391
|
}
|
|
6381
6392
|
static get formAssociated() { return true; }
|
|
6382
6393
|
get el() { return index$1.getElement(this); }
|
|
@@ -8443,22 +8454,29 @@ var __metadata$2 = (undefined && undefined.__metadata) || function (k, v) {
|
|
|
8443
8454
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
8444
8455
|
return Reflect.metadata(k, v);
|
|
8445
8456
|
};
|
|
8457
|
+
const reminderTimeOptions = [
|
|
8458
|
+
{ value: 60 * 24, label: 'day' },
|
|
8459
|
+
{ value: 60, label: 'hour' },
|
|
8460
|
+
{ value: 1, label: 'minute' },
|
|
8461
|
+
];
|
|
8446
8462
|
function getInitialTimeValue(timeInMinutes) {
|
|
8447
8463
|
if (!timeInMinutes)
|
|
8448
8464
|
return 30;
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8465
|
+
for (const option of reminderTimeOptions) {
|
|
8466
|
+
if (timeInMinutes % option.value === 0) {
|
|
8467
|
+
return timeInMinutes / option.value;
|
|
8468
|
+
}
|
|
8469
|
+
}
|
|
8453
8470
|
return timeInMinutes;
|
|
8454
8471
|
}
|
|
8455
8472
|
function getInitialTimeIncrement(timeInMinutes) {
|
|
8456
8473
|
if (!timeInMinutes)
|
|
8457
|
-
return
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8474
|
+
return 1;
|
|
8475
|
+
for (const option of reminderTimeOptions) {
|
|
8476
|
+
if (timeInMinutes % option.value === 0) {
|
|
8477
|
+
return option.value;
|
|
8478
|
+
}
|
|
8479
|
+
}
|
|
8462
8480
|
return 1;
|
|
8463
8481
|
}
|
|
8464
8482
|
const NylasReminderTime = class {
|
|
@@ -8483,15 +8501,6 @@ const NylasReminderTime = class {
|
|
|
8483
8501
|
utils.debug('nylas-reminder-time', 'elementNameChangedHandler', newValue);
|
|
8484
8502
|
this.host.setAttribute('name', newValue);
|
|
8485
8503
|
}
|
|
8486
|
-
eventReminderTimeMinutesChangedHandler(newValue, oldValue) {
|
|
8487
|
-
utils.debug('nylas-reminder-time', 'eventReminderTimeMinutesChangedHandler', newValue);
|
|
8488
|
-
if (newValue === oldValue) {
|
|
8489
|
-
return;
|
|
8490
|
-
}
|
|
8491
|
-
this.reminderTime = getInitialTimeValue(newValue);
|
|
8492
|
-
this.reminderTimeincrement = getInitialTimeIncrement(newValue);
|
|
8493
|
-
this.reminderTimeMinutes = newValue;
|
|
8494
|
-
}
|
|
8495
8504
|
reminderTimeMinutesChangedHandler(newValue, oldValue) {
|
|
8496
8505
|
utils.debug('nylas-reminder-time', 'reminderTimeMinutesChangedHandler', newValue);
|
|
8497
8506
|
if (newValue === oldValue) {
|
|
@@ -8505,14 +8514,17 @@ const NylasReminderTime = class {
|
|
|
8505
8514
|
componentWillLoad() {
|
|
8506
8515
|
utils.debug('nylas-reminder-time', 'componentWillLoad');
|
|
8507
8516
|
this.host.setAttribute('name', this.name);
|
|
8508
|
-
this.setReminderTimeMinuteOptions();
|
|
8509
8517
|
}
|
|
8510
8518
|
componentDidLoad() {
|
|
8511
8519
|
utils.debug('nylas-reminder-time', 'componentDidLoad');
|
|
8520
|
+
this.setReminderTimeMinuteOptions();
|
|
8512
8521
|
}
|
|
8513
8522
|
disconnectedCallback() {
|
|
8514
8523
|
utils.debug('nylas-reminder-time', 'disconnectedCallback');
|
|
8515
8524
|
}
|
|
8525
|
+
get isInternalsAvailable() {
|
|
8526
|
+
return this.internals !== undefined && typeof this.internals.setFormValue === 'function';
|
|
8527
|
+
}
|
|
8516
8528
|
setReminderTimeMinuteOptions() {
|
|
8517
8529
|
if (this.reminderTimeincrement === 1) {
|
|
8518
8530
|
this.reminderTimeMinutesOptions = constants.REMINDER_MINUTE_OPTIONS;
|
|
@@ -8536,28 +8548,22 @@ const NylasReminderTime = class {
|
|
|
8536
8548
|
}
|
|
8537
8549
|
this.setReminderTimeMinuteOptions();
|
|
8538
8550
|
this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement;
|
|
8539
|
-
this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
|
|
8551
|
+
this.isInternalsAvailable && this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
|
|
8540
8552
|
}
|
|
8541
8553
|
inputOptionChangedHandler(event) {
|
|
8542
8554
|
utils.debug('nylas-calendar-picker', 'inputOptionChangedHandler', event.detail);
|
|
8543
8555
|
const { value } = event.detail;
|
|
8544
8556
|
this.reminderTime = value;
|
|
8545
8557
|
this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement;
|
|
8546
|
-
this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
|
|
8558
|
+
this.isInternalsAvailable && this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
|
|
8547
8559
|
}
|
|
8548
8560
|
render() {
|
|
8549
|
-
|
|
8550
|
-
{ value: 1, label: 'minute' },
|
|
8551
|
-
{ value: 60, label: 'hour' },
|
|
8552
|
-
{ value: 60 * 24, label: 'day' },
|
|
8553
|
-
];
|
|
8554
|
-
return (index$1.h(index$1.Host, { key: 'd5f118391bdd7e4779f6eca15335285047fdb350' }, index$1.h("div", { key: '2dd8d3ba52d4f95480c9cf1fdaf5d0f1f7c1e523', class: "nylas-reminder-time", part: "nrt" }, index$1.h("div", { key: '3799c4b266f4078e22ad78b86225ef9abdc5fa49', class: "nylas-reminder-time__wrapper" }, index$1.h("input-dropdown", { key: '004b6336c041660e1424ac44f16e82c8a5a2ca53', name: 'reminder-time', options: this.reminderTimeMinutesOptions, inputValue: this.reminderTime.toString(), exportparts: "id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content", defaultInputOption: this.reminderTimeMinutesOptions.find(i => i.value == this.reminderTime) ?? reminderTimeOptions[0] }), index$1.h("select-dropdown", { key: '6a42c7f4633d89dd9a94d3c2f119e151613667ec', name: 'reminder-time-unit', options: reminderTimeOptions, pluralizedLabel: this.reminderTime > 1 ? 's' : '', exportparts: "sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content", defaultSelectedOption: reminderTimeOptions.find(i => i.value == this.reminderTimeincrement) ?? reminderTimeOptions[0], withSearch: false })))));
|
|
8561
|
+
return (index$1.h(index$1.Host, { key: 'b089eb10d76d001112d867a61889a685b8908355' }, index$1.h("div", { key: '13b8479fb822135c00ff8f97974c8269731b2a84', class: "nylas-reminder-time", part: "nrt" }, index$1.h("div", { key: '728e90c61077b1037aa285329f11a09a296b33b4', class: "nylas-reminder-time__wrapper" }, index$1.h("input-dropdown", { key: '40a22b75424d4b3b552a2dc1b60e79a8cb595032', name: 'reminder-time', options: this.reminderTimeMinutesOptions, inputValue: this.reminderTime.toString(), exportparts: "id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content", defaultInputOption: this.reminderTimeMinutesOptions.find(i => i.value == this.reminderTime) ?? reminderTimeOptions[0] }), index$1.h("select-dropdown", { key: '6128bb953b883be5341ba005438ab353b0016c48', name: 'reminder-time-unit', options: [...reminderTimeOptions].sort((a, b) => a.value - b.value), pluralizedLabel: this.reminderTime > 1 ? 's' : '', exportparts: "sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content", defaultSelectedOption: reminderTimeOptions.find(i => i.value == this.reminderTimeincrement) ?? reminderTimeOptions[0], withSearch: false })))));
|
|
8555
8562
|
}
|
|
8556
8563
|
static get formAssociated() { return true; }
|
|
8557
8564
|
get host() { return index$1.getElement(this); }
|
|
8558
8565
|
static get watchers() { return {
|
|
8559
8566
|
"name": ["elementNameChangedHandler"],
|
|
8560
|
-
"eventReminderTimeMinutes": ["eventReminderTimeMinutesChangedHandler"],
|
|
8561
8567
|
"reminderTimeMinutes": ["reminderTimeMinutesChangedHandler"]
|
|
8562
8568
|
}; }
|
|
8563
8569
|
};
|