@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.
- package/README.md +12 -11
- package/_bootstrap.scss +2 -4
- package/a11y/forms/package.json +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs +120 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +2 -109
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +12 -5
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +74 -83
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +9 -5
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +9 -3
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +9 -2
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +12 -4
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +6 -2
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +8 -4
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +7 -2
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +40 -12
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +23 -6
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +16 -4
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +23 -7
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +93 -0
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +43 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +15 -6
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +22 -16
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +22 -7
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +13 -6
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +9 -5
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +2 -0
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +19 -9
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +25 -11
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +14 -4
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +9 -14
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +5 -2
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +23 -8
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/nav/package.json +4 -0
- package/package.json +11 -8
- package/types/mintplayer-ng-bootstrap-a11y-forms.d.ts +64 -0
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -62
- package/types/mintplayer-ng-bootstrap-alert.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-badge.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-card.d.ts +14 -3
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-close.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-for.d.ts +5 -5
- package/types/mintplayer-ng-bootstrap-form.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-grid.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +15 -8
- package/types/mintplayer-ng-bootstrap-machine.d.ts +13 -2
- package/types/mintplayer-ng-bootstrap-modal.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-nav.d.ts +52 -0
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +17 -1
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +10 -10
- package/types/mintplayer-ng-bootstrap-popover.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-radio.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-range.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -7
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +7 -1
- package/types/mintplayer-ng-bootstrap-table.d.ts +2 -6
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-toast.d.ts +2 -0
- package/container/package.json +0 -4
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +0 -18
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +0 -1
- package/types/mintplayer-ng-bootstrap-container.d.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-tooltip.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tooltip/src/providers/tooltip-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/providers/tooltip-id.provider.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.html","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/directive/tooltip.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/mintplayer-ng-bootstrap-tooltip.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const TOOLTIP_CONTENT = new InjectionToken<TemplateRef<any>>('TooltipContent');","import { InjectionToken } from '@angular/core';\n\n/** The dom id assigned to the rendered tooltip element so the trigger can point at it via aria-describedby. */\nexport const TOOLTIP_ID = new InjectionToken<string>('TOOLTIP_ID');\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, TemplateRef } from '@angular/core';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\nimport { TOOLTIP_ID } from '../providers/tooltip-id.provider';\n\n@Component({\n selector: 'bs-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n imports: [NgTemplateOutlet, BsHasOverlayComponent],\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.position-relative]': 'true',\n },\n})\nexport class BsTooltipComponent {\n template = inject<TemplateRef<any>>(TOOLTIP_CONTENT);\n tooltipId = inject(TOOLTIP_ID);\n\n position = input<Position>('bottom');\n\n positionClass = computed(() => `bs-tooltip-${this.position()}`);\n\n marginClass = computed(() => {\n switch (this.position()) {\n case 'start': return 'me-1';\n case 'end': return 'ms-1';\n case 'top': return 'mb-1';\n case 'bottom': return 'mt-1';\n }\n });\n}\n","<bs-has-overlay></bs-has-overlay>\n<div [@fadeInOut] class=\"tooltip position-absolute show\"\n [class]=\"[positionClass(), marginClass()]\"\n [id]=\"tooltipId\"\n role=\"tooltip\">\n <div class=\"tooltip-arrow position-absolute\" aria-hidden=\"true\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n","import { ConnectedPosition, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, inject, input, Injector, TemplateRef } from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsIdService, BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsTooltipComponent } from '../component/tooltip.component';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\nimport { TOOLTIP_ID } from '../providers/tooltip-id.provider';\n\n/** Where the tooltip attaches for each side of the trigger. */\nconst POSITIONS: Record<Position, ConnectedPosition> = {\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },\n start: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },\n end: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\n};\n\n/** How long the pointer may travel from the trigger into the tooltip before it hides. */\nexport const TOOLTIP_HIDE_DELAY_MS = 150;\n\n@Directive({\n selector: '*[bsTooltip]',\n host: {\n '(window:blur)': 'onBlur()',\n '(document:keydown.escape)': 'onEscape()',\n },\n})\nexport class BsTooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly overlayStack = inject(BsOverlayStackService);\n /** The element the structural directive sits on: the tooltip's trigger. */\n private readonly parent = inject<ElementRef<HTMLElement>>(ElementRef, { host: true, skipSelf: true });\n private readonly tooltipId = inject(BsIdService).next('bs-tooltip');\n private readonly portal = new ComponentPortal(BsTooltipComponent, null, Injector.create({\n providers: [\n { provide: TOOLTIP_CONTENT, useValue: inject(TemplateRef) },\n { provide: TOOLTIP_ID, useValue: this.tooltipId },\n ],\n parent: inject(Injector),\n }));\n\n private stackToken: symbol | null = null;\n private overlayRef: OverlayRef | null = null;\n\n readonly bsTooltip = input<Position>('bottom');\n\n constructor() {\n const el = this.parent.nativeElement;\n /* addEventListener rather than the on* properties the old code assigned —\n those silently CLOBBER any handler the consumer set on their own element. */\n // WCAG 1.4.13: content on hover must also appear on FOCUS. A keyboard user\n // could never see these tooltips at all.\n const listeners: [string, () => void][] = [\n ['mouseenter', () => this.showTooltip()],\n ['mouseleave', () => this.scheduleHide()],\n ['focusin', () => this.showTooltip()],\n ['focusout', () => this.hideTooltip()],\n ];\n listeners.map(([type, fn]) => el.addEventListener(type, fn));\n inject(DestroyRef).onDestroy(() => {\n listeners.map(([type, fn]) => el.removeEventListener(type, fn));\n this.hideTooltip();\n });\n }\n\n /**\n * WCAG 1.4.13 \"hoverable\": the pointer must be able to travel INTO the\n * tooltip (to select/zoom its text) without it vanishing. Hide on a short\n * delay; entering the overlay cancels it, leaving the overlay hides.\n */\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n private scheduleHide(): void {\n this.cancelScheduledHide();\n this.hideTimer = setTimeout(() => this.hideTooltip(), TOOLTIP_HIDE_DELAY_MS);\n }\n\n private cancelScheduledHide(): void {\n if (this.hideTimer !== null) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n onBlur() {\n this.hideTooltip();\n }\n\n onEscape() {\n if (this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {\n this.hideTooltip();\n }\n }\n\n showTooltip() {\n this.cancelScheduledHide();\n if (this.overlayRef) return;\n\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions([POSITIONS[this.bsTooltip()]]),\n });\n const component = this.overlayRef.attach<BsTooltipComponent>(this.portal);\n component.setInput('position', this.bsTooltip());\n\n // Hoverable half of 1.4.13 — see scheduleHide().\n this.overlayRef.overlayElement.addEventListener('mouseenter', () => this.cancelScheduledHide());\n this.overlayRef.overlayElement.addEventListener('mouseleave', () => this.scheduleHide());\n\n this.setDescribedBy(true);\n this.stackToken = this.overlayStack.push();\n }\n\n hideTooltip() {\n this.cancelScheduledHide();\n if (!this.overlayRef) return;\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.setDescribedBy(false);\n if (this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n }\n\n /**\n * Adds or removes the tooltip's id in the trigger's `aria-describedby` token list, leaving\n * any description the consumer set (a hint, a validation message) in place.\n */\n private setDescribedBy(present: boolean) {\n const el = this.parent.nativeElement;\n const others = (el.getAttribute('aria-describedby') ?? '').split(/\\s+/).filter((id) => id && id !== this.tooltipId);\n const ids = present ? [...others, this.tooltipId] : others;\n if (ids.length) el.setAttribute('aria-describedby', ids.join(' '));\n else el.removeAttribute('aria-describedby');\n }\n}\n","export * from './directive/tooltip.directive';\n// export * from './component/tooltip.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAmB,gBAAgB,CAAC;;ACArF;AACO,MAAM,UAAU,GAAG,IAAI,cAAc,CAAS,YAAY,CAAC;;MCgBrD,kBAAkB,CAAA;AAX/B,IAAA,WAAA,GAAA;AAYE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAmB,eAAe,CAAC;AACpD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC;QAE9B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAW,QAAQ;qFAAC;QAEpC,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAA,WAAA,EAAc,IAAI,CAAC,QAAQ,EAAE,CAAA,CAAE;0FAAC;AAE/D,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AAC1B,YAAA,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACrB,gBAAA,KAAK,OAAO,EAAE,OAAO,MAAM;AAC3B,gBAAA,KAAK,KAAK,EAAE,OAAO,MAAM;AACzB,gBAAA,KAAK,KAAK,EAAE,OAAO,MAAM;AACzB,gBAAA,KAAK,QAAQ,EAAE,OAAO,MAAM;;QAEhC,CAAC;wFAAC;AACH,IAAA;8GAhBY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAA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QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,eAAe,EAAE,UAAU;AAC3B,wBAAA,2BAA2B,EAAE,YAAY;AAC1C,qBAAA;AACF,iBAAA;;;ACzBD;;ACDA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-tooltip.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tooltip/src/providers/tooltip-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/providers/tooltip-id.provider.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.html","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/directive/tooltip.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/mintplayer-ng-bootstrap-tooltip.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const TOOLTIP_CONTENT = new InjectionToken<TemplateRef<any>>('TooltipContent');","import { InjectionToken } from '@angular/core';\n\n/** The dom id assigned to the rendered tooltip element so the trigger can point at it via aria-describedby. */\nexport const TOOLTIP_ID = new InjectionToken<string>('TOOLTIP_ID');\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, TemplateRef } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapTooltip } from '@mintplayer/ui-core/bootstrap/tooltip';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\nimport { TOOLTIP_ID } from '../providers/tooltip-id.provider';\n\n@Component({\n selector: 'bs-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n imports: [NgTemplateOutlet, BsHasOverlayComponent],\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.position-relative]': 'true',\n },\n})\nexport class BsTooltipComponent {\n constructor() {\n // #452: the tooltip partial ships with this component, scoped to the elements it stamps (data-mps=\"tooltip\").\n useBootstrap(bootstrapTooltip);\n }\n\n template = inject<TemplateRef<any>>(TOOLTIP_CONTENT);\n tooltipId = inject(TOOLTIP_ID);\n\n position = input<Position>('bottom');\n\n positionClass = computed(() => `bs-tooltip-${this.position()}`);\n\n marginClass = computed(() => {\n switch (this.position()) {\n case 'start': return 'me-1';\n case 'end': return 'ms-1';\n case 'top': return 'mb-1';\n case 'bottom': return 'mt-1';\n }\n });\n}\n","<bs-has-overlay></bs-has-overlay>\n<div data-mps=\"tooltip\" [@fadeInOut] class=\"tooltip position-absolute show\"\n [class]=\"[positionClass(), marginClass()]\"\n [id]=\"tooltipId\"\n role=\"tooltip\">\n <div data-mps=\"tooltip\" class=\"tooltip-arrow position-absolute\" aria-hidden=\"true\"></div>\n <div data-mps=\"tooltip\" class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n","import { ConnectedPosition, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, inject, input, Injector, TemplateRef } from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsIdService, BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsTooltipComponent } from '../component/tooltip.component';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\nimport { TOOLTIP_ID } from '../providers/tooltip-id.provider';\n\n/** Where the tooltip attaches for each side of the trigger. */\nconst POSITIONS: Record<Position, ConnectedPosition> = {\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },\n start: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },\n end: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\n};\n\n/** How long the pointer may travel from the trigger into the tooltip before it hides. */\nexport const TOOLTIP_HIDE_DELAY_MS = 150;\n\n@Directive({\n selector: '*[bsTooltip]',\n host: {\n '(window:blur)': 'onBlur()',\n '(document:keydown.escape)': 'onEscape()',\n },\n})\nexport class BsTooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly overlayStack = inject(BsOverlayStackService);\n /** The element the structural directive sits on: the tooltip's trigger. */\n private readonly parent = inject<ElementRef<HTMLElement>>(ElementRef, { host: true, skipSelf: true });\n private readonly tooltipId = inject(BsIdService).next('bs-tooltip');\n private readonly portal = new ComponentPortal(BsTooltipComponent, null, Injector.create({\n providers: [\n { provide: TOOLTIP_CONTENT, useValue: inject(TemplateRef) },\n { provide: TOOLTIP_ID, useValue: this.tooltipId },\n ],\n parent: inject(Injector),\n }));\n\n private stackToken: symbol | null = null;\n private overlayRef: OverlayRef | null = null;\n\n readonly bsTooltip = input<Position>('bottom');\n\n constructor() {\n const el = this.parent.nativeElement;\n /* addEventListener rather than the on* properties the old code assigned —\n those silently CLOBBER any handler the consumer set on their own element. */\n // WCAG 1.4.13: content on hover must also appear on FOCUS. A keyboard user\n // could never see these tooltips at all.\n const listeners: [string, () => void][] = [\n ['mouseenter', () => this.showTooltip()],\n ['mouseleave', () => this.scheduleHide()],\n ['focusin', () => this.showTooltip()],\n ['focusout', () => this.hideTooltip()],\n ];\n listeners.map(([type, fn]) => el.addEventListener(type, fn));\n inject(DestroyRef).onDestroy(() => {\n listeners.map(([type, fn]) => el.removeEventListener(type, fn));\n this.hideTooltip();\n });\n }\n\n /**\n * WCAG 1.4.13 \"hoverable\": the pointer must be able to travel INTO the\n * tooltip (to select/zoom its text) without it vanishing. Hide on a short\n * delay; entering the overlay cancels it, leaving the overlay hides.\n */\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n private scheduleHide(): void {\n this.cancelScheduledHide();\n this.hideTimer = setTimeout(() => this.hideTooltip(), TOOLTIP_HIDE_DELAY_MS);\n }\n\n private cancelScheduledHide(): void {\n if (this.hideTimer !== null) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n onBlur() {\n this.hideTooltip();\n }\n\n onEscape() {\n if (this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {\n this.hideTooltip();\n }\n }\n\n showTooltip() {\n this.cancelScheduledHide();\n if (this.overlayRef) return;\n\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions([POSITIONS[this.bsTooltip()]]),\n });\n const component = this.overlayRef.attach<BsTooltipComponent>(this.portal);\n component.setInput('position', this.bsTooltip());\n\n // Hoverable half of 1.4.13 — see scheduleHide().\n this.overlayRef.overlayElement.addEventListener('mouseenter', () => this.cancelScheduledHide());\n this.overlayRef.overlayElement.addEventListener('mouseleave', () => this.scheduleHide());\n\n this.setDescribedBy(true);\n this.stackToken = this.overlayStack.push();\n }\n\n hideTooltip() {\n this.cancelScheduledHide();\n if (!this.overlayRef) return;\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.setDescribedBy(false);\n if (this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n }\n\n /**\n * Adds or removes the tooltip's id in the trigger's `aria-describedby` token list, leaving\n * any description the consumer set (a hint, a validation message) in place.\n */\n private setDescribedBy(present: boolean) {\n const el = this.parent.nativeElement;\n const others = (el.getAttribute('aria-describedby') ?? '').split(/\\s+/).filter((id) => id && id !== this.tooltipId);\n const ids = present ? [...others, this.tooltipId] : others;\n if (ids.length) el.setAttribute('aria-describedby', ids.join(' '));\n else el.removeAttribute('aria-describedby');\n }\n}\n","export * from './directive/tooltip.directive';\n// export * from './component/tooltip.component';","/**\n * Generated bundle index. Do not edit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;AAC3B,wBAAA,2BAA2B,EAAE,YAAY;AAC1C,qBAAA;AACF,iBAAA;;;ACzBD;;ACDA;;AAEG;;;;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
|
|
2
|
+
import { bootstrapDropdown } from '@mintplayer/ui-core/bootstrap/dropdown';
|
|
1
3
|
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
2
4
|
import * as i0 from '@angular/core';
|
|
3
5
|
import { inject, TemplateRef, input, Directive, model, output, contentChild, viewChild, ElementRef, signal, computed, DestroyRef, effect, untracked, afterNextRender, PLATFORM_ID, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
7
|
import { isObservable } from 'rxjs';
|
|
6
8
|
import { BsIdService, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';
|
|
7
|
-
import { useScopedStyles, machineSignal, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
9
|
+
import { useBootstrap, useScopedStyles, machineSignal, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
8
10
|
import { abortError } from '@mintplayer/ui-core/async';
|
|
9
11
|
import { preHydrationValue } from '@mintplayer/ui-core/forms';
|
|
10
12
|
import { trackOpenSide } from '@mintplayer/ui-core/overlay';
|
|
@@ -124,6 +126,7 @@ class BsTypeaheadComponent {
|
|
|
124
126
|
this.onTouched = () => undefined;
|
|
125
127
|
this.trackItem = (index, item) => this.machine.itemKeyOf(item) ?? index;
|
|
126
128
|
const host = inject(ElementRef).nativeElement;
|
|
129
|
+
useBootstrap(bootstrapForms, bootstrapDropdown);
|
|
127
130
|
useScopedStyles(TYPEAHEAD_SCOPE, typeaheadScopedStyles);
|
|
128
131
|
this.machine = new TypeaheadMachine({
|
|
129
132
|
id: this.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-typeahead.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/typeahead/src/directives/typeahead-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n/** The context of a `*bsTypeaheadItem` template: the item and the current term (for highlighting). */\nexport interface BsTypeaheadItemContext<T = unknown> {\n $implicit: T;\n term: string;\n}\n\n/**\n * Renders one suggestion row. Declared inside `<bs-typeahead>`; absent, the\n * row shows the item's text (`itemText`).\n *\n * ```html\n * <bs-typeahead [provider]=\"streets\">\n * <ng-container *bsTypeaheadItem=\"let street; let term = term; of: streetList\">\n * {{ street.name }} <small>{{ street.municipality }}</small>\n * </ng-container>\n * </bs-typeahead>\n * ```\n *\n * `of:` is optional and only carries the item type into the template (like\n * `ngFor`'s `of`); pass any value of the item type or an array of it.\n */\n@Directive({ selector: '[bsTypeaheadItem]' })\nexport class BsTypeaheadItemDirective<T = unknown> {\n readonly templateRef = inject<TemplateRef<BsTypeaheadItemContext<T>>>(TemplateRef);\n /** Type carrier only; never read at runtime. */\n readonly bsTypeaheadItemOf = input<readonly T[] | T | null | undefined>(undefined);\n\n static ngTemplateContextGuard<T>(_dir: BsTypeaheadItemDirective<T>, ctx: unknown): ctx is BsTypeaheadItemContext<T> {\n return true;\n }\n}\n","import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n PLATFORM_ID,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { isObservable, Observable } from 'rxjs';\nimport { BsIdService, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { machineSignal, MpPropsDirective, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { abortError } from '@mintplayer/ui-core/async';\nimport { preHydrationValue } from '@mintplayer/ui-core/forms';\nimport { trackOpenSide } from '@mintplayer/ui-core/overlay';\nimport {\n connect,\n TYPEAHEAD_SCOPE,\n TypeaheadLabels,\n TypeaheadMachine,\n TypeaheadProvider,\n TypeaheadRequest,\n typeaheadScopedStyles,\n} from '@mintplayer/ui-core/typeahead';\nimport { BsTypeaheadItemDirective } from './directives/typeahead-item.directive';\n\n/**\n * An Angular provider may answer with a Promise or an Observable. An\n * Observable is unsubscribed when `request.signal` aborts, which cancels an\n * `HttpClient` request in flight.\n */\nexport type BsTypeaheadProvider<T> = (term: string, request: TypeaheadRequest) => Promise<readonly T[]> | Observable<readonly T[]>;\n\n/**\n * Typeahead: a text input with asynchronous suggestions and free text.\n *\n * The first component built on the headless-core architecture (#436): all\n * behaviour lives in `TypeaheadMachine` (`@mintplayer/ui-core/typeahead`); this\n * component renders its own Angular template from the machine's snapshot and\n * applies the core's ARIA bags with `[mpProps]`. Because it is an Angular\n * template, Angular SSR emits a real, named `<input>` that submits free text\n * with JavaScript disabled, and hydration attaches to that same node.\n *\n * Value = the term (string). `selectedItem()` holds the last picked item until\n * the text changes. Usable with `[(value)]`, `[(ngModel)]`, `formControlName`.\n */\n@Component({\n selector: 'bs-typeahead',\n templateUrl: './typeahead.component.html',\n imports: [NgTemplateOutlet, MpPropsDirective],\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { role: 'presentation' },\n})\nexport class BsTypeaheadComponent<T = unknown> implements ControlValueAccessor {\n /** Supplies suggestions for a settled term; a newer term aborts the previous request. */\n readonly provider = input<BsTypeaheadProvider<T> | null>(null);\n /** Quiet time after the last keystroke, ms. 0 requests synchronously. */\n readonly debounceMs = input<number>(200);\n /** A trimmed term shorter than this closes the list without querying. */\n readonly minLength = input<number>(1);\n readonly disabled = input<boolean>(false);\n /** The text a pick writes into the input. Default: `item.text`, else `String(item)`. */\n readonly itemText = input<((item: T) => string) | undefined>(undefined);\n /** Row identity for keyed rendering. Default: `itemText`. */\n readonly itemKey = input<((item: T) => unknown) | undefined>(undefined);\n /** Submitted with a native `<form>` under this name (also with JavaScript disabled). */\n readonly name = input<string | null>(null);\n /** Accessible name of the input. A host `aria-label` or `aria-labelledby` wins. */\n readonly inputLabel = input<string | null>(null);\n readonly loadingLabel = input<string | undefined>(undefined);\n readonly noResultsLabel = input<string | undefined>(undefined);\n /** Spoken once per settled request, e.g. `n => n + ' resultaten'`. */\n readonly resultsLabel = input<((count: number) => string) | undefined>(undefined);\n /** A persistent validation message, wired to the input with aria-errormessage. */\n readonly errorText = input<string | null>(null);\n\n /** The term. Two-way; also the ControlValueAccessor value. */\n readonly value = model<string>('');\n\n readonly select = output<T>();\n readonly submitted = output<string>();\n readonly opened = output<void>();\n readonly closed = output<void>();\n readonly loadError = output<unknown>();\n\n readonly itemTemplate = contentChild<BsTypeaheadItemDirective<T>>(BsTypeaheadItemDirective);\n private readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n private readonly listboxRef = viewChild.required<ElementRef<HTMLUListElement>>('listbox');\n\n readonly id = inject(BsIdService).next('bs-typeahead');\n /**\n * Host transparency: a consumer's `aria-*`, `id` and `tabindex` on\n * `<bs-typeahead>` land on the role-bearing input (`id` and `tabindex` are\n * moved, so no duplicate id and no dead tab stop on the host). A consumer\n * `role` is NOT forwarded: the input's role is `combobox` by contract. Read\n * once, in the constructor, so the server render carries them too.\n */\n private readonly hostAria = takeHostAria(inject(ElementRef).nativeElement as HTMLElement);\n readonly machine: TypeaheadMachine<T>;\n readonly state;\n readonly api;\n /** The last picked item, `null` once the text changes after the pick. */\n readonly selectedItem;\n\n private readonly disabledByCva = signal(false);\n /** Set by afterNextRender (client only), so the readiness mark is never in server HTML. */\n private readonly hydrated = signal(false);\n private onChange: (value: string) => void = () => undefined;\n private onTouched: () => void = () => undefined;\n\n constructor() {\n const host = inject(ElementRef).nativeElement as HTMLElement;\n useScopedStyles(TYPEAHEAD_SCOPE, typeaheadScopedStyles);\n this.machine = new TypeaheadMachine<T>({\n id: this.id,\n value: this.value(),\n onChange: (term) => {\n this.value.set(term);\n this.onChange(term);\n },\n onSelect: (item) => this.select.emit(item),\n onSubmit: (term) => this.submitted.emit(term),\n onOpen: () => this.opened.emit(),\n onClose: () => {\n this.closed.emit();\n this.onTouched();\n },\n onError: (error) => this.loadError.emit(error),\n });\n this.state = machineSignal(this.machine);\n this.api = computed(() => {\n const api = connect(this.state(), this.id, { name: this.name(), hydrated: this.hydrated() });\n // A host aria-label / aria-labelledby wins over inputLabel (naming conformance).\n return { ...api, input: { ...api.input, ...this.hostAria } };\n });\n this.selectedItem = computed(() => this.state().selectedItem);\n inject(DestroyRef).onDestroy(() => this.machine.destroy());\n\n // Inputs → machine configuration. Each effect reads one input so an\n // unrelated input change does not re-apply everything.\n effect(() => {\n const provider = this.provider();\n this.machine.provider = provider ? adaptProvider(provider) : null;\n });\n effect(() => (this.machine.debounceMs = this.debounceMs()));\n effect(() => (this.machine.minLength = this.minLength()));\n effect(() => (this.machine.itemText = this.itemText()));\n effect(() => (this.machine.itemKey = this.itemKey()));\n effect(() => this.machine.setDisabled(this.disabled() || this.disabledByCva()));\n effect(() => this.machine.setErrorText(this.errorText()));\n effect(() => {\n const labels: Partial<TypeaheadLabels> = { input: this.inputLabel() };\n const loading = this.loadingLabel();\n const noResults = this.noResultsLabel();\n const results = this.resultsLabel();\n if (loading !== undefined) labels.loading = loading;\n if (noResults !== undefined) labels.noResults = noResults;\n if (results !== undefined) labels.results = results;\n this.machine.setLabels(labels);\n });\n // A consumer write to [(value)] (not an echo of our own onChange) is a programmatic set: no query.\n effect(() => {\n const next = this.value();\n if (next !== untracked(() => this.machine.snapshot.term)) this.machine.setValue(next);\n });\n\n this.adoptPreHydrationText(host);\n\n // Browser only (afterNextRender never runs on the server): flip the list above the input near the viewport bottom.\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n const untrack = trackOpenSide(this.machine, () => this.inputRef().nativeElement, () => this.listboxRef().nativeElement);\n destroyRef.onDestroy(untrack);\n this.hydrated.set(true);\n });\n }\n\n /**\n * Text typed or pasted into the server-rendered input before hydration lives\n * only in the DOM. Hydration's [value] binding would overwrite it with the\n * empty term, and the replayed input event then reads the empty field, so it\n * is lost. Read it here, while the host still holds the server DOM, and keep\n * it as the term; once effects have configured the provider, re-enter it as a\n * typed term so it notifies the model and queries.\n */\n private adoptPreHydrationText(host: HTMLElement): void {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const typed = preHydrationValue(host, this.machine.snapshot.term, 'input');\n if (typed === null) return;\n this.machine.setValue(typed);\n this.value.set(typed);\n afterNextRender(() => {\n if (this.machine.snapshot.term !== typed) return; // superseded by the consumer or the user\n this.machine.setValue('');\n this.machine.setTerm(typed);\n });\n }\n\n // ---- template handlers --------------------------------------------------\n\n protected onInput(event: Event): void {\n this.machine.setTerm((event.target as HTMLInputElement).value);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const handled = this.machine.keydown(event.key, event);\n if (handled) event.preventDefault();\n }\n\n protected onBlur(): void {\n this.machine.blur();\n this.onTouched();\n }\n\n protected trackItem = (index: number, item: T): unknown => this.machine.itemKeyOf(item) ?? index;\n\n /** Focus the input. */\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n // ---- ControlValueAccessor -----------------------------------------------\n\n writeValue(value: string | null): void {\n this.value.set(value ?? '');\n this.machine.setValue(value);\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledByCva.set(isDisabled);\n }\n}\n\n/** Promise or Observable in, Promise out; the Observable is unsubscribed when the request aborts. */\nfunction adaptProvider<T>(provider: BsTypeaheadProvider<T>): TypeaheadProvider<T> {\n return (term, request) => {\n const result = provider(term, request);\n if (!isObservable(result)) return result;\n return new Promise<readonly T[]>((resolve, reject) => {\n const subscription = result.subscribe({\n next: (items) => {\n resolve(items);\n subscription.unsubscribe();\n },\n error: reject,\n complete: () => resolve([]),\n });\n request.signal.addEventListener('abort', () => {\n subscription.unsubscribe();\n reject(abortError());\n });\n });\n };\n}\n","<div class=\"mp-typeahead\" [mpProps]=\"api().root\">\n <input #input\n class=\"form-control\"\n type=\"text\"\n [mpProps]=\"api().input\"\n [value]=\"state().term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\" />\n <ul #listbox class=\"dropdown-menu\" [mpProps]=\"api().listbox\">\n @if (api().status; as status) {\n <li class=\"ta-status\" [mpProps]=\"status.attrs\">{{ status.text }}</li>\n }\n @for (item of state().items; track trackItem($index, item); let i = $index) {\n <li class=\"dropdown-item\" [mpProps]=\"api().option(i)\" (mousedown)=\"$event.preventDefault()\" (click)=\"machine.pick(i)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate()?.templateRef ?? defaultItem; context: { $implicit: item, term: state().term }\"></ng-container>\n </li>\n }\n </ul>\n <span class=\"visually-hidden\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n @if (api().error; as error) {\n <div class=\"ta-error\" [mpProps]=\"error.attrs\">{{ error.text }}</div>\n }\n</div>\n<ng-template #defaultItem let-item>{{ machine.itemTextOf(item) }}</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAQA;;;;;;;;;;;;;;AAcG;MAEU,wBAAwB,CAAA;AADrC,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAyC,WAAW,CAAC;;QAEzE,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAsC,SAAS;8FAAC;AA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AK,EAAE,MAAM;AACb,gBAAA,QAAQ,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC5B,aAAA,CAAC;YACF,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;gBAC5C,YAAY,CAAC,WAAW,EAAE;AAC1B,gBAAA,MAAM,CAAC,UAAU,EAAE,CAAC;AACtB,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC;AACH;;AElRA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-typeahead.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/typeahead/src/directives/typeahead-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n/** The context of a `*bsTypeaheadItem` template: the item and the current term (for highlighting). */\nexport interface BsTypeaheadItemContext<T = unknown> {\n $implicit: T;\n term: string;\n}\n\n/**\n * Renders one suggestion row. Declared inside `<bs-typeahead>`; absent, the\n * row shows the item's text (`itemText`).\n *\n * ```html\n * <bs-typeahead [provider]=\"streets\">\n * <ng-container *bsTypeaheadItem=\"let street; let term = term; of: streetList\">\n * {{ street.name }} <small>{{ street.municipality }}</small>\n * </ng-container>\n * </bs-typeahead>\n * ```\n *\n * `of:` is optional and only carries the item type into the template (like\n * `ngFor`'s `of`); pass any value of the item type or an array of it.\n */\n@Directive({ selector: '[bsTypeaheadItem]' })\nexport class BsTypeaheadItemDirective<T = unknown> {\n readonly templateRef = inject<TemplateRef<BsTypeaheadItemContext<T>>>(TemplateRef);\n /** Type carrier only; never read at runtime. */\n readonly bsTypeaheadItemOf = input<readonly T[] | T | null | undefined>(undefined);\n\n static ngTemplateContextGuard<T>(_dir: BsTypeaheadItemDirective<T>, ctx: unknown): ctx is BsTypeaheadItemContext<T> {\n return true;\n }\n}\n","import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { bootstrapDropdown } from '@mintplayer/ui-core/bootstrap/dropdown';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n PLATFORM_ID,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { isObservable, Observable } from 'rxjs';\nimport { BsIdService, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { machineSignal, MpPropsDirective, useBootstrap, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { abortError } from '@mintplayer/ui-core/async';\nimport { preHydrationValue } from '@mintplayer/ui-core/forms';\nimport { trackOpenSide } from '@mintplayer/ui-core/overlay';\nimport {\n connect,\n TYPEAHEAD_SCOPE,\n TypeaheadLabels,\n TypeaheadMachine,\n TypeaheadProvider,\n TypeaheadRequest,\n typeaheadScopedStyles,\n} from '@mintplayer/ui-core/typeahead';\nimport { BsTypeaheadItemDirective } from './directives/typeahead-item.directive';\n\n/**\n * An Angular provider may answer with a Promise or an Observable. An\n * Observable is unsubscribed when `request.signal` aborts, which cancels an\n * `HttpClient` request in flight.\n */\nexport type BsTypeaheadProvider<T> = (term: string, request: TypeaheadRequest) => Promise<readonly T[]> | Observable<readonly T[]>;\n\n/**\n * Typeahead: a text input with asynchronous suggestions and free text.\n *\n * The first component built on the headless-core architecture (#436): all\n * behaviour lives in `TypeaheadMachine` (`@mintplayer/ui-core/typeahead`); this\n * component renders its own Angular template from the machine's snapshot and\n * applies the core's ARIA bags with `[mpProps]`. Because it is an Angular\n * template, Angular SSR emits a real, named `<input>` that submits free text\n * with JavaScript disabled, and hydration attaches to that same node.\n *\n * Value = the term (string). `selectedItem()` holds the last picked item until\n * the text changes. Usable with `[(value)]`, `[(ngModel)]`, `formControlName`.\n */\n@Component({\n selector: 'bs-typeahead',\n templateUrl: './typeahead.component.html',\n imports: [NgTemplateOutlet, MpPropsDirective],\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { role: 'presentation' },\n})\nexport class BsTypeaheadComponent<T = unknown> implements ControlValueAccessor {\n /** Supplies suggestions for a settled term; a newer term aborts the previous request. */\n readonly provider = input<BsTypeaheadProvider<T> | null>(null);\n /** Quiet time after the last keystroke, ms. 0 requests synchronously. */\n readonly debounceMs = input<number>(200);\n /** A trimmed term shorter than this closes the list without querying. */\n readonly minLength = input<number>(1);\n readonly disabled = input<boolean>(false);\n /** The text a pick writes into the input. Default: `item.text`, else `String(item)`. */\n readonly itemText = input<((item: T) => string) | undefined>(undefined);\n /** Row identity for keyed rendering. Default: `itemText`. */\n readonly itemKey = input<((item: T) => unknown) | undefined>(undefined);\n /** Submitted with a native `<form>` under this name (also with JavaScript disabled). */\n readonly name = input<string | null>(null);\n /** Accessible name of the input. A host `aria-label` or `aria-labelledby` wins. */\n readonly inputLabel = input<string | null>(null);\n readonly loadingLabel = input<string | undefined>(undefined);\n readonly noResultsLabel = input<string | undefined>(undefined);\n /** Spoken once per settled request, e.g. `n => n + ' resultaten'`. */\n readonly resultsLabel = input<((count: number) => string) | undefined>(undefined);\n /** A persistent validation message, wired to the input with aria-errormessage. */\n readonly errorText = input<string | null>(null);\n\n /** The term. Two-way; also the ControlValueAccessor value. */\n readonly value = model<string>('');\n\n readonly select = output<T>();\n readonly submitted = output<string>();\n readonly opened = output<void>();\n readonly closed = output<void>();\n readonly loadError = output<unknown>();\n\n readonly itemTemplate = contentChild<BsTypeaheadItemDirective<T>>(BsTypeaheadItemDirective);\n private readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n private readonly listboxRef = viewChild.required<ElementRef<HTMLUListElement>>('listbox');\n\n readonly id = inject(BsIdService).next('bs-typeahead');\n /**\n * Host transparency: a consumer's `aria-*`, `id` and `tabindex` on\n * `<bs-typeahead>` land on the role-bearing input (`id` and `tabindex` are\n * moved, so no duplicate id and no dead tab stop on the host). A consumer\n * `role` is NOT forwarded: the input's role is `combobox` by contract. Read\n * once, in the constructor, so the server render carries them too.\n */\n private readonly hostAria = takeHostAria(inject(ElementRef).nativeElement as HTMLElement);\n readonly machine: TypeaheadMachine<T>;\n readonly state;\n readonly api;\n /** The last picked item, `null` once the text changes after the pick. */\n readonly selectedItem;\n\n private readonly disabledByCva = signal(false);\n /** Set by afterNextRender (client only), so the readiness mark is never in server HTML. */\n private readonly hydrated = signal(false);\n private onChange: (value: string) => void = () => undefined;\n private onTouched: () => void = () => undefined;\n\n constructor() {\n const host = inject(ElementRef).nativeElement as HTMLElement;\n useBootstrap(bootstrapForms, bootstrapDropdown);\n useScopedStyles(TYPEAHEAD_SCOPE, typeaheadScopedStyles);\n this.machine = new TypeaheadMachine<T>({\n id: this.id,\n value: this.value(),\n onChange: (term) => {\n this.value.set(term);\n this.onChange(term);\n },\n onSelect: (item) => this.select.emit(item),\n onSubmit: (term) => this.submitted.emit(term),\n onOpen: () => this.opened.emit(),\n onClose: () => {\n this.closed.emit();\n this.onTouched();\n },\n onError: (error) => this.loadError.emit(error),\n });\n this.state = machineSignal(this.machine);\n this.api = computed(() => {\n const api = connect(this.state(), this.id, { name: this.name(), hydrated: this.hydrated() });\n // A host aria-label / aria-labelledby wins over inputLabel (naming conformance).\n return { ...api, input: { ...api.input, ...this.hostAria } };\n });\n this.selectedItem = computed(() => this.state().selectedItem);\n inject(DestroyRef).onDestroy(() => this.machine.destroy());\n\n // Inputs → machine configuration. Each effect reads one input so an\n // unrelated input change does not re-apply everything.\n effect(() => {\n const provider = this.provider();\n this.machine.provider = provider ? adaptProvider(provider) : null;\n });\n effect(() => (this.machine.debounceMs = this.debounceMs()));\n effect(() => (this.machine.minLength = this.minLength()));\n effect(() => (this.machine.itemText = this.itemText()));\n effect(() => (this.machine.itemKey = this.itemKey()));\n effect(() => this.machine.setDisabled(this.disabled() || this.disabledByCva()));\n effect(() => this.machine.setErrorText(this.errorText()));\n effect(() => {\n const labels: Partial<TypeaheadLabels> = { input: this.inputLabel() };\n const loading = this.loadingLabel();\n const noResults = this.noResultsLabel();\n const results = this.resultsLabel();\n if (loading !== undefined) labels.loading = loading;\n if (noResults !== undefined) labels.noResults = noResults;\n if (results !== undefined) labels.results = results;\n this.machine.setLabels(labels);\n });\n // A consumer write to [(value)] (not an echo of our own onChange) is a programmatic set: no query.\n effect(() => {\n const next = this.value();\n if (next !== untracked(() => this.machine.snapshot.term)) this.machine.setValue(next);\n });\n\n this.adoptPreHydrationText(host);\n\n // Browser only (afterNextRender never runs on the server): flip the list above the input near the viewport bottom.\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n const untrack = trackOpenSide(this.machine, () => this.inputRef().nativeElement, () => this.listboxRef().nativeElement);\n destroyRef.onDestroy(untrack);\n this.hydrated.set(true);\n });\n }\n\n /**\n * Text typed or pasted into the server-rendered input before hydration lives\n * only in the DOM. Hydration's [value] binding would overwrite it with the\n * empty term, and the replayed input event then reads the empty field, so it\n * is lost. Read it here, while the host still holds the server DOM, and keep\n * it as the term; once effects have configured the provider, re-enter it as a\n * typed term so it notifies the model and queries.\n */\n private adoptPreHydrationText(host: HTMLElement): void {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const typed = preHydrationValue(host, this.machine.snapshot.term, 'input');\n if (typed === null) return;\n this.machine.setValue(typed);\n this.value.set(typed);\n afterNextRender(() => {\n if (this.machine.snapshot.term !== typed) return; // superseded by the consumer or the user\n this.machine.setValue('');\n this.machine.setTerm(typed);\n });\n }\n\n // ---- template handlers --------------------------------------------------\n\n protected onInput(event: Event): void {\n this.machine.setTerm((event.target as HTMLInputElement).value);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const handled = this.machine.keydown(event.key, event);\n if (handled) event.preventDefault();\n }\n\n protected onBlur(): void {\n this.machine.blur();\n this.onTouched();\n }\n\n protected trackItem = (index: number, item: T): unknown => this.machine.itemKeyOf(item) ?? index;\n\n /** Focus the input. */\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n // ---- ControlValueAccessor -----------------------------------------------\n\n writeValue(value: string | null): void {\n this.value.set(value ?? '');\n this.machine.setValue(value);\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledByCva.set(isDisabled);\n }\n}\n\n/** Promise or Observable in, Promise out; the Observable is unsubscribed when the request aborts. */\nfunction adaptProvider<T>(provider: BsTypeaheadProvider<T>): TypeaheadProvider<T> {\n return (term, request) => {\n const result = provider(term, request);\n if (!isObservable(result)) return result;\n return new Promise<readonly T[]>((resolve, reject) => {\n const subscription = result.subscribe({\n next: (items) => {\n resolve(items);\n subscription.unsubscribe();\n },\n error: reject,\n complete: () => resolve([]),\n });\n request.signal.addEventListener('abort', () => {\n subscription.unsubscribe();\n reject(abortError());\n });\n });\n };\n}\n","<div class=\"mp-typeahead\" [mpProps]=\"api().root\">\n <input #input\n class=\"form-control\"\n type=\"text\"\n [mpProps]=\"api().input\"\n [value]=\"state().term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\" />\n <ul #listbox class=\"dropdown-menu\" [mpProps]=\"api().listbox\">\n @if (api().status; as status) {\n <li class=\"ta-status\" [mpProps]=\"status.attrs\">{{ status.text }}</li>\n }\n @for (item of state().items; track trackItem($index, item); let i = $index) {\n <li class=\"dropdown-item\" [mpProps]=\"api().option(i)\" (mousedown)=\"$event.preventDefault()\" (click)=\"machine.pick(i)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate()?.templateRef ?? defaultItem; context: { $implicit: item, term: state().term }\"></ng-container>\n </li>\n }\n </ul>\n <span class=\"visually-hidden\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n @if (api().error; as error) {\n <div class=\"ta-error\" [mpProps]=\"error.attrs\">{{ error.text }}</div>\n }\n</div>\n<ng-template #defaultItem let-item>{{ machine.itemTextOf(item) }}</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAQA;;;;;;;;;;;;;;AAcG;MAEU,wBAAwB,CAAA;AADrC,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAyC,WAAW,CAAC;;QAEzE,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAsC,SAAS;8FAAC;AAKnF,IAAA;AAHC,IAAA,OAAO,sBAAsB,CAAI,IAAiC,EAAE,GAAY,EAAA;AAC9E,QAAA,OAAO,IAAI;IACb;8GAPW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,SAAS;mBAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE;;;ACwB5C;;;;;;;;;;;;AAYG;MASU,oBAAoB,CAAA;AAyD/B,IAAA,WAAA,GAAA;;QAvDS,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAgC,IAAI;qFAAC;;QAErD,IAAA,CAAA,UAA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AA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;AA2J1F;AACA,SAAS,aAAa,CAAI,QAAgC,EAAA;AACxD,IAAA,OAAO,CAAC,IAAI,EAAE,OAAO,KAAI;QACvB,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;AACtC,QAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;AAAE,YAAA,OAAO,MAAM;QACxC,OAAO,IAAI,OAAO,CAAe,CAAC,OAAO,EAAE,MAAM,KAAI;AACnD,YAAA,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC;AACpC,gBAAA,IAAI,EAAE,CAAC,KAAK,KAAI;oBACd,OAAO,CAAC,KAAK,CAAC;oBACd,YAAY,CAAC,WAAW,EAAE;gBAC5B,CAAC;AACD,gBAAA,KAAK,EAAE,MAAM;AACb,gBAAA,QAAQ,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC5B,aAAA,CAAC;YACF,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;gBAC5C,YAAY,CAAC,WAAW,EAAE;AAC1B,gBAAA,MAAM,CAAC,UAAU,EAAE,CAAC;AACtB,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC;AACH;;AErRA;;AAEG;;;;"}
|
package/nav/package.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-bootstrap",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "22.
|
|
4
|
+
"version": "22.32.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"types": "./types/mintplayer-ng-bootstrap-a11y.d.ts",
|
|
22
22
|
"default": "./fesm2022/mintplayer-ng-bootstrap-a11y.mjs"
|
|
23
23
|
},
|
|
24
|
+
"./a11y/forms": {
|
|
25
|
+
"types": "./types/mintplayer-ng-bootstrap-a11y-forms.d.ts",
|
|
26
|
+
"default": "./fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs"
|
|
27
|
+
},
|
|
24
28
|
"./accordion": {
|
|
25
29
|
"types": "./types/mintplayer-ng-bootstrap-accordion.d.ts",
|
|
26
30
|
"default": "./fesm2022/mintplayer-ng-bootstrap-accordion.mjs"
|
|
@@ -89,10 +93,6 @@
|
|
|
89
93
|
"types": "./types/mintplayer-ng-bootstrap-color-picker.d.ts",
|
|
90
94
|
"default": "./fesm2022/mintplayer-ng-bootstrap-color-picker.mjs"
|
|
91
95
|
},
|
|
92
|
-
"./container": {
|
|
93
|
-
"types": "./types/mintplayer-ng-bootstrap-container.d.ts",
|
|
94
|
-
"default": "./fesm2022/mintplayer-ng-bootstrap-container.mjs"
|
|
95
|
-
},
|
|
96
96
|
"./context-menu": {
|
|
97
97
|
"types": "./types/mintplayer-ng-bootstrap-context-menu.d.ts",
|
|
98
98
|
"default": "./fesm2022/mintplayer-ng-bootstrap-context-menu.mjs"
|
|
@@ -221,6 +221,10 @@
|
|
|
221
221
|
"types": "./types/mintplayer-ng-bootstrap-multi-range.d.ts",
|
|
222
222
|
"default": "./fesm2022/mintplayer-ng-bootstrap-multi-range.mjs"
|
|
223
223
|
},
|
|
224
|
+
"./nav": {
|
|
225
|
+
"types": "./types/mintplayer-ng-bootstrap-nav.d.ts",
|
|
226
|
+
"default": "./fesm2022/mintplayer-ng-bootstrap-nav.mjs"
|
|
227
|
+
},
|
|
224
228
|
"./navbar": {
|
|
225
229
|
"types": "./types/mintplayer-ng-bootstrap-navbar.d.ts",
|
|
226
230
|
"default": "./fesm2022/mintplayer-ng-bootstrap-navbar.mjs"
|
|
@@ -415,7 +419,7 @@
|
|
|
415
419
|
}
|
|
416
420
|
},
|
|
417
421
|
"peerDependencies": {
|
|
418
|
-
"@mintplayer/ui-core": "^1.
|
|
422
|
+
"@mintplayer/ui-core": "^1.5.0",
|
|
419
423
|
"@angular/common": "^22.0.0",
|
|
420
424
|
"@angular/core": "^22.0.0",
|
|
421
425
|
"@angular/cdk": "^22.0.0",
|
|
@@ -428,8 +432,7 @@
|
|
|
428
432
|
"@mintplayer/ng-click-outside": "^22.2.1",
|
|
429
433
|
"@mintplayer/ng-animations": "^22.1.1",
|
|
430
434
|
"@mintplayer/pagination": "^2.5.1",
|
|
431
|
-
"@mintplayer/ng-focus-on-load": "^22.1.2"
|
|
432
|
-
"@mintplayer/web-components": "^3.3.0"
|
|
435
|
+
"@mintplayer/ng-focus-on-load": "^22.1.2"
|
|
433
436
|
},
|
|
434
437
|
"dependencies": {
|
|
435
438
|
"tslib": "^2.3.0"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { DoCheck } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Reads the host form control's validity: `invalid` (only once touched —
|
|
6
|
+
* Bootstrap's own convention, and untouched pristine forms must not scream),
|
|
7
|
+
* `required` (from the control's validators) and, when `[errorMessages]`
|
|
8
|
+
* supplies one, the message for the first active error.
|
|
9
|
+
*
|
|
10
|
+
* A front that renders its own template injects this directive and reads the
|
|
11
|
+
* signals into its core's attribute bags, so `aria-invalid` /
|
|
12
|
+
* `aria-errormessage` / `aria-describedby` land on the role-bearing node it
|
|
13
|
+
* owns. A wrapper that still renders an `mp-*` element as its template root
|
|
14
|
+
* (#437, until that component converts) gets the same state mirrored as the
|
|
15
|
+
* WC's `invalid` / `required` / `error-text` attributes instead.
|
|
16
|
+
*
|
|
17
|
+
* NgControl is resolved lazily via the injector: injecting it in the
|
|
18
|
+
* constructor recurses (NgControl resolution needs the value accessor being
|
|
19
|
+
* constructed). ngDoCheck keeps the state live at every CD pass, which is
|
|
20
|
+
* exactly the cadence Angular updates control state at (PRD 11a); it runs
|
|
21
|
+
* before the host's own view is checked, so the signals are fresh for it.
|
|
22
|
+
*/
|
|
23
|
+
declare class BsControlValidityDirective implements DoCheck {
|
|
24
|
+
private readonly injector;
|
|
25
|
+
private readonly host;
|
|
26
|
+
/** undefined = not resolved yet; null = no form control on this host. */
|
|
27
|
+
private ngControl;
|
|
28
|
+
/**
|
|
29
|
+
* Validation messages by `NgControl` error key, e.g.
|
|
30
|
+
* `{ required: 'Pick a fruit.', minlength: 'Too short.' }`.
|
|
31
|
+
*
|
|
32
|
+
* The message for the first active error becomes the control's error
|
|
33
|
+
* message node. A key with no message simply produces no message, so a
|
|
34
|
+
* consumer can spell out the errors worth announcing and leave the rest to
|
|
35
|
+
* the visible form summary.
|
|
36
|
+
*/
|
|
37
|
+
readonly errorMessages: _angular_core.InputSignal<Record<string, string> | null>;
|
|
38
|
+
private readonly invalidState;
|
|
39
|
+
private readonly requiredState;
|
|
40
|
+
private readonly errorTextState;
|
|
41
|
+
/** The control is invalid AND touched. */
|
|
42
|
+
readonly invalid: _angular_core.Signal<boolean>;
|
|
43
|
+
readonly required: _angular_core.Signal<boolean>;
|
|
44
|
+
/** Tied to `invalid`: `aria-errormessage` is only defined while the control is `aria-invalid`. */
|
|
45
|
+
readonly errorText: _angular_core.Signal<string | null>;
|
|
46
|
+
ngDoCheck(): void;
|
|
47
|
+
/**
|
|
48
|
+
* The message for the first of the control's active errors that has one.
|
|
49
|
+
* Validators report in the order they were composed, so a required-then-pattern
|
|
50
|
+
* field announces "required" until it has a value — the order the user meets
|
|
51
|
+
* them in.
|
|
52
|
+
*/
|
|
53
|
+
private activeMessage;
|
|
54
|
+
/**
|
|
55
|
+
* Writes only on a real change. `ngDoCheck` runs on every CD pass, and an
|
|
56
|
+
* unconditional `setAttribute` fires the WC's `attributeChangedCallback` even
|
|
57
|
+
* when the value is identical — which schedules a Lit render.
|
|
58
|
+
*/
|
|
59
|
+
private mirror;
|
|
60
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsControlValidityDirective, never>;
|
|
61
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsControlValidityDirective, "[bsControlValidity]", never, { "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { BsControlValidityDirective };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnInit, ElementRef
|
|
2
|
+
import { OnInit, ElementRef } from '@angular/core';
|
|
3
3
|
import { AriaLivePoliteness } from '@angular/cdk/a11y';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -281,66 +281,6 @@ declare class BsOverlayStackService {
|
|
|
281
281
|
static ɵprov: i0.ɵɵInjectableDeclaration<BsOverlayStackService>;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
/**
|
|
285
|
-
* Reads the host form control's validity: `invalid` (only once touched —
|
|
286
|
-
* Bootstrap's own convention, and untouched pristine forms must not scream),
|
|
287
|
-
* `required` (from the control's validators) and, when `[errorMessages]`
|
|
288
|
-
* supplies one, the message for the first active error.
|
|
289
|
-
*
|
|
290
|
-
* A front that renders its own template injects this directive and reads the
|
|
291
|
-
* signals into its core's attribute bags, so `aria-invalid` /
|
|
292
|
-
* `aria-errormessage` / `aria-describedby` land on the role-bearing node it
|
|
293
|
-
* owns. A wrapper that still renders an `mp-*` element as its template root
|
|
294
|
-
* (#437, until that component converts) gets the same state mirrored as the
|
|
295
|
-
* WC's `invalid` / `required` / `error-text` attributes instead.
|
|
296
|
-
*
|
|
297
|
-
* NgControl is resolved lazily via the injector: injecting it in the
|
|
298
|
-
* constructor recurses (NgControl resolution needs the value accessor being
|
|
299
|
-
* constructed). ngDoCheck keeps the state live at every CD pass, which is
|
|
300
|
-
* exactly the cadence Angular updates control state at (PRD 11a); it runs
|
|
301
|
-
* before the host's own view is checked, so the signals are fresh for it.
|
|
302
|
-
*/
|
|
303
|
-
declare class BsControlValidityDirective implements DoCheck {
|
|
304
|
-
private readonly injector;
|
|
305
|
-
private readonly host;
|
|
306
|
-
/** undefined = not resolved yet; null = no form control on this host. */
|
|
307
|
-
private ngControl;
|
|
308
|
-
/**
|
|
309
|
-
* Validation messages by `NgControl` error key, e.g.
|
|
310
|
-
* `{ required: 'Pick a fruit.', minlength: 'Too short.' }`.
|
|
311
|
-
*
|
|
312
|
-
* The message for the first active error becomes the control's error
|
|
313
|
-
* message node. A key with no message simply produces no message, so a
|
|
314
|
-
* consumer can spell out the errors worth announcing and leave the rest to
|
|
315
|
-
* the visible form summary.
|
|
316
|
-
*/
|
|
317
|
-
readonly errorMessages: i0.InputSignal<Record<string, string> | null>;
|
|
318
|
-
private readonly invalidState;
|
|
319
|
-
private readonly requiredState;
|
|
320
|
-
private readonly errorTextState;
|
|
321
|
-
/** The control is invalid AND touched. */
|
|
322
|
-
readonly invalid: i0.Signal<boolean>;
|
|
323
|
-
readonly required: i0.Signal<boolean>;
|
|
324
|
-
/** Tied to `invalid`: `aria-errormessage` is only defined while the control is `aria-invalid`. */
|
|
325
|
-
readonly errorText: i0.Signal<string | null>;
|
|
326
|
-
ngDoCheck(): void;
|
|
327
|
-
/**
|
|
328
|
-
* The message for the first of the control's active errors that has one.
|
|
329
|
-
* Validators report in the order they were composed, so a required-then-pattern
|
|
330
|
-
* field announces "required" until it has a value — the order the user meets
|
|
331
|
-
* them in.
|
|
332
|
-
*/
|
|
333
|
-
private activeMessage;
|
|
334
|
-
/**
|
|
335
|
-
* Writes only on a real change. `ngDoCheck` runs on every CD pass, and an
|
|
336
|
-
* unconditional `setAttribute` fires the WC's `attributeChangedCallback` even
|
|
337
|
-
* when the value is identical — which schedules a Lit render.
|
|
338
|
-
*/
|
|
339
|
-
private mirror;
|
|
340
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BsControlValidityDirective, never>;
|
|
341
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BsControlValidityDirective, "[bsControlValidity]", never, { "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
284
|
/**
|
|
345
285
|
* Collects a front's host attributes that belong on its role-bearing inner
|
|
346
286
|
* node: `aria-*` are copied (harmless on a roleless host), `id` and `tabindex`
|
|
@@ -352,5 +292,5 @@ declare class BsControlValidityDirective implements DoCheck {
|
|
|
352
292
|
*/
|
|
353
293
|
declare function takeHostAria(host: HTMLElement): Record<string, string>;
|
|
354
294
|
|
|
355
|
-
export {
|
|
295
|
+
export { BsForwardAriaDirective, BsIdService, BsLiveAnnouncerService, BsOverlayFocusDirective, BsOverlayStackService, BsRovingFocusDirective, BsRovingFocusItemDirective, takeHostAria };
|
|
356
296
|
export type { BsOverlayInitialFocus, BsRovingFocusOrientation };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
|
|
3
3
|
declare class BsBreadcrumbComponent {
|
|
4
|
+
constructor();
|
|
4
5
|
/** Accessible name for the breadcrumb landmark. Override for localisation. */
|
|
5
6
|
ariaLabel: i0.InputSignal<string>;
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsBreadcrumbComponent, never>;
|
|
@@ -8,6 +9,7 @@ declare class BsBreadcrumbComponent {
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
declare class BsBreadcrumbItemComponent {
|
|
12
|
+
constructor();
|
|
11
13
|
readonly active: i0.InputSignal<boolean>;
|
|
12
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsBreadcrumbItemComponent, never>;
|
|
13
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<BsBreadcrumbItemComponent, "bs-breadcrumb-item", never, { "active": { "alias": "active"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
|
|
3
3
|
declare class BsButtonGroupComponent {
|
|
4
|
+
constructor();
|
|
4
5
|
ariaLabel: i0.InputSignal<string | null>;
|
|
5
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsButtonGroupComponent, never>;
|
|
6
7
|
static ɵcmp: i0.ɵɵComponentDeclaration<BsButtonGroupComponent, "bs-button-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
@@ -6,10 +6,12 @@ export { CARD_COLORS, CardColor, CardImagePosition, isCardColor } from '@mintpla
|
|
|
6
6
|
/**
|
|
7
7
|
* The card root (PRD #437 wave A). The host IS the Bootstrap `.card`: no
|
|
8
8
|
* inner element and no core, so the server renders the finished card and the
|
|
9
|
-
*
|
|
10
|
-
* plain class-carrying elements
|
|
9
|
+
* card part this component installs (#452) styles it with JS off. Projected
|
|
10
|
+
* `<bs-card-*>` children are plain class-carrying elements, each stamped
|
|
11
|
+
* `data-mps="card"` so the scoped part matches them.
|
|
11
12
|
*/
|
|
12
13
|
declare class BsCardComponent {
|
|
14
|
+
constructor();
|
|
13
15
|
readonly color: i0.InputSignal<Color | undefined>;
|
|
14
16
|
readonly outline: i0.InputSignal<boolean>;
|
|
15
17
|
protected readonly classes: i0.Signal<string[]>;
|
|
@@ -24,6 +26,7 @@ declare class BsCardComponent {
|
|
|
24
26
|
* never does).
|
|
25
27
|
*/
|
|
26
28
|
declare class BsCardHeaderComponent {
|
|
29
|
+
constructor();
|
|
27
30
|
readonly color: i0.InputSignal<Color | undefined>;
|
|
28
31
|
protected readonly classes: i0.Signal<string[]>;
|
|
29
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsCardHeaderComponent, never>;
|
|
@@ -37,11 +40,13 @@ declare class BsCardHeaderComponent {
|
|
|
37
40
|
* `<bs-card>` instead.
|
|
38
41
|
*/
|
|
39
42
|
declare class BsCardBodyComponent {
|
|
43
|
+
constructor();
|
|
40
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsCardBodyComponent, never>;
|
|
41
45
|
static ɵcmp: i0.ɵɵComponentDeclaration<BsCardBodyComponent, "bs-card-body", never, {}, {}, never, ["*"], true, never>;
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
declare class BsCardFooterComponent {
|
|
49
|
+
constructor();
|
|
45
50
|
readonly color: i0.InputSignal<Color | undefined>;
|
|
46
51
|
protected readonly classes: i0.Signal<string[]>;
|
|
47
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsCardFooterComponent, never>;
|
|
@@ -49,6 +54,7 @@ declare class BsCardFooterComponent {
|
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
declare class BsCardTitleComponent {
|
|
57
|
+
constructor();
|
|
52
58
|
/** Heading level in the page outline. Cards default to a section-level 5, matching Bootstrap's visual h5. */
|
|
53
59
|
readonly level: i0.InputSignal<number>;
|
|
54
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsCardTitleComponent, never>;
|
|
@@ -56,11 +62,13 @@ declare class BsCardTitleComponent {
|
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
declare class BsCardSubtitleComponent {
|
|
65
|
+
constructor();
|
|
59
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsCardSubtitleComponent, never>;
|
|
60
67
|
static ɵcmp: i0.ɵɵComponentDeclaration<BsCardSubtitleComponent, "bs-card-subtitle", never, {}, {}, never, ["*"], true, never>;
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
declare class BsCardTextComponent {
|
|
71
|
+
constructor();
|
|
64
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsCardTextComponent, never>;
|
|
65
73
|
static ɵcmp: i0.ɵɵComponentDeclaration<BsCardTextComponent, "bs-card-text", never, {}, {}, never, ["*"], true, never>;
|
|
66
74
|
}
|
|
@@ -71,6 +79,7 @@ declare class BsCardTextComponent {
|
|
|
71
79
|
* inner `<a>` is the link.
|
|
72
80
|
*/
|
|
73
81
|
declare class BsCardLinkComponent {
|
|
82
|
+
constructor();
|
|
74
83
|
readonly href: i0.InputSignal<string | undefined>;
|
|
75
84
|
readonly hrefAttr: i0.Signal<string | null>;
|
|
76
85
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsCardLinkComponent, never>;
|
|
@@ -94,6 +103,7 @@ declare class BsCardLinkComponent {
|
|
|
94
103
|
* works around the limitation, at the cost of importing `NgTemplateOutlet`.
|
|
95
104
|
*/
|
|
96
105
|
declare class BsCardImgComponent {
|
|
106
|
+
constructor();
|
|
97
107
|
readonly position: i0.InputSignal<CardImagePosition>;
|
|
98
108
|
readonly src: i0.InputSignal<string | undefined>;
|
|
99
109
|
readonly alt: i0.InputSignal<string | undefined>;
|
|
@@ -108,9 +118,10 @@ declare class BsCardImgComponent {
|
|
|
108
118
|
/**
|
|
109
119
|
* Card group. No host `display` of its own: Bootstrap's `.card-group` turns
|
|
110
120
|
* flex from `sm` up, and an unlayered component rule would out-rank the
|
|
111
|
-
* layered
|
|
121
|
+
* layered card part and keep it a block (PRD #452 C3).
|
|
112
122
|
*/
|
|
113
123
|
declare class BsCardGroupComponent {
|
|
124
|
+
constructor();
|
|
114
125
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsCardGroupComponent, never>;
|
|
115
126
|
static ɵcmp: i0.ɵɵComponentDeclaration<BsCardGroupComponent, "bs-card-group", never, {}, {}, never, ["*"], true, never>;
|
|
116
127
|
}
|
|
@@ -3,7 +3,7 @@ import * as _mintplayer_ui_core_checkbox from '@mintplayer/ui-core/checkbox';
|
|
|
3
3
|
import { CheckboxInputBag } from '@mintplayer/ui-core/checkbox';
|
|
4
4
|
import * as _angular_core from '@angular/core';
|
|
5
5
|
import { ControlValueAccessor } from '@angular/forms';
|
|
6
|
-
import * as i2 from '@mintplayer/ng-bootstrap/a11y';
|
|
6
|
+
import * as i2 from '@mintplayer/ng-bootstrap/a11y/forms';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Groups N `<bs-checkbox>` children into a multi-select FormControl whose
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
|
|
3
3
|
declare class BsCloseComponent {
|
|
4
|
+
constructor();
|
|
4
5
|
/** Accessible name for the close button. Override for localisation. */
|
|
5
6
|
ariaLabel: _angular_core.InputSignal<string>;
|
|
6
7
|
click: _angular_core.OutputEmitterRef<void>;
|