@mintplayer/ng-bootstrap 22.30.0 → 22.32.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.
Files changed (149) hide show
  1. package/README.md +12 -11
  2. package/_bootstrap.scss +2 -4
  3. package/a11y/forms/package.json +4 -0
  4. package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs +120 -0
  5. package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs.map +1 -0
  6. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +2 -109
  7. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -1
  9. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +7 -3
  11. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +7 -3
  13. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +12 -5
  15. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -3
  17. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +74 -83
  19. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -0
  21. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +9 -5
  23. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-close.mjs +7 -3
  25. package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +9 -3
  27. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +4 -2
  29. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +4 -2
  31. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +9 -2
  33. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +12 -4
  35. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +3 -1
  37. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +1 -1
  39. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +6 -2
  41. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-for.mjs +8 -4
  43. package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +7 -2
  45. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +40 -12
  47. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +3 -1
  49. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +23 -6
  51. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +16 -4
  53. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +23 -7
  55. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +93 -0
  57. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -0
  58. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +7 -3
  59. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +43 -1
  61. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +15 -6
  63. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -2
  65. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +7 -4
  67. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +4 -2
  69. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +22 -16
  71. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +22 -7
  73. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +13 -6
  75. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -0
  77. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +9 -5
  79. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +7 -3
  81. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +2 -0
  83. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +19 -9
  85. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -2
  87. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -2
  89. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  90. package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +25 -11
  91. package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
  92. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +14 -4
  93. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
  94. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +3 -1
  95. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  96. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +9 -14
  97. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  98. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +5 -2
  99. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  100. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +23 -8
  101. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  102. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +7 -3
  103. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  104. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +4 -1
  105. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  106. package/nav/package.json +4 -0
  107. package/package.json +11 -8
  108. package/types/mintplayer-ng-bootstrap-a11y-forms.d.ts +64 -0
  109. package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -62
  110. package/types/mintplayer-ng-bootstrap-alert.d.ts +1 -0
  111. package/types/mintplayer-ng-bootstrap-badge.d.ts +1 -0
  112. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -0
  113. package/types/mintplayer-ng-bootstrap-button-group.d.ts +1 -0
  114. package/types/mintplayer-ng-bootstrap-card.d.ts +14 -3
  115. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +1 -1
  116. package/types/mintplayer-ng-bootstrap-close.d.ts +1 -0
  117. package/types/mintplayer-ng-bootstrap-datatable.d.ts +4 -2
  118. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
  119. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
  120. package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +1 -0
  121. package/types/mintplayer-ng-bootstrap-for.d.ts +5 -5
  122. package/types/mintplayer-ng-bootstrap-form.d.ts +1 -0
  123. package/types/mintplayer-ng-bootstrap-grid.d.ts +14 -0
  124. package/types/mintplayer-ng-bootstrap-list-group.d.ts +15 -8
  125. package/types/mintplayer-ng-bootstrap-machine.d.ts +13 -2
  126. package/types/mintplayer-ng-bootstrap-modal.d.ts +2 -0
  127. package/types/mintplayer-ng-bootstrap-nav.d.ts +52 -0
  128. package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +1 -0
  129. package/types/mintplayer-ng-bootstrap-navbar.d.ts +17 -1
  130. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
  131. package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -0
  132. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +1 -1
  133. package/types/mintplayer-ng-bootstrap-placeholder.d.ts +10 -10
  134. package/types/mintplayer-ng-bootstrap-popover.d.ts +3 -0
  135. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +2 -0
  136. package/types/mintplayer-ng-bootstrap-radio.d.ts +1 -1
  137. package/types/mintplayer-ng-bootstrap-range.d.ts +1 -0
  138. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -0
  139. package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
  140. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +1 -1
  141. package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -7
  142. package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +7 -1
  143. package/types/mintplayer-ng-bootstrap-table.d.ts +2 -6
  144. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
  145. package/types/mintplayer-ng-bootstrap-toast.d.ts +2 -0
  146. package/container/package.json +0 -4
  147. package/fesm2022/mintplayer-ng-bootstrap-container.mjs +0 -18
  148. package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +0 -1
  149. package/types/mintplayer-ng-bootstrap-container.d.ts +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-offcanvas.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/providers/offcanvas-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/services/offcanvas-context.service.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas/offcanvas.component.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas/offcanvas.component.html","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-header/offcanvas-header.component.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-header/offcanvas-header.component.html","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-body/offcanvas-body.component.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-body/offcanvas-body.component.html","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/providers/portal-factory.provider.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-host/offcanvas-host.component.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-host/offcanvas-host.component.html","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/directives/offcanvas-close/offcanvas-close.directive.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/directives/offcanvas-content/offcanvas-content.directive.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/directives/offcanvas-push/offcanvas-push.directive.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/mintplayer-ng-bootstrap-offcanvas.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const OFFCANVAS_CONTENT = new InjectionToken<TemplateRef<any>>('OffcanvasContent');","import { Injectable, signal } from '@angular/core';\n\n/**\n * Component-scoped state shared between BsOffcanvasComponent (the dialog renderer)\n * and the bs-offcanvas-header / bs-offcanvas-body components inside the user's\n * template. Provides the ids for aria-labelledby and aria-describedby.\n */\n@Injectable()\nexport class BsOffcanvasContextService {\n readonly headerId = signal<string | null>(null);\n readonly bodyId = signal<string | null>(null);\n}\n","import { isPlatformServer, NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, effect, inject, Injector, output, PLATFORM_ID, signal, TemplateRef, untracked, ChangeDetectionStrategy } from '@angular/core';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { BsOverlayFocusDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { OFFCANVAS_CONTENT } from '../../providers/offcanvas-content.provider';\nimport { BsOffcanvasContextService } from '../../services/offcanvas-context.service';\n\n/** Duration of the panel's slide transition (Bootstrap's $offcanvas-transition-duration). */\nexport const OFFCANVAS_TRANSITION_MS = 300;\n\n@Component({\n selector: 'bs-offcanvas-holder',\n host: {\n '(document:keydown.escape)': 'onEscape()',\n },\n templateUrl: './offcanvas.component.html',\n styleUrls: ['./offcanvas.component.scss'],\n imports: [NgTemplateOutlet, BsOverlayFocusDirective],\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [BsOffcanvasContextService],\n})\nexport class BsOffcanvasComponent {\n\n contentTemplate = inject<TemplateRef<any>>(OFFCANVAS_CONTENT);\n private platformId = inject(PLATFORM_ID);\n context = inject(BsOffcanvasContextService);\n injector = inject(Injector);\n\n constructor() {\n // Effect to handle position changes - disable transition temporarily\n effect(() => {\n const position = this.position();\n // Use untracked to avoid creating dependency on disableTransition\n untracked(() => {\n this.disableTransition.set(true);\n this.offcanvasClass.set(`offcanvas-${position}`);\n // Re-enable transitions after browser has processed position change\n if (!isPlatformServer(this.platformId)) {\n requestAnimationFrame(() => {\n this.disableTransition.set(false);\n });\n }\n });\n });\n\n // Effect to handle visibility changes\n effect(() => {\n const isVisible = this.isVisible();\n untracked(() => {\n if (isVisible) {\n // When showing: set visibility immediately, then add .show class after position is applied\n this.visibility.set('visible');\n // Delay adding .show class to allow position to be applied first\n if (!isPlatformServer(this.platformId)) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n this.show.set(true);\n });\n });\n }\n } else {\n // When hiding: remove .show class immediately, delay visibility for animation\n this.show.set(false);\n setTimeout(() => {\n if (!this.isVisible()) {\n this.visibility.set('hidden');\n }\n }, OFFCANVAS_TRANSITION_MS);\n }\n });\n });\n }\n\n // Core state signals\n position = signal<Position>('bottom');\n size = signal<number | null>(null);\n isVisible = signal<boolean>(false);\n hasBackdrop = signal<boolean>(false);\n\n // Internal state signals\n disableTransition = signal<boolean>(false);\n offcanvasClass = signal<string | null>(null);\n visibility = signal<string>('hidden');\n show = signal<boolean>(false);\n\n // Computed signals\n width = computed(() => {\n const position = this.position();\n const size = this.size();\n return ['start', 'end'].includes(position) ? size : null;\n });\n\n height = computed(() => {\n const position = this.position();\n const size = this.size();\n return ['top', 'bottom'].includes(position) ? size : null;\n });\n\n overflowClass = computed(() => {\n const position = this.position();\n return ['top', 'bottom'].includes(position) ? 'overflow-y-hidden' : 'overflow-x-hidden';\n });\n\n showBackdrop = computed(() => {\n return this.hasBackdrop() && this.isVisible();\n });\n\n // Outputs\n isVisibleChange = output<boolean>();\n backdropClick = output<MouseEvent>();\n\n onBackdropClick(ev: MouseEvent) {\n this.backdropClick.emit(ev);\n }\n\n /**\n * Escape closes — the dialog pattern's universal exit, and the panel traps\n * focus while open (bsOverlayFocus), so without this a keyboard user had no\n * way out at all.\n */\n onEscape() {\n if (!this.isVisible()) return;\n this.isVisible.set(false);\n this.isVisibleChange.emit(false);\n }\n\n}\n","@if (showBackdrop()) {\n <div [@fadeInOut]=\"{value: ':leave', params: {duration: '300ms'} }\">\n <div class=\"modal-backdrop show\" (click)=\"onBackdropClick($event)\" aria-hidden=\"true\"></div>\n </div>\n}\n<div class=\"offcanvas\"\n [class.show]=\"show()\"\n [class.disable-transition]=\"disableTransition()\"\n [class]=\"[offcanvasClass(), overflowClass()]\"\n [style.height.px]=\"height()\"\n [style.width.px]=\"width()\"\n role=\"dialog\"\n [attr.aria-modal]=\"hasBackdrop() ? 'true' : null\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"isVisible()\"\n tabindex=\"-1\">\n <ng-container *ngTemplateOutlet=\"contentTemplate; injector: injector\"></ng-container>\n</div>\n","import { afterNextRender, Component, ElementRef, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsOffcanvasContextService } from '../../services/offcanvas-context.service';\n\n@Component({\n selector: 'bs-offcanvas-header',\n templateUrl: './offcanvas-header.component.html',\n styleUrls: ['./offcanvas-header.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OffcanvasHeaderComponent {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n private context = inject(BsOffcanvasContextService, { optional: true });\n\n constructor() {\n afterNextRender(() => {\n const headerDiv = this.el.nativeElement.querySelector<HTMLElement>('.offcanvas-header')!;\n let id = headerDiv.id;\n if (!id) {\n id = this.ids.next('bs-offcanvas-header');\n headerDiv.id = id;\n }\n this.context?.headerId.set(id);\n });\n }\n}\n","<div class=\"offcanvas-header\">\n <ng-content></ng-content>\n</div>","import { afterNextRender, Component, ElementRef, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsOffcanvasContextService } from '../../services/offcanvas-context.service';\n\n@Component({\n selector: 'bs-offcanvas-body',\n templateUrl: './offcanvas-body.component.html',\n styleUrls: ['./offcanvas-body.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OffcanvasBodyComponent {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n private context = inject(BsOffcanvasContextService, { optional: true });\n\n readonly noPadding = input(false);\n\n constructor() {\n afterNextRender(() => {\n const bodyDiv = this.el.nativeElement.querySelector<HTMLElement>('.offcanvas-body')!;\n let id = bodyDiv.id;\n if (!id) {\n id = this.ids.next('bs-offcanvas-body');\n bodyDiv.id = id;\n }\n this.context?.bodyId.set(id);\n });\n }\n}\n","<div class=\"offcanvas-body\" [class.p-0]=\"noPadding()\">\n <ng-content></ng-content>\n</div>","import { ComponentPortal } from \"@angular/cdk/portal\";\nimport { InjectionToken, Injector } from \"@angular/core\";\n\nexport const PORTAL_FACTORY = new InjectionToken<(injector: Injector) => ComponentPortal<any>>('OffcanvasPortalFactory');","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { AfterViewInit, ApplicationRef, Component, ComponentRef, effect, inject, Injector, model, OnDestroy, output, OutputRefSubscription, signal, TemplateRef, ChangeDetectionStrategy} from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { OFFCANVAS_CONTENT } from '../../providers/offcanvas-content.provider';\nimport { PORTAL_FACTORY } from '../../providers/portal-factory.provider';\nimport { BsOffcanvasComponent, OFFCANVAS_TRANSITION_MS } from '../offcanvas/offcanvas.component';\n\n@Component({\n selector: 'bs-offcanvas',\n templateUrl: './offcanvas-host.component.html',\n styleUrls: ['./offcanvas-host.component.scss'],\n imports: [BsHasOverlayComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: PORTAL_FACTORY,\n useValue: (injector: Injector) => {\n return new ComponentPortal(BsOffcanvasComponent, null, injector);\n }\n }],\n})\nexport class BsOffcanvasHostComponent implements AfterViewInit, OnDestroy {\n private overlayService = inject(Overlay);\n private rootInjector = inject(Injector);\n private appRef = inject(ApplicationRef);\n private portalFactory = inject<(injector: Injector) => ComponentPortal<any>>(PORTAL_FACTORY);\n\n constructor() {\n // Effect to sync isVisible with the inner component\n effect(() => {\n const isVisible = this.isVisible();\n if (this.component) {\n this.component.instance.isVisible.set(isVisible);\n }\n });\n\n // Effect to sync position with the inner component\n effect(() => {\n const position = this.position();\n if (this.component && this.viewInited()) {\n this.component.instance.position.set(position);\n }\n });\n\n // Effect to sync size with the inner component\n effect(() => {\n const size = this.size();\n if (this.component && this.viewInited()) {\n this.component.instance.size.set(size);\n }\n });\n\n // Effect to sync hasBackdrop with the inner component\n effect(() => {\n const hasBackdrop = this.hasBackdrop();\n if (this.component && this.viewInited()) {\n this.component.instance.hasBackdrop.set(hasBackdrop);\n }\n });\n }\n\n content!: TemplateRef<any>;\n overlayRef!: OverlayRef;\n component!: ComponentRef<BsOffcanvasComponent>;\n private backdropClickSubscription?: OutputRefSubscription;\n\n // Signals\n viewInited = signal<boolean>(false);\n isVisible = model<boolean>(false);\n size = model<number | null>(null);\n position = model<Position>('bottom');\n hasBackdrop = model<boolean>(false);\n\n backdropClick = output<MouseEvent>();\n\n ngAfterViewInit() {\n const injector = Injector.create({\n providers: [\n { provide: OFFCANVAS_CONTENT, useValue: this.content },\n ],\n parent: this.rootInjector,\n });\n\n const portal = this.portalFactory(injector);\n this.overlayRef = this.overlayService.create({\n scrollStrategy: this.overlayService.scrollStrategies.reposition(),\n positionStrategy: this.overlayService.position().global()\n .top('0').left('0').bottom('0').right('0'),\n hasBackdrop: false\n });\n\n this.component = this.overlayRef.attach<BsOffcanvasComponent>(portal);\n\n this.backdropClickSubscription = this.component.instance.backdropClick.subscribe((ev) => this.backdropClick.emit(ev));\n\n // Initialize the inner component with current values\n this.component.instance.isVisible.set(this.isVisible());\n this.component.instance.position.set(this.position());\n this.component.instance.size.set(this.size());\n this.component.instance.hasBackdrop.set(this.hasBackdrop());\n\n this.viewInited.set(true);\n }\n\n /**\n * Plays the panel's hide transition, then disposes the overlay. The hide is written to the\n * panel directly: this host's sync effects are destroyed with it and would never deliver it.\n * If the application is torn down before the transition ends, the pending dispose is\n * cancelled and runs at once, so no timer outlives the app.\n */\n ngOnDestroy() {\n this.backdropClickSubscription?.unsubscribe();\n if (!this.overlayRef) return;\n const overlayRef = this.overlayRef;\n this.component.instance.isVisible.set(false);\n const dispose = () => {\n clearTimeout(timer);\n unregister();\n overlayRef.dispose();\n };\n const timer = setTimeout(dispose, OFFCANVAS_TRANSITION_MS);\n const unregister = this.appRef.onDestroy(dispose);\n }\n\n}\n","<bs-has-overlay></bs-has-overlay>\n","import { Directive, inject } from '@angular/core';\nimport { BsOffcanvasHostComponent } from '../../components/offcanvas-host/offcanvas-host.component';\n\n@Directive({\n selector: '[bsOffcanvasClose]',\n host: {\n '[attr.aria-label]': '\"Close\"',\n '(click)': 'onClick()',\n },\n})\nexport class BsOffcanvasCloseDirective {\n private offcanvas = inject(BsOffcanvasHostComponent);\n\n onClick() {\n this.offcanvas.isVisible.set(false);\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { BsOffcanvasHostComponent } from '../../components/offcanvas-host/offcanvas-host.component';\n\n@Directive({\n selector: '[bsOffcanvasContent]',\n})\nexport class BsOffcanvasContentDirective {\n constructor() {\n const offcanvasHost = inject(BsOffcanvasHostComponent);\n const template = inject(TemplateRef);\n offcanvasHost.content = template;\n }\n}\n","import { animate, AnimationBuilder, AnimationMetadata, style } from '@angular/animations';\nimport { Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { BsOffcanvasHostComponent } from '../../components';\n\n@Directive({\n selector: '[bsOffcanvasPush]',\n})\nexport class BsOffcanvasPushDirective {\n private element = inject<ElementRef<HTMLElement>>(ElementRef);\n private builder = inject(AnimationBuilder);\n\n constructor() {\n let previousIsVisible: boolean | null = null;\n\n effect(() => {\n const offcanvas = this.offcanvas();\n if (!offcanvas) return;\n\n const isVisible = offcanvas.isVisible();\n\n // Skip the first run (initial state)\n if (previousIsVisible === null) {\n previousIsVisible = isVisible;\n return;\n }\n\n // Skip if no change\n if (previousIsVisible === isVisible) return;\n\n previousIsVisible = isVisible;\n\n let data: AnimationMetadata[];\n if (isVisible) {\n data = [\n style({ 'margin-left': '0', 'margin-right': '0' }),\n animate('250ms', style({ 'margin-left': '400px', 'margin-right': '-400px' })),\n ];\n let el = this.element.nativeElement;\n while (el.parentElement && !['scroll', 'visible'].includes(el.parentElement.style.overflowX)) {\n el = el.parentElement;\n }\n if (this.element.nativeElement.parentElement) {\n // Remember the value of the element that is clipped, which is only the direct\n // parent when the walk stopped immediately.\n this.initialOverflowX = { value: el.style.overflowX, element: el };\n el.style.overflowX = 'hidden';\n }\n } else {\n data = [\n style({ 'margin-left': '400px', 'margin-right': '-400px' }),\n animate('250ms', style({ 'margin-left': '0', 'margin-right': '0' })),\n ];\n }\n const b = this.builder.build(data);\n const player = b.create(this.element.nativeElement, { });\n\n if (!isVisible) {\n player.onDone(() => {\n if (this.element.nativeElement.parentElement && this.initialOverflowX) {\n this.initialOverflowX.element.style.overflowX = this.initialOverflowX.value;\n }\n });\n }\n\n player.play();\n });\n }\n\n private initialOverflowX?: {element: HTMLElement, value: string};\n\n offcanvas = input<BsOffcanvasHostComponent | null>(null, { alias: 'bsOffcanvasPush' });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAEO,MAAM,iBAAiB,GAAG,IAAI,cAAc,CAAmB,kBAAkB,CAAC;;ACAzF;;;;AAIG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;QAEW,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI;qFAAC;QACtC,IAAA,CAAA,MAAM,GAAG,MAAM,CAAgB,IAAI;mFAAC;AAC9C,IAAA;8GAHY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAzB,yBAAyB,EAAA,CAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC;;;ACCD;AACO,MAAM,uBAAuB,GAAG;MAc1B,oBAAoB,CAAA;AAO/B,IAAA,WAAA,GAAA;AALA,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAmB,iBAAiB,CAAC;AACrD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AACxC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC3C,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;;QAgD3B,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAW,QAAQ;qFAAC;QACrC,IAAA,CAAA,IAAI,GAAG,MAAM,CAAgB,IAAI;iFAAC;QAClC,IAAA,CAAA,SAAS,GAAG,MAAM,CAAU,KAAK;sFAAC;QAClC,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a,CAAC,aAAa,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACrE,wBAAA,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK;oBAC7E;AACF,gBAAA,CAAC,CAAC;YACJ;YAEA,MAAM,CAAC,IAAI,EAAE;AACf,QAAA,CAAC,CAAC;IACJ;8GA3DW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC9B,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-offcanvas.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/providers/offcanvas-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/services/offcanvas-context.service.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas/offcanvas.component.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas/offcanvas.component.html","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-header/offcanvas-header.component.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-header/offcanvas-header.component.html","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-body/offcanvas-body.component.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-body/offcanvas-body.component.html","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/providers/portal-factory.provider.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-host/offcanvas-host.component.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/components/offcanvas-host/offcanvas-host.component.html","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/directives/offcanvas-close/offcanvas-close.directive.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/directives/offcanvas-content/offcanvas-content.directive.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/src/directives/offcanvas-push/offcanvas-push.directive.ts","../../../../libs/mintplayer-ng-bootstrap/offcanvas/mintplayer-ng-bootstrap-offcanvas.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const OFFCANVAS_CONTENT = new InjectionToken<TemplateRef<any>>('OffcanvasContent');","import { Injectable, signal } from '@angular/core';\n\n/**\n * Component-scoped state shared between BsOffcanvasComponent (the dialog renderer)\n * and the bs-offcanvas-header / bs-offcanvas-body components inside the user's\n * template. Provides the ids for aria-labelledby and aria-describedby.\n */\n@Injectable()\nexport class BsOffcanvasContextService {\n readonly headerId = signal<string | null>(null);\n readonly bodyId = signal<string | null>(null);\n}\n","import { isPlatformServer, NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, effect, inject, Injector, output, PLATFORM_ID, signal, TemplateRef, untracked, ChangeDetectionStrategy } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapModal } from '@mintplayer/ui-core/bootstrap/modal';\nimport { bootstrapOffcanvas } from '@mintplayer/ui-core/bootstrap/offcanvas';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { BsOverlayFocusDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { OFFCANVAS_CONTENT } from '../../providers/offcanvas-content.provider';\nimport { BsOffcanvasContextService } from '../../services/offcanvas-context.service';\n\n/** Duration of the panel's slide transition (Bootstrap's $offcanvas-transition-duration). */\nexport const OFFCANVAS_TRANSITION_MS = 300;\n\n@Component({\n selector: 'bs-offcanvas-holder',\n host: {\n '(document:keydown.escape)': 'onEscape()',\n },\n templateUrl: './offcanvas.component.html',\n styleUrls: ['./offcanvas.component.scss'],\n imports: [NgTemplateOutlet, BsOverlayFocusDirective],\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [BsOffcanvasContextService],\n})\nexport class BsOffcanvasComponent {\n\n contentTemplate = inject<TemplateRef<any>>(OFFCANVAS_CONTENT);\n private platformId = inject(PLATFORM_ID);\n context = inject(BsOffcanvasContextService);\n injector = inject(Injector);\n\n constructor() {\n // #452: the modal and offcanvas partials ship with this component, scoped to the elements it stamps (data-mps=\"offcanvas\").\n useBootstrap(bootstrapModal, bootstrapOffcanvas);\n // Effect to handle position changes - disable transition temporarily\n effect(() => {\n const position = this.position();\n // Use untracked to avoid creating dependency on disableTransition\n untracked(() => {\n this.disableTransition.set(true);\n this.offcanvasClass.set(`offcanvas-${position}`);\n // Re-enable transitions after browser has processed position change\n if (!isPlatformServer(this.platformId)) {\n requestAnimationFrame(() => {\n this.disableTransition.set(false);\n });\n }\n });\n });\n\n // Effect to handle visibility changes\n effect(() => {\n const isVisible = this.isVisible();\n untracked(() => {\n if (isVisible) {\n // When showing: set visibility immediately, then add .show class after position is applied\n this.visibility.set('visible');\n // Delay adding .show class to allow position to be applied first\n if (!isPlatformServer(this.platformId)) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n this.show.set(true);\n });\n });\n }\n } else {\n // When hiding: remove .show class immediately, delay visibility for animation\n this.show.set(false);\n setTimeout(() => {\n if (!this.isVisible()) {\n this.visibility.set('hidden');\n }\n }, OFFCANVAS_TRANSITION_MS);\n }\n });\n });\n }\n\n // Core state signals\n position = signal<Position>('bottom');\n size = signal<number | null>(null);\n isVisible = signal<boolean>(false);\n hasBackdrop = signal<boolean>(false);\n\n // Internal state signals\n disableTransition = signal<boolean>(false);\n offcanvasClass = signal<string | null>(null);\n visibility = signal<string>('hidden');\n show = signal<boolean>(false);\n\n // Computed signals\n width = computed(() => {\n const position = this.position();\n const size = this.size();\n return ['start', 'end'].includes(position) ? size : null;\n });\n\n height = computed(() => {\n const position = this.position();\n const size = this.size();\n return ['top', 'bottom'].includes(position) ? size : null;\n });\n\n overflowClass = computed(() => {\n const position = this.position();\n return ['top', 'bottom'].includes(position) ? 'overflow-y-hidden' : 'overflow-x-hidden';\n });\n\n showBackdrop = computed(() => {\n return this.hasBackdrop() && this.isVisible();\n });\n\n // Outputs\n isVisibleChange = output<boolean>();\n backdropClick = output<MouseEvent>();\n\n onBackdropClick(ev: MouseEvent) {\n this.backdropClick.emit(ev);\n }\n\n /**\n * Escape closes — the dialog pattern's universal exit, and the panel traps\n * focus while open (bsOverlayFocus), so without this a keyboard user had no\n * way out at all.\n */\n onEscape() {\n if (!this.isVisible()) return;\n this.isVisible.set(false);\n this.isVisibleChange.emit(false);\n }\n\n}\n","@if (showBackdrop()) {\n <div data-mps=\"offcanvas\" [@fadeInOut]=\"{value: ':leave', params: {duration: '300ms'} }\">\n <div data-mps=\"offcanvas\" class=\"modal-backdrop show\" (click)=\"onBackdropClick($event)\" aria-hidden=\"true\"></div>\n </div>\n}\n<div data-mps=\"offcanvas\" class=\"offcanvas\"\n [class.show]=\"show()\"\n [class.disable-transition]=\"disableTransition()\"\n [class]=\"[offcanvasClass(), overflowClass()]\"\n [style.height.px]=\"height()\"\n [style.width.px]=\"width()\"\n role=\"dialog\"\n [attr.aria-modal]=\"hasBackdrop() ? 'true' : null\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"isVisible()\"\n tabindex=\"-1\">\n <ng-container *ngTemplateOutlet=\"contentTemplate; injector: injector\"></ng-container>\n</div>\n","import { afterNextRender, Component, ElementRef, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapOffcanvas } from '@mintplayer/ui-core/bootstrap/offcanvas';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsOffcanvasContextService } from '../../services/offcanvas-context.service';\n\n@Component({\n selector: 'bs-offcanvas-header',\n templateUrl: './offcanvas-header.component.html',\n styleUrls: ['./offcanvas-header.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OffcanvasHeaderComponent {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n private context = inject(BsOffcanvasContextService, { optional: true });\n\n constructor() {\n // #452: the offcanvas partial ships with this component, scoped to the elements it stamps (data-mps=\"offcanvas\").\n useBootstrap(bootstrapOffcanvas);\n afterNextRender(() => {\n const headerDiv = this.el.nativeElement.querySelector<HTMLElement>('.offcanvas-header')!;\n let id = headerDiv.id;\n if (!id) {\n id = this.ids.next('bs-offcanvas-header');\n headerDiv.id = id;\n }\n this.context?.headerId.set(id);\n });\n }\n}\n","<div data-mps=\"offcanvas\" class=\"offcanvas-header\">\n <ng-content></ng-content>\n</div>","import { afterNextRender, Component, ElementRef, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapOffcanvas } from '@mintplayer/ui-core/bootstrap/offcanvas';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsOffcanvasContextService } from '../../services/offcanvas-context.service';\n\n@Component({\n selector: 'bs-offcanvas-body',\n templateUrl: './offcanvas-body.component.html',\n styleUrls: ['./offcanvas-body.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OffcanvasBodyComponent {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n private context = inject(BsOffcanvasContextService, { optional: true });\n\n readonly noPadding = input(false);\n\n constructor() {\n // #452: the offcanvas partial ships with this component, scoped to the elements it stamps (data-mps=\"offcanvas\").\n useBootstrap(bootstrapOffcanvas);\n afterNextRender(() => {\n const bodyDiv = this.el.nativeElement.querySelector<HTMLElement>('.offcanvas-body')!;\n let id = bodyDiv.id;\n if (!id) {\n id = this.ids.next('bs-offcanvas-body');\n bodyDiv.id = id;\n }\n this.context?.bodyId.set(id);\n });\n }\n}\n","<div data-mps=\"offcanvas\" class=\"offcanvas-body\" [class.p-0]=\"noPadding()\">\n <ng-content></ng-content>\n</div>","import { ComponentPortal } from \"@angular/cdk/portal\";\nimport { InjectionToken, Injector } from \"@angular/core\";\n\nexport const PORTAL_FACTORY = new InjectionToken<(injector: Injector) => ComponentPortal<any>>('OffcanvasPortalFactory');","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { AfterViewInit, ApplicationRef, Component, ComponentRef, effect, inject, Injector, model, OnDestroy, output, OutputRefSubscription, signal, TemplateRef, ChangeDetectionStrategy} from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { OFFCANVAS_CONTENT } from '../../providers/offcanvas-content.provider';\nimport { PORTAL_FACTORY } from '../../providers/portal-factory.provider';\nimport { BsOffcanvasComponent, OFFCANVAS_TRANSITION_MS } from '../offcanvas/offcanvas.component';\n\n@Component({\n selector: 'bs-offcanvas',\n templateUrl: './offcanvas-host.component.html',\n styleUrls: ['./offcanvas-host.component.scss'],\n imports: [BsHasOverlayComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: PORTAL_FACTORY,\n useValue: (injector: Injector) => {\n return new ComponentPortal(BsOffcanvasComponent, null, injector);\n }\n }],\n})\nexport class BsOffcanvasHostComponent implements AfterViewInit, OnDestroy {\n private overlayService = inject(Overlay);\n private rootInjector = inject(Injector);\n private appRef = inject(ApplicationRef);\n private portalFactory = inject<(injector: Injector) => ComponentPortal<any>>(PORTAL_FACTORY);\n\n constructor() {\n // Effect to sync isVisible with the inner component\n effect(() => {\n const isVisible = this.isVisible();\n if (this.component) {\n this.component.instance.isVisible.set(isVisible);\n }\n });\n\n // Effect to sync position with the inner component\n effect(() => {\n const position = this.position();\n if (this.component && this.viewInited()) {\n this.component.instance.position.set(position);\n }\n });\n\n // Effect to sync size with the inner component\n effect(() => {\n const size = this.size();\n if (this.component && this.viewInited()) {\n this.component.instance.size.set(size);\n }\n });\n\n // Effect to sync hasBackdrop with the inner component\n effect(() => {\n const hasBackdrop = this.hasBackdrop();\n if (this.component && this.viewInited()) {\n this.component.instance.hasBackdrop.set(hasBackdrop);\n }\n });\n }\n\n content!: TemplateRef<any>;\n overlayRef!: OverlayRef;\n component!: ComponentRef<BsOffcanvasComponent>;\n private backdropClickSubscription?: OutputRefSubscription;\n\n // Signals\n viewInited = signal<boolean>(false);\n isVisible = model<boolean>(false);\n size = model<number | null>(null);\n position = model<Position>('bottom');\n hasBackdrop = model<boolean>(false);\n\n backdropClick = output<MouseEvent>();\n\n ngAfterViewInit() {\n const injector = Injector.create({\n providers: [\n { provide: OFFCANVAS_CONTENT, useValue: this.content },\n ],\n parent: this.rootInjector,\n });\n\n const portal = this.portalFactory(injector);\n this.overlayRef = this.overlayService.create({\n scrollStrategy: this.overlayService.scrollStrategies.reposition(),\n positionStrategy: this.overlayService.position().global()\n .top('0').left('0').bottom('0').right('0'),\n hasBackdrop: false\n });\n\n this.component = this.overlayRef.attach<BsOffcanvasComponent>(portal);\n\n this.backdropClickSubscription = this.component.instance.backdropClick.subscribe((ev) => this.backdropClick.emit(ev));\n\n // Initialize the inner component with current values\n this.component.instance.isVisible.set(this.isVisible());\n this.component.instance.position.set(this.position());\n this.component.instance.size.set(this.size());\n this.component.instance.hasBackdrop.set(this.hasBackdrop());\n\n this.viewInited.set(true);\n }\n\n /**\n * Plays the panel's hide transition, then disposes the overlay. The hide is written to the\n * panel directly: this host's sync effects are destroyed with it and would never deliver it.\n * If the application is torn down before the transition ends, the pending dispose is\n * cancelled and runs at once, so no timer outlives the app.\n */\n ngOnDestroy() {\n this.backdropClickSubscription?.unsubscribe();\n if (!this.overlayRef) return;\n const overlayRef = this.overlayRef;\n this.component.instance.isVisible.set(false);\n const dispose = () => {\n clearTimeout(timer);\n unregister();\n overlayRef.dispose();\n };\n const timer = setTimeout(dispose, OFFCANVAS_TRANSITION_MS);\n const unregister = this.appRef.onDestroy(dispose);\n }\n\n}\n","<bs-has-overlay></bs-has-overlay>\n","import { Directive, inject } from '@angular/core';\nimport { BsOffcanvasHostComponent } from '../../components/offcanvas-host/offcanvas-host.component';\n\n@Directive({\n selector: '[bsOffcanvasClose]',\n host: {\n '[attr.aria-label]': '\"Close\"',\n '(click)': 'onClick()',\n },\n})\nexport class BsOffcanvasCloseDirective {\n private offcanvas = inject(BsOffcanvasHostComponent);\n\n onClick() {\n this.offcanvas.isVisible.set(false);\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { BsOffcanvasHostComponent } from '../../components/offcanvas-host/offcanvas-host.component';\n\n@Directive({\n selector: '[bsOffcanvasContent]',\n})\nexport class BsOffcanvasContentDirective {\n constructor() {\n const offcanvasHost = inject(BsOffcanvasHostComponent);\n const template = inject(TemplateRef);\n offcanvasHost.content = template;\n }\n}\n","import { animate, AnimationBuilder, AnimationMetadata, style } from '@angular/animations';\nimport { Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { BsOffcanvasHostComponent } from '../../components';\n\n@Directive({\n selector: '[bsOffcanvasPush]',\n})\nexport class BsOffcanvasPushDirective {\n private element = inject<ElementRef<HTMLElement>>(ElementRef);\n private builder = inject(AnimationBuilder);\n\n constructor() {\n let previousIsVisible: boolean | null = null;\n\n effect(() => {\n const offcanvas = this.offcanvas();\n if (!offcanvas) return;\n\n const isVisible = offcanvas.isVisible();\n\n // Skip the first run (initial state)\n if (previousIsVisible === null) {\n previousIsVisible = isVisible;\n return;\n }\n\n // Skip if no change\n if (previousIsVisible === isVisible) return;\n\n previousIsVisible = isVisible;\n\n let data: AnimationMetadata[];\n if (isVisible) {\n data = [\n style({ 'margin-left': '0', 'margin-right': '0' }),\n animate('250ms', style({ 'margin-left': '400px', 'margin-right': '-400px' })),\n ];\n let el = this.element.nativeElement;\n while (el.parentElement && !['scroll', 'visible'].includes(el.parentElement.style.overflowX)) {\n el = el.parentElement;\n }\n if (this.element.nativeElement.parentElement) {\n // Remember the value of the element that is clipped, which is only the direct\n // parent when the walk stopped immediately.\n this.initialOverflowX = { value: el.style.overflowX, element: el };\n el.style.overflowX = 'hidden';\n }\n } else {\n data = [\n style({ 'margin-left': '400px', 'margin-right': '-400px' }),\n animate('250ms', style({ 'margin-left': '0', 'margin-right': '0' })),\n ];\n }\n const b = this.builder.build(data);\n const player = b.create(this.element.nativeElement, { });\n\n if (!isVisible) {\n player.onDone(() => {\n if (this.element.nativeElement.parentElement && this.initialOverflowX) {\n this.initialOverflowX.element.style.overflowX = this.initialOverflowX.value;\n }\n });\n }\n\n player.play();\n });\n }\n\n private initialOverflowX?: {element: HTMLElement, value: string};\n\n offcanvas = input<BsOffcanvasHostComponent | null>(null, { alias: 'bsOffcanvasPush' });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAEO,MAAM,iBAAiB,GAAG,IAAI,cAAc,CAAmB,kBAAkB,CAAC;;ACAzF;;;;AAIG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;QAEW,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI;qFAAC;QACtC,IAAA,CAAA,MAAM,GAAG,MAAM,CAAgB,IAAI;mFAAC;AAC9C,IAAA;8GAHY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;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AAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC9B,iBAAA;;;ACND;;AAEG;;;;"}
@@ -2,8 +2,9 @@ import * as i0 from '@angular/core';
2
2
  import { inject, Injector, DestroyRef, signal, forwardRef, Directive, ElementRef, computed, input, booleanAttribute, model, output, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
4
4
  import { otpInputCore, otpInputScopedStyles } from '@mintplayer/ui-core/otp-input';
5
- import * as i2 from '@mintplayer/ng-bootstrap/a11y';
6
- import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y';
5
+ import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
6
+ import * as i2 from '@mintplayer/ng-bootstrap/a11y/forms';
7
+ import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';
7
8
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
9
 
9
10
  /**
@@ -156,6 +157,7 @@ class BsOtpInputComponent {
156
157
  this.#core = useCore(otpInputCore, { inputs: extendInputs(() => ({ groups: this.groups(), type: this.type(), letterCase: this.letterCase(), size: this.size(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), name: this.name(), inputLabel: this.inputLabel(), value: this.value() })), idPrefix: 'bs-otp-input', outputs: { valueChange: this.valuechange, complete: this.complete }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'otp-input' }), models: { value: this.value } });
157
158
  /** The template's props. */
158
159
  this.props = this.#core.props;
160
+ useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
159
161
  useScopedStyles('otp-input', otpInputScopedStyles);
160
162
  }
161
163
  /** Empties the code, and reports it. */
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-otp-input.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/otp-input/src/value-accessor/otp-input-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/otp-input/src/otp-input.angular.ts","../../../../libs/mintplayer-ng-bootstrap/otp-input/src/generated/otp-input.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/otp-input/src/generated/otp-input.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/otp-input/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/otp-input/mintplayer-ng-bootstrap-otp-input.ts"],"sourcesContent":["import { DestroyRef, Directive, ElementRef, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsOtpInputComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-otp-input` (a host directive of the\n * generated component, see `otp-input.angular.ts`). A bound form control drives\n * the code through `viewValue`; every change the user makes (typing, paste,\n * `clear()`, a layout change that drops characters) reaches the form through\n * the component's `value` model, which a form write never touches.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsOtpInputValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsOtpInputValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the code: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal('');\n readonly disabled = signal(false);\n\n private onChange: (value: string) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const sub = this.injector.get(BsOtpInputComponent).value.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null | undefined): void {\n this.viewValue.set(value ?? '');\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n\n/**\n * `focus()` on the `bs-otp-input` host moves into its input, so a directive that\n * focuses the element it sits on (`autofocus` through FocusOnLoadDirective)\n * reaches the field.\n */\n@Directive({})\nexport class BsOtpInputFocusDirective {\n constructor() {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n Object.defineProperty(host, 'focus', {\n // Before the first render there is no input yet; try again once it exists.\n value: (options?: FocusOptions) => {\n const input = host.querySelector('input');\n if (input) input.focus(options);\n else queueMicrotask(() => host.querySelector('input')?.focus(options));\n },\n configurable: true,\n writable: true,\n });\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport type { OtpInputInputs } from '@mintplayer/ui-core/otp-input';\nimport { BsOtpInputFocusDirective, BsOtpInputValueAccessor } from './value-accessor/otp-input-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-otp-input` (PRD #437 D10 escape\n * hatch): Angular forms, and host focus. A bound form control drives the value\n * and the disabled state, and its validity reaches the input's ARIA and message.\n */\n\nexport const hostDirectives = [\n BsOtpInputValueAccessor,\n BsOtpInputFocusDirective,\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => OtpInputInputs): () => OtpInputInputs {\n const accessor = inject(BsOtpInputValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<OtpInputInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n invalid: value.invalid || validity.invalid(),\n required: value.required || validity.required(),\n errorText: value.errorText ?? validity.errorText(),\n };\n });\n}\n","// GENERATED from the otp-input manifest (otp-input) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { otpInputCore, type OtpInputInputs, type OtpInputMethods, otpInputScopedStyles } from '@mintplayer/ui-core/otp-input';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../otp-input.angular';\n\n/**\n * A segmented one-time-code input (#437): one real `<input>` behind decorative boxes.\n *\n * With JavaScript off it is a plain `.form-control` that takes the code and submits under `name`.\n * `groups` sets the boxes (`[1,1,1,1,1,1]`, or `[5,5,5,5,5]` for a product key). `value` is two-way;\n * `complete` fires when the user fills the last box. An `aria-label` on the component names the input.\n */\n@Component({\n selector: 'bs-otp-input',\n templateUrl: './otp-input.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsOtpInputComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly groups = input<OtpInputInputs['groups']>([1, 1, 1, 1, 1, 1]);\n readonly type = input<OtpInputInputs['type']>('numeric');\n readonly letterCase = input<OtpInputInputs['letterCase']>('upper');\n readonly size = input<OtpInputInputs['size']>('md');\n readonly disabled = input<OtpInputInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<OtpInputInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<OtpInputInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<OtpInputInputs['errorText']>();\n readonly name = input<OtpInputInputs['name']>();\n readonly inputLabel = input<OtpInputInputs['inputLabel']>();\n readonly value = model<OtpInputInputs['value']>('');\n /** Every keystroke, paste and clear: the current, possibly partial, code. */\n readonly valuechange = output<string>();\n /** The user filled the last box. */\n readonly complete = output<string>();\n\n readonly #core = useCore(otpInputCore, { inputs: ext_extendInputs(() => ({ groups: this.groups(), type: this.type(), letterCase: this.letterCase(), size: this.size(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), name: this.name(), inputLabel: this.inputLabel(), value: this.value() })), idPrefix: 'bs-otp-input', outputs: { valueChange: this.valuechange, complete: this.complete }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'otp-input' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('otp-input', otpInputScopedStyles);\n }\n\n /** Empties the code, and reports it. */\n clear(...args: Parameters<OtpInputMethods['clear']>): ReturnType<OtpInputMethods['clear']> {\n return this.#core.call('clear', args) as ReturnType<OtpInputMethods['clear']>;\n }\n\n /** Moves focus into the input. */\n focusInput(...args: Parameters<OtpInputMethods['focusInput']>): ReturnType<OtpInputMethods['focusInput']> {\n return this.#core.call('focusInput', args) as ReturnType<OtpInputMethods['focusInput']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/otp-input/src/templates/otp-input.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"otp-input\" [mpProps]=\"p_view.container\">\n <input data-mps=\"otp-input\" [mpProps]=\"p_view.input\">\n @for (box of p_view.boxes; track box.key) {\n <span data-mps=\"otp-input\" [mpProps]=\"box.bag\">\n <span data-mps=\"otp-input\" [mpProps]=\"p_view.spacer\">\n {{ box.spacer }}\n </span>\n <span data-mps=\"otp-input\" [mpProps]=\"p_view.content\">\n {{ box.content }}\n </span>\n </span>\n }\n</div>\n@if (p_view.showFeedback) {\n <div data-mps=\"otp-input\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the otp-input manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsOtpInputComponent } from './otp-input.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\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EAAA,CAAA;kBAP/B,SAAS;+BACE,cAAc,EAAA,OAAA,EAEf,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,8wBAAA,EAAA;;;AElBpC;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-otp-input.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/otp-input/src/value-accessor/otp-input-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/otp-input/src/otp-input.angular.ts","../../../../libs/mintplayer-ng-bootstrap/otp-input/src/generated/otp-input.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/otp-input/src/generated/otp-input.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/otp-input/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/otp-input/mintplayer-ng-bootstrap-otp-input.ts"],"sourcesContent":["import { DestroyRef, Directive, ElementRef, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsOtpInputComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-otp-input` (a host directive of the\n * generated component, see `otp-input.angular.ts`). A bound form control drives\n * the code through `viewValue`; every change the user makes (typing, paste,\n * `clear()`, a layout change that drops characters) reaches the form through\n * the component's `value` model, which a form write never touches.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsOtpInputValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsOtpInputValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the code: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal('');\n readonly disabled = signal(false);\n\n private onChange: (value: string) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const sub = this.injector.get(BsOtpInputComponent).value.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null | undefined): void {\n this.viewValue.set(value ?? '');\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n\n/**\n * `focus()` on the `bs-otp-input` host moves into its input, so a directive that\n * focuses the element it sits on (`autofocus` through FocusOnLoadDirective)\n * reaches the field.\n */\n@Directive({})\nexport class BsOtpInputFocusDirective {\n constructor() {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n Object.defineProperty(host, 'focus', {\n // Before the first render there is no input yet; try again once it exists.\n value: (options?: FocusOptions) => {\n const input = host.querySelector('input');\n if (input) input.focus(options);\n else queueMicrotask(() => host.querySelector('input')?.focus(options));\n },\n configurable: true,\n writable: true,\n });\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';\nimport type { OtpInputInputs } from '@mintplayer/ui-core/otp-input';\nimport { BsOtpInputFocusDirective, BsOtpInputValueAccessor } from './value-accessor/otp-input-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-otp-input` (PRD #437 D10 escape\n * hatch): Angular forms, and host focus. A bound form control drives the value\n * and the disabled state, and its validity reaches the input's ARIA and message.\n */\n\nexport const hostDirectives = [\n BsOtpInputValueAccessor,\n BsOtpInputFocusDirective,\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => OtpInputInputs): () => OtpInputInputs {\n const accessor = inject(BsOtpInputValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<OtpInputInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n invalid: value.invalid || validity.invalid(),\n required: value.required || validity.required(),\n errorText: value.errorText ?? validity.errorText(),\n };\n });\n}\n","// GENERATED from the otp-input manifest (otp-input) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { otpInputCore, type OtpInputInputs, type OtpInputMethods, otpInputScopedStyles } from '@mintplayer/ui-core/otp-input';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../otp-input.angular';\n\n/**\n * A segmented one-time-code input (#437): one real `<input>` behind decorative boxes.\n *\n * With JavaScript off it is a plain `.form-control` that takes the code and submits under `name`.\n * `groups` sets the boxes (`[1,1,1,1,1,1]`, or `[5,5,5,5,5]` for a product key). `value` is two-way;\n * `complete` fires when the user fills the last box. An `aria-label` on the component names the input.\n */\n@Component({\n selector: 'bs-otp-input',\n templateUrl: './otp-input.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsOtpInputComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly groups = input<OtpInputInputs['groups']>([1, 1, 1, 1, 1, 1]);\n readonly type = input<OtpInputInputs['type']>('numeric');\n readonly letterCase = input<OtpInputInputs['letterCase']>('upper');\n readonly size = input<OtpInputInputs['size']>('md');\n readonly disabled = input<OtpInputInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<OtpInputInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<OtpInputInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<OtpInputInputs['errorText']>();\n readonly name = input<OtpInputInputs['name']>();\n readonly inputLabel = input<OtpInputInputs['inputLabel']>();\n readonly value = model<OtpInputInputs['value']>('');\n /** Every keystroke, paste and clear: the current, possibly partial, code. */\n readonly valuechange = output<string>();\n /** The user filled the last box. */\n readonly complete = output<string>();\n\n readonly #core = useCore(otpInputCore, { inputs: ext_extendInputs(() => ({ groups: this.groups(), type: this.type(), letterCase: this.letterCase(), size: this.size(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), name: this.name(), inputLabel: this.inputLabel(), value: this.value() })), idPrefix: 'bs-otp-input', outputs: { valueChange: this.valuechange, complete: this.complete }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'otp-input' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('otp-input', otpInputScopedStyles);\n }\n\n /** Empties the code, and reports it. */\n clear(...args: Parameters<OtpInputMethods['clear']>): ReturnType<OtpInputMethods['clear']> {\n return this.#core.call('clear', args) as ReturnType<OtpInputMethods['clear']>;\n }\n\n /** Moves focus into the input. */\n focusInput(...args: Parameters<OtpInputMethods['focusInput']>): ReturnType<OtpInputMethods['focusInput']> {\n return this.#core.call('focusInput', args) as ReturnType<OtpInputMethods['focusInput']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/otp-input/src/templates/otp-input.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"otp-input\" [mpProps]=\"p_view.container\">\n <input data-mps=\"otp-input\" [mpProps]=\"p_view.input\">\n @for (box of p_view.boxes; track box.key) {\n <span data-mps=\"otp-input\" [mpProps]=\"box.bag\">\n <span data-mps=\"otp-input\" [mpProps]=\"p_view.spacer\">\n {{ box.spacer }}\n </span>\n <span data-mps=\"otp-input\" [mpProps]=\"p_view.content\">\n {{ box.content }}\n </span>\n </span>\n }\n</div>\n@if (p_view.showFeedback) {\n <div data-mps=\"otp-input\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the otp-input manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsOtpInputComponent } from './otp-input.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsOtpInputValueAccessor","i1.BsOtpInputFocusDirective","ext_hostDirectives"],"mappings":";;;;;;;;;AAIA;;;;;;AAMG;MAOU,uBAAuB,CAAA;AANpC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAGvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,EAAE;sFAAC;QACtB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAA4B,MAAM,SAAS;AAC3D,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA4BxC,IAAA;IA1BC,QAAQ,GAAA;;AAEN,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;YAC3E,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE;gBAAE;AACjD,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;AACzB,YAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AACtB,QAAA,CAAC,CAAC;AACF,QAAA,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM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AA,EAAA,CAAA,eAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrBhC,8wBAoBA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDHY,gBAAgB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;+BACE,cAAc,EAAA,OAAA,EAEf,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,8wBAAA,EAAA;;;AEnBpC;;ACAA;;AAEG;;;;"}
@@ -1,8 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, ElementRef, input, model, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { useBootstrap, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
4
+ import { bootstrapPagination } from '@mintplayer/ui-core/bootstrap/pagination';
3
5
  import { connectPagination, isPlainClick } from '@mintplayer/ui-core/pagination';
4
6
  import { takeHostAria } from '@mintplayer/ng-bootstrap/a11y';
5
- import { MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
6
7
 
7
8
  /**
8
9
  * Bootstrap's `.pagination` markup, rendered by this component's own
@@ -48,6 +49,8 @@ class BsPaginationComponent {
48
49
  ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
49
50
  this.navBag = computed(() => ({ ...this.view().nav, ...this.hostAria }), /* @ts-ignore */
50
51
  ...(ngDevMode ? [{ debugName: "navBag" }] : /* istanbul ignore next */ []));
52
+ // #452: the pagination partial ships with this component, scoped to the elements it stamps (data-mps="pagination").
53
+ useBootstrap(bootstrapPagination);
51
54
  }
52
55
  select(page) {
53
56
  if (page !== null)
@@ -60,14 +63,14 @@ class BsPaginationComponent {
60
63
  this.select(page);
61
64
  }
62
65
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsPaginationComponent, isStandalone: true, selector: "bs-pagination", inputs: { pageNumbers: { classPropertyName: "pageNumbers", publicName: "pageNumbers", isSignal: true, isRequired: false, transformFunction: null }, selectedPageNumber: { classPropertyName: "selectedPageNumber", publicName: "selectedPageNumber", isSignal: true, isRequired: false, transformFunction: null }, numberOfBoxes: { classPropertyName: "numberOfBoxes", publicName: "numberOfBoxes", isSignal: true, isRequired: false, transformFunction: null }, showArrows: { classPropertyName: "showArrows", publicName: "showArrows", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, hrefFor: { classPropertyName: "hrefFor", publicName: "hrefFor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedPageNumber: "selectedPageNumberChange" }, host: { classAttribute: "d-block" }, ngImport: i0, template: "<nav [mpProps]=\"navBag()\">\n <ul [class]=\"view().listClass\">\n @for (entry of view().entries; track entry.key) {\n <li [class]=\"entry.itemClass\">\n @if (entry.kind === 'gap') {\n <span [mpProps]=\"entry.attrs\">{{ entry.text }}</span>\n } @else if (view().tag === 'a') {\n <a [mpProps]=\"entry.attrs\" [attr.href]=\"entry.href\" (click)=\"onLinkClick($event, entry.target)\">{{ entry.text }}</a>\n } @else {\n <button [mpProps]=\"entry.attrs\" (click)=\"select(entry.target)\">{{ entry.text }}</button>\n }\n </li>\n }\n </ul>\n</nav>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
66
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsPaginationComponent, isStandalone: true, selector: "bs-pagination", inputs: { pageNumbers: { classPropertyName: "pageNumbers", publicName: "pageNumbers", isSignal: true, isRequired: false, transformFunction: null }, selectedPageNumber: { classPropertyName: "selectedPageNumber", publicName: "selectedPageNumber", isSignal: true, isRequired: false, transformFunction: null }, numberOfBoxes: { classPropertyName: "numberOfBoxes", publicName: "numberOfBoxes", isSignal: true, isRequired: false, transformFunction: null }, showArrows: { classPropertyName: "showArrows", publicName: "showArrows", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, hrefFor: { classPropertyName: "hrefFor", publicName: "hrefFor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedPageNumber: "selectedPageNumberChange" }, host: { classAttribute: "d-block" }, ngImport: i0, template: "<nav data-mps=\"pagination\" [mpProps]=\"navBag()\">\n <ul data-mps=\"pagination\" [class]=\"view().listClass\">\n @for (entry of view().entries; track entry.key) {\n <li data-mps=\"pagination\" [class]=\"entry.itemClass\">\n @if (entry.kind === 'gap') {\n <span data-mps=\"pagination\" [mpProps]=\"entry.attrs\">{{ entry.text }}</span>\n } @else if (view().tag === 'a') {\n <a data-mps=\"pagination\" [mpProps]=\"entry.attrs\" [attr.href]=\"entry.href\" (click)=\"onLinkClick($event, entry.target)\">{{ entry.text }}</a>\n } @else {\n <button data-mps=\"pagination\" [mpProps]=\"entry.attrs\" (click)=\"select(entry.target)\">{{ entry.text }}</button>\n }\n </li>\n }\n </ul>\n</nav>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
64
67
  }
65
68
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPaginationComponent, decorators: [{
66
69
  type: Component,
67
70
  args: [{ selector: 'bs-pagination', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
68
71
  'class': 'd-block',
69
- }, template: "<nav [mpProps]=\"navBag()\">\n <ul [class]=\"view().listClass\">\n @for (entry of view().entries; track entry.key) {\n <li [class]=\"entry.itemClass\">\n @if (entry.kind === 'gap') {\n <span [mpProps]=\"entry.attrs\">{{ entry.text }}</span>\n } @else if (view().tag === 'a') {\n <a [mpProps]=\"entry.attrs\" [attr.href]=\"entry.href\" (click)=\"onLinkClick($event, entry.target)\">{{ entry.text }}</a>\n } @else {\n <button [mpProps]=\"entry.attrs\" (click)=\"select(entry.target)\">{{ entry.text }}</button>\n }\n </li>\n }\n </ul>\n</nav>\n" }]
70
- }], propDecorators: { pageNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageNumbers", required: false }] }], selectedPageNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedPageNumber", required: false }] }, { type: i0.Output, args: ["selectedPageNumberChange"] }], numberOfBoxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberOfBoxes", required: false }] }], showArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "showArrows", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], hrefFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "hrefFor", required: false }] }] } });
72
+ }, template: "<nav data-mps=\"pagination\" [mpProps]=\"navBag()\">\n <ul data-mps=\"pagination\" [class]=\"view().listClass\">\n @for (entry of view().entries; track entry.key) {\n <li data-mps=\"pagination\" [class]=\"entry.itemClass\">\n @if (entry.kind === 'gap') {\n <span data-mps=\"pagination\" [mpProps]=\"entry.attrs\">{{ entry.text }}</span>\n } @else if (view().tag === 'a') {\n <a data-mps=\"pagination\" [mpProps]=\"entry.attrs\" [attr.href]=\"entry.href\" (click)=\"onLinkClick($event, entry.target)\">{{ entry.text }}</a>\n } @else {\n <button data-mps=\"pagination\" [mpProps]=\"entry.attrs\" (click)=\"select(entry.target)\">{{ entry.text }}</button>\n }\n </li>\n }\n </ul>\n</nav>\n" }]
73
+ }], ctorParameters: () => [], propDecorators: { pageNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageNumbers", required: false }] }], selectedPageNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedPageNumber", required: false }] }, { type: i0.Output, args: ["selectedPageNumberChange"] }], numberOfBoxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberOfBoxes", required: false }] }], showArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "showArrows", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], hrefFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "hrefFor", required: false }] }] } });
71
74
 
72
75
  /**
73
76
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-pagination.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/pagination/src/component/pagination/pagination.component.ts","../../../../libs/mintplayer-ng-bootstrap/pagination/src/component/pagination/pagination.component.html","../../../../libs/mintplayer-ng-bootstrap/pagination/mintplayer-ng-bootstrap-pagination.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { Size } from '@mintplayer/ng-bootstrap';\nimport {\n connectPagination,\n isPlainClick,\n type PaginationLabels,\n} from '@mintplayer/ui-core/pagination';\nimport { takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';\n\n/**\n * Bootstrap's `.pagination` markup, rendered by this component's own\n * template (#437) from `@mintplayer/ui-core/pagination`. Pages are buttons;\n * with `hrefFor` they are real links, so SSR output navigates with\n * JavaScript off and a plain click selects in place. The consumer's\n * `aria-*` / `id` / `tabindex` on `<bs-pagination>` land on the `<nav>`.\n */\n@Component({\n selector: 'bs-pagination',\n templateUrl: './pagination.component.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'd-block',\n },\n})\nexport class BsPaginationComponent {\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly hostAria = takeHostAria(this.host);\n\n /** All page numbers. */\n readonly pageNumbers = input<number[]>([]);\n /** Selected number. */\n readonly selectedPageNumber = model<number>(1);\n /** Cap on visible boxes, arrows included (0 = uncapped). */\n readonly numberOfBoxes = input<number>(0);\n /** Display previous/next arrows. */\n readonly showArrows = input<boolean>(true);\n /** Page number size. */\n readonly size = input<Size>('medium');\n /** Localized accessible names; missing keys fall back to English. */\n readonly labels = input<Partial<PaginationLabels> | null>(null);\n /** Renders every page as a link to this URL, so it works without JavaScript. */\n readonly hrefFor = input<((page: number) => string) | null>(null);\n\n readonly view = computed(() => connectPagination({\n pageNumbers: this.pageNumbers(),\n selectedPageNumber: this.selectedPageNumber(),\n numberOfBoxes: this.numberOfBoxes(),\n showArrows: this.showArrows(),\n size: this.size(),\n labels: this.labels(),\n hrefFor: this.hrefFor(),\n }));\n\n readonly navBag = computed(() => ({ ...this.view().nav, ...this.hostAria }));\n\n select(page: number | null): void {\n if (page !== null) this.selectedPageNumber.set(page);\n }\n\n onLinkClick(event: MouseEvent, page: number | null): void {\n if (!isPlainClick(event)) return;\n event.preventDefault();\n this.select(page);\n }\n}\n","<nav [mpProps]=\"navBag()\">\n <ul [class]=\"view().listClass\">\n @for (entry of view().entries; track entry.key) {\n <li [class]=\"entry.itemClass\">\n @if (entry.kind === 'gap') {\n <span [mpProps]=\"entry.attrs\">{{ entry.text }}</span>\n } @else if (view().tag === 'a') {\n <a [mpProps]=\"entry.attrs\" [attr.href]=\"entry.href\" (click)=\"onLinkClick($event, entry.target)\">{{ entry.text }}</a>\n } @else {\n <button [mpProps]=\"entry.attrs\" (click)=\"select(entry.target)\">{{ entry.text }}</button>\n }\n </li>\n }\n </ul>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAkBA;;;;;;AAMG;MAUU,qBAAqB,CAAA;AATlC,IAAA,WAAA,GAAA;AAUmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAA4B;AACtD,QAAA,IAAA,CAAA,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;QAG1C,IAAA,CAAA,WAAW,GAAG,KAAK,CAAW,EAAE;wFAAC;;QAEjC,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAS,CAAC;+FAAC;;QAErC,IAAA,CAAA,aAAa,GAAG,KAAK,CAAS,CAAC;0FAAC;;QAEhC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,IAAI;uFAAC;;QAEjC,IAAA,CAAA,IAAI,GAAG,KAAK,CAAO,QAAQ;iFAAC;;QAE5B,IAAA,CAAA,MAAM,GAAG,KAAK,CAAmC,IAAI;mFAAC;;QAEtD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAoC,IAAI;oFAAC;AAExD,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,iBAAiB,CAAC;AAC/C,YAAA,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;AAC/B,YAAA,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAAE;AAC7C,YAAA,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE;AACnC,YAAA,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;AAC7B,YAAA,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;AACjB,YAAA,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;AACrB,YAAA,OAAO,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.component.ts","../../../../libs/mintplayer-ng-bootstrap/pagination/src/component/pagination/pagination.component.html","../../../../libs/mintplayer-ng-bootstrap/pagination/mintplayer-ng-bootstrap-pagination.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapPagination } from '@mintplayer/ui-core/bootstrap/pagination';\nimport { Size } from '@mintplayer/ng-bootstrap';\nimport {\n connectPagination,\n isPlainClick,\n type PaginationLabels,\n} from '@mintplayer/ui-core/pagination';\nimport { takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';\n\n/**\n * Bootstrap's `.pagination` markup, rendered by this component's own\n * template (#437) from `@mintplayer/ui-core/pagination`. Pages are buttons;\n * with `hrefFor` they are real links, so SSR output navigates with\n * JavaScript off and a plain click selects in place. The consumer's\n * `aria-*` / `id` / `tabindex` on `<bs-pagination>` land on the `<nav>`.\n */\n@Component({\n selector: 'bs-pagination',\n templateUrl: './pagination.component.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'd-block',\n },\n})\nexport class BsPaginationComponent {\n constructor() {\n // #452: the pagination partial ships with this component, scoped to the elements it stamps (data-mps=\"pagination\").\n useBootstrap(bootstrapPagination);\n }\n\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly hostAria = takeHostAria(this.host);\n\n /** All page numbers. */\n readonly pageNumbers = input<number[]>([]);\n /** Selected number. */\n readonly selectedPageNumber = model<number>(1);\n /** Cap on visible boxes, arrows included (0 = uncapped). */\n readonly numberOfBoxes = input<number>(0);\n /** Display previous/next arrows. */\n readonly showArrows = input<boolean>(true);\n /** Page number size. */\n readonly size = input<Size>('medium');\n /** Localized accessible names; missing keys fall back to English. */\n readonly labels = input<Partial<PaginationLabels> | null>(null);\n /** Renders every page as a link to this URL, so it works without JavaScript. */\n readonly hrefFor = input<((page: number) => string) | null>(null);\n\n readonly view = computed(() => connectPagination({\n pageNumbers: this.pageNumbers(),\n selectedPageNumber: this.selectedPageNumber(),\n numberOfBoxes: this.numberOfBoxes(),\n showArrows: this.showArrows(),\n size: this.size(),\n labels: this.labels(),\n hrefFor: this.hrefFor(),\n }));\n\n readonly navBag = computed(() => ({ ...this.view().nav, ...this.hostAria }));\n\n select(page: number | null): void {\n if (page !== null) this.selectedPageNumber.set(page);\n }\n\n onLinkClick(event: MouseEvent, page: number | null): void {\n if (!isPlainClick(event)) return;\n event.preventDefault();\n this.select(page);\n }\n}\n","<nav data-mps=\"pagination\" [mpProps]=\"navBag()\">\n <ul data-mps=\"pagination\" [class]=\"view().listClass\">\n @for (entry of view().entries; track entry.key) {\n <li data-mps=\"pagination\" [class]=\"entry.itemClass\">\n @if (entry.kind === 'gap') {\n <span data-mps=\"pagination\" [mpProps]=\"entry.attrs\">{{ entry.text }}</span>\n } @else if (view().tag === 'a') {\n <a data-mps=\"pagination\" [mpProps]=\"entry.attrs\" [attr.href]=\"entry.href\" (click)=\"onLinkClick($event, entry.target)\">{{ entry.text }}</a>\n } @else {\n <button data-mps=\"pagination\" [mpProps]=\"entry.attrs\" (click)=\"select(entry.target)\">{{ entry.text }}</button>\n }\n </li>\n }\n </ul>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAoBA;;;;;;AAMG;MAUU,qBAAqB,CAAA;AAChC,IAAA,WAAA,GAAA;AAKiB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAA4B;AACtD,QAAA,IAAA,CAAA,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;QAG1C,IAAA,CAAA,WAAW,GAAG,KAAK,CAAW,EAAE;wFAAC;;QAEjC,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAS,CAAC;+FAA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A,EAAA,OAAA,EAAA,EAAA,kBAAA,EAAA,0BAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpClC,yvBAeA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDeY,gBAAgB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAMf,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBATjC,SAAS;+BACE,eAAe,EAAA,OAAA,EAEhB,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,SAAS;AACnB,qBAAA,EAAA,QAAA,EAAA,yvBAAA,EAAA;;;AElCH;;AAEG;;;;"}
@@ -2,8 +2,9 @@ import * as i0 from '@angular/core';
2
2
  import { inject, Injector, DestroyRef, signal, forwardRef, Directive, ElementRef, computed, model, input, booleanAttribute, output, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { useCore, useScopedStyles, MpPropsDirective, MpTrustedHtmlPipe } from '@mintplayer/ng-bootstrap/machine';
4
4
  import { phoneInputCore, phoneInputScopedStyles } from '@mintplayer/ui-core/phone-input';
5
- import * as i2 from '@mintplayer/ng-bootstrap/a11y';
6
- import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y';
5
+ import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
6
+ import * as i2 from '@mintplayer/ng-bootstrap/a11y/forms';
7
+ import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';
7
8
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
9
 
9
10
  /**
@@ -169,6 +170,7 @@ class BsPhoneInputComponent {
169
170
  this.#core = useCore(phoneInputCore, { inputs: extendInputs(() => ({ value: this.value(), country: this.country(), defaultCountry: this.defaultCountry(), locale: this.locale(), preferredCountries: this.preferredCountries(), allowedCountries: this.allowedCountries(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), placeholder: this.placeholder(), autocomplete: this.autocomplete(), name: this.name(), inputLabel: this.inputLabel(), countryLabel: this.countryLabel() })), idPrefix: 'bs-phone-input', outputs: { valueChange: this.valuechange, countryChange: this.countrychange, phoneChange: this.phonechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'phone-input' }), models: { value: this.value, country: this.country } });
170
171
  /** The template's props. */
171
172
  this.props = this.#core.props;
173
+ useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
172
174
  useScopedStyles('phone-input', phoneInputScopedStyles);
173
175
  }
174
176
  /** Moves focus into the number field, not the country picker. */
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-phone-input.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/phone-input/src/value-accessor/phone-input-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/phone-input.angular.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/phone-input.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/phone-input.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/mintplayer-ng-bootstrap-phone-input.ts"],"sourcesContent":["import { DestroyRef, Directive, ElementRef, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsPhoneInputComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-phone-input` (a host directive of the\n * generated component, see `phone-input.angular.ts`). A bound form control\n * drives the E.164 value through `viewValue`; every change the user makes\n * (typing, paste, a country pick, rules that load and re-derive the E.164)\n * reaches the form through the component's `value` model, which a form write\n * never touches.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsPhoneInputValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsPhoneInputValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the value: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<string | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: string | null) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const sub = this.injector.get(BsPhoneInputComponent).value.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null | undefined): void {\n this.viewValue.set(value || null);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n\n/**\n * `focus()` on the `bs-phone-input` host moves into the number field, not the\n * country picker (D13), so a directive that focuses the element it sits on\n * reaches the field.\n */\n@Directive({})\nexport class BsPhoneInputFocusDirective {\n constructor() {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const tel = () => host.querySelector<HTMLInputElement>('input[type=tel]');\n Object.defineProperty(host, 'focus', {\n // Before the first render there is no input yet; try again once it exists.\n value: (options?: FocusOptions) => {\n const input = tel();\n if (input) input.focus(options);\n else queueMicrotask(() => tel()?.focus(options));\n },\n configurable: true,\n writable: true,\n });\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport type { PhoneInputInputs } from '@mintplayer/ui-core/phone-input';\nimport { BsPhoneInputFocusDirective, BsPhoneInputValueAccessor } from './value-accessor/phone-input-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-phone-input` (PRD #437 D10 escape\n * hatch): Angular forms, and host focus. A bound form control drives the value\n * and the disabled state, and its validity reaches the number field's ARIA and\n * message.\n */\n\nexport const hostDirectives = [\n BsPhoneInputValueAccessor,\n BsPhoneInputFocusDirective,\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => PhoneInputInputs): () => PhoneInputInputs {\n const accessor = inject(BsPhoneInputValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<PhoneInputInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n invalid: value.invalid || validity.invalid(),\n required: value.required || validity.required(),\n errorText: value.errorText ?? validity.errorText(),\n };\n });\n}\n","// GENERATED from the phone-input manifest (phone-input) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, output } from '@angular/core';\nimport { MpPropsDirective, MpTrustedHtmlPipe, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type PhoneChangeEventDetail, phoneInputCore, type PhoneInputInputs, type PhoneInputMethods, phoneInputScopedStyles } from '@mintplayer/ui-core/phone-input';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../phone-input.angular';\n\n/**\n * A phone-number field (#437): country picker with flags, dial code, and a number input that formats as\n * the user types. `value` is two-way E.164 (`+32470123456`); `country` is two-way too.\n *\n * With JavaScript off it is a plain country select and tel input; the typed text submits under `name`.\n * An `aria-label` on the component names the number input; `countryLabel` names the picker.\n */\n@Component({\n selector: 'bs-phone-input',\n templateUrl: './phone-input.view.generated.html',\n imports: [MpPropsDirective, MpTrustedHtmlPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsPhoneInputComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model<PhoneInputInputs['value']>(null);\n readonly country = model<PhoneInputInputs['country']>(null);\n readonly defaultCountry = input<PhoneInputInputs['defaultCountry']>();\n readonly locale = input<PhoneInputInputs['locale']>();\n readonly preferredCountries = input<PhoneInputInputs['preferredCountries']>(null);\n readonly allowedCountries = input<PhoneInputInputs['allowedCountries']>(null);\n readonly disabled = input<PhoneInputInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<PhoneInputInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<PhoneInputInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<PhoneInputInputs['errorText']>();\n readonly placeholder = input<PhoneInputInputs['placeholder']>();\n readonly autocomplete = input<PhoneInputInputs['autocomplete']>('tel-national');\n readonly name = input<PhoneInputInputs['name']>();\n readonly inputLabel = input<PhoneInputInputs['inputLabel']>();\n readonly countryLabel = input<PhoneInputInputs['countryLabel']>();\n /** The E.164 value changed (null while empty). */\n readonly valuechange = output<string | null>();\n /** The user picked a country, or typed a `+XX` that switched it. */\n readonly countrychange = output<string>();\n /** Every edit, pick and rules load: the value with its parts and validity. */\n readonly phonechange = output<PhoneChangeEventDetail>();\n\n readonly #core = useCore(phoneInputCore, { inputs: ext_extendInputs(() => ({ value: this.value(), country: this.country(), defaultCountry: this.defaultCountry(), locale: this.locale(), preferredCountries: this.preferredCountries(), allowedCountries: this.allowedCountries(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), placeholder: this.placeholder(), autocomplete: this.autocomplete(), name: this.name(), inputLabel: this.inputLabel(), countryLabel: this.countryLabel() })), idPrefix: 'bs-phone-input', outputs: { valueChange: this.valuechange, countryChange: this.countrychange, phoneChange: this.phonechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'phone-input' }), models: { value: this.value, country: this.country } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('phone-input', phoneInputScopedStyles);\n }\n\n /** Moves focus into the number field, not the country picker. */\n focusInput(...args: Parameters<PhoneInputMethods['focusInput']>): ReturnType<PhoneInputMethods['focusInput']> {\n return this.#core.call('focusInput', args) as ReturnType<PhoneInputMethods['focusInput']>;\n }\n\n /** Settles once the flags and the rules in flight have been applied. */\n whenReady(...args: Parameters<PhoneInputMethods['whenReady']>): ReturnType<PhoneInputMethods['whenReady']> {\n return this.#core.call('whenReady', args) as ReturnType<PhoneInputMethods['whenReady']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/phone-input/src/templates/phone-input.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"phone-input\" [mpProps]=\"p_view.group\">\n <select data-mps=\"phone-input\" [mpProps]=\"p_view.select\">\n @if (p_view.rich) {\n <button data-mps=\"phone-input\" type=\"button\">\n <selectedcontent></selectedcontent>\n </button>\n }\n @for (o of p_view.options; track o.key) {\n <option data-mps=\"phone-input\" [mpProps]=\"o.bag\">\n @if (p_view.rich) {\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.flagBox\" [innerHTML]=\"o.flag | mpTrustedHtml\"></span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.richLabel\">\n {{ o.name }}\n </span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.listOnly\">\n {{ o.dial }}\n </span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.closedOnly\">\n {{ o.iso }}\n </span>\n } @else {\n {{ o.label }}\n }\n </option>\n }\n </select>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.addon\">\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.flag\" [innerHTML]=\"p_view.flagHtml | mpTrustedHtml\"></span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.dial\">\n {{ p_view.dialText }}\n </span>\n </span>\n <input data-mps=\"phone-input\" [mpProps]=\"p_view.input\">\n</div>\n@if (p_view.hidden) {\n <input data-mps=\"phone-input\" [mpProps]=\"p_view.hidden\">\n}\n@if (p_view.showFeedback) {\n <div data-mps=\"phone-input\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the phone-input manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsPhoneInputComponent } from './phone-input.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsPhoneInputValueAccessor","i1.BsPhoneInputFocusDirective","ext_hostDirectives"],"mappings":";;;;;;;;AAIA;;;;;;;AAOG;MAOU,yBAAyB,CAAA;AANtC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAGvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAgB,IAAI;sFAAC;QACvC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAmC,MAAM,SAAS;AAClE,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA4BxC,IAAA;IA1BC,QAAQ,GAAA;;AAEN,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;YAC7E,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE;gBAAE;AACjD,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;AACzB,YAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AACtB,QAAA,CA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,EAAA,QAAA,ECpBlC,6tDA4CA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED5BY,gBAAgB,sEAAE,iBAAiB,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIlC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,gBAAgB,EAAA,OAAA,EAEjB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAAA,eAAA,EAC7B,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,6tDAAA,EAAA;;;AElBpC;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-phone-input.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/phone-input/src/value-accessor/phone-input-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/phone-input.angular.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/phone-input.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/phone-input.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/mintplayer-ng-bootstrap-phone-input.ts"],"sourcesContent":["import { DestroyRef, Directive, ElementRef, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsPhoneInputComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-phone-input` (a host directive of the\n * generated component, see `phone-input.angular.ts`). A bound form control\n * drives the E.164 value through `viewValue`; every change the user makes\n * (typing, paste, a country pick, rules that load and re-derive the E.164)\n * reaches the form through the component's `value` model, which a form write\n * never touches.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsPhoneInputValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsPhoneInputValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the value: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<string | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: string | null) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const sub = this.injector.get(BsPhoneInputComponent).value.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null | undefined): void {\n this.viewValue.set(value || null);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n\n/**\n * `focus()` on the `bs-phone-input` host moves into the number field, not the\n * country picker (D13), so a directive that focuses the element it sits on\n * reaches the field.\n */\n@Directive({})\nexport class BsPhoneInputFocusDirective {\n constructor() {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const tel = () => host.querySelector<HTMLInputElement>('input[type=tel]');\n Object.defineProperty(host, 'focus', {\n // Before the first render there is no input yet; try again once it exists.\n value: (options?: FocusOptions) => {\n const input = tel();\n if (input) input.focus(options);\n else queueMicrotask(() => tel()?.focus(options));\n },\n configurable: true,\n writable: true,\n });\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';\nimport type { PhoneInputInputs } from '@mintplayer/ui-core/phone-input';\nimport { BsPhoneInputFocusDirective, BsPhoneInputValueAccessor } from './value-accessor/phone-input-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-phone-input` (PRD #437 D10 escape\n * hatch): Angular forms, and host focus. A bound form control drives the value\n * and the disabled state, and its validity reaches the number field's ARIA and\n * message.\n */\n\nexport const hostDirectives = [\n BsPhoneInputValueAccessor,\n BsPhoneInputFocusDirective,\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => PhoneInputInputs): () => PhoneInputInputs {\n const accessor = inject(BsPhoneInputValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<PhoneInputInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n invalid: value.invalid || validity.invalid(),\n required: value.required || validity.required(),\n errorText: value.errorText ?? validity.errorText(),\n };\n });\n}\n","// GENERATED from the phone-input manifest (phone-input) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, output } from '@angular/core';\nimport { MpPropsDirective, MpTrustedHtmlPipe, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type PhoneChangeEventDetail, phoneInputCore, type PhoneInputInputs, type PhoneInputMethods, phoneInputScopedStyles } from '@mintplayer/ui-core/phone-input';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../phone-input.angular';\n\n/**\n * A phone-number field (#437): country picker with flags, dial code, and a number input that formats as\n * the user types. `value` is two-way E.164 (`+32470123456`); `country` is two-way too.\n *\n * With JavaScript off it is a plain country select and tel input; the typed text submits under `name`.\n * An `aria-label` on the component names the number input; `countryLabel` names the picker.\n */\n@Component({\n selector: 'bs-phone-input',\n templateUrl: './phone-input.view.generated.html',\n imports: [MpPropsDirective, MpTrustedHtmlPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsPhoneInputComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model<PhoneInputInputs['value']>(null);\n readonly country = model<PhoneInputInputs['country']>(null);\n readonly defaultCountry = input<PhoneInputInputs['defaultCountry']>();\n readonly locale = input<PhoneInputInputs['locale']>();\n readonly preferredCountries = input<PhoneInputInputs['preferredCountries']>(null);\n readonly allowedCountries = input<PhoneInputInputs['allowedCountries']>(null);\n readonly disabled = input<PhoneInputInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<PhoneInputInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<PhoneInputInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<PhoneInputInputs['errorText']>();\n readonly placeholder = input<PhoneInputInputs['placeholder']>();\n readonly autocomplete = input<PhoneInputInputs['autocomplete']>('tel-national');\n readonly name = input<PhoneInputInputs['name']>();\n readonly inputLabel = input<PhoneInputInputs['inputLabel']>();\n readonly countryLabel = input<PhoneInputInputs['countryLabel']>();\n /** The E.164 value changed (null while empty). */\n readonly valuechange = output<string | null>();\n /** The user picked a country, or typed a `+XX` that switched it. */\n readonly countrychange = output<string>();\n /** Every edit, pick and rules load: the value with its parts and validity. */\n readonly phonechange = output<PhoneChangeEventDetail>();\n\n readonly #core = useCore(phoneInputCore, { inputs: ext_extendInputs(() => ({ value: this.value(), country: this.country(), defaultCountry: this.defaultCountry(), locale: this.locale(), preferredCountries: this.preferredCountries(), allowedCountries: this.allowedCountries(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), placeholder: this.placeholder(), autocomplete: this.autocomplete(), name: this.name(), inputLabel: this.inputLabel(), countryLabel: this.countryLabel() })), idPrefix: 'bs-phone-input', outputs: { valueChange: this.valuechange, countryChange: this.countrychange, phoneChange: this.phonechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'phone-input' }), models: { value: this.value, country: this.country } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('phone-input', phoneInputScopedStyles);\n }\n\n /** Moves focus into the number field, not the country picker. */\n focusInput(...args: Parameters<PhoneInputMethods['focusInput']>): ReturnType<PhoneInputMethods['focusInput']> {\n return this.#core.call('focusInput', args) as ReturnType<PhoneInputMethods['focusInput']>;\n }\n\n /** Settles once the flags and the rules in flight have been applied. */\n whenReady(...args: Parameters<PhoneInputMethods['whenReady']>): ReturnType<PhoneInputMethods['whenReady']> {\n return this.#core.call('whenReady', args) as ReturnType<PhoneInputMethods['whenReady']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/phone-input/src/templates/phone-input.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"phone-input\" [mpProps]=\"p_view.group\">\n <select data-mps=\"phone-input\" [mpProps]=\"p_view.select\">\n @if (p_view.rich) {\n <button data-mps=\"phone-input\" type=\"button\">\n <selectedcontent></selectedcontent>\n </button>\n }\n @for (o of p_view.options; track o.key) {\n <option data-mps=\"phone-input\" [mpProps]=\"o.bag\">\n @if (p_view.rich) {\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.flagBox\" [innerHTML]=\"o.flag | mpTrustedHtml\"></span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.richLabel\">\n {{ o.name }}\n </span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.listOnly\">\n {{ o.dial }}\n </span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.closedOnly\">\n {{ o.iso }}\n </span>\n } @else {\n {{ o.label }}\n }\n </option>\n }\n </select>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.addon\">\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.flag\" [innerHTML]=\"p_view.flagHtml | mpTrustedHtml\"></span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.dial\">\n {{ p_view.dialText }}\n </span>\n </span>\n <input data-mps=\"phone-input\" [mpProps]=\"p_view.input\">\n</div>\n@if (p_view.hidden) {\n <input data-mps=\"phone-input\" [mpProps]=\"p_view.hidden\">\n}\n@if (p_view.showFeedback) {\n <div data-mps=\"phone-input\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the phone-input manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsPhoneInputComponent } from './phone-input.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsPhoneInputValueAccessor","i1.BsPhoneInputFocusDirective","ext_hostDirectives"],"mappings":";;;;;;;;;AAIA;;;;;;;AAOG;MAOU,yBAAyB,CAAA;AANtC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAGvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAgB,IAAI;sFAAC;QACvC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAmC,MAAM,SAAS;AAClE,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA4BxC,IAAA;IA1BC,QAAQ,GAAA;;AAEN,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;YAC7E,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE;gBAAE;AACjD,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;AACzB,YAAA,IAAI,CAAC,QAAQ,CAA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AA,EAAAC,0BAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrBlC,6tDA4CA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED3BY,gBAAgB,sEAAE,iBAAiB,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIlC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,gBAAgB,EAAA,OAAA,EAEjB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAAA,eAAA,EAC7B,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,6tDAAA,EAAA;;;AEnBpC;;ACAA;;AAEG;;;;"}
@@ -1,5 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, model, input, effect, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
2
+ import { inject, model, input, effect, ChangeDetectionStrategy, Component, computed, Directive } from '@angular/core';
3
+ import { useBootstrap } from '@mintplayer/ng-bootstrap/machine';
4
+ import { bootstrapPlaceholders } from '@mintplayer/ui-core/bootstrap/placeholders';
3
5
  import { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';
4
6
 
5
7
  class BsPlaceholderComponent {
@@ -10,6 +12,8 @@ class BsPlaceholderComponent {
10
12
  this.loadingCompleteText = input('Loading complete', /* @ts-ignore */
11
13
  ...(ngDevMode ? [{ debugName: "loadingCompleteText" }] : /* istanbul ignore next */ []));
12
14
  this.wasLoading = false;
15
+ // #452: the placeholders partial ships with this component, scoped to the elements it stamps (data-mps="placeholder").
16
+ useBootstrap(bootstrapPlaceholders);
13
17
  effect(() => {
14
18
  const isLoading = this.isLoading();
15
19
  if (this.wasLoading && !isLoading) {
@@ -19,40 +23,42 @@ class BsPlaceholderComponent {
19
23
  });
20
24
  }
21
25
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsPlaceholderComponent, isStandalone: true, selector: "bs-placeholder", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingCompleteText: { classPropertyName: "loadingCompleteText", publicName: "loadingCompleteText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoading: "isLoadingChange" }, host: { properties: { "attr.aria-busy": "isLoading() ? \"true\" : null" } }, ngImport: i0, template: "<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel \u2014 never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}:host ::ng-deep .placeholder.btn:before{display:inline-block;content:\"\"}:host ::ng-deep .placeholder-xs{min-height:.6em}:host ::ng-deep .placeholder-sm{min-height:.8em}:host ::ng-deep .placeholder-lg{min-height:1.2em}:host ::ng-deep .placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}:host ::ng-deep .placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,#000c,#000 95%);mask-image:linear-gradient(130deg,#000 55%,#000c,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{to{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}:host ::ng-deep .placeholder{min-height:calc(1em - 1px)!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
26
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsPlaceholderComponent, isStandalone: true, selector: "bs-placeholder", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingCompleteText: { classPropertyName: "loadingCompleteText", publicName: "loadingCompleteText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoading: "isLoadingChange" }, host: { properties: { "attr.aria-busy": "isLoading() ? \"true\" : null" } }, ngImport: i0, template: "<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel \u2014 never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div data-mps=\"placeholder\" class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .placeholder{min-height:calc(1em - 1px)!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23
27
  }
24
28
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPlaceholderComponent, decorators: [{
25
29
  type: Component,
26
30
  args: [{ selector: 'bs-placeholder', changeDetection: ChangeDetectionStrategy.OnPush, host: {
27
31
  '[attr.aria-busy]': 'isLoading() ? "true" : null',
28
- }, template: "<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel \u2014 never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}:host ::ng-deep .placeholder.btn:before{display:inline-block;content:\"\"}:host ::ng-deep .placeholder-xs{min-height:.6em}:host ::ng-deep .placeholder-sm{min-height:.8em}:host ::ng-deep .placeholder-lg{min-height:1.2em}:host ::ng-deep .placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}:host ::ng-deep .placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,#000c,#000 95%);mask-image:linear-gradient(130deg,#000 55%,#000c,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{to{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}:host ::ng-deep .placeholder{min-height:calc(1em - 1px)!important}\n"] }]
32
+ }, template: "<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel \u2014 never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div data-mps=\"placeholder\" class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .placeholder{min-height:calc(1em - 1px)!important}\n"] }]
29
33
  }], ctorParameters: () => [], propDecorators: { isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }, { type: i0.Output, args: ["isLoadingChange"] }], loadingCompleteText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingCompleteText", required: false }] }] } });
30
34
 
31
35
  class BsPlaceholderFieldDirective {
32
36
  constructor() {
33
37
  this.placeholder = inject(BsPlaceholderComponent);
34
- this.html = undefined;
35
- this.marginBottom = 0;
36
- this.placeholderClass = true;
37
- effect(() => {
38
- const isLoading = this.placeholder.isLoading();
39
- this.placeholderClass = isLoading;
40
- this.marginBottom = isLoading ? -1 : 0;
41
- this.html = isLoading ? '&nbsp;' : undefined;
42
- });
38
+ // Derived, not copied from an effect into plain fields: a host binding re-renders
39
+ // only when a signal it reads changes (zoneless).
40
+ this.isLoading = computed(() => this.placeholder.isLoading(), /* @ts-ignore */
41
+ ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
42
+ this.marginBottom = computed(() => (this.isLoading() ? -1 : 0), /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "marginBottom" }] : /* istanbul ignore next */ []));
44
+ this.html = computed(() => (this.isLoading() ? '&nbsp;' : undefined), /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "html" }] : /* istanbul ignore next */ []));
46
+ // #452: the placeholders partial ships with this component, scoped to the elements it stamps (data-mps="placeholder").
47
+ useBootstrap(bootstrapPlaceholders);
43
48
  }
44
49
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPlaceholderFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
45
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsPlaceholderFieldDirective, isStandalone: true, selector: "[bsPlaceholderField]", host: { properties: { "attr.innerHtml": "html", "style.min-width.px": "80", "style.margin-bottom.px": "marginBottom", "class.placeholder": "placeholderClass" } }, ngImport: i0 }); }
50
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsPlaceholderFieldDirective, isStandalone: true, selector: "[bsPlaceholderField]", host: { properties: { "attr.data-mps": "\"placeholder\"", "attr.innerHtml": "html()", "style.min-width.px": "80", "style.margin-bottom.px": "marginBottom()", "class.placeholder": "isLoading()" } }, ngImport: i0 }); }
46
51
  }
47
52
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPlaceholderFieldDirective, decorators: [{
48
53
  type: Directive,
49
54
  args: [{
50
55
  selector: '[bsPlaceholderField]',
51
56
  host: {
52
- '[attr.innerHtml]': 'html',
57
+ '[attr.data-mps]': '"placeholder"',
58
+ '[attr.innerHtml]': 'html()',
53
59
  '[style.min-width.px]': '80',
54
- '[style.margin-bottom.px]': 'marginBottom',
55
- '[class.placeholder]': 'placeholderClass',
60
+ '[style.margin-bottom.px]': 'marginBottom()',
61
+ '[class.placeholder]': 'isLoading()',
56
62
  },
57
63
  }]
58
64
  }], ctorParameters: () => [] });