@nylas/web-elements 1.4.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +179 -146
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4998 -4993
- package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js +4 -4
- package/dist/cjs/checkmark-icon_15.cjs.entry.js +4 -4
- package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
- package/dist/cjs/{constants-3b9fb535.js → constants-27331d2d.js} +1 -5
- package/dist/cjs/constants-27331d2d.js.map +1 -0
- package/dist/cjs/{customParseFormat-4dbd51f6.js → customParseFormat-22da9017.js} +2 -2
- package/dist/cjs/{customParseFormat-4dbd51f6.js.map → customParseFormat-22da9017.js.map} +1 -1
- package/dist/cjs/{feedbackSync-670798db.js → feedbackSync-adabe7d6.js} +2 -2
- package/dist/cjs/{feedbackSync-670798db.js.map → feedbackSync-adabe7d6.js.map} +1 -1
- package/dist/cjs/globe-icon_2.cjs.entry.js +3 -3
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +49 -25
- package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{index.es-cbc1ecb6.js → index.es-7848228a.js} +2 -2
- package/dist/cjs/{index.es-cbc1ecb6.js.map → index.es-7848228a.js.map} +1 -1
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/multi-select-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/{nylas-api-request-af6121b4.js → nylas-api-request-976db0f4.js} +2 -2
- package/dist/cjs/{nylas-api-request-af6121b4.js.map → nylas-api-request-976db0f4.js.map} +1 -1
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-calendar_3.cjs.entry.js +4 -4
- package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +22 -16
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +7 -7
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/{register-component-5e87c463.js → register-component-d2f37e40.js} +2 -2
- package/dist/cjs/{register-component-5e87c463.js.map → register-component-d2f37e40.js.map} +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/{utils-0dfca9ec.js → utils-d522ef01.js} +10 -1
- package/dist/cjs/utils-d522ef01.js.map +1 -0
- package/dist/collection/common/constants.js +0 -1
- package/dist/collection/common/constants.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js +6 -7
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +6 -3
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js +4 -5
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +0 -8
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +43 -10
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.js +52 -7
- package/dist/collection/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +1 -1
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/components/constants.js +1 -5
- package/dist/components/constants.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group2.js +8 -9
- package/dist/components/nylas-editor-tabs-group2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +2 -2
- package/dist/components/nylas-event-description2.js +1 -1
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +6 -3
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +22 -14
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +3 -3
- package/dist/components/nylas-select-event-type2.js +32 -8
- package/dist/components/nylas-select-event-type2.js.map +1 -1
- package/dist/components/nylas-timeslot-interval2.js +1 -1
- package/dist/components/utils.js +9 -0
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/calendar-agenda-fill-icon_36.entry.js +4 -4
- package/dist/esm/checkmark-icon_15.entry.js +4 -4
- package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
- package/dist/esm/{constants-3d8016e3.js → constants-f51538ef.js} +2 -6
- package/dist/esm/constants-f51538ef.js.map +1 -0
- package/dist/esm/{customParseFormat-129be926.js → customParseFormat-d1de5ed0.js} +2 -2
- package/dist/esm/{customParseFormat-129be926.js.map → customParseFormat-d1de5ed0.js.map} +1 -1
- package/dist/esm/{feedbackSync-d943ffc7.js → feedbackSync-172f942c.js} +2 -2
- package/dist/esm/{feedbackSync-d943ffc7.js.map → feedbackSync-172f942c.js.map} +1 -1
- package/dist/esm/globe-icon_2.entry.js +3 -3
- package/dist/esm/google-logo-icon_6.entry.js +49 -25
- package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
- package/dist/esm/{index.es-4615d47c.js → index.es-fc8588de.js} +2 -2
- package/dist/esm/{index.es-4615d47c.js.map → index.es-fc8588de.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-dropdown_2.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/multi-select-dropdown_2.entry.js +1 -1
- package/dist/esm/{nylas-api-request-acf12b47.js → nylas-api-request-3d7ced61.js} +2 -2
- package/dist/esm/{nylas-api-request-acf12b47.js.map → nylas-api-request-3d7ced61.js.map} +1 -1
- package/dist/esm/nylas-booked-event-card_12.entry.js +3 -3
- package/dist/esm/nylas-event-calendar_3.entry.js +4 -4
- package/dist/esm/nylas-form-card.entry.js +2 -2
- package/dist/esm/nylas-scheduler-editor.entry.js +22 -16
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +7 -7
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/{register-component-083eb961.js → register-component-62d792d4.js} +2 -2
- package/dist/esm/{register-component-083eb961.js.map → register-component-62d792d4.js.map} +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/{utils-6c05ecaf.js → utils-bb88dd4d.js} +10 -1
- package/dist/esm/utils-bb88dd4d.js.map +1 -0
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/{p-865721fd.entry.js → p-05204c68.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2b38054f.entry.js → p-0d422938.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c59787f4.js → p-0d6ecada.js} +2 -2
- package/dist/nylas-web-elements/{p-e2632a60.js → p-198f05a6.js} +2 -2
- package/dist/nylas-web-elements/p-1d8c55c6.entry.js +11 -0
- package/dist/nylas-web-elements/p-1d8c55c6.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-4e1e01e4.entry.js → p-29f601d9.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-60b48bf7.js → p-3a3c5e17.js} +2 -2
- package/dist/nylas-web-elements/{p-6bb6a0b8.entry.js → p-447837c2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-faa723fc.entry.js → p-49c8d4d9.entry.js} +2 -2
- package/dist/nylas-web-elements/p-49c8d4d9.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-7e885253.js +2 -0
- package/dist/nylas-web-elements/p-7e885253.js.map +1 -0
- package/dist/nylas-web-elements/{p-3cc1072e.js → p-84109239.js} +2 -2
- package/dist/nylas-web-elements/{p-d16cd88b.entry.js → p-a7d2a211.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bea31f39.entry.js → p-a9107606.entry.js} +2 -2
- package/dist/nylas-web-elements/p-a9107606.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-a9a0dd64.entry.js → p-ab96941e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6fc7d11b.entry.js → p-af94512e.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-bfe2bdbd.js → p-b3ca5d4d.js} +2 -2
- package/dist/nylas-web-elements/{p-80d57b5a.entry.js → p-cd24a45e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6364eb02.entry.js → p-e9369c76.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b2241c3c.entry.js → p-f00d1bb3.entry.js} +2 -2
- package/dist/nylas-web-elements/p-f73e34dd.js +14 -0
- package/dist/nylas-web-elements/{p-2b97a896.js.map → p-f73e34dd.js.map} +1 -1
- package/dist/types/common/constants.d.ts +216 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.d.ts +0 -2
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.d.ts +1 -2
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +3 -1
- package/dist/types/components/scheduler-editor/nylas-select-event-type/nylas-select-event-type.d.ts +2 -1
- package/dist/types/components.d.ts +18 -2
- package/dist/types/stores/scheduler-config-store.d.ts +2 -1
- package/package.json +1 -1
- package/dist/cjs/constants-3b9fb535.js.map +0 -1
- package/dist/cjs/utils-0dfca9ec.js.map +0 -1
- package/dist/esm/constants-3d8016e3.js.map +0 -1
- package/dist/esm/utils-6c05ecaf.js.map +0 -1
- package/dist/nylas-web-elements/p-2b97a896.js +0 -14
- package/dist/nylas-web-elements/p-35b7d082.entry.js +0 -11
- package/dist/nylas-web-elements/p-35b7d082.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-6f7cb609.js +0 -2
- package/dist/nylas-web-elements/p-6f7cb609.js.map +0 -1
- package/dist/nylas-web-elements/p-bea31f39.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-faa723fc.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-865721fd.entry.js.map → p-05204c68.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2b38054f.entry.js.map → p-0d422938.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c59787f4.js.map → p-0d6ecada.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e2632a60.js.map → p-198f05a6.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4e1e01e4.entry.js.map → p-29f601d9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-60b48bf7.js.map → p-3a3c5e17.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6bb6a0b8.entry.js.map → p-447837c2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3cc1072e.js.map → p-84109239.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d16cd88b.entry.js.map → p-a7d2a211.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a9a0dd64.entry.js.map → p-ab96941e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6fc7d11b.entry.js.map → p-af94512e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bfe2bdbd.js.map → p-b3ca5d4d.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-80d57b5a.entry.js.map → p-cd24a45e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6364eb02.entry.js.map → p-e9369c76.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b2241c3c.entry.js.map → p-f00d1bb3.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-event-description.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-event-description/nylas-event-description.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAG9H,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAuBlF,MAAM,OAAO,qBAAqB;;;gCAeI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW;oBAMnE,aAAa;;sCAUM,KAAK;2BAKhB,KAAK;2BAKL,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW,IAAI,EAAE;0BACrF,KAAK;+BAI6C,sBAAsB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpH,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAA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;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;SACzD,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAyED","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { EVENT_TITLE_TOKENS as eventDescriptionTokens } from '@/common/constants';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-description` component is a form input for the description of an event.\n * @part nedesc - The event description container\n * @part nedesc__textarea - The event description textarea\n */\n@Component({\n tag: 'nylas-event-description',\n styleUrl: 'nylas-event-description.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventDescription {\n /**\n * The host element <nylas-event-description>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event description stored in the configuration\n */\n @Prop() eventDescription?: string = this.selectedConfiguration?.event_booking?.description;\n\n /**\n * @standalone\n * The name of the event description input.\n */\n @Prop() name: string = 'description';\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Hide the auto popolate button\n */\n @Prop() hideAutoPopulateButton: boolean = false;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n\n /**\n * The selected event description state. This defaults to the event description from the configuration or an empty string.\n */\n @State() description: string = this.eventDescription || this.selectedConfiguration?.event_booking?.description || '';\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventDescriptionTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event description with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the description textarea element\n private descriptionRef!: HTMLDivElement;\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-event-description', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const description = newValue?.event_booking?.description || this.eventDescription || '';\n const additionalFields = newValue?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n this.description = description;\n if (description) {\n this.updateEventDescriptionFromProp(description);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\n }\n\n /**\n * Event emitted when the event description changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-description', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-description', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-description', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.description = this.eventDescription || '';\n this.updateEventDescriptionFromProp(this.description);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-description', 'disconnectedCallback');\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventDescriptionFromProp(newValue: string) {\n debug('nylas-event-description', 'updateEventDescriptionFromProp', newValue);\n const description = newValue || this.description;\n if (this.descriptionRef) {\n this.descriptionRef.innerHTML = this.highlightTokens(description);\n }\n }\n\n highlightTokens(description: string) {\n let outputHtml = description;\n [...eventDescriptionTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n console.warn('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event description with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventDescription(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the description, reset the description to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.descriptionRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n } else {\n const textNode = selection?.node;\n const offset = selection?.focusOffset || 0;\n\n if (!textNode || offset === -1 || this.descriptionRef.childNodes.length === 0) {\n // If no text node exists or invalid selection, create new line at start\n const newTextNode = document.createTextNode('\\n');\n this.descriptionRef.insertBefore(newTextNode, this.descriptionRef.firstChild);\n\n // Set cursor after newline\n const range = document.createRange();\n range.setStart(newTextNode, 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n } else if (textNode.nodeType === Node.TEXT_NODE) {\n const text = textNode.nodeValue || '';\n // Insert newline at cursor position\n const newText = text.slice(0, offset) + '\\n' + text.slice(offset);\n textNode.nodeValue = newText;\n\n // Move cursor after the newline\n const range = document.createRange();\n range.setStart(textNode, offset + 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n }\n this.descriptionRef.focus();\n }\n } else if (event.key === 'ArrowDown') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n }\n if (this.descriptionRef.textContent === '' || selection?.allSelected) {\n this.descriptionRef.innerHTML = '';\n this.updateEventDescription('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.descriptionRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.descriptionRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event description with the selected token\n this.updateEventDescription(this.descriptionRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventDescription(text: string) {\n const value = text.replace(/ +/g, ' ');\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n handleAddAdditionalFields() {\n if (this.additionalFieldTokens.length === 0) {\n return;\n }\n\n // Remove any existing additional fields section while preserving content before and after\n const baseDescription = this.descriptionRef.innerHTML;\n const startMarker = '--- Additional Fields ---';\n const endMarker = '--- End Additional Fields ---';\n\n const startIndex = baseDescription.indexOf(startMarker);\n const endIndex = baseDescription.indexOf(endMarker);\n\n // Add the additional fields block with start and end markers\n let additionalFieldsBlock = startMarker + '\\n';\n this.additionalFieldTokens.forEach(token => {\n additionalFieldsBlock += `${token.description}: ${token.value}\\n`;\n });\n additionalFieldsBlock += endMarker;\n\n let description;\n if (startIndex !== -1 && endIndex !== -1) {\n // Replace existing block while maintaining text positions\n description = baseDescription.substring(0, startIndex) + additionalFieldsBlock + baseDescription.substring(endIndex + endMarker.length);\n } else {\n // First time adding the block\n description = baseDescription + additionalFieldsBlock;\n }\n\n this.updateEventDescriptionFromProp(description);\n this.updateEventDescription(description);\n }\n\n @RegisterComponent<NylasEventDescription, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-description',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-description\" part=\"nedesc\">\n <label htmlFor=\"description\">\n {i18next.t('nylasEventDescription.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventDescription.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div\n id=\"event-description\"\n class={{ 'event-description': true }}\n part=\"nedesc__textarea\"\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ref={el => (this.descriptionRef = el as HTMLDivElement)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"nedesc__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.description') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" width=\"13\" height=\"13\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {!this.hideAutoPopulateButton && (\n <span class=\"add-additional-fields\">\n <button-component variant=\"basic\" onClick={() => this.handleAddAdditionalFields()}>\n {i18next.t('nylasEventDescription.addAdditionalFields.buttonText')}\n </button-component>\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventDescription.addAdditionalFields.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-event-description.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-event-description/nylas-event-description.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAG9H,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAuBlF,MAAM,OAAO,qBAAqB;;;gCAeI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW;oBAMnE,aAAa;;sCAUM,KAAK;2BAKhB,KAAK;2BAKL,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW,IAAI,EAAE;0BACrF,KAAK;+BAI6C,sBAAsB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpH,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;8BAI6E,IAAI,CAAC,eAAe;oCAK5D,EAAE;2BAWtC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ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AAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAyED","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { EVENT_TITLE_TOKENS as eventDescriptionTokens } from '@/common/constants';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-description` component is a form input for the description of an event.\n * @part nedesc - The event description container\n * @part nedesc__textarea - The event description textarea\n */\n@Component({\n tag: 'nylas-event-description',\n styleUrl: 'nylas-event-description.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventDescription {\n /**\n * The host element <nylas-event-description>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event description stored in the configuration\n */\n @Prop() eventDescription?: string = this.selectedConfiguration?.event_booking?.description;\n\n /**\n * @standalone\n * The name of the event description input.\n */\n @Prop() name: string = 'description';\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Hide the auto popolate button\n */\n @Prop() hideAutoPopulateButton: boolean = false;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n\n /**\n * The selected event description state. This defaults to the event description from the configuration or an empty string.\n */\n @State() description: string = this.eventDescription || this.selectedConfiguration?.event_booking?.description || '';\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventDescriptionTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event description with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the description textarea element\n private descriptionRef!: HTMLDivElement;\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-event-description', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const description = newValue?.event_booking?.description || this.eventDescription || '';\n const additionalFields = newValue?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n this.description = description;\n if (description) {\n this.updateEventDescriptionFromProp(description);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\n }\n\n /**\n * Event emitted when the event description changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-description', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-description', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-description', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.description = this.eventDescription || '';\n this.updateEventDescriptionFromProp(this.description);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-description', 'disconnectedCallback');\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventDescriptionFromProp(newValue: string) {\n debug('nylas-event-description', 'updateEventDescriptionFromProp', newValue);\n const description = newValue || this.description;\n if (this.descriptionRef) {\n this.descriptionRef.innerHTML = this.highlightTokens(description);\n }\n }\n\n highlightTokens(description: string) {\n let outputHtml = description;\n [...eventDescriptionTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n console.warn('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event description with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventDescription(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the description, reset the description to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.descriptionRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n } else {\n const textNode = selection?.node;\n const offset = selection?.focusOffset || 0;\n\n if (!textNode || offset === -1 || this.descriptionRef.childNodes.length === 0) {\n // If no text node exists or invalid selection, create new line at start\n const newTextNode = document.createTextNode('\\n');\n this.descriptionRef.insertBefore(newTextNode, this.descriptionRef.firstChild);\n\n // Set cursor after newline\n const range = document.createRange();\n range.setStart(newTextNode, 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n } else if (textNode.nodeType === Node.TEXT_NODE) {\n const text = textNode.nodeValue || '';\n // Insert newline at cursor position\n const newText = text.slice(0, offset) + '\\n' + text.slice(offset);\n textNode.nodeValue = newText;\n\n // Move cursor after the newline\n const range = document.createRange();\n range.setStart(textNode, offset + 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n }\n this.descriptionRef.focus();\n }\n } else if (event.key === 'ArrowDown') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n }\n if (this.descriptionRef.textContent === '' || selection?.allSelected) {\n this.descriptionRef.innerHTML = '';\n this.updateEventDescription('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.descriptionRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.descriptionRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event description with the selected token\n this.updateEventDescription(this.descriptionRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventDescription(text: string) {\n const value = text.replace(/ +/g, ' ');\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n handleAddAdditionalFields() {\n if (this.additionalFieldTokens.length === 0) {\n return;\n }\n\n // Remove any existing additional fields section while preserving content before and after\n const baseDescription = this.descriptionRef.innerHTML;\n const startMarker = '--- Additional Fields ---';\n const endMarker = '--- End Additional Fields ---';\n\n const startIndex = baseDescription.indexOf(startMarker);\n const endIndex = baseDescription.indexOf(endMarker);\n\n // Add the additional fields block with start and end markers\n let additionalFieldsBlock = startMarker + '\\n';\n this.additionalFieldTokens.forEach(token => {\n additionalFieldsBlock += `${token.description}: ${token.value}\\n`;\n });\n additionalFieldsBlock += endMarker;\n\n let description;\n if (startIndex !== -1 && endIndex !== -1) {\n // Replace existing block while maintaining text positions\n description = baseDescription.substring(0, startIndex) + additionalFieldsBlock + baseDescription.substring(endIndex + endMarker.length);\n } else {\n // First time adding the block\n description = baseDescription + additionalFieldsBlock;\n }\n\n this.updateEventDescriptionFromProp(description);\n this.updateEventDescription(description);\n }\n\n @RegisterComponent<NylasEventDescription, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-description',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-description\" part=\"nedesc\">\n <label htmlFor=\"description\">\n {i18next.t('nylasEventDescription.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventDescription.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div\n id=\"event-description\"\n class={{ 'event-description': true }}\n part=\"nedesc__textarea\"\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ref={el => (this.descriptionRef = el as HTMLDivElement)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"nedesc__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.description') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" width=\"13\" height=\"13\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {!this.noTemplates && !this.hideAutoPopulateButton && (\n <span class=\"add-additional-fields\">\n <button-component variant=\"basic\" onClick={() => this.handleAddAdditionalFields()}>\n {i18next.t('nylasEventDescription.addAdditionalFields.buttonText')}\n </button-component>\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventDescription.addAdditionalFields.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -16,6 +16,7 @@ import { RegisterComponent } from "../../../common/register-component";
|
|
|
16
16
|
import { debug, getCalendarRange, parsePreviewLink } from "../../../utils/utils";
|
|
17
17
|
import { Host, h } from "@stencil/core";
|
|
18
18
|
import i18next from "../../../utils/i18n";
|
|
19
|
+
import { CONFIGURATION_EVENT_TYPE } from "../../../common/constants";
|
|
19
20
|
export class NylasListConfigurations {
|
|
20
21
|
constructor() {
|
|
21
22
|
this.configurations = [];
|
|
@@ -541,11 +542,13 @@ __decorate([
|
|
|
541
542
|
},
|
|
542
543
|
createButtonClick: async (_, connector) => {
|
|
543
544
|
connector.schedulerConfigStore.resetSelectedConfiguration();
|
|
544
|
-
|
|
545
|
-
|
|
545
|
+
const enabledEventTypes = Object.entries(connector.schedulerConfigStore.state.enableEventTypes || {}).filter(([_key, value]) => value);
|
|
546
|
+
if (enabledEventTypes.length === 1) {
|
|
547
|
+
connector.schedulerConfigStore.state.action = 'create';
|
|
548
|
+
connector.schedulerConfigStore.state.selectedEventType = CONFIGURATION_EVENT_TYPE[enabledEventTypes[0][0]];
|
|
546
549
|
}
|
|
547
550
|
else {
|
|
548
|
-
connector.schedulerConfigStore.state.action = 'create';
|
|
551
|
+
connector.schedulerConfigStore.state.action = 'create-select';
|
|
549
552
|
}
|
|
550
553
|
},
|
|
551
554
|
deleteButtonClick: async (event, connector) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-list-configurations.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,OAAO,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,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,qBAAqB,GAAG,aAAa,CAAC;gBAC3E,IAAI,aAAa,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;oBACnC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,CAAC;oBAClF,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,qBAAqB,GAAG;wBAC3D,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE;wBAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE;qBAC7B,CAAC;oBACF,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS,CAAC,eAAe,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;oBACvF,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;wBAEpC,OAAO;oBACT,CAAC;gBACH,CAAC;gBACD,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;YACvD,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDA8KD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getCalendarRange, parsePreviewLink } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, GroupConfiguration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-list-configurations` component displays a list of scheduling pages.\n *\n * @part nlc__create-new-cta - The create new configuration CTA.\n */\n@Component({\n tag: 'nylas-list-configurations',\n styleUrl: 'nylas-list-configurations.scss',\n shadow: true,\n})\nexport class NylasListConfigurations {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasListConfigurationsElement;\n\n /**\n * The list of configurations to display.\n */\n @Prop() configurations: (Configuration | GroupConfiguration)[] = [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n\n /**\n * The next cursor for list configurations, if any.\n */\n @Prop() listConfigurationsNextCursor?: string | null;\n\n /**\n * Event emitted when the component is initialized.\n */\n @Event() initListConfigurations!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n cursor?: string;\n }>;\n\n /**\n * Event emitted when the user clicks the create event button.\n */\n @Event() createButtonClick!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the edit event button.\n */\n @Event() editButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration | GroupConfiguration;\n }>;\n\n /**\n * Event emitted when the user clicks the delete event button.\n */\n @Event() deleteButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration | GroupConfiguration;\n }>;\n\n /**\n * The current state of the component.\n */\n @State() private state: 'loading' | 'loaded' | 'error' = 'loading';\n\n /**\n * The error message to display.\n */\n @State() private error: string = '';\n\n /**\n * Current cursor for list configurations\n */\n @State() currentCursor: string | null = null;\n\n /**\n * The list of previous cursors for list configurations\n */\n @State() previousCursors: string[] = [];\n\n /**\n * State to identiy if the next button should be disabled\n */\n @State() disableNextPageButton: boolean = false;\n\n /**\n * State to store the configuration id to delete and to show the delete confirmation modal\n */\n @State() deleteConfigurationId: string = '';\n\n /**\n * State to show Delete button loading state\n */\n @State() showDeleteButtonLoading: boolean = false;\n\n @Watch('listConfigurationsNextCursor')\n listConfigurationsNextCursorChangedHandler(newVal: string | null, oldVal: string | null) {\n if (!newVal || newVal === oldVal) {\n if (newVal === null) {\n this.disableNextPageButton = true;\n }\n return;\n }\n this.disableNextPageButton = false;\n this.currentCursor = newVal;\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n connectedCallback() {\n debug('[nylas-list-configurations]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-list-configurations]', 'componentWillLoad');\n\n // If we have configurations, we will set the state to loaded.\n if (this.configurations && this.configurations.length > 0) {\n this.state = 'loaded';\n }\n }\n\n componentDidLoad() {\n debug('[nylas-list-configurations]', 'componentDidLoad');\n\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit({\n host: this.host,\n });\n }\n\n disconnectedCallback() {\n debug('[nylas-list-configurations]', 'disconnectedCallback');\n }\n\n @Listen('nylasFormDropdownChanged')\n async handleNylasFormDropdownChanged(event: CustomEvent) {\n debug('[nylas-list-configurations]', 'handleNylasFormDropdownChanged', event.detail);\n const { value } = event.detail;\n const [action, index] = value.split('-');\n event.preventDefault();\n switch (action) {\n case 'delete':\n this.deleteConfigurationId = this.configurations[index]?.id;\n break;\n case 'preview':\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.configurations[index]), '_blank');\n break;\n case 'copy':\n await navigator.clipboard.writeText(parsePreviewLink(this.schedulerPreviewLink, this.configurations[index]));\n break;\n default:\n break;\n }\n }\n\n @Method()\n async registerCallback() {\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit({\n host: this.host,\n });\n }\n\n @Method()\n async getState() {\n return this.state;\n }\n\n @Method()\n async setState(state: 'loading' | 'loaded' | 'error') {\n this.state = state;\n }\n\n @Method()\n async setError(error: string) {\n this.error = error;\n }\n\n @Method()\n async hideDeleteConfirmation() {\n this.deleteConfigurationId = '';\n this.showDeleteButtonLoading = false;\n }\n\n closeModal(e: Event) {\n e.preventDefault();\n this.deleteConfigurationId = '';\n }\n\n handleConfirmDeleteButtonClicked(e: Event) {\n e.preventDefault();\n this.showDeleteButtonLoading = true;\n const config = this.configurations.find(config => config.id === this.deleteConfigurationId);\n if (config && config?.id) {\n this.deleteButtonClick.emit({ host: this.host, configuration: config });\n }\n }\n\n private getDurationString(duration: number) {\n if (!duration) return '—';\n const hours = Math.floor(duration / 60);\n const minutes = duration % 60;\n return `${hours ? hours : ''} ${hours ? `${hours > 1 ? 'hours' : 'hour'}` : ''} ${minutes ? minutes : ''} ${minutes ? `${minutes > 1 ? 'mins' : 'min'}` : ''}`;\n }\n\n getActionLabelHTML(action: string) {\n const actionStyle = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '0.5rem',\n };\n const dangerStyle = {\n color: 'var(--nylas-error)',\n };\n switch (action) {\n case 'preview':\n return (\n <span style={actionStyle}>\n <eye-icon width=\"16\" height=\"16\"></eye-icon>\n {i18next.t('nylasListConfigurations.previewButtonText')}\n </span>\n );\n case 'copy':\n return (\n <span style={actionStyle}>\n <copy-icon width=\"16\" height=\"16\" />\n {i18next.t('nylasListConfigurations.copyLinkButtonText')}\n </span>\n );\n case 'delete':\n return (\n <span style={{ ...actionStyle, ...dangerStyle }}>\n <delete-icon width=\"15\" height=\"17\"></delete-icon>\n {i18next.t('nylasListConfigurations.deleteButtonText')}\n </span>\n );\n default:\n return '';\n }\n }\n\n previousPageClickedHandler() {\n if (this.previousCursors.length === 0) return;\n\n this.currentCursor = this.previousCursors.pop() || null;\n const prevCursor = this.previousCursors[this.previousCursors.length - 1] || undefined;\n this.initListConfigurations.emit({\n host: this.host,\n cursor: prevCursor,\n });\n }\n\n nextPageClickedHandler() {\n if (!this.currentCursor) return;\n\n this.previousCursors = [...this.previousCursors, this.currentCursor];\n this.initListConfigurations.emit({\n host: this.host,\n cursor: this.currentCursor,\n });\n }\n\n @RegisterComponent<NylasListConfigurations, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-list-configurations',\n stateToProps: new Map([\n ['schedulerConfig.configurations', 'configurations'],\n ['schedulerConfig.listConfigurationsNextCursor', 'listConfigurationsNextCursor'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n eventToProps: {\n initListConfigurations: async (event, connector) => {\n const { host, cursor } = event.detail;\n await host.setState('loading');\n const [data, error] = await connector.schedulerConfig.getConfigurations(cursor);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n return;\n }\n await host.setState('loaded');\n // setCursor here\n },\n createButtonClick: async (_, connector) => {\n connector.schedulerConfigStore.resetSelectedConfiguration();\n if (connector.schedulerConfigStore.state.experimentalFeatures?.group_events) {\n connector.schedulerConfigStore.state.action = 'create-select';\n } else {\n connector.schedulerConfigStore.state.action = 'create';\n }\n },\n deleteButtonClick: async (event, connector) => {\n const { host, configuration } = event.detail;\n const [data, error] = await connector.schedulerConfig.deleteConfiguration(configuration.id);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n }\n await host.hideDeleteConfirmation();\n },\n editButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n connector.schedulerConfigStore.state.selectedConfiguration = configuration;\n if (configuration.type === 'group') {\n const { startTime, endTime } = getCalendarRange(new Date().toISOString(), 'week');\n connector.schedulerConfigStore.state.calendarViewDateRange = {\n start_time: startTime.toString(),\n end_time: endTime.toString(),\n };\n const [data, error] = await connector.schedulerConfig.getGroupEvents(configuration.id);\n if (!data && error && error.message) {\n // handle error\n return;\n }\n }\n connector.schedulerConfigStore.state.action = 'edit';\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"header\">\n <div class=\"description\">\n <h2>{i18next.t('allSchedulingPages')}</h2>\n <p>{i18next.t('createAndManageSchedulingPages')}</p>\n </div>\n {this.configurations && this.configurations.length > 0 && (\n <div class=\"actions\">\n <button-component\n part=\"nlc__create-new-cta\"\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n {i18next.t('createNewSchedulingPageButtonText')}\n </button-component>\n </div>\n )}\n </div>\n <div class=\"configurations\">\n <div class=\"table-container\">\n <table\n class={{\n 'no-configurations': this.state !== 'loading' && (!this.configurations || this.configurations.length === 0),\n }}\n >\n <tr\n class={{\n hide: this.state === 'loading' || (this.configurations && this.configurations.length === 0),\n }}\n >\n <th>{i18next.t('pageTitle')}</th>\n <th>{i18next.t('durationTitle')}</th>\n <th></th>\n </tr>\n {this.state === 'loading' && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <h3>{i18next.t('loading')}...</h3>\n <p>{i18next.t('loadingPagesDescription')}</p>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <calendar-icon width=\"48\" height=\"48\"></calendar-icon>\n <h3>{i18next.t('noSchedulingPages')}</h3>\n <p>{i18next.t('createFirstSchedulingPage')}</p>\n <button-component\n part=\"nlc__create-new-cta\"\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n {i18next.t('createNewSchedulingPageButtonText')}\n </button-component>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' &&\n this.configurations?.map((config, i) => {\n const lastTwo = (i === this.configurations.length - 1 || i === this.configurations.length - 2) && this.configurations.length > 3;\n const groupConfig = config as GroupConfiguration;\n const regularConfig = config as Configuration;\n return (\n <tr key={config?.id}>\n <td>\n <div class=\"title\">\n <div class=\"config-event-title\" title={regularConfig?.event_booking?.title}>\n {regularConfig?.event_booking?.title || groupConfig?.name}\n </div>\n <div class={'config-event-description'}>{regularConfig?.event_booking?.description}</div>\n </div>\n </td>\n <td>\n <div class=\"duration\">{this.getDurationString(regularConfig?.availability?.duration_minutes)}</div>\n </td>\n <td>\n <div class=\"actions\">\n <button-component\n variant={'basic'}\n key={`edit-${i}`}\n clickHandler={event => {\n event.preventDefault();\n this.editButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n <edit-icon width=\"16\" height=\"16\"></edit-icon>\n {i18next.t('editSchedulingPageButtonText')}\n </button-component>\n <select-dropdown\n class={{\n last: lastTwo,\n }}\n name=\"actions\"\n options={[\n { value: `preview-${i}`, label: 'Preview', labelHTML: this.getActionLabelHTML('preview') },\n { value: `copy-${i}`, label: 'Copy link', labelHTML: this.getActionLabelHTML('copy') },\n { value: `delete-${i}`, label: 'Delete', labelHTML: this.getActionLabelHTML('delete') },\n ]}\n defaultSelectedOption={{ value: '', label: '' }}\n dropdownButtonText=\"...\"\n withSearch={false}\n withChevron={false}\n exportparts=\"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete\"\n ></select-dropdown>\n </div>\n </td>\n </tr>\n );\n })}\n </table>\n </div>\n <div class=\"pagination\">\n <button class=\"arrow left\" onClick={() => this.previousPageClickedHandler()} disabled={this.previousCursors.length <= 0}>\n <chevron-icon />\n </button>\n <button class=\"arrow right\" onClick={() => this.nextPageClickedHandler()} disabled={this.disableNextPageButton}>\n <chevron-icon />\n </button>\n </div>\n </div>\n {this.state === 'error' && (\n <div class=\"error-container\">\n <p class={'error'}>{this.error}</p>\n </div>\n )}\n {!!this.deleteConfigurationId && (\n <div class=\"card-wrapper\">\n <div class=\"card-modal\">\n <div class=\"close-button\">\n <button-component tooltip=\"Close\" id=\"close\" variant={'invisible'} onClick={e => this.closeModal(e)} part=\"nfbf__close-button\">\n <close-icon />\n </button-component>\n </div>\n <div class=\"header\">\n <h2 slot=\"card-title\" part=\"nfbf__title\">\n {i18next.t('deleteSchedulingPageTitle')}\n </h2>\n </div>\n <div class=\"description title-desc\">\n <p>{i18next.t('deleteSchedulingPageDescription')}</p>\n </div>\n <div\n class={{\n footer: true,\n }}\n >\n <button-component variant={'basic'} onClick={e => this.closeModal(e)} part=\"nfbf__button-outline nfbf__cancel-cta\">\n {`${i18next.t('deleteSchedulingPageCancelButton')}`}\n </button-component>\n <button-component\n variant={'destructive'}\n onClick={e => this.handleConfirmDeleteButtonClicked(e)}\n disabled={this.showDeleteButtonLoading}\n isLoading={this.showDeleteButtonLoading}\n part=\"nfbf__button-outline nfbf__reschedule-cta\"\n >\n {`${i18next.t('deleteSchedulingPageConfirmButton')}`}\n </button-component>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-list-configurations.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGrH,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAY7E,MAAM,OAAO,uBAAuB;;8BAS+B,EAAE;;oCAWW,EAAE;;qBAuCvB,SAAS;qBAKjC,EAAE;6BAKK,IAAI;+BAKP,EAAE;qCAKG,KAAK;qCAKN,EAAE;uCAKC,KAAK;;IAGjD,0CAA0C,CAAC,MAAqB,EAAE,MAAqB;QACrF,IAAI,CAAC,MAAM,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YACjC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBACpB,IAAI,CAAC,qBAAqB,GAAG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AM,CAAC,CAAC;oBAClF,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,qBAAqB,GAAG;wBAC3D,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE;wBAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE;qBAC7B,CAAC;oBACF,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS,CAAC,eAAe,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;oBACvF,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;wBAEpC,OAAO;oBACT,CAAC;gBACH,CAAC;gBACD,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;YACvD,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDA8KD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getCalendarRange, parsePreviewLink } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, GroupConfiguration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { CONFIGURATION_EVENT_TYPE, LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-list-configurations` component displays a list of scheduling pages.\n *\n * @part nlc__create-new-cta - The create new configuration CTA.\n */\n@Component({\n tag: 'nylas-list-configurations',\n styleUrl: 'nylas-list-configurations.scss',\n shadow: true,\n})\nexport class NylasListConfigurations {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasListConfigurationsElement;\n\n /**\n * The list of configurations to display.\n */\n @Prop() configurations: (Configuration | GroupConfiguration)[] = [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n\n /**\n * The next cursor for list configurations, if any.\n */\n @Prop() listConfigurationsNextCursor?: string | null;\n\n /**\n * Event emitted when the component is initialized.\n */\n @Event() initListConfigurations!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n cursor?: string;\n }>;\n\n /**\n * Event emitted when the user clicks the create event button.\n */\n @Event() createButtonClick!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the edit event button.\n */\n @Event() editButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration | GroupConfiguration;\n }>;\n\n /**\n * Event emitted when the user clicks the delete event button.\n */\n @Event() deleteButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration | GroupConfiguration;\n }>;\n\n /**\n * The current state of the component.\n */\n @State() private state: 'loading' | 'loaded' | 'error' = 'loading';\n\n /**\n * The error message to display.\n */\n @State() private error: string = '';\n\n /**\n * Current cursor for list configurations\n */\n @State() currentCursor: string | null = null;\n\n /**\n * The list of previous cursors for list configurations\n */\n @State() previousCursors: string[] = [];\n\n /**\n * State to identiy if the next button should be disabled\n */\n @State() disableNextPageButton: boolean = false;\n\n /**\n * State to store the configuration id to delete and to show the delete confirmation modal\n */\n @State() deleteConfigurationId: string = '';\n\n /**\n * State to show Delete button loading state\n */\n @State() showDeleteButtonLoading: boolean = false;\n\n @Watch('listConfigurationsNextCursor')\n listConfigurationsNextCursorChangedHandler(newVal: string | null, oldVal: string | null) {\n if (!newVal || newVal === oldVal) {\n if (newVal === null) {\n this.disableNextPageButton = true;\n }\n return;\n }\n this.disableNextPageButton = false;\n this.currentCursor = newVal;\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n connectedCallback() {\n debug('[nylas-list-configurations]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-list-configurations]', 'componentWillLoad');\n\n // If we have configurations, we will set the state to loaded.\n if (this.configurations && this.configurations.length > 0) {\n this.state = 'loaded';\n }\n }\n\n componentDidLoad() {\n debug('[nylas-list-configurations]', 'componentDidLoad');\n\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit({\n host: this.host,\n });\n }\n\n disconnectedCallback() {\n debug('[nylas-list-configurations]', 'disconnectedCallback');\n }\n\n @Listen('nylasFormDropdownChanged')\n async handleNylasFormDropdownChanged(event: CustomEvent) {\n debug('[nylas-list-configurations]', 'handleNylasFormDropdownChanged', event.detail);\n const { value } = event.detail;\n const [action, index] = value.split('-');\n event.preventDefault();\n switch (action) {\n case 'delete':\n this.deleteConfigurationId = this.configurations[index]?.id;\n break;\n case 'preview':\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.configurations[index]), '_blank');\n break;\n case 'copy':\n await navigator.clipboard.writeText(parsePreviewLink(this.schedulerPreviewLink, this.configurations[index]));\n break;\n default:\n break;\n }\n }\n\n @Method()\n async registerCallback() {\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit({\n host: this.host,\n });\n }\n\n @Method()\n async getState() {\n return this.state;\n }\n\n @Method()\n async setState(state: 'loading' | 'loaded' | 'error') {\n this.state = state;\n }\n\n @Method()\n async setError(error: string) {\n this.error = error;\n }\n\n @Method()\n async hideDeleteConfirmation() {\n this.deleteConfigurationId = '';\n this.showDeleteButtonLoading = false;\n }\n\n closeModal(e: Event) {\n e.preventDefault();\n this.deleteConfigurationId = '';\n }\n\n handleConfirmDeleteButtonClicked(e: Event) {\n e.preventDefault();\n this.showDeleteButtonLoading = true;\n const config = this.configurations.find(config => config.id === this.deleteConfigurationId);\n if (config && config?.id) {\n this.deleteButtonClick.emit({ host: this.host, configuration: config });\n }\n }\n\n private getDurationString(duration: number) {\n if (!duration) return '—';\n const hours = Math.floor(duration / 60);\n const minutes = duration % 60;\n return `${hours ? hours : ''} ${hours ? `${hours > 1 ? 'hours' : 'hour'}` : ''} ${minutes ? minutes : ''} ${minutes ? `${minutes > 1 ? 'mins' : 'min'}` : ''}`;\n }\n\n getActionLabelHTML(action: string) {\n const actionStyle = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '0.5rem',\n };\n const dangerStyle = {\n color: 'var(--nylas-error)',\n };\n switch (action) {\n case 'preview':\n return (\n <span style={actionStyle}>\n <eye-icon width=\"16\" height=\"16\"></eye-icon>\n {i18next.t('nylasListConfigurations.previewButtonText')}\n </span>\n );\n case 'copy':\n return (\n <span style={actionStyle}>\n <copy-icon width=\"16\" height=\"16\" />\n {i18next.t('nylasListConfigurations.copyLinkButtonText')}\n </span>\n );\n case 'delete':\n return (\n <span style={{ ...actionStyle, ...dangerStyle }}>\n <delete-icon width=\"15\" height=\"17\"></delete-icon>\n {i18next.t('nylasListConfigurations.deleteButtonText')}\n </span>\n );\n default:\n return '';\n }\n }\n\n previousPageClickedHandler() {\n if (this.previousCursors.length === 0) return;\n\n this.currentCursor = this.previousCursors.pop() || null;\n const prevCursor = this.previousCursors[this.previousCursors.length - 1] || undefined;\n this.initListConfigurations.emit({\n host: this.host,\n cursor: prevCursor,\n });\n }\n\n nextPageClickedHandler() {\n if (!this.currentCursor) return;\n\n this.previousCursors = [...this.previousCursors, this.currentCursor];\n this.initListConfigurations.emit({\n host: this.host,\n cursor: this.currentCursor,\n });\n }\n\n @RegisterComponent<NylasListConfigurations, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-list-configurations',\n stateToProps: new Map([\n ['schedulerConfig.configurations', 'configurations'],\n ['schedulerConfig.listConfigurationsNextCursor', 'listConfigurationsNextCursor'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n eventToProps: {\n initListConfigurations: async (event, connector) => {\n const { host, cursor } = event.detail;\n await host.setState('loading');\n const [data, error] = await connector.schedulerConfig.getConfigurations(cursor);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n return;\n }\n await host.setState('loaded');\n // setCursor here\n },\n createButtonClick: async (_, connector) => {\n connector.schedulerConfigStore.resetSelectedConfiguration();\n const enabledEventTypes = Object.entries(connector.schedulerConfigStore.state.enableEventTypes || {}).filter(([_key, value]) => value);\n if (enabledEventTypes.length === 1) {\n connector.schedulerConfigStore.state.action = 'create';\n connector.schedulerConfigStore.state.selectedEventType = CONFIGURATION_EVENT_TYPE[enabledEventTypes[0][0]];\n } else {\n connector.schedulerConfigStore.state.action = 'create-select';\n }\n },\n deleteButtonClick: async (event, connector) => {\n const { host, configuration } = event.detail;\n const [data, error] = await connector.schedulerConfig.deleteConfiguration(configuration.id);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n }\n await host.hideDeleteConfirmation();\n },\n editButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n connector.schedulerConfigStore.state.selectedConfiguration = configuration;\n if (configuration.type === 'group') {\n const { startTime, endTime } = getCalendarRange(new Date().toISOString(), 'week');\n connector.schedulerConfigStore.state.calendarViewDateRange = {\n start_time: startTime.toString(),\n end_time: endTime.toString(),\n };\n const [data, error] = await connector.schedulerConfig.getGroupEvents(configuration.id);\n if (!data && error && error.message) {\n // handle error\n return;\n }\n }\n connector.schedulerConfigStore.state.action = 'edit';\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"header\">\n <div class=\"description\">\n <h2>{i18next.t('allSchedulingPages')}</h2>\n <p>{i18next.t('createAndManageSchedulingPages')}</p>\n </div>\n {this.configurations && this.configurations.length > 0 && (\n <div class=\"actions\">\n <button-component\n part=\"nlc__create-new-cta\"\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n {i18next.t('createNewSchedulingPageButtonText')}\n </button-component>\n </div>\n )}\n </div>\n <div class=\"configurations\">\n <div class=\"table-container\">\n <table\n class={{\n 'no-configurations': this.state !== 'loading' && (!this.configurations || this.configurations.length === 0),\n }}\n >\n <tr\n class={{\n hide: this.state === 'loading' || (this.configurations && this.configurations.length === 0),\n }}\n >\n <th>{i18next.t('pageTitle')}</th>\n <th>{i18next.t('durationTitle')}</th>\n <th></th>\n </tr>\n {this.state === 'loading' && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <h3>{i18next.t('loading')}...</h3>\n <p>{i18next.t('loadingPagesDescription')}</p>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <calendar-icon width=\"48\" height=\"48\"></calendar-icon>\n <h3>{i18next.t('noSchedulingPages')}</h3>\n <p>{i18next.t('createFirstSchedulingPage')}</p>\n <button-component\n part=\"nlc__create-new-cta\"\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n {i18next.t('createNewSchedulingPageButtonText')}\n </button-component>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' &&\n this.configurations?.map((config, i) => {\n const lastTwo = (i === this.configurations.length - 1 || i === this.configurations.length - 2) && this.configurations.length > 3;\n const groupConfig = config as GroupConfiguration;\n const regularConfig = config as Configuration;\n return (\n <tr key={config?.id}>\n <td>\n <div class=\"title\">\n <div class=\"config-event-title\" title={regularConfig?.event_booking?.title}>\n {regularConfig?.event_booking?.title || groupConfig?.name}\n </div>\n <div class={'config-event-description'}>{regularConfig?.event_booking?.description}</div>\n </div>\n </td>\n <td>\n <div class=\"duration\">{this.getDurationString(regularConfig?.availability?.duration_minutes)}</div>\n </td>\n <td>\n <div class=\"actions\">\n <button-component\n variant={'basic'}\n key={`edit-${i}`}\n clickHandler={event => {\n event.preventDefault();\n this.editButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n <edit-icon width=\"16\" height=\"16\"></edit-icon>\n {i18next.t('editSchedulingPageButtonText')}\n </button-component>\n <select-dropdown\n class={{\n last: lastTwo,\n }}\n name=\"actions\"\n options={[\n { value: `preview-${i}`, label: 'Preview', labelHTML: this.getActionLabelHTML('preview') },\n { value: `copy-${i}`, label: 'Copy link', labelHTML: this.getActionLabelHTML('copy') },\n { value: `delete-${i}`, label: 'Delete', labelHTML: this.getActionLabelHTML('delete') },\n ]}\n defaultSelectedOption={{ value: '', label: '' }}\n dropdownButtonText=\"...\"\n withSearch={false}\n withChevron={false}\n exportparts=\"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete\"\n ></select-dropdown>\n </div>\n </td>\n </tr>\n );\n })}\n </table>\n </div>\n <div class=\"pagination\">\n <button class=\"arrow left\" onClick={() => this.previousPageClickedHandler()} disabled={this.previousCursors.length <= 0}>\n <chevron-icon />\n </button>\n <button class=\"arrow right\" onClick={() => this.nextPageClickedHandler()} disabled={this.disableNextPageButton}>\n <chevron-icon />\n </button>\n </div>\n </div>\n {this.state === 'error' && (\n <div class=\"error-container\">\n <p class={'error'}>{this.error}</p>\n </div>\n )}\n {!!this.deleteConfigurationId && (\n <div class=\"card-wrapper\">\n <div class=\"card-modal\">\n <div class=\"close-button\">\n <button-component tooltip=\"Close\" id=\"close\" variant={'invisible'} onClick={e => this.closeModal(e)} part=\"nfbf__close-button\">\n <close-icon />\n </button-component>\n </div>\n <div class=\"header\">\n <h2 slot=\"card-title\" part=\"nfbf__title\">\n {i18next.t('deleteSchedulingPageTitle')}\n </h2>\n </div>\n <div class=\"description title-desc\">\n <p>{i18next.t('deleteSchedulingPageDescription')}</p>\n </div>\n <div\n class={{\n footer: true,\n }}\n >\n <button-component variant={'basic'} onClick={e => this.closeModal(e)} part=\"nfbf__button-outline nfbf__cancel-cta\">\n {`${i18next.t('deleteSchedulingPageCancelButton')}`}\n </button-component>\n <button-component\n variant={'destructive'}\n onClick={e => this.handleConfirmDeleteButtonClicked(e)}\n disabled={this.showDeleteButtonLoading}\n isLoading={this.showDeleteButtonLoading}\n part=\"nfbf__button-outline nfbf__reschedule-cta\"\n >\n {`${i18next.t('deleteSchedulingPageConfirmButton')}`}\n </button-component>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { Fragment, h } from "@stencil/core";
|
|
2
|
-
import { CONFIGURATION_EVENT_TYPE
|
|
3
|
-
export default function ExpressFlow({ currentUser, calendars, selectedEventType
|
|
2
|
+
import { CONFIGURATION_EVENT_TYPE } from "../../../common/constants";
|
|
3
|
+
export default function ExpressFlow({ currentUser, calendars, selectedEventType }) {
|
|
4
4
|
const defaultCalendarOption = calendars?.find(c => c.is_primary) || calendars?.[0];
|
|
5
|
-
const enableGroupEvents = experimentalFeatures?.[EXPERIMENTAL_FEATURES.group_events] || false;
|
|
6
5
|
switch (selectedEventType) {
|
|
7
6
|
case CONFIGURATION_EVENT_TYPE.one_on_one:
|
|
8
7
|
case CONFIGURATION_EVENT_TYPE.max_availability:
|
|
9
8
|
case CONFIGURATION_EVENT_TYPE.max_fairness: {
|
|
10
|
-
return (h(Fragment, null, h("nylas-event-info", null, h("div", { slot: "inputs" }, h("nylas-event-title", null), h("nylas-event-duration", null), h("nylas-event-location", { userProvider: currentUser.provider }))), h("nylas-booking-calendar-picker", { exportparts: "nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content", expressFlow: true, calendars: calendars, currentUser: currentUser, defaultBookingCalendar: defaultCalendarOption?.id }),
|
|
9
|
+
return (h(Fragment, null, h("nylas-event-info", null, h("div", { slot: "inputs" }, h("nylas-event-title", null), h("nylas-event-duration", null), h("nylas-event-location", { userProvider: currentUser.provider }))), h("nylas-booking-calendar-picker", { exportparts: "nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content", expressFlow: true, calendars: calendars, currentUser: currentUser, defaultBookingCalendar: defaultCalendarOption?.id }), h("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" })));
|
|
11
10
|
}
|
|
12
11
|
case CONFIGURATION_EVENT_TYPE.collective: {
|
|
13
|
-
return (h(Fragment, null, h("nylas-event-info", null, h("div", { slot: "inputs" }, h("nylas-event-title", null), h("nylas-event-duration", null), h("nylas-event-location", { userProvider: currentUser.provider }))), h("nylas-booking-calendar-picker", { exportparts: "nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content", expressFlow: true, calendars: calendars, currentUser: currentUser, defaultBookingCalendar: defaultCalendarOption?.id }),
|
|
12
|
+
return (h(Fragment, null, h("nylas-event-info", null, h("div", { slot: "inputs" }, h("nylas-event-title", null), h("nylas-event-duration", null), h("nylas-event-location", { userProvider: currentUser.provider }))), h("nylas-booking-calendar-picker", { exportparts: "nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content", expressFlow: true, calendars: calendars, currentUser: currentUser, defaultBookingCalendar: defaultCalendarOption?.id }), h("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }), h("nylas-additional-participants", { name: "participants", eventParticipants: [{ name: currentUser?.name || currentUser?.email, email: currentUser?.email || '', is_organizer: true }], exportparts: "nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant" })));
|
|
14
13
|
}
|
|
15
14
|
case CONFIGURATION_EVENT_TYPE.group: {
|
|
16
15
|
return (h(Fragment, null, h("nylas-event-info", null, h("div", { slot: "inputs" }, h("nylas-event-title", { noTemplates: true }), h("nylas-event-description", { noTemplates: true, hideAutoPopulateButton: true }), h("nylas-event-location", { userProvider: currentUser.provider }), h("nylas-event-timeslot", { name: "event-timeslot" }), h("nylas-event-capacity", null))), h("nylas-booking-calendar-picker", { exportparts: "nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content", expressFlow: true, calendars: calendars, currentUser: currentUser, defaultBookingCalendar: defaultCalendarOption?.id }), h("nylas-additional-participants", { name: "participants", eventParticipants: [{ name: currentUser?.name || currentUser?.email, email: currentUser?.email || '', is_organizer: true }], exportparts: "nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant" }), h("nylas-page-name", { requirePageName: true, pageName: "Group events page" }), h("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" })));
|
package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressFlow.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"ExpressFlow.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAmB9D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAoB;IACjG,MAAM,qBAAqB,GAAG,SAAS,EAAE,IAAI,CAAC,CAAC,C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AE,WAAW,EAAE,KAAK,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,EAC3H,WAAW,EAAC,iLAAiL,GAC7L,CACO,CACZ,CAAC;QACJ,CAAC;QACD,KAAK,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;YACpC,OAAO,CACL,EAAC,QAAQ;gBACP;oBACE,WAAK,IAAI,EAAC,QAAQ;wBAChB,yBAAmB,WAAW,EAAE,IAAI,GAAI;wBACxC,+BAAyB,WAAW,EAAE,IAAI,EAAE,sBAAsB,EAAE,IAAI,GAAI;wBAC5E,4BAAsB,YAAY,EAAE,WAAW,CAAC,QAAQ,GAAI;wBAC5D,4BAAsB,IAAI,EAAC,gBAAgB,GAAG;wBAC9C,+BAAwB,CACpB,CACW;gBACnB,qCACE,WAAW,EAAC,mFAAmF,EAC/F,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,sBAAsB,EAAE,qBAAqB,EAAE,EAAE,GACjD;gBACF,qCACE,IAAI,EAAC,cAAc,EACnB,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,IAAI,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,EAC3H,WAAW,EAAC,iLAAiL,GAC7L;gBACF,uBAAiB,eAAe,EAAE,IAAI,EAAE,QAAQ,EAAC,mBAAmB,GAAG;gBACvE,+BAAyB,IAAI,EAAC,mBAAmB,EAAC,WAAW,EAAC,uFAAuF,GAAG,CAC/I,CACZ,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import { Fragment, h } from '@stencil/core';\nimport { Configuration } from '@nylas/core';\nimport { CONFIGURATION_EVENT_TYPE } from '@/common/constants';\n\ntype RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];\n};\n\n/**\n * The props for the Express Flow component.\n */\nexport type ExpressFlowProps = {\n currentUser: any;\n calendars: any[];\n selectedConfiguration: RecursivePartial<Configuration>;\n selectedEventType: CONFIGURATION_EVENT_TYPE;\n};\n\n/**\n * The Express Flow component.\n */\nexport default function ExpressFlow({ currentUser, calendars, selectedEventType }: ExpressFlowProps) {\n const defaultCalendarOption = calendars?.find(c => c.is_primary) || calendars?.[0];\n switch (selectedEventType) {\n case CONFIGURATION_EVENT_TYPE.one_on_one:\n case CONFIGURATION_EVENT_TYPE.max_availability:\n case CONFIGURATION_EVENT_TYPE.max_fairness: {\n return (\n <Fragment>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title />\n <nylas-event-duration />\n <nylas-event-location userProvider={currentUser.provider} />\n </div>\n </nylas-event-info>\n <nylas-booking-calendar-picker\n exportparts=\"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content\"\n expressFlow={true}\n calendars={calendars}\n currentUser={currentUser}\n defaultBookingCalendar={defaultCalendarOption?.id}\n />\n <nylas-custom-event-slug name=\"custom-event-slug\" exportparts=\"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield\" />\n </Fragment>\n );\n }\n case CONFIGURATION_EVENT_TYPE.collective: {\n return (\n <Fragment>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title />\n <nylas-event-duration />\n <nylas-event-location userProvider={currentUser.provider} />\n </div>\n </nylas-event-info>\n <nylas-booking-calendar-picker\n exportparts=\"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content\"\n expressFlow={true}\n calendars={calendars}\n currentUser={currentUser}\n defaultBookingCalendar={defaultCalendarOption?.id}\n />\n <nylas-custom-event-slug name=\"custom-event-slug\" exportparts=\"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield\" />\n <nylas-additional-participants\n name=\"participants\"\n eventParticipants={[{ name: currentUser?.name || currentUser?.email, email: currentUser?.email || '', is_organizer: true }]}\n exportparts=\"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant\"\n />\n </Fragment>\n );\n }\n case CONFIGURATION_EVENT_TYPE.group: {\n return (\n <Fragment>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title noTemplates={true} />\n <nylas-event-description noTemplates={true} hideAutoPopulateButton={true} />\n <nylas-event-location userProvider={currentUser.provider} />\n <nylas-event-timeslot name=\"event-timeslot\" />\n <nylas-event-capacity />\n </div>\n </nylas-event-info>\n <nylas-booking-calendar-picker\n exportparts=\"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content\"\n expressFlow={true}\n calendars={calendars}\n currentUser={currentUser}\n defaultBookingCalendar={defaultCalendarOption?.id}\n />\n <nylas-additional-participants\n name=\"participants\"\n eventParticipants={[{ name: currentUser?.name || currentUser?.email, email: currentUser?.email || '', is_organizer: true }]}\n exportparts=\"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant\"\n />\n <nylas-page-name requirePageName={true} pageName=\"Group events page\" />\n <nylas-custom-event-slug name=\"custom-event-slug\" exportparts=\"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield\" />\n </Fragment>\n );\n }\n }\n}\n"]}
|
|
@@ -99,16 +99,8 @@
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
div.scheduler-editor-content {
|
|
102
|
-
height: 610px;
|
|
103
|
-
}
|
|
104
|
-
div.scheduler-editor-content.scheduler-editor-content--group_feature_enabled {
|
|
105
102
|
height: 900px;
|
|
106
103
|
}
|
|
107
|
-
@media screen and (max-width: 768px) {
|
|
108
|
-
div.scheduler-editor-content.scheduler-editor-content--group_feature_enabled {
|
|
109
|
-
height: auto;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
104
|
@media screen and (max-width: 768px) {
|
|
113
105
|
div.scheduler-editor-content {
|
|
114
106
|
height: auto;
|