@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-scrollspy.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/scrollspy/src/services/scroll-offset/scroll-offset.service.ts","../../../../libs/mintplayer-ng-bootstrap/scrollspy/src/directives/scrollspy.directive.ts","../../../../libs/mintplayer-ng-bootstrap/scrollspy/src/component/scrollspy.component.ts","../../../../libs/mintplayer-ng-bootstrap/scrollspy/src/component/scrollspy.component.html","../../../../libs/mintplayer-ng-bootstrap/scrollspy/mintplayer-ng-bootstrap-scrollspy.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { ExtraOptions, ROUTER_CONFIGURATION } from '@angular/router';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BsScrollOffsetService {\n\n private routerConfig = inject<ExtraOptions>(ROUTER_CONFIGURATION);\n\n getScrollOffset(): [number, number] {\n if (!this.routerConfig.scrollOffset) {\n return [0, 0];\n } else if (Array.isArray(this.routerConfig.scrollOffset)) {\n return this.routerConfig.scrollOffset\n } else {\n return this.routerConfig.scrollOffset();\n }\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[bsScrollspy]',\n})\nexport class BsScrollspyDirective {\n element = inject(ElementRef);\n}\n","import { DOCUMENT } from '@angular/common';\nimport { AfterContentInit, AfterViewInit, ChangeDetectionStrategy, Component, computed, contentChildren, effect, ElementRef, inject, input, signal, viewChildren } from '@angular/core';\nimport { BsScrollOffsetService } from '../services/scroll-offset/scroll-offset.service';\nimport { BsScrollspyDirective } from '../directives/scrollspy.directive';\n\ntype ScrollTarget = HTMLElement | Window;\n\n/**\n * The section the reader is in: the last one whose top has passed the trigger line, or the\n * first when none has yet. -1 when there are no sections.\n */\nexport function activeSectionIndex(sectionTops: readonly number[], triggerY: number): number {\n if (sectionTops.length === 0) return -1;\n return sectionTops.reduce((active, top, index) => (top < triggerY ? index : active), 0);\n}\n\n/**\n * The scroll position that puts a section's top 1px past the trigger line. The extra pixel\n * makes the section count as passed (see getTriggerY), so it becomes the active one.\n *\n * @param headerTop the section's current top, in viewport coordinates\n * @param originTop where the trigger line sits: the container's top, or the fixed offset\n * @param currentScroll the scroll position now\n */\nexport function sectionScrollTop(headerTop: number, originTop: number, currentScroll: number): number {\n return headerTop - originTop + currentScroll + 1;\n}\n\n@Component({\n selector: 'bs-scrollspy',\n templateUrl: './scrollspy.component.html',\n styleUrls: ['./scrollspy.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsScrollspyComponent implements AfterViewInit, AfterContentInit {\n\n private scrollOffsetService = inject(BsScrollOffsetService);\n private hostRef = inject<ElementRef<HTMLElement>>(ElementRef);\n doc = inject<Document>(DOCUMENT);\n\n readonly scrollContainer = input<HTMLElement | null>(null);\n /** Accessible name of the section navigation. Override to translate. */\n readonly ariaLabel = input('Section navigation');\n\n private viewInit = signal<boolean>(false);\n private contentInit = signal<boolean>(false);\n\n readonly directives = contentChildren(BsScrollspyDirective, { descendants: true });\n readonly anchors = viewChildren<ElementRef<HTMLButtonElement>>('anchor');\n\n activeDirective = signal<BsScrollspyDirective | null>(null);\n\n private resolvedScrollTarget = computed<ScrollTarget | null>(() => {\n if (typeof window === 'undefined') return null;\n if (!this.viewInit()) return null;\n const explicit = this.scrollContainer();\n if (explicit) return explicit;\n return this.findScrollableAncestor(this.hostRef.nativeElement) ?? window;\n });\n\n constructor() {\n effect(() => {\n const viewInit = this.viewInit();\n const contentInit = this.contentInit();\n if (viewInit && contentInit) {\n this.scrollToCurrentInSpy();\n }\n });\n\n effect((onCleanup) => {\n const target = this.resolvedScrollTarget();\n this.directives();\n if (!target) return;\n\n const handler = () => {\n this.setActiveDirective();\n this.scrollToCurrentInSpy();\n };\n target.addEventListener('scroll', handler, { passive: true });\n handler();\n\n onCleanup(() => target.removeEventListener('scroll', handler));\n });\n }\n\n ngAfterViewInit() {\n this.viewInit.set(true);\n }\n\n ngAfterContentInit() {\n this.contentInit.set(true);\n }\n\n setActiveDirective() {\n const directives = this.directives();\n const tops = directives.map((d) => d.element.nativeElement.getBoundingClientRect().y);\n this.activeDirective.set(directives[activeSectionIndex(tops, this.getTriggerY())] ?? null);\n }\n\n scrollToCurrentInSpy() {\n if ((typeof window !== 'undefined') && (window.innerWidth >= 768)) {\n if (this.activeDirective()) {\n const index = this.directives().findIndex((v) => v === this.activeDirective());\n const anchor = this.anchors()[index];\n if (anchor && anchor.nativeElement.parentElement) {\n // Optional-chain so jsdom (no scrollIntoView impl) does not crash\n // when the effect calls this synchronously during component init.\n anchor.nativeElement.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });\n }\n }\n }\n }\n\n scrollToHeader(directive: BsScrollspyDirective) {\n if (typeof window === 'undefined') return;\n const target = this.resolvedScrollTarget();\n if (!target) return;\n\n const header = directive.element.nativeElement;\n const headerTop = header.getBoundingClientRect().top;\n\n // `instanceof HTMLElement` narrows TS to HTMLElement in the true branch\n // and is robust in jsdom (which implements HTMLElement). The previous\n // `instanceof Window` check failed in jsdom due to a realm mismatch.\n if (target instanceof HTMLElement) {\n target.scrollTo({ top: sectionScrollTop(headerTop, target.getBoundingClientRect().top, target.scrollTop), behavior: 'smooth' });\n } else {\n const offsetY = this.scrollOffsetService.getScrollOffset()[1];\n window.scrollTo({ top: sectionScrollTop(headerTop, offsetY, window.scrollY), behavior: 'smooth' });\n }\n }\n\n private getTriggerY(): number {\n const target = this.resolvedScrollTarget();\n // +1 in both branches so a directive landing exactly on the trigger line\n // (e.g. right after scrollToHeader completes) is counted as \"above\" it,\n // matching the +1 that scrollToHeader adds when computing the scroll target.\n if (target instanceof HTMLElement) {\n return target.getBoundingClientRect().top + 1;\n }\n return this.scrollOffsetService.getScrollOffset()[1] + 1;\n }\n\n private findScrollableAncestor(el: HTMLElement | null): HTMLElement | null {\n // Walk the element + its ancestors. The host itself participates so a\n // consumer can opt in by setting overflow-y: auto on <bs-scrollspy>.\n // We rely only on the declared overflow style (no scrollHeight check) —\n // a container declared overflow: auto is the consumer's intended scroll\n // target whether or not the content currently exceeds the box.\n if (!el) return null;\n const overflowY = getComputedStyle(el).overflowY;\n return overflowY === 'auto' || overflowY === 'scroll' ? el : this.findScrollableAncestor(el.parentElement);\n }\n}\n","<nav class=\"spy\" [attr.aria-label]=\"ariaLabel()\">\n <ul class=\"text-muted\">\n @for (dir of directives(); track dir; let i = $index) {\n <li>\n <button type=\"button\"\n [attr.data-index]=\"i\"\n class=\"btn btn-link cursor-pointer p-0 text-start text-decoration-none\"\n [class]=\"'nav' + dir.element.nativeElement.tagName\"\n [class.fw-bold]=\"activeDirective()?.element === dir.element\"\n [attr.aria-current]=\"activeDirective()?.element === dir.element ? 'location' : null\"\n (click)=\"scrollToHeader(dir)\"\n #anchor>\n {{ dir.element.nativeElement.textContent }}\n </button>\n </li>\n }\n </ul>\n</nav>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAMa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAKU,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAe,oBAAoB,CAAC;AAWlE,IAAA;IATC,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;AACnC,YAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;QACf;aAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE;AACxD,YAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY;QACvC;aAAO;AACL,YAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;QACzC;IACF;8GAZW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cAFpB,MAAM,EAAA,CAAA,CAAA;;2FAEP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCAY,oBAAoB,CAAA;AAHjC,IAAA,WAAA,GAAA;AAIE,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,IAAA;8GAFY,oBAAo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CAAA,EAAA;AAeT,SAAA,CAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,oBAAoB,QAAE,EAAE,WAAW,EAAE,IAAI,EAAE,kEAClB,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhDzE;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-scrollspy.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/scrollspy/src/services/scroll-offset/scroll-offset.service.ts","../../../../libs/mintplayer-ng-bootstrap/scrollspy/src/directives/scrollspy.directive.ts","../../../../libs/mintplayer-ng-bootstrap/scrollspy/src/component/scrollspy.component.ts","../../../../libs/mintplayer-ng-bootstrap/scrollspy/src/component/scrollspy.component.html","../../../../libs/mintplayer-ng-bootstrap/scrollspy/mintplayer-ng-bootstrap-scrollspy.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { ExtraOptions, ROUTER_CONFIGURATION } from '@angular/router';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BsScrollOffsetService {\n\n private routerConfig = inject<ExtraOptions>(ROUTER_CONFIGURATION);\n\n getScrollOffset(): [number, number] {\n if (!this.routerConfig.scrollOffset) {\n return [0, 0];\n } else if (Array.isArray(this.routerConfig.scrollOffset)) {\n return this.routerConfig.scrollOffset\n } else {\n return this.routerConfig.scrollOffset();\n }\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[bsScrollspy]',\n})\nexport class BsScrollspyDirective {\n element = inject(ElementRef);\n}\n","import { DOCUMENT } from '@angular/common';\nimport { AfterContentInit, AfterViewInit, ChangeDetectionStrategy, Component, computed, contentChildren, effect, ElementRef, inject, input, signal, viewChild, viewChildren } from '@angular/core';\nimport { BsScrollOffsetService } from '../services/scroll-offset/scroll-offset.service';\nimport { BsScrollspyDirective } from '../directives/scrollspy.directive';\n\ntype ScrollTarget = HTMLElement | Window;\n\n/**\n * The section the reader is in: the last one whose top has passed the trigger line, or the\n * first when none has yet. -1 when there are no sections.\n */\nexport function activeSectionIndex(sectionTops: readonly number[], triggerY: number): number {\n if (sectionTops.length === 0) return -1;\n return sectionTops.reduce((active, top, index) => (top < triggerY ? index : active), 0);\n}\n\n/**\n * The scroll position that puts a section's top 1px past the trigger line. The extra pixel\n * makes the section count as passed (see getTriggerY), so it becomes the active one.\n *\n * @param headerTop the section's current top, in viewport coordinates\n * @param originTop where the trigger line sits: the container's top, or the fixed offset\n * @param currentScroll the scroll position now\n */\nexport function sectionScrollTop(headerTop: number, originTop: number, currentScroll: number): number {\n return headerTop - originTop + currentScroll + 1;\n}\n\n@Component({\n selector: 'bs-scrollspy',\n templateUrl: './scrollspy.component.html',\n styleUrls: ['./scrollspy.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsScrollspyComponent implements AfterViewInit, AfterContentInit {\n\n private scrollOffsetService = inject(BsScrollOffsetService);\n private hostRef = inject<ElementRef<HTMLElement>>(ElementRef);\n doc = inject<Document>(DOCUMENT);\n\n readonly scrollContainer = input<HTMLElement | null>(null);\n /** Accessible name of the section navigation. Override to translate. */\n readonly ariaLabel = input('Section navigation');\n\n private viewInit = signal<boolean>(false);\n private contentInit = signal<boolean>(false);\n\n readonly directives = contentChildren(BsScrollspyDirective, { descendants: true });\n readonly anchors = viewChildren<ElementRef<HTMLButtonElement>>('anchor');\n private readonly spyNav = viewChild<ElementRef<HTMLElement>>('spyNav');\n\n activeDirective = signal<BsScrollspyDirective | null>(null);\n\n private resolvedScrollTarget = computed<ScrollTarget | null>(() => {\n if (typeof window === 'undefined') return null;\n if (!this.viewInit()) return null;\n const explicit = this.scrollContainer();\n if (explicit) return explicit;\n return this.findScrollableAncestor(this.hostRef.nativeElement) ?? window;\n });\n\n constructor() {\n effect(() => {\n const viewInit = this.viewInit();\n const contentInit = this.contentInit();\n if (viewInit && contentInit) {\n this.scrollToCurrentInSpy();\n }\n });\n\n effect((onCleanup) => {\n const target = this.resolvedScrollTarget();\n this.directives();\n if (!target) return;\n\n const handler = () => {\n this.setActiveDirective();\n this.scrollToCurrentInSpy();\n };\n target.addEventListener('scroll', handler, { passive: true });\n handler();\n\n onCleanup(() => target.removeEventListener('scroll', handler));\n });\n }\n\n ngAfterViewInit() {\n this.viewInit.set(true);\n }\n\n ngAfterContentInit() {\n this.contentInit.set(true);\n }\n\n setActiveDirective() {\n const directives = this.directives();\n const tops = directives.map((d) => d.element.nativeElement.getBoundingClientRect().y);\n this.activeDirective.set(directives[activeSectionIndex(tops, this.getTriggerY())] ?? null);\n }\n\n scrollToCurrentInSpy() {\n if ((typeof window !== 'undefined') && (window.innerWidth >= 768)) {\n if (this.activeDirective()) {\n const index = this.directives().findIndex((v) => v === this.activeDirective());\n const anchor = this.anchors()[index]?.nativeElement;\n const nav = this.spyNav()?.nativeElement;\n if (anchor && nav) {\n // Scroll the toc list only. scrollIntoView would scroll every ancestor too —\n // the page included — and, run from the page's own scroll handler, it pulled\n // the window back whenever the active entry sat outside the sticky toc: the\n // reader could never reach the top or the bottom of the page.\n const a = anchor.getBoundingClientRect();\n const n = nav.getBoundingClientRect();\n if (a.top < n.top) nav.scrollTop += a.top - n.top;\n else if (a.bottom > n.bottom) nav.scrollTop += a.bottom - n.bottom;\n }\n }\n }\n }\n\n scrollToHeader(directive: BsScrollspyDirective) {\n if (typeof window === 'undefined') return;\n const target = this.resolvedScrollTarget();\n if (!target) return;\n\n const header = directive.element.nativeElement;\n const headerTop = header.getBoundingClientRect().top;\n\n // `instanceof HTMLElement` narrows TS to HTMLElement in the true branch\n // and is robust in jsdom (which implements HTMLElement). The previous\n // `instanceof Window` check failed in jsdom due to a realm mismatch.\n if (target instanceof HTMLElement) {\n target.scrollTo({ top: sectionScrollTop(headerTop, target.getBoundingClientRect().top, target.scrollTop), behavior: 'smooth' });\n } else {\n const offsetY = this.scrollOffsetService.getScrollOffset()[1];\n window.scrollTo({ top: sectionScrollTop(headerTop, offsetY, window.scrollY), behavior: 'smooth' });\n }\n }\n\n private getTriggerY(): number {\n const target = this.resolvedScrollTarget();\n // +1 in both branches so a directive landing exactly on the trigger line\n // (e.g. right after scrollToHeader completes) is counted as \"above\" it,\n // matching the +1 that scrollToHeader adds when computing the scroll target.\n if (target instanceof HTMLElement) {\n return target.getBoundingClientRect().top + 1;\n }\n return this.scrollOffsetService.getScrollOffset()[1] + 1;\n }\n\n private findScrollableAncestor(el: HTMLElement | null): HTMLElement | null {\n // Walk the element + its ancestors. The host itself participates so a\n // consumer can opt in by setting overflow-y: auto on <bs-scrollspy>.\n // We rely only on the declared overflow style (no scrollHeight check) —\n // a container declared overflow: auto is the consumer's intended scroll\n // target whether or not the content currently exceeds the box.\n if (!el) return null;\n const overflowY = getComputedStyle(el).overflowY;\n return overflowY === 'auto' || overflowY === 'scroll' ? el : this.findScrollableAncestor(el.parentElement);\n }\n}\n","<nav class=\"spy\" #spyNav [attr.aria-label]=\"ariaLabel()\">\n <ul class=\"text-muted\">\n @for (dir of directives(); track dir; let i = $index) {\n <li>\n <button type=\"button\"\n [attr.data-index]=\"i\"\n class=\"btn btn-link cursor-pointer p-0 text-start text-decoration-none\"\n [class]=\"'nav' + dir.element.nativeElement.tagName\"\n [class.fw-bold]=\"activeDirective()?.element === dir.element\"\n [attr.aria-current]=\"activeDirective()?.element === dir.element ? 'location' : null\"\n (click)=\"scrollToHeader(dir)\"\n #anchor>\n {{ dir.element.nativeElement.textContent }}\n </button>\n </li>\n }\n </ul>\n</nav>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAMa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAKU,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAe,oBAAoB,CAAC;AAWlE,IAAA;IATC,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;AACnC,YAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;QACf;aAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE;AACxD,YAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY;QACvC;aAAO;AACL,YAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;QACzC;IACF;8GAZW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cAFpB,MAAM,EAAA,CAAA,CAAA;;2FAEP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCAY,oBAAoB,CAAA;AAHjC,IAAA,WAAA,GAAA;AAIE,QAAA,IAAA,CAAA,O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,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,QAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,QAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC/C5D,+6BAqBA,EAAA,MAAA,EAAA,CAAA,moBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDaa,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;+BACE,cAAc,EAAA,eAAA,EAGP,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+6BAAA,EAAA,MAAA,EAAA,CAAA,moBAAA,CAAA,EAAA;4UAeT,oBAAoB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAClB,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CACV,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjDvE;;AAEG;;;;"}
@@ -3,8 +3,9 @@ import { inject, ElementRef, input, signal, computed, forwardRef, Directive, Ren
3
3
  import { NgTemplateOutlet } from '@angular/common';
4
4
  import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
5
5
  import { syncSelection, selectCore, selectScopedStyles } from '@mintplayer/ui-core/select';
6
- import * as i2 from '@mintplayer/ng-bootstrap/a11y';
7
- import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y';
6
+ import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
7
+ import * as i2 from '@mintplayer/ng-bootstrap/a11y/forms';
8
+ import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';
8
9
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
10
 
10
11
  /**
@@ -254,6 +255,7 @@ class BsSelectComponent {
254
255
  this.#core = useCore(selectCore, { inputs: extendInputs(() => ({ size: this.size(), multiple: this.multiple(), numberVisible: this.numberVisible(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), name: this.name(), inputLabel: this.inputLabel(), value: this.value(), values: this.values(), options: this.options() })), idPrefix: 'bs-select', outputs: { valueChange: this.valuechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'select' }), models: { value: this.value, values: this.values } });
255
256
  /** The template's props. */
256
257
  this.props = this.#core.props;
258
+ useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
257
259
  useScopedStyles('select', selectScopedStyles);
258
260
  }
259
261
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-select.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/select/src/value-accessors/select-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/select.angular.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/generated/select.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/generated/select.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/select/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/select/mintplayer-ng-bootstrap-select.ts"],"sourcesContent":["import { computed, Directive, effect, ElementRef, forwardRef, inject, input, OnDestroy, Renderer2, signal, type Signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { syncSelection } from '@mintplayer/ui-core/select';\n\n/**\n * The `ControlValueAccessor` of `bs-select` (a host directive of the generated\n * component, see `select.angular.ts`). The select's value space is strings; an\n * `<option [ngValue]>` maps any value (an object, compared with `compareWith`)\n * to a stable `\"<id>: <value>\"` string, the way Angular's own\n * `SelectControlValueAccessor` does.\n */\n@Directive({\n selector: 'bs-select',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsSelectValueAccessor), multi: true }],\n host: {\n // The native change bubbles out of the light-DOM <select>.\n '(change)': 'onNativeChange($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsSelectValueAccessor implements ControlValueAccessor {\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n readonly compareWith = input<(value1: unknown, value2: unknown) => boolean>(Object.is);\n\n /** A form control drives the select: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n /** The form control's value, as the select's string. */\n readonly viewValue = signal<string | null>(null);\n readonly disabled = signal(false);\n /** The string the select shows, from the form control or the `value` input (set by `extendInputs`). */\n selected: Signal<string | null> = computed(() => this.viewValue());\n\n private value: unknown = null;\n private readonly optionMap = new Map<string, unknown>();\n private idCounter = 0;\n private onChange: (value: unknown) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n registerOnChange(fn: (value: unknown) => 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 setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: unknown): void {\n this.value = value;\n const valueString = value == null ? null : this.buildValueString(this.getOptionId(value), value);\n this.viewValue.set(valueString);\n // An option can get its value after the first render; re-select right away.\n const select = this.element.querySelector('select');\n if (select && !select.multiple) syncSelection(select, false, valueString, []);\n }\n\n onNativeChange(event: Event): void {\n const select = event.target;\n if (!(select instanceof HTMLSelectElement) || select.multiple) return;\n const valueString = select.value || null;\n this.viewValue.set(valueString);\n this.value = this.getOptionValue(valueString);\n this.onChange(this.value);\n }\n\n registerOption(): string {\n return (this.idCounter++).toString();\n }\n\n setOption(id: string, value: unknown): void {\n this.optionMap.set(id, value);\n this.writeValue(this.value);\n }\n\n removeOption(id: string): void {\n this.optionMap.delete(id);\n this.writeValue(this.value);\n }\n\n /** Re-select after an option's plain value changed. */\n refresh(): void {\n this.writeValue(this.value);\n }\n\n buildValueString(id: string | null, value: unknown): string {\n if (id == null) return `${value}`;\n const shown = value && typeof value === 'object' ? 'Object' : value;\n return `${id}: ${shown}`.slice(0, 50);\n }\n\n /** The id of the registered option whose value matches, or null when none does. */\n private getOptionId(value: unknown): string | null {\n const compare = this.compareWith();\n return [...this.optionMap.keys()].find((id) => compare(this.optionMap.get(id), value)) ?? null;\n }\n\n /**\n * An empty selection (a `<option value=\"\">` placeholder) reaches the model as\n * `null`; a plain `value` option is never registered and passes its string.\n */\n private getOptionValue(valueString: string | null): unknown {\n const id = valueString == null ? null : valueString.split(':')[0];\n return id !== null && this.optionMap.has(id) ? this.optionMap.get(id) : valueString;\n }\n}\n\n/**\n * Every `<option>` in a template that imports it: inside a `bs-select`, an\n * `[ngValue]` (any value) or a `[value]` (a string). It writes the `selected`\n * attribute for the selected option, so the server-rendered page shows the\n * selection with JavaScript off.\n */\n@Directive({\n selector: 'option',\n host: { '[attr.selected]': \"isSelected() ? '' : null\" },\n})\nexport class BsSelectOption implements OnDestroy {\n private readonly element = inject<ElementRef<HTMLOptionElement>>(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly select = inject(BsSelectValueAccessor, { optional: true, host: true });\n private readonly id = this.select?.registerOption() ?? '';\n\n readonly ngValue = input<unknown>(undefined);\n readonly value = input<string | undefined>(undefined);\n\n private readonly valueString = signal<string | null>(null);\n protected readonly isSelected = computed(() => !!this.select && this.valueString() !== null && this.select.selected() === this.valueString());\n\n constructor() {\n effect(() => {\n const ngValue = this.ngValue();\n if (ngValue === undefined || !this.select) return;\n this.setValue(this.select.buildValueString(this.id, ngValue));\n this.select.setOption(this.id, ngValue);\n });\n effect(() => {\n const value = this.value();\n if (value === undefined) return;\n this.setValue(value);\n this.select?.refresh();\n });\n }\n\n private setValue(value: string): void {\n // The attribute, so the server-rendered option carries it too.\n this.renderer.setAttribute(this.element, 'value', value);\n this.valueString.set(value);\n }\n\n ngOnDestroy(): void {\n this.select?.removeOption(this.id);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport type { SelectInputs } from '@mintplayer/ui-core/select';\nimport { BsSelectValueAccessor } from './value-accessors/select-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-select` (PRD #437 D10 escape\n * hatch): Angular forms. A bound form control drives the value and the\n * disabled state, and its validity reaches the select's ARIA and message.\n */\n\nexport const hostDirectives = [\n { directive: BsSelectValueAccessor, inputs: ['compareWith'] },\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => SelectInputs): () => SelectInputs {\n const accessor = inject(BsSelectValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n const merged = computed<SelectInputs>(() => {\n const value = inputs();\n const bound = accessor.bound();\n return {\n ...value,\n value: 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 accessor.selected = computed(() => merged().value);\n return merged;\n}\n","// GENERATED from the select manifest (select) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type SelectChangeEventDetail, selectCore, type SelectInputs, type SelectOption, selectScopedStyles } from '@mintplayer/ui-core/select';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../select.angular';\n\n/** The `option` slot of `<bs-select>`: `<ng-template bsSelectOption>` or `*bsSelectOption`. */\n@Directive({ selector: '[bsSelectOption]' })\nexport class BsSelectOptionDirective {\n readonly templateRef = inject<TemplateRef<{ option: SelectOption } & { $implicit: { option: SelectOption } }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsSelectOptionDirective, ctx: unknown): ctx is { option: SelectOption } & { $implicit: { option: SelectOption } } {\n return true;\n }\n}\n\n/**\n * Bootstrap `.form-select` around a native `<select>` (#437): it works and submits with JavaScript off.\n *\n * Give it `options`, or put `<option>` / `<optgroup>` children inside. `value` (or `values` when\n * `multiple`) is two-way. An `aria-label` on the component names the select; so does `inputLabel`.\n * The `option` slot renders rich option content where the engine supports customizable select.\n */\n@Component({\n selector: 'bs-select',\n templateUrl: './select.view.generated.html',\n imports: [MpPropsDirective, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsSelectComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly size = input<SelectInputs['size']>('md');\n readonly multiple = input<SelectInputs['multiple'], unknown>(false, { transform: booleanAttribute });\n readonly numberVisible = input<SelectInputs['numberVisible'], unknown>(undefined, { transform: (v: unknown) => numberAttribute(v) as SelectInputs['numberVisible'] });\n readonly disabled = input<SelectInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<SelectInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<SelectInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<SelectInputs['errorText']>();\n readonly name = input<SelectInputs['name']>();\n readonly inputLabel = input<SelectInputs['inputLabel']>();\n readonly value = model<SelectInputs['value']>(null);\n readonly values = model<SelectInputs['values']>([]);\n readonly options = input<SelectInputs['options']>();\n /** The user picked: the value, and every value of a multiple select. */\n readonly valuechange = output<SelectChangeEventDetail>();\n\n private readonly optionSlot = contentChild(BsSelectOptionDirective);\n /** The template's named slots. */\n protected readonly slots = computed(() => ({ option: this.optionSlot()?.templateRef }));\n readonly #core = useCore(selectCore, { inputs: ext_extendInputs(() => ({ size: this.size(), multiple: this.multiple(), numberVisible: this.numberVisible(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), name: this.name(), inputLabel: this.inputLabel(), value: this.value(), values: this.values(), options: this.options() })), idPrefix: 'bs-select', outputs: { valueChange: this.valuechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'select' }), models: { value: this.value, values: this.values } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('select', selectScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/select/src/templates/select.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<select data-mps=\"select\" [mpProps]=\"p_view.select\">\n @if (p_view.rich && slots().option) {\n <button data-mps=\"select\" type=\"button\">\n <selectedcontent></selectedcontent>\n </button>\n }\n @if (p_view.items) {\n @for (item of p_view.items; track item.key) {\n @if (item.group) {\n <optgroup data-mps=\"select\" [mpProps]=\"item.group\">\n @for (o of item.options; track o.key) {\n <option data-mps=\"select\" [mpProps]=\"o.bag\">\n @if (p_view.rich) {\n @if (slots().option; as slot_option) {\n <ng-container [ngTemplateOutlet]=\"slot_option\" [ngTemplateOutletContext]=\"{ $implicit: { option: o.option }, option: o.option }\" />\n } @else {\n {{ o.option.label }}\n }\n } @else {\n {{ o.option.label }}\n }\n </option>\n }\n </optgroup>\n } @else {\n @for (o of item.options; track o.key) {\n <option data-mps=\"select\" [mpProps]=\"o.bag\">\n @if (p_view.rich) {\n @if (slots().option; as slot_option) {\n <ng-container [ngTemplateOutlet]=\"slot_option\" [ngTemplateOutletContext]=\"{ $implicit: { option: o.option }, option: o.option }\" />\n } @else {\n {{ o.option.label }}\n }\n } @else {\n {{ o.option.label }}\n }\n </option>\n }\n }\n }\n } @else {\n <ng-content />\n }\n</select>\n@if (p_view.showFeedback) {\n <div data-mps=\"select\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the select manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsSelectComponent, BsSelectOptionDirective } from './select.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsSelectValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;;;AAIA;;;;;;AAMG;MAUU,qBAAqB,CAAA;AATlC,IAAA,WAAA,GAAA;AAUmB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;AAE3E,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgD,MAAM,CAAC,EAAE;wFAAC;;QAG7E,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;;QAErB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAgB,IAAI;sFAAC;QACvC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;;QAEjC,IAAA,CAAA,QAAQ,GAA0B,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE;qFAAC;QAE1D,IAAA,CAAA,KAAK,GAAY,IAAI;AACZ,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAAmB;QAC/C,IAAA,CAAA,SAAS,GAAG,CAAC;AACb,QAAA,IAAA,CAAA,QAAQ,GAA6B,MAAM,SAAS;AAC5D,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AAwExC,IAAA;AAtEC,IAAA,gBAAgB,CAAC,EAA4B,EAAA;AAC3C,QAAA,IAAI,CAAC,KAA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EZ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAA,eAAA,EAC5B,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,41DAAA,EAAA;+3CAqBS,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjDpE;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-select.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/select/src/value-accessors/select-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/select.angular.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/generated/select.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/generated/select.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/select/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/select/mintplayer-ng-bootstrap-select.ts"],"sourcesContent":["import { computed, Directive, effect, ElementRef, forwardRef, inject, input, OnDestroy, Renderer2, signal, type Signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { syncSelection } from '@mintplayer/ui-core/select';\n\n/**\n * The `ControlValueAccessor` of `bs-select` (a host directive of the generated\n * component, see `select.angular.ts`). The select's value space is strings; an\n * `<option [ngValue]>` maps any value (an object, compared with `compareWith`)\n * to a stable `\"<id>: <value>\"` string, the way Angular's own\n * `SelectControlValueAccessor` does.\n */\n@Directive({\n selector: 'bs-select',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsSelectValueAccessor), multi: true }],\n host: {\n // The native change bubbles out of the light-DOM <select>.\n '(change)': 'onNativeChange($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsSelectValueAccessor implements ControlValueAccessor {\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n readonly compareWith = input<(value1: unknown, value2: unknown) => boolean>(Object.is);\n\n /** A form control drives the select: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n /** The form control's value, as the select's string. */\n readonly viewValue = signal<string | null>(null);\n readonly disabled = signal(false);\n /** The string the select shows, from the form control or the `value` input (set by `extendInputs`). */\n selected: Signal<string | null> = computed(() => this.viewValue());\n\n private value: unknown = null;\n private readonly optionMap = new Map<string, unknown>();\n private idCounter = 0;\n private onChange: (value: unknown) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n registerOnChange(fn: (value: unknown) => 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 setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: unknown): void {\n this.value = value;\n const valueString = value == null ? null : this.buildValueString(this.getOptionId(value), value);\n this.viewValue.set(valueString);\n // An option can get its value after the first render; re-select right away.\n const select = this.element.querySelector('select');\n if (select && !select.multiple) syncSelection(select, false, valueString, []);\n }\n\n onNativeChange(event: Event): void {\n const select = event.target;\n if (!(select instanceof HTMLSelectElement) || select.multiple) return;\n const valueString = select.value || null;\n this.viewValue.set(valueString);\n this.value = this.getOptionValue(valueString);\n this.onChange(this.value);\n }\n\n registerOption(): string {\n return (this.idCounter++).toString();\n }\n\n setOption(id: string, value: unknown): void {\n this.optionMap.set(id, value);\n this.writeValue(this.value);\n }\n\n removeOption(id: string): void {\n this.optionMap.delete(id);\n this.writeValue(this.value);\n }\n\n /** Re-select after an option's plain value changed. */\n refresh(): void {\n this.writeValue(this.value);\n }\n\n buildValueString(id: string | null, value: unknown): string {\n if (id == null) return `${value}`;\n const shown = value && typeof value === 'object' ? 'Object' : value;\n return `${id}: ${shown}`.slice(0, 50);\n }\n\n /** The id of the registered option whose value matches, or null when none does. */\n private getOptionId(value: unknown): string | null {\n const compare = this.compareWith();\n return [...this.optionMap.keys()].find((id) => compare(this.optionMap.get(id), value)) ?? null;\n }\n\n /**\n * An empty selection (a `<option value=\"\">` placeholder) reaches the model as\n * `null`; a plain `value` option is never registered and passes its string.\n */\n private getOptionValue(valueString: string | null): unknown {\n const id = valueString == null ? null : valueString.split(':')[0];\n return id !== null && this.optionMap.has(id) ? this.optionMap.get(id) : valueString;\n }\n}\n\n/**\n * Every `<option>` in a template that imports it: inside a `bs-select`, an\n * `[ngValue]` (any value) or a `[value]` (a string). It writes the `selected`\n * attribute for the selected option, so the server-rendered page shows the\n * selection with JavaScript off.\n */\n@Directive({\n selector: 'option',\n host: { '[attr.selected]': \"isSelected() ? '' : null\" },\n})\nexport class BsSelectOption implements OnDestroy {\n private readonly element = inject<ElementRef<HTMLOptionElement>>(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly select = inject(BsSelectValueAccessor, { optional: true, host: true });\n private readonly id = this.select?.registerOption() ?? '';\n\n readonly ngValue = input<unknown>(undefined);\n readonly value = input<string | undefined>(undefined);\n\n private readonly valueString = signal<string | null>(null);\n protected readonly isSelected = computed(() => !!this.select && this.valueString() !== null && this.select.selected() === this.valueString());\n\n constructor() {\n effect(() => {\n const ngValue = this.ngValue();\n if (ngValue === undefined || !this.select) return;\n this.setValue(this.select.buildValueString(this.id, ngValue));\n this.select.setOption(this.id, ngValue);\n });\n effect(() => {\n const value = this.value();\n if (value === undefined) return;\n this.setValue(value);\n this.select?.refresh();\n });\n }\n\n private setValue(value: string): void {\n // The attribute, so the server-rendered option carries it too.\n this.renderer.setAttribute(this.element, 'value', value);\n this.valueString.set(value);\n }\n\n ngOnDestroy(): void {\n this.select?.removeOption(this.id);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';\nimport type { SelectInputs } from '@mintplayer/ui-core/select';\nimport { BsSelectValueAccessor } from './value-accessors/select-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-select` (PRD #437 D10 escape\n * hatch): Angular forms. A bound form control drives the value and the\n * disabled state, and its validity reaches the select's ARIA and message.\n */\n\nexport const hostDirectives = [\n { directive: BsSelectValueAccessor, inputs: ['compareWith'] },\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => SelectInputs): () => SelectInputs {\n const accessor = inject(BsSelectValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n const merged = computed<SelectInputs>(() => {\n const value = inputs();\n const bound = accessor.bound();\n return {\n ...value,\n value: 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 accessor.selected = computed(() => merged().value);\n return merged;\n}\n","// GENERATED from the select manifest (select) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type SelectChangeEventDetail, selectCore, type SelectInputs, type SelectOption, selectScopedStyles } from '@mintplayer/ui-core/select';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../select.angular';\n\n/** The `option` slot of `<bs-select>`: `<ng-template bsSelectOption>` or `*bsSelectOption`. */\n@Directive({ selector: '[bsSelectOption]' })\nexport class BsSelectOptionDirective {\n readonly templateRef = inject<TemplateRef<{ option: SelectOption } & { $implicit: { option: SelectOption } }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsSelectOptionDirective, ctx: unknown): ctx is { option: SelectOption } & { $implicit: { option: SelectOption } } {\n return true;\n }\n}\n\n/**\n * Bootstrap `.form-select` around a native `<select>` (#437): it works and submits with JavaScript off.\n *\n * Give it `options`, or put `<option>` / `<optgroup>` children inside. `value` (or `values` when\n * `multiple`) is two-way. An `aria-label` on the component names the select; so does `inputLabel`.\n * The `option` slot renders rich option content where the engine supports customizable select.\n */\n@Component({\n selector: 'bs-select',\n templateUrl: './select.view.generated.html',\n imports: [MpPropsDirective, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsSelectComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly size = input<SelectInputs['size']>('md');\n readonly multiple = input<SelectInputs['multiple'], unknown>(false, { transform: booleanAttribute });\n readonly numberVisible = input<SelectInputs['numberVisible'], unknown>(undefined, { transform: (v: unknown) => numberAttribute(v) as SelectInputs['numberVisible'] });\n readonly disabled = input<SelectInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<SelectInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<SelectInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<SelectInputs['errorText']>();\n readonly name = input<SelectInputs['name']>();\n readonly inputLabel = input<SelectInputs['inputLabel']>();\n readonly value = model<SelectInputs['value']>(null);\n readonly values = model<SelectInputs['values']>([]);\n readonly options = input<SelectInputs['options']>();\n /** The user picked: the value, and every value of a multiple select. */\n readonly valuechange = output<SelectChangeEventDetail>();\n\n private readonly optionSlot = contentChild(BsSelectOptionDirective);\n /** The template's named slots. */\n protected readonly slots = computed(() => ({ option: this.optionSlot()?.templateRef }));\n readonly #core = useCore(selectCore, { inputs: ext_extendInputs(() => ({ size: this.size(), multiple: this.multiple(), numberVisible: this.numberVisible(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), name: this.name(), inputLabel: this.inputLabel(), value: this.value(), values: this.values(), options: this.options() })), idPrefix: 'bs-select', outputs: { valueChange: this.valuechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'select' }), models: { value: this.value, values: this.values } });\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('select', selectScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/select/src/templates/select.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<select data-mps=\"select\" [mpProps]=\"p_view.select\">\n @if (p_view.rich && slots().option) {\n <button data-mps=\"select\" type=\"button\">\n <selectedcontent></selectedcontent>\n </button>\n }\n @if (p_view.items) {\n @for (item of p_view.items; track item.key) {\n @if (item.group) {\n <optgroup data-mps=\"select\" [mpProps]=\"item.group\">\n @for (o of item.options; track o.key) {\n <option data-mps=\"select\" [mpProps]=\"o.bag\">\n @if (p_view.rich) {\n @if (slots().option; as slot_option) {\n <ng-container [ngTemplateOutlet]=\"slot_option\" [ngTemplateOutletContext]=\"{ $implicit: { option: o.option }, option: o.option }\" />\n } @else {\n {{ o.option.label }}\n }\n } @else {\n {{ o.option.label }}\n }\n </option>\n }\n </optgroup>\n } @else {\n @for (o of item.options; track o.key) {\n <option data-mps=\"select\" [mpProps]=\"o.bag\">\n @if (p_view.rich) {\n @if (slots().option; as slot_option) {\n <ng-container [ngTemplateOutlet]=\"slot_option\" [ngTemplateOutletContext]=\"{ $implicit: { option: o.option }, option: o.option }\" />\n } @else {\n {{ o.option.label }}\n }\n } @else {\n {{ o.option.label }}\n }\n </option>\n }\n }\n }\n } @else {\n <ng-content />\n }\n</select>\n@if (p_view.showFeedback) {\n <div data-mps=\"select\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the select manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsSelectComponent, BsSelectOptionDirective } from './select.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsSelectValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;;;;AAIA;;;;;;AAMG;MAUU,qBAAqB,CAAA;AATlC,IAAA,WAAA,GAAA;AAUmB,QAAA,IAAA,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B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,usDAmBe,uBAAuB,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAC,qBAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClDpE,41DAmDA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDxBY,gBAAgB,2EAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIjC,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;+BACE,WAAW,EAAA,OAAA,EAEZ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAA,eAAA,EAC5B,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,41DAAA,EAAA;+3CAqBS,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElDpE;;ACAA;;AAEG;;;;"}
@@ -2,8 +2,9 @@ import * as i0 from '@angular/core';
2
2
  import { inject, Injector, DestroyRef, signal, forwardRef, Directive, computed, ElementRef, model, input, numberAttribute, booleanAttribute, output, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
4
4
  import { emptySignature, signaturePadCore, signaturePadScopedStyles } from '@mintplayer/ui-core/signature-pad';
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
  /**
@@ -123,6 +124,7 @@ class BsSignaturePadComponent {
123
124
  this.#core = useCore(signaturePadCore, { inputs: extendInputs(() => ({ signature: this.signature(), width: this.width(), height: this.height(), showAccessibilityToggle: this.showAccessibilityToggle(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), inputLabel: this.inputLabel(), labels: this.labels() })), idPrefix: 'bs-signature-pad', outputs: { signatureChange: this.signaturechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'signature-pad' }), models: { signature: this.signature } });
124
125
  /** The template's props. */
125
126
  this.props = this.#core.props;
127
+ useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
126
128
  useScopedStyles('signature-pad', signaturePadScopedStyles);
127
129
  }
128
130
  /** Remove the most recent stroke (ignored when disabled). */
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-signature-pad.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/value-accessor/signature-pad-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/signature-pad.angular.ts","../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/generated/signature-pad.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/generated/signature-pad.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/signature-pad/mintplayer-ng-bootstrap-signature-pad.ts"],"sourcesContent":["import { DestroyRef, Directive, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { emptySignature, type Signature } from '@mintplayer/ui-core/signature-pad';\nimport { BsSignaturePadComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-signature-pad` (a host directive of the\n * generated component, see `signature-pad.angular.ts`), so `ngModel`,\n * `formControl` and `formControlName` work without an extra import. A bound\n * form control drives the signature through `viewValue`; what the user draws\n * or types reaches the form through the component's `signature` model, which a\n * form write never echoes.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsSignaturePadValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsSignaturePadValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the signature: its `viewValue` wins over the `signature` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<Signature>(emptySignature());\n readonly disabled = signal(false);\n\n private onChange: (value: Signature) => 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 component = this.injector.get(BsSignaturePadComponent);\n const sub = component.signaturechange.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: Signature) => 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: Signature | null | undefined): void {\n this.viewValue.set(value ?? emptySignature());\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport type { SignaturePadInputs } from '@mintplayer/ui-core/signature-pad';\nimport { BsSignaturePadValueAccessor } from './value-accessor/signature-pad-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-signature-pad` (PRD #437 D10\n * escape hatch): Angular forms. A bound form control drives the signature and\n * the disabled state, and its validity reaches the typed field's ARIA and the\n * message under the pad.\n */\n\nexport const hostDirectives = [\n BsSignaturePadValueAccessor,\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => SignaturePadInputs): () => SignaturePadInputs {\n const accessor = inject(BsSignaturePadValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<SignaturePadInputs>(() => {\n const value = inputs();\n return {\n ...value,\n signature: accessor.bound() ? accessor.viewValue() : value.signature,\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 signature-pad manifest (signature-pad) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type Signature, signaturePadCore, type SignaturePadInputs, type SignaturePadMethods, signaturePadScopedStyles } from '@mintplayer/ui-core/signature-pad';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../signature-pad.angular';\n\n/**\n * Freehand signature capture with a typed alternative (#437).\n *\n * Drawing is pointer-only; the typed field under the canvas is the keyboard path, painted onto\n * the canvas in a script font and stored on `Signature.text`. With JavaScript off the pad renders\n * inert: the canvas cannot draw, so the field and the buttons are disabled until it hydrates.\n */\n@Component({\n selector: 'bs-signature-pad',\n templateUrl: './signature-pad.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsSignaturePadComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly signature = model<SignaturePadInputs['signature']>({ strokes: [] });\n readonly width = input<SignaturePadInputs['width'], unknown>(500, { transform: (v: unknown) => numberAttribute(v) as SignaturePadInputs['width'] });\n readonly height = input<SignaturePadInputs['height'], unknown>(300, { transform: (v: unknown) => numberAttribute(v) as SignaturePadInputs['height'] });\n readonly showAccessibilityToggle = input<SignaturePadInputs['showAccessibilityToggle'], unknown>(true, { transform: booleanAttribute });\n readonly disabled = input<SignaturePadInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<SignaturePadInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<SignaturePadInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<SignaturePadInputs['errorText']>(null);\n readonly inputLabel = input<SignaturePadInputs['inputLabel']>(null);\n readonly labels = input<SignaturePadInputs['labels']>(null);\n /** Every stroke point, typed character, undo and clear: the current signature. */\n readonly signaturechange = output<Signature>();\n\n readonly #core = useCore(signaturePadCore, { inputs: ext_extendInputs(() => ({ signature: this.signature(), width: this.width(), height: this.height(), showAccessibilityToggle: this.showAccessibilityToggle(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), inputLabel: this.inputLabel(), labels: this.labels() })), idPrefix: 'bs-signature-pad', outputs: { signatureChange: this.signaturechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'signature-pad' }), models: { signature: this.signature } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('signature-pad', signaturePadScopedStyles);\n }\n\n /** Remove the most recent stroke (ignored when disabled). */\n undo(...args: Parameters<SignaturePadMethods['undo']>): ReturnType<SignaturePadMethods['undo']> {\n return this.#core.call('undo', args) as ReturnType<SignaturePadMethods['undo']>;\n }\n\n /** Wipe the strokes and the typed text (ignored when disabled). */\n clear(...args: Parameters<SignaturePadMethods['clear']>): ReturnType<SignaturePadMethods['clear']> {\n return this.#core.call('clear', args) as ReturnType<SignaturePadMethods['clear']>;\n }\n\n /** Move focus to the typed field. */\n focusInput(...args: Parameters<SignaturePadMethods['focusInput']>): ReturnType<SignaturePadMethods['focusInput']> {\n return this.#core.call('focusInput', args) as ReturnType<SignaturePadMethods['focusInput']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/signature-pad/src/templates/signature-pad.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<canvas data-mps=\"signature-pad\" [mpProps]=\"p_view.canvas\"></canvas>\n<div data-mps=\"signature-pad\" [mpProps]=\"p_view.controls\">\n @if (p_view.typed) {\n <input data-mps=\"signature-pad\" [mpProps]=\"p_view.typed\">\n }\n <button data-mps=\"signature-pad\" [mpProps]=\"p_view.undo\">\n {{ p_view.undoText }}\n </button>\n <button data-mps=\"signature-pad\" [mpProps]=\"p_view.clear\">\n {{ p_view.clearText }}\n </button>\n</div>\n@if (p_view.showFeedback) {\n <div data-mps=\"signature-pad\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the signature-pad manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsSignaturePadComponent } from './signature-pad.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsSignaturePadValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;;AAKA;;;;;;;AAOG;MAOU,2BAA2B,CAAA;AANxC,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;AACrB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAY,cAA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A,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIf,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;+BACE,kBAAkB,EAAA,OAAA,EAEnB,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-signature-pad.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/value-accessor/signature-pad-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/signature-pad.angular.ts","../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/generated/signature-pad.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/generated/signature-pad.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/signature-pad/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/signature-pad/mintplayer-ng-bootstrap-signature-pad.ts"],"sourcesContent":["import { DestroyRef, Directive, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { emptySignature, type Signature } from '@mintplayer/ui-core/signature-pad';\nimport { BsSignaturePadComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-signature-pad` (a host directive of the\n * generated component, see `signature-pad.angular.ts`), so `ngModel`,\n * `formControl` and `formControlName` work without an extra import. A bound\n * form control drives the signature through `viewValue`; what the user draws\n * or types reaches the form through the component's `signature` model, which a\n * form write never echoes.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsSignaturePadValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsSignaturePadValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the signature: its `viewValue` wins over the `signature` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<Signature>(emptySignature());\n readonly disabled = signal(false);\n\n private onChange: (value: Signature) => 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 component = this.injector.get(BsSignaturePadComponent);\n const sub = component.signaturechange.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: Signature) => 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: Signature | null | undefined): void {\n this.viewValue.set(value ?? emptySignature());\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';\nimport type { SignaturePadInputs } from '@mintplayer/ui-core/signature-pad';\nimport { BsSignaturePadValueAccessor } from './value-accessor/signature-pad-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-signature-pad` (PRD #437 D10\n * escape hatch): Angular forms. A bound form control drives the signature and\n * the disabled state, and its validity reaches the typed field's ARIA and the\n * message under the pad.\n */\n\nexport const hostDirectives = [\n BsSignaturePadValueAccessor,\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => SignaturePadInputs): () => SignaturePadInputs {\n const accessor = inject(BsSignaturePadValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<SignaturePadInputs>(() => {\n const value = inputs();\n return {\n ...value,\n signature: accessor.bound() ? accessor.viewValue() : value.signature,\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 signature-pad manifest (signature-pad) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type Signature, signaturePadCore, type SignaturePadInputs, type SignaturePadMethods, signaturePadScopedStyles } from '@mintplayer/ui-core/signature-pad';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../signature-pad.angular';\n\n/**\n * Freehand signature capture with a typed alternative (#437).\n *\n * Drawing is pointer-only; the typed field under the canvas is the keyboard path, painted onto\n * the canvas in a script font and stored on `Signature.text`. With JavaScript off the pad renders\n * inert: the canvas cannot draw, so the field and the buttons are disabled until it hydrates.\n */\n@Component({\n selector: 'bs-signature-pad',\n templateUrl: './signature-pad.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsSignaturePadComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly signature = model<SignaturePadInputs['signature']>({ strokes: [] });\n readonly width = input<SignaturePadInputs['width'], unknown>(500, { transform: (v: unknown) => numberAttribute(v) as SignaturePadInputs['width'] });\n readonly height = input<SignaturePadInputs['height'], unknown>(300, { transform: (v: unknown) => numberAttribute(v) as SignaturePadInputs['height'] });\n readonly showAccessibilityToggle = input<SignaturePadInputs['showAccessibilityToggle'], unknown>(true, { transform: booleanAttribute });\n readonly disabled = input<SignaturePadInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<SignaturePadInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<SignaturePadInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<SignaturePadInputs['errorText']>(null);\n readonly inputLabel = input<SignaturePadInputs['inputLabel']>(null);\n readonly labels = input<SignaturePadInputs['labels']>(null);\n /** Every stroke point, typed character, undo and clear: the current signature. */\n readonly signaturechange = output<Signature>();\n\n readonly #core = useCore(signaturePadCore, { inputs: ext_extendInputs(() => ({ signature: this.signature(), width: this.width(), height: this.height(), showAccessibilityToggle: this.showAccessibilityToggle(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), inputLabel: this.inputLabel(), labels: this.labels() })), idPrefix: 'bs-signature-pad', outputs: { signatureChange: this.signaturechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'signature-pad' }), models: { signature: this.signature } });\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('signature-pad', signaturePadScopedStyles);\n }\n\n /** Remove the most recent stroke (ignored when disabled). */\n undo(...args: Parameters<SignaturePadMethods['undo']>): ReturnType<SignaturePadMethods['undo']> {\n return this.#core.call('undo', args) as ReturnType<SignaturePadMethods['undo']>;\n }\n\n /** Wipe the strokes and the typed text (ignored when disabled). */\n clear(...args: Parameters<SignaturePadMethods['clear']>): ReturnType<SignaturePadMethods['clear']> {\n return this.#core.call('clear', args) as ReturnType<SignaturePadMethods['clear']>;\n }\n\n /** Move focus to the typed field. */\n focusInput(...args: Parameters<SignaturePadMethods['focusInput']>): ReturnType<SignaturePadMethods['focusInput']> {\n return this.#core.call('focusInput', args) as ReturnType<SignaturePadMethods['focusInput']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/signature-pad/src/templates/signature-pad.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<canvas data-mps=\"signature-pad\" [mpProps]=\"p_view.canvas\"></canvas>\n<div data-mps=\"signature-pad\" [mpProps]=\"p_view.controls\">\n @if (p_view.typed) {\n <input data-mps=\"signature-pad\" [mpProps]=\"p_view.typed\">\n }\n <button data-mps=\"signature-pad\" [mpProps]=\"p_view.undo\">\n {{ p_view.undoText }}\n </button>\n <button data-mps=\"signature-pad\" [mpProps]=\"p_view.clear\">\n {{ p_view.clearText }}\n </button>\n</div>\n@if (p_view.showFeedback) {\n <div data-mps=\"signature-pad\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the signature-pad manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsSignaturePadComponent } from './signature-pad.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsSignaturePadValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;;;AAKA;;;;;;;AAOG;MAOU,2BAA2B,CAAA;AANxC,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;AACrB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAY,cAAc,EAAE;sFAAC;QAC/C,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAA+B,MAAM,SAAS;AAC9D,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA6BxC,IAAA;IA3BC,QAAQ,GAAA;;QAEN,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC;QAC5D,MAAM,GAAG,GAAG,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;YACxD,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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EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAC,2BAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrBpC,8wBAmBA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDFY,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,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;+BACE,kBAAkB,EAAA,OAAA,EAEnB,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,8wBAAA,EAAA;;;AEnBpC;;ACAA;;AAEG;;;;"}
@@ -1,26 +1,40 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { Color } from '@mintplayer/ng-bootstrap';
2
+ import { inject, ElementRef, input, booleanAttribute, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';
4
+ import { spinnerCore, spinnerScopedStyles } from '@mintplayer/ui-core/spinner';
5
+ import { bootstrapSpinners } from '@mintplayer/ui-core/bootstrap/spinners';
4
6
 
7
+ // GENERATED from the spinner manifest (spinner) by @mintplayer/nx-component-compiler. Do not edit.
8
+ /** Bootstrap's spinner: a `role="status"` loading indicator whose visually hidden `label` a screen reader announces (#452). */
5
9
  class BsSpinnerComponent {
10
+ #core;
6
11
  constructor() {
7
- this.colors = Color;
12
+ /** The host element. */
13
+ this.elementRef = inject(ElementRef);
8
14
  this.type = input('border', /* @ts-ignore */
9
15
  ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
10
- this.color = input(Color.dark, /* @ts-ignore */
16
+ this.color = input(null, /* @ts-ignore */
11
17
  ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
12
- this.spinnerClass = computed(() => `spinner-${this.type()}`, /* @ts-ignore */
13
- ...(ngDevMode ? [{ debugName: "spinnerClass" }] : /* istanbul ignore next */ []));
14
- this.colorClass = computed(() => `text-${this.colors[this.color()]}`, /* @ts-ignore */
15
- ...(ngDevMode ? [{ debugName: "colorClass" }] : /* istanbul ignore next */ []));
18
+ this.small = input(false, { ...(ngDevMode ? { debugName: "small" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
19
+ this.label = input('Loading…', /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
21
+ this.#core = useCore(spinnerCore, { inputs: () => ({ type: this.type(), color: this.color(), small: this.small(), label: this.label() }), idPrefix: 'bs-spinner', hostBag: (props) => ({ ...props.root, 'data-mps': 'spinner' }) });
22
+ /** The template's props. */
23
+ this.props = this.#core.props;
24
+ useScopedStyles(bootstrapSpinners.key, bootstrapSpinners.css, { order: bootstrapSpinners.order });
25
+ useScopedStyles('spinner', spinnerScopedStyles);
16
26
  }
17
27
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsSpinnerComponent, isStandalone: true, selector: "bs-spinner", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"[spinnerClass(), colorClass()]\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n</div>\n", styles: [":host ::ng-deep .spinner-grow,:host ::ng-deep .spinner-border{display:inline-block;flex-shrink:0;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}:host ::ng-deep .spinner-border{--bs-spinner-width: 2rem;--bs-spinner-height: 2rem;--bs-spinner-vertical-align: -.125em;--bs-spinner-border-width: .25em;--bs-spinner-animation-speed: .75s;--bs-spinner-animation-name: spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}:host ::ng-deep .spinner-border-sm{--bs-spinner-width: 1rem;--bs-spinner-height: 1rem;--bs-spinner-border-width: .2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}:host ::ng-deep .spinner-grow{--bs-spinner-width: 2rem;--bs-spinner-height: 2rem;--bs-spinner-vertical-align: -.125em;--bs-spinner-animation-speed: .75s;--bs-spinner-animation-name: spinner-grow;background-color:currentcolor;opacity:0}:host ::ng-deep .spinner-grow-sm{--bs-spinner-width: 1rem;--bs-spinner-height: 1rem}@media(prefers-reduced-motion:reduce){:host ::ng-deep .spinner-border,:host ::ng-deep .spinner-grow{--bs-spinner-animation-speed: 1.5s}}:host ::ng-deep .spinner-border{animation:.75s linear infinite spinner-border}:host ::ng-deep .spinner-grow{animation:.75s linear infinite spinner-grow}@media(prefers-reduced-motion:reduce){:host ::ng-deep .spinner-border,:host ::ng-deep .spinner-grow{animation-duration:1.5s}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
28
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsSpinnerComponent, isStandalone: true, selector: "bs-spinner", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/spinner/src/templates/spinner.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_label = props().label;\n<span data-mps=\"spinner\" class=\"visually-hidden\">\n {{ p_label }}\n</span>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
19
29
  }
20
30
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsSpinnerComponent, decorators: [{
21
31
  type: Component,
22
- args: [{ selector: 'bs-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"[spinnerClass(), colorClass()]\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n</div>\n", styles: [":host ::ng-deep .spinner-grow,:host ::ng-deep .spinner-border{display:inline-block;flex-shrink:0;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}:host ::ng-deep .spinner-border{--bs-spinner-width: 2rem;--bs-spinner-height: 2rem;--bs-spinner-vertical-align: -.125em;--bs-spinner-border-width: .25em;--bs-spinner-animation-speed: .75s;--bs-spinner-animation-name: spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}:host ::ng-deep .spinner-border-sm{--bs-spinner-width: 1rem;--bs-spinner-height: 1rem;--bs-spinner-border-width: .2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}:host ::ng-deep .spinner-grow{--bs-spinner-width: 2rem;--bs-spinner-height: 2rem;--bs-spinner-vertical-align: -.125em;--bs-spinner-animation-speed: .75s;--bs-spinner-animation-name: spinner-grow;background-color:currentcolor;opacity:0}:host ::ng-deep .spinner-grow-sm{--bs-spinner-width: 1rem;--bs-spinner-height: 1rem}@media(prefers-reduced-motion:reduce){:host ::ng-deep .spinner-border,:host ::ng-deep .spinner-grow{--bs-spinner-animation-speed: 1.5s}}:host ::ng-deep .spinner-border{animation:.75s linear infinite spinner-border}:host ::ng-deep .spinner-grow{animation:.75s linear infinite spinner-grow}@media(prefers-reduced-motion:reduce){:host ::ng-deep .spinner-border,:host ::ng-deep .spinner-grow{animation-duration:1.5s}}\n"] }]
23
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
32
+ args: [{ selector: 'bs-spinner', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/spinner/src/templates/spinner.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_label = props().label;\n<span data-mps=\"spinner\" class=\"visually-hidden\">\n {{ p_label }}\n</span>\n" }]
33
+ }], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], small: [{ type: i0.Input, args: [{ isSignal: true, alias: "small", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
34
+
35
+ // GENERATED from the spinner manifest by @mintplayer/nx-component-compiler. Do not edit.
36
+
37
+ // Generated from @mintplayer/ui-core/spinner (PRD #437 D10).
24
38
 
25
39
  /**
26
40
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-spinner.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/spinner/src/spinner.component.ts","../../../../libs/mintplayer-ng-bootstrap/spinner/src/spinner.component.html","../../../../libs/mintplayer-ng-bootstrap/spinner/mintplayer-ng-bootstrap-spinner.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\n\n@Component({\n selector: 'bs-spinner',\n templateUrl: './spinner.component.html',\n styleUrls: ['./spinner.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsSpinnerComponent {\n readonly colors = Color;\n\n type = input<'border' | 'grow'>('border');\n color = input<Color>(Color.dark);\n\n spinnerClass = computed(() => `spinner-${this.type()}`);\n colorClass = computed(() => `text-${this.colors[this.color()]}`);\n}\n","<div [class]=\"[spinnerClass(), colorClass()]\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MASa,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;QAOW,IAAA,CAAA,MAAM,GAAG,KAAK;QAEvB,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,QAAQ;iFAAC;AACzC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAQ,KAAK,CAAC,IAAI;kFAAC;QAEhC,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAA,QAAA,EAAW,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE;yFAAC;AACvD,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAA,KAAA,EAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA,CAAE;uFAAC;AACjE,IAAA;8GARY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,+TCT/B,mIAGA,EAAA,MAAA,EAAA,CAAA,ulDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDMa,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;+BACE,YAAY,EAAA,eAAA,EAGL,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mIAAA,EAAA,MAAA,EAAA,CAAA,ulDAAA,CAAA,EAAA;;;AEPjD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-spinner.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/spinner/src/generated/spinner.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/spinner/src/generated/spinner.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/spinner/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/spinner/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/spinner/mintplayer-ng-bootstrap-spinner.ts"],"sourcesContent":["// GENERATED from the spinner manifest (spinner) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input } from '@angular/core';\nimport { useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { spinnerCore, type SpinnerInputs, spinnerScopedStyles } from '@mintplayer/ui-core/spinner';\nimport { bootstrapSpinners } from '@mintplayer/ui-core/bootstrap/spinners';\n\n/** Bootstrap's spinner: a `role=\"status\"` loading indicator whose visually hidden `label` a screen reader announces (#452). */\n@Component({\n selector: 'bs-spinner',\n templateUrl: './spinner.view.generated.html',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsSpinnerComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly type = input<SpinnerInputs['type']>('border');\n readonly color = input<SpinnerInputs['color']>(null);\n readonly small = input<SpinnerInputs['small'], unknown>(false, { transform: booleanAttribute });\n readonly label = input<SpinnerInputs['label']>('Loading…');\n\n readonly #core = useCore(spinnerCore, { inputs: () => ({ type: this.type(), color: this.color(), small: this.small(), label: this.label() }), idPrefix: 'bs-spinner', hostBag: (props) => ({ ...props.root, 'data-mps': 'spinner' }) });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapSpinners.key, bootstrapSpinners.css, { order: bootstrapSpinners.order }); useScopedStyles('spinner', spinnerScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/spinner/src/templates/spinner.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_label = props().label;\n<span data-mps=\"spinner\" class=\"visually-hidden\">\n {{ p_label }}\n</span>\n","// GENERATED from the spinner manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsSpinnerComponent } from './spinner.component.generated';\n","// Generated from @mintplayer/ui-core/spinner (PRD #437 D10).\nexport * from './generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAMA;MAOa,kBAAkB,CAAA;AASpB,IAAA,KAAK;AAId,IAAA,WAAA,GAAA;;AAXS,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;QAExD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAwB,QAAQ;iFAAC;QAC7C,IAAA,CAAA,KAA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ACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,OAAA,EAEb,EAAE,EAAA,eAAA,EACM,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6PAAA,EAAA;;;AEXjD;;ACAA;;ACAA;;AAEG;;;;"}
@@ -1,17 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, viewChild, effect, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { signal, Directive, viewChild, effect, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { BsObserveSizeDirective } from '@mintplayer/ng-bootstrap/observe-size';
4
4
 
5
+ /**
6
+ * Reserves room for the `bs-sticky-footer` inside it: a bottom margin as tall as
7
+ * the footer, kept current by the footer's size observer. A signal, so the host
8
+ * binding re-renders when the footer writes it (zoneless: a plain field write
9
+ * schedules nothing, and the margin never appeared).
10
+ */
5
11
  class BsStickyFooterParentDirective {
12
+ constructor() {
13
+ this.marginBottom = signal(undefined, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "marginBottom" }] : /* istanbul ignore next */ []));
15
+ }
6
16
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsStickyFooterParentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
7
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsStickyFooterParentDirective, isStandalone: true, selector: "[bsStickyFooterParent]", host: { properties: { "style.margin-bottom.px": "marginBottom" } }, ngImport: i0 }); }
17
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsStickyFooterParentDirective, isStandalone: true, selector: "[bsStickyFooterParent]", host: { properties: { "style.margin-bottom.px": "marginBottom()" } }, ngImport: i0 }); }
8
18
  }
9
19
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsStickyFooterParentDirective, decorators: [{
10
20
  type: Directive,
11
21
  args: [{
12
22
  selector: '[bsStickyFooterParent]',
13
23
  host: {
14
- '[style.margin-bottom.px]': 'marginBottom',
24
+ '[style.margin-bottom.px]': 'marginBottom()',
15
25
  },
16
26
  }]
17
27
  }] });
@@ -27,7 +37,7 @@ class BsStickyFooterComponent {
27
37
  effect(() => {
28
38
  const height = this.sizeObserver().height();
29
39
  if (height !== undefined) {
30
- this.parent.marginBottom = height;
40
+ this.parent.marginBottom.set(height);
31
41
  }
32
42
  }, { injector: this.injector });
33
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-sticky-footer.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/sticky-footer/src/sticky-footer-parent/sticky-footer-parent.directive.ts","../../../../libs/mintplayer-ng-bootstrap/sticky-footer/src/sticky-footer/sticky-footer.component.ts","../../../../libs/mintplayer-ng-bootstrap/sticky-footer/src/sticky-footer/sticky-footer.component.html","../../../../libs/mintplayer-ng-bootstrap/sticky-footer/mintplayer-ng-bootstrap-sticky-footer.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[bsStickyFooterParent]',\n host: {\n '[style.margin-bottom.px]': 'marginBottom',\n },\n})\nexport class BsStickyFooterParentDirective {\n marginBottom?: number;\n}\n","import { AfterViewInit, Component, effect, Injector, viewChild, ChangeDetectionStrategy} from '@angular/core';\nimport { BsStickyFooterParentDirective } from '../sticky-footer-parent/sticky-footer-parent.directive';\nimport { BsObserveSizeDirective } from '@mintplayer/ng-bootstrap/observe-size';\n\n@Component({\n selector: 'bs-sticky-footer',\n templateUrl: './sticky-footer.component.html',\n styleUrls: ['./sticky-footer.component.scss'],\n imports: [BsObserveSizeDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsStickyFooterComponent implements AfterViewInit {\n constructor(\n private parent: BsStickyFooterParentDirective,\n private injector: Injector\n ) {}\n\n ngAfterViewInit() {\n effect(() => {\n const height = this.sizeObserver().height();\n if (height !== undefined) {\n this.parent.marginBottom = height;\n }\n }, { injector: this.injector });\n }\n\n readonly sizeObserver = viewChild.required<BsObserveSizeDirective>('sizeObserver');\n}\n","<footer bsObserveSize #sizeObserver=\"bsObserveSize\" class=\"footer position-absolute\">\n <ng-content></ng-content>\n</footer>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.BsStickyFooterParentDirective"],"mappings":";;;;MAQa,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,wBAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,IAAI,EAAE;AACJ,wBAAA,0BAA0B,EAAE,cAAc;AAC3C,qBAAA;AACF,iBAAA;;;MCIY,uBAAuB,CAAA;IAClC,WAAA,CACU,MAAqC,EACrC,QAAkB,EAAA;QADlB,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,QAAQ,GAAR,QAAQ;AAYT,QAAA,IAAA,CAAA,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAyB,cAAc;yFAAC;IAX/E;IAEH,eAAe,GAAA;QACb,MAAM,CAAC,MAAK;YACV,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE;AAC3C,YAAA,IAAI,MAAM,KAAK,SAAS,EAAE;AACxB,gBAAA,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM;YACnC;QACF,CAAC,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ky-footer/src/sticky-footer-parent/sticky-footer-parent.directive.ts","../../../../libs/mintplayer-ng-bootstrap/sticky-footer/src/sticky-footer/sticky-footer.component.ts","../../../../libs/mintplayer-ng-bootstrap/sticky-footer/src/sticky-footer/sticky-footer.component.html","../../../../libs/mintplayer-ng-bootstrap/sticky-footer/mintplayer-ng-bootstrap-sticky-footer.ts"],"sourcesContent":["import { Directive, signal } from '@angular/core';\n\n/**\n * Reserves room for the `bs-sticky-footer` inside it: a bottom margin as tall as\n * the footer, kept current by the footer's size observer. A signal, so the host\n * binding re-renders when the footer writes it (zoneless: a plain field write\n * schedules nothing, and the margin never appeared).\n */\n@Directive({\n selector: '[bsStickyFooterParent]',\n host: {\n '[style.margin-bottom.px]': 'marginBottom()',\n },\n})\nexport class BsStickyFooterParentDirective {\n readonly marginBottom = signal<number | undefined>(undefined);\n}\n","import { AfterViewInit, Component, effect, Injector, viewChild, ChangeDetectionStrategy} from '@angular/core';\nimport { BsStickyFooterParentDirective } from '../sticky-footer-parent/sticky-footer-parent.directive';\nimport { BsObserveSizeDirective } from '@mintplayer/ng-bootstrap/observe-size';\n\n@Component({\n selector: 'bs-sticky-footer',\n templateUrl: './sticky-footer.component.html',\n styleUrls: ['./sticky-footer.component.scss'],\n imports: [BsObserveSizeDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsStickyFooterComponent implements AfterViewInit {\n constructor(\n private parent: BsStickyFooterParentDirective,\n private injector: Injector\n ) {}\n\n ngAfterViewInit() {\n effect(() => {\n const height = this.sizeObserver().height();\n if (height !== undefined) {\n this.parent.marginBottom.set(height);\n }\n }, { injector: this.injector });\n }\n\n readonly sizeObserver = viewChild.required<BsObserveSizeDirective>('sizeObserver');\n}\n","<footer bsObserveSize #sizeObserver=\"bsObserveSize\" class=\"footer position-absolute\">\n <ng-content></ng-content>\n</footer>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.BsStickyFooterParentDirective"],"mappings":";;;;AAEA;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AAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,cAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,cAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXpC,qIAES,EAAA,MAAA,EAAA,CAAA,qFAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDMG,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGrB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,WAGnB,CAAC,sBAAsB,CAAC,EAAA,eAAA,EAChB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qIAAA,EAAA,MAAA,EAAA,CAAA,qFAAA,CAAA,EAAA;kKAiBoB,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1BnF;;AAEG;;;;"}
@@ -1,8 +1,9 @@
1
+ import { bootstrapNav } from '@mintplayer/ui-core/bootstrap/nav';
1
2
  import { NgTemplateOutlet } from '@angular/common';
2
3
  import * as i0 from '@angular/core';
3
4
  import { inject, TemplateRef, Directive, input, contentChild, viewChild, ChangeDetectionStrategy, Component, contentChildren, forwardRef, signal, ElementRef, computed, afterNextRender } from '@angular/core';
4
5
  import { BsIdService } from '@mintplayer/ng-bootstrap/a11y';
5
- import { useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
6
+ import { useBootstrap, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
6
7
  import { resolveActiveTab, connectTabControl, TAB_CONTROL_SCOPE, tabControlScopedStyles, tabControlTabClick, tabControlKeydown, tabControlChanged } from '@mintplayer/ui-core/tab-control';
7
8
 
8
9
  class BsTabPageHeaderDirective {
@@ -99,6 +100,7 @@ class BsTabControlComponent {
99
100
  ...(ngDevMode ? [{ debugName: "bottomTabs" }] : /* istanbul ignore next */ []));
100
101
  this.view = computed(() => connectTabControl({ id: this.id, tabsPosition: this.tabsPosition(), border: this.border(), enhanced: this.enhanced() }, this.states(), this.activeIndex()), /* @ts-ignore */
101
102
  ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
103
+ useBootstrap(bootstrapNav);
102
104
  useScopedStyles(TAB_CONTROL_SCOPE, tabControlScopedStyles);
103
105
  afterNextRender(() => this.enhanced.set(true));
104
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-tab-control.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-page-header/tab-page-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-page/tab-page.component.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-control/tab-control.component.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-control/tab-control.component.html","../../../../libs/mintplayer-ng-bootstrap/tab-control/mintplayer-ng-bootstrap-tab-control.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[bsTabPageHeader]',\n})\nexport class BsTabPageHeaderDirective {\n template = inject(TemplateRef);\n}\n","import { ChangeDetectionStrategy, Component, contentChild, input, TemplateRef, viewChild } from '@angular/core';\nimport { BsTabPageHeaderDirective } from '../tab-page-header/tab-page-header.directive';\n\n/**\n * One page of a `<bs-tab-control>`. Renders nothing itself: the control\n * renders every radio, tab and pane as siblings (the CSS pairs the n-th radio\n * with the n-th pane), so the page hands over its header and body templates.\n */\n@Component({\n selector: 'bs-tab-page',\n template: '<ng-template #body><ng-content /></ng-template>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { hidden: '' },\n})\nexport class BsTabPageComponent {\n readonly disabled = input(false);\n readonly headerTemplate = contentChild(BsTabPageHeaderDirective);\n readonly body = viewChild<TemplateRef<unknown>>('body');\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { MpPropsDirective, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport {\n connectTabControl,\n resolveActiveTab,\n TAB_CONTROL_SCOPE,\n tabControlChanged,\n tabControlKeydown,\n tabControlScopedStyles,\n tabControlTabClick,\n} from '@mintplayer/ui-core/tab-control';\nimport { BsTabPageComponent } from '../tab-page/tab-page.component';\nimport { BsTabsPosition } from '../tabs-position';\n\n/**\n * `<bs-tab-control>` — Bootstrap nav-tabs over one native radio per tab (#437).\n *\n * <bs-tab-control [border]=\"true\" tabsPosition=\"top\">\n * <bs-tab-page [disabled]=\"false\">\n * <ng-container *bsTabPageHeader>Profile</ng-container>\n * Page content\n * </bs-tab-page>\n * </bs-tab-control>\n *\n * Renders the markup of `@mintplayer/ui-core/tab-control` in its own\n * template, so the server-rendered page is a working tab control: the\n * checked radio shows its pane through CSS with JavaScript off. Once the\n * client has rendered, the labels become APG tabs (roving tabindex,\n * automatic activation) and the radios leave the tab order. The host is the\n * `.tab-control` root; each page hands over its header and body as templates.\n */\n@Component({\n selector: 'bs-tab-control',\n templateUrl: './tab-control.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MpPropsDirective, NgTemplateOutlet],\n host: {\n '[attr.data-mps]': 'view().root[\"data-mps\"]',\n '[class.tab-control]': 'true',\n '[attr.data-tabs-position]': 'view().root[\"data-tabs-position\"]',\n '(change)': 'onChange($event)',\n },\n})\nexport class BsTabControlComponent {\n /** Draw the outline around the active pane. */\n readonly border = input(true);\n /** Show the first enabled page while none is active. */\n readonly selectFirstTab = input(true);\n readonly tabsPosition = input<BsTabsPosition>('top');\n\n readonly tabPages = contentChildren<BsTabPageComponent>(forwardRef(() => BsTabPageComponent));\n /** The page the user picked; `checkedTab` is the one that is shown. */\n readonly activeTab = signal<BsTabPageComponent | null>(null);\n\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly id = inject(BsIdService).next('bs-tab-control');\n /** The client has rendered: switch from the radio tier to the tab tier. */\n private readonly enhanced = signal(false);\n\n private readonly states = computed(() => this.tabPages().map((tab) => ({ disabled: tab.disabled() })));\n protected readonly activeIndex = computed(() => {\n const active = this.activeTab();\n return resolveActiveTab(this.states(), active ? this.tabPages().indexOf(active) : null, this.selectFirstTab());\n });\n readonly checkedTab = computed(() => {\n const index = this.activeIndex();\n return index === null ? null : this.tabPages()[index];\n });\n protected readonly bottomTabs = computed(() => this.tabsPosition() === 'bottom');\n protected readonly view = computed(() =>\n connectTabControl(\n { id: this.id, tabsPosition: this.tabsPosition(), border: this.border(), enhanced: this.enhanced() },\n this.states(),\n this.activeIndex(),\n ),\n );\n\n constructor() {\n useScopedStyles(TAB_CONTROL_SCOPE, tabControlScopedStyles);\n afterNextRender(() => this.enhanced.set(true));\n }\n\n setActiveTab(tab: BsTabPageComponent): void {\n if (!tab.disabled()) this.activeTab.set(tab);\n }\n\n protected onTabClick(event: Event, tab: BsTabPageComponent): void {\n // Before enhancement the label forwards to its radio and `change` selects.\n if (!this.enhanced()) return;\n if (tabControlTabClick(event, tab.disabled())) this.activeTab.set(tab);\n }\n\n protected onTabKeydown(event: KeyboardEvent, index: number): void {\n const target = tabControlKeydown(this.host, event, index, this.states());\n if (target !== null) this.activeTab.set(this.tabPages()[target]);\n }\n\n protected onChange(event: Event): void {\n const index = tabControlChanged(this.host, event);\n if (index !== null) this.activeTab.set(this.tabPages()[index]);\n }\n}\n","@let v = view();\n@for (tab of tabPages(); track tab; let i = $index) {\n <input [mpProps]=\"v.tabs[i].radio\" [checked]=\"i === activeIndex()\" [attr.checked]=\"i === activeIndex() ? '' : null\">\n}\n@if (!bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<div [mpProps]=\"v.content\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <div [mpProps]=\"v.tabs[i].pane\"><ng-container [ngTemplateOutlet]=\"tab.body() ?? null\" /></div>\n }\n</div>\n@if (bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<ng-content />\n\n<ng-template #strip>\n <div [mpProps]=\"v.strip\">\n <ul [mpProps]=\"v.list\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <li [mpProps]=\"v.item\">\n <label [mpProps]=\"v.tabs[i].tab\" (click)=\"onTabClick($event, tab)\" (keydown)=\"onTabKeydown($event, i)\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate()?.template ?? null\" />\n </label>\n </li>\n }\n </ul>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAKa,wBAAwB,CAAA;AAHrC,IAAA,WAAA,GAAA;AAIE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AAC/B,IAAA;8GAFY,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,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBA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AAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,UAAU,CAAC,MAAM,kBAAkB,CAAC,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/D9F;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-tab-control.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-page-header/tab-page-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-page/tab-page.component.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-control/tab-control.component.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-control/tab-control.component.html","../../../../libs/mintplayer-ng-bootstrap/tab-control/mintplayer-ng-bootstrap-tab-control.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[bsTabPageHeader]',\n})\nexport class BsTabPageHeaderDirective {\n template = inject(TemplateRef);\n}\n","import { ChangeDetectionStrategy, Component, contentChild, input, TemplateRef, viewChild } from '@angular/core';\nimport { BsTabPageHeaderDirective } from '../tab-page-header/tab-page-header.directive';\n\n/**\n * One page of a `<bs-tab-control>`. Renders nothing itself: the control\n * renders every radio, tab and pane as siblings (the CSS pairs the n-th radio\n * with the n-th pane), so the page hands over its header and body templates.\n */\n@Component({\n selector: 'bs-tab-page',\n template: '<ng-template #body><ng-content /></ng-template>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { hidden: '' },\n})\nexport class BsTabPageComponent {\n readonly disabled = input(false);\n readonly headerTemplate = contentChild(BsTabPageHeaderDirective);\n readonly body = viewChild<TemplateRef<unknown>>('body');\n}\n","import { bootstrapNav } from '@mintplayer/ui-core/bootstrap/nav';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { MpPropsDirective, useBootstrap, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport {\n connectTabControl,\n resolveActiveTab,\n TAB_CONTROL_SCOPE,\n tabControlChanged,\n tabControlKeydown,\n tabControlScopedStyles,\n tabControlTabClick,\n} from '@mintplayer/ui-core/tab-control';\nimport { BsTabPageComponent } from '../tab-page/tab-page.component';\nimport { BsTabsPosition } from '../tabs-position';\n\n/**\n * `<bs-tab-control>` — Bootstrap nav-tabs over one native radio per tab (#437).\n *\n * <bs-tab-control [border]=\"true\" tabsPosition=\"top\">\n * <bs-tab-page [disabled]=\"false\">\n * <ng-container *bsTabPageHeader>Profile</ng-container>\n * Page content\n * </bs-tab-page>\n * </bs-tab-control>\n *\n * Renders the markup of `@mintplayer/ui-core/tab-control` in its own\n * template, so the server-rendered page is a working tab control: the\n * checked radio shows its pane through CSS with JavaScript off. Once the\n * client has rendered, the labels become APG tabs (roving tabindex,\n * automatic activation) and the radios leave the tab order. The host is the\n * `.tab-control` root; each page hands over its header and body as templates.\n */\n@Component({\n selector: 'bs-tab-control',\n templateUrl: './tab-control.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MpPropsDirective, NgTemplateOutlet],\n host: {\n '[attr.data-mps]': 'view().root[\"data-mps\"]',\n '[class.tab-control]': 'true',\n '[attr.data-tabs-position]': 'view().root[\"data-tabs-position\"]',\n '(change)': 'onChange($event)',\n },\n})\nexport class BsTabControlComponent {\n /** Draw the outline around the active pane. */\n readonly border = input(true);\n /** Show the first enabled page while none is active. */\n readonly selectFirstTab = input(true);\n readonly tabsPosition = input<BsTabsPosition>('top');\n\n readonly tabPages = contentChildren<BsTabPageComponent>(forwardRef(() => BsTabPageComponent));\n /** The page the user picked; `checkedTab` is the one that is shown. */\n readonly activeTab = signal<BsTabPageComponent | null>(null);\n\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly id = inject(BsIdService).next('bs-tab-control');\n /** The client has rendered: switch from the radio tier to the tab tier. */\n private readonly enhanced = signal(false);\n\n private readonly states = computed(() => this.tabPages().map((tab) => ({ disabled: tab.disabled() })));\n protected readonly activeIndex = computed(() => {\n const active = this.activeTab();\n return resolveActiveTab(this.states(), active ? this.tabPages().indexOf(active) : null, this.selectFirstTab());\n });\n readonly checkedTab = computed(() => {\n const index = this.activeIndex();\n return index === null ? null : this.tabPages()[index];\n });\n protected readonly bottomTabs = computed(() => this.tabsPosition() === 'bottom');\n protected readonly view = computed(() =>\n connectTabControl(\n { id: this.id, tabsPosition: this.tabsPosition(), border: this.border(), enhanced: this.enhanced() },\n this.states(),\n this.activeIndex(),\n ),\n );\n\n constructor() {\n useBootstrap(bootstrapNav);\n useScopedStyles(TAB_CONTROL_SCOPE, tabControlScopedStyles);\n afterNextRender(() => this.enhanced.set(true));\n }\n\n setActiveTab(tab: BsTabPageComponent): void {\n if (!tab.disabled()) this.activeTab.set(tab);\n }\n\n protected onTabClick(event: Event, tab: BsTabPageComponent): void {\n // Before enhancement the label forwards to its radio and `change` selects.\n if (!this.enhanced()) return;\n if (tabControlTabClick(event, tab.disabled())) this.activeTab.set(tab);\n }\n\n protected onTabKeydown(event: KeyboardEvent, index: number): void {\n const target = tabControlKeydown(this.host, event, index, this.states());\n if (target !== null) this.activeTab.set(this.tabPages()[target]);\n }\n\n protected onChange(event: Event): void {\n const index = tabControlChanged(this.host, event);\n if (index !== null) this.activeTab.set(this.tabPages()[index]);\n }\n}\n","@let v = view();\n@for (tab of tabPages(); track tab; let i = $index) {\n <input [mpProps]=\"v.tabs[i].radio\" [checked]=\"i === activeIndex()\" [attr.checked]=\"i === activeIndex() ? '' : null\">\n}\n@if (!bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<div [mpProps]=\"v.content\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <div [mpProps]=\"v.tabs[i].pane\"><ng-container [ngTemplateOutlet]=\"tab.body() ?? null\" /></div>\n }\n</div>\n@if (bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<ng-content />\n\n<ng-template #strip>\n <div [mpProps]=\"v.strip\">\n <ul [mpProps]=\"v.list\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <li [mpProps]=\"v.item\">\n <label [mpProps]=\"v.tabs[i].tab\" (click)=\"onTabClick($event, tab)\" (keydown)=\"onTabKeydown($event, i)\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate()?.template ?? null\" />\n </label>\n </li>\n }\n </ul>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAKa,wBAAwB,CAAA;AAHrC,IAAA,WAAA,GAAA;AAIE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AAC/B,IAAA;8GAFY,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,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;;;ACDD;;;;AAIG;MAOU,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;QAOW,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;qFAAC;QACvB,IAAA,CAAA,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