@xplor-education/core-stencil-components 2.0.0 → 3.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/components/index.js +1 -1
- package/components/index.js.map +1 -1
- package/components/{p-B1W2qj2l.js → p-B3zR7peH.js} +4 -4
- package/components/p-B3zR7peH.js.map +1 -0
- package/components/{p-Ddr35stE.js → p-BRWe4TXp.js} +65 -5
- package/components/p-BRWe4TXp.js.map +1 -0
- package/components/{p-CBSi5kQB.js → p-Bs_ocvfe.js} +7 -3
- package/components/p-Bs_ocvfe.js.map +1 -0
- package/components/{p-CTD6SyTD.js → p-D4jVa8dE.js} +20 -4
- package/components/p-D4jVa8dE.js.map +1 -0
- package/components/{p-x30CgLRv.js → p-DURNLP66.js} +71 -6
- package/components/p-DURNLP66.js.map +1 -0
- package/components/{p-BK_ATKuB.js → p-DxxjL3sU.js} +3 -3
- package/components/{p-BK_ATKuB.js.map → p-DxxjL3sU.js.map} +1 -1
- package/components/xplor-alert-dialog.js +60 -3
- package/components/xplor-alert-dialog.js.map +1 -1
- package/components/xplor-assistant.js +3 -3
- package/components/xplor-assistant.js.map +1 -1
- package/components/xplor-autocomplete.js +15 -9
- package/components/xplor-autocomplete.js.map +1 -1
- package/components/xplor-avatar-and-name.js +1 -1
- package/components/xplor-avatar.js +1 -1
- package/components/xplor-btn-back-to-parent.js +7 -2
- package/components/xplor-btn-back-to-parent.js.map +1 -1
- package/components/xplor-btn-icon.js +3 -2
- package/components/xplor-btn-icon.js.map +1 -1
- package/components/xplor-btn-menu.js +103 -6
- package/components/xplor-btn-menu.js.map +1 -1
- package/components/xplor-btn-tooltip.js +2 -2
- package/components/xplor-button.js +1 -1
- package/components/xplor-chat-widget.js +2 -2
- package/components/xplor-checkbox.js +3 -1
- package/components/xplor-checkbox.js.map +1 -1
- package/components/xplor-combobox.js +20 -10
- package/components/xplor-combobox.js.map +1 -1
- package/components/xplor-datatable.js +10 -4
- package/components/xplor-datatable.js.map +1 -1
- package/components/xplor-date-picker.js +9 -5
- package/components/xplor-date-picker.js.map +1 -1
- package/components/xplor-drag-and-drop-input.js +43 -5
- package/components/xplor-drag-and-drop-input.js.map +1 -1
- package/components/xplor-dropdown.js +1 -1
- package/components/xplor-expansion-panel.js +4 -4
- package/components/xplor-expansion-panel.js.map +1 -1
- package/components/xplor-expansion-panels.js +1 -1
- package/components/xplor-expansion-panels.js.map +1 -1
- package/components/xplor-file-upload.js +2 -2
- package/components/xplor-file-upload.js.map +1 -1
- package/components/xplor-inline-checkbox.js +2 -2
- package/components/xplor-inline-date-picker.js +1 -1
- package/components/xplor-inline-switch.js +1 -1
- package/components/xplor-input-file.js +3 -1
- package/components/xplor-input-file.js.map +1 -1
- package/components/xplor-input-search.js +4 -2
- package/components/xplor-input-search.js.map +1 -1
- package/components/xplor-input-select.js +127 -7
- package/components/xplor-input-select.js.map +1 -1
- package/components/xplor-input-send.js +3 -3
- package/components/xplor-input-send.js.map +1 -1
- package/components/xplor-input-text-area.js +6 -2
- package/components/xplor-input-text-area.js.map +1 -1
- package/components/xplor-input-text-secondary.js +6 -2
- package/components/xplor-input-text-secondary.js.map +1 -1
- package/components/xplor-input-text.js +6 -2
- package/components/xplor-input-text.js.map +1 -1
- package/components/xplor-input-title.js +7 -2
- package/components/xplor-input-title.js.map +1 -1
- package/components/xplor-links.js +5 -2
- package/components/xplor-links.js.map +1 -1
- package/components/xplor-modal-persistent.js +2 -2
- package/components/xplor-modal.js +1 -1
- package/components/xplor-nav-tabs.js +41 -3
- package/components/xplor-nav-tabs.js.map +1 -1
- package/components/xplor-radio-btn.d.ts +11 -0
- package/components/xplor-radio-btn.js +131 -0
- package/components/xplor-radio-btn.js.map +1 -0
- package/components/xplor-section-card.js +2 -2
- package/components/xplor-section-card.js.map +1 -1
- package/components/xplor-section-heading.js +9 -3
- package/components/xplor-section-heading.js.map +1 -1
- package/components/xplor-table.js +14 -9
- package/components/xplor-table.js.map +1 -1
- package/components/xplor-text-bubble.js +2 -2
- package/components/xplor-text-field.js +2 -2
- package/components/xplor-time-picker.js +6 -6
- package/components/xplor-tooltip.js +1 -1
- package/dist/cjs/{index-Bc5o_4vY.js → index-BjAapk2n.js} +5 -5
- package/dist/cjs/index-BjAapk2n.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{xplor-alert-dialog_57.cjs.entry.js → xplor-alert-dialog_58.cjs.entry.js} +747 -108
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js.map +1 -0
- package/dist/cjs/xplor-component-library.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/xplor-alert-dialog/xplor-alert-dialog.js +85 -1
- package/dist/collection/components/xplor-alert-dialog/xplor-alert-dialog.js.map +1 -1
- package/dist/collection/components/xplor-assistant/internal/AssistantInput.js +1 -1
- package/dist/collection/components/xplor-assistant/internal/AssistantInput.js.map +1 -1
- package/dist/collection/components/xplor-assistant/xplor-assistant.js +1 -1
- package/dist/collection/components/xplor-assistant/xplor-assistant.js.map +1 -1
- package/dist/collection/components/xplor-autocomplete/xplor-autocomplete.js +33 -9
- package/dist/collection/components/xplor-autocomplete/xplor-autocomplete.js.map +1 -1
- package/dist/collection/components/xplor-avatar/xplor-avatar.js +2 -2
- package/dist/collection/components/xplor-avatar/xplor-avatar.js.map +1 -1
- package/dist/collection/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.js +25 -1
- package/dist/collection/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.js.map +1 -1
- package/dist/collection/components/xplor-btn-icon/xplor-btn-icon.js +20 -1
- package/dist/collection/components/xplor-btn-icon/xplor-btn-icon.js.map +1 -1
- package/dist/collection/components/xplor-btn-menu/xplor-btn-menu.js +129 -5
- package/dist/collection/components/xplor-btn-menu/xplor-btn-menu.js.map +1 -1
- package/dist/collection/components/xplor-button/xplor-button.js +42 -1
- package/dist/collection/components/xplor-button/xplor-button.js.map +1 -1
- package/dist/collection/components/xplor-checkbox/xplor-checkbox.js +3 -1
- package/dist/collection/components/xplor-checkbox/xplor-checkbox.js.map +1 -1
- package/dist/collection/components/xplor-combobox/xplor-combobox.js +38 -10
- package/dist/collection/components/xplor-combobox/xplor-combobox.js.map +1 -1
- package/dist/collection/components/xplor-datatable/xplor-datatable.js +10 -4
- package/dist/collection/components/xplor-datatable/xplor-datatable.js.map +1 -1
- package/dist/collection/components/xplor-date-picker/xplor-date-picker.js +8 -4
- package/dist/collection/components/xplor-date-picker/xplor-date-picker.js.map +1 -1
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.css +125 -21
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js +79 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/collection/components/xplor-dropdown/xplor-dropdown.js +1 -1
- package/dist/collection/components/xplor-expansion-panel/xplor-expansion-panel.js +4 -4
- package/dist/collection/components/xplor-expansion-panel/xplor-expansion-panel.js.map +1 -1
- package/dist/collection/components/xplor-expansion-panels/xplor-expansion-panels.js +1 -1
- package/dist/collection/components/xplor-expansion-panels/xplor-expansion-panels.js.map +1 -1
- package/dist/collection/components/xplor-file-upload/xplor-file-upload.js +2 -2
- package/dist/collection/components/xplor-file-upload/xplor-file-upload.js.map +1 -1
- package/dist/collection/components/xplor-inline-checkbox/xplor-inline-checkbox.js +2 -2
- package/dist/collection/components/xplor-inline-date-picker/xplor-inline-date-picker.js +77 -3
- package/dist/collection/components/xplor-inline-date-picker/xplor-inline-date-picker.js.map +1 -1
- package/dist/collection/components/xplor-inline-switch/xplor-inline-switch.js +1 -1
- package/dist/collection/components/xplor-input-file/xplor-input-file.js +3 -1
- package/dist/collection/components/xplor-input-file/xplor-input-file.js.map +1 -1
- package/dist/collection/components/xplor-input-search/xplor-input-search.js +4 -2
- package/dist/collection/components/xplor-input-search/xplor-input-search.js.map +1 -1
- package/dist/collection/components/xplor-input-select/xplor-input-select.css +1 -6
- package/dist/collection/components/xplor-input-select/xplor-input-select.js +152 -5
- package/dist/collection/components/xplor-input-select/xplor-input-select.js.map +1 -1
- package/dist/collection/components/xplor-input-send/xplor-input-send.js +2 -2
- package/dist/collection/components/xplor-input-send/xplor-input-send.js.map +1 -1
- package/dist/collection/components/xplor-input-text/xplor-input-text.js +6 -2
- package/dist/collection/components/xplor-input-text/xplor-input-text.js.map +1 -1
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js +6 -2
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js.map +1 -1
- package/dist/collection/components/xplor-input-text-secondary/xplor-input-text-secondary.js +6 -2
- package/dist/collection/components/xplor-input-text-secondary/xplor-input-text-secondary.js.map +1 -1
- package/dist/collection/components/xplor-input-title/xplor-input-title.js +25 -1
- package/dist/collection/components/xplor-input-title/xplor-input-title.js.map +1 -1
- package/dist/collection/components/xplor-links/xplor-links.js +25 -1
- package/dist/collection/components/xplor-links/xplor-links.js.map +1 -1
- package/dist/collection/components/xplor-modal/xplor-modal.js +88 -1
- package/dist/collection/components/xplor-modal/xplor-modal.js.map +1 -1
- package/dist/collection/components/xplor-modal-persistent/xplor-modal-persistent.js +1 -1
- package/dist/collection/components/xplor-nav-tabs/xplor-nav-tabs.js +49 -2
- package/dist/collection/components/xplor-nav-tabs/xplor-nav-tabs.js.map +1 -1
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.css +386 -0
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js +275 -0
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js.map +1 -0
- package/dist/collection/components/xplor-section-card/xplor-section-card.js +2 -2
- package/dist/collection/components/xplor-section-card/xplor-section-card.js.map +1 -1
- package/dist/collection/components/xplor-section-heading/xplor-section-heading.js +27 -2
- package/dist/collection/components/xplor-section-heading/xplor-section-heading.js.map +1 -1
- package/dist/collection/components/xplor-table/xplor-table.js +14 -9
- package/dist/collection/components/xplor-table/xplor-table.js.map +1 -1
- package/dist/collection/components/xplor-text-bubble/xplor-text-bubble.js +2 -2
- package/dist/collection/components/xplor-text-field/xplor-text-field.js +2 -2
- package/dist/collection/components/xplor-time-picker/xplor-time-picker.js +6 -6
- package/dist/collection/components/xplor-tooltip/xplor-tooltip.js +18 -2
- package/dist/collection/components/xplor-tooltip/xplor-tooltip.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-BHdeGt6k.js → p--zhT6rvJ.js} +4 -4
- package/dist/components/p--zhT6rvJ.js.map +1 -0
- package/dist/components/{p-DKh6y3GY.js → p-04oMLTZR.js} +65 -5
- package/dist/components/p-04oMLTZR.js.map +1 -0
- package/dist/components/{p-DIv_A5Gj.js → p-B5rS_jjI.js} +7 -3
- package/dist/components/p-B5rS_jjI.js.map +1 -0
- package/dist/components/{p-4l9DAhAo.js → p-DbQ6ZNvh.js} +20 -4
- package/dist/components/p-DbQ6ZNvh.js.map +1 -0
- package/dist/components/{p-BIFlTsO8.js → p-Dh0wQJt6.js} +71 -6
- package/dist/components/p-Dh0wQJt6.js.map +1 -0
- package/dist/components/{p-CJGP2_5k.js → p-oOSnPjGy.js} +3 -3
- package/dist/components/{p-CJGP2_5k.js.map → p-oOSnPjGy.js.map} +1 -1
- package/dist/components/xplor-alert-dialog.js +60 -3
- package/dist/components/xplor-alert-dialog.js.map +1 -1
- package/dist/components/xplor-assistant.js +3 -3
- package/dist/components/xplor-assistant.js.map +1 -1
- package/dist/components/xplor-autocomplete.js +15 -9
- package/dist/components/xplor-autocomplete.js.map +1 -1
- package/dist/components/xplor-avatar-and-name.js +1 -1
- package/dist/components/xplor-avatar.js +1 -1
- package/dist/components/xplor-btn-back-to-parent.js +7 -2
- package/dist/components/xplor-btn-back-to-parent.js.map +1 -1
- package/dist/components/xplor-btn-icon.js +3 -2
- package/dist/components/xplor-btn-icon.js.map +1 -1
- package/dist/components/xplor-btn-menu.js +103 -6
- package/dist/components/xplor-btn-menu.js.map +1 -1
- package/dist/components/xplor-btn-tooltip.js +2 -2
- package/dist/components/xplor-button.js +1 -1
- package/dist/components/xplor-chat-widget.js +2 -2
- package/dist/components/xplor-checkbox.js +3 -1
- package/dist/components/xplor-checkbox.js.map +1 -1
- package/dist/components/xplor-combobox.js +20 -10
- package/dist/components/xplor-combobox.js.map +1 -1
- package/dist/components/xplor-datatable.js +10 -4
- package/dist/components/xplor-datatable.js.map +1 -1
- package/dist/components/xplor-date-picker.js +9 -5
- package/dist/components/xplor-date-picker.js.map +1 -1
- package/dist/components/xplor-drag-and-drop-input.js +43 -5
- package/dist/components/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/components/xplor-dropdown.js +1 -1
- package/dist/components/xplor-expansion-panel.js +4 -4
- package/dist/components/xplor-expansion-panel.js.map +1 -1
- package/dist/components/xplor-expansion-panels.js +1 -1
- package/dist/components/xplor-expansion-panels.js.map +1 -1
- package/dist/components/xplor-file-upload.js +2 -2
- package/dist/components/xplor-file-upload.js.map +1 -1
- package/dist/components/xplor-inline-checkbox.js +2 -2
- package/dist/components/xplor-inline-date-picker.js +1 -1
- package/dist/components/xplor-inline-switch.js +1 -1
- package/dist/components/xplor-input-file.js +3 -1
- package/dist/components/xplor-input-file.js.map +1 -1
- package/dist/components/xplor-input-search.js +4 -2
- package/dist/components/xplor-input-search.js.map +1 -1
- package/dist/components/xplor-input-select.js +127 -7
- package/dist/components/xplor-input-select.js.map +1 -1
- package/dist/components/xplor-input-send.js +3 -3
- package/dist/components/xplor-input-send.js.map +1 -1
- package/dist/components/xplor-input-text-area.js +6 -2
- package/dist/components/xplor-input-text-area.js.map +1 -1
- package/dist/components/xplor-input-text-secondary.js +6 -2
- package/dist/components/xplor-input-text-secondary.js.map +1 -1
- package/dist/components/xplor-input-text.js +6 -2
- package/dist/components/xplor-input-text.js.map +1 -1
- package/dist/components/xplor-input-title.js +7 -2
- package/dist/components/xplor-input-title.js.map +1 -1
- package/dist/components/xplor-links.js +5 -2
- package/dist/components/xplor-links.js.map +1 -1
- package/dist/components/xplor-modal-persistent.js +2 -2
- package/dist/components/xplor-modal.js +1 -1
- package/dist/components/xplor-nav-tabs.js +41 -3
- package/dist/components/xplor-nav-tabs.js.map +1 -1
- package/dist/components/xplor-radio-btn.d.ts +11 -0
- package/dist/components/xplor-radio-btn.js +132 -0
- package/dist/components/xplor-radio-btn.js.map +1 -0
- package/dist/components/xplor-section-card.js +2 -2
- package/dist/components/xplor-section-card.js.map +1 -1
- package/dist/components/xplor-section-heading.js +9 -3
- package/dist/components/xplor-section-heading.js.map +1 -1
- package/dist/components/xplor-table.js +14 -9
- package/dist/components/xplor-table.js.map +1 -1
- package/dist/components/xplor-text-bubble.js +2 -2
- package/dist/components/xplor-text-field.js +2 -2
- package/dist/components/xplor-time-picker.js +6 -6
- package/dist/components/xplor-tooltip.js +1 -1
- package/dist/esm/{index-Zkk2NJif.js → index-KRfMjDC2.js} +5 -5
- package/dist/esm/index-KRfMjDC2.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{xplor-alert-dialog_57.entry.js → xplor-alert-dialog_58.entry.js} +747 -109
- package/dist/esm/xplor-alert-dialog_58.entry.js.map +1 -0
- package/dist/esm/xplor-component-library.js +3 -3
- package/dist/hydrate/index.js +798 -120
- package/dist/hydrate/index.mjs +798 -120
- package/dist/types/components/xplor-alert-dialog/xplor-alert-dialog.d.ts +11 -0
- package/dist/types/components/xplor-autocomplete/xplor-autocomplete.d.ts +4 -0
- package/dist/types/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.d.ts +4 -0
- package/dist/types/components/xplor-btn-icon/xplor-btn-icon.d.ts +4 -0
- package/dist/types/components/xplor-btn-menu/xplor-btn-menu.d.ts +19 -0
- package/dist/types/components/xplor-button/xplor-button.d.ts +4 -0
- package/dist/types/components/xplor-checkbox/xplor-checkbox.d.ts +1 -0
- package/dist/types/components/xplor-combobox/xplor-combobox.d.ts +4 -0
- package/dist/types/components/xplor-date-picker/xplor-date-picker.d.ts +3 -0
- package/dist/types/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.d.ts +11 -0
- package/dist/types/components/xplor-inline-date-picker/xplor-inline-date-picker.d.ts +3 -0
- package/dist/types/components/xplor-input-file/xplor-input-file.d.ts +1 -0
- package/dist/types/components/xplor-input-search/xplor-input-search.d.ts +1 -0
- package/dist/types/components/xplor-input-select/xplor-input-select.d.ts +15 -0
- package/dist/types/components/xplor-input-text/xplor-input-text.d.ts +3 -0
- package/dist/types/components/xplor-input-text-area/xplor-input-text-area.d.ts +3 -0
- package/dist/types/components/xplor-input-text-secondary/xplor-input-text-secondary.d.ts +3 -0
- package/dist/types/components/xplor-input-title/xplor-input-title.d.ts +4 -0
- package/dist/types/components/xplor-links/xplor-links.d.ts +2 -0
- package/dist/types/components/xplor-modal/xplor-modal.d.ts +11 -0
- package/dist/types/components/xplor-nav-tabs/xplor-nav-tabs.d.ts +2 -0
- package/dist/types/components/xplor-radio-btn/xplor-radio-btn.d.ts +35 -0
- package/dist/types/components/xplor-section-heading/xplor-section-heading.d.ts +4 -0
- package/dist/types/components/xplor-tooltip/xplor-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +230 -2
- package/dist/xplor-component-library/p-0df9ea5d.entry.js +2 -0
- package/dist/xplor-component-library/p-0df9ea5d.entry.js.map +1 -0
- package/dist/xplor-component-library/{p-Zkk2NJif.js → p-KRfMjDC2.js} +3 -3
- package/dist/xplor-component-library/p-KRfMjDC2.js.map +1 -0
- package/dist/xplor-component-library/xplor-component-library.css +1 -1
- package/dist/xplor-component-library/xplor-component-library.esm.js +1 -1
- package/package.json +1 -1
- package/components/p-B1W2qj2l.js.map +0 -1
- package/components/p-CBSi5kQB.js.map +0 -1
- package/components/p-CTD6SyTD.js.map +0 -1
- package/components/p-Ddr35stE.js.map +0 -1
- package/components/p-x30CgLRv.js.map +0 -1
- package/dist/cjs/index-Bc5o_4vY.js.map +0 -1
- package/dist/cjs/xplor-alert-dialog_57.cjs.entry.js.map +0 -1
- package/dist/components/p-4l9DAhAo.js.map +0 -1
- package/dist/components/p-BHdeGt6k.js.map +0 -1
- package/dist/components/p-BIFlTsO8.js.map +0 -1
- package/dist/components/p-DIv_A5Gj.js.map +0 -1
- package/dist/components/p-DKh6y3GY.js.map +0 -1
- package/dist/esm/index-Zkk2NJif.js.map +0 -1
- package/dist/esm/xplor-alert-dialog_57.entry.js.map +0 -1
- package/dist/xplor-component-library/p-25fa8553.entry.js +0 -2
- package/dist/xplor-component-library/p-25fa8553.entry.js.map +0 -1
- package/dist/xplor-component-library/p-Zkk2NJif.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BjAapk2n.js');
|
|
4
4
|
|
|
5
5
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
6
|
/*
|
|
@@ -18,7 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
20
|
await index.globalScripts();
|
|
21
|
-
return index.bootstrapLazy([["xplor-alert-dialog_57.cjs",[[6,"xplor-btn-tooltip",{"text":[1],"tooltipText":[1,"tooltip-text"],"tooltipPosition":[1,"tooltip-position"],"type":[1],"mode":[1],"iconPosition":[1,"icon-position"],"disabled":[4]}],[1,"xplor-chat-widget",{"languageOptions":[16,"language-options"],"textId":[1,"text-id"],"apiKey":[1,"api-key"],"selectedLanguage":[32],"textValue":[32]}],[6,"xplor-avatar-and-name",{"name":[1],"src":[1],"size":[1],"color":[1],"status":[1]}],[2,"xplor-date-picker",{"value":[1025],"label":[1],"placeholder":[1],"type":[1],"monthType":[1,"month-type"],"display":[1],"dateFormat":[1,"date-format"],"min":[1],"max":[1],"readonly":[4],"disabled":[4],"clearable":[4],"closeOnSelect":[4,"close-on-select"],"bgColor":[1,"bg-color"],"color":[1],"startWeekOnSunday":[4,"start-week-on-sunday"],"error":[1],"hideDetails":[8,"hide-details"],"required":[4],"isOpen":[32],"inputText":[32],"dropdownPosition":[32]},[[4,"click","handleDocumentClick"]]],[2,"xplor-drag-and-drop-input",{"disabled":[4],"accepts":[1],"label":[1],"browseLabel":[1,"browse-label"],"dragover":[32],"currentFile":[32],"clearCurrentFile":[64]}],[2,"xplor-input-send",{"placeholder":[1],"disabled":[4],"maxLength":[2,"max-length"],"value":[1025],"buttonText":[1,"button-text"],"buttonType":[1,"button-type"],"internalValue":[32]}],[4,"xplor-modal-persistent",{"open":[4],"width":[1],"maxWidth":[1,"max-width"],"maxHeight":[1,"max-height"],"loading":[4]}],[6,"xplor-alert-dialog",{"open":[1028],"width":[1],"persistent":[4]},null,{"open":["handleOpenChange"]}],[6,"xplor-alert-message",{"type":[1],"alertTitle":[1,"alert-title"],"dismissible":[4]}],[2,"xplor-assistant",{"apiEndpoint":[1,"api-endpoint"],"userId":[1,"user-id"],"userEmail":[1,"user-email"],"userName":[1,"user-name"],"sessionId":[1,"session-id"],"quickReplies":[16,"quick-replies"],"placeholder":[1],"enableVoiceInput":[4,"enable-voice-input"],"enableTextToSpeech":[4,"enable-text-to-speech"],"autoSpeak":[4,"auto-speak"],"maxHeight":[1,"max-height"],"disabled":[4],"messages":[32],"internalSessionId":[32],"isLoading":[32],"isListening":[32],"isSpeaking":[32],"error":[32],"inputValue":[32],"hasVoiceSupport":[32],"hasTTSSupport":[32],"sendMessage":[64],"clearHistory":[64],"speak":[64],"stopSpeaking":[64]},null,{"sessionId":["handleSessionIdChange"]}],[2,"xplor-autocomplete",{"items":[16],"value":[1032],"placeholder":[1],"label":[1],"disabled":[4],"readonly":[4],"clearable":[4],"multiple":[4],"minSearchLength":[2,"min-search-length"],"itemValue":[1,"item-value"],"itemText":[1,"item-text"],"menuMaxWidth":[1,"menu-max-width"],"renderItem":[16,"render-item"],"renderSelection":[16,"render-selection"],"isOpen":[32],"searchQuery":[32],"filteredItems":[32],"selectedItems":[32],"highlightedIndex":[32]},[[4,"click","handleDocumentClick"]]],[6,"xplor-badge",{"backgroundColor":[1,"background-color"],"color":[1],"threshold":[2],"variant":[1],"size":[1],"datatable":[4],"text":[1]}],[2,"xplor-badge-active"],[2,"xplor-badge-archived"],[2,"xplor-badge-deleted"],[2,"xplor-badge-expired"],[2,"xplor-badge-inactive"],[2,"xplor-badge-recalled"],[6,"xplor-badge-session-booking",{"booking":[16],"item":[16]}],[2,"xplor-badge-upcoming"],[2,"xplor-badge-waitlist"],[6,"xplor-btn-back",{"color":[1],"minWidth":[1,"min-width"],"minHeight":[1,"min-height"],"gap":[1],"disabled":[4]}],[2,"xplor-btn-back-to-parent",{"size":[1],"inline":[4],"bgColor":[1,"bg-color"],"color":[1],"variant":[1]}],[6,"xplor-btn-icon",{"color":[1],"size":[8],"iconSize":[8,"icon-size"],"variant":[1],"disabled":[4]}],[6,"xplor-btn-menu",{"label":[1],"options":[16],"hiddenKeys":[16,"hidden-keys"],"disabledKeys":[16,"disabled-keys"],"color":[1],"density":[1],"show":[32]}],[6,"xplor-btn-toggle",{"active":[1028],"color":[1],"disabled":[4],"inactiveOutlined":[4,"inactive-outlined"]}],[6,"xplor-btn-toggle-group",{"multiple":[4],"density":[1]}],[6,"xplor-btn-toggle-secondary",{"active":[1028],"disabled":[4],"inactiveOutlined":[4,"inactive-outlined"]}],[1,"xplor-checkbox",{"initialChecked":[4,"initial-checked"],"initialIndeterminate":[4,"initial-indeterminate"],"disabled":[4],"error":[4],"label":[1],"checked":[32],"indeterminate":[32],"isHovered":[32],"isFocused":[32],"isPressed":[32]},null,{"initialChecked":["watchCheckedProp"],"initialIndeterminate":["watchIndeterminateProp"]}],[2,"xplor-combobox",{"items":[16],"value":[1032],"placeholder":[1],"label":[1],"disabled":[4],"readonly":[4],"clearable":[4],"multiple":[4],"allowCustom":[4,"allow-custom"],"createMessage":[1,"create-message"],"isOpen":[32],"searchQuery":[32],"filteredItems":[32],"selectedItems":[32],"highlightedIndex":[32],"customItems":[32]},[[4,"click","handleDocumentClick"]]],[1,"xplor-datatable",{"headers":[16],"items":[16],"loading":[4],"pagination":[16],"selected":[16],"canSelect":[4,"can-select"],"horizontalLines":[4,"horizontal-lines"],"striped":[4],"height":[8],"skeletonLoader":[4,"skeleton-loader"],"hover":[4],"perPageOptions":[16,"per-page-options"],"sortBy":[32],"sortDirection":[32],"internalSelected":[32],"allSelected":[32]},null,{"selected":["watchSelected"],"items":["watchItems"]}],[6,"xplor-expansion-panel",{"disabled":[4],"open":[1028],"panelId":[32],"contentHeight":[32]}],[6,"xplor-expansion-panels",{"value":[1025],"multiple":[4],"accordion":[4],"openPanels":[32]},[[0,"xplorPanelToggle","handlePanelToggle"]]],[2,"xplor-file-upload",{"accepts":[1],"maxSize":[2,"max-size"],"multiple":[4],"disabled":[4],"showPreview":[4,"show-preview"],"label":[1],"files":[32],"isDragging":[32],"error":[32]}],[6,"xplor-inline-checkbox",{"checked":[1028],"value":[8],"color":[1],"disabled":[4],"indeterminate":[4],"label":[1]}],[6,"xplor-inline-switch",{"checked":[1028],"value":[8],"color":[1],"disabled":[4],"label":[1]}],[2,"xplor-input-file",{"label":[1],"placeholder":[1],"color":[1],"disabled":[4],"multiple":[4],"accept":[1],"maxChips":[2,"max-chips"],"counter":[4],"showSize":[2,"show-size"],"prependInnerIcon":[1,"prepend-inner-icon"],"selectedFiles":[32]}],[6,"xplor-input-search",{"value":[1025],"placeholder":[1],"bgColor":[1,"bg-color"],"color":[1],"disabled":[4],"density":[1],"isFocused":[32]}],[2,"xplor-input-select",{"value":[1032],"label":[1],"placeholder":[1],"options":[16],"multiple":[4],"bgColor":[1,"bg-color"],"color":[1],"disabled":[4],"readonly":[4],"hideDetails":[8,"hide-details"],"error":[1],"helperText":[1,"helper-text"],"required":[4],"isOpen":[32],"isFocused":[32]}],[6,"xplor-input-text",{"value":[1025],"label":[1],"placeholder":[1],"type":[1],"bgColor":[1,"bg-color"],"color":[1],"disabled":[4],"readonly":[4],"hideDetails":[8,"hide-details"],"error":[1],"helperText":[1,"helper-text"],"required":[4],"isFocused":[32]}],[2,"xplor-input-text-area",{"value":[1025],"label":[1],"placeholder":[1],"bgColor":[1,"bg-color"],"color":[1],"disabled":[4],"readonly":[4],"clearable":[4],"rows":[2],"hideDetails":[8,"hide-details"],"error":[1],"helperText":[1,"helper-text"],"required":[4],"isFocused":[32]}],[6,"xplor-input-text-secondary",{"value":[1025],"label":[1],"placeholder":[1],"type":[1],"bgColor":[1,"bg-color"],"disabled":[4],"readonly":[4],"hideDetails":[8,"hide-details"],"error":[1],"helperText":[1,"helper-text"],"required":[4],"isDirty":[4,"is-dirty"],"isFocused":[32]}],[2,"xplor-input-title",{"value":[1025],"placeholder":[1],"disabled":[4],"readonly":[4]}],[1,"xplor-links",{"brand":[1]}],[6,"xplor-nav-tabs",{"value":[1025],"items":[16],"color":[1],"grow":[4]}],[6,"xplor-section-card",{"outlined":[4],"rounded":[4],"padding":[1]}],[6,"xplor-section-heading",{"size":[1],"text":[1]}],[1,"xplor-table",{"columns":[16],"data":[16],"freeze":[4],"multiselect":[4],"striped":[4],"selectedValues":[16,"selected-values"],"isSortable":[4,"is-sortable"],"sortableColumns":[16,"sortable-columns"],"areAllSelected":[32],"rowData":[32],"hasScrolled":[32],"selected":[32],"sortTypeArray":[32],"selectedDateRange":[32],"currentPage":[32],"totalPages":[32]},null,{"data":["watchData"]}],[6,"xplor-text-bubble",{"color":[1]}],[6,"xplor-text-field",{"value":[1025],"label":[1],"placeholder":[1],"type":[1],"color":[1],"variant":[1],"bgColor":[1,"bg-color"],"errorMessages":[16,"error-messages"],"hideDetails":[8,"hide-details"],"disabled":[4],"readonly":[4],"required":[4],"isDirty":[4,"is-dirty"],"clearable":[4],"customClass":[1,"custom-class"],"maxlength":[2],"min":[2],"max":[2],"isFocused":[32],"hasValue":[32]},null,{"value":["handleValueChange"]}],[2,"xplor-time-picker",{"value":[1025],"label":[1],"placeholder":[1],"clearable":[4],"prefill":[4],"bgColor":[1,"bg-color"],"showSeconds":[4,"show-seconds"],"disabled":[4],"readonly":[4],"error":[1],"hideDetails":[8,"hide-details"],"required":[4],"isOpen":[32],"inputText":[32],"hours":[32],"minutes":[32],"seconds":[32],"period":[32],"lastGoodValue":[32]},[[4,"click","handleDocumentClick"]]],[1,"xplor-avatar",{"color":[1],"disabled":[4],"href":[1],"name":[1],"size":[1],"src":[1],"status":[1],"target":[1]}],[1,"xplor-dropdown",{"options":[16],"selected":[1],"handleChange":[16,"handle-change"]}],[2,"xplor-inline-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"readonly":[4],"color":[1],"startWeekOnSunday":[4,"start-week-on-sunday"],"currentYear":[32],"currentMonth":[32],"viewDate":[32]}],[6,"xplor-modal",{"open":[1028],"width":[1],"maxWidth":[1,"max-width"],"maxHeight":[1,"max-height"],"scrollable":[4],"persistent":[4],"loading":[4],"showTitle":[4,"show-title"]},null,{"open":["handleOpenChange"]}],[6,"xplor-tooltip",{"position":[1],"trigger":[1],"arrow":[4],"open":[1028],"content":[1],"disabled":[4],"tooltipStyle":[32],"arrowStyle":[32]},[[4,"click","handleDocumentClick"]]],[6,"xplor-button",{"text":[1],"type":[1],"mode":[1],"size":[1],"styles":[1],"clickAction":[16,"click-action"],"iconPosition":[1,"icon-position"],"icon":[1],"iconSvg":[1,"icon-svg"]}]]]], options);
|
|
21
|
+
return index.bootstrapLazy(JSON.parse("[[\"xplor-alert-dialog_58.cjs\",[[6,\"xplor-btn-tooltip\",{\"text\":[1],\"tooltipText\":[1,\"tooltip-text\"],\"tooltipPosition\":[1,\"tooltip-position\"],\"type\":[1],\"mode\":[1],\"iconPosition\":[1,\"icon-position\"],\"disabled\":[4]}],[1,\"xplor-chat-widget\",{\"languageOptions\":[16,\"language-options\"],\"textId\":[1,\"text-id\"],\"apiKey\":[1,\"api-key\"],\"selectedLanguage\":[32],\"textValue\":[32]}],[6,\"xplor-avatar-and-name\",{\"name\":[1],\"src\":[1],\"size\":[1],\"color\":[1],\"status\":[1]}],[2,\"xplor-date-picker\",{\"value\":[1025],\"label\":[1],\"placeholder\":[1],\"type\":[1],\"monthType\":[1,\"month-type\"],\"display\":[1],\"dateFormat\":[1,\"date-format\"],\"min\":[1],\"max\":[1],\"readonly\":[4],\"disabled\":[4],\"clearable\":[4],\"closeOnSelect\":[4,\"close-on-select\"],\"bgColor\":[1,\"bg-color\"],\"color\":[1],\"startWeekOnSunday\":[4,\"start-week-on-sunday\"],\"error\":[1],\"hideDetails\":[8,\"hide-details\"],\"required\":[4],\"isOpen\":[32],\"inputText\":[32],\"dropdownPosition\":[32]},[[4,\"click\",\"handleDocumentClick\"]]],[2,\"xplor-drag-and-drop-input\",{\"disabled\":[4],\"accepts\":[1],\"label\":[1],\"browseLabel\":[1,\"browse-label\"],\"ariaLabel\":[1,\"aria-label\"],\"progress\":[2],\"dragover\":[32],\"currentFile\":[32],\"clearCurrentFile\":[64]}],[2,\"xplor-input-send\",{\"placeholder\":[1],\"disabled\":[4],\"maxLength\":[2,\"max-length\"],\"value\":[1025],\"buttonText\":[1,\"button-text\"],\"buttonType\":[1,\"button-type\"],\"internalValue\":[32]}],[4,\"xplor-modal-persistent\",{\"open\":[4],\"width\":[1],\"maxWidth\":[1,\"max-width\"],\"maxHeight\":[1,\"max-height\"],\"loading\":[4]}],[6,\"xplor-alert-dialog\",{\"open\":[1028],\"width\":[1],\"persistent\":[4],\"ariaLabel\":[1,\"aria-label\"]},[[0,\"keydown\",\"handleKeyDown\"]],{\"open\":[\"handleOpenChange\"]}],[6,\"xplor-alert-message\",{\"type\":[1],\"alertTitle\":[1,\"alert-title\"],\"dismissible\":[4]}],[2,\"xplor-assistant\",{\"apiEndpoint\":[1,\"api-endpoint\"],\"userId\":[1,\"user-id\"],\"userEmail\":[1,\"user-email\"],\"userName\":[1,\"user-name\"],\"sessionId\":[1,\"session-id\"],\"quickReplies\":[16,\"quick-replies\"],\"placeholder\":[1],\"enableVoiceInput\":[4,\"enable-voice-input\"],\"enableTextToSpeech\":[4,\"enable-text-to-speech\"],\"autoSpeak\":[4,\"auto-speak\"],\"maxHeight\":[1,\"max-height\"],\"disabled\":[4],\"messages\":[32],\"internalSessionId\":[32],\"isLoading\":[32],\"isListening\":[32],\"isSpeaking\":[32],\"error\":[32],\"inputValue\":[32],\"hasVoiceSupport\":[32],\"hasTTSSupport\":[32],\"sendMessage\":[64],\"clearHistory\":[64],\"speak\":[64],\"stopSpeaking\":[64]},null,{\"sessionId\":[\"handleSessionIdChange\"]}],[2,\"xplor-autocomplete\",{\"items\":[16],\"value\":[1032],\"placeholder\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"readonly\":[4],\"clearable\":[4],\"multiple\":[4],\"minSearchLength\":[2,\"min-search-length\"],\"itemValue\":[1,\"item-value\"],\"itemText\":[1,\"item-text\"],\"menuMaxWidth\":[1,\"menu-max-width\"],\"renderItem\":[16,\"render-item\"],\"renderSelection\":[16,\"render-selection\"],\"isOpen\":[32],\"searchQuery\":[32],\"filteredItems\":[32],\"selectedItems\":[32],\"highlightedIndex\":[32]},[[4,\"click\",\"handleDocumentClick\"]]],[6,\"xplor-badge\",{\"backgroundColor\":[1,\"background-color\"],\"color\":[1],\"threshold\":[2],\"variant\":[1],\"size\":[1],\"datatable\":[4],\"text\":[1]}],[2,\"xplor-badge-active\"],[2,\"xplor-badge-archived\"],[2,\"xplor-badge-deleted\"],[2,\"xplor-badge-expired\"],[2,\"xplor-badge-inactive\"],[2,\"xplor-badge-recalled\"],[6,\"xplor-badge-session-booking\",{\"booking\":[16],\"item\":[16]}],[2,\"xplor-badge-upcoming\"],[2,\"xplor-badge-waitlist\"],[6,\"xplor-btn-back\",{\"color\":[1],\"minWidth\":[1,\"min-width\"],\"minHeight\":[1,\"min-height\"],\"gap\":[1],\"disabled\":[4]}],[2,\"xplor-btn-back-to-parent\",{\"size\":[1],\"inline\":[4],\"bgColor\":[1,\"bg-color\"],\"color\":[1],\"variant\":[1],\"ariaLabel\":[1,\"aria-label\"]}],[6,\"xplor-btn-icon\",{\"color\":[1],\"size\":[8],\"iconSize\":[8,\"icon-size\"],\"variant\":[1],\"disabled\":[4],\"ariaLabel\":[1,\"aria-label\"]}],[6,\"xplor-btn-menu\",{\"ariaLabel\":[1,\"aria-label\"],\"label\":[1],\"options\":[16],\"hiddenKeys\":[16,\"hidden-keys\"],\"disabledKeys\":[16,\"disabled-keys\"],\"color\":[1],\"density\":[1],\"show\":[32],\"focusedIndex\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[6,\"xplor-btn-toggle\",{\"active\":[1028],\"color\":[1],\"disabled\":[4],\"inactiveOutlined\":[4,\"inactive-outlined\"]}],[6,\"xplor-btn-toggle-group\",{\"multiple\":[4],\"density\":[1]}],[6,\"xplor-btn-toggle-secondary\",{\"active\":[1028],\"disabled\":[4],\"inactiveOutlined\":[4,\"inactive-outlined\"]}],[1,\"xplor-checkbox\",{\"initialChecked\":[4,\"initial-checked\"],\"initialIndeterminate\":[4,\"initial-indeterminate\"],\"disabled\":[4],\"error\":[4],\"label\":[1],\"checked\":[32],\"indeterminate\":[32],\"isHovered\":[32],\"isFocused\":[32],\"isPressed\":[32]},null,{\"initialChecked\":[\"watchCheckedProp\"],\"initialIndeterminate\":[\"watchIndeterminateProp\"]}],[2,\"xplor-combobox\",{\"items\":[16],\"value\":[1032],\"placeholder\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"readonly\":[4],\"clearable\":[4],\"multiple\":[4],\"allowCustom\":[4,\"allow-custom\"],\"createMessage\":[1,\"create-message\"],\"isOpen\":[32],\"searchQuery\":[32],\"filteredItems\":[32],\"selectedItems\":[32],\"highlightedIndex\":[32],\"customItems\":[32]},[[4,\"click\",\"handleDocumentClick\"]]],[1,\"xplor-datatable\",{\"headers\":[16],\"items\":[16],\"loading\":[4],\"pagination\":[16],\"selected\":[16],\"canSelect\":[4,\"can-select\"],\"horizontalLines\":[4,\"horizontal-lines\"],\"striped\":[4],\"height\":[8],\"skeletonLoader\":[4,\"skeleton-loader\"],\"hover\":[4],\"perPageOptions\":[16,\"per-page-options\"],\"sortBy\":[32],\"sortDirection\":[32],\"internalSelected\":[32],\"allSelected\":[32]},null,{\"selected\":[\"watchSelected\"],\"items\":[\"watchItems\"]}],[6,\"xplor-expansion-panel\",{\"disabled\":[4],\"open\":[1028],\"panelId\":[32],\"contentHeight\":[32]}],[6,\"xplor-expansion-panels\",{\"value\":[1025],\"multiple\":[4],\"accordion\":[4],\"openPanels\":[32]},[[0,\"xplorPanelToggle\",\"handlePanelToggle\"]]],[2,\"xplor-file-upload\",{\"accepts\":[1],\"maxSize\":[2,\"max-size\"],\"multiple\":[4],\"disabled\":[4],\"showPreview\":[4,\"show-preview\"],\"label\":[1],\"files\":[32],\"isDragging\":[32],\"error\":[32]}],[6,\"xplor-inline-checkbox\",{\"checked\":[1028],\"value\":[8],\"color\":[1],\"disabled\":[4],\"indeterminate\":[4],\"label\":[1]}],[6,\"xplor-inline-switch\",{\"checked\":[1028],\"value\":[8],\"color\":[1],\"disabled\":[4],\"label\":[1]}],[2,\"xplor-input-file\",{\"label\":[1],\"placeholder\":[1],\"color\":[1],\"disabled\":[4],\"multiple\":[4],\"accept\":[1],\"maxChips\":[2,\"max-chips\"],\"counter\":[4],\"showSize\":[2,\"show-size\"],\"prependInnerIcon\":[1,\"prepend-inner-icon\"],\"selectedFiles\":[32]}],[6,\"xplor-input-search\",{\"value\":[1025],\"placeholder\":[1],\"bgColor\":[1,\"bg-color\"],\"color\":[1],\"disabled\":[4],\"density\":[1],\"isFocused\":[32]}],[2,\"xplor-input-select\",{\"ariaLabel\":[1,\"aria-label\"],\"value\":[1032],\"label\":[1],\"placeholder\":[1],\"options\":[16],\"multiple\":[4],\"bgColor\":[1,\"bg-color\"],\"color\":[1],\"disabled\":[4],\"readonly\":[4],\"hideDetails\":[8,\"hide-details\"],\"error\":[1],\"helperText\":[1,\"helper-text\"],\"required\":[4],\"isOpen\":[32],\"isFocused\":[32],\"menuPosition\":[32],\"highlightedIndex\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[6,\"xplor-input-text\",{\"value\":[1025],\"label\":[1],\"placeholder\":[1],\"type\":[1],\"bgColor\":[1,\"bg-color\"],\"color\":[1],\"disabled\":[4],\"readonly\":[4],\"hideDetails\":[8,\"hide-details\"],\"error\":[1],\"helperText\":[1,\"helper-text\"],\"required\":[4],\"isFocused\":[32]}],[2,\"xplor-input-text-area\",{\"value\":[1025],\"label\":[1],\"placeholder\":[1],\"bgColor\":[1,\"bg-color\"],\"color\":[1],\"disabled\":[4],\"readonly\":[4],\"clearable\":[4],\"rows\":[2],\"hideDetails\":[8,\"hide-details\"],\"error\":[1],\"helperText\":[1,\"helper-text\"],\"required\":[4],\"isFocused\":[32]}],[6,\"xplor-input-text-secondary\",{\"value\":[1025],\"label\":[1],\"placeholder\":[1],\"type\":[1],\"bgColor\":[1,\"bg-color\"],\"disabled\":[4],\"readonly\":[4],\"hideDetails\":[8,\"hide-details\"],\"error\":[1],\"helperText\":[1,\"helper-text\"],\"required\":[4],\"isDirty\":[4,\"is-dirty\"],\"isFocused\":[32]}],[2,\"xplor-input-title\",{\"value\":[1025],\"placeholder\":[1],\"disabled\":[4],\"readonly\":[4],\"ariaLabel\":[1,\"aria-label\"]}],[1,\"xplor-links\",{\"brand\":[1],\"imageAlt\":[1,\"image-alt\"]}],[6,\"xplor-nav-tabs\",{\"value\":[1025],\"items\":[16],\"color\":[1],\"grow\":[4]},[[0,\"keydown\",\"handleKeyDown\"]]],[1,\"xplor-radio-btn\",{\"label\":[1],\"value\":[1],\"name\":[1],\"initialChecked\":[4,\"initial-checked\"],\"disabled\":[4],\"error\":[4],\"checked\":[32],\"isHovered\":[32],\"isFocused\":[32],\"isPressed\":[32],\"deselect\":[64]},null,{\"initialChecked\":[\"watchCheckedProp\"]}],[6,\"xplor-section-card\",{\"outlined\":[4],\"rounded\":[4],\"padding\":[1]}],[6,\"xplor-section-heading\",{\"size\":[1],\"text\":[1],\"level\":[2]}],[1,\"xplor-table\",{\"columns\":[16],\"data\":[16],\"freeze\":[4],\"multiselect\":[4],\"striped\":[4],\"selectedValues\":[16,\"selected-values\"],\"isSortable\":[4,\"is-sortable\"],\"sortableColumns\":[16,\"sortable-columns\"],\"areAllSelected\":[32],\"rowData\":[32],\"hasScrolled\":[32],\"selected\":[32],\"sortTypeArray\":[32],\"selectedDateRange\":[32],\"currentPage\":[32],\"totalPages\":[32]},null,{\"data\":[\"watchData\"]}],[6,\"xplor-text-bubble\",{\"color\":[1]}],[6,\"xplor-text-field\",{\"value\":[1025],\"label\":[1],\"placeholder\":[1],\"type\":[1],\"color\":[1],\"variant\":[1],\"bgColor\":[1,\"bg-color\"],\"errorMessages\":[16,\"error-messages\"],\"hideDetails\":[8,\"hide-details\"],\"disabled\":[4],\"readonly\":[4],\"required\":[4],\"isDirty\":[4,\"is-dirty\"],\"clearable\":[4],\"customClass\":[1,\"custom-class\"],\"maxlength\":[2],\"min\":[2],\"max\":[2],\"isFocused\":[32],\"hasValue\":[32]},null,{\"value\":[\"handleValueChange\"]}],[2,\"xplor-time-picker\",{\"value\":[1025],\"label\":[1],\"placeholder\":[1],\"clearable\":[4],\"prefill\":[4],\"bgColor\":[1,\"bg-color\"],\"showSeconds\":[4,\"show-seconds\"],\"disabled\":[4],\"readonly\":[4],\"error\":[1],\"hideDetails\":[8,\"hide-details\"],\"required\":[4],\"isOpen\":[32],\"inputText\":[32],\"hours\":[32],\"minutes\":[32],\"seconds\":[32],\"period\":[32],\"lastGoodValue\":[32]},[[4,\"click\",\"handleDocumentClick\"]]],[1,\"xplor-avatar\",{\"color\":[1],\"disabled\":[4],\"href\":[1],\"name\":[1],\"size\":[1],\"src\":[1],\"status\":[1],\"target\":[1]}],[1,\"xplor-dropdown\",{\"options\":[16],\"selected\":[1],\"handleChange\":[16,\"handle-change\"]}],[2,\"xplor-inline-date-picker\",{\"selectedDate\":[1025,\"selected-date\"],\"min\":[1],\"max\":[1],\"readonly\":[4],\"color\":[1],\"startWeekOnSunday\":[4,\"start-week-on-sunday\"],\"currentYear\":[32],\"currentMonth\":[32],\"viewDate\":[32],\"focusedDay\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[6,\"xplor-modal\",{\"open\":[1028],\"width\":[1],\"maxWidth\":[1,\"max-width\"],\"maxHeight\":[1,\"max-height\"],\"scrollable\":[4],\"persistent\":[4],\"loading\":[4],\"showTitle\":[4,\"show-title\"],\"ariaLabel\":[1,\"aria-label\"]},[[0,\"keydown\",\"handleKeyDown\"]],{\"open\":[\"handleOpenChange\"]}],[6,\"xplor-tooltip\",{\"position\":[1],\"trigger\":[1],\"arrow\":[4],\"open\":[1028],\"content\":[1],\"disabled\":[4],\"tooltipStyle\":[32],\"arrowStyle\":[32]},[[4,\"click\",\"handleDocumentClick\"]]],[6,\"xplor-button\",{\"text\":[1],\"type\":[1],\"mode\":[1],\"size\":[1],\"styles\":[1],\"clickAction\":[16,\"click-action\"],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"iconPosition\":[1,\"icon-position\"],\"icon\":[1],\"iconSvg\":[1,\"icon-svg\"]}]]]]"), options);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"components/xplor-links/xplor-links.js",
|
|
52
52
|
"components/xplor-modal/xplor-modal.js",
|
|
53
53
|
"components/xplor-modal-persistent/xplor-modal-persistent.js",
|
|
54
|
+
"components/xplor-radio-btn/xplor-radio-btn.js",
|
|
54
55
|
"components/xplor-section-card/xplor-section-card.js",
|
|
55
56
|
"components/xplor-section-heading/xplor-section-heading.js",
|
|
56
57
|
"components/xplor-table/xplor-table.js",
|
|
@@ -13,6 +13,7 @@ export class XplorAlertDialog {
|
|
|
13
13
|
* Persistent mode - prevents closing on backdrop click
|
|
14
14
|
*/
|
|
15
15
|
this.persistent = true;
|
|
16
|
+
this.previouslyFocusedElement = null;
|
|
16
17
|
this.handleBackdropClick = () => {
|
|
17
18
|
if (!this.persistent) {
|
|
18
19
|
this.closeDialog();
|
|
@@ -30,19 +31,73 @@ export class XplorAlertDialog {
|
|
|
30
31
|
handleOpenChange(newValue) {
|
|
31
32
|
if (newValue) {
|
|
32
33
|
document.body.style.overflow = 'hidden';
|
|
34
|
+
this.previouslyFocusedElement = document.activeElement;
|
|
35
|
+
requestAnimationFrame(() => {
|
|
36
|
+
this.setInitialFocus();
|
|
37
|
+
});
|
|
33
38
|
}
|
|
34
39
|
else {
|
|
35
40
|
document.body.style.overflow = '';
|
|
41
|
+
if (this.previouslyFocusedElement) {
|
|
42
|
+
this.previouslyFocusedElement.focus();
|
|
43
|
+
this.previouslyFocusedElement = null;
|
|
44
|
+
}
|
|
36
45
|
}
|
|
37
46
|
}
|
|
38
47
|
disconnectedCallback() {
|
|
39
48
|
document.body.style.overflow = '';
|
|
40
49
|
}
|
|
50
|
+
handleKeyDown(event) {
|
|
51
|
+
if (!this.open)
|
|
52
|
+
return;
|
|
53
|
+
if (event.key === 'Escape' && !this.persistent) {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
this.closeDialog();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (event.key === 'Tab') {
|
|
59
|
+
this.trapFocus(event);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
getFocusableElements() {
|
|
63
|
+
if (!this.dialogEl)
|
|
64
|
+
return [];
|
|
65
|
+
const selectors = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
66
|
+
return Array.from(this.dialogEl.querySelectorAll(selectors));
|
|
67
|
+
}
|
|
68
|
+
trapFocus(event) {
|
|
69
|
+
const focusableElements = this.getFocusableElements();
|
|
70
|
+
if (focusableElements.length === 0)
|
|
71
|
+
return;
|
|
72
|
+
const firstElement = focusableElements[0];
|
|
73
|
+
const lastElement = focusableElements[focusableElements.length - 1];
|
|
74
|
+
if (event.shiftKey) {
|
|
75
|
+
if (document.activeElement === firstElement) {
|
|
76
|
+
event.preventDefault();
|
|
77
|
+
lastElement.focus();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
if (document.activeElement === lastElement) {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
firstElement.focus();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
setInitialFocus() {
|
|
88
|
+
const focusableElements = this.getFocusableElements();
|
|
89
|
+
if (focusableElements.length > 0) {
|
|
90
|
+
focusableElements[0].focus();
|
|
91
|
+
}
|
|
92
|
+
else if (this.dialogEl) {
|
|
93
|
+
this.dialogEl.focus();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
41
96
|
render() {
|
|
42
97
|
if (!this.open) {
|
|
43
98
|
return null;
|
|
44
99
|
}
|
|
45
|
-
return (h(Host, null, h("div", { class: "xplor-alert-dialog__backdrop", onClick: this.handleBackdropClick }, h("div", { class: "xplor-alert-dialog__card", style: { width: this.width }, onClick: this.handleCardClick }, h("button", { type: "button", class: "xplor-alert-dialog__close-btn", onClick: this.closeDialog, "aria-label": "Close dialog" }, "\u2715"), h("div", { class: "xplor-alert-dialog__title" }, h("slot", { name: "title" })), h("div", { class: "xplor-alert-dialog__text" }, h("slot", { name: "text" })), h("div", { class: "xplor-alert-dialog__actions" }, h("slot", { name: "actions" }))))));
|
|
100
|
+
return (h(Host, null, h("div", { class: "xplor-alert-dialog__backdrop", onClick: this.handleBackdropClick }, h("div", { class: "xplor-alert-dialog__card", style: { width: this.width }, onClick: this.handleCardClick, role: "alertdialog", "aria-modal": "true", "aria-labelledby": this.ariaLabel ? undefined : 'xplor-alert-dialog-title', "aria-label": this.ariaLabel, "aria-describedby": "xplor-alert-dialog-text", tabindex: "-1", ref: (el) => (this.dialogEl = el) }, h("button", { type: "button", class: "xplor-alert-dialog__close-btn", onClick: this.closeDialog, "aria-label": "Close dialog" }, "\u2715"), h("div", { class: "xplor-alert-dialog__title", id: "xplor-alert-dialog-title" }, h("slot", { name: "title" })), h("div", { class: "xplor-alert-dialog__text", id: "xplor-alert-dialog-text" }, h("slot", { name: "text" })), h("div", { class: "xplor-alert-dialog__actions" }, h("slot", { name: "actions" }))))));
|
|
46
101
|
}
|
|
47
102
|
static get is() { return "xplor-alert-dialog"; }
|
|
48
103
|
static get encapsulation() { return "scoped"; }
|
|
@@ -117,6 +172,25 @@ export class XplorAlertDialog {
|
|
|
117
172
|
"setter": false,
|
|
118
173
|
"reflect": false,
|
|
119
174
|
"defaultValue": "true"
|
|
175
|
+
},
|
|
176
|
+
"ariaLabel": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"attribute": "aria-label",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "string",
|
|
182
|
+
"resolved": "string",
|
|
183
|
+
"references": {}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": false,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "Accessible label for the dialog (used if no title slot)"
|
|
190
|
+
},
|
|
191
|
+
"getter": false,
|
|
192
|
+
"setter": false,
|
|
193
|
+
"reflect": false
|
|
120
194
|
}
|
|
121
195
|
};
|
|
122
196
|
}
|
|
@@ -153,11 +227,21 @@ export class XplorAlertDialog {
|
|
|
153
227
|
}
|
|
154
228
|
}];
|
|
155
229
|
}
|
|
230
|
+
static get elementRef() { return "el"; }
|
|
156
231
|
static get watchers() {
|
|
157
232
|
return [{
|
|
158
233
|
"propName": "open",
|
|
159
234
|
"methodName": "handleOpenChange"
|
|
160
235
|
}];
|
|
161
236
|
}
|
|
237
|
+
static get listeners() {
|
|
238
|
+
return [{
|
|
239
|
+
"name": "keydown",
|
|
240
|
+
"method": "handleKeyDown",
|
|
241
|
+
"target": undefined,
|
|
242
|
+
"capture": false,
|
|
243
|
+
"passive": false
|
|
244
|
+
}];
|
|
245
|
+
}
|
|
162
246
|
}
|
|
163
247
|
//# sourceMappingURL=xplor-alert-dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xplor-alert-dialog.js","sourceRoot":"","sources":["../../../src/components/xplor-alert-dialog/xplor-alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"xplor-alert-dialog.js","sourceRoot":"","sources":["../../../src/components/xplor-alert-dialog/xplor-alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOtG,MAAM,OAAO,gBAAgB;IAL7B;QAME;;WAEG;QACsB,SAAI,GAAY,KAAK,CAAC;QAE/C;;WAEG;QACK,UAAK,GAAW,OAAO,CAAC;QAEhC;;WAEG;QACK,eAAU,GAAY,IAAI,CAAC;QAmB3B,6BAAwB,GAAuB,IAAI,CAAC;QA0EpD,wBAAmB,GAAG,GAAG,EAAE;YACjC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;QACH,CAAC,CAAC;QAEM,oBAAe,GAAG,CAAC,KAAY,EAAE,EAAE;YACzC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,CAAC,CAAC;QAEM,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC,CAAC;KA+CH;IAnIC,gBAAgB,CAAC,QAAiB;QAChC,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QA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,gBACP,MAAM,qBACA,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,0BAA0B,gBAC5D,IAAI,CAAC,SAAS,sBACT,yBAAyB,EAC1C,QAAQ,EAAC,IAAI,EACb,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;oBAEjC,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,+BAA+B,EACrC,OAAO,EAAE,IAAI,CAAC,WAAW,gBACd,cAAc,aAGlB;oBAET,WAAK,KAAK,EAAC,2BAA2B,EAAC,EAAE,EAAC,0BAA0B;wBAClE,YAAM,IAAI,EAAC,OAAO,GAAG,CACjB;oBAEN,WAAK,KAAK,EAAC,0BAA0B,EAAC,EAAE,EAAC,yBAAyB;wBAChE,YAAM,IAAI,EAAC,MAAM,GAAG,CAChB;oBAEN,WAAK,KAAK,EAAC,6BAA6B;wBACtC,YAAM,IAAI,EAAC,SAAS,GAAG,CACnB,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, Watch, Element, Listen } from '@stencil/core';\n\n@Component({\n tag: 'xplor-alert-dialog',\n styleUrl: 'xplor-alert-dialog.scss',\n scoped: true,\n})\nexport class XplorAlertDialog {\n /**\n * Whether the dialog is open\n */\n @Prop({ mutable: true }) open: boolean = false;\n\n /**\n * Dialog width (can be pixel value or percentage)\n */\n @Prop() width: string = '408px';\n\n /**\n * Persistent mode - prevents closing on backdrop click\n */\n @Prop() persistent: boolean = true;\n\n /**\n * Accessible label for the dialog (used if no title slot)\n */\n @Prop() ariaLabel: string;\n\n /**\n * Close event\n */\n @Event() xplorClose: EventEmitter<void>;\n\n /**\n * Dialog state change event\n */\n @Event() xplorDialogChange: EventEmitter<boolean>;\n\n @Element() el: HTMLElement;\n\n private previouslyFocusedElement: HTMLElement | null = null;\n private dialogEl: HTMLElement;\n\n @Watch('open')\n handleOpenChange(newValue: boolean) {\n if (newValue) {\n document.body.style.overflow = 'hidden';\n this.previouslyFocusedElement = document.activeElement as HTMLElement;\n requestAnimationFrame(() => {\n this.setInitialFocus();\n });\n } else {\n document.body.style.overflow = '';\n if (this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus();\n this.previouslyFocusedElement = null;\n }\n }\n }\n\n disconnectedCallback() {\n document.body.style.overflow = '';\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) return;\n\n if (event.key === 'Escape' && !this.persistent) {\n event.preventDefault();\n this.closeDialog();\n return;\n }\n\n if (event.key === 'Tab') {\n this.trapFocus(event);\n }\n }\n\n private getFocusableElements(): HTMLElement[] {\n if (!this.dialogEl) return [];\n const selectors = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n return Array.from(this.dialogEl.querySelectorAll(selectors)) as HTMLElement[];\n }\n\n private trapFocus(event: KeyboardEvent) {\n const focusableElements = this.getFocusableElements();\n if (focusableElements.length === 0) return;\n\n const firstElement = focusableElements[0];\n const lastElement = focusableElements[focusableElements.length - 1];\n\n if (event.shiftKey) {\n if (document.activeElement === firstElement) {\n event.preventDefault();\n lastElement.focus();\n }\n } else {\n if (document.activeElement === lastElement) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n }\n\n private setInitialFocus() {\n const focusableElements = this.getFocusableElements();\n if (focusableElements.length > 0) {\n focusableElements[0].focus();\n } else if (this.dialogEl) {\n this.dialogEl.focus();\n }\n }\n\n private handleBackdropClick = () => {\n if (!this.persistent) {\n this.closeDialog();\n }\n };\n\n private handleCardClick = (event: Event) => {\n event.stopPropagation();\n };\n\n private closeDialog = () => {\n this.open = false;\n this.xplorClose.emit();\n this.xplorDialogChange.emit(false);\n };\n\n render() {\n if (!this.open) {\n return null;\n }\n\n return (\n <Host>\n <div class=\"xplor-alert-dialog__backdrop\" onClick={this.handleBackdropClick}>\n <div\n class=\"xplor-alert-dialog__card\"\n style={{ width: this.width }}\n onClick={this.handleCardClick}\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby={this.ariaLabel ? undefined : 'xplor-alert-dialog-title'}\n aria-label={this.ariaLabel}\n aria-describedby=\"xplor-alert-dialog-text\"\n tabindex=\"-1\"\n ref={(el) => (this.dialogEl = el)}\n >\n <button\n type=\"button\"\n class=\"xplor-alert-dialog__close-btn\"\n onClick={this.closeDialog}\n aria-label=\"Close dialog\"\n >\n ✕\n </button>\n\n <div class=\"xplor-alert-dialog__title\" id=\"xplor-alert-dialog-title\">\n <slot name=\"title\" />\n </div>\n\n <div class=\"xplor-alert-dialog__text\" id=\"xplor-alert-dialog-text\">\n <slot name=\"text\" />\n </div>\n\n <div class=\"xplor-alert-dialog__actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -34,6 +34,6 @@ export const AssistantInput = (props) => {
|
|
|
34
34
|
return (h("div", { class: "xplor-assistant__input-container" }, h("form", { onSubmit: handleSubmit, class: "xplor-assistant__input-form" }, enableVoiceInput && (h("button", { type: "button", class: {
|
|
35
35
|
'xplor-assistant__voice-button': true,
|
|
36
36
|
'xplor-assistant__voice-button--listening': isListening,
|
|
37
|
-
}, onClick: handleVoiceClick, disabled: disabled || isLoading, title: isListening ? 'Stop listening' : 'Start voice input' }, h("span", { class: "xplor-assistant__voice-icon", innerHTML: microphoneIcon }))), h("input", { type: "text", class: "xplor-assistant__input", placeholder: placeholder, value: inputValue, onInput: handleInputChange, disabled: disabled || isLoading }), h("button", { type: "submit", class: "xplor-assistant__send-button", disabled: isSendDisabled, title: "Send message" }, h("span", { class: "xplor-assistant__send-icon", innerHTML: sendIcon })))));
|
|
37
|
+
}, onClick: handleVoiceClick, disabled: disabled || isLoading, title: isListening ? 'Stop listening' : 'Start voice input', "aria-label": "Voice input" }, h("span", { class: "xplor-assistant__voice-icon", innerHTML: microphoneIcon }))), h("input", { type: "text", class: "xplor-assistant__input", placeholder: placeholder, value: inputValue, onInput: handleInputChange, disabled: disabled || isLoading }), h("button", { type: "submit", class: "xplor-assistant__send-button", disabled: isSendDisabled, title: "Send message", "aria-label": "Send message" }, h("span", { class: "xplor-assistant__send-icon", innerHTML: sendIcon })))));
|
|
38
38
|
};
|
|
39
39
|
//# sourceMappingURL=AssistantInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantInput.js","sourceRoot":"","sources":["../../../../src/components/xplor-assistant/internal/AssistantInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAe1D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAkC,EAAE,EAAE;IACnE,MAAM,EACJ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,aAAa,GACd,GAAG,KAAK,CAAC;IAEV,MAAM,YAAY,GAAG,CAAC,CAAQ,EAAE,EAAE;QAChC,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,gDAAgD,EAAE,UAAU,CAAC,CAAC;QAC1E,IAAI,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;YACjD,OAAO,CAAC,GAAG,CAAC,8CAA8C,EAAE,UAAU,CAAC,CAAC;YACxE,aAAa,CAAC,UAAU,CAAC,CAAC;YAC1B,aAAa,CAAC,EAAE,CAAC,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AK,EAAC,kCAAkC;QAC3C,YAAM,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAC,6BAA6B;YAC9D,gBAAgB,IAAI,CACnB,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;oBACL,+BAA+B,EAAE,IAAI;oBACrC,0CAA0C,EAAE,WAAW;iBACxD,EACD,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAC/B,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,mBAAmB,gBAChD,aAAa;gBAExB,YAAM,KAAK,EAAC,6BAA6B,EAAC,SAAS,EAAE,cAAc,GAAS,CACrE,CACV;YAED,aACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,wBAAwB,EAC9B,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,QAAQ,IAAI,SAAS,GAC/B;YAEF,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,8BAA8B,EACpC,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAC,cAAc,gBACT,cAAc;gBAEzB,YAAM,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAE,QAAQ,GAAS,CAC9D,CACJ,CACH,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * AssistantInput - Internal component\n * Renders the input field with voice and send buttons\n */\n\nimport { h } from '@stencil/core';\nimport { microphoneIcon, sendIcon } from '../utils/icons';\n\nexport interface AssistantInputInternalProps {\n placeholder: string;\n disabled: boolean;\n isLoading: boolean;\n enableVoiceInput: boolean;\n isListening: boolean;\n inputValue: string;\n onSendMessage: (message: string) => void;\n onStartListening: () => void;\n onStopListening: () => void;\n setInputValue: (value: string) => void;\n}\n\nexport const AssistantInput = (props: AssistantInputInternalProps) => {\n const {\n placeholder,\n disabled,\n isLoading,\n enableVoiceInput,\n isListening,\n inputValue,\n onSendMessage,\n onStartListening,\n onStopListening,\n setInputValue,\n } = props;\n\n const handleSubmit = (e: Event) => {\n e.preventDefault();\n console.log('[AssistantInput] Submit triggered, inputValue:', inputValue);\n if (inputValue.trim() && !disabled && !isLoading) {\n console.log('[AssistantInput] Calling onSendMessage with:', inputValue);\n onSendMessage(inputValue);\n setInputValue('');\n } else {\n console.log('[AssistantInput] Submit blocked - disabled:', disabled, 'isLoading:', isLoading, 'hasValue:', !!inputValue.trim());\n }\n };\n\n const handleInputChange = (e: Event) => {\n const target = e.target as HTMLInputElement;\n setInputValue(target.value);\n };\n\n const handleVoiceClick = () => {\n if (isListening) {\n onStopListening();\n } else {\n onStartListening();\n }\n };\n\n const isSendDisabled = !inputValue.trim() || disabled || isLoading;\n\n return (\n <div class=\"xplor-assistant__input-container\">\n <form onSubmit={handleSubmit} class=\"xplor-assistant__input-form\">\n {enableVoiceInput && (\n <button\n type=\"button\"\n class={{\n 'xplor-assistant__voice-button': true,\n 'xplor-assistant__voice-button--listening': isListening,\n }}\n onClick={handleVoiceClick}\n disabled={disabled || isLoading}\n title={isListening ? 'Stop listening' : 'Start voice input'}\n aria-label=\"Voice input\"\n >\n <span class=\"xplor-assistant__voice-icon\" innerHTML={microphoneIcon}></span>\n </button>\n )}\n\n <input\n type=\"text\"\n class=\"xplor-assistant__input\"\n placeholder={placeholder}\n value={inputValue}\n onInput={handleInputChange}\n disabled={disabled || isLoading}\n />\n\n <button\n type=\"submit\"\n class=\"xplor-assistant__send-button\"\n disabled={isSendDisabled}\n title=\"Send message\"\n aria-label=\"Send message\"\n >\n <span class=\"xplor-assistant__send-icon\" innerHTML={sendIcon}></span>\n </button>\n </form>\n </div>\n );\n};\n"]}
|
|
@@ -233,7 +233,7 @@ export class XplorAssistant {
|
|
|
233
233
|
return (h(Host, null, h("div", { class: {
|
|
234
234
|
'xplor-assistant': true,
|
|
235
235
|
'xplor-assistant--disabled': this.disabled,
|
|
236
|
-
}, style: { maxHeight: this.maxHeight } }, h("div", { class: "xplor-assistant__messages", ref: (el) => (this.messagesContainerRef = el) }, this.messages.map((message) => (h(AssistantMessage, { message: message, enableTextToSpeech: this.enableTextToSpeech, autoSpeak: false, isSpeaking: this.isSpeaking, onSpeak: this.handleSpeak, onStopSpeaking: this.handleStopSpeaking }))), this.isLoading && (h("div", { class: "xplor-assistant__message xplor-assistant__message--assistant" }, h(TypingIndicator, null))), this.error && this.apiEndpoint && (h("div", { class: "xplor-assistant__error-banner" }, this.error))), this.quickReplies && this.quickReplies.length > 0 && (h(QuickReplies, { replies: this.quickReplies, disabled: this.disabled || this.isLoading, onReplyClick: this.handleQuickReply })), h(AssistantInput, { placeholder: this.placeholder, disabled: this.disabled, isLoading: this.isLoading, enableVoiceInput: this.enableVoiceInput && this.hasVoiceSupport, isListening: this.isListening, onSendMessage: this.handleSendMessage, onStartListening: this.handleStartListening, onStopListening: this.handleStopListening, inputValue: this.inputValue, setInputValue: this.setInputValue }))));
|
|
236
|
+
}, style: { maxHeight: this.maxHeight } }, h("div", { class: "xplor-assistant__messages", ref: (el) => (this.messagesContainerRef = el), role: "log", "aria-live": "polite", "aria-busy": this.isLoading ? 'true' : 'false' }, this.messages.map((message) => (h(AssistantMessage, { message: message, enableTextToSpeech: this.enableTextToSpeech, autoSpeak: false, isSpeaking: this.isSpeaking, onSpeak: this.handleSpeak, onStopSpeaking: this.handleStopSpeaking }))), this.isLoading && (h("div", { class: "xplor-assistant__message xplor-assistant__message--assistant" }, h(TypingIndicator, null))), this.error && this.apiEndpoint && (h("div", { class: "xplor-assistant__error-banner" }, this.error))), this.quickReplies && this.quickReplies.length > 0 && (h(QuickReplies, { replies: this.quickReplies, disabled: this.disabled || this.isLoading, onReplyClick: this.handleQuickReply })), h(AssistantInput, { placeholder: this.placeholder, disabled: this.disabled, isLoading: this.isLoading, enableVoiceInput: this.enableVoiceInput && this.hasVoiceSupport, isListening: this.isListening, onSendMessage: this.handleSendMessage, onStartListening: this.handleStartListening, onStopListening: this.handleStopListening, inputValue: this.inputValue, setInputValue: this.setInputValue }))));
|
|
237
237
|
}
|
|
238
238
|
static get is() { return "xplor-assistant"; }
|
|
239
239
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xplor-assistant.js","sourceRoot":"","sources":["../../../src/components/xplor-assistant/xplor-assistant.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQ7G,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAO7D,MAAM,OAAO,cAAc;IAL3B;QAiBU,gBAAW,GAAW,sBAAsB,CAAC;QAC7C,qBAAgB,GAAY,IAAI,CAAC;QACjC,uBAAkB,GAAY,IAAI,CAAC;QACnC,cAAS,GAAY,KAAK,CAAC;QAC3B,cAAS,GAAW,OAAO,CAAC;QAC5B,aAAQ,GAAY,KAAK,CAAC;QAElC,QAAQ;QACC,aAAQ,GAAkB,EAAE,CAAC;QAC7B,sBAAiB,GAAW,EAAE,CAAC;QAC/B,cAAS,GAAY,KAAK,CAAC;QAC3B,gBAAW,GAAY,KAAK,CAAC;QAC7B,eAAU,GAAY,KAAK,CAAC;QAC5B,UAAK,GAAW,EAAE,CAAC;QACnB,eAAU,GAAW,EAAE,CAAC;QACxB,oBAAe,GAAY,KAAK,CAAC;QACjC,kBAAa,GA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,EAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,EACzC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GACnC,CACH;gBAGD,EAAC,cAAc,IACb,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,eAAe,EAC/D,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,aAAa,EAAE,IAAI,CAAC,iBAAiB,EACrC,gBAAgB,EAAE,IAAI,CAAC,oBAAoB,EAC3C,eAAe,EAAE,IAAI,CAAC,mBAAmB,EACzC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,GACjC,CACE,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Event, EventEmitter, Method, Element, Watch } from '@stencil/core';\nimport {\n AssistantMessage as MessageType,\n AssistantMessageSentEvent,\n AssistantMessageReceivedEvent,\n AssistantErrorEvent,\n AssistantSessionEvent,\n} from './internal/types';\nimport { sendMessageToAPI, generateSessionId } from './utils/api';\nimport { SpeechRecognitionManager, SpeechSynthesisManager, detectBrowserCapabilities } from './utils/speech';\nimport { AssistantMessage } from './internal/AssistantMessage';\nimport { AssistantInput } from './internal/AssistantInput';\nimport { QuickReplies } from './internal/QuickReplies';\nimport { TypingIndicator } from './internal/TypingIndicator';\n\n@Component({\n tag: 'xplor-assistant',\n styleUrl: 'xplor-assistant.scss',\n scoped: true,\n})\nexport class XplorAssistant {\n @Element() el: HTMLElement;\n\n // Required Props\n @Prop() apiEndpoint!: string;\n @Prop() userId!: string;\n @Prop() userEmail!: string;\n @Prop() userName!: string;\n\n // Optional Props\n @Prop() sessionId?: string;\n @Prop() quickReplies?: string[];\n @Prop() placeholder: string = 'Type your message...';\n @Prop() enableVoiceInput: boolean = true;\n @Prop() enableTextToSpeech: boolean = true;\n @Prop() autoSpeak: boolean = false;\n @Prop() maxHeight: string = '600px';\n @Prop() disabled: boolean = false;\n\n // State\n @State() messages: MessageType[] = [];\n @State() internalSessionId: string = '';\n @State() isLoading: boolean = false;\n @State() isListening: boolean = false;\n @State() isSpeaking: boolean = false;\n @State() error: string = '';\n @State() inputValue: string = '';\n @State() hasVoiceSupport: boolean = false;\n @State() hasTTSSupport: boolean = false;\n\n // Events\n @Event() assistantMessageSent: EventEmitter<AssistantMessageSentEvent>;\n @Event() assistantMessageReceived: EventEmitter<AssistantMessageReceivedEvent>;\n @Event() assistantError: EventEmitter<AssistantErrorEvent>;\n @Event() assistantSessionCreated: EventEmitter<AssistantSessionEvent>;\n\n // Private members\n private speechRecognition: SpeechRecognitionManager;\n private speechSynthesis: SpeechSynthesisManager;\n private messagesContainerRef: HTMLDivElement;\n\n componentWillLoad() {\n // Validate required props\n if (!this.apiEndpoint) {\n console.error('xplor-assistant: apiEndpoint prop is required');\n this.error = 'Configuration error: API endpoint not provided';\n return;\n }\n\n if (!this.userId || !this.userEmail || !this.userName) {\n console.error('xplor-assistant: userId, userEmail, and userName props are required');\n this.error = 'Configuration error: User information not provided';\n return;\n }\n\n // Initialize session\n if (this.sessionId) {\n this.internalSessionId = this.sessionId;\n } else {\n this.internalSessionId = generateSessionId();\n this.assistantSessionCreated.emit({\n sessionId: this.internalSessionId,\n timestamp: new Date(),\n });\n }\n\n // Detect browser capabilities\n const capabilities = detectBrowserCapabilities();\n this.hasVoiceSupport = capabilities.voiceInput;\n this.hasTTSSupport = capabilities.textToSpeech;\n\n // Disable features if not supported\n if (!this.hasVoiceSupport) {\n this.enableVoiceInput = false;\n }\n if (!this.hasTTSSupport) {\n this.enableTextToSpeech = false;\n }\n\n // Initialize speech managers\n this.speechRecognition = new SpeechRecognitionManager();\n this.speechSynthesis = new SpeechSynthesisManager();\n\n // Setup speech recognition callbacks\n this.speechRecognition.onStart(() => {\n this.isListening = true;\n });\n\n this.speechRecognition.onEnd(() => {\n this.isListening = false;\n });\n\n this.speechRecognition.onResult((transcript) => {\n this.handleVoiceInput(transcript);\n });\n\n this.speechRecognition.onError((error) => {\n this.isListening = false;\n this.handleError(error, 'voice');\n });\n\n // Setup speech synthesis callbacks\n this.speechSynthesis.onStart(() => {\n this.isSpeaking = true;\n });\n\n this.speechSynthesis.onEnd(() => {\n this.isSpeaking = false;\n });\n }\n\n @Watch('sessionId')\n handleSessionIdChange(newSessionId: string) {\n if (newSessionId && newSessionId !== this.internalSessionId) {\n this.internalSessionId = newSessionId;\n }\n }\n\n componentDidUpdate() {\n // Auto-scroll to bottom when new messages arrive\n this.scrollToBottom();\n }\n\n disconnectedCallback() {\n // Cleanup speech synthesis\n if (this.speechSynthesis) {\n this.speechSynthesis.stop();\n }\n }\n\n // Public Methods\n\n @Method()\n async sendMessage(message: string): Promise<void> {\n if (!message || !message.trim()) {\n return;\n }\n await this.handleSendMessage(message);\n }\n\n @Method()\n async clearHistory(): Promise<void> {\n this.messages = [];\n this.error = '';\n }\n\n @Method()\n async speak(text: string): Promise<void> {\n if (this.enableTextToSpeech && this.speechSynthesis) {\n this.speechSynthesis.speak(text);\n }\n }\n\n @Method()\n async stopSpeaking(): Promise<void> {\n if (this.speechSynthesis) {\n this.speechSynthesis.stop();\n }\n }\n\n // Private Methods\n\n private scrollToBottom() {\n if (this.messagesContainerRef) {\n setTimeout(() => {\n this.messagesContainerRef.scrollTop = this.messagesContainerRef.scrollHeight;\n }, 100);\n }\n }\n\n private handleSendMessage = async (messageText: string) => {\n console.log('[XplorAssistant] handleSendMessage called with:', messageText);\n\n if (this.disabled || this.isLoading || !messageText.trim()) {\n console.log('[XplorAssistant] Message blocked - disabled:', this.disabled, 'isLoading:', this.isLoading, 'hasValue:', !!messageText.trim());\n return;\n }\n\n // Clear the input immediately\n this.inputValue = '';\n console.log('[XplorAssistant] Input cleared, proceeding with message');\n\n const userMessage: MessageType = {\n id: `user-${Date.now()}`,\n role: 'user',\n content: messageText.trim(),\n timestamp: new Date(),\n };\n\n // Add user message to the conversation\n this.messages = [...this.messages, userMessage];\n this.error = '';\n this.isLoading = true;\n\n // Emit message sent event\n this.assistantMessageSent.emit({\n message: userMessage.content,\n sessionId: this.internalSessionId,\n timestamp: userMessage.timestamp,\n });\n\n try {\n // Call the API\n const response = await sendMessageToAPI(\n this.apiEndpoint,\n userMessage.content,\n this.internalSessionId,\n this.userId,\n this.userEmail,\n this.userName\n );\n\n // Update session ID if changed\n if (response.sessionId && response.sessionId !== this.internalSessionId) {\n this.internalSessionId = response.sessionId;\n }\n\n // Add assistant response to conversation\n const assistantMessage: MessageType = {\n id: `assistant-${Date.now()}`,\n role: 'assistant',\n content: response.message,\n timestamp: new Date(),\n };\n\n this.messages = [...this.messages, assistantMessage];\n\n // Emit message received event\n this.assistantMessageReceived.emit({\n message: assistantMessage.content,\n sessionId: this.internalSessionId,\n timestamp: assistantMessage.timestamp,\n });\n\n // Auto-speak if enabled\n if (this.autoSpeak && this.enableTextToSpeech) {\n this.speechSynthesis.speak(assistantMessage.content);\n }\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Failed to send message';\n this.handleError(errorMessage, 'api');\n } finally {\n this.isLoading = false;\n }\n };\n\n private handleVoiceInput = (transcript: string) => {\n if (transcript && transcript.trim()) {\n this.handleSendMessage(transcript);\n }\n };\n\n private handleError = (error: string, type: 'api' | 'voice' | 'tts' | 'network' | 'validation') => {\n this.error = error;\n this.assistantError.emit({\n error,\n type,\n timestamp: new Date(),\n });\n };\n\n private handleStartListening = () => {\n if (this.speechRecognition && this.enableVoiceInput && !this.disabled && !this.isLoading) {\n this.speechRecognition.start();\n }\n };\n\n private handleStopListening = () => {\n if (this.speechRecognition) {\n this.speechRecognition.stop();\n }\n };\n\n private handleSpeak = (text: string) => {\n if (this.speechSynthesis && this.enableTextToSpeech) {\n this.speechSynthesis.speak(text);\n }\n };\n\n private handleStopSpeaking = () => {\n if (this.speechSynthesis) {\n this.speechSynthesis.stop();\n }\n };\n\n private handleQuickReply = (reply: string) => {\n this.handleSendMessage(reply);\n };\n\n private setInputValue = (value: string) => {\n this.inputValue = value;\n };\n\n render() {\n // Show error state if critical error\n if (this.error && !this.apiEndpoint) {\n return (\n <Host>\n <div class=\"xplor-assistant xplor-assistant--error\">\n <div class=\"xplor-assistant__error-message\">\n {this.error}\n </div>\n </div>\n </Host>\n );\n }\n\n return (\n <Host>\n <div\n class={{\n 'xplor-assistant': true,\n 'xplor-assistant--disabled': this.disabled,\n }}\n style={{ maxHeight: this.maxHeight }}\n >\n {/* Messages Area */}\n <div\n class=\"xplor-assistant__messages\"\n ref={(el) => (this.messagesContainerRef = el)}\n >\n {this.messages.map((message) => (\n <AssistantMessage\n message={message}\n enableTextToSpeech={this.enableTextToSpeech}\n autoSpeak={false}\n isSpeaking={this.isSpeaking}\n onSpeak={this.handleSpeak}\n onStopSpeaking={this.handleStopSpeaking}\n />\n ))}\n\n {/* Loading Indicator */}\n {this.isLoading && (\n <div class=\"xplor-assistant__message xplor-assistant__message--assistant\">\n <TypingIndicator />\n </div>\n )}\n\n {/* Error Message */}\n {this.error && this.apiEndpoint && (\n <div class=\"xplor-assistant__error-banner\">\n {this.error}\n </div>\n )}\n </div>\n\n {/* Quick Replies */}\n {this.quickReplies && this.quickReplies.length > 0 && (\n <QuickReplies\n replies={this.quickReplies}\n disabled={this.disabled || this.isLoading}\n onReplyClick={this.handleQuickReply}\n />\n )}\n\n {/* Input Area */}\n <AssistantInput\n placeholder={this.placeholder}\n disabled={this.disabled}\n isLoading={this.isLoading}\n enableVoiceInput={this.enableVoiceInput && this.hasVoiceSupport}\n isListening={this.isListening}\n onSendMessage={this.handleSendMessage}\n onStartListening={this.handleStartListening}\n onStopListening={this.handleStopListening}\n inputValue={this.inputValue}\n setInputValue={this.setInputValue}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"xplor-assistant.js","sourceRoot":"","sources":["../../../src/components/xplor-assistant/xplor-assistant.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQ7G,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAO7D,MAAM,OAAO,cAAc;IAL3B;QAiBU,gBAAW,GAAW,sBAAsB,CAAC;QAC7C,qBAAgB,GAAY,IAAI,CAAC;QACjC,uBAAkB,GAAY,IAAI,CAAC;QACnC,cAAS,GAAY,KAAK,CAAC;QAC3B,cAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Event, EventEmitter, Method, Element, Watch } from '@stencil/core';\nimport {\n AssistantMessage as MessageType,\n AssistantMessageSentEvent,\n AssistantMessageReceivedEvent,\n AssistantErrorEvent,\n AssistantSessionEvent,\n} from './internal/types';\nimport { sendMessageToAPI, generateSessionId } from './utils/api';\nimport { SpeechRecognitionManager, SpeechSynthesisManager, detectBrowserCapabilities } from './utils/speech';\nimport { AssistantMessage } from './internal/AssistantMessage';\nimport { AssistantInput } from './internal/AssistantInput';\nimport { QuickReplies } from './internal/QuickReplies';\nimport { TypingIndicator } from './internal/TypingIndicator';\n\n@Component({\n tag: 'xplor-assistant',\n styleUrl: 'xplor-assistant.scss',\n scoped: true,\n})\nexport class XplorAssistant {\n @Element() el: HTMLElement;\n\n // Required Props\n @Prop() apiEndpoint!: string;\n @Prop() userId!: string;\n @Prop() userEmail!: string;\n @Prop() userName!: string;\n\n // Optional Props\n @Prop() sessionId?: string;\n @Prop() quickReplies?: string[];\n @Prop() placeholder: string = 'Type your message...';\n @Prop() enableVoiceInput: boolean = true;\n @Prop() enableTextToSpeech: boolean = true;\n @Prop() autoSpeak: boolean = false;\n @Prop() maxHeight: string = '600px';\n @Prop() disabled: boolean = false;\n\n // State\n @State() messages: MessageType[] = [];\n @State() internalSessionId: string = '';\n @State() isLoading: boolean = false;\n @State() isListening: boolean = false;\n @State() isSpeaking: boolean = false;\n @State() error: string = '';\n @State() inputValue: string = '';\n @State() hasVoiceSupport: boolean = false;\n @State() hasTTSSupport: boolean = false;\n\n // Events\n @Event() assistantMessageSent: EventEmitter<AssistantMessageSentEvent>;\n @Event() assistantMessageReceived: EventEmitter<AssistantMessageReceivedEvent>;\n @Event() assistantError: EventEmitter<AssistantErrorEvent>;\n @Event() assistantSessionCreated: EventEmitter<AssistantSessionEvent>;\n\n // Private members\n private speechRecognition: SpeechRecognitionManager;\n private speechSynthesis: SpeechSynthesisManager;\n private messagesContainerRef: HTMLDivElement;\n\n componentWillLoad() {\n // Validate required props\n if (!this.apiEndpoint) {\n console.error('xplor-assistant: apiEndpoint prop is required');\n this.error = 'Configuration error: API endpoint not provided';\n return;\n }\n\n if (!this.userId || !this.userEmail || !this.userName) {\n console.error('xplor-assistant: userId, userEmail, and userName props are required');\n this.error = 'Configuration error: User information not provided';\n return;\n }\n\n // Initialize session\n if (this.sessionId) {\n this.internalSessionId = this.sessionId;\n } else {\n this.internalSessionId = generateSessionId();\n this.assistantSessionCreated.emit({\n sessionId: this.internalSessionId,\n timestamp: new Date(),\n });\n }\n\n // Detect browser capabilities\n const capabilities = detectBrowserCapabilities();\n this.hasVoiceSupport = capabilities.voiceInput;\n this.hasTTSSupport = capabilities.textToSpeech;\n\n // Disable features if not supported\n if (!this.hasVoiceSupport) {\n this.enableVoiceInput = false;\n }\n if (!this.hasTTSSupport) {\n this.enableTextToSpeech = false;\n }\n\n // Initialize speech managers\n this.speechRecognition = new SpeechRecognitionManager();\n this.speechSynthesis = new SpeechSynthesisManager();\n\n // Setup speech recognition callbacks\n this.speechRecognition.onStart(() => {\n this.isListening = true;\n });\n\n this.speechRecognition.onEnd(() => {\n this.isListening = false;\n });\n\n this.speechRecognition.onResult((transcript) => {\n this.handleVoiceInput(transcript);\n });\n\n this.speechRecognition.onError((error) => {\n this.isListening = false;\n this.handleError(error, 'voice');\n });\n\n // Setup speech synthesis callbacks\n this.speechSynthesis.onStart(() => {\n this.isSpeaking = true;\n });\n\n this.speechSynthesis.onEnd(() => {\n this.isSpeaking = false;\n });\n }\n\n @Watch('sessionId')\n handleSessionIdChange(newSessionId: string) {\n if (newSessionId && newSessionId !== this.internalSessionId) {\n this.internalSessionId = newSessionId;\n }\n }\n\n componentDidUpdate() {\n // Auto-scroll to bottom when new messages arrive\n this.scrollToBottom();\n }\n\n disconnectedCallback() {\n // Cleanup speech synthesis\n if (this.speechSynthesis) {\n this.speechSynthesis.stop();\n }\n }\n\n // Public Methods\n\n @Method()\n async sendMessage(message: string): Promise<void> {\n if (!message || !message.trim()) {\n return;\n }\n await this.handleSendMessage(message);\n }\n\n @Method()\n async clearHistory(): Promise<void> {\n this.messages = [];\n this.error = '';\n }\n\n @Method()\n async speak(text: string): Promise<void> {\n if (this.enableTextToSpeech && this.speechSynthesis) {\n this.speechSynthesis.speak(text);\n }\n }\n\n @Method()\n async stopSpeaking(): Promise<void> {\n if (this.speechSynthesis) {\n this.speechSynthesis.stop();\n }\n }\n\n // Private Methods\n\n private scrollToBottom() {\n if (this.messagesContainerRef) {\n setTimeout(() => {\n this.messagesContainerRef.scrollTop = this.messagesContainerRef.scrollHeight;\n }, 100);\n }\n }\n\n private handleSendMessage = async (messageText: string) => {\n console.log('[XplorAssistant] handleSendMessage called with:', messageText);\n\n if (this.disabled || this.isLoading || !messageText.trim()) {\n console.log('[XplorAssistant] Message blocked - disabled:', this.disabled, 'isLoading:', this.isLoading, 'hasValue:', !!messageText.trim());\n return;\n }\n\n // Clear the input immediately\n this.inputValue = '';\n console.log('[XplorAssistant] Input cleared, proceeding with message');\n\n const userMessage: MessageType = {\n id: `user-${Date.now()}`,\n role: 'user',\n content: messageText.trim(),\n timestamp: new Date(),\n };\n\n // Add user message to the conversation\n this.messages = [...this.messages, userMessage];\n this.error = '';\n this.isLoading = true;\n\n // Emit message sent event\n this.assistantMessageSent.emit({\n message: userMessage.content,\n sessionId: this.internalSessionId,\n timestamp: userMessage.timestamp,\n });\n\n try {\n // Call the API\n const response = await sendMessageToAPI(\n this.apiEndpoint,\n userMessage.content,\n this.internalSessionId,\n this.userId,\n this.userEmail,\n this.userName\n );\n\n // Update session ID if changed\n if (response.sessionId && response.sessionId !== this.internalSessionId) {\n this.internalSessionId = response.sessionId;\n }\n\n // Add assistant response to conversation\n const assistantMessage: MessageType = {\n id: `assistant-${Date.now()}`,\n role: 'assistant',\n content: response.message,\n timestamp: new Date(),\n };\n\n this.messages = [...this.messages, assistantMessage];\n\n // Emit message received event\n this.assistantMessageReceived.emit({\n message: assistantMessage.content,\n sessionId: this.internalSessionId,\n timestamp: assistantMessage.timestamp,\n });\n\n // Auto-speak if enabled\n if (this.autoSpeak && this.enableTextToSpeech) {\n this.speechSynthesis.speak(assistantMessage.content);\n }\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Failed to send message';\n this.handleError(errorMessage, 'api');\n } finally {\n this.isLoading = false;\n }\n };\n\n private handleVoiceInput = (transcript: string) => {\n if (transcript && transcript.trim()) {\n this.handleSendMessage(transcript);\n }\n };\n\n private handleError = (error: string, type: 'api' | 'voice' | 'tts' | 'network' | 'validation') => {\n this.error = error;\n this.assistantError.emit({\n error,\n type,\n timestamp: new Date(),\n });\n };\n\n private handleStartListening = () => {\n if (this.speechRecognition && this.enableVoiceInput && !this.disabled && !this.isLoading) {\n this.speechRecognition.start();\n }\n };\n\n private handleStopListening = () => {\n if (this.speechRecognition) {\n this.speechRecognition.stop();\n }\n };\n\n private handleSpeak = (text: string) => {\n if (this.speechSynthesis && this.enableTextToSpeech) {\n this.speechSynthesis.speak(text);\n }\n };\n\n private handleStopSpeaking = () => {\n if (this.speechSynthesis) {\n this.speechSynthesis.stop();\n }\n };\n\n private handleQuickReply = (reply: string) => {\n this.handleSendMessage(reply);\n };\n\n private setInputValue = (value: string) => {\n this.inputValue = value;\n };\n\n render() {\n // Show error state if critical error\n if (this.error && !this.apiEndpoint) {\n return (\n <Host>\n <div class=\"xplor-assistant xplor-assistant--error\">\n <div class=\"xplor-assistant__error-message\">\n {this.error}\n </div>\n </div>\n </Host>\n );\n }\n\n return (\n <Host>\n <div\n class={{\n 'xplor-assistant': true,\n 'xplor-assistant--disabled': this.disabled,\n }}\n style={{ maxHeight: this.maxHeight }}\n >\n {/* Messages Area */}\n <div\n class=\"xplor-assistant__messages\"\n ref={(el) => (this.messagesContainerRef = el)}\n role=\"log\"\n aria-live=\"polite\"\n aria-busy={this.isLoading ? 'true' : 'false'}\n >\n {this.messages.map((message) => (\n <AssistantMessage\n message={message}\n enableTextToSpeech={this.enableTextToSpeech}\n autoSpeak={false}\n isSpeaking={this.isSpeaking}\n onSpeak={this.handleSpeak}\n onStopSpeaking={this.handleStopSpeaking}\n />\n ))}\n\n {/* Loading Indicator */}\n {this.isLoading && (\n <div class=\"xplor-assistant__message xplor-assistant__message--assistant\">\n <TypingIndicator />\n </div>\n )}\n\n {/* Error Message */}\n {this.error && this.apiEndpoint && (\n <div class=\"xplor-assistant__error-banner\">\n {this.error}\n </div>\n )}\n </div>\n\n {/* Quick Replies */}\n {this.quickReplies && this.quickReplies.length > 0 && (\n <QuickReplies\n replies={this.quickReplies}\n disabled={this.disabled || this.isLoading}\n onReplyClick={this.handleQuickReply}\n />\n )}\n\n {/* Input Area */}\n <AssistantInput\n placeholder={this.placeholder}\n disabled={this.disabled}\n isLoading={this.isLoading}\n enableVoiceInput={this.enableVoiceInput && this.hasVoiceSupport}\n isListening={this.isListening}\n onSendMessage={this.handleSendMessage}\n onStartListening={this.handleStartListening}\n onStopListening={this.handleStopListening}\n inputValue={this.inputValue}\n setInputValue={this.setInputValue}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -193,25 +193,30 @@ export class XplorAutocomplete {
|
|
|
193
193
|
}
|
|
194
194
|
render() {
|
|
195
195
|
const hasValue = this.multiple ? this.selectedItems.length > 0 : this.value !== null && this.searchQuery !== '';
|
|
196
|
-
|
|
196
|
+
const listboxId = 'autocomplete-listbox';
|
|
197
|
+
const labelId = 'autocomplete-label';
|
|
198
|
+
const activeDescendantId = this.highlightedIndex >= 0 ? `autocomplete-option-${this.highlightedIndex}` : undefined;
|
|
199
|
+
return (h(Host, { key: 'f76ac5f9d1cd6e6c9618ac3884bc86a2bfabb3c5' }, h("div", { key: 'efd2bd854c305c56971b5d6e19a5b9eb497099f8', class: {
|
|
197
200
|
'autocomplete': true,
|
|
198
201
|
'autocomplete--disabled': this.disabled,
|
|
199
202
|
'autocomplete--readonly': this.readonly,
|
|
200
203
|
'autocomplete--open': this.isOpen,
|
|
201
|
-
} }, this.label && (h("label", { key: '
|
|
204
|
+
} }, this.label && (h("label", { key: '97bb161105b66181558d22519c9f0cd1287b2c49', class: "autocomplete__label", id: labelId }, this.label)), h("div", { key: '128acf53793205be89a8d619ce548107aaed8b28', class: "autocomplete__input-wrapper" }, this.multiple && this.selectedItems.length > 0 && (h("div", { key: '670da50897139688951c077db4b6116b88bfadfa', class: "autocomplete__chips" }, this.selectedItems.map(value => {
|
|
202
205
|
const item = this.findItemByValue(value);
|
|
203
|
-
|
|
204
|
-
|
|
206
|
+
const chipLabel = this.getSelectedItemLabel(value);
|
|
207
|
+
return (h("div", { class: "autocomplete__chip" }, h("span", { class: "autocomplete__chip-label" }, this.renderSelection && item ? this.renderSelection(item) : chipLabel), h("button", { type: "button", class: "autocomplete__chip-remove", onClick: () => this.removeItem(value), disabled: this.disabled || this.readonly, "aria-label": `Remove ${chipLabel}` }, "\u00D7")));
|
|
208
|
+
}))), h("input", { key: '25e9e5111726cd720ab88a4a5ae25f84b48eee1e', ref: (el) => (this.inputEl = el), type: "text", class: "autocomplete__input", placeholder: this.placeholder, value: this.searchQuery, onFocus: this.handleInputFocus, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, disabled: this.disabled, readonly: this.readonly, autocomplete: "off", role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-controls": this.isOpen ? listboxId : undefined, "aria-activedescendant": activeDescendantId, "aria-labelledby": this.label ? labelId : undefined, "aria-label": !this.label ? (this.ariaLabel || this.placeholder) : undefined, "aria-autocomplete": "list" }), h("div", { key: '5128b893c4743a49439a279b0cb7094077ebd528', class: "autocomplete__actions" }, this.clearable && hasValue && !this.disabled && !this.readonly && (h("button", { key: '512d7956e79d9767e072462f1ec309b081716c86', type: "button", class: "autocomplete__clear", onClick: this.handleClear, "aria-label": "Clear selection" }, "\u00D7")), h("span", { key: 'e0cfba3c1513b63f9697835ad6919d045c7011db', class: "autocomplete__icon", "aria-hidden": "true" }, "\u25BC"))), this.isOpen && this.filteredItems.length > 0 && (h("div", { key: '9c100abedb5ee252df82994722c0da9d5787d1bf', class: "autocomplete__dropdown", ref: (el) => (this.dropdownEl = el), style: { maxWidth: this.menuMaxWidth }, role: "listbox", id: listboxId, "aria-label": this.label || this.ariaLabel || 'Suggestions' }, this.filteredItems.map((item, index) => {
|
|
205
209
|
const itemVal = this.getItemValue(item);
|
|
206
|
-
|
|
210
|
+
const isSelected = this.multiple
|
|
211
|
+
? this.selectedItems.includes(itemVal)
|
|
212
|
+
: this.value === itemVal;
|
|
213
|
+
return (h("div", { key: itemVal, id: `autocomplete-option-${index}`, "data-index": index, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": item.disabled ? 'true' : undefined, class: {
|
|
207
214
|
'autocomplete__item': true,
|
|
208
215
|
'autocomplete__item--highlighted': index === this.highlightedIndex,
|
|
209
|
-
'autocomplete__item--selected':
|
|
210
|
-
? this.selectedItems.includes(itemVal)
|
|
211
|
-
: this.value === itemVal,
|
|
216
|
+
'autocomplete__item--selected': isSelected,
|
|
212
217
|
'autocomplete__item--disabled': item.disabled,
|
|
213
218
|
}, onClick: () => this.selectItem(item) }, this.renderItem ? this.renderItem(item) : this.getItemText(item)));
|
|
214
|
-
}))), this.isOpen && this.filteredItems.length === 0 && (h("div", { key: '
|
|
219
|
+
}))), this.isOpen && this.filteredItems.length === 0 && (h("div", { key: '329f92d7f4bf36bb114909853e249978412ae82f', class: "autocomplete__dropdown", style: { maxWidth: this.menuMaxWidth }, role: "listbox", id: listboxId }, h("div", { key: '400e97f955724f59830fb37b52d99c3723627e51', class: "autocomplete__no-results", role: "option", "aria-disabled": "true" }, "No results found"))))));
|
|
215
220
|
}
|
|
216
221
|
static get is() { return "xplor-autocomplete"; }
|
|
217
222
|
static get encapsulation() { return "scoped"; }
|
|
@@ -311,6 +316,25 @@ export class XplorAutocomplete {
|
|
|
311
316
|
"setter": false,
|
|
312
317
|
"reflect": false
|
|
313
318
|
},
|
|
319
|
+
"ariaLabel": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"attribute": "aria-label",
|
|
322
|
+
"mutable": false,
|
|
323
|
+
"complexType": {
|
|
324
|
+
"original": "string",
|
|
325
|
+
"resolved": "string",
|
|
326
|
+
"references": {}
|
|
327
|
+
},
|
|
328
|
+
"required": false,
|
|
329
|
+
"optional": false,
|
|
330
|
+
"docs": {
|
|
331
|
+
"tags": [],
|
|
332
|
+
"text": "Accessible label for the input when no visible label is provided"
|
|
333
|
+
},
|
|
334
|
+
"getter": false,
|
|
335
|
+
"setter": false,
|
|
336
|
+
"reflect": false
|
|
337
|
+
},
|
|
314
338
|
"disabled": {
|
|
315
339
|
"type": "boolean",
|
|
316
340
|
"attribute": "disabled",
|