ngwr 16.6.0 → 16.7.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/avatar/styles/_index.scss +39 -0
- package/button/styles/_index.scss +45 -2
- package/copy-value/styles/_index.scss +4 -0
- package/dropdown/styles/_index.scss +17 -0
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-animations-aurora.mjs +3 -3
- package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
- package/fesm2022/ngwr-animations-confetti.mjs +3 -3
- package/fesm2022/ngwr-animations-decode.mjs +3 -3
- package/fesm2022/ngwr-animations-destruct.mjs +3 -3
- package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
- package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
- package/fesm2022/ngwr-animations-glitch.mjs +3 -3
- package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
- package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
- package/fesm2022/ngwr-animations-marquee.mjs +4 -3
- package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-animations-orbit.mjs +3 -3
- package/fesm2022/ngwr-animations-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
- package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
- package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-tilt.mjs +3 -3
- package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +171 -6
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-breadcrumbs.mjs +9 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +26 -6
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +5 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +9 -9
- package/fesm2022/ngwr-charts-core.mjs +6 -6
- package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-meter-group.mjs +3 -3
- package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +6 -6
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +7 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-copy-value.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker-testing.mjs +35 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +102 -53
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +40 -16
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +19 -18
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +181 -18
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +18 -18
- package/fesm2022/ngwr-dropdown-testing.mjs +5 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +59 -16
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +6 -5
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +7 -6
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +5 -0
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +68 -13
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +18 -16
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +30 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +100 -11
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +6 -2
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +6 -2
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +6 -2
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +6 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +6 -2
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +6 -2
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +6 -2
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +6 -2
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +6 -2
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +6 -2
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +6 -2
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-kk.mjs +520 -0
- package/fesm2022/ngwr-i18n-kk.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ko.mjs +6 -2
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +6 -2
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +6 -2
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +6 -2
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +6 -2
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +6 -2
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +6 -2
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +6 -2
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +6 -2
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +6 -2
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +6 -2
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +8 -4
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +8 -8
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +8 -8
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +16 -15
- package/fesm2022/ngwr-load-state.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +9 -9
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +3 -0
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +32 -5
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +27 -27
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +7 -6
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +115 -15
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +75 -10
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form.mjs +10 -6
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +232 -7
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select.mjs +28 -19
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +17 -1
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +66 -11
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sortable-list.mjs +11 -11
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-router.mjs +89 -0
- package/fesm2022/ngwr-table-router.mjs.map +1 -0
- package/fesm2022/ngwr-table-testing.mjs +5 -0
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +268 -42
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +9 -5
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +8 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +60 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +15 -15
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +7 -6
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +4 -3
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +30 -2
- 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-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +18 -13
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +16 -0
- package/graph/styles/_index.scss +48 -0
- package/i18n/ar.json +4 -2
- package/i18n/cs.json +4 -2
- package/i18n/de.json +4 -2
- package/i18n/en.json +4 -2
- package/i18n/es.json +4 -2
- package/i18n/fr.json +4 -2
- package/i18n/he.json +4 -2
- package/i18n/hi.json +4 -2
- package/i18n/id.json +4 -2
- package/i18n/it.json +4 -2
- package/i18n/ja.json +4 -2
- package/i18n/kk.json +567 -0
- package/i18n/ko.json +4 -2
- package/i18n/nl.json +4 -2
- package/i18n/pl.json +4 -2
- package/i18n/pt.json +4 -2
- package/i18n/ru.json +4 -2
- package/i18n/sv.json +4 -2
- package/i18n/tr.json +4 -2
- package/i18n/uk.json +4 -2
- package/i18n/vi.json +4 -2
- package/i18n/zh-TW.json +4 -2
- package/i18n/zh.json +4 -2
- package/llms-full.txt +29 -18
- package/llms.txt +4 -1
- package/package.json +15 -7
- package/pagination/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +4 -2
- package/progress/styles/_index.scss +64 -0
- package/schematics/use/symbol-map.json +5 -0
- package/sidebar/styles/_index.scss +58 -6
- package/skills/ngwr/SKILL.md +7 -6
- package/skills/ngwr/references/catalog.md +6 -4
- package/table/styles/_index.scss +121 -32
- package/tabs/styles/_index.scss +9 -0
- package/theme/styles/_focus.scss +3 -1
- package/tour/styles/_index.scss +3 -2
- package/types/ngwr-avatar.d.ts +39 -0
- package/types/ngwr-button.d.ts +12 -0
- package/types/ngwr-date-picker-testing.d.ts +22 -0
- package/types/ngwr-date-picker.d.ts +78 -17
- package/types/ngwr-date.d.ts +51 -0
- package/types/ngwr-directives.d.ts +45 -0
- package/types/ngwr-dropdown-testing.d.ts +8 -1
- package/types/ngwr-dropdown.d.ts +29 -0
- package/types/ngwr-file-upload-testing.d.ts +10 -0
- package/types/ngwr-file-upload.d.ts +55 -1
- package/types/ngwr-form.d.ts +3 -1
- package/types/ngwr-graph-testing.d.ts +28 -1
- package/types/ngwr-graph.d.ts +53 -3
- package/types/ngwr-i18n-kk.d.ts +3 -0
- package/types/ngwr-image-cropper.d.ts +6 -0
- package/types/ngwr-pagination-testing.d.ts +8 -0
- package/types/ngwr-pagination.d.ts +16 -0
- package/types/ngwr-popover.d.ts +39 -0
- package/types/ngwr-progress.d.ts +63 -1
- package/types/ngwr-scroll.d.ts +86 -0
- package/types/ngwr-select.d.ts +31 -12
- package/types/ngwr-sidebar-testing.d.ts +21 -7
- package/types/ngwr-sidebar.d.ts +66 -4
- package/types/ngwr-table-router.d.ts +49 -0
- package/types/ngwr-table-testing.d.ts +7 -0
- package/types/ngwr-table.d.ts +184 -6
- package/types/ngwr-tabs-router.d.ts +1 -1
- package/types/ngwr-tabs-testing.d.ts +5 -1
- package/types/ngwr-tabs.d.ts +34 -1
- package/types/ngwr-utils.d.ts +13 -0
- package/types/ngwr-version.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { DestroyRef, Directive, ElementRef, Injector, NgZone, PLATFORM_ID, afterEveryRender, afterNextRender, effect, inject, input, output, signal } from "@angular/core";
|
|
2
|
+
import { DestroyRef, Directive, ElementRef, Injector, NgZone, PLATFORM_ID, Service, afterEveryRender, afterNextRender, effect, inject, input, output, signal } from "@angular/core";
|
|
3
3
|
import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coercion";
|
|
4
4
|
import { DOCUMENT as DOCUMENT$1, isPlatformBrowser } from "@angular/common";
|
|
5
5
|
import { wrGetFocusableElements, wrRestoreFocus } from "ngwr/utils";
|
|
@@ -27,13 +27,14 @@ var WrAutofocus = class WrAutofocus {
|
|
|
27
27
|
if (!mode) return;
|
|
28
28
|
afterNextRender(() => {
|
|
29
29
|
const host = this.el.nativeElement;
|
|
30
|
-
(
|
|
30
|
+
const reachable = (el) => Number(el.getAttribute("tabindex") ?? 0) >= 0;
|
|
31
|
+
(mode === "first" ? wrGetFocusableElements(host).find(reachable) : host)?.focus();
|
|
31
32
|
}, { injector: this.injector });
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
35
36
|
minVersion: "12.0.0",
|
|
36
|
-
version: "22.
|
|
37
|
+
version: "22.3.0",
|
|
37
38
|
ngImport: i0,
|
|
38
39
|
type: WrAutofocus,
|
|
39
40
|
deps: [],
|
|
@@ -41,7 +42,7 @@ var WrAutofocus = class WrAutofocus {
|
|
|
41
42
|
});
|
|
42
43
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
43
44
|
minVersion: "17.1.0",
|
|
44
|
-
version: "22.
|
|
45
|
+
version: "22.3.0",
|
|
45
46
|
type: WrAutofocus,
|
|
46
47
|
isStandalone: true,
|
|
47
48
|
selector: "[wrAutofocus]",
|
|
@@ -57,7 +58,7 @@ var WrAutofocus = class WrAutofocus {
|
|
|
57
58
|
};
|
|
58
59
|
i0.ɵɵngDeclareClassMetadata({
|
|
59
60
|
minVersion: "12.0.0",
|
|
60
|
-
version: "22.
|
|
61
|
+
version: "22.3.0",
|
|
61
62
|
ngImport: i0,
|
|
62
63
|
type: WrAutofocus,
|
|
63
64
|
decorators: [{
|
|
@@ -126,7 +127,7 @@ var WrAutosize = class WrAutosize {
|
|
|
126
127
|
}
|
|
127
128
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
128
129
|
minVersion: "12.0.0",
|
|
129
|
-
version: "22.
|
|
130
|
+
version: "22.3.0",
|
|
130
131
|
ngImport: i0,
|
|
131
132
|
type: WrAutosize,
|
|
132
133
|
deps: [],
|
|
@@ -134,7 +135,7 @@ var WrAutosize = class WrAutosize {
|
|
|
134
135
|
});
|
|
135
136
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
136
137
|
minVersion: "17.1.0",
|
|
137
|
-
version: "22.
|
|
138
|
+
version: "22.3.0",
|
|
138
139
|
type: WrAutosize,
|
|
139
140
|
isStandalone: true,
|
|
140
141
|
selector: "textarea[wrAutosize]",
|
|
@@ -166,7 +167,7 @@ var WrAutosize = class WrAutosize {
|
|
|
166
167
|
};
|
|
167
168
|
i0.ɵɵngDeclareClassMetadata({
|
|
168
169
|
minVersion: "12.0.0",
|
|
169
|
-
version: "22.
|
|
170
|
+
version: "22.3.0",
|
|
170
171
|
ngImport: i0,
|
|
171
172
|
type: WrAutosize,
|
|
172
173
|
decorators: [{
|
|
@@ -226,7 +227,7 @@ var WrClickOutside = class WrClickOutside {
|
|
|
226
227
|
}
|
|
227
228
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
228
229
|
minVersion: "12.0.0",
|
|
229
|
-
version: "22.
|
|
230
|
+
version: "22.3.0",
|
|
230
231
|
ngImport: i0,
|
|
231
232
|
type: WrClickOutside,
|
|
232
233
|
deps: [],
|
|
@@ -234,7 +235,7 @@ var WrClickOutside = class WrClickOutside {
|
|
|
234
235
|
});
|
|
235
236
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
236
237
|
minVersion: "14.0.0",
|
|
237
|
-
version: "22.
|
|
238
|
+
version: "22.3.0",
|
|
238
239
|
type: WrClickOutside,
|
|
239
240
|
isStandalone: true,
|
|
240
241
|
selector: "[wrClickOutside]",
|
|
@@ -244,7 +245,7 @@ var WrClickOutside = class WrClickOutside {
|
|
|
244
245
|
};
|
|
245
246
|
i0.ɵɵngDeclareClassMetadata({
|
|
246
247
|
minVersion: "12.0.0",
|
|
247
|
-
version: "22.
|
|
248
|
+
version: "22.3.0",
|
|
248
249
|
ngImport: i0,
|
|
249
250
|
type: WrClickOutside,
|
|
250
251
|
decorators: [{
|
|
@@ -353,7 +354,7 @@ var WrCopyToClipboard = class WrCopyToClipboard {
|
|
|
353
354
|
}
|
|
354
355
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
355
356
|
minVersion: "12.0.0",
|
|
356
|
-
version: "22.
|
|
357
|
+
version: "22.3.0",
|
|
357
358
|
ngImport: i0,
|
|
358
359
|
type: WrCopyToClipboard,
|
|
359
360
|
deps: [],
|
|
@@ -361,7 +362,7 @@ var WrCopyToClipboard = class WrCopyToClipboard {
|
|
|
361
362
|
});
|
|
362
363
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
363
364
|
minVersion: "17.1.0",
|
|
364
|
-
version: "22.
|
|
365
|
+
version: "22.3.0",
|
|
365
366
|
type: WrCopyToClipboard,
|
|
366
367
|
isStandalone: true,
|
|
367
368
|
selector: "[wrCopyToClipboard]",
|
|
@@ -403,7 +404,7 @@ var WrCopyToClipboard = class WrCopyToClipboard {
|
|
|
403
404
|
};
|
|
404
405
|
i0.ɵɵngDeclareClassMetadata({
|
|
405
406
|
minVersion: "12.0.0",
|
|
406
|
-
version: "22.
|
|
407
|
+
version: "22.3.0",
|
|
407
408
|
ngImport: i0,
|
|
408
409
|
type: WrCopyToClipboard,
|
|
409
410
|
decorators: [{
|
|
@@ -528,7 +529,7 @@ var WrFitText = class WrFitText {
|
|
|
528
529
|
}
|
|
529
530
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
530
531
|
minVersion: "12.0.0",
|
|
531
|
-
version: "22.
|
|
532
|
+
version: "22.3.0",
|
|
532
533
|
ngImport: i0,
|
|
533
534
|
type: WrFitText,
|
|
534
535
|
deps: [],
|
|
@@ -536,7 +537,7 @@ var WrFitText = class WrFitText {
|
|
|
536
537
|
});
|
|
537
538
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
538
539
|
minVersion: "17.1.0",
|
|
539
|
-
version: "22.
|
|
540
|
+
version: "22.3.0",
|
|
540
541
|
type: WrFitText,
|
|
541
542
|
isStandalone: true,
|
|
542
543
|
selector: "[wrFitText]",
|
|
@@ -552,7 +553,7 @@ var WrFitText = class WrFitText {
|
|
|
552
553
|
};
|
|
553
554
|
i0.ɵɵngDeclareClassMetadata({
|
|
554
555
|
minVersion: "12.0.0",
|
|
555
|
-
version: "22.
|
|
556
|
+
version: "22.3.0",
|
|
556
557
|
ngImport: i0,
|
|
557
558
|
type: WrFitText,
|
|
558
559
|
decorators: [{
|
|
@@ -569,6 +570,168 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
569
570
|
}]
|
|
570
571
|
}] }
|
|
571
572
|
});
|
|
572
|
-
|
|
573
|
+
/**
|
|
574
|
+
* @license
|
|
575
|
+
*
|
|
576
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
577
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
578
|
+
*/
|
|
579
|
+
var WrInViewObserver = class WrInViewObserver {
|
|
580
|
+
pools = /* @__PURE__ */ new Map();
|
|
581
|
+
observe(el, threshold, callback) {
|
|
582
|
+
let pool = this.pools.get(threshold);
|
|
583
|
+
if (!pool) {
|
|
584
|
+
const targets = /* @__PURE__ */ new Map();
|
|
585
|
+
pool = {
|
|
586
|
+
observer: new IntersectionObserver((entries) => {
|
|
587
|
+
for (const entry of entries) {
|
|
588
|
+
const inView = entry.isIntersecting && entry.intersectionRatio >= (threshold >= 1 ? .999 : threshold);
|
|
589
|
+
for (const cb of [...targets.get(entry.target) ?? []]) cb(inView);
|
|
590
|
+
}
|
|
591
|
+
}, { threshold }),
|
|
592
|
+
targets
|
|
593
|
+
};
|
|
594
|
+
this.pools.set(threshold, pool);
|
|
595
|
+
}
|
|
596
|
+
const { observer, targets } = pool;
|
|
597
|
+
let callbacks = targets.get(el);
|
|
598
|
+
if (!callbacks) {
|
|
599
|
+
callbacks = /* @__PURE__ */ new Set();
|
|
600
|
+
targets.set(el, callbacks);
|
|
601
|
+
observer.observe(el);
|
|
602
|
+
}
|
|
603
|
+
callbacks.add(callback);
|
|
604
|
+
return () => {
|
|
605
|
+
const set = targets.get(el);
|
|
606
|
+
if (!set?.delete(callback) || set.size) return;
|
|
607
|
+
targets.delete(el);
|
|
608
|
+
observer.unobserve(el);
|
|
609
|
+
if (!targets.size) {
|
|
610
|
+
observer.disconnect();
|
|
611
|
+
if (this.pools.get(threshold) === pool) this.pools.delete(threshold);
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
616
|
+
minVersion: "12.0.0",
|
|
617
|
+
version: "22.3.0",
|
|
618
|
+
ngImport: i0,
|
|
619
|
+
type: WrInViewObserver,
|
|
620
|
+
deps: [],
|
|
621
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
622
|
+
});
|
|
623
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
624
|
+
minVersion: "22.0.0",
|
|
625
|
+
version: "22.3.0",
|
|
626
|
+
ngImport: i0,
|
|
627
|
+
type: WrInViewObserver
|
|
628
|
+
});
|
|
629
|
+
};
|
|
630
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
631
|
+
minVersion: "12.0.0",
|
|
632
|
+
version: "22.3.0",
|
|
633
|
+
ngImport: i0,
|
|
634
|
+
type: WrInViewObserver,
|
|
635
|
+
decorators: [{ type: Service }]
|
|
636
|
+
});
|
|
637
|
+
var WrInView = class WrInView {
|
|
638
|
+
wrInView = output();
|
|
639
|
+
wrInViewThreshold = input(0, {
|
|
640
|
+
...ngDevMode ? { debugName: "wrInViewThreshold" } : /* istanbul ignore next */ {},
|
|
641
|
+
transform: (value) => Math.min(1, Math.max(0, coerceNumberProperty(value, 0)))
|
|
642
|
+
});
|
|
643
|
+
wrInViewOnce = input(false, {
|
|
644
|
+
...ngDevMode ? { debugName: "wrInViewOnce" } : /* istanbul ignore next */ {},
|
|
645
|
+
transform: coerceBooleanProperty
|
|
646
|
+
});
|
|
647
|
+
el = inject(ElementRef);
|
|
648
|
+
pool = inject(WrInViewObserver);
|
|
649
|
+
constructor() {
|
|
650
|
+
const destroyRef = inject(DestroyRef);
|
|
651
|
+
afterNextRender(() => {
|
|
652
|
+
if (typeof IntersectionObserver === "undefined") return;
|
|
653
|
+
let stop = null;
|
|
654
|
+
const unwatch = () => {
|
|
655
|
+
stop?.();
|
|
656
|
+
stop = null;
|
|
657
|
+
};
|
|
658
|
+
let last = false;
|
|
659
|
+
stop = this.pool.observe(this.el.nativeElement, this.wrInViewThreshold(), (inView) => {
|
|
660
|
+
if (inView === last) return;
|
|
661
|
+
last = inView;
|
|
662
|
+
this.wrInView.emit(inView);
|
|
663
|
+
if (inView && this.wrInViewOnce()) unwatch();
|
|
664
|
+
});
|
|
665
|
+
destroyRef.onDestroy(unwatch);
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
669
|
+
minVersion: "12.0.0",
|
|
670
|
+
version: "22.3.0",
|
|
671
|
+
ngImport: i0,
|
|
672
|
+
type: WrInView,
|
|
673
|
+
deps: [],
|
|
674
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
675
|
+
});
|
|
676
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
677
|
+
minVersion: "17.1.0",
|
|
678
|
+
version: "22.3.0",
|
|
679
|
+
type: WrInView,
|
|
680
|
+
isStandalone: true,
|
|
681
|
+
selector: "[wrInView]",
|
|
682
|
+
inputs: {
|
|
683
|
+
wrInViewThreshold: {
|
|
684
|
+
classPropertyName: "wrInViewThreshold",
|
|
685
|
+
publicName: "wrInViewThreshold",
|
|
686
|
+
isSignal: true,
|
|
687
|
+
isRequired: false,
|
|
688
|
+
transformFunction: null
|
|
689
|
+
},
|
|
690
|
+
wrInViewOnce: {
|
|
691
|
+
classPropertyName: "wrInViewOnce",
|
|
692
|
+
publicName: "wrInViewOnce",
|
|
693
|
+
isSignal: true,
|
|
694
|
+
isRequired: false,
|
|
695
|
+
transformFunction: null
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
outputs: { wrInView: "wrInView" },
|
|
699
|
+
ngImport: i0
|
|
700
|
+
});
|
|
701
|
+
};
|
|
702
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
703
|
+
minVersion: "12.0.0",
|
|
704
|
+
version: "22.3.0",
|
|
705
|
+
ngImport: i0,
|
|
706
|
+
type: WrInView,
|
|
707
|
+
decorators: [{
|
|
708
|
+
type: Directive,
|
|
709
|
+
args: [{ selector: "[wrInView]" }]
|
|
710
|
+
}],
|
|
711
|
+
ctorParameters: () => [],
|
|
712
|
+
propDecorators: {
|
|
713
|
+
wrInView: [{
|
|
714
|
+
type: i0.Output,
|
|
715
|
+
args: ["wrInView"]
|
|
716
|
+
}],
|
|
717
|
+
wrInViewThreshold: [{
|
|
718
|
+
type: i0.Input,
|
|
719
|
+
args: [{
|
|
720
|
+
isSignal: true,
|
|
721
|
+
alias: "wrInViewThreshold",
|
|
722
|
+
required: false
|
|
723
|
+
}]
|
|
724
|
+
}],
|
|
725
|
+
wrInViewOnce: [{
|
|
726
|
+
type: i0.Input,
|
|
727
|
+
args: [{
|
|
728
|
+
isSignal: true,
|
|
729
|
+
alias: "wrInViewOnce",
|
|
730
|
+
required: false
|
|
731
|
+
}]
|
|
732
|
+
}]
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
export { WrAutofocus, WrAutosize, WrClickOutside, WrCopyToClipboard, WrFitText, WrInView };
|
|
573
736
|
|
|
574
737
|
//# sourceMappingURL=ngwr-directives.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-directives.mjs","names":["DOCUMENT","DOCUMENT"],"sources":["../../../projects/lib/directives/autofocus.ts","../../../projects/lib/directives/autosize.ts","../../../projects/lib/directives/click-outside.ts","../../../projects/lib/directives/copy-to-clipboard.ts","../../../projects/lib/directives/fit-text.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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, Injector, afterNextRender, effect, inject, input } from '@angular/core';\n\nimport { wrGetFocusableElements } from 'ngwr/utils';\n\n/**\n * Focus the host element after the first render, or whenever the bound\n * expression turns truthy. `\"first\"` focuses the first focusable element\n * inside the host instead: the control of a form, a card or a dialog body.\n * Disabled and hidden elements are skipped.\n *\n * @example\n * ```html\n * <input wrAutofocus />\n * <input [wrAutofocus]=\"shouldFocus()\" />\n * <form wrAutofocus=\"first\">…</form>\n * <form [wrAutofocus]=\"editing() && 'first'\">…</form>\n * ```\n */\n@Directive({ selector: '[wrAutofocus]' })\nexport class WrAutofocus {\n /**\n * Truthy = focus the host, `'first'` = focus the first focusable element\n * inside it. Defaults to `true` so bare `wrAutofocus` works.\n */\n readonly wrAutofocus = input(true, {\n transform: (value: unknown): boolean | 'first' => (value === 'first' ? value : coerceBooleanProperty(value)),\n });\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n constructor() {\n effect(() => {\n const mode = this.wrAutofocus();\n if (!mode) return;\n // After the render, so what the same change drew is there to take focus.\n afterNextRender(\n () => {\n const host = this.el.nativeElement;\n (mode === 'first' ? wrGetFocusableElements(host)[0] : host)?.focus();\n },\n { injector: this.injector }\n );\n });\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 { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, PLATFORM_ID, afterEveryRender, effect, inject, input } from '@angular/core';\n\n/**\n * Auto-grow a `<textarea>` to fit its content. Optional `minRows` /\n * `maxRows` bounds the height in rendered rows.\n *\n * @example\n * ```html\n * <textarea wrAutosize minRows=\"2\" maxRows=\"8\" [(ngModel)]=\"text\"></textarea>\n * ```\n */\n@Directive({\n selector: 'textarea[wrAutosize]',\n // Bound rather than a static `style` attribute: a real attribute is refused\n // under `style-src 'self'`, and the textarea then keeps the native resize\n // grip, which fights the directive's own height management.\n host: { '[style.overflow]': \"'hidden'\", '[style.resize]': \"'none'\", '(input)': 'onInput()' },\n})\nexport class WrAutosize {\n /**\n * Smallest height, in rendered rows. The textarea never shrinks below it,\n * so a field that starts empty still reserves the room.\n */\n readonly minRows = input(1, { transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 1)) });\n /**\n * Largest height, in rendered rows. `0` — the default — lets it grow without\n * a ceiling; any other value caps the height and the textarea scrolls past it.\n */\n readonly maxRows = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n private readonly el = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private lastValue: string | null = null;\n\n constructor() {\n // Typing fires `input`, but `[(ngModel)]` / `setValue` write the value\n // without one — a cheap per-render value check catches both, including\n // the initial write that lands after the first render.\n afterEveryRender(() => {\n const value = this.el.nativeElement.value;\n if (value !== this.lastValue) {\n this.lastValue = value;\n this.resize();\n }\n });\n // Resize when `minRows` / `maxRows` change. Read the inputs before the\n // platform check so the effect still tracks them; the measurement itself\n // needs a real layout, which the server has none of (`afterEveryRender`\n // above is browser-only already, so it needs no guard).\n effect(() => {\n this.minRows();\n this.maxRows();\n if (!this.isBrowser) return;\n this.resize();\n });\n }\n\n /** @internal */\n protected onInput(): void {\n this.lastValue = this.el.nativeElement.value;\n this.resize();\n }\n\n /** Recompute height from `scrollHeight`, clamped to min/max rows. */\n private resize(): void {\n const node = this.el.nativeElement;\n const styles = getComputedStyle(node);\n // `line-height: normal` computes to the literal string — derive the\n // row height from the font size instead of guessing a fixed 20px.\n const lineHeight = parseFloat(styles.lineHeight) || parseFloat(styles.fontSize) * 1.25 || 20;\n const paddingY = parseFloat(styles.paddingTop) + parseFloat(styles.paddingBottom);\n const border = (parseFloat(styles.borderTopWidth) || 0) + (parseFloat(styles.borderBottomWidth) || 0);\n\n // Reset to a single row first so `scrollHeight` shrinks as well as grows.\n node.style.height = 'auto';\n const min = this.minRows() * lineHeight + paddingY + border;\n const max = this.maxRows() > 0 ? this.maxRows() * lineHeight + paddingY + border : Infinity;\n const next = Math.min(Math.max(node.scrollHeight + border, min), max);\n node.style.height = `${next}px`;\n node.style.overflowY = node.scrollHeight + border > max ? 'auto' : 'hidden';\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 { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, NgZone, inject, output } from '@angular/core';\n\n/**\n * Fires `(wrClickOutside)` when a pointer event lands outside the host\n * element. Useful for closing custom poppers / menus.\n *\n * @example\n * ```html\n * <div class=\"popup\" (wrClickOutside)=\"close()\"> … </div>\n * ```\n */\n@Directive({ selector: '[wrClickOutside]' })\nexport class WrClickOutside {\n /**\n * Fires on a pointer press that landed outside the host element. Close a\n * menu or commit an inline edit with it; the event is the original click.\n */\n readonly wrClickOutside = output<MouseEvent>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly doc = inject(DOCUMENT);\n private readonly zone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n // Listen outside Angular to avoid CD on every page click; re-enter\n // only when the event lands outside the host.\n this.zone.runOutsideAngular(() => {\n const handler = (event: MouseEvent): void => {\n const target = event.target as Node | null;\n if (target && !this.host.nativeElement.contains(target)) {\n this.zone.run(() => this.wrClickOutside.emit(event));\n }\n };\n this.doc.addEventListener('mousedown', handler, true);\n this.destroyRef.onDestroy(() => {\n this.doc.removeEventListener('mousedown', handler, true);\n });\n });\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 { FocusMonitor, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, Injector, inject, input, output, signal } from '@angular/core';\n\nimport { WR_COPIED_DURATION } from 'ngwr/clipboard';\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrPopover, wrUseTextTooltip } from 'ngwr/popover';\nimport { WrToast } from 'ngwr/toast';\nimport { wrRestoreFocus } from 'ngwr/utils';\n\n/**\n * Copy `wrCopyToClipboard` to the system clipboard on host click.\n *\n * Uses `navigator.clipboard.writeText` when available, with a hidden\n * `<textarea>` + `document.execCommand('copy')` fallback for older browsers\n * and non-secure contexts.\n *\n * After a successful copy the host carries `wr-copy-to-clipboard--copied` for\n * a moment, a tooltip over it reads \"Copied\" and the same text is announced\n * politely. `wrCopyToClipboardToast` shows a toast instead of the tooltip and\n * the announcement. A refused write changes nothing and emits `copyFailed`.\n *\n * @example\n * ```html\n * <button [wrCopyToClipboard]=\"value\">Copy</button>\n * <button [wrCopyToClipboard]=\"rows\" wrCopyToClipboardToast copiedLabel=\"Copied to clipboard\">Copy all</button>\n * ```\n */\n@Directive({\n selector: '[wrCopyToClipboard]',\n exportAs: 'wrCopyToClipboard',\n host: {\n class: 'wr-copy-to-clipboard',\n '[class.wr-copy-to-clipboard--copied]': 'justCopied()',\n '(click)': 'copy()',\n },\n})\nexport class WrCopyToClipboard {\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.destroyed = true;\n this.clearTimer();\n });\n }\n\n /** The text to copy. */\n readonly wrCopyToClipboard = input.required<string>();\n\n /**\n * Confirm a copy with a toast instead of the tooltip and the announcement.\n *\n * @default false\n */\n readonly wrCopyToClipboardToast = input(false, { transform: coerceBooleanProperty });\n\n /** Text of the tooltip, the announcement and the toast. Falls back to `copyToClipboard.copied`, then `'Copied'`. */\n readonly copiedLabel = input<string | null>(null);\n\n /** Emitted with the copied text once the write succeeds. */\n readonly copied = output<string>();\n\n /** Emitted if the copy fails (denied permission, no clipboard, …). */\n readonly copyFailed = output<unknown>();\n\n /** True for a moment after a successful copy. */\n protected readonly justCopied = signal(false);\n\n private readonly resolvedCopiedLabel = useI18nText(this.copiedLabel, 'copyToClipboard.copied', 'Copied');\n\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly doc = inject(DOCUMENT);\n private readonly injector = inject(Injector);\n private readonly tooltip = wrUseTextTooltip();\n private readonly hostPopover = inject(WrPopover, { self: true, optional: true });\n private destroyed = false;\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * Copies the bound text, as a click does: `(copied)` or `(copyFailed)` fires\n * either way. Resolves `true` once the text is on the clipboard and `false`\n * when neither path could write it. It never rejects.\n */\n async copy(): Promise<boolean> {\n const text = this.wrCopyToClipboard();\n const async = this.doc.defaultView?.navigator?.clipboard;\n\n try {\n if (async) {\n try {\n await async.writeText(text);\n } catch {\n // The legacy path is a RECOVERY from the async one, so it only runs\n // when there was an async attempt to recover from. Reached from the\n // fallback's own failure it just repeated the same refused write —\n // two selections and two focus jumps for one press.\n this.fallback(text);\n }\n } else {\n this.fallback(text);\n }\n } catch (error) {\n this.copyFailed.emit(error);\n return false;\n }\n\n // Outside the try because the try's job is the WRITE. The shape this\n // replaced emitted inside it and recovered by calling `fallback` again, so\n // one refused write became two selections, two focus jumps and two `copied`\n // emissions. (A consumer's own `(copied)` handler cannot reach this frame\n // either way: `OutputEmitterRef.emit` catches what a listener throws and\n // hands it to the `ErrorHandler`.)\n // An output refuses to emit once its directive is gone.\n if (this.destroyed) return true;\n this.confirm();\n this.copied.emit(text);\n return true;\n }\n\n private confirm(): void {\n const label = this.resolvedCopiedLabel();\n this.clearTimer();\n this.justCopied.set(true);\n\n if (this.wrCopyToClipboardToast()) {\n this.injector.get(WrToast).show({ type: 'success', message: label, showCopy: false });\n } else {\n // The host's own hover tooltip would sit under this one, in the same place.\n if (this.hostPopover?.mode() === 'tooltip') this.hostPopover.close();\n this.tooltip.show(label);\n void this.injector.get(LiveAnnouncer).announce(label, 'polite', WR_COPIED_DURATION);\n }\n\n this.timer = setTimeout(() => {\n this.justCopied.set(false);\n this.tooltip.hide();\n }, WR_COPIED_DURATION);\n }\n\n private clearTimer(): void {\n if (this.timer !== null) clearTimeout(this.timer);\n this.timer = null;\n }\n\n /**\n * Legacy clipboard write — hidden textarea + `execCommand('copy')`.\n *\n * Two things this has to get right beyond writing the text. `execCommand`\n * REPORTS refusal rather than throwing it: a document without focus hands back\n * `false` and copies nothing, so ignoring the return value shows a \"Copied!\"\n * toast over an unchanged clipboard. And selecting the textarea moves focus\n * into it, so removing the node afterwards drops focus on `<body>` — the user's\n * next Tab restarts from the top of the page, on every copy.\n */\n private fallback(text: string): void {\n const node = this.doc.createElement('textarea');\n node.value = text;\n node.setAttribute('readonly', '');\n node.style.position = 'fixed';\n node.style.top = '0';\n node.style.left = '0';\n node.style.opacity = '0';\n node.style.pointerEvents = 'none';\n\n const previous = this.doc.activeElement;\n this.doc.body.appendChild(node);\n node.select();\n\n try {\n if (!this.doc.execCommand('copy')) throw new Error('The copy command was refused.');\n } finally {\n this.doc.body.removeChild(node);\n if (previous instanceof HTMLElement) wrRestoreFocus(previous, this.focusMonitor);\n }\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DestroyRef, Directive, ElementRef, afterNextRender, effect, inject, input } from '@angular/core';\n\n/**\n * Shrink a block whose text wraps to the width of its longest line.\n *\n * A wrapped block keeps the width it was offered, so a tinted pill with three\n * lines of text carries an empty band of background beside them, and CSS has\n * no way to take it back. The lines are measured and the host's inline `width`\n * is set to the widest one, padding and border included as its `box-sizing`\n * needs. Every line already fits that width, so the line breaks stay where\n * they were. It is measured again when the text changes and when the parent is\n * resized; a block on one line is left alone.\n *\n * The host needs a box that takes a width (block, inline-block, a flex or grid\n * item) and holds text and inline content.\n *\n * @example\n * ```html\n * <wr-tag wrFitText>A label long enough to wrap onto a second line</wr-tag>\n * <p [wrFitText]=\"fit()\">…</p>\n * ```\n */\n@Directive({ selector: '[wrFitText]' })\nexport class WrFitText {\n /** `false` switches the fitting off and removes the width it wrote. Bare `wrFitText` is on. */\n readonly wrFitText = input(true, { transform: coerceBooleanProperty });\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private frame = 0;\n private started = false;\n /** The width this directive wrote, so switching off removes that and nothing else. */\n private written = '';\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n\n afterNextRender(() => {\n const host = this.el.nativeElement;\n // The parent's height follows the host's, and in a shrink-to-fit parent so\n // does its width: only a new inline size can move a line break.\n let offered = -1;\n const resize =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(([entry]) => {\n if (entry.contentRect.width === offered) return;\n offered = entry.contentRect.width;\n this.schedule();\n });\n const text = new MutationObserver(() => this.schedule());\n\n if (host.parentElement) resize?.observe(host.parentElement);\n // No `attributes`: the width written below must not call the measure back.\n text.observe(host, { characterData: true, childList: true, subtree: true });\n\n this.started = true;\n this.fit();\n\n destroyRef.onDestroy(() => {\n cancelAnimationFrame(this.frame);\n resize?.disconnect();\n text.disconnect();\n });\n });\n\n effect(() => {\n this.wrFitText();\n if (this.started) this.schedule();\n });\n }\n\n private schedule(): void {\n cancelAnimationFrame(this.frame);\n this.frame = requestAnimationFrame(() => this.fit());\n }\n\n private fit(): void {\n const host = this.el.nativeElement;\n\n if (!this.wrFitText()) {\n if (this.written && host.style.width === this.written) host.style.width = '';\n this.written = '';\n return;\n }\n\n // Cleared first, so a parent that grew can take words back onto a line.\n host.style.width = '';\n this.written = '';\n\n const range = host.ownerDocument.createRange();\n range.selectNodeContents(host);\n const rects = Array.from(range.getClientRects()).filter(rect => rect.width > 0);\n if (!rects.length) return;\n\n // Inline children give several rects to one line, so a count says nothing.\n const firstLineEnd = rects[0].bottom;\n if (!rects.some(rect => rect.top >= firstLineEnd)) return;\n\n const start = Math.min(...rects.map(rect => rect.left));\n const end = Math.max(...rects.map(rect => rect.right));\n const style = getComputedStyle(host);\n const px = (value: string): number => parseFloat(value) || 0;\n const box =\n style.boxSizing === 'border-box'\n ? px(style.paddingLeft) + px(style.paddingRight) + px(style.borderLeftWidth) + px(style.borderRightWidth)\n : 0;\n\n // One pixel over: at the exact width, subpixel rounding wraps the longest line again.\n this.written = `${Math.ceil(end - start + box) + 1}px`;\n host.style.width = this.written;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,IAAa,cAAb,MAAa,YAAW;CAKb,cAAc,MAAM,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAC/B,YAAY,UAAuC,UAAU,UAAU,QAAQ,sBAAsB,KAAK;CAAE,CAAA;CAG7F,KAAK,OAAgC,UAAU;CAC/C,WAAW,OAAO,QAAQ;CAE3C,cAAA;EACE,aAAY;GACV,MAAM,OAAO,KAAK,YAAW;GAC7B,IAAI,CAAC,MAAM;GAEX,sBACO;IACH,MAAM,OAAO,KAAK,GAAG;IACrB,CAAC,SAAS,UAAU,uBAAuB,IAAI,CAAC,CAAC,KAAK,KAAA,EAAO,MAAK;GACpE,GACA,EAAE,UAAU,KAAK,SAAQ,CAAE;EAE/B,CAAC;CACH;CAzBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAW,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAX,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAW,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,aAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,UAAA;CAAA,CAAA;;AAAX,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EADvB,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,gBAAe,CAAE;;;;;;;;;;;;;;;;;;ACCxC,IAAa,aAAb,MAAa,WAAU;CAKZ,U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AA,EAAE,UAAU,cAAa,CAAE"}
|
|
1
|
+
{"version":3,"file":"ngwr-directives.mjs","names":["DOCUMENT","DOCUMENT"],"sources":["../../../projects/lib/directives/autofocus.ts","../../../projects/lib/directives/autosize.ts","../../../projects/lib/directives/click-outside.ts","../../../projects/lib/directives/copy-to-clipboard.ts","../../../projects/lib/directives/fit-text.ts","../../../projects/lib/directives/in-view.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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, Injector, afterNextRender, effect, inject, input } from '@angular/core';\n\nimport { wrGetFocusableElements } from 'ngwr/utils';\n\n/**\n * Focus the host element after the first render, or whenever the bound\n * expression turns truthy. `\"first\"` focuses the first focusable element\n * inside the host instead: the control of a form, a card or a dialog body.\n * Disabled and hidden elements are skipped.\n *\n * @example\n * ```html\n * <input wrAutofocus />\n * <input [wrAutofocus]=\"shouldFocus()\" />\n * <form wrAutofocus=\"first\">…</form>\n * <form [wrAutofocus]=\"editing() && 'first'\">…</form>\n * ```\n */\n@Directive({ selector: '[wrAutofocus]' })\nexport class WrAutofocus {\n /**\n * Truthy = focus the host, `'first'` = focus the first focusable element\n * inside it. Defaults to `true` so bare `wrAutofocus` works.\n */\n readonly wrAutofocus = input(true, {\n transform: (value: unknown): boolean | 'first' => (value === 'first' ? value : coerceBooleanProperty(value)),\n });\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n constructor() {\n effect(() => {\n const mode = this.wrAutofocus();\n if (!mode) return;\n // After the render, so what the same change drew is there to take focus.\n afterNextRender(\n () => {\n const host = this.el.nativeElement;\n // An explicit negative `tabindex` takes an element out of the Tab order;\n // an editing host with none still reads `tabIndex` -1 and stays eligible.\n const reachable = (el: HTMLElement): boolean => Number(el.getAttribute('tabindex') ?? 0) >= 0;\n (mode === 'first' ? wrGetFocusableElements(host).find(reachable) : host)?.focus();\n },\n { injector: this.injector }\n );\n });\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 { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, PLATFORM_ID, afterEveryRender, effect, inject, input } from '@angular/core';\n\n/**\n * Auto-grow a `<textarea>` to fit its content. Optional `minRows` /\n * `maxRows` bounds the height in rendered rows.\n *\n * @example\n * ```html\n * <textarea wrAutosize minRows=\"2\" maxRows=\"8\" [(ngModel)]=\"text\"></textarea>\n * ```\n */\n@Directive({\n selector: 'textarea[wrAutosize]',\n // Bound rather than a static `style` attribute: a real attribute is refused\n // under `style-src 'self'`, and the textarea then keeps the native resize\n // grip, which fights the directive's own height management.\n host: { '[style.overflow]': \"'hidden'\", '[style.resize]': \"'none'\", '(input)': 'onInput()' },\n})\nexport class WrAutosize {\n /**\n * Smallest height, in rendered rows. The textarea never shrinks below it,\n * so a field that starts empty still reserves the room.\n */\n readonly minRows = input(1, { transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 1)) });\n /**\n * Largest height, in rendered rows. `0` — the default — lets it grow without\n * a ceiling; any other value caps the height and the textarea scrolls past it.\n */\n readonly maxRows = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n private readonly el = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private lastValue: string | null = null;\n\n constructor() {\n // Typing fires `input`, but `[(ngModel)]` / `setValue` write the value\n // without one — a cheap per-render value check catches both, including\n // the initial write that lands after the first render.\n afterEveryRender(() => {\n const value = this.el.nativeElement.value;\n if (value !== this.lastValue) {\n this.lastValue = value;\n this.resize();\n }\n });\n // Resize when `minRows` / `maxRows` change. Read the inputs before the\n // platform check so the effect still tracks them; the measurement itself\n // needs a real layout, which the server has none of (`afterEveryRender`\n // above is browser-only already, so it needs no guard).\n effect(() => {\n this.minRows();\n this.maxRows();\n if (!this.isBrowser) return;\n this.resize();\n });\n }\n\n /** @internal */\n protected onInput(): void {\n this.lastValue = this.el.nativeElement.value;\n this.resize();\n }\n\n /** Recompute height from `scrollHeight`, clamped to min/max rows. */\n private resize(): void {\n const node = this.el.nativeElement;\n const styles = getComputedStyle(node);\n // `line-height: normal` computes to the literal string — derive the\n // row height from the font size instead of guessing a fixed 20px.\n const lineHeight = parseFloat(styles.lineHeight) || parseFloat(styles.fontSize) * 1.25 || 20;\n const paddingY = parseFloat(styles.paddingTop) + parseFloat(styles.paddingBottom);\n const border = (parseFloat(styles.borderTopWidth) || 0) + (parseFloat(styles.borderBottomWidth) || 0);\n\n // Reset to a single row first so `scrollHeight` shrinks as well as grows.\n node.style.height = 'auto';\n const min = this.minRows() * lineHeight + paddingY + border;\n const max = this.maxRows() > 0 ? this.maxRows() * lineHeight + paddingY + border : Infinity;\n const next = Math.min(Math.max(node.scrollHeight + border, min), max);\n node.style.height = `${next}px`;\n node.style.overflowY = node.scrollHeight + border > max ? 'auto' : 'hidden';\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 { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, NgZone, inject, output } from '@angular/core';\n\n/**\n * Fires `(wrClickOutside)` when a pointer event lands outside the host\n * element. Useful for closing custom poppers / menus.\n *\n * @example\n * ```html\n * <div class=\"popup\" (wrClickOutside)=\"close()\"> … </div>\n * ```\n */\n@Directive({ selector: '[wrClickOutside]' })\nexport class WrClickOutside {\n /**\n * Fires on a pointer press that landed outside the host element. Close a\n * menu or commit an inline edit with it; the event is the original click.\n */\n readonly wrClickOutside = output<MouseEvent>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly doc = inject(DOCUMENT);\n private readonly zone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n // Listen outside Angular to avoid CD on every page click; re-enter\n // only when the event lands outside the host.\n this.zone.runOutsideAngular(() => {\n const handler = (event: MouseEvent): void => {\n const target = event.target as Node | null;\n if (target && !this.host.nativeElement.contains(target)) {\n this.zone.run(() => this.wrClickOutside.emit(event));\n }\n };\n this.doc.addEventListener('mousedown', handler, true);\n this.destroyRef.onDestroy(() => {\n this.doc.removeEventListener('mousedown', handler, true);\n });\n });\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 { FocusMonitor, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, Injector, inject, input, output, signal } from '@angular/core';\n\nimport { WR_COPIED_DURATION } from 'ngwr/clipboard';\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrPopover, wrUseTextTooltip } from 'ngwr/popover';\nimport { WrToast } from 'ngwr/toast';\nimport { wrRestoreFocus } from 'ngwr/utils';\n\n/**\n * Copy `wrCopyToClipboard` to the system clipboard on host click.\n *\n * Uses `navigator.clipboard.writeText` when available, with a hidden\n * `<textarea>` + `document.execCommand('copy')` fallback for older browsers\n * and non-secure contexts.\n *\n * After a successful copy the host carries `wr-copy-to-clipboard--copied` for\n * a moment, a tooltip over it reads \"Copied\" and the same text is announced\n * politely. `wrCopyToClipboardToast` shows a toast instead of the tooltip and\n * the announcement. A refused write changes nothing and emits `copyFailed`.\n *\n * @example\n * ```html\n * <button [wrCopyToClipboard]=\"value\">Copy</button>\n * <button [wrCopyToClipboard]=\"rows\" wrCopyToClipboardToast copiedLabel=\"Copied to clipboard\">Copy all</button>\n * ```\n */\n@Directive({\n selector: '[wrCopyToClipboard]',\n exportAs: 'wrCopyToClipboard',\n host: {\n class: 'wr-copy-to-clipboard',\n '[class.wr-copy-to-clipboard--copied]': 'justCopied()',\n '(click)': 'copy()',\n },\n})\nexport class WrCopyToClipboard {\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.destroyed = true;\n this.clearTimer();\n });\n }\n\n /** The text to copy. */\n readonly wrCopyToClipboard = input.required<string>();\n\n /**\n * Confirm a copy with a toast instead of the tooltip and the announcement.\n *\n * @default false\n */\n readonly wrCopyToClipboardToast = input(false, { transform: coerceBooleanProperty });\n\n /** Text of the tooltip, the announcement and the toast. Falls back to `copyToClipboard.copied`, then `'Copied'`. */\n readonly copiedLabel = input<string | null>(null);\n\n /** Emitted with the copied text once the write succeeds. */\n readonly copied = output<string>();\n\n /** Emitted if the copy fails (denied permission, no clipboard, …). */\n readonly copyFailed = output<unknown>();\n\n /** True for a moment after a successful copy. */\n protected readonly justCopied = signal(false);\n\n private readonly resolvedCopiedLabel = useI18nText(this.copiedLabel, 'copyToClipboard.copied', 'Copied');\n\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly doc = inject(DOCUMENT);\n private readonly injector = inject(Injector);\n private readonly tooltip = wrUseTextTooltip();\n private readonly hostPopover = inject(WrPopover, { self: true, optional: true });\n private destroyed = false;\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * Copies the bound text, as a click does: `(copied)` or `(copyFailed)` fires\n * either way. Resolves `true` once the text is on the clipboard and `false`\n * when neither path could write it. It never rejects.\n */\n async copy(): Promise<boolean> {\n const text = this.wrCopyToClipboard();\n const async = this.doc.defaultView?.navigator?.clipboard;\n\n try {\n if (async) {\n try {\n await async.writeText(text);\n } catch {\n // The legacy path is a RECOVERY from the async one, so it only runs\n // when there was an async attempt to recover from. Reached from the\n // fallback's own failure it just repeated the same refused write —\n // two selections and two focus jumps for one press.\n this.fallback(text);\n }\n } else {\n this.fallback(text);\n }\n } catch (error) {\n this.copyFailed.emit(error);\n return false;\n }\n\n // Outside the try because the try's job is the WRITE. The shape this\n // replaced emitted inside it and recovered by calling `fallback` again, so\n // one refused write became two selections, two focus jumps and two `copied`\n // emissions. (A consumer's own `(copied)` handler cannot reach this frame\n // either way: `OutputEmitterRef.emit` catches what a listener throws and\n // hands it to the `ErrorHandler`.)\n // An output refuses to emit once its directive is gone.\n if (this.destroyed) return true;\n this.confirm();\n this.copied.emit(text);\n return true;\n }\n\n private confirm(): void {\n const label = this.resolvedCopiedLabel();\n this.clearTimer();\n this.justCopied.set(true);\n\n if (this.wrCopyToClipboardToast()) {\n this.injector.get(WrToast).show({ type: 'success', message: label, showCopy: false });\n } else {\n // The host's own hover tooltip would sit under this one, in the same place.\n if (this.hostPopover?.mode() === 'tooltip') this.hostPopover.close();\n this.tooltip.show(label);\n void this.injector.get(LiveAnnouncer).announce(label, 'polite', WR_COPIED_DURATION);\n }\n\n this.timer = setTimeout(() => {\n this.justCopied.set(false);\n this.tooltip.hide();\n }, WR_COPIED_DURATION);\n }\n\n private clearTimer(): void {\n if (this.timer !== null) clearTimeout(this.timer);\n this.timer = null;\n }\n\n /**\n * Legacy clipboard write — hidden textarea + `execCommand('copy')`.\n *\n * Two things this has to get right beyond writing the text. `execCommand`\n * REPORTS refusal rather than throwing it: a document without focus hands back\n * `false` and copies nothing, so ignoring the return value shows a \"Copied!\"\n * toast over an unchanged clipboard. And selecting the textarea moves focus\n * into it, so removing the node afterwards drops focus on `<body>` — the user's\n * next Tab restarts from the top of the page, on every copy.\n */\n private fallback(text: string): void {\n const node = this.doc.createElement('textarea');\n node.value = text;\n node.setAttribute('readonly', '');\n node.style.position = 'fixed';\n node.style.top = '0';\n node.style.left = '0';\n node.style.opacity = '0';\n node.style.pointerEvents = 'none';\n\n const previous = this.doc.activeElement;\n this.doc.body.appendChild(node);\n node.select();\n\n try {\n if (!this.doc.execCommand('copy')) throw new Error('The copy command was refused.');\n } finally {\n this.doc.body.removeChild(node);\n if (previous instanceof HTMLElement) wrRestoreFocus(previous, this.focusMonitor);\n }\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DestroyRef, Directive, ElementRef, afterNextRender, effect, inject, input } from '@angular/core';\n\n/**\n * Shrink a block whose text wraps to the width of its longest line.\n *\n * A wrapped block keeps the width it was offered, so a tinted pill with three\n * lines of text carries an empty band of background beside them, and CSS has\n * no way to take it back. The lines are measured and the host's inline `width`\n * is set to the widest one, padding and border included as its `box-sizing`\n * needs. Every line already fits that width, so the line breaks stay where\n * they were. It is measured again when the text changes and when the parent is\n * resized; a block on one line is left alone.\n *\n * The host needs a box that takes a width (block, inline-block, a flex or grid\n * item) and holds text and inline content.\n *\n * @example\n * ```html\n * <wr-tag wrFitText>A label long enough to wrap onto a second line</wr-tag>\n * <p [wrFitText]=\"fit()\">…</p>\n * ```\n */\n@Directive({ selector: '[wrFitText]' })\nexport class WrFitText {\n /** `false` switches the fitting off and removes the width it wrote. Bare `wrFitText` is on. */\n readonly wrFitText = input(true, { transform: coerceBooleanProperty });\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private frame = 0;\n private started = false;\n /** The width this directive wrote, so switching off removes that and nothing else. */\n private written = '';\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n\n afterNextRender(() => {\n const host = this.el.nativeElement;\n // The parent's height follows the host's, and in a shrink-to-fit parent so\n // does its width: only a new inline size can move a line break.\n let offered = -1;\n const resize =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(([entry]) => {\n if (entry.contentRect.width === offered) return;\n offered = entry.contentRect.width;\n this.schedule();\n });\n const text = new MutationObserver(() => this.schedule());\n\n if (host.parentElement) resize?.observe(host.parentElement);\n // No `attributes`: the width written below must not call the measure back.\n text.observe(host, { characterData: true, childList: true, subtree: true });\n\n this.started = true;\n this.fit();\n\n destroyRef.onDestroy(() => {\n cancelAnimationFrame(this.frame);\n resize?.disconnect();\n text.disconnect();\n });\n });\n\n effect(() => {\n this.wrFitText();\n if (this.started) this.schedule();\n });\n }\n\n private schedule(): void {\n cancelAnimationFrame(this.frame);\n this.frame = requestAnimationFrame(() => this.fit());\n }\n\n private fit(): void {\n const host = this.el.nativeElement;\n\n if (!this.wrFitText()) {\n if (this.written && host.style.width === this.written) host.style.width = '';\n this.written = '';\n return;\n }\n\n // Cleared first, so a parent that grew can take words back onto a line.\n host.style.width = '';\n this.written = '';\n\n const range = host.ownerDocument.createRange();\n range.selectNodeContents(host);\n const rects = Array.from(range.getClientRects()).filter(rect => rect.width > 0);\n if (!rects.length) return;\n\n // Inline children give several rects to one line, so a count says nothing.\n const firstLineEnd = rects[0].bottom;\n if (!rects.some(rect => rect.top >= firstLineEnd)) return;\n\n const start = Math.min(...rects.map(rect => rect.left));\n const end = Math.max(...rects.map(rect => rect.right));\n const style = getComputedStyle(host);\n const px = (value: string): number => parseFloat(value) || 0;\n const box =\n style.boxSizing === 'border-box'\n ? px(style.paddingLeft) + px(style.paddingRight) + px(style.borderLeftWidth) + px(style.borderRightWidth)\n : 0;\n\n // One pixel over: at the exact width, subpixel rounding wraps the longest line again.\n this.written = `${Math.ceil(end - start + box) + 1}px`;\n host.style.width = this.written;\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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { DestroyRef, Directive, ElementRef, Service, afterNextRender, inject, input, output } from '@angular/core';\n\ntype ViewCallback = (inView: boolean) => void;\n\ninterface Pool {\n readonly observer: IntersectionObserver;\n readonly targets: Map<Element, Set<ViewCallback>>;\n}\n\n/**\n * One `IntersectionObserver` per distinct `threshold`, shared by every element\n * watched with it. The observer is created with the first element and\n * disconnected with the last. Browser only: call it from `afterNextRender`.\n */\n@Service()\nexport class WrInViewObserver {\n private readonly pools = new Map<number, Pool>();\n\n /**\n * Watch `el` and call `callback` on every change with whether at least `threshold`\n * of it shows: `isIntersecting` alone is true for any sliver. Returns the stop function.\n */\n observe(el: Element, threshold: number, callback: ViewCallback): () => void {\n let pool = this.pools.get(threshold);\n if (!pool) {\n const targets = new Map<Element, Set<ViewCallback>>();\n const observer = new IntersectionObserver(\n entries => {\n for (const entry of entries) {\n // A copy: a callback may stop itself while the set is walked.\n // A fully shown host can report a hair under 1 from subpixel rounding;\n // any lower threshold is compared as it is.\n const inView = entry.isIntersecting && entry.intersectionRatio >= (threshold >= 1 ? 0.999 : threshold);\n for (const cb of [...(targets.get(entry.target) ?? [])]) cb(inView);\n }\n },\n { threshold }\n );\n pool = { observer, targets };\n this.pools.set(threshold, pool);\n }\n\n const { observer, targets } = pool;\n let callbacks = targets.get(el);\n if (!callbacks) {\n callbacks = new Set();\n targets.set(el, callbacks);\n observer.observe(el);\n }\n callbacks.add(callback);\n\n return () => {\n const set = targets.get(el);\n if (!set?.delete(callback) || set.size) return;\n targets.delete(el);\n observer.unobserve(el);\n if (!targets.size) {\n observer.disconnect();\n if (this.pools.get(threshold) === pool) this.pools.delete(threshold);\n }\n };\n }\n}\n\n/**\n * Emits when the host enters or leaves the viewport.\n *\n * `(wrInView)` carries `true` on entering and `false` on leaving, and only on a\n * change: an element that starts out of view emits nothing until it shows up.\n * `wrInViewOnce` stops after the first entry. Every instance with the same\n * `wrInViewThreshold` shares one `IntersectionObserver`. Nothing is observed on\n * the server.\n *\n * @example\n * ```html\n * <section (wrInView)=\"seen.set($event)\" [wrInViewThreshold]=\"0.5\"> … </section>\n * <img wrInViewOnce (wrInView)=\"load()\" />\n * ```\n */\n@Directive({ selector: '[wrInView]' })\nexport class WrInView {\n /** Fires with `true` when the host enters the viewport and `false` when it leaves. */\n readonly wrInView = output<boolean>();\n\n /**\n * The share of the host, from 0 to 1, that must be visible to count as in view.\n * Read once, when the host first renders. A host taller than the viewport never\n * reaches a threshold of 1.\n */\n readonly wrInViewThreshold = input(0, {\n transform: (value: unknown) => Math.min(1, Math.max(0, coerceNumberProperty(value, 0))),\n });\n\n /** Stop watching after the first entry. Bare `wrInViewOnce` is on. */\n readonly wrInViewOnce = input(false, { transform: coerceBooleanProperty });\n\n private readonly el = inject<ElementRef<Element>>(ElementRef);\n private readonly pool = inject(WrInViewObserver);\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n\n afterNextRender(() => {\n if (typeof IntersectionObserver === 'undefined') return;\n\n let stop: (() => void) | null = null;\n const unwatch = (): void => {\n stop?.();\n stop = null;\n };\n let last = false;\n stop = this.pool.observe(this.el.nativeElement, this.wrInViewThreshold(), inView => {\n if (inView === last) return;\n last = inView;\n this.wrInView.emit(inView);\n if (inView && this.wrInViewOnce()) unwatch();\n });\n destroyRef.onDestroy(unwatch);\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,IAAa,cAAb,MAAa,YAAW;CAKb,cAAc,MAAM,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAC/B,YAAY,UAAuC,UAAU,UAAU,QAAQ,sBAAsB,KAAK;CAAE,CAAA;CAG7F,KAAK,OAAgC,UAAU;CAC/C,WAAW,OAAO,QAAQ;CAE3C,cAAA;EACE,aAAY;GACV,MAAM,OAAO,KAAK,YAAW;GAC7B,IAAI,CAAC,MAAM;GAEX,sBACO;IACH,MAAM,OAAO,KAAK,GAAG;IAGrB,MAAM,aAAa,OAA6B,OAAO,GAAG,aAAa,UAAU,KAAK,CAAC,KAAK;IAC5F,CAAC,SAAS,UAAU,uBAAuB,IAAI,CAAC,CAAC,KAAK,SAAS,IAAI,KAAA,EAAO,MAAK;GACjF,GACA,EAAE,UAAU,KAAK,SAAQ,CAAE;EAE/B,CAAC;CACH;CA5BW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAW,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAX,OAAA,OA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AO;IACP,KAAK,SAAS,KAAK,MAAM;IACzB,IAAI,UAAU,KAAK,aAAY,GAAI,QAAO;GAC5C,CAAC;GACD,WAAW,UAAU,OAAO;EAC9B,CAAC;CACH;CAvCW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAQ,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAR,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAQ,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,mBAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,cAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA,EAAA,UAAA,WAAA;EAAA,UAAA;CAAA,CAAA;;AAAR,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EADpB,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,aAAY,CAAE"}
|
|
@@ -41,7 +41,7 @@ var WrDivider = class WrDivider {
|
|
|
41
41
|
}
|
|
42
42
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
43
43
|
minVersion: "12.0.0",
|
|
44
|
-
version: "22.
|
|
44
|
+
version: "22.3.0",
|
|
45
45
|
ngImport: i0,
|
|
46
46
|
type: WrDivider,
|
|
47
47
|
deps: [],
|
|
@@ -49,7 +49,7 @@ var WrDivider = class WrDivider {
|
|
|
49
49
|
});
|
|
50
50
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
51
51
|
minVersion: "17.1.0",
|
|
52
|
-
version: "22.
|
|
52
|
+
version: "22.3.0",
|
|
53
53
|
type: WrDivider,
|
|
54
54
|
isStandalone: true,
|
|
55
55
|
selector: "wr-divider",
|
|
@@ -99,7 +99,7 @@ var WrDivider = class WrDivider {
|
|
|
99
99
|
};
|
|
100
100
|
i0.ɵɵngDeclareClassMetadata({
|
|
101
101
|
minVersion: "12.0.0",
|
|
102
|
-
version: "22.
|
|
102
|
+
version: "22.3.0",
|
|
103
103
|
ngImport: i0,
|
|
104
104
|
type: WrDivider,
|
|
105
105
|
decorators: [{
|
package/fesm2022/ngwr-drawer.mjs
CHANGED
|
@@ -25,7 +25,7 @@ var WrDrawerTitle = class WrDrawerTitle {
|
|
|
25
25
|
id = `wr-drawer-title-${++uid}`;
|
|
26
26
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
27
27
|
minVersion: "12.0.0",
|
|
28
|
-
version: "22.
|
|
28
|
+
version: "22.3.0",
|
|
29
29
|
ngImport: i0,
|
|
30
30
|
type: WrDrawerTitle,
|
|
31
31
|
deps: [],
|
|
@@ -33,7 +33,7 @@ var WrDrawerTitle = class WrDrawerTitle {
|
|
|
33
33
|
});
|
|
34
34
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
35
35
|
minVersion: "14.0.0",
|
|
36
|
-
version: "22.
|
|
36
|
+
version: "22.3.0",
|
|
37
37
|
type: WrDrawerTitle,
|
|
38
38
|
isStandalone: true,
|
|
39
39
|
selector: "[wrDrawerTitle]",
|
|
@@ -47,7 +47,7 @@ var WrDrawerTitle = class WrDrawerTitle {
|
|
|
47
47
|
};
|
|
48
48
|
i0.ɵɵngDeclareClassMetadata({
|
|
49
49
|
minVersion: "12.0.0",
|
|
50
|
-
version: "22.
|
|
50
|
+
version: "22.3.0",
|
|
51
51
|
ngImport: i0,
|
|
52
52
|
type: WrDrawerTitle,
|
|
53
53
|
decorators: [{
|
|
@@ -237,7 +237,7 @@ var WrDrawer = class WrDrawer {
|
|
|
237
237
|
}
|
|
238
238
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
239
239
|
minVersion: "12.0.0",
|
|
240
|
-
version: "22.
|
|
240
|
+
version: "22.3.0",
|
|
241
241
|
ngImport: i0,
|
|
242
242
|
type: WrDrawer,
|
|
243
243
|
deps: [],
|
|
@@ -245,7 +245,7 @@ var WrDrawer = class WrDrawer {
|
|
|
245
245
|
});
|
|
246
246
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
247
247
|
minVersion: "17.0.0",
|
|
248
|
-
version: "22.
|
|
248
|
+
version: "22.3.0",
|
|
249
249
|
type: WrDrawer,
|
|
250
250
|
isStandalone: true,
|
|
251
251
|
selector: "wr-drawer",
|
|
@@ -379,7 +379,7 @@ var WrDrawer = class WrDrawer {
|
|
|
379
379
|
};
|
|
380
380
|
i0.ɵɵngDeclareClassMetadata({
|
|
381
381
|
minVersion: "12.0.0",
|
|
382
|
-
version: "22.
|
|
382
|
+
version: "22.3.0",
|
|
383
383
|
ngImport: i0,
|
|
384
384
|
type: WrDrawer,
|
|
385
385
|
decorators: [{
|
|
@@ -706,7 +706,7 @@ var WrDrawerManager = class WrDrawerManager {
|
|
|
706
706
|
}
|
|
707
707
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
708
708
|
minVersion: "12.0.0",
|
|
709
|
-
version: "22.
|
|
709
|
+
version: "22.3.0",
|
|
710
710
|
ngImport: i0,
|
|
711
711
|
type: WrDrawerManager,
|
|
712
712
|
deps: [],
|
|
@@ -714,14 +714,14 @@ var WrDrawerManager = class WrDrawerManager {
|
|
|
714
714
|
});
|
|
715
715
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
716
716
|
minVersion: "22.0.0",
|
|
717
|
-
version: "22.
|
|
717
|
+
version: "22.3.0",
|
|
718
718
|
ngImport: i0,
|
|
719
719
|
type: WrDrawerManager
|
|
720
720
|
});
|
|
721
721
|
};
|
|
722
722
|
i0.ɵɵngDeclareClassMetadata({
|
|
723
723
|
minVersion: "12.0.0",
|
|
724
|
-
version: "22.
|
|
724
|
+
version: "22.3.0",
|
|
725
725
|
ngImport: i0,
|
|
726
726
|
type: WrDrawerManager,
|
|
727
727
|
decorators: [{ type: Service }]
|
|
@@ -738,7 +738,7 @@ var WrDrawerContent = class WrDrawerContent {
|
|
|
738
738
|
}
|
|
739
739
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
740
740
|
minVersion: "12.0.0",
|
|
741
|
-
version: "22.
|
|
741
|
+
version: "22.3.0",
|
|
742
742
|
ngImport: i0,
|
|
743
743
|
type: WrDrawerContent,
|
|
744
744
|
deps: [],
|
|
@@ -746,7 +746,7 @@ var WrDrawerContent = class WrDrawerContent {
|
|
|
746
746
|
});
|
|
747
747
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
748
748
|
minVersion: "14.0.0",
|
|
749
|
-
version: "22.
|
|
749
|
+
version: "22.3.0",
|
|
750
750
|
type: WrDrawerContent,
|
|
751
751
|
isStandalone: true,
|
|
752
752
|
selector: "[wrDrawerContent]",
|
|
@@ -756,7 +756,7 @@ var WrDrawerContent = class WrDrawerContent {
|
|
|
756
756
|
};
|
|
757
757
|
i0.ɵɵngDeclareClassMetadata({
|
|
758
758
|
minVersion: "12.0.0",
|
|
759
|
-
version: "22.
|
|
759
|
+
version: "22.3.0",
|
|
760
760
|
ngImport: i0,
|
|
761
761
|
type: WrDrawerContent,
|
|
762
762
|
decorators: [{
|
|
@@ -782,7 +782,7 @@ var WrDrawerFooter = class WrDrawerFooter {
|
|
|
782
782
|
classes = computed(() => `wr-drawer__footer wr-drawer__footer--${this.align()}`, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
783
783
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
784
784
|
minVersion: "12.0.0",
|
|
785
|
-
version: "22.
|
|
785
|
+
version: "22.3.0",
|
|
786
786
|
ngImport: i0,
|
|
787
787
|
type: WrDrawerFooter,
|
|
788
788
|
deps: [],
|
|
@@ -790,7 +790,7 @@ var WrDrawerFooter = class WrDrawerFooter {
|
|
|
790
790
|
});
|
|
791
791
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
792
792
|
minVersion: "17.1.0",
|
|
793
|
-
version: "22.
|
|
793
|
+
version: "22.3.0",
|
|
794
794
|
type: WrDrawerFooter,
|
|
795
795
|
isStandalone: true,
|
|
796
796
|
selector: "[wrDrawerFooter]",
|
|
@@ -810,7 +810,7 @@ var WrDrawerFooter = class WrDrawerFooter {
|
|
|
810
810
|
};
|
|
811
811
|
i0.ɵɵngDeclareClassMetadata({
|
|
812
812
|
minVersion: "12.0.0",
|
|
813
|
-
version: "22.
|
|
813
|
+
version: "22.3.0",
|
|
814
814
|
ngImport: i0,
|
|
815
815
|
type: WrDrawerFooter,
|
|
816
816
|
decorators: [{
|
|
@@ -859,7 +859,7 @@ var WrDrawerClose = class WrDrawerClose {
|
|
|
859
859
|
}
|
|
860
860
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
861
861
|
minVersion: "12.0.0",
|
|
862
|
-
version: "22.
|
|
862
|
+
version: "22.3.0",
|
|
863
863
|
ngImport: i0,
|
|
864
864
|
type: WrDrawerClose,
|
|
865
865
|
deps: [],
|
|
@@ -867,7 +867,7 @@ var WrDrawerClose = class WrDrawerClose {
|
|
|
867
867
|
});
|
|
868
868
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
869
869
|
minVersion: "17.1.0",
|
|
870
|
-
version: "22.
|
|
870
|
+
version: "22.3.0",
|
|
871
871
|
type: WrDrawerClose,
|
|
872
872
|
isStandalone: true,
|
|
873
873
|
selector: "[wrDrawerClose]",
|
|
@@ -884,7 +884,7 @@ var WrDrawerClose = class WrDrawerClose {
|
|
|
884
884
|
};
|
|
885
885
|
i0.ɵɵngDeclareClassMetadata({
|
|
886
886
|
minVersion: "12.0.0",
|
|
887
|
-
version: "22.
|
|
887
|
+
version: "22.3.0",
|
|
888
888
|
ngImport: i0,
|
|
889
889
|
type: WrDrawerClose,
|
|
890
890
|
decorators: [{
|
|
@@ -8,7 +8,7 @@ import { ComponentHarness, ContentContainerComponentHarness, HarnessPredicate, T
|
|
|
8
8
|
var WrDropdownItemHarness = class WrDropdownItemHarness extends ComponentHarness {
|
|
9
9
|
static hostSelector = ".wr-dropdown-item";
|
|
10
10
|
static with(options = {}) {
|
|
11
|
-
return new HarnessPredicate(WrDropdownItemHarness, options).addOption("text", options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text)).addOption("disabled", options.disabled, async (harness, disabled) => await harness.isDisabled() === disabled);
|
|
11
|
+
return new HarnessPredicate(WrDropdownItemHarness, options).addOption("text", options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text)).addOption("disabled", options.disabled, async (harness, disabled) => await harness.isDisabled() === disabled).addOption("checked", options.checked, async (harness, checked) => await harness.isChecked() === checked);
|
|
12
12
|
}
|
|
13
13
|
async getText() {
|
|
14
14
|
return (await this.locatorFor(".wr-dropdown-item__label")()).text();
|
|
@@ -16,6 +16,10 @@ var WrDropdownItemHarness = class WrDropdownItemHarness extends ComponentHarness
|
|
|
16
16
|
async getRole() {
|
|
17
17
|
return (await this.host()).getAttribute("role");
|
|
18
18
|
}
|
|
19
|
+
async isChecked() {
|
|
20
|
+
const value = await (await this.host()).getAttribute("aria-checked");
|
|
21
|
+
return value === null ? null : value === "true";
|
|
22
|
+
}
|
|
19
23
|
async isDisabled() {
|
|
20
24
|
return await (await this.host()).getAttribute("aria-disabled") === "true";
|
|
21
25
|
}
|