ngwr 13.0.1 → 14.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -13
- package/aurora/aurora.scss +1 -1
- package/aurora/styles/_dark.scss +21 -0
- package/aurora/styles/_index.scss +11 -30
- package/aurora/styles/_rules.scss +25 -0
- package/border-glow/styles/_dark.scss +46 -0
- package/border-glow/styles/_index.scss +5 -0
- package/border-glow/styles/_rules.scss +0 -31
- package/button/styles/_index.scss +16 -0
- package/color-picker/styles/_index.scss +43 -5
- package/event-calendar/styles/_index.scss +15 -0
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +7 -7
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +4 -4
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +14 -4
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs +16 -5
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +7 -7
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +88 -10
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-calendar-testing.mjs +15 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +53 -7
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +4 -4
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-circular-text.mjs +23 -4
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +3 -3
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs +23 -7
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +93 -14
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +29 -5
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +18 -12
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-adapters-fns.mjs +104 -36
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-picker-testing.mjs +10 -2
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +118 -28
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +483 -82
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +15 -15
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-drag-drop.mjs +37 -9
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +18 -18
- package/fesm2022/ngwr-dropdown.mjs +29 -12
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +6 -6
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +3 -3
- package/fesm2022/ngwr-file-upload.mjs +55 -15
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form-testing.mjs +13 -7
- package/fesm2022/ngwr-form-testing.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +44 -25
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text.mjs +3 -3
- package/fesm2022/ngwr-gradient-text.mjs +3 -3
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-en.mjs +63 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +28 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +159 -31
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs +5 -5
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +23 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +37 -26
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +22 -4
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +4 -4
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +3 -3
- package/fesm2022/ngwr-list.mjs +7 -7
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs +73 -0
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -0
- package/fesm2022/ngwr-loading-bar.mjs +27 -38
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +6 -6
- package/fesm2022/ngwr-marquee.mjs +3 -3
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +109 -19
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +6 -6
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +11 -10
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +67 -32
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -21
- 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 +7 -6
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- 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 +48 -22
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +12 -8
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +217 -59
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +7 -7
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +12 -8
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text.mjs +3 -3
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card.mjs +7 -7
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +7 -6
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +44 -13
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +11 -3
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +51 -28
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +158 -0
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -0
- package/fesm2022/ngwr-tabs-testing.mjs +13 -11
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +104 -16
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +46 -6
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +90 -4
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +7 -7
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +116 -11
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +6 -6
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +4 -4
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +35 -12
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +37 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-waves.mjs +4 -4
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +10 -2
- package/fesm2022/ngwr-window-testing.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +15 -15
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/i18n/en.json +33 -6
- package/i18n/ru.json +33 -6
- package/llms-full.txt +29 -20
- package/llms.txt +127 -25
- package/mcp/catalog.js +3 -3
- package/mcp/providers.js +11 -0
- package/package.json +9 -1
- package/schematics/migrations/v13/index.js +101 -0
- package/schematics/migrations/v14/index.js +422 -0
- package/schematics/migrations.json +10 -0
- package/schematics/page/templates.js +1 -1
- package/schematics/use/symbol-map.json +1 -0
- package/shiny-text/styles/_dark.scss +20 -0
- package/shiny-text/styles/_index.scss +5 -0
- package/shiny-text/styles/_rules.scss +0 -4
- package/skills/ngwr/SKILL.md +4 -1
- package/skills/ngwr/references/catalog.md +2 -0
- package/skills/ngwr/references/setup.md +4 -0
- package/spotlight-card/styles/_dark.scss +21 -0
- package/spotlight-card/styles/_index.scss +5 -0
- package/spotlight-card/styles/_rules.scss +0 -6
- package/star-border/styles/_dark.scss +21 -0
- package/star-border/styles/_index.scss +5 -0
- package/star-border/styles/_rules.scss +0 -5
- package/stepper/styles/_index.scss +19 -1
- package/textarea/styles/_index.scss +14 -6
- package/theme/styles/_colors.scss +102 -0
- package/theme/styles/_focus.scss +31 -1
- package/tilt-card/styles/_dark.scss +21 -0
- package/tilt-card/styles/_index.scss +5 -0
- package/tilt-card/styles/_rules.scss +0 -5
- package/toast/styles/_index.scss +12 -4
- package/types/ngwr-alert.d.ts +3 -3
- package/types/ngwr-blur-text.d.ts +8 -0
- package/types/ngwr-button.d.ts +45 -2
- package/types/ngwr-calendar-testing.d.ts +21 -4
- package/types/ngwr-calendar.d.ts +37 -0
- package/types/ngwr-circular-text.d.ts +9 -0
- package/types/ngwr-collapse.d.ts +19 -15
- package/types/ngwr-color-picker-testing.d.ts +10 -4
- package/types/ngwr-color-picker.d.ts +70 -2
- package/types/ngwr-command-palette.d.ts +14 -0
- package/types/ngwr-context-menu.d.ts +1 -1
- package/types/ngwr-date-adapters-fns.d.ts +71 -29
- package/types/ngwr-date-picker-testing.d.ts +206 -185
- package/types/ngwr-date-picker.d.ts +7 -0
- package/types/ngwr-date.d.ts +143 -13
- package/types/ngwr-drag-drop.d.ts +19 -0
- package/types/ngwr-dropdown.d.ts +18 -2
- package/types/ngwr-event-calendar-testing.d.ts +12 -9
- package/types/ngwr-file-upload.d.ts +31 -3
- package/types/ngwr-form-testing.d.ts +13 -7
- package/types/ngwr-form.d.ts +47 -12
- package/types/ngwr-i18n.d.ts +89 -7
- package/types/ngwr-input-number.d.ts +1 -1
- package/types/ngwr-input-otp.d.ts +3 -0
- package/types/ngwr-input.d.ts +13 -5
- package/types/ngwr-knob-testing.d.ts +8 -4
- package/types/ngwr-knob.d.ts +18 -0
- package/types/ngwr-loading-bar-router.d.ts +35 -0
- package/types/ngwr-loading-bar.d.ts +19 -9
- package/types/ngwr-mention.d.ts +13 -0
- package/types/ngwr-pagination-testing.d.ts +11 -10
- package/types/ngwr-pagination.d.ts +39 -10
- package/types/ngwr-popconfirm.d.ts +1 -1
- package/types/ngwr-popover.d.ts +1 -1
- package/types/ngwr-rating.d.ts +25 -4
- package/types/ngwr-segmented.d.ts +1 -0
- package/types/ngwr-select.d.ts +110 -19
- package/types/ngwr-slider.d.ts +1 -0
- package/types/ngwr-splitter-testing.d.ts +9 -4
- package/types/ngwr-squircle.d.ts +1 -1
- package/types/ngwr-statistic.d.ts +22 -2
- package/types/ngwr-storage.d.ts +39 -1
- package/types/ngwr-table.d.ts +24 -5
- package/types/ngwr-tabs-router.d.ts +67 -0
- package/types/ngwr-tabs-testing.d.ts +12 -10
- package/types/ngwr-tabs.d.ts +103 -6
- package/types/ngwr-textarea.d.ts +29 -0
- package/types/ngwr-theme.d.ts +92 -2
- package/types/ngwr-toast.d.ts +53 -0
- package/types/ngwr-tree.d.ts +10 -2
- package/types/ngwr-utils.d.ts +33 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window-testing.d.ts +11 -3
- package/types/ngwr-window.d.ts +11 -4
- package/waves/styles/_dark.scss +19 -0
- package/waves/styles/_index.scss +5 -0
- package/waves/styles/_rules.scss +0 -3
- package/window/styles/_index.scss +1 -1
package/types/ngwr-table.d.ts
CHANGED
|
@@ -145,7 +145,7 @@ interface WrTableColumn {
|
|
|
145
145
|
/**
|
|
146
146
|
* Footer aggregate for this column — renders a summary row when any column
|
|
147
147
|
* sets it. Computed over the current `items`, so in server-side mode
|
|
148
|
-
* (`
|
|
148
|
+
* (`total` set) it reflects the current page, not the whole dataset.
|
|
149
149
|
*/
|
|
150
150
|
readonly summary?: WrTableSummary;
|
|
151
151
|
}
|
|
@@ -471,8 +471,16 @@ declare class WrTable {
|
|
|
471
471
|
* Total row count for server-side pagination — when set, the table
|
|
472
472
|
* shows the pager but does NOT slice `items` (you provide the current
|
|
473
473
|
* page's slice yourself and react to `(page)` changes).
|
|
474
|
+
*
|
|
475
|
+
* Spelled `total` / `page` to match `<wr-pagination>`, which is the control
|
|
476
|
+
* this input renders. The two used to disagree about both words — `totalItems`
|
|
477
|
+
* / `page` here against `total` / `currentPage` there — which is a real cost
|
|
478
|
+
* for two components designed to sit on one screen. `null` rather than `0` is
|
|
479
|
+
* the difference that remains, and it carries meaning: it is the OFF switch
|
|
480
|
+
* for server mode, where the pager's own `total` is a count and `0` means an
|
|
481
|
+
* empty list.
|
|
474
482
|
*/
|
|
475
|
-
readonly
|
|
483
|
+
readonly total: _angular_core.InputSignal<number | null>;
|
|
476
484
|
/**
|
|
477
485
|
* Window the `<tbody>` so a table of thousands of rows keeps only ~one
|
|
478
486
|
* viewport of `<tr>`s in the DOM. Opt-in and OFF by default — a table
|
|
@@ -481,7 +489,7 @@ declare class WrTable {
|
|
|
481
489
|
* Engages ONLY on the flat, fixed-height tier: it silently falls back to the
|
|
482
490
|
* full render whenever a variable-height layout is active — `groupBy`, a
|
|
483
491
|
* `[wrTableExpand]` template, `responsive` card mode, or a visible pager
|
|
484
|
-
* (`pageSize > 0` / `
|
|
492
|
+
* (`pageSize > 0` / `total`). While on, it forces fixed layout for
|
|
485
493
|
* stable column widths and assumes a uniform row height (see `rowHeight`).
|
|
486
494
|
*
|
|
487
495
|
* Intended as static config. Give columns an explicit `width` so the frozen
|
|
@@ -737,7 +745,7 @@ declare class WrTable {
|
|
|
737
745
|
* titles, then one row per item in the current column order. Values are taken
|
|
738
746
|
* from the row data, not from custom `[wrTableCell]` templates.
|
|
739
747
|
*
|
|
740
|
-
* Covers the current `items`, so in server-side mode (`
|
|
748
|
+
* Covers the current `items`, so in server-side mode (`total` set) it
|
|
741
749
|
* exports the current page, while client-side pagination exports every page.
|
|
742
750
|
*
|
|
743
751
|
* Returns the string; use `exportCsv()` when you want it downloaded as a file.
|
|
@@ -771,7 +779,7 @@ declare class WrTable {
|
|
|
771
779
|
protected getValue(item: Record<string, unknown>, key: unknown): unknown;
|
|
772
780
|
protected templateFor(key: unknown): TemplateRef<WrTableCellContext> | undefined;
|
|
773
781
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrTable, never>;
|
|
774
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTable, "wr-table", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "columnOrder": { "alias": "columnOrder"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "childrenKey": { "alias": "childrenKey"; "required": false; "isSignal": true; }; "treeColumn": { "alias": "treeColumn"; "required": false; "isSignal": true; }; "toggleRowLabel": { "alias": "toggleRowLabel"; "required": false; "isSignal": true; }; "collapsedGroups": { "alias": "collapsedGroups"; "required": false; "isSignal": true; }; "groupSummary": { "alias": "groupSummary"; "required": false; "isSignal": true; }; "showGroupCount": { "alias": "showGroupCount"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; "isSignal": true; }; "sortLabel": { "alias": "sortLabel"; "required": false; "isSignal": true; }; "selectAllLabel": { "alias": "selectAllLabel"; "required": false; "isSignal": true; }; "selectRowLabel": { "alias": "selectRowLabel"; "required": false; "isSignal": true; }; "expandRowLabel": { "alias": "expandRowLabel"; "required": false; "isSignal": true; }; "selectGroupLabel": { "alias": "selectGroupLabel"; "required": false; "isSignal": true; }; "toggleGroupLabel": { "alias": "toggleGroupLabel"; "required": false; "isSignal": true; }; "loadingLabel": { "alias": "loadingLabel"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "
|
|
782
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTable, "wr-table", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "columnOrder": { "alias": "columnOrder"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "childrenKey": { "alias": "childrenKey"; "required": false; "isSignal": true; }; "treeColumn": { "alias": "treeColumn"; "required": false; "isSignal": true; }; "toggleRowLabel": { "alias": "toggleRowLabel"; "required": false; "isSignal": true; }; "collapsedGroups": { "alias": "collapsedGroups"; "required": false; "isSignal": true; }; "groupSummary": { "alias": "groupSummary"; "required": false; "isSignal": true; }; "showGroupCount": { "alias": "showGroupCount"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; "isSignal": true; }; "sortLabel": { "alias": "sortLabel"; "required": false; "isSignal": true; }; "selectAllLabel": { "alias": "selectAllLabel"; "required": false; "isSignal": true; }; "selectRowLabel": { "alias": "selectRowLabel"; "required": false; "isSignal": true; }; "expandRowLabel": { "alias": "expandRowLabel"; "required": false; "isSignal": true; }; "selectGroupLabel": { "alias": "selectGroupLabel"; "required": false; "isSignal": true; }; "toggleGroupLabel": { "alias": "toggleGroupLabel"; "required": false; "isSignal": true; }; "loadingLabel": { "alias": "loadingLabel"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "overscan": { "alias": "overscan"; "required": false; "isSignal": true; }; }, { "columnOrder": "columnOrderChange"; "selection": "selectionChange"; "expanded": "expandedChange"; "collapsedGroups": "collapsedGroupsChange"; "sort": "sortChange"; "filterChange": "filterChange"; "page": "pageChange"; }, ["cellTemplates", "expandTpl", "groupTpl"], never, true, never>;
|
|
775
783
|
}
|
|
776
784
|
|
|
777
785
|
/**
|
|
@@ -907,6 +915,17 @@ declare class WrTableFilter {
|
|
|
907
915
|
protected readonly selectedCount: _angular_core.Signal<number>;
|
|
908
916
|
protected readonly classes: _angular_core.Signal<string>;
|
|
909
917
|
protected onSearchInput(event: Event): void;
|
|
918
|
+
/**
|
|
919
|
+
* Hands every key back to the input method while a conversion is open.
|
|
920
|
+
*
|
|
921
|
+
* The dropdown this panel lives in closes on Escape, and it hears the key from
|
|
922
|
+
* CDK's overlay keyboard dispatcher — one listener on `<body>`, in the bubble
|
|
923
|
+
* phase. So not acting is not enough: the event has to be stopped here, at the
|
|
924
|
+
* field that owns the composition, or Escape cancels the reading AND takes the
|
|
925
|
+
* whole filter panel with it. Nothing else in this component reads a key, so
|
|
926
|
+
* stopping all of them during a conversion costs nothing.
|
|
927
|
+
*/
|
|
928
|
+
protected onSearchKeydown(event: KeyboardEvent): void;
|
|
910
929
|
protected onToggle(item: WrTableFilterItem): void;
|
|
911
930
|
protected onReset(): void;
|
|
912
931
|
private emitSelected;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { WrTabsRoutingAdapter } from 'ngwr/tabs';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Router support for `<wr-tabs>`. Add it to the `imports` of the component that
|
|
6
|
+
* declares a strip whose `<wr-tab>`s carry a `routerLink`:
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { WrTab, WrTabs } from 'ngwr/tabs';
|
|
11
|
+
* import { WrTabsRouting } from 'ngwr/tabs/router';
|
|
12
|
+
*
|
|
13
|
+
* @Component({ imports: [WrTabs, WrTab, WrTabsRouting], template: `
|
|
14
|
+
* <wr-tabs wrTabsRouting>
|
|
15
|
+
* <wr-tab title="Overview" routerLink="overview" />
|
|
16
|
+
* <wr-tab title="Details" routerLink="details" />
|
|
17
|
+
* </wr-tabs>
|
|
18
|
+
* <router-outlet />
|
|
19
|
+
* ` })
|
|
20
|
+
* export class SettingsPage {}
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Two mechanical edits per strip, both codemoddable: the symbol in `imports`,
|
|
24
|
+
* and `wrTabsRouting` on the element. An attribute rather than a selector on
|
|
25
|
+
* `wr-tabs` itself, for two reasons — where the router enters a template should
|
|
26
|
+
* be visible in that template, and the sandbox's selector map keys a `wr-` tag
|
|
27
|
+
* even when it is qualified, so `wr-tabs[wrTabsRouting]` would be a second claim
|
|
28
|
+
* on the `wr-tabs` tag. Putting it on an ANCESTOR of the strip also works: the
|
|
29
|
+
* token is read through the element injector, which walks up.
|
|
30
|
+
*
|
|
31
|
+
* **Why it is a separate entry point.** A directive listed in `imports: []`
|
|
32
|
+
* lands in the compiled component's `dependencies` whether or not the branch of
|
|
33
|
+
* the template that matches it ever runs, so `RouterLink` + `RouterLinkActive`
|
|
34
|
+
* on the strip charged every CONTENT tab strip 73.9 kB of `@angular/router` —
|
|
35
|
+
* 51% of what `ngwr/tabs` cost in an app that declares no routes. Measured with
|
|
36
|
+
* source-map attribution against a routerless baseline. `@angular/router` is
|
|
37
|
+
* already an optional peer dependency of the package; this is what makes that
|
|
38
|
+
* true in bytes.
|
|
39
|
+
*
|
|
40
|
+
* **Why a directive rather than a provider function.** A relative `routerLink`
|
|
41
|
+
* (`routerLink="overview"`) resolves against the `ActivatedRoute` of the
|
|
42
|
+
* component that declares the strip. A root-level provider would resolve every
|
|
43
|
+
* one of them against the root route instead, and quietly build the wrong
|
|
44
|
+
* hrefs; a directive on the element reads the same `ActivatedRoute` the old
|
|
45
|
+
* `RouterLink` inside the strip's template did.
|
|
46
|
+
*/
|
|
47
|
+
declare class WrTabsRouting implements WrTabsRoutingAdapter {
|
|
48
|
+
private readonly router;
|
|
49
|
+
private readonly locationStrategy;
|
|
50
|
+
private readonly route;
|
|
51
|
+
/**
|
|
52
|
+
* The current URL, as a signal, so `href()` and `isActive()` are reactive to
|
|
53
|
+
* navigation when read from a computed. `isActive` obviously has to be; so
|
|
54
|
+
* does `href`, because a RELATIVE link is resolved against the active route
|
|
55
|
+
* and its target moves when the route does — which is why `RouterLink`
|
|
56
|
+
* recomputes its own href on every navigation too.
|
|
57
|
+
*/
|
|
58
|
+
private readonly url;
|
|
59
|
+
href(commands: string | readonly string[]): string;
|
|
60
|
+
isActive(commands: string | readonly string[]): boolean;
|
|
61
|
+
navigate(commands: string | readonly string[], event: MouseEvent): void;
|
|
62
|
+
private tree;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrTabsRouting, never>;
|
|
64
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrTabsRouting, "[wrTabsRouting]", ["wrTabsRouting"], {}, {}, never, never, true, never>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { WrTabsRouting };
|
|
@@ -112,7 +112,7 @@ declare class WrTabHarness extends ContentContainerComponentHarness {
|
|
|
112
112
|
*
|
|
113
113
|
* `aria-selected` first, because that is the state a screen reader acts on and
|
|
114
114
|
* the `--active` class is only what it looks like. Both shapes carry it now — a
|
|
115
|
-
* router tab publishes it off the same `
|
|
115
|
+
* router tab publishes it off the same `routerActive()` that paints the class —
|
|
116
116
|
* so the class is a fallback for a tab that has neither yet, not a second reading
|
|
117
117
|
* of the same thing. The order is not interchangeable: reading the class first
|
|
118
118
|
* would report a tab as selected while `aria-selected="false"` told assistive tech
|
|
@@ -193,11 +193,11 @@ declare class WrTabHarness extends ContentContainerComponentHarness {
|
|
|
193
193
|
* Activate this tab the way a pointer does.
|
|
194
194
|
*
|
|
195
195
|
* A disabled CONTENT tab is left alone: it is a real `<button disabled>`, which
|
|
196
|
-
* fires no click at all. A disabled ROUTER tab is
|
|
197
|
-
* `aria-disabled="true"` and `tabindex="-1"
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* on the resolved route rather than on the click.
|
|
196
|
+
* fires no click at all. A disabled ROUTER tab is an `<a>`, where `disabled` is
|
|
197
|
+
* not a thing — it carries `aria-disabled="true"` and `tabindex="-1"` to stay off
|
|
198
|
+
* the keyboard path, renders NO href, and the component drops the click rather
|
|
199
|
+
* than routing it. So the click lands and nothing moves, which is why a router
|
|
200
|
+
* strip's expectations belong on the resolved route rather than on the click.
|
|
201
201
|
*/
|
|
202
202
|
click(): Promise<void>;
|
|
203
203
|
/** Move keyboard focus onto this header. */
|
|
@@ -244,7 +244,7 @@ declare class WrTabHarness extends ContentContainerComponentHarness {
|
|
|
244
244
|
* renders exactly one panel: the selected tab's.
|
|
245
245
|
* - **Router** — one `routerLink` on any child switches the whole strip over. The
|
|
246
246
|
* tabs become `<a role="tab">`s whose `aria-selected` follows the resolved route
|
|
247
|
-
* (the same `
|
|
247
|
+
* (the same `routerActive()` that paints `--active`), the strip renders NO
|
|
248
248
|
* panel, and it stops being one tab stop — every enabled tab is a Tab stop of its
|
|
249
249
|
* own. The arrow keys still move focus, but they select nothing: the route does
|
|
250
250
|
* that.
|
|
@@ -348,9 +348,11 @@ declare class WrTabsHarness extends ComponentHarness {
|
|
|
348
348
|
*
|
|
349
349
|
* A router strip is otherwise fine here: the click starts a route change, the
|
|
350
350
|
* harness stabilizes the pending navigation before it re-reads the strip, and
|
|
351
|
-
* `
|
|
352
|
-
* guard, a redirect or an unmatched path that leaves the tab unselected.
|
|
353
|
-
*
|
|
351
|
+
* `routerActive()` has painted the selection by then — so this resolves. It is a
|
|
352
|
+
* guard, a redirect or an unmatched path that leaves the tab unselected. A
|
|
353
|
+
* DISABLED router tab is a different shape and no longer navigates: it renders
|
|
354
|
+
* no href and the component drops the click, so the click lands and nothing
|
|
355
|
+
* moves — see {@link WrTabHarness.click}.
|
|
354
356
|
*/
|
|
355
357
|
select(filters: WrTabHarnessFilters): Promise<void>;
|
|
356
358
|
/**
|
package/types/ngwr-tabs.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ import { TemplateRef, InjectionToken, Signal, ElementRef } from '@angular/core';
|
|
|
8
8
|
* panel when this tab is active.
|
|
9
9
|
* - **Router tab** — set `routerLink` and the tab becomes a link; the
|
|
10
10
|
* parent skips its content panel and the consumer drops a
|
|
11
|
-
* `<router-outlet>` below the tab strip.
|
|
11
|
+
* `<router-outlet>` below the tab strip. Router mode needs the
|
|
12
|
+
* `WrTabsRouting` directive from `ngwr/tabs/router` in the same
|
|
13
|
+
* `imports: []`; without it a strip carrying a `routerLink` throws.
|
|
12
14
|
*/
|
|
13
15
|
declare class WrTab {
|
|
14
16
|
/** Visible label on the tab strip. */
|
|
@@ -26,7 +28,30 @@ declare class WrTab {
|
|
|
26
28
|
readonly contentTpl: _angular_core.Signal<TemplateRef<any>>;
|
|
27
29
|
private readonly parent;
|
|
28
30
|
private readonly destroyRef;
|
|
31
|
+
/**
|
|
32
|
+
* The routing adapter published by `WrTabsRouting` on the parent `<wr-tabs>`
|
|
33
|
+
* element. A `<wr-tab>` is DECLARED inside `<wr-tabs>` in the consumer's
|
|
34
|
+
* template — content projection moves where it renders, not where it injects
|
|
35
|
+
* — so the parent's element injector is this one's, the same walk that
|
|
36
|
+
* resolves `WR_TABS` above.
|
|
37
|
+
*/
|
|
38
|
+
private readonly routing;
|
|
29
39
|
protected readonly isRouter: _angular_core.Signal<boolean>;
|
|
40
|
+
/**
|
|
41
|
+
* Resolved href for a router tab — `null` for a content tab, and for a
|
|
42
|
+
* disabled one, which is how the anchor stops navigating at all.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
readonly routerHref: _angular_core.Signal<string | null>;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the current route selects this tab. The strip publishes it as BOTH
|
|
48
|
+
* `aria-selected` and the `--active` class, off this one read, so the
|
|
49
|
+
* announced selection and the painted one cannot drift apart.
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
readonly routerActive: _angular_core.Signal<boolean>;
|
|
53
|
+
/** Hand a click on this tab's anchor to the routing adapter. @internal */
|
|
54
|
+
navigate(event: MouseEvent): void;
|
|
30
55
|
constructor();
|
|
31
56
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrTab, never>;
|
|
32
57
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTab, "wr-tab", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
@@ -65,6 +90,54 @@ interface WrTabsContext {
|
|
|
65
90
|
*/
|
|
66
91
|
declare const WR_TABS: InjectionToken<WrTabsContext>;
|
|
67
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @license
|
|
95
|
+
*
|
|
96
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
97
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* What a `<wr-tabs>` needs from a router in order to render a router tab, and
|
|
102
|
+
* nothing more. Three questions — the href to put on the anchor, whether the
|
|
103
|
+
* current URL selects it, and what a click should do.
|
|
104
|
+
*
|
|
105
|
+
* It exists so that `ngwr/tabs` can name the capability without naming
|
|
106
|
+
* `@angular/router`: a directive listed in `imports: []` lands in the compiled
|
|
107
|
+
* component's `dependencies` whether or not its branch of the template ever
|
|
108
|
+
* runs, so `RouterLink` + `RouterLinkActive` on the strip charged every content
|
|
109
|
+
* tab strip the whole router — 73.9 kB of a 144.8 kB component. The
|
|
110
|
+
* implementation lives at `ngwr/tabs/router`, which a consumer imports only
|
|
111
|
+
* when they use router tabs.
|
|
112
|
+
*
|
|
113
|
+
* `href` and `isActive` are read from computeds and must both be reactive to
|
|
114
|
+
* navigation: a RELATIVE `routerLink` resolves against the active route, so its
|
|
115
|
+
* href changes when the route does, exactly as `RouterLink` recomputes its own.
|
|
116
|
+
*/
|
|
117
|
+
interface WrTabsRoutingAdapter {
|
|
118
|
+
/**
|
|
119
|
+
* Serialized href for a tab's `routerLink`, or `null` when the adapter cannot
|
|
120
|
+
* build one.
|
|
121
|
+
*/
|
|
122
|
+
href(commands: string | readonly string[]): string | null;
|
|
123
|
+
/**
|
|
124
|
+
* Whether the current URL selects this tab. Matched the way `routerLinkActive`
|
|
125
|
+
* matches without `[routerLinkActiveOptions]`: a path prefix, not an exact URL.
|
|
126
|
+
*/
|
|
127
|
+
isActive(commands: string | readonly string[]): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Handle a click on a tab anchor. A modified or non-primary click is left to
|
|
130
|
+
* the browser, so ctrl/cmd-click still opens the tab in a new window.
|
|
131
|
+
*/
|
|
132
|
+
navigate(commands: string | readonly string[], event: MouseEvent): void;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Token a `<wr-tabs>` reads to find out whether router tabs are usable. Provided
|
|
136
|
+
* by the `WrTabsRouting` directive from `ngwr/tabs/router`; absent by default,
|
|
137
|
+
* which is what keeps `@angular/router` out of a content-only strip.
|
|
138
|
+
*/
|
|
139
|
+
declare const WR_TABS_ROUTING: InjectionToken<WrTabsRoutingAdapter>;
|
|
140
|
+
|
|
68
141
|
/**
|
|
69
142
|
* Tabbed container. Two modes depending on the child `<wr-tab>`
|
|
70
143
|
* definitions:
|
|
@@ -73,7 +146,10 @@ declare const WR_TABS: InjectionToken<WrTabsContext>;
|
|
|
73
146
|
* active-tab panel automatically.
|
|
74
147
|
* - **Router** — any child with `routerLink` switches the whole strip
|
|
75
148
|
* into router mode; the parent skips its panel so the consumer can
|
|
76
|
-
* drop a `<router-outlet>` after it.
|
|
149
|
+
* drop a `<router-outlet>` after it. That mode needs the `WrTabsRouting`
|
|
150
|
+
* directive from `ngwr/tabs/router` alongside `WrTabs` in `imports: []`
|
|
151
|
+
* — the strip itself names no `@angular/router` symbol, which is what
|
|
152
|
+
* keeps a content-only strip free of the router.
|
|
77
153
|
*
|
|
78
154
|
* @example
|
|
79
155
|
* ```html
|
|
@@ -83,7 +159,7 @@ declare const WR_TABS: InjectionToken<WrTabsContext>;
|
|
|
83
159
|
* <wr-tab key="two" title="Two">Second panel</wr-tab>
|
|
84
160
|
* </wr-tabs>
|
|
85
161
|
*
|
|
86
|
-
* <!-- router tabs -->
|
|
162
|
+
* <!-- router tabs: imports: [WrTabs, WrTab, WrTabsRouting] -->
|
|
87
163
|
* <wr-tabs>
|
|
88
164
|
* <wr-tab title="Overview" routerLink="overview" />
|
|
89
165
|
* <wr-tab title="Details" routerLink="details" />
|
|
@@ -108,7 +184,22 @@ declare class WrTabs implements WrTabsContext {
|
|
|
108
184
|
* directive, which writes `valueSignal`, so the read stays reactive.
|
|
109
185
|
*/
|
|
110
186
|
private readonly isRtl;
|
|
111
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* The routing adapter, when `WrTabsRouting` from `ngwr/tabs/router` is in the
|
|
189
|
+
* consumer's `imports`. `null` is the default and the whole point: the strip
|
|
190
|
+
* has no `@angular/router` import of its own, so a content-only tab strip
|
|
191
|
+
* costs no router bytes.
|
|
192
|
+
*/
|
|
193
|
+
private readonly routing;
|
|
194
|
+
/**
|
|
195
|
+
* When any child has a routerLink, the whole strip switches to router mode.
|
|
196
|
+
*
|
|
197
|
+
* Throws rather than degrading when the adapter is missing. Falling back to
|
|
198
|
+
* content mode would render the tabs as `<button>`s that navigate nowhere and
|
|
199
|
+
* open an empty panel — a strip that looks right and does nothing, with the
|
|
200
|
+
* one missing import unnamed. The route is what selects a tab here, so there
|
|
201
|
+
* is no half of this that still works.
|
|
202
|
+
*/
|
|
112
203
|
protected readonly isRouter: _angular_core.Signal<boolean>;
|
|
113
204
|
/** Content-mode: the tab whose key matches `active()` (or the first tab if none yet). */
|
|
114
205
|
protected readonly activeTab: _angular_core.Signal<WrTab | null>;
|
|
@@ -123,6 +214,12 @@ declare class WrTabs implements WrTabsContext {
|
|
|
123
214
|
/** Recompute which edges can scroll, from the strip's scroll metrics. @internal */
|
|
124
215
|
protected updateFades(): void;
|
|
125
216
|
protected onTabClick(tab: WrTab): void;
|
|
217
|
+
/**
|
|
218
|
+
* Click on a router tab's anchor. The anchor carries a real `href`, so a
|
|
219
|
+
* modified or middle click is left alone and the browser opens it the way it
|
|
220
|
+
* opens any link; only a plain left click is turned into a navigation.
|
|
221
|
+
*/
|
|
222
|
+
protected onRouterTabClick(tab: WrTab, event: MouseEvent): void;
|
|
126
223
|
/** Per-instance prefix, so keys only have to be unique within one group. */
|
|
127
224
|
private readonly uid;
|
|
128
225
|
/** Header id for `aria-labelledby` on the panel. @internal */
|
|
@@ -135,5 +232,5 @@ declare class WrTabs implements WrTabsContext {
|
|
|
135
232
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTabs, "wr-tabs", never, { "active": { "alias": "active"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "active": "activeChange"; }, ["tabs"], never, true, never>;
|
|
136
233
|
}
|
|
137
234
|
|
|
138
|
-
export { WR_TABS, WrTab, WrTabs };
|
|
139
|
-
export type { WrTabsContext };
|
|
235
|
+
export { WR_TABS, WR_TABS_ROUTING, WrTab, WrTabs };
|
|
236
|
+
export type { WrTabsContext, WrTabsRoutingAdapter };
|
package/types/ngwr-textarea.d.ts
CHANGED
|
@@ -71,12 +71,41 @@ declare class WrTextarea implements FormValueControl<string> {
|
|
|
71
71
|
protected readonly effectiveResize: _angular_core.Signal<WrTextareaResize>;
|
|
72
72
|
/** The surrounding `<wr-form-field>`'s error state. @internal */
|
|
73
73
|
protected readonly fieldAria: ngwr_form.WrFormFieldAria;
|
|
74
|
+
private readonly field;
|
|
75
|
+
/**
|
|
76
|
+
* Id the surrounding `<wr-form-field>`'s `<label for>` points at.
|
|
77
|
+
*
|
|
78
|
+
* The field renders its label before it can see what was projected into it, so
|
|
79
|
+
* the id travels the other way and the control adopts it, exactly as
|
|
80
|
+
* `[wrInput]` and `wr-select` do. Without it the `for` named an element that
|
|
81
|
+
* was nowhere in the document: clicking the label did nothing, and the field
|
|
82
|
+
* was, to a screen reader, an unlabelled block.
|
|
83
|
+
*
|
|
84
|
+
* It lands on the native `<textarea>` rather than on the host, because only a
|
|
85
|
+
* labelable element can be a label's target and `<wr-textarea>` is not one.
|
|
86
|
+
*
|
|
87
|
+
* What it does NOT change is the NAME: `aria-label` outranks a `<label>` in
|
|
88
|
+
* the accname order and `resolvedAriaLabel()` still wins, the same call
|
|
89
|
+
* `wr-select` and `wr-slider` make — the field renders a label only when its
|
|
90
|
+
* `label` input is set, so it cannot promise a name to fall back on. Set
|
|
91
|
+
* `[ariaLabel]` to the field's label where the two should read alike.
|
|
92
|
+
*/
|
|
93
|
+
protected readonly controlId: _angular_core.Signal<string | null>;
|
|
74
94
|
protected readonly classes: _angular_core.Signal<string>;
|
|
75
95
|
/** Show the corner grip (hidden when direction is 'none' / autosize / disabled). */
|
|
76
96
|
protected readonly showHandle: _angular_core.Signal<boolean>;
|
|
77
97
|
private readonly platformId;
|
|
78
98
|
private readonly isBrowser;
|
|
79
99
|
private readonly hostEl;
|
|
100
|
+
/**
|
|
101
|
+
* Ambient reading direction, read by the horizontal half of the resize drag.
|
|
102
|
+
*
|
|
103
|
+
* Optional so a bare `TestBed` — or any consumer that never set a direction —
|
|
104
|
+
* needs no provider; `Directionality` is root-provided, so `null` only ever
|
|
105
|
+
* means "nobody asked", which is LTR. Read inside the handler rather than
|
|
106
|
+
* cached, so a runtime flip needs no subscription to `Directionality.change`.
|
|
107
|
+
*/
|
|
108
|
+
private readonly dir;
|
|
80
109
|
private resizing;
|
|
81
110
|
private resizeStartY;
|
|
82
111
|
private resizeStartX;
|
package/types/ngwr-theme.d.ts
CHANGED
|
@@ -164,6 +164,15 @@ declare const WR_THEME_CONFIG: InjectionToken<WrThemeConfig>;
|
|
|
164
164
|
* `@use 'ngwr' with ($theme-attribute: '...')`. In dev mode the service compares
|
|
165
165
|
* the two and warns when they disagree.
|
|
166
166
|
*
|
|
167
|
+
* **Under SSR or prerendering this service cannot prevent a flash of the wrong
|
|
168
|
+
* theme, and nothing inside the application can.** The server has no
|
|
169
|
+
* `localStorage` and no `prefers-color-scheme`, so every rendered page ships the
|
|
170
|
+
* same attribute (`light` under the default config); by the time the client
|
|
171
|
+
* bundle boots and the effect below corrects it, the browser has already
|
|
172
|
+
* painted. Closing that window takes a script that runs before first paint —
|
|
173
|
+
* {@link wrThemePrePaintScript} emits one that reads the persisted mode exactly
|
|
174
|
+
* the way this service does.
|
|
175
|
+
*
|
|
167
176
|
* @example
|
|
168
177
|
* ```ts
|
|
169
178
|
* const theme = inject(WrTheme);
|
|
@@ -237,5 +246,86 @@ declare class WrTheme {
|
|
|
237
246
|
*/
|
|
238
247
|
declare function provideWrTheme(config?: Partial<WrThemeConfig>): EnvironmentProviders;
|
|
239
248
|
|
|
240
|
-
|
|
241
|
-
|
|
249
|
+
/**
|
|
250
|
+
* @license
|
|
251
|
+
*
|
|
252
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
253
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
254
|
+
*/
|
|
255
|
+
|
|
256
|
+
/** Options for {@link wrThemePrePaintScript}. All optional — defaults mirror the services. */
|
|
257
|
+
interface WrThemePrePaintOptions {
|
|
258
|
+
/**
|
|
259
|
+
* The key {@link WrTheme} persists the mode under — `provideWrTheme({ storageKey })`.
|
|
260
|
+
* @default 'wr-theme'
|
|
261
|
+
*/
|
|
262
|
+
readonly storageKey?: string;
|
|
263
|
+
/**
|
|
264
|
+
* The attribute written on `<html>` — `provideWrTheme({ attribute })`, which
|
|
265
|
+
* has to agree with `@use 'ngwr' with ($theme-attribute: '…')`.
|
|
266
|
+
* @default 'data-theme'
|
|
267
|
+
*/
|
|
268
|
+
readonly attribute?: string;
|
|
269
|
+
/**
|
|
270
|
+
* What to resolve when nothing is persisted — `provideWrTheme({ defaultMode })`.
|
|
271
|
+
* @default 'auto'
|
|
272
|
+
*/
|
|
273
|
+
readonly defaultMode?: WrThemeMode;
|
|
274
|
+
/**
|
|
275
|
+
* `WrStorage`'s key prefix — `provideWrStorage({ prefix })`. The script reads
|
|
276
|
+
* the raw key, so a prefixed app has to pass the same string here.
|
|
277
|
+
* @default ''
|
|
278
|
+
*/
|
|
279
|
+
readonly storagePrefix?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Whether `WrStorage` wraps values in its JSON envelope —
|
|
282
|
+
* `provideWrStorage({ json })`. The emitted reader accepts both shapes either
|
|
283
|
+
* way; this only decides which one it tries first, and is here so the option
|
|
284
|
+
* cannot be silently forgotten when an app turns the envelope off.
|
|
285
|
+
* @default true
|
|
286
|
+
*/
|
|
287
|
+
readonly json?: boolean;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Source of the blocking script that resolves the theme BEFORE first paint.
|
|
291
|
+
*
|
|
292
|
+
* A server has no `localStorage` and no `prefers-color-scheme`, so every
|
|
293
|
+
* server-rendered or prerendered page ships the same attribute — `light` under
|
|
294
|
+
* the default config — and a dark-mode visitor sees a white page until the
|
|
295
|
+
* client bundle boots and {@link WrTheme}'s effect corrects it. That window is
|
|
296
|
+
* milliseconds on localhost and seconds on a slow connection, and it is not
|
|
297
|
+
* something the service can close from inside the application: by the time
|
|
298
|
+
* Angular runs, the paint has happened.
|
|
299
|
+
*
|
|
300
|
+
* The only fix is a script that runs before the first paint, and the only thing
|
|
301
|
+
* it needs to know is how {@link WrTheme} and `WrStorage` agree to spell the
|
|
302
|
+
* persisted mode. That agreement — the key, the prefix, the JSON envelope
|
|
303
|
+
* `{ v, e }`, the expiry, the `auto` fallback — is what this function writes
|
|
304
|
+
* out, so an app never has to re-derive it from the bundle and never has to keep
|
|
305
|
+
* a hand-copied version in step with a library upgrade.
|
|
306
|
+
*
|
|
307
|
+
* Returns the JS source WITHOUT a `<script>` wrapper, so it can be inlined into
|
|
308
|
+
* `index.html`, emitted from an SSR template, or hashed for a CSP
|
|
309
|
+
* `script-src 'sha256-…'`. It is plain ES5 with no dependency on the app bundle,
|
|
310
|
+
* and every step is wrapped so a blocked `localStorage` (private mode, a
|
|
311
|
+
* sandboxed iframe) leaves the prerendered default in place rather than throwing
|
|
312
|
+
* before anything has rendered.
|
|
313
|
+
*
|
|
314
|
+
* Pass the same values given to `provideWrTheme()` / `provideWrStorage()`; the
|
|
315
|
+
* defaults here are the defaults there.
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* ```ts
|
|
319
|
+
* // Build step / SSR template:
|
|
320
|
+
* const html = template.replace('<!--theme-->', `<script>${wrThemePrePaintScript()}</script>`);
|
|
321
|
+
*
|
|
322
|
+
* // Or paste the output straight into <head>, above every stylesheet:
|
|
323
|
+
* // <script>(function(){ … })();</script>
|
|
324
|
+
* ```
|
|
325
|
+
*
|
|
326
|
+
* @see https://ngwr.dev/reference/services/theme
|
|
327
|
+
*/
|
|
328
|
+
declare function wrThemePrePaintScript(options?: WrThemePrePaintOptions): string;
|
|
329
|
+
|
|
330
|
+
export { DEFAULT_WR_THEME_CONFIG, WR_COLORS, WR_THEME_CONFIG, WrTheme, provideWrTheme, wrContrastFor, wrIntentTokens, wrThemePrePaintScript, wrThemeTokens };
|
|
331
|
+
export type { WrColor, WrResolvedTheme, WrThemeConfig, WrThemeMode, WrThemePrePaintOptions };
|
package/types/ngwr-toast.d.ts
CHANGED
|
@@ -166,6 +166,8 @@ declare class WrToast {
|
|
|
166
166
|
private readonly config;
|
|
167
167
|
private overlayRef;
|
|
168
168
|
private hostRef;
|
|
169
|
+
/** Watches the overlay container for overlays opened after the host. */
|
|
170
|
+
private containerObserver;
|
|
169
171
|
private currentPosition;
|
|
170
172
|
private currentMode;
|
|
171
173
|
private nextId;
|
|
@@ -187,6 +189,49 @@ declare class WrToast {
|
|
|
187
189
|
private startTimer;
|
|
188
190
|
private pauseTimer;
|
|
189
191
|
private ensureHost;
|
|
192
|
+
/**
|
|
193
|
+
* Put the host back on top of the browser's top layer.
|
|
194
|
+
*
|
|
195
|
+
* The stacking rule here is not a z-index and cannot be fixed with one. CDK 22
|
|
196
|
+
* promotes every overlay by calling `showPopover()` on its host element, and
|
|
197
|
+
* the top layer is ordered by the MOMENT of promotion — a popover shown later
|
|
198
|
+
* paints over one shown earlier no matter what either element's z-index, DOM
|
|
199
|
+
* order or containing block says. The toast host is created once and kept
|
|
200
|
+
* alive until the last toast leaves, so its place in that order is frozen at
|
|
201
|
+
* whenever the first toast of the run appeared. Every dialog and drawer opened
|
|
202
|
+
* after that sits above it.
|
|
203
|
+
*
|
|
204
|
+
* The symptom was as bad as the mechanism is quiet: a toast raised from inside
|
|
205
|
+
* an open dialog rendered UNDER the dialog's backdrop, dimmed by it and
|
|
206
|
+
* hit-tested as it — so the close button was unreachable and clicking where it
|
|
207
|
+
* appeared closed the dialog instead. Nothing threw, and a toast with
|
|
208
|
+
* `duration: 0` never went away on its own.
|
|
209
|
+
*
|
|
210
|
+
* Hiding and re-showing moves the host to the end of the top layer. Both calls
|
|
211
|
+
* happen in one task, so there is no frame in which the host is `display:
|
|
212
|
+
* none` and nothing re-runs a toast's enter animation.
|
|
213
|
+
*
|
|
214
|
+
* Skipped while focus is inside the host: Chromium keeps focus across this
|
|
215
|
+
* pair, but the hide-popover algorithm is specified to restore focus to the
|
|
216
|
+
* previously focused element, and a host the user is already tabbing through
|
|
217
|
+
* is by definition reachable. In practice the two never coincide — a modal
|
|
218
|
+
* traps focus, so focus inside the host means nothing is above it to escape.
|
|
219
|
+
*/
|
|
220
|
+
private raiseHost;
|
|
221
|
+
/**
|
|
222
|
+
* Re-raise the host whenever another overlay joins the container.
|
|
223
|
+
*
|
|
224
|
+
* `show()` covers the reported order (toast raised while a dialog is up). This
|
|
225
|
+
* covers the mirror image, which is the same defect seen from the other side:
|
|
226
|
+
* a toast already on screen when the dialog opens is left under it, unclickable
|
|
227
|
+
* for the rest of its duration, and no further `show()` is coming to fix it.
|
|
228
|
+
*
|
|
229
|
+
* Observing the host's own parent rather than a container resolved from the
|
|
230
|
+
* injector keeps this correct whether or not `provideWrOverlay()` is installed
|
|
231
|
+
* — the host is in whichever container it was actually appended to. Re-showing
|
|
232
|
+
* a popover moves nothing in the DOM, so this cannot re-trigger itself.
|
|
233
|
+
*/
|
|
234
|
+
private watchForNewerOverlays;
|
|
190
235
|
/** Fill any free stack slots from the queue (FIFO), starting each promoted
|
|
191
236
|
* toast's auto-dismiss timer only as it becomes visible. */
|
|
192
237
|
private promoteFromQueue;
|
|
@@ -222,6 +267,14 @@ declare class WrToast {
|
|
|
222
267
|
* ],
|
|
223
268
|
* });
|
|
224
269
|
* ```
|
|
270
|
+
*
|
|
271
|
+
* **Bootstrap only, and the three ngwr providers differ here.** {@link WrToast}
|
|
272
|
+
* is root-provided, so it reads this token once from the ROOT injector — a
|
|
273
|
+
* `provideWrToastConfig()` in a route's `providers` is never seen, and used to
|
|
274
|
+
* be ignored in silence. It now warns in dev mode instead. By contrast
|
|
275
|
+
* `provideWrConfig()` IS read per route, because components resolve it from
|
|
276
|
+
* their own injector, and `provideWrIcons()` works at any level and chains, so
|
|
277
|
+
* a route may add icons to the set its parent registered.
|
|
225
278
|
*/
|
|
226
279
|
declare function provideWrToastConfig(config: Partial<Omit<WrToastConfig, 'labels'>> & {
|
|
227
280
|
readonly labels?: Partial<WrToastConfig['labels']>;
|
package/types/ngwr-tree.d.ts
CHANGED
|
@@ -165,8 +165,9 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
|
|
|
165
165
|
/**
|
|
166
166
|
* Form value — the current selection as seen by a bound field. Bound by
|
|
167
167
|
* `[formField]`, or two-way via `[(value)]`. Shape follows `selectionMode`:
|
|
168
|
-
* `TId | null` in single mode, `readonly TId[]` in multi mode.
|
|
169
|
-
* `
|
|
168
|
+
* `TId | null` in single mode, `readonly TId[]` in multi mode. Works in both
|
|
169
|
+
* `openOn` modes; `[(selected)]` stays the inline-native API and always
|
|
170
|
+
* carries an array, whatever the selection mode.
|
|
170
171
|
*/
|
|
171
172
|
readonly value: _angular_core.ModelSignal<unknown>;
|
|
172
173
|
/** Emitted on blur so a bound field can mark itself touched. */
|
|
@@ -205,6 +206,13 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
|
|
|
205
206
|
protected readonly expandLabel: _angular_core.Signal<string>;
|
|
206
207
|
protected readonly collapseLabel: _angular_core.Signal<string>;
|
|
207
208
|
protected readonly chipRemoveLabel: (params?: ngwr_i18n.WrI18nParams) => string;
|
|
209
|
+
/**
|
|
210
|
+
* The overflow chip past `maxTagCount`. It was the literal `+{{ extra }} more`
|
|
211
|
+
* in the template while `wr-select` — the same chip, the same string — read
|
|
212
|
+
* `select.more` from the catalog, so a Russian tree rendered
|
|
213
|
+
* `["Черновик", "+2 more"]`.
|
|
214
|
+
*/
|
|
215
|
+
protected readonly chipMoreLabel: (params?: ngwr_i18n.WrI18nParams) => string;
|
|
208
216
|
/** Flattened list of currently visible nodes — what the template renders. */
|
|
209
217
|
protected readonly flat: _angular_core.Signal<readonly FlatNode<TId>[]>;
|
|
210
218
|
protected readonly selectedSet: _angular_core.Signal<Set<TId>>;
|