@siemens/element-ng 49.14.0 → 51.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +58 -40
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +83 -53
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +15 -12
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +176 -166
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +31 -21
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +21 -17
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +71 -46
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +57 -33
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +181 -117
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +39 -25
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +26 -17
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +56 -35
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +12 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +36 -27
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +335 -221
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +8 -8
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +119 -72
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +376 -244
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +22 -17
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +105 -91
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +32 -24
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +251 -153
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +345 -113
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +222 -316
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +40 -30
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +5 -5
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +46 -47
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +25 -25
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +120 -74
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +76 -56
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +46 -63
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +47 -30
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-maplibre.mjs +42 -0
- package/fesm2022/siemens-element-ng-maplibre.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +6 -5
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +56 -48
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +14 -11
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +249 -204
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +120 -83
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +72 -45
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +40 -28
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +32 -23
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +18 -13
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +123 -139
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +84 -51
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +63 -58
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +35 -27
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +38 -31
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +218 -163
- 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-side-panel.mjs +128 -86
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +21 -24
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +44 -29
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +273 -293
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +65 -51
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +26 -16
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +11 -8
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +20 -17
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +73 -70
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +29 -6
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +60 -41
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +45 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +105 -82
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +24 -18
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +96 -75
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +76 -70
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +72 -48
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/maplibre/package.json +4 -0
- package/maplibre/styles/_index.scss +1 -0
- package/maplibre/styles/maplibre-gl.scss +715 -0
- package/package.json +37 -23
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/element-class-changes.js +1 -28
- package/schematics/migrations/data/element-migration-data.js +2 -0
- package/schematics/migrations/data/element-selectors.js +1 -11
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +9 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +7 -7
- package/schematics/migrations/data/symbol-renaming.js +1 -48
- package/schematics/migrations/element-migration/element-migration.js +3 -6
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +2 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/migrate-split-sizes.js +105 -0
- package/schematics/ng-update/{migrate-to-v49.js → migrate-to-v51.js} +5 -3
- package/template-i18n.json +45 -47
- package/types/siemens-element-ng-application-header.d.ts +8 -28
- package/types/siemens-element-ng-breadcrumb.d.ts +1 -1
- package/types/siemens-element-ng-chat-messages.d.ts +11 -9
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-content-action-bar.d.ts +1 -1
- package/types/siemens-element-ng-dashboard.d.ts +2 -2
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +3 -14
- package/types/siemens-element-ng-electron-titlebar.d.ts +1 -1
- package/types/siemens-element-ng-file-uploader.d.ts +13 -31
- package/types/siemens-element-ng-filter-bar.d.ts +1 -1
- package/types/siemens-element-ng-filtered-search.d.ts +4 -4
- package/types/siemens-element-ng-form.d.ts +180 -44
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-ip-input.d.ts +1 -1
- package/types/siemens-element-ng-landing-page.d.ts +2 -2
- package/types/siemens-element-ng-loading-spinner.d.ts +7 -17
- package/types/siemens-element-ng-maplibre.d.ts +26 -0
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +86 -38
- package/types/siemens-element-ng-navbar-vertical.d.ts +1 -1
- package/types/siemens-element-ng-navbar.d.ts +3 -3
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +5 -8
- package/types/siemens-element-ng-photo-upload.d.ts +4 -4
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-search-bar.d.ts +1 -1
- package/types/siemens-element-ng-select.d.ts +1 -1
- package/types/siemens-element-ng-side-panel.d.ts +3 -3
- package/types/siemens-element-ng-split.d.ts +99 -70
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-tabs.d.ts +1 -2
- package/types/siemens-element-ng-theme.d.ts +12 -2
- package/types/siemens-element-ng-threshold.d.ts +1 -1
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-tooltip.d.ts +7 -7
- package/types/siemens-element-ng-translate.d.ts +2 -5
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1$3 from '@angular/cdk/overlay';
|
|
2
2
|
import { CdkOverlayOrigin, OverlayModule, Overlay } from '@angular/cdk/overlay';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, Directive, input,
|
|
4
|
+
import { InjectionToken, Directive, input, Component, booleanAttribute, output, computed, signal, inject, Input, ElementRef, viewChild, contentChild, TemplateRef, NgModule, model, ViewContainerRef, DestroyRef, PLATFORM_ID } from '@angular/core';
|
|
5
5
|
import { SI_FORM_ITEM_CONTROL } from '@siemens/element-ng/form';
|
|
6
6
|
import { SiTranslatePipe, t } from '@siemens/element-translate-ng/translate';
|
|
7
7
|
import { elementDown2, elementOk, elementSearch } from '@siemens/element-icons';
|
|
@@ -47,10 +47,10 @@ class SiSelectOptionTemplateDirective {
|
|
|
47
47
|
static ngTemplateContextGuard(directive, context) {
|
|
48
48
|
return true;
|
|
49
49
|
}
|
|
50
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
51
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
51
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SiSelectOptionTemplateDirective, isStandalone: true, selector: "[siSelectOptionTemplate]", ngImport: i0 });
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionTemplateDirective, decorators: [{
|
|
54
54
|
type: Directive,
|
|
55
55
|
args: [{
|
|
56
56
|
selector: '[siSelectOptionTemplate]'
|
|
@@ -62,14 +62,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
62
62
|
* SPDX-License-Identifier: MIT
|
|
63
63
|
*/
|
|
64
64
|
class SiSelectOptionComponent {
|
|
65
|
-
option = input.required(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
option = input.required(/* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "option" }] : /* istanbul ignore next */ []));
|
|
67
|
+
optionTemplate = input(/* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
69
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SiSelectOptionComponent, isStandalone: true, selector: "si-select-option", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "d-flex align-items-center overflow-hidden" }, ngImport: i0, template: "<ng-container\n [ngTemplateOutlet]=\"optionTemplate() ?? defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option() }\"\n/>\n\n<ng-template #defaultOptionTemplate let-item siSelectOptionTemplate>\n @if (item.icon) {\n <i class=\"icon-stack\">\n <si-icon\n class=\"icon me-2\"\n [icon]=\"item.icon\"\n [class]=\"!item.disabled && item.iconColor ? item.iconColor : ''\"\n />\n @if (item.stackedIcon) {\n <si-icon\n class=\"icon me-2\"\n [class]=\"item.stackedIconColor ?? ''\"\n [icon]=\"item.stackedIcon\"\n />\n }\n </i>\n }\n @if (item.label) {\n <span class=\"text-truncate\">{{ item.label | translate }}</span>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "directive", type: SiSelectOptionTemplateDirective, selector: "[siSelectOptionTemplate]" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
69
71
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionComponent, decorators: [{
|
|
71
73
|
type: Component,
|
|
72
|
-
args: [{ selector: 'si-select-option', imports: [NgTemplateOutlet, SiIconComponent, SiTranslatePipe, SiSelectOptionTemplateDirective],
|
|
74
|
+
args: [{ selector: 'si-select-option', imports: [NgTemplateOutlet, SiIconComponent, SiTranslatePipe, SiSelectOptionTemplateDirective], host: {
|
|
73
75
|
class: 'd-flex align-items-center overflow-hidden'
|
|
74
76
|
}, template: "<ng-container\n [ngTemplateOutlet]=\"optionTemplate() ?? defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option() }\"\n/>\n\n<ng-template #defaultOptionTemplate let-item siSelectOptionTemplate>\n @if (item.icon) {\n <i class=\"icon-stack\">\n <si-icon\n class=\"icon me-2\"\n [icon]=\"item.icon\"\n [class]=\"!item.disabled && item.iconColor ? item.iconColor : ''\"\n />\n @if (item.stackedIcon) {\n <si-icon\n class=\"icon me-2\"\n [class]=\"item.stackedIconColor ?? ''\"\n [icon]=\"item.stackedIcon\"\n />\n }\n </i>\n }\n @if (item.label) {\n <span class=\"text-truncate\">{{ item.label | translate }}</span>\n }\n</ng-template>\n" }]
|
|
75
77
|
}], propDecorators: { option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: true }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }] } });
|
|
@@ -88,7 +90,7 @@ class SiSelectSelectionStrategy {
|
|
|
88
90
|
* @defaultValue false
|
|
89
91
|
*/
|
|
90
92
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
91
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled', transform: booleanAttribute });
|
|
93
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
92
94
|
/**
|
|
93
95
|
* The selected value(s).
|
|
94
96
|
*/
|
|
@@ -101,16 +103,19 @@ class SiSelectSelectionStrategy {
|
|
|
101
103
|
* Provides the internal value always as an array
|
|
102
104
|
* @internal
|
|
103
105
|
*/
|
|
104
|
-
arrayValue = computed(() => this.selectOptions.selectedRows().map(option => option.value),
|
|
106
|
+
arrayValue = computed(() => this.selectOptions.selectedRows().map(option => option.value), /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "arrayValue" }] : /* istanbul ignore next */ []));
|
|
105
108
|
/**
|
|
106
109
|
* Registered form callback which shall be called on blur.
|
|
107
110
|
* @internal
|
|
108
111
|
*/
|
|
109
112
|
onTouched = () => { };
|
|
110
113
|
/** @internal */
|
|
111
|
-
disabled = computed(() => this.disabledInput() || this.disabledNgControl(),
|
|
114
|
+
disabled = computed(() => this.disabledInput() || this.disabledNgControl(), /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
112
116
|
onChange = () => { };
|
|
113
|
-
disabledNgControl = signal(false,
|
|
117
|
+
disabledNgControl = signal(false, /* @ts-ignore */
|
|
118
|
+
...(ngDevMode ? [{ debugName: "disabledNgControl" }] : /* istanbul ignore next */ []));
|
|
114
119
|
selectOptions = inject(SI_SELECT_OPTIONS_STRATEGY);
|
|
115
120
|
registerOnTouched(fn) {
|
|
116
121
|
this.onTouched = fn;
|
|
@@ -137,10 +142,10 @@ class SiSelectSelectionStrategy {
|
|
|
137
142
|
updateFromInput(values) {
|
|
138
143
|
this.selectOptions.onValueChange(values);
|
|
139
144
|
}
|
|
140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
141
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectSelectionStrategy, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
146
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: SiSelectSelectionStrategy, isStandalone: true, inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.disabled": "disabled()" } }, ngImport: i0 });
|
|
142
147
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectSelectionStrategy, decorators: [{
|
|
144
149
|
type: Directive,
|
|
145
150
|
args: [{
|
|
146
151
|
host: {
|
|
@@ -156,31 +161,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
156
161
|
* SPDX-License-Identifier: MIT
|
|
157
162
|
*/
|
|
158
163
|
class SiSelectInputComponent {
|
|
159
|
-
baseId = input.required(
|
|
164
|
+
baseId = input.required(/* @ts-ignore */
|
|
165
|
+
...(ngDevMode ? [{ debugName: "baseId" }] : /* istanbul ignore next */ []));
|
|
160
166
|
/**
|
|
161
167
|
* Aria labelledby of the select.
|
|
162
168
|
*
|
|
163
169
|
* @defaultValue null
|
|
164
170
|
*/
|
|
165
|
-
labelledby = input(null,
|
|
171
|
+
labelledby = input(null, /* @ts-ignore */
|
|
172
|
+
...(ngDevMode ? [{ debugName: "labelledby" }] : /* istanbul ignore next */ []));
|
|
166
173
|
/**
|
|
167
174
|
* Aria label of the select.
|
|
168
175
|
*
|
|
169
176
|
* @defaultValue null
|
|
170
177
|
*/
|
|
171
|
-
ariaLabel = input(null,
|
|
178
|
+
ariaLabel = input(null, /* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
172
180
|
/** @defaultValue false */
|
|
173
|
-
open = input(false, { ...(ngDevMode ? { debugName: "open" } : {}), transform: booleanAttribute });
|
|
174
|
-
placeholder = input(
|
|
175
|
-
|
|
176
|
-
|
|
181
|
+
open = input(false, { ...(ngDevMode ? { debugName: "open" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
182
|
+
placeholder = input(/* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
184
|
+
controls = input.required(/* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
|
|
186
|
+
optionTemplate = input(/* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
177
188
|
/** @defaultValue false */
|
|
178
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
189
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
179
190
|
openListbox = output();
|
|
180
191
|
selectionStrategy = inject((SiSelectSelectionStrategy));
|
|
181
192
|
selectOptions = inject(SI_SELECT_OPTIONS_STRATEGY);
|
|
182
193
|
selectedRows = this.selectOptions.selectedRows;
|
|
183
|
-
labeledBy = computed(() => `${this.baseId()}-aria-label ${this.labelledby()}`,
|
|
194
|
+
labeledBy = computed(() => `${this.baseId()}-aria-label ${this.labelledby()}`, /* @ts-ignore */
|
|
195
|
+
...(ngDevMode ? [{ debugName: "labeledBy" }] : /* istanbul ignore next */ []));
|
|
184
196
|
icons = addIcons({ elementDown2 });
|
|
185
197
|
blur() {
|
|
186
198
|
if (!this.open()) {
|
|
@@ -191,12 +203,12 @@ class SiSelectInputComponent {
|
|
|
191
203
|
event?.preventDefault();
|
|
192
204
|
this.openListbox.emit();
|
|
193
205
|
}
|
|
194
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
195
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SiSelectInputComponent, isStandalone: true, selector: "si-select-input", inputs: { baseId: { classPropertyName: "baseId", publicName: "baseId", isSignal: true, isRequired: true, transformFunction: null }, labelledby: { classPropertyName: "labelledby", publicName: "labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openListbox: "openListbox" }, host: { attributes: { "aria-autocomplete": "none" }, listeners: { "blur": "blur()", "click": "click($event)", "keydown.arrowDown": "click($event)", "keydown.alt.arrowDown": "click($event)", "keydown.arrowUp": "click($event)", "keydown.enter": "click($event)", "keydown.space": "click($event)" }, properties: { "attr.role": "readonly() ? \"textbox\": \"combobox\"", "attr.aria-haspopup": "readonly() ? undefined : \"listbox\"", "attr.aria-expanded": "readonly() ? undefined : open()", "attr.aria-controls": "readonly() ? undefined : controls()", "attr.aria-readonly": "readonly()", "attr.aria-labelledby": "labeledBy()", "attr.aria-disabled": "selectionStrategy.disabled()", "attr.tabindex": "selectionStrategy.disabled() ? \"-1\" : \"0\"", "class.disabled": "selectionStrategy.disabled()", "class.active": "open()" }, classAttribute: "select focus-none dropdown-toggle d-flex align-items-center ps-4" }, ngImport: i0, template: "@if (ariaLabel()) {\n <span class=\"visually-hidden\" [id]=\"baseId() + '-aria-label'\">{{ ariaLabel() }}</span>\n}\n<div\n class=\"d-flex align-items-center flex-fill overflow-hidden h-100\"\n [id]=\"baseId() + '-content'\"\n [siAutoCollapsableList]=\"selectionStrategy.allowMultiple && selectedRows().length > 1\"\n>\n @for (activeOption of selectedRows(); track activeOption) {\n @if (activeOption) {\n <si-select-option\n class=\"h-100\"\n siAutoCollapsableListItem\n [option]=\"activeOption\"\n [optionTemplate]=\"optionTemplate()\"\n [class.overflow-hidden]=\"!selectionStrategy.allowMultiple || $count === 1\"\n />\n }\n } @empty {\n <div class=\"text-secondary\">{{ placeholder() | translate }}</div>\n }\n @if (selectionStrategy.allowMultiple) {\n <div #overflowItem=\"siAutoCollapsableListOverflowItem\" siAutoCollapsableListOverflowItem>\n <div class=\"pill py-0 ms-2\"> {{ overflowItem.hiddenItemCount }}+</div>\n </div>\n }\n</div>\n<div class=\"form-control-actions\">\n <si-icon\n class=\"dropdown-caret icon flip-rtl ps-0 m-0\"\n [class.text-muted]=\"readonly()\"\n [icon]=\"icons.elementDown2\"\n />\n</div>\n", styles: ["@charset \"UTF-8\";:host{cursor:pointer;min-inline-size:72px;block-size:100%;color:var(--element-text-primary);padding-inline-end:calc(3px + var(--si-feedback-icon-size, 0px))}:host.disabled{color:var(--element-text-disabled)}:host-context(.form-control) :host{padding-block:3px;padding-inline-end:var(--si-input-padding-inline-end)}si-select-option+si-select-option:before{content:\",\\a0\"}\n"], dependencies: [{ kind: "ngmodule", type: SiAutoCollapsableListModule }, { kind: "directive", type: i1.SiAutoCollapsableListDirective, selector: "[siAutoCollapsableList]", inputs: ["siAutoCollapsableList", "gap", "siAutoCollapsableListContainerElement"], exportAs: ["siAutoCollapsableList"] }, { kind: "directive", type: i1.SiAutoCollapsableListItemDirective, selector: "[siAutoCollapsableListItem]", inputs: ["forceHide"], exportAs: ["siAutoCollapsableListItem"] }, { kind: "directive", type: i1.SiAutoCollapsableListOverflowItemDirective, selector: "[siAutoCollapsableListOverflowItem]", exportAs: ["siAutoCollapsableListOverflowItem"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiSelectOptionComponent, selector: "si-select-option", inputs: ["option", "optionTemplate"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
196
208
|
}
|
|
197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectInputComponent, decorators: [{
|
|
198
210
|
type: Component,
|
|
199
|
-
args: [{ selector: 'si-select-input', imports: [SiAutoCollapsableListModule, SiIconComponent, SiSelectOptionComponent, SiTranslatePipe],
|
|
211
|
+
args: [{ selector: 'si-select-input', imports: [SiAutoCollapsableListModule, SiIconComponent, SiSelectOptionComponent, SiTranslatePipe], host: {
|
|
200
212
|
// In readonly mode, the select needs to be announced as a textbox.
|
|
201
213
|
// Otherwise, screen-reader won't announce the readonly state.
|
|
202
214
|
class: 'select focus-none dropdown-toggle d-flex align-items-center ps-4',
|
|
@@ -218,7 +230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
218
230
|
'(keydown.arrowUp)': 'click($event)',
|
|
219
231
|
'(keydown.enter)': 'click($event)',
|
|
220
232
|
'(keydown.space)': 'click($event)'
|
|
221
|
-
}, template: "@if (ariaLabel()) {\n <span class=\"visually-hidden\" [id]=\"baseId() + '-aria-label'\">{{ ariaLabel() }}</span>\n}\n<div\n class=\"d-flex align-items-center flex-fill overflow-hidden\"\n [id]=\"baseId() + '-content'\"\n [siAutoCollapsableList]=\"selectionStrategy.allowMultiple && selectedRows().length > 1\"\n>\n @for (activeOption of selectedRows(); track activeOption) {\n @if (activeOption) {\n <si-select-option\n siAutoCollapsableListItem\n [option]=\"activeOption\"\n [optionTemplate]=\"optionTemplate()\"\n [class.overflow-hidden]=\"!selectionStrategy.allowMultiple || $count === 1\"\n />\n }\n } @empty {\n <div class=\"text-secondary\">{{ placeholder() | translate }}</div>\n }\n @if (selectionStrategy.allowMultiple) {\n <div #overflowItem=\"siAutoCollapsableListOverflowItem\" siAutoCollapsableListOverflowItem>\n <div class=\"pill py-0 ms-2\"> {{ overflowItem.hiddenItemCount }}+</div>\n </div>\n }\n</div>\n<div class=\"form-control-actions\">\n <si-icon\n class=\"dropdown-caret icon flip-rtl ps-0 m-0\"\n [class.text-muted]=\"readonly()\"\n [icon]=\"icons.elementDown2\"\n />\n</div>\n", styles: ["@charset \"UTF-8\";:host{cursor:pointer;
|
|
233
|
+
}, template: "@if (ariaLabel()) {\n <span class=\"visually-hidden\" [id]=\"baseId() + '-aria-label'\">{{ ariaLabel() }}</span>\n}\n<div\n class=\"d-flex align-items-center flex-fill overflow-hidden h-100\"\n [id]=\"baseId() + '-content'\"\n [siAutoCollapsableList]=\"selectionStrategy.allowMultiple && selectedRows().length > 1\"\n>\n @for (activeOption of selectedRows(); track activeOption) {\n @if (activeOption) {\n <si-select-option\n class=\"h-100\"\n siAutoCollapsableListItem\n [option]=\"activeOption\"\n [optionTemplate]=\"optionTemplate()\"\n [class.overflow-hidden]=\"!selectionStrategy.allowMultiple || $count === 1\"\n />\n }\n } @empty {\n <div class=\"text-secondary\">{{ placeholder() | translate }}</div>\n }\n @if (selectionStrategy.allowMultiple) {\n <div #overflowItem=\"siAutoCollapsableListOverflowItem\" siAutoCollapsableListOverflowItem>\n <div class=\"pill py-0 ms-2\"> {{ overflowItem.hiddenItemCount }}+</div>\n </div>\n }\n</div>\n<div class=\"form-control-actions\">\n <si-icon\n class=\"dropdown-caret icon flip-rtl ps-0 m-0\"\n [class.text-muted]=\"readonly()\"\n [icon]=\"icons.elementDown2\"\n />\n</div>\n", styles: ["@charset \"UTF-8\";:host{cursor:pointer;min-inline-size:72px;block-size:100%;color:var(--element-text-primary);padding-inline-end:calc(3px + var(--si-feedback-icon-size, 0px))}:host.disabled{color:var(--element-text-disabled)}:host-context(.form-control) :host{padding-block:3px;padding-inline-end:var(--si-input-padding-inline-end)}si-select-option+si-select-option:before{content:\",\\a0\"}\n"] }]
|
|
222
234
|
}], propDecorators: { baseId: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseId", required: true }] }], labelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelledby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: true }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], openListbox: [{ type: i0.Output, args: ["openListbox"] }] } });
|
|
223
235
|
|
|
224
236
|
/**
|
|
@@ -226,17 +238,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
226
238
|
* SPDX-License-Identifier: MIT
|
|
227
239
|
*/
|
|
228
240
|
class SiSelectOptionRowComponent {
|
|
229
|
-
option = input.required(
|
|
230
|
-
|
|
241
|
+
option = input.required(/* @ts-ignore */
|
|
242
|
+
...(ngDevMode ? [{ debugName: "option" }] : /* istanbul ignore next */ []));
|
|
243
|
+
optionTemplate = input(/* @ts-ignore */
|
|
244
|
+
...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
231
245
|
/** @defaultValue false */
|
|
232
|
-
selected = input(false, { ...(ngDevMode ? { debugName: "selected" } : {}), transform: booleanAttribute });
|
|
246
|
+
selected = input(false, { ...(ngDevMode ? { debugName: "selected" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
233
247
|
icons = addIcons({ elementOk });
|
|
234
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
235
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
248
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
249
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SiSelectOptionRowComponent, isStandalone: true, selector: "si-select-option-row", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.disabled": "!!this.option().disabled", "attr.aria-selected": "selected()", "attr.data-id": "this.option().value" }, classAttribute: "dropdown-item focus-none pe-4 gap-4" }, ngImport: i0, template: "<span\n class=\"form-check-input si-form-checkbox\"\n [class.checked]=\"selected()\"\n [class.disabled]=\"option().disabled\"\n></span>\n<si-select-option [option]=\"option()\" [optionTemplate]=\"optionTemplate()\" />\n@if (selected()) {\n <span class=\"ms-auto selected-marker\" aria-hidden=\"true\">\n <si-icon class=\"d-block icon\" [icon]=\"icons.elementOk\" />\n </span>\n}\n", styles: [".selected-marker>span{font-size:1.5rem;margin-inline-end:0}.form-check-input{display:none}:host-context(.si-multi-select) .selected-marker{display:none}:host-context(.si-multi-select) .form-check-input{display:block}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiSelectOptionComponent, selector: "si-select-option", inputs: ["option", "optionTemplate"] }] });
|
|
236
250
|
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionRowComponent, decorators: [{
|
|
238
252
|
type: Component,
|
|
239
|
-
args: [{ selector: 'si-select-option-row', imports: [SiIconComponent, SiSelectOptionComponent],
|
|
253
|
+
args: [{ selector: 'si-select-option-row', imports: [SiIconComponent, SiSelectOptionComponent], host: {
|
|
240
254
|
class: 'dropdown-item focus-none pe-4 gap-4',
|
|
241
255
|
'[class.disabled]': '!!this.option().disabled',
|
|
242
256
|
'[attr.aria-selected]': 'selected()',
|
|
@@ -271,10 +285,10 @@ class SiSelectGroupTemplateDirective {
|
|
|
271
285
|
static ngTemplateContextGuard(directive, context) {
|
|
272
286
|
return true;
|
|
273
287
|
}
|
|
274
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
275
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
288
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectGroupTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
289
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SiSelectGroupTemplateDirective, isStandalone: true, selector: "[siSelectGroupTemplate]", ngImport: i0 });
|
|
276
290
|
}
|
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectGroupTemplateDirective, decorators: [{
|
|
278
292
|
type: Directive,
|
|
279
293
|
args: [{
|
|
280
294
|
selector: '[siSelectGroupTemplate]'
|
|
@@ -289,10 +303,10 @@ class SiSelectOptionRowTemplateDirective {
|
|
|
289
303
|
static ngTemplateContextGuard(directive, context) {
|
|
290
304
|
return true;
|
|
291
305
|
}
|
|
292
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
293
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
306
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionRowTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
307
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SiSelectOptionRowTemplateDirective, isStandalone: true, selector: "[siSelectOptionRowTemplate]", ngImport: i0 });
|
|
294
308
|
}
|
|
295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionRowTemplateDirective, decorators: [{
|
|
296
310
|
type: Directive,
|
|
297
311
|
args: [{
|
|
298
312
|
selector: '[siSelectOptionRowTemplate]'
|
|
@@ -304,12 +318,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
304
318
|
* SPDX-License-Identifier: MIT
|
|
305
319
|
*/
|
|
306
320
|
class SiSelectListBase {
|
|
307
|
-
baseId = input.required(
|
|
308
|
-
|
|
309
|
-
|
|
321
|
+
baseId = input.required(/* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "baseId" }] : /* istanbul ignore next */ []));
|
|
323
|
+
optionTemplate = input(/* @ts-ignore */
|
|
324
|
+
...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
325
|
+
groupTemplate = input(/* @ts-ignore */
|
|
326
|
+
...(ngDevMode ? [undefined, { debugName: "groupTemplate" }] : /* istanbul ignore next */ []));
|
|
310
327
|
/** @defaultValue null */
|
|
311
|
-
labelledby = input(null,
|
|
312
|
-
|
|
328
|
+
labelledby = input(null, /* @ts-ignore */
|
|
329
|
+
...(ngDevMode ? [{ debugName: "labelledby" }] : /* istanbul ignore next */ []));
|
|
330
|
+
actionsTemplate = input(/* @ts-ignore */
|
|
331
|
+
...(ngDevMode ? [undefined, { debugName: "actionsTemplate" }] : /* istanbul ignore next */ []));
|
|
313
332
|
closeOverlay = output();
|
|
314
333
|
selectionStrategy = inject(SiSelectSelectionStrategy);
|
|
315
334
|
selectOptions = inject(SI_SELECT_OPTIONS_STRATEGY);
|
|
@@ -338,10 +357,10 @@ class SiSelectListBase {
|
|
|
338
357
|
this.closeOverlayAlways();
|
|
339
358
|
}
|
|
340
359
|
}
|
|
341
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
342
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
360
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectListBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
361
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: SiSelectListBase, isStandalone: true, inputs: { baseId: { classPropertyName: "baseId", publicName: "baseId", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupTemplate: { classPropertyName: "groupTemplate", publicName: "groupTemplate", isSignal: true, isRequired: false, transformFunction: null }, labelledby: { classPropertyName: "labelledby", publicName: "labelledby", isSignal: true, isRequired: false, transformFunction: null }, actionsTemplate: { classPropertyName: "actionsTemplate", publicName: "actionsTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeOverlay: "closeOverlay" }, host: { listeners: { "keydown.tab": "keydownTab()" }, properties: { "class.si-multi-select": "multiSelect" }, classAttribute: "dropdown-menu position-static w-100 py-4 d-flex flex-column" }, ngImport: i0 });
|
|
343
362
|
}
|
|
344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectListBase, decorators: [{
|
|
345
364
|
type: Directive,
|
|
346
365
|
args: [{
|
|
347
366
|
host: {
|
|
@@ -358,12 +377,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
358
377
|
*/
|
|
359
378
|
class SiSelectListHasFilterComponent extends SiSelectListBase {
|
|
360
379
|
/** Placeholder for search input field. */
|
|
361
|
-
filterPlaceholder = input.required(
|
|
380
|
+
filterPlaceholder = input.required(/* @ts-ignore */
|
|
381
|
+
...(ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
|
|
362
382
|
/** Label if no item can be found. */
|
|
363
|
-
noResultsFoundLabel = input.required(
|
|
364
|
-
|
|
383
|
+
noResultsFoundLabel = input.required(/* @ts-ignore */
|
|
384
|
+
...(ngDevMode ? [{ debugName: "noResultsFoundLabel" }] : /* istanbul ignore next */ []));
|
|
385
|
+
filterInput = viewChild.required('filter', /* @ts-ignore */
|
|
386
|
+
...(ngDevMode ? [{ debugName: "filterInput" }] : /* istanbul ignore next */ []));
|
|
365
387
|
initIndex;
|
|
366
|
-
id = computed(() => `${this.baseId()}-listbox`,
|
|
388
|
+
id = computed(() => `${this.baseId()}-listbox`, /* @ts-ignore */
|
|
389
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
367
390
|
icons = addIcons({ elementSearch });
|
|
368
391
|
constructor() {
|
|
369
392
|
super();
|
|
@@ -372,10 +395,12 @@ class SiSelectListHasFilterComponent extends SiSelectListBase {
|
|
|
372
395
|
}
|
|
373
396
|
const firstValue = this.selectionStrategy.arrayValue()[0];
|
|
374
397
|
if (firstValue) {
|
|
375
|
-
this.initIndex = computed(() => this.rows().findIndex(row => row.type === 'option' && row.value === firstValue),
|
|
398
|
+
this.initIndex = computed(() => this.rows().findIndex(row => row.type === 'option' && row.value === firstValue), /* @ts-ignore */
|
|
399
|
+
...(ngDevMode ? [{ debugName: "initIndex" }] : /* istanbul ignore next */ []));
|
|
376
400
|
}
|
|
377
401
|
else {
|
|
378
|
-
this.initIndex = signal(0,
|
|
402
|
+
this.initIndex = signal(0, /* @ts-ignore */
|
|
403
|
+
...(ngDevMode ? [{ debugName: "initIndex" }] : /* istanbul ignore next */ []));
|
|
379
404
|
}
|
|
380
405
|
}
|
|
381
406
|
ngOnInit() {
|
|
@@ -400,10 +425,10 @@ class SiSelectListHasFilterComponent extends SiSelectListBase {
|
|
|
400
425
|
}
|
|
401
426
|
this.closeOverlayIfSingle();
|
|
402
427
|
}
|
|
403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
404
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
428
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectListHasFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
429
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SiSelectListHasFilterComponent, isStandalone: true, selector: "si-select-list-has-filter", inputs: { filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: true, transformFunction: null }, noResultsFoundLabel: { classPropertyName: "noResultsFoundLabel", publicName: "noResultsFoundLabel", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.id": "id()" }, classAttribute: "pt-0" }, viewQueries: [{ propertyName: "filterInput", first: true, predicate: ["filter"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"pt-5 pb-5 px-5 top-0\">\n <div class=\"position-relative\">\n <input\n #filter\n #siAutocomplete=\"siAutocomplete\"\n siAutocomplete\n class=\"form-control icon-start border-0 rounded-2 bg-base-0\"\n [placeholder]=\"filterPlaceholder() | translate\"\n [id]=\"baseId() + 'filter-input'\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (input)=\"input()\"\n />\n <si-icon\n class=\"icon text-secondary position-absolute top-0 bottom-0 d-flex align-items-center ps-2\"\n [icon]=\"icons.elementSearch\"\n />\n @if (selectOptions.loading?.()) {\n <si-loading-spinner class=\"position-absolute end-0 bottom-0 d-flex align-items-center p-2\" />\n }\n </div>\n</div>\n<div\n class=\"si-select-filtered-items\"\n tabindex=\"-1\"\n [siAutocompleteListboxFor]=\"siAutocomplete\"\n [siAutocompleteDefaultIndex]=\"initIndex()\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (siAutocompleteOptionSubmitted)=\"select($event)\"\n>\n @for (item of rows(); track item; let index = $index) {\n @if (item.type === 'group') {\n <div\n role=\"group\"\n class=\"ps-0\"\n aria-disabled=\"false\"\n [attr.aria-labelledby]=\"baseId() + '-' + index + '-group-header'\"\n >\n <div class=\"dropdown-header\" [id]=\"baseId() + '-' + index + '-group-header'\">\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate() ?? defaultGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </div>\n @for (optionRow of item.options; track optionRow) {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: optionRow }\"\n />\n }\n </div>\n }\n @if (item.type === 'option') {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n } @empty {\n <div\n role=\"option\"\n aria-disabled=\"true\"\n aria-selected=\"false\"\n class=\"dropdown-item disabled text-secondary justify-content-center mb-2\"\n >\n <span>{{ noResultsFoundLabel() | translate }}</span>\n </div>\n }\n\n <ng-template #optionRowTemplate let-option siSelectOptionRowTemplate>\n <si-select-option-row\n [option]=\"option\"\n [optionTemplate]=\"optionTemplate()\"\n [siAutocompleteOption]=\"option.value\"\n [disabled]=\"option.disabled\"\n [selected]=\"selectionStrategy.arrayValue().includes(option.value)\"\n />\n </ng-template>\n</div>\n@if (actionsTemplate()) {\n <div class=\"dropdown-divider\"></div>\n <div class=\"d-flex flex-column align-items-start\">\n <ng-container\n [ngTemplateOutlet]=\"actionsTemplate()!\"\n [ngTemplateOutletContext]=\"{\n searchText: filter.value,\n visibleOptionsCount: rows().length\n }\"\n />\n </div>\n}\n\n<ng-template #defaultGroupTemplate let-group siSelectGroupTemplate>\n {{ group.label | translate }}\n</ng-template>\n", styles: [".si-select-filtered-items{max-block-size:min(100vb - 56px,266px);overflow-y:auto}si-loading-spinner{--loading-spinner-size: 1.25rem}.icon-start{padding-inline-start:calc(1.25rem + 12px)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SiAutocompleteDirective, selector: "input[siAutocomplete]", exportAs: ["siAutocomplete"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "directive", type: SiSelectGroupTemplateDirective, selector: "[siSelectGroupTemplate]" }, { kind: "component", type: SiSelectOptionRowComponent, selector: "si-select-option-row", inputs: ["option", "optionTemplate", "selected"] }, { kind: "directive", type: SiSelectOptionRowTemplateDirective, selector: "[siSelectOptionRowTemplate]" }, { kind: "ngmodule", type: SiAutocompleteModule }, { kind: "directive", type: i1$1.SiAutocompleteListboxDirective, selector: "[siAutocompleteListboxFor]", inputs: ["id", "siAutocompleteListboxFor", "siAutocompleteDefaultIndex"], outputs: ["siAutocompleteOptionSubmitted"], exportAs: ["siAutocompleteListbox"] }, { kind: "directive", type: i1$1.SiAutocompleteOptionDirective, selector: "[siAutocompleteOption]", inputs: ["id", "disabled", "siAutocompleteOption"], exportAs: ["siAutocompleteOption"] }, { kind: "component", type: SiLoadingSpinnerComponent, selector: "si-loading-spinner", inputs: ["isBlockingSpinner", "isSpinnerOverlay", "ariaLabel"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
405
430
|
}
|
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectListHasFilterComponent, decorators: [{
|
|
407
432
|
type: Component,
|
|
408
433
|
args: [{ selector: 'si-select-list-has-filter', imports: [
|
|
409
434
|
NgTemplateOutlet,
|
|
@@ -415,7 +440,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
415
440
|
SiTranslatePipe,
|
|
416
441
|
SiAutocompleteModule,
|
|
417
442
|
SiLoadingSpinnerComponent
|
|
418
|
-
],
|
|
443
|
+
], host: {
|
|
419
444
|
class: 'pt-0',
|
|
420
445
|
'[attr.id]': 'id()'
|
|
421
446
|
}, template: "<div class=\"pt-5 pb-5 px-5 top-0\">\n <div class=\"position-relative\">\n <input\n #filter\n #siAutocomplete=\"siAutocomplete\"\n siAutocomplete\n class=\"form-control icon-start border-0 rounded-2 bg-base-0\"\n [placeholder]=\"filterPlaceholder() | translate\"\n [id]=\"baseId() + 'filter-input'\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (input)=\"input()\"\n />\n <si-icon\n class=\"icon text-secondary position-absolute top-0 bottom-0 d-flex align-items-center ps-2\"\n [icon]=\"icons.elementSearch\"\n />\n @if (selectOptions.loading?.()) {\n <si-loading-spinner class=\"position-absolute end-0 bottom-0 d-flex align-items-center p-2\" />\n }\n </div>\n</div>\n<div\n class=\"si-select-filtered-items\"\n tabindex=\"-1\"\n [siAutocompleteListboxFor]=\"siAutocomplete\"\n [siAutocompleteDefaultIndex]=\"initIndex()\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (siAutocompleteOptionSubmitted)=\"select($event)\"\n>\n @for (item of rows(); track item; let index = $index) {\n @if (item.type === 'group') {\n <div\n role=\"group\"\n class=\"ps-0\"\n aria-disabled=\"false\"\n [attr.aria-labelledby]=\"baseId() + '-' + index + '-group-header'\"\n >\n <div class=\"dropdown-header\" [id]=\"baseId() + '-' + index + '-group-header'\">\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate() ?? defaultGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </div>\n @for (optionRow of item.options; track optionRow) {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: optionRow }\"\n />\n }\n </div>\n }\n @if (item.type === 'option') {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n } @empty {\n <div\n role=\"option\"\n aria-disabled=\"true\"\n aria-selected=\"false\"\n class=\"dropdown-item disabled text-secondary justify-content-center mb-2\"\n >\n <span>{{ noResultsFoundLabel() | translate }}</span>\n </div>\n }\n\n <ng-template #optionRowTemplate let-option siSelectOptionRowTemplate>\n <si-select-option-row\n [option]=\"option\"\n [optionTemplate]=\"optionTemplate()\"\n [siAutocompleteOption]=\"option.value\"\n [disabled]=\"option.disabled\"\n [selected]=\"selectionStrategy.arrayValue().includes(option.value)\"\n />\n </ng-template>\n</div>\n@if (actionsTemplate()) {\n <div class=\"dropdown-divider\"></div>\n <div class=\"d-flex flex-column align-items-start\">\n <ng-container\n [ngTemplateOutlet]=\"actionsTemplate()!\"\n [ngTemplateOutletContext]=\"{\n searchText: filter.value,\n visibleOptionsCount: rows().length\n }\"\n />\n </div>\n}\n\n<ng-template #defaultGroupTemplate let-group siSelectGroupTemplate>\n {{ group.label | translate }}\n</ng-template>\n", styles: [".si-select-filtered-items{max-block-size:min(100vb - 56px,266px);overflow-y:auto}si-loading-spinner{--loading-spinner-size: 1.25rem}.icon-start{padding-inline-start:calc(1.25rem + 12px)}\n"] }]
|
|
@@ -426,9 +451,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
426
451
|
* SPDX-License-Identifier: MIT
|
|
427
452
|
*/
|
|
428
453
|
class SiSelectListComponent extends SiSelectListBase {
|
|
429
|
-
listbox = viewChild.required(CdkListbox, {
|
|
430
|
-
read: ElementRef
|
|
431
|
-
});
|
|
454
|
+
listbox = viewChild.required(CdkListbox, { ...(ngDevMode ? { debugName: "listbox" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
432
455
|
ngOnInit() {
|
|
433
456
|
super.ngOnInit();
|
|
434
457
|
setTimeout(() => this.listbox().nativeElement.focus());
|
|
@@ -436,10 +459,10 @@ class SiSelectListComponent extends SiSelectListBase {
|
|
|
436
459
|
listBoxValueChange(changeEvent) {
|
|
437
460
|
this.selectionStrategy.updateFromUser(changeEvent.value.slice());
|
|
438
461
|
}
|
|
439
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
440
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
462
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
463
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SiSelectListComponent, isStandalone: true, selector: "si-select-list", viewQueries: [{ propertyName: "listbox", first: true, predicate: CdkListbox, descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n cdkListbox\n class=\"dropdown-menu-scroller focus-none\"\n [id]=\"baseId() + '-listbox'\"\n [cdkListboxMultiple]=\"selectionStrategy.allowMultiple\"\n [cdkListboxValue]=\"selectionStrategy.arrayValue()\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (cdkListboxValueChange)=\"listBoxValueChange($event)\"\n (click)=\"closeOverlayIfSingle()\"\n (keydown.enter)=\"closeOverlayIfSingle()\"\n (keydown.space)=\"closeOverlayIfSingle()\"\n>\n @for (item of rows(); track item; let index = $index) {\n @if (item.type === 'group') {\n <div\n role=\"group\"\n class=\"ps-0\"\n aria-disabled=\"false\"\n [attr.aria-labelledby]=\"baseId() + '-' + index + '-group-header'\"\n >\n <span class=\"dropdown-header\" [id]=\"baseId() + '-' + index + '-group-header'\">\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate() ?? defaultGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </span>\n @for (optionRow of item.options; track optionRow) {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: optionRow }\"\n />\n }\n </div>\n }\n @if (item.type === 'option') {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n }\n <ng-template #optionRowTemplate let-option siSelectOptionRowTemplate>\n <si-select-option-row\n #cdkOption=\"cdkOption\"\n [option]=\"option\"\n [optionTemplate]=\"optionTemplate()\"\n [cdkOption]=\"option.value\"\n [cdkOptionDisabled]=\"!!option.disabled\"\n [cdkOptionTypeaheadLabel]=\"(option.typeaheadLabel | translate)!\"\n [class.active]=\"cdkOption.isActive()\"\n [selected]=\"cdkOption.isSelected()\"\n />\n </ng-template>\n</div>\n@if (actionsTemplate()) {\n <div class=\"dropdown-divider\"></div>\n <div class=\"d-flex flex-column align-items-start\">\n <ng-container [ngTemplateOutlet]=\"actionsTemplate()!\" />\n </div>\n}\n\n<ng-template #defaultGroupTemplate let-group siSelectGroupTemplate>\n {{ group.label | translate }}\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "directive", type: SiSelectOptionRowTemplateDirective, selector: "[siSelectOptionRowTemplate]" }, { kind: "directive", type: SiSelectGroupTemplateDirective, selector: "[siSelectGroupTemplate]" }, { kind: "component", type: SiSelectOptionRowComponent, selector: "si-select-option-row", inputs: ["option", "optionTemplate", "selected"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
441
464
|
}
|
|
442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectListComponent, decorators: [{
|
|
443
466
|
type: Component,
|
|
444
467
|
args: [{ selector: 'si-select-list', imports: [
|
|
445
468
|
CommonModule,
|
|
@@ -449,7 +472,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
449
472
|
SiSelectOptionRowTemplateDirective,
|
|
450
473
|
SiSelectGroupTemplateDirective,
|
|
451
474
|
SiSelectOptionRowComponent
|
|
452
|
-
],
|
|
475
|
+
], template: "<div\n cdkListbox\n class=\"dropdown-menu-scroller focus-none\"\n [id]=\"baseId() + '-listbox'\"\n [cdkListboxMultiple]=\"selectionStrategy.allowMultiple\"\n [cdkListboxValue]=\"selectionStrategy.arrayValue()\"\n [attr.aria-labelledby]=\"baseId() + '-aria-label' + ' ' + labelledby()\"\n (cdkListboxValueChange)=\"listBoxValueChange($event)\"\n (click)=\"closeOverlayIfSingle()\"\n (keydown.enter)=\"closeOverlayIfSingle()\"\n (keydown.space)=\"closeOverlayIfSingle()\"\n>\n @for (item of rows(); track item; let index = $index) {\n @if (item.type === 'group') {\n <div\n role=\"group\"\n class=\"ps-0\"\n aria-disabled=\"false\"\n [attr.aria-labelledby]=\"baseId() + '-' + index + '-group-header'\"\n >\n <span class=\"dropdown-header\" [id]=\"baseId() + '-' + index + '-group-header'\">\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate() ?? defaultGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </span>\n @for (optionRow of item.options; track optionRow) {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: optionRow }\"\n />\n }\n </div>\n }\n @if (item.type === 'option') {\n <ng-container\n [ngTemplateOutlet]=\"optionRowTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n }\n <ng-template #optionRowTemplate let-option siSelectOptionRowTemplate>\n <si-select-option-row\n #cdkOption=\"cdkOption\"\n [option]=\"option\"\n [optionTemplate]=\"optionTemplate()\"\n [cdkOption]=\"option.value\"\n [cdkOptionDisabled]=\"!!option.disabled\"\n [cdkOptionTypeaheadLabel]=\"(option.typeaheadLabel | translate)!\"\n [class.active]=\"cdkOption.isActive()\"\n [selected]=\"cdkOption.isSelected()\"\n />\n </ng-template>\n</div>\n@if (actionsTemplate()) {\n <div class=\"dropdown-divider\"></div>\n <div class=\"d-flex flex-column align-items-start\">\n <ng-container [ngTemplateOutlet]=\"actionsTemplate()!\" />\n </div>\n}\n\n<ng-template #defaultGroupTemplate let-group siSelectGroupTemplate>\n {{ group.label | translate }}\n</ng-template>\n" }]
|
|
453
476
|
}], propDecorators: { listbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkListbox), { ...{
|
|
454
477
|
read: ElementRef
|
|
455
478
|
}, isSignal: true }] }] } });
|
|
@@ -463,10 +486,10 @@ class SiSelectActionsDirective {
|
|
|
463
486
|
static ngTemplateContextGuard(directive, context) {
|
|
464
487
|
return true;
|
|
465
488
|
}
|
|
466
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
467
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
489
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
490
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SiSelectActionsDirective, isStandalone: true, selector: "[siSelectActions]", exportAs: ["si-select-actions"], ngImport: i0 });
|
|
468
491
|
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectActionsDirective, decorators: [{
|
|
470
493
|
type: Directive,
|
|
471
494
|
args: [{
|
|
472
495
|
selector: '[siSelectActions]',
|
|
@@ -488,28 +511,31 @@ class SiSelectComponent {
|
|
|
488
511
|
* `__si-select-${SiSelectComponent.idCounter++}`
|
|
489
512
|
* ```
|
|
490
513
|
*/
|
|
491
|
-
id = input(`__si-select-${SiSelectComponent.idCounter++}`,
|
|
514
|
+
id = input(`__si-select-${SiSelectComponent.idCounter++}`, /* @ts-ignore */
|
|
515
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
492
516
|
/**
|
|
493
517
|
* Aria label of the select.
|
|
494
518
|
*
|
|
495
519
|
* @defaultValue null
|
|
496
520
|
*/
|
|
497
|
-
ariaLabel = input(null,
|
|
521
|
+
ariaLabel = input(null, /* @ts-ignore */
|
|
522
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
498
523
|
/**
|
|
499
524
|
* Aria labelledby of the select.
|
|
500
525
|
* @defaultValue undefined
|
|
501
526
|
*/
|
|
502
527
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
503
|
-
labelledbyInput = input(undefined, { ...(ngDevMode ? { debugName: "labelledbyInput" } : {}), alias: 'labelledby' });
|
|
528
|
+
labelledbyInput = input(undefined, { ...(ngDevMode ? { debugName: "labelledbyInput" } : /* istanbul ignore next */ {}), alias: 'labelledby' });
|
|
504
529
|
/**
|
|
505
530
|
* Placeholder for search input field.
|
|
506
531
|
*
|
|
507
532
|
* @defaultValue
|
|
508
533
|
* ```
|
|
509
|
-
* t(() => $localize`:@@SI_SELECT.SEARCH-PLACEHOLDER:Search
|
|
534
|
+
* t(() => $localize`:@@SI_SELECT.SEARCH-PLACEHOLDER:Search…`)
|
|
510
535
|
* ```
|
|
511
536
|
*/
|
|
512
|
-
filterPlaceholder = input(t(() => $localize `:@@SI_SELECT.SEARCH-PLACEHOLDER:Search
|
|
537
|
+
filterPlaceholder = input(t(() => $localize `:@@SI_SELECT.SEARCH-PLACEHOLDER:Search…`), /* @ts-ignore */
|
|
538
|
+
...(ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
|
|
513
539
|
/**
|
|
514
540
|
* Label if no item can be found.
|
|
515
541
|
*
|
|
@@ -518,26 +544,28 @@ class SiSelectComponent {
|
|
|
518
544
|
* t(() => $localize`:@@SI_SELECT.NO-RESULTS-FOUND:No results found`)
|
|
519
545
|
* ```
|
|
520
546
|
*/
|
|
521
|
-
noResultsFoundLabel = input(t(() => $localize `:@@SI_SELECT.NO-RESULTS-FOUND:No results found`),
|
|
547
|
+
noResultsFoundLabel = input(t(() => $localize `:@@SI_SELECT.NO-RESULTS-FOUND:No results found`), /* @ts-ignore */
|
|
548
|
+
...(ngDevMode ? [{ debugName: "noResultsFoundLabel" }] : /* istanbul ignore next */ []));
|
|
522
549
|
/** Placeholder text to display when no options are selected. */
|
|
523
|
-
placeholder = input(
|
|
550
|
+
placeholder = input(/* @ts-ignore */
|
|
551
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
524
552
|
/**
|
|
525
553
|
* Readonly state. Similar to disabled but with higher contrast *
|
|
526
554
|
*
|
|
527
555
|
* @defaultValue false
|
|
528
556
|
*/
|
|
529
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
557
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
530
558
|
/** Emits when the dropdown open state changes. */
|
|
531
559
|
openChange = output();
|
|
532
|
-
isOpen = signal(false,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
});
|
|
560
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
561
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
562
|
+
optionTemplate = contentChild(SiSelectOptionTemplateDirective, { ...(ngDevMode ? { debugName: "optionTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
563
|
+
groupTemplate = contentChild(SiSelectGroupTemplateDirective, { ...(ngDevMode ? { debugName: "groupTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
564
|
+
actionsTemplate = contentChild(SiSelectActionsDirective, { ...(ngDevMode ? { debugName: "actionsTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
565
|
+
trigger = viewChild.required(CdkOverlayOrigin, { ...(ngDevMode ? { debugName: "trigger" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
539
566
|
/** @internal */
|
|
540
|
-
labelledby = computed(() => this.labelledbyInput() ?? this.id() + '-label',
|
|
567
|
+
labelledby = computed(() => this.labelledbyInput() ?? this.id() + '-label', /* @ts-ignore */
|
|
568
|
+
...(ngDevMode ? [{ debugName: "labelledby" }] : /* istanbul ignore next */ []));
|
|
541
569
|
/**
|
|
542
570
|
* This ID will be bound to the `aria-describedby` attribute of the select.
|
|
543
571
|
* Use this to reference the element containing the error message(s) for the select.
|
|
@@ -548,7 +576,8 @@ class SiSelectComponent {
|
|
|
548
576
|
* `${this.id()}-errormessage`
|
|
549
577
|
* ```
|
|
550
578
|
*/
|
|
551
|
-
errormessageId = input(`${this.id()}-errormessage`,
|
|
579
|
+
errormessageId = input(`${this.id()}-errormessage`, /* @ts-ignore */
|
|
580
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
552
581
|
rows = [];
|
|
553
582
|
overlayWidth = 0;
|
|
554
583
|
selectionStrategy = inject((SiSelectSelectionStrategy));
|
|
@@ -558,7 +587,7 @@ class SiSelectComponent {
|
|
|
558
587
|
* @defaultValue false
|
|
559
588
|
* @defaultref {@link SiSelectComponent#_hasFilter}
|
|
560
589
|
*/
|
|
561
|
-
hasFilter = input(false, { ...(ngDevMode ? { debugName: "hasFilter" } : {}), transform: booleanAttribute });
|
|
590
|
+
hasFilter = input(false, { ...(ngDevMode ? { debugName: "hasFilter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
562
591
|
/** Opens the `si-select`. */
|
|
563
592
|
open() {
|
|
564
593
|
if (this.readonly() || this.selectionStrategy.disabled()) {
|
|
@@ -584,17 +613,17 @@ class SiSelectComponent {
|
|
|
584
613
|
this.backdropClicked = true;
|
|
585
614
|
this.isOpen.set(false);
|
|
586
615
|
}
|
|
587
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
588
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
616
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
617
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SiSelectComponent, isStandalone: true, selector: "si-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, labelledbyInput: { classPropertyName: "labelledbyInput", publicName: "labelledby", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsFoundLabel: { classPropertyName: "noResultsFoundLabel", publicName: "noResultsFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, errormessageId: { classPropertyName: "errormessageId", publicName: "errormessageId", isSignal: true, isRequired: false, transformFunction: null }, hasFilter: { classPropertyName: "hasFilter", publicName: "hasFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange" }, host: { properties: { "class.readonly": "readonly()", "class.open": "isOpen()", "class.si-select-has-filter": "hasFilter()" }, classAttribute: "dropdown" }, providers: [{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiSelectComponent }], queries: [{ propertyName: "optionTemplate", first: true, predicate: SiSelectOptionTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: SiSelectGroupTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "actionsTemplate", first: true, predicate: SiSelectActionsDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: CdkOverlayOrigin, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<si-select-input\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n [baseId]=\"id()\"\n [labelledby]=\"labelledby()\"\n [optionTemplate]=\"optionTemplate()\"\n [ariaLabel]=\"ariaLabel()\"\n [controls]=\"id() + '-listbox'\"\n [open]=\"isOpen()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [attr.aria-describedby]=\"errormessageId()\"\n (openListbox)=\"open()\"\n/>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayOffsetX]=\"-1\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n (backdropClick)=\"backdropClick()\"\n (detach)=\"close()\"\n>\n @if (!hasFilter()) {\n <si-select-list\n [baseId]=\"id()\"\n [optionTemplate]=\"optionTemplate()\"\n [groupTemplate]=\"groupTemplate()\"\n [labelledby]=\"labelledby()\"\n [actionsTemplate]=\"actionsTemplate()\"\n (closeOverlay)=\"close()\"\n />\n } @else {\n <si-select-list-has-filter\n [baseId]=\"id()\"\n [filterPlaceholder]=\"filterPlaceholder()\"\n [noResultsFoundLabel]=\"noResultsFoundLabel()\"\n [optionTemplate]=\"optionTemplate()\"\n [groupTemplate]=\"groupTemplate()\"\n [labelledby]=\"labelledby()\"\n [actionsTemplate]=\"actionsTemplate()\"\n (closeOverlay)=\"close()\"\n />\n }\n</ng-template>\n", styles: [":host{display:inline-block;padding:0;block-size:2rem}:host:focus-within,:host.open:not(.si-select-has-filter){outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}:host.readonly,:host.disabled{pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: SiSelectInputComponent, selector: "si-select-input", inputs: ["baseId", "labelledby", "ariaLabel", "open", "placeholder", "controls", "optionTemplate", "readonly"], outputs: ["openListbox"] }, { kind: "component", type: SiSelectListComponent, selector: "si-select-list" }, { kind: "component", type: SiSelectListHasFilterComponent, selector: "si-select-list-has-filter", inputs: ["filterPlaceholder", "noResultsFoundLabel"] }] });
|
|
589
618
|
}
|
|
590
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectComponent, decorators: [{
|
|
591
620
|
type: Component,
|
|
592
621
|
args: [{ selector: 'si-select', imports: [
|
|
593
622
|
OverlayModule,
|
|
594
623
|
SiSelectInputComponent,
|
|
595
624
|
SiSelectListComponent,
|
|
596
625
|
SiSelectListHasFilterComponent
|
|
597
|
-
], providers: [{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiSelectComponent }],
|
|
626
|
+
], providers: [{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiSelectComponent }], host: {
|
|
598
627
|
class: 'dropdown',
|
|
599
628
|
'[class.readonly]': 'readonly()',
|
|
600
629
|
'[class.open]': 'isOpen()',
|
|
@@ -613,18 +642,22 @@ class SiSelectLazyOptionsDirective {
|
|
|
613
642
|
* {@inheritDoc SiSelectOptionsStrategy#loading}
|
|
614
643
|
* @defaultValue false
|
|
615
644
|
*/
|
|
616
|
-
loading = signal(false,
|
|
645
|
+
loading = signal(false, /* @ts-ignore */
|
|
646
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
617
647
|
/**
|
|
618
648
|
* {@inheritDoc SiSelectOptionsStrategy#rows}
|
|
619
649
|
* @defaultValue []
|
|
620
650
|
*/
|
|
621
|
-
rows = signal([],
|
|
651
|
+
rows = signal([], /* @ts-ignore */
|
|
652
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
622
653
|
/**
|
|
623
654
|
* {@inheritDoc SiSelectOptionsStrategy#selectedRows}
|
|
624
655
|
* @defaultValue []
|
|
625
656
|
*/
|
|
626
|
-
selectedRows = signal([],
|
|
627
|
-
|
|
657
|
+
selectedRows = signal([], /* @ts-ignore */
|
|
658
|
+
...(ngDevMode ? [{ debugName: "selectedRows" }] : /* istanbul ignore next */ []));
|
|
659
|
+
optionSource = input.required(/* @ts-ignore */
|
|
660
|
+
...(ngDevMode ? [{ debugName: "optionSource" }] : /* istanbul ignore next */ []));
|
|
628
661
|
valueChange = new Subject();
|
|
629
662
|
filterChange = new Subject();
|
|
630
663
|
constructor() {
|
|
@@ -695,10 +728,10 @@ class SiSelectLazyOptionsDirective {
|
|
|
695
728
|
}
|
|
696
729
|
return false;
|
|
697
730
|
}
|
|
698
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
699
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
731
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectLazyOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
732
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: SiSelectLazyOptionsDirective, isStandalone: true, selector: "si-select[optionSource]", inputs: { optionSource: { classPropertyName: "optionSource", publicName: "optionSource", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: SI_SELECT_OPTIONS_STRATEGY, useExisting: SiSelectLazyOptionsDirective }], ngImport: i0 });
|
|
700
733
|
}
|
|
701
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectLazyOptionsDirective, decorators: [{
|
|
702
735
|
type: Directive,
|
|
703
736
|
args: [{
|
|
704
737
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -715,8 +748,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
715
748
|
* Input options strategy base class, for eagerly fetched options.
|
|
716
749
|
*/
|
|
717
750
|
class SiSelectOptionsStrategyBase {
|
|
718
|
-
value = signal([],
|
|
719
|
-
|
|
751
|
+
value = signal([], /* @ts-ignore */
|
|
752
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
753
|
+
filterValue = signal('', /* @ts-ignore */
|
|
754
|
+
...(ngDevMode ? [{ debugName: "filterValue" }] : /* istanbul ignore next */ []));
|
|
720
755
|
/**
|
|
721
756
|
* Rows that should be shown.
|
|
722
757
|
*
|
|
@@ -748,24 +783,26 @@ class SiSelectOptionsStrategyBase {
|
|
|
748
783
|
else {
|
|
749
784
|
return this.allRows();
|
|
750
785
|
}
|
|
751
|
-
},
|
|
786
|
+
}, /* @ts-ignore */
|
|
787
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
752
788
|
selectedRows = computed(() => {
|
|
753
789
|
const values = this.value();
|
|
754
790
|
return this.allRows()
|
|
755
791
|
.map(row => (row.type === 'group' ? row.options : row))
|
|
756
792
|
.flat()
|
|
757
793
|
.filter(option => values.some(value => this.optionsEqual()(value, option.value)));
|
|
758
|
-
},
|
|
794
|
+
}, /* @ts-ignore */
|
|
795
|
+
...(ngDevMode ? [{ debugName: "selectedRows" }] : /* istanbul ignore next */ []));
|
|
759
796
|
onValueChange(value) {
|
|
760
797
|
this.value.set(value);
|
|
761
798
|
}
|
|
762
799
|
onFilter(filterValue) {
|
|
763
800
|
this.filterValue.set(filterValue ?? '');
|
|
764
801
|
}
|
|
765
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
766
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
802
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionsStrategyBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
803
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SiSelectOptionsStrategyBase, isStandalone: true, ngImport: i0 });
|
|
767
804
|
}
|
|
768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectOptionsStrategyBase, decorators: [{
|
|
769
806
|
type: Directive
|
|
770
807
|
}] });
|
|
771
808
|
|
|
@@ -784,7 +821,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
784
821
|
*/
|
|
785
822
|
class SiSelectSimpleOptionsDirective extends SiSelectOptionsStrategyBase {
|
|
786
823
|
/** Options to be shown in select dropdown */
|
|
787
|
-
options = input(
|
|
824
|
+
options = input(/* @ts-ignore */
|
|
825
|
+
...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
|
|
788
826
|
/**
|
|
789
827
|
* By default, values are check on referential equality. Provide a function to customize the behavior.
|
|
790
828
|
*
|
|
@@ -793,14 +831,15 @@ class SiSelectSimpleOptionsDirective extends SiSelectOptionsStrategyBase {
|
|
|
793
831
|
* (a: T, b: T): boolean => a === b
|
|
794
832
|
* ```
|
|
795
833
|
*/
|
|
796
|
-
optionsEqual = input((a, b) => a === b, { ...(ngDevMode ? { debugName: "optionsEqual" } : {}),
|
|
834
|
+
optionsEqual = input((a, b) => a === b, { ...(ngDevMode ? { debugName: "optionsEqual" } : /* istanbul ignore next */ {}),
|
|
797
835
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
798
836
|
alias: 'optionEqualCheckFn' });
|
|
799
|
-
allRows = computed(() => this.options() ?? [],
|
|
800
|
-
|
|
801
|
-
static
|
|
837
|
+
allRows = computed(() => this.options() ?? [], /* @ts-ignore */
|
|
838
|
+
...(ngDevMode ? [{ debugName: "allRows" }] : /* istanbul ignore next */ []));
|
|
839
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectSimpleOptionsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
840
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: SiSelectSimpleOptionsDirective, isStandalone: true, selector: "si-select[options]", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsEqual: { classPropertyName: "optionsEqual", publicName: "optionEqualCheckFn", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: SI_SELECT_OPTIONS_STRATEGY, useExisting: SiSelectSimpleOptionsDirective }], usesInheritance: true, ngImport: i0 });
|
|
802
841
|
}
|
|
803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectSimpleOptionsDirective, decorators: [{
|
|
804
843
|
type: Directive,
|
|
805
844
|
args: [{
|
|
806
845
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -838,8 +877,8 @@ class SiSelectSingleValueDirective extends SiSelectSelectionStrategy {
|
|
|
838
877
|
fromArrayValue([value]) {
|
|
839
878
|
return value;
|
|
840
879
|
}
|
|
841
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
842
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
880
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectSingleValueDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
881
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SiSelectSingleValueDirective, isStandalone: true, selector: "si-select:not([multi])", providers: [
|
|
843
882
|
{ provide: SiSelectSelectionStrategy, useExisting: SiSelectSingleValueDirective },
|
|
844
883
|
{
|
|
845
884
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -848,7 +887,7 @@ class SiSelectSingleValueDirective extends SiSelectSelectionStrategy {
|
|
|
848
887
|
}
|
|
849
888
|
], usesInheritance: true, ngImport: i0 });
|
|
850
889
|
}
|
|
851
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectSingleValueDirective, decorators: [{
|
|
852
891
|
type: Directive,
|
|
853
892
|
args: [{
|
|
854
893
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -893,8 +932,8 @@ class SiSelectMultiValueDirective extends SiSelectSelectionStrategy {
|
|
|
893
932
|
toArrayValue(value) {
|
|
894
933
|
return value ?? [];
|
|
895
934
|
}
|
|
896
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
897
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
935
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectMultiValueDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
936
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SiSelectMultiValueDirective, isStandalone: true, selector: "si-select[multi]", providers: [
|
|
898
937
|
{ provide: SiSelectSelectionStrategy, useExisting: SiSelectMultiValueDirective },
|
|
899
938
|
{
|
|
900
939
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -903,7 +942,7 @@ class SiSelectMultiValueDirective extends SiSelectSelectionStrategy {
|
|
|
903
942
|
}
|
|
904
943
|
], usesInheritance: true, ngImport: i0 });
|
|
905
944
|
}
|
|
906
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectMultiValueDirective, decorators: [{
|
|
907
946
|
type: Directive,
|
|
908
947
|
args: [{
|
|
909
948
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -929,16 +968,16 @@ class SiSelectActionDirective {
|
|
|
929
968
|
* Close the select drop down on click.
|
|
930
969
|
* @defaultValue false
|
|
931
970
|
*/
|
|
932
|
-
selectActionAutoClose = input(false, { ...(ngDevMode ? { debugName: "selectActionAutoClose" } : {}), transform: booleanAttribute });
|
|
971
|
+
selectActionAutoClose = input(false, { ...(ngDevMode ? { debugName: "selectActionAutoClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
933
972
|
close() {
|
|
934
973
|
if (this.selectActionAutoClose()) {
|
|
935
974
|
this.select.close();
|
|
936
975
|
}
|
|
937
976
|
}
|
|
938
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
939
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
977
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
978
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: SiSelectActionDirective, isStandalone: true, selector: "[siSelectAction]", inputs: { selectActionAutoClose: { classPropertyName: "selectActionAutoClose", publicName: "selectActionAutoClose", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "close()" }, classAttribute: "mx-5 my-4" }, exportAs: ["si-select-action"], ngImport: i0 });
|
|
940
979
|
}
|
|
941
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectActionDirective, decorators: [{
|
|
942
981
|
type: Directive,
|
|
943
982
|
args: [{
|
|
944
983
|
selector: '[siSelectAction]',
|
|
@@ -955,8 +994,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
955
994
|
* SPDX-License-Identifier: MIT
|
|
956
995
|
*/
|
|
957
996
|
class SiSelectModule {
|
|
958
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
959
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
997
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
998
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: SiSelectModule, imports: [SiSelectActionDirective,
|
|
960
999
|
SiSelectActionsDirective,
|
|
961
1000
|
SiSelectComponent,
|
|
962
1001
|
SiSelectGroupTemplateDirective,
|
|
@@ -971,9 +1010,9 @@ class SiSelectModule {
|
|
|
971
1010
|
SiSelectOptionTemplateDirective,
|
|
972
1011
|
SiSelectSimpleOptionsDirective,
|
|
973
1012
|
SiSelectSingleValueDirective] });
|
|
974
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1013
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectModule, imports: [SiSelectComponent] });
|
|
975
1014
|
}
|
|
976
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectModule, decorators: [{
|
|
977
1016
|
type: NgModule,
|
|
978
1017
|
args: [{
|
|
979
1018
|
imports: [
|
|
@@ -1053,20 +1092,21 @@ class SiCustomSelectDirective {
|
|
|
1053
1092
|
* `__si-custom-select-${SiCustomSelectDirective.idCounter++}`
|
|
1054
1093
|
* ```
|
|
1055
1094
|
*/
|
|
1056
|
-
id = input(`__si-custom-select-${SiCustomSelectDirective.idCounter++}`,
|
|
1095
|
+
id = input(`__si-custom-select-${SiCustomSelectDirective.idCounter++}`, /* @ts-ignore */
|
|
1096
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1057
1097
|
/**
|
|
1058
1098
|
* Whether the select input is disabled.
|
|
1059
1099
|
*
|
|
1060
1100
|
* @defaultValue false
|
|
1061
1101
|
*/
|
|
1062
1102
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1063
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled', transform: booleanAttribute });
|
|
1103
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
1064
1104
|
/**
|
|
1065
1105
|
* Readonly state. Similar to disabled but with higher contrast.
|
|
1066
1106
|
*
|
|
1067
1107
|
* @defaultValue false
|
|
1068
1108
|
*/
|
|
1069
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
1109
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1070
1110
|
/** Emits when the dropdown open state changes. */
|
|
1071
1111
|
openChange = output();
|
|
1072
1112
|
/**
|
|
@@ -1074,26 +1114,32 @@ class SiCustomSelectDirective {
|
|
|
1074
1114
|
*
|
|
1075
1115
|
* @defaultValue undefined
|
|
1076
1116
|
*/
|
|
1077
|
-
value = model(undefined,
|
|
1117
|
+
value = model(undefined, /* @ts-ignore */
|
|
1118
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1078
1119
|
/**
|
|
1079
1120
|
* Whether the dropdown is currently open.
|
|
1080
1121
|
*
|
|
1081
1122
|
* @defaultValue false
|
|
1082
1123
|
*/
|
|
1083
|
-
isOpen = signal(false,
|
|
1124
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
1125
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
1084
1126
|
/** @internal */
|
|
1085
|
-
labelledby = computed(() => `${this.id()}-label ${this.id()}-combobox`,
|
|
1127
|
+
labelledby = computed(() => `${this.id()}-label ${this.id()}-combobox`, /* @ts-ignore */
|
|
1128
|
+
...(ngDevMode ? [{ debugName: "labelledby" }] : /* istanbul ignore next */ []));
|
|
1086
1129
|
/** @internal */
|
|
1087
|
-
comboboxLabelId = computed(() => `${this.id()}-combobox`,
|
|
1130
|
+
comboboxLabelId = computed(() => `${this.id()}-combobox`, /* @ts-ignore */
|
|
1131
|
+
...(ngDevMode ? [{ debugName: "comboboxLabelId" }] : /* istanbul ignore next */ []));
|
|
1088
1132
|
/** @internal */
|
|
1089
|
-
dropdownId = computed(() => this.id() + '-dropdown',
|
|
1133
|
+
dropdownId = computed(() => this.id() + '-dropdown', /* @ts-ignore */
|
|
1134
|
+
...(ngDevMode ? [{ debugName: "dropdownId" }] : /* istanbul ignore next */ []));
|
|
1090
1135
|
/**
|
|
1091
1136
|
* Value forwarded to the `aria-haspopup` attribute. Reflects the
|
|
1092
1137
|
* `contentType` input of the registered {@link SiSelectDropdownDirective},
|
|
1093
1138
|
* defaulting to `'listbox'` until a dropdown template is registered.
|
|
1094
1139
|
* @internal
|
|
1095
1140
|
*/
|
|
1096
|
-
haspopup = computed(() => this.dropdownDirective()?.contentType() ?? 'listbox',
|
|
1141
|
+
haspopup = computed(() => this.dropdownDirective()?.contentType() ?? 'listbox', /* @ts-ignore */
|
|
1142
|
+
...(ngDevMode ? [{ debugName: "haspopup" }] : /* istanbul ignore next */ []));
|
|
1097
1143
|
/**
|
|
1098
1144
|
* This ID will be bound to the `aria-describedby` attribute of the select.
|
|
1099
1145
|
*
|
|
@@ -1102,12 +1148,15 @@ class SiCustomSelectDirective {
|
|
|
1102
1148
|
* `${this.id()}-errormessage`
|
|
1103
1149
|
* ```
|
|
1104
1150
|
*/
|
|
1105
|
-
errormessageId = input(`${this.id()}-errormessage`,
|
|
1151
|
+
errormessageId = input(`${this.id()}-errormessage`, /* @ts-ignore */
|
|
1152
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
1106
1153
|
/** Combined disabled state from input and form control. */
|
|
1107
|
-
disabled = computed(() => this.disabledInput() || this.disabledByForm(),
|
|
1154
|
+
disabled = computed(() => this.disabledInput() || this.disabledByForm(), /* @ts-ignore */
|
|
1155
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1108
1156
|
onTouched = () => { };
|
|
1109
1157
|
onChange = () => { };
|
|
1110
|
-
disabledByForm = signal(false,
|
|
1158
|
+
disabledByForm = signal(false, /* @ts-ignore */
|
|
1159
|
+
...(ngDevMode ? [{ debugName: "disabledByForm" }] : /* istanbul ignore next */ []));
|
|
1111
1160
|
overlay = inject(Overlay);
|
|
1112
1161
|
focusTrapFactory = inject(ConfigurableFocusTrapFactory);
|
|
1113
1162
|
elementRef = inject(ElementRef);
|
|
@@ -1117,7 +1166,8 @@ class SiCustomSelectDirective {
|
|
|
1117
1166
|
overlayRef;
|
|
1118
1167
|
focusTrap;
|
|
1119
1168
|
closeOverlay$ = new Subject();
|
|
1120
|
-
dropdownDirective = signal(undefined,
|
|
1169
|
+
dropdownDirective = signal(undefined, /* @ts-ignore */
|
|
1170
|
+
...(ngDevMode ? [{ debugName: "dropdownDirective" }] : /* istanbul ignore next */ []));
|
|
1121
1171
|
constructor() {
|
|
1122
1172
|
this.destroyRef.onDestroy(() => {
|
|
1123
1173
|
this.disposeOverlay();
|
|
@@ -1226,13 +1276,13 @@ class SiCustomSelectDirective {
|
|
|
1226
1276
|
this.overlayRef = undefined;
|
|
1227
1277
|
}
|
|
1228
1278
|
}
|
|
1229
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1230
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiCustomSelectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1280
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: SiCustomSelectDirective, isStandalone: true, selector: "[siCustomSelect]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, errormessageId: { classPropertyName: "errormessageId", publicName: "errormessageId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange", value: "valueChange" }, host: { attributes: { "role": "combobox", "aria-autocomplete": "none" }, listeners: { "click": "open()", "keydown.enter": "open()", "keydown.space": "open($event)", "keydown.arrowDown": "open($event)", "keydown.arrowUp": "open($event)" }, properties: { "style.--si-action-icon-offset.rem": "1.5", "attr.aria-haspopup": "haspopup()", "attr.aria-labelledby": "labelledby()", "attr.aria-describedby": "errormessageId()", "attr.aria-controls": "isOpen() ? dropdownId() : null", "attr.aria-expanded": "isOpen()", "attr.aria-disabled": "disabled()", "attr.id": "id()", "attr.tabindex": "disabled() ? \"-1\" : \"0\"", "class.disabled": "disabled()", "class.pe-none": "disabled()", "class.readonly": "readonly()", "class.open": "isOpen()", "class.show": "isOpen()" }, classAttribute: "dropdown" }, providers: [
|
|
1231
1281
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SiCustomSelectDirective, multi: true },
|
|
1232
1282
|
{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiCustomSelectDirective }
|
|
1233
1283
|
], ngImport: i0 });
|
|
1234
1284
|
}
|
|
1235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiCustomSelectDirective, decorators: [{
|
|
1236
1286
|
type: Directive,
|
|
1237
1287
|
args: [{
|
|
1238
1288
|
selector: '[siCustomSelect]',
|
|
@@ -1290,26 +1340,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1290
1340
|
class SiSelectComboboxComponent {
|
|
1291
1341
|
icons = addIcons({ elementDown2 });
|
|
1292
1342
|
customSelect = inject(SiCustomSelectDirective);
|
|
1293
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1294
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1343
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1344
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: SiSelectComboboxComponent, isStandalone: true, selector: "si-select-combobox", host: { properties: { "attr.id": "customSelect.comboboxLabelId()", "class.show": "customSelect.isOpen()" }, classAttribute: "select focus-none dropdown-toggle d-flex align-items-center w-100" }, ngImport: i0, template: `
|
|
1295
1345
|
<ng-content />
|
|
1296
1346
|
<div class="form-control-actions ms-auto my-n4">
|
|
1297
1347
|
<si-icon class="dropdown-caret icon flip-rtl p-0 m-0" [icon]="icons.elementDown2" />
|
|
1298
1348
|
</div>
|
|
1299
|
-
`, isInline: true, styles: [":host-context(.form-control.dropdown) .dropdown-caret{margin-inline-end:calc((var(--si-feedback-icon-
|
|
1349
|
+
`, isInline: true, styles: [":host-context(.form-control.dropdown) .dropdown-caret{margin-inline-end:calc((var(--si-feedback-icon-size, 0px) + var(--si-action-icon-offset)) * -1)}.dropdown-caret{transform-origin:center}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }] });
|
|
1300
1350
|
}
|
|
1301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectComboboxComponent, decorators: [{
|
|
1302
1352
|
type: Component,
|
|
1303
1353
|
args: [{ selector: 'si-select-combobox', imports: [SiIconComponent], template: `
|
|
1304
1354
|
<ng-content />
|
|
1305
1355
|
<div class="form-control-actions ms-auto my-n4">
|
|
1306
1356
|
<si-icon class="dropdown-caret icon flip-rtl p-0 m-0" [icon]="icons.elementDown2" />
|
|
1307
1357
|
</div>
|
|
1308
|
-
`,
|
|
1358
|
+
`, host: {
|
|
1309
1359
|
class: 'select focus-none dropdown-toggle d-flex align-items-center w-100',
|
|
1310
1360
|
'[attr.id]': 'customSelect.comboboxLabelId()',
|
|
1311
1361
|
'[class.show]': 'customSelect.isOpen()'
|
|
1312
|
-
}, styles: [":host-context(.form-control.dropdown) .dropdown-caret{margin-inline-end:calc((var(--si-feedback-icon-
|
|
1362
|
+
}, styles: [":host-context(.form-control.dropdown) .dropdown-caret{margin-inline-end:calc((var(--si-feedback-icon-size, 0px) + var(--si-action-icon-offset)) * -1)}.dropdown-caret{transform-origin:center}\n"] }]
|
|
1313
1363
|
}] });
|
|
1314
1364
|
|
|
1315
1365
|
/**
|
|
@@ -1343,15 +1393,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1343
1393
|
*/
|
|
1344
1394
|
class SiSelectComboboxValueComponent {
|
|
1345
1395
|
/** An optional icon rendered before the projected content. */
|
|
1346
|
-
icon = input(
|
|
1396
|
+
icon = input(/* @ts-ignore */
|
|
1397
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1347
1398
|
/** Optional CSS color class applied to {@link icon}. */
|
|
1348
|
-
iconColor = input(
|
|
1399
|
+
iconColor = input(/* @ts-ignore */
|
|
1400
|
+
...(ngDevMode ? [undefined, { debugName: "iconColor" }] : /* istanbul ignore next */ []));
|
|
1349
1401
|
/** Optional secondary icon stacked on top of {@link icon}. */
|
|
1350
|
-
stackedIcon = input(
|
|
1402
|
+
stackedIcon = input(/* @ts-ignore */
|
|
1403
|
+
...(ngDevMode ? [undefined, { debugName: "stackedIcon" }] : /* istanbul ignore next */ []));
|
|
1351
1404
|
/** Optional CSS color class applied to {@link stackedIcon}. */
|
|
1352
|
-
stackedIconColor = input(
|
|
1353
|
-
|
|
1354
|
-
static
|
|
1405
|
+
stackedIconColor = input(/* @ts-ignore */
|
|
1406
|
+
...(ngDevMode ? [undefined, { debugName: "stackedIconColor" }] : /* istanbul ignore next */ []));
|
|
1407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectComboboxValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1408
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SiSelectComboboxValueComponent, isStandalone: true, selector: "si-select-combobox-value", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, stackedIcon: { classPropertyName: "stackedIcon", publicName: "stackedIcon", isSignal: true, isRequired: false, transformFunction: null }, stackedIconColor: { classPropertyName: "stackedIconColor", publicName: "stackedIconColor", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "text-nowrap" }, ngImport: i0, template: `
|
|
1355
1409
|
@if (icon(); as iconName) {
|
|
1356
1410
|
<div class="icon-stack icon me-2 my-n4">
|
|
1357
1411
|
<si-icon [icon]="iconName" [class]="iconColor() ?? ''" />
|
|
@@ -1361,9 +1415,9 @@ class SiSelectComboboxValueComponent {
|
|
|
1361
1415
|
</div>
|
|
1362
1416
|
}
|
|
1363
1417
|
<ng-content />
|
|
1364
|
-
`, isInline: true, styles: ["@charset \"UTF-8\";:host{display:inline-block;max-inline-size:100%}:host(.comma-separated:not(:first-of-type)):before{content:\",\\a0\"}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }]
|
|
1418
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";:host{display:inline-block;max-inline-size:100%}:host(.comma-separated:not(:first-of-type)):before{content:\",\\a0\"}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }] });
|
|
1365
1419
|
}
|
|
1366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectComboboxValueComponent, decorators: [{
|
|
1367
1421
|
type: Component,
|
|
1368
1422
|
args: [{ selector: 'si-select-combobox-value', imports: [SiIconComponent], template: `
|
|
1369
1423
|
@if (icon(); as iconName) {
|
|
@@ -1375,7 +1429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1375
1429
|
</div>
|
|
1376
1430
|
}
|
|
1377
1431
|
<ng-content />
|
|
1378
|
-
`,
|
|
1432
|
+
`, host: {
|
|
1379
1433
|
class: 'text-nowrap'
|
|
1380
1434
|
}, styles: ["@charset \"UTF-8\";:host{display:inline-block;max-inline-size:100%}:host(.comma-separated:not(:first-of-type)):before{content:\",\\a0\"}\n"] }]
|
|
1381
1435
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], stackedIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "stackedIcon", required: false }] }], stackedIconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "stackedIconColor", required: false }] }] } });
|
|
@@ -1406,17 +1460,18 @@ class SiSelectDropdownDirective {
|
|
|
1406
1460
|
* forwarded to the `aria-haspopup` attribute of the combobox host of
|
|
1407
1461
|
* the parent {@link SiCustomSelectDirective}.
|
|
1408
1462
|
*/
|
|
1409
|
-
contentType = input.required(
|
|
1463
|
+
contentType = input.required(/* @ts-ignore */
|
|
1464
|
+
...(ngDevMode ? [{ debugName: "contentType" }] : /* istanbul ignore next */ []));
|
|
1410
1465
|
/** @internal */
|
|
1411
1466
|
templateRef = inject(TemplateRef);
|
|
1412
1467
|
constructor() {
|
|
1413
1468
|
const customSelect = inject(SiCustomSelectDirective, { optional: true });
|
|
1414
1469
|
customSelect?.registerDropdown(this);
|
|
1415
1470
|
}
|
|
1416
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1417
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1471
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1472
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: SiSelectDropdownDirective, isStandalone: true, selector: "[si-select-dropdown]", inputs: { contentType: { classPropertyName: "contentType", publicName: "contentType", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
1418
1473
|
}
|
|
1419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiSelectDropdownDirective, decorators: [{
|
|
1420
1475
|
type: Directive,
|
|
1421
1476
|
args: [{
|
|
1422
1477
|
// eslint-disable-next-line @angular-eslint/directive-selector
|