ngwr 16.0.0 → 16.1.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/badge/styles/_tag.scss +8 -4
- package/button/styles/_index.scss +13 -7
- package/cascader/styles/_rules.scss +4 -2
- package/checkbox/styles/_index.scss +4 -2
- package/date-picker/styles/_index.scss +6 -2
- package/date-stamp/styles/_index.scss +38 -0
- package/dialog/styles/_index.scss +38 -0
- package/fesm2022/internal-CVLvP9b_.mjs +33 -0
- package/fesm2022/internal-CVLvP9b_.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +11 -7
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +11 -7
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +10 -6
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +18 -6
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +9 -6
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +8 -4
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +19 -8
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -5
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +11 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +5 -2
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +10 -6
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +2 -1
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +9 -5
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +4 -2
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-comment.mjs +13 -7
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +9 -3
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +4 -2
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value.mjs +11 -6
- package/fesm2022/ngwr-copy-value.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +86 -30
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp-testing.mjs +34 -0
- package/fesm2022/ngwr-date-stamp-testing.mjs.map +1 -0
- package/fesm2022/ngwr-date-stamp.mjs +149 -0
- package/fesm2022/ngwr-date-stamp.mjs.map +1 -0
- package/fesm2022/ngwr-date.mjs +279 -50
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +9 -5
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-dialog-testing.mjs +23 -2
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +45 -16
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +102 -11
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +4 -2
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +29 -3
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +4 -2
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +5 -2
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +4 -2
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +9 -3
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +18 -6
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +2 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +2 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +2 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +2 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +2 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +2 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +2 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +2 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +2 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +2 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +2 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +2 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +2 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +2 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +2 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +2 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +2 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +2 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +2 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +2 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +2 -0
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +2 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +34 -8
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +9 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +4 -2
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +20 -10
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +9 -3
- package/fesm2022/ngwr-keyboard.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +9 -3
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +13 -5
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +9 -5
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +13 -5
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +9 -5
- package/fesm2022/ngwr-load-state.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +84 -1
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +3 -2
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -5
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +93 -4
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +4 -2
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +9 -5
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +9 -3
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-resizable.mjs +503 -0
- package/fesm2022/ngwr-resizable.mjs.map +1 -0
- package/fesm2022/ngwr-result.mjs +9 -5
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +4 -2
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +13 -5
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +4 -2
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +4 -2
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +4 -2
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +4 -2
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +17 -21
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +9 -3
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +9 -5
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +5 -1
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +167 -10
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +9 -3
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +18 -8
- package/fesm2022/ngwr-timeline.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs +6 -1
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +529 -104
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +4 -2
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +4 -2
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +9 -3
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-utils-router.mjs +18 -2
- package/fesm2022/ngwr-utils-router.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +9 -2
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +7 -4
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/fesm2022/ngwr.mjs.map +1 -1
- package/i18n/ar.json +6 -0
- package/i18n/cs.json +6 -0
- package/i18n/de.json +6 -0
- package/i18n/en.json +6 -0
- package/i18n/es.json +6 -0
- package/i18n/fr.json +6 -0
- package/i18n/he.json +6 -0
- package/i18n/hi.json +6 -0
- package/i18n/id.json +6 -0
- package/i18n/it.json +6 -0
- package/i18n/ja.json +6 -0
- package/i18n/ko.json +6 -0
- package/i18n/nl.json +6 -0
- package/i18n/pl.json +6 -0
- package/i18n/pt.json +6 -0
- package/i18n/ru.json +6 -0
- package/i18n/sv.json +6 -0
- package/i18n/tr.json +6 -0
- package/i18n/uk.json +6 -0
- package/i18n/vi.json +6 -0
- package/i18n/zh-TW.json +6 -0
- package/i18n/zh.json +6 -0
- package/input/styles/_index.scss +10 -5
- package/input-number/styles/_index.scss +6 -3
- package/input-otp/styles/_index.scss +4 -2
- package/llms-full.txt +29 -10
- package/llms.txt +8 -4
- package/package.json +15 -1
- package/radio/styles/_index.scss +4 -2
- package/resizable/styles/_index.scss +154 -0
- package/schematics/use/rule.js +1 -0
- package/schematics/use/symbol-map.json +4 -0
- package/select/styles/_index.scss +6 -3
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +4 -1
- package/skills/ngwr/references/setup.md +3 -0
- package/switch/styles/_index.scss +4 -2
- package/table/styles/_index.scss +53 -0
- package/textarea/styles/_index.scss +4 -2
- package/theme/styles/_motion.scss +6 -0
- package/toast/styles/_index.scss +19 -0
- package/types/ngwr-burger.d.ts +0 -1
- package/types/ngwr-calendar.d.ts +7 -0
- package/types/ngwr-charts-calendar-heatmap.d.ts +2 -1
- package/types/ngwr-clipboard.d.ts +7 -0
- package/types/ngwr-date-picker.d.ts +9 -2
- package/types/ngwr-date-stamp-testing.d.ts +47 -0
- package/types/ngwr-date-stamp.d.ts +81 -0
- package/types/ngwr-date.d.ts +135 -24
- package/types/ngwr-dialog-testing.d.ts +10 -0
- package/types/ngwr-dialog.d.ts +72 -4
- package/types/ngwr-directives.d.ts +36 -1
- package/types/ngwr-drawer.d.ts +21 -0
- package/types/ngwr-i18n.d.ts +44 -14
- package/types/ngwr-overlay.d.ts +36 -0
- package/types/ngwr-pipes.d.ts +15 -0
- package/types/ngwr-popover.d.ts +39 -1
- package/types/ngwr-resizable.d.ts +228 -0
- package/types/ngwr-table-testing.d.ts +3 -1
- package/types/ngwr-table.d.ts +120 -4
- package/types/ngwr-toast-testing.d.ts +12 -1
- package/types/ngwr-toast.d.ts +215 -18
- package/types/ngwr-utils-router.d.ts +22 -0
- package/types/ngwr-utils.d.ts +8 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr.d.ts +1 -0
|
@@ -97,26 +97,51 @@ export declare class WrClickOutside {
|
|
|
97
97
|
* `<textarea>` + `document.execCommand('copy')` fallback for older browsers
|
|
98
98
|
* and non-secure contexts.
|
|
99
99
|
*
|
|
100
|
+
* After a successful copy the host carries `wr-copy-to-clipboard--copied` for
|
|
101
|
+
* a moment, a tooltip over it reads "Copied" and the same text is announced
|
|
102
|
+
* politely. `wrCopyToClipboardToast` shows a toast instead of the tooltip and
|
|
103
|
+
* the announcement. A refused write changes nothing and emits `copyFailed`.
|
|
104
|
+
*
|
|
100
105
|
* @example
|
|
101
106
|
* ```html
|
|
102
|
-
* <button [wrCopyToClipboard]="value"
|
|
107
|
+
* <button [wrCopyToClipboard]="value">Copy</button>
|
|
108
|
+
* <button [wrCopyToClipboard]="rows" wrCopyToClipboardToast copiedLabel="Copied to clipboard">Copy all</button>
|
|
103
109
|
* ```
|
|
104
110
|
*/
|
|
105
111
|
export declare class WrCopyToClipboard {
|
|
112
|
+
constructor();
|
|
106
113
|
/** The text to copy. */
|
|
107
114
|
readonly wrCopyToClipboard: import("@angular/core").InputSignal<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Confirm a copy with a toast instead of the tooltip and the announcement.
|
|
117
|
+
*
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
readonly wrCopyToClipboardToast: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
121
|
+
/** Text of the tooltip, the announcement and the toast. Falls back to `copyToClipboard.copied`, then `'Copied'`. */
|
|
122
|
+
readonly copiedLabel: import("@angular/core").InputSignal<string | null>;
|
|
108
123
|
/** Emitted with the copied text once the write succeeds. */
|
|
109
124
|
readonly copied: import("@angular/core").OutputEmitterRef<string>;
|
|
110
125
|
/** Emitted if the copy fails (denied permission, no clipboard, …). */
|
|
111
126
|
readonly copyFailed: import("@angular/core").OutputEmitterRef<unknown>;
|
|
127
|
+
/** True for a moment after a successful copy. */
|
|
128
|
+
protected readonly justCopied: import("@angular/core").WritableSignal<boolean>;
|
|
129
|
+
private readonly resolvedCopiedLabel;
|
|
112
130
|
private readonly focusMonitor;
|
|
113
131
|
private readonly doc;
|
|
132
|
+
private readonly injector;
|
|
133
|
+
private readonly tooltip;
|
|
134
|
+
private readonly hostPopover;
|
|
135
|
+
private destroyed;
|
|
136
|
+
private timer;
|
|
114
137
|
/**
|
|
115
138
|
* Copies the bound text, as a click does: `(copied)` or `(copyFailed)` fires
|
|
116
139
|
* either way. Resolves `true` once the text is on the clipboard and `false`
|
|
117
140
|
* when neither path could write it. It never rejects.
|
|
118
141
|
*/
|
|
119
142
|
copy(): Promise<boolean>;
|
|
143
|
+
private confirm;
|
|
144
|
+
private clearTimer;
|
|
120
145
|
/**
|
|
121
146
|
* Legacy clipboard write — hidden textarea + `execCommand('copy')`.
|
|
122
147
|
*
|
|
@@ -135,6 +160,16 @@ export declare class WrCopyToClipboard {
|
|
|
135
160
|
"required": true;
|
|
136
161
|
"isSignal": true;
|
|
137
162
|
};
|
|
163
|
+
"wrCopyToClipboardToast": {
|
|
164
|
+
"alias": "wrCopyToClipboardToast";
|
|
165
|
+
"required": false;
|
|
166
|
+
"isSignal": true;
|
|
167
|
+
};
|
|
168
|
+
"copiedLabel": {
|
|
169
|
+
"alias": "copiedLabel";
|
|
170
|
+
"required": false;
|
|
171
|
+
"isSignal": true;
|
|
172
|
+
};
|
|
138
173
|
}, {
|
|
139
174
|
"copied": "copied";
|
|
140
175
|
"copyFailed": "copyFailed";
|
package/types/ngwr-drawer.d.ts
CHANGED
|
@@ -75,6 +75,14 @@ interface WrDrawerOptions<D = unknown> {
|
|
|
75
75
|
* splitting happens here.
|
|
76
76
|
*/
|
|
77
77
|
readonly panelClass?: WrClassInput;
|
|
78
|
+
/**
|
|
79
|
+
* Where the global toast stack paints while this drawer is open. `'below'`
|
|
80
|
+
* keeps it under the drawer and its backdrop. Toasts in a
|
|
81
|
+
* `<wr-toast-outlet>` are page content and are under every drawer anyway.
|
|
82
|
+
* With overlays stacked, the top one decides.
|
|
83
|
+
* @default 'above'
|
|
84
|
+
*/
|
|
85
|
+
readonly toasts?: 'above' | 'below';
|
|
78
86
|
}
|
|
79
87
|
/**
|
|
80
88
|
* Side panel that slides in from an edge of the viewport. Two-way binds
|
|
@@ -153,6 +161,12 @@ export declare class WrDrawer {
|
|
|
153
161
|
* pane, so one name has to mean the same surface on both paths.
|
|
154
162
|
*/
|
|
155
163
|
readonly panelClass: import("@angular/core").InputSignal<WrClassInput>;
|
|
164
|
+
/**
|
|
165
|
+
* Where the global toast stack paints while the drawer is open. `'below'`
|
|
166
|
+
* keeps it under the drawer and its backdrop. Read when the drawer opens.
|
|
167
|
+
* @default 'above'
|
|
168
|
+
*/
|
|
169
|
+
readonly toasts: import("@angular/core").InputSignal<"below" | "above">;
|
|
156
170
|
protected readonly resolvedCloseLabel: import("@angular/core").Signal<string>;
|
|
157
171
|
protected readonly panelTpl: import("@angular/core").Signal<TemplateRef<any>>;
|
|
158
172
|
/**
|
|
@@ -170,6 +184,7 @@ export declare class WrDrawer {
|
|
|
170
184
|
protected panelClasses(): string;
|
|
171
185
|
private readonly focusMonitor;
|
|
172
186
|
private readonly overlay;
|
|
187
|
+
private readonly order;
|
|
173
188
|
private readonly vcr;
|
|
174
189
|
private readonly destroyRef;
|
|
175
190
|
private readonly injector;
|
|
@@ -282,6 +297,11 @@ export declare class WrDrawer {
|
|
|
282
297
|
"required": false;
|
|
283
298
|
"isSignal": true;
|
|
284
299
|
};
|
|
300
|
+
"toasts": {
|
|
301
|
+
"alias": "toasts";
|
|
302
|
+
"required": false;
|
|
303
|
+
"isSignal": true;
|
|
304
|
+
};
|
|
285
305
|
}, {
|
|
286
306
|
"open": "openChange";
|
|
287
307
|
}, ["projectedTitle"], ["*"], true, never>;
|
|
@@ -388,6 +408,7 @@ export declare class WrDrawerManager {
|
|
|
388
408
|
private readonly isBrowser;
|
|
389
409
|
private readonly i18n;
|
|
390
410
|
private readonly location;
|
|
411
|
+
private readonly order;
|
|
391
412
|
/**
|
|
392
413
|
* The application's reading direction — the instance the CDK itself read when
|
|
393
414
|
* it stamped the overlay. A root service has no node injector above it, so a
|
package/types/ngwr-i18n.d.ts
CHANGED
|
@@ -7,6 +7,19 @@ interface WrI18nCatalog {
|
|
|
7
7
|
}
|
|
8
8
|
/** Parameters passed to interpolation — coerced to strings via `String(v)`. */
|
|
9
9
|
type WrI18nParams = Readonly<Record<string, unknown>>;
|
|
10
|
+
/**
|
|
11
|
+
* The third argument of `WrI18n.t()`, `WrI18n.translate()` and the `wrT` pipe,
|
|
12
|
+
* where a bare string is the scope.
|
|
13
|
+
*/
|
|
14
|
+
interface WrI18nTranslateOptions {
|
|
15
|
+
/** Scoped lookup first, then the root catalog. */
|
|
16
|
+
readonly scope?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Returned as is when the key is missing: no interpolation, no
|
|
19
|
+
* `missingHandler` call. `null` and `undefined` mean no fallback.
|
|
20
|
+
*/
|
|
21
|
+
readonly fallback?: string | null;
|
|
22
|
+
}
|
|
10
23
|
/** Hook called once on every key that resolves to nothing. */
|
|
11
24
|
type WrI18nMissingHandler = (key: string, locale: string) => string;
|
|
12
25
|
/** User-facing config for {@link provideWrI18n}. */
|
|
@@ -79,6 +92,7 @@ export declare const WR_I18N_CONFIG: InjectionToken<WrI18nConfigResolved>;
|
|
|
79
92
|
* specific statement wins, because it can only have been deliberate.
|
|
80
93
|
* 2. **`WrI18n.locale()` — the runtime value.** The only one of the three that
|
|
81
94
|
* can change without a reload, so it is what a language switcher writes.
|
|
95
|
+
* With `provideWrI18n()` in the app, dates are written in it.
|
|
82
96
|
* 3. **`LOCALE_ID`.** Angular's app-wide constant, and the seed for both of the
|
|
83
97
|
* above when neither was given. One statement, one answer.
|
|
84
98
|
* 4. `'en-US'`, which is what `LOCALE_ID` itself falls back to.
|
|
@@ -88,11 +102,12 @@ export declare const WR_I18N_CONFIG: InjectionToken<WrI18nConfigResolved>;
|
|
|
88
102
|
* the hydrated page disagree.
|
|
89
103
|
*
|
|
90
104
|
* **What a runtime switch reaches, and what it does not.** `use()` repaints
|
|
91
|
-
* every catalog string
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
105
|
+
* every catalog string, and every date: the date adapter, and so
|
|
106
|
+
* `wr-calendar`, `wr-date-picker`, `wrDate` and `wr-date-stamp`, formats in
|
|
107
|
+
* this locale unless `withDates({ locale })` pinned another. It does not move
|
|
108
|
+
* `LOCALE_ID`, which is a constant, so anything keyed on it — `wrNumber` /
|
|
109
|
+
* `wrPlural`, `wr-input-number`, `wr-statistic`, `wr-counter` — stays where it
|
|
110
|
+
* was. `use()` says so once in dev mode rather than leaving it to be
|
|
96
111
|
* discovered.
|
|
97
112
|
*
|
|
98
113
|
* @example
|
|
@@ -101,6 +116,7 @@ export declare const WR_I18N_CONFIG: InjectionToken<WrI18nConfigResolved>;
|
|
|
101
116
|
* i18n.use('ru'); // switch locale
|
|
102
117
|
* i18n.t('cart.checkout'); // → 'Оформить заказ'
|
|
103
118
|
* i18n.t('greeting', { name: 'Ada' }); // → 'Hello, Ada!'
|
|
119
|
+
* i18n.t(`types.${type}`, undefined, { fallback: type }); // → type, when no key
|
|
104
120
|
*
|
|
105
121
|
* effect(() => console.log(i18n.translate('hi')())); // re-runs on locale change
|
|
106
122
|
* ```
|
|
@@ -137,9 +153,9 @@ export declare class WrI18n {
|
|
|
137
153
|
/**
|
|
138
154
|
* Switch active locale. Ignored when not whitelisted.
|
|
139
155
|
*
|
|
140
|
-
* Text
|
|
156
|
+
* Text and dates — see the class docs for what a runtime switch cannot reach. The
|
|
141
157
|
* dev-mode warning below is the whole reporting of that limit; without it the
|
|
142
|
-
* failure is a screen showing German labels beside `
|
|
158
|
+
* failure is a screen showing German labels beside `1,234.5`, with nothing
|
|
143
159
|
* anywhere saying why.
|
|
144
160
|
*/
|
|
145
161
|
use(locale: string): void;
|
|
@@ -155,10 +171,15 @@ export declare class WrI18n {
|
|
|
155
171
|
* Eager translate — returns the current value or the missing-handler
|
|
156
172
|
* fallback. Does NOT auto-load missing catalogs; combine with the
|
|
157
173
|
* reactive `translate(...)` if you want load-on-demand.
|
|
174
|
+
*
|
|
175
|
+
* The third argument is a scope, or `{ scope, fallback }`. With a `fallback`
|
|
176
|
+
* a missing key returns it as is, not interpolated, and `missingHandler` is
|
|
177
|
+
* not called: for a key built from a server value that may have no
|
|
178
|
+
* translation.
|
|
158
179
|
*/
|
|
159
|
-
t(key: string, params?: WrI18nParams,
|
|
180
|
+
t(key: string, params?: WrI18nParams, scopeOrOptions?: string | WrI18nTranslateOptions): string;
|
|
160
181
|
/** Reactive translate — re-evaluates on locale or catalog updates. */
|
|
161
|
-
translate(key: string, params?: WrI18nParams,
|
|
182
|
+
translate(key: string, params?: WrI18nParams, scopeOrOptions?: string | WrI18nTranslateOptions): Signal<string>;
|
|
162
183
|
/**
|
|
163
184
|
* Look a key up in the registered base catalogs, later contributions first so
|
|
164
185
|
* a feature can shadow an earlier one.
|
|
@@ -177,9 +198,9 @@ export declare class WrI18n {
|
|
|
177
198
|
* Say once, in dev, that a runtime switch moved the text and nothing else.
|
|
178
199
|
*
|
|
179
200
|
* The mismatch is otherwise invisible in the way that costs the most time:
|
|
180
|
-
* the catalog strings all change, which reads as "the switch
|
|
181
|
-
*
|
|
182
|
-
* locale. Silent when the new locale IS `LOCALE_ID`, because then nothing is
|
|
201
|
+
* the catalog strings and the dates all change, which reads as "the switch
|
|
202
|
+
* worked", and the numbers beside them are still correct-looking output in
|
|
203
|
+
* the old locale. Silent when the new locale IS `LOCALE_ID`, because then nothing is
|
|
183
204
|
* out of step and a warning that fires when everything agrees is one people
|
|
184
205
|
* learn to ignore. Production builds drop the call entirely via `isDevMode()`
|
|
185
206
|
* tree-shaking.
|
|
@@ -198,11 +219,12 @@ export declare class WrI18n {
|
|
|
198
219
|
* <h1>{{ 'home.title' | wrT }}</h1>
|
|
199
220
|
* <p>{{ 'greeting' | wrT: { name: user().name } }}</p>
|
|
200
221
|
* <button>{{ 'forms.save' | wrT: null : 'checkout' }}</button>
|
|
222
|
+
* <span>{{ 'types.' + type | wrT: null : { fallback: type } }}</span>
|
|
201
223
|
* ```
|
|
202
224
|
*/
|
|
203
225
|
export declare class WrTPipe implements PipeTransform {
|
|
204
226
|
private readonly i18n;
|
|
205
|
-
transform(key: string, params?: WrI18nParams | null,
|
|
227
|
+
transform(key: string, params?: WrI18nParams | null, scopeOrOptions?: string | WrI18nTranslateOptions): string;
|
|
206
228
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrTPipe, never>;
|
|
207
229
|
static ɵpipe: i0.ɵɵPipeDeclaration<WrTPipe, "wrT", true>;
|
|
208
230
|
}
|
|
@@ -215,6 +237,7 @@ export declare class WrTPipe implements PipeTransform {
|
|
|
215
237
|
* <span [wrT]="'home.title'"></span>
|
|
216
238
|
* <span [wrT]="'greeting'" [wrTParams]="{ name: user().name }"></span>
|
|
217
239
|
* <span [wrT]="'forms.save'" wrTScope="checkout"></span>
|
|
240
|
+
* <span [wrT]="'types.' + type" [wrTFallback]="type"></span>
|
|
218
241
|
* ```
|
|
219
242
|
*/
|
|
220
243
|
export declare class WrTDirective {
|
|
@@ -224,6 +247,8 @@ export declare class WrTDirective {
|
|
|
224
247
|
readonly wrTParams: import("@angular/core").InputSignal<Readonly<Record<string, unknown>> | null>;
|
|
225
248
|
/** Optional scope — scoped lookup first, then root fallback. */
|
|
226
249
|
readonly wrTScope: import("@angular/core").InputSignal<string | null>;
|
|
250
|
+
/** Text shown as is when the key is missing; `missingHandler` is not called. */
|
|
251
|
+
readonly wrTFallback: import("@angular/core").InputSignal<string | null>;
|
|
227
252
|
private readonly host;
|
|
228
253
|
private readonly i18n;
|
|
229
254
|
private readonly text;
|
|
@@ -245,6 +270,11 @@ export declare class WrTDirective {
|
|
|
245
270
|
"required": false;
|
|
246
271
|
"isSignal": true;
|
|
247
272
|
};
|
|
273
|
+
"wrTFallback": {
|
|
274
|
+
"alias": "wrTFallback";
|
|
275
|
+
"required": false;
|
|
276
|
+
"isSignal": true;
|
|
277
|
+
};
|
|
248
278
|
}, {}, never, never, true, never>;
|
|
249
279
|
}
|
|
250
280
|
/**
|
|
@@ -469,4 +499,4 @@ export declare function wrReadI18nText(key: string, fallback: string): Signal<st
|
|
|
469
499
|
* ```
|
|
470
500
|
*/
|
|
471
501
|
export declare function useI18nFormatter(key: string, fallback: string): (params?: WrI18nParams) => string;
|
|
472
|
-
export type { ProvideWrI18nOptions, WrI18nBaseCatalogs, WrI18nCatalog, WrI18nConfig, WrI18nConfigResolved, WrI18nHttpLoaderConfig, WrI18nLoader, WrI18nMissingHandler, WrI18nParams, WrI18nStaticCatalogs, WrI18nStaticScopedCatalogs };
|
|
502
|
+
export type { ProvideWrI18nOptions, WrI18nBaseCatalogs, WrI18nCatalog, WrI18nConfig, WrI18nConfigResolved, WrI18nHttpLoaderConfig, WrI18nLoader, WrI18nMissingHandler, WrI18nParams, WrI18nStaticCatalogs, WrI18nStaticScopedCatalogs, WrI18nTranslateOptions };
|
package/types/ngwr-overlay.d.ts
CHANGED
|
@@ -203,6 +203,42 @@ export declare class WrOverlayContainer extends OverlayContainer {
|
|
|
203
203
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrOverlayContainer, never>;
|
|
204
204
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Keeps the global toast host under the overlays opened with
|
|
208
|
+
* `toasts: 'below'`, and above every other one.
|
|
209
|
+
*
|
|
210
|
+
* The top layer is ordered by the moment of promotion and by nothing else, so
|
|
211
|
+
* the only way to put the toast host under an overlay is to promote that
|
|
212
|
+
* overlay again after it. The toast host therefore belongs right under the
|
|
213
|
+
* trailing run of covering overlays: the ones opened after the last overlay
|
|
214
|
+
* that wants toasts above it. A covering overlay under such an overlay cannot
|
|
215
|
+
* be moved over the toasts without also moving over the modal above it, so the
|
|
216
|
+
* newer overlay's rule wins until it closes.
|
|
217
|
+
*
|
|
218
|
+
* @internal
|
|
219
|
+
*/
|
|
220
|
+
export declare class WrOverlayOrder {
|
|
221
|
+
/** Open overlays in the order they were promoted. */
|
|
222
|
+
private readonly layers;
|
|
223
|
+
private toasts;
|
|
224
|
+
/** How many of `layers` sit under the toast host. */
|
|
225
|
+
private under;
|
|
226
|
+
/**
|
|
227
|
+
* Register an overlay right after it is attached, which is when the CDK
|
|
228
|
+
* promotes it. Returns the function that takes it off the list.
|
|
229
|
+
*/
|
|
230
|
+
add(host: HTMLElement, toasts?: 'above' | 'below'): () => void;
|
|
231
|
+
/** Put the toast host on top, then every overlay that covers toasts over it. */
|
|
232
|
+
raiseToasts(host: HTMLElement): void;
|
|
233
|
+
dropToasts(): void;
|
|
234
|
+
/**
|
|
235
|
+
* @param raise with no covering overlay open, raise the host even where the
|
|
236
|
+
* list says it is on top: a popover this list does not know may have joined.
|
|
237
|
+
*/
|
|
238
|
+
private place;
|
|
239
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrOverlayOrder, never>;
|
|
240
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
241
|
+
}
|
|
206
242
|
/**
|
|
207
243
|
* Injection token for the CDK `Overlay` service NGWR components should
|
|
208
244
|
* use to open panels.
|
package/types/ngwr-pipes.d.ts
CHANGED
|
@@ -65,6 +65,10 @@ export declare function wrFormatBytes(value: number | string | null | undefined,
|
|
|
65
65
|
* as its `T` form: the value goes through `wrParseDate`. `null`, `undefined`,
|
|
66
66
|
* an empty string and a date the engine refuses give an empty string.
|
|
67
67
|
*
|
|
68
|
+
* An instant is printed on the wall clock of `withDates({ timeZone })`, through
|
|
69
|
+
* the adapter's `zoned()`. A date-only string is a calendar day and is not
|
|
70
|
+
* moved: `'2026-01-01'` prints as 1 January in every zone.
|
|
71
|
+
*
|
|
68
72
|
* The adapter stands where `wrFormatNumber` takes a locale, because the output
|
|
69
73
|
* is the adapter's: the native one formats in `WR_DATE_LOCALE`, and an app's own
|
|
70
74
|
* adapter formats however it formats. Neither can be rebuilt from a locale
|
|
@@ -89,6 +93,13 @@ export declare function wrFormatDate(value: Date | string | number | null | unde
|
|
|
89
93
|
* `'2026-01-01 14:30:00'` is read as its `T` form. {@link wrFormatDate} is the
|
|
90
94
|
* same output as a function.
|
|
91
95
|
*
|
|
96
|
+
* An instant is printed in the time zone of `withDates({ timeZone })`, and the
|
|
97
|
+
* output follows that zone and the adapter's locale when they change at
|
|
98
|
+
* runtime. A pure pipe cannot: Angular calls it again only when an argument
|
|
99
|
+
* changes. So the pipe is impure and keeps its last result, and a
|
|
100
|
+
* change-detection pass with nothing new costs three comparisons, not a
|
|
101
|
+
* format.
|
|
102
|
+
*
|
|
92
103
|
* @example
|
|
93
104
|
* ```html
|
|
94
105
|
* {{ now | wrDate }} <!-- shortDate -->
|
|
@@ -98,6 +109,10 @@ export declare function wrFormatDate(value: Date | string | number | null | unde
|
|
|
98
109
|
*/
|
|
99
110
|
export declare class WrDate implements PipeTransform {
|
|
100
111
|
private readonly adapter;
|
|
112
|
+
private value;
|
|
113
|
+
private format;
|
|
114
|
+
private key;
|
|
115
|
+
private text;
|
|
101
116
|
transform(value: Date | string | number | null | undefined, format?: WrDateFormat | (string & {})): string;
|
|
102
117
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrDate, never>;
|
|
103
118
|
static ɵpipe: i0.ɵɵPipeDeclaration<WrDate, "wrDate", true>;
|
package/types/ngwr-popover.d.ts
CHANGED
|
@@ -194,6 +194,19 @@ export declare class WrPopover {
|
|
|
194
194
|
readonly showDelay: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
195
195
|
/** Tooltip only — delay before hiding, in ms. @default 60 */
|
|
196
196
|
readonly hideDelay: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
197
|
+
/**
|
|
198
|
+
* Tooltip only — the element the tooltip is for, when that is not the host.
|
|
199
|
+
* The panel is placed against it, and its hover and focus show and hide the
|
|
200
|
+
* tooltip the way the host's do. Setting it shows the tooltip after
|
|
201
|
+
* `showDelay`: name the element once the pointer or the focus is on it.
|
|
202
|
+
*
|
|
203
|
+
* It lets one tooltip serve many elements, as `wr-table` does for its header
|
|
204
|
+
* hints and truncated cells: the owner listens once, and binds this to the
|
|
205
|
+
* element under the pointer and `wrPopover` to its text. `aria-describedby`
|
|
206
|
+
* stays on the host, so the owner names or describes the element itself.
|
|
207
|
+
* @default null
|
|
208
|
+
*/
|
|
209
|
+
readonly origin: import("@angular/core").InputSignal<HTMLElement | null>;
|
|
197
210
|
/**
|
|
198
211
|
* Popover mode only — accessible name of the panel. `role="dialog"` with no
|
|
199
212
|
* name announces as a bare "dialog", so the catalog's `popover.label` is used
|
|
@@ -234,6 +247,7 @@ export declare class WrPopover {
|
|
|
234
247
|
private readonly resolvedAriaLabel;
|
|
235
248
|
private readonly resolvedPosition;
|
|
236
249
|
private overlayRef;
|
|
250
|
+
private connected;
|
|
237
251
|
private textPanelRef;
|
|
238
252
|
/** Whether the HOST itself holds focus — not a descendant of it. */
|
|
239
253
|
private hostFocused;
|
|
@@ -372,6 +386,8 @@ export declare class WrPopover {
|
|
|
372
386
|
* an app — but a bare `TestBed` that provides nothing should still get a
|
|
373
387
|
* component that works, and defaulting to LTR is the honest fallback.
|
|
374
388
|
*/
|
|
389
|
+
/** Whether a node is in the host or in the element a shared tooltip is for. */
|
|
390
|
+
private isTrigger;
|
|
375
391
|
private isRtl;
|
|
376
392
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrPopover, never>;
|
|
377
393
|
static ɵdir: i0.ɵɵDirectiveDeclaration<WrPopover, "[wrPopover]", ["wrPopover"], {
|
|
@@ -405,6 +421,11 @@ export declare class WrPopover {
|
|
|
405
421
|
"required": false;
|
|
406
422
|
"isSignal": true;
|
|
407
423
|
};
|
|
424
|
+
"origin": {
|
|
425
|
+
"alias": "wrPopoverOrigin";
|
|
426
|
+
"required": false;
|
|
427
|
+
"isSignal": true;
|
|
428
|
+
};
|
|
408
429
|
"ariaLabel": {
|
|
409
430
|
"alias": "ariaLabel";
|
|
410
431
|
"required": false;
|
|
@@ -420,4 +441,21 @@ export declare class WrPopover {
|
|
|
420
441
|
"closed": "closed";
|
|
421
442
|
}, never, never, true, never>;
|
|
422
443
|
}
|
|
423
|
-
|
|
444
|
+
/** @internal */
|
|
445
|
+
interface WrTextTooltip {
|
|
446
|
+
/** Show `text` over the host, replacing what this handle showed before. */
|
|
447
|
+
show(text: string): void;
|
|
448
|
+
hide(): void;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* The `[wrPopover] mode="tooltip"` panel, opened from code over the host of the
|
|
452
|
+
* directive or component that calls this in its injection context.
|
|
453
|
+
*
|
|
454
|
+
* For feedback a pointer did not ask for, such as "Copied" after a click. It
|
|
455
|
+
* has no hover or focus wiring and sets no `aria-describedby`: the caller
|
|
456
|
+
* announces the text. A hint that describes the host is `[wrPopover]`.
|
|
457
|
+
*
|
|
458
|
+
* @internal
|
|
459
|
+
*/
|
|
460
|
+
export declare function wrUseTextTooltip(position?: WrPopoverPosition): WrTextTooltip;
|
|
461
|
+
export type { WrChartTooltip, WrChartTooltipDatum, WrChartTooltipRow, WrChartTooltipTarget, WrPopoverPosition, WrTextTooltip };
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The edge of the element that drags. `start` and `end` are logical, so they
|
|
10
|
+
* swap sides under `dir="rtl"`; `top` and `bottom` never move.
|
|
11
|
+
*/
|
|
12
|
+
type WrResizableEdge = 'start' | 'end' | 'top' | 'bottom';
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
*
|
|
16
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
17
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* A limit on the size: pixels as a number, or a percentage of the parent's
|
|
21
|
+
* matching dimension as a string (`'40%'`).
|
|
22
|
+
*/
|
|
23
|
+
type WrResizableLimit = number | `${number}%`;
|
|
24
|
+
/**
|
|
25
|
+
* Lets one element be resized by dragging one of its edges. It writes the
|
|
26
|
+
* element's own `width` (`start` / `end`) or `height` (`top` / `bottom`) in
|
|
27
|
+
* pixels and touches nothing else, so the element can lie over other content.
|
|
28
|
+
* To share space between two panes, use `wr-splitter`.
|
|
29
|
+
*
|
|
30
|
+
* The handle is an element the directive adds inside the host, over the edge.
|
|
31
|
+
* It needs a positioning context: a host whose computed `position` is `static`
|
|
32
|
+
* is given `position: relative`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <aside wrResizable [(size)]="width" minSize="240" maxSize="60%" persistKey="side-panel">…</aside>
|
|
37
|
+
*
|
|
38
|
+
* <footer wrResizable edge="top" [collapsed]="!open()">…</footer>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @see https://ngwr.dev/reference/components/resizable
|
|
42
|
+
*/
|
|
43
|
+
export declare class WrResizable {
|
|
44
|
+
/**
|
|
45
|
+
* The edge that drags. `start` and `end` resize the width and mirror under
|
|
46
|
+
* RTL; `top` and `bottom` resize the height.
|
|
47
|
+
* @default 'end'
|
|
48
|
+
*/
|
|
49
|
+
readonly edge: import("@angular/core").InputSignal<WrResizableEdge>;
|
|
50
|
+
/**
|
|
51
|
+
* The size in pixels. Two-way bindable. `null` means not set yet: the
|
|
52
|
+
* element keeps the size its CSS gives it until the first resize.
|
|
53
|
+
* `sizeChange` fires when a drag is released, on each key and on a reset,
|
|
54
|
+
* never during a drag: bind `resizing` for that.
|
|
55
|
+
* @default null
|
|
56
|
+
*/
|
|
57
|
+
readonly size: import("@angular/core").ModelSignal<number | null>;
|
|
58
|
+
/**
|
|
59
|
+
* Smallest size: pixels, or a percentage of the parent's matching dimension
|
|
60
|
+
* (`'20%'`). `null` for none.
|
|
61
|
+
* @default 0
|
|
62
|
+
*/
|
|
63
|
+
readonly minSize: import("@angular/core").InputSignalWithTransform<WrResizableLimit | null, unknown>;
|
|
64
|
+
/**
|
|
65
|
+
* Largest size: pixels, or a percentage of the parent's matching dimension.
|
|
66
|
+
* `null` for none.
|
|
67
|
+
* @default '100%'
|
|
68
|
+
*/
|
|
69
|
+
readonly maxSize: import("@angular/core").InputSignalWithTransform<WrResizableLimit | null, unknown>;
|
|
70
|
+
/**
|
|
71
|
+
* The size Enter and a double click on the handle go back to. `null` goes
|
|
72
|
+
* back to what the element started with: the `size` bound at creation, or its
|
|
73
|
+
* CSS size when there was none.
|
|
74
|
+
* @default null
|
|
75
|
+
*/
|
|
76
|
+
readonly defaultSize: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
|
|
77
|
+
/** Pixels an arrow key moves the edge. Shift moves it ten times as far. @default 10 */
|
|
78
|
+
readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
79
|
+
/**
|
|
80
|
+
* Saves the size under this key through `WrStorage` (which adds the app's
|
|
81
|
+
* prefix) when a resize ends, and restores it on creation.
|
|
82
|
+
* @default null
|
|
83
|
+
*/
|
|
84
|
+
readonly persistKey: import("@angular/core").InputSignal<string | null>;
|
|
85
|
+
/**
|
|
86
|
+
* Shrinks the element to zero and hides the handle. `size` is left alone, so
|
|
87
|
+
* the element is back at its size when this turns off.
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
readonly collapsed: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
91
|
+
/** Keeps the size and stops the handle. @default false */
|
|
92
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
93
|
+
/**
|
|
94
|
+
* Accessible name of the handle. A focusable `role="separator"` is an
|
|
95
|
+
* interactive widget, so it needs one. Falls back to `resizable.handle`.
|
|
96
|
+
* @default null
|
|
97
|
+
*/
|
|
98
|
+
readonly resizeLabel: import("@angular/core").InputSignal<string | null>;
|
|
99
|
+
/** The size in pixels on every move of a drag, before `sizeChange` settles it on release. */
|
|
100
|
+
readonly resizing: import("@angular/core").OutputEmitterRef<number>;
|
|
101
|
+
private readonly resolvedLabel;
|
|
102
|
+
private readonly host;
|
|
103
|
+
private readonly renderer;
|
|
104
|
+
private readonly doc;
|
|
105
|
+
private readonly destroyRef;
|
|
106
|
+
private readonly storage;
|
|
107
|
+
private readonly dir;
|
|
108
|
+
/** The handle, once the browser has rendered the host. Never on the server. */
|
|
109
|
+
private readonly handle;
|
|
110
|
+
/** The size a drag in progress has reached. The model takes it on release. */
|
|
111
|
+
private readonly draft;
|
|
112
|
+
/** The parent's inner size on the resize axis, which percentages are of. */
|
|
113
|
+
private readonly parentExtent;
|
|
114
|
+
/** The host's rendered size, for `aria-valuenow` while `size` is `null`. */
|
|
115
|
+
private readonly measured;
|
|
116
|
+
private drag;
|
|
117
|
+
/** What a reset goes back to without `defaultSize`: the model as it was created. */
|
|
118
|
+
private origin;
|
|
119
|
+
private originRead;
|
|
120
|
+
protected readonly axis: import("@angular/core").Signal<"block" | "inline">;
|
|
121
|
+
private readonly min;
|
|
122
|
+
private readonly max;
|
|
123
|
+
/**
|
|
124
|
+
* The size in force, clamped at the point of use and not in the model: a
|
|
125
|
+
* percentage limit moves with the parent, and a window narrowed for a moment
|
|
126
|
+
* must not cost the user the width they chose.
|
|
127
|
+
*/
|
|
128
|
+
private readonly current;
|
|
129
|
+
/** What the host's inline style carries: nothing until a size is set. */
|
|
130
|
+
protected readonly shown: import("@angular/core").Signal<number | null>;
|
|
131
|
+
private readonly inactive;
|
|
132
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
133
|
+
constructor();
|
|
134
|
+
/** Browser only: the handle, its listeners and the two size observers. */
|
|
135
|
+
private mount;
|
|
136
|
+
/** Everything the handle says about itself, rewritten when a signal behind it moves. */
|
|
137
|
+
private syncHandle;
|
|
138
|
+
private attr;
|
|
139
|
+
private onPointerDown;
|
|
140
|
+
private onPointerMove;
|
|
141
|
+
private onPointerUp;
|
|
142
|
+
/** Idempotent: releasing the capture fires `lostpointercapture`, which lands here again. */
|
|
143
|
+
private endDrag;
|
|
144
|
+
/**
|
|
145
|
+
* No text selection and one cursor for the whole page while the drag runs,
|
|
146
|
+
* on the root element so the rest of the time selection inside the element
|
|
147
|
+
* works as usual. Returns the undo, which puts back what was inline before.
|
|
148
|
+
*/
|
|
149
|
+
private lockPage;
|
|
150
|
+
private onKeydown;
|
|
151
|
+
private onReset;
|
|
152
|
+
/** A size the user settled on: into the model, and into storage when there is a key. */
|
|
153
|
+
private commit;
|
|
154
|
+
private clamp;
|
|
155
|
+
private resolve;
|
|
156
|
+
/**
|
|
157
|
+
* `1` when dragging toward higher coordinates grows the element. Read per
|
|
158
|
+
* gesture rather than cached, like the splitter: nothing rendered depends on
|
|
159
|
+
* the direction, since the handle sits on a logical edge.
|
|
160
|
+
*/
|
|
161
|
+
private growSign;
|
|
162
|
+
private isRtl;
|
|
163
|
+
/**
|
|
164
|
+
* The host's size as its `width` / `height` property means it, so writing the
|
|
165
|
+
* number back changes nothing whatever the `box-sizing`. The computed value
|
|
166
|
+
* is that; the rect is the fallback where there is no computed size.
|
|
167
|
+
*/
|
|
168
|
+
private measure;
|
|
169
|
+
private remeasure;
|
|
170
|
+
private measureParent;
|
|
171
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrResizable, never>;
|
|
172
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrResizable, "[wrResizable]", ["wrResizable"], {
|
|
173
|
+
"edge": {
|
|
174
|
+
"alias": "edge";
|
|
175
|
+
"required": false;
|
|
176
|
+
"isSignal": true;
|
|
177
|
+
};
|
|
178
|
+
"size": {
|
|
179
|
+
"alias": "size";
|
|
180
|
+
"required": false;
|
|
181
|
+
"isSignal": true;
|
|
182
|
+
};
|
|
183
|
+
"minSize": {
|
|
184
|
+
"alias": "minSize";
|
|
185
|
+
"required": false;
|
|
186
|
+
"isSignal": true;
|
|
187
|
+
};
|
|
188
|
+
"maxSize": {
|
|
189
|
+
"alias": "maxSize";
|
|
190
|
+
"required": false;
|
|
191
|
+
"isSignal": true;
|
|
192
|
+
};
|
|
193
|
+
"defaultSize": {
|
|
194
|
+
"alias": "defaultSize";
|
|
195
|
+
"required": false;
|
|
196
|
+
"isSignal": true;
|
|
197
|
+
};
|
|
198
|
+
"step": {
|
|
199
|
+
"alias": "step";
|
|
200
|
+
"required": false;
|
|
201
|
+
"isSignal": true;
|
|
202
|
+
};
|
|
203
|
+
"persistKey": {
|
|
204
|
+
"alias": "persistKey";
|
|
205
|
+
"required": false;
|
|
206
|
+
"isSignal": true;
|
|
207
|
+
};
|
|
208
|
+
"collapsed": {
|
|
209
|
+
"alias": "collapsed";
|
|
210
|
+
"required": false;
|
|
211
|
+
"isSignal": true;
|
|
212
|
+
};
|
|
213
|
+
"disabled": {
|
|
214
|
+
"alias": "disabled";
|
|
215
|
+
"required": false;
|
|
216
|
+
"isSignal": true;
|
|
217
|
+
};
|
|
218
|
+
"resizeLabel": {
|
|
219
|
+
"alias": "resizeLabel";
|
|
220
|
+
"required": false;
|
|
221
|
+
"isSignal": true;
|
|
222
|
+
};
|
|
223
|
+
}, {
|
|
224
|
+
"size": "sizeChange";
|
|
225
|
+
"resizing": "resizing";
|
|
226
|
+
}, never, never, true, never>;
|
|
227
|
+
}
|
|
228
|
+
export type { WrResizableEdge, WrResizableLimit };
|
|
@@ -290,8 +290,10 @@ export declare class WrTableHarness extends ComponentHarness {
|
|
|
290
290
|
* actually happened.
|
|
291
291
|
*/
|
|
292
292
|
isVirtual(): Promise<boolean>;
|
|
293
|
-
/** Whether the loading
|
|
293
|
+
/** Whether the table is loading, as the overlay or as the bar: the host's `aria-busy`. */
|
|
294
294
|
isLoading(): Promise<boolean>;
|
|
295
|
+
/** Which form `loading` takes: the overlay with the spinner, the bar, or `null` while idle. */
|
|
296
|
+
getLoadingForm(): Promise<'overlay' | 'bar' | null>;
|
|
295
297
|
/** The column headers, in render order — which `columnOrder` and a drag can change. */
|
|
296
298
|
getHeaderCells(filters?: WrTableHeaderCellHarnessFilters): Promise<WrTableHeaderCellHarness[]>;
|
|
297
299
|
/**
|