@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
|
@@ -410,10 +410,10 @@ const NylasAdditionalParticipants = class {
|
|
|
410
410
|
componentWillLoad() {
|
|
411
411
|
debug('nylas-additional-participants', 'componentWillLoad');
|
|
412
412
|
this.host.setAttribute('name', this.name);
|
|
413
|
-
this.updateState(this.selectedConfiguration, this.currentUser);
|
|
414
413
|
}
|
|
415
414
|
componentDidLoad() {
|
|
416
415
|
debug('nylas-additional-participants', 'componentDidLoad');
|
|
416
|
+
this.updateState(this.selectedConfiguration, this.currentUser);
|
|
417
417
|
}
|
|
418
418
|
disconnectedCallback() {
|
|
419
419
|
debug('nylas-additional-participants', 'disconnectedCallback');
|
|
@@ -3998,6 +3998,28 @@ var __metadata$q = (undefined && undefined.__metadata) || function (k, v) {
|
|
|
3998
3998
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
3999
3999
|
return Reflect.metadata(k, v);
|
|
4000
4000
|
};
|
|
4001
|
+
const staticFields = [
|
|
4002
|
+
{
|
|
4003
|
+
type: 'text',
|
|
4004
|
+
label: 'Your name',
|
|
4005
|
+
key: 'your_name',
|
|
4006
|
+
typeLabel: 'Short text',
|
|
4007
|
+
readonly: true,
|
|
4008
|
+
required: true,
|
|
4009
|
+
isOpen: false,
|
|
4010
|
+
order: 0,
|
|
4011
|
+
},
|
|
4012
|
+
{
|
|
4013
|
+
type: 'email',
|
|
4014
|
+
label: 'Your Email',
|
|
4015
|
+
key: 'your_email',
|
|
4016
|
+
typeLabel: 'Email',
|
|
4017
|
+
readonly: true,
|
|
4018
|
+
isOpen: false,
|
|
4019
|
+
required: true,
|
|
4020
|
+
order: 1,
|
|
4021
|
+
},
|
|
4022
|
+
];
|
|
4001
4023
|
const NylasBookingFormConfig = class {
|
|
4002
4024
|
constructor(hostRef) {
|
|
4003
4025
|
registerInstance(this, hostRef);
|
|
@@ -4018,6 +4040,9 @@ const NylasBookingFormConfig = class {
|
|
|
4018
4040
|
debug('nylas-calendar-picker', 'elementNameChangedHandler', newValue);
|
|
4019
4041
|
this.host.setAttribute('name', newValue);
|
|
4020
4042
|
}
|
|
4043
|
+
selectedConfigurationChangedHandler(newValue) {
|
|
4044
|
+
this.updateFormFields(newValue);
|
|
4045
|
+
}
|
|
4021
4046
|
connectedCallback() {
|
|
4022
4047
|
debug('nylas-booking-form-config', 'connectedCallback');
|
|
4023
4048
|
}
|
|
@@ -4027,37 +4052,18 @@ const NylasBookingFormConfig = class {
|
|
|
4027
4052
|
componentWillLoad() {
|
|
4028
4053
|
debug('nylas-booking-form-config', 'componentWillLoad');
|
|
4029
4054
|
this.host.setAttribute('name', this.name);
|
|
4030
|
-
const staticFields = [
|
|
4031
|
-
{
|
|
4032
|
-
type: 'text',
|
|
4033
|
-
label: 'Your name',
|
|
4034
|
-
key: 'your_name',
|
|
4035
|
-
typeLabel: 'Short text',
|
|
4036
|
-
readonly: true,
|
|
4037
|
-
required: true,
|
|
4038
|
-
isOpen: false,
|
|
4039
|
-
order: 0,
|
|
4040
|
-
},
|
|
4041
|
-
{
|
|
4042
|
-
type: 'email',
|
|
4043
|
-
label: 'Your Email',
|
|
4044
|
-
key: 'your_email',
|
|
4045
|
-
typeLabel: 'Email',
|
|
4046
|
-
readonly: true,
|
|
4047
|
-
isOpen: false,
|
|
4048
|
-
required: true,
|
|
4049
|
-
order: 1,
|
|
4050
|
-
},
|
|
4051
|
-
];
|
|
4052
4055
|
this.formFields = [...staticFields];
|
|
4053
4056
|
}
|
|
4054
4057
|
componentDidLoad() {
|
|
4055
4058
|
debug('nylas-booking-form-config', 'componentDidLoad');
|
|
4056
|
-
|
|
4057
|
-
this.
|
|
4058
|
-
|
|
4059
|
+
if (this.selectedConfiguration) {
|
|
4060
|
+
this.updateFormFields(this.selectedConfiguration);
|
|
4061
|
+
}
|
|
4062
|
+
}
|
|
4063
|
+
updateFormFields(config) {
|
|
4064
|
+
const additionalFields = Object.entries(config?.scheduler?.additional_fields || {}).map(([id, field]) => ({ ...field, key: id })) || this.additionalFields || [];
|
|
4059
4065
|
this.formFields = [
|
|
4060
|
-
...
|
|
4066
|
+
...staticFields,
|
|
4061
4067
|
...additionalFields
|
|
4062
4068
|
.sort((a, b) => a.order - b.order)
|
|
4063
4069
|
.map((f, i) => {
|
|
@@ -4265,7 +4271,7 @@ const NylasBookingFormConfig = class {
|
|
|
4265
4271
|
});
|
|
4266
4272
|
}
|
|
4267
4273
|
render() {
|
|
4268
|
-
return (h(Host, { key: '
|
|
4274
|
+
return (h(Host, { key: 'bd832f2b9a02ce53187e4f633e4c0388e6e65a03' }, h("div", { key: 'fcf79fe131d8e0a99312286b15f228b997d8c0be', class: "nylas-booking-form-config", part: "nbfc" }, h("div", { key: '07cd086a8af8145f5a8c6676e360fa5f919040f3', class: "header", part: "nbfc__header" }, h("div", { key: 'f703982061b36b7f4b792f4deff59cc4256b7c25', class: "header_text" }, h("h3", { key: 'a7cba135c527592a000c296ceaf68bb91c9ddcf4' }, "Booking form"), h("p", { key: '62acf8b4a583145e2bc300b1b351799dec1ff438' }, "Add custom fields to the booking form.")), h("div", { key: '574ef9a02aa06ad29ac0b08c22aa749a844d32d8', class: "header_action" }, 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: DEFAULT_FORM_FIELD_TYPES, withSearch: false, withChevron: false, dropdownButtonText: "Add new field" }, h("span", { key: 'e0aaa33a3bd04b79499310c3904984269eaecbf3', slot: "select-icon" }, h("plus-icon", { key: '06bf29f2b3d0dca74d660db8791a47bc2474652b', width: "15", height: "15" }))))), h("div", { key: 'b33cfae9a876be328d795366802a1791e22ca164', class: "content" }, h("div", { key: '0df453e1fc129a13b90b33c6e267ecd9dd149c56', id: "fields", class: "additional_fields", part: "nbfc__additional_fields" }, this.formFields.map((field, i) => {
|
|
4269
4275
|
return (h("div", { class: `form-field draggable ${field.readonly && 'fixed'}`, part: "nbfc__form_field", key: i }, h("div", { class: "form-field_header", part: "nbfc__form_field-header" }, h("span", { class: "dragable" }, h("dragable-icon", { width: "24", height: "25" })), h("div", { class: "form-field_header_text" }, h("h4", null, field.label), h("p", null, field.typeLabel)), h("div", { class: "form-field_header_actions" }, h("span", { class: `is-required` }, field.required ? 'Required' : 'Optional'), !field.readonly && (h("button", { onClick: () => {
|
|
4270
4276
|
this.fieldRemove(i);
|
|
4271
4277
|
} }, h("close-icon", null))), h("span", { class: `chevron ${field.isOpen ? 'open' : 'closed'}`, onClick: () => {
|
|
@@ -4285,6 +4291,7 @@ const NylasBookingFormConfig = class {
|
|
|
4285
4291
|
get host() { return getElement(this); }
|
|
4286
4292
|
static get watchers() { return {
|
|
4287
4293
|
"name": ["elementNameChangedHandler"],
|
|
4294
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
4288
4295
|
"formFields": ["watchHandler"]
|
|
4289
4296
|
}; }
|
|
4290
4297
|
};
|
|
@@ -4354,14 +4361,8 @@ const NylasBufferTime = class {
|
|
|
4354
4361
|
this.selectedBeforeBufferTime = this.buffer.before;
|
|
4355
4362
|
this.selectedAfterBufferTime = this.buffer.after;
|
|
4356
4363
|
}
|
|
4364
|
+
this.updateFormValue();
|
|
4357
4365
|
this.componentLoaded = true;
|
|
4358
|
-
if (typeof this.internals.setFormValue === 'function') {
|
|
4359
|
-
const bufferTime = {
|
|
4360
|
-
before: this.selectedBeforeBufferTime,
|
|
4361
|
-
after: this.selectedAfterBufferTime,
|
|
4362
|
-
};
|
|
4363
|
-
this.internals.setFormValue(JSON.stringify(bufferTime), this.name);
|
|
4364
|
-
}
|
|
4365
4366
|
}
|
|
4366
4367
|
componentWillUpdate() {
|
|
4367
4368
|
debug('nylas-buffer-time', 'componentWillUpdate');
|
|
@@ -4384,6 +4385,7 @@ const NylasBufferTime = class {
|
|
|
4384
4385
|
const buffer = newValue?.availability?.availability_rules?.buffer;
|
|
4385
4386
|
this.selectedAfterBufferTime = buffer?.after ? buffer.after : this.buffer.after;
|
|
4386
4387
|
this.selectedBeforeBufferTime = buffer?.before ? buffer.before : this.buffer.before;
|
|
4388
|
+
this.updateFormValue();
|
|
4387
4389
|
}
|
|
4388
4390
|
nylasFormDropdownChangedHandler(event) {
|
|
4389
4391
|
debug('nylas-buffer-time', 'nylasFormDropdownChangedHandler', event.detail);
|
|
@@ -4395,14 +4397,20 @@ const NylasBufferTime = class {
|
|
|
4395
4397
|
else if (name === 'after-buffer-time') {
|
|
4396
4398
|
this.selectedAfterBufferTime = parseInt(value);
|
|
4397
4399
|
}
|
|
4398
|
-
|
|
4399
|
-
before: this.selectedBeforeBufferTime,
|
|
4400
|
-
after: this.selectedAfterBufferTime,
|
|
4401
|
-
};
|
|
4402
|
-
this.internals.setFormValue(JSON.stringify(bufferTime), 'booking-calendar');
|
|
4400
|
+
this.updateFormValue();
|
|
4403
4401
|
};
|
|
4404
4402
|
this.valueChanged.emit({ ...event.detail, valueChanged });
|
|
4405
4403
|
}
|
|
4404
|
+
get isInternalsAvailable() {
|
|
4405
|
+
return this.internals !== undefined && typeof this.internals.setFormValue === 'function';
|
|
4406
|
+
}
|
|
4407
|
+
updateFormValue() {
|
|
4408
|
+
const bufferTime = {
|
|
4409
|
+
before: this.selectedBeforeBufferTime,
|
|
4410
|
+
after: this.selectedAfterBufferTime,
|
|
4411
|
+
};
|
|
4412
|
+
this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(bufferTime), this.name);
|
|
4413
|
+
}
|
|
4406
4414
|
renderPreview() {
|
|
4407
4415
|
const totalSlots = 4;
|
|
4408
4416
|
const slotHeight = 10;
|
|
@@ -5016,14 +5024,14 @@ const NylasConnectedCalendars = class {
|
|
|
5016
5024
|
selectedParticipants[participant.email] = {
|
|
5017
5025
|
isOpen: isOpen,
|
|
5018
5026
|
name: participant.name || participant.email,
|
|
5019
|
-
|
|
5027
|
+
calendars: participant.availability?.calendar_ids,
|
|
5020
5028
|
};
|
|
5021
5029
|
}
|
|
5022
5030
|
});
|
|
5023
5031
|
return selectedParticipants;
|
|
5024
5032
|
}
|
|
5025
5033
|
render() {
|
|
5026
|
-
return (h(Host, { key: '
|
|
5034
|
+
return (h(Host, { key: '4b8cfcfa751c2790968049f6f10a06193f9adc70' }, h("div", { key: 'ffbcde80612886bc09b4419bc1cc47d585834fac', class: "nylas-connected-calendars", part: "nccals" }, h("div", { key: 'd00c14cd0ab8107a2ba609ba58b596a7d3e1e69f', class: "header", part: "nccals__header" }, h("h3", { key: 'cb0ad20533c33a3778d0b89fe5d51aa4c15864a8' }, "Connected Calendars"), h("p", { key: 'b3488e835534f477d2585be0a60b5800d42cbaac' }, "Select the calendars to use for checking your availability.", h("tooltip-component", { key: '6acbd37df60566fa8a3fb8676fe3b3f4287d5c06' }, h("info-icon", { key: 'f1eb4a75f869b09bee95c074c8d180449654a49f', slot: "tooltip-icon" }), 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.")))), h("div", { key: '844803e9ea3270bfcedbc212990c0038a74dd663', class: "content", part: "nccals__content" }, h("form", { key: '2970ec7cec45d2582b987cbfab8949c1ece02499', ref: el => (this.connectedCalendarsFormRef = el) }, Object.keys(this.participantCalendars).map((key, index) => {
|
|
5027
5035
|
const participant = this.selectedCalendars[key];
|
|
5028
5036
|
const participantCalendars = this.participantCalendars[key];
|
|
5029
5037
|
if (!participant || !participant.name)
|
|
@@ -5843,6 +5851,18 @@ const NylasEventLocation = class {
|
|
|
5843
5851
|
this.location = '';
|
|
5844
5852
|
}
|
|
5845
5853
|
}
|
|
5854
|
+
currentUserChangedHandler(newValue) {
|
|
5855
|
+
debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);
|
|
5856
|
+
if (newValue?.provider) {
|
|
5857
|
+
this.userProviderState = newValue?.provider;
|
|
5858
|
+
this.setLocationOptionsForProvider(this.userProviderState);
|
|
5859
|
+
}
|
|
5860
|
+
}
|
|
5861
|
+
conferenceProvidersChanged(newValue) {
|
|
5862
|
+
if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {
|
|
5863
|
+
this.locationOptions.push({ value: 'zoom', label: labels['zoom'], labelHTML: this.getLabelHTML('zoom') });
|
|
5864
|
+
}
|
|
5865
|
+
}
|
|
5846
5866
|
connectedCallback() {
|
|
5847
5867
|
debug('nylas-event-location', 'connectedCallback');
|
|
5848
5868
|
}
|
|
@@ -5859,15 +5879,8 @@ const NylasEventLocation = class {
|
|
|
5859
5879
|
this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');
|
|
5860
5880
|
}
|
|
5861
5881
|
this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
this.locationOptions.push({ value: 'google', label: labels['google'], labelHTML: this.getLabelHTML('google') });
|
|
5865
|
-
break;
|
|
5866
|
-
case 'microsoft':
|
|
5867
|
-
this.locationOptions.push({ value: 'microsoft', label: labels['microsoft'], labelHTML: this.getLabelHTML('microsoft') });
|
|
5868
|
-
break;
|
|
5869
|
-
}
|
|
5870
|
-
if (this.conferenceProviders?.['zoom']) {
|
|
5882
|
+
this.setLocationOptionsForProvider(this.userProviderState);
|
|
5883
|
+
if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {
|
|
5871
5884
|
this.locationOptions.push({ value: 'zoom', label: labels['zoom'], labelHTML: this.getLabelHTML('zoom') });
|
|
5872
5885
|
}
|
|
5873
5886
|
}
|
|
@@ -5934,6 +5947,20 @@ const NylasEventLocation = class {
|
|
|
5934
5947
|
break;
|
|
5935
5948
|
}
|
|
5936
5949
|
}
|
|
5950
|
+
setLocationOptionsForProvider(provider) {
|
|
5951
|
+
switch (provider) {
|
|
5952
|
+
case 'google':
|
|
5953
|
+
if (!this.locationOptions.some(option => option.value === 'google')) {
|
|
5954
|
+
this.locationOptions.push({ value: 'google', label: labels['google'], labelHTML: this.getLabelHTML('google') });
|
|
5955
|
+
}
|
|
5956
|
+
break;
|
|
5957
|
+
case 'microsoft':
|
|
5958
|
+
if (!this.locationOptions.some(option => option.value === 'microsoft')) {
|
|
5959
|
+
this.locationOptions.push({ value: 'microsoft', label: labels['microsoft'], labelHTML: this.getLabelHTML('microsoft') });
|
|
5960
|
+
}
|
|
5961
|
+
break;
|
|
5962
|
+
}
|
|
5963
|
+
}
|
|
5937
5964
|
setDefaultLocationOption(eventConferencing, eventLocation) {
|
|
5938
5965
|
if (eventConferencing != null && eventConferencing?.provider != null && eventConferencing?.autocreate != null) {
|
|
5939
5966
|
return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];
|
|
@@ -5984,13 +6011,15 @@ const NylasEventLocation = class {
|
|
|
5984
6011
|
}
|
|
5985
6012
|
render() {
|
|
5986
6013
|
const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;
|
|
5987
|
-
return (h(Host, { key: '
|
|
6014
|
+
return (h(Host, { key: 'c91ef22df2a83a3c2ac66ca9011ad8633a085b9e' }, h("div", { key: '9e6823ce704cf4870f99936a39371b255b165afb', class: "nylas-event-location", part: "nel" }, h("label", { key: '2d1a71a258d0576460acd68a93cbace4a5c9254c', htmlFor: "location" }, "Event meeting or location", h("span", { key: '9dd7df66eec4e35a8659c88d4f26be99093e815a', class: "label-icon" }, h("tooltip-component", { key: '9299313bad5724106fa7108d0874e760945bcb30' }, h("info-icon", { key: '2490fbc28caa2547d8a3cecc747dc94254c59df3', slot: "tooltip-icon" }), h("span", { key: 'd6c73fef100e4f962507d58b4ed24a1bd19599c2', slot: "tooltip-content" }, "Select a conferencing option or add a custom location.")))), h("div", { key: '726f78440a3e65e379368b0a849bee94b2839dfd', class: "location-input" }, defaultOption && defaultOption?.label && (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" }, h("span", { slot: "select-icon" }, this.getIcon(this.selectedLocationOption)))), this.selectedLocationOption === 'custom' && (h("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: e => this.handleChange(e) }))))));
|
|
5988
6015
|
}
|
|
5989
6016
|
static get formAssociated() { return true; }
|
|
5990
6017
|
get host() { return getElement(this); }
|
|
5991
6018
|
static get watchers() { return {
|
|
5992
6019
|
"name": ["elementNameChangedHandler"],
|
|
5993
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"]
|
|
6020
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
6021
|
+
"currentUser": ["currentUserChangedHandler"],
|
|
6022
|
+
"conferenceProviders": ["conferenceProvidersChanged"]
|
|
5994
6023
|
}; }
|
|
5995
6024
|
};
|
|
5996
6025
|
__decorate$d([
|
|
@@ -7250,12 +7279,13 @@ const NylasPageStyling = class {
|
|
|
7250
7279
|
this.isOpen = !this.isOpen;
|
|
7251
7280
|
}
|
|
7252
7281
|
render() {
|
|
7253
|
-
return (h(Host, { key: '
|
|
7282
|
+
return (h(Host, { key: 'c2ffa8ae940e9594f254903d45abc3f7c01d7d41' }, h("div", { key: '1813654e2aaa9c66d5a535186f227968b434654c', part: "nps", class: { 'nylas-page-styling': true, 'no-border': !this.customInputsSlot } }, this.customInputsSlot ? (h("div", { class: "header", part: "nps__header" }, h("div", null, h("h3", null, "Page styling and customization")), h("div", { class: "drawer-toggle", part: "nps__drawer-toggle--container" }, h("span", { class: `chevron ${this.isOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, h("chevron-icon", { width: "24", height: "24" }))))) : null, h("div", { key: 'cff4891eeb1a958feb2a6b20623b97f908721c60', id: "nylas-page-styling__body", class: "nylas-page-styling__body", part: "nps__body" }, h("div", { key: '16b2398f10b6d7703d02bbbf5c43e3e229499b2d', class: { 'nylas-page-styling__section': true, 'no-padding': !this.customInputsSlot } }, h("div", { key: 'fd09434076ea4626ee9d7b2710ec8418325aa117', class: "nylas-page-styling__row" }, h("div", { key: '16a29cabadc4f1a4ba9f389fe232ea22125cfe36', class: { subsection: true, hide: !this.isOpen } })))))));
|
|
7254
7283
|
}
|
|
7255
7284
|
static get formAssociated() { return true; }
|
|
7256
7285
|
get host() { return getElement(this); }
|
|
7257
7286
|
static get watchers() { return {
|
|
7258
|
-
"name": ["elementNameChangedHandler"]
|
|
7287
|
+
"name": ["elementNameChangedHandler"],
|
|
7288
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"]
|
|
7259
7289
|
}; }
|
|
7260
7290
|
};
|
|
7261
7291
|
__decorate$6([
|
|
@@ -7599,8 +7629,9 @@ const NylasParticipantsCustomAvailability = class {
|
|
|
7599
7629
|
return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
|
|
7600
7630
|
}
|
|
7601
7631
|
render() {
|
|
7602
|
-
return (h(Host, { key: '
|
|
7632
|
+
return (h(Host, { key: '64198b8231e1739484f81d02167d7b5f456eda69' }, h("div", { key: '68eb8279c510ef937e19dec06960867c98a5b02a', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '9622d8a7fbc124723cb7135a3a3846fad0e4e458', class: "header", part: "npca__header" }, h("h3", { key: '6424eeeb937ce2225a63d76482ec633efacd9e7a' }, "Participant open hours"), h("p", { key: 'ac021fef4d4b0de03d5e2ca335563ec4f328156c' }, "If not set, the default open hours will be used to calculate availability for this participant.")), h("div", { key: 'e9412e214011b575954196e39ea265dcf86801ec', class: "content", part: "npca__content" }, h("form", { key: 'ab5b4239f2d2b31fcd69d0f2e2d61a8a13003739', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
|
|
7603
7633
|
const participant = this.selectedParticipants[key];
|
|
7634
|
+
const participantOpenHours = participant.availability?.open_hours || [];
|
|
7604
7635
|
if (!participant || !participant.name || !participant.availability)
|
|
7605
7636
|
return;
|
|
7606
7637
|
return (h("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${index}` }, h("div", { class: "participant-title", part: "npca__participant-title" }, h("p", null, participant.name, "'s open hours"), h("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, 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 }), h("span", { class: `chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`, onClick: () => {
|
|
@@ -7608,7 +7639,7 @@ const NylasParticipantsCustomAvailability = class {
|
|
|
7608
7639
|
return;
|
|
7609
7640
|
this.selectedParticipants[key].isOpen = !participant.isOpen;
|
|
7610
7641
|
this.selectedParticipants = { ...this.selectedParticipants };
|
|
7611
|
-
} }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours:
|
|
7642
|
+
} }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participantOpenHours, defaultTimezone: participant.timezone, hideHeader: true }))));
|
|
7612
7643
|
}))))));
|
|
7613
7644
|
}
|
|
7614
7645
|
static get formAssociated() { return true; }
|