@siemens/element-ng 49.13.0 → 51.0.0-rc.3
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 +56 -39
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +81 -51
- 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 +142 -137
- 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 +18 -15
- 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 +55 -32
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +175 -111
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +37 -24
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +24 -16
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +52 -33
- 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 +35 -26
- 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 +327 -213
- 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 +358 -234
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +21 -16
- 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 +93 -81
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +29 -22
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +243 -147
- 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 +267 -84
- 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 +220 -315
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +38 -29
- 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 +19 -15
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +118 -72
- 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 +73 -54
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +42 -33
- 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 +46 -29
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- 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 +12 -10
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +133 -94
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +117 -81
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +67 -41
- 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 +38 -27
- 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 +31 -22
- 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 +121 -138
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +76 -45
- 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 +33 -26
- 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 +32 -24
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +212 -154
- 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 +119 -75
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +14 -13
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +42 -28
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +268 -254
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +57 -47
- 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 +22 -14
- 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 +16 -15
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +59 -45
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +5 -4
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +59 -40
- 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 +52 -54
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +28 -19
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +92 -73
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +75 -67
- 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/package.json +20 -22
- 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-to-v49.js → migrate-to-v51.js} +2 -2
- package/template-i18n.json +3 -6
- package/types/siemens-element-ng-application-header.d.ts +1 -21
- package/types/siemens-element-ng-chat-messages.d.ts +6 -4
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +1 -12
- package/types/siemens-element-ng-file-uploader.d.ts +5 -23
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-form.d.ts +134 -37
- 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-navbar-vertical-next.d.ts +6 -1
- 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-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-split.d.ts +95 -63
- 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-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-translate.d.ts +1 -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.5", ngImport: i0, type: SiSelectOptionTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
51
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", 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.5", 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.5", ngImport: i0, type: SiSelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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.5", 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.5", ngImport: i0, type: SiSelectSelectionStrategy, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
146
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", 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.5", 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.5", ngImport: i0, type: SiSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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-offset, 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.5", 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-offset, 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.5", ngImport: i0, type: SiSelectOptionRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
249
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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.5", 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.5", ngImport: i0, type: SiSelectGroupTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
289
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", 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.5", 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.5", ngImport: i0, type: SiSelectOptionRowTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
307
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", 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.5", 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.5", ngImport: i0, type: SiSelectListBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
361
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", 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.5", ngImport: i0, type: SiSelectListBase, decorators: [{
|
|
345
364
|
type: Directive,
|
|
346
365
|
args: [{
|
|
347
366
|
host: {
|
|
@@ -358,12 +377,15 @@ 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(
|
|
383
|
+
noResultsFoundLabel = input.required(/* @ts-ignore */
|
|
384
|
+
...(ngDevMode ? [{ debugName: "noResultsFoundLabel" }] : /* istanbul ignore next */ []));
|
|
364
385
|
filterInput = viewChild.required('filter');
|
|
365
386
|
initIndex;
|
|
366
|
-
id = computed(() => `${this.baseId()}-listbox`,
|
|
387
|
+
id = computed(() => `${this.baseId()}-listbox`, /* @ts-ignore */
|
|
388
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
367
389
|
icons = addIcons({ elementSearch });
|
|
368
390
|
constructor() {
|
|
369
391
|
super();
|
|
@@ -372,10 +394,12 @@ class SiSelectListHasFilterComponent extends SiSelectListBase {
|
|
|
372
394
|
}
|
|
373
395
|
const firstValue = this.selectionStrategy.arrayValue()[0];
|
|
374
396
|
if (firstValue) {
|
|
375
|
-
this.initIndex = computed(() => this.rows().findIndex(row => row.type === 'option' && row.value === firstValue),
|
|
397
|
+
this.initIndex = computed(() => this.rows().findIndex(row => row.type === 'option' && row.value === firstValue), /* @ts-ignore */
|
|
398
|
+
...(ngDevMode ? [{ debugName: "initIndex" }] : /* istanbul ignore next */ []));
|
|
376
399
|
}
|
|
377
400
|
else {
|
|
378
|
-
this.initIndex = signal(0,
|
|
401
|
+
this.initIndex = signal(0, /* @ts-ignore */
|
|
402
|
+
...(ngDevMode ? [{ debugName: "initIndex" }] : /* istanbul ignore next */ []));
|
|
379
403
|
}
|
|
380
404
|
}
|
|
381
405
|
ngOnInit() {
|
|
@@ -400,10 +424,10 @@ class SiSelectListHasFilterComponent extends SiSelectListBase {
|
|
|
400
424
|
}
|
|
401
425
|
this.closeOverlayIfSingle();
|
|
402
426
|
}
|
|
403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
404
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
427
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectListHasFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
428
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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
429
|
}
|
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectListHasFilterComponent, decorators: [{
|
|
407
431
|
type: Component,
|
|
408
432
|
args: [{ selector: 'si-select-list-has-filter', imports: [
|
|
409
433
|
NgTemplateOutlet,
|
|
@@ -415,7 +439,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
415
439
|
SiTranslatePipe,
|
|
416
440
|
SiAutocompleteModule,
|
|
417
441
|
SiLoadingSpinnerComponent
|
|
418
|
-
],
|
|
442
|
+
], host: {
|
|
419
443
|
class: 'pt-0',
|
|
420
444
|
'[attr.id]': 'id()'
|
|
421
445
|
}, 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"] }]
|
|
@@ -436,10 +460,10 @@ class SiSelectListComponent extends SiSelectListBase {
|
|
|
436
460
|
listBoxValueChange(changeEvent) {
|
|
437
461
|
this.selectionStrategy.updateFromUser(changeEvent.value.slice());
|
|
438
462
|
}
|
|
439
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
440
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
464
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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
465
|
}
|
|
442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectListComponent, decorators: [{
|
|
443
467
|
type: Component,
|
|
444
468
|
args: [{ selector: 'si-select-list', imports: [
|
|
445
469
|
CommonModule,
|
|
@@ -449,7 +473,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
449
473
|
SiSelectOptionRowTemplateDirective,
|
|
450
474
|
SiSelectGroupTemplateDirective,
|
|
451
475
|
SiSelectOptionRowComponent
|
|
452
|
-
],
|
|
476
|
+
], 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
477
|
}], propDecorators: { listbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkListbox), { ...{
|
|
454
478
|
read: ElementRef
|
|
455
479
|
}, isSignal: true }] }] } });
|
|
@@ -463,10 +487,10 @@ class SiSelectActionsDirective {
|
|
|
463
487
|
static ngTemplateContextGuard(directive, context) {
|
|
464
488
|
return true;
|
|
465
489
|
}
|
|
466
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
467
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
490
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
491
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: SiSelectActionsDirective, isStandalone: true, selector: "[siSelectActions]", exportAs: ["si-select-actions"], ngImport: i0 });
|
|
468
492
|
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectActionsDirective, decorators: [{
|
|
470
494
|
type: Directive,
|
|
471
495
|
args: [{
|
|
472
496
|
selector: '[siSelectActions]',
|
|
@@ -488,19 +512,21 @@ class SiSelectComponent {
|
|
|
488
512
|
* `__si-select-${SiSelectComponent.idCounter++}`
|
|
489
513
|
* ```
|
|
490
514
|
*/
|
|
491
|
-
id = input(`__si-select-${SiSelectComponent.idCounter++}`,
|
|
515
|
+
id = input(`__si-select-${SiSelectComponent.idCounter++}`, /* @ts-ignore */
|
|
516
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
492
517
|
/**
|
|
493
518
|
* Aria label of the select.
|
|
494
519
|
*
|
|
495
520
|
* @defaultValue null
|
|
496
521
|
*/
|
|
497
|
-
ariaLabel = input(null,
|
|
522
|
+
ariaLabel = input(null, /* @ts-ignore */
|
|
523
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
498
524
|
/**
|
|
499
525
|
* Aria labelledby of the select.
|
|
500
526
|
* @defaultValue undefined
|
|
501
527
|
*/
|
|
502
528
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
503
|
-
labelledbyInput = input(undefined, { ...(ngDevMode ? { debugName: "labelledbyInput" } : {}), alias: 'labelledby' });
|
|
529
|
+
labelledbyInput = input(undefined, { ...(ngDevMode ? { debugName: "labelledbyInput" } : /* istanbul ignore next */ {}), alias: 'labelledby' });
|
|
504
530
|
/**
|
|
505
531
|
* Placeholder for search input field.
|
|
506
532
|
*
|
|
@@ -509,7 +535,8 @@ class SiSelectComponent {
|
|
|
509
535
|
* t(() => $localize`:@@SI_SELECT.SEARCH-PLACEHOLDER:Search...`)
|
|
510
536
|
* ```
|
|
511
537
|
*/
|
|
512
|
-
filterPlaceholder = input(t(() => $localize `:@@SI_SELECT.SEARCH-PLACEHOLDER:Search...`),
|
|
538
|
+
filterPlaceholder = input(t(() => $localize `:@@SI_SELECT.SEARCH-PLACEHOLDER:Search...`), /* @ts-ignore */
|
|
539
|
+
...(ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
|
|
513
540
|
/**
|
|
514
541
|
* Label if no item can be found.
|
|
515
542
|
*
|
|
@@ -518,26 +545,30 @@ class SiSelectComponent {
|
|
|
518
545
|
* t(() => $localize`:@@SI_SELECT.NO-RESULTS-FOUND:No results found`)
|
|
519
546
|
* ```
|
|
520
547
|
*/
|
|
521
|
-
noResultsFoundLabel = input(t(() => $localize `:@@SI_SELECT.NO-RESULTS-FOUND:No results found`),
|
|
548
|
+
noResultsFoundLabel = input(t(() => $localize `:@@SI_SELECT.NO-RESULTS-FOUND:No results found`), /* @ts-ignore */
|
|
549
|
+
...(ngDevMode ? [{ debugName: "noResultsFoundLabel" }] : /* istanbul ignore next */ []));
|
|
522
550
|
/** Placeholder text to display when no options are selected. */
|
|
523
|
-
placeholder = input(
|
|
551
|
+
placeholder = input(/* @ts-ignore */
|
|
552
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
524
553
|
/**
|
|
525
554
|
* Readonly state. Similar to disabled but with higher contrast *
|
|
526
555
|
*
|
|
527
556
|
* @defaultValue false
|
|
528
557
|
*/
|
|
529
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
558
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
530
559
|
/** Emits when the dropdown open state changes. */
|
|
531
560
|
openChange = output();
|
|
532
|
-
isOpen = signal(false,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
561
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
562
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
563
|
+
optionTemplate = contentChild(SiSelectOptionTemplateDirective, { ...(ngDevMode ? { debugName: "optionTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
564
|
+
groupTemplate = contentChild(SiSelectGroupTemplateDirective, { ...(ngDevMode ? { debugName: "groupTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
565
|
+
actionsTemplate = contentChild(SiSelectActionsDirective, { ...(ngDevMode ? { debugName: "actionsTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
536
566
|
trigger = viewChild.required(CdkOverlayOrigin, {
|
|
537
567
|
read: ElementRef
|
|
538
568
|
});
|
|
539
569
|
/** @internal */
|
|
540
|
-
labelledby = computed(() => this.labelledbyInput() ?? this.id() + '-label',
|
|
570
|
+
labelledby = computed(() => this.labelledbyInput() ?? this.id() + '-label', /* @ts-ignore */
|
|
571
|
+
...(ngDevMode ? [{ debugName: "labelledby" }] : /* istanbul ignore next */ []));
|
|
541
572
|
/**
|
|
542
573
|
* This ID will be bound to the `aria-describedby` attribute of the select.
|
|
543
574
|
* Use this to reference the element containing the error message(s) for the select.
|
|
@@ -548,7 +579,8 @@ class SiSelectComponent {
|
|
|
548
579
|
* `${this.id()}-errormessage`
|
|
549
580
|
* ```
|
|
550
581
|
*/
|
|
551
|
-
errormessageId = input(`${this.id()}-errormessage`,
|
|
582
|
+
errormessageId = input(`${this.id()}-errormessage`, /* @ts-ignore */
|
|
583
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
552
584
|
rows = [];
|
|
553
585
|
overlayWidth = 0;
|
|
554
586
|
selectionStrategy = inject((SiSelectSelectionStrategy));
|
|
@@ -558,7 +590,7 @@ class SiSelectComponent {
|
|
|
558
590
|
* @defaultValue false
|
|
559
591
|
* @defaultref {@link SiSelectComponent#_hasFilter}
|
|
560
592
|
*/
|
|
561
|
-
hasFilter = input(false, { ...(ngDevMode ? { debugName: "hasFilter" } : {}), transform: booleanAttribute });
|
|
593
|
+
hasFilter = input(false, { ...(ngDevMode ? { debugName: "hasFilter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
562
594
|
/** Opens the `si-select`. */
|
|
563
595
|
open() {
|
|
564
596
|
if (this.readonly() || this.selectionStrategy.disabled()) {
|
|
@@ -584,17 +616,17 @@ class SiSelectComponent {
|
|
|
584
616
|
this.backdropClicked = true;
|
|
585
617
|
this.isOpen.set(false);
|
|
586
618
|
}
|
|
587
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
588
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
619
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
620
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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
621
|
}
|
|
590
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectComponent, decorators: [{
|
|
591
623
|
type: Component,
|
|
592
624
|
args: [{ selector: 'si-select', imports: [
|
|
593
625
|
OverlayModule,
|
|
594
626
|
SiSelectInputComponent,
|
|
595
627
|
SiSelectListComponent,
|
|
596
628
|
SiSelectListHasFilterComponent
|
|
597
|
-
], providers: [{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiSelectComponent }],
|
|
629
|
+
], providers: [{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiSelectComponent }], host: {
|
|
598
630
|
class: 'dropdown',
|
|
599
631
|
'[class.readonly]': 'readonly()',
|
|
600
632
|
'[class.open]': 'isOpen()',
|
|
@@ -613,18 +645,22 @@ class SiSelectLazyOptionsDirective {
|
|
|
613
645
|
* {@inheritDoc SiSelectOptionsStrategy#loading}
|
|
614
646
|
* @defaultValue false
|
|
615
647
|
*/
|
|
616
|
-
loading = signal(false,
|
|
648
|
+
loading = signal(false, /* @ts-ignore */
|
|
649
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
617
650
|
/**
|
|
618
651
|
* {@inheritDoc SiSelectOptionsStrategy#rows}
|
|
619
652
|
* @defaultValue []
|
|
620
653
|
*/
|
|
621
|
-
rows = signal([],
|
|
654
|
+
rows = signal([], /* @ts-ignore */
|
|
655
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
622
656
|
/**
|
|
623
657
|
* {@inheritDoc SiSelectOptionsStrategy#selectedRows}
|
|
624
658
|
* @defaultValue []
|
|
625
659
|
*/
|
|
626
|
-
selectedRows = signal([],
|
|
627
|
-
|
|
660
|
+
selectedRows = signal([], /* @ts-ignore */
|
|
661
|
+
...(ngDevMode ? [{ debugName: "selectedRows" }] : /* istanbul ignore next */ []));
|
|
662
|
+
optionSource = input.required(/* @ts-ignore */
|
|
663
|
+
...(ngDevMode ? [{ debugName: "optionSource" }] : /* istanbul ignore next */ []));
|
|
628
664
|
valueChange = new Subject();
|
|
629
665
|
filterChange = new Subject();
|
|
630
666
|
constructor() {
|
|
@@ -695,10 +731,10 @@ class SiSelectLazyOptionsDirective {
|
|
|
695
731
|
}
|
|
696
732
|
return false;
|
|
697
733
|
}
|
|
698
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
699
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
734
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectLazyOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
735
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", 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
736
|
}
|
|
701
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectLazyOptionsDirective, decorators: [{
|
|
702
738
|
type: Directive,
|
|
703
739
|
args: [{
|
|
704
740
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -715,8 +751,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
715
751
|
* Input options strategy base class, for eagerly fetched options.
|
|
716
752
|
*/
|
|
717
753
|
class SiSelectOptionsStrategyBase {
|
|
718
|
-
value = signal([],
|
|
719
|
-
|
|
754
|
+
value = signal([], /* @ts-ignore */
|
|
755
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
756
|
+
filterValue = signal('', /* @ts-ignore */
|
|
757
|
+
...(ngDevMode ? [{ debugName: "filterValue" }] : /* istanbul ignore next */ []));
|
|
720
758
|
/**
|
|
721
759
|
* Rows that should be shown.
|
|
722
760
|
*
|
|
@@ -748,24 +786,26 @@ class SiSelectOptionsStrategyBase {
|
|
|
748
786
|
else {
|
|
749
787
|
return this.allRows();
|
|
750
788
|
}
|
|
751
|
-
},
|
|
789
|
+
}, /* @ts-ignore */
|
|
790
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
752
791
|
selectedRows = computed(() => {
|
|
753
792
|
const values = this.value();
|
|
754
793
|
return this.allRows()
|
|
755
794
|
.map(row => (row.type === 'group' ? row.options : row))
|
|
756
795
|
.flat()
|
|
757
796
|
.filter(option => values.some(value => this.optionsEqual()(value, option.value)));
|
|
758
|
-
},
|
|
797
|
+
}, /* @ts-ignore */
|
|
798
|
+
...(ngDevMode ? [{ debugName: "selectedRows" }] : /* istanbul ignore next */ []));
|
|
759
799
|
onValueChange(value) {
|
|
760
800
|
this.value.set(value);
|
|
761
801
|
}
|
|
762
802
|
onFilter(filterValue) {
|
|
763
803
|
this.filterValue.set(filterValue ?? '');
|
|
764
804
|
}
|
|
765
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
766
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
805
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectOptionsStrategyBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
806
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: SiSelectOptionsStrategyBase, isStandalone: true, ngImport: i0 });
|
|
767
807
|
}
|
|
768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectOptionsStrategyBase, decorators: [{
|
|
769
809
|
type: Directive
|
|
770
810
|
}] });
|
|
771
811
|
|
|
@@ -784,7 +824,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
784
824
|
*/
|
|
785
825
|
class SiSelectSimpleOptionsDirective extends SiSelectOptionsStrategyBase {
|
|
786
826
|
/** Options to be shown in select dropdown */
|
|
787
|
-
options = input(
|
|
827
|
+
options = input(/* @ts-ignore */
|
|
828
|
+
...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
|
|
788
829
|
/**
|
|
789
830
|
* By default, values are check on referential equality. Provide a function to customize the behavior.
|
|
790
831
|
*
|
|
@@ -793,14 +834,15 @@ class SiSelectSimpleOptionsDirective extends SiSelectOptionsStrategyBase {
|
|
|
793
834
|
* (a: T, b: T): boolean => a === b
|
|
794
835
|
* ```
|
|
795
836
|
*/
|
|
796
|
-
optionsEqual = input((a, b) => a === b, { ...(ngDevMode ? { debugName: "optionsEqual" } : {}),
|
|
837
|
+
optionsEqual = input((a, b) => a === b, { ...(ngDevMode ? { debugName: "optionsEqual" } : /* istanbul ignore next */ {}),
|
|
797
838
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
798
839
|
alias: 'optionEqualCheckFn' });
|
|
799
|
-
allRows = computed(() => this.options() ?? [],
|
|
800
|
-
|
|
801
|
-
static
|
|
840
|
+
allRows = computed(() => this.options() ?? [], /* @ts-ignore */
|
|
841
|
+
...(ngDevMode ? [{ debugName: "allRows" }] : /* istanbul ignore next */ []));
|
|
842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectSimpleOptionsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
843
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", 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
844
|
}
|
|
803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectSimpleOptionsDirective, decorators: [{
|
|
804
846
|
type: Directive,
|
|
805
847
|
args: [{
|
|
806
848
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -838,8 +880,8 @@ class SiSelectSingleValueDirective extends SiSelectSelectionStrategy {
|
|
|
838
880
|
fromArrayValue([value]) {
|
|
839
881
|
return value;
|
|
840
882
|
}
|
|
841
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
842
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
883
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectSingleValueDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
884
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: SiSelectSingleValueDirective, isStandalone: true, selector: "si-select:not([multi])", providers: [
|
|
843
885
|
{ provide: SiSelectSelectionStrategy, useExisting: SiSelectSingleValueDirective },
|
|
844
886
|
{
|
|
845
887
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -848,7 +890,7 @@ class SiSelectSingleValueDirective extends SiSelectSelectionStrategy {
|
|
|
848
890
|
}
|
|
849
891
|
], usesInheritance: true, ngImport: i0 });
|
|
850
892
|
}
|
|
851
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
893
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectSingleValueDirective, decorators: [{
|
|
852
894
|
type: Directive,
|
|
853
895
|
args: [{
|
|
854
896
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -893,8 +935,8 @@ class SiSelectMultiValueDirective extends SiSelectSelectionStrategy {
|
|
|
893
935
|
toArrayValue(value) {
|
|
894
936
|
return value ?? [];
|
|
895
937
|
}
|
|
896
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
897
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
938
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectMultiValueDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
939
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: SiSelectMultiValueDirective, isStandalone: true, selector: "si-select[multi]", providers: [
|
|
898
940
|
{ provide: SiSelectSelectionStrategy, useExisting: SiSelectMultiValueDirective },
|
|
899
941
|
{
|
|
900
942
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -903,7 +945,7 @@ class SiSelectMultiValueDirective extends SiSelectSelectionStrategy {
|
|
|
903
945
|
}
|
|
904
946
|
], usesInheritance: true, ngImport: i0 });
|
|
905
947
|
}
|
|
906
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectMultiValueDirective, decorators: [{
|
|
907
949
|
type: Directive,
|
|
908
950
|
args: [{
|
|
909
951
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -929,16 +971,16 @@ class SiSelectActionDirective {
|
|
|
929
971
|
* Close the select drop down on click.
|
|
930
972
|
* @defaultValue false
|
|
931
973
|
*/
|
|
932
|
-
selectActionAutoClose = input(false, { ...(ngDevMode ? { debugName: "selectActionAutoClose" } : {}), transform: booleanAttribute });
|
|
974
|
+
selectActionAutoClose = input(false, { ...(ngDevMode ? { debugName: "selectActionAutoClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
933
975
|
close() {
|
|
934
976
|
if (this.selectActionAutoClose()) {
|
|
935
977
|
this.select.close();
|
|
936
978
|
}
|
|
937
979
|
}
|
|
938
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
939
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
980
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
981
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", 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
982
|
}
|
|
941
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectActionDirective, decorators: [{
|
|
942
984
|
type: Directive,
|
|
943
985
|
args: [{
|
|
944
986
|
selector: '[siSelectAction]',
|
|
@@ -955,8 +997,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
955
997
|
* SPDX-License-Identifier: MIT
|
|
956
998
|
*/
|
|
957
999
|
class SiSelectModule {
|
|
958
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
959
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1000
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1001
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: SiSelectModule, imports: [SiSelectActionDirective,
|
|
960
1002
|
SiSelectActionsDirective,
|
|
961
1003
|
SiSelectComponent,
|
|
962
1004
|
SiSelectGroupTemplateDirective,
|
|
@@ -971,9 +1013,9 @@ class SiSelectModule {
|
|
|
971
1013
|
SiSelectOptionTemplateDirective,
|
|
972
1014
|
SiSelectSimpleOptionsDirective,
|
|
973
1015
|
SiSelectSingleValueDirective] });
|
|
974
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1016
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectModule, imports: [SiSelectComponent] });
|
|
975
1017
|
}
|
|
976
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectModule, decorators: [{
|
|
977
1019
|
type: NgModule,
|
|
978
1020
|
args: [{
|
|
979
1021
|
imports: [
|
|
@@ -1053,20 +1095,21 @@ class SiCustomSelectDirective {
|
|
|
1053
1095
|
* `__si-custom-select-${SiCustomSelectDirective.idCounter++}`
|
|
1054
1096
|
* ```
|
|
1055
1097
|
*/
|
|
1056
|
-
id = input(`__si-custom-select-${SiCustomSelectDirective.idCounter++}`,
|
|
1098
|
+
id = input(`__si-custom-select-${SiCustomSelectDirective.idCounter++}`, /* @ts-ignore */
|
|
1099
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1057
1100
|
/**
|
|
1058
1101
|
* Whether the select input is disabled.
|
|
1059
1102
|
*
|
|
1060
1103
|
* @defaultValue false
|
|
1061
1104
|
*/
|
|
1062
1105
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1063
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled', transform: booleanAttribute });
|
|
1106
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
1064
1107
|
/**
|
|
1065
1108
|
* Readonly state. Similar to disabled but with higher contrast.
|
|
1066
1109
|
*
|
|
1067
1110
|
* @defaultValue false
|
|
1068
1111
|
*/
|
|
1069
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
1112
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1070
1113
|
/** Emits when the dropdown open state changes. */
|
|
1071
1114
|
openChange = output();
|
|
1072
1115
|
/**
|
|
@@ -1074,26 +1117,32 @@ class SiCustomSelectDirective {
|
|
|
1074
1117
|
*
|
|
1075
1118
|
* @defaultValue undefined
|
|
1076
1119
|
*/
|
|
1077
|
-
value = model(undefined,
|
|
1120
|
+
value = model(undefined, /* @ts-ignore */
|
|
1121
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1078
1122
|
/**
|
|
1079
1123
|
* Whether the dropdown is currently open.
|
|
1080
1124
|
*
|
|
1081
1125
|
* @defaultValue false
|
|
1082
1126
|
*/
|
|
1083
|
-
isOpen = signal(false,
|
|
1127
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
1128
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
1084
1129
|
/** @internal */
|
|
1085
|
-
labelledby = computed(() => `${this.id()}-label ${this.id()}-combobox`,
|
|
1130
|
+
labelledby = computed(() => `${this.id()}-label ${this.id()}-combobox`, /* @ts-ignore */
|
|
1131
|
+
...(ngDevMode ? [{ debugName: "labelledby" }] : /* istanbul ignore next */ []));
|
|
1086
1132
|
/** @internal */
|
|
1087
|
-
comboboxLabelId = computed(() => `${this.id()}-combobox`,
|
|
1133
|
+
comboboxLabelId = computed(() => `${this.id()}-combobox`, /* @ts-ignore */
|
|
1134
|
+
...(ngDevMode ? [{ debugName: "comboboxLabelId" }] : /* istanbul ignore next */ []));
|
|
1088
1135
|
/** @internal */
|
|
1089
|
-
dropdownId = computed(() => this.id() + '-dropdown',
|
|
1136
|
+
dropdownId = computed(() => this.id() + '-dropdown', /* @ts-ignore */
|
|
1137
|
+
...(ngDevMode ? [{ debugName: "dropdownId" }] : /* istanbul ignore next */ []));
|
|
1090
1138
|
/**
|
|
1091
1139
|
* Value forwarded to the `aria-haspopup` attribute. Reflects the
|
|
1092
1140
|
* `contentType` input of the registered {@link SiSelectDropdownDirective},
|
|
1093
1141
|
* defaulting to `'listbox'` until a dropdown template is registered.
|
|
1094
1142
|
* @internal
|
|
1095
1143
|
*/
|
|
1096
|
-
haspopup = computed(() => this.dropdownDirective()?.contentType() ?? 'listbox',
|
|
1144
|
+
haspopup = computed(() => this.dropdownDirective()?.contentType() ?? 'listbox', /* @ts-ignore */
|
|
1145
|
+
...(ngDevMode ? [{ debugName: "haspopup" }] : /* istanbul ignore next */ []));
|
|
1097
1146
|
/**
|
|
1098
1147
|
* This ID will be bound to the `aria-describedby` attribute of the select.
|
|
1099
1148
|
*
|
|
@@ -1102,12 +1151,15 @@ class SiCustomSelectDirective {
|
|
|
1102
1151
|
* `${this.id()}-errormessage`
|
|
1103
1152
|
* ```
|
|
1104
1153
|
*/
|
|
1105
|
-
errormessageId = input(`${this.id()}-errormessage`,
|
|
1154
|
+
errormessageId = input(`${this.id()}-errormessage`, /* @ts-ignore */
|
|
1155
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
1106
1156
|
/** Combined disabled state from input and form control. */
|
|
1107
|
-
disabled = computed(() => this.disabledInput() || this.disabledByForm(),
|
|
1157
|
+
disabled = computed(() => this.disabledInput() || this.disabledByForm(), /* @ts-ignore */
|
|
1158
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1108
1159
|
onTouched = () => { };
|
|
1109
1160
|
onChange = () => { };
|
|
1110
|
-
disabledByForm = signal(false,
|
|
1161
|
+
disabledByForm = signal(false, /* @ts-ignore */
|
|
1162
|
+
...(ngDevMode ? [{ debugName: "disabledByForm" }] : /* istanbul ignore next */ []));
|
|
1111
1163
|
overlay = inject(Overlay);
|
|
1112
1164
|
focusTrapFactory = inject(ConfigurableFocusTrapFactory);
|
|
1113
1165
|
elementRef = inject(ElementRef);
|
|
@@ -1117,7 +1169,8 @@ class SiCustomSelectDirective {
|
|
|
1117
1169
|
overlayRef;
|
|
1118
1170
|
focusTrap;
|
|
1119
1171
|
closeOverlay$ = new Subject();
|
|
1120
|
-
dropdownDirective = signal(undefined,
|
|
1172
|
+
dropdownDirective = signal(undefined, /* @ts-ignore */
|
|
1173
|
+
...(ngDevMode ? [{ debugName: "dropdownDirective" }] : /* istanbul ignore next */ []));
|
|
1121
1174
|
constructor() {
|
|
1122
1175
|
this.destroyRef.onDestroy(() => {
|
|
1123
1176
|
this.disposeOverlay();
|
|
@@ -1226,13 +1279,13 @@ class SiCustomSelectDirective {
|
|
|
1226
1279
|
this.overlayRef = undefined;
|
|
1227
1280
|
}
|
|
1228
1281
|
}
|
|
1229
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1230
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1282
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCustomSelectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1283
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", 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
1284
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SiCustomSelectDirective, multi: true },
|
|
1232
1285
|
{ provide: SI_FORM_ITEM_CONTROL, useExisting: SiCustomSelectDirective }
|
|
1233
1286
|
], ngImport: i0 });
|
|
1234
1287
|
}
|
|
1235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCustomSelectDirective, decorators: [{
|
|
1236
1289
|
type: Directive,
|
|
1237
1290
|
args: [{
|
|
1238
1291
|
selector: '[siCustomSelect]',
|
|
@@ -1290,22 +1343,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1290
1343
|
class SiSelectComboboxComponent {
|
|
1291
1344
|
icons = addIcons({ elementDown2 });
|
|
1292
1345
|
customSelect = inject(SiCustomSelectDirective);
|
|
1293
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1294
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1346
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1347
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", 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
1348
|
<ng-content />
|
|
1296
1349
|
<div class="form-control-actions ms-auto my-n4">
|
|
1297
1350
|
<si-icon class="dropdown-caret icon flip-rtl p-0 m-0" [icon]="icons.elementDown2" />
|
|
1298
1351
|
</div>
|
|
1299
|
-
`, isInline: true, styles: [":host-context(.form-control.dropdown) .dropdown-caret{margin-inline-end:calc((var(--si-feedback-icon-offset, 0px) + var(--si-action-icon-offset)) * -1)}.dropdown-caret{transform-origin:center}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }]
|
|
1352
|
+
`, isInline: true, styles: [":host-context(.form-control.dropdown) .dropdown-caret{margin-inline-end:calc((var(--si-feedback-icon-offset, 0px) + var(--si-action-icon-offset)) * -1)}.dropdown-caret{transform-origin:center}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }] });
|
|
1300
1353
|
}
|
|
1301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectComboboxComponent, decorators: [{
|
|
1302
1355
|
type: Component,
|
|
1303
1356
|
args: [{ selector: 'si-select-combobox', imports: [SiIconComponent], template: `
|
|
1304
1357
|
<ng-content />
|
|
1305
1358
|
<div class="form-control-actions ms-auto my-n4">
|
|
1306
1359
|
<si-icon class="dropdown-caret icon flip-rtl p-0 m-0" [icon]="icons.elementDown2" />
|
|
1307
1360
|
</div>
|
|
1308
|
-
`,
|
|
1361
|
+
`, host: {
|
|
1309
1362
|
class: 'select focus-none dropdown-toggle d-flex align-items-center w-100',
|
|
1310
1363
|
'[attr.id]': 'customSelect.comboboxLabelId()',
|
|
1311
1364
|
'[class.show]': 'customSelect.isOpen()'
|
|
@@ -1343,15 +1396,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1343
1396
|
*/
|
|
1344
1397
|
class SiSelectComboboxValueComponent {
|
|
1345
1398
|
/** An optional icon rendered before the projected content. */
|
|
1346
|
-
icon = input(
|
|
1399
|
+
icon = input(/* @ts-ignore */
|
|
1400
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1347
1401
|
/** Optional CSS color class applied to {@link icon}. */
|
|
1348
|
-
iconColor = input(
|
|
1402
|
+
iconColor = input(/* @ts-ignore */
|
|
1403
|
+
...(ngDevMode ? [undefined, { debugName: "iconColor" }] : /* istanbul ignore next */ []));
|
|
1349
1404
|
/** Optional secondary icon stacked on top of {@link icon}. */
|
|
1350
|
-
stackedIcon = input(
|
|
1405
|
+
stackedIcon = input(/* @ts-ignore */
|
|
1406
|
+
...(ngDevMode ? [undefined, { debugName: "stackedIcon" }] : /* istanbul ignore next */ []));
|
|
1351
1407
|
/** Optional CSS color class applied to {@link stackedIcon}. */
|
|
1352
|
-
stackedIconColor = input(
|
|
1353
|
-
|
|
1354
|
-
static
|
|
1408
|
+
stackedIconColor = input(/* @ts-ignore */
|
|
1409
|
+
...(ngDevMode ? [undefined, { debugName: "stackedIconColor" }] : /* istanbul ignore next */ []));
|
|
1410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectComboboxValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1411
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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
1412
|
@if (icon(); as iconName) {
|
|
1356
1413
|
<div class="icon-stack icon me-2 my-n4">
|
|
1357
1414
|
<si-icon [icon]="iconName" [class]="iconColor() ?? ''" />
|
|
@@ -1361,9 +1418,9 @@ class SiSelectComboboxValueComponent {
|
|
|
1361
1418
|
</div>
|
|
1362
1419
|
}
|
|
1363
1420
|
<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"] }]
|
|
1421
|
+
`, 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
1422
|
}
|
|
1366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectComboboxValueComponent, decorators: [{
|
|
1367
1424
|
type: Component,
|
|
1368
1425
|
args: [{ selector: 'si-select-combobox-value', imports: [SiIconComponent], template: `
|
|
1369
1426
|
@if (icon(); as iconName) {
|
|
@@ -1375,7 +1432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1375
1432
|
</div>
|
|
1376
1433
|
}
|
|
1377
1434
|
<ng-content />
|
|
1378
|
-
`,
|
|
1435
|
+
`, host: {
|
|
1379
1436
|
class: 'text-nowrap'
|
|
1380
1437
|
}, styles: ["@charset \"UTF-8\";:host{display:inline-block;max-inline-size:100%}:host(.comma-separated:not(:first-of-type)):before{content:\",\\a0\"}\n"] }]
|
|
1381
1438
|
}], 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 +1463,18 @@ class SiSelectDropdownDirective {
|
|
|
1406
1463
|
* forwarded to the `aria-haspopup` attribute of the combobox host of
|
|
1407
1464
|
* the parent {@link SiCustomSelectDirective}.
|
|
1408
1465
|
*/
|
|
1409
|
-
contentType = input.required(
|
|
1466
|
+
contentType = input.required(/* @ts-ignore */
|
|
1467
|
+
...(ngDevMode ? [{ debugName: "contentType" }] : /* istanbul ignore next */ []));
|
|
1410
1468
|
/** @internal */
|
|
1411
1469
|
templateRef = inject(TemplateRef);
|
|
1412
1470
|
constructor() {
|
|
1413
1471
|
const customSelect = inject(SiCustomSelectDirective, { optional: true });
|
|
1414
1472
|
customSelect?.registerDropdown(this);
|
|
1415
1473
|
}
|
|
1416
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1417
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1474
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1475
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: SiSelectDropdownDirective, isStandalone: true, selector: "[si-select-dropdown]", inputs: { contentType: { classPropertyName: "contentType", publicName: "contentType", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
1418
1476
|
}
|
|
1419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSelectDropdownDirective, decorators: [{
|
|
1420
1478
|
type: Directive,
|
|
1421
1479
|
args: [{
|
|
1422
1480
|
// eslint-disable-next-line @angular-eslint/directive-selector
|