@mintplayer/ng-bootstrap 21.30.0 → 21.31.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-a11y.mjs +455 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +10 -4
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +131 -3
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +80 -48
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +218 -14
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +294 -3
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +163 -18
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +179 -7
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +14 -4
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +14 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +2 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +70 -6
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +5 -4
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +45 -13
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +51 -5
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +5 -3
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +18 -4
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +61 -6
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +19 -4
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +34 -4
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs +59 -0
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +91 -2
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -5
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +28 -5
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +18 -4
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +10 -3
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +143 -29
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +42 -21
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +33 -4
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +17 -7
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +50 -8
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs +34 -12
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs +74 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs +1476 -71
- package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs +194 -2
- package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs.map +1 -1
- package/package.json +14 -2
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +196 -0
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +32 -0
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +56 -3
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +75 -4
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dock.d.ts +51 -0
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +54 -9
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +57 -2
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +4 -1
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-modal.d.ts +25 -1
- package/types/mintplayer-ng-bootstrap-multiselect.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +25 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +23 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +5 -1
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-popover.d.ts +21 -1
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +4 -1
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-range.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-rating.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-reduced-motion.d.ts +36 -0
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +4 -0
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +42 -9
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-searchbox.d.ts +8 -1
- package/types/mintplayer-ng-bootstrap-select.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-select2.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-table.d.ts +8 -1
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +21 -2
- package/types/mintplayer-ng-bootstrap-toast.d.ts +6 -1
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +5 -0
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -1
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +11 -3
- package/types/mintplayer-ng-bootstrap-virtual-datatable.d.ts +14 -1
- package/types/mintplayer-ng-bootstrap-web-components-a11y.d.ts +34 -0
- package/types/mintplayer-ng-bootstrap-web-components-scheduler-core.d.ts +35 -11
- package/types/mintplayer-ng-bootstrap-web-components-scheduler.d.ts +246 -0
- package/types/mintplayer-ng-bootstrap-web-components-splitter.d.ts +95 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-dropdown.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/dropdown/src/dropdown-menu/dropdown-menu.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown/src/dropdown-toggle/dropdown-toggle.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown/src/dropdown/dropdown.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown/mintplayer-ng-bootstrap-dropdown.ts"],"sourcesContent":["import { DestroyRef, Directive, effect, forwardRef, inject, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ClickOutsideDirective } from '@mintplayer/ng-click-outside';\nimport { BS_DEVELOPMENT } from '@mintplayer/ng-bootstrap';\nimport { BsDropdownDirective } from '../dropdown/dropdown.directive';\n\n@Directive({\n selector: '[bsDropdownMenu]',\n host: {\n '(clickOutside)': 'clickedOutside($event)',\n '(document:keydown.escape)': 'onEscape($event)',\n },\n})\nexport class BsDropdownMenuDirective extends ClickOutsideDirective {\n\n private dropdown = inject(forwardRef(() => BsDropdownDirective));\n private viewContainerRef = inject(ViewContainerRef);\n private templateRef = inject(TemplateRef);\n private overlay = inject(Overlay);\n private destroy = inject(DestroyRef);\n private bsDevelopment = inject(BS_DEVELOPMENT, { optional: true });\n\n private wait = false;\n private overlayRef: OverlayRef | null = null;\n private templatePortal: TemplatePortal<any> | null = null;\n\n constructor() {\n super();\n\n effect(() => {\n const isOpen = this.dropdown.isOpen();\n if (isOpen) {\n // Prevent creating duplicate overlays if effect re-runs while still open\n if (this.overlayRef) {\n return;\n }\n\n this.wait = true;\n setTimeout(() => this.wait = false, 100);\n\n this.overlayRef = this.overlay.create({\n hasBackdrop: this.dropdown.hasBackdrop(),\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(!this.dropdown.toggle() ? this.dropdown.elementRef : this.dropdown.toggle()!.toggleButton)\n .withPositions([\n { originX: \"start\", originY: \"bottom\", overlayX: \"start\", overlayY: \"top\", offsetY: 0 },\n { originX: \"start\", originY: \"top\", overlayX: \"start\", overlayY: \"bottom\", offsetY: 0 },\n ]),\n });\n\n if (this.dropdown.hasBackdrop() && this.dropdown.closeOnClickOutside()) {\n this.overlayRef.backdropClick().subscribe(() => {\n this.dropdown.isOpen.set(false);\n });\n }\n\n this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);\n const view = this.overlayRef.attach(this.templatePortal);\n\n if (this.dropdown.sameDropdownWidth()) {\n const width = this.dropdown.elementRef.nativeElement.offsetWidth;\n view.rootNodes[0].style.width = width + 'px';\n }\n } else {\n if (this.overlayRef) {\n this.overlayRef.detach();\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n });\n }\n\n clickedOutside(event: Event) {\n const ev = event as MouseEvent;\n if (!this.bsDevelopment) {\n if (!this.wait) {\n if (this.dropdown.elementRef.nativeElement.contains(ev.target as Node)) {\n return;\n }\n if (!this.overlayRef?.overlayElement.contains(<any>ev.target)) {\n this.doClose();\n }\n }\n }\n }\n\n onEscape(event: Event) {\n this.doClose();\n }\n\n private doClose() {\n const isOpen = this.dropdown.isOpen();\n if (isOpen && !this.dropdown.hasBackdrop() && this.dropdown.closeOnClickOutside()) {\n this.dropdown.isOpen.set(false);\n }\n }\n}\n","import { Directive, ElementRef } from '@angular/core';\nimport { BsDropdownDirective } from '../dropdown/dropdown.directive';\n\n@Directive({\n selector: '[bsDropdownToggle]',\n host: {\n '[attr.aria-haspopup]': '\"true\"',\n '[attr.aria-expanded]': 'dropdown.isOpen()',\n '(click)': 'onClick()',\n },\n})\nexport class BsDropdownToggleDirective {\n\n constructor(\n public dropdown: BsDropdownDirective,\n toggleButton: ElementRef) {\n this.toggleButton = toggleButton;\n }\n\n toggleButton: ElementRef;\n\n onClick() {\n this.dropdown.isOpen.set(!this.dropdown.isOpen());\n }\n}\n","import { contentChild, Directive, effect, ElementRef, inject, input, model, Optional } from '@angular/core';\nimport { BS_DEVELOPMENT } from '@mintplayer/ng-bootstrap';\nimport { BsDropdownMenuDirective } from '../dropdown-menu/dropdown-menu.directive';\nimport { BsDropdownToggleDirective } from '../dropdown-toggle/dropdown-toggle.directive';\n\n@Directive({\n selector: '[bsDropdown]',\n host: {\n '(window:blur)': 'onBlur()',\n },\n})\nexport class BsDropdownDirective {\n\n elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private bsDevelopment = inject(BS_DEVELOPMENT, { optional: true });\n\n readonly menu = contentChild.required(BsDropdownMenuDirective);\n readonly toggle = contentChild(BsDropdownToggleDirective);\n\n hasBackdrop = input(false);\n sameWidth = input(false);\n closeOnClickOutside = input(true);\n sameDropdownWidth = input(false);\n isOpen = model<boolean>(false);\n\n onBlur() {\n if (this.closeOnClickOutside() && !this.bsDevelopment) {\n this.isOpen.set(false);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.BsDropdownDirective"],"mappings":";;;;;;;AAcM,MAAO,uBAAwB,SAAQ,qBAAqB,CAAA;AAahE,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAZD,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,mBAAmB,CAAC,CAAC;AACxD,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC3C,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;QAC5B,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAE1D,IAAA,CAAA,IAAI,GAAG,KAAK;QACZ,IAAA,CAAA,UAAU,GAAsB,IAAI;QACpC,IAAA,CAAA,cAAc,GAA+B,IAAI;QAKvD,MAAM,CAAC,MAAK;YACV,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACrC,IAAI,MAAM,EAAE;;AAEV,gBAAA,IAAI,IAAI,CAAC,UAAU,EAAE;oBACnB;gBACF;AAEA,gBAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,gBAAA,UAAU,CAAC,MAAM,IAAI,CAAC,IA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,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACjB1D;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-dropdown.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/dropdown/src/dropdown-menu/dropdown-menu.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown/src/dropdown-toggle/dropdown-toggle.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown/src/dropdown/dropdown.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown/src/combobox/combobox.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown/mintplayer-ng-bootstrap-dropdown.ts"],"sourcesContent":["import { DestroyRef, Directive, effect, forwardRef, inject, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ClickOutsideDirective } from '@mintplayer/ng-click-outside';\nimport { BS_DEVELOPMENT } from '@mintplayer/ng-bootstrap';\nimport { BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsDropdownDirective } from '../dropdown/dropdown.directive';\n\n@Directive({\n selector: '[bsDropdownMenu]',\n host: {\n '(clickOutside)': 'clickedOutside($event)',\n '(document:keydown.escape)': 'onEscape($event)',\n },\n})\nexport class BsDropdownMenuDirective extends ClickOutsideDirective {\n\n private dropdown = inject(forwardRef(() => BsDropdownDirective));\n private viewContainerRef = inject(ViewContainerRef);\n private templateRef = inject(TemplateRef);\n private overlay = inject(Overlay);\n private destroy = inject(DestroyRef);\n private bsDevelopment = inject(BS_DEVELOPMENT, { optional: true });\n private overlayStack = inject(BsOverlayStackService);\n\n private wait = false;\n private overlayRef: OverlayRef | null = null;\n private templatePortal: TemplatePortal<any> | null = null;\n private stackToken: symbol | null = null;\n\n constructor() {\n super();\n\n effect(() => {\n const isOpen = this.dropdown.isOpen();\n if (isOpen && this.stackToken === null) {\n this.stackToken = this.overlayStack.push();\n } else if (!isOpen && this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n\n if (isOpen) {\n // Prevent creating duplicate overlays if effect re-runs while still open\n if (this.overlayRef) {\n return;\n }\n\n this.wait = true;\n setTimeout(() => this.wait = false, 100);\n\n this.overlayRef = this.overlay.create({\n hasBackdrop: this.dropdown.hasBackdrop(),\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(!this.dropdown.toggle() ? this.dropdown.elementRef : this.dropdown.toggle()!.toggleButton)\n .withPositions([\n { originX: \"start\", originY: \"bottom\", overlayX: \"start\", overlayY: \"top\", offsetY: 0 },\n { originX: \"start\", originY: \"top\", overlayX: \"start\", overlayY: \"bottom\", offsetY: 0 },\n ]),\n });\n\n if (this.dropdown.hasBackdrop() && this.dropdown.closeOnClickOutside()) {\n this.overlayRef.backdropClick().subscribe(() => {\n this.dropdown.isOpen.set(false);\n });\n }\n\n this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);\n const view = this.overlayRef.attach(this.templatePortal);\n\n if (this.dropdown.sameDropdownWidth()) {\n const width = this.dropdown.elementRef.nativeElement.offsetWidth;\n view.rootNodes[0].style.width = width + 'px';\n }\n } else {\n if (this.overlayRef) {\n this.overlayRef.detach();\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n });\n }\n\n clickedOutside(event: Event) {\n const ev = event as MouseEvent;\n if (!this.bsDevelopment) {\n if (!this.wait) {\n if (this.dropdown.elementRef.nativeElement.contains(ev.target as Node)) {\n return;\n }\n if (!this.overlayRef?.overlayElement.contains(<any>ev.target)) {\n this.doClose();\n }\n }\n }\n }\n\n onEscape(event: Event) {\n if (this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {\n this.doClose();\n }\n }\n\n private doClose() {\n const isOpen = this.dropdown.isOpen();\n if (isOpen && !this.dropdown.hasBackdrop() && this.dropdown.closeOnClickOutside()) {\n this.dropdown.isOpen.set(false);\n }\n }\n}\n","import { Directive, ElementRef } from '@angular/core';\nimport { BsDropdownDirective } from '../dropdown/dropdown.directive';\n\n@Directive({\n selector: '[bsDropdownToggle]',\n host: {\n '[attr.aria-haspopup]': 'dropdown.popupRole()',\n '[attr.aria-expanded]': 'dropdown.isOpen()',\n '[attr.aria-controls]': 'dropdown.menuId() || null',\n '(click)': 'onClick()',\n },\n})\nexport class BsDropdownToggleDirective {\n\n constructor(\n public dropdown: BsDropdownDirective,\n toggleButton: ElementRef) {\n this.toggleButton = toggleButton;\n }\n\n toggleButton: ElementRef;\n\n onClick() {\n this.dropdown.isOpen.set(!this.dropdown.isOpen());\n }\n}\n","import { afterNextRender, contentChild, Directive, ElementRef, inject, input, model, signal } from '@angular/core';\nimport { BS_DEVELOPMENT } from '@mintplayer/ng-bootstrap';\nimport { BsIdService, BsRovingFocusDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsDropdownMenuDirective } from '../dropdown-menu/dropdown-menu.directive';\nimport { BsDropdownToggleDirective } from '../dropdown-toggle/dropdown-toggle.directive';\n\nexport type BsDropdownPopupRole = 'menu' | 'listbox';\n\n@Directive({\n selector: '[bsDropdown]',\n exportAs: 'bsDropdown',\n host: {\n '(window:blur)': 'onBlur()',\n },\n})\nexport class BsDropdownDirective {\n\n elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private bsDevelopment = inject(BS_DEVELOPMENT, { optional: true });\n private ids = inject(BsIdService);\n\n readonly menu = contentChild.required(BsDropdownMenuDirective);\n readonly toggle = contentChild(BsDropdownToggleDirective);\n readonly rovingFocus = contentChild(BsRovingFocusDirective, { descendants: true });\n\n hasBackdrop = input(false);\n sameWidth = input(false);\n closeOnClickOutside = input(true);\n sameDropdownWidth = input(false);\n isOpen = model<boolean>(false);\n readonly popupRole = input<BsDropdownPopupRole>('menu');\n\n /** Reactive id used for the menu's host id and for the toggle's aria-controls. Empty until afterNextRender resolves the host's static id (or generates one), so sibling host bindings on the wrapper element get a chance to land first. */\n private _menuId = signal<string>('');\n readonly menuId = this._menuId.asReadonly();\n\n constructor() {\n afterNextRender(() => {\n const hostId = this.elementRef.nativeElement.id;\n this._menuId.set(hostId ? `${hostId}-menu` : this.ids.next('bs-dropdown-menu'));\n });\n }\n\n onBlur() {\n if (this.closeOnClickOutside() && !this.bsDevelopment) {\n this.isOpen.set(false);\n }\n }\n}\n","import { computed, Directive, inject, input, output } from '@angular/core';\nimport { BsDropdownDirective } from '../dropdown/dropdown.directive';\n\nexport type BsComboboxAutocomplete = 'none' | 'list' | 'inline' | 'both';\nexport type BsComboboxNavigateDirection = 'next' | 'prev' | 'first' | 'last';\n\n/**\n * APG Combobox pattern — turns a plain `<input>` into a combobox that drives\n * an adjacent `bsDropdown` popup (typeahead, select2, multiselect, searchbox).\n *\n * The directive owns the input-side ARIA wiring:\n * - `role=\"combobox\"` on the host\n * - `aria-expanded` / `aria-controls` derived from the parent dropdown\n * - `aria-activedescendant` mirroring the dropdown's `bsRovingFocus` active id\n * - `aria-autocomplete` (defaults to `\"list\"`)\n *\n * Keyboard model:\n * - **ArrowUp/Down/Home/End** — opens the popup if closed; once open,\n * forwards to the dropdown's `bsRovingFocus` (or emits a `navigate` event\n * if no roving-focus is found, so consumers can manage navigation manually).\n * - **Enter** — fires `activate` so the consumer can commit the highlighted\n * option. `stopImmediatePropagation` is called to keep sibling\n * `(keydown.enter)` listeners on the same input (e.g. \"submit free-text\n * search\") from also firing on the same Enter.\n * - **Escape** — closes the popup and fires `cancel`.\n * - **Tab** — hybrid behaviour: while the popup is open and a roving-focus\n * is present, Tab advances the active descendant; at the boundary, Tab\n * closes the popup and falls through to the browser's default tab order.\n */\n@Directive({\n selector: 'input[bsCombobox]',\n exportAs: 'bsCombobox',\n host: {\n 'role': 'combobox',\n '[attr.aria-autocomplete]': 'autocomplete()',\n '[attr.aria-haspopup]': '\"listbox\"',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-controls]': 'controls()',\n '[attr.aria-activedescendant]': 'resolvedActiveDescendant()',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class BsComboboxDirective {\n private dropdown = inject(BsDropdownDirective, { optional: true });\n\n /** Aliased to bsComboboxAutocomplete to avoid colliding with the host input's native HTML autocomplete attribute. */\n readonly autocomplete = input<BsComboboxAutocomplete>('list', { alias: 'bsComboboxAutocomplete' });\n /** Override the auto-derived activeDescendant. Defaults to dropdown.rovingFocus()'s id when present. */\n readonly activeDescendant = input<string | null>(null);\n\n readonly expanded = computed(() => this.dropdown?.isOpen() ?? false);\n readonly controls = computed(() => this.dropdown?.menuId() || null);\n readonly resolvedActiveDescendant = computed(() =>\n this.activeDescendant() ?? this.dropdown?.rovingFocus()?.activeDescendantId() ?? null);\n\n /** Fires only when no BsRovingFocus is found inside the parent dropdown — otherwise arrow keys are forwarded automatically. */\n readonly navigate = output<BsComboboxNavigateDirection>();\n readonly activate = output<KeyboardEvent>();\n readonly cancel = output<KeyboardEvent>();\n\n onKeydown(event: KeyboardEvent): void {\n // Skip browser/OS chords on the navigation keys; Tab is exempt because Shift+Tab is a legit chord\n // and Ctrl/Alt/Meta+Tab don't reach JS in any browser.\n if (event.key !== 'Tab' && (event.altKey || event.ctrlKey || event.metaKey)) return;\n const isOpen = this.expanded();\n const rf = this.dropdown?.rovingFocus();\n switch (event.key) {\n case 'ArrowDown':\n if (!isOpen) this.dropdown?.isOpen.set(true);\n else if (rf) rf.next();\n else this.navigate.emit('next');\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (!isOpen) this.dropdown?.isOpen.set(true);\n else if (rf) rf.prev();\n else this.navigate.emit('prev');\n event.preventDefault();\n break;\n case 'Home':\n if (isOpen) {\n if (rf) rf.focusFirst();\n else this.navigate.emit('first');\n event.preventDefault();\n }\n break;\n case 'End':\n if (isOpen) {\n if (rf) rf.focusLast();\n else this.navigate.emit('last');\n event.preventDefault();\n }\n break;\n case 'Escape':\n if (isOpen) {\n this.dropdown?.isOpen.set(false);\n this.cancel.emit(event);\n event.preventDefault();\n }\n break;\n case 'Enter':\n if (isOpen) {\n this.activate.emit(event);\n event.preventDefault();\n // Sibling listeners on the same input (e.g. a host-template\n // (keydown.enter) for \"submit free-text search\") must not also\n // fire when this Enter activated a suggestion — otherwise the\n // queued keyup of the alert-dismiss Enter would re-trigger them.\n event.stopImmediatePropagation();\n }\n break;\n case 'Tab':\n // Hybrid combobox TAB: when the popup is open and a roving-focus is\n // present, TAB advances the active descendant (focus stays in the\n // input). At the boundary, close the popup and fall through to the\n // browser's default tab traversal so focus exits the combobox.\n if (!isOpen || !rf) break;\n if (event.shiftKey) {\n if (rf.activeIndex() <= rf.firstEnabledIndex()) {\n this.dropdown?.isOpen.set(false);\n } else {\n rf.prev();\n event.preventDefault();\n }\n } else {\n if (rf.activeIndex() >= rf.lastEnabledIndex()) {\n this.dropdown?.isOpen.set(false);\n } else {\n rf.next();\n event.preventDefault();\n }\n }\n break;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.BsDropdownDirective"],"mappings":";;;;;;;;AAeM,MAAO,uBAAwB,SAAQ,qBAAqB,CAAA;AAehE,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAdD,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,mBAAmB,CAAC,CAAC;AACxD,QAAA,IAAA,CAAA,gB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AAA,UAAA,EAAA,CAAA;kBAb/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,UAAU;AAClB,wBAAA,0BAA0B,EAAE,gBAAgB;AAC5C,wBAAA,sBAAsB,EAAE,WAAW;AACnC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,8BAA8B,EAAE,4BAA4B;AAC5D,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA;AACF,iBAAA;;;ACzCD;;AAEG;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, input, signal, model, output, ChangeDetectionStrategy, Component,
|
|
2
|
+
import { Pipe, inject, input, signal, model, output, ChangeDetectionStrategy, Component, TemplateRef, Directive } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';
|
|
4
5
|
import { BsForDirective } from '@mintplayer/ng-bootstrap/for';
|
|
5
6
|
import { BsListGroupComponent, BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';
|
|
6
7
|
import { BsProgressComponent, BsProgressBarComponent } from '@mintplayer/ng-bootstrap/progress-bar';
|
|
@@ -30,9 +31,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
30
31
|
|
|
31
32
|
class BsFileUploadComponent {
|
|
32
33
|
constructor() {
|
|
34
|
+
this.announcer = inject(BsLiveAnnouncerService);
|
|
33
35
|
this.dropFilesCaption = input('Drop your files here', ...(ngDevMode ? [{ debugName: "dropFilesCaption" }] : /* istanbul ignore next */ []));
|
|
34
36
|
this.browseFilesCaption = input('Browse for files', ...(ngDevMode ? [{ debugName: "browseFilesCaption" }] : /* istanbul ignore next */ []));
|
|
35
37
|
this.placeholder = input('Drop files to upload', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
38
|
+
this.ariaLabel = input('File upload drop zone', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.inputAriaLabel = input('Choose files to upload', ...(ngDevMode ? [{ debugName: "inputAriaLabel" }] : /* istanbul ignore next */ []));
|
|
36
40
|
this.colors = Color;
|
|
37
41
|
this.isDraggingFile = signal(false, ...(ngDevMode ? [{ debugName: "isDraggingFile" }] : /* istanbul ignore next */ []));
|
|
38
42
|
this.fileTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "fileTemplate" }] : /* istanbul ignore next */ []));
|
|
@@ -79,9 +83,15 @@ class BsFileUploadComponent {
|
|
|
79
83
|
.map((file, index) => ({ file, progress: 0, index: this.files().length + index }));
|
|
80
84
|
this.files.update(f => [...f, ...newFiles]);
|
|
81
85
|
this.filesDropped.emit(newFiles);
|
|
86
|
+
if (newFiles.length === 1) {
|
|
87
|
+
this.announcer.announce(`Added ${newFiles[0].file.name}`);
|
|
88
|
+
}
|
|
89
|
+
else if (newFiles.length > 1) {
|
|
90
|
+
this.announcer.announce(`Added ${newFiles.length} files`);
|
|
91
|
+
}
|
|
82
92
|
}
|
|
83
93
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsFileUploadComponent, isStandalone: true, selector: "bs-file-upload", inputs: { dropFilesCaption: { classPropertyName: "dropFilesCaption", publicName: "dropFilesCaption", isSignal: true, isRequired: false, transformFunction: null }, browseFilesCaption: { classPropertyName: "browseFilesCaption", publicName: "browseFilesCaption", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "filesChange", filesDropped: "filesDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0, template: "<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template
|
|
94
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsFileUploadComponent, isStandalone: true, selector: "bs-file-upload", inputs: { dropFilesCaption: { classPropertyName: "dropFilesCaption", publicName: "dropFilesCaption", isSignal: true, isRequired: false, transformFunction: null }, browseFilesCaption: { classPropertyName: "browseFilesCaption", publicName: "browseFilesCaption", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, inputAriaLabel: { classPropertyName: "inputAriaLabel", publicName: "inputAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "filesChange", filesDropped: "filesDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0, template: "<div class=\"dropzone border position-relative p-5\" role=\"region\" [attr.aria-label]=\"ariaLabel()\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" [attr.aria-label]=\"inputAriaLabel()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\" aria-hidden=\"true\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\" aria-hidden=\"true\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\" [ariaLabel]=\"'Upload progress for ' + upload.file.name\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>\n", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid #CB1535!important;background:#dc88a8;margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:#999}.list-group span{margin:-5px auto}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BsForDirective, selector: "label[bsFor]", inputs: ["bsFor"] }, { kind: "component", type: BsListGroupComponent, selector: "bs-list-group" }, { kind: "component", type: BsListGroupItemComponent, selector: "bs-list-group-item" }, { kind: "component", type: BsProgressComponent, selector: "bs-progress", inputs: ["height", "isIndeterminate", "ariaLabel"] }, { kind: "component", type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: ["minimum", "maximum", "value", "color", "striped", "animated", "ariaLabel"] }, { kind: "pipe", type: BsFormatBytesPipe, name: "bsFormatBytes" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
85
95
|
}
|
|
86
96
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsFileUploadComponent, decorators: [{
|
|
87
97
|
type: Component,
|
|
@@ -89,8 +99,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
89
99
|
'(dragover)': 'onDragOver($event)',
|
|
90
100
|
'(dragleave)': 'onDragLeave($event)',
|
|
91
101
|
'(drop)': 'onDrop($event)',
|
|
92
|
-
}, template: "<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template
|
|
93
|
-
}], propDecorators: { dropFilesCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropFilesCaption", required: false }] }], browseFilesCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "browseFilesCaption", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }], filesDropped: [{ type: i0.Output, args: ["filesDropped"] }] } });
|
|
102
|
+
}, template: "<div class=\"dropzone border position-relative p-5\" role=\"region\" [attr.aria-label]=\"ariaLabel()\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" [attr.aria-label]=\"inputAriaLabel()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\" aria-hidden=\"true\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\" aria-hidden=\"true\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\" [ariaLabel]=\"'Upload progress for ' + upload.file.name\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>\n", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid #CB1535!important;background:#dc88a8;margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:#999}.list-group span{margin:-5px auto}\n"] }]
|
|
103
|
+
}], propDecorators: { dropFilesCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropFilesCaption", required: false }] }], browseFilesCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "browseFilesCaption", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], inputAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputAriaLabel", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }], filesDropped: [{ type: i0.Output, args: ["filesDropped"] }] } });
|
|
94
104
|
|
|
95
105
|
class BsFileUploadTemplateDirective {
|
|
96
106
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-file-upload.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/file-upload/src/pipes/format-bytes/format-bytes.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.html","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/directive/file-upload-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/mintplayer-ng-bootstrap-file-upload.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsFormatBytes',\n pure: true,\n})\nexport class BsFormatBytesPipe implements PipeTransform {\n\n transform(value: number, decimals = 2) {\n if (value === 0) {\n return \"0 Bytes\";\n }\n\n const k = 1024;\n const dm = decimals <= 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(value) / Math.log(k));\n\n return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + \" \" + sizes[i];\n }\n\n}\n","import { Component, input, model, output, signal, TemplateRef, ChangeDetectionStrategy} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsForDirective } from '@mintplayer/ng-bootstrap/for';\nimport { BsListGroupComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsProgressComponent, BsProgressBarComponent } from '@mintplayer/ng-bootstrap/progress-bar';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { FileUpload } from '../file-upload';\nimport { BsFormatBytesPipe } from '../pipes/format-bytes/format-bytes.pipe';\n\n@Component({\n selector: 'bs-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n imports: [NgTemplateOutlet, BsForDirective, BsListGroupComponent, BsListGroupItemComponent, BsProgressComponent, BsProgressBarComponent, BsFormatBytesPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(dragover)': 'onDragOver($event)',\n '(dragleave)': 'onDragLeave($event)',\n '(drop)': 'onDrop($event)',\n },\n})\nexport class BsFileUploadComponent {\n\n readonly dropFilesCaption = input('Drop your files here');\n readonly browseFilesCaption = input('Browse for files');\n readonly placeholder = input('Drop files to upload');\n\n readonly colors = Color;\n isDraggingFile = signal(false);\n readonly fileTemplate = signal<TemplateRef<FileUpload> | undefined>(undefined);\n readonly files = model<FileUpload[]>([]);\n readonly filesDropped = output<FileUpload[]>();\n\n onChange(event: Event) {\n if (!event.target) return;\n if (!('files' in event.target)) return;\n if (!event.target['files']) return;\n\n const files = (<HTMLInputElement>event.target).files;\n if (!files) return;\n\n this.processDroppedFiles(files);\n }\n\n onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n if (event.dataTransfer) {\n this.isDraggingFile.set(true);\n event.dataTransfer.effectAllowed = \"copy\";\n }\n }\n\n onDragLeave(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile.set(false);\n }\n\n onDrop(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile.set(false);\n if (event.dataTransfer && event.dataTransfer.files) {\n this.processDroppedFiles(event.dataTransfer.files);\n }\n }\n\n private processDroppedFiles(fileList: FileList) {\n const newFiles = [...Array(fileList.length).keys()]\n .map(i => fileList.item(i))\n .filter(f => !!f)\n .map((file, index) => <FileUpload>{ file, progress: 0, index: this.files().length + index });\n\n this.files.update(f => [...f, ...newFiles]);\n this.filesDropped.emit(newFiles);\n }\n}\n","<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport { BsFileUploadComponent } from '../component/file-upload.component';\nimport { FileUpload } from '../file-upload';\n\n@Directive({\n selector: '[bsFileUploadTemplate]',\n})\nexport class BsFileUploadTemplateDirective {\n private fileUploadComponent = inject(BsFileUploadComponent);\n\n constructor() {\n const templateRef = inject(TemplateRef);\n this.fileUploadComponent.fileTemplate.set(templateRef);\n }\n\n readonly bsFileUploadTemplateOf = input<FileUpload[] | undefined>(undefined);\n\n static ngTemplateContextGuard(dir: BsFileUploadTemplateDirective, ctx: any): ctx is BsFileUploadTemplateContext {\n return true;\n }\n\n}\n\nexport class BsFileUploadTemplateContext {\n $implicit: FileUpload = null!;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAMa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC,EAAA;AACnC,QAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,YAAA,OAAO,SAAS;QAClB;QAEA,MAAM,CAAC,GAAG,IAAI;AACd,QAAA,MAAM,EAAE,GAAG,QAAQ,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ;QACvC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACvE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEnD,OAAO,UAAU,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;IAC1E;+GAbW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,eAAe;AACrB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;MCiBY,qBAAqB,CAAA;AAZlC,IAAA,WAAA,GAAA;AAc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,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,sBAAA,EAAA,EAAA,iBAAA,EAAA,wBAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAHzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AACnC,iBAAA;;MAiBY,2BAA2B,CAAA;AAAxC,IAAA,WAAA,GAAA;QACE,IAAA,CAAA,SAAS,GAAe,IAAK;IAC/B;AAAC;;ACzBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-file-upload.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/file-upload/src/pipes/format-bytes/format-bytes.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.html","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/directive/file-upload-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/mintplayer-ng-bootstrap-file-upload.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsFormatBytes',\n pure: true,\n})\nexport class BsFormatBytesPipe implements PipeTransform {\n\n transform(value: number, decimals = 2) {\n if (value === 0) {\n return \"0 Bytes\";\n }\n\n const k = 1024;\n const dm = decimals <= 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(value) / Math.log(k));\n\n return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + \" \" + sizes[i];\n }\n\n}\n","import { Component, inject, input, model, output, signal, TemplateRef, ChangeDetectionStrategy } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsForDirective } from '@mintplayer/ng-bootstrap/for';\nimport { BsListGroupComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsProgressComponent, BsProgressBarComponent } from '@mintplayer/ng-bootstrap/progress-bar';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { FileUpload } from '../file-upload';\nimport { BsFormatBytesPipe } from '../pipes/format-bytes/format-bytes.pipe';\n\n@Component({\n selector: 'bs-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n imports: [NgTemplateOutlet, BsForDirective, BsListGroupComponent, BsListGroupItemComponent, BsProgressComponent, BsProgressBarComponent, BsFormatBytesPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(dragover)': 'onDragOver($event)',\n '(dragleave)': 'onDragLeave($event)',\n '(drop)': 'onDrop($event)',\n },\n})\nexport class BsFileUploadComponent {\n private announcer = inject(BsLiveAnnouncerService);\n\n readonly dropFilesCaption = input('Drop your files here');\n readonly browseFilesCaption = input('Browse for files');\n readonly placeholder = input('Drop files to upload');\n readonly ariaLabel = input<string>('File upload drop zone');\n readonly inputAriaLabel = input<string>('Choose files to upload');\n\n readonly colors = Color;\n isDraggingFile = signal(false);\n readonly fileTemplate = signal<TemplateRef<FileUpload> | undefined>(undefined);\n readonly files = model<FileUpload[]>([]);\n readonly filesDropped = output<FileUpload[]>();\n\n onChange(event: Event) {\n if (!event.target) return;\n if (!('files' in event.target)) return;\n if (!event.target['files']) return;\n\n const files = (<HTMLInputElement>event.target).files;\n if (!files) return;\n\n this.processDroppedFiles(files);\n }\n\n onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n if (event.dataTransfer) {\n this.isDraggingFile.set(true);\n event.dataTransfer.effectAllowed = \"copy\";\n }\n }\n\n onDragLeave(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile.set(false);\n }\n\n onDrop(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile.set(false);\n if (event.dataTransfer && event.dataTransfer.files) {\n this.processDroppedFiles(event.dataTransfer.files);\n }\n }\n\n private processDroppedFiles(fileList: FileList) {\n const newFiles = [...Array(fileList.length).keys()]\n .map(i => fileList.item(i))\n .filter(f => !!f)\n .map((file, index) => <FileUpload>{ file, progress: 0, index: this.files().length + index });\n\n this.files.update(f => [...f, ...newFiles]);\n this.filesDropped.emit(newFiles);\n\n if (newFiles.length === 1) {\n this.announcer.announce(`Added ${newFiles[0].file.name}`);\n } else if (newFiles.length > 1) {\n this.announcer.announce(`Added ${newFiles.length} files`);\n }\n }\n}\n","<div class=\"dropzone border position-relative p-5\" role=\"region\" [attr.aria-label]=\"ariaLabel()\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" [attr.aria-label]=\"inputAriaLabel()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\" aria-hidden=\"true\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate() ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\" aria-hidden=\"true\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\" [ariaLabel]=\"'Upload progress for ' + upload.file.name\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport { BsFileUploadComponent } from '../component/file-upload.component';\nimport { FileUpload } from '../file-upload';\n\n@Directive({\n selector: '[bsFileUploadTemplate]',\n})\nexport class BsFileUploadTemplateDirective {\n private fileUploadComponent = inject(BsFileUploadComponent);\n\n constructor() {\n const templateRef = inject(TemplateRef);\n this.fileUploadComponent.fileTemplate.set(templateRef);\n }\n\n readonly bsFileUploadTemplateOf = input<FileUpload[] | undefined>(undefined);\n\n static ngTemplateContextGuard(dir: BsFileUploadTemplateDirective, ctx: any): ctx is BsFileUploadTemplateContext {\n return true;\n }\n\n}\n\nexport class BsFileUploadTemplateContext {\n $implicit: FileUpload = null!;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAMa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC,EAAA;AACnC,QAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,YAAA,OAAO,SAAS;QAClB;QAEA,MAAM,CAAC,GAAG,IAAI;AACd,QAAA,MAAM,EAAE,GAAG,QAAQ,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ;QACvC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACvE,MAAM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AAA,CAAA,sBAAsB,GAAG,KAAK,CAA2B,SAAS,6FAAC;AAJ1E,QAAA,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC;IACxD;AAIA,IAAA,OAAO,sBAAsB,CAAC,GAAkC,EAAE,GAAQ,EAAA;AACxE,QAAA,OAAO,IAAI;IACb;+GAZW,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,sBAAA,EAAA,EAAA,iBAAA,EAAA,wBAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAHzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AACnC,iBAAA;;MAiBY,2BAA2B,CAAA;AAAxC,IAAA,WAAA,GAAA;QACE,IAAA,CAAA,SAAS,GAAe,IAAK;IAC/B;AAAC;;ACzBD;;AAEG;;;;"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Marker component whose only job is to pull in @angular/cdk/overlay-prebuilt
|
|
6
|
+
* CSS via its SCSS (::ng-deep import). The template is intentionally empty;
|
|
7
|
+
* placing <bs-has-overlay></bs-has-overlay> inside any component that opens a
|
|
8
|
+
* CDK overlay (modal, offcanvas, popover, dropdown-based pickers, etc.)
|
|
9
|
+
* guarantees the overlay container's positioning styles ship with the component
|
|
10
|
+
* bundle, regardless of whether the host app pulled them in globally.
|
|
11
|
+
*
|
|
12
|
+
* The audit (docs/prd/aria-accessibility-audit.md §5.1) flagged this as
|
|
13
|
+
* "empty, purpose unclear" and suggested it should hide background content
|
|
14
|
+
* via aria-hidden/inert when an overlay is open. That responsibility lives in
|
|
15
|
+
* BsOverlayFocus + each per-component overlay logic (modal hides app-root,
|
|
16
|
+
* popover doesn't), not here. has-overlay is and remains a CSS-injection marker.
|
|
17
|
+
*/
|
|
4
18
|
class BsHasOverlayComponent {
|
|
5
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsHasOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
20
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: BsHasOverlayComponent, isStandalone: true, selector: "bs-has-overlay", ngImport: i0, template: "", styles: ["::ng-deep .cdk-overlay-container,::ng-deep .cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000}::ng-deep .cdk-overlay-container:empty{display:none}::ng-deep .cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}::ng-deep .cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}::ng-deep .cdk-overlay-backdrop{position:absolute;inset:0;pointer-events:auto;-webkit-tap-highlight-color:transparent;opacity:0;touch-action:manipulation;z-index:1000;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}@media(prefers-reduced-motion){::ng-deep .cdk-overlay-backdrop{transition-duration:1ms}}::ng-deep .cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors:active){::ng-deep .cdk-overlay-backdrop-showing{opacity:.6}}::ng-deep .cdk-overlay-dark-backdrop{background:#00000052}::ng-deep .cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}::ng-deep .cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,::ng-deep .cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}::ng-deep .cdk-overlay-backdrop-noop-animation{transition:none}::ng-deep .cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}::ng-deep .cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}::ng-deep .cdk-overlay-popover{background:none;border:none;padding:0;outline:0;overflow:visible;position:fixed;pointer-events:none;white-space:normal;color:inherit;text-decoration:none;width:100%;height:100%;inset:0 auto auto 0}::ng-deep .cdk-overlay-popover::backdrop{display:none}::ng-deep .cdk-overlay-popover .cdk-overlay-backdrop{position:fixed;z-index:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-has-overlay.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/has-overlay/src/has-overlay/has-overlay.component.ts","../../../../libs/mintplayer-ng-bootstrap/has-overlay/src/has-overlay/has-overlay.component.html","../../../../libs/mintplayer-ng-bootstrap/has-overlay/mintplayer-ng-bootstrap-has-overlay.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'bs-has-overlay',\n templateUrl: './has-overlay.component.html',\n styleUrls: ['./has-overlay.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsHasOverlayComponent {}\n","","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-has-overlay.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/has-overlay/src/has-overlay/has-overlay.component.ts","../../../../libs/mintplayer-ng-bootstrap/has-overlay/src/has-overlay/has-overlay.component.html","../../../../libs/mintplayer-ng-bootstrap/has-overlay/mintplayer-ng-bootstrap-has-overlay.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n/**\n * Marker component whose only job is to pull in @angular/cdk/overlay-prebuilt\n * CSS via its SCSS (::ng-deep import). The template is intentionally empty;\n * placing <bs-has-overlay></bs-has-overlay> inside any component that opens a\n * CDK overlay (modal, offcanvas, popover, dropdown-based pickers, etc.)\n * guarantees the overlay container's positioning styles ship with the component\n * bundle, regardless of whether the host app pulled them in globally.\n *\n * The audit (docs/prd/aria-accessibility-audit.md §5.1) flagged this as\n * \"empty, purpose unclear\" and suggested it should hide background content\n * via aria-hidden/inert when an overlay is open. That responsibility lives in\n * BsOverlayFocus + each per-component overlay logic (modal hides app-root,\n * popover doesn't), not here. has-overlay is and remains a CSS-injection marker.\n */\n@Component({\n selector: 'bs-has-overlay',\n templateUrl: './has-overlay.component.html',\n styleUrls: ['./has-overlay.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsHasOverlayComponent {}\n","","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;AAaG;MAOU,qBAAqB,CAAA;+GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,0ECtBlC,EAAA,EAAA,MAAA,EAAA,CAAA,23DAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDsBa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;+BACE,gBAAgB,EAAA,eAAA,EAGT,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,EAAA,EAAA,MAAA,EAAA,CAAA,23DAAA,CAAA,EAAA;;;AEpBjD;;AAEG;;;;"}
|
|
@@ -3,12 +3,13 @@ import { ChangeDetectionStrategy, Component, contentChildren } from '@angular/co
|
|
|
3
3
|
|
|
4
4
|
class BsListGroupItemComponent {
|
|
5
5
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsListGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: BsListGroupItemComponent, isStandalone: true, selector: "bs-list-group-item", host: { properties: { "class.list-group-item": "true" } }, ngImport: i0, template: "<!-- <li class=\"list-group-item\"> -->\n <ng-content></ng-content>\n<!-- </li> -->", styles: [".list-group-item{margin-bottom:-1px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: BsListGroupItemComponent, isStandalone: true, selector: "bs-list-group-item", host: { attributes: { "role": "listitem" }, properties: { "class.list-group-item": "true" } }, ngImport: i0, template: "<!-- <li class=\"list-group-item\"> -->\n <ng-content></ng-content>\n<!-- </li> -->", styles: [".list-group-item{margin-bottom:-1px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7
7
|
}
|
|
8
8
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsListGroupItemComponent, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'bs-list-group-item', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
11
11
|
'[class.list-group-item]': 'true',
|
|
12
|
+
'role': 'listitem',
|
|
12
13
|
}, template: "<!-- <li class=\"list-group-item\"> -->\n <ng-content></ng-content>\n<!-- </li> -->", styles: [".list-group-item{margin-bottom:-1px}\n"] }]
|
|
13
14
|
}] });
|
|
14
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-list-group.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/list-group/src/list-group-item/list-group-item.component.ts","../../../../libs/mintplayer-ng-bootstrap/list-group/src/list-group-item/list-group-item.component.html","../../../../libs/mintplayer-ng-bootstrap/list-group/src/list-group/list-group.component.ts","../../../../libs/mintplayer-ng-bootstrap/list-group/src/list-group/list-group.component.html","../../../../libs/mintplayer-ng-bootstrap/list-group/mintplayer-ng-bootstrap-list-group.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'bs-list-group-item',\n templateUrl: './list-group-item.component.html',\n styleUrls: ['./list-group-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.list-group-item]': 'true',\n },\n})\nexport class BsListGroupItemComponent {\n}\n","<!-- <li class=\"list-group-item\"> -->\n <ng-content></ng-content>\n<!-- </li> -->","import { Component, contentChildren, ChangeDetectionStrategy} from '@angular/core';\nimport { BsListGroupItemComponent } from '../list-group-item/list-group-item.component';\n\n@Component({\n selector: 'bs-list-group',\n templateUrl: './list-group.component.html',\n styleUrls: ['./list-group.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsListGroupComponent {\n readonly items = contentChildren(BsListGroupItemComponent);\n}\n","<ul class=\"list-group mt-0\">\n <ng-content></ng-content>\n</ul>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-list-group.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/list-group/src/list-group-item/list-group-item.component.ts","../../../../libs/mintplayer-ng-bootstrap/list-group/src/list-group-item/list-group-item.component.html","../../../../libs/mintplayer-ng-bootstrap/list-group/src/list-group/list-group.component.ts","../../../../libs/mintplayer-ng-bootstrap/list-group/src/list-group/list-group.component.html","../../../../libs/mintplayer-ng-bootstrap/list-group/mintplayer-ng-bootstrap-list-group.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'bs-list-group-item',\n templateUrl: './list-group-item.component.html',\n styleUrls: ['./list-group-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.list-group-item]': 'true',\n 'role': 'listitem',\n },\n})\nexport class BsListGroupItemComponent {\n}\n","<!-- <li class=\"list-group-item\"> -->\n <ng-content></ng-content>\n<!-- </li> -->","import { Component, contentChildren, ChangeDetectionStrategy} from '@angular/core';\nimport { BsListGroupItemComponent } from '../list-group-item/list-group-item.component';\n\n@Component({\n selector: 'bs-list-group',\n templateUrl: './list-group.component.html',\n styleUrls: ['./list-group.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsListGroupComponent {\n readonly items = contentChildren(BsListGroupItemComponent);\n}\n","<ul class=\"list-group mt-0\">\n <ng-content></ng-content>\n</ul>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAYa,wBAAwB,CAAA;+GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,6KCZrC,wFAEc,EAAA,MAAA,EAAA,CAAA,wCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDUD,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAVpC,SAAS;AACE,YAAA,I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y, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class BsMarqueeComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
7
|
+
}
|
|
5
8
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsMarqueeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
9
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: BsMarqueeComponent, isStandalone: true, selector: "bs-marquee", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span class=\"marquee text-nowrap overflow-hidden d-block\" [attr.aria-label]=\"ariaLabel()\">\n <span class=\"h1 d-inline-block\">\n <ng-content></ng-content>\n </span>\n</span>\n", styles: [".marquee{box-sizing:border-box}.marquee>span{padding-left:100%;animation:marquee 15s linear infinite}@media(prefers-reduced-motion:reduce){.marquee>span{animation:none;padding-left:0}}@keyframes marquee{0%{transform:translate(0)}to{transform:translate(-100%)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7
10
|
}
|
|
8
11
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsMarqueeComponent, decorators: [{
|
|
9
12
|
type: Component,
|
|
10
|
-
args: [{ selector: 'bs-marquee', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"marquee text-nowrap overflow-hidden d-block\">\n <span class=\"h1 d-inline-block\">\n <ng-content></ng-content>\n </span>\n</span
|
|
11
|
-
}] });
|
|
13
|
+
args: [{ selector: 'bs-marquee', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"marquee text-nowrap overflow-hidden d-block\" [attr.aria-label]=\"ariaLabel()\">\n <span class=\"h1 d-inline-block\">\n <ng-content></ng-content>\n </span>\n</span>\n", styles: [".marquee{box-sizing:border-box}.marquee>span{padding-left:100%;animation:marquee 15s linear infinite}@media(prefers-reduced-motion:reduce){.marquee>span{animation:none;padding-left:0}}@keyframes marquee{0%{transform:translate(0)}to{transform:translate(-100%)}}\n"] }]
|
|
14
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
17
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-marquee.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/marquee/src/marquee/marquee.component.ts","../../../../libs/mintplayer-ng-bootstrap/marquee/src/marquee/marquee.component.html","../../../../libs/mintplayer-ng-bootstrap/marquee/mintplayer-ng-bootstrap-marquee.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'bs-marquee',\n templateUrl: './marquee.component.html',\n styleUrls: ['./marquee.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsMarqueeComponent {}\n","<span class=\"marquee text-nowrap overflow-hidden d-block\">\n <span class=\"h1 d-inline-block\">\n <ng-content></ng-content>\n </span>\n</span
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-marquee.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/marquee/src/marquee/marquee.component.ts","../../../../libs/mintplayer-ng-bootstrap/marquee/src/marquee/marquee.component.html","../../../../libs/mintplayer-ng-bootstrap/marquee/mintplayer-ng-bootstrap-marquee.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input } from '@angular/core';\n\n@Component({\n selector: 'bs-marquee',\n templateUrl: './marquee.component.html',\n styleUrls: ['./marquee.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsMarqueeComponent {\n readonly ariaLabel = input<string | null>(null);\n}\n","<span class=\"marquee text-nowrap overflow-hidden d-block\" [attr.aria-label]=\"ariaLabel()\">\n <span class=\"h1 d-inline-block\">\n <ng-content></ng-content>\n </span>\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAQa,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;AAOW,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAChD,IAAA;+GAFY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,sNCR/B,mMAKA,EAAA,MAAA,EAAA,CAAA,wQAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDGa,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;+BACE,YAAY,EAAA,eAAA,EAGL,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mMAAA,EAAA,MAAA,EAAA,CAAA,wQAAA,CAAA,EAAA;;;AENjD;;AAEG;;;;"}
|
|
@@ -1,24 +1,44 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject,
|
|
2
|
+
import { InjectionToken, signal, Injectable, inject, Injector, ChangeDetectionStrategy, Component, ComponentFactoryResolver, model, input, effect, TemplateRef, Directive, ElementRef, afterNextRender } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { FadeInOutAnimation, EnterFromTopAnimation } from '@mintplayer/ng-animations';
|
|
5
|
+
import { BsOverlayFocusDirective, BsOverlayStackService, BsIdService } from '@mintplayer/ng-bootstrap/a11y';
|
|
5
6
|
import { Overlay } from '@angular/cdk/overlay';
|
|
6
7
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
7
8
|
import { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';
|
|
8
9
|
|
|
9
10
|
const MODAL_CONTENT = new InjectionToken('ModalContent');
|
|
10
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Component-scoped state shared between BsModalComponent (the dialog renderer)
|
|
14
|
+
* and the bsModalHeader / bsModalBody directives applied to the user's template.
|
|
15
|
+
* Provides the ids for aria-labelledby and aria-describedby.
|
|
16
|
+
*/
|
|
17
|
+
class BsModalContextService {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.headerId = signal(null, ...(ngDevMode ? [{ debugName: "headerId" }] : /* istanbul ignore next */ []));
|
|
20
|
+
this.bodyId = signal(null, ...(ngDevMode ? [{ debugName: "bodyId" }] : /* istanbul ignore next */ []));
|
|
21
|
+
}
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
23
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalContextService }); }
|
|
24
|
+
}
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalContextService, decorators: [{
|
|
26
|
+
type: Injectable
|
|
27
|
+
}] });
|
|
28
|
+
|
|
11
29
|
class BsModalComponent {
|
|
12
30
|
constructor() {
|
|
13
31
|
this.template = inject(MODAL_CONTENT);
|
|
14
32
|
this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
33
|
+
this.context = inject(BsModalContextService);
|
|
34
|
+
this.injector = inject(Injector);
|
|
15
35
|
}
|
|
16
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsModalComponent, isStandalone: true, selector: "bs-modal-content", ngImport: i0, template: "@if (isOpen()) {\n <div class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n tabindex=\"-1\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n </div>\n </div>\n\n <div [@fadeInOut]>\n <div class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\n </div>\n}", styles: [":host ::ng-deep .fade{transition:opacity .15s linear}@media(prefers-reduced-motion:reduce){:host ::ng-deep .fade{transition:none}}:host ::ng-deep .fade:not(.show){opacity:0}:host ::ng-deep .collapse:not(.show){display:none}:host ::ng-deep .collapsing{height:0;overflow:hidden;transition:height .35s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .collapsing{transition:none}}:host ::ng-deep .collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .collapsing.collapse-horizontal{transition:none}}:host ::ng-deep .modal{--bs-modal-zindex: 1055;--bs-modal-width: 500px;--bs-modal-padding: 1rem;--bs-modal-margin: .5rem;--bs-modal-color: var(--bs-body-color);--bs-modal-bg: var(--bs-body-bg);--bs-modal-border-color: var(--bs-border-color-translucent);--bs-modal-border-width: var(--bs-border-width);--bs-modal-border-radius: var(--bs-border-radius-lg);--bs-modal-box-shadow: var(--bs-box-shadow-sm);--bs-modal-inner-border-radius: calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));--bs-modal-header-padding-x: 1rem;--bs-modal-header-padding-y: 1rem;--bs-modal-header-padding: 1rem 1rem;--bs-modal-header-border-color: var(--bs-border-color);--bs-modal-header-border-width: var(--bs-border-width);--bs-modal-title-line-height: 1.5;--bs-modal-footer-gap: .5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color: var(--bs-border-color);--bs-modal-footer-border-width: var(--bs-border-width);position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}:host ::ng-deep .modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade :host ::ng-deep .modal-dialog{transform:translateY(-50px);transition:transform .3s ease-out}@media(prefers-reduced-motion:reduce){.modal.fade :host ::ng-deep .modal-dialog{transition:none}}.modal.show :host ::ng-deep .modal-dialog{transform:none}.modal.modal-static :host ::ng-deep .modal-dialog{transform:scale(1.02)}:host ::ng-deep .modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}:host ::ng-deep .modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}:host ::ng-deep .modal-dialog-scrollable .modal-body{overflow-y:auto}:host ::ng-deep .modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}:host ::ng-deep .modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}:host ::ng-deep .modal-backdrop{--bs-backdrop-zindex: 1050;--bs-backdrop-bg: #000;--bs-backdrop-opacity: .5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}:host ::ng-deep .modal-backdrop.fade{opacity:0}:host ::ng-deep .modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}:host ::ng-deep .modal-header{display:flex;flex-shrink:0;align-items:center;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}:host ::ng-deep .modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin-top:calc(-.5 * var(--bs-modal-header-padding-y));margin-right:calc(-.5 * var(--bs-modal-header-padding-x));margin-bottom:calc(-.5 * var(--bs-modal-header-padding-y));margin-left:auto}:host ::ng-deep .modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}:host ::ng-deep .modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}:host ::ng-deep .modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}:host ::ng-deep .modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media(min-width:576px){:host ::ng-deep .modal{--bs-modal-margin: 1.75rem;--bs-modal-box-shadow: var(--bs-box-shadow)}:host ::ng-deep .modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}:host ::ng-deep .modal-sm{--bs-modal-width: 300px}}@media(min-width:992px){:host ::ng-deep .modal-lg,:host ::ng-deep .modal-xl{--bs-modal-width: 800px}}@media(min-width:1200px){:host ::ng-deep .modal-xl{--bs-modal-width: 1140px}}:host ::ng-deep .modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen .modal-header,:host ::ng-deep .modal-fullscreen .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen .modal-body{overflow-y:auto}@media(max-width:575.98px){:host ::ng-deep .modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-header,:host ::ng-deep .modal-fullscreen-sm-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media(max-width:767.98px){:host ::ng-deep .modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-md-down .modal-header,:host ::ng-deep .modal-fullscreen-md-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media(max-width:991.98px){:host ::ng-deep .modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-header,:host ::ng-deep .modal-fullscreen-lg-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media(max-width:1199.98px){:host ::ng-deep .modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-header,:host ::ng-deep .modal-fullscreen-xl-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media(max-width:1399.98px){:host ::ng-deep .modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-header,:host ::ng-deep .modal-fullscreen-xxl-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [FadeInOutAnimation, EnterFromTopAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsModalComponent, isStandalone: true, selector: "bs-modal-content", providers: [BsModalContextService], ngImport: i0, template: "@if (isOpen()) {\n <div class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"true\"\n tabindex=\"-1\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n </div>\n </div>\n </div>\n\n <div [@fadeInOut]>\n <div class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\n </div>\n}\n", styles: [":host ::ng-deep .fade{transition:opacity .15s linear}@media(prefers-reduced-motion:reduce){:host ::ng-deep .fade{transition:none}}:host ::ng-deep .fade:not(.show){opacity:0}:host ::ng-deep .collapse:not(.show){display:none}:host ::ng-deep .collapsing{height:0;overflow:hidden;transition:height .35s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .collapsing{transition:none}}:host ::ng-deep .collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .collapsing.collapse-horizontal{transition:none}}:host ::ng-deep .modal{--bs-modal-zindex: 1055;--bs-modal-width: 500px;--bs-modal-padding: 1rem;--bs-modal-margin: .5rem;--bs-modal-color: var(--bs-body-color);--bs-modal-bg: var(--bs-body-bg);--bs-modal-border-color: var(--bs-border-color-translucent);--bs-modal-border-width: var(--bs-border-width);--bs-modal-border-radius: var(--bs-border-radius-lg);--bs-modal-box-shadow: var(--bs-box-shadow-sm);--bs-modal-inner-border-radius: calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));--bs-modal-header-padding-x: 1rem;--bs-modal-header-padding-y: 1rem;--bs-modal-header-padding: 1rem 1rem;--bs-modal-header-border-color: var(--bs-border-color);--bs-modal-header-border-width: var(--bs-border-width);--bs-modal-title-line-height: 1.5;--bs-modal-footer-gap: .5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color: var(--bs-border-color);--bs-modal-footer-border-width: var(--bs-border-width);position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}:host ::ng-deep .modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade :host ::ng-deep .modal-dialog{transform:translateY(-50px);transition:transform .3s ease-out}@media(prefers-reduced-motion:reduce){.modal.fade :host ::ng-deep .modal-dialog{transition:none}}.modal.show :host ::ng-deep .modal-dialog{transform:none}.modal.modal-static :host ::ng-deep .modal-dialog{transform:scale(1.02)}:host ::ng-deep .modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}:host ::ng-deep .modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}:host ::ng-deep .modal-dialog-scrollable .modal-body{overflow-y:auto}:host ::ng-deep .modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}:host ::ng-deep .modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}:host ::ng-deep .modal-backdrop{--bs-backdrop-zindex: 1050;--bs-backdrop-bg: #000;--bs-backdrop-opacity: .5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}:host ::ng-deep .modal-backdrop.fade{opacity:0}:host ::ng-deep .modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}:host ::ng-deep .modal-header{display:flex;flex-shrink:0;align-items:center;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}:host ::ng-deep .modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin-top:calc(-.5 * var(--bs-modal-header-padding-y));margin-right:calc(-.5 * var(--bs-modal-header-padding-x));margin-bottom:calc(-.5 * var(--bs-modal-header-padding-y));margin-left:auto}:host ::ng-deep .modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}:host ::ng-deep .modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}:host ::ng-deep .modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}:host ::ng-deep .modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media(min-width:576px){:host ::ng-deep .modal{--bs-modal-margin: 1.75rem;--bs-modal-box-shadow: var(--bs-box-shadow)}:host ::ng-deep .modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}:host ::ng-deep .modal-sm{--bs-modal-width: 300px}}@media(min-width:992px){:host ::ng-deep .modal-lg,:host ::ng-deep .modal-xl{--bs-modal-width: 800px}}@media(min-width:1200px){:host ::ng-deep .modal-xl{--bs-modal-width: 1140px}}:host ::ng-deep .modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen .modal-header,:host ::ng-deep .modal-fullscreen .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen .modal-body{overflow-y:auto}@media(max-width:575.98px){:host ::ng-deep .modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-header,:host ::ng-deep .modal-fullscreen-sm-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media(max-width:767.98px){:host ::ng-deep .modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-md-down .modal-header,:host ::ng-deep .modal-fullscreen-md-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media(max-width:991.98px){:host ::ng-deep .modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-header,:host ::ng-deep .modal-fullscreen-lg-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media(max-width:1199.98px){:host ::ng-deep .modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-header,:host ::ng-deep .modal-fullscreen-xl-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media(max-width:1399.98px){:host ::ng-deep .modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-header,:host ::ng-deep .modal-fullscreen-xxl-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BsOverlayFocusDirective, selector: "[bsOverlayFocus]", inputs: ["bsOverlayFocus", "initialFocus", "returnFocus"], exportAs: ["bsOverlayFocus"] }], animations: [FadeInOutAnimation, EnterFromTopAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
18
38
|
}
|
|
19
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalComponent, decorators: [{
|
|
20
40
|
type: Component,
|
|
21
|
-
args: [{ selector: 'bs-modal-content', imports: [NgTemplateOutlet], animations: [FadeInOutAnimation, EnterFromTopAnimation], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isOpen()) {\n <div class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n tabindex=\"-1\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n </div>\n </div>\n\n <div [@fadeInOut]>\n <div class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\n </div>\n}", styles: [":host ::ng-deep .fade{transition:opacity .15s linear}@media(prefers-reduced-motion:reduce){:host ::ng-deep .fade{transition:none}}:host ::ng-deep .fade:not(.show){opacity:0}:host ::ng-deep .collapse:not(.show){display:none}:host ::ng-deep .collapsing{height:0;overflow:hidden;transition:height .35s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .collapsing{transition:none}}:host ::ng-deep .collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .collapsing.collapse-horizontal{transition:none}}:host ::ng-deep .modal{--bs-modal-zindex: 1055;--bs-modal-width: 500px;--bs-modal-padding: 1rem;--bs-modal-margin: .5rem;--bs-modal-color: var(--bs-body-color);--bs-modal-bg: var(--bs-body-bg);--bs-modal-border-color: var(--bs-border-color-translucent);--bs-modal-border-width: var(--bs-border-width);--bs-modal-border-radius: var(--bs-border-radius-lg);--bs-modal-box-shadow: var(--bs-box-shadow-sm);--bs-modal-inner-border-radius: calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));--bs-modal-header-padding-x: 1rem;--bs-modal-header-padding-y: 1rem;--bs-modal-header-padding: 1rem 1rem;--bs-modal-header-border-color: var(--bs-border-color);--bs-modal-header-border-width: var(--bs-border-width);--bs-modal-title-line-height: 1.5;--bs-modal-footer-gap: .5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color: var(--bs-border-color);--bs-modal-footer-border-width: var(--bs-border-width);position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}:host ::ng-deep .modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade :host ::ng-deep .modal-dialog{transform:translateY(-50px);transition:transform .3s ease-out}@media(prefers-reduced-motion:reduce){.modal.fade :host ::ng-deep .modal-dialog{transition:none}}.modal.show :host ::ng-deep .modal-dialog{transform:none}.modal.modal-static :host ::ng-deep .modal-dialog{transform:scale(1.02)}:host ::ng-deep .modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}:host ::ng-deep .modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}:host ::ng-deep .modal-dialog-scrollable .modal-body{overflow-y:auto}:host ::ng-deep .modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}:host ::ng-deep .modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}:host ::ng-deep .modal-backdrop{--bs-backdrop-zindex: 1050;--bs-backdrop-bg: #000;--bs-backdrop-opacity: .5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}:host ::ng-deep .modal-backdrop.fade{opacity:0}:host ::ng-deep .modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}:host ::ng-deep .modal-header{display:flex;flex-shrink:0;align-items:center;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}:host ::ng-deep .modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin-top:calc(-.5 * var(--bs-modal-header-padding-y));margin-right:calc(-.5 * var(--bs-modal-header-padding-x));margin-bottom:calc(-.5 * var(--bs-modal-header-padding-y));margin-left:auto}:host ::ng-deep .modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}:host ::ng-deep .modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}:host ::ng-deep .modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}:host ::ng-deep .modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media(min-width:576px){:host ::ng-deep .modal{--bs-modal-margin: 1.75rem;--bs-modal-box-shadow: var(--bs-box-shadow)}:host ::ng-deep .modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}:host ::ng-deep .modal-sm{--bs-modal-width: 300px}}@media(min-width:992px){:host ::ng-deep .modal-lg,:host ::ng-deep .modal-xl{--bs-modal-width: 800px}}@media(min-width:1200px){:host ::ng-deep .modal-xl{--bs-modal-width: 1140px}}:host ::ng-deep .modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen .modal-header,:host ::ng-deep .modal-fullscreen .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen .modal-body{overflow-y:auto}@media(max-width:575.98px){:host ::ng-deep .modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-header,:host ::ng-deep .modal-fullscreen-sm-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media(max-width:767.98px){:host ::ng-deep .modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-md-down .modal-header,:host ::ng-deep .modal-fullscreen-md-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media(max-width:991.98px){:host ::ng-deep .modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-header,:host ::ng-deep .modal-fullscreen-lg-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media(max-width:1199.98px){:host ::ng-deep .modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-header,:host ::ng-deep .modal-fullscreen-xl-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media(max-width:1399.98px){:host ::ng-deep .modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-header,:host ::ng-deep .modal-fullscreen-xxl-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}\n"] }]
|
|
41
|
+
args: [{ selector: 'bs-modal-content', imports: [NgTemplateOutlet, BsOverlayFocusDirective], animations: [FadeInOutAnimation, EnterFromTopAnimation], changeDetection: ChangeDetectionStrategy.OnPush, providers: [BsModalContextService], template: "@if (isOpen()) {\n <div class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"true\"\n tabindex=\"-1\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n </div>\n </div>\n </div>\n\n <div [@fadeInOut]>\n <div class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\n </div>\n}\n", styles: [":host ::ng-deep .fade{transition:opacity .15s linear}@media(prefers-reduced-motion:reduce){:host ::ng-deep .fade{transition:none}}:host ::ng-deep .fade:not(.show){opacity:0}:host ::ng-deep .collapse:not(.show){display:none}:host ::ng-deep .collapsing{height:0;overflow:hidden;transition:height .35s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .collapsing{transition:none}}:host ::ng-deep .collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .collapsing.collapse-horizontal{transition:none}}:host ::ng-deep .modal{--bs-modal-zindex: 1055;--bs-modal-width: 500px;--bs-modal-padding: 1rem;--bs-modal-margin: .5rem;--bs-modal-color: var(--bs-body-color);--bs-modal-bg: var(--bs-body-bg);--bs-modal-border-color: var(--bs-border-color-translucent);--bs-modal-border-width: var(--bs-border-width);--bs-modal-border-radius: var(--bs-border-radius-lg);--bs-modal-box-shadow: var(--bs-box-shadow-sm);--bs-modal-inner-border-radius: calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));--bs-modal-header-padding-x: 1rem;--bs-modal-header-padding-y: 1rem;--bs-modal-header-padding: 1rem 1rem;--bs-modal-header-border-color: var(--bs-border-color);--bs-modal-header-border-width: var(--bs-border-width);--bs-modal-title-line-height: 1.5;--bs-modal-footer-gap: .5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color: var(--bs-border-color);--bs-modal-footer-border-width: var(--bs-border-width);position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}:host ::ng-deep .modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade :host ::ng-deep .modal-dialog{transform:translateY(-50px);transition:transform .3s ease-out}@media(prefers-reduced-motion:reduce){.modal.fade :host ::ng-deep .modal-dialog{transition:none}}.modal.show :host ::ng-deep .modal-dialog{transform:none}.modal.modal-static :host ::ng-deep .modal-dialog{transform:scale(1.02)}:host ::ng-deep .modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}:host ::ng-deep .modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}:host ::ng-deep .modal-dialog-scrollable .modal-body{overflow-y:auto}:host ::ng-deep .modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}:host ::ng-deep .modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}:host ::ng-deep .modal-backdrop{--bs-backdrop-zindex: 1050;--bs-backdrop-bg: #000;--bs-backdrop-opacity: .5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}:host ::ng-deep .modal-backdrop.fade{opacity:0}:host ::ng-deep .modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}:host ::ng-deep .modal-header{display:flex;flex-shrink:0;align-items:center;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}:host ::ng-deep .modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin-top:calc(-.5 * var(--bs-modal-header-padding-y));margin-right:calc(-.5 * var(--bs-modal-header-padding-x));margin-bottom:calc(-.5 * var(--bs-modal-header-padding-y));margin-left:auto}:host ::ng-deep .modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}:host ::ng-deep .modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}:host ::ng-deep .modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}:host ::ng-deep .modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media(min-width:576px){:host ::ng-deep .modal{--bs-modal-margin: 1.75rem;--bs-modal-box-shadow: var(--bs-box-shadow)}:host ::ng-deep .modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}:host ::ng-deep .modal-sm{--bs-modal-width: 300px}}@media(min-width:992px){:host ::ng-deep .modal-lg,:host ::ng-deep .modal-xl{--bs-modal-width: 800px}}@media(min-width:1200px){:host ::ng-deep .modal-xl{--bs-modal-width: 1140px}}:host ::ng-deep .modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen .modal-header,:host ::ng-deep .modal-fullscreen .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen .modal-body{overflow-y:auto}@media(max-width:575.98px){:host ::ng-deep .modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-header,:host ::ng-deep .modal-fullscreen-sm-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media(max-width:767.98px){:host ::ng-deep .modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-md-down .modal-header,:host ::ng-deep .modal-fullscreen-md-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media(max-width:991.98px){:host ::ng-deep .modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-header,:host ::ng-deep .modal-fullscreen-lg-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media(max-width:1199.98px){:host ::ng-deep .modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-header,:host ::ng-deep .modal-fullscreen-xl-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media(max-width:1399.98px){:host ::ng-deep .modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-header,:host ::ng-deep .modal-fullscreen-xxl-down .modal-footer{border-radius:0}:host ::ng-deep .modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}\n"] }]
|
|
22
42
|
}] });
|
|
23
43
|
|
|
24
44
|
const PORTAL_FACTORY = new InjectionToken('ModalPortalFactory');
|
|
@@ -29,6 +49,8 @@ class BsModalHostComponent {
|
|
|
29
49
|
this.parentInjector = inject(Injector);
|
|
30
50
|
this.portalFactory = inject(PORTAL_FACTORY);
|
|
31
51
|
this.componentFactoryResolver = inject(ComponentFactoryResolver);
|
|
52
|
+
this.overlayStack = inject(BsOverlayStackService);
|
|
53
|
+
this.stackToken = null;
|
|
32
54
|
//#region isOpen
|
|
33
55
|
this.isOpen = model(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
34
56
|
//#endregion
|
|
@@ -38,6 +60,13 @@ class BsModalHostComponent {
|
|
|
38
60
|
if (this.componentInstance) {
|
|
39
61
|
this.componentInstance.instance.isOpen.set(value);
|
|
40
62
|
}
|
|
63
|
+
if (value && this.stackToken === null) {
|
|
64
|
+
this.stackToken = this.overlayStack.push();
|
|
65
|
+
}
|
|
66
|
+
else if (!value && this.stackToken !== null) {
|
|
67
|
+
this.overlayStack.release(this.stackToken);
|
|
68
|
+
this.stackToken = null;
|
|
69
|
+
}
|
|
41
70
|
});
|
|
42
71
|
}
|
|
43
72
|
ngAfterViewInit() {
|
|
@@ -61,12 +90,18 @@ class BsModalHostComponent {
|
|
|
61
90
|
}
|
|
62
91
|
ngOnDestroy() {
|
|
63
92
|
this.isOpen.set(false);
|
|
93
|
+
if (this.stackToken !== null) {
|
|
94
|
+
this.overlayStack.release(this.stackToken);
|
|
95
|
+
this.stackToken = null;
|
|
96
|
+
}
|
|
64
97
|
setTimeout(() => this.overlayRef && this.overlayRef.dispose(), 500);
|
|
65
98
|
}
|
|
66
99
|
onKeyDown(event) {
|
|
67
100
|
const ev = event;
|
|
68
101
|
if (this.isOpen() && this.closeOnEscape() && ev.code === 'Escape') {
|
|
69
|
-
this.
|
|
102
|
+
if (this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {
|
|
103
|
+
this.isOpen.set(false);
|
|
104
|
+
}
|
|
70
105
|
}
|
|
71
106
|
}
|
|
72
107
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -106,6 +141,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
106
141
|
}], ctorParameters: () => [] });
|
|
107
142
|
|
|
108
143
|
class BsModalHeaderDirective {
|
|
144
|
+
constructor() {
|
|
145
|
+
this.el = inject(ElementRef);
|
|
146
|
+
this.ids = inject(BsIdService);
|
|
147
|
+
this.context = inject(BsModalContextService, { optional: true });
|
|
148
|
+
// After first render, all sibling host bindings + static attrs on this element
|
|
149
|
+
// have applied. Read an existing id if the consumer set one, otherwise generate
|
|
150
|
+
// and assign — then publish it to the modal context for aria-labelledby.
|
|
151
|
+
afterNextRender(() => {
|
|
152
|
+
let id = this.el.nativeElement.id;
|
|
153
|
+
if (!id) {
|
|
154
|
+
id = this.ids.next('bs-modal-header');
|
|
155
|
+
this.el.nativeElement.id = id;
|
|
156
|
+
}
|
|
157
|
+
this.context?.headerId.set(id);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
109
160
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
110
161
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: BsModalHeaderDirective, isStandalone: true, selector: "[bsModalHeader]", host: { properties: { "class.modal-header": "true" } }, ngImport: i0 }); }
|
|
111
162
|
}
|
|
@@ -117,9 +168,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
117
168
|
'[class.modal-header]': 'true',
|
|
118
169
|
},
|
|
119
170
|
}]
|
|
120
|
-
}] });
|
|
171
|
+
}], ctorParameters: () => [] });
|
|
121
172
|
|
|
122
173
|
class BsModalBodyDirective {
|
|
174
|
+
constructor() {
|
|
175
|
+
this.el = inject(ElementRef);
|
|
176
|
+
this.ids = inject(BsIdService);
|
|
177
|
+
this.context = inject(BsModalContextService, { optional: true });
|
|
178
|
+
afterNextRender(() => {
|
|
179
|
+
let id = this.el.nativeElement.id;
|
|
180
|
+
if (!id) {
|
|
181
|
+
id = this.ids.next('bs-modal-body');
|
|
182
|
+
this.el.nativeElement.id = id;
|
|
183
|
+
}
|
|
184
|
+
this.context?.bodyId.set(id);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
123
187
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalBodyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
124
188
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: BsModalBodyDirective, isStandalone: true, selector: "[bsModalBody]", host: { properties: { "class.modal-body": "true" } }, ngImport: i0 }); }
|
|
125
189
|
}
|
|
@@ -131,7 +195,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
131
195
|
'[class.modal-body]': 'true',
|
|
132
196
|
},
|
|
133
197
|
}]
|
|
134
|
-
}] });
|
|
198
|
+
}], ctorParameters: () => [] });
|
|
135
199
|
|
|
136
200
|
class BsModalFooterDirective {
|
|
137
201
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsModalFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|