ngwr 13.0.0 → 14.0.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 +13 -6
- package/color-picker/styles/_index.scss +43 -5
- package/fesm2022/ngwr-alert.mjs +5 -5
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +11 -1
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +13 -2
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +12 -3
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +14 -3
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +4 -4
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs +15 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +51 -5
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +20 -1
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs +23 -7
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +89 -10
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +27 -3
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +13 -3
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-fns.mjs +101 -33
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +10 -2
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +103 -13
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +480 -79
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +22 -16
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +5 -2
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +30 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +24 -18
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +8 -3
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +1 -1
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +52 -12
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +21 -4
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +9 -2
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +63 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +28 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +150 -22
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-feather.mjs +11 -0
- package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-lucide.mjs +22 -2
- package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +474 -37
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +21 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +14 -7
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +20 -2
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs +73 -0
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -0
- package/fesm2022/ngwr-loading-bar.mjs +21 -32
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +63 -11
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +104 -14
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +36 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs +11 -10
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +65 -30
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +3 -2
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +2 -1
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +38 -1
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +93 -34
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +10 -3
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +2 -1
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +35 -4
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +35 -12
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +158 -0
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -0
- package/fesm2022/ngwr-tabs-testing.mjs +13 -11
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +104 -12
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +20 -1
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +1 -1
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +2 -2
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +18 -2
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +143 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +10 -2
- package/fesm2022/ngwr-window-testing.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +4 -4
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/i18n/en.json +33 -6
- package/i18n/ru.json +33 -6
- package/llms-full.txt +20 -11
- package/llms.txt +47 -16
- package/mcp/catalog.js +3 -3
- package/mcp/providers.js +11 -0
- package/package.json +11 -3
- package/schematics/migrations/v13/index.js +101 -0
- package/schematics/migrations/v14/index.js +422 -0
- package/schematics/migrations.json +10 -0
- package/schematics/page/templates.js +1 -1
- package/schematics/use/symbol-map.json +1 -0
- package/skills/ngwr/SKILL.md +4 -1
- package/skills/ngwr/references/catalog.md +2 -0
- package/skills/ngwr/references/setup.md +4 -0
- package/stepper/styles/_index.scss +19 -1
- package/textarea/styles/_index.scss +14 -6
- package/toast/styles/_index.scss +12 -4
- package/types/ngwr-alert.d.ts +3 -3
- package/types/ngwr-blur-text.d.ts +8 -0
- package/types/ngwr-breadcrumbs.d.ts +1 -0
- package/types/ngwr-button.d.ts +2 -2
- package/types/ngwr-calendar-testing.d.ts +21 -4
- package/types/ngwr-calendar.d.ts +37 -0
- package/types/ngwr-circular-text.d.ts +9 -0
- package/types/ngwr-collapse.d.ts +19 -15
- package/types/ngwr-color-picker-testing.d.ts +10 -4
- package/types/ngwr-color-picker.d.ts +70 -2
- package/types/ngwr-command-palette.d.ts +14 -0
- package/types/ngwr-context-menu.d.ts +1 -1
- package/types/ngwr-date-adapters-fns.d.ts +71 -29
- package/types/ngwr-date-picker-testing.d.ts +206 -185
- package/types/ngwr-date-picker.d.ts +7 -0
- package/types/ngwr-date.d.ts +143 -13
- package/types/ngwr-drag-drop.d.ts +19 -0
- package/types/ngwr-dropdown.d.ts +1 -1
- package/types/ngwr-event-calendar-testing.d.ts +12 -9
- package/types/ngwr-file-upload.d.ts +31 -3
- package/types/ngwr-fuzzy-text.d.ts +5 -0
- package/types/ngwr-i18n.d.ts +89 -7
- package/types/ngwr-icon-adapters-feather.d.ts +11 -0
- package/types/ngwr-icon.d.ts +42 -1
- package/types/ngwr-input-number.d.ts +1 -1
- package/types/ngwr-input-otp.d.ts +3 -0
- package/types/ngwr-input.d.ts +11 -4
- package/types/ngwr-knob-testing.d.ts +8 -4
- package/types/ngwr-knob.d.ts +18 -0
- package/types/ngwr-loading-bar-router.d.ts +35 -0
- package/types/ngwr-loading-bar.d.ts +19 -9
- package/types/ngwr-mention.d.ts +13 -0
- package/types/ngwr-pagination-testing.d.ts +11 -10
- package/types/ngwr-pagination.d.ts +39 -10
- package/types/ngwr-popconfirm.d.ts +1 -1
- package/types/ngwr-popover.d.ts +1 -1
- package/types/ngwr-select.d.ts +65 -10
- package/types/ngwr-shiny-text.d.ts +1 -0
- package/types/ngwr-splitter-testing.d.ts +9 -4
- package/types/ngwr-squircle.d.ts +1 -1
- package/types/ngwr-statistic.d.ts +22 -2
- package/types/ngwr-table.d.ts +24 -5
- package/types/ngwr-tabs-router.d.ts +67 -0
- package/types/ngwr-tabs-testing.d.ts +12 -10
- package/types/ngwr-tabs.d.ts +103 -6
- package/types/ngwr-textarea.d.ts +9 -0
- package/types/ngwr-tree.d.ts +7 -0
- package/types/ngwr-utils.d.ts +79 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window-testing.d.ts +11 -3
- package/types/ngwr-window.d.ts +11 -4
- package/window/styles/_index.scss +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-popover.mjs","sources":["../../../projects/lib/popover/interfaces/popover-position.ts","../../../projects/lib/popover/internal/text-panel.ts","../../../projects/lib/popover/popover.ts","../../../projects/lib/popover/ngwr-popover.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ConnectedPosition } from '@angular/cdk/overlay';\n\nexport type WrPopoverPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/**\n * The CDK geometry for each placement — one position, no fallbacks.\n *\n * The 8px offset is the gap between the trigger and the panel, and it is the\n * reason a flip list matters rather than being a nicety: the flexible strategy\n * emits `offsetX` as a `transform` on the pane, AFTER `withPush` has already\n * decided the coordinate. Push therefore parks a right-anchored panel flush\n * against the viewport edge and the offset then shoves it 8px back out, so a\n * side placement that does not fit loses its border and corner off-screen no\n * matter how hard push works. Flipping to a placement that fits is the only\n * recovery, which is what `WR_POPOVER_FALLBACKS` is for.\n *\n * @internal\n */\nexport const WR_POPOVER_POSITIONS: Record<WrPopoverPosition, ConnectedPosition> = {\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },\n 'top-start': { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 },\n 'top-end': { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },\n 'bottom-start': { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },\n 'bottom-end': { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },\n 'left-start': { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },\n 'left-end': { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },\n 'right-start': { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },\n 'right-end': { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },\n};\n\n/**\n * What each placement is allowed to flip to when it does not fit, best first.\n * The requested placement always leads, so a panel that fits never moves.\n *\n * Alignment is preserved down the whole chain — a `-start` popover stays\n * `-start` — because the alignment is the author's answer to \"which end of the\n * trigger does this belong to\", and a flip is about the side, not about that.\n *\n * The two axes are deliberately NOT symmetric. A block-axis placement (`top*` /\n * `bottom*`) flips only to its opposite, the classic behaviour, so a dropdown-ish\n * panel can never surprise anyone by appearing beside its trigger. An inline-axis\n * one (`left*` / `right*`) also gets the two block-axis sides, because on a phone\n * NEITHER side fits: at 375px a 233px panel beside a mid-page trigger overflows\n * by 109px to the right and 97px to the left, and only below/above has room.\n *\n * @internal\n */\nexport const WR_POPOVER_FALLBACKS: Record<WrPopoverPosition, readonly WrPopoverPosition[]> = {\n top: ['top', 'bottom'],\n 'top-start': ['top-start', 'bottom-start'],\n 'top-end': ['top-end', 'bottom-end'],\n bottom: ['bottom', 'top'],\n 'bottom-start': ['bottom-start', 'top-start'],\n 'bottom-end': ['bottom-end', 'top-end'],\n left: ['left', 'right', 'bottom', 'top'],\n 'left-start': ['left-start', 'right-start', 'bottom-start', 'top-start'],\n 'left-end': ['left-end', 'right-end', 'bottom-end', 'top-end'],\n right: ['right', 'left', 'bottom', 'top'],\n 'right-start': ['right-start', 'left-start', 'bottom-start', 'top-start'],\n 'right-end': ['right-end', 'left-end', 'bottom-end', 'top-end'],\n};\n\n/**\n * The list `withPositions()` wants, with every link tagged so the pane names the\n * placement it ACTUALLY took rather than the one that was asked for.\n *\n * The tag is what keeps the arrow honest. It is drawn by\n * `.wr-popover-overlay--<placement> > *::after`, so a panel that flipped while\n * the class stayed put would point at a side it no longer sits on. CDK applies a\n * position's own `panelClass` in `_applyPosition` and clears it again on the next\n * one, which is exactly the bookkeeping this needs — hence the class rather than\n * a `positionChanges` subscription.\n *\n * @param paneClass The pane's base class: `wr-popover-overlay` or\n * `wr-tooltip-overlay`. The two modes key their arrows off different\n * selectors, so the prefix cannot live in the table.\n *\n * @internal\n */\nexport function wrPopoverPositions(position: WrPopoverPosition, paneClass: string): ConnectedPosition[] {\n return WR_POPOVER_FALLBACKS[position].map(name => ({\n ...WR_POPOVER_POSITIONS[name],\n panelClass: `${paneClass}--${name}`,\n }));\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Internal floating label rendered when `<… [wrPopover]=\"'…'\" mode=\"tooltip\">`\n * receives a string instead of a template. Not part of the public template\n * API — use the `WrPopover` directive in tooltip mode instead.\n *\n * @internal\n */\n@Component({\n selector: 'wr-popover-text',\n template: '{{ text() }}',\n encapsulation: ViewEncapsulation.None,\n // No `role=\"tooltip\"` here on purpose: the overlay pane this is attached to\n // is the element `aria-describedby` resolves to, and it carries the role.\n // Setting it here too nested one tooltip inside another.\n host: { class: 'wr-tooltip' },\n})\nexport class WrPopoverTextPanel {\n readonly text = input.required<string>();\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { type BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport type { ComponentRef, TemplateRef } from '@angular/core';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WR_OVERLAY, WR_RESPONSIVE_OVERLAYS, WrOutsideClick, wrMirrorOffsets, wrPresentAsSheet } from 'ngwr/overlay';\nimport { numAttr } from 'ngwr/utils';\n\nimport { type WrPopoverPosition, wrPopoverPositions } from './interfaces';\nimport { WrPopoverTextPanel } from './internal/text-panel';\n\n/**\n * Anchored content panel. The same directive covers two shapes:\n *\n * - **Popover** (default, `mode=\"popover\"`) — `[wrPopover]` takes a\n * `TemplateRef`. Opens on click or hover. Use for rich anchored content:\n * forms, summaries, menus.\n *\n * - **Tooltip** (`mode=\"tooltip\"`) — `[wrPopover]` takes a plain string.\n * Shown on hover and focus, dismissed on blur / pointer-leave / Escape.\n * Uses `aria-describedby` instead of `aria-haspopup` and is rendered into\n * a small dark text panel.\n *\n * Built on CDK Overlay so it auto-flips, closes on outside-click and Escape.\n *\n * @example\n * ```html\n * <!-- Popover with template content -->\n * <button wr-btn [wrPopover]=\"info\">Details</button>\n * <ng-template #info>\n * <div style=\"padding: 1rem; max-width: 18rem\">Anything you can render.</div>\n * </ng-template>\n *\n * <!-- Tooltip with plain text -->\n * <button wr-btn [wrPopover]=\"'Save changes'\" mode=\"tooltip\" position=\"top\">\n * Save\n * </button>\n * ```\n *\n * @see https://ngwr.dev/reference/components/popover\n */\nlet popoverUid = 0;\n\n@Directive({\n selector: '[wrPopover]',\n host: {\n // Marks the trigger the way `[wrDropdown]` marks its own. Popover-mode\n // content is a `TemplateRef`, so it is always bound as `[wrPopover]=\"…\"`,\n // which leaves no attribute in the DOM at all, and a closed tooltip\n // publishes no ARIA either — so without this there is nothing to find a\n // trigger by. (Only the static string form, `wrPopover=\"text\"`, would be.)\n class: 'wr-popover-trigger',\n '[attr.aria-haspopup]': 'isTooltip() ? null : \"dialog\"',\n '[attr.aria-expanded]': 'isTooltip() ? null : isOpen()',\n '[attr.aria-controls]': '!isTooltip() && isOpen() ? panelId : null',\n '[attr.aria-describedby]': 'isTooltip() && isOpen() ? panelId : null',\n '(click)': 'onClick($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class WrPopover {\n /**\n * Content to render inside the panel.\n * - In **popover** mode (default): pass a `TemplateRef`.\n * - In **tooltip** mode: pass a plain string.\n */\n readonly content = input.required<TemplateRef<unknown> | string>({ alias: 'wrPopover' });\n\n /**\n * Shape preset.\n *\n * - `'popover'` (default) — template content, click trigger, dialog\n * semantics.\n * - `'tooltip'` — text content, hover+focus trigger, `role=\"tooltip\"`,\n * `aria-describedby` on the host.\n */\n readonly mode = input<'popover' | 'tooltip'>('popover');\n\n /**\n * How the popover opens. Ignored in tooltip mode — tooltips are always\n * hover+focus. @default 'click'\n */\n readonly trigger = input<'click' | 'hover'>('click');\n\n /** Anchor side. @default 'bottom' for popover, 'top' for tooltip */\n readonly position = input<WrPopoverPosition | null>(null);\n\n /** Tooltip only — delay before showing, in ms. @default 120 */\n readonly showDelay = input(120, { transform: numAttr(120) });\n\n /** Tooltip only — delay before hiding, in ms. @default 60 */\n readonly hideDelay = input(60, { transform: numAttr(60) });\n\n /**\n * Popover mode only — present the panel as a full-width bottom-sheet on\n * small viewports instead of an anchored panel. `undefined` follows the\n * app-wide `provideWrResponsiveOverlays()` setting; `true`/`false`\n * overrides it. Tooltips never become sheets. @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /**\n * Popover mode only — accessible name of the panel. `role=\"dialog\"` with no\n * name announces as a bare \"dialog\", so the catalog's `popover.label` is used\n * when nothing is given. A popover has no universal name; whenever the panel\n * has a heading or a purpose, pass it.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires after the panel opens. */\n readonly opened = output<void>();\n\n /** Fires after the panel closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n /** @internal */\n readonly isOpen = signal(false);\n\n /** @internal */\n protected readonly isTooltip = computed(() => this.mode() === 'tooltip');\n\n /** Auto-generated id for `aria-controls` / `aria-describedby`. */\n protected readonly panelId = `wr-popover-${++popoverUid}`;\n\n private readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'popover.label', 'Popover');\n\n private readonly resolvedPosition = computed<WrPopoverPosition>(\n () => this.position() ?? (this.isTooltip() ? 'top' : 'bottom')\n );\n\n private overlayRef: OverlayRef | null = null;\n private textPanelRef: ComponentRef<WrPopoverTextPanel> | null = null;\n private hoverCloseTimer: ReturnType<typeof setTimeout> | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n // The tooltip string is pushed into the panel when the panel is created, and\n // `openOverlay()` returns early while one is already up — so a `content()`\n // change with the tooltip on screen never reached it and the label stayed on\n // the string it opened with (hover a Copy button, click it, it still reads\n // \"Copy\"). Keeping the ref and pushing from an effect is how `wr-date-picker`\n // feeds its own panel refs.\n effect(() => {\n const content = this.content();\n this.textPanelRef?.setInput('text', typeof content === 'string' ? content : '');\n });\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.closeOverlay();\n });\n }\n\n open(): void {\n this.isOpen.set(true);\n }\n\n close(): void {\n this.isOpen.set(false);\n }\n\n toggle(): void {\n this.isOpen.update(v => !v);\n }\n\n // Host listeners\n\n /** @internal */\n protected onClick(event: MouseEvent): void {\n if (this.isTooltip() || this.trigger() !== 'click') return;\n event.stopPropagation();\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.isTooltip()) {\n this.scheduleShow();\n return;\n }\n if (this.trigger() !== 'hover') return;\n this.clearHoverClose();\n this.isOpen.set(true);\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n const related = event.relatedTarget as Node | null;\n if (this.isTooltip()) {\n // Crossing straight from the trigger onto the panel does not even arm the\n // hide, the same bail-out the popover arm below has had. The panel's own\n // `mouseenter` would cancel it a moment later anyway; not arming it is\n // what removes the race.\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n this.scheduleHide();\n return;\n }\n if (this.trigger() !== 'hover') return;\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n // Delay so the pointer can cross the gap between trigger and panel —\n // entering the panel cancels the close (see attach listeners).\n this.scheduleHoverClose();\n }\n\n /** @internal */\n protected onFocus(): void {\n if (!this.isTooltip()) return;\n this.scheduleShow();\n }\n\n /** @internal */\n protected onBlur(): void {\n if (!this.isTooltip()) return;\n this.scheduleHide();\n }\n\n /** @internal */\n protected onEscape(): void {\n if (!this.isTooltip()) return;\n this.clearTimers();\n this.isOpen.set(false);\n }\n\n // Tooltip timers\n\n private scheduleShow(): void {\n if (this.isOpen()) {\n this.clearTimers();\n return;\n }\n const text = this.content();\n if (typeof text === 'string' && !text) return;\n this.clearTimers();\n this.showTimer = setTimeout(() => this.isOpen.set(true), this.showDelay());\n }\n\n private scheduleHide(): void {\n this.clearTimers();\n this.hideTimer = setTimeout(() => this.isOpen.set(false), this.hideDelay());\n }\n\n private clearTimers(): void {\n if (this.showTimer) {\n clearTimeout(this.showTimer);\n this.showTimer = null;\n }\n if (this.hideTimer) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n // Overlay\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const tooltip = this.isTooltip();\n const position = this.resolvedPosition();\n\n // Sheet presentation is popover-only — tooltips are transient labels and\n // never dock to the bottom. On small viewports (when opted in) detach\n // from the trigger and slide the panel up from the bottom edge.\n const asSheet = !tooltip && wrPresentAsSheet(this.responsive(), this.responsiveConfig);\n const paneClass = tooltip ? 'wr-tooltip-overlay' : 'wr-popover-overlay';\n\n const positionStrategy = asSheet\n ? this.overlay.position().global().centerHorizontally().bottom('0')\n : this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), this.isRtl()))\n .withPush(true);\n\n // The `--<placement>` half is no longer set here: each fallback position\n // carries its own, so the pane names the placement it landed on instead of\n // the one that was requested, and the arrow follows a flip. A sheet has no\n // anchor and so no placement class at all.\n const overlayClass = asSheet ? [paneClass, 'wr-overlay-sheet'] : [paneClass];\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),\n width: asSheet ? '100%' : undefined,\n hasBackdrop: asSheet,\n backdropClass: asSheet ? 'wr-overlay-backdrop' : undefined,\n panelClass: overlayClass,\n });\n\n if (asSheet) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.isOpen.set(false));\n }\n\n const content = this.content();\n\n if (tooltip) {\n // Text content rendered via the internal text panel — accepts a\n // string and wraps it in the `.wr-tooltip` shell.\n const text = typeof content === 'string' ? content : '';\n const ref = this.overlayRef.attach(new ComponentPortal(WrPopoverTextPanel, this.vcr));\n ref.setInput('text', text);\n this.textPanelRef = ref;\n // The pane is the element `aria-describedby` points at (it carries\n // `panelId`), so this is the role that has to be `tooltip` — the inner\n // `wr-popover-text` host deliberately carries none, or the description\n // would be a tooltip nested inside a tooltip.\n this.overlayRef.overlayElement.setAttribute('role', 'tooltip');\n } else if (typeof content !== 'string') {\n const view = this.overlayRef.attach(new TemplatePortal(content, this.vcr));\n const pane = this.overlayRef.overlayElement;\n // Popover mode is a non-modal dialog: the docstring promised dialog\n // semantics but nothing ever set a role, so a screen reader met an\n // unnamed generic container. `aria-modal=\"false\"` is explicit — focus is\n // deliberately NOT trapped, the panel closes on outside click / Escape.\n pane.setAttribute('role', 'dialog');\n pane.setAttribute('aria-modal', 'false');\n // A named dialog: `role=\"dialog\"` with no name announces as a bare\n // \"dialog\" and trips axe's `aria-dialog-name`.\n pane.setAttribute('aria-label', this.resolvedAriaLabel());\n\n if (this.trigger() === 'click') {\n // Render the projected content before focus moves, the way\n // `wr-popconfirm` does — a reader announcing the dialog reads what is in\n // it, and on an empty pane that is nothing.\n view.detectChanges();\n // Focus has to ENTER the panel. The overlay container sits at the end of\n // `<body>`, so Tab from the trigger went to the next control on the page\n // and left the dialog stranded behind it (WCAG F85). The pane takes it\n // rather than the first control inside: a popover's content is\n // arbitrary, and landing on a text field would raise the on-screen\n // keyboard and skip whatever the panel says above it. Tab from the pane\n // reaches that first control anyway, since the pane precedes its own\n // content in document order.\n //\n // Click-triggered only — a hover popover must not pull the caret out of\n // what the user is typing in, and `scheduleHoverClose()` would then\n // dispose the pane out from under the focused element.\n pane.tabIndex = -1;\n pane.focus();\n }\n }\n this.overlayRef.overlayElement.id = this.panelId;\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.isOpen.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.isOpen.set(false);\n }\n });\n\n // Both hover shapes keep the panel up while the pointer is on it: for a\n // popover so the pointer can cross the gap, for a tooltip because WCAG\n // 1.4.13 requires it (Hoverable).\n if (tooltip || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayLeave);\n }\n\n this.opened.emit();\n }\n\n private closeOverlay(): void {\n if (!this.overlayRef) return;\n if (this.isTooltip() || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayLeave);\n }\n this.clearHoverClose();\n // Take the focus back before the pane goes, and only if it was in there.\n //\n // A popover is not a tooltip: it attaches a `TemplatePortal` under\n // `role=\"dialog\"`, so a form or a menu inside it is the point, and Escape\n // arrives through the overlay's `keydownEvents()` no matter where the caret\n // is. Disposing with focus inside dropped it on `<body>`, and the next Tab\n // restarted from the top of the document. `wr-date-picker` and\n // `wr-popconfirm` already guard it exactly this way; leaving focus alone\n // when it had already moved is what stops the close from fighting the user\n // for the caret.\n const pane = this.overlayRef.overlayElement;\n const focusWasInside = pane.contains(this.host.nativeElement.ownerDocument.activeElement);\n this.overlayRef.dispose();\n this.overlayRef = null;\n // Disposing destroys the panel component; a retained ref would pin its view.\n this.textPanelRef = null;\n if (focusWasInside) this.host.nativeElement.focus();\n this.closed.emit();\n }\n\n private readonly onOverlayLeave = (event: MouseEvent): void => {\n const related = event.relatedTarget as Node | null;\n if (related && this.host.nativeElement.contains(related)) return;\n // A tooltip leaves on its own `hideDelay`, the same one the trigger uses; a\n // hover popover has the longer grace period for crossing the gap back.\n if (this.isTooltip()) this.scheduleHide();\n else this.scheduleHoverClose();\n };\n\n private readonly onOverlayEnter = (): void => {\n // Two different timers can be in flight: `hideTimer`, armed by the trigger's\n // own `mouseleave` in tooltip mode, and `hoverCloseTimer` in popover mode.\n // Cancelling only the second would leave a tooltip disappearing `hideDelay`\n // after the pointer arrived on it.\n this.clearTimers();\n this.clearHoverClose();\n };\n\n private scheduleHoverClose(): void {\n this.clearHoverClose();\n this.hoverCloseTimer = setTimeout(() => this.isOpen.set(false), 120);\n }\n\n private clearHoverClose(): void {\n if (this.hoverCloseTimer) {\n clearTimeout(this.hoverCloseTimer);\n this.hoverCloseTimer = null;\n }\n }\n\n /**\n * Whether the app reads right-to-left.\n *\n * Optional inject: `Directionality` is root-provided, so this is never null in\n * an app — but a bare `TestBed` that provides nothing should still get a\n * component that works, and defaulting to LTR is the honest fallback.\n */\n private isRtl(): boolean {\n return this.dir?.value === 'rtl';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;AAKG;AAkBH;;;;;;;;;;;;;AAaG;AACI,MAAM,oBAAoB,GAAiD;IAChF,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;IAC/F,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;IACrG,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAA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AAQ,EAAE,UAAU;AACpB,wBAAA,kBAAkB,EAAE,YAAY;AACjC,qBAAA;AACF,iBAAA;;;ACrFD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-popover.mjs","sources":["../../../projects/lib/popover/interfaces/popover-position.ts","../../../projects/lib/popover/internal/text-panel.ts","../../../projects/lib/popover/popover.ts","../../../projects/lib/popover/ngwr-popover.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ConnectedPosition } from '@angular/cdk/overlay';\n\nexport type WrPopoverPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/**\n * The CDK geometry for each placement — one position, no fallbacks.\n *\n * The 8px offset is the gap between the trigger and the panel, and it is the\n * reason a flip list matters rather than being a nicety: the flexible strategy\n * emits `offsetX` as a `transform` on the pane, AFTER `withPush` has already\n * decided the coordinate. Push therefore parks a right-anchored panel flush\n * against the viewport edge and the offset then shoves it 8px back out, so a\n * side placement that does not fit loses its border and corner off-screen no\n * matter how hard push works. Flipping to a placement that fits is the only\n * recovery, which is what `WR_POPOVER_FALLBACKS` is for.\n *\n * @internal\n */\nexport const WR_POPOVER_POSITIONS: Record<WrPopoverPosition, ConnectedPosition> = {\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },\n 'top-start': { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 },\n 'top-end': { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },\n 'bottom-start': { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },\n 'bottom-end': { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },\n 'left-start': { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },\n 'left-end': { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },\n 'right-start': { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },\n 'right-end': { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },\n};\n\n/**\n * What each placement is allowed to flip to when it does not fit, best first.\n * The requested placement always leads, so a panel that fits never moves.\n *\n * Alignment is preserved down the whole chain — a `-start` popover stays\n * `-start` — because the alignment is the author's answer to \"which end of the\n * trigger does this belong to\", and a flip is about the side, not about that.\n *\n * The two axes are deliberately NOT symmetric. A block-axis placement (`top*` /\n * `bottom*`) flips only to its opposite, the classic behaviour, so a dropdown-ish\n * panel can never surprise anyone by appearing beside its trigger. An inline-axis\n * one (`left*` / `right*`) also gets the two block-axis sides, because on a phone\n * NEITHER side fits: at 375px a 233px panel beside a mid-page trigger overflows\n * by 109px to the right and 97px to the left, and only below/above has room.\n *\n * @internal\n */\nexport const WR_POPOVER_FALLBACKS: Record<WrPopoverPosition, readonly WrPopoverPosition[]> = {\n top: ['top', 'bottom'],\n 'top-start': ['top-start', 'bottom-start'],\n 'top-end': ['top-end', 'bottom-end'],\n bottom: ['bottom', 'top'],\n 'bottom-start': ['bottom-start', 'top-start'],\n 'bottom-end': ['bottom-end', 'top-end'],\n left: ['left', 'right', 'bottom', 'top'],\n 'left-start': ['left-start', 'right-start', 'bottom-start', 'top-start'],\n 'left-end': ['left-end', 'right-end', 'bottom-end', 'top-end'],\n right: ['right', 'left', 'bottom', 'top'],\n 'right-start': ['right-start', 'left-start', 'bottom-start', 'top-start'],\n 'right-end': ['right-end', 'left-end', 'bottom-end', 'top-end'],\n};\n\n/**\n * The list `withPositions()` wants, with every link tagged so the pane names the\n * placement it ACTUALLY took rather than the one that was asked for.\n *\n * The tag is what keeps the arrow honest. It is drawn by\n * `.wr-popover-overlay--<placement> > *::after`, so a panel that flipped while\n * the class stayed put would point at a side it no longer sits on. CDK applies a\n * position's own `panelClass` in `_applyPosition` and clears it again on the next\n * one, which is exactly the bookkeeping this needs — hence the class rather than\n * a `positionChanges` subscription.\n *\n * @param paneClass The pane's base class: `wr-popover-overlay` or\n * `wr-tooltip-overlay`. The two modes key their arrows off different\n * selectors, so the prefix cannot live in the table.\n *\n * @internal\n */\nexport function wrPopoverPositions(position: WrPopoverPosition, paneClass: string): ConnectedPosition[] {\n return WR_POPOVER_FALLBACKS[position].map(name => ({\n ...WR_POPOVER_POSITIONS[name],\n panelClass: `${paneClass}--${name}`,\n }));\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Internal floating label rendered when `<… [wrPopover]=\"'…'\" mode=\"tooltip\">`\n * receives a string instead of a template. Not part of the public template\n * API — use the `WrPopover` directive in tooltip mode instead.\n *\n * @internal\n */\n@Component({\n selector: 'wr-popover-text',\n template: '{{ text() }}',\n encapsulation: ViewEncapsulation.None,\n // No `role=\"tooltip\"` here on purpose: the overlay pane this is attached to\n // is the element `aria-describedby` resolves to, and it carries the role.\n // Setting it here too nested one tooltip inside another.\n host: { class: 'wr-tooltip' },\n})\nexport class WrPopoverTextPanel {\n readonly text = input.required<string>();\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { type BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport type { ComponentRef, TemplateRef } from '@angular/core';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WR_OVERLAY, WR_RESPONSIVE_OVERLAYS, WrOutsideClick, wrMirrorOffsets, wrPresentAsSheet } from 'ngwr/overlay';\nimport { numAttr } from 'ngwr/utils';\n\nimport { type WrPopoverPosition, wrPopoverPositions } from './interfaces';\nimport { WrPopoverTextPanel } from './internal/text-panel';\n\n/**\n * Anchored content panel. The same directive covers two shapes:\n *\n * - **Popover** (default, `mode=\"popover\"`) — `[wrPopover]` takes a\n * `TemplateRef`. Opens on click or hover. Use for rich anchored content:\n * forms, summaries, menus.\n *\n * - **Tooltip** (`mode=\"tooltip\"`) — `[wrPopover]` takes a plain string.\n * Shown on hover and focus, dismissed on blur / pointer-leave / Escape.\n * Uses `aria-describedby` instead of `aria-haspopup` and is rendered into\n * a small dark text panel.\n *\n * Built on CDK Overlay so it auto-flips, closes on outside-click and Escape.\n *\n * @example\n * ```html\n * <!-- Popover with template content -->\n * <button wr-btn [wrPopover]=\"info\">Details</button>\n * <ng-template #info>\n * <div style=\"padding: 1rem; max-width: 18rem\">Anything you can render.</div>\n * </ng-template>\n *\n * <!-- Tooltip with plain text -->\n * <button wr-btn [wrPopover]=\"'Save changes'\" mode=\"tooltip\" position=\"top\">\n * Save\n * </button>\n * ```\n *\n * @see https://ngwr.dev/reference/components/popover\n */\nlet popoverUid = 0;\n\n@Directive({\n selector: '[wrPopover]',\n exportAs: 'wrPopover',\n host: {\n // Marks the trigger the way `[wrDropdown]` marks its own. Popover-mode\n // content is a `TemplateRef`, so it is always bound as `[wrPopover]=\"…\"`,\n // which leaves no attribute in the DOM at all, and a closed tooltip\n // publishes no ARIA either — so without this there is nothing to find a\n // trigger by. (Only the static string form, `wrPopover=\"text\"`, would be.)\n class: 'wr-popover-trigger',\n '[attr.aria-haspopup]': 'isTooltip() ? null : \"dialog\"',\n '[attr.aria-expanded]': 'isTooltip() ? null : isOpen()',\n '[attr.aria-controls]': '!isTooltip() && isOpen() ? panelId : null',\n '[attr.aria-describedby]': 'isTooltip() && isOpen() ? panelId : null',\n '(click)': 'onClick($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class WrPopover {\n /**\n * Content to render inside the panel.\n * - In **popover** mode (default): pass a `TemplateRef`.\n * - In **tooltip** mode: pass a plain string.\n */\n readonly content = input.required<TemplateRef<unknown> | string>({ alias: 'wrPopover' });\n\n /**\n * Shape preset.\n *\n * - `'popover'` (default) — template content, click trigger, dialog\n * semantics.\n * - `'tooltip'` — text content, hover+focus trigger, `role=\"tooltip\"`,\n * `aria-describedby` on the host.\n */\n readonly mode = input<'popover' | 'tooltip'>('popover');\n\n /**\n * How the popover opens. Ignored in tooltip mode — tooltips are always\n * hover+focus. @default 'click'\n */\n readonly trigger = input<'click' | 'hover'>('click');\n\n /** Anchor side. @default 'bottom' for popover, 'top' for tooltip */\n readonly position = input<WrPopoverPosition | null>(null);\n\n /** Tooltip only — delay before showing, in ms. @default 120 */\n readonly showDelay = input(120, { transform: numAttr(120) });\n\n /** Tooltip only — delay before hiding, in ms. @default 60 */\n readonly hideDelay = input(60, { transform: numAttr(60) });\n\n /**\n * Popover mode only — present the panel as a full-width bottom-sheet on\n * small viewports instead of an anchored panel. `undefined` follows the\n * app-wide `provideWrResponsiveOverlays()` setting; `true`/`false`\n * overrides it. Tooltips never become sheets. @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /**\n * Popover mode only — accessible name of the panel. `role=\"dialog\"` with no\n * name announces as a bare \"dialog\", so the catalog's `popover.label` is used\n * when nothing is given. A popover has no universal name; whenever the panel\n * has a heading or a purpose, pass it.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires after the panel opens. */\n readonly opened = output<void>();\n\n /** Fires after the panel closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n /** @internal */\n readonly isOpen = signal(false);\n\n /** @internal */\n protected readonly isTooltip = computed(() => this.mode() === 'tooltip');\n\n /** Auto-generated id for `aria-controls` / `aria-describedby`. */\n protected readonly panelId = `wr-popover-${++popoverUid}`;\n\n private readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'popover.label', 'Popover');\n\n private readonly resolvedPosition = computed<WrPopoverPosition>(\n () => this.position() ?? (this.isTooltip() ? 'top' : 'bottom')\n );\n\n private overlayRef: OverlayRef | null = null;\n private textPanelRef: ComponentRef<WrPopoverTextPanel> | null = null;\n private hoverCloseTimer: ReturnType<typeof setTimeout> | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n // The tooltip string is pushed into the panel when the panel is created, and\n // `openOverlay()` returns early while one is already up — so a `content()`\n // change with the tooltip on screen never reached it and the label stayed on\n // the string it opened with (hover a Copy button, click it, it still reads\n // \"Copy\"). Keeping the ref and pushing from an effect is how `wr-date-picker`\n // feeds its own panel refs.\n effect(() => {\n const content = this.content();\n this.textPanelRef?.setInput('text', typeof content === 'string' ? content : '');\n });\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.closeOverlay();\n });\n }\n\n open(): void {\n this.isOpen.set(true);\n }\n\n close(): void {\n this.isOpen.set(false);\n }\n\n toggle(): void {\n this.isOpen.update(v => !v);\n }\n\n // Host listeners\n\n /** @internal */\n protected onClick(event: MouseEvent): void {\n if (this.isTooltip() || this.trigger() !== 'click') return;\n event.stopPropagation();\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.isTooltip()) {\n this.scheduleShow();\n return;\n }\n if (this.trigger() !== 'hover') return;\n this.clearHoverClose();\n this.isOpen.set(true);\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n const related = event.relatedTarget as Node | null;\n if (this.isTooltip()) {\n // Crossing straight from the trigger onto the panel does not even arm the\n // hide, the same bail-out the popover arm below has had. The panel's own\n // `mouseenter` would cancel it a moment later anyway; not arming it is\n // what removes the race.\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n this.scheduleHide();\n return;\n }\n if (this.trigger() !== 'hover') return;\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n // Delay so the pointer can cross the gap between trigger and panel —\n // entering the panel cancels the close (see attach listeners).\n this.scheduleHoverClose();\n }\n\n /** @internal */\n protected onFocus(): void {\n if (!this.isTooltip()) return;\n this.scheduleShow();\n }\n\n /** @internal */\n protected onBlur(): void {\n if (!this.isTooltip()) return;\n this.scheduleHide();\n }\n\n /** @internal */\n protected onEscape(): void {\n if (!this.isTooltip()) return;\n this.clearTimers();\n this.isOpen.set(false);\n }\n\n // Tooltip timers\n\n private scheduleShow(): void {\n if (this.isOpen()) {\n this.clearTimers();\n return;\n }\n const text = this.content();\n if (typeof text === 'string' && !text) return;\n this.clearTimers();\n this.showTimer = setTimeout(() => this.isOpen.set(true), this.showDelay());\n }\n\n private scheduleHide(): void {\n this.clearTimers();\n this.hideTimer = setTimeout(() => this.isOpen.set(false), this.hideDelay());\n }\n\n private clearTimers(): void {\n if (this.showTimer) {\n clearTimeout(this.showTimer);\n this.showTimer = null;\n }\n if (this.hideTimer) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n // Overlay\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const tooltip = this.isTooltip();\n const position = this.resolvedPosition();\n\n // Sheet presentation is popover-only — tooltips are transient labels and\n // never dock to the bottom. On small viewports (when opted in) detach\n // from the trigger and slide the panel up from the bottom edge.\n const asSheet = !tooltip && wrPresentAsSheet(this.responsive(), this.responsiveConfig);\n const paneClass = tooltip ? 'wr-tooltip-overlay' : 'wr-popover-overlay';\n\n const positionStrategy = asSheet\n ? this.overlay.position().global().centerHorizontally().bottom('0')\n : this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), this.isRtl()))\n .withPush(true);\n\n // The `--<placement>` half is no longer set here: each fallback position\n // carries its own, so the pane names the placement it landed on instead of\n // the one that was requested, and the arrow follows a flip. A sheet has no\n // anchor and so no placement class at all.\n const overlayClass = asSheet ? [paneClass, 'wr-overlay-sheet'] : [paneClass];\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),\n width: asSheet ? '100%' : undefined,\n hasBackdrop: asSheet,\n backdropClass: asSheet ? 'wr-overlay-backdrop' : undefined,\n panelClass: overlayClass,\n });\n\n if (asSheet) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.isOpen.set(false));\n }\n\n const content = this.content();\n\n if (tooltip) {\n // Text content rendered via the internal text panel — accepts a\n // string and wraps it in the `.wr-tooltip` shell.\n const text = typeof content === 'string' ? content : '';\n const ref = this.overlayRef.attach(new ComponentPortal(WrPopoverTextPanel, this.vcr));\n ref.setInput('text', text);\n this.textPanelRef = ref;\n // The pane is the element `aria-describedby` points at (it carries\n // `panelId`), so this is the role that has to be `tooltip` — the inner\n // `wr-popover-text` host deliberately carries none, or the description\n // would be a tooltip nested inside a tooltip.\n this.overlayRef.overlayElement.setAttribute('role', 'tooltip');\n } else if (typeof content !== 'string') {\n const view = this.overlayRef.attach(new TemplatePortal(content, this.vcr));\n const pane = this.overlayRef.overlayElement;\n // Popover mode is a non-modal dialog: the docstring promised dialog\n // semantics but nothing ever set a role, so a screen reader met an\n // unnamed generic container. `aria-modal=\"false\"` is explicit — focus is\n // deliberately NOT trapped, the panel closes on outside click / Escape.\n pane.setAttribute('role', 'dialog');\n pane.setAttribute('aria-modal', 'false');\n // A named dialog: `role=\"dialog\"` with no name announces as a bare\n // \"dialog\" and trips axe's `aria-dialog-name`.\n pane.setAttribute('aria-label', this.resolvedAriaLabel());\n\n if (this.trigger() === 'click') {\n // Render the projected content before focus moves, the way\n // `wr-popconfirm` does — a reader announcing the dialog reads what is in\n // it, and on an empty pane that is nothing.\n view.detectChanges();\n // Focus has to ENTER the panel. The overlay container sits at the end of\n // `<body>`, so Tab from the trigger went to the next control on the page\n // and left the dialog stranded behind it (WCAG F85). The pane takes it\n // rather than the first control inside: a popover's content is\n // arbitrary, and landing on a text field would raise the on-screen\n // keyboard and skip whatever the panel says above it. Tab from the pane\n // reaches that first control anyway, since the pane precedes its own\n // content in document order.\n //\n // Click-triggered only — a hover popover must not pull the caret out of\n // what the user is typing in, and `scheduleHoverClose()` would then\n // dispose the pane out from under the focused element.\n pane.tabIndex = -1;\n pane.focus();\n }\n }\n this.overlayRef.overlayElement.id = this.panelId;\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.isOpen.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.isOpen.set(false);\n }\n });\n\n // Both hover shapes keep the panel up while the pointer is on it: for a\n // popover so the pointer can cross the gap, for a tooltip because WCAG\n // 1.4.13 requires it (Hoverable).\n if (tooltip || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayLeave);\n }\n\n this.opened.emit();\n }\n\n private closeOverlay(): void {\n if (!this.overlayRef) return;\n if (this.isTooltip() || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayLeave);\n }\n this.clearHoverClose();\n // Take the focus back before the pane goes, and only if it was in there.\n //\n // A popover is not a tooltip: it attaches a `TemplatePortal` under\n // `role=\"dialog\"`, so a form or a menu inside it is the point, and Escape\n // arrives through the overlay's `keydownEvents()` no matter where the caret\n // is. Disposing with focus inside dropped it on `<body>`, and the next Tab\n // restarted from the top of the document. `wr-date-picker` and\n // `wr-popconfirm` already guard it exactly this way; leaving focus alone\n // when it had already moved is what stops the close from fighting the user\n // for the caret.\n const pane = this.overlayRef.overlayElement;\n const focusWasInside = pane.contains(this.host.nativeElement.ownerDocument.activeElement);\n this.overlayRef.dispose();\n this.overlayRef = null;\n // Disposing destroys the panel component; a retained ref would pin its view.\n this.textPanelRef = null;\n if (focusWasInside) this.host.nativeElement.focus();\n this.closed.emit();\n }\n\n private readonly onOverlayLeave = (event: MouseEvent): void => {\n const related = event.relatedTarget as Node | null;\n if (related && this.host.nativeElement.contains(related)) return;\n // A tooltip leaves on its own `hideDelay`, the same one the trigger uses; a\n // hover popover has the longer grace period for crossing the gap back.\n if (this.isTooltip()) this.scheduleHide();\n else this.scheduleHoverClose();\n };\n\n private readonly onOverlayEnter = (): void => {\n // Two different timers can be in flight: `hideTimer`, armed by the trigger's\n // own `mouseleave` in tooltip mode, and `hoverCloseTimer` in popover mode.\n // Cancelling only the second would leave a tooltip disappearing `hideDelay`\n // after the pointer arrived on it.\n this.clearTimers();\n this.clearHoverClose();\n };\n\n private scheduleHoverClose(): void {\n this.clearHoverClose();\n this.hoverCloseTimer = setTimeout(() => this.isOpen.set(false), 120);\n }\n\n private clearHoverClose(): void {\n if (this.hoverCloseTimer) {\n clearTimeout(this.hoverCloseTimer);\n this.hoverCloseTimer = null;\n }\n }\n\n /**\n * Whether the app reads right-to-left.\n *\n * Optional inject: `Directionality` is root-provided, so this is never null in\n * an app — but a bare `TestBed` that provides nothing should still get a\n * component that works, and defaulting to LTR is the honest fallback.\n */\n private isRtl(): boolean {\n return this.dir?.value === 'rtl';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;AAKG;AAkBH;;;;;;;;;;;;;AAaG;AACI,MAAM,oBAAoB,GAAiD;IAChF,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;IAC/F,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;IACrG,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;IAC/F,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE;IACjG,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,Q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923
|
+
* The `iconUrl` a consumer bound, or `null` when it names a scheme an image must
|
|
924
|
+
* not fetch.
|
|
925
|
+
*
|
|
926
|
+
* A security audit of 13.0.0 bound an attacker-shaped `[iconUrl]` and watched the
|
|
927
|
+
* page make the request: the value went to `new Image().src` verbatim, which is
|
|
928
|
+
* the one thing Angular would have sanitised had the template written `[src]`
|
|
929
|
+
* itself. The library does the loading here, so the app loses that protection
|
|
930
|
+
* without being told.
|
|
931
|
+
*
|
|
932
|
+
* Same rules as `safeMarkdownUrl` in `ngwr/markdown`, and deliberately a copy
|
|
933
|
+
* rather than an import: an entry point may not depend on another's internals,
|
|
934
|
+
* and one call site does not earn a shared util. A third would — put it in
|
|
935
|
+
* `ngwr/utils` beside `isSafeCssValue` when that happens.
|
|
936
|
+
*
|
|
937
|
+
* `data:` is allowed for raster types only. An SVG can carry script, and
|
|
938
|
+
* `data:text/html` is a same-origin document.
|
|
939
|
+
*/
|
|
940
|
+
function safeIconUrl(raw) {
|
|
941
|
+
const url = raw.trim();
|
|
942
|
+
// Control characters are stripped BEFORE the scheme is read: a browser ignores
|
|
943
|
+
// them while resolving, so a check reading the raw string sees a relative path
|
|
944
|
+
// and waves `java\u0000script:` through.
|
|
945
|
+
// eslint-disable-next-line no-control-regex
|
|
946
|
+
const bare = url.replace(/[\s\u0000-\u001f\u007f]/g, '');
|
|
947
|
+
const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(bare);
|
|
948
|
+
// No scheme: a relative path or `//host` — nothing executable.
|
|
949
|
+
if (!scheme)
|
|
950
|
+
return url;
|
|
951
|
+
const name = scheme[1].toLowerCase();
|
|
952
|
+
if (name === 'data')
|
|
953
|
+
return /^data:image\/(?:png|jpe?g|gif|webp|avif);base64,[a-z0-9+/=]+$/i.test(bare) ? bare : null;
|
|
954
|
+
return name === 'http' || name === 'https' ? url : null;
|
|
955
|
+
}
|
|
922
956
|
function overlayIcon(canvas, ctx, options) {
|
|
957
|
+
const src = safeIconUrl(options.iconUrl);
|
|
958
|
+
if (src === null)
|
|
959
|
+
return;
|
|
923
960
|
const iconImg = new Image();
|
|
924
961
|
iconImg.crossOrigin = 'anonymous';
|
|
925
|
-
iconImg.src =
|
|
962
|
+
iconImg.src = src;
|
|
926
963
|
const ratio = canvas.width / options.size;
|
|
927
964
|
const iconPx = (options.iconSize ?? 42) * ratio;
|
|
928
965
|
const coord = canvas.width / 2 - iconPx / 2;
|