@fundamental-ngx/core 0.47.2-rc.0 → 0.47.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/action-bar/action-bar.component.mjs +2 -2
- package/esm2022/action-sheet/action-sheet.component.mjs +3 -3
- package/esm2022/avatar/avatar.component.mjs +3 -3
- package/esm2022/avatar-group/avatar-group.component.mjs +3 -3
- package/esm2022/bar/bar.component.mjs +2 -2
- package/esm2022/breadcrumb/breadcrumb.component.mjs +3 -3
- package/esm2022/busy-indicator/busy-indicator.component.mjs +3 -3
- package/esm2022/button/button.component.mjs +3 -3
- package/esm2022/calendar/calendar.component.mjs +3 -3
- package/esm2022/card/card.component.mjs +3 -3
- package/esm2022/carousel/carousel.component.mjs +3 -3
- package/esm2022/checkbox/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/dialog/dialog.component.mjs +3 -3
- package/esm2022/dynamic-page/dynamic-page.component.mjs +3 -3
- package/esm2022/dynamic-side-content/dynamic-side-content.component.mjs +3 -3
- package/esm2022/facets/facet/facet.component.mjs +3 -3
- package/esm2022/feed-input/feed-input.component.mjs +2 -2
- package/esm2022/feed-list-item/components/list/feed-list.component.mjs +2 -2
- package/esm2022/file-uploader/file-uploader.component.mjs +3 -3
- package/esm2022/fixed-card-layout/fixed-card-layout.component.mjs +3 -3
- package/esm2022/flexible-column-layout/flexible-column-layout.component.mjs +3 -3
- package/esm2022/form/fieldset/fieldset.component.mjs +2 -2
- package/esm2022/form/form-control/form-control.component.mjs +3 -3
- package/esm2022/form/form-group/form-group.component.mjs +2 -2
- package/esm2022/form/form-header/form-header.component.mjs +2 -2
- package/esm2022/form/form-item/form-item.component.mjs +2 -2
- package/esm2022/form/form-label/form-label.component.mjs +3 -3
- package/esm2022/form/form-message/form-message.component.mjs +2 -2
- package/esm2022/generic-tag/generic-tag.component.mjs +3 -3
- package/esm2022/grid-list/components/grid-list/grid-list.component.mjs +2 -2
- package/esm2022/icon/icon.component.mjs +2 -2
- package/esm2022/illustrated-message/illustrated-message.component.mjs +3 -3
- package/esm2022/info-label/info-label.component.mjs +3 -3
- package/esm2022/input-group/input-group.component.mjs +3 -3
- package/esm2022/layout-grid/layout-grid.component.mjs +3 -3
- package/esm2022/layout-panel/layout-panel.component.mjs +2 -2
- package/esm2022/link/link.component.mjs +3 -3
- package/esm2022/list/list-item/list-item.component.mjs +1 -4
- package/esm2022/list/list-navigation-item/list-navigation-item.component.mjs +3 -3
- package/esm2022/list/list.component.mjs +2 -2
- package/esm2022/menu/menu.component.mjs +2 -2
- package/esm2022/message-box/message-box.component.mjs +2 -2
- package/esm2022/message-page/message-page.component.mjs +3 -3
- package/esm2022/message-strip/message-strip.component.mjs +3 -3
- package/esm2022/message-toast/message-toast.component.mjs +3 -3
- package/esm2022/micro-process-flow/components/micro-process-flow/micro-process-flow.component.mjs +3 -3
- package/esm2022/multi-combobox/multi-combobox.component.mjs +3 -3
- package/esm2022/notification/notification/notification.component.mjs +2 -2
- package/esm2022/object-attribute/object-attribute.component.mjs +3 -3
- package/esm2022/object-identifier/object-identifier.component.mjs +3 -3
- package/esm2022/object-marker/object-marker.component.mjs +3 -3
- package/esm2022/object-number/object-number.component.mjs +3 -3
- package/esm2022/object-status/object-status.component.mjs +3 -3
- package/esm2022/pagination/pagination.component.mjs +3 -3
- package/esm2022/panel/panel.component.mjs +3 -3
- package/esm2022/popover/popover-body/popover-body.component.mjs +3 -3
- package/esm2022/product-switch/product-switch-body/product-switch-body.component.mjs +3 -3
- package/esm2022/progress-indicator/progress-indicator.component.mjs +3 -3
- package/esm2022/quick-view/quick-view/quick-view.component.mjs +2 -2
- package/esm2022/radio/radio-button/radio-button.component.mjs +3 -3
- package/esm2022/rating-indicator/components/rating-indicator.component.mjs +3 -3
- package/esm2022/resizable-card-layout/resizable-card-layout/resizable-card-item/resizable-card-item.component.mjs +3 -3
- package/esm2022/resizable-card-layout/resizable-card-layout/resizable-card-layout.component.mjs +2 -2
- package/esm2022/segmented-button/segmented-button.component.mjs +2 -2
- package/esm2022/select/select.component.mjs +3 -3
- package/esm2022/shellbar/shellbar.component.mjs +3 -3
- package/esm2022/side-navigation/side-navigation.component.mjs +3 -3
- package/esm2022/skeleton/components/skeleton.component.mjs +3 -3
- package/esm2022/slider/slider.component.mjs +3 -3
- package/esm2022/split-button/split-button.component.mjs +3 -3
- package/esm2022/splitter/splitter.component.mjs +2 -2
- package/esm2022/status-indicator/status-indicator.component.mjs +3 -3
- package/esm2022/step-input/step-input.component.mjs +3 -3
- package/esm2022/switch/switch.component.mjs +3 -3
- package/esm2022/table/table-wrapper.component.mjs +2 -2
- package/esm2022/table/table.component.mjs +2 -2
- package/esm2022/tabs/tab-list.component.mjs +3 -3
- package/esm2022/tabs/tab-nav/tab-nav.component.mjs +2 -2
- package/esm2022/text/text.component.mjs +3 -3
- package/esm2022/tile/tile.component.mjs +3 -3
- package/esm2022/time/time.component.mjs +3 -3
- package/esm2022/title/title.component.mjs +2 -2
- package/esm2022/token/token.component.mjs +3 -3
- package/esm2022/token/tokenizer.component.mjs +3 -3
- package/esm2022/toolbar/toolbar.component.mjs +3 -3
- package/esm2022/tree/tree.component.mjs +3 -3
- package/esm2022/upload-collection/upload-collection.component.mjs +3 -3
- package/esm2022/vertical-navigation/vertical-navigation-main-navigation.component.mjs +3 -3
- package/esm2022/vertical-navigation/vertical-navigation.component.mjs +3 -3
- package/esm2022/wizard/wizard.component.mjs +3 -3
- package/fesm2022/fundamental-ngx-core-action-bar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-action-bar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-action-sheet.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-action-sheet.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-avatar-group.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-avatar-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-avatar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-avatar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-bar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-bar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-busy-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-busy-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-button.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-calendar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-calendar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-card.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-card.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-carousel.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-carousel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-checkbox.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-checkbox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dialog.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dynamic-side-content.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-dynamic-side-content.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-facets.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-facets.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-feed-input.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-feed-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-feed-list-item.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-file-uploader.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-file-uploader.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-fixed-card-layout.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-fixed-card-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-flexible-column-layout.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-flexible-column-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-form.mjs +14 -14
- package/fesm2022/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-generic-tag.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-generic-tag.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-grid-list.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-grid-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-icon.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-icon.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-info-label.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-info-label.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-input-group.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-layout-grid.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-layout-grid.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-layout-panel.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-layout-panel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-link.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-link.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-list.mjs +4 -7
- package/fesm2022/fundamental-ngx-core-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-menu.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-box.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-page.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-message-page.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-strip.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-message-strip.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-toast.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-message-toast.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-micro-process-flow.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-micro-process-flow.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-notification.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-notification.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-attribute.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-attribute.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-identifier.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-identifier.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-marker.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-marker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-number.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-number.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-status.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-status.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-pagination.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-pagination.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-panel.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-panel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-popover.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-product-switch.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-product-switch.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-progress-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-progress-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-quick-view.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-quick-view.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-radio.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-radio.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-resizable-card-layout.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-resizable-card-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-select.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-shellbar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-side-navigation.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-side-navigation.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-skeleton.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-skeleton.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-slider.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-slider.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-split-button.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-split-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-splitter.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-splitter.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-status-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-status-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-step-input.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-step-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-switch.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-switch.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-table.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-table.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tabs.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-tabs.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-text.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-text.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tile.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-tile.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-time.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-title.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-title.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-token.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-toolbar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-toolbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tree.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-tree.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-vertical-navigation.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-vertical-navigation.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-wizard.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-wizard.mjs.map +1 -1
- package/fundamental-ngx-core-v0.47.2.tgz +0 -0
- package/package.json +5 -5
- package/schematics/add-dependencies/index.js +8 -8
- package/fundamental-ngx-core-v0.47.2-rc.0.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-step-input.mjs","sources":["../../../../libs/core/src/lib/step-input/step-input.component.ts","../../../../libs/core/src/lib/step-input/step-input.component.html","../../../../libs/core/src/lib/step-input/step-input.module.ts","../../../../libs/core/src/lib/step-input/fundamental-ngx-core-step-input.ts"],"sourcesContent":["import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { DOWN_ARROW, ENTER, SPACE, UP_ARROW } from '@angular/cdk/keycodes';\nimport { NgIf } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n LOCALE_ID,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n isDevMode\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { FormStates } from '@fundamental-ngx/cdk/forms';\nimport { KeyUtil, Nullable } from '@fundamental-ngx/cdk/utils';\nimport { ButtonComponent } from '@fundamental-ngx/core/button';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport {\n FormInputMessageGroupComponent,\n FormItemControl,\n FormMessageComponent,\n registerFormItemControl\n} from '@fundamental-ngx/core/form';\nimport { FdTranslatePipe } from '@fundamental-ngx/i18n';\nimport { Observable, Subscription, defer, fromEvent, interval, merge, timer } from 'rxjs';\nimport { filter, switchMap, takeUntil } from 'rxjs/operators';\nimport NumberFormat = Intl.NumberFormat;\n\nlet stepInputUniqueId = 0;\n\n@Component({\n selector: 'fd-step-input',\n templateUrl: './step-input.component.html',\n styleUrls: ['./step-input.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => StepInputComponent),\n multi: true\n },\n contentDensityObserverProviders(),\n registerFormItemControl(StepInputComponent)\n ],\n host: {\n class: 'fd-step-input__container',\n '(focusout)': 'handleFocusOut($event)'\n },\n standalone: true,\n imports: [FormInputMessageGroupComponent, NgIf, ButtonComponent, FormMessageComponent, FdTranslatePipe]\n})\nexport class StepInputComponent implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, FormItemControl {\n /** Sets compact mode */\n @Input()\n compact?: boolean;\n\n /** Sets control in readonly mode */\n @Input()\n readonly: boolean;\n\n /** Sets control in disabled mode */\n @Input()\n disabled: boolean;\n\n /** If it is mandatory field */\n @Input()\n required = false;\n\n /** Sets locale used to format numeric value */\n @Input()\n locale: string;\n\n /** Specifies algorithm used to match locale. Check Intl.NumberFormat documentation for more information */\n @Input()\n localeMatcher: Nullable<string>;\n\n /** Sets icon displayed in Increment Button */\n @Input()\n incrementButtonIcon = 'add';\n\n /** Sets icon displayed in Decrement Button */\n @Input()\n decrementButtonIcon = 'less';\n\n /** Sets input aria-label attribute */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** Sets input aria-labelledby attribute */\n @Input()\n ariaLabelledBy: Nullable<string>;\n\n /** Aria defines role description for the Step Input. */\n @Input()\n ariaRoleDescription: string;\n\n /** Sets input id */\n @Input()\n inputId = `fd-step-input-${stepInputUniqueId++}`;\n\n /** Set control value */\n @Input()\n set value(value: Nullable<number>) {\n if (value == null) {\n // cast null or undefined to \"null\"\n this._value = null;\n } else if (!isNaN(value)) {\n value = Number(value);\n this._value = this._checkValueLimits(value);\n }\n this.lastEmittedValue = this._value;\n if (!this._firstEmittedValue && this._value) {\n this._firstEmittedValue = this._value;\n }\n if (this._numberFormat) {\n this._updateViewValue();\n }\n }\n\n /** Control value */\n get value(): number | null {\n return this._value;\n }\n\n /** Sets minimum value boundary */\n @Input()\n min: number;\n\n /** Sets maximum value boundary */\n @Input()\n max: number;\n\n /** Sets input step value */\n @Input()\n step = 1;\n\n /** Sets input name attribute */\n @Input()\n name: Nullable<string>;\n\n /** Sets input title attribute */\n @Input()\n inputTitle = '';\n\n /** Sets formatting mode */\n @Input()\n mode: 'decimal' | 'currency' = 'decimal';\n\n /** Sets state of the control. Can be `success`, `error`, `warning`, `information` or blank for default. */\n @Input()\n state: FormStates = 'default';\n\n /** Holds the message with respect to state */\n @Input()\n stateMessage: string | SafeHtml;\n\n /** Custom unit displayed as a label next to the input */\n @Input()\n unit: string;\n\n /** Whether to use grouping when formatting value */\n @Input()\n useGrouping = true;\n\n /** Defines minimal number of fractional digits for control value */\n @Input()\n minFractionDigits: number;\n\n /** Defines maximal number of fractional digits for control value */\n @Input()\n maxFractionDigits: number;\n\n /** Currency used to format value. Check Intl.NumberFormat documentation for more information*/\n @Input()\n currency: string;\n\n /** Currency used to format value. Check Intl.NumberFormat documentation for more information */\n @Input()\n currencyDisplay: string;\n\n /** Whether StepInput should display Increase/Decrease buttons */\n @Input()\n hasStepButtons = true;\n\n /** Horizontally aligns value inside input */\n @Input()\n textAlign: 'left' | 'center' | 'right';\n\n /** Hint displayed inside input before user writes value */\n @Input()\n placeholder = '';\n\n /** Emits event when input gets focused */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n onFocusIn = new EventEmitter<void>();\n\n /** Emits event when input loses focus */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n onFocusOut = new EventEmitter<void>();\n\n /** Emits new value when control value has changed */\n @Output()\n valueChange = new EventEmitter<number | null>();\n\n /** @hidden */\n @ViewChild('incrementBtn', { read: ElementRef })\n incrementButton: ElementRef<HTMLButtonElement>;\n\n /** @hidden */\n @ViewChild('decrementBtn', { read: ElementRef })\n decrementButton: ElementRef<HTMLButtonElement>;\n\n /** @hidden */\n @ViewChild('inputElement', { read: ElementRef, static: true })\n inputElement: ElementRef;\n\n /** @hidden */\n lastEmittedValue: Nullable<number>;\n\n /** @hidden */\n currencySign: string;\n\n /** @hidden */\n focused: boolean;\n\n /** @hidden */\n private _value: number | null = null;\n\n /** @hidden */\n private _numerals: RegExp;\n\n /** @hidden */\n private _decimalSeparator: RegExp;\n\n /** @hidden */\n private _currency: RegExp;\n\n /** @hidden */\n private _minusSign: RegExp;\n\n /** @hidden */\n private _groupSeparator: RegExp;\n\n /** @hidden */\n private _numberFormat: NumberFormat;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n private _index: any;\n\n /** @hidden */\n private _firstEmittedValue: number;\n\n /** @hidden */\n constructor(\n @Inject(LOCALE_ID) locale,\n private _changeDetectorRef: ChangeDetectorRef,\n private readonly _liveAnnouncer: LiveAnnouncer,\n readonly _contentDensityObserver: ContentDensityObserver,\n private readonly _elementRef: ElementRef\n ) {\n this.locale = locale;\n }\n\n /** @hidden */\n onChange: (value: Nullable<number>) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnInit(): void {\n this._numberFormat = this._getNumberFormat();\n this._buildRegExps();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._updateViewValue();\n this._listenOnButtonsClick();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n registerOnChange(fn: (value: Nullable<number>) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @hidden */\n writeValue(value: number | null): void {\n this.value = value;\n }\n\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** @hidden */\n get canIncrement(): boolean {\n return this.value == null || this.value + this.step <= this._max;\n }\n\n /** @hidden */\n get canDecrement(): boolean {\n return this.value == null || this.value - this.step >= this._min;\n }\n\n /** @hidden */\n get canDisplayLabel(): boolean {\n return !!this.unit || !!this.currencySign;\n }\n\n /** Increment input value by step value */\n increment(): void {\n this._incrementOrDecrement('increment');\n }\n\n /** Decrement input value by step value */\n decrement(): void {\n this._incrementOrDecrement('decrement');\n }\n\n /** @hidden */\n handleKeyDown(event: KeyboardEvent): void {\n const muteEvent = (evnt: Event): void => {\n evnt.stopPropagation();\n evnt.preventDefault();\n };\n\n if (!this._canChangeValue) {\n return;\n }\n\n if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n this.increment();\n muteEvent(event);\n } else if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n this.decrement();\n muteEvent(event);\n }\n }\n\n /** @hidden */\n handleFocusIn(): void {\n this.focused = true;\n this.onFocusIn.emit();\n }\n\n /** @hidden */\n handleFocusOut(event: FocusEvent): void {\n this.focused = false;\n this.onFocusOut.emit();\n if (!this._elementRef.nativeElement.contains(event.relatedTarget)) {\n this.onTouched();\n }\n }\n\n /** @hidden */\n handleScroll(event: WheelEvent): void {\n if (this._canChangeValue && this.focused) {\n if (event.deltaY > 0) {\n this.decrement();\n } else {\n this.increment();\n }\n event.preventDefault();\n }\n }\n\n /** @hidden Updates viewValue and conditionally emits new value.\n * This method is called on (change) event, when user leaves input control. */\n updateOnInputChanged(): void {\n if (this.value !== this.lastEmittedValue) {\n this._emitChangedValue();\n }\n this._updateViewValue();\n }\n\n /** @hidden Track parsed value when user changes value of the input control. */\n trackInputValue(event: any): void {\n const parsedValue = this._parseValue(event.target.value);\n this._value = parsedValue != null ? this._checkValueLimits(parsedValue) : null;\n }\n\n /** @hidden */\n private _incrementOrDecrement(direction: 'increment' | 'decrement'): void {\n if ((direction === 'increment' && this.canIncrement) || (direction === 'decrement' && this.canDecrement)) {\n let _shouldChange = true;\n if (this.value == null && this._firstEmittedValue) {\n this._value = this._firstEmittedValue;\n let _limit: number;\n direction === 'increment' ? (_limit = this.max) : (_limit = this.min);\n if (this._firstEmittedValue === _limit) {\n this._value = _limit;\n _shouldChange = false;\n }\n }\n if (_shouldChange) {\n this._value =\n direction === 'increment'\n ? this._cutFloatingNumberDistortion(this.value!, this.step)\n : this._cutFloatingNumberDistortion(this.value!, -this.step);\n }\n this._emitChangedValue();\n this._updateViewValue();\n }\n }\n\n /** @hidden */\n private get _canChangeValue(): boolean {\n return !(this.disabled || this.readonly);\n }\n\n /** @hidden */\n private _cutFloatingNumberDistortion(value: number, step: number): number {\n const stepDecimals = `${step}`.split('.')[1];\n const valueDecimals = `${value}`.split('.')[1];\n const stepDecimalsLength = stepDecimals ? stepDecimals.length : 0;\n const valueDecimalsLength = valueDecimals ? valueDecimals.length : 0;\n const longestDecimal = valueDecimalsLength > stepDecimalsLength ? valueDecimalsLength : stepDecimalsLength;\n\n return Number((value + step).toFixed(longestDecimal));\n }\n\n /** @hidden */\n private _checkValueLimits(value: number): number {\n if (value > this._max) {\n return this._max;\n }\n if (value < this._min) {\n return this._min;\n }\n if (!isNaN(this.maxFractionDigits)) {\n value = Number(value.toFixed(this.maxFractionDigits));\n }\n if (!isNaN(this.minFractionDigits)) {\n value = Number(value.toFixed(this.minFractionDigits));\n }\n return value;\n }\n\n /** @hidden */\n private _emitChangedValue(): void {\n this.lastEmittedValue = this.value;\n this.valueChange.emit(this.value);\n this.onChange(this.value);\n }\n\n /** @hidden */\n private get _max(): number {\n return !isNaN(this.max) ? this.max : Number.MAX_VALUE;\n }\n\n /** @hidden */\n private get _min(): number {\n return !isNaN(this.min) ? this.min : -Number.MAX_VALUE;\n }\n\n /** @hidden */\n private _updateViewValue(): void {\n const value = this._formatToViewValue(this.value);\n this.inputElement.nativeElement.value = value;\n this._liveAnnouncer.announce(value);\n }\n\n /** @hidden */\n private _listenOnButtonsClick(): void {\n if (this.hasStepButtons) {\n this._subscriptions.add(\n this._setupButtonListener(this.incrementButton).subscribe(() => {\n this.increment();\n this._changeDetectorRef.detectChanges();\n })\n );\n\n this._subscriptions.add(\n this._setupButtonListener(this.decrementButton).subscribe(() => {\n this.decrement();\n this._changeDetectorRef.detectChanges();\n })\n );\n }\n }\n\n /**\n * @hidden\n * Listens for click or space/enter keydown events.\n *\n * For long clicks will continuously emit event until \"mouseup\" event is detected\n */\n private _setupButtonListener(elementRef: ElementRef): Observable<any> {\n const onMouseDown$ = fromEvent(elementRef.nativeElement, 'mousedown');\n const onMouseUp$ = fromEvent(window, 'mouseup');\n const onKeyDown$ = fromEvent<KeyboardEvent>(elementRef.nativeElement, 'keydown').pipe(\n filter((event) => KeyUtil.isKeyCode(event, [SPACE, ENTER]))\n );\n\n const timerFactory$ = defer(() =>\n timer(500).pipe(\n switchMap(() => interval(40)),\n takeUntil(onMouseUp$)\n )\n );\n\n return merge(\n onMouseDown$,\n onMouseDown$.pipe(switchMap(() => timerFactory$)),\n // while key is pressed, event will be emitted continuously, so there's no need for timerFactory$\n onKeyDown$\n );\n }\n\n /** @hidden */\n private _parseValue(text: string): Nullable<number> {\n const trimmedText = text.trim();\n\n if (trimmedText === '') {\n return null;\n }\n\n const filteredText = trimmedText\n .replace(/\\s/g, '')\n .replace(this._currency, '')\n .replace(this._groupSeparator, '')\n .replace(this._minusSign, '-')\n .replace(this._decimalSeparator, '.')\n .replace(this._numerals, this._index);\n\n if (filteredText) {\n const parsedValue = Number(filteredText);\n return isNaN(parsedValue) ? this.lastEmittedValue : parsedValue;\n }\n\n return null;\n }\n\n /** @hidden */\n private _getNumberFormat(): NumberFormat {\n if (isDevMode() && this.minFractionDigits > this.maxFractionDigits) {\n throw new Error(\"Range error - minFractionDigits can't be bigger than maxFractionDigits\");\n }\n\n return new NumberFormat(this.locale, {\n localeMatcher: this.localeMatcher ?? undefined,\n style: this.mode,\n currency: this.currency,\n // only available in ES2020 and later\n ['currencyDisplay' as any]: this.currencyDisplay,\n useGrouping: this.useGrouping,\n minimumFractionDigits: this.minFractionDigits,\n maximumFractionDigits: this.maxFractionDigits\n });\n }\n\n /** @hidden */\n private _getNumeralsExpressions(): RegExp {\n const numerals = [\n ...new NumberFormat(this.locale, { useGrouping: false }).format(9876543210).split('')\n ].reverse();\n const index = new Map(numerals.map((d, i) => [d, i]));\n this._index = (d) => index.get(d);\n\n return new RegExp(`[${numerals.join('')}]`, 'g');\n }\n\n /** @hidden */\n private _getDecimalSeparator(): RegExp {\n const formatter = new NumberFormat(this.locale, { useGrouping: false });\n return new RegExp(`[${formatter.format(1.1).trim().replace(this._numerals, '')}]`, 'g');\n }\n\n /** @hidden */\n private _getGroupingSeparator(): RegExp {\n const formatter = new NumberFormat(this.locale, { useGrouping: true });\n return new RegExp(`[${formatter.format(1000).trim().replace(this._numerals, '')}]`, 'g');\n }\n\n /** @hidden */\n private _getMinusSignExpression(): RegExp {\n const formatter = new NumberFormat(this.locale, { useGrouping: false });\n return new RegExp(`[${formatter.format(-1).trim().replace(this._numerals, '')}]`, 'g');\n }\n\n /** @hidden */\n private _getCurrencyExpression(): RegExp {\n if (this.currency) {\n const formatter = new NumberFormat(this.locale, {\n style: 'currency',\n currency: this.currency,\n // only available in ES2020 and later\n ['currencyDisplay' as any]: this.currencyDisplay\n });\n this.currencySign = `${formatter\n .format(1)\n .replace(/\\s/g, '')\n .replace(this._numerals, '')\n .replace(this._decimalSeparator, '')\n .replace(this._groupSeparator, '')}`;\n\n return new RegExp(`[${this.currencySign}]`, 'g');\n }\n\n return new RegExp(`[]`, 'g');\n }\n\n /** @hidden */\n private _buildRegExps(): void {\n this._numerals = this._getNumeralsExpressions();\n this._decimalSeparator = this._getDecimalSeparator();\n this._minusSign = this._getMinusSignExpression();\n this._groupSeparator = this._getGroupingSeparator();\n this._currency = this._getCurrencyExpression();\n }\n\n /** @hidden */\n private _formatToViewValue(number: Nullable<number>): string {\n if (number == null) {\n return '';\n } else {\n return this.currency\n ? this._numberFormat.format(number).replace(this._currency, '')\n : this._numberFormat.format(number);\n }\n }\n}\n","<fd-form-input-message-group>\n <div\n class=\"fd-step-input\"\n [class]=\"state ? 'is-' + state : ''\"\n [class.is-focus]=\"focused\"\n [class.is-readonly]=\"readonly\"\n [class.is-disabled]=\"disabled\"\n [class.fd-step-input--without-buttons]=\"!hasStepButtons\"\n >\n <button\n *ngIf=\"hasStepButtons\"\n fd-button\n #decrementBtn\n fdType=\"transparent\"\n class=\"fd-step-input__button\"\n tabindex=\"-1\"\n type=\"button\"\n [disabled]=\"!canDecrement\"\n [title]=\"'coreStepInput.decrementButtonTitle' | fdTranslate\"\n [glyph]=\"decrementButtonIcon\"\n (blur)=\"onTouched()\"\n [attr.aria-label]=\"'coreStepInput.decrementButtonTitle' | fdTranslate\"\n [attr.aria-controls]=\"inputId\"\n ></button>\n <input\n #inputElement\n [name]=\"name\"\n [id]=\"inputId\"\n [title]=\"inputTitle\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-describedby]=\"canDisplayLabel ? inputId + '__description' : ''\"\n [attr.aria-required]=\"required\"\n [attr.aria-roledescription]=\"ariaRoleDescription || ('coreStepInput.ariaRoleDescription' | fdTranslate)\"\n (focusin)=\"handleFocusIn()\"\n (wheel)=\"handleScroll($event)\"\n (keydown)=\"handleKeyDown($event)\"\n (input)=\"trackInputValue($event)\"\n (change)=\"updateOnInputChanged()\"\n [style.textAlign]=\"textAlign\"\n class=\"fd-input fd-input--no-number-spinner fd-step-input__input\"\n type=\"text\"\n inputmode=\"numeric\"\n />\n <button\n *ngIf=\"hasStepButtons\"\n fd-button\n #incrementBtn\n fdType=\"transparent\"\n class=\"fd-step-input__button\"\n tabindex=\"-1\"\n type=\"button\"\n [disabled]=\"!canIncrement\"\n [title]=\"'coreStepInput.incrementButtonTitle' | fdTranslate\"\n [glyph]=\"incrementButtonIcon\"\n (blur)=\"onTouched()\"\n [attr.aria-label]=\"'coreStepInput.incrementButtonTitle' | fdTranslate\"\n [attr.aria-controls]=\"inputId\"\n ></button>\n </div>\n\n <fd-form-message *ngIf=\"!!stateMessage\" [type]=\"state\" [innerHTML]=\"stateMessage\"></fd-form-message>\n</fd-form-input-message-group>\n\n<span *ngIf=\"canDisplayLabel\" [id]=\"inputId + '__description'\" class=\"fd-form-label fd-form-label--unit-description\">\n {{ unit || currencySign }}\n</span>\n","import { NgModule } from '@angular/core';\n\nimport { ContentDensityModule } from '@fundamental-ngx/core/content-density';\nimport { StepInputComponent } from './step-input.component';\n\n@NgModule({\n imports: [StepInputComponent, ContentDensityModule],\n exports: [StepInputComponent, ContentDensityModule]\n})\nexport class StepInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoCA,IAAO,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;AAExC,IAAI,iBAAiB,GAAG,CAAC,CAAC;MAwBb,kBAAkB,CAAA;;IAkD3B,IACI,KAAK,CAAC,KAAuB,EAAA;QAC7B,IAAI,KAAK,IAAI,IAAI,EAAE;;AAEf,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;AACtB,SAAA;AAAM,aAAA,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACtB,YAAA,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC/C,SAAA;AACD,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,MAAM,EAAE;AACzC,YAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC;AACzC,SAAA;QACD,IAAI,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,gBAAgB,EAAE,CAAC;AAC3B,SAAA;KACJ;;AAGD,IAAA,IAAI,KAAK,GAAA;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;;IAwID,WACuB,CAAA,MAAM,EACjB,kBAAqC,EAC5B,cAA6B,EACrC,uBAA+C,EACvC,WAAuB,EAAA;QAHhC,IAAkB,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../libs/core/src/lib/step-input/step-input.component.ts","../../../../libs/core/src/lib/step-input/step-input.component.html","../../../../libs/core/src/lib/step-input/step-input.module.ts","../../../../libs/core/src/lib/step-input/fundamental-ngx-core-step-input.ts"],"sourcesContent":["import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { DOWN_ARROW, ENTER, SPACE, UP_ARROW } from '@angular/cdk/keycodes';\nimport { NgIf } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n LOCALE_ID,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n isDevMode\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { FormStates } from '@fundamental-ngx/cdk/forms';\nimport { KeyUtil, Nullable } from '@fundamental-ngx/cdk/utils';\nimport { ButtonComponent } from '@fundamental-ngx/core/button';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport {\n FormInputMessageGroupComponent,\n FormItemControl,\n FormMessageComponent,\n registerFormItemControl\n} from '@fundamental-ngx/core/form';\nimport { FdTranslatePipe } from '@fundamental-ngx/i18n';\nimport { Observable, Subscription, defer, fromEvent, interval, merge, timer } from 'rxjs';\nimport { filter, switchMap, takeUntil } from 'rxjs/operators';\nimport NumberFormat = Intl.NumberFormat;\n\nlet stepInputUniqueId = 0;\n\n@Component({\n selector: 'fd-step-input',\n templateUrl: './step-input.component.html',\n styleUrls: ['./step-input.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => StepInputComponent),\n multi: true\n },\n contentDensityObserverProviders(),\n registerFormItemControl(StepInputComponent)\n ],\n host: {\n class: 'fd-step-input__container',\n '(focusout)': 'handleFocusOut($event)'\n },\n standalone: true,\n imports: [FormInputMessageGroupComponent, NgIf, ButtonComponent, FormMessageComponent, FdTranslatePipe]\n})\nexport class StepInputComponent implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, FormItemControl {\n /** Sets compact mode */\n @Input()\n compact?: boolean;\n\n /** Sets control in readonly mode */\n @Input()\n readonly: boolean;\n\n /** Sets control in disabled mode */\n @Input()\n disabled: boolean;\n\n /** If it is mandatory field */\n @Input()\n required = false;\n\n /** Sets locale used to format numeric value */\n @Input()\n locale: string;\n\n /** Specifies algorithm used to match locale. Check Intl.NumberFormat documentation for more information */\n @Input()\n localeMatcher: Nullable<string>;\n\n /** Sets icon displayed in Increment Button */\n @Input()\n incrementButtonIcon = 'add';\n\n /** Sets icon displayed in Decrement Button */\n @Input()\n decrementButtonIcon = 'less';\n\n /** Sets input aria-label attribute */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** Sets input aria-labelledby attribute */\n @Input()\n ariaLabelledBy: Nullable<string>;\n\n /** Aria defines role description for the Step Input. */\n @Input()\n ariaRoleDescription: string;\n\n /** Sets input id */\n @Input()\n inputId = `fd-step-input-${stepInputUniqueId++}`;\n\n /** Set control value */\n @Input()\n set value(value: Nullable<number>) {\n if (value == null) {\n // cast null or undefined to \"null\"\n this._value = null;\n } else if (!isNaN(value)) {\n value = Number(value);\n this._value = this._checkValueLimits(value);\n }\n this.lastEmittedValue = this._value;\n if (!this._firstEmittedValue && this._value) {\n this._firstEmittedValue = this._value;\n }\n if (this._numberFormat) {\n this._updateViewValue();\n }\n }\n\n /** Control value */\n get value(): number | null {\n return this._value;\n }\n\n /** Sets minimum value boundary */\n @Input()\n min: number;\n\n /** Sets maximum value boundary */\n @Input()\n max: number;\n\n /** Sets input step value */\n @Input()\n step = 1;\n\n /** Sets input name attribute */\n @Input()\n name: Nullable<string>;\n\n /** Sets input title attribute */\n @Input()\n inputTitle = '';\n\n /** Sets formatting mode */\n @Input()\n mode: 'decimal' | 'currency' = 'decimal';\n\n /** Sets state of the control. Can be `success`, `error`, `warning`, `information` or blank for default. */\n @Input()\n state: FormStates = 'default';\n\n /** Holds the message with respect to state */\n @Input()\n stateMessage: string | SafeHtml;\n\n /** Custom unit displayed as a label next to the input */\n @Input()\n unit: string;\n\n /** Whether to use grouping when formatting value */\n @Input()\n useGrouping = true;\n\n /** Defines minimal number of fractional digits for control value */\n @Input()\n minFractionDigits: number;\n\n /** Defines maximal number of fractional digits for control value */\n @Input()\n maxFractionDigits: number;\n\n /** Currency used to format value. Check Intl.NumberFormat documentation for more information*/\n @Input()\n currency: string;\n\n /** Currency used to format value. Check Intl.NumberFormat documentation for more information */\n @Input()\n currencyDisplay: string;\n\n /** Whether StepInput should display Increase/Decrease buttons */\n @Input()\n hasStepButtons = true;\n\n /** Horizontally aligns value inside input */\n @Input()\n textAlign: 'left' | 'center' | 'right';\n\n /** Hint displayed inside input before user writes value */\n @Input()\n placeholder = '';\n\n /** Emits event when input gets focused */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n onFocusIn = new EventEmitter<void>();\n\n /** Emits event when input loses focus */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n onFocusOut = new EventEmitter<void>();\n\n /** Emits new value when control value has changed */\n @Output()\n valueChange = new EventEmitter<number | null>();\n\n /** @hidden */\n @ViewChild('incrementBtn', { read: ElementRef })\n incrementButton: ElementRef<HTMLButtonElement>;\n\n /** @hidden */\n @ViewChild('decrementBtn', { read: ElementRef })\n decrementButton: ElementRef<HTMLButtonElement>;\n\n /** @hidden */\n @ViewChild('inputElement', { read: ElementRef, static: true })\n inputElement: ElementRef;\n\n /** @hidden */\n lastEmittedValue: Nullable<number>;\n\n /** @hidden */\n currencySign: string;\n\n /** @hidden */\n focused: boolean;\n\n /** @hidden */\n private _value: number | null = null;\n\n /** @hidden */\n private _numerals: RegExp;\n\n /** @hidden */\n private _decimalSeparator: RegExp;\n\n /** @hidden */\n private _currency: RegExp;\n\n /** @hidden */\n private _minusSign: RegExp;\n\n /** @hidden */\n private _groupSeparator: RegExp;\n\n /** @hidden */\n private _numberFormat: NumberFormat;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n private _index: any;\n\n /** @hidden */\n private _firstEmittedValue: number;\n\n /** @hidden */\n constructor(\n @Inject(LOCALE_ID) locale,\n private _changeDetectorRef: ChangeDetectorRef,\n private readonly _liveAnnouncer: LiveAnnouncer,\n readonly _contentDensityObserver: ContentDensityObserver,\n private readonly _elementRef: ElementRef\n ) {\n this.locale = locale;\n }\n\n /** @hidden */\n onChange: (value: Nullable<number>) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnInit(): void {\n this._numberFormat = this._getNumberFormat();\n this._buildRegExps();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._updateViewValue();\n this._listenOnButtonsClick();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n registerOnChange(fn: (value: Nullable<number>) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @hidden */\n writeValue(value: number | null): void {\n this.value = value;\n }\n\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** @hidden */\n get canIncrement(): boolean {\n return this.value == null || this.value + this.step <= this._max;\n }\n\n /** @hidden */\n get canDecrement(): boolean {\n return this.value == null || this.value - this.step >= this._min;\n }\n\n /** @hidden */\n get canDisplayLabel(): boolean {\n return !!this.unit || !!this.currencySign;\n }\n\n /** Increment input value by step value */\n increment(): void {\n this._incrementOrDecrement('increment');\n }\n\n /** Decrement input value by step value */\n decrement(): void {\n this._incrementOrDecrement('decrement');\n }\n\n /** @hidden */\n handleKeyDown(event: KeyboardEvent): void {\n const muteEvent = (evnt: Event): void => {\n evnt.stopPropagation();\n evnt.preventDefault();\n };\n\n if (!this._canChangeValue) {\n return;\n }\n\n if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n this.increment();\n muteEvent(event);\n } else if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n this.decrement();\n muteEvent(event);\n }\n }\n\n /** @hidden */\n handleFocusIn(): void {\n this.focused = true;\n this.onFocusIn.emit();\n }\n\n /** @hidden */\n handleFocusOut(event: FocusEvent): void {\n this.focused = false;\n this.onFocusOut.emit();\n if (!this._elementRef.nativeElement.contains(event.relatedTarget)) {\n this.onTouched();\n }\n }\n\n /** @hidden */\n handleScroll(event: WheelEvent): void {\n if (this._canChangeValue && this.focused) {\n if (event.deltaY > 0) {\n this.decrement();\n } else {\n this.increment();\n }\n event.preventDefault();\n }\n }\n\n /** @hidden Updates viewValue and conditionally emits new value.\n * This method is called on (change) event, when user leaves input control. */\n updateOnInputChanged(): void {\n if (this.value !== this.lastEmittedValue) {\n this._emitChangedValue();\n }\n this._updateViewValue();\n }\n\n /** @hidden Track parsed value when user changes value of the input control. */\n trackInputValue(event: any): void {\n const parsedValue = this._parseValue(event.target.value);\n this._value = parsedValue != null ? this._checkValueLimits(parsedValue) : null;\n }\n\n /** @hidden */\n private _incrementOrDecrement(direction: 'increment' | 'decrement'): void {\n if ((direction === 'increment' && this.canIncrement) || (direction === 'decrement' && this.canDecrement)) {\n let _shouldChange = true;\n if (this.value == null && this._firstEmittedValue) {\n this._value = this._firstEmittedValue;\n let _limit: number;\n direction === 'increment' ? (_limit = this.max) : (_limit = this.min);\n if (this._firstEmittedValue === _limit) {\n this._value = _limit;\n _shouldChange = false;\n }\n }\n if (_shouldChange) {\n this._value =\n direction === 'increment'\n ? this._cutFloatingNumberDistortion(this.value!, this.step)\n : this._cutFloatingNumberDistortion(this.value!, -this.step);\n }\n this._emitChangedValue();\n this._updateViewValue();\n }\n }\n\n /** @hidden */\n private get _canChangeValue(): boolean {\n return !(this.disabled || this.readonly);\n }\n\n /** @hidden */\n private _cutFloatingNumberDistortion(value: number, step: number): number {\n const stepDecimals = `${step}`.split('.')[1];\n const valueDecimals = `${value}`.split('.')[1];\n const stepDecimalsLength = stepDecimals ? stepDecimals.length : 0;\n const valueDecimalsLength = valueDecimals ? valueDecimals.length : 0;\n const longestDecimal = valueDecimalsLength > stepDecimalsLength ? valueDecimalsLength : stepDecimalsLength;\n\n return Number((value + step).toFixed(longestDecimal));\n }\n\n /** @hidden */\n private _checkValueLimits(value: number): number {\n if (value > this._max) {\n return this._max;\n }\n if (value < this._min) {\n return this._min;\n }\n if (!isNaN(this.maxFractionDigits)) {\n value = Number(value.toFixed(this.maxFractionDigits));\n }\n if (!isNaN(this.minFractionDigits)) {\n value = Number(value.toFixed(this.minFractionDigits));\n }\n return value;\n }\n\n /** @hidden */\n private _emitChangedValue(): void {\n this.lastEmittedValue = this.value;\n this.valueChange.emit(this.value);\n this.onChange(this.value);\n }\n\n /** @hidden */\n private get _max(): number {\n return !isNaN(this.max) ? this.max : Number.MAX_VALUE;\n }\n\n /** @hidden */\n private get _min(): number {\n return !isNaN(this.min) ? this.min : -Number.MAX_VALUE;\n }\n\n /** @hidden */\n private _updateViewValue(): void {\n const value = this._formatToViewValue(this.value);\n this.inputElement.nativeElement.value = value;\n this._liveAnnouncer.announce(value);\n }\n\n /** @hidden */\n private _listenOnButtonsClick(): void {\n if (this.hasStepButtons) {\n this._subscriptions.add(\n this._setupButtonListener(this.incrementButton).subscribe(() => {\n this.increment();\n this._changeDetectorRef.detectChanges();\n })\n );\n\n this._subscriptions.add(\n this._setupButtonListener(this.decrementButton).subscribe(() => {\n this.decrement();\n this._changeDetectorRef.detectChanges();\n })\n );\n }\n }\n\n /**\n * @hidden\n * Listens for click or space/enter keydown events.\n *\n * For long clicks will continuously emit event until \"mouseup\" event is detected\n */\n private _setupButtonListener(elementRef: ElementRef): Observable<any> {\n const onMouseDown$ = fromEvent(elementRef.nativeElement, 'mousedown');\n const onMouseUp$ = fromEvent(window, 'mouseup');\n const onKeyDown$ = fromEvent<KeyboardEvent>(elementRef.nativeElement, 'keydown').pipe(\n filter((event) => KeyUtil.isKeyCode(event, [SPACE, ENTER]))\n );\n\n const timerFactory$ = defer(() =>\n timer(500).pipe(\n switchMap(() => interval(40)),\n takeUntil(onMouseUp$)\n )\n );\n\n return merge(\n onMouseDown$,\n onMouseDown$.pipe(switchMap(() => timerFactory$)),\n // while key is pressed, event will be emitted continuously, so there's no need for timerFactory$\n onKeyDown$\n );\n }\n\n /** @hidden */\n private _parseValue(text: string): Nullable<number> {\n const trimmedText = text.trim();\n\n if (trimmedText === '') {\n return null;\n }\n\n const filteredText = trimmedText\n .replace(/\\s/g, '')\n .replace(this._currency, '')\n .replace(this._groupSeparator, '')\n .replace(this._minusSign, '-')\n .replace(this._decimalSeparator, '.')\n .replace(this._numerals, this._index);\n\n if (filteredText) {\n const parsedValue = Number(filteredText);\n return isNaN(parsedValue) ? this.lastEmittedValue : parsedValue;\n }\n\n return null;\n }\n\n /** @hidden */\n private _getNumberFormat(): NumberFormat {\n if (isDevMode() && this.minFractionDigits > this.maxFractionDigits) {\n throw new Error(\"Range error - minFractionDigits can't be bigger than maxFractionDigits\");\n }\n\n return new NumberFormat(this.locale, {\n localeMatcher: this.localeMatcher ?? undefined,\n style: this.mode,\n currency: this.currency,\n // only available in ES2020 and later\n ['currencyDisplay' as any]: this.currencyDisplay,\n useGrouping: this.useGrouping,\n minimumFractionDigits: this.minFractionDigits,\n maximumFractionDigits: this.maxFractionDigits\n });\n }\n\n /** @hidden */\n private _getNumeralsExpressions(): RegExp {\n const numerals = [\n ...new NumberFormat(this.locale, { useGrouping: false }).format(9876543210).split('')\n ].reverse();\n const index = new Map(numerals.map((d, i) => [d, i]));\n this._index = (d) => index.get(d);\n\n return new RegExp(`[${numerals.join('')}]`, 'g');\n }\n\n /** @hidden */\n private _getDecimalSeparator(): RegExp {\n const formatter = new NumberFormat(this.locale, { useGrouping: false });\n return new RegExp(`[${formatter.format(1.1).trim().replace(this._numerals, '')}]`, 'g');\n }\n\n /** @hidden */\n private _getGroupingSeparator(): RegExp {\n const formatter = new NumberFormat(this.locale, { useGrouping: true });\n return new RegExp(`[${formatter.format(1000).trim().replace(this._numerals, '')}]`, 'g');\n }\n\n /** @hidden */\n private _getMinusSignExpression(): RegExp {\n const formatter = new NumberFormat(this.locale, { useGrouping: false });\n return new RegExp(`[${formatter.format(-1).trim().replace(this._numerals, '')}]`, 'g');\n }\n\n /** @hidden */\n private _getCurrencyExpression(): RegExp {\n if (this.currency) {\n const formatter = new NumberFormat(this.locale, {\n style: 'currency',\n currency: this.currency,\n // only available in ES2020 and later\n ['currencyDisplay' as any]: this.currencyDisplay\n });\n this.currencySign = `${formatter\n .format(1)\n .replace(/\\s/g, '')\n .replace(this._numerals, '')\n .replace(this._decimalSeparator, '')\n .replace(this._groupSeparator, '')}`;\n\n return new RegExp(`[${this.currencySign}]`, 'g');\n }\n\n return new RegExp(`[]`, 'g');\n }\n\n /** @hidden */\n private _buildRegExps(): void {\n this._numerals = this._getNumeralsExpressions();\n this._decimalSeparator = this._getDecimalSeparator();\n this._minusSign = this._getMinusSignExpression();\n this._groupSeparator = this._getGroupingSeparator();\n this._currency = this._getCurrencyExpression();\n }\n\n /** @hidden */\n private _formatToViewValue(number: Nullable<number>): string {\n if (number == null) {\n return '';\n } else {\n return this.currency\n ? this._numberFormat.format(number).replace(this._currency, '')\n : this._numberFormat.format(number);\n }\n }\n}\n","<fd-form-input-message-group>\n <div\n class=\"fd-step-input\"\n [class]=\"state ? 'is-' + state : ''\"\n [class.is-focus]=\"focused\"\n [class.is-readonly]=\"readonly\"\n [class.is-disabled]=\"disabled\"\n [class.fd-step-input--without-buttons]=\"!hasStepButtons\"\n >\n <button\n *ngIf=\"hasStepButtons\"\n fd-button\n #decrementBtn\n fdType=\"transparent\"\n class=\"fd-step-input__button\"\n tabindex=\"-1\"\n type=\"button\"\n [disabled]=\"!canDecrement\"\n [title]=\"'coreStepInput.decrementButtonTitle' | fdTranslate\"\n [glyph]=\"decrementButtonIcon\"\n (blur)=\"onTouched()\"\n [attr.aria-label]=\"'coreStepInput.decrementButtonTitle' | fdTranslate\"\n [attr.aria-controls]=\"inputId\"\n ></button>\n <input\n #inputElement\n [name]=\"name\"\n [id]=\"inputId\"\n [title]=\"inputTitle\"\n [disabled]=\"disabled\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-describedby]=\"canDisplayLabel ? inputId + '__description' : ''\"\n [attr.aria-required]=\"required\"\n [attr.aria-roledescription]=\"ariaRoleDescription || ('coreStepInput.ariaRoleDescription' | fdTranslate)\"\n (focusin)=\"handleFocusIn()\"\n (wheel)=\"handleScroll($event)\"\n (keydown)=\"handleKeyDown($event)\"\n (input)=\"trackInputValue($event)\"\n (change)=\"updateOnInputChanged()\"\n [style.textAlign]=\"textAlign\"\n class=\"fd-input fd-input--no-number-spinner fd-step-input__input\"\n type=\"text\"\n inputmode=\"numeric\"\n />\n <button\n *ngIf=\"hasStepButtons\"\n fd-button\n #incrementBtn\n fdType=\"transparent\"\n class=\"fd-step-input__button\"\n tabindex=\"-1\"\n type=\"button\"\n [disabled]=\"!canIncrement\"\n [title]=\"'coreStepInput.incrementButtonTitle' | fdTranslate\"\n [glyph]=\"incrementButtonIcon\"\n (blur)=\"onTouched()\"\n [attr.aria-label]=\"'coreStepInput.incrementButtonTitle' | fdTranslate\"\n [attr.aria-controls]=\"inputId\"\n ></button>\n </div>\n\n <fd-form-message *ngIf=\"!!stateMessage\" [type]=\"state\" [innerHTML]=\"stateMessage\"></fd-form-message>\n</fd-form-input-message-group>\n\n<span *ngIf=\"canDisplayLabel\" [id]=\"inputId + '__description'\" class=\"fd-form-label fd-form-label--unit-description\">\n {{ unit || currencySign }}\n</span>\n","import { NgModule } from '@angular/core';\n\nimport { ContentDensityModule } from '@fundamental-ngx/core/content-density';\nimport { StepInputComponent } from './step-input.component';\n\n@NgModule({\n imports: [StepInputComponent, ContentDensityModule],\n exports: [StepInputComponent, ContentDensityModule]\n})\nexport class StepInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoCA,IAAO,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;AAExC,IAAI,iBAAiB,GAAG,CAAC,CAAC;MAwBb,kBAAkB,CAAA;;IAkD3B,IACI,KAAK,CAAC,KAAuB,EAAA;QAC7B,IAAI,KAAK,IAAI,IAAI,EAAE;;AAEf,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;AACtB,SAAA;AAAM,aAAA,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACtB,YAAA,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC/C,SAAA;AACD,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,MAAM,EAAE;AACzC,YAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC;AACzC,SAAA;QACD,IAAI,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,gBAAgB,EAAE,CAAC;AAC3B,SAAA;KACJ;;AAGD,IAAA,IAAI,KAAK,GAAA;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;;IAwID,WACuB,CAAA,MAAM,EACjB,kBAAqC,EAC5B,cAA6B,EACrC,uBAA+C,EACvC,WAAuB,EAAA;QAHhC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAmB;QAC5B,IAAc,CAAA,cAAA,GAAd,cAAc,CAAe;QACrC,IAAuB,CAAA,uBAAA,GAAvB,uBAAuB,CAAw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E,UAAU,EAAE,CAAA;gBAK/C,YAAY,EAAA,CAAA;sBADX,SAAS;uBAAC,cAAc,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;MEzNpD,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHd,kBAAkB,EAAE,oBAAoB,CACxC,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;AAEzC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAHd,OAAA,EAAA,CAAA,kBAAkB,EAAE,oBAAoB,EACpB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAEzC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,CAAC;AACnD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,CAAC;AACtD,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -114,7 +114,7 @@ class SwitchComponent {
|
|
|
114
114
|
},
|
|
115
115
|
registerFormItemControl(SwitchComponent),
|
|
116
116
|
contentDensityObserverProviders()
|
|
117
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["switchInput"], descendants: true }, { propertyName: "_switchLabelWrapperEl", first: true, predicate: ["switchEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : ('coreSwitch.semanticDeclineLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n", styles: ["/*!\n * Fundamental Library Styles v0.32.0-rc.7\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-switch{-webkit-box-sizing:border-box;-ms-flex-item-align:start;-webkit-box-align:center;-ms-flex-align:center;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);align-items:center;align-self:flex-start;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:pointer;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;overflow:initial;padding:0;padding:var(--fdSwitch_Padding);position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch:after,.fd-switch:before{box-sizing:inherit;font-size:inherit}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{margin-left:.5rem;margin-right:0}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{-webkit-box-sizing:border-box;-webkit-box-sizing:content-box;-webkit-transition:all .1s;-webkit-box-shadow:var(--fdSwitch_Shadow);background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);box-shadow:var(--fdSwitch_Shadow);box-sizing:border-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:var(--sapContent_LineHeight);margin:0;padding:0;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{box-sizing:inherit;font-size:inherit}.fd-switch__track{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:all .1s;-webkit-transform:var(--fdSwitch_Track_Offset);align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:4.25rem;padding:0;position:absolute;top:50%;transform:var(--fdSwitch_Track_Offset);transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{box-sizing:inherit;font-size:inherit}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch__text{-webkit-box-sizing:border-box;align-self:flex-start;align-self:auto;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:inherit;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;padding:0;position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch__text:after,.fd-switch__text:before{box-sizing:inherit;font-size:inherit}.fd-switch__text[dir=rtl],[dir=rtl] .fd-switch__text{margin-left:.5rem;margin-right:0}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;font-size:var(--fdSwitch_Icon_Size);justify-content:center;line-height:1.375rem;min-width:1.75rem;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Error_Color);margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Success_Color);margin:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{-webkit-box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);box-sizing:border-box;box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding:0}.fd-switch__handle:after,.fd-switch__handle:before{box-sizing:inherit;font-size:inherit}.fd-switch__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:var(--sapContent_LineHeight);margin:0;opacity:0;padding:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);bottom:var(--fdSwitch_Focus_Outline_Vertical_Offset);content:\"\";display:block;left:var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute;right:var(--fdSwitch_Focus_Outline_Horizontal_Offset);top:var(--fdSwitch_Focus_Outline_Vertical_Offset)}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(-.8125rem,-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch[class*=-compact][dir=rtl],.fd-switch[class*=-condensed][dir=rtl],[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl],[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl],[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed],[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]),[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Track_Offset:translate(.8125rem,-50%)}.fd-switch[class*=-compact][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset_Rtl),-50%)}.fd-switch--semantic{--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%);padding:.1875rem 0}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}.fd-switch-no-animate *{transition:none!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
117
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["switchInput"], descendants: true }, { propertyName: "_switchLabelWrapperEl", first: true, predicate: ["switchEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.fd-switch--text]=\"activeText || inactiveText\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <span class=\"fd-switch__text fd-switch__text--on\" *ngIf=\"activeText; else withIconOn\">\n {{ activeText }}\n </span>\n <ng-template #withIconOn>\n <i role=\"presentation\" class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"></i>\n </ng-template>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <span class=\"fd-switch__text fd-switch__text--off\" *ngIf=\"inactiveText; else withIconOff\">\n {{ inactiveText }}\n </span>\n <ng-template #withIconOff>\n <i role=\"presentation\" class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"></i>\n </ng-template>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : ('coreSwitch.semanticDeclineLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n", styles: ["/*!\n * Fundamental Library Styles v0.32.0\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-switch{-webkit-box-sizing:border-box;-ms-flex-item-align:start;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);align-items:center;align-self:flex-start;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:pointer;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;overflow:initial;padding:0;padding:var(--fdSwitch_Padding);position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch:after,.fd-switch:before{box-sizing:inherit;font-size:inherit}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{margin-left:.5rem;margin-right:0}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{-webkit-box-sizing:border-box;-webkit-box-sizing:content-box;-webkit-transition:all .1s;-webkit-box-shadow:var(--fdSwitch_Shadow);background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);box-shadow:var(--fdSwitch_Shadow);box-sizing:border-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:var(--sapContent_LineHeight);margin:0;padding:0;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{box-sizing:inherit;font-size:inherit}.fd-switch__track{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:all .1s;-webkit-transform:var(--fdSwitch_Track_Offset);align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:4.25rem;padding:0;position:absolute;top:50%;transform:var(--fdSwitch_Track_Offset);transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{box-sizing:inherit;font-size:inherit}.fd-switch__text{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;font-family:var(--sapFontSemiboldDuplexFamily);font-size:var(--sapFontSmallSize);justify-content:center;line-height:1;position:var(--fdSwitch_Semantic_Icon_Position);text-transform:uppercase;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__text--off{color:var(--fdSwitch_Text_Inactive_Color)}.fd-switch__text--on{color:var(--fdSwitch_Text_Active_Color);opacity:0;visibility:hidden}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;display:var(--fdSwitch_Icon_Display);font-size:var(--fdSwitch_Icon_Size);justify-content:center;line-height:1.375rem;min-width:1.75rem;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Handle_Inactive_Color);margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Handle_Active_Color);margin:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{-webkit-box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);box-sizing:border-box;box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding:0}.fd-switch__handle:after,.fd-switch__handle:before{box-sizing:inherit;font-size:inherit}.fd-switch__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:var(--sapContent_LineHeight);margin:0;opacity:0;padding:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);bottom:var(--fdSwitch_Focus_Outline_Vertical_Offset);content:\"\";display:block;left:var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute;right:var(--fdSwitch_Focus_Outline_Horizontal_Offset);top:var(--fdSwitch_Focus_Outline_Vertical_Offset)}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch__input:checked+.fd-switch__slider .fd-switch__text--off{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__text--on{opacity:1;visibility:visible}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Handle_Offset),-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Active_Handle_Offset),-50%)}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch[dir=rtl][class*=-compact],.fd-switch[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch:not([class*=-cozy]),[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Handle_Offset)*-1),-50%)}.fd-switch[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic{--fdSwitch_Icon_Display:flex;--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Handle_Active_Color:var(--fdSwitch_Semantic_Handle_Success_Color);--fdSwitch_Handle_Inactive_Color:var(--fdSwitch_Semantic_Handle_Error_Color);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%);padding:.1875rem 0}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--text{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Text_Handle_Offset),-50%);--fdSwitch_Width:var(--fdSwitch_Text_Width);--fdSwitch_Handle_Width:var(--fdSwitch_Text_Handle_Width)}.fd-switch--text .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Text_Handle_Active_Offset),-50%)}.fd-switch--text[class*=-compact],.fd-switch--text[class*=-condensed],[class*=-compact] .fd-switch--text:not([class*=-cozy]),[class*=-condensed] .fd-switch--text:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Text_Width);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Text_Handle_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Text_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Text_Handle_Offset),-50%)}.fd-switch--text[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--text[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Text_Handle_Active_Offset),-50%)}.fd-switch--text[dir=rtl],[dir=rtl] .fd-switch--text{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Text_Handle_Offset)*-1),-50%)}.fd-switch--text[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Text_Handle_Active_Offset)*-1),-50%)}.fd-switch--text[dir=rtl][class*=-compact],.fd-switch--text[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--text[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--text:not([class*=-cozy]),[class*=-condensed] .fd-switch--text[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--text:not([class*=-cozy]),[dir=rtl] .fd-switch--text[class*=-compact],[dir=rtl] .fd-switch--text[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Text_Handle_Offset)*-1),-50%)}.fd-switch--text[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--text[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--text[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--text[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Text_Handle_Active_Offset)*-1),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}.fd-switch-no-animate *{transition:none!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
118
118
|
}
|
|
119
119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
120
120
|
type: Component,
|
|
@@ -130,7 +130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
130
130
|
class: 'fd-form__item fd-form__item--check fd-switch-custom',
|
|
131
131
|
'[attr.id]': 'id',
|
|
132
132
|
'(focusout)': 'onTouched()'
|
|
133
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, FormsModule, AsyncPipe, FdTranslatePipe], template: "<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : ('coreSwitch.semanticDeclineLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n", styles: ["/*!\n * Fundamental Library Styles v0.32.0-rc.7\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-switch{-webkit-box-sizing:border-box;-ms-flex-item-align:start;-webkit-box-align:center;-ms-flex-align:center;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);align-items:center;align-self:flex-start;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:pointer;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;overflow:initial;padding:0;padding:var(--fdSwitch_Padding);position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch:after,.fd-switch:before{box-sizing:inherit;font-size:inherit}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{margin-left:.5rem;margin-right:0}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{-webkit-box-sizing:border-box;-webkit-box-sizing:content-box;-webkit-transition:all .1s;-webkit-box-shadow:var(--fdSwitch_Shadow);background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);box-shadow:var(--fdSwitch_Shadow);box-sizing:border-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:var(--sapContent_LineHeight);margin:0;padding:0;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{box-sizing:inherit;font-size:inherit}.fd-switch__track{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:all .1s;-webkit-transform:var(--fdSwitch_Track_Offset);align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:4.25rem;padding:0;position:absolute;top:50%;transform:var(--fdSwitch_Track_Offset);transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{box-sizing:inherit;font-size:inherit}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch__text{-webkit-box-sizing:border-box;align-self:flex-start;align-self:auto;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:inherit;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;padding:0;position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch__text:after,.fd-switch__text:before{box-sizing:inherit;font-size:inherit}.fd-switch__text[dir=rtl],[dir=rtl] .fd-switch__text{margin-left:.5rem;margin-right:0}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;font-size:var(--fdSwitch_Icon_Size);justify-content:center;line-height:1.375rem;min-width:1.75rem;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Error_Color);margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Success_Color);margin:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{-webkit-box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);box-sizing:border-box;box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding:0}.fd-switch__handle:after,.fd-switch__handle:before{box-sizing:inherit;font-size:inherit}.fd-switch__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:var(--sapContent_LineHeight);margin:0;opacity:0;padding:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);bottom:var(--fdSwitch_Focus_Outline_Vertical_Offset);content:\"\";display:block;left:var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute;right:var(--fdSwitch_Focus_Outline_Horizontal_Offset);top:var(--fdSwitch_Focus_Outline_Vertical_Offset)}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(-.8125rem,-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch[class*=-compact][dir=rtl],.fd-switch[class*=-condensed][dir=rtl],[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl],[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl],[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed],[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]),[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Track_Offset:translate(.8125rem,-50%)}.fd-switch[class*=-compact][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset_Rtl),-50%)}.fd-switch--semantic{--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%);padding:.1875rem 0}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}.fd-switch-no-animate *{transition:none!important}\n"] }]
|
|
133
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, FormsModule, AsyncPipe, FdTranslatePipe], template: "<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.fd-switch--text]=\"activeText || inactiveText\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <span class=\"fd-switch__text fd-switch__text--on\" *ngIf=\"activeText; else withIconOn\">\n {{ activeText }}\n </span>\n <ng-template #withIconOn>\n <i role=\"presentation\" class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"></i>\n </ng-template>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <span class=\"fd-switch__text fd-switch__text--off\" *ngIf=\"inactiveText; else withIconOff\">\n {{ inactiveText }}\n </span>\n <ng-template #withIconOff>\n <i role=\"presentation\" class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"></i>\n </ng-template>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : ('coreSwitch.semanticDeclineLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n", styles: ["/*!\n * Fundamental Library Styles v0.32.0\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-switch{-webkit-box-sizing:border-box;-ms-flex-item-align:start;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);align-items:center;align-self:flex-start;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:pointer;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;overflow:initial;padding:0;padding:var(--fdSwitch_Padding);position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch:after,.fd-switch:before{box-sizing:inherit;font-size:inherit}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{margin-left:.5rem;margin-right:0}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{-webkit-box-sizing:border-box;-webkit-box-sizing:content-box;-webkit-transition:all .1s;-webkit-box-shadow:var(--fdSwitch_Shadow);background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);box-shadow:var(--fdSwitch_Shadow);box-sizing:border-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:var(--sapContent_LineHeight);margin:0;padding:0;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{box-sizing:inherit;font-size:inherit}.fd-switch__track{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:all .1s;-webkit-transform:var(--fdSwitch_Track_Offset);align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:4.25rem;padding:0;position:absolute;top:50%;transform:var(--fdSwitch_Track_Offset);transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{box-sizing:inherit;font-size:inherit}.fd-switch__text{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;font-family:var(--sapFontSemiboldDuplexFamily);font-size:var(--sapFontSmallSize);justify-content:center;line-height:1;position:var(--fdSwitch_Semantic_Icon_Position);text-transform:uppercase;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__text--off{color:var(--fdSwitch_Text_Inactive_Color)}.fd-switch__text--on{color:var(--fdSwitch_Text_Active_Color);opacity:0;visibility:hidden}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;display:var(--fdSwitch_Icon_Display);font-size:var(--fdSwitch_Icon_Size);justify-content:center;line-height:1.375rem;min-width:1.75rem;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Handle_Inactive_Color);margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Handle_Active_Color);margin:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{-webkit-box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);box-sizing:border-box;box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding:0}.fd-switch__handle:after,.fd-switch__handle:before{box-sizing:inherit;font-size:inherit}.fd-switch__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:var(--sapContent_LineHeight);margin:0;opacity:0;padding:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);bottom:var(--fdSwitch_Focus_Outline_Vertical_Offset);content:\"\";display:block;left:var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute;right:var(--fdSwitch_Focus_Outline_Horizontal_Offset);top:var(--fdSwitch_Focus_Outline_Vertical_Offset)}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch__input:checked+.fd-switch__slider .fd-switch__text--off{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__text--on{opacity:1;visibility:visible}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Handle_Offset),-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Active_Handle_Offset),-50%)}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch[dir=rtl][class*=-compact],.fd-switch[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch:not([class*=-cozy]),[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Handle_Offset)*-1),-50%)}.fd-switch[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic{--fdSwitch_Icon_Display:flex;--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Handle_Active_Color:var(--fdSwitch_Semantic_Handle_Success_Color);--fdSwitch_Handle_Inactive_Color:var(--fdSwitch_Semantic_Handle_Error_Color);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%);padding:.1875rem 0}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--text{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Text_Handle_Offset),-50%);--fdSwitch_Width:var(--fdSwitch_Text_Width);--fdSwitch_Handle_Width:var(--fdSwitch_Text_Handle_Width)}.fd-switch--text .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Text_Handle_Active_Offset),-50%)}.fd-switch--text[class*=-compact],.fd-switch--text[class*=-condensed],[class*=-compact] .fd-switch--text:not([class*=-cozy]),[class*=-condensed] .fd-switch--text:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Text_Width);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Text_Handle_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Text_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Text_Handle_Offset),-50%)}.fd-switch--text[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--text[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Text_Handle_Active_Offset),-50%)}.fd-switch--text[dir=rtl],[dir=rtl] .fd-switch--text{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Text_Handle_Offset)*-1),-50%)}.fd-switch--text[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Text_Handle_Active_Offset)*-1),-50%)}.fd-switch--text[dir=rtl][class*=-compact],.fd-switch--text[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--text[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--text:not([class*=-cozy]),[class*=-condensed] .fd-switch--text[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--text:not([class*=-cozy]),[dir=rtl] .fd-switch--text[class*=-compact],[dir=rtl] .fd-switch--text[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Text_Handle_Offset)*-1),-50%)}.fd-switch--text[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--text[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--text[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--text[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--text:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--text[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Text_Handle_Active_Offset)*-1),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}.fd-switch-no-animate *{transition:none!important}\n"] }]
|
|
134
134
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.ContentDensityObserver }]; }, propDecorators: { inputElement: [{
|
|
135
135
|
type: ViewChild,
|
|
136
136
|
args: ['switchInput']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-switch.mjs","sources":["../../../../libs/core/src/lib/switch/switch.component.ts","../../../../libs/core/src/lib/switch/switch.component.html","../../../../libs/core/src/lib/switch/switch.module.ts","../../../../libs/core/src/lib/switch/fundamental-ngx-core-switch.ts"],"sourcesContent":["import { AsyncPipe, NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { FormItemControl, registerFormItemControl } from '@fundamental-ngx/core/form';\nimport { FdTranslatePipe } from '@fundamental-ngx/i18n';\nimport { Subscription } from 'rxjs';\n\nlet switchUniqueId = 0;\n\n/**\n * The Switch component is used to activate or deactivate an element.\n * It uses a visual metaphor to inform the user of the state of the switch.\n */\n@Component({\n selector: 'fd-switch',\n templateUrl: './switch.component.html',\n styleUrls: ['./switch.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SwitchComponent),\n multi: true\n },\n registerFormItemControl(SwitchComponent),\n contentDensityObserverProviders()\n ],\n host: {\n class: 'fd-form__item fd-form__item--check fd-switch-custom',\n '[attr.id]': 'id',\n '(focusout)': 'onTouched()'\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [NgIf, FormsModule, AsyncPipe, FdTranslatePipe]\n})\nexport class SwitchComponent implements ControlValueAccessor, OnDestroy, FormItemControl {\n /** @hidden */\n @ViewChild('switchInput')\n inputElement: ElementRef<HTMLInputElement>;\n\n /** Optional text for the active state of the switch. */\n @Input()\n activeText = '';\n\n /** Optional text for the inactive state of the switch. */\n @Input()\n inactiveText = '';\n\n /** Whether the switch is disabled. */\n @Input()\n disabled = false;\n\n /** Id for the switch component. If omitted, a unique one is generated. */\n @Input()\n id = `fd-switch-${switchUniqueId++}`;\n\n /** Sets input name attribute. */\n @Input()\n name: string;\n\n /** If it is mandatory field */\n @Input()\n required = false;\n\n /** Whether the switch is checked. */\n @Input()\n checked = false;\n\n /** Whether the switch is semantic */\n @Input()\n semantic = false;\n\n /** aria-label attribute of the inner input element. */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** aria-labelledby attribute of the inner input element. */\n @Input()\n ariaLabelledBy: Nullable<string>;\n\n /**\n * Event fired when the state of the switch changes.\n * *$event* can be used to retrieve the new state of the switch.\n */\n @Output()\n readonly checkedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** @hidden */\n @ViewChild('switchEl', { read: ElementRef })\n _switchLabelWrapperEl: ElementRef;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n constructor(\n private readonly _changeDetectorRef: ChangeDetectorRef,\n readonly _contentDensityObserver: ContentDensityObserver\n ) {}\n\n /** @hidden */\n onChange: (value: boolean) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** Set focus on the input element. */\n focus(): void {\n this.inputElement.nativeElement.focus();\n }\n\n /** Get the id of the inner input element of the switch. */\n get innerInputId(): string {\n return `${this.id}-input`;\n }\n\n /** Get the id of the semantic label element of the switch. */\n get _semanticLabelId(): string {\n return `${this.id}-semantic-label`;\n }\n\n /** Checked property of the switch. */\n set isChecked(value) {\n this._switchLabelWrapperEl.nativeElement.classList.remove('fd-switch-no-animate');\n this.writeValue(value);\n this.checkedChange.emit(value);\n setTimeout(() => {\n // add the no-animate class after the transition duration, 100ms\n this._switchLabelWrapperEl.nativeElement.classList.add('fd-switch-no-animate');\n }, 100);\n }\n get isChecked(): boolean {\n return this.checked;\n }\n\n /**\n * @hidden\n * @param value Sets the value of the *checked* property of the switch.\n */\n writeValue(value: boolean): void {\n this.checked = value;\n this.onChange(value);\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * @hidden\n * @param fn User defined function that handles the *onChange* event of the switch.\n */\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n /**\n * @hidden\n * @param fn User defined function that handles the *onTouch* event of the switch.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * @hidden\n * @param isDisabled Sets the value of the *disabled* property of the switch.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.detectChanges();\n }\n}\n","<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : ('coreSwitch.semanticDeclineLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n","import { NgModule } from '@angular/core';\nimport { SwitchComponent } from './switch.component';\n\n@NgModule({\n imports: [SwitchComponent],\n exports: [SwitchComponent]\n})\nexport class SwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAqBA,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB;;;AAGG;MAwBU,eAAe,CAAA;;IA4DxB,WACqB,CAAA,kBAAqC,EAC7C,uBAA+C,EAAA;QADvC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAmB;QAC7C,IAAuB,CAAA,uBAAA,GAAvB,uBAAuB,CAAwB;;QAvD5D,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;;QAIhB,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;;QAIlB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;AAIjB,QAA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"version":3,"file":"fundamental-ngx-core-switch.mjs","sources":["../../../../libs/core/src/lib/switch/switch.component.ts","../../../../libs/core/src/lib/switch/switch.component.html","../../../../libs/core/src/lib/switch/switch.module.ts","../../../../libs/core/src/lib/switch/fundamental-ngx-core-switch.ts"],"sourcesContent":["import { AsyncPipe, NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { FormItemControl, registerFormItemControl } from '@fundamental-ngx/core/form';\nimport { FdTranslatePipe } from '@fundamental-ngx/i18n';\nimport { Subscription } from 'rxjs';\n\nlet switchUniqueId = 0;\n\n/**\n * The Switch component is used to activate or deactivate an element.\n * It uses a visual metaphor to inform the user of the state of the switch.\n */\n@Component({\n selector: 'fd-switch',\n templateUrl: './switch.component.html',\n styleUrls: ['./switch.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SwitchComponent),\n multi: true\n },\n registerFormItemControl(SwitchComponent),\n contentDensityObserverProviders()\n ],\n host: {\n class: 'fd-form__item fd-form__item--check fd-switch-custom',\n '[attr.id]': 'id',\n '(focusout)': 'onTouched()'\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [NgIf, FormsModule, AsyncPipe, FdTranslatePipe]\n})\nexport class SwitchComponent implements ControlValueAccessor, OnDestroy, FormItemControl {\n /** @hidden */\n @ViewChild('switchInput')\n inputElement: ElementRef<HTMLInputElement>;\n\n /** Optional text for the active state of the switch. */\n @Input()\n activeText = '';\n\n /** Optional text for the inactive state of the switch. */\n @Input()\n inactiveText = '';\n\n /** Whether the switch is disabled. */\n @Input()\n disabled = false;\n\n /** Id for the switch component. If omitted, a unique one is generated. */\n @Input()\n id = `fd-switch-${switchUniqueId++}`;\n\n /** Sets input name attribute. */\n @Input()\n name: string;\n\n /** If it is mandatory field */\n @Input()\n required = false;\n\n /** Whether the switch is checked. */\n @Input()\n checked = false;\n\n /** Whether the switch is semantic */\n @Input()\n semantic = false;\n\n /** aria-label attribute of the inner input element. */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** aria-labelledby attribute of the inner input element. */\n @Input()\n ariaLabelledBy: Nullable<string>;\n\n /**\n * Event fired when the state of the switch changes.\n * *$event* can be used to retrieve the new state of the switch.\n */\n @Output()\n readonly checkedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** @hidden */\n @ViewChild('switchEl', { read: ElementRef })\n _switchLabelWrapperEl: ElementRef;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n constructor(\n private readonly _changeDetectorRef: ChangeDetectorRef,\n readonly _contentDensityObserver: ContentDensityObserver\n ) {}\n\n /** @hidden */\n onChange: (value: boolean) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** Set focus on the input element. */\n focus(): void {\n this.inputElement.nativeElement.focus();\n }\n\n /** Get the id of the inner input element of the switch. */\n get innerInputId(): string {\n return `${this.id}-input`;\n }\n\n /** Get the id of the semantic label element of the switch. */\n get _semanticLabelId(): string {\n return `${this.id}-semantic-label`;\n }\n\n /** Checked property of the switch. */\n set isChecked(value) {\n this._switchLabelWrapperEl.nativeElement.classList.remove('fd-switch-no-animate');\n this.writeValue(value);\n this.checkedChange.emit(value);\n setTimeout(() => {\n // add the no-animate class after the transition duration, 100ms\n this._switchLabelWrapperEl.nativeElement.classList.add('fd-switch-no-animate');\n }, 100);\n }\n get isChecked(): boolean {\n return this.checked;\n }\n\n /**\n * @hidden\n * @param value Sets the value of the *checked* property of the switch.\n */\n writeValue(value: boolean): void {\n this.checked = value;\n this.onChange(value);\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * @hidden\n * @param fn User defined function that handles the *onChange* event of the switch.\n */\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n /**\n * @hidden\n * @param fn User defined function that handles the *onTouch* event of the switch.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * @hidden\n * @param isDisabled Sets the value of the *disabled* property of the switch.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.detectChanges();\n }\n}\n","<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.fd-switch--text]=\"activeText || inactiveText\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <span class=\"fd-switch__text fd-switch__text--on\" *ngIf=\"activeText; else withIconOn\">\n {{ activeText }}\n </span>\n <ng-template #withIconOn>\n <i role=\"presentation\" class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"></i>\n </ng-template>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <span class=\"fd-switch__text fd-switch__text--off\" *ngIf=\"inactiveText; else withIconOff\">\n {{ inactiveText }}\n </span>\n <ng-template #withIconOff>\n <i role=\"presentation\" class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"></i>\n </ng-template>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : ('coreSwitch.semanticDeclineLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n","import { NgModule } from '@angular/core';\nimport { SwitchComponent } from './switch.component';\n\n@NgModule({\n imports: [SwitchComponent],\n exports: [SwitchComponent]\n})\nexport class SwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAqBA,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB;;;AAGG;MAwBU,eAAe,CAAA;;IA4DxB,WACqB,CAAA,kBAAqC,EAC7C,uBAA+C,EAAA;QADvC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAmB;QAC7C,IAAuB,CAAA,uBAAA,GAAvB,uBAAuB,CAAwB;;QAvD5D,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;;QAIhB,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;;QAIlB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;AAIjB,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,UAAA,EAAa,cAAc,EAAE,EAAE,CAAC;;QAQrC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAIjB,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;;QAIhB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAUjB;;;AAGG;AAEM,QAAA,IAAA,CAAA,aAAa,GAA0B,IAAI,YAAY,EAAW,CAAC;;AAOpE,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,YAAY,EAAE,CAAC;;AAS5C,QAAA,IAAA,CAAA,QAAQ,GAA6B,MA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