@nylas/web-elements 0.0.0-canary-20241017103834 → 0.0.0-canary-20241017220933

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.
Files changed (39) hide show
  1. package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +7 -7
  2. package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +4558 -4547
  3. package/dist/cdn/nylas-event-title/nylas-event-title.es.js +6 -3
  4. package/dist/cdn/nylas-reminder-emails/nylas-reminder-emails.es.js +2289 -2281
  5. package/dist/cdn/nylas-reminder-time/nylas-reminder-time.es.js +2253 -2245
  6. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +103 -92
  7. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js +41 -43
  8. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  11. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +9 -9
  12. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  13. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +9 -6
  14. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  15. package/dist/collection/components/scheduler-editor/nylas-event-title/test/nylas-event-title.spec.js +24 -0
  16. package/dist/collection/components/scheduler-editor/nylas-event-title/test/nylas-event-title.spec.js.map +1 -1
  17. package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +23 -30
  18. package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js.map +1 -1
  19. package/dist/collection/components/scheduler-editor/nylas-reminder-time/test/nylas-reminder-time.spec.js +37 -0
  20. package/dist/collection/components/scheduler-editor/nylas-reminder-time/test/nylas-reminder-time.spec.js.map +1 -0
  21. package/dist/components/nylas-additional-participants2.js +9 -9
  22. package/dist/components/nylas-additional-participants2.js.map +1 -1
  23. package/dist/components/nylas-event-title2.js +9 -6
  24. package/dist/components/nylas-event-title2.js.map +1 -1
  25. package/dist/components/nylas-reminder-time2.js +23 -29
  26. package/dist/components/nylas-reminder-time2.js.map +1 -1
  27. package/dist/esm/calendar-agenda-fill-icon_54.entry.js +41 -43
  28. package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -1
  29. package/dist/esm/loader.js +1 -1
  30. package/dist/esm/nylas-web-elements.js +1 -1
  31. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  32. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  33. package/dist/nylas-web-elements/{p-df131a08.entry.js → p-d586ff14.entry.js} +3 -3
  34. package/dist/nylas-web-elements/p-d586ff14.entry.js.map +1 -0
  35. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +1 -1
  36. package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +1 -0
  37. package/dist/types/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.d.ts +1 -1
  38. package/package.json +1 -1
  39. package/dist/nylas-web-elements/p-df131a08.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"nylas-reminder-time2.js","mappings":";;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,g2DAAg2D,CAAC;AAC93D,gCAAe,oBAAoB;;;;;;;;;;;;;;;;ACMnC,SAAS,mBAAmB,CAAC,aAAiC;IAC5D,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAC9B,IAAI,aAAa,IAAI,EAAE,GAAG,EAAE;QAAE,OAAO,aAAa,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,IAAI,aAAa,IAAI,EAAE,IAAI,aAAa,KAAK,EAAE;QAAE,OAAO,aAAa,GAAG,EAAE,CAAC;IAC3E,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAS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AC,IAAI,mBAAmB,CAAC,CAAC,CAAC,GACrH,EACF,wEACE,IAAI,EAAE,oBAAoB,EAC1B,OAAO,EAAE,mBAAmB,EAC5B,eAAe,EAAE,IAAI,CAAC,YAAY,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,EACjD,WAAW,EAAC,kHAAkH,EAC9H,qBAAqB,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,qBAAqB,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,EACrH,UAAU,EAAE,KAAK,GACjB,CACE,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;AA9BD;IALC,iBAAiB,CAAuG;QACvH,IAAI,EAAE,qBAAqB;QAC3B,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;+CA+BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.scss?tag=nylas-reminder-time&encapsulation=shadow","src/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-reminder-time {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n /* 21px */\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\n.nylas-reminder-time__wrapper {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n width: 48px;\n }\n\n input-dropdown::part(id_dropdown-input) {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 14px 16px;\n width: 50px;\n }\n\n input-dropdown::part(id_dropdown-content) {\n width: 100%;\n min-width: unset;\n height: 160px;\n }\n\n select-dropdown {\n width: 120px;\n\n @media #{$mobile} {\n width: 100%;\n }\n }\n\n select-dropdown::part(sd_dropdown-button) {\n border: 1px solid var(--nylas-base-200);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { REMINDER_MINUTE_OPTIONS, REMINDER_HOUR_OPTIONS, REMINDER_DAY_OPTIONS } from '@/common/constants';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, Listen, State, h, Element, Prop, Watch, Event, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\nfunction getInitialTimeValue(timeInMinutes: number | undefined) {\n if (!timeInMinutes) return 30;\n if (timeInMinutes >= 60 * 24) return timeInMinutes / (60 * 24);\n if (timeInMinutes >= 90 || timeInMinutes === 60) return timeInMinutes / 60;\n return timeInMinutes;\n}\n\nfunction getInitialTimeIncrement(timeInMinutes: number | undefined) {\n if (!timeInMinutes) return 30;\n if (timeInMinutes >= 60 * 24) return 60 * 24;\n if (timeInMinutes >= 90 || timeInMinutes === 60) return 60;\n return 1;\n}\n\n/**\n * The `nylas-reminder-time` component is a form input for the reminder time before an event.\n *\n * @part nrt - The event reminder container\n * @part nrt - The dropdown container for the reminder time increment\n * @part nrt__dropdown-button - The dropdown button for the reminder time increment\n * @part nrt__dropdown-content - The dropdown content for the reminder time increment\n * @part nrt__input_dropdown - The input dropdown container for the reminder time minutes\n * @part nrt__input_dropdown-input - The input for the reminder time minutes\n * @part nrt__input_dropdown-content - The dropdown content for the input reminder time minutes\n */\n@Component({\n tag: 'nylas-reminder-time',\n styleUrl: 'nylas-reminder-time.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasReminderTime {\n /**\n * The host element <nylas-reminder-time>\n */\n @Element() host!: HTMLElement;\n /**\n * The name of the reminder time. Default is 'reminder time'.\n */\n @Prop() name: string = 'reminder-time';\n /**\n * The event reminder time in minutes as set in the configuration.\n */\n @Prop() eventReminderTimeMinutes?: number;\n /**\n * The selected event reminder time state. This defaults to the reminder time from the configuration or 30 minutes.\n */\n @State() reminderTime: number = getInitialTimeValue(this.eventReminderTimeMinutes);\n /**\n * The reminder time in minutes. This defaults to the reminder time from the configuration or 30 minutes.\n */\n @State() reminderTimeMinutes: number = this.eventReminderTimeMinutes ?? 30;\n /**\n * The reminder time increment. This defaults to minute(s).\n */\n @State() reminderTimeincrement: number = getInitialTimeIncrement(this.eventReminderTimeMinutes);\n /**\n * The reminderTimeMinutesOptions for the dropdown.\n */\n @State() reminderTimeMinutesOptions = REMINDER_MINUTE_OPTIONS;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-reminder-time', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('eventReminderTimeMinutes')\n eventReminderTimeMinutesChangedHandler(newValue: number, oldValue: number) {\n debug('nylas-reminder-time', 'eventReminderTimeMinutesChangedHandler', newValue);\n if (newValue === oldValue) {\n return;\n }\n this.reminderTime = getInitialTimeValue(newValue);\n this.reminderTimeincrement = getInitialTimeIncrement(newValue);\n this.reminderTimeMinutes = newValue;\n }\n\n @Watch('reminderTimeMinutes')\n reminderTimeMinutesChangedHandler(newValue: number, oldValue: number) {\n debug('nylas-reminder-time', 'reminderTimeMinutesChangedHandler', newValue);\n if (newValue === oldValue) {\n return;\n }\n this.valueChanged.emit({ value: newValue.toString(), name: this.name });\n }\n\n /**\n * Event emitted when the event reminder time changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-reminder-time', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-reminder-time', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.setReminderTimeMinuteOptions();\n }\n\n componentDidLoad() {\n debug('nylas-reminder-time', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('nylas-reminder-time', 'disconnectedCallback');\n }\n\n setReminderTimeMinuteOptions() {\n if (this.reminderTimeincrement === 1) {\n this.reminderTimeMinutesOptions = REMINDER_MINUTE_OPTIONS;\n } else if (this.reminderTimeincrement === 60) {\n this.reminderTimeMinutesOptions = REMINDER_HOUR_OPTIONS;\n } else this.reminderTimeMinutesOptions = REMINDER_DAY_OPTIONS;\n return this.reminderTimeMinutesOptions;\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-calendar-picker', 'nylasFormDropdownChangedHandler', event.detail);\n const { value } = event.detail;\n this.reminderTimeincrement = parseInt(value);\n\n if (this.reminderTimeincrement === 1) {\n this.reminderTime = 60;\n } else {\n this.reminderTime = 1;\n }\n\n this.setReminderTimeMinuteOptions();\n this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement;\n this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);\n }\n\n @Listen('inputOptionChanged')\n inputOptionChangedHandler(event: CustomEvent<{ value: number; name: string }>) {\n debug('nylas-calendar-picker', 'inputOptionChangedHandler', event.detail);\n const { value } = event.detail;\n this.reminderTime = value;\n this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement;\n this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);\n }\n\n @RegisterComponent<NylasReminderTime, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-reminder-time',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const reminderTimeOptions = [\n { value: 1, label: 'minute' },\n { value: 60, label: 'hour' },\n { value: 60 * 24, label: 'day' },\n ];\n\n return (\n <Host>\n <div class=\"nylas-reminder-time\" part=\"nrt\">\n <div class=\"nylas-reminder-time__wrapper\">\n <input-dropdown\n name={'reminder-time'}\n options={this.reminderTimeMinutesOptions}\n inputValue={this.reminderTime.toString()}\n exportparts=\"id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content\"\n defaultInputOption={this.reminderTimeMinutesOptions.find(i => i.value == this.reminderTime) ?? reminderTimeOptions[0]}\n />\n <select-dropdown\n name={'reminder-time-unit'}\n options={reminderTimeOptions}\n pluralizedLabel={this.reminderTime > 1 ? 's' : ''}\n exportparts=\"sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content\"\n defaultSelectedOption={reminderTimeOptions.find(i => i.value == this.reminderTimeincrement) ?? reminderTimeOptions[0]}\n withSearch={false}\n />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-reminder-time2.js","mappings":";;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,g2DAAg2D,CAAC;AAC93D,gCAAe,oBAAoB;;;;;;;;;;;;;;;;ACMnC,MAAM,mBAAmB,GAAG;IAC1B,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;IAChC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IAC5B,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;CAC9B,CAAC;AAEF,SAAS,mBAAmB,CAAC,aAAiC;IAC5D,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAG9B,KAAK,MAAM,MAAM,IAAI,mBAAmB,EAAE;QACxC,IAAI,aAAa,GAAG,MAAM,CAAC,KAAK,K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AAE,EACjD,WAAW,EAAC,kHAAkH,EAC9H,qBAAqB,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,qBAAqB,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,EACrH,UAAU,EAAE,KAAK,GACjB,CACE,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;AAxBD;IALC,iBAAiB,CAAuG;QACvH,IAAI,EAAE,qBAAqB;QAC3B,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;+CAyBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.scss?tag=nylas-reminder-time&encapsulation=shadow","src/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-reminder-time {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n /* 21px */\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\n.nylas-reminder-time__wrapper {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n width: 48px;\n }\n\n input-dropdown::part(id_dropdown-input) {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 14px 16px;\n width: 50px;\n }\n\n input-dropdown::part(id_dropdown-content) {\n width: 100%;\n min-width: unset;\n height: 160px;\n }\n\n select-dropdown {\n width: 120px;\n\n @media #{$mobile} {\n width: 100%;\n }\n }\n\n select-dropdown::part(sd_dropdown-button) {\n border: 1px solid var(--nylas-base-200);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { REMINDER_MINUTE_OPTIONS, REMINDER_HOUR_OPTIONS, REMINDER_DAY_OPTIONS } from '@/common/constants';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, Listen, State, h, Element, Prop, Watch, Event, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\nconst reminderTimeOptions = [\n { value: 60 * 24, label: 'day' },\n { value: 60, label: 'hour' },\n { value: 1, label: 'minute' },\n];\n\nfunction getInitialTimeValue(timeInMinutes: number | undefined) {\n if (!timeInMinutes) return 30; // Default to 30 minutes if undefined\n\n // Loop through the reminderTimeOptions to find the appropriate division\n for (const option of reminderTimeOptions) {\n if (timeInMinutes % option.value === 0) {\n return timeInMinutes / option.value; // Return the divided value\n }\n }\n\n // If no exact division is found, return the time in minutes\n return timeInMinutes;\n}\n\nfunction getInitialTimeIncrement(timeInMinutes: number | undefined) {\n if (!timeInMinutes) return 1; // Default to minutes if undefined\n\n // Loop through the reminderTimeOptions and check divisibility\n for (const option of reminderTimeOptions) {\n if (timeInMinutes % option.value === 0) {\n return option.value;\n }\n }\n\n // If no suitable option is found, default to minutes\n return 1;\n}\n\n/**\n * The `nylas-reminder-time` component is a form input for the reminder time before an event.\n *\n * @part nrt - The event reminder container\n * @part nrt - The dropdown container for the reminder time increment\n * @part nrt__dropdown-button - The dropdown button for the reminder time increment\n * @part nrt__dropdown-content - The dropdown content for the reminder time increment\n * @part nrt__input_dropdown - The input dropdown container for the reminder time minutes\n * @part nrt__input_dropdown-input - The input for the reminder time minutes\n * @part nrt__input_dropdown-content - The dropdown content for the input reminder time minutes\n */\n@Component({\n tag: 'nylas-reminder-time',\n styleUrl: 'nylas-reminder-time.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasReminderTime {\n /**\n * The host element <nylas-reminder-time>\n */\n @Element() host!: HTMLElement;\n /**\n * The name of the reminder time. Default is 'reminder time'.\n */\n @Prop() name: string = 'reminder-time';\n /**\n * The event reminder time in minutes as set in the configuration.\n */\n @Prop() eventReminderTimeMinutes?: number;\n /**\n * The selected event reminder time state. This defaults to the reminder time from the configuration or 30 minutes.\n */\n @State() reminderTime: number = getInitialTimeValue(this.eventReminderTimeMinutes);\n /**\n * The reminder time in minutes. This defaults to the reminder time from the configuration or 30 minutes.\n */\n @State() reminderTimeMinutes: number = this.eventReminderTimeMinutes ?? 30;\n /**\n * The reminder time increment. This defaults to minute(s).\n */\n @State() reminderTimeincrement: number = getInitialTimeIncrement(this.eventReminderTimeMinutes);\n /**\n * The reminderTimeMinutesOptions for the dropdown.\n */\n @State() reminderTimeMinutesOptions = REMINDER_MINUTE_OPTIONS;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-reminder-time', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('reminderTimeMinutes')\n reminderTimeMinutesChangedHandler(newValue: number, oldValue: number) {\n debug('nylas-reminder-time', 'reminderTimeMinutesChangedHandler', newValue);\n if (newValue === oldValue) {\n return;\n }\n this.valueChanged.emit({ value: newValue.toString(), name: this.name });\n }\n\n /**\n * Event emitted when the event reminder time changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-reminder-time', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-reminder-time', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-reminder-time', 'componentDidLoad');\n this.setReminderTimeMinuteOptions();\n }\n\n disconnectedCallback() {\n debug('nylas-reminder-time', 'disconnectedCallback');\n }\n\n /**\n * The unit tests in stencil does not support the internals API.\n * This method checks if the internals API is available.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function';\n }\n\n setReminderTimeMinuteOptions() {\n if (this.reminderTimeincrement === 1) {\n this.reminderTimeMinutesOptions = REMINDER_MINUTE_OPTIONS;\n } else if (this.reminderTimeincrement === 60) {\n this.reminderTimeMinutesOptions = REMINDER_HOUR_OPTIONS;\n } else this.reminderTimeMinutesOptions = REMINDER_DAY_OPTIONS;\n return this.reminderTimeMinutesOptions;\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-calendar-picker', 'nylasFormDropdownChangedHandler', event.detail);\n const { value } = event.detail;\n this.reminderTimeincrement = parseInt(value);\n\n if (this.reminderTimeincrement === 1) {\n this.reminderTime = 60;\n } else {\n this.reminderTime = 1;\n }\n\n this.setReminderTimeMinuteOptions();\n this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement;\n this.isInternalsAvailable && this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);\n }\n\n @Listen('inputOptionChanged')\n inputOptionChangedHandler(event: CustomEvent<{ value: number; name: string }>) {\n debug('nylas-calendar-picker', 'inputOptionChangedHandler', event.detail);\n const { value } = event.detail;\n this.reminderTime = value;\n this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement;\n this.isInternalsAvailable && this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);\n }\n\n @RegisterComponent<NylasReminderTime, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-reminder-time',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-reminder-time\" part=\"nrt\">\n <div class=\"nylas-reminder-time__wrapper\">\n <input-dropdown\n name={'reminder-time'}\n options={this.reminderTimeMinutesOptions}\n inputValue={this.reminderTime.toString()}\n exportparts=\"id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content\"\n defaultInputOption={this.reminderTimeMinutesOptions.find(i => i.value == this.reminderTime) ?? reminderTimeOptions[0]}\n />\n <select-dropdown\n name={'reminder-time-unit'}\n options={[...reminderTimeOptions].sort((a, b) => a.value - b.value)}\n pluralizedLabel={this.reminderTime > 1 ? 's' : ''}\n exportparts=\"sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content\"\n defaultSelectedOption={reminderTimeOptions.find(i => i.value == this.reminderTimeincrement) ?? reminderTimeOptions[0]}\n withSearch={false}\n />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -421,7 +421,7 @@ const NylasAdditionalParticipants = class {
421
421
  disconnectedCallback() {
422
422
  debug('nylas-additional-participants', 'disconnectedCallback');
423
423
  }
424
- isInternalsAvailable() {
424
+ get isInternalsAvailable() {
425
425
  return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
426
426
  }
427
427
  onInputOptionChanged(event) {
@@ -430,14 +430,14 @@ const NylasAdditionalParticipants = class {
430
430
  const index = event.detail.name;
431
431
  const participant = this.participantOptions?.find(participant => participant.email === event.detail.value);
432
432
  if (!participant && this.isRoundRobinConfig) {
433
- this.isInternalsAvailable() && this.internals.setValidity({ customError: true }, 'For round robin configuration, participant should be selected from the dropdown.');
433
+ this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'For round robin configuration, participant should be selected from the dropdown.');
434
434
  this.participantErrors[index] = 'For round robin page, participant should be selected from the dropdown.';
435
435
  this.participants[index].is_valid = false;
436
436
  this.participants = [...this.participants];
437
437
  return;
438
438
  }
439
439
  else if (!participant && !EMAIL_REGEX.test(event.detail.value)) {
440
- this.isInternalsAvailable() && this.internals.setValidity({ customError: true }, 'Please enter a valid email address');
440
+ this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'Please enter a valid email address');
441
441
  this.participantErrors[index] = 'Please enter a valid email address';
442
442
  this.participants[index].is_valid = false;
443
443
  this.participants = [...this.participants];
@@ -446,7 +446,7 @@ const NylasAdditionalParticipants = class {
446
446
  else {
447
447
  this.participantErrors[index] = '';
448
448
  this.participants[index].is_valid = true;
449
- this.isInternalsAvailable() && this.internals.setValidity({});
449
+ this.isInternalsAvailable && this.internals.setValidity({});
450
450
  }
451
451
  this.participants[index].email = event.detail.value;
452
452
  this.participants[index].availability = participant ? { calendar_ids: ['primary'] } : undefined;
@@ -489,13 +489,13 @@ const NylasAdditionalParticipants = class {
489
489
  debug('nylas-additional-participants', 'updateFormValue');
490
490
  const participants = this.isRoundRobinConfig ? (this.includeOrganizerAsParticipant ? this.participants : this.participants.filter(p => !p.is_organizer)) : this.participants;
491
491
  if (participants.length === 0) {
492
- this.isInternalsAvailable() && this.internals.setValidity({ customError: true }, 'Please add at least one participant');
492
+ this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'Please add at least one participant');
493
493
  this.error = 'Please add at least one participant';
494
494
  }
495
495
  else {
496
- this.isInternalsAvailable() && this.internals.setValidity({});
496
+ this.isInternalsAvailable && this.internals.setValidity({});
497
497
  this.error = '';
498
- this.isInternalsAvailable() && this.internals.setFormValue(JSON.stringify(participants), this.name);
498
+ this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participants), this.name);
499
499
  this.valueChanged.emit({ value: JSON.stringify(participants), name: this.name });
500
500
  }
501
501
  }
@@ -506,7 +506,7 @@ const NylasAdditionalParticipants = class {
506
506
  });
507
507
  }
508
508
  render() {
509
- return (h(Host, { key: 'b17facebc66435c9e405b442500163b47836914e', part: "nap" }, h("nylas-form-card", { key: 'bce92f93c9f0ec0c04c000582505ea1adb1a3e22' }, h("h3", { key: '07cd5fd66a38dadfd67f67607fe81fb235cbb1f3', slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Participants"), h("p", { key: '3e9f5348444a81731228d4ce5f355b3cd6ead03f', slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add people in your team or organization to join the event."), h("div", { key: 'b6921a32886aaedbf9ecaa942912c2991881b380', slot: "content", class: "nylas-additional-participants__content" }, h("div", { key: '780531379643ee4764122906f144d302e0bc32e5' }, this.participants.map((participant, index) => {
509
+ return (h(Host, { key: '16a28d7d8ee91b685a22472d8a90721a5074d798', part: "nap" }, h("nylas-form-card", { key: '9fde59eadfcdf05c3b4add30a5c35f9b21d00c30' }, h("h3", { key: '82e3c3ad537ef4c60d19695f11e481bac2ed31ae', slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Participants"), 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."), h("div", { key: '3ccb34354c025b52760433683812acf37b480e77', slot: "content", class: "nylas-additional-participants__content" }, h("div", { key: '007cf8396921637cf230cc26d73de147169cd250' }, this.participants.map((participant, index) => {
510
510
  return (h("div", { class: 'nylas-additional-participants__input_group', part: "nap__input_group" }, !participant.is_organizer && h("label", null, `Participant ${index}`), h("div", { part: "nap__input_wrapper", class: {
511
511
  'nylas-additional-participants__input_wrapper': true,
512
512
  'nylas-additional-participants__input_wrapper_organizer': participant?.is_organizer === true,
@@ -516,7 +516,7 @@ const NylasAdditionalParticipants = class {
516
516
  this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant;
517
517
  this.updateFormValue();
518
518
  }, checked: this.includeOrganizerAsParticipant }), h("label", { htmlFor: `organizer_participant`, "aria-label": "Include as participant" }, "Participant", h("tooltip-component", { id: "organizer_participant_tooltip" }, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, h("strong", null, "Include Organizer:"), " The organizer (you) will be included in the round-robin rotation. ", h("br", null), h("strong", null, "Exclude Organizer:"), " The organizer (you) will not be included in the round-robin rotation."))))))) : (h("input-dropdown", { id: `${index}`, name: `${index}`, filterable: true, inputValue: participant.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) })), !participant.is_organizer && (h("button", { onClick: () => this.removeParticipant(index), part: "nap__remove-participant" }, h("close-icon", null))))), !participant.is_valid && (h("p", { class: "nylas-additional-participants__error", part: "nap__error" }, this.participantErrors[index]))));
519
- }), h("p", { key: '9921cf9eb77303da37e64bb4b2555fe662bcb299', class: "nylas-additional-participants__error", part: "nap__error" }, this.error)), h("button", { key: '0fdc9f4d4ee5b221aaaa01de39e0fe5ad29675f1', class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, h("add-circle-icon", { key: 'c1c405144661b246731d48907246b3bc9e252410' }), " ", h("span", { key: '2ccd09a3a9c148dd4e895f7c3b2ac52cce86b76b' }, "Add ", this.participants.length > 1 ? 'another' : 'a', " participant"))))));
519
+ }), h("p", { key: 'f1dd954c137093fa9e474f3886e4b5320aeb5e2e', class: "nylas-additional-participants__error", part: "nap__error" }, this.error)), h("button", { key: '859585010fc9fce314b856f5e7e07ac8b8c47b88', class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, h("add-circle-icon", { key: 'aec7eb5de30e66bca29b73962f356109471c2e9e' }), " ", h("span", { key: 'f07ecfaa4db46f7954d734314c46f2d773158730' }, "Add ", this.participants.length > 1 ? 'another' : 'a', " participant"))))));
520
520
  }
521
521
  static get formAssociated() { return true; }
522
522
  get host() { return getElement(this); }
@@ -6943,17 +6943,20 @@ const NylasEventTitle = class {
6943
6943
  this.ariaActivedescendant = this.filteredTokens[0].label;
6944
6944
  }
6945
6945
  }
6946
+ get isInternalsAvailable() {
6947
+ return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';
6948
+ }
6946
6949
  updateEventTitle(text) {
6947
6950
  const value = text.replace(/ +/g, ' ');
6948
- if (value === '') {
6949
- this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);
6951
+ if (value === '' || /^[\s]*$/.test(value)) {
6950
6952
  this.validationError = 'Event title is required';
6953
+ this.isInternalsAvailable && this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);
6951
6954
  }
6952
6955
  else {
6953
- this.internals?.setValidity({ customError: false });
6954
6956
  this.validationError = '';
6957
+ this.isInternalsAvailable && this.internals?.setValidity({ customError: false });
6955
6958
  }
6956
- this.internals?.setFormValue(value, this.name);
6959
+ this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);
6957
6960
  this.valueChanged.emit({ value: value, name: this.name });
6958
6961
  }
6959
6962
  resetDropdown() {
@@ -6964,10 +6967,10 @@ const NylasEventTitle = class {
6964
6967
  return (h("div", { class: "token-label" }, h("span", { class: "token" }, token.token), h("span", { class: "description" }, token.description)));
6965
6968
  }
6966
6969
  render() {
6967
- return (h(Host, { key: '3a6858cea6ad427bb8f7046e4d409c44d9d57467' }, h("div", { key: '26574b9f7c76628771e584d1c3943b2ce9b77ce0', class: "nylas-event-title", part: "net" }, h("label", { key: 'b6bab982d9b8a091ee1c9a66b5d24b3050e08817', htmlFor: "title" }, "Event title", h("span", { key: '34b1ba7719d37f6af0d3c84e3fe1c251625848b1', class: "required" }, "*")), h("div", { key: '0fcbdee8625b13720b31df47ddb76bdba6f384c6', class: {
6970
+ return (h(Host, { key: 'c9bef753b69793b6db0569ec750a04ceb4a51de8' }, h("div", { key: 'b80559c8ebe73437fbd347a034fa577c0ee4a60b', class: "nylas-event-title", part: "net" }, h("label", { key: 'c8b911bdfd24a7934b8359d5ba9a2531edc606c1', htmlFor: "title" }, "Event title", h("span", { key: '953b07bae8f6ebbcc465cc3349b6b97ecf8cd544', class: "required" }, "*")), h("div", { key: 'cbc5559de86b4c3a45c30088fba3d2a3382b4311', class: {
6968
6971
  title: true,
6969
6972
  error: this.validationError !== '',
6970
- }, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (h("div", { class: "token-options", part: "net__dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), h("span", { key: '8c267fb019bc2f4a7ec9bd771c7ebdbd4e36860e', class: "help-text" }, "Create a dynamic templated event title by typing ", h("code", { key: '73fff78bf0ef47b1a4880b88630285c5565348e7' }, "$"), " and selecting a template item.", h("span", { key: '64c431fb78eef320cdca1e426e4290f1663fe756', class: "label-icon" }, h("tooltip-component", { key: 'b8f4ce46c4f53f66d50b6121dbc76360972638f9' }, h("info-icon", { key: '038824ecf2006ce2851de30c1538c30d96707ca9', slot: "tooltip-icon" }), h("span", { key: '0fefb16b80e9c43a7f46e1d5f72d12ca39cdc348', slot: "tooltip-content" }, "For example, Interview with ", h("code", { key: 'df208a8bb8907416908a6cdbc0edba219e924513' }, '${invitee}'))))), this.validationError != '' && h("span", { class: "error-message" }, this.validationError))));
6973
+ }, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (h("div", { class: "token-options", part: "net__dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), h("span", { key: 'cddf49a23d611b00b5a06a431bb6033ee564fba6', class: "help-text" }, "Create a dynamic templated event title by typing ", h("code", { key: 'b87cf9d630645aedf2c72bb7356ce8737406c127' }, "$"), " and selecting a template item.", h("span", { key: '75ad5946a822c3ee23ddb46f29b611dd68875d05', class: "label-icon" }, h("tooltip-component", { key: '20a6fb4aaac4d1ad5264d30364fc695de7f0ca11' }, h("info-icon", { key: '22413e474fd5113bfa3663d137a67cd2da94268f', slot: "tooltip-icon" }), h("span", { key: 'f266824868c09cf41564fe1fcbc42e9113bf06fb', slot: "tooltip-content" }, "For example, Interview with ", h("code", { key: '0989a865eb48e0a0363ec69218be46ab7d6f18f1' }, '${invitee}'))))), this.validationError != '' && h("span", { class: "error-message" }, this.validationError))));
6971
6974
  }
6972
6975
  static get formAssociated() { return true; }
6973
6976
  get host() { return getElement(this); }
@@ -8450,22 +8453,29 @@ var __metadata$2 = (undefined && undefined.__metadata) || function (k, v) {
8450
8453
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
8451
8454
  return Reflect.metadata(k, v);
8452
8455
  };
8456
+ const reminderTimeOptions = [
8457
+ { value: 60 * 24, label: 'day' },
8458
+ { value: 60, label: 'hour' },
8459
+ { value: 1, label: 'minute' },
8460
+ ];
8453
8461
  function getInitialTimeValue(timeInMinutes) {
8454
8462
  if (!timeInMinutes)
8455
8463
  return 30;
8456
- if (timeInMinutes >= 60 * 24)
8457
- return timeInMinutes / (60 * 24);
8458
- if (timeInMinutes >= 90 || timeInMinutes === 60)
8459
- return timeInMinutes / 60;
8464
+ for (const option of reminderTimeOptions) {
8465
+ if (timeInMinutes % option.value === 0) {
8466
+ return timeInMinutes / option.value;
8467
+ }
8468
+ }
8460
8469
  return timeInMinutes;
8461
8470
  }
8462
8471
  function getInitialTimeIncrement(timeInMinutes) {
8463
8472
  if (!timeInMinutes)
8464
- return 30;
8465
- if (timeInMinutes >= 60 * 24)
8466
- return 60 * 24;
8467
- if (timeInMinutes >= 90 || timeInMinutes === 60)
8468
- return 60;
8473
+ return 1;
8474
+ for (const option of reminderTimeOptions) {
8475
+ if (timeInMinutes % option.value === 0) {
8476
+ return option.value;
8477
+ }
8478
+ }
8469
8479
  return 1;
8470
8480
  }
8471
8481
  const NylasReminderTime = class {
@@ -8490,15 +8500,6 @@ const NylasReminderTime = class {
8490
8500
  debug('nylas-reminder-time', 'elementNameChangedHandler', newValue);
8491
8501
  this.host.setAttribute('name', newValue);
8492
8502
  }
8493
- eventReminderTimeMinutesChangedHandler(newValue, oldValue) {
8494
- debug('nylas-reminder-time', 'eventReminderTimeMinutesChangedHandler', newValue);
8495
- if (newValue === oldValue) {
8496
- return;
8497
- }
8498
- this.reminderTime = getInitialTimeValue(newValue);
8499
- this.reminderTimeincrement = getInitialTimeIncrement(newValue);
8500
- this.reminderTimeMinutes = newValue;
8501
- }
8502
8503
  reminderTimeMinutesChangedHandler(newValue, oldValue) {
8503
8504
  debug('nylas-reminder-time', 'reminderTimeMinutesChangedHandler', newValue);
8504
8505
  if (newValue === oldValue) {
@@ -8512,14 +8513,17 @@ const NylasReminderTime = class {
8512
8513
  componentWillLoad() {
8513
8514
  debug('nylas-reminder-time', 'componentWillLoad');
8514
8515
  this.host.setAttribute('name', this.name);
8515
- this.setReminderTimeMinuteOptions();
8516
8516
  }
8517
8517
  componentDidLoad() {
8518
8518
  debug('nylas-reminder-time', 'componentDidLoad');
8519
+ this.setReminderTimeMinuteOptions();
8519
8520
  }
8520
8521
  disconnectedCallback() {
8521
8522
  debug('nylas-reminder-time', 'disconnectedCallback');
8522
8523
  }
8524
+ get isInternalsAvailable() {
8525
+ return this.internals !== undefined && typeof this.internals.setFormValue === 'function';
8526
+ }
8523
8527
  setReminderTimeMinuteOptions() {
8524
8528
  if (this.reminderTimeincrement === 1) {
8525
8529
  this.reminderTimeMinutesOptions = REMINDER_MINUTE_OPTIONS;
@@ -8543,28 +8547,22 @@ const NylasReminderTime = class {
8543
8547
  }
8544
8548
  this.setReminderTimeMinuteOptions();
8545
8549
  this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement;
8546
- this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
8550
+ this.isInternalsAvailable && this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
8547
8551
  }
8548
8552
  inputOptionChangedHandler(event) {
8549
8553
  debug('nylas-calendar-picker', 'inputOptionChangedHandler', event.detail);
8550
8554
  const { value } = event.detail;
8551
8555
  this.reminderTime = value;
8552
8556
  this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement;
8553
- this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
8557
+ this.isInternalsAvailable && this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
8554
8558
  }
8555
8559
  render() {
8556
- const reminderTimeOptions = [
8557
- { value: 1, label: 'minute' },
8558
- { value: 60, label: 'hour' },
8559
- { value: 60 * 24, label: 'day' },
8560
- ];
8561
- return (h(Host, { key: 'd5f118391bdd7e4779f6eca15335285047fdb350' }, h("div", { key: '2dd8d3ba52d4f95480c9cf1fdaf5d0f1f7c1e523', class: "nylas-reminder-time", part: "nrt" }, h("div", { key: '3799c4b266f4078e22ad78b86225ef9abdc5fa49', class: "nylas-reminder-time__wrapper" }, 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] }), 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 })))));
8560
+ return (h(Host, { key: 'b089eb10d76d001112d867a61889a685b8908355' }, h("div", { key: '13b8479fb822135c00ff8f97974c8269731b2a84', class: "nylas-reminder-time", part: "nrt" }, h("div", { key: '728e90c61077b1037aa285329f11a09a296b33b4', class: "nylas-reminder-time__wrapper" }, 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] }), 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 })))));
8562
8561
  }
8563
8562
  static get formAssociated() { return true; }
8564
8563
  get host() { return getElement(this); }
8565
8564
  static get watchers() { return {
8566
8565
  "name": ["elementNameChangedHandler"],
8567
- "eventReminderTimeMinutes": ["eventReminderTimeMinutesChangedHandler"],
8568
8566
  "reminderTimeMinutes": ["reminderTimeMinutesChangedHandler"]
8569
8567
  }; }
8570
8568
  };