@siemens/element-ng 49.16.0 → 51.0.0-rc.10
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/README.md +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +59 -41
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +83 -53
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +143 -148
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +180 -188
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +34 -24
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +21 -17
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +72 -47
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +58 -34
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +323 -215
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +39 -25
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +44 -34
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +58 -37
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +22 -22
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +37 -28
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +337 -223
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +12 -15
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +126 -76
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +393 -251
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +22 -17
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +105 -91
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +33 -25
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +274 -165
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +361 -116
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +224 -318
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +40 -30
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +6 -6
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +56 -57
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +19 -15
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +121 -75
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +132 -66
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +51 -64
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +116 -51
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-maplibre.mjs +401 -0
- package/fesm2022/siemens-element-ng-maplibre.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-directives-tabs.mjs +70 -0
- package/fesm2022/siemens-element-ng-markdown-directives-tabs.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-citations.mjs +215 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-citations.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-katex.mjs +76 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-katex.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-mermaid.mjs +86 -0
- package/fesm2022/siemens-element-ng-markdown-extensions-mermaid.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-hightlighter-highlightjs.mjs +130 -0
- package/fesm2022/siemens-element-ng-markdown-hightlighter-highlightjs.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown.mjs +800 -0
- package/fesm2022/siemens-element-ng-markdown.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-menu.mjs +71 -57
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +14 -11
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +251 -206
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +123 -86
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +72 -45
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +41 -29
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +33 -24
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +19 -14
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +144 -139
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +85 -52
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +56 -41
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +35 -27
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +38 -37
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +265 -170
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +4 -4
- package/fesm2022/siemens-element-ng-shadow-root.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +181 -104
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +21 -24
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +45 -30
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-source-chip.mjs +79 -0
- package/fesm2022/siemens-element-ng-source-chip.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-split.mjs +290 -306
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +66 -52
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +26 -16
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +13 -10
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +20 -17
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +156 -131
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +29 -6
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +62 -42
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +59 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +108 -82
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +36 -19
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +113 -84
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +69 -49
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +95 -54
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/maplibre/package.json +4 -0
- package/maplibre/styles/_index.scss +1 -0
- package/maplibre/styles/maplibre-gl.scss +724 -0
- package/markdown/directives/tabs/package.json +4 -0
- package/markdown/extensions/citations/package.json +4 -0
- package/markdown/extensions/katex/package.json +4 -0
- package/markdown/extensions/mermaid/package.json +4 -0
- package/markdown/hightlighter/highlightjs/package.json +4 -0
- package/markdown/package.json +4 -0
- package/package.json +96 -25
- package/schematics/collection.json +5 -0
- package/schematics/{migrations/icon-path-migration → migrate-tabs-legacy}/index.js +1 -1
- package/schematics/migrate-tabs-legacy/migrate-tabs-legacy-rule.js +675 -0
- package/schematics/migrate-tabs-legacy/schema.json +14 -0
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/component-property-to-child.js +11 -0
- package/schematics/migrations/data/css-custom-properties.js +224 -0
- package/schematics/migrations/data/element-class-changes.js +116 -18
- package/schematics/migrations/data/element-migration-data.js +6 -0
- package/schematics/migrations/data/element-selectors.js +1 -9
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +49 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +17 -7
- package/schematics/migrations/data/symbol-renaming.js +3 -44
- package/schematics/migrations/element-migration/element-migration.js +6 -6
- package/schematics/migrations/utilities/component-property-to-child.migration.js +73 -0
- package/schematics/migrations/utilities/css-custom-property.migration.js +51 -0
- package/schematics/migrations/utilities/element-class-change.migration.js +10 -5
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +4 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/migrate-content-formatter.js +288 -0
- package/schematics/ng-update/migrate-list-details-units.js +86 -0
- package/schematics/ng-update/migrate-main-detail-units.js +89 -0
- package/schematics/ng-update/migrate-markdown-renderer.js +106 -0
- package/schematics/ng-update/migrate-spacers.js +32 -0
- package/schematics/ng-update/migrate-split-collapse.js +276 -0
- package/schematics/ng-update/migrate-split-scale.js +524 -0
- package/schematics/ng-update/migrate-split-sizes.js +107 -0
- package/schematics/ng-update/migrate-to-v51.js +35 -0
- package/schematics/utils/index.js +1 -0
- package/schematics/utils/template-edit-utils.js +35 -0
- package/schematics/utils/template-utils.js +31 -45
- package/source-chip/package.json +4 -0
- package/template-i18n.json +78 -47
- package/types/siemens-element-ng-application-header.d.ts +7 -33
- package/types/siemens-element-ng-avatar.d.ts +1 -1
- package/types/siemens-element-ng-breadcrumb.d.ts +1 -1
- package/types/siemens-element-ng-chat-messages.d.ts +118 -70
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-content-action-bar.d.ts +1 -1
- package/types/siemens-element-ng-dashboard.d.ts +2 -2
- package/types/siemens-element-ng-datatable.d.ts +5 -56
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +8 -15
- package/types/siemens-element-ng-electron-titlebar.d.ts +1 -1
- package/types/siemens-element-ng-file-uploader.d.ts +13 -31
- package/types/siemens-element-ng-filter-bar.d.ts +1 -1
- package/types/siemens-element-ng-filtered-search.d.ts +4 -4
- package/types/siemens-element-ng-form.d.ts +183 -44
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-landing-page.d.ts +2 -2
- package/types/siemens-element-ng-list-details.d.ts +25 -3
- package/types/siemens-element-ng-loading-spinner.d.ts +11 -17
- package/types/siemens-element-ng-main-detail-container.d.ts +23 -3
- package/types/siemens-element-ng-maplibre.d.ts +190 -0
- package/types/siemens-element-ng-markdown-directives-tabs.d.ts +10 -0
- package/types/siemens-element-ng-markdown-extensions-citations.d.ts +11 -0
- package/types/siemens-element-ng-markdown-extensions-katex.d.ts +19 -0
- package/types/siemens-element-ng-markdown-extensions-mermaid.d.ts +11 -0
- package/types/siemens-element-ng-markdown-hightlighter-highlightjs.d.ts +48 -0
- package/types/siemens-element-ng-markdown.d.ts +367 -0
- package/types/siemens-element-ng-menu.d.ts +2 -0
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +87 -39
- package/types/siemens-element-ng-navbar-vertical.d.ts +1 -1
- package/types/siemens-element-ng-navbar.d.ts +3 -3
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +28 -10
- package/types/siemens-element-ng-photo-upload.d.ts +4 -4
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-search-bar.d.ts +2 -9
- package/types/siemens-element-ng-select.d.ts +32 -5
- package/types/siemens-element-ng-side-panel.d.ts +25 -11
- package/types/siemens-element-ng-source-chip.d.ts +53 -0
- package/types/siemens-element-ng-split.d.ts +101 -78
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-system-banner.d.ts +2 -2
- package/types/siemens-element-ng-tabs.d.ts +1 -2
- package/types/siemens-element-ng-theme.d.ts +12 -2
- package/types/siemens-element-ng-threshold.d.ts +1 -1
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-tooltip.d.ts +7 -7
- package/types/siemens-element-ng-translate.d.ts +35 -5
- package/types/siemens-element-ng-tree-view.d.ts +3 -0
- package/types/siemens-element-ng-wizard.d.ts +18 -3
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +0 -263
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/markdown-renderer/package.json +0 -4
- package/schematics/migrations/icon-path-migration/icon-path-migration.js +0 -95
- package/schematics/ng-update/migrate-to-v49.js +0 -21
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-markdown-renderer.d.ts +0 -36
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { CdkMenuTrigger } from '@angular/cdk/menu';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Directive, input,
|
|
4
|
-
import { elementOptionsVertical, elementDocument, elementStateClose, elementStopFilled, elementSendFilled, elementPlus, elementAttachment } from '@siemens/element-icons';
|
|
3
|
+
import { Directive, input, Component, booleanAttribute, output, model, inject, viewChild, PLATFORM_ID, effect, computed, signal, Injector, afterNextRender } from '@angular/core';
|
|
4
|
+
import { elementOptionsVertical, elementRight2, elementIssue, elementCircleFilled, elementDocument, elementStateClose, elementStopFilled, elementSendFilled, elementPlus, elementAttachment } from '@siemens/element-icons';
|
|
5
5
|
import { addIcons, SiIconComponent } from '@siemens/element-ng/icon';
|
|
6
6
|
import { SiMenuFactoryComponent } from '@siemens/element-ng/menu';
|
|
7
|
+
import { SiSourceChipComponent } from '@siemens/element-ng/source-chip';
|
|
7
8
|
import { t, SiTranslatePipe } from '@siemens/element-translate-ng/translate';
|
|
8
9
|
import * as i1 from '@siemens/element-ng/resize-observer';
|
|
9
10
|
import { SiResponsiveContainerDirective } from '@siemens/element-ng/resize-observer';
|
|
11
|
+
import { SiLoadingSpinnerComponent } from '@siemens/element-ng/loading-spinner';
|
|
10
12
|
import { SiModalService } from '@siemens/element-ng/modal';
|
|
11
13
|
import { isPlatformBrowser } from '@angular/common';
|
|
12
14
|
import * as i1$1 from '@angular/forms';
|
|
13
15
|
import { FormsModule } from '@angular/forms';
|
|
14
16
|
import { SiFileUploadDirective } from '@siemens/element-ng/file-uploader';
|
|
17
|
+
import { SiTooltipDirective } from '@siemens/element-ng/tooltip';
|
|
15
18
|
import { SiActionCardComponent } from '@siemens/element-ng/card';
|
|
16
19
|
import { SiSummaryChipComponent } from '@siemens/element-ng/summary-chip';
|
|
17
20
|
|
|
@@ -37,10 +40,10 @@ import { SiSummaryChipComponent } from '@siemens/element-ng/summary-chip';
|
|
|
37
40
|
* @experimental
|
|
38
41
|
*/
|
|
39
42
|
class SiChatMessageActionDirective {
|
|
40
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
41
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatMessageActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
44
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SiChatMessageActionDirective, isStandalone: true, selector: "[siChatMessageAction]", ngImport: i0 });
|
|
42
45
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatMessageActionDirective, decorators: [{
|
|
44
47
|
type: Directive,
|
|
45
48
|
args: [{
|
|
46
49
|
selector: '[siChatMessageAction]'
|
|
@@ -68,7 +71,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
68
71
|
* - Responsive behavior that adapts to container size
|
|
69
72
|
*
|
|
70
73
|
* This is a low-level component designed for slotting in custom content, it provides slots via content projection:
|
|
71
|
-
* - Default content: Main message content area (consider using
|
|
74
|
+
* - Default content: Main message content area (consider using `si-markdown` for markdown support)
|
|
72
75
|
* - `si-avatar/si-icon/img` selector: Avatar or icon representing the message sender
|
|
73
76
|
* - `si-chat-message-action` selector: Action buttons related to the message
|
|
74
77
|
* - `si-attachment-list` selector: Attachment list component for displaying file attachments
|
|
@@ -77,7 +80,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
77
80
|
* @see {@link SiAiMessageComponent} for AI message display
|
|
78
81
|
* @see {@link SiAttachmentListComponent} for attachment list to slot in
|
|
79
82
|
* @see {@link SiChatMessageActionDirective} for action buttons to slot in
|
|
80
|
-
* @see {@link SiMarkdownRendererComponent} for markdown content rendering
|
|
81
83
|
* @see {@link SiChatContainerComponent} for the chat container to use this within
|
|
82
84
|
*
|
|
83
85
|
* @experimental
|
|
@@ -87,25 +89,28 @@ class SiChatMessageComponent {
|
|
|
87
89
|
* Whether the message is currently loading
|
|
88
90
|
* @defaultValue false
|
|
89
91
|
*/
|
|
90
|
-
loading = input(false,
|
|
92
|
+
loading = input(false, /* @ts-ignore */
|
|
93
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
91
94
|
/**
|
|
92
95
|
* Alignment of the message
|
|
93
96
|
* @defaultValue 'start'
|
|
94
97
|
*/
|
|
95
|
-
alignment = input('start',
|
|
98
|
+
alignment = input('start', /* @ts-ignore */
|
|
99
|
+
...(ngDevMode ? [{ debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
96
100
|
/**
|
|
97
101
|
* Where to display action buttons (if any)
|
|
98
102
|
* @defaultValue 'side'
|
|
99
103
|
*/
|
|
100
|
-
actionsPosition = input('side',
|
|
101
|
-
|
|
102
|
-
static
|
|
104
|
+
actionsPosition = input('side', /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "actionsPosition" }] : /* istanbul ignore next */ []));
|
|
106
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
107
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiChatMessageComponent, isStandalone: true, selector: "si-chat-message", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, actionsPosition: { classPropertyName: "actionsPosition", publicName: "actionsPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "d-block" }, hostDirectives: [{ directive: i1.SiResponsiveContainerDirective }], ngImport: i0, template: "<!--- Flex-row if alignment start, flex-row-reverse if alignment end, flex-column if mobile -->\n<div\n class=\"d-flex si-body-paragraph chat-message-container\"\n [class.start]=\"alignment() === 'start'\"\n>\n <div class=\"avatar-wrapper flex-shrink-0\" [class.end]=\"alignment() === 'end'\">\n <ng-content select=\"si-icon,si-avatar,img\" />\n </div>\n\n <div class=\"d-flex flex-column flex-grow-1 w-100\">\n <div class=\"attachment-slot\" [class.align-self-end]=\"alignment() === 'end'\">\n <ng-content select=\"si-attachment-list,si-badge\" />\n </div>\n\n @if (loading()) {\n <div\n class=\"message-wrapper rounded-3 w-75 text-break loading-message-bubble mb-2\"\n [class.align-self-end]=\"alignment() === 'end'\"\n >\n <div class=\"d-flex flex-column w-100 gap-2\">\n <div class=\"si-skeleton skeleton-line skeleton-line-full\"></div>\n <div class=\"si-skeleton skeleton-line skeleton-line-half\"></div>\n </div>\n </div>\n } @else {\n <!-- Flex-column if actions bottom, flex-row/flex-row-reverse if actions start -->\n <div\n class=\"message-wrapper mw-0 d-flex mb-2\"\n [class.start]=\"alignment() === 'start'\"\n [class.end]=\"alignment() === 'end'\"\n [class.flex-column]=\"actionsPosition() === 'bottom'\"\n [class.flex-row]=\"actionsPosition() === 'side' && alignment() === 'start'\"\n [class.flex-row-reverse]=\"actionsPosition() === 'side' && alignment() === 'end'\"\n [class.align-items-start]=\"actionsPosition() === 'side'\"\n [class.align-items-end]=\"actionsPosition() === 'bottom' && alignment() === 'end'\"\n [class.justify-content-end]=\"alignment() === 'end' && actionsPosition() === 'bottom'\"\n [class.justify-content-start]=\"alignment() === 'start' && actionsPosition() === 'bottom'\"\n >\n <div\n class=\"rounded-3 text-break message-bubble\"\n [class.end]=\"alignment() === 'end' && actionsPosition() === 'bottom'\"\n >\n <ng-content />\n </div>\n\n <div\n class=\"actions-wrapper d-flex gap-4\"\n [class.ms-3]=\"actionsPosition() === 'side' && alignment() === 'start'\"\n [class.me-3]=\"actionsPosition() === 'side' && alignment() === 'end'\"\n [class.mt-2]=\"actionsPosition() === 'bottom'\"\n [class.actions-horizontal]=\"actionsPosition() !== 'bottom'\"\n [class.align-self-start]=\"actionsPosition() === 'side'\"\n >\n <ng-content select=\"[siChatMessageAction]\" />\n </div>\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:block;--loading-spinner-size: 1.5em}.skeleton-line-full{inline-size:100%}.skeleton-line-half{inline-size:50%}.loading-message-bubble,.message-bubble{padding:var(--chat-message-bubble-padding, var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-x-50));margin-block-end:auto;background-color:var(--chat-message-bubble-bg, var(--si-sys-background-1))}.loading-message-bubble{inline-size:max-content;min-inline-size:75%}.message-bubble{min-inline-size:0;max-inline-size:100%;overflow-wrap:break-word;word-break:break-word}.message-bubble:empty{display:none}.message-bubble:empty~.actions-wrapper{margin-inline:0!important}.attachment-slot:empty{display:none}.attachment-slot:not(:empty)~.message-wrapper:not(:has(.message-bubble:empty)){margin-block-start:var(--si-sys-sizing-spacing-y-20)}.attachment-slot:not(:empty)~.message-wrapper:has(.message-bubble:empty) .actions-wrapper.actions-horizontal{margin-block-start:var(--si-sys-sizing-spacing-y-20)}.actions-wrapper:empty{display:none!important}.avatar-wrapper{align-self:flex-start}.avatar-wrapper:not(.end){margin-inline-end:var(--si-sys-sizing-spacing-x-30)}.avatar-wrapper.end{margin-inline-start:var(--si-sys-sizing-spacing-x-30)}.avatar-wrapper:empty{display:none}.message-wrapper{min-inline-size:0;max-inline-size:100%;inline-size:auto}.message-wrapper.start{margin-inline-end:auto}.message-wrapper.end{margin-inline-start:auto}:host-context(.si-container-md,.si-container-lg,.si-container-xl,.si-container-xxl) .chat-message-container{flex-direction:row}:host-context(.si-container-md,.si-container-lg,.si-container-xl,.si-container-xxl) .chat-message-container.start{align-items:flex-start}:host-context(.si-container-md,.si-container-lg,.si-container-xl,.si-container-xxl) .chat-message-container:not(.start){flex-direction:row-reverse}:host-context(.si-container-md,.si-container-lg,.si-container-xl,.si-container-xxl) .message-bubble.end{margin-inline-start:auto}:host-context(.si-container-xs,.si-container-sm) .chat-message-container{flex-direction:column}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper{margin-block-end:var(--si-sys-sizing-spacing-y-30)}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper.end{align-self:flex-end}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper::ng-deep:has(si-icon) .end{margin-inline-end:var(--si-sys-sizing-spacing-x-20)!important}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper::ng-deep:has(si-icon):not(.end){margin-inline-start:var(--si-sys-sizing-spacing-x-20)!important}\n"] });
|
|
103
108
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatMessageComponent, decorators: [{
|
|
105
110
|
type: Component,
|
|
106
|
-
args: [{ selector: 'si-chat-message',
|
|
111
|
+
args: [{ selector: 'si-chat-message', host: {
|
|
107
112
|
class: 'd-block'
|
|
108
|
-
}, hostDirectives: [SiResponsiveContainerDirective], template: "<!--- Flex-row if alignment start, flex-row-reverse if alignment end, flex-column if mobile -->\n<div
|
|
113
|
+
}, hostDirectives: [SiResponsiveContainerDirective], template: "<!--- Flex-row if alignment start, flex-row-reverse if alignment end, flex-column if mobile -->\n<div\n class=\"d-flex si-body-paragraph chat-message-container\"\n [class.start]=\"alignment() === 'start'\"\n>\n <div class=\"avatar-wrapper flex-shrink-0\" [class.end]=\"alignment() === 'end'\">\n <ng-content select=\"si-icon,si-avatar,img\" />\n </div>\n\n <div class=\"d-flex flex-column flex-grow-1 w-100\">\n <div class=\"attachment-slot\" [class.align-self-end]=\"alignment() === 'end'\">\n <ng-content select=\"si-attachment-list,si-badge\" />\n </div>\n\n @if (loading()) {\n <div\n class=\"message-wrapper rounded-3 w-75 text-break loading-message-bubble mb-2\"\n [class.align-self-end]=\"alignment() === 'end'\"\n >\n <div class=\"d-flex flex-column w-100 gap-2\">\n <div class=\"si-skeleton skeleton-line skeleton-line-full\"></div>\n <div class=\"si-skeleton skeleton-line skeleton-line-half\"></div>\n </div>\n </div>\n } @else {\n <!-- Flex-column if actions bottom, flex-row/flex-row-reverse if actions start -->\n <div\n class=\"message-wrapper mw-0 d-flex mb-2\"\n [class.start]=\"alignment() === 'start'\"\n [class.end]=\"alignment() === 'end'\"\n [class.flex-column]=\"actionsPosition() === 'bottom'\"\n [class.flex-row]=\"actionsPosition() === 'side' && alignment() === 'start'\"\n [class.flex-row-reverse]=\"actionsPosition() === 'side' && alignment() === 'end'\"\n [class.align-items-start]=\"actionsPosition() === 'side'\"\n [class.align-items-end]=\"actionsPosition() === 'bottom' && alignment() === 'end'\"\n [class.justify-content-end]=\"alignment() === 'end' && actionsPosition() === 'bottom'\"\n [class.justify-content-start]=\"alignment() === 'start' && actionsPosition() === 'bottom'\"\n >\n <div\n class=\"rounded-3 text-break message-bubble\"\n [class.end]=\"alignment() === 'end' && actionsPosition() === 'bottom'\"\n >\n <ng-content />\n </div>\n\n <div\n class=\"actions-wrapper d-flex gap-4\"\n [class.ms-3]=\"actionsPosition() === 'side' && alignment() === 'start'\"\n [class.me-3]=\"actionsPosition() === 'side' && alignment() === 'end'\"\n [class.mt-2]=\"actionsPosition() === 'bottom'\"\n [class.actions-horizontal]=\"actionsPosition() !== 'bottom'\"\n [class.align-self-start]=\"actionsPosition() === 'side'\"\n >\n <ng-content select=\"[siChatMessageAction]\" />\n </div>\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:block;--loading-spinner-size: 1.5em}.skeleton-line-full{inline-size:100%}.skeleton-line-half{inline-size:50%}.loading-message-bubble,.message-bubble{padding:var(--chat-message-bubble-padding, var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-x-50));margin-block-end:auto;background-color:var(--chat-message-bubble-bg, var(--si-sys-background-1))}.loading-message-bubble{inline-size:max-content;min-inline-size:75%}.message-bubble{min-inline-size:0;max-inline-size:100%;overflow-wrap:break-word;word-break:break-word}.message-bubble:empty{display:none}.message-bubble:empty~.actions-wrapper{margin-inline:0!important}.attachment-slot:empty{display:none}.attachment-slot:not(:empty)~.message-wrapper:not(:has(.message-bubble:empty)){margin-block-start:var(--si-sys-sizing-spacing-y-20)}.attachment-slot:not(:empty)~.message-wrapper:has(.message-bubble:empty) .actions-wrapper.actions-horizontal{margin-block-start:var(--si-sys-sizing-spacing-y-20)}.actions-wrapper:empty{display:none!important}.avatar-wrapper{align-self:flex-start}.avatar-wrapper:not(.end){margin-inline-end:var(--si-sys-sizing-spacing-x-30)}.avatar-wrapper.end{margin-inline-start:var(--si-sys-sizing-spacing-x-30)}.avatar-wrapper:empty{display:none}.message-wrapper{min-inline-size:0;max-inline-size:100%;inline-size:auto}.message-wrapper.start{margin-inline-end:auto}.message-wrapper.end{margin-inline-start:auto}:host-context(.si-container-md,.si-container-lg,.si-container-xl,.si-container-xxl) .chat-message-container{flex-direction:row}:host-context(.si-container-md,.si-container-lg,.si-container-xl,.si-container-xxl) .chat-message-container.start{align-items:flex-start}:host-context(.si-container-md,.si-container-lg,.si-container-xl,.si-container-xxl) .chat-message-container:not(.start){flex-direction:row-reverse}:host-context(.si-container-md,.si-container-lg,.si-container-xl,.si-container-xxl) .message-bubble.end{margin-inline-start:auto}:host-context(.si-container-xs,.si-container-sm) .chat-message-container{flex-direction:column}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper{margin-block-end:var(--si-sys-sizing-spacing-y-30)}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper.end{align-self:flex-end}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper::ng-deep:has(si-icon) .end{margin-inline-end:var(--si-sys-sizing-spacing-x-20)!important}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper::ng-deep:has(si-icon):not(.end){margin-inline-start:var(--si-sys-sizing-spacing-x-20)!important}\n"] }]
|
|
109
114
|
}], propDecorators: { loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], actionsPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsPosition", required: false }] }] } });
|
|
110
115
|
|
|
111
116
|
/**
|
|
@@ -116,99 +121,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
116
121
|
* AI message component for displaying AI-generated responses in conversational interfaces.
|
|
117
122
|
*
|
|
118
123
|
* The AI message component renders AI-generated content in chat interfaces,
|
|
119
|
-
* supporting text
|
|
124
|
+
* supporting text, loading states, and contextual actions.
|
|
120
125
|
* It appears as text (no bubble) aligned to the left side without any avatar/icon slot.
|
|
121
126
|
* Can be used within {@link SiChatContainerComponent}.
|
|
122
127
|
*
|
|
123
128
|
* The component automatically handles:
|
|
124
129
|
* - Styling for AI messages distinct from user or generic chat messages
|
|
125
|
-
* - Option to render markdown content, provide via `contentFormatter` input with a markdown renderer function (e.g., from {@link getMarkdownRenderer})
|
|
126
130
|
* - Showing loading states with skeleton UI during generation
|
|
127
131
|
* - Displaying primary and secondary actions
|
|
128
132
|
*
|
|
129
133
|
* @see {@link SiChatMessageComponent} for the base message wrapper component
|
|
130
134
|
* @see {@link SiUserMessageComponent} for the user message component
|
|
131
|
-
* @see {@link getMarkdownRenderer} for markdown formatting support
|
|
132
135
|
* @see {@link SiChatContainerComponent} for the chat container to use this within
|
|
133
136
|
*
|
|
134
137
|
* @experimental
|
|
135
138
|
*/
|
|
136
139
|
class SiAiMessageComponent {
|
|
137
|
-
formattedContent = viewChild('formattedContent', ...(ngDevMode ? [{ debugName: "formattedContent" }] : []));
|
|
138
140
|
icons = addIcons({ elementOptionsVertical });
|
|
139
141
|
/**
|
|
140
142
|
* The AI-generated message content
|
|
141
143
|
* @defaultValue ''
|
|
142
144
|
*/
|
|
143
|
-
content = input('',
|
|
144
|
-
|
|
145
|
-
* Optional formatter function to transform content before display.
|
|
146
|
-
* - Returns string: Content will be sanitized using Angular's DomSanitizer
|
|
147
|
-
* - Returns Node: DOM node will be inserted directly without sanitization
|
|
148
|
-
*
|
|
149
|
-
* **Note:** If using a markdown renderer, make sure to apply the `markdown-content` class
|
|
150
|
-
* to the root element to ensure proper styling using the Element theme (e.g., `div.className = 'markdown-content'`).
|
|
151
|
-
* The function returned by {@link getMarkdownRenderer} does this automatically.
|
|
152
|
-
*
|
|
153
|
-
* **Warning:** When returning a Node, ensure the content is safe to prevent XSS attacks
|
|
154
|
-
* @defaultValue undefined
|
|
155
|
-
*/
|
|
156
|
-
contentFormatter = input(undefined, ...(ngDevMode ? [{ debugName: "contentFormatter" }] : []));
|
|
157
|
-
textContent = signal(undefined, ...(ngDevMode ? [{ debugName: "textContent" }] : []));
|
|
158
|
-
constructor() {
|
|
159
|
-
effect(() => {
|
|
160
|
-
const formatter = this.contentFormatter();
|
|
161
|
-
const contentValue = this.content();
|
|
162
|
-
const container = this.formattedContent()?.nativeElement;
|
|
163
|
-
if (container && contentValue) {
|
|
164
|
-
if (formatter) {
|
|
165
|
-
const formatted = formatter(contentValue);
|
|
166
|
-
if (typeof formatted === 'string') {
|
|
167
|
-
this.textContent.set(formatted);
|
|
168
|
-
}
|
|
169
|
-
else if (formatted instanceof Node) {
|
|
170
|
-
this.textContent.set(undefined);
|
|
171
|
-
container.innerHTML = '';
|
|
172
|
-
container.appendChild(formatted);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
this.textContent.set(contentValue);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
145
|
+
content = input('', /* @ts-ignore */
|
|
146
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
181
147
|
/**
|
|
182
148
|
* Whether the message is currently being generated (shows skeleton)
|
|
183
149
|
* @defaultValue false
|
|
184
150
|
*/
|
|
185
|
-
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : {}), transform: booleanAttribute });
|
|
151
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
186
152
|
/**
|
|
187
153
|
* Primary actions available for this message (thumbs up/down, copy, retry, etc.)
|
|
188
154
|
* All actions displayed inline
|
|
189
155
|
* @defaultValue []
|
|
190
156
|
*/
|
|
191
|
-
actions = input([],
|
|
157
|
+
actions = input([], /* @ts-ignore */
|
|
158
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
192
159
|
/**
|
|
193
160
|
* Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally
|
|
194
161
|
* @defaultValue []
|
|
195
162
|
*/
|
|
196
|
-
secondaryActions = input([],
|
|
163
|
+
secondaryActions = input([], /* @ts-ignore */
|
|
164
|
+
...(ngDevMode ? [{ debugName: "secondaryActions" }] : /* istanbul ignore next */ []));
|
|
197
165
|
/** Parameter to pass to action handlers */
|
|
198
|
-
actionParam = input(
|
|
166
|
+
actionParam = input(/* @ts-ignore */
|
|
167
|
+
...(ngDevMode ? [undefined, { debugName: "actionParam" }] : /* istanbul ignore next */ []));
|
|
168
|
+
/** Source references */
|
|
169
|
+
sources = input(/* @ts-ignore */
|
|
170
|
+
...(ngDevMode ? [undefined, { debugName: "sources" }] : /* istanbul ignore next */ []));
|
|
199
171
|
/**
|
|
200
172
|
* More actions button aria label
|
|
201
173
|
*
|
|
202
174
|
* @defaultValue
|
|
203
175
|
* ```
|
|
204
|
-
* t(() => $localize`:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:
|
|
176
|
+
* t(() => $localize`:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:Additional actions`)
|
|
205
177
|
* ```
|
|
206
178
|
*/
|
|
207
|
-
secondaryActionsLabel = input(t(() => $localize `:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:
|
|
208
|
-
|
|
209
|
-
|
|
179
|
+
secondaryActionsLabel = input(t(() => $localize `:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:Additional actions`), /* @ts-ignore */
|
|
180
|
+
...(ngDevMode ? [{ debugName: "secondaryActionsLabel" }] : /* istanbul ignore next */ []));
|
|
181
|
+
/** Emitted when a source has been clicked. */
|
|
182
|
+
sourceClicked = output();
|
|
183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAiMessageComponent, isStandalone: true, selector: "si-ai-message", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, sources: { classPropertyName: "sources", publicName: "sources", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sourceClicked: "sourceClicked" }, ngImport: i0, template: "<si-chat-message alignment=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n\n @let src = sources();\n @if (actions().length > 0 || secondaryActions().length > 0 || src?.length) {\n <div class=\"btn-group ai-message-actions align-items-center\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n\n @if (src?.length) {\n <si-source-chip\n showIcon\n showLabel\n [sources]=\"src\"\n (sourceClicked)=\"sourceClicked.emit($event)\"\n />\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}si-chat-message{--chat-message-bubble-bg: transparent;--chat-message-bubble-padding: 0;margin-block-end:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.ai-message-actions{margin-block-start:calc(var(--si-sys-sizing-spacing-y-50) - var(--si-sys-sizing-spacing-y-20))}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "component", type: SiChatMessageComponent, selector: "si-chat-message", inputs: ["loading", "alignment", "actionsPosition"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiChatMessageActionDirective, selector: "[siChatMessageAction]" }, { kind: "component", type: SiSourceChipComponent, selector: "si-source-chip", inputs: ["showIcon", "showLabel", "sources", "compact", "disabled"], outputs: ["sourceClicked"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
210
185
|
}
|
|
211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiMessageComponent, decorators: [{
|
|
212
187
|
type: Component,
|
|
213
188
|
args: [{ selector: 'si-ai-message', imports: [
|
|
214
189
|
CdkMenuTrigger,
|
|
@@ -216,9 +191,116 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
216
191
|
SiIconComponent,
|
|
217
192
|
SiMenuFactoryComponent,
|
|
218
193
|
SiChatMessageActionDirective,
|
|
219
|
-
SiTranslatePipe
|
|
220
|
-
|
|
221
|
-
|
|
194
|
+
SiTranslatePipe,
|
|
195
|
+
SiSourceChipComponent
|
|
196
|
+
], template: "<si-chat-message alignment=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n\n @let src = sources();\n @if (actions().length > 0 || secondaryActions().length > 0 || src?.length) {\n <div class=\"btn-group ai-message-actions align-items-center\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n\n @if (src?.length) {\n <si-source-chip\n showIcon\n showLabel\n [sources]=\"src\"\n (sourceClicked)=\"sourceClicked.emit($event)\"\n />\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}si-chat-message{--chat-message-bubble-bg: transparent;--chat-message-bubble-padding: 0;margin-block-end:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.ai-message-actions{margin-block-start:calc(var(--si-sys-sizing-spacing-y-50) - var(--si-sys-sizing-spacing-y-20))}\n"] }]
|
|
197
|
+
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], actionParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionParam", required: false }] }], sources: [{ type: i0.Input, args: [{ isSignal: true, alias: "sources", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }], sourceClicked: [{ type: i0.Output, args: ["sourceClicked"] }] } });
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
201
|
+
* SPDX-License-Identifier: MIT
|
|
202
|
+
*/
|
|
203
|
+
/**
|
|
204
|
+
* Collapsible activity message for displaying progress and intermediate steps in a chat.
|
|
205
|
+
*
|
|
206
|
+
* @experimental
|
|
207
|
+
*/
|
|
208
|
+
class SiActivityMessageComponent {
|
|
209
|
+
/** Activity heading. */
|
|
210
|
+
heading = input.required(/* @ts-ignore */
|
|
211
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
212
|
+
/** Activity icon. */
|
|
213
|
+
icon = input(/* @ts-ignore */
|
|
214
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
215
|
+
/** Current state of the activity. */
|
|
216
|
+
state = input(/* @ts-ignore */
|
|
217
|
+
...(ngDevMode ? [undefined, { debugName: "state" }] : /* istanbul ignore next */ []));
|
|
218
|
+
/**
|
|
219
|
+
* Whether the activity details are expanded.
|
|
220
|
+
*
|
|
221
|
+
* @defaultValue false
|
|
222
|
+
*/
|
|
223
|
+
expanded = model(false, /* @ts-ignore */
|
|
224
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
225
|
+
icons = addIcons({
|
|
226
|
+
elementCircleFilled,
|
|
227
|
+
elementIssue,
|
|
228
|
+
elementRight2
|
|
229
|
+
});
|
|
230
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
231
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiActivityMessageComponent, isStandalone: true, selector: "si-activity-message", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "class.expanded": "expanded()", "class.failed": "state() === 'failed'" } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"activity-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n>\n <span class=\"activity-marker\">\n @switch (state()) {\n @case ('running') {\n <si-loading-spinner class=\"activity-icon\" />\n }\n @case ('failed') {\n <si-icon class=\"activity-icon\" [icon]=\"icons.elementIssue\" />\n }\n @default {\n <si-icon\n class=\"activity-icon\"\n [class.default-icon]=\"!icon()\"\n [icon]=\"icon() ?? icons.elementCircleFilled\"\n />\n }\n }\n <si-icon class=\"disclosure-icon\" [class.expanded]=\"expanded()\" [icon]=\"icons.elementRight2\" />\n </span>\n <span class=\"activity-heading\">{{ heading() | translate }}</span>\n</button>\n\n@if (expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"activity-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{position:relative;display:block;color:var(--si-sys-text-secondary);padding-block:var(--si-sys-sizing-spacing-y-20)}:host.failed{color:var(--si-sys-text-danger)}si-activity-message+:host{margin-block-start:var(--si-sys-sizing-spacing-y-20)}si-activity-message+:host:before{position:absolute;content:\"\";z-index:0;block-size:calc(var(--si-sys-sizing-spacing-y-20) + var(--si-sys-sizing-spacing-y-20) + var(--si-sys-sizing-spacing-y-20));inset-block-end:calc(100% - var(--si-sys-sizing-spacing-y-20));inset-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2);border-inline-start:1px solid var(--si-sys-border-3)}.activity-toggle{position:relative;z-index:1;display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-30);padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.activity-toggle:is(:hover,:focus-visible) .activity-icon{display:none}.activity-toggle:is(:hover,:focus-visible) .disclosure-icon{display:inline-flex}.activity-marker{--loading-spinner-size: var(--si-sys-sizing-icon-sm);display:inline-flex;flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm)}.activity-icon,.disclosure-icon{font-size:var(--si-sys-sizing-icon-sm)}.activity-heading{display:flex;align-items:center;min-block-size:calc(var(--si-sys-sizing-icon-sm) + 2 * var(--si-sys-sizing-spacing-y-20))}.default-icon{font-size:6px}.disclosure-icon{display:none;transition:transform calc(.5s * var(--element-animations-enabled, 1))}.disclosure-icon.expanded{transform:rotate(90deg)}.content-motion{display:grid;grid-template-rows:1fr;margin-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2);padding-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2 + var(--si-sys-sizing-spacing-x-30));border-inline-start:1px solid var(--si-sys-border-3)}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.activity-content{overflow:hidden;padding-block-start:var(--si-sys-sizing-spacing-y-40)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiLoadingSpinnerComponent, selector: "si-loading-spinner", inputs: ["isBlockingSpinner", "isSpinnerOverlay", "ariaLabel"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
232
|
+
}
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityMessageComponent, decorators: [{
|
|
234
|
+
type: Component,
|
|
235
|
+
args: [{ selector: 'si-activity-message', imports: [SiIconComponent, SiLoadingSpinnerComponent, SiTranslatePipe], host: {
|
|
236
|
+
'[class.expanded]': 'expanded()',
|
|
237
|
+
'[class.failed]': `state() === 'failed'`
|
|
238
|
+
}, template: "<button\n type=\"button\"\n class=\"activity-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n>\n <span class=\"activity-marker\">\n @switch (state()) {\n @case ('running') {\n <si-loading-spinner class=\"activity-icon\" />\n }\n @case ('failed') {\n <si-icon class=\"activity-icon\" [icon]=\"icons.elementIssue\" />\n }\n @default {\n <si-icon\n class=\"activity-icon\"\n [class.default-icon]=\"!icon()\"\n [icon]=\"icon() ?? icons.elementCircleFilled\"\n />\n }\n }\n <si-icon class=\"disclosure-icon\" [class.expanded]=\"expanded()\" [icon]=\"icons.elementRight2\" />\n </span>\n <span class=\"activity-heading\">{{ heading() | translate }}</span>\n</button>\n\n@if (expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"activity-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{position:relative;display:block;color:var(--si-sys-text-secondary);padding-block:var(--si-sys-sizing-spacing-y-20)}:host.failed{color:var(--si-sys-text-danger)}si-activity-message+:host{margin-block-start:var(--si-sys-sizing-spacing-y-20)}si-activity-message+:host:before{position:absolute;content:\"\";z-index:0;block-size:calc(var(--si-sys-sizing-spacing-y-20) + var(--si-sys-sizing-spacing-y-20) + var(--si-sys-sizing-spacing-y-20));inset-block-end:calc(100% - var(--si-sys-sizing-spacing-y-20));inset-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2);border-inline-start:1px solid var(--si-sys-border-3)}.activity-toggle{position:relative;z-index:1;display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-30);padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.activity-toggle:is(:hover,:focus-visible) .activity-icon{display:none}.activity-toggle:is(:hover,:focus-visible) .disclosure-icon{display:inline-flex}.activity-marker{--loading-spinner-size: var(--si-sys-sizing-icon-sm);display:inline-flex;flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm)}.activity-icon,.disclosure-icon{font-size:var(--si-sys-sizing-icon-sm)}.activity-heading{display:flex;align-items:center;min-block-size:calc(var(--si-sys-sizing-icon-sm) + 2 * var(--si-sys-sizing-spacing-y-20))}.default-icon{font-size:6px}.disclosure-icon{display:none;transition:transform calc(.5s * var(--element-animations-enabled, 1))}.disclosure-icon.expanded{transform:rotate(90deg)}.content-motion{display:grid;grid-template-rows:1fr;margin-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2);padding-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2 + var(--si-sys-sizing-spacing-x-30));border-inline-start:1px solid var(--si-sys-border-3)}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.activity-content{overflow:hidden;padding-block-start:var(--si-sys-sizing-spacing-y-40)}\n"] }]
|
|
239
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
243
|
+
* SPDX-License-Identifier: MIT
|
|
244
|
+
*/
|
|
245
|
+
/**
|
|
246
|
+
* Titled content part for use inside an activity message.
|
|
247
|
+
*
|
|
248
|
+
* @experimental
|
|
249
|
+
*/
|
|
250
|
+
class SiActivityMessagePartComponent {
|
|
251
|
+
/** Part heading. */
|
|
252
|
+
heading = input.required(/* @ts-ignore */
|
|
253
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
254
|
+
/**
|
|
255
|
+
* Whether the part can be collapsed and expanded.
|
|
256
|
+
*
|
|
257
|
+
* @defaultValue false
|
|
258
|
+
*/
|
|
259
|
+
collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
260
|
+
/**
|
|
261
|
+
* Whether collapsible content is expanded.
|
|
262
|
+
*
|
|
263
|
+
* @defaultValue true
|
|
264
|
+
*/
|
|
265
|
+
expanded = model(true, /* @ts-ignore */
|
|
266
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
267
|
+
icons = addIcons({ elementCircleFilled, elementRight2 });
|
|
268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityMessagePartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
269
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiActivityMessagePartComponent, isStandalone: true, selector: "si-activity-message-part", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "@if (collapsible()) {\n <button\n type=\"button\"\n class=\"section-heading section-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n >\n <si-icon\n class=\"section-icon disclosure-icon\"\n [class.expanded]=\"expanded()\"\n [icon]=\"icons.elementRight2\"\n />\n <span>{{ heading() | translate }}</span>\n </button>\n} @else {\n <div class=\"section-heading\">\n <si-icon class=\"section-icon default-icon\" [icon]=\"icons.elementCircleFilled\" />\n <span>{{ heading() | translate }}</span>\n </div>\n}\n\n@if (!collapsible() || expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"section-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{display:block;padding-block:var(--si-sys-sizing-spacing-y-20)}:host+:host{margin-block-start:var(--si-sys-sizing-spacing-y-50)}.section-heading{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-20);color:var(--si-sys-text-secondary)}.section-toggle{padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.section-toggle .disclosure-icon{transition:transform calc(.5s * var(--element-animations-enabled, 1))}.section-toggle .disclosure-icon.expanded{transform:rotate(90deg)}.section-icon{flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm);font-size:var(--si-sys-sizing-icon-sm)}.default-icon{font-size:6px}.content-motion{display:grid;grid-template-rows:1fr}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.section-content{overflow:hidden;margin-block-start:var(--si-sys-sizing-spacing-y-20);padding-inline-start:calc(var(--si-sys-sizing-icon-sm) + var(--si-sys-sizing-spacing-x-20));color:var(--si-sys-text-secondary)}.section-content:empty{display:none}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
270
|
+
}
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityMessagePartComponent, decorators: [{
|
|
272
|
+
type: Component,
|
|
273
|
+
args: [{ selector: 'si-activity-message-part', imports: [SiIconComponent, SiTranslatePipe], template: "@if (collapsible()) {\n <button\n type=\"button\"\n class=\"section-heading section-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n >\n <si-icon\n class=\"section-icon disclosure-icon\"\n [class.expanded]=\"expanded()\"\n [icon]=\"icons.elementRight2\"\n />\n <span>{{ heading() | translate }}</span>\n </button>\n} @else {\n <div class=\"section-heading\">\n <si-icon class=\"section-icon default-icon\" [icon]=\"icons.elementCircleFilled\" />\n <span>{{ heading() | translate }}</span>\n </div>\n}\n\n@if (!collapsible() || expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"section-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{display:block;padding-block:var(--si-sys-sizing-spacing-y-20)}:host+:host{margin-block-start:var(--si-sys-sizing-spacing-y-50)}.section-heading{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-20);color:var(--si-sys-text-secondary)}.section-toggle{padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.section-toggle .disclosure-icon{transition:transform calc(.5s * var(--element-animations-enabled, 1))}.section-toggle .disclosure-icon.expanded{transform:rotate(90deg)}.section-icon{flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm);font-size:var(--si-sys-sizing-icon-sm)}.default-icon{font-size:6px}.content-motion{display:grid;grid-template-rows:1fr}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.section-content{overflow:hidden;margin-block-start:var(--si-sys-sizing-spacing-y-20);padding-inline-start:calc(var(--si-sys-sizing-icon-sm) + var(--si-sys-sizing-spacing-x-20));color:var(--si-sys-text-secondary)}.section-content:empty{display:none}\n"] }]
|
|
274
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
278
|
+
* SPDX-License-Identifier: MIT
|
|
279
|
+
*/
|
|
280
|
+
/**
|
|
281
|
+
* Collapsible container for grouping multiple activity messages.
|
|
282
|
+
*
|
|
283
|
+
* @experimental
|
|
284
|
+
*/
|
|
285
|
+
class SiActivityTraceComponent {
|
|
286
|
+
/** Trace heading. */
|
|
287
|
+
heading = input.required(/* @ts-ignore */
|
|
288
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
289
|
+
/**
|
|
290
|
+
* Whether the trace content is expanded.
|
|
291
|
+
*
|
|
292
|
+
* @defaultValue false
|
|
293
|
+
*/
|
|
294
|
+
expanded = model(false, /* @ts-ignore */
|
|
295
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
296
|
+
icons = addIcons({ elementRight2 });
|
|
297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityTraceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
298
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiActivityTraceComponent, isStandalone: true, selector: "si-activity-trace", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"trace-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n>\n <span class=\"trace-marker\">\n <si-icon class=\"disclosure-icon\" [class.expanded]=\"expanded()\" [icon]=\"icons.elementRight2\" />\n </span>\n <span class=\"trace-heading\">{{ heading() | translate }}</span>\n</button>\n\n@if (expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"trace-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{display:block;padding-block:var(--si-sys-sizing-spacing-y-20);color:var(--si-sys-text-secondary)}.trace-toggle{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-30);padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.trace-marker{display:inline-flex;flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm)}.disclosure-icon{font-size:var(--si-sys-sizing-icon-sm);transition:transform calc(.5s * var(--element-animations-enabled, 1))}.disclosure-icon.expanded{transform:rotate(90deg)}.trace-heading{display:flex;align-items:center;min-block-size:calc(var(--si-sys-sizing-icon-sm) + 2 * var(--si-sys-sizing-spacing-y-20))}.content-motion{display:grid;grid-template-rows:1fr}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.trace-content{overflow:hidden;padding-block-start:var(--si-sys-sizing-spacing-y-40)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
299
|
+
}
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityTraceComponent, decorators: [{
|
|
301
|
+
type: Component,
|
|
302
|
+
args: [{ selector: 'si-activity-trace', imports: [SiIconComponent, SiTranslatePipe], template: "<button\n type=\"button\"\n class=\"trace-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n>\n <span class=\"trace-marker\">\n <si-icon class=\"disclosure-icon\" [class.expanded]=\"expanded()\" [icon]=\"icons.elementRight2\" />\n </span>\n <span class=\"trace-heading\">{{ heading() | translate }}</span>\n</button>\n\n@if (expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"trace-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{display:block;padding-block:var(--si-sys-sizing-spacing-y-20);color:var(--si-sys-text-secondary)}.trace-toggle{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-30);padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.trace-marker{display:inline-flex;flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm)}.disclosure-icon{font-size:var(--si-sys-sizing-icon-sm);transition:transform calc(.5s * var(--element-animations-enabled, 1))}.disclosure-icon.expanded{transform:rotate(90deg)}.trace-heading{display:flex;align-items:center;min-block-size:calc(var(--si-sys-sizing-icon-sm) + 2 * var(--si-sys-sizing-spacing-y-20))}.content-motion{display:grid;grid-template-rows:1fr}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.trace-content{overflow:hidden;padding-block-start:var(--si-sys-sizing-spacing-y-40)}\n"] }]
|
|
303
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
|
|
222
304
|
|
|
223
305
|
/**
|
|
224
306
|
* Copyright (c) Siemens 2016 - 2026
|
|
@@ -253,26 +335,30 @@ class SiAttachmentListComponent {
|
|
|
253
335
|
* List of attachments to display
|
|
254
336
|
* @defaultValue []
|
|
255
337
|
*/
|
|
256
|
-
attachments = input([],
|
|
338
|
+
attachments = input([], /* @ts-ignore */
|
|
339
|
+
...(ngDevMode ? [{ debugName: "attachments" }] : /* istanbul ignore next */ []));
|
|
257
340
|
/**
|
|
258
341
|
* Whether to align attachments to the end (right) or start (left)
|
|
259
342
|
* @defaultValue 'start'
|
|
260
343
|
*/
|
|
261
|
-
alignment = input('start',
|
|
344
|
+
alignment = input('start', /* @ts-ignore */
|
|
345
|
+
...(ngDevMode ? [{ debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
262
346
|
/**
|
|
263
347
|
* Whether to show remove buttons on attachments
|
|
264
348
|
* @defaultValue false
|
|
265
349
|
*/
|
|
266
|
-
removable = input(false, { ...(ngDevMode ? { debugName: "removable" } : {}), transform: booleanAttribute });
|
|
350
|
+
removable = input(false, { ...(ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
267
351
|
/**
|
|
268
|
-
* Label for remove attachment button
|
|
352
|
+
* Label for remove attachment button.
|
|
353
|
+
* The attachment name is available with `{{attachment}}`.
|
|
269
354
|
*
|
|
270
355
|
* @defaultValue
|
|
271
356
|
* ```
|
|
272
|
-
* t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`)
|
|
357
|
+
* t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove {{attachment}}`)
|
|
273
358
|
* ```
|
|
274
359
|
*/
|
|
275
|
-
removeLabel = input(t(() => $localize `:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`),
|
|
360
|
+
removeLabel = input(t(() => $localize `:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove {{attachment}}`), /* @ts-ignore */
|
|
361
|
+
...(ngDevMode ? [{ debugName: "removeLabel" }] : /* istanbul ignore next */ []));
|
|
276
362
|
/**
|
|
277
363
|
* Emitted when an attachment should be removed
|
|
278
364
|
*/
|
|
@@ -298,12 +384,12 @@ class SiAttachmentListComponent {
|
|
|
298
384
|
// TODO: Accept map and default it in file upload directive.
|
|
299
385
|
return this.icons.elementDocument;
|
|
300
386
|
}
|
|
301
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
302
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAttachmentListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
388
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAttachmentListComponent, isStandalone: true, selector: "si-attachment-list", inputs: { attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"d-flex flex-wrap gap-4\" [class.justify-content-end]=\"alignment() === 'end'\">\n @for (attachment of attachments(); track $index) {\n <div class=\"attachment-item d-flex align-items-stretch\" role=\"group\">\n @if (attachment.previewTemplate) {\n <button\n type=\"button\"\n class=\"attachment-main focus-inside d-flex align-items-center flex-grow-1 min-width-0\"\n [attr.title]=\"attachment.name\"\n [attr.aria-label]=\"attachment.name\"\n (click)=\"openPreview($event, attachment)\"\n (keydown.enter)=\"openPreview($event, attachment)\"\n (keydown.space)=\"openPreview($event, attachment)\"\n >\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </button>\n } @else {\n <div class=\"attachment-main--static d-flex align-items-center flex-grow-1 min-width-0\">\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </div>\n }\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-sm btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside m-2\"\n [attr.aria-label]=\"removeLabel() | translate: { attachment: attachment.name }\"\n (click)=\"remove.emit(attachment); $event.stopPropagation()\"\n >\n <si-icon class=\"icon\" [icon]=\"icons.elementStateClose\" />\n </button>\n }\n </div>\n }\n</div>\n", styles: [".attachment-item{border-radius:var(--element-radius-2);overflow:hidden;background-color:var(--attachment-list-bg, transparent);color:var(--attachment-name-color, var(--si-sys-text-secondary));border:1px solid var(--si-sys-border-4)}.attachment-main{appearance:none;border:0;background:none;padding:0;margin:0;inline-size:100%;text-align:inherit;color:inherit;cursor:pointer}.attachment-icon{display:flex;align-items:center;justify-content:center;color:var(--si-sys-text-primary)}.attachment-info{display:flex;flex-direction:column;gap:2px;min-inline-size:0}.attachment-info .attachment-name{line-height:1.2}.attachment-info .attachment-size{line-height:1}.expand-button{border-radius:var(--element-radius-2)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
303
389
|
}
|
|
304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAttachmentListComponent, decorators: [{
|
|
305
391
|
type: Component,
|
|
306
|
-
args: [{ selector: 'si-attachment-list', imports: [SiIconComponent, SiTranslatePipe],
|
|
392
|
+
args: [{ selector: 'si-attachment-list', imports: [SiIconComponent, SiTranslatePipe], template: "<div class=\"d-flex flex-wrap gap-4\" [class.justify-content-end]=\"alignment() === 'end'\">\n @for (attachment of attachments(); track $index) {\n <div class=\"attachment-item d-flex align-items-stretch\" role=\"group\">\n @if (attachment.previewTemplate) {\n <button\n type=\"button\"\n class=\"attachment-main focus-inside d-flex align-items-center flex-grow-1 min-width-0\"\n [attr.title]=\"attachment.name\"\n [attr.aria-label]=\"attachment.name\"\n (click)=\"openPreview($event, attachment)\"\n (keydown.enter)=\"openPreview($event, attachment)\"\n (keydown.space)=\"openPreview($event, attachment)\"\n >\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </button>\n } @else {\n <div class=\"attachment-main--static d-flex align-items-center flex-grow-1 min-width-0\">\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </div>\n }\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-sm btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside m-2\"\n [attr.aria-label]=\"removeLabel() | translate: { attachment: attachment.name }\"\n (click)=\"remove.emit(attachment); $event.stopPropagation()\"\n >\n <si-icon class=\"icon\" [icon]=\"icons.elementStateClose\" />\n </button>\n }\n </div>\n }\n</div>\n", styles: [".attachment-item{border-radius:var(--element-radius-2);overflow:hidden;background-color:var(--attachment-list-bg, transparent);color:var(--attachment-name-color, var(--si-sys-text-secondary));border:1px solid var(--si-sys-border-4)}.attachment-main{appearance:none;border:0;background:none;padding:0;margin:0;inline-size:100%;text-align:inherit;color:inherit;cursor:pointer}.attachment-icon{display:flex;align-items:center;justify-content:center;color:var(--si-sys-text-primary)}.attachment-info{display:flex;flex-direction:column;gap:2px;min-inline-size:0}.attachment-info .attachment-name{line-height:1.2}.attachment-info .attachment-size{line-height:1}.expand-button{border-radius:var(--element-radius-2)}\n"] }]
|
|
307
393
|
}], propDecorators: { attachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachments", required: false }] }], alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], removeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLabel", required: false }] }], remove: [{ type: i0.Output, args: ["remove"] }] } });
|
|
308
394
|
|
|
309
395
|
/**
|
|
@@ -331,7 +417,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
331
417
|
* @experimental
|
|
332
418
|
*/
|
|
333
419
|
class SiChatContainerComponent {
|
|
334
|
-
messagesContainer = viewChild('messagesContainer',
|
|
420
|
+
messagesContainer = viewChild('messagesContainer', /* @ts-ignore */
|
|
421
|
+
...(ngDevMode ? [{ debugName: "messagesContainer" }] : /* istanbul ignore next */ []));
|
|
335
422
|
platformId = inject(PLATFORM_ID);
|
|
336
423
|
isUserAtBottom = true;
|
|
337
424
|
scrollTimeout;
|
|
@@ -344,12 +431,13 @@ class SiChatContainerComponent {
|
|
|
344
431
|
* The color variant to apply to the container.
|
|
345
432
|
* @defaultValue 'base-0'
|
|
346
433
|
*/
|
|
347
|
-
colorVariant = input('base-0',
|
|
434
|
+
colorVariant = input('base-0', /* @ts-ignore */
|
|
435
|
+
...(ngDevMode ? [{ debugName: "colorVariant" }] : /* istanbul ignore next */ []));
|
|
348
436
|
/**
|
|
349
437
|
* Disables automatic scrolling to the bottom when new content is added.
|
|
350
438
|
* @defaultValue false
|
|
351
439
|
*/
|
|
352
|
-
noAutoScroll = input(false, { ...(ngDevMode ? { debugName: "noAutoScroll" } : {}), transform: (value) => value === '' || value === true });
|
|
440
|
+
noAutoScroll = input(false, { ...(ngDevMode ? { debugName: "noAutoScroll" } : /* istanbul ignore next */ {}), transform: (value) => value === '' || value === true });
|
|
353
441
|
constructor() {
|
|
354
442
|
effect(() => {
|
|
355
443
|
if (this.messagesContainer()) {
|
|
@@ -475,15 +563,15 @@ class SiChatContainerComponent {
|
|
|
475
563
|
const container = this.messagesContainer();
|
|
476
564
|
container?.nativeElement.focus();
|
|
477
565
|
}
|
|
478
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
479
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
566
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
567
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiChatContainerComponent, isStandalone: true, selector: "si-chat-container", inputs: { colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, noAutoScroll: { classPropertyName: "noAutoScroll", publicName: "noAutoScroll", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "colorVariant()" }, classAttribute: "d-flex si-layout-inner flex-grow-1 flex-column h-100 w-100" }, viewQueries: [{ propertyName: "messagesContainer", first: true, predicate: ["messagesContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 px-md-9 py-6 w-100\">\n <div\n #messagesContainer\n class=\"messages-container d-flex flex-column flex-grow-1 w-100 align-self-center\"\n tabindex=\"0\"\n (scroll)=\"onScroll()\"\n >\n <ng-content />\n </div>\n\n <div class=\"chat-input-area py-3 pt-0 mt-6 d-flex flex-column align-items-center\">\n <ng-content select=\"si-inline-notification\" />\n <ng-content select=\"si-chat-input,[siChatContainerInput]\" />\n </div>\n</div>\n", styles: [":host{overflow-y:hidden;overflow-x:visible}:host.base-0{background-color:var(--si-sys-background-0)}:host.base-1{background-color:var(--si-sys-background-1)}.chat-container.initialized{scroll-behavior:smooth}::ng-deep .chat-container:has(si-ai-welcome-screen){inline-size:100%;padding-inline-start:0!important;padding-inline-end:0!important}::ng-deep .chat-container:has(si-ai-welcome-screen) :is(.chat-input-area,si-ai-welcome-screen){padding-inline-start:var(--si-sys-sizing-spacing-x-60);padding-inline-end:var(--si-sys-sizing-spacing-x-60)}.chat-container{min-block-size:0;overflow-y:auto;overflow-x:visible}.messages-container{overflow-y:auto;overflow-x:visible;padding-inline:var(--si-sys-sizing-spacing-x-40);min-block-size:5rem;gap:calc(var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) calc(var(--si-sys-sizing-spacing-x-90) + var(--si-sys-sizing-spacing-x-40))}.messages-container ::ng-deep si-user-message:not(.last),.messages-container>::ng-deep si-activity-message:has(+si-activity-message){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)))}.messages-container>::ng-deep :is(si-activity-message,si-activity-trace):has(+si-ai-message),.messages-container>::ng-deep si-ai-message:has(+:is(si-activity-message,si-activity-trace)){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) + var(--si-sys-sizing-spacing-y-60))}::ng-deep .messages-container:not(:has(si-ai-welcome-screen)){max-inline-size:720px}::ng-deep .messages-container:has(si-ai-welcome-screen){inline-size:100%}.chat-input-area{justify-self:flex-end;align-self:center;overflow:visible;inline-size:100%}.chat-input-area>::ng-deep *{max-inline-size:720px}::ng-deep .chat-input-area:empty:not(:has(si-inline-notification)),::ng-deep .chat-input-area:has([sichatcontainerinput]:empty):not(:has(si-inline-notification)){display:none!important}.chat-input-area:empty ::ng-deep>si-inline-notification,.chat-input-area:empty ::ng-deep *>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep *>si-inline-notification{margin-block-end:0!important}.chat-container:has(.messages-container:not(:empty)) .messages-empty-state{display:none!important}:host-context(.si-container-xs,.si-container-sm) ::ng-deep si-inline-notification :is(.alert,.alert-link){font-size:var(--si-sys-typography-font-size-body)}\n"] });
|
|
480
568
|
}
|
|
481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatContainerComponent, decorators: [{
|
|
482
570
|
type: Component,
|
|
483
|
-
args: [{ selector: 'si-chat-container',
|
|
571
|
+
args: [{ selector: 'si-chat-container', host: {
|
|
484
572
|
class: 'd-flex si-layout-inner flex-grow-1 flex-column h-100 w-100',
|
|
485
573
|
'[class]': 'colorVariant()'
|
|
486
|
-
}, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 px-md-9 py-6 w-100\">\n <div\n #messagesContainer\n class=\"messages-container d-flex flex-column flex-grow-1 w-100 align-self-center\"\n tabindex=\"0\"\n (scroll)=\"onScroll()\"\n >\n <ng-content />\n </div>\n\n <div class=\"chat-input-area py-3 pt-0 mt-6 d-flex flex-column align-items-center\">\n <ng-content select=\"si-inline-notification\" />\n <ng-content select=\"si-chat-input,[siChatContainerInput]\" />\n </div>\n</div>\n", styles: [":host{overflow-y:hidden;overflow-x:visible}:host.base-0{background-color:var(--
|
|
574
|
+
}, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 px-md-9 py-6 w-100\">\n <div\n #messagesContainer\n class=\"messages-container d-flex flex-column flex-grow-1 w-100 align-self-center\"\n tabindex=\"0\"\n (scroll)=\"onScroll()\"\n >\n <ng-content />\n </div>\n\n <div class=\"chat-input-area py-3 pt-0 mt-6 d-flex flex-column align-items-center\">\n <ng-content select=\"si-inline-notification\" />\n <ng-content select=\"si-chat-input,[siChatContainerInput]\" />\n </div>\n</div>\n", styles: [":host{overflow-y:hidden;overflow-x:visible}:host.base-0{background-color:var(--si-sys-background-0)}:host.base-1{background-color:var(--si-sys-background-1)}.chat-container.initialized{scroll-behavior:smooth}::ng-deep .chat-container:has(si-ai-welcome-screen){inline-size:100%;padding-inline-start:0!important;padding-inline-end:0!important}::ng-deep .chat-container:has(si-ai-welcome-screen) :is(.chat-input-area,si-ai-welcome-screen){padding-inline-start:var(--si-sys-sizing-spacing-x-60);padding-inline-end:var(--si-sys-sizing-spacing-x-60)}.chat-container{min-block-size:0;overflow-y:auto;overflow-x:visible}.messages-container{overflow-y:auto;overflow-x:visible;padding-inline:var(--si-sys-sizing-spacing-x-40);min-block-size:5rem;gap:calc(var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) calc(var(--si-sys-sizing-spacing-x-90) + var(--si-sys-sizing-spacing-x-40))}.messages-container ::ng-deep si-user-message:not(.last),.messages-container>::ng-deep si-activity-message:has(+si-activity-message){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)))}.messages-container>::ng-deep :is(si-activity-message,si-activity-trace):has(+si-ai-message),.messages-container>::ng-deep si-ai-message:has(+:is(si-activity-message,si-activity-trace)){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) + var(--si-sys-sizing-spacing-y-60))}::ng-deep .messages-container:not(:has(si-ai-welcome-screen)){max-inline-size:720px}::ng-deep .messages-container:has(si-ai-welcome-screen){inline-size:100%}.chat-input-area{justify-self:flex-end;align-self:center;overflow:visible;inline-size:100%}.chat-input-area>::ng-deep *{max-inline-size:720px}::ng-deep .chat-input-area:empty:not(:has(si-inline-notification)),::ng-deep .chat-input-area:has([sichatcontainerinput]:empty):not(:has(si-inline-notification)){display:none!important}.chat-input-area:empty ::ng-deep>si-inline-notification,.chat-input-area:empty ::ng-deep *>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep *>si-inline-notification{margin-block-end:0!important}.chat-container:has(.messages-container:not(:empty)) .messages-empty-state{display:none!important}:host-context(.si-container-xs,.si-container-sm) ::ng-deep si-inline-notification :is(.alert,.alert-link){font-size:var(--si-sys-typography-font-size-body)}\n"] }]
|
|
487
575
|
}], ctorParameters: () => [], propDecorators: { messagesContainer: [{ type: i0.ViewChild, args: ['messagesContainer', { isSignal: true }] }], colorVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorVariant", required: false }] }], noAutoScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "noAutoScroll", required: false }] }] } });
|
|
488
576
|
|
|
489
577
|
/**
|
|
@@ -512,10 +600,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
512
600
|
* @experimental
|
|
513
601
|
*/
|
|
514
602
|
class SiChatContainerInputDirective {
|
|
515
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
516
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
603
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatContainerInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
604
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SiChatContainerInputDirective, isStandalone: true, selector: "[siChatContainerInput]", ngImport: i0 });
|
|
517
605
|
}
|
|
518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
606
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatContainerInputDirective, decorators: [{
|
|
519
607
|
type: Directive,
|
|
520
608
|
args: [{
|
|
521
609
|
selector: '[siChatContainerInput]'
|
|
@@ -550,9 +638,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
550
638
|
*/
|
|
551
639
|
class SiChatInputComponent {
|
|
552
640
|
static idCounter = 0;
|
|
553
|
-
textInput = viewChild('textInput',
|
|
554
|
-
|
|
555
|
-
|
|
641
|
+
textInput = viewChild('textInput', /* @ts-ignore */
|
|
642
|
+
...(ngDevMode ? [{ debugName: "textInput" }] : /* istanbul ignore next */ []));
|
|
643
|
+
fileUploadDirective = viewChild(SiFileUploadDirective, /* @ts-ignore */
|
|
644
|
+
...(ngDevMode ? [{ debugName: "fileUploadDirective" }] : /* istanbul ignore next */ []));
|
|
645
|
+
fileInput = viewChild('fileInput', /* @ts-ignore */
|
|
646
|
+
...(ngDevMode ? [{ debugName: "fileInput" }] : /* istanbul ignore next */ []));
|
|
556
647
|
icons = addIcons({
|
|
557
648
|
elementAttachment,
|
|
558
649
|
elementPlus,
|
|
@@ -563,7 +654,8 @@ class SiChatInputComponent {
|
|
|
563
654
|
* Current input value
|
|
564
655
|
* @defaultValue ''
|
|
565
656
|
*/
|
|
566
|
-
value = model('',
|
|
657
|
+
value = model('', /* @ts-ignore */
|
|
658
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
567
659
|
/**
|
|
568
660
|
* Placeholder text for the input
|
|
569
661
|
*
|
|
@@ -572,76 +664,86 @@ class SiChatInputComponent {
|
|
|
572
664
|
* t(() => $localize`:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…`)
|
|
573
665
|
* ```
|
|
574
666
|
*/
|
|
575
|
-
placeholder = input(t(() => $localize `:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…`),
|
|
667
|
+
placeholder = input(t(() => $localize `:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…`), /* @ts-ignore */
|
|
668
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
576
669
|
/**
|
|
577
670
|
* Whether the input is disabled
|
|
578
671
|
* @defaultValue false
|
|
579
672
|
*/
|
|
580
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
673
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
581
674
|
/**
|
|
582
675
|
* Whether a message is currently being sent, also prevent the sending of new ones while still allowing the user to type
|
|
583
676
|
* @defaultValue false
|
|
584
677
|
*/
|
|
585
|
-
sending = input(false, { ...(ngDevMode ? { debugName: "sending" } : {}), transform: booleanAttribute });
|
|
678
|
+
sending = input(false, { ...(ngDevMode ? { debugName: "sending" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
586
679
|
/**
|
|
587
680
|
* Whether the input supports interrupting ongoing operations. When active,
|
|
588
681
|
* the send button transforms into an interrupt button (with element-stop-filled icon).
|
|
589
682
|
* If sending is true, the interrupt button will be disabled.
|
|
590
683
|
* @defaultValue false
|
|
591
684
|
*/
|
|
592
|
-
interruptible = input(false, { ...(ngDevMode ? { debugName: "interruptible" } : {}), transform: booleanAttribute });
|
|
685
|
+
interruptible = input(false, { ...(ngDevMode ? { debugName: "interruptible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
593
686
|
/**
|
|
594
687
|
* Maximum number of characters allowed
|
|
595
688
|
*/
|
|
596
|
-
maxLength = input(
|
|
689
|
+
maxLength = input(/* @ts-ignore */
|
|
690
|
+
...(ngDevMode ? [undefined, { debugName: "maxLength" }] : /* istanbul ignore next */ []));
|
|
597
691
|
/**
|
|
598
692
|
* A disclaimer to display.
|
|
599
693
|
*
|
|
600
694
|
* If not provided, the component will look for projected content with the `siChatInputDisclaimer` directive.
|
|
601
695
|
* If both are empty, no disclaimer section will be shown (handled via CSS :empty).
|
|
602
696
|
*/
|
|
603
|
-
disclaimer = input(
|
|
697
|
+
disclaimer = input(/* @ts-ignore */
|
|
698
|
+
...(ngDevMode ? [undefined, { debugName: "disclaimer" }] : /* istanbul ignore next */ []));
|
|
604
699
|
/**
|
|
605
|
-
* Primary actions available in the input
|
|
606
|
-
* All actions displayed inline
|
|
700
|
+
* Primary actions available in the input. Provide at most one action.
|
|
607
701
|
* @defaultValue []
|
|
608
702
|
*/
|
|
609
|
-
actions = input([],
|
|
703
|
+
actions = input([], /* @ts-ignore */
|
|
704
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
610
705
|
/**
|
|
611
706
|
* Secondary actions available in dropdown menu
|
|
612
707
|
* @defaultValue []
|
|
613
708
|
*/
|
|
614
|
-
secondaryActions = input([],
|
|
709
|
+
secondaryActions = input([], /* @ts-ignore */
|
|
710
|
+
...(ngDevMode ? [{ debugName: "secondaryActions" }] : /* istanbul ignore next */ []));
|
|
615
711
|
/**
|
|
616
712
|
* Whether file attachments are supported
|
|
617
713
|
* @defaultValue false
|
|
618
714
|
*/
|
|
619
|
-
allowAttachments = input(false,
|
|
715
|
+
allowAttachments = input(false, /* @ts-ignore */
|
|
716
|
+
...(ngDevMode ? [{ debugName: "allowAttachments" }] : /* istanbul ignore next */ []));
|
|
620
717
|
/**
|
|
621
718
|
* Accepted file types for attachments (as accept string)
|
|
622
719
|
* @defaultValue undefined
|
|
623
720
|
*/
|
|
624
|
-
accept = input(
|
|
721
|
+
accept = input(/* @ts-ignore */
|
|
722
|
+
...(ngDevMode ? [undefined, { debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
625
723
|
/**
|
|
626
724
|
* Maximum file size in bytes
|
|
627
725
|
* @defaultValue 10485760 (10MB)
|
|
628
726
|
*/
|
|
629
|
-
maxFileSize = input(10485760,
|
|
727
|
+
maxFileSize = input(10485760, /* @ts-ignore */
|
|
728
|
+
...(ngDevMode ? [{ debugName: "maxFileSize" }] : /* istanbul ignore next */ []));
|
|
630
729
|
/**
|
|
631
730
|
* Current attachments
|
|
632
731
|
* @defaultValue []
|
|
633
732
|
*/
|
|
634
|
-
attachments = model([],
|
|
733
|
+
attachments = model([], /* @ts-ignore */
|
|
734
|
+
...(ngDevMode ? [{ debugName: "attachments" }] : /* istanbul ignore next */ []));
|
|
635
735
|
/**
|
|
636
736
|
* The label for the input, used for accessibility
|
|
637
737
|
* @defaultValue
|
|
638
738
|
* ```
|
|
639
|
-
* t(() => $localize`:@@SI_CHAT_INPUT.LABEL:Chat
|
|
739
|
+
* t(() => $localize`:@@SI_CHAT_INPUT.LABEL:Chat input`)
|
|
640
740
|
* ```
|
|
641
741
|
*/
|
|
642
|
-
label = input(t(() => $localize `:@@SI_CHAT_INPUT.LABEL:Chat
|
|
742
|
+
label = input(t(() => $localize `:@@SI_CHAT_INPUT.LABEL:Chat input`), /* @ts-ignore */
|
|
743
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
643
744
|
/** Parameter to pass to action handlers */
|
|
644
|
-
actionParam = input(
|
|
745
|
+
actionParam = input(/* @ts-ignore */
|
|
746
|
+
...(ngDevMode ? [undefined, { debugName: "actionParam" }] : /* istanbul ignore next */ []));
|
|
645
747
|
/**
|
|
646
748
|
* Send button label
|
|
647
749
|
*
|
|
@@ -650,27 +752,30 @@ class SiChatInputComponent {
|
|
|
650
752
|
* t(() => $localize`:@@SI_CHAT_INPUT.SEND:Send`)
|
|
651
753
|
* ```
|
|
652
754
|
*/
|
|
653
|
-
sendButtonLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.SEND:Send`),
|
|
755
|
+
sendButtonLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.SEND:Send`), /* @ts-ignore */
|
|
756
|
+
...(ngDevMode ? [{ debugName: "sendButtonLabel" }] : /* istanbul ignore next */ []));
|
|
654
757
|
/**
|
|
655
758
|
* Send button icon
|
|
656
759
|
*
|
|
657
760
|
* @defaultValue this.icons.elementSendFilled
|
|
658
761
|
*/
|
|
659
|
-
sendButtonIcon = input(this.icons.elementSendFilled,
|
|
762
|
+
sendButtonIcon = input(this.icons.elementSendFilled, /* @ts-ignore */
|
|
763
|
+
...(ngDevMode ? [{ debugName: "sendButtonIcon" }] : /* istanbul ignore next */ []));
|
|
660
764
|
/**
|
|
661
765
|
* Interrupt button label
|
|
662
766
|
*
|
|
663
767
|
* @defaultValue
|
|
664
768
|
* ```
|
|
665
|
-
* t(() => $localize`:@@SI_CHAT_INPUT.INTERRUPT:
|
|
769
|
+
* t(() => $localize`:@@SI_CHAT_INPUT.INTERRUPT:Stop processing`)
|
|
666
770
|
* ```
|
|
667
771
|
*/
|
|
668
|
-
interruptButtonLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.INTERRUPT:
|
|
772
|
+
interruptButtonLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.INTERRUPT:Stop processing`), /* @ts-ignore */
|
|
773
|
+
...(ngDevMode ? [{ debugName: "interruptButtonLabel" }] : /* istanbul ignore next */ []));
|
|
669
774
|
/**
|
|
670
775
|
* Auto-focus the input on component initialization
|
|
671
776
|
* @defaultValue false
|
|
672
777
|
*/
|
|
673
|
-
autoFocus = input(false, { ...(ngDevMode ? { debugName: "autoFocus" } : {}), transform: booleanAttribute });
|
|
778
|
+
autoFocus = input(false, { ...(ngDevMode ? { debugName: "autoFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
674
779
|
/**
|
|
675
780
|
* Attach file button aria label
|
|
676
781
|
*
|
|
@@ -679,25 +784,42 @@ class SiChatInputComponent {
|
|
|
679
784
|
* t(() => $localize`:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file`)
|
|
680
785
|
* ```
|
|
681
786
|
*/
|
|
682
|
-
attachFileLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file`),
|
|
787
|
+
attachFileLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file`), /* @ts-ignore */
|
|
788
|
+
...(ngDevMode ? [{ debugName: "attachFileLabel" }] : /* istanbul ignore next */ []));
|
|
683
789
|
/**
|
|
684
|
-
* Remove attachment aria label
|
|
790
|
+
* Remove attachment aria label.
|
|
791
|
+
* The attachment name is available with `{{attachment}}`.
|
|
685
792
|
*
|
|
686
793
|
* @defaultValue
|
|
687
794
|
* ```
|
|
688
|
-
* t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`)
|
|
795
|
+
* t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove {{attachment}}`)
|
|
689
796
|
* ```
|
|
690
797
|
*/
|
|
691
|
-
removeAttachmentLabel = input(t(() => $localize `:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`),
|
|
798
|
+
removeAttachmentLabel = input(t(() => $localize `:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove {{attachment}}`), /* @ts-ignore */
|
|
799
|
+
...(ngDevMode ? [{ debugName: "removeAttachmentLabel" }] : /* istanbul ignore next */ []));
|
|
692
800
|
/**
|
|
693
801
|
* More actions button aria label
|
|
694
802
|
*
|
|
695
803
|
* @defaultValue
|
|
696
804
|
* ```
|
|
697
|
-
* t(() => $localize`:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:
|
|
805
|
+
* t(() => $localize`:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:Additional actions`)
|
|
698
806
|
* ```
|
|
699
807
|
*/
|
|
700
|
-
secondaryActionsLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:
|
|
808
|
+
secondaryActionsLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:Additional actions`), /* @ts-ignore */
|
|
809
|
+
...(ngDevMode ? [{ debugName: "secondaryActionsLabel" }] : /* istanbul ignore next */ []));
|
|
810
|
+
/**
|
|
811
|
+
* Suggested follow-up prompts to display as pill buttons above the chat input.
|
|
812
|
+
* Use `followUpPromptSelected` to handle selection and update the input value.
|
|
813
|
+
* Typically populated from AI response data and cleared after selection or on send.
|
|
814
|
+
* @defaultValue []
|
|
815
|
+
*/
|
|
816
|
+
followUpPrompts = input([], /* @ts-ignore */
|
|
817
|
+
...(ngDevMode ? [{ debugName: "followUpPrompts" }] : /* istanbul ignore next */ []));
|
|
818
|
+
/**
|
|
819
|
+
* Emitted when the user selects a follow-up prompt.
|
|
820
|
+
* The emitted value is the text of the selected prompt.
|
|
821
|
+
*/
|
|
822
|
+
followUpPromptSelected = output();
|
|
701
823
|
/**
|
|
702
824
|
* Emitted when the user wants to send a message
|
|
703
825
|
*/
|
|
@@ -711,11 +833,15 @@ class SiChatInputComponent {
|
|
|
711
833
|
*/
|
|
712
834
|
fileError = output();
|
|
713
835
|
id = `__si-chat-input-${SiChatInputComponent.idCounter++}`;
|
|
714
|
-
hasContent = computed(() => this.value().trim().length > 0,
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
836
|
+
hasContent = computed(() => this.value().trim().length > 0, /* @ts-ignore */
|
|
837
|
+
...(ngDevMode ? [{ debugName: "hasContent" }] : /* istanbul ignore next */ []));
|
|
838
|
+
hasAttachments = computed(() => this.attachments().length > 0, /* @ts-ignore */
|
|
839
|
+
...(ngDevMode ? [{ debugName: "hasAttachments" }] : /* istanbul ignore next */ []));
|
|
840
|
+
hasActions = computed(() => this.actions().length > 0, /* @ts-ignore */
|
|
841
|
+
...(ngDevMode ? [{ debugName: "hasActions" }] : /* istanbul ignore next */ []));
|
|
842
|
+
hasSecondaryActions = computed(() => this.secondaryActions().length > 0, /* @ts-ignore */
|
|
843
|
+
...(ngDevMode ? [{ debugName: "hasSecondaryActions" }] : /* istanbul ignore next */ []));
|
|
844
|
+
combinedMenuActions = computed(() => [
|
|
719
845
|
...(this.allowAttachments()
|
|
720
846
|
? [
|
|
721
847
|
{
|
|
@@ -727,33 +853,45 @@ class SiChatInputComponent {
|
|
|
727
853
|
}
|
|
728
854
|
]
|
|
729
855
|
: []),
|
|
730
|
-
...this.actions().map((a) => ({
|
|
731
|
-
type: 'action',
|
|
732
|
-
label: a.label,
|
|
733
|
-
icon: a.icon,
|
|
734
|
-
disabled: a.disabled,
|
|
735
|
-
action: (param) => a.action(param, a)
|
|
736
|
-
})),
|
|
737
856
|
...this.secondaryActions()
|
|
738
|
-
],
|
|
739
|
-
|
|
857
|
+
], /* @ts-ignore */
|
|
858
|
+
...(ngDevMode ? [{ debugName: "combinedMenuActions" }] : /* istanbul ignore next */ []));
|
|
859
|
+
hasMenuActions = computed(() => this.hasSecondaryActions(), /* @ts-ignore */
|
|
860
|
+
...(ngDevMode ? [{ debugName: "hasMenuActions" }] : /* istanbul ignore next */ []));
|
|
740
861
|
triggerFileInput() {
|
|
741
862
|
this.fileInput()?.nativeElement.click();
|
|
742
863
|
}
|
|
743
|
-
canSend = computed(() => (this.hasContent() || this.hasAttachments()) && !this.disabled() && !this.sending(),
|
|
744
|
-
|
|
864
|
+
canSend = computed(() => (this.hasContent() || this.hasAttachments()) && !this.disabled() && !this.sending(), /* @ts-ignore */
|
|
865
|
+
...(ngDevMode ? [{ debugName: "canSend" }] : /* istanbul ignore next */ []));
|
|
866
|
+
showInterruptButton = computed(() => this.interruptible(), /* @ts-ignore */
|
|
867
|
+
...(ngDevMode ? [{ debugName: "showInterruptButton" }] : /* istanbul ignore next */ []));
|
|
745
868
|
buttonDisabled = computed(() => {
|
|
746
869
|
if (this.showInterruptButton()) {
|
|
747
870
|
return this.disabled() || this.sending();
|
|
748
871
|
}
|
|
749
872
|
return !this.canSend();
|
|
750
|
-
},
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
873
|
+
}, /* @ts-ignore */
|
|
874
|
+
...(ngDevMode ? [{ debugName: "buttonDisabled" }] : /* istanbul ignore next */ []));
|
|
875
|
+
buttonIcon = computed(() => this.showInterruptButton() ? this.icons.elementStopFilled : this.sendButtonIcon(), /* @ts-ignore */
|
|
876
|
+
...(ngDevMode ? [{ debugName: "buttonIcon" }] : /* istanbul ignore next */ []));
|
|
877
|
+
buttonLabel = computed(() => this.showInterruptButton() ? this.interruptButtonLabel() : this.sendButtonLabel(), /* @ts-ignore */
|
|
878
|
+
...(ngDevMode ? [{ debugName: "buttonLabel" }] : /* istanbul ignore next */ []));
|
|
879
|
+
dragOver = signal(false, /* @ts-ignore */
|
|
880
|
+
...(ngDevMode ? [{ debugName: "dragOver" }] : /* istanbul ignore next */ []));
|
|
881
|
+
injector = inject(Injector);
|
|
754
882
|
onInputChange(value) {
|
|
755
883
|
this.value.set(value);
|
|
756
884
|
}
|
|
885
|
+
selectFollowUpPrompt(prompt) {
|
|
886
|
+
this.followUpPromptSelected.emit(prompt);
|
|
887
|
+
this.focus();
|
|
888
|
+
afterNextRender(() => {
|
|
889
|
+
const textarea = this.textInput();
|
|
890
|
+
if (textarea?.nativeElement) {
|
|
891
|
+
this.setTextareaHeight(textarea.nativeElement);
|
|
892
|
+
}
|
|
893
|
+
}, { injector: this.injector });
|
|
894
|
+
}
|
|
757
895
|
onSend() {
|
|
758
896
|
if (this.canSend()) {
|
|
759
897
|
this.send.emit({
|
|
@@ -878,10 +1016,10 @@ class SiChatInputComponent {
|
|
|
878
1016
|
const finalHeight = Math.max(Math.min(scrollHeight, maxHeight), minHeight);
|
|
879
1017
|
textarea.style.height = finalHeight + 'px';
|
|
880
1018
|
}
|
|
881
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
882
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiChatInputComponent, isStandalone: true, selector: "si-chat-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, sending: { classPropertyName: "sending", publicName: "sending", isSignal: true, isRequired: false, transformFunction: null }, interruptible: { classPropertyName: "interruptible", publicName: "interruptible", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, disclaimer: { classPropertyName: "disclaimer", publicName: "disclaimer", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, allowAttachments: { classPropertyName: "allowAttachments", publicName: "allowAttachments", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, sendButtonLabel: { classPropertyName: "sendButtonLabel", publicName: "sendButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, sendButtonIcon: { classPropertyName: "sendButtonIcon", publicName: "sendButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, interruptButtonLabel: { classPropertyName: "interruptButtonLabel", publicName: "interruptButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, attachFileLabel: { classPropertyName: "attachFileLabel", publicName: "attachFileLabel", isSignal: true, isRequired: false, transformFunction: null }, removeAttachmentLabel: { classPropertyName: "removeAttachmentLabel", publicName: "removeAttachmentLabel", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", attachments: "attachmentsChange", send: "send", interrupt: "interrupt", fileError: "fileError" }, viewQueries: [{ propertyName: "textInput", first: true, predicate: ["textInput"], descendants: true, isSignal: true }, { propertyName: "fileUploadDirective", first: true, predicate: SiFileUploadDirective, descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"input-wrapper border rounded-3\"\n [class.drag-over]=\"dragOver()\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver.set(false)\"\n>\n @if (hasAttachments()) {\n <si-attachment-list\n [attachments]=\"attachments()\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n }\n\n <div class=\"si-body-2\">\n <label class=\"form-label d-none\" [for]=\"id\">{{ label() | translate }}</label>\n <textarea\n #textInput\n class=\"chat-textarea w-100 border-0\"\n rows=\"1\"\n [id]=\"id\"\n [placeholder]=\"placeholder() | translate\"\n [disabled]=\"disabled()\"\n [maxlength]=\"maxLength() || null\"\n [(ngModel)]=\"value\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"adjustTextareaHeight($event)\"\n ></textarea>\n </div>\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <div class=\"btn-group\" role=\"group\">\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n siFileUpload\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n [multiple]=\"true\"\n (validFiles)=\"onFilesAdded($event)\"\n (fileError)=\"onFileError($event)\"\n />\n\n @if (hasMenuActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"allActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n\n <ng-template #allActionsMenu>\n <si-menu-factory [items]=\"allMenuActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n <ng-content />\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"buttonDisabled()\"\n [attr.aria-label]=\"buttonLabel() | translate\"\n (click)=\"onButtonClick()\"\n >\n <si-icon class=\"text-primary\" [icon]=\"buttonIcon()\" />\n </button>\n </div>\n</div>\n\n<div class=\"disclaimer-wrapper text-center mt-4 px-3\">\n @if (disclaimer()) {\n <span class=\"si-caption text-secondary d-block\">{{ disclaimer() | translate }}</span>\n }\n <ng-content select=\"[siChatInputDisclaimer]\" />\n</div>\n", styles: [":host{max-inline-size:720px}.input-wrapper{border-color:var(--element-ui-4);background-color:var(--element-base-1);padding-block:12px 8px;padding-inline:12px;display:flex;flex-direction:column;gap:12px}.input-wrapper:hover,.input-wrapper:active,.input-wrapper:focus-within{background-color:var(--element-base-input-experimental);border-color:var(--element-ui-1)}.input-wrapper.drag-over{border:1px solid var(--element-focus-default);box-shadow:0 0 0 1px var(--element-focus-default)}.chat-textarea{min-block-size:1lh;font-family:inherit;padding-block:0;display:block;outline:none;resize:none;background-color:transparent}.chat-textarea::placeholder{color:var(--element-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--element-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--element-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}.disclaimer-wrapper:empty{display:none}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiAttachmentListComponent, selector: "si-attachment-list", inputs: ["attachments", "alignment", "removable", "removeLabel"], outputs: ["remove"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiFileUploadDirective, selector: "input[type=\"file\"][siFileUpload]", inputs: ["errorTextFileType", "errorTextFileMaxSize", "accept", "maxFileSize", "multiple", "directoryUpload"], outputs: ["validFiles", "filesAdded", "fileError"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1019
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1020
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiChatInputComponent, isStandalone: true, selector: "si-chat-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, sending: { classPropertyName: "sending", publicName: "sending", isSignal: true, isRequired: false, transformFunction: null }, interruptible: { classPropertyName: "interruptible", publicName: "interruptible", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, disclaimer: { classPropertyName: "disclaimer", publicName: "disclaimer", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, allowAttachments: { classPropertyName: "allowAttachments", publicName: "allowAttachments", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, sendButtonLabel: { classPropertyName: "sendButtonLabel", publicName: "sendButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, sendButtonIcon: { classPropertyName: "sendButtonIcon", publicName: "sendButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, interruptButtonLabel: { classPropertyName: "interruptButtonLabel", publicName: "interruptButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, attachFileLabel: { classPropertyName: "attachFileLabel", publicName: "attachFileLabel", isSignal: true, isRequired: false, transformFunction: null }, removeAttachmentLabel: { classPropertyName: "removeAttachmentLabel", publicName: "removeAttachmentLabel", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null }, followUpPrompts: { classPropertyName: "followUpPrompts", publicName: "followUpPrompts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", attachments: "attachmentsChange", followUpPromptSelected: "followUpPromptSelected", send: "send", interrupt: "interrupt", fileError: "fileError" }, viewQueries: [{ propertyName: "textInput", first: true, predicate: ["textInput"], descendants: true, isSignal: true }, { propertyName: "fileUploadDirective", first: true, predicate: SiFileUploadDirective, descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (followUpPrompts().length) {\n <div class=\"follow-up-prompts d-flex flex-wrap gap-4 mb-4\">\n @for (prompt of followUpPrompts(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-secondary-ghost fw-normal\"\n [disabled]=\"disabled() || sending()\"\n (click)=\"selectFollowUpPrompt(prompt)\"\n >{{ prompt }}</button\n >\n }\n </div>\n}\n\n<div\n class=\"input-wrapper border rounded-3\"\n [class.drag-over]=\"dragOver()\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver.set(false)\"\n>\n @if (hasAttachments()) {\n <si-attachment-list\n [attachments]=\"attachments()\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n }\n\n <div class=\"si-body-paragraph\">\n <label class=\"form-label d-none\" [for]=\"id\">{{ label() | translate }}</label>\n <textarea\n #textInput\n class=\"chat-textarea w-100 border-0\"\n rows=\"1\"\n [id]=\"id\"\n [placeholder]=\"placeholder() | translate\"\n [disabled]=\"disabled()\"\n [maxlength]=\"maxLength() || null\"\n [(ngModel)]=\"value\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"adjustTextareaHeight($event)\"\n ></textarea>\n </div>\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <div class=\"d-flex align-items-center gap-0\">\n <div class=\"btn-group\" role=\"group\">\n @if (allowAttachments()) {\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n siFileUpload\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n [multiple]=\"true\"\n (validFiles)=\"onFilesAdded($event)\"\n (fileError)=\"onFileError($event)\"\n />\n }\n\n @if (allowAttachments() && !hasSecondaryActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"disabled()\"\n [siTooltip]=\"attachFileLabel() | translate\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n (click)=\"triggerFileInput()\"\n >\n <si-icon [icon]=\"icons.elementAttachment\" />\n </button>\n }\n\n @if (hasMenuActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"allActionsMenu\"\n [siTooltip]=\"secondaryActionsLabel() | translate\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n\n <ng-template #allActionsMenu>\n <si-menu-factory [items]=\"combinedMenuActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n @if (hasActions()) {\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [siTooltip]=\"action.label | translate\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n }\n </div>\n <div class=\"d-flex align-items-center gap-0\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"buttonDisabled()\"\n [attr.aria-label]=\"buttonLabel() | translate\"\n (click)=\"onButtonClick()\"\n >\n <si-icon class=\"text-accent\" [icon]=\"buttonIcon()\" />\n </button>\n </div>\n</div>\n\n<div class=\"disclaimer-wrapper text-center mt-4 px-3\">\n @if (disclaimer()) {\n <span class=\"si-body-sm text-secondary d-block\">{{ disclaimer() | translate }}</span>\n }\n <ng-content select=\"[siChatInputDisclaimer]\" />\n</div>\n", styles: [":host{max-inline-size:720px}.input-wrapper{border-color:var(--si-sys-border-4);background-color:var(--si-sys-background-1);padding-block:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-y-40);padding-inline:var(--si-sys-sizing-spacing-x-50);display:flex;flex-direction:column;gap:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-x-50)}.input-wrapper:hover,.input-wrapper:active,.input-wrapper:focus-within{background-color:var(--si-sys-background-4);border-color:var(--si-sys-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-effects-focus);box-shadow:0 0 0 1px var(--si-sys-effects-focus)}.chat-textarea{min-block-size:1lh;font-family:inherit;padding-block:0;display:block;outline:none;resize:none;background-color:transparent}.chat-textarea::placeholder{color:var(--si-sys-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--element-button-focus-width) solid var(--si-sys-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.disclaimer-wrapper:empty{display:none}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiAttachmentListComponent, selector: "si-attachment-list", inputs: ["attachments", "alignment", "removable", "removeLabel"], outputs: ["remove"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiFileUploadDirective, selector: "input[type=\"file\"][siFileUpload]", inputs: ["errorTextFileType", "errorTextFileMaxSize", "accept", "maxFileSize", "multiple", "directoryUpload"], outputs: ["validFiles", "filesAdded", "fileError"] }, { kind: "directive", type: SiTooltipDirective, selector: "[siTooltip]", inputs: ["siTooltip", "placement", "isDisabled", "tooltipScrollStrategy", "tooltipContext"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
883
1021
|
}
|
|
884
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1022
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatInputComponent, decorators: [{
|
|
885
1023
|
type: Component,
|
|
886
1024
|
args: [{ selector: 'si-chat-input', imports: [
|
|
887
1025
|
CdkMenuTrigger,
|
|
@@ -890,9 +1028,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
890
1028
|
SiTranslatePipe,
|
|
891
1029
|
SiAttachmentListComponent,
|
|
892
1030
|
SiMenuFactoryComponent,
|
|
893
|
-
SiFileUploadDirective
|
|
894
|
-
|
|
895
|
-
|
|
1031
|
+
SiFileUploadDirective,
|
|
1032
|
+
SiTooltipDirective
|
|
1033
|
+
], template: "@if (followUpPrompts().length) {\n <div class=\"follow-up-prompts d-flex flex-wrap gap-4 mb-4\">\n @for (prompt of followUpPrompts(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-secondary-ghost fw-normal\"\n [disabled]=\"disabled() || sending()\"\n (click)=\"selectFollowUpPrompt(prompt)\"\n >{{ prompt }}</button\n >\n }\n </div>\n}\n\n<div\n class=\"input-wrapper border rounded-3\"\n [class.drag-over]=\"dragOver()\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver.set(false)\"\n>\n @if (hasAttachments()) {\n <si-attachment-list\n [attachments]=\"attachments()\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n }\n\n <div class=\"si-body-paragraph\">\n <label class=\"form-label d-none\" [for]=\"id\">{{ label() | translate }}</label>\n <textarea\n #textInput\n class=\"chat-textarea w-100 border-0\"\n rows=\"1\"\n [id]=\"id\"\n [placeholder]=\"placeholder() | translate\"\n [disabled]=\"disabled()\"\n [maxlength]=\"maxLength() || null\"\n [(ngModel)]=\"value\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"adjustTextareaHeight($event)\"\n ></textarea>\n </div>\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <div class=\"d-flex align-items-center gap-0\">\n <div class=\"btn-group\" role=\"group\">\n @if (allowAttachments()) {\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n siFileUpload\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n [multiple]=\"true\"\n (validFiles)=\"onFilesAdded($event)\"\n (fileError)=\"onFileError($event)\"\n />\n }\n\n @if (allowAttachments() && !hasSecondaryActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"disabled()\"\n [siTooltip]=\"attachFileLabel() | translate\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n (click)=\"triggerFileInput()\"\n >\n <si-icon [icon]=\"icons.elementAttachment\" />\n </button>\n }\n\n @if (hasMenuActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"allActionsMenu\"\n [siTooltip]=\"secondaryActionsLabel() | translate\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n\n <ng-template #allActionsMenu>\n <si-menu-factory [items]=\"combinedMenuActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n @if (hasActions()) {\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [siTooltip]=\"action.label | translate\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n }\n </div>\n <div class=\"d-flex align-items-center gap-0\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"buttonDisabled()\"\n [attr.aria-label]=\"buttonLabel() | translate\"\n (click)=\"onButtonClick()\"\n >\n <si-icon class=\"text-accent\" [icon]=\"buttonIcon()\" />\n </button>\n </div>\n</div>\n\n<div class=\"disclaimer-wrapper text-center mt-4 px-3\">\n @if (disclaimer()) {\n <span class=\"si-body-sm text-secondary d-block\">{{ disclaimer() | translate }}</span>\n }\n <ng-content select=\"[siChatInputDisclaimer]\" />\n</div>\n", styles: [":host{max-inline-size:720px}.input-wrapper{border-color:var(--si-sys-border-4);background-color:var(--si-sys-background-1);padding-block:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-y-40);padding-inline:var(--si-sys-sizing-spacing-x-50);display:flex;flex-direction:column;gap:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-x-50)}.input-wrapper:hover,.input-wrapper:active,.input-wrapper:focus-within{background-color:var(--si-sys-background-4);border-color:var(--si-sys-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-effects-focus);box-shadow:0 0 0 1px var(--si-sys-effects-focus)}.chat-textarea{min-block-size:1lh;font-family:inherit;padding-block:0;display:block;outline:none;resize:none;background-color:transparent}.chat-textarea::placeholder{color:var(--si-sys-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--element-button-focus-width) solid var(--si-sys-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.disclaimer-wrapper:empty{display:none}\n"] }]
|
|
1034
|
+
}], propDecorators: { textInput: [{ type: i0.ViewChild, args: ['textInput', { isSignal: true }] }], fileUploadDirective: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiFileUploadDirective), { isSignal: true }] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], sending: [{ type: i0.Input, args: [{ isSignal: true, alias: "sending", required: false }] }], interruptible: [{ type: i0.Input, args: [{ isSignal: true, alias: "interruptible", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], disclaimer: [{ type: i0.Input, args: [{ isSignal: true, alias: "disclaimer", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], allowAttachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowAttachments", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], attachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachments", required: false }] }, { type: i0.Output, args: ["attachmentsChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], actionParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionParam", required: false }] }], sendButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendButtonLabel", required: false }] }], sendButtonIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendButtonIcon", required: false }] }], interruptButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "interruptButtonLabel", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], attachFileLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachFileLabel", required: false }] }], removeAttachmentLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeAttachmentLabel", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }], followUpPrompts: [{ type: i0.Input, args: [{ isSignal: true, alias: "followUpPrompts", required: false }] }], followUpPromptSelected: [{ type: i0.Output, args: ["followUpPromptSelected"] }], send: [{ type: i0.Output, args: ["send"] }], interrupt: [{ type: i0.Output, args: ["interrupt"] }], fileError: [{ type: i0.Output, args: ["fileError"] }] } });
|
|
896
1035
|
|
|
897
1036
|
/**
|
|
898
1037
|
* Copyright (c) Siemens 2016 - 2026
|
|
@@ -916,10 +1055,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
916
1055
|
* @experimental
|
|
917
1056
|
*/
|
|
918
1057
|
class SiChatInputDisclaimerDirective {
|
|
919
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
920
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1058
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatInputDisclaimerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1059
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SiChatInputDisclaimerDirective, isStandalone: true, selector: "[siChatInputDisclaimer]", ngImport: i0 });
|
|
921
1060
|
}
|
|
922
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1061
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatInputDisclaimerDirective, decorators: [{
|
|
923
1062
|
type: Directive,
|
|
924
1063
|
args: [{
|
|
925
1064
|
selector: '[siChatInputDisclaimer]'
|
|
@@ -935,100 +1074,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
935
1074
|
*
|
|
936
1075
|
* The user message component renders user-submitted content in (AI) chat interfaces,
|
|
937
1076
|
* supporting text, attachments, and contextual actions. It appears as a text bubble
|
|
938
|
-
* aligned to the right side
|
|
1077
|
+
* aligned to the right side.
|
|
939
1078
|
* Can be used within {@link SiChatContainerComponent}.
|
|
940
1079
|
*
|
|
941
1080
|
* The component automatically handles:
|
|
942
1081
|
* - Styling for user messages distinct from AI or generic chat messages
|
|
943
|
-
* - Option to render markdown content, provide via `contentFormatter` input with a markdown renderer function (e.g., from {@link getMarkdownRenderer})
|
|
944
1082
|
* - Displaying attachments above the message bubble
|
|
945
1083
|
* - Displaying primary and secondary actions
|
|
946
1084
|
*
|
|
947
1085
|
* @see {@link SiChatMessageComponent} for the base message wrapper component
|
|
948
1086
|
* @see {@link SiAiMessageComponent} for the AI message component
|
|
949
1087
|
* @see {@link SiAttachmentListComponent} for the base attachment component
|
|
950
|
-
* @see {@link getMarkdownRenderer} for markdown formatting support
|
|
951
1088
|
* @see {@link SiChatContainerComponent} for the chat container to use this within
|
|
952
1089
|
*
|
|
953
1090
|
* @experimental
|
|
954
1091
|
*/
|
|
955
1092
|
class SiUserMessageComponent {
|
|
956
|
-
formattedContent = viewChild('formattedContent', ...(ngDevMode ? [{ debugName: "formattedContent" }] : []));
|
|
957
1093
|
icons = addIcons({ elementOptionsVertical });
|
|
958
1094
|
/**
|
|
959
1095
|
* The user message content
|
|
960
1096
|
* @defaultValue ''
|
|
961
1097
|
*/
|
|
962
|
-
content = input('',
|
|
963
|
-
|
|
964
|
-
* Optional formatter function to transform content before display.
|
|
965
|
-
* - Returns string: Content will be inserted as text with built-in sanitization
|
|
966
|
-
* - Returns Node: DOM node will be inserted directly without sanitization
|
|
967
|
-
*
|
|
968
|
-
* **Note:** When returning a Node with formatted content, apply the `markdown-content` class
|
|
969
|
-
* to the root element to ensure proper styling (e.g., `div.className = 'markdown-content'`).
|
|
970
|
-
* The function returned by {@link getMarkdownRenderer} does this automatically.
|
|
971
|
-
*
|
|
972
|
-
* **Warning:** When returning a Node, ensure the content is safe to prevent XSS attacks
|
|
973
|
-
* @defaultValue undefined
|
|
974
|
-
*/
|
|
975
|
-
contentFormatter = input(undefined, ...(ngDevMode ? [{ debugName: "contentFormatter" }] : []));
|
|
1098
|
+
content = input('', /* @ts-ignore */
|
|
1099
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
976
1100
|
/**
|
|
977
1101
|
* Primary message actions (edit, delete, copy, etc.).
|
|
978
1102
|
* All actions displayed inline
|
|
979
1103
|
* @defaultValue []
|
|
980
1104
|
*/
|
|
981
|
-
actions = input([],
|
|
1105
|
+
actions = input([], /* @ts-ignore */
|
|
1106
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
982
1107
|
/**
|
|
983
1108
|
* Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally
|
|
984
1109
|
* @defaultValue []
|
|
985
1110
|
*/
|
|
986
|
-
secondaryActions = input([],
|
|
1111
|
+
secondaryActions = input([], /* @ts-ignore */
|
|
1112
|
+
...(ngDevMode ? [{ debugName: "secondaryActions" }] : /* istanbul ignore next */ []));
|
|
987
1113
|
/**
|
|
988
1114
|
* List of attachments included with this message
|
|
989
1115
|
* @defaultValue []
|
|
990
1116
|
*/
|
|
991
|
-
attachments = input([],
|
|
1117
|
+
attachments = input([], /* @ts-ignore */
|
|
1118
|
+
...(ngDevMode ? [{ debugName: "attachments" }] : /* istanbul ignore next */ []));
|
|
992
1119
|
/** Parameter to pass to action handlers */
|
|
993
|
-
actionParam = input(
|
|
1120
|
+
actionParam = input(/* @ts-ignore */
|
|
1121
|
+
...(ngDevMode ? [undefined, { debugName: "actionParam" }] : /* istanbul ignore next */ []));
|
|
994
1122
|
/**
|
|
995
1123
|
* More actions button aria label
|
|
996
1124
|
*
|
|
997
1125
|
* @defaultValue
|
|
998
1126
|
* ```
|
|
999
|
-
* t(() => $localize`:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:
|
|
1127
|
+
* t(() => $localize`:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:Additional actions`)
|
|
1000
1128
|
* ```
|
|
1001
1129
|
*/
|
|
1002
|
-
secondaryActionsLabel = input(t(() => $localize `:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
const contentValue = this.content();
|
|
1009
|
-
const container = this.formattedContent()?.nativeElement;
|
|
1010
|
-
if (container && contentValue) {
|
|
1011
|
-
if (formatter) {
|
|
1012
|
-
const formatted = formatter(contentValue);
|
|
1013
|
-
if (typeof formatted === 'string') {
|
|
1014
|
-
this.textContent.set(formatted);
|
|
1015
|
-
}
|
|
1016
|
-
else if (formatted instanceof Node) {
|
|
1017
|
-
this.textContent.set(undefined);
|
|
1018
|
-
container.innerHTML = '';
|
|
1019
|
-
container.appendChild(formatted);
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
else {
|
|
1023
|
-
this.textContent.set(contentValue);
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiUserMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1029
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiUserMessageComponent, isStandalone: true, selector: "si-user-message", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, contentFormatter: { classPropertyName: "contentFormatter", publicName: "contentFormatter", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "formattedContent", first: true, predicate: ["formattedContent"], descendants: true, isSignal: true }], ngImport: i0, template: "<si-chat-message alignment=\"end\" actionsPosition=\"bottom\" [loading]=\"false\">\n @if (hasAttachments()) {\n <si-attachment-list alignment=\"end\" [attachments]=\"attachments()\" [removable]=\"false\" />\n }\n\n @if (content()) {\n @let content = textContent();\n @if (content) {\n <span class=\"text-pre-wrap\">{{ content }}</span>\n } @else {\n <div #formattedContent> </div>\n }\n }\n @if (actions().length > 0 || secondaryActions().length > 0) {\n <div class=\"btn-group user-message-actions\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}:host:not(:has([siChatMessageAction])) si-chat-message{padding-block-end:36px!important}.user-message-actions{opacity:0;transition:opacity .2s ease}si-chat-message{--chat-message-bubble-bg: var(--element-base-4);max-inline-size:600px;margin-inline-start:auto}:host:hover .user-message-actions,.user-message-actions:hover,.user-message-actions:has(::ng-deep [aria-expanded=true]),:host-context(.si-container-xs,.si-container-sm) .user-message-actions:active{opacity:1}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "component", type: SiAttachmentListComponent, selector: "si-attachment-list", inputs: ["attachments", "alignment", "removable", "removeLabel"], outputs: ["remove"] }, { kind: "component", type: SiChatMessageComponent, selector: "si-chat-message", inputs: ["loading", "alignment", "actionsPosition"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiChatMessageActionDirective, selector: "[siChatMessageAction]" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1130
|
+
secondaryActionsLabel = input(t(() => $localize `:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:Additional actions`), /* @ts-ignore */
|
|
1131
|
+
...(ngDevMode ? [{ debugName: "secondaryActionsLabel" }] : /* istanbul ignore next */ []));
|
|
1132
|
+
hasAttachments = computed(() => this.attachments()?.length > 0, /* @ts-ignore */
|
|
1133
|
+
...(ngDevMode ? [{ debugName: "hasAttachments" }] : /* istanbul ignore next */ []));
|
|
1134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiUserMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1135
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiUserMessageComponent, isStandalone: true, selector: "si-user-message", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<si-chat-message alignment=\"end\" actionsPosition=\"bottom\" [loading]=\"false\">\n @if (hasAttachments()) {\n <si-attachment-list alignment=\"end\" [attachments]=\"attachments()\" [removable]=\"false\" />\n }\n\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n @if (actions().length > 0 || secondaryActions().length > 0) {\n <div class=\"btn-group user-message-actions\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}:host:not(:has([siChatMessageAction])) si-chat-message{padding-block-end:calc(32px + var(--si-sys-sizing-spacing-y-20))!important}.user-message-actions{opacity:0;transition:opacity .2s ease}si-chat-message{--chat-message-bubble-bg: var(--si-sys-background-2);max-inline-size:600px;margin-inline-start:auto}:host:hover .user-message-actions,.user-message-actions:hover,.user-message-actions:has(::ng-deep [aria-expanded=true]),:host-context(.si-container-xs,.si-container-sm) .user-message-actions:active{opacity:1}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "component", type: SiAttachmentListComponent, selector: "si-attachment-list", inputs: ["attachments", "alignment", "removable", "removeLabel"], outputs: ["remove"] }, { kind: "component", type: SiChatMessageComponent, selector: "si-chat-message", inputs: ["loading", "alignment", "actionsPosition"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiChatMessageActionDirective, selector: "[siChatMessageAction]" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
1030
1136
|
}
|
|
1031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiUserMessageComponent, decorators: [{
|
|
1032
1138
|
type: Component,
|
|
1033
1139
|
args: [{ selector: 'si-user-message', imports: [
|
|
1034
1140
|
CdkMenuTrigger,
|
|
@@ -1038,8 +1144,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1038
1144
|
SiMenuFactoryComponent,
|
|
1039
1145
|
SiChatMessageActionDirective,
|
|
1040
1146
|
SiTranslatePipe
|
|
1041
|
-
],
|
|
1042
|
-
}],
|
|
1147
|
+
], template: "<si-chat-message alignment=\"end\" actionsPosition=\"bottom\" [loading]=\"false\">\n @if (hasAttachments()) {\n <si-attachment-list alignment=\"end\" [attachments]=\"attachments()\" [removable]=\"false\" />\n }\n\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n @if (actions().length > 0 || secondaryActions().length > 0) {\n <div class=\"btn-group user-message-actions\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}:host:not(:has([siChatMessageAction])) si-chat-message{padding-block-end:calc(32px + var(--si-sys-sizing-spacing-y-20))!important}.user-message-actions{opacity:0;transition:opacity .2s ease}si-chat-message{--chat-message-bubble-bg: var(--si-sys-background-2);max-inline-size:600px;margin-inline-start:auto}:host:hover .user-message-actions,.user-message-actions:hover,.user-message-actions:has(::ng-deep [aria-expanded=true]),:host-context(.si-container-xs,.si-container-sm) .user-message-actions:active{opacity:1}\n"] }]
|
|
1148
|
+
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], attachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachments", required: false }] }], actionParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionParam", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }] } });
|
|
1043
1149
|
|
|
1044
1150
|
/**
|
|
1045
1151
|
* Copyright (c) Siemens 2016 - 2026
|
|
@@ -1058,7 +1164,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1058
1164
|
* - Clickable prompt suggestion cards
|
|
1059
1165
|
* - Optional refresh button to regenerate suggestions
|
|
1060
1166
|
*
|
|
1061
|
-
* @see {@link SiAiChatContainerComponent} for the AI chat container which uses this component
|
|
1062
1167
|
* @see {@link SiChatContainerComponent} for the base chat container
|
|
1063
1168
|
*
|
|
1064
1169
|
* @experimental
|
|
@@ -1068,17 +1173,20 @@ class SiAiWelcomeScreenComponent {
|
|
|
1068
1173
|
* The list of prompt categories
|
|
1069
1174
|
* @defaultValue []
|
|
1070
1175
|
*/
|
|
1071
|
-
categories = input([],
|
|
1176
|
+
categories = input([], /* @ts-ignore */
|
|
1177
|
+
...(ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []));
|
|
1072
1178
|
/**
|
|
1073
1179
|
* The currently selected category ID
|
|
1074
1180
|
* @defaultValue undefined
|
|
1075
1181
|
*/
|
|
1076
|
-
selectedCategory = model(undefined,
|
|
1182
|
+
selectedCategory = model(undefined, /* @ts-ignore */
|
|
1183
|
+
...(ngDevMode ? [{ debugName: "selectedCategory" }] : /* istanbul ignore next */ []));
|
|
1077
1184
|
/**
|
|
1078
1185
|
* The list of prompt suggestions as an array, update this when the selected category changes.
|
|
1079
1186
|
* @defaultValue []
|
|
1080
1187
|
*/
|
|
1081
|
-
promptSuggestions = input([],
|
|
1188
|
+
promptSuggestions = input([], /* @ts-ignore */
|
|
1189
|
+
...(ngDevMode ? [{ debugName: "promptSuggestions" }] : /* istanbul ignore next */ []));
|
|
1082
1190
|
/**
|
|
1083
1191
|
* Emitted when a prompt suggestion is clicked
|
|
1084
1192
|
*/
|
|
@@ -1089,14 +1197,14 @@ class SiAiWelcomeScreenComponent {
|
|
|
1089
1197
|
onPromptClick(suggestion) {
|
|
1090
1198
|
this.promptSelected.emit(suggestion);
|
|
1091
1199
|
}
|
|
1092
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1093
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiWelcomeScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1201
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAiWelcomeScreenComponent, isStandalone: true, selector: "si-ai-welcome-screen", inputs: { categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, selectedCategory: { classPropertyName: "selectedCategory", publicName: "selectedCategory", isSignal: true, isRequired: false, transformFunction: null }, promptSuggestions: { classPropertyName: "promptSuggestions", publicName: "promptSuggestions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedCategory: "selectedCategoryChange", promptSelected: "promptSelected" }, host: { classAttribute: "d-block" }, ngImport: i0, template: "<div class=\"d-flex flex-column gap-13 align-items-center w-100\">\n <!-- Welcome Header -->\n <div class=\"welcome-header d-flex flex-column gap-4 w-100 pt-13 pb-8\">\n <ng-content />\n </div>\n\n <!-- Prompt Categories and Suggestions -->\n <div class=\"prompt-suggestions d-flex flex-column gap-6 align-items-center w-100\">\n @if (categories().length > 0) {\n <div class=\"d-flex gap-4 align-items-center w-100\">\n @for (category of categories(); track $index) {\n <si-summary-chip\n class=\"user-select-none\"\n [label]=\"category.label\"\n [selected]=\"selectedCategory() === category.label\"\n (selectedChange)=\"onCategoryClick(category.label)\"\n />\n }\n </div>\n }\n\n @if (promptSuggestions().length > 0) {\n <div class=\"d-flex flex-column gap-4 w-100\">\n @for (suggestion of promptSuggestions(); track $index) {\n <button si-action-card type=\"button\" class=\"w-100\" (click)=\"onPromptClick(suggestion)\">\n <div body class=\"card-body card-text\">\n {{ suggestion.text }}\n </div>\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".welcome-header{max-inline-size:720px;overflow-x:visible;position:relative}.welcome-header:before{position:absolute;content:\"\";inset-inline-start:-104px;inset-block-start:50%;transform:translateY(-50%);inline-size:168px;block-size:168px;background-image:var(--element-brand-ai-key-visual);background-size:contain;background-repeat:no-repeat;background-position:center}:host{container-type:inline-size}@container (max-width: 767.98px){:host .welcome-header:before{display:none}}.prompt-suggestions{max-inline-size:720px}.prompt-suggestions>div:first-child{flex-wrap:wrap}:host{inline-size:100%}::ng-deep button[si-action-card]{background-color:transparent;border-radius:var(--element-radius-2);border:1px solid var(--si-sys-border-4)}\n"], dependencies: [{ kind: "component", type: SiActionCardComponent, selector: "button[si-action-card]", inputs: ["selectable", "selected"], outputs: ["selectedChange"] }, { kind: "component", type: SiSummaryChipComponent, selector: "si-summary-chip", inputs: ["status", "icon", "color", "stackedIcon", "stackedColor", "label", "value", "selected", "disabled", "hideLabel"], outputs: ["selectedChange"] }] });
|
|
1094
1202
|
}
|
|
1095
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiWelcomeScreenComponent, decorators: [{
|
|
1096
1204
|
type: Component,
|
|
1097
|
-
args: [{ selector: 'si-ai-welcome-screen', imports: [SiActionCardComponent, SiSummaryChipComponent],
|
|
1205
|
+
args: [{ selector: 'si-ai-welcome-screen', imports: [SiActionCardComponent, SiSummaryChipComponent], host: {
|
|
1098
1206
|
class: 'd-block'
|
|
1099
|
-
}, template: "<div class=\"d-flex flex-column gap-
|
|
1207
|
+
}, template: "<div class=\"d-flex flex-column gap-13 align-items-center w-100\">\n <!-- Welcome Header -->\n <div class=\"welcome-header d-flex flex-column gap-4 w-100 pt-13 pb-8\">\n <ng-content />\n </div>\n\n <!-- Prompt Categories and Suggestions -->\n <div class=\"prompt-suggestions d-flex flex-column gap-6 align-items-center w-100\">\n @if (categories().length > 0) {\n <div class=\"d-flex gap-4 align-items-center w-100\">\n @for (category of categories(); track $index) {\n <si-summary-chip\n class=\"user-select-none\"\n [label]=\"category.label\"\n [selected]=\"selectedCategory() === category.label\"\n (selectedChange)=\"onCategoryClick(category.label)\"\n />\n }\n </div>\n }\n\n @if (promptSuggestions().length > 0) {\n <div class=\"d-flex flex-column gap-4 w-100\">\n @for (suggestion of promptSuggestions(); track $index) {\n <button si-action-card type=\"button\" class=\"w-100\" (click)=\"onPromptClick(suggestion)\">\n <div body class=\"card-body card-text\">\n {{ suggestion.text }}\n </div>\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".welcome-header{max-inline-size:720px;overflow-x:visible;position:relative}.welcome-header:before{position:absolute;content:\"\";inset-inline-start:-104px;inset-block-start:50%;transform:translateY(-50%);inline-size:168px;block-size:168px;background-image:var(--element-brand-ai-key-visual);background-size:contain;background-repeat:no-repeat;background-position:center}:host{container-type:inline-size}@container (max-width: 767.98px){:host .welcome-header:before{display:none}}.prompt-suggestions{max-inline-size:720px}.prompt-suggestions>div:first-child{flex-wrap:wrap}:host{inline-size:100%}::ng-deep button[si-action-card]{background-color:transparent;border-radius:var(--element-radius-2);border:1px solid var(--si-sys-border-4)}\n"] }]
|
|
1100
1208
|
}], propDecorators: { categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: false }] }], selectedCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCategory", required: false }] }, { type: i0.Output, args: ["selectedCategoryChange"] }], promptSuggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "promptSuggestions", required: false }] }], promptSelected: [{ type: i0.Output, args: ["promptSelected"] }] } });
|
|
1101
1209
|
|
|
1102
1210
|
/**
|
|
@@ -1108,5 +1216,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1108
1216
|
* Generated bundle index. Do not edit.
|
|
1109
1217
|
*/
|
|
1110
1218
|
|
|
1111
|
-
export { SiAiMessageComponent, SiAiWelcomeScreenComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
|
|
1219
|
+
export { SiActivityMessageComponent, SiActivityMessagePartComponent, SiActivityTraceComponent, SiAiMessageComponent, SiAiWelcomeScreenComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
|
|
1112
1220
|
//# sourceMappingURL=siemens-element-ng-chat-messages.mjs.map
|