@nylas/web-elements 0.0.0-test-20250320205845 → 0.0.0-test-20250327161320
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 +10 -11
- package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js +6 -9
- package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js.map +1 -1
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +5 -5
- package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-transcript.cjs.entry.js +4 -4
- package/dist/cjs/nylas-transcript.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-video-player.cjs.entry.js +2 -2
- package/dist/cjs/nylas-video-player.cjs.entry.js.map +1 -1
- package/dist/cjs/scheduler-store-461fd2ff.js.map +1 -1
- package/dist/collection/components/nylas-notebook/nylas-transcript/nylas-transcript.css +5 -0
- package/dist/collection/components/nylas-notebook/nylas-transcript/nylas-transcript.js +3 -3
- package/dist/collection/components/nylas-notebook/nylas-transcript/nylas-transcript.js.map +1 -1
- package/dist/collection/components/nylas-notebook/nylas-video-player/nylas-video-player.css +0 -3
- package/dist/collection/components/nylas-notebook/nylas-video-player/nylas-video-player.js +1 -1
- package/dist/collection/components/nylas-notebook/nylas-video-player/nylas-video-player.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +3 -5
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js +5 -5
- 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-duration/test/nylas-event-duration-with-config-2.spec.js +58 -0
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration-with-config-2.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration-with-config.spec.js +0 -32
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration-with-config.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +3 -4
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js +12 -0
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
- package/dist/collection/types/index.js.map +1 -1
- package/dist/components/nylas-booking-form-config2.js +3 -5
- package/dist/components/nylas-booking-form-config2.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group2.js +5 -5
- package/dist/components/nylas-editor-tabs-group2.js.map +1 -1
- package/dist/components/nylas-participants-custom-availability2.js +3 -4
- package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-transcript.js +4 -4
- package/dist/components/nylas-transcript.js.map +1 -1
- package/dist/components/nylas-video-player.js +2 -2
- package/dist/components/nylas-video-player.js.map +1 -1
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/esm/calendar-agenda-fill-icon_36.entry.js +6 -9
- package/dist/esm/calendar-agenda-fill-icon_36.entry.js.map +1 -1
- package/dist/esm/google-logo-icon_6.entry.js +5 -5
- package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-transcript.entry.js +4 -4
- package/dist/esm/nylas-transcript.entry.js.map +1 -1
- package/dist/esm/nylas-video-player.entry.js +2 -2
- package/dist/esm/nylas-video-player.entry.js.map +1 -1
- package/dist/esm/scheduler-store-755ced0b.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/p-4b48f29a.entry.js.map +1 -1
- package/dist/nylas-web-elements/p-68608216.entry.js.map +1 -1
- package/dist/nylas-web-elements/{p-f12cd991.entry.js → p-7fcdad32.entry.js} +2 -2
- package/dist/nylas-web-elements/p-7fcdad32.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-b1c57792.entry.js → p-c3f848d7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b1c57792.entry.js.map → p-c3f848d7.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-d1053aa8.entry.js +2 -0
- package/dist/nylas-web-elements/p-d1053aa8.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-d36ad6ef.js.map +1 -1
- package/dist/nylas-web-elements/{p-11d7062d.entry.js → p-f4881c71.entry.js} +2 -2
- package/dist/nylas-web-elements/p-f4881c71.entry.js.map +1 -0
- package/dist/types/connector/shared/api/scheduler-config.d.ts +2 -2
- package/package.json +4 -4
- package/dist/nylas-web-elements/p-11d7062d.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-3d93df74.entry.js +0 -2
- package/dist/nylas-web-elements/p-3d93df74.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-f12cd991.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-booking-form-config.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,i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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAnPC;IARC,iBAAiB,CAA4G;QAC5H,IAAI,EAAE,2BAA2B;QACjC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;SACzD,CAAC;QACF,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;oDAmPD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { DEFAULT_FORM_FIELD_TYPES, FIELD_TYPES } from '@/common/constants';\nimport { Configuration, AdditionalFields } from '@nylas/core';\nimport Sortable from 'sortablejs';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\ninterface AdditionalFieldsInternal extends AdditionalFields {\n isOpen: boolean;\n readonly?: boolean;\n typeLabel: string;\n key?: string; // Make optional\n error?: string; // Make optional\n fieldLabelKey?: string; // Make optional\n}\n\n/**\n * The `nylas-booking-form-config` component is a form input for adding additional fields to the booking form.\n * @part nbfc__header - The header of the booking form\n * @part nbfc__add_field - The add field selection container\n * @part nbfc__add_field-button - The add field selection button\n * @part nbfc__add_field-content - The add field selection dropdown content\n * @part nbfc__additional_fields - The aditional fields container\n * @part nbfc__form-field - The single form container\n * @part nbfc__form-field-header - The single form header\n * @part nbfc__form-field-content - The single form content\n */\n@Component({\n tag: 'nylas-booking-form-config',\n styleUrl: 'nylas-booking-form-config.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasBookingFormConfig {\n private staticFields = [\n {\n type: 'text',\n label: 'Your name',\n key: 'your_name',\n typeLabel: 'Short text',\n readonly: true,\n required: true,\n isOpen: false,\n fieldLabelKey: 'your_name',\n order: 0,\n },\n {\n type: 'email',\n label: 'Your Email',\n key: 'your_email',\n typeLabel: 'Email',\n readonly: true,\n isOpen: false,\n required: true,\n fieldLabelKey: 'your_email',\n order: 1,\n },\n ];\n /**\n * The element <nylas-booking-form-config> itself.\n */\n @Element() host!: HTMLNylasBookingFormConfigElement;\n\n /**\n * @internal\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * The name of the booking form config.\n */\n @Prop() name: string = 'additional-fields';\n\n /**\n * The additional fields to be displayed on the booking form.\n */\n @Prop() additionalFields?: AdditionalFields[];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * This event is fired when the selected availability / open hours change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n @State() formFields!: AdditionalFieldsInternal[];\n\n @State() formFieldsOrder!: AdditionalFieldsInternal[];\n\n @State() count: number = 0;\n\n @State() watchFields!: {\n title: string;\n description: string;\n };\n @State() fieldTypes = DEFAULT_FORM_FIELD_TYPES.map(f => {\n return { label: i18next.t(`nylasBookingFormConfig.fieldType.${f.value}`), value: f.value };\n });\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-calendar-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n this.updateFormFields(newValue, false);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n this.fieldTypes = DEFAULT_FORM_FIELD_TYPES.map(f => {\n return { label: i18next.t(`nylasBookingFormConfig.fieldType.${f.value}`), value: f.value };\n });\n }\n\n connectedCallback() {\n debug('nylas-booking-form-config', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-booking-form-config', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-booking-form-config', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.formFields = [];\n this.formFieldsChangedHandler(this.formFields, false);\n }\n\n componentDidLoad() {\n debug('nylas-booking-form-config', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.updateFormFields(this.selectedConfiguration, false);\n }\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function';\n }\n\n updateFormFields(config: Configuration, valueChanged: boolean = true) {\n this.watchFields = {\n title: config?.event_booking?.title || '',\n description: config?.event_booking?.description || '',\n };\n const additionalFields =\n Object.entries(config?.scheduler?.additional_fields || {}).map(([id, field]) => ({ ...(field as AdditionalFields), key: id })) || this.additionalFields || [];\n\n this.formFields = [\n ...additionalFields\n .sort((a, b) => a.order - b.order)\n .map((f: AdditionalFields, _i) => {\n const fieldType = FIELD_TYPES.find(field => field.type === f.type);\n if (!fieldType) {\n return { ...f, isOpen: false, typeLabel: 'Unknown' };\n }\n const typeLabel = fieldType.label;\n const order = f.order || 0;\n return { ...f, order: order - 1, isOpen: false, typeLabel, fieldLabelKey: f.type };\n }),\n ];\n this.formFields = [...this.formFields];\n\n this.formFieldsChangedHandler(this.formFields, valueChanged);\n const container = this.host.shadowRoot?.getElementById('fields');\n Sortable.create(container, {\n animation: 150,\n swap: true, // Enable swap plugin\n swapClass: 'highlight', // The class applied to the hovered swap item\n onEnd: this.swapFields.bind(this),\n handle: '.form-field_header', // Only allow dragging by the header\n filter: '.fixed', // Disable dragging for elements with the 'fixed' class\n fallbackTolerance: 3, // So that we can select items on mobile\n onMove: evt => !evt.related.classList.contains('fixed'), // Prevent moving if target has 'fixed' class\n });\n }\n\n formFieldsChangedHandler(newValue: AdditionalFieldsInternal[], valueChanged: boolean = true) {\n const additionalFields = newValue || [];\n // Remove readonly fields, sort by order\n const sortedFields = additionalFields\n .filter(f => !f.readonly)\n .sort((a, b) => a.order - b.order)\n .map((f, i) => {\n const field: AdditionalFields = {\n type: f.type,\n required: f.required,\n label: f.label,\n order: i + 1,\n options: f.options,\n key: f.key,\n default: f.default,\n fieldLabelKey: f.fieldLabelKey,\n };\n return { ...field };\n });\n\n // Map fields to object\n const addFieldsMap = sortedFields.reduce((acc, field) => {\n if (field.key) { // Only add fields with defined keys\n acc[field.key] = {\n type: field.type,\n required: field.required,\n order: field.order,\n options: field.options,\n label: field.label,\n default: field.default,\n };\n }\n return acc;\n }, {});\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(addFieldsMap), this.name);\n\n if (valueChanged) {\n // Do not emit the valueChanged event on initial load\n this.valueChanged.emit({\n value: JSON.stringify(addFieldsMap),\n name: this.name,\n });\n }\n this.formFields = [...this.formFields];\n }\n\n /**\n * This function finds the next missing number in an array of strings (keys of additional_fields).\n * We use this function to generate the next consecutive index number for the key.\n * For example,\n * - If the keys are ['dropdown_another-one_1', 'dropdown_Whatever-choose-one_3'] the function will return 2.\n * - If the array is empty, the function will return 1.\n * - If there are no missing numbers in between, the function will return the next number after the last element.\n *\n * @param arr of keys stored in the formFields for the given field type\n * @returns a number that is the next (consecutive) missing number in the array\n */\n findNextMissingNumber(arr: string[]): number {\n if (arr.length === 0) {\n return 1; // If the array is empty, the first number is 1\n }\n\n // Extract numbers from strings by splitting on underscore and popping the last element\n const numbers = arr\n .map(item => {\n const parts = item.split('_'); // Split the string by '_'\n const lastPart = parts.pop(); // Get the last part (should be the number)\n const parsedNumber = parseInt(lastPart || '', 10);\n return isNaN(parsedNumber) ? null : parsedNumber; // Return the parsed number or null if not a valid number\n })\n .filter((num): num is number => num !== null) // Filter out any null values and assert that the result is a number\n .sort((a, b) => a - b); // Sort numbers in ascending order\n\n // Iterate through the sorted numbers to find the missing number\n for (let i = 0; i < numbers.length - 1; i++) {\n if (numbers[i + 1] !== numbers[i] + 1) {\n return numbers[i] + 1; // Return the missing number\n }\n }\n\n // If no number is missing in between, return the next number after the last element\n return numbers.length > 0 ? numbers[numbers.length - 1] + 1 : 1;\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'add-field') {\n const field = FIELD_TYPES.find(f => f.type === value);\n const maxOrder = Math.max(...this.formFields.map(f => f.order));\n const existingFieldKeys = this.formFields\n .filter(f => f.type === field.type && f.key !== undefined)\n .map(f => f.key as string);\n const next = this.findNextMissingNumber(existingFieldKeys);\n const newField = { ...field, label: field.label, key: `${field.type}_${field.label.split(' ').join('-')}_${next}`, order: maxOrder + 1 }; // Copy object + Ensure unique order\n this.formFields = [...this.formFields, newField];\n this.formFieldsChangedHandler(this.formFields);\n }\n }\n\n @Listen('nylasFormInputChanged')\n nylasFormInputChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name } = event.detail;\n if (name.startsWith('default-value-')) {\n const fieldIndex = parseInt(name.split('-').pop() || '0');\n this.fieldDefaultValueChanged(fieldIndex, event);\n } else {\n const [fieldIndex, optionIndex] = name.split('_');\n if (optionIndex) {\n this.fieldOptionChange(parseInt(fieldIndex), parseInt(optionIndex), event);\n } else {\n this.fieldLabelChange(parseInt(fieldIndex), event);\n }\n }\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'title' || name === 'description') {\n this.watchFields = {\n ...this.watchFields,\n [name]: value,\n };\n }\n }\n\n swapFields(event) {\n const { oldIndex, newIndex } = event;\n if (oldIndex == null || newIndex == null || oldIndex === newIndex) {\n return;\n }\n console.log('###swapFields', oldIndex, newIndex);\n // Create a copy of the current fields array\n const updatedFields = [...this.formFields];\n\n // Remove the dragged item from its old position\n const [draggedItem] = updatedFields.splice(oldIndex, 1);\n\n // Insert the dragged item at its new position\n updatedFields.splice(newIndex, 0, draggedItem);\n\n // Recalculate order for each field (starting at 1 as required)\n updatedFields.forEach((field, index) => {\n field.order = index + 1;\n });\n\n // Update state and trigger UI re-render\n this.formFields = updatedFields;\n this.formFieldsChangedHandler(this.formFields);\n }\n\n fieldToggle(index) {\n this.formFields = this.formFields.map((f, i) => {\n if (index == i) {\n f.isOpen = !f.isOpen;\n }\n return f;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n fieldRemove(index) {\n this.formFields = this.formFields.filter((_, i) => i !== index);\n this.formFieldsChangedHandler(this.formFields);\n }\n\n fieldRequired(index) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === index) {\n field.required = !field.required;\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n fieldLabelChange(ind, event) {\n const target = event.detail;\n this.formFields = this.formFields.map((field, i) => {\n if (i === ind) {\n const label = target.value;\n return {\n ...field,\n label: label,\n };\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n fieldOptionAdd(index) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === index) {\n if (!field.options) {\n field.options = [];\n }\n field.options = [...field.options, ''];\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n\n fieldOptionRemove(fieldIndex, index) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === fieldIndex) {\n if (!field.options) {\n field.options = [];\n }\n field.options = field.options.filter((_, i) => i !== index);\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n fieldOptionChange(fieldIndex, index, event) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === fieldIndex) {\n if (!field.options) {\n field.options = [];\n }\n field.options = field.options.map((o, i) => {\n if (i === index) {\n o = event.detail.value;\n }\n return o;\n });\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n\n fieldDefaultValueChanged(index, event) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === index) {\n field.default = event.detail.value;\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n\n @RegisterComponent<NylasBookingFormConfig, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-booking-form-config',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-booking-form-config\" part=\"nbfc\">\n <div class=\"header\" part=\"nbfc__header\">\n <div class=\"header_text\">\n <h3>{i18next.t('nylasBookingFormConfig.headerTitle')}</h3>\n <p>{i18next.t('nylasBookingFormConfig.headerSubTitle')}</p>\n </div>\n <div class=\"header_action\">\n <select-dropdown\n name=\"add-field\"\n exportparts=\"sd_dropdown: nbfc__add_field, sd_dropdown-button: nbfc__add_field-button, sd_dropdown-content: nbfc__add_field-dropdown-content\"\n options={this.fieldTypes}\n withSearch={false}\n withChevron={false}\n dropdownButtonText={i18next.t('nylasBookingFormConfig.dropdownButtonText')}\n >\n <span slot=\"select-icon\">\n <plus-icon width=\"15\" height=\"15\"></plus-icon>\n </span>\n </select-dropdown>\n </div>\n </div>\n <div class=\"content\">\n <div class=\"additional_fields static_fields\" part=\"nbfc__static_fields\">\n {this.staticFields.map((field, i) => {\n return (\n <div class={`form-field draggable ${field.readonly && 'fixed'}`} part=\"nbfc__form_field\" key={i}>\n <div class=\"form-field_header\" part=\"nbfc__form_field-header\">\n <span class=\"dragable\">\n <dragable-icon width=\"24\" height=\"25\"></dragable-icon>\n </span>\n <div class=\"form-field_header_text\">\n <h4>{i18next.t(`nylasBookingFormConfig.fieldLabel.${field.fieldLabelKey}`)}</h4>\n <p>{field.typeLabel}</p>\n </div>\n <div class=\"form-field_header_actions\">\n <span class={`is-required`}>{field.required ? i18next.t('required') : i18next.t('optional')}</span>\n <span\n class={`chevron ${field.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.fieldToggle(i);\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n <div class={`form-field_content ${!field.isOpen && 'hidden'}`} part=\"nbfc__form_field-content\">\n <div class=\"inputs\">\n <input-component\n class={'label-input'}\n name={`${i}`}\n key={i}\n label={i18next.t('nylasBookingFormConfig.label')}\n required={false}\n readOnly={field.readonly}\n defaultValue={field.label}\n >\n <div class=\"required-input\" slot=\"additional-input\">\n <input\n type=\"checkbox\"\n name={`required_${field.order}`}\n id={`required_${field.order}`}\n onClick={() => {\n this.fieldRequired(i);\n }}\n checked={field.required}\n disabled={field.readonly}\n />\n\n <label htmlFor={`required_${field.order}`} aria-label=\"Required\">\n {i18next.t('required')}\n </label>\n </div>\n </input-component>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n <div id=\"fields\" class=\"additional_fields\" part=\"nbfc__additional_fields\">\n {this.formFields?.map((field, i) => {\n return (\n <div class={`form-field draggable ${field?.readonly ? 'fixed' : ''}`} part=\"nbfc__form_field\" key={field.key}>\n <div class=\"form-field_header\" part=\"nbfc__form_field-header\">\n <span class=\"dragable\">\n <dragable-icon width=\"24\" height=\"25\"></dragable-icon>\n </span>\n <div class=\"form-field_header_text\">\n <h4>{i18next.t(`nylasBookingFormConfig.fieldLabel.${field.fieldLabelKey}`)}</h4>\n <p>{field.typeLabel}</p>\n </div>\n <div class=\"form-field_header_actions\">\n <span class={`is-required`}>{field.required ? i18next.t('required') : i18next.t('optional')}</span>\n {!field.readonly && (\n <button\n onClick={() => {\n const title = this.watchFields.title;\n const description = this.watchFields.description;\n if (title && field.key && title.includes(field.key)) {\n field.error = i18next.t('nylasBookingFormConfig.fieldInTitleError');\n this.formFields = [...this.formFields];\n this.formFieldsChangedHandler(this.formFields);\n setTimeout(() => {\n field.error = '';\n this.formFields = [...this.formFields];\n this.formFieldsChangedHandler(this.formFields);\n }, 3000);\n return;\n }\n if (description && field.key && description.includes(field.key)) {\n field.error = i18next.t('nylasBookingFormConfig.fieldInDescriptionError');\n this.formFields = [...this.formFields];\n this.formFieldsChangedHandler(this.formFields);\n setTimeout(() => {\n field.error = '';\n this.formFields = [...this.formFields];\n this.formFieldsChangedHandler(this.formFields);\n }, 3000);\n return;\n }\n this.fieldRemove(i);\n }}\n >\n <close-icon />\n </button>\n )}\n <span\n class={`chevron ${field.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.fieldToggle(i);\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n <span\n class={{\n 'error': true,\n 'fade-out': !field?.error || field.error === '',\n }}\n >\n {field.error}\n </span>\n <div class={`form-field_content ${!field.isOpen && 'hidden'}`} part=\"nbfc__form_field-content\">\n <div class=\"inputs\">\n <input-component\n class={'label-input'}\n name={`${i}`}\n key={`${i}-${field.key}-label`}\n label={i18next.t('nylasBookingFormConfig.label')}\n required={false}\n readOnly={field.readonly}\n defaultValue={field.label}\n >\n <div class=\"required-input\" slot=\"additional-input\">\n <input\n type=\"checkbox\"\n name={`required_${i}`}\n id={`required_${i}`}\n onClick={() => {\n this.fieldRequired(i);\n }}\n checked={field.required}\n disabled={field.readonly}\n />\n\n <label htmlFor={`required_${i}`} aria-label=\"Required\">\n {i18next.t('required')}\n </label>\n </div>\n </input-component>\n {!field.readonly && field.type !== 'date' && (\n <input-component\n class={'default-value'}\n name={`default-value-${i}`}\n key={`${i}-${field.key}-default-value`}\n label={i18next.t('nylasBookingFormConfig.defaultValue')}\n required={false}\n readOnly={field.readonly}\n defaultValue={field.default}\n />\n )}\n {!field.readonly && field.type === 'date' && (\n <nylas-date-component\n class={'default-value'}\n name={`default-value-${i}`}\n key={`${i}-${field.key}-default-value`}\n label={i18next.t('nylasBookingFormConfig.defaultValue')}\n required={false}\n readOnly={field.readonly}\n defaultValue={field.default}\n />\n )}\n </div>\n {field.options != undefined && (\n <div class=\"options-container\">\n <h4>{i18next.t('nylasBookingFormConfig.allOptionsHeader')}</h4>\n <div class=\"options\">\n {field.options.map((o, j) => {\n return (\n <div class=\"option\">\n <input-component key={j} name={`${i}_${j}`} label={field.typeLabel + ' option ' + (j + 1)} required={true} defaultValue={o}>\n {j > 1 && (\n <div class=\"required-input\" slot=\"additional-input\">\n <button\n onClick={() => {\n this.fieldOptionRemove(i, j);\n }}\n >\n <close-icon />\n </button>\n </div>\n )}\n </input-component>\n </div>\n );\n })}\n </div>\n <button\n onClick={() => {\n this.fieldOptionAdd(i);\n }}\n part=\"nap__add-time-range\"\n >\n <add-circle-icon /> {i18next.t('nylasBookingFormConfig.addOption')}\n </button>\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-booking-form-config.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE9H,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE3E,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA4BnD,MAAM,OAAO,sBAAsB;;QACzB,iBAAY,GAAG;YACrB;gBACE,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,WAAW;gBAClB,GAAG,EAAE,WA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,CAAC,IAAI,CACR,WAAK,KAAK,EAAC,gBAAgB,EAAC,IAAI,EAAC,kBAAkB;gDACjD,cACE,OAAO,EAAE,GAAG,EAAE;wDACZ,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oDAC/B,CAAC;oDAED,qBAAc,CACP,CACL,CACP,CACe,CACd,CACP,CAAC;oCACJ,CAAC,CAAC,CACE;oCACN,cACE,OAAO,EAAE,GAAG,EAAE;4CACZ,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;wCACzB,CAAC,EACD,IAAI,EAAC,qBAAqB;wCAE1B,0BAAmB;;wCAAE,OAAO,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAC3D,CACL,CACP,CACG,CACF,CACP,CAAC;oBACJ,CAAC,CAAC,CACE,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAnPC;IARC,iBAAiB,CAA4G;QAC5H,IAAI,EAAE,2BAA2B;QACjC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;SACzD,CAAC;QACF,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;oDAmPD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { DEFAULT_FORM_FIELD_TYPES, FIELD_TYPES } from '@/common/constants';\nimport { Configuration, AdditionalFields } from '@nylas/core';\nimport Sortable from 'sortablejs';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\ninterface AdditionalFieldsInternal extends AdditionalFields {\n isOpen: boolean;\n readonly?: boolean;\n typeLabel: string;\n key?: string; // Make optional\n error?: string; // Make optional\n fieldLabelKey?: string; // Make optional\n}\n\n/**\n * The `nylas-booking-form-config` component is a form input for adding additional fields to the booking form.\n * @part nbfc__header - The header of the booking form\n * @part nbfc__add_field - The add field selection container\n * @part nbfc__add_field-button - The add field selection button\n * @part nbfc__add_field-content - The add field selection dropdown content\n * @part nbfc__additional_fields - The aditional fields container\n * @part nbfc__form-field - The single form container\n * @part nbfc__form-field-header - The single form header\n * @part nbfc__form-field-content - The single form content\n */\n@Component({\n tag: 'nylas-booking-form-config',\n styleUrl: 'nylas-booking-form-config.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasBookingFormConfig {\n private staticFields = [\n {\n type: 'text',\n label: 'Your name',\n key: 'your_name',\n typeLabel: 'Short text',\n readonly: true,\n required: true,\n isOpen: false,\n fieldLabelKey: 'your_name',\n order: 0,\n },\n {\n type: 'email',\n label: 'Your Email',\n key: 'your_email',\n typeLabel: 'Email',\n readonly: true,\n isOpen: false,\n required: true,\n fieldLabelKey: 'your_email',\n order: 1,\n },\n ];\n /**\n * The element <nylas-booking-form-config> itself.\n */\n @Element() host!: HTMLNylasBookingFormConfigElement;\n\n /**\n * @internal\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * The name of the booking form config.\n */\n @Prop() name: string = 'additional-fields';\n\n /**\n * The additional fields to be displayed on the booking form.\n */\n @Prop() additionalFields?: AdditionalFields[];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * This event is fired when the selected availability / open hours change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n @State() formFields!: AdditionalFieldsInternal[];\n\n @State() formFieldsOrder!: AdditionalFieldsInternal[];\n\n @State() count: number = 0;\n\n @State() watchFields!: {\n title: string;\n description: string;\n };\n @State() fieldTypes = DEFAULT_FORM_FIELD_TYPES.map(f => {\n return { label: i18next.t(`nylasBookingFormConfig.fieldType.${f.value}`), value: f.value };\n });\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-calendar-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n this.updateFormFields(newValue, false);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n this.fieldTypes = DEFAULT_FORM_FIELD_TYPES.map(f => {\n return { label: i18next.t(`nylasBookingFormConfig.fieldType.${f.value}`), value: f.value };\n });\n }\n\n connectedCallback() {\n debug('nylas-booking-form-config', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-booking-form-config', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-booking-form-config', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.formFields = [];\n this.formFieldsChangedHandler(this.formFields, false);\n }\n\n componentDidLoad() {\n debug('nylas-booking-form-config', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.updateFormFields(this.selectedConfiguration, false);\n }\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function';\n }\n\n updateFormFields(config: Configuration, valueChanged: boolean = true) {\n this.watchFields = {\n title: config?.event_booking?.title || '',\n description: config?.event_booking?.description || '',\n };\n const additionalFields =\n Object.entries(config?.scheduler?.additional_fields || {}).map(([id, field]) => ({ ...(field as AdditionalFields), key: id })) || this.additionalFields || [];\n\n this.formFields = [\n ...additionalFields\n .sort((a, b) => a.order - b.order)\n .map((f: AdditionalFields, _i) => {\n const fieldType = FIELD_TYPES.find(field => field.type === f.type);\n if (!fieldType) {\n return { ...f, isOpen: false, typeLabel: 'Unknown' };\n }\n const typeLabel = fieldType.label;\n const order = f.order || 0;\n return { ...f, order: order - 1, isOpen: false, typeLabel, fieldLabelKey: f.type };\n }),\n ];\n this.formFields = [...this.formFields];\n\n this.formFieldsChangedHandler(this.formFields, valueChanged);\n const container = this.host.shadowRoot?.getElementById('fields');\n Sortable.create(container, {\n animation: 150,\n swap: true, // Enable swap plugin\n swapClass: 'highlight', // The class applied to the hovered swap item\n onEnd: this.swapFields.bind(this),\n handle: '.form-field_header', // Only allow dragging by the header\n filter: '.fixed', // Disable dragging for elements with the 'fixed' class\n fallbackTolerance: 3, // So that we can select items on mobile\n onMove: evt => !evt.related.classList.contains('fixed'), // Prevent moving if target has 'fixed' class\n });\n }\n\n formFieldsChangedHandler(newValue: AdditionalFieldsInternal[], valueChanged: boolean = true) {\n const additionalFields = newValue || [];\n // Remove readonly fields, sort by order\n const sortedFields = additionalFields\n .filter(f => !f.readonly)\n .sort((a, b) => a.order - b.order)\n .map((f, i) => {\n const field: AdditionalFields = {\n type: f.type,\n required: f.required,\n label: f.label,\n order: i + 1,\n options: f.options,\n key: f.key,\n default: f.default,\n fieldLabelKey: f.fieldLabelKey,\n };\n return { ...field };\n });\n\n // Map fields to object\n const addFieldsMap = sortedFields.reduce((acc, field) => {\n if (field.key) {\n // Only add fields with defined keys\n acc[field.key] = {\n type: field.type,\n required: field.required,\n order: field.order,\n options: field.options,\n label: field.label,\n default: field.default,\n };\n }\n return acc;\n }, {});\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(addFieldsMap), this.name);\n\n if (valueChanged) {\n // Do not emit the valueChanged event on initial load\n this.valueChanged.emit({\n value: JSON.stringify(addFieldsMap),\n name: this.name,\n });\n }\n this.formFields = [...this.formFields];\n }\n\n /**\n * This function finds the next missing number in an array of strings (keys of additional_fields).\n * We use this function to generate the next consecutive index number for the key.\n * For example,\n * - If the keys are ['dropdown_another-one_1', 'dropdown_Whatever-choose-one_3'] the function will return 2.\n * - If the array is empty, the function will return 1.\n * - If there are no missing numbers in between, the function will return the next number after the last element.\n *\n * @param arr of keys stored in the formFields for the given field type\n * @returns a number that is the next (consecutive) missing number in the array\n */\n findNextMissingNumber(arr: string[]): number {\n if (arr.length === 0) {\n return 1; // If the array is empty, the first number is 1\n }\n\n // Extract numbers from strings by splitting on underscore and popping the last element\n const numbers = arr\n .map(item => {\n const parts = item.split('_'); // Split the string by '_'\n const lastPart = parts.pop(); // Get the last part (should be the number)\n const parsedNumber = parseInt(lastPart || '', 10);\n return isNaN(parsedNumber) ? null : parsedNumber; // Return the parsed number or null if not a valid number\n })\n .filter((num): num is number => num !== null) // Filter out any null values and assert that the result is a number\n .sort((a, b) => a - b); // Sort numbers in ascending order\n\n // Iterate through the sorted numbers to find the missing number\n for (let i = 0; i < numbers.length - 1; i++) {\n if (numbers[i + 1] !== numbers[i] + 1) {\n return numbers[i] + 1; // Return the missing number\n }\n }\n\n // If no number is missing in between, return the next number after the last element\n return numbers.length > 0 ? numbers[numbers.length - 1] + 1 : 1;\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'add-field') {\n const field = FIELD_TYPES.find(f => f.type === value);\n const maxOrder = Math.max(...this.formFields.map(f => f.order));\n const existingFieldKeys = this.formFields.filter(f => f.type === field.type && f.key !== undefined).map(f => f.key as string);\n const next = this.findNextMissingNumber(existingFieldKeys);\n const newField = { ...field, label: field.label, key: `${field.type}_${field.label.split(' ').join('-')}_${next}`, order: maxOrder + 1 }; // Copy object + Ensure unique order\n this.formFields = [...this.formFields, newField];\n this.formFieldsChangedHandler(this.formFields);\n }\n }\n\n @Listen('nylasFormInputChanged')\n nylasFormInputChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name } = event.detail;\n if (name.startsWith('default-value-')) {\n const fieldIndex = parseInt(name.split('-').pop() || '0');\n this.fieldDefaultValueChanged(fieldIndex, event);\n } else {\n const [fieldIndex, optionIndex] = name.split('_');\n if (optionIndex) {\n this.fieldOptionChange(parseInt(fieldIndex), parseInt(optionIndex), event);\n } else {\n this.fieldLabelChange(parseInt(fieldIndex), event);\n }\n }\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'title' || name === 'description') {\n this.watchFields = {\n ...this.watchFields,\n [name]: value,\n };\n }\n }\n\n swapFields(event) {\n const { oldIndex, newIndex } = event;\n if (oldIndex == null || newIndex == null || oldIndex === newIndex) {\n return;\n }\n console.log('###swapFields', oldIndex, newIndex);\n // Create a copy of the current fields array\n const updatedFields = [...this.formFields];\n\n // Remove the dragged item from its old position\n const [draggedItem] = updatedFields.splice(oldIndex, 1);\n\n // Insert the dragged item at its new position\n updatedFields.splice(newIndex, 0, draggedItem);\n\n // Recalculate order for each field (starting at 1 as required)\n updatedFields.forEach((field, index) => {\n field.order = index + 1;\n });\n\n // Update state and trigger UI re-render\n this.formFields = updatedFields;\n this.formFieldsChangedHandler(this.formFields);\n }\n\n fieldToggle(index) {\n this.formFields = this.formFields.map((f, i) => {\n if (index == i) {\n f.isOpen = !f.isOpen;\n }\n return f;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n fieldRemove(index) {\n this.formFields = this.formFields.filter((_, i) => i !== index);\n this.formFieldsChangedHandler(this.formFields);\n }\n\n fieldRequired(index) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === index) {\n field.required = !field.required;\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n fieldLabelChange(ind, event) {\n const target = event.detail;\n this.formFields = this.formFields.map((field, i) => {\n if (i === ind) {\n const label = target.value;\n return {\n ...field,\n label: label,\n };\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n fieldOptionAdd(index) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === index) {\n if (!field.options) {\n field.options = [];\n }\n field.options = [...field.options, ''];\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n\n fieldOptionRemove(fieldIndex, index) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === fieldIndex) {\n if (!field.options) {\n field.options = [];\n }\n field.options = field.options.filter((_, i) => i !== index);\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n fieldOptionChange(fieldIndex, index, event) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === fieldIndex) {\n if (!field.options) {\n field.options = [];\n }\n field.options = field.options.map((o, i) => {\n if (i === index) {\n o = event.detail.value;\n }\n return o;\n });\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n\n fieldDefaultValueChanged(index, event) {\n this.formFields = this.formFields.map((field, i) => {\n if (i === index) {\n field.default = event.detail.value;\n }\n return field;\n });\n this.formFieldsChangedHandler(this.formFields);\n }\n\n @RegisterComponent<NylasBookingFormConfig, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-booking-form-config',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-booking-form-config\" part=\"nbfc\">\n <div class=\"header\" part=\"nbfc__header\">\n <div class=\"header_text\">\n <h3>{i18next.t('nylasBookingFormConfig.headerTitle')}</h3>\n <p>{i18next.t('nylasBookingFormConfig.headerSubTitle')}</p>\n </div>\n <div class=\"header_action\">\n <select-dropdown\n name=\"add-field\"\n exportparts=\"sd_dropdown: nbfc__add_field, sd_dropdown-button: nbfc__add_field-button, sd_dropdown-content: nbfc__add_field-dropdown-content\"\n options={this.fieldTypes}\n withSearch={false}\n withChevron={false}\n dropdownButtonText={i18next.t('nylasBookingFormConfig.dropdownButtonText')}\n >\n <span slot=\"select-icon\">\n <plus-icon width=\"15\" height=\"15\"></plus-icon>\n </span>\n </select-dropdown>\n </div>\n </div>\n <div class=\"content\">\n <div class=\"additional_fields static_fields\" part=\"nbfc__static_fields\">\n {this.staticFields.map((field, i) => {\n return (\n <div class={`form-field draggable ${field.readonly && 'fixed'}`} part=\"nbfc__form_field\" key={i}>\n <div class=\"form-field_header\" part=\"nbfc__form_field-header\">\n <span class=\"dragable\">\n <dragable-icon width=\"24\" height=\"25\"></dragable-icon>\n </span>\n <div class=\"form-field_header_text\">\n <h4>{i18next.t(`nylasBookingFormConfig.fieldLabel.${field.fieldLabelKey}`)}</h4>\n <p>{field.typeLabel}</p>\n </div>\n <div class=\"form-field_header_actions\">\n <span class={`is-required`}>{field.required ? i18next.t('required') : i18next.t('optional')}</span>\n <span\n class={`chevron ${field.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.fieldToggle(i);\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n <div class={`form-field_content ${!field.isOpen && 'hidden'}`} part=\"nbfc__form_field-content\">\n <div class=\"inputs\">\n <input-component\n class={'label-input'}\n name={`${i}`}\n key={i}\n label={i18next.t('nylasBookingFormConfig.label')}\n required={false}\n readOnly={field.readonly}\n defaultValue={field.label}\n >\n <div class=\"required-input\" slot=\"additional-input\">\n <input\n type=\"checkbox\"\n name={`required_${field.order}`}\n id={`required_${field.order}`}\n onClick={() => {\n this.fieldRequired(i);\n }}\n checked={field.required}\n disabled={field.readonly}\n />\n\n <label htmlFor={`required_${field.order}`} aria-label=\"Required\">\n {i18next.t('required')}\n </label>\n </div>\n </input-component>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n <div id=\"fields\" class=\"additional_fields\" part=\"nbfc__additional_fields\">\n {this.formFields?.map((field, i) => {\n return (\n <div class={`form-field draggable ${field?.readonly ? 'fixed' : ''}`} part=\"nbfc__form_field\" key={field.key}>\n <div class=\"form-field_header\" part=\"nbfc__form_field-header\">\n <span class=\"dragable\">\n <dragable-icon width=\"24\" height=\"25\"></dragable-icon>\n </span>\n <div class=\"form-field_header_text\">\n <h4>{i18next.t(`nylasBookingFormConfig.fieldLabel.${field.fieldLabelKey}`)}</h4>\n <p>{field.typeLabel}</p>\n </div>\n <div class=\"form-field_header_actions\">\n <span class={`is-required`}>{field.required ? i18next.t('required') : i18next.t('optional')}</span>\n {!field.readonly && (\n <button\n onClick={() => {\n const title = this.watchFields.title;\n const description = this.watchFields.description;\n if (title && field.key && title.includes(field.key)) {\n field.error = i18next.t('nylasBookingFormConfig.fieldInTitleError');\n this.formFields = [...this.formFields];\n this.formFieldsChangedHandler(this.formFields);\n setTimeout(() => {\n field.error = '';\n this.formFields = [...this.formFields];\n this.formFieldsChangedHandler(this.formFields);\n }, 3000);\n return;\n }\n if (description && field.key && description.includes(field.key)) {\n field.error = i18next.t('nylasBookingFormConfig.fieldInDescriptionError');\n this.formFields = [...this.formFields];\n this.formFieldsChangedHandler(this.formFields);\n setTimeout(() => {\n field.error = '';\n this.formFields = [...this.formFields];\n this.formFieldsChangedHandler(this.formFields);\n }, 3000);\n return;\n }\n this.fieldRemove(i);\n }}\n >\n <close-icon />\n </button>\n )}\n <span\n class={`chevron ${field.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.fieldToggle(i);\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n <span\n class={{\n 'error': true,\n 'fade-out': !field?.error || field.error === '',\n }}\n >\n {field.error}\n </span>\n <div class={`form-field_content ${!field.isOpen && 'hidden'}`} part=\"nbfc__form_field-content\">\n <div class=\"inputs\">\n <input-component\n class={'label-input'}\n name={`${i}`}\n key={`${i}-${field.key}-label`}\n label={i18next.t('nylasBookingFormConfig.label')}\n required={false}\n readOnly={field.readonly}\n defaultValue={field.label}\n >\n <div class=\"required-input\" slot=\"additional-input\">\n <input\n type=\"checkbox\"\n name={`required_${i}`}\n id={`required_${i}`}\n onClick={() => {\n this.fieldRequired(i);\n }}\n checked={field.required}\n disabled={field.readonly}\n />\n\n <label htmlFor={`required_${i}`} aria-label=\"Required\">\n {i18next.t('required')}\n </label>\n </div>\n </input-component>\n {!field.readonly && field.type !== 'date' && (\n <input-component\n class={'default-value'}\n name={`default-value-${i}`}\n key={`${i}-${field.key}-default-value`}\n label={i18next.t('nylasBookingFormConfig.defaultValue')}\n required={false}\n readOnly={field.readonly}\n defaultValue={field.default}\n />\n )}\n {!field.readonly && field.type === 'date' && (\n <nylas-date-component\n class={'default-value'}\n name={`default-value-${i}`}\n key={`${i}-${field.key}-default-value`}\n label={i18next.t('nylasBookingFormConfig.defaultValue')}\n required={false}\n readOnly={field.readonly}\n defaultValue={field.default}\n />\n )}\n </div>\n {field.options != undefined && (\n <div class=\"options-container\">\n <h4>{i18next.t('nylasBookingFormConfig.allOptionsHeader')}</h4>\n <div class=\"options\">\n {field.options.map((o, j) => {\n return (\n <div class=\"option\">\n <input-component key={j} name={`${i}_${j}`} label={field.typeLabel + ' option ' + (j + 1)} required={true} defaultValue={o}>\n {j > 1 && (\n <div class=\"required-input\" slot=\"additional-input\">\n <button\n onClick={() => {\n this.fieldOptionRemove(i, j);\n }}\n >\n <close-icon />\n </button>\n </div>\n )}\n </input-component>\n </div>\n );\n })}\n </div>\n <button\n onClick={() => {\n this.fieldOptionAdd(i);\n }}\n part=\"nap__add-time-range\"\n >\n <add-circle-icon /> {i18next.t('nylasBookingFormConfig.addOption')}\n </button>\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -499,9 +499,9 @@ export class NylasEditorTabsGroup {
|
|
|
499
499
|
}
|
|
500
500
|
render() {
|
|
501
501
|
debug('[nylas-editor-tabs-group]', 'render', this.formState);
|
|
502
|
-
return (h(Host, { key: '
|
|
502
|
+
return (h(Host, { key: 'cf025708c655e2aee605430428f78cc98b83a36d' }, h("form", { key: 'b9043cb7810321296d11bd11934e8cb7bcc79eb1', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el), noValidate: true }, this.mode === 'app' ? (h("div", { class: "return-to-calendar-view", part: "editor__return-to-calendar-view net__return-to-calendar-view" }, h("button-component", { id: "return-to-calendar-view-button", variant: "invisible", part: "nset__header__back-button", type: "button", onClick: e => {
|
|
503
503
|
this.setActiveTab(e, TabGroup.CalendarView);
|
|
504
|
-
} }, h("chevron-icon", { width: "16", height: "16" }), h("span", null, "Return to Calendar view")))) : null, this.mode === 'app' ? (h("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, h("div", { class: "tabs", part: "editor__tabs net__tabs" }, h("button", { name: TabGroup.BookingOptions, class: { tab: true, active: this.activeTab == TabGroup.BookingOptions, hide: this.hideTab(TabGroup.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: e => this.setActiveTab(e, TabGroup.BookingOptions) }, h("flow-icon", { width: "16", height: "16" }), i18next.t('bookingOptionsTab')), h("button", { name: TabGroup.BookingForm, class: { tab: true, active: this.activeTab == TabGroup.BookingForm, hide: this.hideTab(TabGroup.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: e => this.setActiveTab(e, TabGroup.BookingForm) }, this.activeTab == TabGroup.BookingForm ? h("calendar-agenda-fill-icon", { width: "16", height: "16" }) : h("calendar-agenda-icon", { width: "16", height: "16" }), i18next.t('bookingFormTab')), h("button", { name: TabGroup.Communications, class: { tab: true, active: this.activeTab == TabGroup.Communications, hide: this.hideTab(TabGroup.Communications) }, onClick: e => this.setActiveTab(e, TabGroup.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == TabGroup.Communications ? h("envelope-fill-icon", { width: "16", height: "16" }) : h("envelope-icon", { width: "16", height: "16" }), i18next.t('communicationsTab')), h("button", { name: TabGroup.PageStyles, class: { tab: true, active: this.activeTab == TabGroup.PageStyles, hide: this.hideTab(TabGroup.PageStyles) }, onClick: e => this.setActiveTab(e, TabGroup.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == TabGroup.PageStyles ? h("paintbrush-fill-icon", { width: "16", height: "16" }) : h("paintbrush-icon", { width: "16", height: "16" }), i18next.t('pageStylesTab'))), h("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, h(TabContentsGroup, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: this.selectedConfiguration?.id ?? 'new', i18next: i18next })))) : (h("div", { class: "composable", key: this.selectedConfiguration?.id }, h("slot", null))), h("div", { key: '
|
|
504
|
+
} }, h("chevron-icon", { width: "16", height: "16" }), h("span", null, "Return to Calendar view")))) : null, this.mode === 'app' ? (h("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, h("div", { class: "tabs", part: "editor__tabs net__tabs" }, h("button", { name: TabGroup.BookingOptions, class: { tab: true, active: this.activeTab == TabGroup.BookingOptions, hide: this.hideTab(TabGroup.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: e => this.setActiveTab(e, TabGroup.BookingOptions) }, h("flow-icon", { width: "16", height: "16" }), i18next.t('bookingOptionsTab')), h("button", { name: TabGroup.BookingForm, class: { tab: true, active: this.activeTab == TabGroup.BookingForm, hide: this.hideTab(TabGroup.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: e => this.setActiveTab(e, TabGroup.BookingForm) }, this.activeTab == TabGroup.BookingForm ? h("calendar-agenda-fill-icon", { width: "16", height: "16" }) : h("calendar-agenda-icon", { width: "16", height: "16" }), i18next.t('bookingFormTab')), h("button", { name: TabGroup.Communications, class: { tab: true, active: this.activeTab == TabGroup.Communications, hide: this.hideTab(TabGroup.Communications) }, onClick: e => this.setActiveTab(e, TabGroup.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == TabGroup.Communications ? h("envelope-fill-icon", { width: "16", height: "16" }) : h("envelope-icon", { width: "16", height: "16" }), i18next.t('communicationsTab')), h("button", { name: TabGroup.PageStyles, class: { tab: true, active: this.activeTab == TabGroup.PageStyles, hide: this.hideTab(TabGroup.PageStyles) }, onClick: e => this.setActiveTab(e, TabGroup.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == TabGroup.PageStyles ? h("paintbrush-fill-icon", { width: "16", height: "16" }) : h("paintbrush-icon", { width: "16", height: "16" }), i18next.t('pageStylesTab'))), h("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, h(TabContentsGroup, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: this.selectedConfiguration?.id ?? 'new', i18next: i18next })))) : (h("div", { class: "composable", key: this.selectedConfiguration?.id }, h("slot", null))), h("div", { key: '50f69aab7b22a587606b5406c91759e51addb44f', class: "footer", part: "editor__footer net__footer" }, h("div", { key: '26ebcb6c1cc508e1f10fe20eb4c5857023173605', class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && (h("button-component", { title: "Share your feedback", id: "report-issue", variant: 'basic', onClick: e => this.onFeedbackClick(e) }, h("feedback-icon", null))), this.activeTab === TabGroup.CalendarView && (h("button-component", { title: "Go to page settings", id: "page-settings", variant: 'basic', onClick: e => this.setActiveTab(e, TabGroup.BookingOptions) }, "Page settings"))), h("div", { key: 'ee32dd94e37aeb792814141170a5767d731269bb', class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, h("p", { key: '498062aecdb216bc247b2e114ac2e8bf69183fd8', class: {
|
|
505
505
|
'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,
|
|
506
506
|
'saved-changes': this.changesSaved,
|
|
507
507
|
'error': this.error !== '',
|
|
@@ -510,17 +510,17 @@ export class NylasEditorTabsGroup {
|
|
|
510
510
|
? i18next.t('unsavedChangesLabel')
|
|
511
511
|
: this.error == '' && this.changesSaved
|
|
512
512
|
? `${i18next.t('changesSavedLabel')}!`
|
|
513
|
-
: ''), h("div", { key: '
|
|
513
|
+
: ''), h("div", { key: 'f0dface3c46b80bc47567a4e681bf41cf312a514', class: "footer-buttons__row" }, this.schedulerPreviewLink !== '' && this.action === 'edit' && (h("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: event => {
|
|
514
514
|
event.preventDefault();
|
|
515
515
|
const previewEvent = this.previewButtonClicked.emit(this.host);
|
|
516
516
|
if (!previewEvent.defaultPrevented) {
|
|
517
517
|
window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');
|
|
518
518
|
}
|
|
519
|
-
}, variant: 'basic' }, h("eye-icon", null))), h("button-component", { key: '
|
|
519
|
+
}, variant: 'basic' }, h("eye-icon", null))), h("button-component", { key: '1eeecd13d02200db7e19dcdd82196d03e6bd8347', type: "button", disabled: this.isLoading, clickHandler: event => {
|
|
520
520
|
event.preventDefault();
|
|
521
521
|
this.cancelButtonClick.emit();
|
|
522
522
|
this.error = '';
|
|
523
|
-
}, variant: 'basic', part: "editor__footer-cancel net__footer-cancel" }, i18next.t('backButton')), h("button-component", { key: '
|
|
523
|
+
}, variant: 'basic', part: "editor__footer-cancel net__footer-cancel" }, i18next.t('backButton')), h("button-component", { key: '28d33ae984c3a42a985342c7dda7d45c296a27bb', type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? (h("span", null, i18next.t('savingButtonText'), h("loading-icon", null), ' ')) : this.action === 'create' ? (`${i18next.t('createButtonText')}`) : (`${i18next.t('saveChangesButtonText')}`)))))), this.showFeedbackModal && h("nylas-feedback-form", null)));
|
|
524
524
|
}
|
|
525
525
|
static get is() { return "nylas-editor-tabs-group"; }
|
|
526
526
|
static get encapsulation() { return "scoped"; }
|