@siemens/element-ng 48.10.0 → 49.0.0-rc.2
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/about/package.json +2 -1
- package/accordion/package.json +2 -1
- package/action-modal/package.json +2 -1
- package/ag-grid/package.json +2 -1
- package/application-header/package.json +2 -1
- package/auto-collapsable-list/package.json +2 -1
- package/autocomplete/package.json +2 -1
- package/avatar/package.json +2 -1
- package/badge/package.json +2 -1
- package/breadcrumb/package.json +2 -1
- package/breadcrumb-router/package.json +2 -1
- package/card/package.json +2 -1
- package/chat-messages/package.json +2 -1
- package/circle-status/package.json +2 -1
- package/color-picker/package.json +2 -1
- package/column-selection-dialog/package.json +2 -1
- package/common/package.json +2 -1
- package/connection-strength/package.json +2 -1
- package/content-action-bar/package.json +2 -1
- package/copyright-notice/package.json +2 -1
- package/dashboard/package.json +2 -1
- package/datatable/package.json +2 -1
- package/date-range-filter/package.json +2 -1
- package/datepicker/package.json +2 -1
- package/electron-titlebar/package.json +2 -1
- package/empty-state/package.json +2 -1
- package/fesm2022/siemens-element-ng-about.mjs +25 -24
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +49 -75
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +59 -55
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +33 -37
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +122 -150
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +30 -32
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +34 -48
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +23 -24
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +6 -6
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +16 -16
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +18 -17
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +32 -34
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +204 -109
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +26 -26
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +18 -17
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +36 -35
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +13 -38
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-connection-strength.mjs +11 -11
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +33 -30
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +13 -13
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +161 -169
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +9 -9
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +128 -149
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +260 -271
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +19 -18
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +11 -11
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +66 -69
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +23 -23
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +141 -159
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +10 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +99 -85
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly.mjs +96 -94
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +33 -33
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +7 -6
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon-status.mjs +4 -4
- package/fesm2022/siemens-element-ng-icon.mjs +53 -135
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +11 -12
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +15 -16
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +16 -16
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +71 -71
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +13 -13
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +22 -23
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +68 -86
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +38 -52
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -11
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +30 -30
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +5 -5
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +55 -54
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +10 -13
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +183 -298
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +43 -43
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +14 -13
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +32 -32
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +21 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +21 -21
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +19 -15
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +56 -50
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +48 -47
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +45 -44
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +31 -31
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +29 -29
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +15 -15
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +25 -61
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +13 -12
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +25 -24
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +204 -347
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +3 -3
- package/fesm2022/siemens-element-ng-shadow-root.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +144 -69
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +13 -13
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +30 -29
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +14 -13
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +26 -28
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +42 -43
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +11 -12
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +15 -16
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +16 -17
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +16 -16
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +7 -7
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +16 -16
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +44 -47
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +4 -4
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +51 -71
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +26 -52
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +60 -68
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +20 -20
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +92 -117
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +46 -62
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +49 -48
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/file-uploader/package.json +2 -1
- package/filter-bar/package.json +2 -1
- package/filtered-search/package.json +2 -1
- package/footer/package.json +2 -1
- package/form/package.json +2 -1
- package/formly/package.json +2 -1
- package/header-dropdown/package.json +2 -1
- package/help-button/package.json +2 -1
- package/icon/package.json +2 -1
- package/icon-status/package.json +2 -1
- package/info-page/package.json +2 -1
- package/inline-notification/package.json +2 -1
- package/ip-input/package.json +2 -1
- package/landing-page/package.json +2 -1
- package/language-switcher/package.json +2 -1
- package/link/package.json +2 -1
- package/list-details/package.json +2 -1
- package/loading-spinner/package.json +2 -1
- package/localization/package.json +2 -1
- package/main-detail-container/package.json +2 -1
- package/markdown-renderer/package.json +2 -1
- package/menu/package.json +2 -1
- package/modal/package.json +2 -1
- package/navbar/package.json +2 -1
- package/navbar-vertical/package.json +2 -1
- package/notification-item/package.json +2 -1
- package/number-input/package.json +2 -1
- package/package.json +115 -107
- package/pagination/package.json +2 -1
- package/password-strength/package.json +2 -1
- package/password-toggle/package.json +2 -1
- package/phone-number/package.json +2 -1
- package/photo-upload/package.json +2 -1
- package/pills-input/package.json +2 -1
- package/popover/package.json +2 -1
- package/popover-legacy/package.json +2 -1
- package/progressbar/package.json +2 -1
- package/resize-observer/package.json +2 -1
- package/result-details-list/package.json +2 -1
- package/schematics/collection.json +0 -12
- package/schematics/migration.json +15 -0
- package/schematics/migrations/data/attribute-selectors.js +1 -6
- package/schematics/migrations/data/component-names.js +9 -68
- package/schematics/migrations/data/element-selectors.js +9 -8
- package/schematics/migrations/data/index.js +0 -1
- package/schematics/migrations/data/migration-test-data.js +167 -0
- package/schematics/migrations/data/output-names.js +1 -7
- package/schematics/migrations/data/symbol-removals.js +4 -45
- package/schematics/migrations/element-migration/element-migration.js +1 -3
- package/schematics/migrations/index.js +15 -5
- package/schematics/migrations/ngx-translate/index.js +93 -0
- package/schematics/ng-update/index.js +17 -0
- package/schematics/ng-update/schema.json +15 -0
- package/schematics/simpl-siemens-migration/index.js +1 -5
- package/schematics/utils/ts-utils.js +135 -0
- package/search-bar/package.json +2 -1
- package/select/package.json +2 -1
- package/shadow-root/package.json +2 -1
- package/side-panel/package.json +2 -1
- package/skip-links/package.json +2 -1
- package/slider/package.json +2 -1
- package/sort-bar/package.json +2 -1
- package/split/package.json +2 -1
- package/status-bar/package.json +2 -1
- package/status-counter/package.json +2 -1
- package/status-toggle/package.json +2 -1
- package/summary-chip/package.json +2 -1
- package/summary-widget/package.json +2 -1
- package/system-banner/package.json +2 -1
- package/tabs/package.json +2 -1
- package/tabs-legacy/package.json +2 -1
- package/template-i18n.json +32 -25
- package/test-styles.scss +5 -0
- package/theme/package.json +2 -1
- package/threshold/package.json +2 -1
- package/toast-notification/package.json +2 -1
- package/tooltip/package.json +2 -1
- package/tour/package.json +2 -1
- package/translate/package.json +2 -1
- package/tree-view/package.json +2 -1
- package/typeahead/package.json +2 -1
- package/{accordion/index.d.ts → types/siemens-element-ng-accordion.d.ts} +2 -3
- package/{application-header/index.d.ts → types/siemens-element-ng-application-header.d.ts} +19 -18
- package/{autocomplete/index.d.ts → types/siemens-element-ng-autocomplete.d.ts} +1 -3
- package/{breadcrumb/index.d.ts → types/siemens-element-ng-breadcrumb.d.ts} +2 -2
- package/{chat-messages/index.d.ts → types/siemens-element-ng-chat-messages.d.ts} +72 -10
- package/{common/index.d.ts → types/siemens-element-ng-common.d.ts} +2 -30
- package/{content-action-bar/index.d.ts → types/siemens-element-ng-content-action-bar.d.ts} +2 -2
- package/{dashboard/index.d.ts → types/siemens-element-ng-dashboard.d.ts} +6 -6
- package/{date-range-filter/index.d.ts → types/siemens-element-ng-date-range-filter.d.ts} +28 -27
- package/{datepicker/index.d.ts → types/siemens-element-ng-datepicker.d.ts} +5 -6
- package/{electron-titlebar/index.d.ts → types/siemens-element-ng-electron-titlebar.d.ts} +4 -4
- package/{file-uploader/index.d.ts → types/siemens-element-ng-file-uploader.d.ts} +26 -26
- package/{filter-bar/index.d.ts → types/siemens-element-ng-filter-bar.d.ts} +4 -4
- package/{filtered-search/index.d.ts → types/siemens-element-ng-filtered-search.d.ts} +6 -21
- package/{form/index.d.ts → types/siemens-element-ng-form.d.ts} +4 -6
- package/{formly/index.d.ts → types/siemens-element-ng-formly.d.ts} +1 -1
- package/types/siemens-element-ng-icon.d.ts +203 -0
- package/{landing-page/index.d.ts → types/siemens-element-ng-landing-page.d.ts} +15 -15
- package/{language-switcher/index.d.ts → types/siemens-element-ng-language-switcher.d.ts} +1 -2
- package/{list-details/index.d.ts → types/siemens-element-ng-list-details.d.ts} +4 -11
- package/{loading-spinner/index.d.ts → types/siemens-element-ng-loading-spinner.d.ts} +2 -3
- package/{modal/index.d.ts → types/siemens-element-ng-modal.d.ts} +0 -6
- package/{navbar-vertical/index.d.ts → types/siemens-element-ng-navbar-vertical.d.ts} +12 -7
- package/{navbar/index.d.ts → types/siemens-element-ng-navbar.d.ts} +11 -11
- package/{notification-item/index.d.ts → types/siemens-element-ng-notification-item.d.ts} +15 -3
- package/{pagination/index.d.ts → types/siemens-element-ng-pagination.d.ts} +4 -4
- package/{password-toggle/index.d.ts → types/siemens-element-ng-password-toggle.d.ts} +6 -4
- package/{phone-number/index.d.ts → types/siemens-element-ng-phone-number.d.ts} +8 -11
- package/{pills-input/index.d.ts → types/siemens-element-ng-pills-input.d.ts} +3 -3
- package/{popover/index.d.ts → types/siemens-element-ng-popover.d.ts} +2 -2
- package/{resize-observer/index.d.ts → types/siemens-element-ng-resize-observer.d.ts} +0 -30
- package/{search-bar/index.d.ts → types/siemens-element-ng-search-bar.d.ts} +2 -2
- package/{select/index.d.ts → types/siemens-element-ng-select.d.ts} +18 -97
- package/{side-panel/index.d.ts → types/siemens-element-ng-side-panel.d.ts} +26 -5
- package/{slider/index.d.ts → types/siemens-element-ng-slider.d.ts} +4 -4
- package/{split/index.d.ts → types/siemens-element-ng-split.d.ts} +1 -3
- package/{status-bar/index.d.ts → types/siemens-element-ng-status-bar.d.ts} +6 -6
- package/{tabs-legacy/index.d.ts → types/siemens-element-ng-tabs-legacy.d.ts} +5 -0
- package/{threshold/index.d.ts → types/siemens-element-ng-threshold.d.ts} +7 -7
- package/{toast-notification/index.d.ts → types/siemens-element-ng-toast-notification.d.ts} +3 -4
- package/{tooltip/index.d.ts → types/siemens-element-ng-tooltip.d.ts} +3 -6
- package/{tour/index.d.ts → types/siemens-element-ng-tour.d.ts} +1 -10
- package/{translate/index.d.ts → types/siemens-element-ng-translate.d.ts} +8 -1
- package/{tree-view/index.d.ts → types/siemens-element-ng-tree-view.d.ts} +0 -1
- package/{typeahead/index.d.ts → types/siemens-element-ng-typeahead.d.ts} +0 -2
- package/{wizard/index.d.ts → types/siemens-element-ng-wizard.d.ts} +6 -6
- package/wizard/package.json +2 -1
- package/fesm2022/siemens-element-ng-unauthorized-page.mjs +0 -75
- package/fesm2022/siemens-element-ng-unauthorized-page.mjs.map +0 -1
- package/icon/index.d.ts +0 -285
- package/schematics/migrations/action-modal-migration/action-modal-migration.js +0 -162
- package/schematics/migrations/action-modal-migration/action-modal.mappings.js +0 -98
- package/schematics/migrations/action-modal-migration/index.js +0 -5
- package/schematics/migrations/wizard-migration/index.js +0 -80
- package/schematics/scss-import-to-siemens-migration/index.js +0 -101
- package/schematics/scss-import-to-siemens-migration/schema.json +0 -16
- package/schematics/scss-import-to-siemens-migration/style-mappings.js +0 -62
- package/schematics/ts-import-to-siemens-migration/index.js +0 -230
- package/schematics/ts-import-to-siemens-migration/mappings/charts-ng-mappings.js +0 -71
- package/schematics/ts-import-to-siemens-migration/mappings/dashboards-ng-mappings.js +0 -54
- package/schematics/ts-import-to-siemens-migration/mappings/element-ng-mappings.js +0 -705
- package/schematics/ts-import-to-siemens-migration/mappings/element-translate-ng-mappings.js +0 -21
- package/schematics/ts-import-to-siemens-migration/mappings/index.js +0 -10
- package/schematics/ts-import-to-siemens-migration/mappings/maps-ng-mappings.js +0 -47
- package/schematics/ts-import-to-siemens-migration/mappings/native-charts-ng-mappings.js +0 -33
- package/schematics/ts-import-to-siemens-migration/model.js +0 -4
- package/schematics/ts-import-to-siemens-migration/schema.json +0 -16
- package/unauthorized-page/index.d.ts +0 -44
- package/unauthorized-page/package.json +0 -3
- /package/{about/index.d.ts → types/siemens-element-ng-about.d.ts} +0 -0
- /package/{action-modal/index.d.ts → types/siemens-element-ng-action-modal.d.ts} +0 -0
- /package/{ag-grid/index.d.ts → types/siemens-element-ng-ag-grid.d.ts} +0 -0
- /package/{auto-collapsable-list/index.d.ts → types/siemens-element-ng-auto-collapsable-list.d.ts} +0 -0
- /package/{avatar/index.d.ts → types/siemens-element-ng-avatar.d.ts} +0 -0
- /package/{badge/index.d.ts → types/siemens-element-ng-badge.d.ts} +0 -0
- /package/{breadcrumb-router/index.d.ts → types/siemens-element-ng-breadcrumb-router.d.ts} +0 -0
- /package/{card/index.d.ts → types/siemens-element-ng-card.d.ts} +0 -0
- /package/{circle-status/index.d.ts → types/siemens-element-ng-circle-status.d.ts} +0 -0
- /package/{color-picker/index.d.ts → types/siemens-element-ng-color-picker.d.ts} +0 -0
- /package/{column-selection-dialog/index.d.ts → types/siemens-element-ng-column-selection-dialog.d.ts} +0 -0
- /package/{connection-strength/index.d.ts → types/siemens-element-ng-connection-strength.d.ts} +0 -0
- /package/{copyright-notice/index.d.ts → types/siemens-element-ng-copyright-notice.d.ts} +0 -0
- /package/{datatable/index.d.ts → types/siemens-element-ng-datatable.d.ts} +0 -0
- /package/{empty-state/index.d.ts → types/siemens-element-ng-empty-state.d.ts} +0 -0
- /package/{footer/index.d.ts → types/siemens-element-ng-footer.d.ts} +0 -0
- /package/{header-dropdown/index.d.ts → types/siemens-element-ng-header-dropdown.d.ts} +0 -0
- /package/{help-button/index.d.ts → types/siemens-element-ng-help-button.d.ts} +0 -0
- /package/{icon-status/index.d.ts → types/siemens-element-ng-icon-status.d.ts} +0 -0
- /package/{info-page/index.d.ts → types/siemens-element-ng-info-page.d.ts} +0 -0
- /package/{inline-notification/index.d.ts → types/siemens-element-ng-inline-notification.d.ts} +0 -0
- /package/{ip-input/index.d.ts → types/siemens-element-ng-ip-input.d.ts} +0 -0
- /package/{link/index.d.ts → types/siemens-element-ng-link.d.ts} +0 -0
- /package/{localization/index.d.ts → types/siemens-element-ng-localization.d.ts} +0 -0
- /package/{main-detail-container/index.d.ts → types/siemens-element-ng-main-detail-container.d.ts} +0 -0
- /package/{markdown-renderer/index.d.ts → types/siemens-element-ng-markdown-renderer.d.ts} +0 -0
- /package/{menu/index.d.ts → types/siemens-element-ng-menu.d.ts} +0 -0
- /package/{number-input/index.d.ts → types/siemens-element-ng-number-input.d.ts} +0 -0
- /package/{password-strength/index.d.ts → types/siemens-element-ng-password-strength.d.ts} +0 -0
- /package/{photo-upload/index.d.ts → types/siemens-element-ng-photo-upload.d.ts} +0 -0
- /package/{popover-legacy/index.d.ts → types/siemens-element-ng-popover-legacy.d.ts} +0 -0
- /package/{progressbar/index.d.ts → types/siemens-element-ng-progressbar.d.ts} +0 -0
- /package/{result-details-list/index.d.ts → types/siemens-element-ng-result-details-list.d.ts} +0 -0
- /package/{shadow-root/index.d.ts → types/siemens-element-ng-shadow-root.d.ts} +0 -0
- /package/{skip-links/index.d.ts → types/siemens-element-ng-skip-links.d.ts} +0 -0
- /package/{sort-bar/index.d.ts → types/siemens-element-ng-sort-bar.d.ts} +0 -0
- /package/{status-counter/index.d.ts → types/siemens-element-ng-status-counter.d.ts} +0 -0
- /package/{status-toggle/index.d.ts → types/siemens-element-ng-status-toggle.d.ts} +0 -0
- /package/{summary-chip/index.d.ts → types/siemens-element-ng-summary-chip.d.ts} +0 -0
- /package/{summary-widget/index.d.ts → types/siemens-element-ng-summary-widget.d.ts} +0 -0
- /package/{system-banner/index.d.ts → types/siemens-element-ng-system-banner.d.ts} +0 -0
- /package/{tabs/index.d.ts → types/siemens-element-ng-tabs.d.ts} +0 -0
- /package/{theme/index.d.ts → types/siemens-element-ng-theme.d.ts} +0 -0
- /package/{index.d.ts → types/siemens-element-ng.d.ts} +0 -0
|
@@ -11,6 +11,8 @@ import { isPlatformBrowser } from '@angular/common';
|
|
|
11
11
|
import * as i1$1 from '@angular/forms';
|
|
12
12
|
import { FormsModule } from '@angular/forms';
|
|
13
13
|
import { SiFileUploadDirective } from '@siemens/element-ng/file-uploader';
|
|
14
|
+
import { SiActionCardComponent } from '@siemens/element-ng/card';
|
|
15
|
+
import { SiSummaryChipComponent } from '@siemens/element-ng/summary-chip';
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* Copyright (c) Siemens 2016 - 2025
|
|
@@ -34,10 +36,10 @@ import { SiFileUploadDirective } from '@siemens/element-ng/file-uploader';
|
|
|
34
36
|
* @experimental
|
|
35
37
|
*/
|
|
36
38
|
class SiChatMessageActionDirective {
|
|
37
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
38
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
39
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatMessageActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
40
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: SiChatMessageActionDirective, isStandalone: true, selector: "[siChatMessageAction]", ngImport: i0 });
|
|
39
41
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatMessageActionDirective, decorators: [{
|
|
41
43
|
type: Directive,
|
|
42
44
|
args: [{
|
|
43
45
|
selector: '[siChatMessageAction]'
|
|
@@ -84,26 +86,26 @@ class SiChatMessageComponent {
|
|
|
84
86
|
* Whether the message is currently loading
|
|
85
87
|
* @defaultValue false
|
|
86
88
|
*/
|
|
87
|
-
loading = input(false);
|
|
89
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
88
90
|
/**
|
|
89
91
|
* Alignment of the message
|
|
90
92
|
* @defaultValue 'start'
|
|
91
93
|
*/
|
|
92
|
-
alignment = input('start');
|
|
94
|
+
alignment = input('start', ...(ngDevMode ? [{ debugName: "alignment" }] : []));
|
|
93
95
|
/**
|
|
94
96
|
* Where to display action buttons (if any)
|
|
95
97
|
* @defaultValue 'side'
|
|
96
98
|
*/
|
|
97
|
-
actionsPosition = input('side');
|
|
98
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
99
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
99
|
+
actionsPosition = input('side', ...(ngDevMode ? [{ debugName: "actionsPosition" }] : []));
|
|
100
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
101
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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 class=\"d-flex si-body-2 chat-message-container\" [class.start]=\"alignment() === 'start'\">\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;--chat-message-bubble-bg: var(--element-base-1);--chat-message-bubble-padding: 12px}:host ::ng-deep si-loading-spinner{--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)}.loading-message-bubble{inline-size:max-content;min-inline-size:75%;margin-block-end:auto;background-color:var(--chat-message-bubble-bg)}.message-bubble{margin-block-end:auto;background-color:var(--chat-message-bubble-bg);min-inline-size:0;overflow-wrap:break-word;word-break:break-word}.message-bubble:empty{display:none}.message-bubble:empty~.actions-wrapper{margin-inline:0!important}.message-wrapper{min-inline-size:0}.attachment-slot:empty{display:none}.attachment-slot:not(:empty)~.message-wrapper:not(:has(.message-bubble:empty)){margin-block-start:4px}.attachment-slot:not(:empty)~.message-wrapper:has(.message-bubble:empty) .actions-wrapper.actions-horizontal{margin-block-start:4px}.actions-wrapper:empty{display:none!important}.avatar-wrapper{align-self:flex-start}.avatar-wrapper:not(.end){margin-inline-end:6px}.avatar-wrapper.end{margin-inline-start:6px}.avatar-wrapper:empty{display:none}.message-wrapper{min-inline-size:0;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}.attachment-slot ::ng-deep si-attachment-list{--attachment-list-bg: transparent;--attachment-name-color: var(--element-text-secondary)}: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:6px}: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:4px!important}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper::ng-deep:has(si-icon):not(.end){margin-inline-start:4px!important}\n"] });
|
|
100
102
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatMessageComponent, decorators: [{
|
|
102
104
|
type: Component,
|
|
103
105
|
args: [{ selector: 'si-chat-message', host: {
|
|
104
106
|
class: 'd-block'
|
|
105
107
|
}, hostDirectives: [SiResponsiveContainerDirective], template: "<!--- Flex-row if alignment start, flex-row-reverse if alignment end, flex-column if mobile -->\n<div class=\"d-flex si-body-2 chat-message-container\" [class.start]=\"alignment() === 'start'\">\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;--chat-message-bubble-bg: var(--element-base-1);--chat-message-bubble-padding: 12px}:host ::ng-deep si-loading-spinner{--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)}.loading-message-bubble{inline-size:max-content;min-inline-size:75%;margin-block-end:auto;background-color:var(--chat-message-bubble-bg)}.message-bubble{margin-block-end:auto;background-color:var(--chat-message-bubble-bg);min-inline-size:0;overflow-wrap:break-word;word-break:break-word}.message-bubble:empty{display:none}.message-bubble:empty~.actions-wrapper{margin-inline:0!important}.message-wrapper{min-inline-size:0}.attachment-slot:empty{display:none}.attachment-slot:not(:empty)~.message-wrapper:not(:has(.message-bubble:empty)){margin-block-start:4px}.attachment-slot:not(:empty)~.message-wrapper:has(.message-bubble:empty) .actions-wrapper.actions-horizontal{margin-block-start:4px}.actions-wrapper:empty{display:none!important}.avatar-wrapper{align-self:flex-start}.avatar-wrapper:not(.end){margin-inline-end:6px}.avatar-wrapper.end{margin-inline-start:6px}.avatar-wrapper:empty{display:none}.message-wrapper{min-inline-size:0;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}.attachment-slot ::ng-deep si-attachment-list{--attachment-list-bg: transparent;--attachment-name-color: var(--element-text-secondary)}: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:6px}: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:4px!important}:host-context(.si-container-xs,.si-container-sm) .avatar-wrapper::ng-deep:has(si-icon):not(.end){margin-inline-start:4px!important}\n"] }]
|
|
106
|
-
}] });
|
|
108
|
+
}], 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 }] }] } });
|
|
107
109
|
|
|
108
110
|
/**
|
|
109
111
|
* Copyright (c) Siemens 2016 - 2025
|
|
@@ -131,12 +133,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
131
133
|
* @experimental
|
|
132
134
|
*/
|
|
133
135
|
class SiAiMessageComponent {
|
|
134
|
-
formattedContent = viewChild('formattedContent');
|
|
136
|
+
formattedContent = viewChild('formattedContent', ...(ngDevMode ? [{ debugName: "formattedContent" }] : []));
|
|
135
137
|
/**
|
|
136
138
|
* The AI-generated message content
|
|
137
139
|
* @defaultValue ''
|
|
138
140
|
*/
|
|
139
|
-
content = input('');
|
|
141
|
+
content = input('', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
140
142
|
/**
|
|
141
143
|
* Optional formatter function to transform content before display.
|
|
142
144
|
* - Returns string: Content will be sanitized using Angular's DomSanitizer
|
|
@@ -149,8 +151,8 @@ class SiAiMessageComponent {
|
|
|
149
151
|
* **Warning:** When returning a Node, ensure the content is safe to prevent XSS attacks
|
|
150
152
|
* @defaultValue undefined
|
|
151
153
|
*/
|
|
152
|
-
contentFormatter = input(undefined);
|
|
153
|
-
textContent = signal(undefined);
|
|
154
|
+
contentFormatter = input(undefined, ...(ngDevMode ? [{ debugName: "contentFormatter" }] : []));
|
|
155
|
+
textContent = signal(undefined, ...(ngDevMode ? [{ debugName: "textContent" }] : []));
|
|
154
156
|
constructor() {
|
|
155
157
|
effect(() => {
|
|
156
158
|
const formatter = this.contentFormatter();
|
|
@@ -178,20 +180,20 @@ class SiAiMessageComponent {
|
|
|
178
180
|
* Whether the message is currently being generated (shows skeleton)
|
|
179
181
|
* @defaultValue false
|
|
180
182
|
*/
|
|
181
|
-
loading = input(false, { transform: booleanAttribute });
|
|
183
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : {}), transform: booleanAttribute });
|
|
182
184
|
/**
|
|
183
185
|
* Primary actions available for this message (thumbs up/down, copy, retry, etc.)
|
|
184
186
|
* All actions displayed inline
|
|
185
187
|
* @defaultValue []
|
|
186
188
|
*/
|
|
187
|
-
actions = input([]);
|
|
189
|
+
actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
188
190
|
/**
|
|
189
191
|
* Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally
|
|
190
192
|
* @defaultValue []
|
|
191
193
|
*/
|
|
192
|
-
secondaryActions = input([]);
|
|
194
|
+
secondaryActions = input([], ...(ngDevMode ? [{ debugName: "secondaryActions" }] : []));
|
|
193
195
|
/** Parameter to pass to action handlers */
|
|
194
|
-
actionParam = input();
|
|
196
|
+
actionParam = input(...(ngDevMode ? [undefined, { debugName: "actionParam" }] : []));
|
|
195
197
|
/**
|
|
196
198
|
* More actions button aria label
|
|
197
199
|
*
|
|
@@ -200,11 +202,11 @@ class SiAiMessageComponent {
|
|
|
200
202
|
* t(() => $localize`:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:More actions`)
|
|
201
203
|
* ```
|
|
202
204
|
*/
|
|
203
|
-
secondaryActionsLabel = input(t(() => $localize `:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:More actions`));
|
|
204
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
205
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
205
|
+
secondaryActionsLabel = input(t(() => $localize `:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:More actions`), ...(ngDevMode ? [{ debugName: "secondaryActionsLabel" }] : []));
|
|
206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAiMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiAiMessageComponent, isStandalone: true, selector: "si-ai-message", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, contentFormatter: { classPropertyName: "contentFormatter", publicName: "contentFormatter", 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 }, 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=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\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\n @if ((actions()?.length ?? 0 > 0) || (secondaryActions()?.length ?? 0 > 0)) {\n <div class=\"d-flex gap-4 ai-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-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 > 0) {\n <button\n type=\"button\"\n class=\"btn btn-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon icon=\"element-optionsVertical\" />\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}si-chat-message{--chat-message-bubble-bg: transparent;--chat-message-bubble-padding: 0;margin-block-end:-4px}.ai-message-actions{margin-block-start:8px}:host ::ng-deep si-loading-spinner{--loading-spinner-size: 1.5em}\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: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
206
208
|
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAiMessageComponent, decorators: [{
|
|
208
210
|
type: Component,
|
|
209
211
|
args: [{ selector: 'si-ai-message', imports: [
|
|
210
212
|
CdkMenuTrigger,
|
|
@@ -213,8 +215,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
213
215
|
SiMenuFactoryComponent,
|
|
214
216
|
SiChatMessageActionDirective,
|
|
215
217
|
SiTranslatePipe
|
|
216
|
-
], template: "<si-chat-message alignment=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\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\n @if ((actions()?.length ?? 0 > 0) || (secondaryActions()?.length ?? 0 > 0)) {\n <div class=\"d-flex gap-4 ai-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-ghost btn-
|
|
217
|
-
}], ctorParameters: () => [] });
|
|
218
|
+
], template: "<si-chat-message alignment=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\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\n @if ((actions()?.length ?? 0 > 0) || (secondaryActions()?.length ?? 0 > 0)) {\n <div class=\"d-flex gap-4 ai-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-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 > 0) {\n <button\n type=\"button\"\n class=\"btn btn-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon icon=\"element-optionsVertical\" />\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}si-chat-message{--chat-message-bubble-bg: transparent;--chat-message-bubble-padding: 0;margin-block-end:-4px}.ai-message-actions{margin-block-start:8px}:host ::ng-deep si-loading-spinner{--loading-spinner-size: 1.5em}\n"] }]
|
|
219
|
+
}], ctorParameters: () => [], propDecorators: { formattedContent: [{ type: i0.ViewChild, args: ['formattedContent', { isSignal: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], contentFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentFormatter", 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 }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }] } });
|
|
218
220
|
|
|
219
221
|
/**
|
|
220
222
|
* Copyright (c) Siemens 2016 - 2025
|
|
@@ -248,17 +250,17 @@ class SiAttachmentListComponent {
|
|
|
248
250
|
* List of attachments to display
|
|
249
251
|
* @defaultValue []
|
|
250
252
|
*/
|
|
251
|
-
attachments = input([]);
|
|
253
|
+
attachments = input([], ...(ngDevMode ? [{ debugName: "attachments" }] : []));
|
|
252
254
|
/**
|
|
253
255
|
* Whether to align attachments to the end (right) or start (left)
|
|
254
256
|
* @defaultValue 'start'
|
|
255
257
|
*/
|
|
256
|
-
alignment = input('start');
|
|
258
|
+
alignment = input('start', ...(ngDevMode ? [{ debugName: "alignment" }] : []));
|
|
257
259
|
/**
|
|
258
260
|
* Whether to show remove buttons on attachments
|
|
259
261
|
* @defaultValue false
|
|
260
262
|
*/
|
|
261
|
-
removable = input(false, { transform: booleanAttribute });
|
|
263
|
+
removable = input(false, { ...(ngDevMode ? { debugName: "removable" } : {}), transform: booleanAttribute });
|
|
262
264
|
/**
|
|
263
265
|
* Label for remove attachment button
|
|
264
266
|
*
|
|
@@ -267,7 +269,7 @@ class SiAttachmentListComponent {
|
|
|
267
269
|
* t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`)
|
|
268
270
|
* ```
|
|
269
271
|
*/
|
|
270
|
-
removeLabel = input(t(() => $localize `:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`));
|
|
272
|
+
removeLabel = input(t(() => $localize `:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`), ...(ngDevMode ? [{ debugName: "removeLabel" }] : []));
|
|
271
273
|
/**
|
|
272
274
|
* Emitted when an attachment should be removed
|
|
273
275
|
*/
|
|
@@ -293,13 +295,13 @@ class SiAttachmentListComponent {
|
|
|
293
295
|
// TODO: Accept map and default it in file upload directive.
|
|
294
296
|
return 'element-document';
|
|
295
297
|
}
|
|
296
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
297
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
298
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAttachmentListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
299
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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 mx-1\"\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-2 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 mx-1\"\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-2 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-ghost btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside\"\n [attr.aria-label]=\"(removeLabel() | translate) + ' ' + attachment.name\"\n (click)=\"remove.emit(attachment); $event.stopPropagation()\"\n >\n <si-icon class=\"icon\" icon=\"element-delete\" />\n </button>\n }\n </div>\n }\n</div>\n", styles: [":host{--attachment-list-bg: var(--element-base-1-hover);--attachment-name-color: var(--element-text-primary)}.attachment-item{border-radius:var(--element-radius-2);overflow:hidden;background-color:var(--attachment-list-bg);color:var(--attachment-name-color)}.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}.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:0}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
298
300
|
}
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAttachmentListComponent, decorators: [{
|
|
300
302
|
type: Component,
|
|
301
|
-
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 mx-1\"\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-2 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 mx-1\"\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-2 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-ghost btn-
|
|
302
|
-
}] });
|
|
303
|
+
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 mx-1\"\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-2 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 mx-1\"\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-2 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-ghost btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside\"\n [attr.aria-label]=\"(removeLabel() | translate) + ' ' + attachment.name\"\n (click)=\"remove.emit(attachment); $event.stopPropagation()\"\n >\n <si-icon class=\"icon\" icon=\"element-delete\" />\n </button>\n }\n </div>\n }\n</div>\n", styles: [":host{--attachment-list-bg: var(--element-base-1-hover);--attachment-name-color: var(--element-text-primary)}.attachment-item{border-radius:var(--element-radius-2);overflow:hidden;background-color:var(--attachment-list-bg);color:var(--attachment-name-color)}.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}.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:0}\n"] }]
|
|
304
|
+
}], 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"] }] } });
|
|
303
305
|
|
|
304
306
|
/**
|
|
305
307
|
* Copyright (c) Siemens 2016 - 2025
|
|
@@ -313,7 +315,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
313
315
|
* scrolls to the bottom when new content is added, unless the user has scrolled up to view older messages.
|
|
314
316
|
*
|
|
315
317
|
* Use via content projection:
|
|
316
|
-
* - Default content: Chat messages displayed in the scrollable messages container or
|
|
318
|
+
* - Default content: Chat messages displayed in the scrollable messages container or a welcome screen (empty state).
|
|
317
319
|
* - `si-inline-notification` selector: Notification component displayed above the input area
|
|
318
320
|
* - `si-chat-input` or `[siChatContainerInput]` selector: Input controls for composing messages
|
|
319
321
|
*
|
|
@@ -326,24 +328,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
326
328
|
* @experimental
|
|
327
329
|
*/
|
|
328
330
|
class SiChatContainerComponent {
|
|
329
|
-
messagesContainer = viewChild('messagesContainer');
|
|
331
|
+
messagesContainer = viewChild('messagesContainer', ...(ngDevMode ? [{ debugName: "messagesContainer" }] : []));
|
|
330
332
|
platformId = inject(PLATFORM_ID);
|
|
331
333
|
isUserAtBottom = true;
|
|
332
334
|
scrollTimeout;
|
|
335
|
+
lastScrollTime = 0;
|
|
336
|
+
pendingScroll = false;
|
|
337
|
+
scrollDebounceMs = 7; // ~144fps
|
|
333
338
|
resizeObserver;
|
|
334
339
|
contentObserver;
|
|
335
340
|
/**
|
|
336
341
|
* The color variant to apply to the container.
|
|
337
342
|
* @defaultValue 'base-0'
|
|
338
343
|
*/
|
|
339
|
-
colorVariant = input('base-0');
|
|
344
|
+
colorVariant = input('base-0', ...(ngDevMode ? [{ debugName: "colorVariant" }] : []));
|
|
340
345
|
/**
|
|
341
346
|
* Disables automatic scrolling to the bottom when new content is added.
|
|
342
347
|
* @defaultValue false
|
|
343
348
|
*/
|
|
344
|
-
noAutoScroll = input(false, {
|
|
345
|
-
transform: (value) => value === '' || value === true
|
|
346
|
-
});
|
|
349
|
+
noAutoScroll = input(false, { ...(ngDevMode ? { debugName: "noAutoScroll" } : {}), transform: (value) => value === '' || value === true });
|
|
347
350
|
constructor() {
|
|
348
351
|
effect(() => {
|
|
349
352
|
if (this.messagesContainer()) {
|
|
@@ -353,7 +356,7 @@ class SiChatContainerComponent {
|
|
|
353
356
|
});
|
|
354
357
|
}
|
|
355
358
|
ngAfterContentInit() {
|
|
356
|
-
this.
|
|
359
|
+
this.scrollToBottomDuringStreaming();
|
|
357
360
|
}
|
|
358
361
|
ngOnDestroy() {
|
|
359
362
|
if (this.scrollTimeout) {
|
|
@@ -366,7 +369,7 @@ class SiChatContainerComponent {
|
|
|
366
369
|
this.contentObserver.disconnect();
|
|
367
370
|
}
|
|
368
371
|
}
|
|
369
|
-
|
|
372
|
+
scrollToBottomDuringStreaming() {
|
|
370
373
|
if (this.noAutoScroll() || !this.isUserAtBottom) {
|
|
371
374
|
return;
|
|
372
375
|
}
|
|
@@ -378,12 +381,26 @@ class SiChatContainerComponent {
|
|
|
378
381
|
element.scrollTop = element.scrollHeight;
|
|
379
382
|
}
|
|
380
383
|
debouncedScrollToBottom() {
|
|
384
|
+
const now = Date.now();
|
|
385
|
+
const timeSinceLastScroll = now - this.lastScrollTime;
|
|
386
|
+
if (timeSinceLastScroll >= this.scrollDebounceMs) {
|
|
387
|
+
this.lastScrollTime = now;
|
|
388
|
+
this.scrollToBottomDuringStreaming();
|
|
389
|
+
this.pendingScroll = false;
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
this.pendingScroll = true;
|
|
393
|
+
}
|
|
381
394
|
if (this.scrollTimeout) {
|
|
382
395
|
clearTimeout(this.scrollTimeout);
|
|
383
396
|
}
|
|
384
397
|
this.scrollTimeout = setTimeout(() => {
|
|
385
|
-
this.
|
|
386
|
-
|
|
398
|
+
if (this.pendingScroll) {
|
|
399
|
+
this.lastScrollTime = Date.now();
|
|
400
|
+
this.scrollToBottomDuringStreaming();
|
|
401
|
+
this.pendingScroll = false;
|
|
402
|
+
}
|
|
403
|
+
}, this.scrollDebounceMs);
|
|
387
404
|
}
|
|
388
405
|
setupResizeObserver() {
|
|
389
406
|
if (!isPlatformBrowser(this.platformId)) {
|
|
@@ -428,6 +445,26 @@ class SiChatContainerComponent {
|
|
|
428
445
|
onScroll() {
|
|
429
446
|
this.checkIfUserAtBottom();
|
|
430
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* Scrolls to the bottom of the messages container immediately.
|
|
450
|
+
* This method forces a scroll even if the user has scrolled up.
|
|
451
|
+
*/
|
|
452
|
+
scrollToBottom() {
|
|
453
|
+
this.isUserAtBottom = true;
|
|
454
|
+
this.scrollToBottomDuringStreaming();
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Scrolls to the top of the messages container immediately.
|
|
458
|
+
*/
|
|
459
|
+
scrollToTop() {
|
|
460
|
+
const container = this.messagesContainer();
|
|
461
|
+
if (!container) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
const element = container.nativeElement;
|
|
465
|
+
element.scrollTop = 0;
|
|
466
|
+
this.isUserAtBottom = false;
|
|
467
|
+
}
|
|
431
468
|
/**
|
|
432
469
|
* Focuses the messages container element.
|
|
433
470
|
*/
|
|
@@ -435,16 +472,16 @@ class SiChatContainerComponent {
|
|
|
435
472
|
const container = this.messagesContainer();
|
|
436
473
|
container?.nativeElement.focus();
|
|
437
474
|
}
|
|
438
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
439
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
475
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
476
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.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(--element-base-0)}:host.base-1{background-color:var(--element-base-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) .chat-input-area,::ng-deep .chat-container:has(si-ai-welcome-screen) si-ai-welcome-screen{padding-inline-start:16px;padding-inline-end:16px}.chat-container{min-block-size:0;overflow-y:hidden;overflow-x:visible}.messages-container{overflow-y:auto;overflow-x:visible;gap:40px}.messages-container ::ng-deep si-user-message:not(.last){margin-block-end:-40px}::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 .alert,:host-context(.si-container-xs,.si-container-sm) ::ng-deep si-inline-notification .alert-link{font-size:.875rem}\n"] });
|
|
440
477
|
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatContainerComponent, decorators: [{
|
|
442
479
|
type: Component,
|
|
443
480
|
args: [{ selector: 'si-chat-container', host: {
|
|
444
481
|
class: 'd-flex si-layout-inner flex-grow-1 flex-column h-100 w-100',
|
|
445
482
|
'[class]': 'colorVariant()'
|
|
446
|
-
}, 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(--element-base-0)}:host.base-1{background-color:var(--element-base-1)}.chat-container{
|
|
447
|
-
}], ctorParameters: () => [] });
|
|
483
|
+
}, 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(--element-base-0)}:host.base-1{background-color:var(--element-base-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) .chat-input-area,::ng-deep .chat-container:has(si-ai-welcome-screen) si-ai-welcome-screen{padding-inline-start:16px;padding-inline-end:16px}.chat-container{min-block-size:0;overflow-y:hidden;overflow-x:visible}.messages-container{overflow-y:auto;overflow-x:visible;gap:40px}.messages-container ::ng-deep si-user-message:not(.last){margin-block-end:-40px}::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 .alert,:host-context(.si-container-xs,.si-container-sm) ::ng-deep si-inline-notification .alert-link{font-size:.875rem}\n"] }]
|
|
484
|
+
}], 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 }] }] } });
|
|
448
485
|
|
|
449
486
|
/**
|
|
450
487
|
* Copyright (c) Siemens 2016 - 2025
|
|
@@ -472,10 +509,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
472
509
|
* @experimental
|
|
473
510
|
*/
|
|
474
511
|
class SiChatContainerInputDirective {
|
|
475
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
476
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
512
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatContainerInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
513
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: SiChatContainerInputDirective, isStandalone: true, selector: "[siChatContainerInput]", ngImport: i0 });
|
|
477
514
|
}
|
|
478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatContainerInputDirective, decorators: [{
|
|
479
516
|
type: Directive,
|
|
480
517
|
args: [{
|
|
481
518
|
selector: '[siChatContainerInput]'
|
|
@@ -510,14 +547,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
510
547
|
*/
|
|
511
548
|
class SiChatInputComponent {
|
|
512
549
|
static idCounter = 0;
|
|
513
|
-
textInput = viewChild('textInput');
|
|
514
|
-
projectedContent = viewChild('projected');
|
|
515
|
-
fileUploadDirective = viewChild(SiFileUploadDirective);
|
|
550
|
+
textInput = viewChild('textInput', ...(ngDevMode ? [{ debugName: "textInput" }] : []));
|
|
551
|
+
projectedContent = viewChild('projected', ...(ngDevMode ? [{ debugName: "projectedContent" }] : []));
|
|
552
|
+
fileUploadDirective = viewChild(SiFileUploadDirective, ...(ngDevMode ? [{ debugName: "fileUploadDirective" }] : []));
|
|
516
553
|
/**
|
|
517
554
|
* Current input value
|
|
518
555
|
* @defaultValue ''
|
|
519
556
|
*/
|
|
520
|
-
value = model('');
|
|
557
|
+
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
521
558
|
/**
|
|
522
559
|
* Placeholder text for the input
|
|
523
560
|
*
|
|
@@ -526,66 +563,66 @@ class SiChatInputComponent {
|
|
|
526
563
|
* t(() => $localize`:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…`)
|
|
527
564
|
* ```
|
|
528
565
|
*/
|
|
529
|
-
placeholder = input(t(() => $localize `:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…`));
|
|
566
|
+
placeholder = input(t(() => $localize `:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…`), ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
530
567
|
/**
|
|
531
568
|
* Whether the input is disabled
|
|
532
569
|
* @defaultValue false
|
|
533
570
|
*/
|
|
534
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
571
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
535
572
|
/**
|
|
536
573
|
* Whether a message is currently being sent, also prevent the sending of new ones while still allowing the user to type
|
|
537
574
|
* @defaultValue false
|
|
538
575
|
*/
|
|
539
|
-
sending = input(false, { transform: booleanAttribute });
|
|
576
|
+
sending = input(false, { ...(ngDevMode ? { debugName: "sending" } : {}), transform: booleanAttribute });
|
|
540
577
|
/**
|
|
541
578
|
* Whether the input supports interrupting ongoing operations. When active,
|
|
542
579
|
* the send button transforms into an interrupt button (with element-stop-filled icon).
|
|
543
580
|
* If sending is true, the interrupt button will be disabled.
|
|
544
581
|
* @defaultValue false
|
|
545
582
|
*/
|
|
546
|
-
interruptible = input(false, { transform: booleanAttribute });
|
|
583
|
+
interruptible = input(false, { ...(ngDevMode ? { debugName: "interruptible" } : {}), transform: booleanAttribute });
|
|
547
584
|
/**
|
|
548
585
|
* Maximum number of characters allowed
|
|
549
586
|
*/
|
|
550
|
-
maxLength = input();
|
|
587
|
+
maxLength = input(...(ngDevMode ? [undefined, { debugName: "maxLength" }] : []));
|
|
551
588
|
/**
|
|
552
589
|
* A disclaimer to display.
|
|
553
590
|
*
|
|
554
591
|
* If not provided, the component will look for projected content with the `siChatInputDisclaimer` directive.
|
|
555
592
|
* If both are empty, no disclaimer section will be shown (handled via CSS :empty).
|
|
556
593
|
*/
|
|
557
|
-
disclaimer = input();
|
|
594
|
+
disclaimer = input(...(ngDevMode ? [undefined, { debugName: "disclaimer" }] : []));
|
|
558
595
|
/**
|
|
559
596
|
* Primary actions available in the input (attach files, etc.)
|
|
560
597
|
* All actions displayed inline
|
|
561
598
|
* @defaultValue []
|
|
562
599
|
*/
|
|
563
|
-
actions = input([]);
|
|
600
|
+
actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
564
601
|
/**
|
|
565
602
|
* Secondary actions available in dropdown menu
|
|
566
603
|
* @defaultValue []
|
|
567
604
|
*/
|
|
568
|
-
secondaryActions = input([]);
|
|
605
|
+
secondaryActions = input([], ...(ngDevMode ? [{ debugName: "secondaryActions" }] : []));
|
|
569
606
|
/**
|
|
570
607
|
* Whether file attachments are supported
|
|
571
608
|
* @defaultValue false
|
|
572
609
|
*/
|
|
573
|
-
allowAttachments = input(false);
|
|
610
|
+
allowAttachments = input(false, ...(ngDevMode ? [{ debugName: "allowAttachments" }] : []));
|
|
574
611
|
/**
|
|
575
612
|
* Accepted file types for attachments (as accept string)
|
|
576
613
|
* @defaultValue undefined
|
|
577
614
|
*/
|
|
578
|
-
accept = input();
|
|
615
|
+
accept = input(...(ngDevMode ? [undefined, { debugName: "accept" }] : []));
|
|
579
616
|
/**
|
|
580
617
|
* Maximum file size in bytes
|
|
581
618
|
* @defaultValue 10485760 (10MB)
|
|
582
619
|
*/
|
|
583
|
-
maxFileSize = input(10485760);
|
|
620
|
+
maxFileSize = input(10485760, ...(ngDevMode ? [{ debugName: "maxFileSize" }] : []));
|
|
584
621
|
/**
|
|
585
622
|
* Current attachments
|
|
586
623
|
* @defaultValue []
|
|
587
624
|
*/
|
|
588
|
-
attachments = model([]);
|
|
625
|
+
attachments = model([], ...(ngDevMode ? [{ debugName: "attachments" }] : []));
|
|
589
626
|
/**
|
|
590
627
|
* The label for the input, used for accessibility
|
|
591
628
|
* @defaultValue
|
|
@@ -593,9 +630,9 @@ class SiChatInputComponent {
|
|
|
593
630
|
* t(() => $localize`:@@SI_CHAT_INPUT.LABEL:Chat message input`)
|
|
594
631
|
* ```
|
|
595
632
|
*/
|
|
596
|
-
label = input(t(() => $localize `:@@SI_CHAT_INPUT.LABEL:Chat message input`));
|
|
633
|
+
label = input(t(() => $localize `:@@SI_CHAT_INPUT.LABEL:Chat message input`), ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
597
634
|
/** Parameter to pass to action handlers */
|
|
598
|
-
actionParam = input();
|
|
635
|
+
actionParam = input(...(ngDevMode ? [undefined, { debugName: "actionParam" }] : []));
|
|
599
636
|
/**
|
|
600
637
|
* Send button label
|
|
601
638
|
*
|
|
@@ -604,13 +641,13 @@ class SiChatInputComponent {
|
|
|
604
641
|
* t(() => $localize`:@@SI_CHAT_INPUT.SEND:Send`)
|
|
605
642
|
* ```
|
|
606
643
|
*/
|
|
607
|
-
sendButtonLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.SEND:Send`));
|
|
644
|
+
sendButtonLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.SEND:Send`), ...(ngDevMode ? [{ debugName: "sendButtonLabel" }] : []));
|
|
608
645
|
/**
|
|
609
646
|
* Send button icon
|
|
610
647
|
*
|
|
611
648
|
* @defaultValue 'element-send-filled'
|
|
612
649
|
*/
|
|
613
|
-
sendButtonIcon = input('element-send-filled');
|
|
650
|
+
sendButtonIcon = input('element-send-filled', ...(ngDevMode ? [{ debugName: "sendButtonIcon" }] : []));
|
|
614
651
|
/**
|
|
615
652
|
* Interrupt button label
|
|
616
653
|
*
|
|
@@ -619,12 +656,12 @@ class SiChatInputComponent {
|
|
|
619
656
|
* t(() => $localize`:@@SI_CHAT_INPUT.INTERRUPT:Interrupt`)
|
|
620
657
|
* ```
|
|
621
658
|
*/
|
|
622
|
-
interruptButtonLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.INTERRUPT:Interrupt`));
|
|
659
|
+
interruptButtonLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.INTERRUPT:Interrupt`), ...(ngDevMode ? [{ debugName: "interruptButtonLabel" }] : []));
|
|
623
660
|
/**
|
|
624
661
|
* Auto-focus the input on component initialization
|
|
625
662
|
* @defaultValue false
|
|
626
663
|
*/
|
|
627
|
-
autoFocus = input(false, { transform: booleanAttribute });
|
|
664
|
+
autoFocus = input(false, { ...(ngDevMode ? { debugName: "autoFocus" } : {}), transform: booleanAttribute });
|
|
628
665
|
/**
|
|
629
666
|
* Attach file button aria label
|
|
630
667
|
*
|
|
@@ -633,7 +670,7 @@ class SiChatInputComponent {
|
|
|
633
670
|
* t(() => $localize`:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file`)
|
|
634
671
|
* ```
|
|
635
672
|
*/
|
|
636
|
-
attachFileLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file`));
|
|
673
|
+
attachFileLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file`), ...(ngDevMode ? [{ debugName: "attachFileLabel" }] : []));
|
|
637
674
|
/**
|
|
638
675
|
* Remove attachment aria label prefix
|
|
639
676
|
*
|
|
@@ -642,7 +679,7 @@ class SiChatInputComponent {
|
|
|
642
679
|
* t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`)
|
|
643
680
|
* ```
|
|
644
681
|
*/
|
|
645
|
-
removeAttachmentLabel = input(t(() => $localize `:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`));
|
|
682
|
+
removeAttachmentLabel = input(t(() => $localize `:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`), ...(ngDevMode ? [{ debugName: "removeAttachmentLabel" }] : []));
|
|
646
683
|
/**
|
|
647
684
|
* More actions button aria label
|
|
648
685
|
*
|
|
@@ -651,7 +688,7 @@ class SiChatInputComponent {
|
|
|
651
688
|
* t(() => $localize`:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:More actions`)
|
|
652
689
|
* ```
|
|
653
690
|
*/
|
|
654
|
-
secondaryActionsLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:More actions`));
|
|
691
|
+
secondaryActionsLabel = input(t(() => $localize `:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:More actions`), ...(ngDevMode ? [{ debugName: "secondaryActionsLabel" }] : []));
|
|
655
692
|
/**
|
|
656
693
|
* Emitted when the user wants to send a message
|
|
657
694
|
*/
|
|
@@ -665,20 +702,20 @@ class SiChatInputComponent {
|
|
|
665
702
|
*/
|
|
666
703
|
fileError = output();
|
|
667
704
|
id = `__si-chat-input-${SiChatInputComponent.idCounter++}`;
|
|
668
|
-
hasContent = computed(() => this.value().trim().length > 0);
|
|
669
|
-
hasAttachments = computed(() => this.attachments().length > 0);
|
|
670
|
-
hasActions = computed(() => this.actions().length > 0);
|
|
671
|
-
hasSecondaryActions = computed(() => this.secondaryActions().length > 0);
|
|
672
|
-
canSend = computed(() => (this.hasContent() || this.hasAttachments()) && !this.disabled() && !this.sending());
|
|
673
|
-
showInterruptButton = computed(() => this.interruptible());
|
|
705
|
+
hasContent = computed(() => this.value().trim().length > 0, ...(ngDevMode ? [{ debugName: "hasContent" }] : []));
|
|
706
|
+
hasAttachments = computed(() => this.attachments().length > 0, ...(ngDevMode ? [{ debugName: "hasAttachments" }] : []));
|
|
707
|
+
hasActions = computed(() => this.actions().length > 0, ...(ngDevMode ? [{ debugName: "hasActions" }] : []));
|
|
708
|
+
hasSecondaryActions = computed(() => this.secondaryActions().length > 0, ...(ngDevMode ? [{ debugName: "hasSecondaryActions" }] : []));
|
|
709
|
+
canSend = computed(() => (this.hasContent() || this.hasAttachments()) && !this.disabled() && !this.sending(), ...(ngDevMode ? [{ debugName: "canSend" }] : []));
|
|
710
|
+
showInterruptButton = computed(() => this.interruptible(), ...(ngDevMode ? [{ debugName: "showInterruptButton" }] : []));
|
|
674
711
|
buttonDisabled = computed(() => {
|
|
675
712
|
if (this.showInterruptButton()) {
|
|
676
713
|
return this.disabled() || this.sending();
|
|
677
714
|
}
|
|
678
715
|
return !this.canSend();
|
|
679
|
-
});
|
|
680
|
-
buttonIcon = computed(() => this.showInterruptButton() ? 'element-stop-filled' : this.sendButtonIcon());
|
|
681
|
-
buttonLabel = computed(() => this.showInterruptButton() ? this.interruptButtonLabel() : this.sendButtonLabel());
|
|
716
|
+
}, ...(ngDevMode ? [{ debugName: "buttonDisabled" }] : []));
|
|
717
|
+
buttonIcon = computed(() => this.showInterruptButton() ? 'element-stop-filled' : this.sendButtonIcon(), ...(ngDevMode ? [{ debugName: "buttonIcon" }] : []));
|
|
718
|
+
buttonLabel = computed(() => this.showInterruptButton() ? this.interruptButtonLabel() : this.sendButtonLabel(), ...(ngDevMode ? [{ debugName: "buttonLabel" }] : []));
|
|
682
719
|
dragOver = false;
|
|
683
720
|
get attachmentList() {
|
|
684
721
|
return this.attachments();
|
|
@@ -811,10 +848,10 @@ class SiChatInputComponent {
|
|
|
811
848
|
const finalHeight = Math.max(Math.min(scrollHeight, maxHeight), minHeight);
|
|
812
849
|
textarea.style.height = finalHeight + 'px';
|
|
813
850
|
}
|
|
814
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
815
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", 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: "projectedContent", first: true, predicate: ["projected"], descendants: true, isSignal: true }, { propertyName: "fileUploadDirective", first: true, predicate: SiFileUploadDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"input-wrapper border rounded-3 bg-body\"\n [class.drag-over]=\"dragOver\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver = false\"\n>\n @if (hasAttachments()) {\n <div class=\"p-4 pb-0\">\n <si-attachment-list\n [attachments]=\"attachmentList\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n </div>\n }\n\n <div class=\"p-4 pe-2 pb-0 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 p-2\"\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 px-4 ps-5 pb-2\">\n <div class=\"d-flex align-items-center gap-4\">\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 <button\n type=\"button\"\n class=\"btn btn-ghost btn-circle btn-sm\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n [disabled]=\"disabled()\"\n (click)=\"fileInput.click()\"\n >\n <si-icon icon=\"element-attachment\" />\n </button>\n }\n\n @if (hasActions() || hasSecondaryActions()) {\n <div class=\"d-flex gap-4 ai-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-ghost btn-circle btn-sm\"\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-ghost btn-circle btn-sm\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon icon=\"element-optionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n </div>\n }\n <div #projected class=\"d-flex flex-wrap align-items-start gap-4\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-ghost btn-circle btn-sm\"\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-input-experimental)}.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:1.7142857143em;font-family:inherit;outline:none;resize:none;background-color:transparent!important}.chat-textarea::placeholder{color:var(--element-text-secondary)}.chat-textarea:disabled{background-color:transparent!important;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);border-color:var(--element-ui-1)}.disclaimer-wrapper:empty{display:none}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData"], 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: "pipe", type: SiTranslatePipe, name: "translate" }, { 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"] }] });
|
|
851
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
852
|
+
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: "projectedContent", first: true, predicate: ["projected"], descendants: true, isSignal: true }, { propertyName: "fileUploadDirective", first: true, predicate: SiFileUploadDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"input-wrapper border rounded-3 bg-body\"\n [class.drag-over]=\"dragOver\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver = false\"\n>\n @if (hasAttachments()) {\n <div class=\"p-4 pb-0\">\n <si-attachment-list\n [attachments]=\"attachmentList\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n </div>\n }\n\n <div class=\"p-4 pe-2 pb-0 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 p-2\"\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 px-4 ps-5 pb-2\">\n <div class=\"d-flex align-items-center gap-4\">\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 <button\n type=\"button\"\n class=\"btn btn-ghost btn-icon\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n [disabled]=\"disabled()\"\n (click)=\"fileInput.click()\"\n >\n <si-icon icon=\"element-attachment\" />\n </button>\n }\n\n @if (hasActions() || hasSecondaryActions()) {\n <div class=\"d-flex gap-4 ai-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-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-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon icon=\"element-optionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n </div>\n }\n <div #projected class=\"d-flex flex-wrap align-items-start gap-4\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-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-input-experimental)}.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:1.7142857143em;font-family:inherit;outline:none;resize:none;background-color:transparent!important}.chat-textarea::placeholder{color:var(--element-text-secondary)}.chat-textarea:disabled{background-color:transparent!important;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);border-color:var(--element-ui-1)}.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" }] });
|
|
816
853
|
}
|
|
817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatInputComponent, decorators: [{
|
|
818
855
|
type: Component,
|
|
819
856
|
args: [{ selector: 'si-chat-input', imports: [
|
|
820
857
|
CdkMenuTrigger,
|
|
@@ -824,8 +861,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
824
861
|
SiAttachmentListComponent,
|
|
825
862
|
SiMenuFactoryComponent,
|
|
826
863
|
SiFileUploadDirective
|
|
827
|
-
], template: "<div\n class=\"input-wrapper border rounded-3 bg-body\"\n [class.drag-over]=\"dragOver\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver = false\"\n>\n @if (hasAttachments()) {\n <div class=\"p-4 pb-0\">\n <si-attachment-list\n [attachments]=\"attachmentList\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n </div>\n }\n\n <div class=\"p-4 pe-2 pb-0 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 p-2\"\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 px-4 ps-5 pb-2\">\n <div class=\"d-flex align-items-center gap-4\">\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 <button\n type=\"button\"\n class=\"btn btn-ghost btn-
|
|
828
|
-
}] });
|
|
864
|
+
], template: "<div\n class=\"input-wrapper border rounded-3 bg-body\"\n [class.drag-over]=\"dragOver\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver = false\"\n>\n @if (hasAttachments()) {\n <div class=\"p-4 pb-0\">\n <si-attachment-list\n [attachments]=\"attachmentList\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n </div>\n }\n\n <div class=\"p-4 pe-2 pb-0 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 p-2\"\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 px-4 ps-5 pb-2\">\n <div class=\"d-flex align-items-center gap-4\">\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 <button\n type=\"button\"\n class=\"btn btn-ghost btn-icon\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n [disabled]=\"disabled()\"\n (click)=\"fileInput.click()\"\n >\n <si-icon icon=\"element-attachment\" />\n </button>\n }\n\n @if (hasActions() || hasSecondaryActions()) {\n <div class=\"d-flex gap-4 ai-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-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-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon icon=\"element-optionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n </div>\n }\n <div #projected class=\"d-flex flex-wrap align-items-start gap-4\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-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-input-experimental)}.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:1.7142857143em;font-family:inherit;outline:none;resize:none;background-color:transparent!important}.chat-textarea::placeholder{color:var(--element-text-secondary)}.chat-textarea:disabled{background-color:transparent!important;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);border-color:var(--element-ui-1)}.disclaimer-wrapper:empty{display:none}\n"] }]
|
|
865
|
+
}], propDecorators: { textInput: [{ type: i0.ViewChild, args: ['textInput', { isSignal: true }] }], projectedContent: [{ type: i0.ViewChild, args: ['projected', { isSignal: true }] }], fileUploadDirective: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiFileUploadDirective), { 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 }] }], send: [{ type: i0.Output, args: ["send"] }], interrupt: [{ type: i0.Output, args: ["interrupt"] }], fileError: [{ type: i0.Output, args: ["fileError"] }] } });
|
|
829
866
|
|
|
830
867
|
/**
|
|
831
868
|
* Copyright (c) Siemens 2016 - 2025
|
|
@@ -849,10 +886,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
849
886
|
* @experimental
|
|
850
887
|
*/
|
|
851
888
|
class SiChatInputDisclaimerDirective {
|
|
852
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
853
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
889
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatInputDisclaimerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
890
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: SiChatInputDisclaimerDirective, isStandalone: true, selector: "[siChatInputDisclaimer]", ngImport: i0 });
|
|
854
891
|
}
|
|
855
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
892
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiChatInputDisclaimerDirective, decorators: [{
|
|
856
893
|
type: Directive,
|
|
857
894
|
args: [{
|
|
858
895
|
selector: '[siChatInputDisclaimer]'
|
|
@@ -886,12 +923,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
886
923
|
* @experimental
|
|
887
924
|
*/
|
|
888
925
|
class SiUserMessageComponent {
|
|
889
|
-
formattedContent = viewChild('formattedContent');
|
|
926
|
+
formattedContent = viewChild('formattedContent', ...(ngDevMode ? [{ debugName: "formattedContent" }] : []));
|
|
890
927
|
/**
|
|
891
928
|
* The user message content
|
|
892
929
|
* @defaultValue ''
|
|
893
930
|
*/
|
|
894
|
-
content = input('');
|
|
931
|
+
content = input('', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
895
932
|
/**
|
|
896
933
|
* Optional formatter function to transform content before display.
|
|
897
934
|
* - Returns string: Content will be inserted as text with built-in sanitization
|
|
@@ -904,25 +941,25 @@ class SiUserMessageComponent {
|
|
|
904
941
|
* **Warning:** When returning a Node, ensure the content is safe to prevent XSS attacks
|
|
905
942
|
* @defaultValue undefined
|
|
906
943
|
*/
|
|
907
|
-
contentFormatter = input(undefined);
|
|
944
|
+
contentFormatter = input(undefined, ...(ngDevMode ? [{ debugName: "contentFormatter" }] : []));
|
|
908
945
|
/**
|
|
909
946
|
* Primary message actions (edit, delete, copy, etc.).
|
|
910
947
|
* All actions displayed inline
|
|
911
948
|
* @defaultValue []
|
|
912
949
|
*/
|
|
913
|
-
actions = input([]);
|
|
950
|
+
actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
914
951
|
/**
|
|
915
952
|
* Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally
|
|
916
953
|
* @defaultValue []
|
|
917
954
|
*/
|
|
918
|
-
secondaryActions = input([]);
|
|
955
|
+
secondaryActions = input([], ...(ngDevMode ? [{ debugName: "secondaryActions" }] : []));
|
|
919
956
|
/**
|
|
920
957
|
* List of attachments included with this message
|
|
921
958
|
* @defaultValue []
|
|
922
959
|
*/
|
|
923
|
-
attachments = input([]);
|
|
960
|
+
attachments = input([], ...(ngDevMode ? [{ debugName: "attachments" }] : []));
|
|
924
961
|
/** Parameter to pass to action handlers */
|
|
925
|
-
actionParam = input();
|
|
962
|
+
actionParam = input(...(ngDevMode ? [undefined, { debugName: "actionParam" }] : []));
|
|
926
963
|
/**
|
|
927
964
|
* More actions button aria label
|
|
928
965
|
*
|
|
@@ -931,9 +968,9 @@ class SiUserMessageComponent {
|
|
|
931
968
|
* t(() => $localize`:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:More actions`)
|
|
932
969
|
* ```
|
|
933
970
|
*/
|
|
934
|
-
secondaryActionsLabel = input(t(() => $localize `:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:More actions`));
|
|
935
|
-
hasAttachments = computed(() => this.attachments()?.length > 0);
|
|
936
|
-
textContent = signal(undefined);
|
|
971
|
+
secondaryActionsLabel = input(t(() => $localize `:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:More actions`), ...(ngDevMode ? [{ debugName: "secondaryActionsLabel" }] : []));
|
|
972
|
+
hasAttachments = computed(() => this.attachments()?.length > 0, ...(ngDevMode ? [{ debugName: "hasAttachments" }] : []));
|
|
973
|
+
textContent = signal(undefined, ...(ngDevMode ? [{ debugName: "textContent" }] : []));
|
|
937
974
|
constructor() {
|
|
938
975
|
effect(() => {
|
|
939
976
|
const formatter = this.contentFormatter();
|
|
@@ -957,10 +994,10 @@ class SiUserMessageComponent {
|
|
|
957
994
|
}
|
|
958
995
|
});
|
|
959
996
|
}
|
|
960
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
961
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
997
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiUserMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
998
|
+
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 > 0) || (secondaryActions()?.length ?? 0 > 0)) {\n <div class=\"d-flex gap-4 user-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-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 > 0) {\n <button\n type=\"button\"\n class=\"btn btn-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon icon=\"element-optionsVertical\" />\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-input-experimental);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" }] });
|
|
962
999
|
}
|
|
963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiUserMessageComponent, decorators: [{
|
|
964
1001
|
type: Component,
|
|
965
1002
|
args: [{ selector: 'si-user-message', imports: [
|
|
966
1003
|
CdkMenuTrigger,
|
|
@@ -970,8 +1007,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
970
1007
|
SiMenuFactoryComponent,
|
|
971
1008
|
SiChatMessageActionDirective,
|
|
972
1009
|
SiTranslatePipe
|
|
973
|
-
], 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 > 0) || (secondaryActions()?.length ?? 0 > 0)) {\n <div class=\"d-flex gap-4 user-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-ghost btn-
|
|
974
|
-
}], ctorParameters: () => [] });
|
|
1010
|
+
], 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 > 0) || (secondaryActions()?.length ?? 0 > 0)) {\n <div class=\"d-flex gap-4 user-message-actions\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-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 > 0) {\n <button\n type=\"button\"\n class=\"btn btn-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon icon=\"element-optionsVertical\" />\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-input-experimental);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"] }]
|
|
1011
|
+
}], ctorParameters: () => [], propDecorators: { formattedContent: [{ type: i0.ViewChild, args: ['formattedContent', { isSignal: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], contentFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentFormatter", 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 }] }] } });
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* Copyright (c) Siemens 2016 - 2025
|
|
1015
|
+
* SPDX-License-Identifier: MIT
|
|
1016
|
+
*/
|
|
1017
|
+
/**
|
|
1018
|
+
* AI welcome screen component for displaying initial state in AI chat interfaces.
|
|
1019
|
+
*
|
|
1020
|
+
* The AI welcome screen component provides an engaging initial state for AI chat interfaces,
|
|
1021
|
+
* featuring a welcome message, optional prompt categories for filtering, and suggested prompts
|
|
1022
|
+
* that users can click to start conversations.
|
|
1023
|
+
*
|
|
1024
|
+
* The component includes:
|
|
1025
|
+
* - Welcome header with AI branding and customizable greeting
|
|
1026
|
+
* - Optional category pills for filtering prompt suggestions
|
|
1027
|
+
* - Clickable prompt suggestion cards
|
|
1028
|
+
* - Optional refresh button to regenerate suggestions
|
|
1029
|
+
*
|
|
1030
|
+
* @see {@link SiAiChatContainerComponent} for the AI chat container which uses this component
|
|
1031
|
+
* @see {@link SiChatContainerComponent} for the base chat container
|
|
1032
|
+
*
|
|
1033
|
+
* @experimental
|
|
1034
|
+
*/
|
|
1035
|
+
class SiAiWelcomeScreenComponent {
|
|
1036
|
+
/**
|
|
1037
|
+
* The list of prompt categories
|
|
1038
|
+
* @defaultValue []
|
|
1039
|
+
*/
|
|
1040
|
+
categories = input([], ...(ngDevMode ? [{ debugName: "categories" }] : []));
|
|
1041
|
+
/**
|
|
1042
|
+
* The currently selected category ID
|
|
1043
|
+
* @defaultValue undefined
|
|
1044
|
+
*/
|
|
1045
|
+
selectedCategory = model(undefined, ...(ngDevMode ? [{ debugName: "selectedCategory" }] : []));
|
|
1046
|
+
/**
|
|
1047
|
+
* The list of prompt suggestions as an array, update this when the selected category changes.
|
|
1048
|
+
* @defaultValue []
|
|
1049
|
+
*/
|
|
1050
|
+
promptSuggestions = input([], ...(ngDevMode ? [{ debugName: "promptSuggestions" }] : []));
|
|
1051
|
+
/**
|
|
1052
|
+
* Emitted when a prompt suggestion is clicked
|
|
1053
|
+
*/
|
|
1054
|
+
promptSelected = output();
|
|
1055
|
+
onCategoryClick(categoryLabel) {
|
|
1056
|
+
this.selectedCategory.set(this.selectedCategory() === categoryLabel ? undefined : categoryLabel);
|
|
1057
|
+
}
|
|
1058
|
+
onPromptClick(suggestion) {
|
|
1059
|
+
this.promptSelected.emit(suggestion);
|
|
1060
|
+
}
|
|
1061
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAiWelcomeScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1062
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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-10 align-items-center w-100\">\n <!-- Welcome Header -->\n <div class=\"welcome-header d-flex flex-column gap-4 w-100 pt-10 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:var(--element-base-input-experimental)}\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"] }] });
|
|
1063
|
+
}
|
|
1064
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAiWelcomeScreenComponent, decorators: [{
|
|
1065
|
+
type: Component,
|
|
1066
|
+
args: [{ selector: 'si-ai-welcome-screen', imports: [SiActionCardComponent, SiSummaryChipComponent, SiIconComponent], host: {
|
|
1067
|
+
class: 'd-block'
|
|
1068
|
+
}, template: "<div class=\"d-flex flex-column gap-10 align-items-center w-100\">\n <!-- Welcome Header -->\n <div class=\"welcome-header d-flex flex-column gap-4 w-100 pt-10 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:var(--element-base-input-experimental)}\n"] }]
|
|
1069
|
+
}], 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"] }] } });
|
|
975
1070
|
|
|
976
1071
|
/**
|
|
977
1072
|
* Copyright (c) Siemens 2016 - 2025
|
|
@@ -982,5 +1077,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
982
1077
|
* Generated bundle index. Do not edit.
|
|
983
1078
|
*/
|
|
984
1079
|
|
|
985
|
-
export { SiAiMessageComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
|
|
1080
|
+
export { SiAiMessageComponent, SiAiWelcomeScreenComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
|
|
986
1081
|
//# sourceMappingURL=siemens-element-ng-chat-messages.mjs.map
|