ngwr 16.7.0 → 16.8.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/charts/donut-chart/styles/_index.scss +9 -3
- package/charts/meter-group/styles/_index.scss +8 -1
- package/charts/sparkline/styles/_index.scss +6 -3
- package/checkbox/styles/_index.scss +4 -0
- package/command-palette/styles/_index.scss +10 -0
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +17 -0
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs +27 -0
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +54 -6
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group-testing.mjs +27 -0
- package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +54 -6
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline-testing.mjs +27 -0
- package/fesm2022/ngwr-charts-sparkline-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +45 -4
- package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +38 -3
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +4 -3
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +39 -19
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +7 -2
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +1 -0
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +10 -7
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +14 -8
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +2 -2
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +9 -2
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +9 -2
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +9 -2
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +9 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +9 -2
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +9 -2
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +9 -2
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +9 -2
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +9 -2
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +9 -2
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +9 -2
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-kk.mjs +9 -2
- package/fesm2022/ngwr-i18n-kk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +9 -2
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +9 -2
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +9 -2
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +9 -2
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +9 -2
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +9 -2
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +9 -2
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +9 -2
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +9 -2
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +9 -2
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +9 -2
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +33 -10
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +24 -10
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +2 -2
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +5 -3
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +51 -2
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +2 -2
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +11 -1
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +39 -16
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +22 -17
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +33 -3
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +17 -4
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +8 -3
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/i18n/ar.json +9 -2
- package/i18n/cs.json +9 -2
- package/i18n/de.json +9 -2
- package/i18n/en.json +9 -2
- package/i18n/es.json +9 -2
- package/i18n/fr.json +9 -2
- package/i18n/he.json +9 -2
- package/i18n/hi.json +9 -2
- package/i18n/id.json +9 -2
- package/i18n/it.json +9 -2
- package/i18n/ja.json +9 -2
- package/i18n/kk.json +9 -2
- package/i18n/ko.json +9 -2
- package/i18n/nl.json +9 -2
- package/i18n/pl.json +9 -2
- package/i18n/pt.json +9 -2
- package/i18n/ru.json +9 -2
- package/i18n/sv.json +9 -2
- package/i18n/tr.json +9 -2
- package/i18n/uk.json +9 -2
- package/i18n/vi.json +9 -2
- package/i18n/zh-TW.json +9 -2
- package/i18n/zh.json +9 -2
- package/llms-full.txt +4 -4
- package/package.json +1 -1
- package/radio/styles/_index.scss +4 -0
- package/schematics/use/rule.js +1 -0
- package/schematics/use/symbol-map.json +1 -0
- package/switch/styles/_index.scss +4 -0
- package/table/styles/_index.scss +7 -0
- package/tour/styles/_index.scss +11 -7
- package/types/ngwr-charts-donut-chart-testing.d.ts +32 -3
- package/types/ngwr-charts-donut-chart.d.ts +45 -6
- package/types/ngwr-charts-meter-group-testing.d.ts +29 -1
- package/types/ngwr-charts-meter-group.d.ts +43 -4
- package/types/ngwr-charts-sparkline-testing.d.ts +32 -2
- package/types/ngwr-charts-sparkline.d.ts +42 -3
- package/types/ngwr-checkbox.d.ts +14 -0
- package/types/ngwr-color-picker-testing.d.ts +1 -1
- package/types/ngwr-command-palette.d.ts +2 -1
- package/types/ngwr-date-picker.d.ts +8 -2
- package/types/ngwr-dialog.d.ts +11 -6
- package/types/ngwr-drawer.d.ts +12 -4
- package/types/ngwr-file-upload.d.ts +1 -1
- package/types/ngwr-input-number.d.ts +14 -2
- package/types/ngwr-input-otp.d.ts +2 -0
- package/types/ngwr-lightbox.d.ts +1 -0
- package/types/ngwr-overlay.d.ts +20 -1
- package/types/ngwr-popover.d.ts +3 -3
- package/types/ngwr-scroll.d.ts +11 -2
- package/types/ngwr-slider.d.ts +3 -1
- package/types/ngwr-switch.d.ts +13 -0
- package/types/ngwr-table.d.ts +1 -0
- package/types/ngwr-tabs-router.d.ts +3 -4
- package/types/ngwr-version.d.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Directive, forwardRef, inject } from "@angular/core";
|
|
3
3
|
import { LocationStrategy } from "@angular/common";
|
|
4
|
-
import { ActivatedRoute, NavigationEnd, Router } from "@angular/router";
|
|
4
|
+
import { ActivatedRoute, NavigationEnd, Router, containsTree } from "@angular/router";
|
|
5
5
|
import { toSignal } from "@angular/core/rxjs-interop";
|
|
6
6
|
import { filter, map, startWith } from "rxjs";
|
|
7
7
|
import { WR_TABS_ROUTING } from "ngwr/tabs";
|
|
@@ -31,8 +31,8 @@ var WrTabsRouting = class WrTabsRouting {
|
|
|
31
31
|
return this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.tree(commands)));
|
|
32
32
|
}
|
|
33
33
|
isActive(commands, exact = false) {
|
|
34
|
-
this.
|
|
35
|
-
return
|
|
34
|
+
const current = this.router.lastSuccessfulNavigation()?.finalUrl ?? this.router.parseUrl(this.router.url);
|
|
35
|
+
return containsTree(current, this.tree(commands), exact ? MATCH_EXACT : MATCH);
|
|
36
36
|
}
|
|
37
37
|
navigate(commands, event) {
|
|
38
38
|
if (event.button !== 0 || event.ctrlKey || event.shiftKey || event.altKey || event.metaKey) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-tabs-router.mjs","names":[],"sources":["../../../projects/lib/tabs/router/tabs-routing.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 { LocationStrategy } from '@angular/common';\nimport { Directive, forwardRef, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {
|
|
1
|
+
{"version":3,"file":"ngwr-tabs-router.mjs","names":[],"sources":["../../../projects/lib/tabs/router/tabs-routing.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 { LocationStrategy } from '@angular/common';\nimport { Directive, forwardRef, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {\n ActivatedRoute,\n containsTree,\n type IsActiveMatchOptions,\n NavigationEnd,\n Router,\n type UrlTree,\n} from '@angular/router';\n\nimport { filter, map, startWith } from 'rxjs';\n\nimport { WR_TABS_ROUTING, type WrTabsRoutingAdapter } from 'ngwr/tabs';\n\n/**\n * How `routerLinkActive` matches when no `[routerLinkActiveOptions]` is given:\n * a path PREFIX, so `/settings/profile` still selects a `/settings` tab, and a\n * fragment or a matrix param never unselects one.\n */\nconst MATCH: IsActiveMatchOptions = {\n paths: 'subset',\n queryParams: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n};\n\n/** `exact` on a tab: the path must match whole, everything else as in `MATCH`. */\nconst MATCH_EXACT: IsActiveMatchOptions = { ...MATCH, paths: 'exact' };\n\n/**\n * Router support for `<wr-tabs>`. Add it to the `imports` of the component that\n * declares a strip whose `<wr-tab>`s carry a `routerLink`:\n *\n * @example\n * ```ts\n * import { WrTab, WrTabs } from 'ngwr/tabs';\n * import { WrTabsRouting } from 'ngwr/tabs/router';\n *\n * @Component({ imports: [WrTabs, WrTab, WrTabsRouting], template: `\n * <wr-tabs wrTabsRouting>\n * <wr-tab title=\"Overview\" routerLink=\"overview\" />\n * <wr-tab title=\"Details\" routerLink=\"details\" />\n * </wr-tabs>\n * <router-outlet />\n * ` })\n * export class SettingsPage {}\n * ```\n *\n * Two mechanical edits per strip, both codemoddable: the symbol in `imports`,\n * and `wrTabsRouting` on the element. An attribute rather than a selector on\n * `wr-tabs` itself, for two reasons — where the router enters a template should\n * be visible in that template, and the docs' selector map keys a `wr-` tag\n * even when it is qualified, so `wr-tabs[wrTabsRouting]` would be a second claim\n * on the `wr-tabs` tag. Putting it on an ANCESTOR of the strip also works: the\n * token is read through the element injector, which walks up.\n *\n * **Why it is a separate entry point.** A directive listed in `imports: []`\n * lands in the compiled component's `dependencies` whether or not the branch of\n * the template that matches it ever runs, so `RouterLink` + `RouterLinkActive`\n * on the strip charged every CONTENT tab strip 73.9 kB of `@angular/router` —\n * 51% of what `ngwr/tabs` cost in an app that declares no routes. Measured with\n * source-map attribution against a routerless baseline. `@angular/router` is\n * already an optional peer dependency of the package; this is what makes that\n * true in bytes.\n *\n * **Why a directive rather than a provider function.** A relative `routerLink`\n * (`routerLink=\"overview\"`) resolves against the `ActivatedRoute` of the\n * component that declares the strip. A root-level provider would resolve every\n * one of them against the root route instead, and quietly build the wrong\n * hrefs; a directive on the element reads the same `ActivatedRoute` the old\n * `RouterLink` inside the strip's template did.\n */\n@Directive({\n selector: '[wrTabsRouting]',\n exportAs: 'wrTabsRouting',\n providers: [\n {\n provide: WR_TABS_ROUTING,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrTabsRouting),\n },\n ],\n})\nexport class WrTabsRouting implements WrTabsRoutingAdapter {\n private readonly router = inject(Router);\n private readonly locationStrategy = inject(LocationStrategy);\n private readonly route = inject(ActivatedRoute);\n\n /**\n * The current URL, as a signal, so `href()` is reactive to navigation when\n * read from a computed: a RELATIVE link is resolved against the active route\n * and its target moves when the route does, which is why `RouterLink`\n * recomputes its own href on every navigation too.\n */\n private readonly url = toSignal(\n this.router.events.pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n map(e => e.urlAfterRedirects),\n startWith(this.router.url)\n ),\n { initialValue: this.router.url }\n );\n\n href(commands: string | readonly string[]): string {\n // Read for the dependency, the same reason `isActive` does: a RELATIVE link\n // resolves against the active route, so its target moves when the route\n // does. Without this a strip inside `/users/:id` kept rendering\n // `/users/1/profile` after navigating to user 2 — the click still routed,\n // because `navigate()` rebuilds the tree, but the visible href pointed at\n // the previous user. The docblock above already promised this; the code did\n // not do it.\n this.url();\n\n // `prepareExternalUrl`, not a bare `serializeUrl`, because that is what\n // `RouterLink` writes and the href exists precisely so the BROWSER can use\n // it. Under `withHashLocation()` a serialized `/one` renders as an href the\n // app does not serve: a plain click survives (`navigateByUrl` ignores the\n // strategy and `preventDefault` stops the bad navigation) but cmd-click,\n // middle-click, \"open in new tab\" and \"copy link address\" all take the href\n // at face value — the four things rendering one is for. A `--base-href` is\n // the same defect by another door.\n return this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.tree(commands)));\n }\n\n isActive(commands: string | readonly string[], exact = false): boolean {\n // What Angular's own `isActive` function reads: a signal, already the new URL\n // when `NavigationEnd` is emitted, and the tree as navigated, not reparsed.\n const current = this.router.lastSuccessfulNavigation()?.finalUrl ?? this.router.parseUrl(this.router.url);\n return containsTree(current, this.tree(commands), exact ? MATCH_EXACT : MATCH);\n }\n\n navigate(commands: string | readonly string[], event: MouseEvent): void {\n // Exactly the guard `RouterLink` applies: a middle click, or any click with\n // a modifier held, belongs to the browser — preventing it would make a tab\n // the one link on the page that cannot be opened in a new window.\n if (event.button !== 0 || event.ctrlKey || event.shiftKey || event.altKey || event.metaKey) return;\n event.preventDefault();\n void this.router.navigateByUrl(this.tree(commands));\n }\n\n private tree(commands: string | readonly string[]): UrlTree {\n // A bare string is one command, the way `[routerLink]=\"'overview'\"` is —\n // spread as characters it would navigate to `/o/v/e/r/v/i/e/w`.\n const segments = typeof commands === 'string' ? [commands] : [...commands];\n return this.router.createUrlTree(segments, { relativeTo: this.route });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,QAA8B;CAClC,OAAO;CACP,aAAa;CACb,UAAU;CACV,cAAc;AACf;AAGD,MAAM,cAAoC;CAAE,GAAG;CAAO,OAAO;AAAO;AAwDpE,IAAa,gBAAb,MAAa,cAAa;CACP,SAAS,OAAO,MAAM;CACtB,mBAAmB,OAAO,gBAAgB;CAC1C,QAAQ,OAAO,cAAc;CAQ7B,MAAM,SACrB,KAAK,OAAO,OAAO,KACjB,QAAQ,MAA0B,aAAa,aAAa,GAC5D,KAAI,MAAK,EAAE,iBAAiB,GAC5B,UAAU,KAAK,OAAO,GAAG,CAAC,GAE5B,EAAE,cAAc,KAAK,OAAO,IAAG,CAAE;CAGnC,KAAK,UAAoC;EAQvC,KAAK,IAAG;EAUR,OAAO,KAAK,iBAAiB,mBAAmB,KAAK,OAAO,aAAa,KAAK,KAAK,QAAQ,CAAC,CAAC;CAC/F;CAEA,SAAS,UAAsC,QAAQ,OAAK;EAG1D,MAAM,UAAU,KAAK,OAAO,yBAAwB,CAAE,EAAE,YAAY,KAAK,OAAO,SAAS,KAAK,OAAO,GAAG;EACxG,OAAO,aAAa,SAAS,KAAK,KAAK,QAAQ,GAAG,QAAQ,cAAc,KAAK;CAC/E;CAEA,SAAS,UAAsC,OAAiB;EAI9D,IAAI,MAAM,WAAW,KAAK,MAAM,WAAW,MAAM,YAAY,MAAM,UAAU,MAAM,SAAS;EAC5F,MAAM,eAAc;EACpB,AAAK,KAAK,OAAO,cAAc,KAAK,KAAK,QAAQ,CAAC;CACpD;CAEQ,KAAK,UAAoC;EAG/C,MAAM,WAAW,OAAO,aAAa,WAAW,CAAC,QAAQ,IAAI,CAAC,GAAG,QAAQ;EACzE,OAAO,KAAK,OAAO,cAAc,UAAU,EAAE,YAAY,KAAK,MAAK,CAAE;CACvE;CA9DW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAa,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAb,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAa,cAAA;EAAA,UAAA;EAAA,WARb,CACT;GACE,SAAS;GAET,aAAa,iBAAiB,aAAa;EAC5C,CACF;EAAA,UAAA,CAAA,eAAA;EAAA,UAAA;CAAA,CAAA;;AAEU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EAXzB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,WAAW,CACT;IACE,SAAS;IAET,aAAa,iBAAgB,aAAc;GAC5C,CACF;EACF,CAAA"}
|
package/fesm2022/ngwr-tour.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Component, DOCUMENT, DestroyRef, EnvironmentInjector, InjectionToken, Injector, PLATFORM_ID, Service, ViewEncapsulation, computed, inject, signal } from "@angular/core";
|
|
3
3
|
import { Location, isPlatformBrowser } from "@angular/common";
|
|
4
|
-
import { wrCheckStyles, wrRandomId, wrRestoreFocus, wrToClassList } from "ngwr/utils";
|
|
4
|
+
import { wrCheckStyles, wrIsComposing, wrRandomId, wrRestoreFocus, wrToClassList } from "ngwr/utils";
|
|
5
5
|
import { useI18nFormatter, wrReadI18nText } from "ngwr/i18n";
|
|
6
6
|
import { Directionality } from "@angular/cdk/bidi";
|
|
7
7
|
import { WrButton } from "ngwr/button";
|
|
@@ -257,15 +257,20 @@ var WrTour = class WrTour {
|
|
|
257
257
|
openStep(step, hadFocus) {
|
|
258
258
|
const target = this.resolve(step);
|
|
259
259
|
if (!target) return;
|
|
260
|
+
const reduced = this.document.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
260
261
|
target.scrollIntoView({
|
|
261
262
|
block: "center",
|
|
262
263
|
inline: "nearest",
|
|
263
|
-
behavior: "smooth"
|
|
264
|
+
behavior: reduced ? "instant" : "smooth"
|
|
264
265
|
});
|
|
265
266
|
const spotlight = this.document.createElement("div");
|
|
266
267
|
spotlight.className = "wr-tour__spotlight";
|
|
267
268
|
spotlight.setAttribute("aria-hidden", "true");
|
|
268
269
|
this.document.body.appendChild(spotlight);
|
|
270
|
+
if (typeof spotlight.showPopover === "function") {
|
|
271
|
+
spotlight.setAttribute("popover", "manual");
|
|
272
|
+
spotlight.showPopover();
|
|
273
|
+
}
|
|
269
274
|
this.spotlight = spotlight;
|
|
270
275
|
this.placeSpotlight(target);
|
|
271
276
|
const placement = step.placement ?? "bottom";
|
|
@@ -290,7 +295,7 @@ var WrTour = class WrTour {
|
|
|
290
295
|
this.focusTrap = this.focusTrapFactory.create(card);
|
|
291
296
|
wrFocusOverlay(card, this.focusTrap, this.autoFocus === false && hadFocus ? "dialog" : this.autoFocus, this.injector);
|
|
292
297
|
const onKey = (event) => {
|
|
293
|
-
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
298
|
+
if (event.key === "Escape" && !event.defaultPrevented && !wrIsComposing(event)) {
|
|
294
299
|
event.preventDefault();
|
|
295
300
|
this.stop();
|
|
296
301
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-tour.mjs","names":[],"sources":["../../../projects/lib/tour/tour-popup.ts","../../../projects/lib/tour/tour-popup.html","../../../projects/lib/tour/tour.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 { Component, InjectionToken, ViewEncapsulation, computed, inject } from '@angular/core';\n\nimport { WrButton } from 'ngwr/button';\nimport { wrReadI18nText, useI18nFormatter } from 'ngwr/i18n';\nimport { wrCheckStyles, wrRandomId } from 'ngwr/utils';\n\nimport type { WrTourStep } from './types';\n\n/** What the popup needs from the running tour, without importing the service (cycle). */\nexport interface WrTourController {\n readonly index: () => number;\n readonly total: () => number;\n readonly step: () => WrTourStep | null;\n /**\n * Whether this is the last step the user will actually see — the service looks\n * ahead for a reachable one, because a trailing step whose target is missing gets\n * skipped and the raw count would call the final card \"Next\".\n */\n readonly isLast: () => boolean;\n /**\n * Whether this is the first step the user will actually see — the service looks\n * BEHIND for a reachable one, for the mirror reason: a leading step whose target\n * is missing gets skipped, so the tour opens on a later index and the raw one\n * would put a Back button on the very first card.\n */\n readonly isFirst: () => boolean;\n /** Whether the card opens with focus on Next: the tour's `autoFocus` is `'first-tabbable'`. */\n readonly focusNext: () => boolean;\n next(): void;\n prev(): void;\n stop(): void;\n}\n\n/** Provided by `WrTour` when it attaches the popup portal. */\nexport const WR_TOUR_STEP = new InjectionToken<WrTourController>('WR_TOUR_STEP');\n\n/**\n * The card a tour shows next to the spotlit element. Rendered by `WrTour` into\n * a CDK overlay — not something you place yourself.\n *\n * @see https://ngwr.dev/reference/services/tour\n */\n@Component({\n selector: 'wr-tour-popup',\n templateUrl: './tour-popup.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-tour-popup',\n role: 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.aria-describedby]': 'contentId',\n },\n imports: [WrButton],\n})\nexport class WrTourPopup {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('tour');\n }\n\n protected readonly tour = inject(WR_TOUR_STEP);\n\n // `wrReadI18nText`, not `useI18nText`: these have no consumer-facing input to\n // forward. Both helpers are reactive.\n protected readonly nextLabel = wrReadI18nText('tour.next', 'Next');\n protected readonly backLabel = wrReadI18nText('tour.back', 'Back');\n protected readonly doneLabel = wrReadI18nText('tour.done', 'Done');\n protected readonly skipLabel = wrReadI18nText('tour.skip', 'Skip tour');\n\n /** `Step {{current}} of {{total}}`, the second half of the dialog's name. */\n protected readonly progress = useI18nFormatter('tour.progress', 'Step {{current}} of {{total}}');\n\n // From the service, not `index() >= total() - 1`: a trailing step whose target is\n // missing gets skipped, so the raw count called the final card \"Next\" and then\n // ended the tour when it was pressed.\n protected readonly isLast = computed(() => this.tour.isLast());\n // Same story at the other end, and the same fix: `index() <= 0` rendered a Back\n // button on the first card of a tour whose leading step had been skipped, and\n // `prev()` walks off the start and returns — so the button did nothing at all.\n protected readonly isFirst = computed(() => this.tour.isFirst());\n\n protected readonly progressText = computed(() =>\n this.progress({ current: this.tour.index() + 1, total: this.tour.total() })\n );\n\n protected readonly titleId = wrRandomId('wr-tour-title');\n protected readonly progressId = wrRandomId('wr-tour-progress');\n protected readonly contentId = wrRandomId('wr-tour-content');\n\n /**\n * The dialog is named by its title and the progress line, or by the progress\n * line alone for an untitled step, and described by the step's text: a screen\n * reader reads a dialog's name and description when focus enters it, and\n * nothing else of what it holds.\n */\n protected readonly labelledBy = computed(() =>\n this.tour.step()?.title ? `${this.titleId} ${this.progressId}` : this.progressId\n );\n}\n","@let step = tour.step();\n\n<p class=\"wr-tour-popup__progress\" [id]=\"progressId\">{{ progressText() }}</p>\n\n@if (step?.title; as title) {\n <h2 class=\"wr-tour-popup__title\" [id]=\"titleId\">{{ title }}</h2>\n}\n\n<p class=\"wr-tour-popup__content\" [id]=\"contentId\">{{ step?.content }}</p>\n\n<div class=\"wr-tour-popup__actions\">\n <!-- The three buttons are told apart by a class rather than by their position in\n the row: the back button is conditional, so an index means one thing on the\n first step and another everywhere else — and the labels are translated. -->\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-tour-popup__action wr-tour-popup__action--skip\"\n (click)=\"tour.stop()\"\n >\n {{ skipLabel() }}\n </button>\n\n <span class=\"wr-tour-popup__spacer\"></span>\n\n @if (!isFirst()) {\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-tour-popup__action wr-tour-popup__action--back\"\n (click)=\"tour.prev()\"\n >\n {{ backLabel() }}\n </button>\n }\n <!-- Under `autoFocus: 'first-tabbable'` focus opens on the button that walks the\n tour, not on Skip, the first in the row: the focus trap reads\n `cdkFocusInitial`, as the confirm dialog has it. -->\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n color=\"primary\"\n class=\"wr-tour-popup__action wr-tour-popup__action--next\"\n [attr.cdkFocusInitial]=\"tour.focusNext() ? '' : null\"\n (click)=\"tour.next()\"\n >\n {{ isLast() ? doneLabel() : nextLabel() }}\n </button>\n</div>\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 { type ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { type ConnectedPosition, type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Location, isPlatformBrowser } from '@angular/common';\nimport {\n DOCUMENT,\n DestroyRef,\n EnvironmentInjector,\n Injector,\n PLATFORM_ID,\n Service,\n computed,\n inject,\n signal,\n} from '@angular/core';\n\nimport { WR_OVERLAY, type WrOverlayAutoFocus, wrFocusOverlay, wrFollowDirection, wrMirrorOffsets } from 'ngwr/overlay';\nimport { wrRestoreFocus, wrToClassList } from 'ngwr/utils';\n\nimport { WR_TOUR_STEP, WrTourPopup } from './tour-popup';\nimport type { WrTourOptions, WrTourPlacement, WrTourStep } from './types';\n\n/** Fallback order per preferred side — the opposite side first, then the sides. */\nconst FALLBACKS: Record<WrTourPlacement, readonly WrTourPlacement[]> = {\n bottom: ['bottom', 'top', 'right', 'left'],\n top: ['top', 'bottom', 'right', 'left'],\n left: ['left', 'right', 'bottom', 'top'],\n right: ['right', 'left', 'bottom', 'top'],\n};\n\nconst CONNECTED: Record<\n WrTourPlacement,\n {\n originX: 'start' | 'center' | 'end';\n originY: 'top' | 'center' | 'bottom';\n overlayX: 'start' | 'center' | 'end';\n overlayY: 'top' | 'center' | 'bottom';\n }\n> = {\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\n};\n\n/**\n * Guided product tour: a spotlight over one element at a time plus a popup\n * explaining it.\n *\n * Steps are data, not markup — call `start()` with an array and the service owns\n * the overlay, the cut-out, focus and the keyboard. A step whose target is not\n * on the page is skipped rather than shown floating, so a tour survives a\n * feature being hidden behind a flag or a permission.\n *\n * @example\n * ```ts\n * private readonly tour = inject(WrTour);\n *\n * showMeAround(): void {\n * this.tour.start([\n * { target: '[data-tour=\"search\"]', title: 'Search', content: 'Find anything by name.' },\n * { target: '[data-tour=\"filters\"]', content: 'Narrow the list down.', placement: 'right' },\n * ]);\n * }\n * ```\n *\n * @see https://ngwr.dev/reference/services/tour\n */\n@Service()\nexport class WrTour {\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly injector = inject(EnvironmentInjector);\n private readonly focusTrapFactory = inject(ConfigurableFocusTrapFactory);\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly location = inject(Location);\n\n private readonly steps = signal<readonly WrTourStep[]>([]);\n private readonly cursor = signal(-1);\n\n private overlayRef: OverlayRef | null = null;\n private focusTrap: ConfigurableFocusTrap | null = null;\n private spotlight: HTMLElement | null = null;\n private detachKeydown: (() => void) | null = null;\n private detachReposition: (() => void) | null = null;\n private restoreFocus: HTMLElement | null = null;\n private autoFocus: WrOverlayAutoFocus = 'dialog';\n /** `focusNext` for the card, see {@link WrTourController}. */\n readonly focusNext = (): boolean => this.autoFocus === 'first-tabbable';\n private stopWatchingUrl: (() => void) | null = null;\n\n /** Whether a tour is running. */\n readonly active = computed(() => this.cursor() >= 0);\n\n /** Zero-based index of the current step, `-1` when idle. */\n readonly index = computed(() => this.cursor());\n\n /** How many steps this tour has. */\n readonly total = computed(() => this.steps().length);\n\n /** The step being shown, or `null` when idle. */\n readonly step = computed<WrTourStep | null>(() => this.steps()[this.cursor()] ?? null);\n\n // Whether any step AFTER the current one can actually be shown. Settled once per\n // move, in `goTo`, because reachability is a DOM question and not a signal.\n private readonly noStepAfter = signal(false);\n\n // The same question looking the other way. Settled in `goTo` for the same reason.\n //\n // `true` at rest, and the asymmetry with `noStepAfter` is deliberate: with no\n // tour running there is no step, so both questions are vacuous, and the pair\n // is set to whatever keeps a naive template honest. `@if (!tour.isFirst())`\n // around a Back button is the obvious way to write it, and at `false` that\n // button appears with no tour on screen.\n private readonly noStepBefore = signal(true);\n\n /**\n * Whether this is the last step the user will see. Not `index() === total() - 1`:\n * a trailing step whose target is missing is skipped, so comparing against the\n * raw count left the primary button reading \"Next\" on the final card and then\n * ending the tour when it was pressed. `false` while no tour is running.\n */\n readonly isLast = computed(() => this.noStepAfter());\n\n /**\n * Whether this is the first step the user will see. Not `index() === 0`, for the\n * mirror of the reason above: a LEADING step whose target is missing is skipped,\n * so the tour opens on a later index and the raw one put a Back button on the\n * first card — one that did nothing at all, because `prev()` walks off the start\n * and returns without moving. `true` while no tour is running — see the signal\n * it reads.\n */\n readonly isFirst = computed(() => this.noStepBefore());\n\n constructor() {\n // Everything this service owns lives OUTSIDE its own injector: a CDK overlay, a\n // div appended to `document.body`, a document keydown listener and two window\n // listeners. Nothing removes them when the injector goes, so a tour running at\n // teardown left its cut-out on the page.\n inject(DestroyRef).onDestroy(() => this.stop());\n }\n\n /**\n * Begin a tour. Restarts if one is already running. A no-op under SSR — a\n * tour is a client-side affordance and there is nothing to spotlight on the\n * server.\n */\n start(steps: readonly WrTourStep[], options: WrTourOptions = {}): void {\n if (!this.isBrowser || steps.length === 0) return;\n this.stop();\n this.steps.set(steps);\n this.autoFocus = options.autoFocus ?? 'dialog';\n this.restoreFocus = this.document.activeElement as HTMLElement | null;\n // A tour belongs to the page it was started on, the way `WrDialog` and\n // `WrDrawerManager` tie a modal to its URL. Nothing ended it on navigation,\n // so following a link mid-tour left the card pointing at an element the\n // router had just removed — the cut-out collapsed to a 12px box at the\n // corner, its 9999px shadow dimming the whole new page, and focus trapped in\n // a card about the page the user had left. `onUrlChange` rather than\n // `subscribe()`, which hears popstate alone and misses `router.navigate()`.\n this.stopWatchingUrl = this.location.onUrlChange(() => this.stop());\n this.goTo(0, 1);\n }\n\n /** Advance; finishes the tour past the last step. */\n next(): void {\n this.goTo(this.cursor() + 1, 1);\n }\n\n /** Go back; stays put on the first step. */\n prev(): void {\n this.goTo(this.cursor() - 1, -1);\n }\n\n /** End the tour and return focus where it was. */\n stop(): void {\n // Unhooked a microtask late, as `WrDialog` does: `Location` notifies with a\n // `forEach`, and unregistering from inside that notification splices the\n // array it is walking, which would skip the listener after ours.\n const unwatch = this.stopWatchingUrl;\n this.stopWatchingUrl = null;\n if (unwatch) queueMicrotask(unwatch);\n this.teardownStep();\n this.steps.set([]);\n this.cursor.set(-1);\n // Back to their resting answers. Without this a finished tour left both\n // holding whatever its last step said, so `isFirst` and `isLast` were the\n // only two signals here that still described a tour that had ended — while\n // `active`, `index`, `total` and `step` all reported idle.\n this.noStepAfter.set(false);\n this.noStepBefore.set(true);\n if (this.restoreFocus && typeof this.restoreFocus.focus === 'function') wrRestoreFocus(this.restoreFocus);\n this.restoreFocus = null;\n }\n\n /**\n * Move to `index`, skipping steps whose target is not in the DOM. `direction`\n * says which way to keep skipping, so a missing step never traps the tour\n * between two dead ends.\n */\n private goTo(index: number, direction: 1 | -1): void {\n const steps = this.steps();\n let i = index;\n while (i >= 0 && i < steps.length && this.resolve(steps[i]) === null) i += direction;\n\n if (i < 0) {\n // Ran off the start while going back — stay where we were.\n return;\n }\n if (i >= steps.length) {\n this.stop();\n return;\n }\n\n // Focus inside the card that is about to go stays in the tour: the next card\n // takes it, whatever `autoFocus` says about a card opening.\n const active = this.document.activeElement;\n const hadFocus = !!active && !!this.overlayRef?.overlayElement.contains(active);\n this.teardownStep();\n this.cursor.set(i);\n this.noStepAfter.set(!this.anyResolvableAfter(i));\n this.noStepBefore.set(!this.anyResolvableBefore(i));\n this.openStep(steps[i], hadFocus);\n }\n\n /** Whether the tour has a step past `index` that can actually be shown. */\n private anyResolvableAfter(index: number): boolean {\n const steps = this.steps();\n for (let i = index + 1; i < steps.length; i += 1) {\n if (this.resolve(steps[i]) !== null) return true;\n }\n return false;\n }\n\n /** Whether the tour has a step before `index` that can actually be shown. */\n private anyResolvableBefore(index: number): boolean {\n const steps = this.steps();\n for (let i = index - 1; i >= 0; i -= 1) {\n if (this.resolve(steps[i]) !== null) return true;\n }\n return false;\n }\n\n private resolve(step: WrTourStep): HTMLElement | null {\n if (typeof step.target !== 'string') return step.target.isConnected ? step.target : null;\n return this.document.querySelector<HTMLElement>(step.target);\n }\n\n private openStep(step: WrTourStep, hadFocus: boolean): void {\n const target = this.resolve(step);\n if (!target) return;\n\n target.scrollIntoView({ block: 'center', inline: 'nearest', behavior: 'smooth' });\n\n // The cut-out is a bare element sized to the target with an enormous spread\n // shadow: everything outside it dims, the target itself stays untouched.\n // Cheaper and far more robust than a clip-path polygon, and it needs no\n // recompute when the page reflows beyond moving the box.\n const spotlight = this.document.createElement('div');\n spotlight.className = 'wr-tour__spotlight';\n spotlight.setAttribute('aria-hidden', 'true');\n this.document.body.appendChild(spotlight);\n this.spotlight = spotlight;\n this.placeSpotlight(target);\n\n const placement = step.placement ?? 'bottom';\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(target)\n .withPositions(this.stepPositions(placement, this.isRtl()))\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: wrToClassList('wr-tour-overlay', step.panelClass),\n });\n\n // The CDK read the direction once, just now. A tour is long-lived by nature\n // — a step can sit on screen while the user changes a language setting — and\n // without this the card keeps the direction the step opened in, with the\n // 12px gap that held it clear of the spotlight now pointing into it.\n // Per step, because every move disposes this ref and builds the next.\n //\n // The cut-out moves with it. The target itself changes place when the page\n // mirrors, and the spotlight is re-measured only on scroll and resize, so a\n // flip left it highlighting empty space while the card, re-placed by the CDK,\n // pointed at the target sitting under the dim. The flip has already been laid\n // out by the time this runs — the CDK measures the same element right after.\n wrFollowDirection(this.overlayRef, this.dir, this.injector, direction => {\n positionStrategy.withPositions(this.stepPositions(placement, direction === 'rtl'));\n this.placeSpotlight(target);\n });\n\n const portal = new ComponentPortal(\n WrTourPopup,\n null,\n Injector.create({ parent: this.injector, providers: [{ provide: WR_TOUR_STEP, useValue: this }] })\n );\n const ref = this.overlayRef.attach(portal);\n\n // Kept on the instance, not in a local: a trap registers with CDK's\n // `FocusTrapManager` and installs a capture-phase document focus listener, so an\n // undestroyed one leaks per STEP and every tour left a stack of them behind.\n const card = ref.location.nativeElement as HTMLElement;\n this.focusTrap = this.focusTrapFactory.create(card);\n // Onto Next only when asked. Otherwise the card itself takes focus, so the\n // keyboard is in the tour and no button is lit; under `false` only when the\n // card before it held focus, which would otherwise fall to `<body>`.\n wrFocusOverlay(\n card,\n this.focusTrap,\n this.autoFocus === false && hadFocus ? 'dialog' : this.autoFocus,\n this.injector\n );\n\n const onKey = (event: KeyboardEvent): void => {\n // The listener is on the document, so a step shown over a dialog would see the\n // Escape that dialog just handled and close the tour too.\n if (event.key === 'Escape' && !event.defaultPrevented) {\n event.preventDefault();\n this.stop();\n }\n };\n this.document.addEventListener('keydown', onKey);\n this.detachKeydown = () => this.document.removeEventListener('keydown', onKey);\n\n const reposition = (): void => this.placeSpotlight(target);\n window.addEventListener('scroll', reposition, true);\n window.addEventListener('resize', reposition);\n this.detachReposition = () => {\n window.removeEventListener('scroll', reposition, true);\n window.removeEventListener('resize', reposition);\n };\n }\n\n /**\n * The card's fallback table for one placement, with its inline offsets already\n * mirrored. Built per call rather than per step: the direction can change while\n * the step is on screen, and a table is what has to be rebuilt when it does.\n */\n private stepPositions(placement: WrTourPlacement, isRtl: boolean): ConnectedPosition[] {\n return wrMirrorOffsets(\n FALLBACKS[placement].map(side => ({\n ...CONNECTED[side],\n offsetY: side === 'bottom' ? 12 : side === 'top' ? -12 : 0,\n offsetX: side === 'right' ? 12 : side === 'left' ? -12 : 0,\n })),\n isRtl\n );\n }\n\n private placeSpotlight(target: HTMLElement): void {\n const el = this.spotlight;\n if (!el) return;\n const r = target.getBoundingClientRect();\n const pad = 6;\n el.style.top = `${r.top - pad}px`;\n el.style.left = `${r.left - pad}px`;\n el.style.width = `${r.width + pad * 2}px`;\n el.style.height = `${r.height + pad * 2}px`;\n }\n\n private teardownStep(): void {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n this.detachKeydown?.();\n this.detachKeydown = null;\n this.detachReposition?.();\n this.detachReposition = null;\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.spotlight?.remove();\n this.spotlight = null;\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"],"mappings":";;;;;;;;;;;;;;;;;AAyCA,MAAa,eAAe,IAAI,eAAiC,cAAc;AAqB/E,IAAa,cAAb,MAAa,YAAW;CACtB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,MAAM;CACzE;CAEmB,OAAO,OAAO,YAAY;CAI1B,YAAY,eAAe,aAAa,MAAM;CAC9C,YAAY,eAAe,aAAa,MAAM;CAC9C,YAAY,eAAe,aAAa,MAAM;CAC9C,YAAY,eAAe,aAAa,WAA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AO;EACrC,GAAG,MAAM,SAAS,GAAG,EAAE,SAAS,GAAO;CACzC;CAEQ,eAAY;EAClB,KAAK,WAAW,QAAO;EACvB,KAAK,YAAY;EACjB,KAAK,gBAAe;EACpB,KAAK,gBAAgB;EACrB,KAAK,mBAAkB;EACvB,KAAK,mBAAmB;EACxB,KAAK,YAAY,QAAO;EACxB,KAAK,aAAa;EAClB,KAAK,WAAW,OAAM;EACtB,KAAK,YAAY;CACnB;CASQ,QAAK;EACX,OAAO,KAAK,KAAK,UAAU;CAC7B;CA9TW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAM,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAN,OAAA,QAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;CAAM,CAAA;;AAAN,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAM,YAAA,CAAA,EADlB,MAAA,Q"}
|
|
1
|
+
{"version":3,"file":"ngwr-tour.mjs","names":[],"sources":["../../../projects/lib/tour/tour-popup.ts","../../../projects/lib/tour/tour-popup.html","../../../projects/lib/tour/tour.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 { Component, InjectionToken, ViewEncapsulation, computed, inject } from '@angular/core';\n\nimport { WrButton } from 'ngwr/button';\nimport { wrReadI18nText, useI18nFormatter } from 'ngwr/i18n';\nimport { wrCheckStyles, wrRandomId } from 'ngwr/utils';\n\nimport type { WrTourStep } from './types';\n\n/** What the popup needs from the running tour, without importing the service (cycle). */\nexport interface WrTourController {\n readonly index: () => number;\n readonly total: () => number;\n readonly step: () => WrTourStep | null;\n /**\n * Whether this is the last step the user will actually see — the service looks\n * ahead for a reachable one, because a trailing step whose target is missing gets\n * skipped and the raw count would call the final card \"Next\".\n */\n readonly isLast: () => boolean;\n /**\n * Whether this is the first step the user will actually see — the service looks\n * BEHIND for a reachable one, for the mirror reason: a leading step whose target\n * is missing gets skipped, so the tour opens on a later index and the raw one\n * would put a Back button on the very first card.\n */\n readonly isFirst: () => boolean;\n /** Whether the card opens with focus on Next: the tour's `autoFocus` is `'first-tabbable'`. */\n readonly focusNext: () => boolean;\n next(): void;\n prev(): void;\n stop(): void;\n}\n\n/** Provided by `WrTour` when it attaches the popup portal. */\nexport const WR_TOUR_STEP = new InjectionToken<WrTourController>('WR_TOUR_STEP');\n\n/**\n * The card a tour shows next to the spotlit element. Rendered by `WrTour` into\n * a CDK overlay — not something you place yourself.\n *\n * @see https://ngwr.dev/reference/services/tour\n */\n@Component({\n selector: 'wr-tour-popup',\n templateUrl: './tour-popup.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-tour-popup',\n role: 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.aria-describedby]': 'contentId',\n },\n imports: [WrButton],\n})\nexport class WrTourPopup {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('tour');\n }\n\n protected readonly tour = inject(WR_TOUR_STEP);\n\n // `wrReadI18nText`, not `useI18nText`: these have no consumer-facing input to\n // forward. Both helpers are reactive.\n protected readonly nextLabel = wrReadI18nText('tour.next', 'Next');\n protected readonly backLabel = wrReadI18nText('tour.back', 'Back');\n protected readonly doneLabel = wrReadI18nText('tour.done', 'Done');\n protected readonly skipLabel = wrReadI18nText('tour.skip', 'Skip tour');\n\n /** `Step {{current}} of {{total}}`, the second half of the dialog's name. */\n protected readonly progress = useI18nFormatter('tour.progress', 'Step {{current}} of {{total}}');\n\n // From the service, not `index() >= total() - 1`: a trailing step whose target is\n // missing gets skipped, so the raw count called the final card \"Next\" and then\n // ended the tour when it was pressed.\n protected readonly isLast = computed(() => this.tour.isLast());\n // Same story at the other end, and the same fix: `index() <= 0` rendered a Back\n // button on the first card of a tour whose leading step had been skipped, and\n // `prev()` walks off the start and returns — so the button did nothing at all.\n protected readonly isFirst = computed(() => this.tour.isFirst());\n\n protected readonly progressText = computed(() =>\n this.progress({ current: this.tour.index() + 1, total: this.tour.total() })\n );\n\n protected readonly titleId = wrRandomId('wr-tour-title');\n protected readonly progressId = wrRandomId('wr-tour-progress');\n protected readonly contentId = wrRandomId('wr-tour-content');\n\n /**\n * The dialog is named by its title and the progress line, or by the progress\n * line alone for an untitled step, and described by the step's text: a screen\n * reader reads a dialog's name and description when focus enters it, and\n * nothing else of what it holds.\n */\n protected readonly labelledBy = computed(() =>\n this.tour.step()?.title ? `${this.titleId} ${this.progressId}` : this.progressId\n );\n}\n","@let step = tour.step();\n\n<p class=\"wr-tour-popup__progress\" [id]=\"progressId\">{{ progressText() }}</p>\n\n@if (step?.title; as title) {\n <h2 class=\"wr-tour-popup__title\" [id]=\"titleId\">{{ title }}</h2>\n}\n\n<p class=\"wr-tour-popup__content\" [id]=\"contentId\">{{ step?.content }}</p>\n\n<div class=\"wr-tour-popup__actions\">\n <!-- The three buttons are told apart by a class rather than by their position in\n the row: the back button is conditional, so an index means one thing on the\n first step and another everywhere else — and the labels are translated. -->\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-tour-popup__action wr-tour-popup__action--skip\"\n (click)=\"tour.stop()\"\n >\n {{ skipLabel() }}\n </button>\n\n <span class=\"wr-tour-popup__spacer\"></span>\n\n @if (!isFirst()) {\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-tour-popup__action wr-tour-popup__action--back\"\n (click)=\"tour.prev()\"\n >\n {{ backLabel() }}\n </button>\n }\n <!-- Under `autoFocus: 'first-tabbable'` focus opens on the button that walks the\n tour, not on Skip, the first in the row: the focus trap reads\n `cdkFocusInitial`, as the confirm dialog has it. -->\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n color=\"primary\"\n class=\"wr-tour-popup__action wr-tour-popup__action--next\"\n [attr.cdkFocusInitial]=\"tour.focusNext() ? '' : null\"\n (click)=\"tour.next()\"\n >\n {{ isLast() ? doneLabel() : nextLabel() }}\n </button>\n</div>\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 { type ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { type ConnectedPosition, type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Location, isPlatformBrowser } from '@angular/common';\nimport {\n DOCUMENT,\n DestroyRef,\n EnvironmentInjector,\n Injector,\n PLATFORM_ID,\n Service,\n computed,\n inject,\n signal,\n} from '@angular/core';\n\nimport { WR_OVERLAY, type WrOverlayAutoFocus, wrFocusOverlay, wrFollowDirection, wrMirrorOffsets } from 'ngwr/overlay';\nimport { wrIsComposing, wrRestoreFocus, wrToClassList } from 'ngwr/utils';\n\nimport { WR_TOUR_STEP, WrTourPopup } from './tour-popup';\nimport type { WrTourOptions, WrTourPlacement, WrTourStep } from './types';\n\n/** Fallback order per preferred side — the opposite side first, then the sides. */\nconst FALLBACKS: Record<WrTourPlacement, readonly WrTourPlacement[]> = {\n bottom: ['bottom', 'top', 'right', 'left'],\n top: ['top', 'bottom', 'right', 'left'],\n left: ['left', 'right', 'bottom', 'top'],\n right: ['right', 'left', 'bottom', 'top'],\n};\n\nconst CONNECTED: Record<\n WrTourPlacement,\n {\n originX: 'start' | 'center' | 'end';\n originY: 'top' | 'center' | 'bottom';\n overlayX: 'start' | 'center' | 'end';\n overlayY: 'top' | 'center' | 'bottom';\n }\n> = {\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\n};\n\n/**\n * Guided product tour: a spotlight over one element at a time plus a popup\n * explaining it.\n *\n * Steps are data, not markup — call `start()` with an array and the service owns\n * the overlay, the cut-out, focus and the keyboard. A step whose target is not\n * on the page is skipped rather than shown floating, so a tour survives a\n * feature being hidden behind a flag or a permission.\n *\n * @example\n * ```ts\n * private readonly tour = inject(WrTour);\n *\n * showMeAround(): void {\n * this.tour.start([\n * { target: '[data-tour=\"search\"]', title: 'Search', content: 'Find anything by name.' },\n * { target: '[data-tour=\"filters\"]', content: 'Narrow the list down.', placement: 'right' },\n * ]);\n * }\n * ```\n *\n * @see https://ngwr.dev/reference/services/tour\n */\n@Service()\nexport class WrTour {\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly injector = inject(EnvironmentInjector);\n private readonly focusTrapFactory = inject(ConfigurableFocusTrapFactory);\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly location = inject(Location);\n\n private readonly steps = signal<readonly WrTourStep[]>([]);\n private readonly cursor = signal(-1);\n\n private overlayRef: OverlayRef | null = null;\n private focusTrap: ConfigurableFocusTrap | null = null;\n private spotlight: HTMLElement | null = null;\n private detachKeydown: (() => void) | null = null;\n private detachReposition: (() => void) | null = null;\n private restoreFocus: HTMLElement | null = null;\n private autoFocus: WrOverlayAutoFocus = 'dialog';\n /** `focusNext` for the card, see {@link WrTourController}. */\n readonly focusNext = (): boolean => this.autoFocus === 'first-tabbable';\n private stopWatchingUrl: (() => void) | null = null;\n\n /** Whether a tour is running. */\n readonly active = computed(() => this.cursor() >= 0);\n\n /** Zero-based index of the current step, `-1` when idle. */\n readonly index = computed(() => this.cursor());\n\n /** How many steps this tour has. */\n readonly total = computed(() => this.steps().length);\n\n /** The step being shown, or `null` when idle. */\n readonly step = computed<WrTourStep | null>(() => this.steps()[this.cursor()] ?? null);\n\n // Whether any step AFTER the current one can actually be shown. Settled once per\n // move, in `goTo`, because reachability is a DOM question and not a signal.\n private readonly noStepAfter = signal(false);\n\n // The same question looking the other way. Settled in `goTo` for the same reason.\n //\n // `true` at rest, and the asymmetry with `noStepAfter` is deliberate: with no\n // tour running there is no step, so both questions are vacuous, and the pair\n // is set to whatever keeps a naive template honest. `@if (!tour.isFirst())`\n // around a Back button is the obvious way to write it, and at `false` that\n // button appears with no tour on screen.\n private readonly noStepBefore = signal(true);\n\n /**\n * Whether this is the last step the user will see. Not `index() === total() - 1`:\n * a trailing step whose target is missing is skipped, so comparing against the\n * raw count left the primary button reading \"Next\" on the final card and then\n * ending the tour when it was pressed. `false` while no tour is running.\n */\n readonly isLast = computed(() => this.noStepAfter());\n\n /**\n * Whether this is the first step the user will see. Not `index() === 0`, for the\n * mirror of the reason above: a LEADING step whose target is missing is skipped,\n * so the tour opens on a later index and the raw one put a Back button on the\n * first card — one that did nothing at all, because `prev()` walks off the start\n * and returns without moving. `true` while no tour is running — see the signal\n * it reads.\n */\n readonly isFirst = computed(() => this.noStepBefore());\n\n constructor() {\n // Everything this service owns lives OUTSIDE its own injector: a CDK overlay, a\n // div appended to `document.body`, a document keydown listener and two window\n // listeners. Nothing removes them when the injector goes, so a tour running at\n // teardown left its cut-out on the page.\n inject(DestroyRef).onDestroy(() => this.stop());\n }\n\n /**\n * Begin a tour. Restarts if one is already running. A no-op under SSR — a\n * tour is a client-side affordance and there is nothing to spotlight on the\n * server.\n */\n start(steps: readonly WrTourStep[], options: WrTourOptions = {}): void {\n if (!this.isBrowser || steps.length === 0) return;\n this.stop();\n this.steps.set(steps);\n this.autoFocus = options.autoFocus ?? 'dialog';\n this.restoreFocus = this.document.activeElement as HTMLElement | null;\n // A tour belongs to the page it was started on, the way `WrDialog` and\n // `WrDrawerManager` tie a modal to its URL. Nothing ended it on navigation,\n // so following a link mid-tour left the card pointing at an element the\n // router had just removed — the cut-out collapsed to a 12px box at the\n // corner, its 9999px shadow dimming the whole new page, and focus trapped in\n // a card about the page the user had left. `onUrlChange` rather than\n // `subscribe()`, which hears popstate alone and misses `router.navigate()`.\n this.stopWatchingUrl = this.location.onUrlChange(() => this.stop());\n this.goTo(0, 1);\n }\n\n /** Advance; finishes the tour past the last step. */\n next(): void {\n this.goTo(this.cursor() + 1, 1);\n }\n\n /** Go back; stays put on the first step. */\n prev(): void {\n this.goTo(this.cursor() - 1, -1);\n }\n\n /** End the tour and return focus where it was. */\n stop(): void {\n // Unhooked a microtask late, as `WrDialog` does: `Location` notifies with a\n // `forEach`, and unregistering from inside that notification splices the\n // array it is walking, which would skip the listener after ours.\n const unwatch = this.stopWatchingUrl;\n this.stopWatchingUrl = null;\n if (unwatch) queueMicrotask(unwatch);\n this.teardownStep();\n this.steps.set([]);\n this.cursor.set(-1);\n // Back to their resting answers. Without this a finished tour left both\n // holding whatever its last step said, so `isFirst` and `isLast` were the\n // only two signals here that still described a tour that had ended — while\n // `active`, `index`, `total` and `step` all reported idle.\n this.noStepAfter.set(false);\n this.noStepBefore.set(true);\n if (this.restoreFocus && typeof this.restoreFocus.focus === 'function') wrRestoreFocus(this.restoreFocus);\n this.restoreFocus = null;\n }\n\n /**\n * Move to `index`, skipping steps whose target is not in the DOM. `direction`\n * says which way to keep skipping, so a missing step never traps the tour\n * between two dead ends.\n */\n private goTo(index: number, direction: 1 | -1): void {\n const steps = this.steps();\n let i = index;\n while (i >= 0 && i < steps.length && this.resolve(steps[i]) === null) i += direction;\n\n if (i < 0) {\n // Ran off the start while going back — stay where we were.\n return;\n }\n if (i >= steps.length) {\n this.stop();\n return;\n }\n\n // Focus inside the card that is about to go stays in the tour: the next card\n // takes it, whatever `autoFocus` says about a card opening.\n const active = this.document.activeElement;\n const hadFocus = !!active && !!this.overlayRef?.overlayElement.contains(active);\n this.teardownStep();\n this.cursor.set(i);\n this.noStepAfter.set(!this.anyResolvableAfter(i));\n this.noStepBefore.set(!this.anyResolvableBefore(i));\n this.openStep(steps[i], hadFocus);\n }\n\n /** Whether the tour has a step past `index` that can actually be shown. */\n private anyResolvableAfter(index: number): boolean {\n const steps = this.steps();\n for (let i = index + 1; i < steps.length; i += 1) {\n if (this.resolve(steps[i]) !== null) return true;\n }\n return false;\n }\n\n /** Whether the tour has a step before `index` that can actually be shown. */\n private anyResolvableBefore(index: number): boolean {\n const steps = this.steps();\n for (let i = index - 1; i >= 0; i -= 1) {\n if (this.resolve(steps[i]) !== null) return true;\n }\n return false;\n }\n\n private resolve(step: WrTourStep): HTMLElement | null {\n if (typeof step.target !== 'string') return step.target.isConnected ? step.target : null;\n return this.document.querySelector<HTMLElement>(step.target);\n }\n\n private openStep(step: WrTourStep, hadFocus: boolean): void {\n const target = this.resolve(step);\n if (!target) return;\n\n const reduced = this.document.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n target.scrollIntoView({ block: 'center', inline: 'nearest', behavior: reduced ? 'instant' : 'smooth' });\n\n // The cut-out is a bare element sized to the target with an enormous spread\n // shadow: everything outside it dims, the target itself stays untouched.\n // Cheaper and far more robust than a clip-path polygon, and it needs no\n // recompute when the page reflows beyond moving the box.\n const spotlight = this.document.createElement('div');\n spotlight.className = 'wr-tour__spotlight';\n spotlight.setAttribute('aria-hidden', 'true');\n this.document.body.appendChild(spotlight);\n // Into the top layer, where a dialog or a drawer holding the target is. It is\n // promoted before the card's overlay is created, so the card stays above it.\n // Set here and not in a template: a `popover` attribute hides the element\n // until it is shown, which a browser without the API never does.\n if (typeof spotlight.showPopover === 'function') {\n spotlight.setAttribute('popover', 'manual');\n spotlight.showPopover();\n }\n this.spotlight = spotlight;\n this.placeSpotlight(target);\n\n const placement = step.placement ?? 'bottom';\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(target)\n .withPositions(this.stepPositions(placement, this.isRtl()))\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: wrToClassList('wr-tour-overlay', step.panelClass),\n });\n\n // The CDK read the direction once, just now. A tour is long-lived by nature\n // — a step can sit on screen while the user changes a language setting — and\n // without this the card keeps the direction the step opened in, with the\n // 12px gap that held it clear of the spotlight now pointing into it.\n // Per step, because every move disposes this ref and builds the next.\n //\n // The cut-out moves with it. The target itself changes place when the page\n // mirrors, and the spotlight is re-measured only on scroll and resize, so a\n // flip left it highlighting empty space while the card, re-placed by the CDK,\n // pointed at the target sitting under the dim. The flip has already been laid\n // out by the time this runs — the CDK measures the same element right after.\n wrFollowDirection(this.overlayRef, this.dir, this.injector, direction => {\n positionStrategy.withPositions(this.stepPositions(placement, direction === 'rtl'));\n this.placeSpotlight(target);\n });\n\n const portal = new ComponentPortal(\n WrTourPopup,\n null,\n Injector.create({ parent: this.injector, providers: [{ provide: WR_TOUR_STEP, useValue: this }] })\n );\n const ref = this.overlayRef.attach(portal);\n\n // Kept on the instance, not in a local: a trap registers with CDK's\n // `FocusTrapManager` and installs a capture-phase document focus listener, so an\n // undestroyed one leaks per STEP and every tour left a stack of them behind.\n const card = ref.location.nativeElement as HTMLElement;\n this.focusTrap = this.focusTrapFactory.create(card);\n // Onto Next only when asked. Otherwise the card itself takes focus, so the\n // keyboard is in the tour and no button is lit; under `false` only when the\n // card before it held focus, which would otherwise fall to `<body>`.\n wrFocusOverlay(\n card,\n this.focusTrap,\n this.autoFocus === false && hadFocus ? 'dialog' : this.autoFocus,\n this.injector\n );\n\n const onKey = (event: KeyboardEvent): void => {\n // The listener is on the document, so a step shown over a dialog would see the\n // Escape that dialog just handled and close the tour too.\n if (event.key === 'Escape' && !event.defaultPrevented && !wrIsComposing(event)) {\n event.preventDefault();\n this.stop();\n }\n };\n this.document.addEventListener('keydown', onKey);\n this.detachKeydown = () => this.document.removeEventListener('keydown', onKey);\n\n const reposition = (): void => this.placeSpotlight(target);\n window.addEventListener('scroll', reposition, true);\n window.addEventListener('resize', reposition);\n this.detachReposition = () => {\n window.removeEventListener('scroll', reposition, true);\n window.removeEventListener('resize', reposition);\n };\n }\n\n /**\n * The card's fallback table for one placement, with its inline offsets already\n * mirrored. Built per call rather than per step: the direction can change while\n * the step is on screen, and a table is what has to be rebuilt when it does.\n */\n private stepPositions(placement: WrTourPlacement, isRtl: boolean): ConnectedPosition[] {\n return wrMirrorOffsets(\n FALLBACKS[placement].map(side => ({\n ...CONNECTED[side],\n offsetY: side === 'bottom' ? 12 : side === 'top' ? -12 : 0,\n offsetX: side === 'right' ? 12 : side === 'left' ? -12 : 0,\n })),\n isRtl\n );\n }\n\n private placeSpotlight(target: HTMLElement): void {\n const el = this.spotlight;\n if (!el) return;\n const r = target.getBoundingClientRect();\n const pad = 6;\n el.style.top = `${r.top - pad}px`;\n el.style.left = `${r.left - pad}px`;\n el.style.width = `${r.width + pad * 2}px`;\n el.style.height = `${r.height + pad * 2}px`;\n }\n\n private teardownStep(): void {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n this.detachKeydown?.();\n this.detachKeydown = null;\n this.detachReposition?.();\n this.detachReposition = null;\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.spotlight?.remove();\n this.spotlight = null;\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"],"mappings":";;;;;;;;;;;;;;;;;AAyCA,MAAa,eAAe,IAAI,eAAiC,cAAc;AAqB/E,IAAa,cAAb,MAAa,YAAW;CACtB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,MAAM;CACzE;CAEmB,OAAO,OAAO,YAAY;CAI1B,YAAY,eAAe,aAAa,MAAM;CAC9C,YAAY,eAAe,aAAa,MAAM;CAC9C,YAAY,eAAe,aAAa,MAAM;CAC9C,YAAY,eAAe,aAAa,WAAW;CAGnD,WAAW,iBAAiB,iBAAiB,+BA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tC,MAAM,MAAM;EACZ,GAAG,MAAM,MAAM,GAAG,EAAE,MAAM,IAAG;EAC7B,GAAG,MAAM,OAAO,GAAG,EAAE,OAAO,IAAG;EAC/B,GAAG,MAAM,QAAQ,GAAG,EAAE,QAAQ,GAAO;EACrC,GAAG,MAAM,SAAS,GAAG,EAAE,SAAS,GAAO;CACzC;CAEQ,eAAY;EAClB,KAAK,WAAW,QAAO;EACvB,KAAK,YAAY;EACjB,KAAK,gBAAe;EACpB,KAAK,gBAAgB;EACrB,KAAK,mBAAkB;EACvB,KAAK,mBAAmB;EACxB,KAAK,YAAY,QAAO;EACxB,KAAK,aAAa;EAClB,KAAK,WAAW,OAAM;EACtB,KAAK,YAAY;CACnB;CASQ,QAAK;EACX,OAAO,KAAK,KAAK,UAAU;CAC7B;CAvUW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAM,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAN,OAAA,QAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;CAAM,CAAA;;AAAN,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAM,YAAA,CAAA,EADlB,MAAA,Q"}
|
|
@@ -5,7 +5,7 @@ import { InjectionToken } from "@angular/core";
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
7
7
|
*/
|
|
8
|
-
const NGWR_VERSION = "16.
|
|
8
|
+
const NGWR_VERSION = "16.8.0";
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.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\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '16.
|
|
1
|
+
{"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.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\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '16.8.0';\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 { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n"],"mappings":";;;;;;;AAiBA,MAAa,eAAe;;;;;;;ACQ5B,MAAa,qBAAqB,IAAI,eAAuB,sBAAsB;CACjF,YAAY;CACZ,eAAe;AAChB,CAAA"}
|
package/i18n/ar.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "مخطط دائري مجوف",
|
|
268
|
-
"pieLabel": "مخطط دائري"
|
|
268
|
+
"pieLabel": "مخطط دائري",
|
|
269
|
+
"value": "القيمة",
|
|
270
|
+
"share": "الحصة"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "إظهار السلاسل أو إخفاؤها",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "التقدم"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "مقياس"
|
|
505
|
+
"label": "مقياس",
|
|
506
|
+
"value": "القيمة",
|
|
507
|
+
"share": "الحصة"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "القيمة"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "القيمة"
|
package/i18n/cs.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "Prstencový graf",
|
|
268
|
-
"pieLabel": "Koláčový graf"
|
|
268
|
+
"pieLabel": "Koláčový graf",
|
|
269
|
+
"value": "Hodnota",
|
|
270
|
+
"share": "Podíl"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "Přepnout viditelnost řad",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "Průběh"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "Měřidlo"
|
|
505
|
+
"label": "Měřidlo",
|
|
506
|
+
"value": "Hodnota",
|
|
507
|
+
"share": "Podíl"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "Hodnota"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "Hodnota"
|
package/i18n/de.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "Ringdiagramm",
|
|
268
|
-
"pieLabel": "Kreisdiagramm"
|
|
268
|
+
"pieLabel": "Kreisdiagramm",
|
|
269
|
+
"value": "Wert",
|
|
270
|
+
"share": "Anteil"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "Sichtbarkeit der Datenreihen umschalten",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "Fortschritt"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "Messwerte"
|
|
505
|
+
"label": "Messwerte",
|
|
506
|
+
"value": "Wert",
|
|
507
|
+
"share": "Anteil"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "Wert"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "Wert"
|
package/i18n/en.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "Donut chart",
|
|
268
|
-
"pieLabel": "Pie chart"
|
|
268
|
+
"pieLabel": "Pie chart",
|
|
269
|
+
"value": "Value",
|
|
270
|
+
"share": "Share"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "Toggle series visibility",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "Progress"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "Meter"
|
|
505
|
+
"label": "Meter",
|
|
506
|
+
"value": "Value",
|
|
507
|
+
"share": "Share"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "Value"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "Value"
|
package/i18n/es.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "Gráfico de anillo",
|
|
268
|
-
"pieLabel": "Gráfico circular"
|
|
268
|
+
"pieLabel": "Gráfico circular",
|
|
269
|
+
"value": "Valor",
|
|
270
|
+
"share": "Proporción"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "Mostrar u ocultar series",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "Progreso"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "Medidor"
|
|
505
|
+
"label": "Medidor",
|
|
506
|
+
"value": "Valor",
|
|
507
|
+
"share": "Proporción"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "Valor"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "Valor"
|
package/i18n/fr.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "Graphique en anneau",
|
|
268
|
-
"pieLabel": "Graphique en secteurs"
|
|
268
|
+
"pieLabel": "Graphique en secteurs",
|
|
269
|
+
"value": "Valeur",
|
|
270
|
+
"share": "Part"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "Afficher ou masquer les séries",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "Progression"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "Indicateur"
|
|
505
|
+
"label": "Indicateur",
|
|
506
|
+
"value": "Valeur",
|
|
507
|
+
"share": "Part"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "Valeur"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "Valeur"
|
package/i18n/he.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "תרשים טבעת",
|
|
268
|
-
"pieLabel": "תרשים עוגה"
|
|
268
|
+
"pieLabel": "תרשים עוגה",
|
|
269
|
+
"value": "ערך",
|
|
270
|
+
"share": "נתח"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "הצגה או הסתרה של סדרות",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "התקדמות"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "מד"
|
|
505
|
+
"label": "מד",
|
|
506
|
+
"value": "ערך",
|
|
507
|
+
"share": "נתח"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "ערך"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "ערך"
|
package/i18n/hi.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "डोनट चार्ट",
|
|
268
|
-
"pieLabel": "पाई चार्ट"
|
|
268
|
+
"pieLabel": "पाई चार्ट",
|
|
269
|
+
"value": "मान",
|
|
270
|
+
"share": "हिस्सा"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "सीरीज़ दिखाएँ या छिपाएँ",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "प्रगति"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "मीटर"
|
|
505
|
+
"label": "मीटर",
|
|
506
|
+
"value": "मान",
|
|
507
|
+
"share": "हिस्सा"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "मान"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "मान"
|
package/i18n/id.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "Diagram donat",
|
|
268
|
-
"pieLabel": "Diagram lingkaran"
|
|
268
|
+
"pieLabel": "Diagram lingkaran",
|
|
269
|
+
"value": "Nilai",
|
|
270
|
+
"share": "Porsi"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "Tampilkan atau sembunyikan seri",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "Kemajuan"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "Meteran"
|
|
505
|
+
"label": "Meteran",
|
|
506
|
+
"value": "Nilai",
|
|
507
|
+
"share": "Porsi"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "Nilai"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "Nilai"
|
package/i18n/it.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "Grafico ad anello",
|
|
268
|
-
"pieLabel": "Grafico a torta"
|
|
268
|
+
"pieLabel": "Grafico a torta",
|
|
269
|
+
"value": "Valore",
|
|
270
|
+
"share": "Quota"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "Mostra o nascondi le serie",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "Avanzamento"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "Misuratore"
|
|
505
|
+
"label": "Misuratore",
|
|
506
|
+
"value": "Valore",
|
|
507
|
+
"share": "Quota"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "Valore"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "Valore"
|
package/i18n/ja.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "ドーナツグラフ",
|
|
268
|
-
"pieLabel": "円グラフ"
|
|
268
|
+
"pieLabel": "円グラフ",
|
|
269
|
+
"value": "値",
|
|
270
|
+
"share": "割合"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "系列の表示を切り替え",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "進行状況"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "メーター"
|
|
505
|
+
"label": "メーター",
|
|
506
|
+
"value": "値",
|
|
507
|
+
"share": "割合"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "値"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "値"
|
package/i18n/kk.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "Сақиналы диаграмма",
|
|
268
|
-
"pieLabel": "Дөңгелек диаграмма"
|
|
268
|
+
"pieLabel": "Дөңгелек диаграмма",
|
|
269
|
+
"value": "Мәні",
|
|
270
|
+
"share": "Үлесі"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "Қатарларды көрсету немесе жасыру",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "Барысы"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "Шкала"
|
|
505
|
+
"label": "Шкала",
|
|
506
|
+
"value": "Мәні",
|
|
507
|
+
"share": "Үлесі"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "Мәні"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "Мәні"
|
package/i18n/ko.json
CHANGED
|
@@ -265,7 +265,9 @@
|
|
|
265
265
|
},
|
|
266
266
|
"donutChart": {
|
|
267
267
|
"label": "도넛 차트",
|
|
268
|
-
"pieLabel": "원형 차트"
|
|
268
|
+
"pieLabel": "원형 차트",
|
|
269
|
+
"value": "값",
|
|
270
|
+
"share": "비율"
|
|
269
271
|
},
|
|
270
272
|
"chartLegend": {
|
|
271
273
|
"toggleLabel": "계열 표시 전환",
|
|
@@ -500,7 +502,12 @@
|
|
|
500
502
|
"label": "진행률"
|
|
501
503
|
},
|
|
502
504
|
"meterGroup": {
|
|
503
|
-
"label": "측정값"
|
|
505
|
+
"label": "측정값",
|
|
506
|
+
"value": "값",
|
|
507
|
+
"share": "비율"
|
|
508
|
+
},
|
|
509
|
+
"sparkline": {
|
|
510
|
+
"value": "값"
|
|
504
511
|
},
|
|
505
512
|
"knob": {
|
|
506
513
|
"label": "값"
|