@nylas/web-elements 1.3.2 → 1.3.3
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/checkbox-component/checkbox-component.es.js +48 -38
- package/dist/cdn/multi-select-dropdown/multi-select-dropdown.es.js +554 -535
- package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +2 -2
- package/dist/cdn/nylas-booking-form/nylas-booking-form.es.js +25 -9
- package/dist/cdn/nylas-booking-form-config/nylas-booking-form-config.es.js +2182 -2171
- package/dist/cdn/nylas-buffer-time/nylas-buffer-time.es.js +13 -14
- package/dist/cdn/nylas-calendar-picker/nylas-calendar-picker.es.js +571 -552
- package/dist/cdn/nylas-connected-calendars/nylas-connected-calendars.es.js +26 -7
- package/dist/cdn/nylas-customize-booking-settings/nylas-customize-booking-settings.es.js +12 -2
- package/dist/cdn/nylas-date-component/nylas-date-component.es.js +13 -7
- package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +3550 -3473
- package/dist/cdn/nylas-event-location/nylas-event-location.es.js +633 -621
- package/dist/cdn/nylas-limit-future-bookings/nylas-limit-future-bookings.es.js +25 -2
- package/dist/cdn/nylas-min-booking-notice/nylas-min-booking-notice.es.js +25 -2
- package/dist/cdn/nylas-min-cancellation-notice/nylas-min-cancellation-notice.es.js +163 -140
- package/dist/cdn/nylas-page-styling/nylas-page-styling.es.js +5 -3
- package/dist/cdn/nylas-participants-custom-availability/nylas-participants-custom-availability.es.js +4 -3
- package/dist/cdn/nylas-provider/nylas-provider.es.js +1 -1
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +173 -96
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +28 -12
- package/dist/cdn/scheduler-store/scheduler-store.es.js +1 -1
- package/dist/cdn/time-period-selector/time-period-selector.es.js +25 -2
- package/dist/cjs/calendar-agenda-fill-icon_53.cjs.entry.js +88 -57
- package/dist/cjs/calendar-agenda-fill-icon_53.cjs.entry.js.map +1 -1
- package/dist/cjs/checkbox-component.cjs.entry.js +9 -1
- package/dist/cjs/checkbox-component.cjs.entry.js.map +1 -1
- package/dist/cjs/checkbox-component_3.cjs.entry.js +21 -8
- package/dist/cjs/checkbox-component_3.cjs.entry.js.map +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +19 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-additional-participants.cjs.entry.js +1 -1
- package/dist/cjs/nylas-additional-participants.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-form-config.cjs.entry.js +34 -27
- package/dist/cjs/nylas-booking-form-config.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-buffer-time.cjs.entry.js +13 -12
- package/dist/cjs/nylas-buffer-time.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-connected-calendars.cjs.entry.js +2 -2
- package/dist/cjs/nylas-connected-calendars.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-date-component.cjs.entry.js +12 -7
- package/dist/cjs/nylas-date-component.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +2 -2
- package/dist/cjs/nylas-event-location.cjs.entry.js +32 -11
- package/dist/cjs/nylas-event-location.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-page-styling.cjs.entry.js +3 -2
- package/dist/cjs/nylas-page-styling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-participants-custom-availability.cjs.entry.js +3 -2
- package/dist/cjs/nylas-participants-custom-availability.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-provider.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/{scheduler-store-37a0e152.js → scheduler-store-2cd220d1.js} +2 -2
- package/dist/cjs/{scheduler-store-37a0e152.js.map → scheduler-store-2cd220d1.js.map} +1 -1
- package/dist/cjs/{scheduler-store-373adf03.js → scheduler-store-70af2279.js} +2 -2
- package/dist/cjs/{scheduler-store-373adf03.js.map → scheduler-store-70af2279.js.map} +1 -1
- package/dist/cjs/time-period-selector.cjs.entry.js +21 -1
- package/dist/cjs/time-period-selector.cjs.entry.js.map +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +12 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js.map +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +22 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js.map +1 -1
- package/dist/collection/components/design-system/nylas-date-component/nylas-date-component.js +14 -8
- package/dist/collection/components/design-system/nylas-date-component/nylas-date-component.js.map +1 -1
- package/dist/collection/components/design-system/nylas-date-component/test/nylas-date-component.spec.js +39 -0
- package/dist/collection/components/design-system/nylas-date-component/test/nylas-date-component.spec.js.map +1 -0
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +28 -1
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-date-picker/test/nylas-date-picker.spec.js +3 -1
- package/dist/collection/components/scheduler/nylas-date-picker/test/nylas-date-picker.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +36 -27
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/test/nylas-booking-form-config.spec.js +23 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/test/nylas-booking-form-config.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +13 -12
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/test/nylas-calendar-picker.spec.js +13 -0
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/test/nylas-calendar-picker.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +35 -10
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js +4 -1
- package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +3 -2
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
- package/dist/components/checkbox-component2.js +12 -2
- package/dist/components/checkbox-component2.js.map +1 -1
- package/dist/components/multi-select-dropdown2.js +22 -2
- package/dist/components/multi-select-dropdown2.js.map +1 -1
- package/dist/components/nylas-additional-participants2.js +1 -1
- package/dist/components/nylas-additional-participants2.js.map +1 -1
- package/dist/components/nylas-booking-form-config2.js +35 -27
- package/dist/components/nylas-booking-form-config2.js.map +1 -1
- package/dist/components/nylas-buffer-time2.js +13 -12
- package/dist/components/nylas-buffer-time2.js.map +1 -1
- package/dist/components/nylas-connected-calendars2.js +2 -2
- package/dist/components/nylas-connected-calendars2.js.map +1 -1
- package/dist/components/nylas-date-component2.js +14 -8
- package/dist/components/nylas-date-component2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +2 -2
- package/dist/components/nylas-event-location2.js +35 -12
- package/dist/components/nylas-event-location2.js.map +1 -1
- package/dist/components/nylas-page-styling2.js +5 -3
- package/dist/components/nylas-page-styling2.js.map +1 -1
- package/dist/components/nylas-participants-custom-availability2.js +3 -2
- package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
- package/dist/components/nylas-scheduling.js +2 -2
- package/dist/components/scheduler-store.js +1 -1
- package/dist/components/time-period-selector2.js +26 -2
- package/dist/components/time-period-selector2.js.map +1 -1
- package/dist/esm/calendar-agenda-fill-icon_53.entry.js +88 -57
- package/dist/esm/calendar-agenda-fill-icon_53.entry.js.map +1 -1
- package/dist/esm/checkbox-component.entry.js +9 -1
- package/dist/esm/checkbox-component.entry.js.map +1 -1
- package/dist/esm/checkbox-component_3.entry.js +21 -8
- package/dist/esm/checkbox-component_3.entry.js.map +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +19 -1
- package/dist/esm/multi-select-dropdown.entry.js.map +1 -1
- package/dist/esm/nylas-additional-participants.entry.js +1 -1
- package/dist/esm/nylas-additional-participants.entry.js.map +1 -1
- package/dist/esm/nylas-booking-form-config.entry.js +34 -27
- package/dist/esm/nylas-booking-form-config.entry.js.map +1 -1
- package/dist/esm/nylas-buffer-time.entry.js +13 -12
- package/dist/esm/nylas-buffer-time.entry.js.map +1 -1
- package/dist/esm/nylas-connected-calendars.entry.js +2 -2
- package/dist/esm/nylas-connected-calendars.entry.js.map +1 -1
- package/dist/esm/nylas-date-component.entry.js +12 -7
- package/dist/esm/nylas-date-component.entry.js.map +1 -1
- package/dist/esm/nylas-editor-tabs.entry.js +2 -2
- package/dist/esm/nylas-event-location.entry.js +32 -11
- package/dist/esm/nylas-event-location.entry.js.map +1 -1
- package/dist/esm/nylas-page-styling.entry.js +3 -2
- package/dist/esm/nylas-page-styling.entry.js.map +1 -1
- package/dist/esm/nylas-participants-custom-availability.entry.js +3 -2
- package/dist/esm/nylas-participants-custom-availability.entry.js.map +1 -1
- package/dist/esm/nylas-provider.entry.js +1 -1
- package/dist/esm/nylas-scheduling.entry.js +3 -3
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/{scheduler-store-20151a77.js → scheduler-store-3acf4d70.js} +2 -2
- package/dist/esm/{scheduler-store-20151a77.js.map → scheduler-store-3acf4d70.js.map} +1 -1
- package/dist/esm/{scheduler-store-b6d12f40.js → scheduler-store-79dc16cc.js} +2 -2
- package/dist/esm/{scheduler-store-b6d12f40.js.map → scheduler-store-79dc16cc.js.map} +1 -1
- package/dist/esm/time-period-selector.entry.js +21 -1
- package/dist/esm/time-period-selector.entry.js.map +1 -1
- package/dist/nylas-web-elements/checkbox-component.entry.js +9 -1
- package/dist/nylas-web-elements/checkbox-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +19 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booking-form-config.entry.js +34 -27
- package/dist/nylas-web-elements/nylas-booking-form-config.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +13 -12
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-connected-calendars.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-connected-calendars.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-date-component.entry.js +12 -7
- package/dist/nylas-web-elements/nylas-date-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-event-location.entry.js +32 -11
- package/dist/nylas-web-elements/nylas-event-location.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-page-styling.entry.js +3 -2
- package/dist/nylas-web-elements/nylas-page-styling.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js +3 -2
- package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-provider.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/p-040b8553.entry.js +2 -0
- package/dist/nylas-web-elements/p-040b8553.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-13a83f9a.entry.js +8 -0
- package/dist/nylas-web-elements/p-13a83f9a.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-1a9fc29a.entry.js +2 -0
- package/dist/nylas-web-elements/p-1a9fc29a.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-e543a827.entry.js → p-1dedce7c.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-284c14bb.js → p-53f7b360.js} +2 -2
- package/dist/nylas-web-elements/p-7f100474.entry.js +2 -0
- package/dist/nylas-web-elements/p-7f100474.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-70d36207.entry.js → p-84e69241.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-36c73819.entry.js → p-ad7f8831.entry.js} +2 -2
- package/dist/nylas-web-elements/{scheduler-store-b6d12f40.js → scheduler-store-79dc16cc.js} +2 -2
- package/dist/nylas-web-elements/{scheduler-store-b6d12f40.js.map → scheduler-store-79dc16cc.js.map} +1 -1
- package/dist/nylas-web-elements/time-period-selector.entry.js +21 -1
- package/dist/nylas-web-elements/time-period-selector.entry.js.map +1 -1
- package/dist/types/components/design-system/checkbox-component/checkbox-component.d.ts +1 -0
- package/dist/types/components/design-system/multi-select-dropdown/multi-select-dropdown.d.ts +2 -0
- package/dist/types/components/design-system/nylas-date-component/nylas-date-component.d.ts +1 -0
- package/dist/types/components/design-system/time-period-selector/time-period-selector.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +2 -2
- package/package.json +1 -1
- package/dist/nylas-web-elements/p-2fa604d7.entry.js +0 -2
- package/dist/nylas-web-elements/p-2fa604d7.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-52b9c0cb.entry.js +0 -2
- package/dist/nylas-web-elements/p-52b9c0cb.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-9db69aed.entry.js +0 -2
- package/dist/nylas-web-elements/p-9db69aed.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-a1a75dc7.entry.js +0 -8
- package/dist/nylas-web-elements/p-a1a75dc7.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-e543a827.entry.js.map → p-1dedce7c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-284c14bb.js.map → p-53f7b360.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-70d36207.entry.js.map → p-84e69241.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-36c73819.entry.js.map → p-ad7f8831.entry.js.map} +0 -0
|
@@ -14545,7 +14545,7 @@ class L9 {
|
|
|
14545
14545
|
}
|
|
14546
14546
|
async makeAPIRequest(e, n, r, i = {}) {
|
|
14547
14547
|
try {
|
|
14548
|
-
const o = new URL(this.schedulerAPIURL), s = "1.3.
|
|
14548
|
+
const o = new URL(this.schedulerAPIURL), s = "1.3.3";
|
|
14549
14549
|
return o.pathname = e, await (await fetch(decodeURIComponent(o.toString()), {
|
|
14550
14550
|
method: n,
|
|
14551
14551
|
headers: {
|
|
@@ -15712,6 +15712,9 @@ const iC = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
|
|
|
15712
15712
|
constructor() {
|
|
15713
15713
|
super(), this.__registerHost(), this.__attachShadow(), this.nylasFormCheckboxToggled = W(this, "nylasFormCheckboxToggled", 7), this.componentType = "checkbox", this.name = "checkbox", this.checked = void 0, this.label = "", this.required = !1, this.isChecked = void 0, this.error = "";
|
|
15714
15714
|
}
|
|
15715
|
+
checkedPropChangedHandler(e) {
|
|
15716
|
+
typeof e == "boolean" && (this.isChecked = e);
|
|
15717
|
+
}
|
|
15715
15718
|
componentWillLoad() {
|
|
15716
15719
|
this.el.setAttribute("component-type", this.componentType);
|
|
15717
15720
|
}
|
|
@@ -15733,11 +15736,16 @@ const iC = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
|
|
|
15733
15736
|
});
|
|
15734
15737
|
}
|
|
15735
15738
|
render() {
|
|
15736
|
-
return m("div", { key: "
|
|
15739
|
+
return m("div", { key: "0be06ba2c6b6ed277b3ba736827f9f60e18c6056", class: "checkbox-container" }, m("label", { key: "a0a0cf6b1f546b8d1485dd3aee1b686f0e9c9cba" }, m("input", { key: "96bdb407b3ab6f668cf94b83e8091a604743f93f", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), m("span", { key: "d345d3b47c14213487a9108d78abbf0db26f25af", class: "checkmark" }), m("slot", { key: "aba536e12ed7a97d18790f1a212ead284c1253ec", name: "label" }, m("span", { key: "e7767302bc6865b99cf42949e8bd032e237d2ad9", class: "label" }, this.label))), this.error && m("p", { class: "error" }, this.error));
|
|
15737
15740
|
}
|
|
15738
15741
|
get el() {
|
|
15739
15742
|
return this;
|
|
15740
15743
|
}
|
|
15744
|
+
static get watchers() {
|
|
15745
|
+
return {
|
|
15746
|
+
checked: ["checkedPropChangedHandler"]
|
|
15747
|
+
};
|
|
15748
|
+
}
|
|
15741
15749
|
static get style() {
|
|
15742
15750
|
return oC;
|
|
15743
15751
|
}
|
|
@@ -15748,7 +15756,9 @@ const iC = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
|
|
|
15748
15756
|
required: [4],
|
|
15749
15757
|
isChecked: [32],
|
|
15750
15758
|
error: [32]
|
|
15751
|
-
}, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"]]
|
|
15759
|
+
}, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"]], {
|
|
15760
|
+
checked: ["checkedPropChangedHandler"]
|
|
15761
|
+
}]);
|
|
15752
15762
|
function K5() {
|
|
15753
15763
|
if (typeof customElements > "u")
|
|
15754
15764
|
return;
|
|
@@ -16292,7 +16302,7 @@ const jC = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
|
|
|
16292
16302
|
date: "YYYY-MM-DD"
|
|
16293
16303
|
}, HC = te(class extends ne {
|
|
16294
16304
|
constructor() {
|
|
16295
|
-
super(), this.__registerHost(), this.__attachShadow(), this.nylasFormInputChanged = W(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = W(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = W(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = zC.date, this.required = !1, this.readOnly = !1, this.autoFocus = !1, this.pattern = void 0, this.maxLength = 255, this.patternError = "", this.requiredError = "", this.value = void 0, this.error = "";
|
|
16305
|
+
super(), this.__registerHost(), this.__attachShadow(), this.nylasFormInputChanged = W(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = W(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = W(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = zC.date, this.required = !1, this.readOnly = !1, this.autoFocus = !1, this.pattern = void 0, this.maxLength = 255, this.patternError = "", this.requiredError = "", this.value = void 0, this.error = "", this.isDateValid = !0;
|
|
16296
16306
|
}
|
|
16297
16307
|
handleDefaultValueChange(e) {
|
|
16298
16308
|
this.value = Wt(e), this.value && this.validatePattern(this.value);
|
|
@@ -16304,11 +16314,12 @@ const jC = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
|
|
|
16304
16314
|
this.validatePattern(this.value), this.error && e.preventDefault();
|
|
16305
16315
|
}
|
|
16306
16316
|
async handleFormSubmitted(e) {
|
|
16307
|
-
|
|
16308
|
-
(n = this.el) != null && n.getAttribute("data-page-styling") && (this.validatePattern(this.value), this.error && e.preventDefault());
|
|
16317
|
+
this.validatePattern(this.value), this.error && e.preventDefault();
|
|
16309
16318
|
}
|
|
16310
16319
|
handleInput(e) {
|
|
16311
|
-
this.error = ""
|
|
16320
|
+
this.error = "";
|
|
16321
|
+
const n = e.target;
|
|
16322
|
+
this.value = Wt(n.value), this.isDateValid = n.validity.valid, this.nylasFormInputChanged.emit({
|
|
16312
16323
|
value: this.value,
|
|
16313
16324
|
name: this.name,
|
|
16314
16325
|
label: this.label,
|
|
@@ -16329,14 +16340,18 @@ const jC = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
|
|
|
16329
16340
|
});
|
|
16330
16341
|
}
|
|
16331
16342
|
validatePattern(e) {
|
|
16332
|
-
if (this.error = "", this.
|
|
16343
|
+
if (this.error = "", !this.isDateValid) {
|
|
16344
|
+
this.error = "Please enter a valid date";
|
|
16345
|
+
return;
|
|
16346
|
+
}
|
|
16347
|
+
if (this.required && !e) {
|
|
16333
16348
|
this.error = this.requiredError || "This field is required.";
|
|
16334
16349
|
return;
|
|
16335
16350
|
}
|
|
16336
16351
|
!this.pattern || !e && !this.required || (this.pattern.test(e) ? this.error = "" : this.error = this.patternError || "Invalid format.");
|
|
16337
16352
|
}
|
|
16338
16353
|
render() {
|
|
16339
|
-
return m("label", { key: "
|
|
16354
|
+
return m("label", { key: "db7e5910f650055747d1f2bca13356d2c3fe3f9e", part: "ic__label", class: { error: !!this.error } }, this.label && m("p", null, m("span", { class: "label" }, this.label), this.required && m("span", { class: "required" }, "*")), m("div", { key: "81d0a723cec27805587e2abdac667504d078e211", part: "ic__input_wrapper", class: "input_wrapper" }, m("input", { key: "948cf92087a3763d058588c8f6b7764e96234595", type: "date", name: this.name, part: "ic__date", readOnly: this.readOnly, autoFocus: this.autoFocus, value: this.value, maxLength: this.maxLength, placeholder: this.placeholder, class: { error: !!this.error }, onInput: (e) => this.handleInput(e), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), m("slot", { key: "6c1d31a29dc01621d9212a95574c329844da0eed", name: "additional-input" })), this.error && m("span", { class: "error help-text" }, this.error));
|
|
16340
16355
|
}
|
|
16341
16356
|
get el() {
|
|
16342
16357
|
return this;
|
|
@@ -16362,7 +16377,8 @@ const jC = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
|
|
|
16362
16377
|
patternError: [1, "pattern-error"],
|
|
16363
16378
|
requiredError: [1, "required-error"],
|
|
16364
16379
|
value: [32],
|
|
16365
|
-
error: [32]
|
|
16380
|
+
error: [32],
|
|
16381
|
+
isDateValid: [32]
|
|
16366
16382
|
}, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"], [4, "formSubmitted", "handleFormSubmitted"]], {
|
|
16367
16383
|
defaultValue: ["handleDefaultValueChange"]
|
|
16368
16384
|
}]);
|
|
@@ -24462,7 +24478,7 @@ const Cn = (t, e) => {
|
|
|
24462
24478
|
var o, s;
|
|
24463
24479
|
N("[nylas-scheduler] Component will load"), this.enableUserFeedback && !f$() && vB({
|
|
24464
24480
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
24465
|
-
release: "1.3.
|
|
24481
|
+
release: "1.3.3",
|
|
24466
24482
|
integrations: (a) => [
|
|
24467
24483
|
...a.filter((u) => !1),
|
|
24468
24484
|
RD({
|
|
@@ -24673,7 +24689,7 @@ const Cn = (t, e) => {
|
|
|
24673
24689
|
captureContext: {
|
|
24674
24690
|
tags: {
|
|
24675
24691
|
"nylas-web-element": "nylas-schduling",
|
|
24676
|
-
"nylas-web-element-version": "1.3.
|
|
24692
|
+
"nylas-web-element-version": "1.3.3"
|
|
24677
24693
|
},
|
|
24678
24694
|
extra: {
|
|
24679
24695
|
configId: this.configurationId,
|
|
@@ -9049,7 +9049,7 @@ class F2 {
|
|
|
9049
9049
|
}
|
|
9050
9050
|
async makeAPIRequest(e, t, r, i = {}) {
|
|
9051
9051
|
try {
|
|
9052
|
-
const u = new URL(this.schedulerAPIURL), o = "1.3.
|
|
9052
|
+
const u = new URL(this.schedulerAPIURL), o = "1.3.3";
|
|
9053
9053
|
return u.pathname = e, await (await fetch(decodeURIComponent(u.toString()), {
|
|
9054
9054
|
method: t,
|
|
9055
9055
|
headers: {
|
|
@@ -9448,6 +9448,18 @@ const k3 = ".time-period-selector.sc-time-period-selector{display:grid;gap:0.5re
|
|
|
9448
9448
|
value: e
|
|
9449
9449
|
}));
|
|
9450
9450
|
}
|
|
9451
|
+
defaultSelectedPeriodChanged(e) {
|
|
9452
|
+
this.selectedPeriod = e, this.updateNumberOptionsAndSelectedNumber(e);
|
|
9453
|
+
}
|
|
9454
|
+
defaultSelectedNumberChanged(e) {
|
|
9455
|
+
this.selectedNumber = e;
|
|
9456
|
+
}
|
|
9457
|
+
timePeriodsChanged(e) {
|
|
9458
|
+
this.timePeriodOptions = e.map((t) => ({
|
|
9459
|
+
label: t,
|
|
9460
|
+
value: t
|
|
9461
|
+
}));
|
|
9462
|
+
}
|
|
9451
9463
|
componentDidLoad() {
|
|
9452
9464
|
this.selectedNumber = this.defaultSelectedNumber, this.selectedPeriod = this.defaultSelectedPeriod;
|
|
9453
9465
|
const e = E3[this.selectedPeriod] ?? this.selectedPeriod, t = this.calculateOptions(e);
|
|
@@ -9500,11 +9512,18 @@ const k3 = ".time-period-selector.sc-time-period-selector{display:grid;gap:0.5re
|
|
|
9500
9512
|
})), this.selectedNumber = parseInt(this.numberOptions[0].value);
|
|
9501
9513
|
}
|
|
9502
9514
|
render() {
|
|
9503
|
-
return U("div", { key: "
|
|
9515
|
+
return U("div", { key: "f40a2be9bc76a0a5be0ffa3c87779fab644e52f2", class: "time-period-selector" }, typeof this.selectedNumber == "number" && U("input-dropdown", { id: "time-number", name: "time-number", inputValue: this.selectedNumber.toString(), exportparts: "id_dropdown: tps__number-dropdown, id_dropdown-input: tps__number-dropdown-button, id_dropdown-content: tps__number-dropdown-content", options: this.numberOptions, defaultInputOption: this.numberOptions.find((e) => e.value == this.selectedNumber.toString()) }), typeof this.selectedPeriod == "string" && U("select-dropdown", { id: "time-period", name: "time-period", options: this.timePeriodOptions, exportparts: "sd_dropdown: tps__period-dropdown, sd_dropdown-button: tps__period-dropdown-button, sd_dropdown-content: tps__period-dropdown-content", pluralizedLabel: this.selectedNumber > 1 ? "s" : "", defaultSelectedOption: this.timePeriodOptions.find((e) => e.value == this.selectedPeriod), withSearch: !1 }));
|
|
9504
9516
|
}
|
|
9505
9517
|
get host() {
|
|
9506
9518
|
return this;
|
|
9507
9519
|
}
|
|
9520
|
+
static get watchers() {
|
|
9521
|
+
return {
|
|
9522
|
+
defaultSelectedPeriod: ["defaultSelectedPeriodChanged"],
|
|
9523
|
+
defaultSelectedNumber: ["defaultSelectedNumberChanged"],
|
|
9524
|
+
timePeriods: ["timePeriodsChanged"]
|
|
9525
|
+
};
|
|
9526
|
+
}
|
|
9508
9527
|
static get style() {
|
|
9509
9528
|
return w3;
|
|
9510
9529
|
}
|
|
@@ -9516,7 +9535,11 @@ const k3 = ".time-period-selector.sc-time-period-selector{display:grid;gap:0.5re
|
|
|
9516
9535
|
selectedNumber: [32],
|
|
9517
9536
|
numberOptions: [32],
|
|
9518
9537
|
timePeriodOptions: [32]
|
|
9519
|
-
}, [[0, "inputOptionChanged", "inputOptionChangedHandler"], [0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"]]
|
|
9538
|
+
}, [[0, "inputOptionChanged", "inputOptionChangedHandler"], [0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"]], {
|
|
9539
|
+
defaultSelectedPeriod: ["defaultSelectedPeriodChanged"],
|
|
9540
|
+
defaultSelectedNumber: ["defaultSelectedNumberChanged"],
|
|
9541
|
+
timePeriods: ["timePeriodsChanged"]
|
|
9542
|
+
}]);
|
|
9520
9543
|
function $3() {
|
|
9521
9544
|
if (typeof customElements > "u")
|
|
9522
9545
|
return;
|
|
@@ -414,10 +414,10 @@ const NylasAdditionalParticipants = class {
|
|
|
414
414
|
componentWillLoad() {
|
|
415
415
|
utils.debug('nylas-additional-participants', 'componentWillLoad');
|
|
416
416
|
this.host.setAttribute('name', this.name);
|
|
417
|
-
this.updateState(this.selectedConfiguration, this.currentUser);
|
|
418
417
|
}
|
|
419
418
|
componentDidLoad() {
|
|
420
419
|
utils.debug('nylas-additional-participants', 'componentDidLoad');
|
|
420
|
+
this.updateState(this.selectedConfiguration, this.currentUser);
|
|
421
421
|
}
|
|
422
422
|
disconnectedCallback() {
|
|
423
423
|
utils.debug('nylas-additional-participants', 'disconnectedCallback');
|
|
@@ -4002,6 +4002,28 @@ var __metadata$q = (undefined && undefined.__metadata) || function (k, v) {
|
|
|
4002
4002
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
4003
4003
|
return Reflect.metadata(k, v);
|
|
4004
4004
|
};
|
|
4005
|
+
const staticFields = [
|
|
4006
|
+
{
|
|
4007
|
+
type: 'text',
|
|
4008
|
+
label: 'Your name',
|
|
4009
|
+
key: 'your_name',
|
|
4010
|
+
typeLabel: 'Short text',
|
|
4011
|
+
readonly: true,
|
|
4012
|
+
required: true,
|
|
4013
|
+
isOpen: false,
|
|
4014
|
+
order: 0,
|
|
4015
|
+
},
|
|
4016
|
+
{
|
|
4017
|
+
type: 'email',
|
|
4018
|
+
label: 'Your Email',
|
|
4019
|
+
key: 'your_email',
|
|
4020
|
+
typeLabel: 'Email',
|
|
4021
|
+
readonly: true,
|
|
4022
|
+
isOpen: false,
|
|
4023
|
+
required: true,
|
|
4024
|
+
order: 1,
|
|
4025
|
+
},
|
|
4026
|
+
];
|
|
4005
4027
|
const NylasBookingFormConfig = class {
|
|
4006
4028
|
constructor(hostRef) {
|
|
4007
4029
|
index$1.registerInstance(this, hostRef);
|
|
@@ -4022,6 +4044,9 @@ const NylasBookingFormConfig = class {
|
|
|
4022
4044
|
utils.debug('nylas-calendar-picker', 'elementNameChangedHandler', newValue);
|
|
4023
4045
|
this.host.setAttribute('name', newValue);
|
|
4024
4046
|
}
|
|
4047
|
+
selectedConfigurationChangedHandler(newValue) {
|
|
4048
|
+
this.updateFormFields(newValue);
|
|
4049
|
+
}
|
|
4025
4050
|
connectedCallback() {
|
|
4026
4051
|
utils.debug('nylas-booking-form-config', 'connectedCallback');
|
|
4027
4052
|
}
|
|
@@ -4031,37 +4056,18 @@ const NylasBookingFormConfig = class {
|
|
|
4031
4056
|
componentWillLoad() {
|
|
4032
4057
|
utils.debug('nylas-booking-form-config', 'componentWillLoad');
|
|
4033
4058
|
this.host.setAttribute('name', this.name);
|
|
4034
|
-
const staticFields = [
|
|
4035
|
-
{
|
|
4036
|
-
type: 'text',
|
|
4037
|
-
label: 'Your name',
|
|
4038
|
-
key: 'your_name',
|
|
4039
|
-
typeLabel: 'Short text',
|
|
4040
|
-
readonly: true,
|
|
4041
|
-
required: true,
|
|
4042
|
-
isOpen: false,
|
|
4043
|
-
order: 0,
|
|
4044
|
-
},
|
|
4045
|
-
{
|
|
4046
|
-
type: 'email',
|
|
4047
|
-
label: 'Your Email',
|
|
4048
|
-
key: 'your_email',
|
|
4049
|
-
typeLabel: 'Email',
|
|
4050
|
-
readonly: true,
|
|
4051
|
-
isOpen: false,
|
|
4052
|
-
required: true,
|
|
4053
|
-
order: 1,
|
|
4054
|
-
},
|
|
4055
|
-
];
|
|
4056
4059
|
this.formFields = [...staticFields];
|
|
4057
4060
|
}
|
|
4058
4061
|
componentDidLoad() {
|
|
4059
4062
|
utils.debug('nylas-booking-form-config', 'componentDidLoad');
|
|
4060
|
-
|
|
4061
|
-
this.
|
|
4062
|
-
|
|
4063
|
+
if (this.selectedConfiguration) {
|
|
4064
|
+
this.updateFormFields(this.selectedConfiguration);
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
updateFormFields(config) {
|
|
4068
|
+
const additionalFields = Object.entries(config?.scheduler?.additional_fields || {}).map(([id, field]) => ({ ...field, key: id })) || this.additionalFields || [];
|
|
4063
4069
|
this.formFields = [
|
|
4064
|
-
...
|
|
4070
|
+
...staticFields,
|
|
4065
4071
|
...additionalFields
|
|
4066
4072
|
.sort((a, b) => a.order - b.order)
|
|
4067
4073
|
.map((f, i) => {
|
|
@@ -4269,7 +4275,7 @@ const NylasBookingFormConfig = class {
|
|
|
4269
4275
|
});
|
|
4270
4276
|
}
|
|
4271
4277
|
render() {
|
|
4272
|
-
return (index$1.h(index$1.Host, { key: '
|
|
4278
|
+
return (index$1.h(index$1.Host, { key: 'bd832f2b9a02ce53187e4f633e4c0388e6e65a03' }, index$1.h("div", { key: 'fcf79fe131d8e0a99312286b15f228b997d8c0be', class: "nylas-booking-form-config", part: "nbfc" }, index$1.h("div", { key: '07cd086a8af8145f5a8c6676e360fa5f919040f3', class: "header", part: "nbfc__header" }, index$1.h("div", { key: 'f703982061b36b7f4b792f4deff59cc4256b7c25', class: "header_text" }, index$1.h("h3", { key: 'a7cba135c527592a000c296ceaf68bb91c9ddcf4' }, "Booking form"), index$1.h("p", { key: '62acf8b4a583145e2bc300b1b351799dec1ff438' }, "Add custom fields to the booking form.")), index$1.h("div", { key: '574ef9a02aa06ad29ac0b08c22aa749a844d32d8', class: "header_action" }, index$1.h("select-dropdown", { key: 'c2a83f721237dc1032af5e55e17438e1060b2e58', name: "add-field", exportparts: "sd_dropdown: nbfc__add_field, sd_dropdown-button: nbfc__add_field-button, sd_dropdown-content: nbfc__add_field-dropdown-content", options: constants.DEFAULT_FORM_FIELD_TYPES, withSearch: false, withChevron: false, dropdownButtonText: "Add new field" }, index$1.h("span", { key: 'e0aaa33a3bd04b79499310c3904984269eaecbf3', slot: "select-icon" }, index$1.h("plus-icon", { key: '06bf29f2b3d0dca74d660db8791a47bc2474652b', width: "15", height: "15" }))))), index$1.h("div", { key: 'b33cfae9a876be328d795366802a1791e22ca164', class: "content" }, index$1.h("div", { key: '0df453e1fc129a13b90b33c6e267ecd9dd149c56', id: "fields", class: "additional_fields", part: "nbfc__additional_fields" }, this.formFields.map((field, i) => {
|
|
4273
4279
|
return (index$1.h("div", { class: `form-field draggable ${field.readonly && 'fixed'}`, part: "nbfc__form_field", key: i }, index$1.h("div", { class: "form-field_header", part: "nbfc__form_field-header" }, index$1.h("span", { class: "dragable" }, index$1.h("dragable-icon", { width: "24", height: "25" })), index$1.h("div", { class: "form-field_header_text" }, index$1.h("h4", null, field.label), index$1.h("p", null, field.typeLabel)), index$1.h("div", { class: "form-field_header_actions" }, index$1.h("span", { class: `is-required` }, field.required ? 'Required' : 'Optional'), !field.readonly && (index$1.h("button", { onClick: () => {
|
|
4274
4280
|
this.fieldRemove(i);
|
|
4275
4281
|
} }, index$1.h("close-icon", null))), index$1.h("span", { class: `chevron ${field.isOpen ? 'open' : 'closed'}`, onClick: () => {
|
|
@@ -4289,6 +4295,7 @@ const NylasBookingFormConfig = class {
|
|
|
4289
4295
|
get host() { return index$1.getElement(this); }
|
|
4290
4296
|
static get watchers() { return {
|
|
4291
4297
|
"name": ["elementNameChangedHandler"],
|
|
4298
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
4292
4299
|
"formFields": ["watchHandler"]
|
|
4293
4300
|
}; }
|
|
4294
4301
|
};
|
|
@@ -4358,14 +4365,8 @@ const NylasBufferTime = class {
|
|
|
4358
4365
|
this.selectedBeforeBufferTime = this.buffer.before;
|
|
4359
4366
|
this.selectedAfterBufferTime = this.buffer.after;
|
|
4360
4367
|
}
|
|
4368
|
+
this.updateFormValue();
|
|
4361
4369
|
this.componentLoaded = true;
|
|
4362
|
-
if (typeof this.internals.setFormValue === 'function') {
|
|
4363
|
-
const bufferTime = {
|
|
4364
|
-
before: this.selectedBeforeBufferTime,
|
|
4365
|
-
after: this.selectedAfterBufferTime,
|
|
4366
|
-
};
|
|
4367
|
-
this.internals.setFormValue(JSON.stringify(bufferTime), this.name);
|
|
4368
|
-
}
|
|
4369
4370
|
}
|
|
4370
4371
|
componentWillUpdate() {
|
|
4371
4372
|
utils.debug('nylas-buffer-time', 'componentWillUpdate');
|
|
@@ -4388,6 +4389,7 @@ const NylasBufferTime = class {
|
|
|
4388
4389
|
const buffer = newValue?.availability?.availability_rules?.buffer;
|
|
4389
4390
|
this.selectedAfterBufferTime = buffer?.after ? buffer.after : this.buffer.after;
|
|
4390
4391
|
this.selectedBeforeBufferTime = buffer?.before ? buffer.before : this.buffer.before;
|
|
4392
|
+
this.updateFormValue();
|
|
4391
4393
|
}
|
|
4392
4394
|
nylasFormDropdownChangedHandler(event) {
|
|
4393
4395
|
utils.debug('nylas-buffer-time', 'nylasFormDropdownChangedHandler', event.detail);
|
|
@@ -4399,14 +4401,20 @@ const NylasBufferTime = class {
|
|
|
4399
4401
|
else if (name === 'after-buffer-time') {
|
|
4400
4402
|
this.selectedAfterBufferTime = parseInt(value);
|
|
4401
4403
|
}
|
|
4402
|
-
|
|
4403
|
-
before: this.selectedBeforeBufferTime,
|
|
4404
|
-
after: this.selectedAfterBufferTime,
|
|
4405
|
-
};
|
|
4406
|
-
this.internals.setFormValue(JSON.stringify(bufferTime), 'booking-calendar');
|
|
4404
|
+
this.updateFormValue();
|
|
4407
4405
|
};
|
|
4408
4406
|
this.valueChanged.emit({ ...event.detail, valueChanged });
|
|
4409
4407
|
}
|
|
4408
|
+
get isInternalsAvailable() {
|
|
4409
|
+
return this.internals !== undefined && typeof this.internals.setFormValue === 'function';
|
|
4410
|
+
}
|
|
4411
|
+
updateFormValue() {
|
|
4412
|
+
const bufferTime = {
|
|
4413
|
+
before: this.selectedBeforeBufferTime,
|
|
4414
|
+
after: this.selectedAfterBufferTime,
|
|
4415
|
+
};
|
|
4416
|
+
this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(bufferTime), this.name);
|
|
4417
|
+
}
|
|
4410
4418
|
renderPreview() {
|
|
4411
4419
|
const totalSlots = 4;
|
|
4412
4420
|
const slotHeight = 10;
|
|
@@ -5020,14 +5028,14 @@ const NylasConnectedCalendars = class {
|
|
|
5020
5028
|
selectedParticipants[participant.email] = {
|
|
5021
5029
|
isOpen: isOpen,
|
|
5022
5030
|
name: participant.name || participant.email,
|
|
5023
|
-
|
|
5031
|
+
calendars: participant.availability?.calendar_ids,
|
|
5024
5032
|
};
|
|
5025
5033
|
}
|
|
5026
5034
|
});
|
|
5027
5035
|
return selectedParticipants;
|
|
5028
5036
|
}
|
|
5029
5037
|
render() {
|
|
5030
|
-
return (index$1.h(index$1.Host, { key: '
|
|
5038
|
+
return (index$1.h(index$1.Host, { key: '4b8cfcfa751c2790968049f6f10a06193f9adc70' }, index$1.h("div", { key: 'ffbcde80612886bc09b4419bc1cc47d585834fac', class: "nylas-connected-calendars", part: "nccals" }, index$1.h("div", { key: 'd00c14cd0ab8107a2ba609ba58b596a7d3e1e69f', class: "header", part: "nccals__header" }, index$1.h("h3", { key: 'cb0ad20533c33a3778d0b89fe5d51aa4c15864a8' }, "Connected Calendars"), index$1.h("p", { key: 'b3488e835534f477d2585be0a60b5800d42cbaac' }, "Select the calendars to use for checking your availability.", index$1.h("tooltip-component", { key: '6acbd37df60566fa8a3fb8676fe3b3f4287d5c06' }, index$1.h("info-icon", { key: 'f1eb4a75f869b09bee95c074c8d180449654a49f', slot: "tooltip-icon" }), index$1.h("span", { key: 'e8aca8b29c7a89fe7b6eea0635761bdde19349e2', slot: "tooltip-content" }, "Check availability across one or more calendars. If you select multiple calendars for a participant, the participant must be available across all of their calendars to be considered available.")))), index$1.h("div", { key: '844803e9ea3270bfcedbc212990c0038a74dd663', class: "content", part: "nccals__content" }, index$1.h("form", { key: '2970ec7cec45d2582b987cbfab8949c1ece02499', ref: el => (this.connectedCalendarsFormRef = el) }, Object.keys(this.participantCalendars).map((key, index) => {
|
|
5031
5039
|
const participant = this.selectedCalendars[key];
|
|
5032
5040
|
const participantCalendars = this.participantCalendars[key];
|
|
5033
5041
|
if (!participant || !participant.name)
|
|
@@ -5847,6 +5855,18 @@ const NylasEventLocation = class {
|
|
|
5847
5855
|
this.location = '';
|
|
5848
5856
|
}
|
|
5849
5857
|
}
|
|
5858
|
+
currentUserChangedHandler(newValue) {
|
|
5859
|
+
utils.debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);
|
|
5860
|
+
if (newValue?.provider) {
|
|
5861
|
+
this.userProviderState = newValue?.provider;
|
|
5862
|
+
this.setLocationOptionsForProvider(this.userProviderState);
|
|
5863
|
+
}
|
|
5864
|
+
}
|
|
5865
|
+
conferenceProvidersChanged(newValue) {
|
|
5866
|
+
if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {
|
|
5867
|
+
this.locationOptions.push({ value: 'zoom', label: labels['zoom'], labelHTML: this.getLabelHTML('zoom') });
|
|
5868
|
+
}
|
|
5869
|
+
}
|
|
5850
5870
|
connectedCallback() {
|
|
5851
5871
|
utils.debug('nylas-event-location', 'connectedCallback');
|
|
5852
5872
|
}
|
|
@@ -5863,15 +5883,8 @@ const NylasEventLocation = class {
|
|
|
5863
5883
|
this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');
|
|
5864
5884
|
}
|
|
5865
5885
|
this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
this.locationOptions.push({ value: 'google', label: labels['google'], labelHTML: this.getLabelHTML('google') });
|
|
5869
|
-
break;
|
|
5870
|
-
case 'microsoft':
|
|
5871
|
-
this.locationOptions.push({ value: 'microsoft', label: labels['microsoft'], labelHTML: this.getLabelHTML('microsoft') });
|
|
5872
|
-
break;
|
|
5873
|
-
}
|
|
5874
|
-
if (this.conferenceProviders?.['zoom']) {
|
|
5886
|
+
this.setLocationOptionsForProvider(this.userProviderState);
|
|
5887
|
+
if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {
|
|
5875
5888
|
this.locationOptions.push({ value: 'zoom', label: labels['zoom'], labelHTML: this.getLabelHTML('zoom') });
|
|
5876
5889
|
}
|
|
5877
5890
|
}
|
|
@@ -5938,6 +5951,20 @@ const NylasEventLocation = class {
|
|
|
5938
5951
|
break;
|
|
5939
5952
|
}
|
|
5940
5953
|
}
|
|
5954
|
+
setLocationOptionsForProvider(provider) {
|
|
5955
|
+
switch (provider) {
|
|
5956
|
+
case 'google':
|
|
5957
|
+
if (!this.locationOptions.some(option => option.value === 'google')) {
|
|
5958
|
+
this.locationOptions.push({ value: 'google', label: labels['google'], labelHTML: this.getLabelHTML('google') });
|
|
5959
|
+
}
|
|
5960
|
+
break;
|
|
5961
|
+
case 'microsoft':
|
|
5962
|
+
if (!this.locationOptions.some(option => option.value === 'microsoft')) {
|
|
5963
|
+
this.locationOptions.push({ value: 'microsoft', label: labels['microsoft'], labelHTML: this.getLabelHTML('microsoft') });
|
|
5964
|
+
}
|
|
5965
|
+
break;
|
|
5966
|
+
}
|
|
5967
|
+
}
|
|
5941
5968
|
setDefaultLocationOption(eventConferencing, eventLocation) {
|
|
5942
5969
|
if (eventConferencing != null && eventConferencing?.provider != null && eventConferencing?.autocreate != null) {
|
|
5943
5970
|
return constants.CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];
|
|
@@ -5988,13 +6015,15 @@ const NylasEventLocation = class {
|
|
|
5988
6015
|
}
|
|
5989
6016
|
render() {
|
|
5990
6017
|
const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;
|
|
5991
|
-
return (index$1.h(index$1.Host, { key: '
|
|
6018
|
+
return (index$1.h(index$1.Host, { key: 'c91ef22df2a83a3c2ac66ca9011ad8633a085b9e' }, index$1.h("div", { key: '9e6823ce704cf4870f99936a39371b255b165afb', class: "nylas-event-location", part: "nel" }, index$1.h("label", { key: '2d1a71a258d0576460acd68a93cbace4a5c9254c', htmlFor: "location" }, "Event meeting or location", index$1.h("span", { key: '9dd7df66eec4e35a8659c88d4f26be99093e815a', class: "label-icon" }, index$1.h("tooltip-component", { key: '9299313bad5724106fa7108d0874e760945bcb30' }, index$1.h("info-icon", { key: '2490fbc28caa2547d8a3cecc747dc94254c59df3', slot: "tooltip-icon" }), index$1.h("span", { key: 'd6c73fef100e4f962507d58b4ed24a1bd19599c2', slot: "tooltip-content" }, "Select a conferencing option or add a custom location.")))), index$1.h("div", { key: '726f78440a3e65e379368b0a849bee94b2839dfd', class: "location-input" }, defaultOption && defaultOption?.label && (index$1.h("select-dropdown", { withSearch: false, name: "location", options: this.locationOptions, defaultSelectedOption: defaultOption, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, index$1.h("span", { slot: "select-icon" }, this.getIcon(this.selectedLocationOption)))), this.selectedLocationOption === 'custom' && (index$1.h("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: e => this.handleChange(e) }))))));
|
|
5992
6019
|
}
|
|
5993
6020
|
static get formAssociated() { return true; }
|
|
5994
6021
|
get host() { return index$1.getElement(this); }
|
|
5995
6022
|
static get watchers() { return {
|
|
5996
6023
|
"name": ["elementNameChangedHandler"],
|
|
5997
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"]
|
|
6024
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
6025
|
+
"currentUser": ["currentUserChangedHandler"],
|
|
6026
|
+
"conferenceProviders": ["conferenceProvidersChanged"]
|
|
5998
6027
|
}; }
|
|
5999
6028
|
};
|
|
6000
6029
|
__decorate$d([
|
|
@@ -7254,12 +7283,13 @@ const NylasPageStyling = class {
|
|
|
7254
7283
|
this.isOpen = !this.isOpen;
|
|
7255
7284
|
}
|
|
7256
7285
|
render() {
|
|
7257
|
-
return (index$1.h(index$1.Host, { key: '
|
|
7286
|
+
return (index$1.h(index$1.Host, { key: 'c2ffa8ae940e9594f254903d45abc3f7c01d7d41' }, index$1.h("div", { key: '1813654e2aaa9c66d5a535186f227968b434654c', part: "nps", class: { 'nylas-page-styling': true, 'no-border': !this.customInputsSlot } }, this.customInputsSlot ? (index$1.h("div", { class: "header", part: "nps__header" }, index$1.h("div", null, index$1.h("h3", null, "Page styling and customization")), index$1.h("div", { class: "drawer-toggle", part: "nps__drawer-toggle--container" }, index$1.h("span", { class: `chevron ${this.isOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, index$1.h("chevron-icon", { width: "24", height: "24" }))))) : null, index$1.h("div", { key: 'cff4891eeb1a958feb2a6b20623b97f908721c60', id: "nylas-page-styling__body", class: "nylas-page-styling__body", part: "nps__body" }, index$1.h("div", { key: '16b2398f10b6d7703d02bbbf5c43e3e229499b2d', class: { 'nylas-page-styling__section': true, 'no-padding': !this.customInputsSlot } }, index$1.h("div", { key: 'fd09434076ea4626ee9d7b2710ec8418325aa117', class: "nylas-page-styling__row" }, index$1.h("div", { key: '16a29cabadc4f1a4ba9f389fe232ea22125cfe36', class: { subsection: true, hide: !this.isOpen } })))))));
|
|
7258
7287
|
}
|
|
7259
7288
|
static get formAssociated() { return true; }
|
|
7260
7289
|
get host() { return index$1.getElement(this); }
|
|
7261
7290
|
static get watchers() { return {
|
|
7262
|
-
"name": ["elementNameChangedHandler"]
|
|
7291
|
+
"name": ["elementNameChangedHandler"],
|
|
7292
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"]
|
|
7263
7293
|
}; }
|
|
7264
7294
|
};
|
|
7265
7295
|
__decorate$6([
|
|
@@ -7603,8 +7633,9 @@ const NylasParticipantsCustomAvailability = class {
|
|
|
7603
7633
|
return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
|
|
7604
7634
|
}
|
|
7605
7635
|
render() {
|
|
7606
|
-
return (index$1.h(index$1.Host, { key: '
|
|
7636
|
+
return (index$1.h(index$1.Host, { key: '64198b8231e1739484f81d02167d7b5f456eda69' }, index$1.h("div", { key: '68eb8279c510ef937e19dec06960867c98a5b02a', class: "nylas-participants-custom-availability", part: "npca" }, index$1.h("div", { key: '9622d8a7fbc124723cb7135a3a3846fad0e4e458', class: "header", part: "npca__header" }, index$1.h("h3", { key: '6424eeeb937ce2225a63d76482ec633efacd9e7a' }, "Participant open hours"), index$1.h("p", { key: 'ac021fef4d4b0de03d5e2ca335563ec4f328156c' }, "If not set, the default open hours will be used to calculate availability for this participant.")), index$1.h("div", { key: 'e9412e214011b575954196e39ea265dcf86801ec', class: "content", part: "npca__content" }, index$1.h("form", { key: 'ab5b4239f2d2b31fcd69d0f2e2d61a8a13003739', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
|
|
7607
7637
|
const participant = this.selectedParticipants[key];
|
|
7638
|
+
const participantOpenHours = participant.availability?.open_hours || [];
|
|
7608
7639
|
if (!participant || !participant.name || !participant.availability)
|
|
7609
7640
|
return;
|
|
7610
7641
|
return (index$1.h("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${index}` }, index$1.h("div", { class: "participant-title", part: "npca__participant-title" }, index$1.h("p", null, participant.name, "'s open hours"), index$1.h("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, index$1.h("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: key, checked: !!participant?.openHours && participant?.openHours.length > 0 }), index$1.h("span", { class: `chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`, onClick: () => {
|
|
@@ -7612,7 +7643,7 @@ const NylasParticipantsCustomAvailability = class {
|
|
|
7612
7643
|
return;
|
|
7613
7644
|
this.selectedParticipants[key].isOpen = !participant.isOpen;
|
|
7614
7645
|
this.selectedParticipants = { ...this.selectedParticipants };
|
|
7615
|
-
} }, index$1.h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (index$1.h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours:
|
|
7646
|
+
} }, index$1.h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (index$1.h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participantOpenHours, defaultTimezone: participant.timezone, hideHeader: true }))));
|
|
7616
7647
|
}))))));
|
|
7617
7648
|
}
|
|
7618
7649
|
static get formAssociated() { return true; }
|