@carbon/ai-chat-components 1.9.0-alpha.0 → 1.9.0-rc.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/LICENSE +201 -0
- package/README.md +1 -5
- package/custom-elements.json +3838 -3356
- package/es/components/audio-player/index.d.ts +4 -4
- package/es/components/audio-player/src/audio-player.d.ts +1 -1
- package/es/components/audio-player/src/audio-player.js +33 -38
- package/es/components/audio-player/src/audio-player.js.map +1 -1
- package/es/components/audio-player/src/providers/base-provider.d.ts +2 -2
- package/es/components/audio-player/src/providers/base-provider.js +9 -9
- package/es/components/audio-player/src/providers/native-audio-provider.d.ts +2 -2
- package/es/components/audio-player/src/providers/native-audio-provider.js +18 -18
- package/es/components/audio-player/src/providers/soundcloud-provider.d.ts +2 -2
- package/es/components/audio-player/src/providers/soundcloud-provider.js +14 -14
- package/es/components/audio-player/src/transcript.d.ts +2 -2
- package/es/components/audio-player/src/transcript.js +13 -16
- package/es/components/audio-player/src/transcript.js.map +1 -1
- package/es/components/audio-player/src/utils/url-detector.js +1 -1
- package/es/components/card/index.d.ts +4 -4
- package/es/components/card/src/card-footer.d.ts +5 -5
- package/es/components/card/src/card-footer.js +12 -16
- package/es/components/card/src/card-footer.js.map +1 -1
- package/es/components/card/src/card-footer.scss.js +1 -1
- package/es/components/card/src/card-steps.d.ts +4 -4
- package/es/components/card/src/card-steps.js +3 -5
- package/es/components/card/src/card-steps.js.map +1 -1
- package/es/components/card/src/card-steps.scss.js +1 -1
- package/es/components/card/src/card.d.ts +2 -2
- package/es/components/card/src/card.js +3 -3
- package/es/components/card/src/card.scss.js +1 -1
- package/es/components/carousel/index.d.ts +1 -1
- package/es/components/carousel/src/carousel.d.ts +2 -2
- package/es/components/carousel/src/carousel.js +4 -6
- package/es/components/carousel/src/carousel.js.map +1 -1
- package/es/components/carousel/src/carousel.scss.js +1 -1
- package/es/components/chain-of-thought/defs.js +1 -1
- package/es/components/chain-of-thought/index.d.ts +10 -10
- package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +4 -4
- package/es/components/chain-of-thought/src/chain-of-thought-step.js +36 -42
- package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +2 -2
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +11 -14
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.d.ts +4 -4
- package/es/components/chain-of-thought/src/chain-of-thought.js +16 -17
- package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.d.ts +2 -2
- package/es/components/chain-of-thought/src/tool-call-data.js +17 -23
- package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es/components/chat-button/defs.d.ts +1 -1
- package/es/components/chat-button/defs.js +1 -1
- package/es/components/chat-button/index.d.ts +2 -2
- package/es/components/chat-button/src/chat-button.d.ts +5 -5
- package/es/components/chat-button/src/chat-button.js +6 -6
- package/es/components/chat-button/src/chat-button.scss.js +1 -1
- package/es/components/chat-history/index.d.ts +11 -11
- package/es/components/chat-history/src/history-content.d.ts +1 -1
- package/es/components/chat-history/src/history-content.js +6 -6
- package/es/components/chat-history/src/history-delete-panel.d.ts +2 -2
- package/es/components/chat-history/src/history-delete-panel.js +11 -11
- package/es/components/chat-history/src/history-header.d.ts +2 -2
- package/es/components/chat-history/src/history-header.js +9 -10
- package/es/components/chat-history/src/history-header.js.map +1 -1
- package/es/components/chat-history/src/history-loading.d.ts +2 -2
- package/es/components/chat-history/src/history-loading.js +1 -1
- package/es/components/chat-history/src/history-panel-item-input.d.ts +2 -2
- package/es/components/chat-history/src/history-panel-item-input.js +21 -22
- package/es/components/chat-history/src/history-panel-item-input.js.map +1 -1
- package/es/components/chat-history/src/history-panel-item.d.ts +5 -5
- package/es/components/chat-history/src/history-panel-item.js +39 -41
- package/es/components/chat-history/src/history-panel-item.js.map +1 -1
- package/es/components/chat-history/src/history-panel-items.d.ts +1 -1
- package/es/components/chat-history/src/history-panel-items.js +1 -1
- package/es/components/chat-history/src/history-panel-menu.d.ts +1 -1
- package/es/components/chat-history/src/history-panel.d.ts +1 -1
- package/es/components/chat-history/src/history-panel.js +3 -3
- package/es/components/chat-history/src/history-search-item.d.ts +1 -1
- package/es/components/chat-history/src/history-search-item.js +4 -4
- package/es/components/chat-history/src/history-shell.d.ts +1 -1
- package/es/components/chat-history/src/history-shell.js +3 -3
- package/es/components/chat-history/src/history-toolbar.d.ts +9 -5
- package/es/components/chat-history/src/history-toolbar.js +13 -10
- package/es/components/chat-history/src/history-toolbar.js.map +1 -1
- package/es/components/chat-shell/index.d.ts +5 -5
- package/es/components/chat-shell/src/chat-header.d.ts +8 -8
- package/es/components/chat-shell/src/chat-header.js +37 -44
- package/es/components/chat-shell/src/chat-header.js.map +1 -1
- package/es/components/chat-shell/src/corner-manager.d.ts +1 -1
- package/es/components/chat-shell/src/corner-manager.js +30 -30
- package/es/components/chat-shell/src/initialization-manager.d.ts +1 -1
- package/es/components/chat-shell/src/panel-manager.d.ts +1 -1
- package/es/components/chat-shell/src/panel-manager.js +12 -12
- package/es/components/chat-shell/src/panel.d.ts +2 -2
- package/es/components/chat-shell/src/panel.js +99 -100
- package/es/components/chat-shell/src/panel.js.map +1 -1
- package/es/components/chat-shell/src/resize-observer-manager.d.ts +1 -1
- package/es/components/chat-shell/src/resize-observer-manager.js +10 -10
- package/es/components/chat-shell/src/shell.d.ts +8 -8
- package/es/components/chat-shell/src/shell.js +128 -135
- package/es/components/chat-shell/src/shell.js.map +1 -1
- package/es/components/chat-shell/src/slot-observer.d.ts +1 -1
- package/es/components/chat-shell/src/slot-observer.js +4 -7
- package/es/components/chat-shell/src/slot-observer.js.map +1 -1
- package/es/components/chat-shell/src/types.d.ts +4 -4
- package/es/components/chat-shell/src/workspace-manager-utils.js +4 -4
- package/es/components/chat-shell/src/workspace-manager.d.ts +1 -1
- package/es/components/chat-shell/src/workspace-manager.js +32 -32
- package/es/components/code-snippet/index.d.ts +4 -4
- package/es/components/code-snippet/src/code-snippet.d.ts +8 -8
- package/es/components/code-snippet/src/code-snippet.js +87 -93
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/base-setup.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/base-setup.js +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-loader.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-loader.js +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +8 -8
- package/es/components/code-snippet/src/codemirror/content-sync.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/content-sync.js +2 -2
- package/es/components/code-snippet/src/codemirror/detect-language.d.ts +6 -0
- package/es/components/code-snippet/src/codemirror/detect-language.js +77 -0
- package/es/components/code-snippet/src/codemirror/detect-language.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/diff-decorator.d.ts +2 -2
- package/es/components/code-snippet/src/codemirror/diff-decorator.js +4 -4
- package/es/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -4
- package/es/components/code-snippet/src/codemirror/editor-manager.js +4 -4
- package/es/components/code-snippet/src/codemirror/language-controller.d.ts +3 -3
- package/es/components/code-snippet/src/codemirror/language-controller.js +3 -3
- package/es/components/code-snippet/src/codemirror/language-data.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/language-data.js +299 -299
- package/es/components/code-snippet/src/codemirror/language-utils.d.ts +2 -2
- package/es/components/code-snippet/src/codemirror/language-utils.js +60 -66
- package/es/components/code-snippet/src/codemirror/language-utils.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/marker-utils.js +15 -15
- package/es/components/code-snippet/src/codemirror/theme.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/theme.js +163 -163
- package/es/components/code-snippet/src/dom-utils.js +6 -6
- package/es/components/code-snippet/src/layout-utils.d.ts +2 -2
- package/es/components/code-snippet/src/layout-utils.js +9 -9
- package/es/components/code-snippet/src/streaming-manager.js +5 -5
- package/es/components/feedback/index.d.ts +4 -4
- package/es/components/feedback/src/feedback-buttons.d.ts +3 -3
- package/es/components/feedback/src/feedback-buttons.js +17 -19
- package/es/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es/components/feedback/src/feedback.d.ts +9 -9
- package/es/components/feedback/src/feedback.js +38 -45
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/file-uploads/index.d.ts +5 -4
- package/es/components/file-uploads/src/file-type-icon.d.ts +18 -0
- package/es/components/file-uploads/src/file-type-icon.js +87 -0
- package/es/components/file-uploads/src/file-type-icon.js.map +1 -0
- package/es/components/file-uploads/src/file-upload-item.d.ts +69 -8
- package/es/components/file-uploads/src/file-upload-item.js +210 -111
- package/es/components/file-uploads/src/file-upload-item.js.map +1 -1
- package/es/components/file-uploads/src/file-uploads.d.ts +8 -4
- package/es/components/file-uploads/src/file-uploads.js +54 -29
- package/es/components/file-uploads/src/file-uploads.js.map +1 -1
- package/es/components/file-uploads/src/file-uploads.scss.js +1 -1
- package/es/components/file-uploads/src/types.d.ts +39 -0
- package/es/components/file-uploads/src/types.js +8 -0
- package/es/components/file-uploads/src/types.js.map +1 -0
- package/es/components/launcher/index.d.ts +9 -0
- package/es/components/launcher/index.js +9 -0
- package/es/components/launcher/index.js.map +1 -0
- package/es/components/launcher/src/launcher.d.ts +68 -0
- package/es/components/launcher/src/launcher.js +152 -0
- package/es/components/launcher/src/launcher.js.map +1 -0
- package/es/components/launcher/src/launcher.scss.js +13 -0
- package/es/components/launcher/src/launcher.scss.js.map +1 -0
- package/es/components/markdown/index.d.ts +5 -5
- package/es/components/markdown/src/markdown-renderer-types.d.ts +10 -3
- package/es/components/markdown/src/markdown-renderer.d.ts +9 -9
- package/es/components/markdown/src/markdown-renderer.js +85 -80
- package/es/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es/components/markdown/src/markdown-token-tree.d.ts +1 -1
- package/es/components/markdown/src/markdown-token-tree.js +20 -20
- package/es/components/markdown/src/markdown.d.ts +4 -7
- package/es/components/markdown/src/markdown.js +96 -82
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.template.js +1 -1
- package/es/components/markdown/src/plugins/markdown-it-attrs.d.ts +1 -1
- package/es/components/markdown/src/plugins/markdown-it-attrs.js +19 -19
- package/es/components/markdown/src/plugins/markdown-it-highlight.d.ts +1 -1
- package/es/components/markdown/src/plugins/markdown-it-highlight.js +5 -5
- package/es/components/markdown/src/plugins/markdown-it-task-lists.d.ts +1 -1
- package/es/components/markdown/src/plugins/markdown-it-task-lists.js +14 -14
- package/es/components/markdown/src/utils/html-helpers.d.ts +1 -1
- package/es/components/markdown/src/utils/html-helpers.js +72 -72
- package/es/components/markdown/src/utils/lit-directives.d.ts +2 -2
- package/es/components/markdown/src/utils/lit-directives.js +5 -5
- package/es/components/markdown/src/utils/plugin-fallback.d.ts +4 -4
- package/es/components/markdown/src/utils/plugin-fallback.js +61 -61
- package/es/components/markdown/src/utils/streaming-table.d.ts +1 -1
- package/es/components/markdown/src/utils/streaming-table.js +6 -6
- package/es/components/markdown/src/utils/table-helpers.d.ts +4 -4
- package/es/components/markdown/src/utils/table-helpers.js +17 -18
- package/es/components/markdown/src/utils/table-helpers.js.map +1 -1
- package/es/components/processing/index.d.ts +1 -1
- package/es/components/processing/src/processing.d.ts +2 -2
- package/es/components/processing/src/processing.js +2 -2
- package/es/components/prompt-line/autocomplete/index.d.ts +12 -0
- package/es/components/prompt-line/autocomplete/index.js +9 -0
- package/es/components/prompt-line/autocomplete/index.js.map +1 -0
- package/es/components/prompt-line/autocomplete/src/autocomplete.d.ts +165 -0
- package/es/components/prompt-line/autocomplete/src/autocomplete.js +506 -0
- package/es/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -0
- package/es/components/{autocomplete → prompt-line/autocomplete}/src/autocomplete.scss.js +1 -1
- package/es/components/prompt-line/index.d.ts +18 -18
- package/es/components/prompt-line/src/autocomplete-controller.d.ts +10 -8
- package/es/components/prompt-line/src/autocomplete-controller.js +107 -47
- package/es/components/prompt-line/src/autocomplete-controller.js.map +1 -1
- package/es/components/prompt-line/src/error-message.d.ts +3 -7
- package/es/components/prompt-line/src/error-message.js +13 -23
- package/es/components/prompt-line/src/error-message.js.map +1 -1
- package/es/components/prompt-line/src/error-message.scss.js +1 -1
- package/es/components/prompt-line/src/prompt-line-constants.js +1 -1
- package/es/components/prompt-line/src/prompt-line-controller.d.ts +1 -1
- package/es/components/prompt-line/src/prompt-line-controller.js +83 -83
- package/es/components/prompt-line/src/prompt-line-rich-loader.d.ts +1 -1
- package/es/components/prompt-line/src/prompt-line-rich-loader.js +1 -1
- package/es/components/prompt-line/src/prompt-line-rich-runtime.d.ts +1 -1
- package/es/components/prompt-line/src/prompt-line-rich-runtime.js +30 -28
- package/es/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-shell.d.ts +2 -2
- package/es/components/prompt-line/src/prompt-line-shell.js +11 -13
- package/es/components/prompt-line/src/prompt-line-shell.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-shell.scss.js +1 -1
- package/es/components/prompt-line/src/prompt-line.d.ts +5 -5
- package/es/components/prompt-line/src/prompt-line.js +35 -35
- package/es/components/prompt-line/src/prompt-line.js.map +1 -1
- package/es/components/prompt-line/src/send-control.d.ts +4 -4
- package/es/components/prompt-line/src/send-control.js +18 -20
- package/es/components/prompt-line/src/send-control.js.map +1 -1
- package/es/components/prompt-line/src/stop-streaming-button.d.ts +3 -3
- package/es/components/prompt-line/src/stop-streaming-button.js +7 -8
- package/es/components/prompt-line/src/stop-streaming-button.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/build-extensions.d.ts +3 -3
- package/es/components/prompt-line/src/tiptap/build-extensions.js +2 -2
- package/es/components/prompt-line/src/tiptap/build-extensions.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +2 -2
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js +7 -7
- package/es/components/prompt-line/src/tiptap/carbon-mention.d.ts +2 -2
- package/es/components/prompt-line/src/tiptap/carbon-mention.js +9 -9
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +4 -3
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js +18 -12
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/chat-enter.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/chat-enter.js +2 -2
- package/es/components/prompt-line/src/tiptap/editor-styles.js +26 -26
- package/es/components/prompt-line/src/tiptap/index.d.ts +24 -24
- package/es/components/prompt-line/src/tiptap/index.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/json-utils.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/json-utils.js +17 -17
- package/es/components/prompt-line/src/tiptap/keymap.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/keymap.js +3 -3
- package/es/components/prompt-line/src/tiptap/origin-meta.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/origin-meta.js +2 -2
- package/es/components/prompt-line/src/tiptap/plain-text-paste.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/plain-text-paste.js +5 -5
- package/es/components/prompt-line/src/tiptap/render-in-light-dom.d.ts +3 -3
- package/es/components/prompt-line/src/tiptap/render-in-light-dom.js +3 -3
- package/es/components/prompt-line/src/tiptap/render-token-chip.d.ts +4 -4
- package/es/components/prompt-line/src/tiptap/render-token-chip.js +22 -22
- package/es/components/prompt-line/src/tiptap/token-node-view.d.ts +4 -4
- package/es/components/prompt-line/src/tiptap/token-node-view.js +1 -1
- package/es/components/prompt-line/src/tiptap/trigger-utils.d.ts +9 -2
- package/es/components/prompt-line/src/tiptap/trigger-utils.js +11 -2
- package/es/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/types.d.ts +24 -3
- package/es/components/prompt-line/src/tiptap/typing-indicator.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/typing-indicator.js +2 -2
- package/es/components/prompt-line/src/tiptap/value-sync.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/value-sync.js +2 -2
- package/es/components/prompt-line/src/types.d.ts +2 -2
- package/es/components/prompt-line/src/types.js.map +1 -1
- package/es/components/reasoning-steps/index.d.ts +4 -4
- package/es/components/reasoning-steps/src/reasoning-step.d.ts +2 -2
- package/es/components/reasoning-steps/src/reasoning-step.js +27 -31
- package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +2 -2
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +12 -14
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.d.ts +2 -2
- package/es/components/reasoning-steps/src/reasoning-steps.js +19 -20
- package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es/components/shared/dynamic-css-var-sheet.js +7 -7
- package/es/components/shared/media-utils/script-loader.js +1 -1
- package/es/components/table/index.d.ts +3 -3
- package/es/components/table/src/table-loader.d.ts +1 -1
- package/es/components/table/src/table-loader.js +1 -1
- package/es/components/table/src/table-pagination.template.d.ts +3 -3
- package/es/components/table/src/table-pagination.template.js +4 -5
- package/es/components/table/src/table-pagination.template.js.map +1 -1
- package/es/components/table/src/table-runtime.d.ts +2 -2
- package/es/components/table/src/table-skeleton.template.d.ts +1 -1
- package/es/components/table/src/table-skeleton.template.js +2 -3
- package/es/components/table/src/table-skeleton.template.js.map +1 -1
- package/es/components/table/src/table.d.ts +3 -4
- package/es/components/table/src/table.js +36 -39
- package/es/components/table/src/table.js.map +1 -1
- package/es/components/table/src/table.template.d.ts +5 -5
- package/es/components/table/src/table.template.js +6 -9
- package/es/components/table/src/table.template.js.map +1 -1
- package/es/components/toolbar/index.d.ts +1 -1
- package/es/components/toolbar/src/toolbar.d.ts +9 -7
- package/es/components/toolbar/src/toolbar.js +45 -33
- package/es/components/toolbar/src/toolbar.js.map +1 -1
- package/es/components/toolbar/src/toolbar.scss.js +1 -1
- package/es/components/truncated-text/index.d.ts +1 -1
- package/es/components/truncated-text/src/truncated-text.d.ts +5 -5
- package/es/components/truncated-text/src/truncated-text.js +26 -28
- package/es/components/truncated-text/src/truncated-text.js.map +1 -1
- package/es/components/truncated-text/src/truncated-text.scss.js +1 -1
- package/es/components/video-player/index.d.ts +2 -2
- package/es/components/video-player/src/providers/base-provider.d.ts +3 -3
- package/es/components/video-player/src/providers/base-provider.js +5 -5
- package/es/components/video-player/src/providers/kaltura-provider.d.ts +2 -2
- package/es/components/video-player/src/providers/kaltura-provider.js +23 -23
- package/es/components/video-player/src/providers/native-video-provider.d.ts +2 -2
- package/es/components/video-player/src/providers/native-video-provider.js +20 -20
- package/es/components/video-player/src/providers/vimeo-provider.d.ts +2 -2
- package/es/components/video-player/src/providers/vimeo-provider.js +23 -23
- package/es/components/video-player/src/providers/youtube-provider.d.ts +2 -2
- package/es/components/video-player/src/providers/youtube-provider.js +15 -15
- package/es/components/video-player/src/utils/url-detector.js +1 -1
- package/es/components/video-player/src/video-player.d.ts +2 -2
- package/es/components/video-player/src/video-player.js +37 -41
- package/es/components/video-player/src/video-player.js.map +1 -1
- package/es/components/workspace-shell/index.d.ts +4 -4
- package/es/components/workspace-shell/src/header-collapsible-manager.js +13 -13
- package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
- package/es/components/workspace-shell/src/workspace-shell-body.js +2 -2
- package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +4 -4
- package/es/components/workspace-shell/src/workspace-shell-footer.js +10 -11
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.d.ts +2 -2
- package/es/components/workspace-shell/src/workspace-shell-header.js +10 -13
- package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell.d.ts +1 -1
- package/es/components/workspace-shell/src/workspace-shell.js +3 -3
- package/es/globals/decorators/carbon-element.d.ts +4 -4
- package/es/globals/decorators/carbon-element.js +2 -2
- package/es/globals/decorators/index.d.ts +1 -1
- package/es/globals/scss/common.scss.js +1 -1
- package/es/globals/settings.js +2 -2
- package/es/globals/utils/aria-announcer-manager.d.ts +1 -1
- package/es/globals/utils/aria-announcer-manager.js +6 -6
- package/es/globals/utils/browser-utils.js +1 -1
- package/es/globals/utils/csv.d.ts +8 -0
- package/es/globals/utils/csv.js +37 -0
- package/es/globals/utils/csv.js.map +1 -0
- package/es/globals/utils/dom-utils.js +1 -1
- package/es/globals/utils/focus-utils.js +4 -4
- package/es/globals/utils/iconTransform.d.ts +2 -2
- package/es/globals/utils/iconTransform.js +21 -21
- package/es/globals/utils/rtl-utils.js +1 -1
- package/es/globals/utils/uuid.js +5 -5
- package/es/react/__tests__/jest.setup.js +12 -12
- package/es/react/ai-label-action-button.d.ts +1 -1
- package/es/react/ai-label-action-button.js +1 -1
- package/es/react/audio-player.d.ts +1 -1
- package/es/react/audio-player.js +5 -5
- package/es/react/autocomplete.d.ts +1 -1
- package/es/react/autocomplete.js +5 -5
- package/es/react/card.d.ts +1 -1
- package/es/react/card.js +5 -5
- package/es/react/carousel.d.ts +1 -1
- package/es/react/carousel.js +2 -2
- package/es/react/chain-of-thought-step.d.ts +1 -1
- package/es/react/chain-of-thought-step.js +4 -4
- package/es/react/chain-of-thought-toggle.d.ts +2 -2
- package/es/react/chain-of-thought-toggle.js +3 -3
- package/es/react/chain-of-thought.d.ts +2 -2
- package/es/react/chain-of-thought.js +4 -4
- package/es/react/chat-button.d.ts +3 -3
- package/es/react/chat-button.js +2 -2
- package/es/react/chat-header.d.ts +3 -3
- package/es/react/chat-header.js +2 -2
- package/es/react/chat-shell.d.ts +2 -2
- package/es/react/chat-shell.js +2 -2
- package/es/react/code-snippet.d.ts +4 -4
- package/es/react/code-snippet.js +3 -3
- package/es/react/error-message.d.ts +1 -1
- package/es/react/error-message.js +1 -1
- package/es/react/feedback-buttons.d.ts +1 -1
- package/es/react/feedback-buttons.js +3 -3
- package/es/react/feedback.d.ts +2 -2
- package/es/react/feedback.js +4 -4
- package/es/react/file-upload-item.d.ts +11 -0
- package/es/react/file-upload-item.js +31 -0
- package/es/react/file-upload-item.js.map +1 -0
- package/es/react/file-uploads.d.ts +1 -1
- package/es/react/file-uploads.js +2 -2
- package/es/react/history/history-content.d.ts +1 -1
- package/es/react/history/history-content.js +1 -1
- package/es/react/history/history-delete-panel.d.ts +1 -1
- package/es/react/history/history-delete-panel.js +3 -3
- package/es/react/history/history-header.d.ts +1 -1
- package/es/react/history/history-header.js +2 -2
- package/es/react/history/history-loading.d.ts +1 -1
- package/es/react/history/history-loading.js +1 -1
- package/es/react/history/history-panel-item-input.d.ts +1 -1
- package/es/react/history/history-panel-item-input.js +4 -4
- package/es/react/history/history-panel-item.d.ts +1 -1
- package/es/react/history/history-panel-item.js +6 -6
- package/es/react/history/history-panel-items.d.ts +1 -1
- package/es/react/history/history-panel-items.js +1 -1
- package/es/react/history/history-panel-menu.d.ts +1 -1
- package/es/react/history/history-panel-menu.js +1 -1
- package/es/react/history/history-panel.d.ts +1 -1
- package/es/react/history/history-panel.js +1 -1
- package/es/react/history/history-search-item.d.ts +1 -1
- package/es/react/history/history-search-item.js +2 -2
- package/es/react/history/history-shell.d.ts +1 -1
- package/es/react/history/history-shell.js +1 -1
- package/es/react/history/history-toolbar.d.ts +1 -1
- package/es/react/history/history-toolbar.js +3 -3
- package/es/react/history/index.d.ts +12 -12
- package/es/react/hooks/useChatAutocomplete.d.ts +4 -4
- package/es/react/hooks/useChatAutocomplete.js +38 -12
- package/es/react/hooks/useChatAutocomplete.js.map +1 -1
- package/es/react/input-send-control.d.ts +1 -1
- package/es/react/input-send-control.js +3 -3
- package/es/react/launcher.d.ts +11 -0
- package/es/react/launcher.js +31 -0
- package/es/react/launcher.js.map +1 -0
- package/es/react/markdown.d.ts +7 -7
- package/es/react/markdown.js +13 -13
- package/es/react/markdown.js.map +1 -1
- package/es/react/panel.d.ts +1 -1
- package/es/react/panel.js +7 -7
- package/es/react/processing.d.ts +1 -1
- package/es/react/processing.js +2 -2
- package/es/react/prompt-line-shell.d.ts +1 -1
- package/es/react/prompt-line-shell.js +1 -1
- package/es/react/prompt-line.d.ts +1 -1
- package/es/react/prompt-line.js +9 -9
- package/es/react/reasoning-step.d.ts +1 -1
- package/es/react/reasoning-step.js +4 -4
- package/es/react/reasoning-steps-toggle.d.ts +2 -2
- package/es/react/reasoning-steps-toggle.js +3 -3
- package/es/react/reasoning-steps.d.ts +1 -1
- package/es/react/reasoning-steps.js +2 -2
- package/es/react/stop-streaming-button.d.ts +1 -1
- package/es/react/stop-streaming-button.js +1 -1
- package/es/react/table.d.ts +2 -2
- package/es/react/table.js +1 -1
- package/es/react/tool-call-data.d.ts +1 -1
- package/es/react/tool-call-data.js +2 -2
- package/es/react/toolbar.d.ts +4 -4
- package/es/react/toolbar.js +2 -2
- package/es/react/transcript.d.ts +1 -1
- package/es/react/transcript.js +3 -3
- package/es/react/utils/transformSuggestionConfig.d.ts +3 -3
- package/es/react/utils/transformSuggestionConfig.js +3 -3
- package/es/react/utils/transformSuggestionConfig.js.map +1 -1
- package/es/react/utils/withWebComponentBridge.d.ts +1 -1
- package/es/react/utils/withWebComponentBridge.js +22 -22
- package/es/react/video-player.d.ts +1 -1
- package/es/react/video-player.js +5 -5
- package/es/react/workspace-shell.d.ts +1 -1
- package/es/react/workspace-shell.js +6 -6
- package/es/testing/load-all-lazy-deps.d.ts +2 -2
- package/es/testing/load-all-lazy-deps.js +1 -1
- package/es/typings/overflow-menu.d.ts +2 -2
- package/es-custom/components/audio-player/index.d.ts +4 -4
- package/es-custom/components/audio-player/src/audio-player.d.ts +1 -1
- package/es-custom/components/audio-player/src/audio-player.js +33 -38
- package/es-custom/components/audio-player/src/audio-player.js.map +1 -1
- package/es-custom/components/audio-player/src/providers/base-provider.d.ts +2 -2
- package/es-custom/components/audio-player/src/providers/base-provider.js +9 -9
- package/es-custom/components/audio-player/src/providers/native-audio-provider.d.ts +2 -2
- package/es-custom/components/audio-player/src/providers/native-audio-provider.js +18 -18
- package/es-custom/components/audio-player/src/providers/soundcloud-provider.d.ts +2 -2
- package/es-custom/components/audio-player/src/providers/soundcloud-provider.js +14 -14
- package/es-custom/components/audio-player/src/transcript.d.ts +2 -2
- package/es-custom/components/audio-player/src/transcript.js +13 -16
- package/es-custom/components/audio-player/src/transcript.js.map +1 -1
- package/es-custom/components/audio-player/src/utils/url-detector.js +1 -1
- package/es-custom/components/card/index.d.ts +4 -4
- package/es-custom/components/card/src/card-footer.d.ts +5 -5
- package/es-custom/components/card/src/card-footer.js +12 -16
- package/es-custom/components/card/src/card-footer.js.map +1 -1
- package/es-custom/components/card/src/card-footer.scss.js +1 -1
- package/es-custom/components/card/src/card-steps.d.ts +4 -4
- package/es-custom/components/card/src/card-steps.js +3 -5
- package/es-custom/components/card/src/card-steps.js.map +1 -1
- package/es-custom/components/card/src/card-steps.scss.js +1 -1
- package/es-custom/components/card/src/card.d.ts +2 -2
- package/es-custom/components/card/src/card.js +3 -3
- package/es-custom/components/card/src/card.scss.js +1 -1
- package/es-custom/components/carousel/index.d.ts +1 -1
- package/es-custom/components/carousel/src/carousel.d.ts +2 -2
- package/es-custom/components/carousel/src/carousel.js +4 -6
- package/es-custom/components/carousel/src/carousel.js.map +1 -1
- package/es-custom/components/carousel/src/carousel.scss.js +1 -1
- package/es-custom/components/chain-of-thought/defs.js +1 -1
- package/es-custom/components/chain-of-thought/index.d.ts +10 -10
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.d.ts +4 -4
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js +36 -42
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +2 -2
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js +11 -14
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought.d.ts +4 -4
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js +16 -17
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.d.ts +2 -2
- package/es-custom/components/chain-of-thought/src/tool-call-data.js +17 -23
- package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es-custom/components/chat-button/defs.d.ts +1 -1
- package/es-custom/components/chat-button/defs.js +1 -1
- package/es-custom/components/chat-button/index.d.ts +2 -2
- package/es-custom/components/chat-button/src/chat-button.d.ts +5 -5
- package/es-custom/components/chat-button/src/chat-button.js +6 -6
- package/es-custom/components/chat-button/src/chat-button.scss.js +1 -1
- package/es-custom/components/chat-history/index.d.ts +11 -11
- package/es-custom/components/chat-history/src/history-content.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-content.js +6 -6
- package/es-custom/components/chat-history/src/history-delete-panel.d.ts +2 -2
- package/es-custom/components/chat-history/src/history-delete-panel.js +11 -11
- package/es-custom/components/chat-history/src/history-header.d.ts +2 -2
- package/es-custom/components/chat-history/src/history-header.js +9 -10
- package/es-custom/components/chat-history/src/history-header.js.map +1 -1
- package/es-custom/components/chat-history/src/history-loading.d.ts +2 -2
- package/es-custom/components/chat-history/src/history-loading.js +1 -1
- package/es-custom/components/chat-history/src/history-panel-item-input.d.ts +2 -2
- package/es-custom/components/chat-history/src/history-panel-item-input.js +21 -22
- package/es-custom/components/chat-history/src/history-panel-item-input.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel-item.d.ts +5 -5
- package/es-custom/components/chat-history/src/history-panel-item.js +39 -41
- package/es-custom/components/chat-history/src/history-panel-item.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel-items.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-panel-items.js +1 -1
- package/es-custom/components/chat-history/src/history-panel-menu.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-panel.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-panel.js +3 -3
- package/es-custom/components/chat-history/src/history-search-item.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-search-item.js +4 -4
- package/es-custom/components/chat-history/src/history-shell.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-shell.js +3 -3
- package/es-custom/components/chat-history/src/history-toolbar.d.ts +9 -5
- package/es-custom/components/chat-history/src/history-toolbar.js +13 -10
- package/es-custom/components/chat-history/src/history-toolbar.js.map +1 -1
- package/es-custom/components/chat-shell/index.d.ts +5 -5
- package/es-custom/components/chat-shell/src/chat-header.d.ts +8 -8
- package/es-custom/components/chat-shell/src/chat-header.js +37 -44
- package/es-custom/components/chat-shell/src/chat-header.js.map +1 -1
- package/es-custom/components/chat-shell/src/corner-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/corner-manager.js +30 -30
- package/es-custom/components/chat-shell/src/initialization-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/panel-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/panel-manager.js +12 -12
- package/es-custom/components/chat-shell/src/panel.d.ts +2 -2
- package/es-custom/components/chat-shell/src/panel.js +99 -100
- package/es-custom/components/chat-shell/src/panel.js.map +1 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.js +10 -10
- package/es-custom/components/chat-shell/src/shell.d.ts +8 -8
- package/es-custom/components/chat-shell/src/shell.js +128 -135
- package/es-custom/components/chat-shell/src/shell.js.map +1 -1
- package/es-custom/components/chat-shell/src/slot-observer.d.ts +1 -1
- package/es-custom/components/chat-shell/src/slot-observer.js +4 -7
- package/es-custom/components/chat-shell/src/slot-observer.js.map +1 -1
- package/es-custom/components/chat-shell/src/types.d.ts +4 -4
- package/es-custom/components/chat-shell/src/workspace-manager-utils.js +4 -4
- package/es-custom/components/chat-shell/src/workspace-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/workspace-manager.js +32 -32
- package/es-custom/components/code-snippet/index.d.ts +4 -4
- package/es-custom/components/code-snippet/src/code-snippet.d.ts +8 -8
- package/es-custom/components/code-snippet/src/code-snippet.js +87 -93
- package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/base-setup.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/base-setup.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +8 -8
- package/es-custom/components/code-snippet/src/codemirror/content-sync.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/content-sync.js +2 -2
- package/es-custom/components/code-snippet/src/codemirror/detect-language.d.ts +6 -0
- package/es-custom/components/code-snippet/src/codemirror/detect-language.js +77 -0
- package/es-custom/components/code-snippet/src/codemirror/detect-language.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/diff-decorator.d.ts +2 -2
- package/es-custom/components/code-snippet/src/codemirror/diff-decorator.js +4 -4
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -4
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js +4 -4
- package/es-custom/components/code-snippet/src/codemirror/language-controller.d.ts +3 -3
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js +3 -3
- package/es-custom/components/code-snippet/src/codemirror/language-data.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/language-data.js +299 -299
- package/es-custom/components/code-snippet/src/codemirror/language-utils.d.ts +2 -2
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js +60 -66
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js +15 -15
- package/es-custom/components/code-snippet/src/codemirror/theme.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/theme.js +163 -163
- package/es-custom/components/code-snippet/src/dom-utils.js +6 -6
- package/es-custom/components/code-snippet/src/layout-utils.d.ts +2 -2
- package/es-custom/components/code-snippet/src/layout-utils.js +9 -9
- package/es-custom/components/code-snippet/src/streaming-manager.js +5 -5
- package/es-custom/components/feedback/index.d.ts +4 -4
- package/es-custom/components/feedback/src/feedback-buttons.d.ts +3 -3
- package/es-custom/components/feedback/src/feedback-buttons.js +17 -19
- package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es-custom/components/feedback/src/feedback.d.ts +9 -9
- package/es-custom/components/feedback/src/feedback.js +38 -45
- package/es-custom/components/feedback/src/feedback.js.map +1 -1
- package/es-custom/components/file-uploads/index.d.ts +5 -4
- package/es-custom/components/file-uploads/src/file-type-icon.d.ts +18 -0
- package/es-custom/components/file-uploads/src/file-type-icon.js +87 -0
- package/es-custom/components/file-uploads/src/file-type-icon.js.map +1 -0
- package/es-custom/components/file-uploads/src/file-upload-item.d.ts +69 -8
- package/es-custom/components/file-uploads/src/file-upload-item.js +210 -111
- package/es-custom/components/file-uploads/src/file-upload-item.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-uploads.d.ts +8 -4
- package/es-custom/components/file-uploads/src/file-uploads.js +54 -29
- package/es-custom/components/file-uploads/src/file-uploads.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-uploads.scss.js +1 -1
- package/es-custom/components/file-uploads/src/types.d.ts +39 -0
- package/es-custom/components/file-uploads/src/types.js +8 -0
- package/es-custom/components/file-uploads/src/types.js.map +1 -0
- package/es-custom/components/launcher/index.d.ts +9 -0
- package/es-custom/components/launcher/index.js +9 -0
- package/{es/components/autocomplete → es-custom/components/launcher}/index.js.map +1 -1
- package/es-custom/components/launcher/src/launcher.d.ts +68 -0
- package/es-custom/components/launcher/src/launcher.js +152 -0
- package/es-custom/components/launcher/src/launcher.js.map +1 -0
- package/es-custom/components/launcher/src/launcher.scss.js +13 -0
- package/es-custom/components/launcher/src/launcher.scss.js.map +1 -0
- package/es-custom/components/markdown/index.d.ts +5 -5
- package/es-custom/components/markdown/src/markdown-renderer-types.d.ts +10 -3
- package/es-custom/components/markdown/src/markdown-renderer.d.ts +9 -9
- package/es-custom/components/markdown/src/markdown-renderer.js +85 -80
- package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es-custom/components/markdown/src/markdown-token-tree.d.ts +1 -1
- package/es-custom/components/markdown/src/markdown-token-tree.js +20 -20
- package/es-custom/components/markdown/src/markdown.d.ts +4 -7
- package/es-custom/components/markdown/src/markdown.js +96 -82
- package/es-custom/components/markdown/src/markdown.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.template.js +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.d.ts +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.js +19 -19
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.d.ts +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.js +5 -5
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.d.ts +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.js +14 -14
- package/es-custom/components/markdown/src/utils/html-helpers.d.ts +1 -1
- package/es-custom/components/markdown/src/utils/html-helpers.js +72 -72
- package/es-custom/components/markdown/src/utils/lit-directives.d.ts +2 -2
- package/es-custom/components/markdown/src/utils/lit-directives.js +5 -5
- package/es-custom/components/markdown/src/utils/plugin-fallback.d.ts +4 -4
- package/es-custom/components/markdown/src/utils/plugin-fallback.js +61 -61
- package/es-custom/components/markdown/src/utils/streaming-table.d.ts +1 -1
- package/es-custom/components/markdown/src/utils/streaming-table.js +6 -6
- package/es-custom/components/markdown/src/utils/table-helpers.d.ts +4 -4
- package/es-custom/components/markdown/src/utils/table-helpers.js +17 -18
- package/es-custom/components/markdown/src/utils/table-helpers.js.map +1 -1
- package/es-custom/components/processing/index.d.ts +1 -1
- package/es-custom/components/processing/src/processing.d.ts +2 -2
- package/es-custom/components/processing/src/processing.js +2 -2
- package/es-custom/components/prompt-line/autocomplete/index.d.ts +12 -0
- package/es-custom/components/prompt-line/autocomplete/index.js +9 -0
- package/es-custom/components/{autocomplete → prompt-line/autocomplete}/index.js.map +1 -1
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.d.ts +165 -0
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js +506 -0
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -0
- package/es-custom/components/{autocomplete → prompt-line/autocomplete}/src/autocomplete.scss.js +1 -1
- package/es-custom/components/prompt-line/index.d.ts +18 -18
- package/es-custom/components/prompt-line/src/autocomplete-controller.d.ts +10 -8
- package/es-custom/components/prompt-line/src/autocomplete-controller.js +107 -47
- package/es-custom/components/prompt-line/src/autocomplete-controller.js.map +1 -1
- package/es-custom/components/prompt-line/src/error-message.d.ts +3 -7
- package/es-custom/components/prompt-line/src/error-message.js +13 -23
- package/es-custom/components/prompt-line/src/error-message.js.map +1 -1
- package/es-custom/components/prompt-line/src/error-message.scss.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-constants.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-controller.d.ts +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-controller.js +83 -83
- package/es-custom/components/prompt-line/src/prompt-line-rich-loader.d.ts +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.d.ts +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js +30 -28
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-shell.d.ts +2 -2
- package/es-custom/components/prompt-line/src/prompt-line-shell.js +11 -13
- package/es-custom/components/prompt-line/src/prompt-line-shell.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line.d.ts +5 -5
- package/es-custom/components/prompt-line/src/prompt-line.js +35 -35
- package/es-custom/components/prompt-line/src/prompt-line.js.map +1 -1
- package/es-custom/components/prompt-line/src/send-control.d.ts +4 -4
- package/es-custom/components/prompt-line/src/send-control.js +18 -20
- package/es-custom/components/prompt-line/src/send-control.js.map +1 -1
- package/es-custom/components/prompt-line/src/stop-streaming-button.d.ts +3 -3
- package/es-custom/components/prompt-line/src/stop-streaming-button.js +7 -8
- package/es-custom/components/prompt-line/src/stop-streaming-button.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.d.ts +3 -3
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.js +2 -2
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +2 -2
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js +7 -7
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.d.ts +2 -2
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js +9 -9
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +4 -3
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js +18 -12
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/chat-enter.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/chat-enter.js +2 -2
- package/es-custom/components/prompt-line/src/tiptap/editor-styles.js +26 -26
- package/es-custom/components/prompt-line/src/tiptap/index.d.ts +24 -24
- package/es-custom/components/prompt-line/src/tiptap/index.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/json-utils.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/json-utils.js +17 -17
- package/es-custom/components/prompt-line/src/tiptap/keymap.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/keymap.js +3 -3
- package/es-custom/components/prompt-line/src/tiptap/origin-meta.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/origin-meta.js +2 -2
- package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js +5 -5
- package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.d.ts +3 -3
- package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.js +3 -3
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.d.ts +4 -4
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js +22 -22
- package/es-custom/components/prompt-line/src/tiptap/token-node-view.d.ts +4 -4
- package/es-custom/components/prompt-line/src/tiptap/token-node-view.js +1 -1
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.d.ts +9 -2
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js +11 -2
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/types.d.ts +24 -3
- package/es-custom/components/prompt-line/src/tiptap/typing-indicator.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/typing-indicator.js +2 -2
- package/es-custom/components/prompt-line/src/tiptap/value-sync.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/value-sync.js +2 -2
- package/es-custom/components/prompt-line/src/types.d.ts +2 -2
- package/es-custom/components/prompt-line/src/types.js.map +1 -1
- package/es-custom/components/reasoning-steps/index.d.ts +4 -4
- package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +2 -2
- package/es-custom/components/reasoning-steps/src/reasoning-step.js +27 -31
- package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +2 -2
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js +12 -14
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +2 -2
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js +19 -20
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es-custom/components/shared/dynamic-css-var-sheet.js +7 -7
- package/es-custom/components/shared/media-utils/script-loader.js +1 -1
- package/es-custom/components/table/index.d.ts +3 -3
- package/es-custom/components/table/src/table-loader.d.ts +1 -1
- package/es-custom/components/table/src/table-loader.js +1 -1
- package/es-custom/components/table/src/table-pagination.template.d.ts +3 -3
- package/es-custom/components/table/src/table-pagination.template.js +4 -5
- package/es-custom/components/table/src/table-pagination.template.js.map +1 -1
- package/es-custom/components/table/src/table-runtime.d.ts +2 -2
- package/es-custom/components/table/src/table-skeleton.template.d.ts +1 -1
- package/es-custom/components/table/src/table-skeleton.template.js +2 -3
- package/es-custom/components/table/src/table-skeleton.template.js.map +1 -1
- package/es-custom/components/table/src/table.d.ts +3 -4
- package/es-custom/components/table/src/table.js +36 -39
- package/es-custom/components/table/src/table.js.map +1 -1
- package/es-custom/components/table/src/table.template.d.ts +5 -5
- package/es-custom/components/table/src/table.template.js +6 -9
- package/es-custom/components/table/src/table.template.js.map +1 -1
- package/es-custom/components/toolbar/index.d.ts +1 -1
- package/es-custom/components/toolbar/src/toolbar.d.ts +9 -7
- package/es-custom/components/toolbar/src/toolbar.js +45 -33
- package/es-custom/components/toolbar/src/toolbar.js.map +1 -1
- package/es-custom/components/toolbar/src/toolbar.scss.js +1 -1
- package/es-custom/components/truncated-text/index.d.ts +1 -1
- package/es-custom/components/truncated-text/src/truncated-text.d.ts +5 -5
- package/es-custom/components/truncated-text/src/truncated-text.js +26 -28
- package/es-custom/components/truncated-text/src/truncated-text.js.map +1 -1
- package/es-custom/components/truncated-text/src/truncated-text.scss.js +1 -1
- package/es-custom/components/video-player/index.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/base-provider.d.ts +3 -3
- package/es-custom/components/video-player/src/providers/base-provider.js +5 -5
- package/es-custom/components/video-player/src/providers/kaltura-provider.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/kaltura-provider.js +23 -23
- package/es-custom/components/video-player/src/providers/native-video-provider.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/native-video-provider.js +20 -20
- package/es-custom/components/video-player/src/providers/vimeo-provider.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/vimeo-provider.js +23 -23
- package/es-custom/components/video-player/src/providers/youtube-provider.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/youtube-provider.js +15 -15
- package/es-custom/components/video-player/src/utils/url-detector.js +1 -1
- package/es-custom/components/video-player/src/video-player.d.ts +2 -2
- package/es-custom/components/video-player/src/video-player.js +37 -41
- package/es-custom/components/video-player/src/video-player.js.map +1 -1
- package/es-custom/components/workspace-shell/index.d.ts +4 -4
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js +13 -13
- package/es-custom/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js +2 -2
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.d.ts +4 -4
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +10 -11
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.d.ts +2 -2
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js +10 -13
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell.d.ts +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell.js +3 -3
- package/es-custom/globals/decorators/carbon-element.d.ts +4 -4
- package/es-custom/globals/decorators/carbon-element.js +2 -2
- package/es-custom/globals/decorators/index.d.ts +1 -1
- package/es-custom/globals/scss/common.scss.js +1 -1
- package/es-custom/globals/settings.js +2 -2
- package/es-custom/globals/utils/aria-announcer-manager.d.ts +1 -1
- package/es-custom/globals/utils/aria-announcer-manager.js +6 -6
- package/es-custom/globals/utils/browser-utils.js +1 -1
- package/es-custom/globals/utils/csv.d.ts +8 -0
- package/es-custom/globals/utils/csv.js +37 -0
- package/es-custom/globals/utils/csv.js.map +1 -0
- package/es-custom/globals/utils/dom-utils.js +1 -1
- package/es-custom/globals/utils/focus-utils.js +4 -4
- package/es-custom/globals/utils/iconTransform.d.ts +2 -2
- package/es-custom/globals/utils/iconTransform.js +21 -21
- package/es-custom/globals/utils/rtl-utils.js +1 -1
- package/es-custom/globals/utils/uuid.js +5 -5
- package/es-custom/react/__tests__/jest.setup.js +12 -12
- package/es-custom/react/ai-label-action-button.d.ts +1 -1
- package/es-custom/react/ai-label-action-button.js +1 -1
- package/es-custom/react/audio-player.d.ts +1 -1
- package/es-custom/react/audio-player.js +5 -5
- package/es-custom/react/autocomplete.d.ts +1 -1
- package/es-custom/react/autocomplete.js +5 -5
- package/es-custom/react/card.d.ts +1 -1
- package/es-custom/react/card.js +5 -5
- package/es-custom/react/carousel.d.ts +1 -1
- package/es-custom/react/carousel.js +2 -2
- package/es-custom/react/chain-of-thought-step.d.ts +1 -1
- package/es-custom/react/chain-of-thought-step.js +4 -4
- package/es-custom/react/chain-of-thought-toggle.d.ts +2 -2
- package/es-custom/react/chain-of-thought-toggle.js +3 -3
- package/es-custom/react/chain-of-thought.d.ts +2 -2
- package/es-custom/react/chain-of-thought.js +4 -4
- package/es-custom/react/chat-button.d.ts +3 -3
- package/es-custom/react/chat-button.js +2 -2
- package/es-custom/react/chat-header.d.ts +3 -3
- package/es-custom/react/chat-header.js +2 -2
- package/es-custom/react/chat-shell.d.ts +2 -2
- package/es-custom/react/chat-shell.js +2 -2
- package/es-custom/react/code-snippet.d.ts +4 -4
- package/es-custom/react/code-snippet.js +3 -3
- package/es-custom/react/error-message.d.ts +1 -1
- package/es-custom/react/error-message.js +1 -1
- package/es-custom/react/feedback-buttons.d.ts +1 -1
- package/es-custom/react/feedback-buttons.js +3 -3
- package/es-custom/react/feedback.d.ts +2 -2
- package/es-custom/react/feedback.js +4 -4
- package/es-custom/react/file-upload-item.d.ts +11 -0
- package/es-custom/react/file-upload-item.js +31 -0
- package/es-custom/react/file-upload-item.js.map +1 -0
- package/es-custom/react/file-uploads.d.ts +1 -1
- package/es-custom/react/file-uploads.js +2 -2
- package/es-custom/react/history/history-content.d.ts +1 -1
- package/es-custom/react/history/history-content.js +1 -1
- package/es-custom/react/history/history-delete-panel.d.ts +1 -1
- package/es-custom/react/history/history-delete-panel.js +3 -3
- package/es-custom/react/history/history-header.d.ts +1 -1
- package/es-custom/react/history/history-header.js +2 -2
- package/es-custom/react/history/history-loading.d.ts +1 -1
- package/es-custom/react/history/history-loading.js +1 -1
- package/es-custom/react/history/history-panel-item-input.d.ts +1 -1
- package/es-custom/react/history/history-panel-item-input.js +4 -4
- package/es-custom/react/history/history-panel-item.d.ts +1 -1
- package/es-custom/react/history/history-panel-item.js +6 -6
- package/es-custom/react/history/history-panel-items.d.ts +1 -1
- package/es-custom/react/history/history-panel-items.js +1 -1
- package/es-custom/react/history/history-panel-menu.d.ts +1 -1
- package/es-custom/react/history/history-panel-menu.js +1 -1
- package/es-custom/react/history/history-panel.d.ts +1 -1
- package/es-custom/react/history/history-panel.js +1 -1
- package/es-custom/react/history/history-search-item.d.ts +1 -1
- package/es-custom/react/history/history-search-item.js +2 -2
- package/es-custom/react/history/history-shell.d.ts +1 -1
- package/es-custom/react/history/history-shell.js +1 -1
- package/es-custom/react/history/history-toolbar.d.ts +1 -1
- package/es-custom/react/history/history-toolbar.js +3 -3
- package/es-custom/react/history/index.d.ts +12 -12
- package/es-custom/react/hooks/useChatAutocomplete.d.ts +4 -4
- package/es-custom/react/hooks/useChatAutocomplete.js +38 -12
- package/es-custom/react/hooks/useChatAutocomplete.js.map +1 -1
- package/es-custom/react/input-send-control.d.ts +1 -1
- package/es-custom/react/input-send-control.js +3 -3
- package/es-custom/react/launcher.d.ts +11 -0
- package/es-custom/react/launcher.js +31 -0
- package/es-custom/react/launcher.js.map +1 -0
- package/es-custom/react/markdown.d.ts +7 -7
- package/es-custom/react/markdown.js +13 -13
- package/es-custom/react/markdown.js.map +1 -1
- package/es-custom/react/panel.d.ts +1 -1
- package/es-custom/react/panel.js +7 -7
- package/es-custom/react/processing.d.ts +1 -1
- package/es-custom/react/processing.js +2 -2
- package/es-custom/react/prompt-line-shell.d.ts +1 -1
- package/es-custom/react/prompt-line-shell.js +1 -1
- package/es-custom/react/prompt-line.d.ts +1 -1
- package/es-custom/react/prompt-line.js +9 -9
- package/es-custom/react/reasoning-step.d.ts +1 -1
- package/es-custom/react/reasoning-step.js +4 -4
- package/es-custom/react/reasoning-steps-toggle.d.ts +2 -2
- package/es-custom/react/reasoning-steps-toggle.js +3 -3
- package/es-custom/react/reasoning-steps.d.ts +1 -1
- package/es-custom/react/reasoning-steps.js +2 -2
- package/es-custom/react/stop-streaming-button.d.ts +1 -1
- package/es-custom/react/stop-streaming-button.js +1 -1
- package/es-custom/react/table.d.ts +2 -2
- package/es-custom/react/table.js +1 -1
- package/es-custom/react/tool-call-data.d.ts +1 -1
- package/es-custom/react/tool-call-data.js +2 -2
- package/es-custom/react/toolbar.d.ts +4 -4
- package/es-custom/react/toolbar.js +2 -2
- package/es-custom/react/transcript.d.ts +1 -1
- package/es-custom/react/transcript.js +3 -3
- package/es-custom/react/utils/transformSuggestionConfig.d.ts +3 -3
- package/es-custom/react/utils/transformSuggestionConfig.js +3 -3
- package/es-custom/react/utils/transformSuggestionConfig.js.map +1 -1
- package/es-custom/react/utils/withWebComponentBridge.d.ts +1 -1
- package/es-custom/react/utils/withWebComponentBridge.js +22 -22
- package/es-custom/react/video-player.d.ts +1 -1
- package/es-custom/react/video-player.js +5 -5
- package/es-custom/react/workspace-shell.d.ts +1 -1
- package/es-custom/react/workspace-shell.js +6 -6
- package/es-custom/testing/load-all-lazy-deps.d.ts +2 -2
- package/es-custom/testing/load-all-lazy-deps.js +1 -1
- package/es-custom/typings/overflow-menu.d.ts +2 -2
- package/package.json +4 -5
- package/scss/_custom-properties.scss +15 -15
- package/scss/_modifiers.scss +8 -8
- package/scss/_tokens-component.scss +1 -1
- package/scss/_tokens-layout.scss +1 -1
- package/scss/_utilities.scss +2 -2
- package/scss/common.scss +3 -3
- package/scss/grid.scss +2 -2
- package/scss/themes.scss +7 -7
- package/scss/vars.scss +3 -3
- package/telemetry.yml +64 -5
- package/es/components/autocomplete/index.d.ts +0 -15
- package/es/components/autocomplete/index.js +0 -11
- package/es/components/autocomplete/src/autocomplete-item-group.d.ts +0 -44
- package/es/components/autocomplete/src/autocomplete-item-group.js +0 -139
- package/es/components/autocomplete/src/autocomplete-item-group.js.map +0 -1
- package/es/components/autocomplete/src/autocomplete-item-group.scss.js +0 -13
- package/es/components/autocomplete/src/autocomplete-item-group.scss.js.map +0 -1
- package/es/components/autocomplete/src/autocomplete-item.d.ts +0 -54
- package/es/components/autocomplete/src/autocomplete-item.js +0 -197
- package/es/components/autocomplete/src/autocomplete-item.js.map +0 -1
- package/es/components/autocomplete/src/autocomplete-item.scss.js +0 -13
- package/es/components/autocomplete/src/autocomplete-item.scss.js.map +0 -1
- package/es/components/autocomplete/src/autocomplete.d.ts +0 -97
- package/es/components/autocomplete/src/autocomplete.js +0 -321
- package/es/components/autocomplete/src/autocomplete.js.map +0 -1
- package/es-custom/components/autocomplete/index.d.ts +0 -15
- package/es-custom/components/autocomplete/index.js +0 -11
- package/es-custom/components/autocomplete/src/autocomplete-item-group.d.ts +0 -44
- package/es-custom/components/autocomplete/src/autocomplete-item-group.js +0 -139
- package/es-custom/components/autocomplete/src/autocomplete-item-group.js.map +0 -1
- package/es-custom/components/autocomplete/src/autocomplete-item-group.scss.js +0 -13
- package/es-custom/components/autocomplete/src/autocomplete-item-group.scss.js.map +0 -1
- package/es-custom/components/autocomplete/src/autocomplete-item.d.ts +0 -54
- package/es-custom/components/autocomplete/src/autocomplete-item.js +0 -197
- package/es-custom/components/autocomplete/src/autocomplete-item.js.map +0 -1
- package/es-custom/components/autocomplete/src/autocomplete-item.scss.js +0 -13
- package/es-custom/components/autocomplete/src/autocomplete-item.scss.js.map +0 -1
- package/es-custom/components/autocomplete/src/autocomplete.d.ts +0 -97
- package/es-custom/components/autocomplete/src/autocomplete.js +0 -321
- package/es-custom/components/autocomplete/src/autocomplete.js.map +0 -1
- /package/es/components/{autocomplete → prompt-line/autocomplete}/src/autocomplete.scss.js.map +0 -0
- /package/es-custom/components/{autocomplete → prompt-line/autocomplete}/src/autocomplete.scss.js.map +0 -0
|
@@ -6,30 +6,91 @@
|
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import { LitElement, nothing } from
|
|
10
|
-
import
|
|
11
|
-
import type { FileUpload } from
|
|
9
|
+
import { LitElement, nothing, type PropertyValues } from 'lit';
|
|
10
|
+
import '@carbon/web-components/es/components/file-uploader/index.js';
|
|
11
|
+
import type { FileUpload } from '../../prompt-line/src/types.js';
|
|
12
|
+
import type { FileAttachment } from './types.js';
|
|
12
13
|
/**
|
|
13
|
-
* Renders a single file
|
|
14
|
+
* Renders a single file chip with an optional media preview or file-type icon.
|
|
15
|
+
*
|
|
16
|
+
* Serves both places a file appears. In the input area it is driven by `upload`,
|
|
17
|
+
* which carries the live `File`, and shows upload status plus a remove button. In a
|
|
18
|
+
* sent message it is driven by either input with `read-only` set: no status, no
|
|
19
|
+
* remove affordance. `attachment` exists for the read-only case where there is no
|
|
20
|
+
* `File` at all — a message restored from conversation history — since a `File`
|
|
21
|
+
* cannot be serialized.
|
|
14
22
|
*
|
|
15
23
|
* @element cds-aichat-file-upload-item
|
|
16
24
|
* @fires {CustomEvent<FileRemoveEventDetail>} cds-aichat-file-remove - Fired when the remove button is clicked
|
|
17
25
|
*/
|
|
18
26
|
declare class FileUploadItemElement extends LitElement {
|
|
19
27
|
static styles: import("lit").CSSResult;
|
|
20
|
-
/**
|
|
21
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The file to render. A {@link FileUpload} when the live `File` is to hand, as in
|
|
30
|
+
* the input area; a {@link FileAttachment} when only metadata survives, as on a
|
|
31
|
+
* message restored from conversation history.
|
|
32
|
+
*/
|
|
33
|
+
upload: FileUpload | FileAttachment | null;
|
|
34
|
+
/**
|
|
35
|
+
* Renders the chip without status or a remove button, for a file on a message
|
|
36
|
+
* that has already been sent.
|
|
37
|
+
*/
|
|
38
|
+
readOnly: boolean;
|
|
22
39
|
/** Label for the remove file button. */
|
|
23
40
|
removeFileLabel: string;
|
|
24
41
|
/** Label for the uploading status. */
|
|
25
42
|
uploadingFileLabel: string;
|
|
43
|
+
/** Text shown when the file's name is not known. */
|
|
44
|
+
fallbackLabel: string;
|
|
45
|
+
/**
|
|
46
|
+
* A preview URL that failed to load, so the chip can fall back to a file-type
|
|
47
|
+
* icon. Holds the URL rather than a flag, so a new one is tried afresh: a stated
|
|
48
|
+
* URL can go dead between the send and the render — a signed link expires, or an
|
|
49
|
+
* object URL outlives the page that minted it.
|
|
50
|
+
*/
|
|
51
|
+
private _failedPreviewURL;
|
|
26
52
|
/** Object URL created for image/video previews. Revoked on disconnect or when the file changes. */
|
|
27
53
|
private _objectURL;
|
|
28
54
|
/** The File instance the current object URL was created for. */
|
|
29
55
|
private _objectURLFile;
|
|
56
|
+
/**
|
|
57
|
+
* The chip's content, resolved from whichever shape `upload` holds. Stated name
|
|
58
|
+
* and type win where they exist; a `File` supplies them otherwise. Both shapes may
|
|
59
|
+
* carry a `File`, so this branches on the `File` rather than on the shape.
|
|
60
|
+
*/
|
|
61
|
+
private get _resolved();
|
|
62
|
+
/**
|
|
63
|
+
* Whether `upload` is a staged upload rather than a sent attachment. Keyed on
|
|
64
|
+
* `status`, which only an upload has — an attachment may carry a `File` too, so
|
|
65
|
+
* the `File` no longer tells the two apart.
|
|
66
|
+
*/
|
|
67
|
+
private _isUpload;
|
|
68
|
+
/** Upload status, which only a staged file has. */
|
|
69
|
+
private get _uploadStatus();
|
|
70
|
+
/** Error state, which only a staged file has. */
|
|
71
|
+
private get _uploadError();
|
|
30
72
|
private _getOrCreateObjectURL;
|
|
31
73
|
private _hasMediaPreview;
|
|
32
|
-
|
|
74
|
+
/** Whether a stated URL is usable as a preview source. */
|
|
75
|
+
private _canPreviewURL;
|
|
76
|
+
/**
|
|
77
|
+
* Only the state the patched rules read can change what they say. The
|
|
78
|
+
* `_injectedStyle` check keeps the first cycle covered — and retries on the next
|
|
79
|
+
* one if Carbon's shadow root wasn't there to patch yet.
|
|
80
|
+
*/
|
|
81
|
+
updated(changedProperties: PropertyValues): void;
|
|
82
|
+
/**
|
|
83
|
+
* Carbon's `cds-file-uploader-item` needs two things patched from inside its own
|
|
84
|
+
* shadow root, because it exposes no `part=` for either.
|
|
85
|
+
*
|
|
86
|
+
* The filename margin is too wide when a media preview sits beside it. And the
|
|
87
|
+
* status container is rendered unconditionally at `min-inline-size: 1.5rem` plus
|
|
88
|
+
* `padding-inline-end: .75rem`, so in read-only mode — where there is no status
|
|
89
|
+
* to show — it would leave 36px of dead space on the chip's trailing edge.
|
|
90
|
+
*/
|
|
91
|
+
private _syncInjectedStyles;
|
|
92
|
+
/** The `<style>` patched into Carbon's shadow root. See `_syncInjectedStyles`. */
|
|
93
|
+
private _injectedStyle;
|
|
33
94
|
disconnectedCallback(): void;
|
|
34
95
|
private _renderPreview;
|
|
35
96
|
private _handleRemove;
|
|
@@ -37,7 +98,7 @@ declare class FileUploadItemElement extends LitElement {
|
|
|
37
98
|
}
|
|
38
99
|
declare global {
|
|
39
100
|
interface HTMLElementTagNameMap {
|
|
40
|
-
|
|
101
|
+
'cds-aichat-file-upload-item': FileUploadItemElement;
|
|
41
102
|
}
|
|
42
103
|
}
|
|
43
104
|
export default FileUploadItemElement;
|
|
@@ -7,22 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
9
|
import { unsafeCSS, css, LitElement, nothing, html } from 'lit';
|
|
10
|
-
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { property, state } from 'lit/decorators.js';
|
|
11
11
|
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
12
12
|
import { isBrowser } from '../../../globals/utils/browser-utils.js';
|
|
13
13
|
import prefix from '../../../globals/settings.js';
|
|
14
14
|
import '@carbon/web-components/es/components/file-uploader/index.js';
|
|
15
15
|
import { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';
|
|
16
|
-
import DocumentPDF20 from '@carbon/icons/es/PDF/20.js';
|
|
17
|
-
import DocumentTXT20 from '@carbon/icons/es/TXT/20.js';
|
|
18
|
-
import DocumentXLS20 from '@carbon/icons/es/XLS/20.js';
|
|
19
|
-
import DocumentZIP20 from '@carbon/icons/es/ZIP/20.js';
|
|
20
|
-
import DocumentPPT20 from '@carbon/icons/es/PPT/20.js';
|
|
21
|
-
import DocumentCSV20 from '@carbon/icons/es/CSV/20.js';
|
|
22
|
-
import DocumentDOC20 from '@carbon/icons/es/DOC/20.js';
|
|
23
|
-
import DocumentHTML20 from '@carbon/icons/es/HTML/20.js';
|
|
24
|
-
import DocumentJSON20 from '@carbon/icons/es/JSON/20.js';
|
|
25
16
|
import PlayFilledAlt16 from '@carbon/icons/es/play--filled--alt/16.js';
|
|
17
|
+
import { pickFileTypeIcon } from './file-type-icon.js';
|
|
26
18
|
import styles from './file-upload-item.scss.js';
|
|
27
19
|
|
|
28
20
|
/**
|
|
@@ -34,7 +26,14 @@ import styles from './file-upload-item.scss.js';
|
|
|
34
26
|
* LICENSE file in the root directory of this source tree.
|
|
35
27
|
*/
|
|
36
28
|
/**
|
|
37
|
-
* Renders a single file
|
|
29
|
+
* Renders a single file chip with an optional media preview or file-type icon.
|
|
30
|
+
*
|
|
31
|
+
* Serves both places a file appears. In the input area it is driven by `upload`,
|
|
32
|
+
* which carries the live `File`, and shows upload status plus a remove button. In a
|
|
33
|
+
* sent message it is driven by either input with `read-only` set: no status, no
|
|
34
|
+
* remove affordance. `attachment` exists for the read-only case where there is no
|
|
35
|
+
* `File` at all — a message restored from conversation history — since a `File`
|
|
36
|
+
* cannot be serialized.
|
|
38
37
|
*
|
|
39
38
|
* @element cds-aichat-file-upload-item
|
|
40
39
|
* @fires {CustomEvent<FileRemoveEventDetail>} cds-aichat-file-remove - Fired when the remove button is clicked
|
|
@@ -42,48 +41,161 @@ import styles from './file-upload-item.scss.js';
|
|
|
42
41
|
let FileUploadItemElement = class FileUploadItemElement extends LitElement {
|
|
43
42
|
constructor() {
|
|
44
43
|
super(...arguments);
|
|
45
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* The file to render. A {@link FileUpload} when the live `File` is to hand, as in
|
|
46
|
+
* the input area; a {@link FileAttachment} when only metadata survives, as on a
|
|
47
|
+
* message restored from conversation history.
|
|
48
|
+
*/
|
|
46
49
|
this.upload = null;
|
|
50
|
+
/**
|
|
51
|
+
* Renders the chip without status or a remove button, for a file on a message
|
|
52
|
+
* that has already been sent.
|
|
53
|
+
*/
|
|
54
|
+
this.readOnly = false;
|
|
47
55
|
/** Label for the remove file button. */
|
|
48
|
-
this.removeFileLabel =
|
|
56
|
+
this.removeFileLabel = 'Remove file';
|
|
49
57
|
/** Label for the uploading status. */
|
|
50
|
-
this.uploadingFileLabel =
|
|
58
|
+
this.uploadingFileLabel = 'Uploading';
|
|
59
|
+
/** Text shown when the file's name is not known. */
|
|
60
|
+
this.fallbackLabel = 'Attachment';
|
|
61
|
+
/**
|
|
62
|
+
* A preview URL that failed to load, so the chip can fall back to a file-type
|
|
63
|
+
* icon. Holds the URL rather than a flag, so a new one is tried afresh: a stated
|
|
64
|
+
* URL can go dead between the send and the render — a signed link expires, or an
|
|
65
|
+
* object URL outlives the page that minted it.
|
|
66
|
+
*/
|
|
67
|
+
this._failedPreviewURL = null;
|
|
51
68
|
/** Object URL created for image/video previews. Revoked on disconnect or when the file changes. */
|
|
52
69
|
this._objectURL = null;
|
|
53
70
|
/** The File instance the current object URL was created for. */
|
|
54
71
|
this._objectURLFile = null;
|
|
72
|
+
/** The `<style>` patched into Carbon's shadow root. See `_syncInjectedStyles`. */
|
|
73
|
+
this._injectedStyle = null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The chip's content, resolved from whichever shape `upload` holds. Stated name
|
|
77
|
+
* and type win where they exist; a `File` supplies them otherwise. Both shapes may
|
|
78
|
+
* carry a `File`, so this branches on the `File` rather than on the shape.
|
|
79
|
+
*/
|
|
80
|
+
get _resolved() {
|
|
81
|
+
const value = this.upload;
|
|
82
|
+
if (!value) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
const attachment = value;
|
|
86
|
+
const file = value.file instanceof File
|
|
87
|
+
? value.file
|
|
88
|
+
: undefined;
|
|
89
|
+
if (file) {
|
|
90
|
+
return {
|
|
91
|
+
name: attachment.name ?? file.name,
|
|
92
|
+
mimeType: attachment.mimeType ?? file.type,
|
|
93
|
+
file,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
name: attachment.name,
|
|
98
|
+
mimeType: attachment.mimeType,
|
|
99
|
+
url: attachment.url,
|
|
100
|
+
};
|
|
55
101
|
}
|
|
56
|
-
|
|
57
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Whether `upload` is a staged upload rather than a sent attachment. Keyed on
|
|
104
|
+
* `status`, which only an upload has — an attachment may carry a `File` too, so
|
|
105
|
+
* the `File` no longer tells the two apart.
|
|
106
|
+
*/
|
|
107
|
+
_isUpload(value) {
|
|
108
|
+
return typeof value.status === 'string';
|
|
109
|
+
}
|
|
110
|
+
/** Upload status, which only a staged file has. */
|
|
111
|
+
get _uploadStatus() {
|
|
112
|
+
return this.upload && this._isUpload(this.upload) ? this.upload.status : '';
|
|
113
|
+
}
|
|
114
|
+
/** Error state, which only a staged file has. */
|
|
115
|
+
get _uploadError() {
|
|
116
|
+
if (!this.upload || !this._isUpload(this.upload)) {
|
|
117
|
+
return { isError: false, message: '' };
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
isError: Boolean(this.upload.isError),
|
|
121
|
+
message: this.upload.errorMessage || '',
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
_getOrCreateObjectURL(file) {
|
|
125
|
+
if (this._objectURLFile !== file) {
|
|
58
126
|
if (this._objectURL) {
|
|
59
127
|
URL.revokeObjectURL(this._objectURL);
|
|
60
128
|
}
|
|
61
|
-
this._objectURL = URL.createObjectURL(
|
|
62
|
-
this._objectURLFile =
|
|
129
|
+
this._objectURL = URL.createObjectURL(file);
|
|
130
|
+
this._objectURLFile = file;
|
|
63
131
|
}
|
|
64
132
|
return this._objectURL;
|
|
65
133
|
}
|
|
66
134
|
_hasMediaPreview() {
|
|
67
|
-
|
|
135
|
+
const resolved = this._resolved;
|
|
136
|
+
if (!resolved) {
|
|
68
137
|
return false;
|
|
69
138
|
}
|
|
70
|
-
const
|
|
71
|
-
|
|
139
|
+
const type = resolved.mimeType ?? '';
|
|
140
|
+
if (resolved.file) {
|
|
141
|
+
return type.startsWith('image/') || type.startsWith('video/');
|
|
142
|
+
}
|
|
143
|
+
// With no `File` to build an object URL from, only a stated URL can stand in,
|
|
144
|
+
// and only for an image that loads. Everything else falls back to a file-type
|
|
145
|
+
// icon.
|
|
146
|
+
return this._canPreviewURL(resolved.url) && type.startsWith('image/');
|
|
72
147
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
148
|
+
/** Whether a stated URL is usable as a preview source. */
|
|
149
|
+
_canPreviewURL(url) {
|
|
150
|
+
return Boolean(url) && url !== this._failedPreviewURL;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Only the state the patched rules read can change what they say. The
|
|
154
|
+
* `_injectedStyle` check keeps the first cycle covered — and retries on the next
|
|
155
|
+
* one if Carbon's shadow root wasn't there to patch yet.
|
|
156
|
+
*/
|
|
157
|
+
updated(changedProperties) {
|
|
158
|
+
if (!this._injectedStyle ||
|
|
159
|
+
changedProperties.has('readOnly') ||
|
|
160
|
+
changedProperties.has('upload') ||
|
|
161
|
+
changedProperties.has('_failedPreviewURL')) {
|
|
162
|
+
this._syncInjectedStyles();
|
|
76
163
|
}
|
|
77
|
-
|
|
78
|
-
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Carbon's `cds-file-uploader-item` needs two things patched from inside its own
|
|
167
|
+
* shadow root, because it exposes no `part=` for either.
|
|
168
|
+
*
|
|
169
|
+
* The filename margin is too wide when a media preview sits beside it. And the
|
|
170
|
+
* status container is rendered unconditionally at `min-inline-size: 1.5rem` plus
|
|
171
|
+
* `padding-inline-end: .75rem`, so in read-only mode — where there is no status
|
|
172
|
+
* to show — it would leave 36px of dead space on the chip's trailing edge.
|
|
173
|
+
*/
|
|
174
|
+
_syncInjectedStyles() {
|
|
175
|
+
const innerRoot = this.shadowRoot?.querySelector('cds-file-uploader-item')?.shadowRoot;
|
|
79
176
|
if (!innerRoot) {
|
|
80
177
|
return;
|
|
81
178
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
179
|
+
const rules = [];
|
|
180
|
+
if (this._hasMediaPreview()) {
|
|
181
|
+
rules.push('.cds--file-filename { margin-inline-start: 2px !important; }');
|
|
182
|
+
}
|
|
183
|
+
if (this.readOnly) {
|
|
184
|
+
rules.push('.cds--file__state-container { display: none !important; }');
|
|
185
|
+
// Carbon hangs the chip's trailing padding off the status container, so
|
|
186
|
+
// hiding it leaves the name flush to the edge against a 1rem leading margin.
|
|
187
|
+
// Restate it on the name to even the two sides up.
|
|
188
|
+
rules.push('.cds--file-filename { margin-inline-end: 1rem !important; }');
|
|
189
|
+
}
|
|
190
|
+
const nextText = rules.join('\n');
|
|
191
|
+
if (this._injectedStyle?.textContent === nextText) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (!this._injectedStyle) {
|
|
195
|
+
this._injectedStyle = document.createElement('style');
|
|
196
|
+
innerRoot.appendChild(this._injectedStyle);
|
|
197
|
+
}
|
|
198
|
+
this._injectedStyle.textContent = nextText;
|
|
87
199
|
}
|
|
88
200
|
disconnectedCallback() {
|
|
89
201
|
super.disconnectedCallback();
|
|
@@ -94,20 +206,23 @@ let FileUploadItemElement = class FileUploadItemElement extends LitElement {
|
|
|
94
206
|
}
|
|
95
207
|
}
|
|
96
208
|
_renderPreview() {
|
|
97
|
-
|
|
209
|
+
const resolved = this._resolved;
|
|
210
|
+
if (!resolved) {
|
|
98
211
|
return nothing;
|
|
99
212
|
}
|
|
100
|
-
const {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
213
|
+
const { file, name, url } = resolved;
|
|
214
|
+
const type = resolved.mimeType ?? '';
|
|
215
|
+
// Image preview from the live File. An attachment without one falls through to
|
|
216
|
+
// the URL branch below, and failing that to a file-type icon.
|
|
217
|
+
if (file && type.startsWith('image/')) {
|
|
218
|
+
const objectURL = this._getOrCreateObjectURL(file);
|
|
219
|
+
if (!objectURL) {
|
|
105
220
|
return nothing;
|
|
106
221
|
}
|
|
107
222
|
return html `<span class="${prefix}-file-upload-item__preview-wrapper"
|
|
108
223
|
><img
|
|
109
224
|
class="${prefix}-file-upload-item__preview"
|
|
110
|
-
src="${
|
|
225
|
+
src="${objectURL}"
|
|
111
226
|
width="36"
|
|
112
227
|
height="36"
|
|
113
228
|
alt=""
|
|
@@ -115,26 +230,26 @@ let FileUploadItemElement = class FileUploadItemElement extends LitElement {
|
|
|
115
230
|
/></span>`;
|
|
116
231
|
}
|
|
117
232
|
// Video preview
|
|
118
|
-
if (type.startsWith(
|
|
119
|
-
const
|
|
120
|
-
if (!
|
|
233
|
+
if (file && type.startsWith('video/')) {
|
|
234
|
+
const objectURL = this._getOrCreateObjectURL(file);
|
|
235
|
+
if (!objectURL) {
|
|
121
236
|
return nothing;
|
|
122
237
|
}
|
|
123
238
|
const openVideo = () => {
|
|
124
239
|
const newWindow = isBrowser()
|
|
125
|
-
? window.open(
|
|
240
|
+
? window.open('', '_blank', 'width=800,height=600')
|
|
126
241
|
: null;
|
|
127
242
|
if (!newWindow) {
|
|
128
243
|
return;
|
|
129
244
|
}
|
|
130
|
-
const style = newWindow.document.createElement(
|
|
245
|
+
const style = newWindow.document.createElement('style');
|
|
131
246
|
style.textContent =
|
|
132
|
-
|
|
133
|
-
const video = newWindow.document.createElement(
|
|
134
|
-
video.src =
|
|
247
|
+
'* { margin: 0; padding: 0; background: #000 } video { display: block; width: 100%; height: 100vh; object-fit: contain }';
|
|
248
|
+
const video = newWindow.document.createElement('video');
|
|
249
|
+
video.src = objectURL;
|
|
135
250
|
video.controls = true;
|
|
136
251
|
video.autoplay = true;
|
|
137
|
-
newWindow.document.title = name;
|
|
252
|
+
newWindow.document.title = name ?? '';
|
|
138
253
|
newWindow.document.head.appendChild(style);
|
|
139
254
|
newWindow.document.body.appendChild(video);
|
|
140
255
|
};
|
|
@@ -142,8 +257,7 @@ let FileUploadItemElement = class FileUploadItemElement extends LitElement {
|
|
|
142
257
|
class="${prefix}-file-upload-item__preview-wrapper ${prefix}-file-upload-item__video-preview-wrapper"
|
|
143
258
|
type="button"
|
|
144
259
|
aria-label="Play video"
|
|
145
|
-
@click="${openVideo}"
|
|
146
|
-
>
|
|
260
|
+
@click="${openVideo}">
|
|
147
261
|
<video
|
|
148
262
|
class="${prefix}-file-upload-item__preview"
|
|
149
263
|
src="${url}"
|
|
@@ -156,62 +270,36 @@ let FileUploadItemElement = class FileUploadItemElement extends LitElement {
|
|
|
156
270
|
aria-hidden="true"
|
|
157
271
|
@loadedmetadata="${(e) => {
|
|
158
272
|
e.target.currentTime = 0.1;
|
|
159
|
-
}}"
|
|
160
|
-
></video
|
|
273
|
+
}}"></video
|
|
161
274
|
><span class="${prefix}-file-upload-item__play-badge" aria-hidden="true"
|
|
162
275
|
>${iconLoader(PlayFilledAlt16)}</span
|
|
163
276
|
>
|
|
164
277
|
</button>`;
|
|
278
|
+
}
|
|
279
|
+
// Image preview from a stated URL — an attachment whose file lives on a server
|
|
280
|
+
// rather than in the page. No video equivalent: playback would stream the file
|
|
281
|
+
// back, which a chip on a sent message has no business doing.
|
|
282
|
+
if (this._canPreviewURL(url) && type.startsWith('image/')) {
|
|
283
|
+
return html `<span class="${prefix}-file-upload-item__preview-wrapper"
|
|
284
|
+
><img
|
|
285
|
+
class="${prefix}-file-upload-item__preview"
|
|
286
|
+
src="${url}"
|
|
287
|
+
width="36"
|
|
288
|
+
height="36"
|
|
289
|
+
alt=""
|
|
290
|
+
aria-hidden="true"
|
|
291
|
+
@error="${() => {
|
|
292
|
+
this._failedPreviewURL = url;
|
|
293
|
+
}}"
|
|
294
|
+
/></span>`;
|
|
165
295
|
}
|
|
166
296
|
// File type icon (for supported icons)
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
const iconMap = [
|
|
170
|
-
[mime === "application/pdf" || extension === "pdf", DocumentPDF20],
|
|
171
|
-
[mime === "text/plain" || extension === "txt", DocumentTXT20],
|
|
172
|
-
[
|
|
173
|
-
mime === "application/vnd.ms-excel" ||
|
|
174
|
-
mime ===
|
|
175
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
|
|
176
|
-
extension === "xls" ||
|
|
177
|
-
extension === "xlsx",
|
|
178
|
-
DocumentXLS20,
|
|
179
|
-
],
|
|
180
|
-
[
|
|
181
|
-
mime === "application/zip" ||
|
|
182
|
-
mime === "application/x-zip-compressed" ||
|
|
183
|
-
extension === "zip",
|
|
184
|
-
DocumentZIP20,
|
|
185
|
-
],
|
|
186
|
-
[
|
|
187
|
-
mime === "application/vnd.ms-powerpoint" ||
|
|
188
|
-
mime ===
|
|
189
|
-
"application/vnd.openxmlformats-officedocument.presentationml.presentation" ||
|
|
190
|
-
extension === "ppt" ||
|
|
191
|
-
extension === "pptx",
|
|
192
|
-
DocumentPPT20,
|
|
193
|
-
],
|
|
194
|
-
[mime === "text/csv" || extension === "csv", DocumentCSV20],
|
|
195
|
-
[
|
|
196
|
-
mime === "application/msword" ||
|
|
197
|
-
mime ===
|
|
198
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
|
|
199
|
-
extension === "doc" ||
|
|
200
|
-
extension === "docx",
|
|
201
|
-
DocumentDOC20,
|
|
202
|
-
],
|
|
203
|
-
[
|
|
204
|
-
mime === "text/html" || extension === "html" || extension === "htm",
|
|
205
|
-
DocumentHTML20,
|
|
206
|
-
],
|
|
207
|
-
[mime === "application/json" || extension === "json", DocumentJSON20],
|
|
208
|
-
];
|
|
209
|
-
const match = iconMap.find((entry) => entry[0] === true);
|
|
210
|
-
if (match) {
|
|
297
|
+
const icon = pickFileTypeIcon(name, type);
|
|
298
|
+
if (icon) {
|
|
211
299
|
return html `<span
|
|
212
300
|
class="${prefix}-file-upload-item__icon"
|
|
213
301
|
aria-hidden="true"
|
|
214
|
-
>${iconLoader(
|
|
302
|
+
>${iconLoader(icon)}</span
|
|
215
303
|
>`;
|
|
216
304
|
}
|
|
217
305
|
return nothing;
|
|
@@ -220,28 +308,30 @@ let FileUploadItemElement = class FileUploadItemElement extends LitElement {
|
|
|
220
308
|
if (!this.upload) {
|
|
221
309
|
return;
|
|
222
310
|
}
|
|
223
|
-
this.dispatchEvent(new CustomEvent(
|
|
311
|
+
this.dispatchEvent(new CustomEvent('cds-aichat-file-remove', {
|
|
224
312
|
detail: { fileId: this.upload.id },
|
|
225
313
|
bubbles: true,
|
|
226
314
|
composed: true,
|
|
227
315
|
}));
|
|
228
316
|
}
|
|
229
317
|
render() {
|
|
230
|
-
|
|
318
|
+
const resolved = this._resolved;
|
|
319
|
+
if (!resolved) {
|
|
231
320
|
return nothing;
|
|
232
321
|
}
|
|
322
|
+
// An empty state falls through Carbon's status switch, rendering no
|
|
323
|
+
// affordance. `_syncInjectedStyles` collapses the container it still reserves.
|
|
324
|
+
const state = this.readOnly ? '' : this._uploadStatus;
|
|
325
|
+
const error = this._uploadError;
|
|
233
326
|
return html `
|
|
234
327
|
<cds-file-uploader-item
|
|
235
328
|
size="md"
|
|
236
|
-
.state="${
|
|
237
|
-
.iconDescription="${this.
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
@cds-file-uploader-item-deleted="${this._handleRemove}"
|
|
243
|
-
>
|
|
244
|
-
${this._renderPreview()} ${this.upload.file.name}
|
|
329
|
+
.state="${state}"
|
|
330
|
+
.iconDescription="${state === 'uploading' ? this.uploadingFileLabel : this.removeFileLabel}"
|
|
331
|
+
.errorSubject="${error.message}"
|
|
332
|
+
?invalid="${!this.readOnly && error.isError}"
|
|
333
|
+
@cds-file-uploader-item-deleted="${this._handleRemove}">
|
|
334
|
+
${this._renderPreview()} ${resolved.name || this.fallbackLabel}
|
|
245
335
|
</cds-file-uploader-item>
|
|
246
336
|
`;
|
|
247
337
|
}
|
|
@@ -253,15 +343,24 @@ __decorate([
|
|
|
253
343
|
property({ type: Object, attribute: false })
|
|
254
344
|
], FileUploadItemElement.prototype, "upload", void 0);
|
|
255
345
|
__decorate([
|
|
256
|
-
property({ type:
|
|
346
|
+
property({ type: Boolean, attribute: 'read-only', reflect: true })
|
|
347
|
+
], FileUploadItemElement.prototype, "readOnly", void 0);
|
|
348
|
+
__decorate([
|
|
349
|
+
property({ type: String, attribute: 'remove-file-label' })
|
|
257
350
|
], FileUploadItemElement.prototype, "removeFileLabel", void 0);
|
|
258
351
|
__decorate([
|
|
259
|
-
property({ type: String, attribute:
|
|
352
|
+
property({ type: String, attribute: 'uploading-file-label' })
|
|
260
353
|
], FileUploadItemElement.prototype, "uploadingFileLabel", void 0);
|
|
354
|
+
__decorate([
|
|
355
|
+
property({ type: String, attribute: 'fallback-label' })
|
|
356
|
+
], FileUploadItemElement.prototype, "fallbackLabel", void 0);
|
|
357
|
+
__decorate([
|
|
358
|
+
state()
|
|
359
|
+
], FileUploadItemElement.prototype, "_failedPreviewURL", void 0);
|
|
261
360
|
FileUploadItemElement = __decorate([
|
|
262
361
|
carbonElement(`${prefix}-file-upload-item`)
|
|
263
362
|
], FileUploadItemElement);
|
|
264
|
-
var
|
|
363
|
+
var FileUploadItemElement$1 = FileUploadItemElement;
|
|
265
364
|
|
|
266
|
-
export {
|
|
365
|
+
export { FileUploadItemElement$1 as default };
|
|
267
366
|
//# sourceMappingURL=file-upload-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload-item.js","sources":["../../../../src/components/file-uploads/src/file-upload-item.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-upload-item.js","sources":["../../../../src/components/file-uploads/src/file-upload-item.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AA0CH;;;;;;;;;;;;AAYG;AAEH,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAU,CAAA;AAA9C,IAAA,WAAA,GAAA;;AAKE;;;;AAIG;QAEH,IAAA,CAAA,MAAM,GAAuC,IAAI;AAEjD;;;AAGG;QAEH,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAIhB,IAAA,CAAA,eAAe,GAAG,aAAa;;QAI/B,IAAA,CAAA,kBAAkB,GAAG,WAAW;;QAIhC,IAAA,CAAA,aAAa,GAAG,YAAY;AAE5B;;;;;AAKG;QAEK,IAAA,CAAA,iBAAiB,GAAkB,IAAI;;QAGvC,IAAA,CAAA,UAAU,GAAkB,IAAI;;QAGhC,IAAA,CAAA,cAAc,GAAgB,IAAI;;QAwJlC,IAAA,CAAA,cAAc,GAA4B,IAAI;IAiKxD;AAvTE;;;;AAIG;AACH,IAAA,IAAY,SAAS,GAAA;AACnB,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM;QACzB,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,OAAO,IAAI;QACb;QAEA,MAAM,UAAU,GAAG,KAAuB;AAC1C,QAAA,MAAM,IAAI,GACP,KAAoB,CAAC,IAAI,YAAY;cACjC,KAAoB,CAAC;cACtB,SAAS;QAEf,IAAI,IAAI,EAAE;YACR,OAAO;AACL,gBAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,IAAI,C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gB,EAAE;AAC1B,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AASrB,UAAA,CAAA;AADP,IAAA,KAAK;AAC0C,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,MAAA,CAAA;AAvC5C,qBAAqB,GAAA,UAAA,CAAA;AAD1B,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,iBAAA,CAAmB;AACrC,CAAA,EAAA,qBAAqB,CAsW1B;AAQD,8BAAe,qBAAqB;;;;"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import { LitElement, type PropertyValues } from
|
|
10
|
-
import type { FileUpload } from
|
|
11
|
-
import
|
|
9
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
10
|
+
import type { FileUpload } from '../../prompt-line/src/types.js';
|
|
11
|
+
import './file-upload-item.js';
|
|
12
12
|
/**
|
|
13
13
|
* Displays a list of file uploads with status indicators, and announces upload
|
|
14
14
|
* state changes (added / uploading / success / failure / removed) to screen
|
|
@@ -54,9 +54,13 @@ declare class FileUploadsElement extends LitElement {
|
|
|
54
54
|
getFilesUploadingText: (args: {
|
|
55
55
|
count: number;
|
|
56
56
|
}) => string;
|
|
57
|
+
/** Whether scrolling is required to view the entire width of all file upload items. */
|
|
58
|
+
private _hasOverflow;
|
|
57
59
|
private _announcer;
|
|
58
60
|
/** Previous-frame snapshot keyed by upload id, used to detect transitions. */
|
|
59
61
|
private _snapshots;
|
|
62
|
+
private _resizeObserver;
|
|
63
|
+
private _checkOverflow;
|
|
60
64
|
protected firstUpdated(): void;
|
|
61
65
|
disconnectedCallback(): void;
|
|
62
66
|
protected updated(changedProperties: PropertyValues): void;
|
|
@@ -81,7 +85,7 @@ declare class FileUploadsElement extends LitElement {
|
|
|
81
85
|
}
|
|
82
86
|
declare global {
|
|
83
87
|
interface HTMLElementTagNameMap {
|
|
84
|
-
|
|
88
|
+
'cds-aichat-file-uploads': FileUploadsElement;
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
export default FileUploadsElement;
|