@siemens/element-ng 49.6.0 → 49.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/siemens-element-ng-about.mjs +2 -2
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +8 -8
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +3 -3
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +5 -5
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +2 -2
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +2 -2
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +43 -8
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +8 -8
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +2 -2
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +2 -2
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +2 -2
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +4 -4
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +2 -2
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +31 -14
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +16 -4
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +59 -46
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +2 -2
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +9 -8
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +4 -4
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +12 -12
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly.mjs +1 -1
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +3 -3
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +19 -11
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +25 -26
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +316 -354
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +4 -4
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +4 -4
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +2 -2
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +2 -2
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +5 -2
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +2 -2
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +2 -2
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +4 -4
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +10 -3
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +10 -4
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +4 -4
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +8 -5
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +69 -29
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +2 -2
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +2 -2
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +2 -2
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +10 -10
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +2 -2
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +2 -2
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +10 -8
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +2 -2
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +88 -53
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/package.json +4 -4
- package/schematics/migrations/data/element-migration-data.js +20 -0
- package/schematics/migrations/data/index.js +1 -16
- package/schematics/migrations/ngx-translate/index.js +1 -137
- package/schematics/migrations/ngx-translate/missing-translate-migration.js +141 -0
- package/schematics/ng-add/index.js +1 -12
- package/schematics/ng-add/ng-add-rule.js +16 -0
- package/schematics/ng-update/index.js +1 -17
- package/schematics/ng-update/migrate-to-v49.js +21 -0
- package/template-i18n.json +3 -1
- package/types/siemens-element-ng-card.d.ts +26 -1
- package/types/siemens-element-ng-common.d.ts +3 -3
- package/types/siemens-element-ng-dashboard.d.ts +4 -1
- package/types/siemens-element-ng-date-range-filter.d.ts +10 -1
- package/types/siemens-element-ng-file-uploader.d.ts +4 -3
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-loading-spinner.d.ts +4 -2
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +167 -183
- package/types/siemens-element-ng-navbar.d.ts +2 -2
- package/types/siemens-element-ng-popover.d.ts +9 -2
- package/types/siemens-element-ng-search-bar.d.ts +7 -1
- package/types/siemens-element-ng-side-panel.d.ts +2 -0
- package/types/siemens-element-ng-status-bar.d.ts +19 -10
- package/types/siemens-element-ng-tooltip.d.ts +9 -3
- package/types/siemens-element-ng-translate.d.ts +2 -0
- package/types/siemens-element-ng-wizard.d.ts +23 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-popover.mjs","sources":["../../../../projects/element-ng/popover/si-popover.component.ts","../../../../projects/element-ng/popover/si-popover.component.html","../../../../projects/element-ng/popover/si-popover.directive.ts","../../../../projects/element-ng/popover/si-popover-title.directive.ts","../../../../projects/element-ng/popover/si-popover-body.directive.ts","../../../../projects/element-ng/popover/index.ts","../../../../projects/element-ng/popover/siemens-element-ng-popover.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';\nimport { ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n inject,\n Injector,\n input,\n OnDestroy,\n OnInit,\n signal,\n TemplateRef,\n viewChild,\n DOCUMENT,\n computed\n} from '@angular/core';\nimport { calculateOverlayArrowPosition, OverlayArrowPosition } from '@siemens/element-ng/common';\nimport { SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\n\nimport { SiPopoverDirective } from './si-popover.directive';\n\n@Component({\n selector: 'si-popover',\n imports: [NgTemplateOutlet, SiIconComponent, SiTranslatePipe],\n templateUrl: './si-popover.component.html',\n host: {\n '[id]': 'this.popoverDirective().popoverId'\n }\n})\nexport class PopoverComponent implements OnInit, OnDestroy {\n readonly popoverDirective = input.required<SiPopoverDirective>();\n readonly popoverWrapper = viewChild.required<ElementRef>('popoverWrapper');\n\n /** @internal */\n labelledBy: string | undefined;\n /** @internal */\n describedBy: string | undefined;\n protected readonly positionClass = signal('');\n protected readonly arrowPos = signal<OverlayArrowPosition | undefined>(undefined);\n protected readonly description = computed(() => {\n const description = this.popoverDirective().siPopover();\n return !(description instanceof TemplateRef) ? description : undefined;\n });\n protected popoverTemplate: TemplateRef<any> | null = null;\n protected injector = inject(Injector);\n\n private elementRef = inject(ElementRef);\n private focusTrapFactory = inject(ConfigurableFocusTrapFactory);\n private focusTrap?: ConfigurableFocusTrap;\n private readonly previouslyActiveElement = inject(DOCUMENT).activeElement;\n\n ngOnInit(): void {\n const popoverDirective = this.popoverDirective();\n const popover = popoverDirective.siPopover();\n if (popover instanceof TemplateRef) {\n this.popoverTemplate = popover;\n }\n this.labelledBy = `__popover-title_${popoverDirective.popoverCounter}`;\n this.describedBy = `__popover-body_${popoverDirective.popoverCounter}`;\n\n this.applyFocus();\n }\n\n ngOnDestroy(): void {\n this.focusTrap?.destroy();\n if (\n this.previouslyActiveElement &&\n 'focus' in this.previouslyActiveElement &&\n typeof this.previouslyActiveElement.focus === 'function'\n ) {\n this.previouslyActiveElement.focus();\n }\n }\n\n /** @internal */\n updateArrow(change: ConnectedOverlayPositionChange, anchor?: ElementRef): void {\n const positionClass = `popover-${change.connectionPair.overlayX}-${change.connectionPair.overlayY}`;\n // need two updates as class changes affect the position\n this.positionClass.set(positionClass);\n const arrowPos = calculateOverlayArrowPosition(change, this.elementRef, anchor);\n this.arrowPos.set(arrowPos);\n }\n\n hide(): void {\n this.popoverDirective().hide();\n }\n\n private applyFocus(): void {\n // Using setTimeout ensures that SR first read `expanded` before we move the focus.\n setTimeout(async () => {\n const popoverWrapperEl = this.popoverWrapper().nativeElement;\n this.focusTrap = this.focusTrapFactory.create(this.popoverWrapper().nativeElement);\n const moved = await this.focusTrap.focusFirstTabbableElementWhenReady();\n if (!moved) {\n popoverWrapperEl.tabIndex = 0;\n popoverWrapperEl.focus();\n }\n });\n }\n}\n","@let popover = popoverDirective();\n<div\n #popoverWrapper\n role=\"dialog\"\n [class]=\"[\n 'popover',\n 'position-relative',\n 'focus-inside',\n positionClass(),\n popover.containerClass()\n ]\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-describedby]=\"describedBy\"\n (keydown.escape)=\"hide()\"\n>\n <div\n class=\"popover-arrow\"\n [style.left.px]=\"arrowPos()?.left\"\n [style.right.px]=\"arrowPos()?.right\"\n ></div>\n @if (popover.title()) {\n <div class=\"popover-header\">\n @let iconValue = popover.icon();\n @if (iconValue) {\n <si-icon class=\"icon me-1\" [icon]=\"iconValue\" />\n }\n <span class=\"si-h5\" [id]=\"labelledBy\">{{ popover.title() | translate }}</span>\n </div>\n }\n @if (!popoverTemplate) {\n <div class=\"popover-body\">\n <div class=\"si-body\" [id]=\"describedBy\">{{ description() | translate }}</div>\n </div>\n } @else {\n <!-- If title is already provided, we wrap the template with the `popover-body` class\n since the template may not be in the popover body directive. Also used by SiHelpButtonComponent -->\n @if (popover.title()) {\n <div class=\"popover-body\">\n <ng-template\n [ngTemplateOutlet]=\"popoverTemplate\"\n [ngTemplateOutletContext]=\"popover.context()\"\n [ngTemplateOutletInjector]=\"injector\"\n />\n </div>\n } @else {\n <ng-template\n [ngTemplateOutlet]=\"popoverTemplate\"\n [ngTemplateOutletContext]=\"popover.context()\"\n [ngTemplateOutletInjector]=\"injector\"\n />\n }\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ComponentRef,\n computed,\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n OnDestroy,\n output,\n signal,\n TemplateRef\n} from '@angular/core';\nimport { getOverlay, getPositionStrategy, positions } from '@siemens/element-ng/common';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate-types';\nimport { Subject, takeUntil } from 'rxjs';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n selector: '[siPopover]',\n host: {\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'popoverId'\n },\n exportAs: 'si-popover'\n})\nexport class SiPopoverDirective implements OnDestroy {\n private static idCounter = 0;\n\n /**\n * The popover text to be displayed\n */\n readonly siPopover = input<TranslatableString | TemplateRef<unknown>>();\n\n /**\n * The placement of the popover. One of 'top', 'start', end', 'bottom'\n *\n * @defaultValue 'auto'\n */\n readonly placement = input<keyof typeof positions>('auto', { alias: 'siPopoverPlacement' });\n\n readonly placementInternal = computed(() => {\n if (\n this.placement() !== 'top' &&\n this.placement() !== 'bottom' &&\n this.placement() !== 'start' &&\n this.placement() !== 'end'\n ) {\n return 'auto';\n } else {\n return this.placement();\n }\n });\n\n /**\n * The title to be displayed on top for the popover\n *\n * @defaultValue undefined\n */\n readonly title = input<TranslatableString>(undefined, { alias: 'siPopoverTitle' });\n\n /**\n * The class that will be applied to container of the popover\n *\n * @defaultValue ''\n */\n readonly containerClass = input('', { alias: 'siPopoverContainerClass' });\n\n /**\n * The icon to be displayed besides popover title\n *\n * @defaultValue undefined\n */\n readonly icon = input<string>(undefined, { alias: 'siPopoverIcon' });\n\n /**\n * The context for the attached template\n *\n * @defaultValue undefined\n */\n readonly context = input<unknown>(undefined, { alias: 'siPopoverContext' });\n\n /**\n * Emits an event when the popover is shown/hidden\n */\n readonly visibilityChange = output<void>({ alias: 'siPopoverVisibilityChange' });\n\n /** @internal */\n readonly popoverCounter = SiPopoverDirective.idCounter++;\n /** @internal */\n readonly popoverId = `__popover_${this.popoverCounter}`;\n\n /** @internal */\n protected readonly isOpen = signal<boolean>(false);\n\n private overlayref?: OverlayRef;\n private overlay = inject(Overlay);\n private elementRef = inject(ElementRef);\n private destroyer = new Subject<void>();\n\n ngOnDestroy(): void {\n this.overlayref?.dispose();\n this.destroyer.next();\n this.destroyer.complete();\n }\n\n /**\n * Displays popover and emits 'shown' event.\n */\n show(): void {\n if (this.overlayref?.hasAttached()) {\n return;\n }\n this.overlayref = getOverlay(this.elementRef, this.overlay, false, this.placementInternal());\n this.overlayref\n .outsidePointerEvents()\n .pipe(takeUntil(this.destroyer))\n .subscribe(({ target }) => {\n if (target !== this.elementRef.nativeElement) {\n this.hide();\n }\n });\n\n const popoverPortal = new ComponentPortal(PopoverComponent);\n const popoverRef: ComponentRef<PopoverComponent> = this.overlayref.attach(popoverPortal);\n\n popoverRef.setInput('popoverDirective', this);\n\n const positionStrategy = getPositionStrategy(this.overlayref);\n positionStrategy?.positionChanges\n .pipe(takeUntil(this.destroyer))\n .subscribe(change => popoverRef.instance.updateArrow(change, this.elementRef));\n\n this.isOpen.set(true);\n this.visibilityChange.emit();\n }\n\n /**\n * Hides the popover and emits 'hidden' event.\n */\n hide(): void {\n if (this.overlayref?.hasAttached()) {\n this.overlayref?.detach();\n this.isOpen.set(false);\n this.visibilityChange.emit();\n this.destroyer.next();\n }\n }\n\n /**\n * Updates the position of the popover based on the position strategy.\n */\n updatePosition(): void {\n this.overlayref?.updatePosition();\n }\n\n @HostListener('click')\n protected onClick(): void {\n if (this.overlayref?.hasAttached()) {\n this.hide();\n } else {\n this.show();\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, inject } from '@angular/core';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'si-popover-title',\n host: {\n '[id]': 'this.popover.labelledBy',\n 'class': 'popover-header'\n }\n})\nexport class SiPopoverTitleDirective {\n readonly popover = inject(PopoverComponent);\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, inject } from '@angular/core';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'si-popover-body',\n host: {\n '[id]': 'this.popover.describedBy',\n 'class': 'popover-body d-block'\n }\n})\nexport class SiPopoverBodyDirective {\n readonly popover = inject(PopoverComponent);\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-popover.directive';\nexport * from './si-popover-title.directive';\nexport * from './si-popover-body.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;AAGG;MAgCU,gBAAgB,CAAA;AAClB,IAAA,gBAAgB,GAAG,KAAK,CAAC,QAAQ,2DAAsB;AACvD,IAAA,cAAc,GAAG,SAAS,CAA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MAaU,sBAAsB,CAAA;AACxB,IAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;uGADhC,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,0BAAA,EAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBARlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAET,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,0BAA0B;AAClC,wBAAA,OAAO,EAAE;AACV;AACF,iBAAA;;;ACfD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-popover.mjs","sources":["../../../../projects/element-ng/popover/si-popover.component.ts","../../../../projects/element-ng/popover/si-popover.component.html","../../../../projects/element-ng/popover/si-popover.directive.ts","../../../../projects/element-ng/popover/si-popover-title.directive.ts","../../../../projects/element-ng/popover/si-popover-body.directive.ts","../../../../projects/element-ng/popover/index.ts","../../../../projects/element-ng/popover/siemens-element-ng-popover.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';\nimport { ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n inject,\n Injector,\n input,\n OnDestroy,\n OnInit,\n signal,\n TemplateRef,\n viewChild,\n DOCUMENT,\n computed\n} from '@angular/core';\nimport { calculateOverlayArrowPosition, OverlayArrowPosition } from '@siemens/element-ng/common';\nimport { SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\n\nimport { SiPopoverDirective } from './si-popover.directive';\n\n@Component({\n selector: 'si-popover',\n imports: [NgTemplateOutlet, SiIconComponent, SiTranslatePipe],\n templateUrl: './si-popover.component.html',\n host: {\n '[id]': 'this.popoverDirective().popoverId'\n }\n})\nexport class PopoverComponent implements OnInit, OnDestroy {\n readonly popoverDirective = input.required<SiPopoverDirective>();\n readonly popoverWrapper = viewChild.required<ElementRef>('popoverWrapper');\n\n /** @internal */\n labelledBy: string | undefined;\n /** @internal */\n describedBy: string | undefined;\n protected readonly positionClass = signal('');\n protected readonly arrowPos = signal<OverlayArrowPosition | undefined>(undefined);\n protected readonly description = computed(() => {\n const description = this.popoverDirective().siPopover();\n return !(description instanceof TemplateRef) ? description : undefined;\n });\n protected popoverTemplate: TemplateRef<any> | null = null;\n protected injector = inject(Injector);\n\n private elementRef = inject(ElementRef);\n private focusTrapFactory = inject(ConfigurableFocusTrapFactory);\n private focusTrap?: ConfigurableFocusTrap;\n private readonly previouslyActiveElement = inject(DOCUMENT).activeElement;\n\n ngOnInit(): void {\n const popoverDirective = this.popoverDirective();\n const popover = popoverDirective.siPopover();\n if (popover instanceof TemplateRef) {\n this.popoverTemplate = popover;\n }\n this.labelledBy = `__popover-title_${popoverDirective.popoverCounter}`;\n this.describedBy = `__popover-body_${popoverDirective.popoverCounter}`;\n\n this.applyFocus();\n }\n\n ngOnDestroy(): void {\n this.focusTrap?.destroy();\n if (\n this.previouslyActiveElement &&\n 'focus' in this.previouslyActiveElement &&\n typeof this.previouslyActiveElement.focus === 'function'\n ) {\n this.previouslyActiveElement.focus();\n }\n }\n\n /** @internal */\n updateArrow(change: ConnectedOverlayPositionChange, anchor?: ElementRef): void {\n const positionClass = `popover-${change.connectionPair.overlayX}-${change.connectionPair.overlayY}`;\n // need two updates as class changes affect the position\n this.positionClass.set(positionClass);\n const arrowPos = calculateOverlayArrowPosition(change, this.elementRef, anchor);\n this.arrowPos.set(arrowPos);\n }\n\n hide(): void {\n this.popoverDirective().hide();\n }\n\n private applyFocus(): void {\n // Using setTimeout ensures that SR first read `expanded` before we move the focus.\n setTimeout(async () => {\n const popoverWrapperEl = this.popoverWrapper().nativeElement;\n this.focusTrap = this.focusTrapFactory.create(this.popoverWrapper().nativeElement);\n const moved = await this.focusTrap.focusFirstTabbableElementWhenReady();\n if (!moved) {\n popoverWrapperEl.tabIndex = 0;\n popoverWrapperEl.focus();\n }\n });\n }\n}\n","@let popover = popoverDirective();\n<div\n #popoverWrapper\n role=\"dialog\"\n [class]=\"[\n 'popover',\n 'position-relative',\n 'focus-inside',\n positionClass(),\n popover.containerClass()\n ]\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-describedby]=\"describedBy\"\n (keydown.escape)=\"hide()\"\n>\n <div\n class=\"popover-arrow\"\n [style.left.px]=\"arrowPos()?.left\"\n [style.right.px]=\"arrowPos()?.right\"\n ></div>\n @if (popover.title()) {\n <div class=\"popover-header\">\n @let iconValue = popover.icon();\n @if (iconValue) {\n <si-icon class=\"icon me-1\" [icon]=\"iconValue\" />\n }\n <span class=\"si-h5\" [id]=\"labelledBy\">{{ popover.title() | translate }}</span>\n </div>\n }\n @if (!popoverTemplate) {\n <div class=\"popover-body\">\n <div class=\"si-body\" [id]=\"describedBy\">{{ description() | translate }}</div>\n </div>\n } @else {\n <!-- If title is already provided, we wrap the template with the `popover-body` class\n since the template may not be in the popover body directive. Also used by SiHelpButtonComponent -->\n @if (popover.title()) {\n <div class=\"popover-body\">\n <ng-template\n [ngTemplateOutlet]=\"popoverTemplate\"\n [ngTemplateOutletContext]=\"popover.context()\"\n [ngTemplateOutletInjector]=\"injector\"\n />\n </div>\n } @else {\n <ng-template\n [ngTemplateOutlet]=\"popoverTemplate\"\n [ngTemplateOutletContext]=\"popover.context()\"\n [ngTemplateOutletInjector]=\"injector\"\n />\n }\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Overlay, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ComponentRef,\n computed,\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n OnDestroy,\n output,\n signal,\n TemplateRef\n} from '@angular/core';\nimport { getOverlay, getPositionStrategy, positions } from '@siemens/element-ng/common';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate-types';\nimport { Subject, takeUntil } from 'rxjs';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n selector: '[siPopover]',\n host: {\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'popoverId'\n },\n exportAs: 'si-popover'\n})\nexport class SiPopoverDirective implements OnDestroy {\n private static idCounter = 0;\n\n /**\n * The popover text to be displayed\n */\n readonly siPopover = input<TranslatableString | TemplateRef<unknown>>();\n\n /**\n * The placement of the popover. One of 'top', 'start', end', 'bottom'\n *\n * @defaultValue 'auto'\n */\n readonly placement = input<keyof typeof positions>('auto', { alias: 'siPopoverPlacement' });\n\n readonly placementInternal = computed(() => {\n if (\n this.placement() !== 'top' &&\n this.placement() !== 'bottom' &&\n this.placement() !== 'start' &&\n this.placement() !== 'end'\n ) {\n return 'auto';\n } else {\n return this.placement();\n }\n });\n\n /**\n * The title to be displayed on top for the popover\n *\n * @defaultValue undefined\n */\n readonly title = input<TranslatableString>(undefined, { alias: 'siPopoverTitle' });\n\n /**\n * The class that will be applied to container of the popover\n *\n * @defaultValue ''\n */\n readonly containerClass = input('', { alias: 'siPopoverContainerClass' });\n\n /**\n * The icon to be displayed besides popover title\n *\n * @defaultValue undefined\n */\n readonly icon = input<string>(undefined, { alias: 'siPopoverIcon' });\n\n /**\n * The context for the attached template\n *\n * @defaultValue undefined\n */\n readonly context = input<unknown>(undefined, { alias: 'siPopoverContext' });\n\n /**\n * Optional CDK scroll strategy used for the popover overlay.\n * If not provided, the default reposition strategy is used.\n *\n * @defaultValue undefined\n */\n readonly scrollStrategy = input<ScrollStrategy>(undefined, { alias: 'siPopoverScrollStrategy' });\n\n /**\n * Emits an event when the popover is shown/hidden\n */\n readonly visibilityChange = output<void>({ alias: 'siPopoverVisibilityChange' });\n\n /** @internal */\n readonly popoverCounter = SiPopoverDirective.idCounter++;\n /** @internal */\n readonly popoverId = `__popover_${this.popoverCounter}`;\n\n /** @internal */\n protected readonly isOpen = signal<boolean>(false);\n\n private overlayref?: OverlayRef;\n private overlay = inject(Overlay);\n private elementRef = inject(ElementRef);\n private destroyer = new Subject<void>();\n\n ngOnDestroy(): void {\n this.overlayref?.dispose();\n this.destroyer.next();\n this.destroyer.complete();\n }\n\n /**\n * Displays popover and emits 'shown' event.\n */\n show(): void {\n if (this.overlayref?.hasAttached()) {\n return;\n }\n this.overlayref = getOverlay(\n this.elementRef,\n this.overlay,\n false,\n this.placementInternal(),\n false,\n true,\n this.scrollStrategy()\n );\n this.overlayref\n .outsidePointerEvents()\n .pipe(takeUntil(this.destroyer))\n .subscribe(({ target }) => {\n if (target !== this.elementRef.nativeElement) {\n this.hide();\n }\n });\n\n const popoverPortal = new ComponentPortal(PopoverComponent);\n const popoverRef: ComponentRef<PopoverComponent> = this.overlayref.attach(popoverPortal);\n\n popoverRef.setInput('popoverDirective', this);\n\n const positionStrategy = getPositionStrategy(this.overlayref);\n positionStrategy?.positionChanges\n .pipe(takeUntil(this.destroyer))\n .subscribe(change => popoverRef.instance.updateArrow(change, this.elementRef));\n\n this.isOpen.set(true);\n this.visibilityChange.emit();\n }\n\n /**\n * Hides the popover and emits 'hidden' event.\n */\n hide(): void {\n if (this.overlayref?.hasAttached()) {\n this.overlayref?.detach();\n this.isOpen.set(false);\n this.visibilityChange.emit();\n this.destroyer.next();\n }\n }\n\n /**\n * Updates the position of the popover based on the position strategy.\n */\n updatePosition(): void {\n this.overlayref?.updatePosition();\n }\n\n @HostListener('click')\n protected onClick(): void {\n if (this.overlayref?.hasAttached()) {\n this.hide();\n } else {\n this.show();\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, inject } from '@angular/core';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'si-popover-title',\n host: {\n '[id]': 'this.popover.labelledBy',\n 'class': 'popover-header'\n }\n})\nexport class SiPopoverTitleDirective {\n readonly popover = inject(PopoverComponent);\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, inject } from '@angular/core';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'si-popover-body',\n host: {\n '[id]': 'this.popover.describedBy',\n 'class': 'popover-body d-block'\n }\n})\nexport class SiPopoverBodyDirective {\n readonly popover = inject(PopoverComponent);\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-popover.directive';\nexport * from './si-popover-title.directive';\nexport * from './si-popover-body.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;AAGG;MAgCU,gBAAgB,CAAA;AAClB,IAAA,gBAAgB,GAAG,KAAK,CAAC,QAAQ,2DAAsB;AACvD,IAAA,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAa,gBAAgB,CAAC;;AAG1E,IAAA,UAAU;;AAEV,IAAA,WAAW;AACQ,IAAA,aAAa,GAAG,MAAM,CAAC,EAAE,yDAAC;AAC1B,IAAA,QAAQ,GAAG,MAAM,CAAmC,SAAS,oDAAC;AAC9D,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;QAC7C,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC,SAAS,EAAE;AACvD,QAAA,OAAO,EAAE,WAAW,YAAY,WA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IAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;uGADhC,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,0BAAA,EAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBARlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAET,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,0BAA0B;AAClC,wBAAA,OAAO,EAAE;AACV;AACF,iBAAA;;;ACfD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
@@ -58,6 +58,12 @@ class SiSearchBarComponent {
|
|
|
58
58
|
/** @defaultValue false */
|
|
59
59
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
60
60
|
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled', transform: booleanAttribute });
|
|
61
|
+
/**
|
|
62
|
+
* Defines the maximum length of the search input.
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue undefined
|
|
65
|
+
*/
|
|
66
|
+
maxlength = input(undefined, { ...(ngDevMode ? { debugName: "maxlength" } : {}), transform: numberAttribute });
|
|
61
67
|
/**
|
|
62
68
|
* Aria label for the clear button.
|
|
63
69
|
*
|
|
@@ -158,13 +164,13 @@ class SiSearchBarComponent {
|
|
|
158
164
|
this.inputRef().nativeElement.value = value;
|
|
159
165
|
}
|
|
160
166
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSearchBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
161
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiSearchBarComponent, isStandalone: true, selector: "si-search-bar", inputs: { debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, prohibitedCharacters: { classPropertyName: "prohibitedCharacters", publicName: "prohibitedCharacters", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, tabbable: { classPropertyName: "tabbable", publicName: "tabbable", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearButtonAriaLabel: { classPropertyName: "clearButtonAriaLabel", publicName: "clearButtonAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChange: "searchChange" }, host: { listeners: { "focus": "focus()" }, properties: { "class.readonly": "readonly()" } }, providers: [
|
|
167
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiSearchBarComponent, isStandalone: true, selector: "si-search-bar", inputs: { debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, prohibitedCharacters: { classPropertyName: "prohibitedCharacters", publicName: "prohibitedCharacters", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, tabbable: { classPropertyName: "tabbable", publicName: "tabbable", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, clearButtonAriaLabel: { classPropertyName: "clearButtonAriaLabel", publicName: "clearButtonAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChange: "searchChange" }, host: { listeners: { "focus": "focus()" }, properties: { "class.readonly": "readonly()" } }, providers: [
|
|
162
168
|
{
|
|
163
169
|
provide: NG_VALUE_ACCESSOR,
|
|
164
170
|
useExisting: SiSearchBarComponent,
|
|
165
171
|
multi: true
|
|
166
172
|
}
|
|
167
|
-
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"position-relative\" [class.disabled]=\"disabled()\" [class.focus]=\"inFocus\">\n @if (showIcon()) {\n <si-icon class=\"search-bar-icon icon text-secondary\" [icon]=\"icons.elementSearch\" />\n }\n <input\n #inputRef\n type=\"text\"\n class=\"form-control\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [class.dark-background]=\"colorVariant() === 'base-0'\"\n [class.icon-start]=\"showIcon()\"\n [class.is-invalid]=\"isInvalid\"\n [class.icon-end]=\"searchValue()\"\n [attr.tabindex]=\"tabbable() ? '' : '-1'\"\n [readonly]=\"readonly()\"\n (focus)=\"inFocus = true\"\n (blur)=\"onBlur()\"\n (input)=\"input($event)\"\n />\n @if (searchValue()) {\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-ghost cancel-button\"\n [attr.aria-label]=\"clearButtonAriaLabel() | translate\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"resetForm()\"\n (focusin)=\"onCancelFocus($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n</div>\n", styles: [":host{--search-bar-icon-color: var(--element-text-secondary);--input-background-color: var(--element-base-1);--input-background-hover-color: var(--element-base-1)}:host div:hover .search-bar-icon,:host div:hover ::placeholder,:host div.focus .search-bar-icon,:host div.focus ::placeholder{color:var(--element-text-primary)!important}.dark-background{--input-background-color: var(--element-base-4);--input-background-hover-color: var(--element-ui-4)}input{transition:none;background-color:var(--input-background-color);border-radius:4px;border-width:0}input.form-control:focus-visible{background-color:var(--input-background-color)}.cancel-button{position:absolute;inset-block:0;inset-inline-end:4px;margin-block:auto}.is-invalid~.cancel-button{color:var(--element-status-danger)}.search-bar-icon{position:absolute;inset-block:0;inset-inline-start:6px;align-items:center;color:var(--search-bar-icon-color)}.icon-start{padding-inline-start:calc(1.25rem + 12px)}.icon-end{padding-inline-end:1.25rem}::placeholder{color:var(--element-text-secondary);padding-inline-start:2px}.disabled .search-bar-icon,.disabled input,.disabled .cancel-button,.disabled ::placeholder{color:var(--element-text-disabled)}.disabled input{background-color:var(--input-background-color)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
173
|
+
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"position-relative\" [class.disabled]=\"disabled()\" [class.focus]=\"inFocus\">\n @if (showIcon()) {\n <si-icon class=\"search-bar-icon icon text-secondary\" [icon]=\"icons.elementSearch\" />\n }\n <input\n #inputRef\n type=\"text\"\n class=\"form-control\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [class.dark-background]=\"colorVariant() === 'base-0'\"\n [class.icon-start]=\"showIcon()\"\n [class.is-invalid]=\"isInvalid\"\n [class.icon-end]=\"searchValue()\"\n [attr.tabindex]=\"tabbable() ? '' : '-1'\"\n [attr.maxlength]=\"maxlength()\"\n [readonly]=\"readonly()\"\n (focus)=\"inFocus = true\"\n (blur)=\"onBlur()\"\n (input)=\"input($event)\"\n />\n @if (searchValue()) {\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary-ghost cancel-button\"\n [attr.aria-label]=\"clearButtonAriaLabel() | translate\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"resetForm()\"\n (focusin)=\"onCancelFocus($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n</div>\n", styles: [":host{--search-bar-icon-color: var(--element-text-secondary);--input-background-color: var(--element-base-1);--input-background-hover-color: var(--element-base-1)}:host div:hover .search-bar-icon,:host div:hover ::placeholder,:host div.focus .search-bar-icon,:host div.focus ::placeholder{color:var(--element-text-primary)!important}.dark-background{--input-background-color: var(--element-base-4);--input-background-hover-color: var(--element-ui-4)}input{transition:none;background-color:var(--input-background-color);border-radius:4px;border-width:0}input.form-control:focus-visible{background-color:var(--input-background-color)}.cancel-button{position:absolute;inset-block:0;inset-inline-end:4px;margin-block:auto}.is-invalid~.cancel-button{color:var(--element-status-danger)}.search-bar-icon{position:absolute;inset-block:0;inset-inline-start:6px;align-items:center;color:var(--search-bar-icon-color)}.icon-start{padding-inline-start:calc(1.25rem + 12px)}.icon-end{padding-inline-end:1.25rem}::placeholder{color:var(--element-text-secondary);padding-inline-start:2px}.disabled .search-bar-icon,.disabled input,.disabled .cancel-button,.disabled ::placeholder{color:var(--element-text-disabled)}.disabled input{background-color:var(--input-background-color)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
168
174
|
}
|
|
169
175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSearchBarComponent, decorators: [{
|
|
170
176
|
type: Component,
|
|
@@ -176,8 +182,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
176
182
|
}
|
|
177
183
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
178
184
|
'[class.readonly]': 'readonly()'
|
|
179
|
-
}, template: "<div class=\"position-relative\" [class.disabled]=\"disabled()\" [class.focus]=\"inFocus\">\n @if (showIcon()) {\n <si-icon class=\"search-bar-icon icon text-secondary\" [icon]=\"icons.elementSearch\" />\n }\n <input\n #inputRef\n type=\"text\"\n class=\"form-control\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [class.dark-background]=\"colorVariant() === 'base-0'\"\n [class.icon-start]=\"showIcon()\"\n [class.is-invalid]=\"isInvalid\"\n [class.icon-end]=\"searchValue()\"\n [attr.tabindex]=\"tabbable() ? '' : '-1'\"\n [readonly]=\"readonly()\"\n (focus)=\"inFocus = true\"\n (blur)=\"onBlur()\"\n (input)=\"input($event)\"\n />\n @if (searchValue()) {\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-ghost cancel-button\"\n [attr.aria-label]=\"clearButtonAriaLabel() | translate\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"resetForm()\"\n (focusin)=\"onCancelFocus($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n</div>\n", styles: [":host{--search-bar-icon-color: var(--element-text-secondary);--input-background-color: var(--element-base-1);--input-background-hover-color: var(--element-base-1)}:host div:hover .search-bar-icon,:host div:hover ::placeholder,:host div.focus .search-bar-icon,:host div.focus ::placeholder{color:var(--element-text-primary)!important}.dark-background{--input-background-color: var(--element-base-4);--input-background-hover-color: var(--element-ui-4)}input{transition:none;background-color:var(--input-background-color);border-radius:4px;border-width:0}input.form-control:focus-visible{background-color:var(--input-background-color)}.cancel-button{position:absolute;inset-block:0;inset-inline-end:4px;margin-block:auto}.is-invalid~.cancel-button{color:var(--element-status-danger)}.search-bar-icon{position:absolute;inset-block:0;inset-inline-start:6px;align-items:center;color:var(--search-bar-icon-color)}.icon-start{padding-inline-start:calc(1.25rem + 12px)}.icon-end{padding-inline-end:1.25rem}::placeholder{color:var(--element-text-secondary);padding-inline-start:2px}.disabled .search-bar-icon,.disabled input,.disabled .cancel-button,.disabled ::placeholder{color:var(--element-text-disabled)}.disabled input{background-color:var(--input-background-color)}\n"] }]
|
|
180
|
-
}], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], prohibitedCharacters: [{ type: i0.Input, args: [{ isSignal: true, alias: "prohibitedCharacters", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], tabbable: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabbable", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], colorVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorVariant", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearButtonAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButtonAriaLabel", required: false }] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], focus: [{
|
|
185
|
+
}, template: "<div class=\"position-relative\" [class.disabled]=\"disabled()\" [class.focus]=\"inFocus\">\n @if (showIcon()) {\n <si-icon class=\"search-bar-icon icon text-secondary\" [icon]=\"icons.elementSearch\" />\n }\n <input\n #inputRef\n type=\"text\"\n class=\"form-control\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [class.dark-background]=\"colorVariant() === 'base-0'\"\n [class.icon-start]=\"showIcon()\"\n [class.is-invalid]=\"isInvalid\"\n [class.icon-end]=\"searchValue()\"\n [attr.tabindex]=\"tabbable() ? '' : '-1'\"\n [attr.maxlength]=\"maxlength()\"\n [readonly]=\"readonly()\"\n (focus)=\"inFocus = true\"\n (blur)=\"onBlur()\"\n (input)=\"input($event)\"\n />\n @if (searchValue()) {\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary-ghost cancel-button\"\n [attr.aria-label]=\"clearButtonAriaLabel() | translate\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"resetForm()\"\n (focusin)=\"onCancelFocus($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n</div>\n", styles: [":host{--search-bar-icon-color: var(--element-text-secondary);--input-background-color: var(--element-base-1);--input-background-hover-color: var(--element-base-1)}:host div:hover .search-bar-icon,:host div:hover ::placeholder,:host div.focus .search-bar-icon,:host div.focus ::placeholder{color:var(--element-text-primary)!important}.dark-background{--input-background-color: var(--element-base-4);--input-background-hover-color: var(--element-ui-4)}input{transition:none;background-color:var(--input-background-color);border-radius:4px;border-width:0}input.form-control:focus-visible{background-color:var(--input-background-color)}.cancel-button{position:absolute;inset-block:0;inset-inline-end:4px;margin-block:auto}.is-invalid~.cancel-button{color:var(--element-status-danger)}.search-bar-icon{position:absolute;inset-block:0;inset-inline-start:6px;align-items:center;color:var(--search-bar-icon-color)}.icon-start{padding-inline-start:calc(1.25rem + 12px)}.icon-end{padding-inline-end:1.25rem}::placeholder{color:var(--element-text-secondary);padding-inline-start:2px}.disabled .search-bar-icon,.disabled input,.disabled .cancel-button,.disabled ::placeholder{color:var(--element-text-disabled)}.disabled input{background-color:var(--input-background-color)}\n"] }]
|
|
186
|
+
}], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], prohibitedCharacters: [{ type: i0.Input, args: [{ isSignal: true, alias: "prohibitedCharacters", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], tabbable: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabbable", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], colorVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorVariant", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], clearButtonAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButtonAriaLabel", required: false }] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], focus: [{
|
|
181
187
|
type: HostListener,
|
|
182
188
|
args: ['focus']
|
|
183
189
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-search-bar.mjs","sources":["../../../../projects/element-ng/search-bar/si-search-bar.component.ts","../../../../projects/element-ng/search-bar/si-search-bar.component.html","../../../../projects/element-ng/search-bar/si-search-bar.module.ts","../../../../projects/element-ng/search-bar/index.ts","../../../../projects/element-ng/search-bar/siemens-element-ng-search-bar.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n HostListener,\n input,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { elementCancel, elementSearch } from '@siemens/element-icons';\nimport { BackgroundColorVariant } from '@siemens/element-ng/common';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe, t } from '@siemens/element-translate-ng/translate';\nimport { Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\n@Component({\n selector: 'si-search-bar',\n imports: [SiIconComponent, SiTranslatePipe],\n templateUrl: './si-search-bar.component.html',\n styleUrl: './si-search-bar.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SiSearchBarComponent,\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.readonly]': 'readonly()'\n }\n})\nexport class SiSearchBarComponent implements OnInit, OnDestroy, ControlValueAccessor, OnChanges {\n private readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('inputRef');\n private debouncer = new Subject<string>();\n private readonly disabledNgControl = signal(false);\n\n /**\n * Time unit change of search input takes effect.\n *\n * @defaultValue 400\n */\n readonly debounceTime = input(400, { transform: numberAttribute });\n /**\n * Prohibited characters restricting search.\n */\n readonly prohibitedCharacters = input<string>();\n /**\n * Define search input placeholder.\n *\n * @defaultValue ''\n */\n readonly placeholder = input('');\n /**\n * Display search icon before search input.\n *\n * @defaultValue false\n */\n readonly showIcon = input(false, { transform: booleanAttribute });\n /**\n * Whether the search is tabbable or not.\n *\n * @defaultValue true\n */\n readonly tabbable = input(true, { transform: booleanAttribute });\n\n /**\n * Define search input content.\n */\n readonly value = input<string>();\n\n /** @defaultValue false */\n readonly readonly = input(false, { transform: booleanAttribute });\n /**\n * Color to use for component background\n *\n * @defaultValue 'base-1'\n */\n readonly colorVariant = input<BackgroundColorVariant>('base-1');\n\n /** @defaultValue false */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n\n /**\n * Aria label for the clear button.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_SEARCH_BAR.CLEAR_BUTTON:clear`)\n * ```\n */\n readonly clearButtonAriaLabel = input(t(() => $localize`:@@SI_SEARCH_BAR.CLEAR_BUTTON:clear`));\n\n /**\n * Output callback event will provide you with search term if search input changes.\n */\n readonly searchChange = output<string>();\n\n protected isInvalid = false;\n protected inFocus = false;\n\n protected onChange = (val: any): void => {};\n protected onTouch = (): void => {};\n\n protected readonly disabled = computed(() => this.disabledInput() || this.disabledNgControl());\n\n protected readonly searchValue = signal('');\n protected readonly icons = addIcons({ elementCancel, elementSearch });\n\n /** @internal */\n writeValue(value: string): void {\n this.writeSearchValue(value ?? '');\n }\n\n /** @internal */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** @internal */\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n /** @internal */\n setDisabledState(disabled: boolean): void {\n this.disabledNgControl.set(disabled);\n }\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.value) {\n this.writeSearchValue(changes.value.currentValue ?? '');\n }\n }\n\n ngOnInit(): void {\n this.debouncer.pipe(debounceTime(this.debounceTime())).subscribe(value => {\n this.setSearch(value);\n });\n }\n\n ngOnDestroy(): void {\n this.debouncer.complete();\n }\n\n private setSearch(value?: string): void {\n value ??= '';\n if (value !== this.searchValue()) {\n this.searchValue.set(value);\n this.inputRef().nativeElement.value = value;\n this.onChange(value);\n this.searchChange.emit(value);\n }\n }\n\n private isProhibitedCharactersUsed(searchString: string | null): boolean {\n const prohibitedCharacters = this.prohibitedCharacters();\n if (!prohibitedCharacters || !searchString) {\n return false;\n }\n\n for (const prohibitedCharacter of prohibitedCharacters) {\n if (searchString.includes(prohibitedCharacter)) {\n return true;\n }\n }\n\n return false;\n }\n\n /** @internal */\n @HostListener('focus')\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n protected onCancelFocus(event: Event): void {\n event.stopPropagation();\n }\n\n protected input(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n if (!this.isProhibitedCharactersUsed(value)) {\n if (this.debounceTime() > 0) {\n this.debouncer.next(value);\n } else {\n this.setSearch(value);\n }\n }\n }\n\n protected onBlur(): void {\n this.inFocus = false;\n this.onTouch();\n }\n\n protected resetForm(): void {\n this.setSearch('');\n }\n\n protected writeSearchValue(value: string): void {\n this.searchValue.set(value);\n this.inputRef().nativeElement.value = value;\n }\n}\n","<div class=\"position-relative\" [class.disabled]=\"disabled()\" [class.focus]=\"inFocus\">\n @if (showIcon()) {\n <si-icon class=\"search-bar-icon icon text-secondary\" [icon]=\"icons.elementSearch\" />\n }\n <input\n #inputRef\n type=\"text\"\n class=\"form-control\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [class.dark-background]=\"colorVariant() === 'base-0'\"\n [class.icon-start]=\"showIcon()\"\n [class.is-invalid]=\"isInvalid\"\n [class.icon-end]=\"searchValue()\"\n [attr.tabindex]=\"tabbable() ? '' : '-1'\"\n [readonly]=\"readonly()\"\n (focus)=\"inFocus = true\"\n (blur)=\"onBlur()\"\n (input)=\"input($event)\"\n />\n @if (searchValue()) {\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-ghost cancel-button\"\n [attr.aria-label]=\"clearButtonAriaLabel() | translate\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"resetForm()\"\n (focusin)=\"onCancelFocus($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiSearchBarComponent } from './si-search-bar.component';\n\n@NgModule({\n imports: [SiSearchBarComponent],\n exports: [SiSearchBarComponent]\n})\nexport class SiSearchBarModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-search-bar.component';\nexport * from './si-search-bar.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAGG;MA2CU,oBAAoB,CAAA;AACd,IAAA,QAAQ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ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-search-bar.mjs","sources":["../../../../projects/element-ng/search-bar/si-search-bar.component.ts","../../../../projects/element-ng/search-bar/si-search-bar.component.html","../../../../projects/element-ng/search-bar/si-search-bar.module.ts","../../../../projects/element-ng/search-bar/index.ts","../../../../projects/element-ng/search-bar/siemens-element-ng-search-bar.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n HostListener,\n input,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { elementCancel, elementSearch } from '@siemens/element-icons';\nimport { BackgroundColorVariant } from '@siemens/element-ng/common';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe, t } from '@siemens/element-translate-ng/translate';\nimport { Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\n@Component({\n selector: 'si-search-bar',\n imports: [SiIconComponent, SiTranslatePipe],\n templateUrl: './si-search-bar.component.html',\n styleUrl: './si-search-bar.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SiSearchBarComponent,\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.readonly]': 'readonly()'\n }\n})\nexport class SiSearchBarComponent implements OnInit, OnDestroy, ControlValueAccessor, OnChanges {\n private readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('inputRef');\n private debouncer = new Subject<string>();\n private readonly disabledNgControl = signal(false);\n\n /**\n * Time unit change of search input takes effect.\n *\n * @defaultValue 400\n */\n readonly debounceTime = input(400, { transform: numberAttribute });\n /**\n * Prohibited characters restricting search.\n */\n readonly prohibitedCharacters = input<string>();\n /**\n * Define search input placeholder.\n *\n * @defaultValue ''\n */\n readonly placeholder = input('');\n /**\n * Display search icon before search input.\n *\n * @defaultValue false\n */\n readonly showIcon = input(false, { transform: booleanAttribute });\n /**\n * Whether the search is tabbable or not.\n *\n * @defaultValue true\n */\n readonly tabbable = input(true, { transform: booleanAttribute });\n\n /**\n * Define search input content.\n */\n readonly value = input<string>();\n\n /** @defaultValue false */\n readonly readonly = input(false, { transform: booleanAttribute });\n /**\n * Color to use for component background\n *\n * @defaultValue 'base-1'\n */\n readonly colorVariant = input<BackgroundColorVariant>('base-1');\n\n /** @defaultValue false */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n\n /**\n * Defines the maximum length of the search input.\n *\n * @defaultValue undefined\n */\n readonly maxlength = input(undefined, { transform: numberAttribute });\n\n /**\n * Aria label for the clear button.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_SEARCH_BAR.CLEAR_BUTTON:clear`)\n * ```\n */\n readonly clearButtonAriaLabel = input(t(() => $localize`:@@SI_SEARCH_BAR.CLEAR_BUTTON:clear`));\n\n /**\n * Output callback event will provide you with search term if search input changes.\n */\n readonly searchChange = output<string>();\n\n protected isInvalid = false;\n protected inFocus = false;\n\n protected onChange = (val: any): void => {};\n protected onTouch = (): void => {};\n\n protected readonly disabled = computed(() => this.disabledInput() || this.disabledNgControl());\n\n protected readonly searchValue = signal('');\n protected readonly icons = addIcons({ elementCancel, elementSearch });\n\n /** @internal */\n writeValue(value: string): void {\n this.writeSearchValue(value ?? '');\n }\n\n /** @internal */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** @internal */\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n /** @internal */\n setDisabledState(disabled: boolean): void {\n this.disabledNgControl.set(disabled);\n }\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.value) {\n this.writeSearchValue(changes.value.currentValue ?? '');\n }\n }\n\n ngOnInit(): void {\n this.debouncer.pipe(debounceTime(this.debounceTime())).subscribe(value => {\n this.setSearch(value);\n });\n }\n\n ngOnDestroy(): void {\n this.debouncer.complete();\n }\n\n private setSearch(value?: string): void {\n value ??= '';\n if (value !== this.searchValue()) {\n this.searchValue.set(value);\n this.inputRef().nativeElement.value = value;\n this.onChange(value);\n this.searchChange.emit(value);\n }\n }\n\n private isProhibitedCharactersUsed(searchString: string | null): boolean {\n const prohibitedCharacters = this.prohibitedCharacters();\n if (!prohibitedCharacters || !searchString) {\n return false;\n }\n\n for (const prohibitedCharacter of prohibitedCharacters) {\n if (searchString.includes(prohibitedCharacter)) {\n return true;\n }\n }\n\n return false;\n }\n\n /** @internal */\n @HostListener('focus')\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n protected onCancelFocus(event: Event): void {\n event.stopPropagation();\n }\n\n protected input(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n if (!this.isProhibitedCharactersUsed(value)) {\n if (this.debounceTime() > 0) {\n this.debouncer.next(value);\n } else {\n this.setSearch(value);\n }\n }\n }\n\n protected onBlur(): void {\n this.inFocus = false;\n this.onTouch();\n }\n\n protected resetForm(): void {\n this.setSearch('');\n }\n\n protected writeSearchValue(value: string): void {\n this.searchValue.set(value);\n this.inputRef().nativeElement.value = value;\n }\n}\n","<div class=\"position-relative\" [class.disabled]=\"disabled()\" [class.focus]=\"inFocus\">\n @if (showIcon()) {\n <si-icon class=\"search-bar-icon icon text-secondary\" [icon]=\"icons.elementSearch\" />\n }\n <input\n #inputRef\n type=\"text\"\n class=\"form-control\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [class.dark-background]=\"colorVariant() === 'base-0'\"\n [class.icon-start]=\"showIcon()\"\n [class.is-invalid]=\"isInvalid\"\n [class.icon-end]=\"searchValue()\"\n [attr.tabindex]=\"tabbable() ? '' : '-1'\"\n [attr.maxlength]=\"maxlength()\"\n [readonly]=\"readonly()\"\n (focus)=\"inFocus = true\"\n (blur)=\"onBlur()\"\n (input)=\"input($event)\"\n />\n @if (searchValue()) {\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary-ghost cancel-button\"\n [attr.aria-label]=\"clearButtonAriaLabel() | translate\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"resetForm()\"\n (focusin)=\"onCancelFocus($event)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiSearchBarComponent } from './si-search-bar.component';\n\n@NgModule({\n imports: [SiSearchBarComponent],\n exports: [SiSearchBarComponent]\n})\nexport class SiSearchBarModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-search-bar.component';\nexport * from './si-search-bar.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAGG;MA2CU,oBAAoB,CAAA;AACd,IAAA,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAA+B,UAAU,CAAC;AAChF,IAAA,SAAS,GAAG,IAAI,OAAO,EAAU;AACxB,IAAA,iBAAiB,GAAG,MAAM,CAAC,KAAK,6DAAC;AAElD;;;;AAIG;IACM,YAAY,GAAG,KAAK,CAAC,GAAG,yDAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAClE;;AAEG;IACM,oBAAoB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,sBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAC/C;;;;AAIG;AACM,IAAA,WAAW,GAAG,KAAK,CAAC,EAAE,uDAAC;AAChC;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACjE;;;;AAIG;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
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
193
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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()", "keydown.arrowDown": "click($event)", "keydown.alt.arrowDown": "click($event)", "keydown.arrowUp": "click($event)", "keydown.enter": "click()", "keydown.space": "click()" }, 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\"\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=\"overflow-item\"> {{ overflowItem.hiddenItemCount }}+</div>\n </div>\n }\n</div>\n<si-icon\n
|
|
193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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()", "keydown.arrowDown": "click($event)", "keydown.alt.arrowDown": "click($event)", "keydown.arrowUp": "click($event)", "keydown.enter": "click()", "keydown.space": "click()" }, 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\"\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=\"overflow-item\"> {{ 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;font-weight:600;min-inline-size:72px;block-size:100%;color:var(--element-text-primary);padding-block:7px;padding-inline-end:calc(3px + var(--si-feedback-icon-offset, 0px))}:host.disabled{color:var(--element-text-disabled)}:host-context(.form-control) :host{font-weight:400;padding-block:3px;padding-inline-end:var(--si-input-padding-inline-end)}:host-context(.dropdown:not(.form-control)) :host:not(.disabled):hover{background:var(--element-base-1-hover)}:host-context(.dropdown:not(.form-control)) :host:not(.disabled).active{background:var(--element-base-1-selected)}si-select-option+si-select-option:before{content:\",\\a0\"}.overflow-item{border-radius:var(--element-radius-3);background:var(--element-base-0);margin-inline-start:4px;padding-inline:8px}\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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
194
194
|
}
|
|
195
195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSelectInputComponent, decorators: [{
|
|
196
196
|
type: Component,
|
|
@@ -209,7 +209,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
209
209
|
'[attr.tabindex]': 'selectionStrategy.disabled() ? "-1" : "0"',
|
|
210
210
|
'[class.disabled]': 'selectionStrategy.disabled()',
|
|
211
211
|
'[class.active]': 'open()'
|
|
212
|
-
}, 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=\"overflow-item\"> {{ overflowItem.hiddenItemCount }}+</div>\n </div>\n }\n</div>\n<si-icon\n
|
|
212
|
+
}, 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=\"overflow-item\"> {{ 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;font-weight:600;min-inline-size:72px;block-size:100%;color:var(--element-text-primary);padding-block:7px;padding-inline-end:calc(3px + var(--si-feedback-icon-offset, 0px))}:host.disabled{color:var(--element-text-disabled)}:host-context(.form-control) :host{font-weight:400;padding-block:3px;padding-inline-end:var(--si-input-padding-inline-end)}:host-context(.dropdown:not(.form-control)) :host:not(.disabled):hover{background:var(--element-base-1-hover)}:host-context(.dropdown:not(.form-control)) :host:not(.disabled).active{background:var(--element-base-1-selected)}si-select-option+si-select-option:before{content:\",\\a0\"}.overflow-item{border-radius:var(--element-radius-3);background:var(--element-base-0);margin-inline-start:4px;padding-inline:8px}\n"] }]
|
|
213
213
|
}], 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"] }], blur: [{
|
|
214
214
|
type: HostListener,
|
|
215
215
|
args: ['blur']
|
|
@@ -601,7 +601,7 @@ class SiSelectComponent {
|
|
|
601
601
|
this.isOpen.set(false);
|
|
602
602
|
}
|
|
603
603
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
604
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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
|
|
604
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
605
605
|
}
|
|
606
606
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSelectComponent, decorators: [{
|
|
607
607
|
type: Component,
|
|
@@ -615,7 +615,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
615
615
|
'[class.readonly]': 'readonly()',
|
|
616
616
|
'[class.open]': 'isOpen()',
|
|
617
617
|
'[class.si-select-has-filter]': 'hasFilter()'
|
|
618
|
-
}, 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
|
|
618
|
+
}, 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"] }]
|
|
619
619
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], labelledbyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelledby", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], noResultsFoundLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsFoundLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], openChange: [{ type: i0.Output, args: ["openChange"] }], optionTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SiSelectOptionTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SiSelectGroupTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], actionsTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SiSelectActionsDirective), { ...{ read: TemplateRef }, isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkOverlayOrigin), { ...{
|
|
620
620
|
read: ElementRef
|
|
621
621
|
}, isSignal: true }] }], errormessageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "errormessageId", required: false }] }], hasFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasFilter", required: false }] }] } });
|