@mintplayer/ng-bootstrap 21.6.0 → 21.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +34 -73
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +10 -31
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +12 -29
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +17 -19
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +14 -41
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +47 -89
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +10 -13
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +294 -383
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +10 -44
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +16 -23
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +24 -74
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +6 -8
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +43 -73
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +8 -12
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +23 -60
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +34 -86
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +9 -12
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +35 -96
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +9 -10
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +23 -26
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +29 -54
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +35 -67
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs +75 -114
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs +16 -15
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +17 -44
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs +12 -16
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +74 -160
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +25 -87
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +8 -9
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +136 -232
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs +40 -68
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +11 -15
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +70 -138
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +16 -39
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +8 -9
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +40 -70
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +28 -97
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +30 -58
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +10 -17
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +96 -153
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +26 -41
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +30 -61
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +59 -108
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +99 -131
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +63 -106
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +15 -33
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +16 -33
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +16 -35
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +39 -81
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +13 -17
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +80 -154
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +116 -153
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +25 -62
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +16 -33
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +13 -20
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +14 -26
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-viewport.mjs +6 -9
- package/fesm2022/mintplayer-ng-bootstrap-viewport.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs.map +1 -1
- package/package.json +4 -4
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +20 -30
- package/types/mintplayer-ng-bootstrap-alert.d.ts +3 -9
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +3 -10
- package/types/mintplayer-ng-bootstrap-button-type.d.ts +4 -4
- package/types/mintplayer-ng-bootstrap-card.d.ts +5 -12
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +6 -14
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +43 -54
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +2 -11
- package/types/mintplayer-ng-bootstrap-copy.d.ts +5 -7
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +7 -18
- package/types/mintplayer-ng-bootstrap-dock.d.ts +18 -31
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -1
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +11 -22
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +16 -28
- package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +1 -2
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +16 -27
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-for.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-form.d.ts +11 -20
- package/types/mintplayer-ng-bootstrap-grid.d.ts +23 -35
- package/types/mintplayer-ng-bootstrap-instance-of.d.ts +34 -41
- package/types/mintplayer-ng-bootstrap-let.d.ts +3 -2
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +4 -13
- package/types/mintplayer-ng-bootstrap-modal.d.ts +13 -29
- package/types/mintplayer-ng-bootstrap-multiselect.d.ts +8 -21
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +38 -51
- package/types/mintplayer-ng-bootstrap-navigation-lock.d.ts +8 -15
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +20 -30
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +3 -11
- package/types/mintplayer-ng-bootstrap-popover.d.ts +18 -31
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +9 -27
- package/types/mintplayer-ng-bootstrap-range.d.ts +14 -22
- package/types/mintplayer-ng-bootstrap-rating.d.ts +0 -2
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +23 -32
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +3 -9
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +7 -16
- package/types/mintplayer-ng-bootstrap-searchbox.d.ts +20 -34
- package/types/mintplayer-ng-bootstrap-select.d.ts +24 -30
- package/types/mintplayer-ng-bootstrap-select2.d.ts +21 -33
- package/types/mintplayer-ng-bootstrap-shell.d.ts +12 -19
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +4 -12
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +9 -21
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-toast.d.ts +12 -20
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +20 -29
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +4 -24
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +13 -21
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-user-agent.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-viewport.d.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-tooltip.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tooltip/src/providers/tooltip-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.html","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/directive/tooltip.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/tooltip.module.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/mintplayer-ng-bootstrap-tooltip.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const TOOLTIP_CONTENT = new InjectionToken<TemplateRef<any>>('TooltipContent');","import { ChangeDetectionStrategy, Component, computed, HostBinding, Inject, input, TemplateRef } from '@angular/core';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\n\n@Component({\n selector: 'bs-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n standalone: false,\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTooltipComponent {\n constructor(@Inject(TOOLTIP_CONTENT) content: TemplateRef<any>) {\n this.template = content;\n }\n\n position = input<Position>('bottom');\n template: TemplateRef<any>;\n\n positionClass = computed(() => `bs-tooltip-${this.position()}`);\n\n marginClass = computed(() => {\n switch (this.position()) {\n case 'start': return 'me-1';\n case 'end': return 'ms-1';\n case 'top': return 'mb-1';\n case 'bottom': return 'mt-1';\n }\n });\n\n @HostBinding('class.position-relative') positionRelative = true;\n}\n","<bs-has-overlay></bs-has-overlay>\n<div [@fadeInOut] class=\"tooltip position-absolute show\"\n [class]=\"[positionClass(), marginClass()]\"\n role=\"tooltip\">\n <div class=\"tooltip-arrow position-absolute\" aria-hidden=\"true\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n","import { ConnectedPosition, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Directive, ElementRef, Host, HostListener, Injector, Input, OnDestroy, SkipSelf, TemplateRef } from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsTooltipComponent } from '../component/tooltip.component';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\n\n@Directive({\n selector: '*[bsTooltip]',\n standalone: false,\n})\nexport class BsTooltipDirective implements OnDestroy {\n\n constructor(\n private overlay: Overlay,\n private templateRef: TemplateRef<any>,\n private parentInjector: Injector,\n @Host() @SkipSelf() private parent: ElementRef\n ) {\n this.injector = Injector.create({\n providers: [{ provide: TOOLTIP_CONTENT, useValue: this.templateRef }],\n parent: this.parentInjector\n });\n this.portal = new ComponentPortal(BsTooltipComponent, null, this.injector);\n\n parent.nativeElement.onmouseenter = () => {\n this.showTooltip();\n };\n parent.nativeElement.onmouseleave = () => {\n this.hideTooltip();\n }\n }\n\n @Input() public bsTooltip: Position = 'bottom';\n\n private injector: Injector;\n private portal: ComponentPortal<any>;\n private overlayRef: OverlayRef | null = null;\n\n @HostListener('window:blur') onBlur() {\n this.hideTooltip();\n }\n\n showTooltip() {\n const positions: ConnectedPosition[] = [];\n switch (this.bsTooltip) {\n case 'bottom': {\n positions.push({\n originX: \"center\",\n originY: \"bottom\", //<--\n overlayX: \"center\",\n overlayY: \"top\"\n });\n } break;\n case 'top': {\n positions.push({\n originX: \"center\",\n originY: \"top\", //<--\n overlayX: \"center\",\n overlayY: \"bottom\"\n });\n } break;\n case 'start': {\n positions.push({\n originX: \"start\", //<--\n originY: \"center\",\n overlayX: \"end\",\n overlayY: \"center\",\n });\n } break;\n case 'end': {\n positions.push({\n originX: \"end\", //<--\n originY: \"center\",\n overlayX: \"start\",\n overlayY: \"center\"\n });\n } break;\n }\n\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions(positions),\n });\n const component = this.overlayRef.attach<BsTooltipComponent>(this.portal);\n component.setInput('position', this.bsTooltip);\n }\n\n hideTooltip() {\n if (this.overlayRef) {\n this.overlayRef.detach();\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n\n ngOnDestroy() {\n this.hideTooltip();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { BsTooltipDirective } from './directive/tooltip.directive';\nimport { BsTooltipComponent } from './component/tooltip.component';\n\n@NgModule({\n declarations: [\n BsTooltipDirective,\n BsTooltipComponent\n ],\n imports: [\n CommonModule,\n OverlayModule,\n BsHasOverlayComponent,\n ],\n exports: [\n BsTooltipDirective\n ]\n})\nexport class BsTooltipModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAEO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAmB,gBAAgB,CAAC;;MCWxE,kBAAkB,CAAA;AAC7B,IAAA,WAAA,CAAqC,OAAyB,EAAA;AAI9D,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAW,QAAQ,oDAAC;AAGpC,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAA,WAAA,EAAc,IAAI,CAAC,QAAQ,EAAE,CAAA,CAAE,yDAAC;AAE/D,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AAC1B,YAAA,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACrB,gBAAA,KAAK,OAAO,EAAE,OAAO,MAAM;AAC3B,gBAAA,KAAK,KAAK,EAAE,OAAO,MAAM;AACzB,gBAAA,KAAK,KAAK,EAAE,OAAO,MAAM;AACzB,gBAAA,KAAK,QAAQ,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V;;sBAMA,YAAY;uBAAC,aAAa;;;MClBhB,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;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,iBAZxB,kBAAkB;AAClB,YAAA,kBAAkB,aAGlB,YAAY;YACZ,aAAa;AACb,YAAA,qBAAqB,aAGrB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGT,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,YARxB,YAAY;YACZ,aAAa;YACb,qBAAqB,CAAA,EAAA,CAAA,CAAA;;2FAMZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,kBAAkB;wBAClB;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,qBAAqB;AACtB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP;AACD;AACF,iBAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-tooltip.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tooltip/src/providers/tooltip-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.html","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/directive/tooltip.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/mintplayer-ng-bootstrap-tooltip.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const TOOLTIP_CONTENT = new InjectionToken<TemplateRef<any>>('TooltipContent');","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, TemplateRef } from '@angular/core';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\n\n@Component({\n selector: 'bs-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n imports: [NgTemplateOutlet, BsHasOverlayComponent],\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.position-relative]': 'true',\n },\n})\nexport class BsTooltipComponent {\n template = inject<TemplateRef<any>>(TOOLTIP_CONTENT);\n\n position = input<Position>('bottom');\n\n positionClass = computed(() => `bs-tooltip-${this.position()}`);\n\n marginClass = computed(() => {\n switch (this.position()) {\n case 'start': return 'me-1';\n case 'end': return 'ms-1';\n case 'top': return 'mb-1';\n case 'bottom': return 'mt-1';\n }\n });\n}\n","<bs-has-overlay></bs-has-overlay>\n<div [@fadeInOut] class=\"tooltip position-absolute show\"\n [class]=\"[positionClass(), marginClass()]\"\n role=\"tooltip\">\n <div class=\"tooltip-arrow position-absolute\" aria-hidden=\"true\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n","import { ConnectedPosition, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Directive, ElementRef, Host, input, Injector, OnDestroy, SkipSelf, TemplateRef } from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsTooltipComponent } from '../component/tooltip.component';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\n\n@Directive({\n selector: '*[bsTooltip]',\n host: {\n '(window:blur)': 'onBlur()',\n },\n})\nexport class BsTooltipDirective implements OnDestroy {\n\n constructor(\n private overlay: Overlay,\n private templateRef: TemplateRef<any>,\n private parentInjector: Injector,\n @Host() @SkipSelf() private parent: ElementRef\n ) {\n this.injector = Injector.create({\n providers: [{ provide: TOOLTIP_CONTENT, useValue: this.templateRef }],\n parent: this.parentInjector\n });\n this.portal = new ComponentPortal(BsTooltipComponent, null, this.injector);\n\n parent.nativeElement.onmouseenter = () => {\n this.showTooltip();\n };\n parent.nativeElement.onmouseleave = () => {\n this.hideTooltip();\n }\n }\n\n readonly bsTooltip = input<Position>('bottom');\n\n private injector: Injector;\n private portal: ComponentPortal<any>;\n private overlayRef: OverlayRef | null = null;\n\n onBlur() {\n this.hideTooltip();\n }\n\n showTooltip() {\n const positions: ConnectedPosition[] = [];\n switch (this.bsTooltip()) {\n case 'bottom': {\n positions.push({\n originX: \"center\",\n originY: \"bottom\", //<--\n overlayX: \"center\",\n overlayY: \"top\"\n });\n } break;\n case 'top': {\n positions.push({\n originX: \"center\",\n originY: \"top\", //<--\n overlayX: \"center\",\n overlayY: \"bottom\"\n });\n } break;\n case 'start': {\n positions.push({\n originX: \"start\", //<--\n originY: \"center\",\n overlayX: \"end\",\n overlayY: \"center\",\n });\n } break;\n case 'end': {\n positions.push({\n originX: \"end\", //<--\n originY: \"center\",\n overlayX: \"start\",\n overlayY: \"center\"\n });\n } break;\n }\n\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions(positions),\n });\n const component = this.overlayRef.attach<BsTooltipComponent>(this.portal);\n component.setInput('position', this.bsTooltip());\n }\n\n hideTooltip() {\n if (this.overlayRef) {\n this.overlayRef.detach();\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n\n ngOnDestroy() {\n this.hideTooltip();\n }\n\n}\n","export * from './directive/tooltip.directive';\n// export * from './component/tooltip.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAmB,gBAAgB,CAAC;;MCgBxE,kBAAkB,CAAA;AAX/B,IAAA,WAAA,GAAA;AAYE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAmB,eAAe,CAAC;AAEpD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAW,QAAQ,oDAAC;AAEpC,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAA,WAAA,EAAc,IAAI,CAAC,QAAQ,EAAE,CAAA,CAAE,yDAAC;AAE/D,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AAC1B,YAAA,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACrB,gBAAA,KAAK,OAAO,EAAE,OAAO,MAAM;AAC3B,gBAAA,KAAK,KAAK,EAAE,OAAO,MAAM;AACzB,gBAAA,KAAK,KAAK,EAAE,OAAO,MAAM;AACzB,gBAAA,KAAK,QAAQ,EAAE,OAAO,MAAM;;AAEhC,QAAA,CAAC,uDAAC;AACH,IAAA;8GAfY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,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A,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,UAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,eAAe,EAAE,UAAU;AAC5B,qBAAA;AACF,iBAAA;;0BAOI;;0BAAQ;;;AClBb;;ACDA;;AAEG;;;;"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, computed, model, signal, ChangeDetectionStrategy, Component, DestroyRef,
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as i1 from '@mintplayer/ng-bootstrap/list-group';
|
|
5
|
-
import { BsListGroupModule } from '@mintplayer/ng-bootstrap/list-group';
|
|
2
|
+
import { inject, computed, model, signal, ChangeDetectionStrategy, Component, DestroyRef, contentChild } from '@angular/core';
|
|
6
3
|
import { SlideUpDownAnimation } from '@mintplayer/ng-animations';
|
|
4
|
+
import { BsListGroupComponent, BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';
|
|
7
5
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
6
|
|
|
9
7
|
class BsTreeviewComponent {
|
|
@@ -41,12 +39,12 @@ class BsTreeviewComponent {
|
|
|
41
39
|
isFocusedItem(item) {
|
|
42
40
|
return this.getRootTree().focusedItem() === item;
|
|
43
41
|
}
|
|
44
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
45
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTreeviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: BsTreeviewComponent, isStandalone: true, selector: "bs-treeview", inputs: { isExpanded: { classPropertyName: "isExpanded", publicName: "isExpanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isExpanded: "isExpandedChange" }, ngImport: i0, template: "<bs-list-group [@slideUpDown]=\"isExpanded()\" class=\"d-block overflow-y-hidden\" [attr.role]=\"level() === 0 ? 'tree' : 'group'\">\n <ng-content></ng-content>\n</bs-list-group>\n", styles: [":host{margin-top:-1px}\n"], dependencies: [{ kind: "component", type: BsListGroupComponent, selector: "bs-list-group" }], animations: [SlideUpDownAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
46
44
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTreeviewComponent, decorators: [{
|
|
48
46
|
type: Component,
|
|
49
|
-
args: [{ selector: 'bs-treeview',
|
|
47
|
+
args: [{ selector: 'bs-treeview', imports: [BsListGroupComponent], animations: [SlideUpDownAnimation], changeDetection: ChangeDetectionStrategy.OnPush, template: "<bs-list-group [@slideUpDown]=\"isExpanded()\" class=\"d-block overflow-y-hidden\" [attr.role]=\"level() === 0 ? 'tree' : 'group'\">\n <ng-content></ng-content>\n</bs-list-group>\n", styles: [":host{margin-top:-1px}\n"] }]
|
|
50
48
|
}], propDecorators: { isExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "isExpanded", required: false }] }, { type: i0.Output, args: ["isExpandedChange"] }] } });
|
|
51
49
|
|
|
52
50
|
/// <reference types="../types" />
|
|
@@ -55,6 +53,7 @@ class BsTreeviewItemComponent {
|
|
|
55
53
|
this.parent = inject(BsTreeviewComponent);
|
|
56
54
|
this.sanitizer = inject(DomSanitizer);
|
|
57
55
|
this.destroyRef = inject(DestroyRef);
|
|
56
|
+
this.childTree = contentChild(BsTreeviewComponent, { ...(ngDevMode ? { debugName: "childTree" } : {}), descendants: false });
|
|
58
57
|
this.chevronRight = signal(undefined, ...(ngDevMode ? [{ debugName: "chevronRight" }] : []));
|
|
59
58
|
// Roving tabindex: only the focused item has tabindex 0
|
|
60
59
|
this.tabIndex = computed(() => this.parent.isFocusedItem(this) ? 0 : -1, ...(ngDevMode ? [{ debugName: "tabIndex" }] : []));
|
|
@@ -70,38 +69,22 @@ class BsTreeviewItemComponent {
|
|
|
70
69
|
onClick(ev) {
|
|
71
70
|
// Set this item as focused when clicked
|
|
72
71
|
this.parent.setFocusedItem(this);
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
const childTree = this.childTree();
|
|
73
|
+
if (childTree) {
|
|
74
|
+
childTree.isExpanded.update(v => !v);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
78
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTreeviewItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
78
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: BsTreeviewItemComponent, isStandalone: true, selector: "bs-treeview-item", queries: [{ propertyName: "childTree", first: true, predicate: BsTreeviewComponent, isSignal: true }], ngImport: i0, template: "<bs-list-group-item (click)=\"onClick($event)\"\n class=\"d-block cursor-pointer list-group-item-action\"\n role=\"treeitem\"\n [attr.aria-expanded]=\"childTree() ? childTree()!.isExpanded() : null\"\n [attr.tabindex]=\"tabIndex()\">\n <span [style.padding-left.px]=\"parent.indentation()\">\n <span [innerHTML]=\"chevronRight()\" [class.open]=\"childTree()?.isExpanded()\" [class.invisible]=\"!childTree()\" class=\"d-inline-block me-2\" aria-hidden=\"true\"></span>\n <ng-content></ng-content>\n </span>\n</bs-list-group-item>\n<ng-content select=\"bs-treeview\"></ng-content>\n", styles: ["bs-list-group-item{margin-bottom:-1px}bs-icon{transition:transform .2s}bs-icon.open{transform:rotate(90deg)}\n"], dependencies: [{ kind: "component", type: BsListGroupItemComponent, selector: "bs-list-group-item" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
79
79
|
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTreeviewItemComponent, decorators: [{
|
|
81
81
|
type: Component,
|
|
82
|
-
args: [{ selector: 'bs-treeview-item',
|
|
83
|
-
}], ctorParameters: () => [], propDecorators: { childTree: [{
|
|
84
|
-
type: ContentChild,
|
|
85
|
-
args: [BsTreeviewComponent, { descendants: false }]
|
|
86
|
-
}] } });
|
|
87
|
-
|
|
88
|
-
class BsTreeviewModule {
|
|
89
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsTreeviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
90
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsTreeviewModule, declarations: [BsTreeviewComponent, BsTreeviewItemComponent], imports: [CommonModule, BsListGroupModule], exports: [BsTreeviewComponent, BsTreeviewItemComponent] }); }
|
|
91
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsTreeviewModule, imports: [CommonModule, BsListGroupModule] }); }
|
|
92
|
-
}
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsTreeviewModule, decorators: [{
|
|
94
|
-
type: NgModule,
|
|
95
|
-
args: [{
|
|
96
|
-
declarations: [BsTreeviewComponent, BsTreeviewItemComponent],
|
|
97
|
-
imports: [CommonModule, BsListGroupModule],
|
|
98
|
-
exports: [BsTreeviewComponent, BsTreeviewItemComponent],
|
|
99
|
-
}]
|
|
100
|
-
}] });
|
|
82
|
+
args: [{ selector: 'bs-treeview-item', imports: [BsListGroupItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<bs-list-group-item (click)=\"onClick($event)\"\n class=\"d-block cursor-pointer list-group-item-action\"\n role=\"treeitem\"\n [attr.aria-expanded]=\"childTree() ? childTree()!.isExpanded() : null\"\n [attr.tabindex]=\"tabIndex()\">\n <span [style.padding-left.px]=\"parent.indentation()\">\n <span [innerHTML]=\"chevronRight()\" [class.open]=\"childTree()?.isExpanded()\" [class.invisible]=\"!childTree()\" class=\"d-inline-block me-2\" aria-hidden=\"true\"></span>\n <ng-content></ng-content>\n </span>\n</bs-list-group-item>\n<ng-content select=\"bs-treeview\"></ng-content>\n", styles: ["bs-list-group-item{margin-bottom:-1px}bs-icon{transition:transform .2s}bs-icon.open{transform:rotate(90deg)}\n"] }]
|
|
83
|
+
}], ctorParameters: () => [], propDecorators: { childTree: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeviewComponent), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
101
84
|
|
|
102
85
|
/**
|
|
103
86
|
* Generated bundle index. Do not edit.
|
|
104
87
|
*/
|
|
105
88
|
|
|
106
|
-
export { BsTreeviewComponent, BsTreeviewItemComponent
|
|
89
|
+
export { BsTreeviewComponent, BsTreeviewItemComponent };
|
|
107
90
|
//# sourceMappingURL=mintplayer-ng-bootstrap-treeview.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-treeview.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview/treeview.component.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview/treeview.component.html","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview-item/treeview-item.component.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview-item/treeview-item.component.html","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview.module.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/mintplayer-ng-bootstrap-treeview.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, model, signal } from '@angular/core';\nimport { SlideUpDownAnimation } from '@mintplayer/ng-animations';\nimport type { BsTreeviewItemComponent } from '../treeview-item/treeview-item.component';\n\n@Component({\n selector: 'bs-treeview',\n templateUrl: './treeview.component.html',\n styleUrls: ['./treeview.component.scss'],\n standalone: false,\n animations: [SlideUpDownAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTreeviewComponent {\n\n private parent = inject(BsTreeviewComponent, { skipSelf: true, optional: true });\n\n level = computed<number>((): number => !this.parent ? 0 : this.parent.level() + 1);\n indentation = computed(() => this.level() * 30);\n isExpanded = model<boolean>(!this.parent);\n\n // Roving tabindex: track which item is focused\n private items = signal<BsTreeviewItemComponent[]>([]);\n focusedItem = signal<BsTreeviewItemComponent | null>(null);\n\n private getRootTree(): BsTreeviewComponent {\n return this.parent ? this.parent.getRootTree() : this;\n }\n\n registerItem(item: BsTreeviewItemComponent) {\n const root = this.getRootTree();\n root.items.update((items: BsTreeviewItemComponent[]) => [...items, item]);\n // First item gets focus by default\n if (root.focusedItem() === null) {\n root.focusedItem.set(item);\n }\n }\n\n unregisterItem(item: BsTreeviewItemComponent) {\n const root = this.getRootTree();\n root.items.update((items: BsTreeviewItemComponent[]) => items.filter(i => i !== item));\n if (root.focusedItem() === item) {\n const remaining = root.items();\n root.focusedItem.set(remaining.length > 0 ? remaining[0] : null);\n }\n }\n\n setFocusedItem(item: BsTreeviewItemComponent) {\n this.getRootTree().focusedItem.set(item);\n }\n\n isFocusedItem(item: BsTreeviewItemComponent): boolean {\n return this.getRootTree().focusedItem() === item;\n }\n}\n","<bs-list-group [@slideUpDown]=\"isExpanded()\" class=\"d-block overflow-y-hidden\" [attr.role]=\"level() === 0 ? 'tree' : 'group'\">\n <ng-content></ng-content>\n</bs-list-group>\n","/// <reference types=\"../types\" />\n\nimport { ChangeDetectionStrategy, Component, computed, ContentChild, DestroyRef, inject, signal } from '@angular/core';\nimport { BsTreeviewComponent } from '../treeview/treeview.component';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Component({\n selector: 'bs-treeview-item',\n templateUrl: './treeview-item.component.html',\n styleUrls: ['./treeview-item.component.scss'],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTreeviewItemComponent {\n\n readonly parent = inject(BsTreeviewComponent);\n private sanitizer = inject(DomSanitizer);\n private destroyRef = inject(DestroyRef);\n\n @ContentChild(BsTreeviewComponent, { descendants: false }) childTree?: BsTreeviewComponent;\n chevronRight = signal<SafeHtml | undefined>(undefined);\n\n // Roving tabindex: only the focused item has tabindex 0\n tabIndex = computed(() => this.parent.isFocusedItem(this) ? 0 : -1);\n\n constructor() {\n import('bootstrap-icons/icons/chevron-right.svg').then((icon) => {\n this.chevronRight.set(this.sanitizer.bypassSecurityTrustHtml(icon.default));\n });\n\n // Register this item with the tree\n this.parent.registerItem(this);\n this.destroyRef.onDestroy(() => {\n this.parent.unregisterItem(this);\n });\n }\n\n onClick(ev: MouseEvent) {\n // Set this item as focused when clicked\n this.parent.setFocusedItem(this);\n\n if (this.childTree) {\n this.childTree.isExpanded.update(v => !v);\n }\n }\n}\n","<bs-list-group-item (click)=\"onClick($event)\"\n class=\"d-block cursor-pointer list-group-item-action\"\n role=\"treeitem\"\n [attr.aria-expanded]=\"childTree ? childTree.isExpanded() : null\"\n [attr.tabindex]=\"tabIndex()\">\n <span [style.padding-left.px]=\"parent.indentation()\">\n <span [innerHTML]=\"chevronRight()\" [class.open]=\"childTree?.isExpanded()\" [class.invisible]=\"!childTree\" class=\"d-inline-block me-2\" aria-hidden=\"true\"></span>\n <ng-content></ng-content>\n </span>\n</bs-list-group-item>\n<ng-content select=\"bs-treeview\"></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BsListGroupModule } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsTreeviewComponent } from './treeview/treeview.component';\nimport { BsTreeviewItemComponent } from './treeview-item/treeview-item.component';\n\n@NgModule({\n declarations: [BsTreeviewComponent, BsTreeviewItemComponent],\n imports: [CommonModule, BsListGroupModule],\n exports: [BsTreeviewComponent, BsTreeviewItemComponent],\n})\nexport class BsTreeviewModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYa,mBAAmB,CAAA;AARhC,IAAA,WAAA,GAAA;AAUU,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAEhF,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAS,MAAc,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAClF,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,uDAAC;QAC/C,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,CA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kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;AAC5D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;AAC1C,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;AACxD,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-treeview.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview/treeview.component.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview/treeview.component.html","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview-item/treeview-item.component.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview-item/treeview-item.component.html","../../../../libs/mintplayer-ng-bootstrap/treeview/mintplayer-ng-bootstrap-treeview.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, model, signal } from '@angular/core';\nimport { SlideUpDownAnimation } from '@mintplayer/ng-animations';\nimport { BsListGroupComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport type { BsTreeviewItemComponent } from '../treeview-item/treeview-item.component';\n\n@Component({\n selector: 'bs-treeview',\n templateUrl: './treeview.component.html',\n styleUrls: ['./treeview.component.scss'],\n imports: [BsListGroupComponent],\n animations: [SlideUpDownAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTreeviewComponent {\n\n private parent = inject(BsTreeviewComponent, { skipSelf: true, optional: true });\n\n level = computed<number>((): number => !this.parent ? 0 : this.parent.level() + 1);\n indentation = computed(() => this.level() * 30);\n isExpanded = model<boolean>(!this.parent);\n\n // Roving tabindex: track which item is focused\n private items = signal<BsTreeviewItemComponent[]>([]);\n focusedItem = signal<BsTreeviewItemComponent | null>(null);\n\n private getRootTree(): BsTreeviewComponent {\n return this.parent ? this.parent.getRootTree() : this;\n }\n\n registerItem(item: BsTreeviewItemComponent) {\n const root = this.getRootTree();\n root.items.update((items: BsTreeviewItemComponent[]) => [...items, item]);\n // First item gets focus by default\n if (root.focusedItem() === null) {\n root.focusedItem.set(item);\n }\n }\n\n unregisterItem(item: BsTreeviewItemComponent) {\n const root = this.getRootTree();\n root.items.update((items: BsTreeviewItemComponent[]) => items.filter(i => i !== item));\n if (root.focusedItem() === item) {\n const remaining = root.items();\n root.focusedItem.set(remaining.length > 0 ? remaining[0] : null);\n }\n }\n\n setFocusedItem(item: BsTreeviewItemComponent) {\n this.getRootTree().focusedItem.set(item);\n }\n\n isFocusedItem(item: BsTreeviewItemComponent): boolean {\n return this.getRootTree().focusedItem() === item;\n }\n}\n","<bs-list-group [@slideUpDown]=\"isExpanded()\" class=\"d-block overflow-y-hidden\" [attr.role]=\"level() === 0 ? 'tree' : 'group'\">\n <ng-content></ng-content>\n</bs-list-group>\n","/// <reference types=\"../types\" />\n\nimport { ChangeDetectionStrategy, Component, computed, contentChild, DestroyRef, inject, signal } from '@angular/core';\nimport { BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsTreeviewComponent } from '../treeview/treeview.component';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Component({\n selector: 'bs-treeview-item',\n templateUrl: './treeview-item.component.html',\n styleUrls: ['./treeview-item.component.scss'],\n imports: [BsListGroupItemComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTreeviewItemComponent {\n\n readonly parent = inject(BsTreeviewComponent);\n private sanitizer = inject(DomSanitizer);\n private destroyRef = inject(DestroyRef);\n\n readonly childTree = contentChild(BsTreeviewComponent, { descendants: false });\n chevronRight = signal<SafeHtml | undefined>(undefined);\n\n // Roving tabindex: only the focused item has tabindex 0\n tabIndex = computed(() => this.parent.isFocusedItem(this) ? 0 : -1);\n\n constructor() {\n import('bootstrap-icons/icons/chevron-right.svg').then((icon) => {\n this.chevronRight.set(this.sanitizer.bypassSecurityTrustHtml(icon.default));\n });\n\n // Register this item with the tree\n this.parent.registerItem(this);\n this.destroyRef.onDestroy(() => {\n this.parent.unregisterItem(this);\n });\n }\n\n onClick(ev: MouseEvent) {\n // Set this item as focused when clicked\n this.parent.setFocusedItem(this);\n\n const childTree = this.childTree();\n if (childTree) {\n childTree.isExpanded.update(v => !v);\n }\n }\n}\n","<bs-list-group-item (click)=\"onClick($event)\"\n class=\"d-block cursor-pointer list-group-item-action\"\n role=\"treeitem\"\n [attr.aria-expanded]=\"childTree() ? childTree()!.isExpanded() : null\"\n [attr.tabindex]=\"tabIndex()\">\n <span [style.padding-left.px]=\"parent.indentation()\">\n <span [innerHTML]=\"chevronRight()\" [class.open]=\"childTree()?.isExpanded()\" [class.invisible]=\"!childTree()\" class=\"d-inline-block me-2\" aria-hidden=\"true\"></span>\n <ng-content></ng-content>\n </span>\n</bs-list-group-item>\n<ng-content select=\"bs-treeview\"></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAaa,mBAAmB,CAAA;AARhC,IAAA,WAAA,GAAA;AAUU,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAEhF,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAS,MAAc,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAClF,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,uDAAC;QAC/C,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,CAAC,IAAI,CAAC,MAAM,sDAAC;;AAGjC,QAAA,IAAA,CAAA,KAAK,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EAAA,SAAA,EAMA,mBAAmB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpBvD,smBAWA,wKDAY,wBAAwB,EAAA,QAAA,EAAA,oBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,WAGnB,CAAC,wBAAwB,CAAC,EAAA,eAAA,EAClB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,smBAAA,EAAA,MAAA,EAAA,CAAA,gHAAA,CAAA,EAAA;AAQb,SAAA,CAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,mBAAmB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpB/E;;AAEG;;;;"}
|
|
@@ -9,14 +9,13 @@ class BsTrustHtmlPipe {
|
|
|
9
9
|
transform(value) {
|
|
10
10
|
return this.sanitizer.bypassSecurityTrustHtml(value);
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
13
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTrustHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
13
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.6", ngImport: i0, type: BsTrustHtmlPipe, isStandalone: true, name: "bsTrustHtml" }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTrustHtmlPipe, decorators: [{
|
|
16
16
|
type: Pipe,
|
|
17
17
|
args: [{
|
|
18
18
|
name: 'bsTrustHtml',
|
|
19
|
-
standalone: true,
|
|
20
19
|
pure: true,
|
|
21
20
|
}]
|
|
22
21
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-trust-html.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/trust-html/src/trust-html.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/trust-html/mintplayer-ng-bootstrap-trust-html.ts"],"sourcesContent":["import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({\n name: 'bsTrustHtml',\n
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-trust-html.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/trust-html/src/trust-html.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/trust-html/mintplayer-ng-bootstrap-trust-html.ts"],"sourcesContent":["import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({\n name: 'bsTrustHtml',\n pure: true,\n})\nexport class BsTrustHtmlPipe implements PipeTransform {\n private sanitizer = inject(DomSanitizer);\n\n transform(value: string) {\n return this.sanitizer.bypassSecurityTrustHtml(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,eAAe,CAAA;AAJ5B,IAAA,WAAA,GAAA;AAKU,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AAKzC,IAAA;AAHC,IAAA,SAAS,CAAC,KAAa,EAAA;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,KAAK,CAAC;IACtD;8GALW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,aAAa;AACnB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { model, input, signal, computed, viewChild, output, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { BsDropdownMenuModule } from '@mintplayer/ng-bootstrap/dropdown-menu';
|
|
9
|
-
import * as i2 from '@mintplayer/ng-bootstrap/form';
|
|
10
|
-
import { BsFormModule } from '@mintplayer/ng-bootstrap/form';
|
|
11
|
-
import * as i4 from '@mintplayer/ng-bootstrap/has-overlay';
|
|
5
|
+
import { BsDropdownDirective, BsDropdownMenuDirective } from '@mintplayer/ng-bootstrap/dropdown';
|
|
6
|
+
import { BsDropdownMenuComponent, BsDropdownItemComponent } from '@mintplayer/ng-bootstrap/dropdown-menu';
|
|
7
|
+
import { BsFormComponent, BsFormControlDirective } from '@mintplayer/ng-bootstrap/form';
|
|
12
8
|
import { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';
|
|
13
|
-
import
|
|
14
|
-
import { BsProgressBarModule } from '@mintplayer/ng-bootstrap/progress-bar';
|
|
9
|
+
import { BsProgressComponent } from '@mintplayer/ng-bootstrap/progress-bar';
|
|
15
10
|
|
|
16
11
|
let typeaheadIdCounter = 0;
|
|
17
12
|
class BsTypeaheadComponent {
|
|
18
13
|
constructor() {
|
|
19
|
-
this.isOpen =
|
|
14
|
+
this.isOpen = model(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
20
15
|
this.listboxId = `typeahead-listbox-${typeaheadIdCounter++}`;
|
|
21
16
|
this.suggestions = input([], ...(ngDevMode ? [{ debugName: "suggestions" }] : []));
|
|
22
17
|
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
23
18
|
this.showNoSuggestions = computed(() => this.suggestions().length === 0, ...(ngDevMode ? [{ debugName: "showNoSuggestions" }] : []));
|
|
19
|
+
this.textbox = viewChild.required('textbox');
|
|
24
20
|
this.searchterm = model('', ...(ngDevMode ? [{ debugName: "searchterm" }] : []));
|
|
25
21
|
this.isLoadingText = input('Loading...', ...(ngDevMode ? [{ debugName: "isLoadingText" }] : []));
|
|
26
22
|
this.noSuggestionsText = input('No suggestions found', ...(ngDevMode ? [{ debugName: "noSuggestionsText" }] : []));
|
|
@@ -55,18 +51,15 @@ class BsTypeaheadComponent {
|
|
|
55
51
|
this.submitted.emit(this.searchterm());
|
|
56
52
|
}
|
|
57
53
|
focus() {
|
|
58
|
-
this.textbox.nativeElement.focus();
|
|
54
|
+
this.textbox().nativeElement.focus();
|
|
59
55
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: BsTypeaheadComponent, isStandalone: true, selector: "bs-typeahead", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, searchterm: { classPropertyName: "searchterm", publicName: "searchterm", isSignal: true, isRequired: false, transformFunction: null }, isLoadingText: { classPropertyName: "isLoadingText", publicName: "isLoadingText", isSignal: true, isRequired: false, transformFunction: null }, noSuggestionsText: { classPropertyName: "noSuggestionsText", publicName: "noSuggestionsText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", searchterm: "searchtermChange", provideSuggestions: "provideSuggestions", suggestionSelected: "suggestionSelected", submitted: "submitted" }, viewQueries: [{ propertyName: "textbox", first: true, predicate: ["textbox"], descendants: true, isSignal: true }], ngImport: i0, template: "<bs-has-overlay></bs-has-overlay>\n<bs-form>\n <div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\" role=\"combobox\" [attr.aria-expanded]=\"isOpen()\">\n <input type=\"text\"\n #textbox\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (keyup.enter)=\"onSubmit()\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n autocomplete=\"off\" />\n <bs-dropdown-menu *bsDropdownMenu role=\"listbox\" [id]=\"listboxId\">\n @if (isLoading()) {\n <bs-progress [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <bs-dropdown-item [disabled]=\"true\" role=\"option\" aria-disabled=\"true\">\n {{ isLoadingText() }}\n </bs-dropdown-item>\n }\n @if (!isLoading()) {\n @if (showNoSuggestions()) {\n <bs-dropdown-item [disabled]=\"true\" role=\"option\" aria-disabled=\"true\">\n {{ noSuggestionsText() }}\n </bs-dropdown-item>\n }\n @for (suggestion of suggestions(); track suggestion) {\n <bs-dropdown-item (click)=\"suggestionClicked(suggestion)\" role=\"option\">\n {{ suggestion.text }}\n </bs-dropdown-item>\n }\n }\n </bs-dropdown-menu>\n </div>\n</bs-form>\n", styles: ["bs-progress{margin-top:-8px;margin-bottom:6px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BsFormComponent, selector: "bs-form", inputs: ["action", "method"], outputs: ["submitted"] }, { kind: "directive", type: BsFormControlDirective, selector: "bs-form input:not(.no-form-control), bs-form textarea:not(.no-form-control)" }, { kind: "directive", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "sameDropdownWidth", "isOpen"], outputs: ["isOpenChange"] }, { kind: "directive", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { kind: "component", type: BsDropdownMenuComponent, selector: "bs-dropdown-menu", inputs: ["maxHeight"] }, { kind: "component", type: BsDropdownItemComponent, selector: "bs-dropdown-item", inputs: ["isSelected", "disabled"] }, { kind: "component", type: BsProgressComponent, selector: "bs-progress", inputs: ["height", "isIndeterminate"] }, { kind: "component", type: BsHasOverlayComponent, selector: "bs-has-overlay" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
62
58
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTypeaheadComponent, decorators: [{
|
|
64
60
|
type: Component,
|
|
65
|
-
args: [{ selector: 'bs-typeahead',
|
|
66
|
-
}], ctorParameters: () => [], propDecorators: { suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], textbox: [{
|
|
67
|
-
type: ViewChild,
|
|
68
|
-
args: ['textbox']
|
|
69
|
-
}], searchterm: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchterm", required: false }] }, { type: i0.Output, args: ["searchtermChange"] }], isLoadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoadingText", required: false }] }], noSuggestionsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noSuggestionsText", required: false }] }], provideSuggestions: [{ type: i0.Output, args: ["provideSuggestions"] }], suggestionSelected: [{ type: i0.Output, args: ["suggestionSelected"] }], submitted: [{ type: i0.Output, args: ["submitted"] }] } });
|
|
61
|
+
args: [{ selector: 'bs-typeahead', imports: [FormsModule, BsFormComponent, BsFormControlDirective, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownMenuComponent, BsDropdownItemComponent, BsProgressComponent, BsHasOverlayComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<bs-has-overlay></bs-has-overlay>\n<bs-form>\n <div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\" role=\"combobox\" [attr.aria-expanded]=\"isOpen()\">\n <input type=\"text\"\n #textbox\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (keyup.enter)=\"onSubmit()\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n autocomplete=\"off\" />\n <bs-dropdown-menu *bsDropdownMenu role=\"listbox\" [id]=\"listboxId\">\n @if (isLoading()) {\n <bs-progress [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <bs-dropdown-item [disabled]=\"true\" role=\"option\" aria-disabled=\"true\">\n {{ isLoadingText() }}\n </bs-dropdown-item>\n }\n @if (!isLoading()) {\n @if (showNoSuggestions()) {\n <bs-dropdown-item [disabled]=\"true\" role=\"option\" aria-disabled=\"true\">\n {{ noSuggestionsText() }}\n </bs-dropdown-item>\n }\n @for (suggestion of suggestions(); track suggestion) {\n <bs-dropdown-item (click)=\"suggestionClicked(suggestion)\" role=\"option\">\n {{ suggestion.text }}\n </bs-dropdown-item>\n }\n }\n </bs-dropdown-menu>\n </div>\n</bs-form>\n", styles: ["bs-progress{margin-top:-8px;margin-bottom:6px}\n"] }]
|
|
62
|
+
}], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], textbox: [{ type: i0.ViewChild, args: ['textbox', { isSignal: true }] }], searchterm: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchterm", required: false }] }, { type: i0.Output, args: ["searchtermChange"] }], isLoadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoadingText", required: false }] }], noSuggestionsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noSuggestionsText", required: false }] }], provideSuggestions: [{ type: i0.Output, args: ["provideSuggestions"] }], suggestionSelected: [{ type: i0.Output, args: ["suggestionSelected"] }], submitted: [{ type: i0.Output, args: ["submitted"] }] } });
|
|
70
63
|
|
|
71
64
|
/**
|
|
72
65
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-typeahead.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, input, model, output, signal,
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-typeahead.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, input, model, output, signal, viewChild } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { BsDropdownDirective, BsDropdownMenuDirective } from '@mintplayer/ng-bootstrap/dropdown';\nimport { BsDropdownMenuComponent, BsDropdownItemComponent } from '@mintplayer/ng-bootstrap/dropdown-menu';\nimport { BsFormComponent, BsFormControlDirective } from '@mintplayer/ng-bootstrap/form';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { BsProgressComponent } from '@mintplayer/ng-bootstrap/progress-bar';\n\nlet typeaheadIdCounter = 0;\n\n@Component({\n selector: 'bs-typeahead',\n templateUrl: './typeahead.component.html',\n styleUrls: ['./typeahead.component.scss'],\n imports: [FormsModule, BsFormComponent, BsFormControlDirective, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownMenuComponent, BsDropdownItemComponent, BsProgressComponent, BsHasOverlayComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTypeaheadComponent {\n\n isOpen = model(false);\n listboxId = `typeahead-listbox-${typeaheadIdCounter++}`;\n\n suggestions = input<any[]>([]);\n isLoading = signal<boolean>(false);\n showNoSuggestions = computed(() => this.suggestions().length === 0);\n\n readonly textbox = viewChild.required<ElementRef<HTMLInputElement>>('textbox');\n searchterm = model('');\n isLoadingText = input('Loading...');\n noSuggestionsText = input('No suggestions found');\n provideSuggestions = output<string>();\n suggestionSelected = output<any>();\n submitted = output<string>();\n\n constructor() {\n effect(() => {\n const suggestions = this.suggestions();\n if (suggestions) {\n this.isLoading.set(false);\n }\n });\n }\n\n onProvideSuggestions(value: string) {\n this.searchterm.set(value);\n if (value === '') {\n this.isOpen.set(false);\n } else {\n this.isLoading.set(true);\n this.isOpen.set(true);\n this.provideSuggestions.emit(value);\n }\n }\n\n suggestionClicked(suggestion: any) {\n this.searchterm.set(suggestion.text);\n this.isOpen.set(false);\n this.suggestionSelected.emit(suggestion);\n }\n\n onSubmit() {\n this.isOpen.set(false);\n this.submitted.emit(this.searchterm());\n }\n\n public focus() {\n this.textbox().nativeElement.focus();\n }\n}\n","<bs-has-overlay></bs-has-overlay>\n<bs-form>\n <div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\" role=\"combobox\" [attr.aria-expanded]=\"isOpen()\">\n <input type=\"text\"\n #textbox\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (keyup.enter)=\"onSubmit()\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n autocomplete=\"off\" />\n <bs-dropdown-menu *bsDropdownMenu role=\"listbox\" [id]=\"listboxId\">\n @if (isLoading()) {\n <bs-progress [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <bs-dropdown-item [disabled]=\"true\" role=\"option\" aria-disabled=\"true\">\n {{ isLoadingText() }}\n </bs-dropdown-item>\n }\n @if (!isLoading()) {\n @if (showNoSuggestions()) {\n <bs-dropdown-item [disabled]=\"true\" role=\"option\" aria-disabled=\"true\">\n {{ noSuggestionsText() }}\n </bs-dropdown-item>\n }\n @for (suggestion of suggestions(); track suggestion) {\n <bs-dropdown-item (click)=\"suggestionClicked(suggestion)\" role=\"option\">\n {{ suggestion.text }}\n </bs-dropdown-item>\n }\n }\n </bs-dropdown-menu>\n </div>\n</bs-form>\n","/**\n * Generated bundle index.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EAAA,EAAA,CAAA;;AE1B/E;;AAEG;;;;"}
|
|
@@ -5,14 +5,13 @@ class BsUcFirstPipe {
|
|
|
5
5
|
transform(value, ...args) {
|
|
6
6
|
return value[0].toUpperCase() + value.slice(1);
|
|
7
7
|
}
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
9
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsUcFirstPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.6", ngImport: i0, type: BsUcFirstPipe, isStandalone: true, name: "bsUcFirst" }); }
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsUcFirstPipe, decorators: [{
|
|
12
12
|
type: Pipe,
|
|
13
13
|
args: [{
|
|
14
14
|
name: 'bsUcFirst',
|
|
15
|
-
standalone: true,
|
|
16
15
|
pure: true,
|
|
17
16
|
}]
|
|
18
17
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-uc-first.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/uc-first/src/uc-first.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/uc-first/mintplayer-ng-bootstrap-uc-first.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsUcFirst',\n
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-uc-first.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/uc-first/src/uc-first.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/uc-first/mintplayer-ng-bootstrap-uc-first.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsUcFirst',\n pure: true,\n})\nexport class BsUcFirstPipe implements PipeTransform {\n transform(value: string, ...args: any[]) {\n return value[0].toUpperCase() + value.slice(1);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,aAAa,CAAA;AACxB,IAAA,SAAS,CAAC,KAAa,EAAE,GAAG,IAAW,EAAA;AACrC,QAAA,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD;8GAHW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,WAAW;AACjB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isPlatformServer } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { inject, PLATFORM_ID, output, Directive } from '@angular/core';
|
|
4
4
|
|
|
5
5
|
class BsUserAgentDirective {
|
|
6
|
-
constructor(
|
|
7
|
-
this.platformId =
|
|
8
|
-
this.detected =
|
|
6
|
+
constructor() {
|
|
7
|
+
this.platformId = inject(PLATFORM_ID);
|
|
8
|
+
this.detected = output();
|
|
9
9
|
}
|
|
10
10
|
get isAndroid() {
|
|
11
11
|
return !isPlatformServer(this.platformId) && !!navigator && !!navigator.userAgent.match(/Android/i);
|
|
@@ -70,33 +70,21 @@ class BsUserAgentDirective {
|
|
|
70
70
|
this.detected.emit({ os, webbrowser });
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
74
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsUserAgentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
74
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: BsUserAgentDirective, isStandalone: true, selector: "[bsUserAgent]", outputs: { detected: "detected" }, host: { properties: { "class.os-android": "isAndroid", "class.os-ios": "isIos", "class.os-windows": "isWindows", "class": "browserClass" } }, ngImport: i0 }); }
|
|
75
75
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsUserAgentDirective, decorators: [{
|
|
77
77
|
type: Directive,
|
|
78
78
|
args: [{
|
|
79
79
|
selector: '[bsUserAgent]',
|
|
80
|
-
|
|
80
|
+
host: {
|
|
81
|
+
'[class.os-android]': 'isAndroid',
|
|
82
|
+
'[class.os-ios]': 'isIos',
|
|
83
|
+
'[class.os-windows]': 'isWindows',
|
|
84
|
+
'[class]': 'browserClass',
|
|
85
|
+
},
|
|
81
86
|
}]
|
|
82
|
-
}],
|
|
83
|
-
type: Inject,
|
|
84
|
-
args: [PLATFORM_ID]
|
|
85
|
-
}] }], propDecorators: { isAndroid: [{
|
|
86
|
-
type: HostBinding,
|
|
87
|
-
args: ['class.os-android']
|
|
88
|
-
}], isIos: [{
|
|
89
|
-
type: HostBinding,
|
|
90
|
-
args: ['class.os-ios']
|
|
91
|
-
}], isWindows: [{
|
|
92
|
-
type: HostBinding,
|
|
93
|
-
args: ['class.os-windows']
|
|
94
|
-
}], browserClass: [{
|
|
95
|
-
type: HostBinding,
|
|
96
|
-
args: ['class']
|
|
97
|
-
}], detected: [{
|
|
98
|
-
type: Output
|
|
99
|
-
}] } });
|
|
87
|
+
}], propDecorators: { detected: [{ type: i0.Output, args: ["detected"] }] } });
|
|
100
88
|
|
|
101
89
|
/**
|
|
102
90
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-user-agent.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/user-agent/src/directive/user-agent.directive.ts","../../../../libs/mintplayer-ng-bootstrap/user-agent/mintplayer-ng-bootstrap-user-agent.ts"],"sourcesContent":["import { isPlatformServer } from '@angular/common';\nimport { AfterViewInit, Directive,
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-user-agent.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/user-agent/src/directive/user-agent.directive.ts","../../../../libs/mintplayer-ng-bootstrap/user-agent/mintplayer-ng-bootstrap-user-agent.ts"],"sourcesContent":["import { isPlatformServer } from '@angular/common';\nimport { AfterViewInit, Directive, inject, output, PLATFORM_ID } from '@angular/core';\nimport { BsUserAgent } from '../interfaces/user-agent';\nimport { BsOperatingSystem } from '../types/operating-system.type';\nimport { BsWebbrowser } from '../types/webbrowser.type';\n\n@Directive({\n selector: '[bsUserAgent]',\n host: {\n '[class.os-android]': 'isAndroid',\n '[class.os-ios]': 'isIos',\n '[class.os-windows]': 'isWindows',\n '[class]': 'browserClass',\n },\n})\nexport class BsUserAgentDirective implements AfterViewInit {\n private platformId = inject(PLATFORM_ID);\n\n get isAndroid() {\n return !isPlatformServer(this.platformId) && !!navigator && !!navigator.userAgent.match(/Android/i);\n }\n\n get isIos() {\n return !isPlatformServer(this.platformId) && !!navigator && !!navigator.userAgent.match(/iPhone|iPad|iPod/i);\n }\n\n get isWindows() {\n return !isPlatformServer(this.platformId) && !!navigator && !!navigator.userAgent.match(/Windows/i);\n }\n\n get browserClass() {\n const browser = this.getBrowser();\n if (!browser) {\n return null;\n } else {\n return `browser-${browser.toLowerCase()}`;\n }\n }\n\n private getBrowser(): BsWebbrowser | undefined {\n if (!isPlatformServer(this.platformId) && !!navigator) {\n const userAgent = navigator.userAgent;\n if(userAgent.match(/opr\\//i)) {\n return 'Opera';\n } else if(userAgent.match(/edg/i)) {\n return 'Edge';\n } else if (userAgent.match(/chrome|chromium|crios/i)) {\n return 'Chrome';\n } else if(userAgent.match(/firefox|fxios/i)) {\n return 'Firefox';\n } else if(userAgent.match(/safari/i)) {\n return 'Safari';\n } else {\n return undefined;\n }\n } else {\n return undefined;\n }\n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n let os: BsOperatingSystem | undefined;\n let webbrowser = this.getBrowser();\n\n if (this.isAndroid) {\n os = 'Android';\n } else if (this.isIos) {\n os = 'iOS';\n } else if (this.isWindows) {\n os = 'Windows';\n } else {\n os = undefined;\n }\n\n this.detected.emit({ os, webbrowser });\n });\n }\n\n readonly detected = output<BsUserAgent>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAea,oBAAoB,CAAA;AATjC,IAAA,WAAA,GAAA;AAUU,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QA+D/B,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAe;AAC1C,IAAA;AA9DC,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC;IACrG;AAEA,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,CAAC,gBAAgB,CAAC,I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+1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, PLATFORM_ID,
|
|
2
|
+
import { inject, ElementRef, PLATFORM_ID, output, Directive } from '@angular/core';
|
|
3
3
|
import { isPlatformServer } from '@angular/common';
|
|
4
4
|
|
|
5
5
|
class BsInViewportDirective {
|
|
@@ -8,7 +8,7 @@ class BsInViewportDirective {
|
|
|
8
8
|
this.platformId = inject(PLATFORM_ID);
|
|
9
9
|
this.observer = null;
|
|
10
10
|
this.isDestroyed = false;
|
|
11
|
-
this.bsInViewport =
|
|
11
|
+
this.bsInViewport = output();
|
|
12
12
|
}
|
|
13
13
|
ngAfterViewInit() {
|
|
14
14
|
if (isPlatformServer(this.platformId)) {
|
|
@@ -30,18 +30,15 @@ class BsInViewportDirective {
|
|
|
30
30
|
this.observer = null;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
34
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsInViewportDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
34
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: BsInViewportDirective, isStandalone: true, selector: "[bsInViewport]", outputs: { bsInViewport: "bsInViewport" }, ngImport: i0 }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsInViewportDirective, decorators: [{
|
|
37
37
|
type: Directive,
|
|
38
38
|
args: [{
|
|
39
39
|
selector: '[bsInViewport]',
|
|
40
|
-
standalone: true,
|
|
41
40
|
}]
|
|
42
|
-
}], propDecorators: { bsInViewport: [{
|
|
43
|
-
type: Output
|
|
44
|
-
}] } });
|
|
41
|
+
}], propDecorators: { bsInViewport: [{ type: i0.Output, args: ["bsInViewport"] }] } });
|
|
45
42
|
|
|
46
43
|
/**
|
|
47
44
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-viewport.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/viewport/src/viewport/viewport.directive.ts","../../../../libs/mintplayer-ng-bootstrap/viewport/mintplayer-ng-bootstrap-viewport.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef,
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-viewport.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/viewport/src/viewport/viewport.directive.ts","../../../../libs/mintplayer-ng-bootstrap/viewport/mintplayer-ng-bootstrap-viewport.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef, inject, OnDestroy, output, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\n@Directive({\n selector: '[bsInViewport]',\n})\nexport class BsInViewportDirective implements AfterViewInit, OnDestroy {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly platformId = inject(PLATFORM_ID);\n private observer: IntersectionObserver | null = null;\n private isDestroyed = false;\n\n readonly bsInViewport = output<boolean>();\n\n ngAfterViewInit() {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n this.observer = new IntersectionObserver((entries) => {\n if (!this.isDestroyed) {\n for (const entry of entries) {\n this.bsInViewport.emit(entry.isIntersecting);\n }\n }\n });\n\n this.observer.observe(this.elementRef.nativeElement);\n }\n\n ngOnDestroy() {\n this.isDestroyed = true;\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,qB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