ngwr 14.5.0 → 14.5.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 +9 -3
- package/fesm2022/ngwr-i18n-en.mjs +16 -5
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +13 -0
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +10 -2
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/llms-full.txt +1 -1
- package/llms.txt +12 -3
- package/mcp/providers.js +8 -2
- package/package.json +1 -1
- package/schematics/migrations/v14/index.js +90 -34
- package/schematics/migrations/v7/index.js +15 -4
- package/schematics/migrations/v8/index.js +13 -2
- package/schematics/migrations/v9/index.js +19 -10
- package/skills/ngwr/SKILL.md +9 -4
- package/skills/ngwr/references/setup.md +2 -2
- package/table/styles/_index.scss +39 -12
- package/types/ngwr-i18n-en.d.ts +16 -5
- package/types/ngwr-i18n.d.ts +13 -0
- package/types/ngwr-table.d.ts +8 -0
- package/types/ngwr-version.d.ts +1 -1
package/README.md
CHANGED
|
@@ -59,9 +59,15 @@ export class SignupCard {
|
|
|
59
59
|
}
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Classic `[(ngModel)]` and reactive forms still
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
Classic `[(ngModel)]` and reactive forms still bind, with no `ControlValueAccessor`
|
|
63
|
+
created: Angular's `NgModel` / `FormControlDirective` drive the control's `value`
|
|
64
|
+
or `checked` model directly. That bridge does **not** apply template validator
|
|
65
|
+
directives — `required`, `minlength`, `maxlength`, `pattern` or `email` on an ngwr
|
|
66
|
+
control is silently ignored and the form submits — so put validators on the
|
|
67
|
+
`FormControl`. It also ignores `updateOn`, and a `{ emitEvent: false }` write needs
|
|
68
|
+
`markForCheck()`; the [forms guide](https://ngwr.dev/guides/forms) has the detail.
|
|
69
|
+
Every control is also usable standalone through its two-way `[(value)]` /
|
|
70
|
+
`[(checked)]` model.
|
|
65
71
|
|
|
66
72
|
> **Status:** active development. v14 is the current major line (Angular 22 peer).
|
|
67
73
|
> Upgrading? `ng update ngwr@14` rewrites v14's six renames and reports the
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Base English catalog for ngwr built-in component strings.
|
|
3
|
-
*
|
|
2
|
+
* Base English catalog for ngwr built-in component strings. Register it with
|
|
3
|
+
* `provideWrI18nBaseCatalogs` and keep only your own keys in the loader.
|
|
4
|
+
*
|
|
5
|
+
* Do not spread it into your own catalog. A spread is shallow, so any namespace
|
|
6
|
+
* you share with ngwr, e.g. `common`, `validation`, `table`, keeps only the keys
|
|
7
|
+
* of the side spread last, and the other side's keys stop resolving with nothing
|
|
8
|
+
* logged: ngwr's components fall back to their English defaults, and a `wrT`
|
|
9
|
+
* read of a lost key renders the raw key under the default missing handler. A
|
|
10
|
+
* base catalog is looked up key by key underneath yours, so both halves of a
|
|
11
|
+
* shared namespace resolve.
|
|
4
12
|
*
|
|
5
13
|
* @example
|
|
6
14
|
* ```ts
|
|
15
|
+
* import { provideWrI18n, provideWrI18nBaseCatalogs, provideWrI18nStaticLoader } from 'ngwr/i18n';
|
|
7
16
|
* import { wrEn } from 'ngwr/i18n/en';
|
|
8
17
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* })
|
|
18
|
+
* providers: [
|
|
19
|
+
* provideWrI18n(),
|
|
20
|
+
* provideWrI18nBaseCatalogs({ en: wrEn }),
|
|
21
|
+
* provideWrI18nStaticLoader({ en: { app: { title: 'My app' } } }),
|
|
22
|
+
* ]
|
|
12
23
|
* ```
|
|
13
24
|
*/
|
|
14
25
|
const wrEn = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-i18n-en.mjs","sources":["../../../projects/lib/i18n/en/public-api.ts","../../../projects/lib/i18n/en/ngwr-i18n-en.ts"],"sourcesContent":["import { type WrI18nCatalog } from 'ngwr/i18n';\n\n/**\n * Base English catalog for ngwr built-in component strings. Spread this\n * into your root catalog or pass it to `provideWrI18nStaticLoader`.\n *\n * @example\n * ```ts\n * import { wrEn } from 'ngwr/i18n/en';\n *\n * provideWrI18nStaticLoader({\n * en: { ...wrEn, app: { title: 'My app' } },\n * });\n * ```\n */\nexport const wrEn: WrI18nCatalog = {\n common: {\n ok: 'OK',\n cancel: 'Cancel',\n close: 'Close',\n confirm: 'Confirm',\n delete: 'Delete',\n save: 'Save',\n edit: 'Edit',\n add: 'Add',\n remove: 'Remove',\n clear: 'Clear',\n search: 'Search',\n loading: 'Loading…',\n select: 'Select',\n next: 'Next',\n previous: 'Previous',\n back: 'Back',\n today: 'Today',\n yesterday: 'Yesterday',\n tomorrow: 'Tomorrow',\n of: 'of',\n },\n pagination: {\n prev: 'Previous page',\n next: 'Next page',\n itemsPerPage: 'Items per page',\n perPage: '{{size}} / page',\n goToPage: 'Go to page {{page}}',\n label: 'Pagination',\n pageOf: 'Page {{current}} of {{total}}',\n // The whole \"1–10 of 235\" line, as ONE template. It used to be assembled in\n // TypeScript around `of` above, which localised the word in the middle and\n // froze everything else: an ASCII hyphen between the bounds, and an operand\n // order many languages do not use. `of` stays because removing a shipped key\n // breaks catalogs that override it; nothing in the library reads it now.\n range: '{{from}}–{{to}} of {{total}}',\n // The compact pager's own text, for the same reason: it was\n // `{{ page() }} / {{ totalPages() }}` in the template.\n compact: '{{current}} / {{total}}',\n },\n table: {\n empty: 'No data',\n loading: 'Loading…',\n sort: 'Sort column',\n filter: 'Filter column',\n selectAll: 'Select all rows',\n selectRow: 'Select row',\n expandRow: 'Toggle row details',\n toggleRow: 'Toggle child rows',\n selectGroup: 'Select group',\n toggleGroup: 'Toggle group',\n noMatches: 'No matches',\n // The filter panel's search box has no visible label, so `search` is both its\n // placeholder AND its accessible name.\n search: 'Search',\n reset: 'Reset',\n },\n eventCalendar: {\n today: 'Today',\n previous: 'Previous',\n next: 'Next',\n month: 'Month',\n week: 'Week',\n day: 'Day',\n time: 'Time',\n allDay: 'All day',\n label: 'Calendar',\n more: '+{{count}} more',\n // The five composed strings below are the same defect `wr-calendar` fixed\n // one component over: each was a TypeScript template literal, so the month\n // name and the date came from `Intl` and the ORDER and the punctuation\n // between them did not. A locale could translate every word in them and\n // still be stuck with English word order — ja-JP writes 2026年3月.\n header: '{{month}} {{year}}',\n range: '{{from}} – {{to}}',\n // Accessible names, which is why they matter more than they look: these\n // three are what a screen reader announces for every chip and every cell in\n // the grid, so a frozen separator is heard on every one of them.\n chipLabel: '{{title}}, {{time}}',\n slotLabel: '{{time}} — {{date}}',\n allDayCellLabel: '{{label}} — {{date}}',\n },\n tour: {\n next: 'Next',\n back: 'Back',\n done: 'Done',\n skip: 'Skip tour',\n progress: 'Step {{current}} of {{total}}',\n },\n splitter: {\n divider: 'Resize panes',\n },\n stepper: {\n // Rendered as a badge beside the step's own label, so it reads as part of the\n // header rather than as a sentence — lowercase on purpose.\n optional: 'optional',\n },\n transfer: {\n source: 'Available',\n target: 'Selected',\n search: 'Search',\n empty: 'Nothing here',\n selectAll: 'Select all',\n toTarget: 'Move to selected',\n toSource: 'Move to available',\n count: '{{checked}} / {{total}}',\n selectAllAria: '{{pane}} — {{action}}',\n },\n form: {\n // Rendered inside the label's parentheses — `(optional)` — so it is a bare\n // lowercase word and no locale has to repeat the punctuation. Same shape as\n // `stepper.optional`, and unlike the `*` marker this one is NOT `aria-hidden`.\n optional: 'optional',\n },\n validation: {\n required: 'This field is required.',\n requiredTrue: 'This field must be checked.',\n email: 'Enter a valid email address.',\n // A noun straight after a count is a plural bug waiting for the value 1 —\n // \"Enter at least 1 characters.\" — and there is no plural machinery anywhere\n // in this layer, so the wording has to be right at EVERY value rather than\n // at the common ones. Putting the number last does it: the sentence reads\n // the same at 1 and at 80.\n //\n // The other twenty-one catalogs carry the same shape in their own\n // morphology — ru's \"символов\" is genitive plural, correct for 5–20 and\n // wrong for 1 and for 2–4. Each needs a native speaker; guessing at Czech\n // plural rules from here would be the same mistake in a new language.\n minlength: 'Minimum length is {{requiredLength}}.',\n maxlength: 'Maximum length is {{requiredLength}}.',\n min: 'Enter {{min}} or more.',\n max: 'Enter {{max}} or less.',\n pattern: 'This value is not in the expected format.',\n noWhitespace: 'This value cannot contain spaces.',\n hexColor: 'Enter a hex colour, e.g. #1a2b3c.',\n url: 'Enter a valid URL.',\n cardNumber: 'Enter a valid card number.',\n cvc: 'Enter the {{length}}-digit security code.',\n iban: 'Enter a valid IBAN.',\n match: 'The two values do not match.',\n matchFields: 'These fields do not match.',\n oneOf: 'Choose one of the allowed values.',\n minDate: 'Choose a later date.',\n maxDate: 'Choose an earlier date.',\n },\n select: {\n label: 'Select',\n placeholder: 'Select…',\n empty: 'No options',\n clearSelection: 'Clear selection',\n removeItem: 'Remove {{label}}',\n noResults: 'No results',\n loading: 'Loading…',\n more: '+{{count}} more',\n },\n // `tree` covers both inline display and combobox-mode pickers\n // (replaces the dropped `treeSelect` namespace).\n tree: {\n expand: 'Expand',\n collapse: 'Collapse',\n placeholder: 'Select…',\n clearSelection: 'Clear selection',\n removeItem: 'Remove {{label}}',\n // Same string and same shape as `select.more` — the two components render\n // the identical overflow chip, and only one of them could be translated.\n more: '+{{count}} more',\n },\n commandPalette: {\n label: 'Command palette',\n placeholder: 'Type a command or search…',\n noResults: 'No results',\n // Shown INSTEAD of `noResults` while a host-driven search is in flight.\n // Without it an async palette reads \"No results\" between every keystroke\n // and its answer, which states something false about the query.\n loading: 'Searching…',\n // The key-cap chip in the search row. A key NAME rather than prose, so most\n // locales will leave it alone — but a keyboard whose key is not labelled\n // \"esc\" had no way to say so.\n escHint: 'esc',\n },\n empty: {\n noData: 'No data',\n },\n fileUpload: {\n browse: 'Click to browse',\n dropZone: 'or drop files here',\n dropZoneLabel: 'File upload drop zone — click or drop files',\n removeFile: 'Remove file',\n invalid: 'Unsupported file type',\n tooBig: 'File too large',\n // File size, as a template plus a unit table. The number itself goes through\n // `Intl.NumberFormat`, so the decimal separator follows `LOCALE_ID`; what a\n // catalog owns here is the unit abbreviation and whether a space sits before\n // it. Binary units (1024), which is what the component counts in.\n size: '{{value}} {{unit}}',\n unitByte: 'B',\n unitKb: 'KB',\n unitMb: 'MB',\n unitGb: 'GB',\n unitTb: 'TB',\n },\n popconfirm: {\n label: 'Confirm action',\n confirm: 'Confirm',\n cancel: 'Cancel',\n },\n toast: {\n region: 'Notifications',\n close: 'Close',\n copy: 'Copy',\n copied: 'Copied',\n closeAll: 'Close all',\n },\n input: {\n showPassword: 'Show password',\n hidePassword: 'Hide password',\n },\n inputNumber: {\n increment: 'Increment',\n decrement: 'Decrement',\n },\n // Two names for one box, chosen by `mode`: only the numeric strip holds digits.\n // One key saying \"Digit\" would be a lie on the alphanumeric and text modes, which\n // accept letters — a wrong name is worse than an untranslated one.\n inputOtp: {\n label: 'Verification code',\n digit: 'Digit {{index}}',\n character: 'Character {{index}}',\n },\n anchor: {\n label: 'Table of contents',\n },\n avatar: {\n alt: 'Avatar',\n },\n backTop: {\n label: 'Back to top',\n },\n breadcrumbs: {\n label: 'Breadcrumbs',\n },\n burger: {\n label: 'Toggle menu',\n },\n calendar: {\n prevMonth: 'Previous month',\n nextMonth: 'Next month',\n prevYear: 'Previous year',\n nextYear: 'Next year',\n // The month / year pickers are `role=\"listbox\"`, and a listbox owes a\n // name — without one a screen reader announces the control as nothing at\n // all. Caught by `check:state-a11y` once a state finally opened the view.\n monthList: 'Months',\n yearList: 'Years',\n prevYears: 'Previous 12 years',\n nextYears: 'Next 12 years',\n // The header above the grid, as ONE template. It was `${month} ${year}` in\n // TypeScript, which is English word order with an English separator: ja-JP\n // writes 2026年3月 and cannot get there by translating a word.\n header: '{{month}} {{year}}',\n // The year view's header, same reason — the en dash was hardcoded too.\n yearRange: '{{from}} – {{to}}',\n // A day cell's accessible name. `{{date}}` is the adapter's `longDate`, so\n // the date itself is `Intl`-ordered and `Intl`-punctuated; the catalog owns\n // only where the weekday goes relative to it.\n dayLabel: '{{weekday}}, {{date}}',\n },\n imageCropper: {\n empty: 'No image',\n window: 'Crop region',\n keyHelp:\n 'Arrow keys move the crop. Hold Alt with an arrow key to resize it, and Shift for larger steps. ' +\n 'The crop is announced as left, top, width and height in image pixels.',\n },\n sortableList: {\n keyHelp:\n 'Press Space to pick this item up, then use the arrow keys to move it. ' +\n 'Press Space again to drop it, or Escape to put it back.',\n grabbed: 'Grabbed. {{index}} of {{total}}.',\n moved: '{{index}} of {{total}}.',\n dropped: 'Dropped. {{index}} of {{total}}.',\n cancelled: 'Move cancelled.',\n },\n colorPicker: {\n // The saturation / brightness canvas is a `role=\"group\"`, which has no\n // `aria-valuenow` — so its two values ride in its name.\n area: 'Saturation and brightness, {{saturation}}% and {{brightness}}%',\n hue: 'Hue',\n alpha: 'Opacity',\n // The format strip. Three initialisms most locales keep as they are — which\n // is the reason they were left as literals, and not a reason a locale should\n // be unable to change them.\n formatHex: 'HEX',\n formatRgb: 'RGB',\n formatHsl: 'HSL',\n // Channel field labels. Each `<span>` is inside the `<label>` that names its\n // number input, so these are accessible names, not decoration. The `%` is\n // part of the string on purpose: a locale that spaces it differently, or\n // spells the channel with a different letter, needs to move both together.\n channelHex: 'HEX',\n channelRed: 'R',\n channelGreen: 'G',\n channelBlue: 'B',\n channelHue: 'H',\n channelSaturation: 'S%',\n channelLightness: 'L%',\n channelAlpha: 'A%',\n },\n calendarHeatmap: {\n label: 'Calendar heatmap',\n cell: '{{date}}: {{count}}',\n },\n lineChart: {\n label: 'Line chart',\n // The Y-axis tick abbreviation. `k` is a Latin convention — ru writes\n // `тыс.` — and the axis had it hardcoded, so it was the one number on the\n // chart no locale could reach. The digits go through `Intl.NumberFormat`,\n // so the catalog owns the suffix and whether a space sits before it.\n thousands: '{{value}}k',\n },\n donutChart: {\n label: 'Donut chart',\n },\n compare: {\n label: 'Comparison divider',\n },\n // The two `roledescription` values are spoken INSTEAD of the role name, so they\n // are lowercase nouns (\"carousel\", \"slide\") the way a role name would be — not\n // sentence-case labels like the ones above them.\n carousel: {\n label: 'Carousel',\n goToSlide: 'Go to slide {{index}}',\n prev: 'Previous slide',\n next: 'Next slide',\n pagination: 'Carousel pagination',\n roledescription: 'carousel',\n slideRoledescription: 'slide',\n },\n actionSheet: {\n label: 'Actions',\n },\n alert: {\n close: 'Close alert',\n },\n qr: {\n label: 'QR code',\n },\n image: {\n viewer: 'Image preview',\n open: 'Open preview',\n close: 'Close preview',\n },\n window: {\n close: 'Close',\n minimize: 'Minimize',\n maximize: 'Maximize',\n restore: 'Restore',\n restoreDown: 'Restore down',\n restoreWindow: 'Restore {{title}}',\n closeWindow: 'Close window',\n untitled: 'Untitled',\n taskbar: 'Minimized windows',\n },\n dialog: {\n close: 'Close dialog',\n },\n // Deliberately generic: a popover panel has no universal name, and an unnamed\n // `role=\"dialog\"` announces as nothing at all. Override per instance with\n // `[ariaLabel]`.\n popover: {\n label: 'Popover',\n },\n markdown: {\n copy: 'Copy code',\n copied: 'Copied',\n // Read before a task item's text, so a screen reader gets the state that the\n // checkbox glyph carries visually.\n taskDone: 'Done:',\n taskTodo: 'To do:',\n },\n // Count-neutral on purpose: `wrInterpolate` does `{{name}}` substitution only,\n // with no plural support, so \"Matches available: 1\" has to read correctly too.\n marquee: {\n label: 'Marquee',\n link: 'link',\n },\n mention: {\n listbox: 'Mentions',\n available: 'Matches available: {{count}}',\n inserted: 'Inserted: {{label}}',\n },\n drawer: {\n close: 'Close drawer',\n },\n datePicker: {\n open: 'Open calendar',\n openTime: 'Open time picker',\n openDateTime: 'Open date and time picker',\n openRange: 'Open range calendar',\n panel: 'Choose date',\n panelTime: 'Choose time',\n panelDateTime: 'Choose date and time',\n panelRange: 'Choose date range',\n panelRangeDateTime: 'Choose date and time range',\n rangeStart: 'Range start',\n rangeEnd: 'Range end',\n startTime: 'Start time',\n endTime: 'End time',\n hours: 'Hours',\n minutes: 'Minutes',\n seconds: 'Seconds',\n incrementHours: 'Increment hours',\n decrementHours: 'Decrement hours',\n incrementMinutes: 'Increment minutes',\n decrementMinutes: 'Decrement minutes',\n incrementSeconds: 'Increment seconds',\n decrementSeconds: 'Decrement seconds',\n toggleAmPm: 'Toggle AM / PM',\n // Rendered in the meridiem column and re-announced by its `aria-live` span on\n // every toggle, so it is a translated word rather than a fixed glyph — `wrRu`\n // spells these ДП / ПП.\n am: 'AM',\n pm: 'PM',\n },\n sidebar: {\n label: 'Sidebar',\n },\n spinner: {\n label: 'Loading',\n },\n rating: {\n label: 'Rating',\n },\n gauge: {\n label: 'Gauge',\n },\n graph: {\n label: 'Graph',\n // Read out inside each node of <wr-graph>. `{{names}}` is a list the component\n // has already joined with Intl.ListFormat, so the sentence never carries a count.\n // Each value is a whole sentence with its own terminator: a node with both reads\n // the two joined by a single space, and adds no punctuation of its own.\n parents: 'Parents: {{names}}.',\n children: 'Children: {{names}}.',\n },\n progress: {\n label: 'Progress',\n },\n meterGroup: {\n label: 'Meter',\n },\n knob: {\n label: 'Value',\n },\n slider: {\n label: 'Value',\n // Range mode gives each end its own thumb, and each thumb its own name — a\n // screen reader otherwise reads the same word twice for two different values.\n lower: 'Lower value',\n upper: 'Upper value',\n },\n speedDial: {\n label: 'Actions',\n },\n statistic: {\n // The delta chip, e.g. `+12.4%`. The number is formatted through\n // `Intl.NumberFormat` (so its sign, digits and decimal separator follow\n // `LOCALE_ID`, matching the value above it), and this template owns whether\n // a space sits between it and the unit.\n delta: '{{value}}{{suffix}}',\n // The unit the component appends when the consumer binds no `deltaSuffix`.\n deltaSuffix: '%',\n },\n result: {\n notFound: 'Sorry, the page you visited does not exist.',\n forbidden: 'Sorry, you are not authorized to access this page.',\n serverError: 'Sorry, something went wrong.',\n },\n date: {\n months: {\n jan: 'January',\n feb: 'February',\n mar: 'March',\n apr: 'April',\n may: 'May',\n jun: 'June',\n jul: 'July',\n aug: 'August',\n sep: 'September',\n oct: 'October',\n nov: 'November',\n dec: 'December',\n },\n },\n};\n","/**\n *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Q,EAAE;AACR,QAAA,KAAK,EAAE,UAAU;AAClB,KAAA;AACD,IAAA,UAAU,EAAE;AACV,QAAA,KAAK,EAAE,OAAO;AACf,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,KAAK,EAAE,OAAO;AACf,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,KAAK,EAAE,OAAO;;;AAGd,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,KAAK,EAAE,aAAa;AACrB,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACD,IAAA,SAAS,EAAE;;;;;AAKT,QAAA,KAAK,EAAE,qBAAqB;;AAE5B,QAAA,WAAW,EAAE,GAAG;AACjB,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,6CAA6C;AACvD,QAAA,SAAS,EAAE,oDAAoD;AAC/D,QAAA,WAAW,EAAE,8BAA8B;AAC5C,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,SAAS;AACd,YAAA,GAAG,EAAE,UAAU;AACf,YAAA,GAAG,EAAE,OAAO;AACZ,YAAA,GAAG,EAAE,OAAO;AACZ,YAAA,GAAG,EAAE,KAAK;AACV,YAAA,GAAG,EAAE,MAAM;AACX,YAAA,GAAG,EAAE,MAAM;AACX,YAAA,GAAG,EAAE,QAAQ;AACb,YAAA,GAAG,EAAE,WAAW;AAChB,YAAA,GAAG,EAAE,SAAS;AACd,YAAA,GAAG,EAAE,UAAU;AACf,YAAA,GAAG,EAAE,UAAU;AAChB,SAAA;AACF,KAAA;;;AC7fH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-i18n-en.mjs","sources":["../../../projects/lib/i18n/en/public-api.ts","../../../projects/lib/i18n/en/ngwr-i18n-en.ts"],"sourcesContent":["import { type WrI18nCatalog } from 'ngwr/i18n';\n\n/**\n * Base English catalog for ngwr built-in component strings. Register it with\n * `provideWrI18nBaseCatalogs` and keep only your own keys in the loader.\n *\n * Do not spread it into your own catalog. A spread is shallow, so any namespace\n * you share with ngwr, e.g. `common`, `validation`, `table`, keeps only the keys\n * of the side spread last, and the other side's keys stop resolving with nothing\n * logged: ngwr's components fall back to their English defaults, and a `wrT`\n * read of a lost key renders the raw key under the default missing handler. A\n * base catalog is looked up key by key underneath yours, so both halves of a\n * shared namespace resolve.\n *\n * @example\n * ```ts\n * import { provideWrI18n, provideWrI18nBaseCatalogs, provideWrI18nStaticLoader } from 'ngwr/i18n';\n * import { wrEn } from 'ngwr/i18n/en';\n *\n * providers: [\n * provideWrI18n(),\n * provideWrI18nBaseCatalogs({ en: wrEn }),\n * provideWrI18nStaticLoader({ en: { app: { title: 'My app' } } }),\n * ]\n * ```\n */\nexport const wrEn: WrI18nCatalog = {\n common: {\n ok: 'OK',\n cancel: 'Cancel',\n close: 'Close',\n confirm: 'Confirm',\n delete: 'Delete',\n save: 'Save',\n edit: 'Edit',\n add: 'Add',\n remove: 'Remove',\n clear: 'Clear',\n search: 'Search',\n loading: 'Loading…',\n select: 'Select',\n next: 'Next',\n previous: 'Previous',\n back: 'Back',\n today: 'Today',\n yesterday: 'Yesterday',\n tomorrow: 'Tomorrow',\n of: 'of',\n },\n pagination: {\n prev: 'Previous page',\n next: 'Next page',\n itemsPerPage: 'Items per page',\n perPage: '{{size}} / page',\n goToPage: 'Go to page {{page}}',\n label: 'Pagination',\n pageOf: 'Page {{current}} of {{total}}',\n // The whole \"1–10 of 235\" line, as ONE template. It used to be assembled in\n // TypeScript around `of` above, which localised the word in the middle and\n // froze everything else: an ASCII hyphen between the bounds, and an operand\n // order many languages do not use. `of` stays because removing a shipped key\n // breaks catalogs that override it; nothing in the library reads it now.\n range: '{{from}}–{{to}} of {{total}}',\n // The compact pager's own text, for the same reason: it was\n // `{{ page() }} / {{ totalPages() }}` in the template.\n compact: '{{current}} / {{total}}',\n },\n table: {\n empty: 'No data',\n loading: 'Loading…',\n sort: 'Sort column',\n filter: 'Filter column',\n selectAll: 'Select all rows',\n selectRow: 'Select row',\n expandRow: 'Toggle row details',\n toggleRow: 'Toggle child rows',\n selectGroup: 'Select group',\n toggleGroup: 'Toggle group',\n noMatches: 'No matches',\n // The filter panel's search box has no visible label, so `search` is both its\n // placeholder AND its accessible name.\n search: 'Search',\n reset: 'Reset',\n },\n eventCalendar: {\n today: 'Today',\n previous: 'Previous',\n next: 'Next',\n month: 'Month',\n week: 'Week',\n day: 'Day',\n time: 'Time',\n allDay: 'All day',\n label: 'Calendar',\n more: '+{{count}} more',\n // The five composed strings below are the same defect `wr-calendar` fixed\n // one component over: each was a TypeScript template literal, so the month\n // name and the date came from `Intl` and the ORDER and the punctuation\n // between them did not. A locale could translate every word in them and\n // still be stuck with English word order — ja-JP writes 2026年3月.\n header: '{{month}} {{year}}',\n range: '{{from}} – {{to}}',\n // Accessible names, which is why they matter more than they look: these\n // three are what a screen reader announces for every chip and every cell in\n // the grid, so a frozen separator is heard on every one of them.\n chipLabel: '{{title}}, {{time}}',\n slotLabel: '{{time}} — {{date}}',\n allDayCellLabel: '{{label}} — {{date}}',\n },\n tour: {\n next: 'Next',\n back: 'Back',\n done: 'Done',\n skip: 'Skip tour',\n progress: 'Step {{current}} of {{total}}',\n },\n splitter: {\n divider: 'Resize panes',\n },\n stepper: {\n // Rendered as a badge beside the step's own label, so it reads as part of the\n // header rather than as a sentence — lowercase on purpose.\n optional: 'optional',\n },\n transfer: {\n source: 'Available',\n target: 'Selected',\n search: 'Search',\n empty: 'Nothing here',\n selectAll: 'Select all',\n toTarget: 'Move to selected',\n toSource: 'Move to available',\n count: '{{checked}} / {{total}}',\n selectAllAria: '{{pane}} — {{action}}',\n },\n form: {\n // Rendered inside the label's parentheses — `(optional)` — so it is a bare\n // lowercase word and no locale has to repeat the punctuation. Same shape as\n // `stepper.optional`, and unlike the `*` marker this one is NOT `aria-hidden`.\n optional: 'optional',\n },\n validation: {\n required: 'This field is required.',\n requiredTrue: 'This field must be checked.',\n email: 'Enter a valid email address.',\n // A noun straight after a count is a plural bug waiting for the value 1 —\n // \"Enter at least 1 characters.\" — and there is no plural machinery anywhere\n // in this layer, so the wording has to be right at EVERY value rather than\n // at the common ones. Putting the number last does it: the sentence reads\n // the same at 1 and at 80.\n //\n // The other twenty-one catalogs carry the same shape in their own\n // morphology — ru's \"символов\" is genitive plural, correct for 5–20 and\n // wrong for 1 and for 2–4. Each needs a native speaker; guessing at Czech\n // plural rules from here would be the same mistake in a new language.\n minlength: 'Minimum length is {{requiredLength}}.',\n maxlength: 'Maximum length is {{requiredLength}}.',\n min: 'Enter {{min}} or more.',\n max: 'Enter {{max}} or less.',\n pattern: 'This value is not in the expected format.',\n noWhitespace: 'This value cannot contain spaces.',\n hexColor: 'Enter a hex colour, e.g. #1a2b3c.',\n url: 'Enter a valid URL.',\n cardNumber: 'Enter a valid card number.',\n cvc: 'Enter the {{length}}-digit security code.',\n iban: 'Enter a valid IBAN.',\n match: 'The two values do not match.',\n matchFields: 'These fields do not match.',\n oneOf: 'Choose one of the allowed values.',\n minDate: 'Choose a later date.',\n maxDate: 'Choose an earlier date.',\n },\n select: {\n label: 'Select',\n placeholder: 'Select…',\n empty: 'No options',\n clearSelection: 'Clear selection',\n removeItem: 'Remove {{label}}',\n noResults: 'No results',\n loading: 'Loading…',\n more: '+{{count}} more',\n },\n // `tree` covers both inline display and combobox-mode pickers\n // (replaces the dropped `treeSelect` namespace).\n tree: {\n expand: 'Expand',\n collapse: 'Collapse',\n placeholder: 'Select…',\n clearSelection: 'Clear selection',\n removeItem: 'Remove {{label}}',\n // Same string and same shape as `select.more` — the two components render\n // the identical overflow chip, and only one of them could be translated.\n more: '+{{count}} more',\n },\n commandPalette: {\n label: 'Command palette',\n placeholder: 'Type a command or search…',\n noResults: 'No results',\n // Shown INSTEAD of `noResults` while a host-driven search is in flight.\n // Without it an async palette reads \"No results\" between every keystroke\n // and its answer, which states something false about the query.\n loading: 'Searching…',\n // The key-cap chip in the search row. A key NAME rather than prose, so most\n // locales will leave it alone — but a keyboard whose key is not labelled\n // \"esc\" had no way to say so.\n escHint: 'esc',\n },\n empty: {\n noData: 'No data',\n },\n fileUpload: {\n browse: 'Click to browse',\n dropZone: 'or drop files here',\n dropZoneLabel: 'File upload drop zone — click or drop files',\n removeFile: 'Remove file',\n invalid: 'Unsupported file type',\n tooBig: 'File too large',\n // File size, as a template plus a unit table. The number itself goes through\n // `Intl.NumberFormat`, so the decimal separator follows `LOCALE_ID`; what a\n // catalog owns here is the unit abbreviation and whether a space sits before\n // it. Binary units (1024), which is what the component counts in.\n size: '{{value}} {{unit}}',\n unitByte: 'B',\n unitKb: 'KB',\n unitMb: 'MB',\n unitGb: 'GB',\n unitTb: 'TB',\n },\n popconfirm: {\n label: 'Confirm action',\n confirm: 'Confirm',\n cancel: 'Cancel',\n },\n toast: {\n region: 'Notifications',\n close: 'Close',\n copy: 'Copy',\n copied: 'Copied',\n closeAll: 'Close all',\n },\n input: {\n showPassword: 'Show password',\n hidePassword: 'Hide password',\n },\n inputNumber: {\n increment: 'Increment',\n decrement: 'Decrement',\n },\n // Two names for one box, chosen by `mode`: only the numeric strip holds digits.\n // One key saying \"Digit\" would be a lie on the alphanumeric and text modes, which\n // accept letters — a wrong name is worse than an untranslated one.\n inputOtp: {\n label: 'Verification code',\n digit: 'Digit {{index}}',\n character: 'Character {{index}}',\n },\n anchor: {\n label: 'Table of contents',\n },\n avatar: {\n alt: 'Avatar',\n },\n backTop: {\n label: 'Back to top',\n },\n breadcrumbs: {\n label: 'Breadcrumbs',\n },\n burger: {\n label: 'Toggle menu',\n },\n calendar: {\n prevMonth: 'Previous month',\n nextMonth: 'Next month',\n prevYear: 'Previous year',\n nextYear: 'Next year',\n // The month / year pickers are `role=\"listbox\"`, and a listbox owes a\n // name — without one a screen reader announces the control as nothing at\n // all. Caught by `check:state-a11y` once a state finally opened the view.\n monthList: 'Months',\n yearList: 'Years',\n prevYears: 'Previous 12 years',\n nextYears: 'Next 12 years',\n // The header above the grid, as ONE template. It was `${month} ${year}` in\n // TypeScript, which is English word order with an English separator: ja-JP\n // writes 2026年3月 and cannot get there by translating a word.\n header: '{{month}} {{year}}',\n // The year view's header, same reason — the en dash was hardcoded too.\n yearRange: '{{from}} – {{to}}',\n // A day cell's accessible name. `{{date}}` is the adapter's `longDate`, so\n // the date itself is `Intl`-ordered and `Intl`-punctuated; the catalog owns\n // only where the weekday goes relative to it.\n dayLabel: '{{weekday}}, {{date}}',\n },\n imageCropper: {\n empty: 'No image',\n window: 'Crop region',\n keyHelp:\n 'Arrow keys move the crop. Hold Alt with an arrow key to resize it, and Shift for larger steps. ' +\n 'The crop is announced as left, top, width and height in image pixels.',\n },\n sortableList: {\n keyHelp:\n 'Press Space to pick this item up, then use the arrow keys to move it. ' +\n 'Press Space again to drop it, or Escape to put it back.',\n grabbed: 'Grabbed. {{index}} of {{total}}.',\n moved: '{{index}} of {{total}}.',\n dropped: 'Dropped. {{index}} of {{total}}.',\n cancelled: 'Move cancelled.',\n },\n colorPicker: {\n // The saturation / brightness canvas is a `role=\"group\"`, which has no\n // `aria-valuenow` — so its two values ride in its name.\n area: 'Saturation and brightness, {{saturation}}% and {{brightness}}%',\n hue: 'Hue',\n alpha: 'Opacity',\n // The format strip. Three initialisms most locales keep as they are — which\n // is the reason they were left as literals, and not a reason a locale should\n // be unable to change them.\n formatHex: 'HEX',\n formatRgb: 'RGB',\n formatHsl: 'HSL',\n // Channel field labels. Each `<span>` is inside the `<label>` that names its\n // number input, so these are accessible names, not decoration. The `%` is\n // part of the string on purpose: a locale that spaces it differently, or\n // spells the channel with a different letter, needs to move both together.\n channelHex: 'HEX',\n channelRed: 'R',\n channelGreen: 'G',\n channelBlue: 'B',\n channelHue: 'H',\n channelSaturation: 'S%',\n channelLightness: 'L%',\n channelAlpha: 'A%',\n },\n calendarHeatmap: {\n label: 'Calendar heatmap',\n cell: '{{date}}: {{count}}',\n },\n lineChart: {\n label: 'Line chart',\n // The Y-axis tick abbreviation. `k` is a Latin convention — ru writes\n // `тыс.` — and the axis had it hardcoded, so it was the one number on the\n // chart no locale could reach. The digits go through `Intl.NumberFormat`,\n // so the catalog owns the suffix and whether a space sits before it.\n thousands: '{{value}}k',\n },\n donutChart: {\n label: 'Donut chart',\n },\n compare: {\n label: 'Comparison divider',\n },\n // The two `roledescription` values are spoken INSTEAD of the role name, so they\n // are lowercase nouns (\"carousel\", \"slide\") the way a role name would be — not\n // sentence-case labels like the ones above them.\n carousel: {\n label: 'Carousel',\n goToSlide: 'Go to slide {{index}}',\n prev: 'Previous slide',\n next: 'Next slide',\n pagination: 'Carousel pagination',\n roledescription: 'carousel',\n slideRoledescription: 'slide',\n },\n actionSheet: {\n label: 'Actions',\n },\n alert: {\n close: 'Close alert',\n },\n qr: {\n label: 'QR code',\n },\n image: {\n viewer: 'Image preview',\n open: 'Open preview',\n close: 'Close preview',\n },\n window: {\n close: 'Close',\n minimize: 'Minimize',\n maximize: 'Maximize',\n restore: 'Restore',\n restoreDown: 'Restore down',\n restoreWindow: 'Restore {{title}}',\n closeWindow: 'Close window',\n untitled: 'Untitled',\n taskbar: 'Minimized windows',\n },\n dialog: {\n close: 'Close dialog',\n },\n // Deliberately generic: a popover panel has no universal name, and an unnamed\n // `role=\"dialog\"` announces as nothing at all. Override per instance with\n // `[ariaLabel]`.\n popover: {\n label: 'Popover',\n },\n markdown: {\n copy: 'Copy code',\n copied: 'Copied',\n // Read before a task item's text, so a screen reader gets the state that the\n // checkbox glyph carries visually.\n taskDone: 'Done:',\n taskTodo: 'To do:',\n },\n // Count-neutral on purpose: `wrInterpolate` does `{{name}}` substitution only,\n // with no plural support, so \"Matches available: 1\" has to read correctly too.\n marquee: {\n label: 'Marquee',\n link: 'link',\n },\n mention: {\n listbox: 'Mentions',\n available: 'Matches available: {{count}}',\n inserted: 'Inserted: {{label}}',\n },\n drawer: {\n close: 'Close drawer',\n },\n datePicker: {\n open: 'Open calendar',\n openTime: 'Open time picker',\n openDateTime: 'Open date and time picker',\n openRange: 'Open range calendar',\n panel: 'Choose date',\n panelTime: 'Choose time',\n panelDateTime: 'Choose date and time',\n panelRange: 'Choose date range',\n panelRangeDateTime: 'Choose date and time range',\n rangeStart: 'Range start',\n rangeEnd: 'Range end',\n startTime: 'Start time',\n endTime: 'End time',\n hours: 'Hours',\n minutes: 'Minutes',\n seconds: 'Seconds',\n incrementHours: 'Increment hours',\n decrementHours: 'Decrement hours',\n incrementMinutes: 'Increment minutes',\n decrementMinutes: 'Decrement minutes',\n incrementSeconds: 'Increment seconds',\n decrementSeconds: 'Decrement seconds',\n toggleAmPm: 'Toggle AM / PM',\n // Rendered in the meridiem column and re-announced by its `aria-live` span on\n // every toggle, so it is a translated word rather than a fixed glyph — `wrRu`\n // spells these ДП / ПП.\n am: 'AM',\n pm: 'PM',\n },\n sidebar: {\n label: 'Sidebar',\n },\n spinner: {\n label: 'Loading',\n },\n rating: {\n label: 'Rating',\n },\n gauge: {\n label: 'Gauge',\n },\n graph: {\n label: 'Graph',\n // Read out inside each node of <wr-graph>. `{{names}}` is a list the component\n // has already joined with Intl.ListFormat, so the sentence never carries a count.\n // Each value is a whole sentence with its own terminator: a node with both reads\n // the two joined by a single space, and adds no punctuation of its own.\n parents: 'Parents: {{names}}.',\n children: 'Children: {{names}}.',\n },\n progress: {\n label: 'Progress',\n },\n meterGroup: {\n label: 'Meter',\n },\n knob: {\n label: 'Value',\n },\n slider: {\n label: 'Value',\n // Range mode gives each end its own thumb, and each thumb its own name — a\n // screen reader otherwise reads the same word twice for two different values.\n lower: 'Lower value',\n upper: 'Upper value',\n },\n speedDial: {\n label: 'Actions',\n },\n statistic: {\n // The delta chip, e.g. `+12.4%`. The number is formatted through\n // `Intl.NumberFormat` (so its sign, digits and decimal separator follow\n // `LOCALE_ID`, matching the value above it), and this template owns whether\n // a space sits between it and the unit.\n delta: '{{value}}{{suffix}}',\n // The unit the component appends when the consumer binds no `deltaSuffix`.\n deltaSuffix: '%',\n },\n result: {\n notFound: 'Sorry, the page you visited does not exist.',\n forbidden: 'Sorry, you are not authorized to access this page.',\n serverError: 'Sorry, something went wrong.',\n },\n date: {\n months: {\n jan: 'January',\n feb: 'February',\n mar: 'March',\n apr: 'April',\n may: 'May',\n jun: 'June',\n jul: 'July',\n aug: 'August',\n sep: 'September',\n oct: 'October',\n nov: 'November',\n dec: 'December',\n },\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACI,MAAM,IAAI,GAAkB;AACjC,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,EAAE,IAAI;AACR,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,KAAK,EAAE,OAAO;AACd,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,GAAG,EAAE,KAAK;AACV,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,KAAK,EAAE,OAAO;AACd,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,OAAO,EAAE,UAAU;AACnB,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,KAAK,EAAE,OAAO;AACd,QAAA,SAAS,EAAE,WAAW;AACtB,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,EAAE,EAAE,IAAI;AACT,KAAA;AACD,IAAA,UAAU,EAAE;AACV,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,YAAY,EAAE,gBAAgB;AAC9B,QAAA,OAAO,EAAE,iBAAiB;AAC1B,QAAA,QAAQ,EAAE,qBAAqB;AAC/B,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,MAAM,EAAE,+BA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AA,GAAG,EAAE,UAAU;AAChB,SAAA;AACF,KAAA;;;ACxgBH;;AAEG;;;;"}
|
package/fesm2022/ngwr-i18n.mjs
CHANGED
|
@@ -559,6 +559,15 @@ function provideWrI18n(options = {}) {
|
|
|
559
559
|
/**
|
|
560
560
|
* Provide a static loader — catalogs already in memory.
|
|
561
561
|
*
|
|
562
|
+
* A loader serves only the catalog you pass it, and ngwr registers none of its
|
|
563
|
+
* own. Pass only your own keys here and register ngwr's catalogs with
|
|
564
|
+
* {@link provideWrI18nBaseCatalogs} — not `{ ...wrRu, ...yours }`. A spread is
|
|
565
|
+
* shallow, so any namespace you share with ngwr, e.g. `common`, `validation`,
|
|
566
|
+
* `table`, keeps only the keys of the side spread last, and the other side's
|
|
567
|
+
* keys stop resolving with nothing logged: ngwr's components fall back to their
|
|
568
|
+
* English defaults, and a `wrT` read of a lost key renders the raw key under the
|
|
569
|
+
* default missing handler.
|
|
570
|
+
*
|
|
562
571
|
* @param catalogs Root catalogs keyed by locale.
|
|
563
572
|
* @param scopes Optional per-scope catalogs served to `registerScope(name)`.
|
|
564
573
|
*/
|
|
@@ -586,6 +595,10 @@ function provideWrI18nStaticLoader(catalogs, scopes) {
|
|
|
586
595
|
*
|
|
587
596
|
* Pass only the locales you ship — the ones you leave out stay out of the
|
|
588
597
|
* bundle. Your own keys always win; this is a floor, not an override.
|
|
598
|
+
*
|
|
599
|
+
* Use it instead of spreading `wrRu` into your own catalog, too: the lookup
|
|
600
|
+
* walks these key by key after the loader's catalog misses, so a namespace both
|
|
601
|
+
* define keeps both halves, where a shallow spread keeps only one.
|
|
589
602
|
*/
|
|
590
603
|
function provideWrI18nBaseCatalogs(catalogs) {
|
|
591
604
|
return { provide: WR_I18N_BASE_CATALOGS, useValue: catalogs, multi: true };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-i18n.mjs","sources":["../../../projects/lib/i18n/i18n-base-catalogs.ts","../../../projects/lib/i18n/i18n-config.ts","../../../projects/lib/i18n/i18n-loader.ts","../../../projects/lib/i18n/i18n.ts","../../../projects/lib/i18n/t.pipe.ts","../../../projects/lib/i18n/t.directive.ts","../../../projects/lib/i18n/loaders/static-loader.ts","../../../projects/lib/i18n/loaders/http-loader.ts","../../../projects/lib/i18n/provide-wr-i18n.ts","../../../projects/lib/i18n/util.ts","../../../projects/lib/i18n/ngwr-i18n.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { type WrI18nCatalog } from './i18n-config';\n\n/** Base catalogs keyed by locale, contributed by {@link provideWrI18nBaseCatalogs}. */\nexport type WrI18nBaseCatalogs = Readonly<Record<string, WrI18nCatalog>>;\n\n/**\n * Catalogs consulted *underneath* whatever the loader returned — the place for\n * ngwr's own built-in strings.\n *\n * A loader **replaces** the catalog for a locale rather than extending it, so an\n * app whose JSON holds only its own keys used to lose every built-in label to\n * its hardcoded English fallback, silently. Registering `wrRu` / `wrEn` here\n * puts them back without the app having to merge anything itself.\n *\n * `multi`, so several features can each contribute; later contributions win on\n * a key collision, and anything the loader returned still wins over all of them.\n *\n * It has to be handed in by the consumer rather than wired up inside\n * `provideWrI18n()`: the catalogs are their own entry points (`ngwr/i18n/ru`)\n * and they already import from `ngwr/i18n`, so importing them back here is a\n * circular entry-point dependency that ng-packagr rejects outright. Passing\n * them in also keeps the locales you don't ship out of your bundle.\n */\nexport const WR_I18N_BASE_CATALOGS = new InjectionToken<readonly WrI18nBaseCatalogs[]>('WR_I18N_BASE_CATALOGS');\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken, LOCALE_ID, inject } from '@angular/core';\n\n/** Translation catalog — flat or nested record of strings. */\nexport interface WrI18nCatalog {\n readonly [key: string]: string | WrI18nCatalog;\n}\n\n/** Parameters passed to interpolation — coerced to strings via `String(v)`. */\nexport type WrI18nParams = Readonly<Record<string, unknown>>;\n\n/** Hook called once on every key that resolves to nothing. */\nexport type WrI18nMissingHandler = (key: string, locale: string) => string;\n\n/** User-facing config for {@link provideWrI18n}. */\nexport interface WrI18nConfig {\n /**\n * BCP-47 tag used until the user calls `use()`.\n *\n * Omitted, it is Angular's own `LOCALE_ID` — the app already states its\n * locale there, and ngwr having a second, unrelated default is how a fully\n * Russian app came to render an English calendar inside itself. See\n * {@link WrI18n} for the whole precedence.\n *\n * @default LOCALE_ID\n */\n readonly defaultLocale?: string;\n\n /**\n * Whitelisted locales — `use()` ignores anything outside this list. Omitted,\n * it is `[defaultLocale]`: it used to be a hardcoded `['en']`, so\n * `provideWrI18n({ defaultLocale: 'ru' })` produced a service whose own\n * default locale was not switchable back to.\n *\n * @default [defaultLocale]\n */\n readonly availableLocales?: readonly string[];\n\n /**\n * Storage key for persisting the active locale (via `WrStorage`).\n * Set to `null` to disable persistence. @default 'wr:i18n:locale'\n */\n readonly storageKey?: string | null;\n\n /** Called when a key is missing. Default returns the key itself. */\n readonly missingHandler?: WrI18nMissingHandler;\n}\n\n/** Resolved config — every field non-optional. @internal */\nexport interface WrI18nConfigResolved {\n readonly defaultLocale: string;\n readonly availableLocales: readonly string[];\n readonly storageKey: string | null;\n readonly missingHandler: WrI18nMissingHandler;\n}\n\n/**\n * Everything but the locale, which cannot be a constant: it is resolved from\n * `LOCALE_ID` in an injection context. @internal\n */\nexport const DEFAULT_WR_I18N_CONFIG: Omit<WrI18nConfigResolved, 'defaultLocale' | 'availableLocales'> = {\n storageKey: 'wr:i18n:locale',\n missingHandler: key => key,\n};\n\n/**\n * Resolve the locale half of the config. Callable only from an injection\n * context, because the seed is `LOCALE_ID`. @internal\n */\nexport function resolveWrI18nLocales(\n config: WrI18nConfig\n): Pick<WrI18nConfigResolved, 'defaultLocale' | 'availableLocales'> {\n const defaultLocale = config.defaultLocale ?? inject(LOCALE_ID);\n return { defaultLocale, availableLocales: config.availableLocales ?? [defaultLocale] };\n}\n\nexport const WR_I18N_CONFIG = new InjectionToken<WrI18nConfigResolved>('WR_I18N_CONFIG', {\n factory: () => ({ ...DEFAULT_WR_I18N_CONFIG, ...resolveWrI18nLocales({}) }),\n});\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { of, type Observable } from 'rxjs';\n\nimport { type WrI18nCatalog } from './i18n-config';\n\n/**\n * Loads a catalog for a `(locale, scope)` pair. `scope` is `null` for the\n * root catalog. Implementations may return the catalog synchronously\n * (via `of(...)`) for static catalogs or asynchronously (via HTTP) for\n * lazy fetches.\n */\nexport interface WrI18nLoader {\n load(locale: string, scope: string | null): Observable<WrI18nCatalog>;\n}\n\n/**\n * The active loader.\n *\n * Defaults to one that serves an empty catalog, which is what makes\n * `provideWrI18n()` genuinely optional: every ngwr component routes its\n * built-in strings through `useI18nText` / `readI18nText`, those inject\n * `WrI18n` optionally — and because `WrI18n` is `providedIn: 'root'`, an\n * optional inject still CONSTRUCTS it. Without a default here that construction\n * threw `NG0201: No provider found for WR_I18N_LOADER`, so an app that had\n * simply not configured i18n could not render `<wr-alert>` at all.\n *\n * With the empty catalog, every lookup misses, `t()` hands back the key, and\n * the helpers fall through to the component's own English default — the\n * documented no-i18n behaviour.\n */\nexport const WR_I18N_LOADER = new InjectionToken<WrI18nLoader>('WR_I18N_LOADER', {\n providedIn: 'root',\n factory: () => ({ load: () => of({}) }),\n});\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { LOCALE_ID, Service, type Signal, computed, effect, inject, isDevMode, signal } from '@angular/core';\n\nimport { type Observable, firstValueFrom } from 'rxjs';\n\nimport { WrStorage } from 'ngwr/storage';\n\nimport { WR_I18N_BASE_CATALOGS } from './i18n-base-catalogs';\nimport { WR_I18N_CONFIG, type WrI18nCatalog, type WrI18nParams } from './i18n-config';\nimport { WR_I18N_LOADER } from './i18n-loader';\n\n/** Cache key shape: `<locale>::<scope|''>`. @internal */\nfunction cacheKey(locale: string, scope: string | null): string {\n return `${locale}::${scope ?? ''}`;\n}\n\n/**\n * A locale and the language under it: `'ru-RU'` gives `['ru-RU', 'ru']`.\n *\n * Every lookup and every load walks this, so a catalog registered as `ru`\n * answers an app running `ru-RU`. Without it the two spellings are unrelated\n * strings, and the miss is silent — `t()` returns the key, `useI18nText` reads\n * that as \"missing\" and serves the English fallback, so a fully translated app\n * renders English with nothing logged. It only ever truncates: an `en` lookup\n * never reaches an `en-US` catalog, because a language is not a region.\n *\n * @internal\n */\nfunction localeChain(locale: string): readonly string[] {\n const dash = locale.indexOf('-');\n return dash > 0 ? [locale, locale.slice(0, dash)] : [locale];\n}\n\n/** Walk a dotted path through a catalog tree. Returns string | null. @internal */\nfunction walk(cat: WrI18nCatalog | null, key: string): string | null {\n if (!cat) return null;\n let node: string | WrI18nCatalog | undefined = cat;\n for (const part of key.split('.')) {\n if (node === undefined || typeof node === 'string') return null;\n node = node[part];\n }\n return typeof node === 'string' ? node : null;\n}\n\n/**\n * `{{name}}` interpolation. Missing params resolve to `''`. Exported so\n * helpers in `util.ts` can interpolate the fallback template when no\n * `WrI18n` provider is wired up.\n *\n * @internal\n */\nexport function wrInterpolate(template: string, params: WrI18nParams | undefined): string {\n if (!params) return template;\n return template.replace(/\\{\\{\\s*([\\w.-]+)\\s*\\}\\}/g, (_match, name: string) => {\n const v = params[name];\n if (v === undefined || v === null) return '';\n if (typeof v === 'string') return v;\n if (typeof v === 'number' || typeof v === 'boolean') return String(v);\n try {\n return JSON.stringify(v);\n } catch {\n return '';\n }\n });\n}\n\n/**\n * Reactive i18n service. Holds:\n *\n * - the active locale as a `Signal<string>`\n * - per-`(locale, scope)` catalogs in a `Map` (loaded once, then cached)\n * - a per-locale signal counter so every `translate()` reading the signal\n * re-evaluates the moment a new catalog finishes loading\n *\n * Translations are looked up scope-first then root, per locale, and the locale\n * itself is tried as the full tag before the bare language underneath it — so\n * an app running `ru-RU` resolves against a catalog registered as `ru`, and a\n * regional catalog is never shadowed by a scope in the base language. For an\n * app that spells its locale one way, which is every app that existed before\n * the chain, the order is exactly what it always was.\n *\n * ## Which locale wins\n *\n * ngwr has three locale inputs and they used to be three unrelated answers — an\n * app that set `LOCALE_ID: 'ru-RU'` correctly still rendered an English\n * calendar, because the date token defaulted to `navigator.language`. The\n * precedence is now stated, highest first:\n *\n * 1. **A subsystem's own explicit option.** `provideWrDateAdapter({ locale })`\n * pins dates; `provideWrI18n({ defaultLocale })` pins the catalog. The most\n * specific statement wins, because it can only have been deliberate.\n * 2. **`WrI18n.locale()` — the runtime value.** The only one of the three that\n * can change without a reload, so it is what a language switcher writes.\n * 3. **`LOCALE_ID`.** Angular's app-wide constant, and the seed for both of the\n * above when neither was given. One statement, one answer.\n * 4. `'en-US'`, which is what `LOCALE_ID` itself falls back to.\n *\n * `navigator.language` is deliberately NOT in that list. It is the browser's\n * preference, not the application's, and reading it made prerendered output and\n * the hydrated page disagree.\n *\n * **What a runtime switch reaches, and what it does not.** `use()` repaints\n * every catalog string. It does not move `LOCALE_ID`, which is a constant, so\n * anything keyed on it — `wrDate` / `wrNumber` / `wrPlural`, `wr-input-number`,\n * `wr-statistic`, `wr-counter` — and anything keyed on `WR_DATE_LOCALE` — the\n * date adapter, and so `wr-calendar` and `wr-date-picker` — stays where it was.\n * `use()` says so once in dev mode rather than leaving it to be discovered.\n *\n * @example\n * ```ts\n * const i18n = inject(WrI18n);\n * i18n.use('ru'); // switch locale\n * i18n.t('cart.checkout'); // → 'Оформить заказ'\n * i18n.t('greeting', { name: 'Ada' }); // → 'Hello, Ada!'\n *\n * effect(() => console.log(i18n.translate('hi')())); // re-runs on locale change\n * ```\n *\n * @see https://ngwr.dev/reference/services/i18n\n */\n@Service()\nexport class WrI18n {\n private readonly config = inject(WR_I18N_CONFIG);\n private readonly loader = inject(WR_I18N_LOADER);\n private readonly storage = inject(WrStorage);\n\n /**\n * Angular's own locale. Read for the dev-mode drift warning only — the\n * resolved default already folded it in through `WR_I18N_CONFIG`. @internal\n */\n private readonly localeId = inject(LOCALE_ID);\n\n /**\n * Catalogs registered via `provideWrI18nBaseCatalogs()` — the floor under the\n * loader's own catalogs, so ngwr's built-in strings survive an app that only\n * ships its own keys. @internal\n */\n private readonly baseCatalogs = inject(WR_I18N_BASE_CATALOGS, { optional: true }) ?? [];\n\n /** Per-(locale,scope) catalogs, populated by `loadCatalog`. @internal */\n private readonly catalogs = new Map<string, WrI18nCatalog>();\n\n /** Bumped after each catalog write so reactive translates recompute. @internal */\n private readonly revision = signal(0);\n\n /** In-flight load promises — dedupes parallel `t()` callers. @internal */\n private readonly inflight = new Map<string, Promise<WrI18nCatalog>>();\n\n /** Registered scopes — auto-loaded whenever the locale changes. @internal */\n private readonly scopes = new Set<string>();\n\n /** Active locale. Writes go through `use()` so storage stays in sync. */\n private readonly _locale = signal<string>(this.initialLocale());\n readonly locale: Signal<string> = this._locale.asReadonly();\n\n constructor() {\n // Eagerly load the root catalog + every registered scope for the\n // current locale. Subsequent locale changes refire the same effect.\n effect(() => {\n const lc = this._locale();\n void this.loadChain(lc, null);\n for (const sc of this.scopes) void this.loadChain(lc, sc);\n });\n }\n\n // Locale\n\n /**\n * Switch active locale. Ignored when not whitelisted.\n *\n * Text only — see the class docs for what a runtime switch cannot reach. The\n * dev-mode warning below is the whole reporting of that limit; without it the\n * failure is a screen showing German labels beside `3/15/2026`, with nothing\n * anywhere saying why.\n */\n use(locale: string): void {\n if (!this.config.availableLocales.includes(locale)) return;\n const previous = this._locale();\n this._locale.set(locale);\n if (this.config.storageKey) this.storage.set(this.config.storageKey, locale);\n if (isDevMode() && previous !== locale) this.warnOnLocaleIdDrift(locale);\n }\n\n /** Available locales — pass-through from config. */\n available(): readonly string[] {\n return this.config.availableLocales;\n }\n\n // Scopes\n\n /**\n * Register a scope so its catalog loads alongside the root one. Idempotent.\n * Returns a promise resolving once the current locale's scope catalog is in\n * the cache — handy for feature `canActivate` guards.\n */\n registerScope(scope: string): Promise<WrI18nCatalog> {\n this.scopes.add(scope);\n const lc = this._locale();\n // Resolve on the exact tag: the promise is what a `canActivate` waits on,\n // and the base-language catalog is only ever a fallback under it.\n const exact = this.loadCatalog(lc, scope);\n void this.loadChain(lc, scope);\n return exact;\n }\n\n // Translate\n\n /**\n * Eager translate — returns the current value or the missing-handler\n * fallback. Does NOT auto-load missing catalogs; combine with the\n * reactive `translate(...)` if you want load-on-demand.\n */\n t(key: string, params?: WrI18nParams, scope?: string): string {\n // Read revision so callers inside computed/effect re-run on updates.\n this.revision();\n const lc = this._locale();\n\n const chain = localeChain(lc);\n let hit: string | null = null;\n for (const candidate of chain) {\n if (scope) hit = walk(this.catalogs.get(cacheKey(candidate, scope)) ?? null, key);\n hit ??= walk(this.catalogs.get(cacheKey(candidate, null)) ?? null, key);\n if (hit !== null) break;\n }\n // Base catalogs are the floor: consulted only once the loader's own catalogs\n // have missed, so an app's keys always win, but ngwr's built-in strings are\n // still there when the app's catalog doesn't carry them.\n hit ??= this.walkBase(chain, key);\n\n if (hit === null) {\n // Fire a background load so a future read can resolve it.\n void this.loadChain(lc, scope ?? null);\n return this.config.missingHandler(key, lc);\n }\n return wrInterpolate(hit, params);\n }\n\n /** Reactive translate — re-evaluates on locale or catalog updates. */\n translate(key: string, params?: WrI18nParams, scope?: string): Signal<string> {\n return computed(() => this.t(key, params, scope));\n }\n\n // Internals\n\n /**\n * Look a key up in the registered base catalogs, later contributions first so\n * a feature can shadow an earlier one.\n */\n private walkBase(chain: readonly string[], key: string): string | null {\n for (const locale of chain) {\n for (let i = this.baseCatalogs.length - 1; i >= 0; i--) {\n const hit = walk(this.baseCatalogs[i][locale] ?? null, key);\n if (hit !== null) return hit;\n }\n }\n return null;\n }\n\n private initialLocale(): string {\n if (this.config.storageKey) {\n const saved = this.storage.get<string>(this.config.storageKey);\n if (saved && this.config.availableLocales.includes(saved)) return saved;\n }\n return this.config.defaultLocale;\n }\n\n /**\n * Load a `(locale, scope)` catalog and, when the locale carries a region, the\n * bare-language one under it. Both go in the cache; `t()` reads them in that\n * order.\n */\n private loadChain(locale: string, scope: string | null): Promise<unknown> {\n return Promise.all(localeChain(locale).map(candidate => this.loadCatalog(candidate, scope)));\n }\n\n /** One warning per service, not one per switch. @internal */\n private warnedLocaleIdDrift = false;\n\n /**\n * Say once, in dev, that a runtime switch moved the text and nothing else.\n *\n * The mismatch is otherwise invisible in the way that costs the most time:\n * the catalog strings all change, which reads as \"the switch worked\", and the\n * dates and numbers beside them are still correct-looking output in the old\n * locale. Silent when the new locale IS `LOCALE_ID`, because then nothing is\n * out of step and a warning that fires when everything agrees is one people\n * learn to ignore. Production builds drop the call entirely via `isDevMode()`\n * tree-shaking.\n */\n private warnOnLocaleIdDrift(locale: string): void {\n if (this.warnedLocaleIdDrift || locale === this.localeId) return;\n this.warnedLocaleIdDrift = true;\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n `[NGWR] WrI18n.use('${locale}') switched the catalog, but LOCALE_ID is still '${this.localeId}'. ` +\n `LOCALE_ID is an Angular constant and WR_DATE_LOCALE resolves from it once at bootstrap, so ` +\n `formatted dates and numbers do not follow the switch and stay on '${this.localeId}': the date ` +\n `adapter (and so wr-calendar / wr-date-picker), the wrDate / wrNumber / wrPlural pipes, ` +\n `wr-input-number, wr-statistic, wr-counter, wr-pagination's total and wr-file-upload's sizes. ` +\n `Reload the app with the new LOCALE_ID to move those, or keep runtime switching to text.`\n );\n }\n\n private loadCatalog(locale: string, scope: string | null): Promise<WrI18nCatalog> {\n const ck = cacheKey(locale, scope);\n const cached = this.catalogs.get(ck);\n if (cached) return Promise.resolve(cached);\n\n const pending = this.inflight.get(ck);\n if (pending) return pending;\n\n const stream: Observable<WrI18nCatalog> = this.loader.load(locale, scope);\n const promise = firstValueFrom(stream)\n .then(catalog => {\n this.catalogs.set(ck, catalog);\n this.revision.update(v => v + 1);\n return catalog;\n })\n .catch((err: unknown) => {\n // eslint-disable-next-line no-console -- intentional diagnostic for missing catalog\n console.warn(`[ngwr/i18n] failed to load (${locale}, ${scope ?? 'root'})`, err);\n const empty: WrI18nCatalog = {};\n this.catalogs.set(ck, empty);\n return empty;\n })\n .finally(() => {\n this.inflight.delete(ck);\n });\n\n this.inflight.set(ck, promise);\n return promise;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Pipe, type PipeTransform, inject } from '@angular/core';\n\nimport { WrI18n } from './i18n';\nimport { type WrI18nParams } from './i18n-config';\n\n/**\n * Translate a key. Impure — re-evaluates on every CD so locale switches\n * and catalog loads propagate without a manual refresh.\n *\n * @example\n * ```html\n * <h1>{{ 'home.title' | wrT }}</h1>\n * <p>{{ 'greeting' | wrT: { name: user().name } }}</p>\n * <button>{{ 'forms.save' | wrT: null : 'checkout' }}</button>\n * ```\n */\n// eslint-disable-next-line @angular-eslint/no-pipe-impure -- intentional: locale + catalog updates must propagate even when args are stable\n@Pipe({ name: 'wrT', pure: false })\nexport class WrTPipe implements PipeTransform {\n private readonly i18n = inject(WrI18n);\n\n transform(key: string, params?: WrI18nParams | null, scope?: string): string {\n return this.i18n.t(key, params ?? undefined, scope);\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, ElementRef, computed, effect, inject, input } from '@angular/core';\n\nimport { WrI18n } from './i18n';\nimport { type WrI18nParams } from './i18n-config';\n\n/**\n * Attribute directive that sets `textContent` of its host to the translation\n * of the bound key. Reactive — re-renders on locale + catalog changes.\n *\n * @example\n * ```html\n * <span [wrT]=\"'home.title'\"></span>\n * <span [wrT]=\"'greeting'\" [wrTParams]=\"{ name: user().name }\"></span>\n * <span [wrT]=\"'forms.save'\" wrTScope=\"checkout\"></span>\n * ```\n */\n@Directive({\n selector: '[wrT]',\n})\nexport class WrTDirective {\n /** Translation key. Required. */\n readonly wrT = input.required<string>();\n\n /** Interpolation params for `{{name}}` tokens. */\n readonly wrTParams = input<WrI18nParams | null>(null);\n\n /** Optional scope — scoped lookup first, then root fallback. */\n readonly wrTScope = input<string | null>(null);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly i18n = inject(WrI18n);\n\n private readonly text = computed(() =>\n this.i18n.t(this.wrT(), this.wrTParams() ?? undefined, this.wrTScope() ?? undefined)\n );\n\n constructor() {\n effect(() => {\n this.host.nativeElement.textContent = this.text();\n });\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type Observable, of } from 'rxjs';\n\nimport { type WrI18nCatalog } from '../i18n-config';\nimport { type WrI18nLoader } from '../i18n-loader';\n\n/** Root catalogs keyed by locale: `{ en: catalog, ru: catalog, … }`. */\nexport type WrI18nStaticCatalogs = Readonly<Record<string, WrI18nCatalog>>;\n\n/** Per-scope catalogs: `{ checkout: { en: catalog, ru: catalog }, … }`. */\nexport type WrI18nStaticScopedCatalogs = Readonly<Record<string, WrI18nStaticCatalogs>>;\n\n/**\n * Loader for catalogs already in memory (imported from JSON or generated).\n *\n * - Pass `catalogs` for the root catalog of every locale.\n * - Pass `scopes` if you ship per-feature catalogs the loader should serve\n * to `WrI18n.registerScope(name)` calls.\n *\n * Missing locale or scope resolves to `{}` — the missing-key handler then\n * decides what to render.\n */\nexport class WrI18nStaticLoader implements WrI18nLoader {\n constructor(\n private readonly catalogs: WrI18nStaticCatalogs,\n private readonly scopes: WrI18nStaticScopedCatalogs = {}\n ) {}\n\n load(locale: string, scope: string | null): Observable<WrI18nCatalog> {\n if (scope === null) return of(this.catalogs[locale] ?? {});\n return of(this.scopes[scope]?.[locale] ?? {});\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { HttpClient } from '@angular/common/http';\nimport { inject } from '@angular/core';\n\nimport { type Observable, catchError, of } from 'rxjs';\n\nimport { type WrI18nCatalog } from '../i18n-config';\nimport { type WrI18nLoader } from '../i18n-loader';\n\n/** Configuration for {@link WrI18nHttpLoader}. */\nexport interface WrI18nHttpLoaderConfig {\n /**\n * URL template. Tokens:\n * - `{locale}` — required, BCP-47 tag (e.g. `en`).\n * - `{scope}` — optional, scope name. Use the `rootPath` if you need a\n * different path entirely for the root catalog.\n *\n * @example\n * ```ts\n * { path: '/assets/i18n/{locale}.json' } // root only\n * { path: '/assets/i18n/{scope}/{locale}.json',\n * rootPath: '/assets/i18n/{locale}.json' } // root + scopes\n * ```\n */\n readonly path: string;\n /** Path template for the root catalog. Defaults to `path`. */\n readonly rootPath?: string;\n}\n\n/**\n * Loader that fetches catalogs via `HttpClient`. Failures resolve to `{}`\n * (logged once at the service layer) so a missing file never throws into\n * user code.\n */\nexport class WrI18nHttpLoader implements WrI18nLoader {\n private readonly http = inject(HttpClient);\n\n constructor(private readonly config: WrI18nHttpLoaderConfig) {}\n\n load(locale: string, scope: string | null): Observable<WrI18nCatalog> {\n const template = scope === null ? (this.config.rootPath ?? this.config.path) : this.config.path;\n const url = template.replace('{locale}', locale).replace('{scope}', scope ?? '');\n return this.http.get<WrI18nCatalog>(url).pipe(catchError(() => of<WrI18nCatalog>({})));\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type EnvironmentProviders, type Provider, makeEnvironmentProviders } from '@angular/core';\n\nimport { WR_I18N_BASE_CATALOGS, type WrI18nBaseCatalogs } from './i18n-base-catalogs';\nimport {\n DEFAULT_WR_I18N_CONFIG,\n WR_I18N_CONFIG,\n type WrI18nConfig,\n type WrI18nConfigResolved,\n resolveWrI18nLocales,\n} from './i18n-config';\nimport { WR_I18N_LOADER, type WrI18nLoader } from './i18n-loader';\nimport { WrI18nHttpLoader, type WrI18nHttpLoaderConfig } from './loaders/http-loader';\nimport {\n WrI18nStaticLoader,\n type WrI18nStaticCatalogs,\n type WrI18nStaticScopedCatalogs,\n} from './loaders/static-loader';\n\n/**\n * Configure {@link WrI18n}. Either pass a `loader` directly, or use the\n * `provideWrI18nHttpLoader` / `provideWrI18nStaticLoader` helpers in the\n * same providers array.\n */\nexport interface ProvideWrI18nOptions extends WrI18nConfig {\n readonly loader?: WrI18nLoader;\n}\n\nexport function provideWrI18n(options: ProvideWrI18nOptions = {}): EnvironmentProviders {\n const { loader, ...config } = options;\n\n const providers: Provider[] = [\n {\n provide: WR_I18N_CONFIG,\n // A factory rather than a value: `defaultLocale` falls back to `LOCALE_ID`,\n // which only an injection context can read.\n useFactory: (): WrI18nConfigResolved => ({\n ...DEFAULT_WR_I18N_CONFIG,\n ...config,\n ...resolveWrI18nLocales(config),\n }),\n },\n ];\n if (loader) providers.push({ provide: WR_I18N_LOADER, useValue: loader });\n\n return makeEnvironmentProviders(providers);\n}\n\n/**\n * Provide a static loader — catalogs already in memory.\n *\n * @param catalogs Root catalogs keyed by locale.\n * @param scopes Optional per-scope catalogs served to `registerScope(name)`.\n */\nexport function provideWrI18nStaticLoader(\n catalogs: WrI18nStaticCatalogs,\n scopes?: WrI18nStaticScopedCatalogs\n): Provider {\n return { provide: WR_I18N_LOADER, useValue: new WrI18nStaticLoader(catalogs, scopes) };\n}\n\n/**\n * Register catalogs consulted *underneath* the loader — this is how ngwr's own\n * built-in strings survive when you supply your own catalogs.\n *\n * A loader replaces the catalog for a locale instead of extending it, so a JSON\n * file holding only your keys leaves every built-in label on its hardcoded\n * English fallback, with nothing logged. One line fixes it, on either loader:\n *\n * @example\n * ```ts\n * import { wrRu } from 'ngwr/i18n/ru';\n *\n * providers: [\n * provideWrI18n({ defaultLocale: 'ru', availableLocales: ['ru'] }),\n * provideWrI18nBaseCatalogs({ ru: wrRu }),\n * provideWrI18nHttpLoader({ path: '/assets/i18n/{locale}.json' }),\n * ]\n * ```\n *\n * Pass only the locales you ship — the ones you leave out stay out of the\n * bundle. Your own keys always win; this is a floor, not an override.\n */\nexport function provideWrI18nBaseCatalogs(catalogs: WrI18nBaseCatalogs): Provider {\n return { provide: WR_I18N_BASE_CATALOGS, useValue: catalogs, multi: true };\n}\n\n/** Provide an HTTP loader — catalogs fetched from URLs. Requires `provideHttpClient`. */\nexport function provideWrI18nHttpLoader(config: WrI18nHttpLoaderConfig): Provider {\n return { provide: WR_I18N_LOADER, useFactory: () => new WrI18nHttpLoader(config) };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type Signal, computed, inject, signal } from '@angular/core';\n\nimport { WrI18n, wrInterpolate } from './i18n';\nimport type { WrI18nParams } from './i18n-config';\n\n/**\n * Helper for component default text. Returns a reactive string that:\n *\n * 1. Prefers the consumer's override (an `input<string | null>()` value).\n * 2. Falls back to the i18n catalog under `key` — re-renders on locale\n * change so a switcher updates the DOM live.\n * 3. Falls back to `fallback` when no `WrI18n` is provided OR the catalog\n * is missing the key.\n *\n * Components don't need a hard dependency on `provideWrI18n` — without it,\n * the fallback is returned and everything still works.\n *\n * @example\n * ```ts\n * readonly emptyText = input<string | null>(null);\n * protected readonly empty = useI18nText(this.emptyText, 'table.empty', 'No data');\n *\n * // In template: <div>{{ empty() }}</div>\n * ```\n */\nexport function useI18nText(binding: Signal<string | null | undefined>, key: string, fallback: string): Signal<string> {\n const i18n = inject(WrI18n, { optional: true });\n if (!i18n) {\n return computed(() => {\n const v = binding();\n return v ?? fallback;\n });\n }\n\n return computed(() => {\n const v = binding();\n if (v !== null && v !== undefined && v !== '') return v;\n const translated = i18n.t(key);\n // Default missing handler returns the key itself — treat that as \"missing\"\n // and use our explicit fallback.\n return translated === key ? fallback : translated;\n });\n}\n\n/**\n * {@link useI18nText} without a binding to forward — for a built-in string the\n * component exposes no override input for. Same reactivity, same fallback\n * rules; the only difference is the missing first argument.\n *\n * It used to return a plain `string`, resolved once at injection time, and\n * that was wrong in the ordinary case rather than an edge one: `WrI18n` writes\n * every loader-backed catalog from `firstValueFrom(...).then(...)`, so even a\n * static loader serving an object literal lands a microtask AFTER the first\n * change-detection pass. Every component built in that pass read an empty\n * catalog and froze its English fallback for the life of the app — in one\n * `<wr-date-picker>` the field said \"Открыть календарь\" and the calendar\n * button beside it \"Open calendar\", off the same key.\n */\nexport function readI18nText(key: string, fallback: string): Signal<string> {\n const i18n = inject(WrI18n, { optional: true });\n if (!i18n) return computed(() => fallback);\n\n return computed(() => {\n const v = i18n.t(key);\n return v === key ? fallback : v;\n });\n}\n\n/** Tiny shim — useful when the caller doesn't have an `input` to forward. */\nexport function nullSignal(): Signal<null> {\n return signal(null).asReadonly();\n}\n\n/**\n * Build a per-call formatter for parametrized labels (e.g. ARIA labels\n * that interpolate a per-row value: `\"Remove {{label}}\"`). Returns a\n * function the template calls with the params for the current item.\n *\n * The returned function:\n * - Re-resolves the i18n catalog on every call (live locale switches just\n * work — re-rendered templates pick up new strings).\n * - Falls back to the literal `fallback` template with the same\n * `{{name}}` syntax when no `WrI18n` provider is present, or when the\n * key is missing.\n *\n * Use this for labels that vary per row. For static labels, prefer\n * {@link useI18nText} or {@link readI18nText}.\n *\n * @example\n * ```ts\n * protected readonly removeChipLabel = useI18nFormatter('select.removeItem', 'Remove {{label}}');\n *\n * // In template:\n * // [attr.aria-label]=\"removeChipLabel({ label: chip.label })\"\n * ```\n */\nexport function useI18nFormatter(key: string, fallback: string): (params?: WrI18nParams) => string {\n const i18n = inject(WrI18n, { optional: true });\n if (!i18n) {\n return (params?: WrI18nParams) => wrInterpolate(fallback, params);\n }\n return (params?: WrI18nParams) => {\n const v = i18n.t(key, params);\n return v === key ? wrInterpolate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U;AACnD,IAAA,CAAC,CAAC;AACJ;AAEA;;;;;;;;;;;;;AAaG;AACG,SAAU,YAAY,CAAC,GAAW,EAAE,QAAgB,EAAA;AACxD,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC/C,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,QAAQ,CAAC,MAAM,QAAQ,CAAC;IAE1C,OAAO,QAAQ,CAAC,MAAK;QACnB,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QACrB,OAAO,CAAC,KAAK,GAAG,GAAG,QAAQ,GAAG,CAAC;AACjC,IAAA,CAAC,CAAC;AACJ;AAEA;SACgB,UAAU,GAAA;AACxB,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;AAClC;AAEA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG,SAAU,gBAAgB,CAAC,GAAW,EAAE,QAAgB,EAAA;AAC5D,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/C,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,CAAC,MAAqB,KAAK,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC;IACnE;IACA,OAAO,CAAC,MAAqB,KAAI;QAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC;AAC7B,QAAA,OAAO,CAAC,KAAK,GAAG,GAAG,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC;AACxD,IAAA,CAAC;AACH;;AChHA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-i18n.mjs","sources":["../../../projects/lib/i18n/i18n-base-catalogs.ts","../../../projects/lib/i18n/i18n-config.ts","../../../projects/lib/i18n/i18n-loader.ts","../../../projects/lib/i18n/i18n.ts","../../../projects/lib/i18n/t.pipe.ts","../../../projects/lib/i18n/t.directive.ts","../../../projects/lib/i18n/loaders/static-loader.ts","../../../projects/lib/i18n/loaders/http-loader.ts","../../../projects/lib/i18n/provide-wr-i18n.ts","../../../projects/lib/i18n/util.ts","../../../projects/lib/i18n/ngwr-i18n.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { type WrI18nCatalog } from './i18n-config';\n\n/** Base catalogs keyed by locale, contributed by {@link provideWrI18nBaseCatalogs}. */\nexport type WrI18nBaseCatalogs = Readonly<Record<string, WrI18nCatalog>>;\n\n/**\n * Catalogs consulted *underneath* whatever the loader returned — the place for\n * ngwr's own built-in strings.\n *\n * A loader **replaces** the catalog for a locale rather than extending it, so an\n * app whose JSON holds only its own keys used to lose every built-in label to\n * its hardcoded English fallback, silently. Registering `wrRu` / `wrEn` here\n * puts them back without the app having to merge anything itself.\n *\n * `multi`, so several features can each contribute; later contributions win on\n * a key collision, and anything the loader returned still wins over all of them.\n *\n * It has to be handed in by the consumer rather than wired up inside\n * `provideWrI18n()`: the catalogs are their own entry points (`ngwr/i18n/ru`)\n * and they already import from `ngwr/i18n`, so importing them back here is a\n * circular entry-point dependency that ng-packagr rejects outright. Passing\n * them in also keeps the locales you don't ship out of your bundle.\n */\nexport const WR_I18N_BASE_CATALOGS = new InjectionToken<readonly WrI18nBaseCatalogs[]>('WR_I18N_BASE_CATALOGS');\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken, LOCALE_ID, inject } from '@angular/core';\n\n/** Translation catalog — flat or nested record of strings. */\nexport interface WrI18nCatalog {\n readonly [key: string]: string | WrI18nCatalog;\n}\n\n/** Parameters passed to interpolation — coerced to strings via `String(v)`. */\nexport type WrI18nParams = Readonly<Record<string, unknown>>;\n\n/** Hook called once on every key that resolves to nothing. */\nexport type WrI18nMissingHandler = (key: string, locale: string) => string;\n\n/** User-facing config for {@link provideWrI18n}. */\nexport interface WrI18nConfig {\n /**\n * BCP-47 tag used until the user calls `use()`.\n *\n * Omitted, it is Angular's own `LOCALE_ID` — the app already states its\n * locale there, and ngwr having a second, unrelated default is how a fully\n * Russian app came to render an English calendar inside itself. See\n * {@link WrI18n} for the whole precedence.\n *\n * @default LOCALE_ID\n */\n readonly defaultLocale?: string;\n\n /**\n * Whitelisted locales — `use()` ignores anything outside this list. Omitted,\n * it is `[defaultLocale]`: it used to be a hardcoded `['en']`, so\n * `provideWrI18n({ defaultLocale: 'ru' })` produced a service whose own\n * default locale was not switchable back to.\n *\n * @default [defaultLocale]\n */\n readonly availableLocales?: readonly string[];\n\n /**\n * Storage key for persisting the active locale (via `WrStorage`).\n * Set to `null` to disable persistence. @default 'wr:i18n:locale'\n */\n readonly storageKey?: string | null;\n\n /** Called when a key is missing. Default returns the key itself. */\n readonly missingHandler?: WrI18nMissingHandler;\n}\n\n/** Resolved config — every field non-optional. @internal */\nexport interface WrI18nConfigResolved {\n readonly defaultLocale: string;\n readonly availableLocales: readonly string[];\n readonly storageKey: string | null;\n readonly missingHandler: WrI18nMissingHandler;\n}\n\n/**\n * Everything but the locale, which cannot be a constant: it is resolved from\n * `LOCALE_ID` in an injection context. @internal\n */\nexport const DEFAULT_WR_I18N_CONFIG: Omit<WrI18nConfigResolved, 'defaultLocale' | 'availableLocales'> = {\n storageKey: 'wr:i18n:locale',\n missingHandler: key => key,\n};\n\n/**\n * Resolve the locale half of the config. Callable only from an injection\n * context, because the seed is `LOCALE_ID`. @internal\n */\nexport function resolveWrI18nLocales(\n config: WrI18nConfig\n): Pick<WrI18nConfigResolved, 'defaultLocale' | 'availableLocales'> {\n const defaultLocale = config.defaultLocale ?? inject(LOCALE_ID);\n return { defaultLocale, availableLocales: config.availableLocales ?? [defaultLocale] };\n}\n\nexport const WR_I18N_CONFIG = new InjectionToken<WrI18nConfigResolved>('WR_I18N_CONFIG', {\n factory: () => ({ ...DEFAULT_WR_I18N_CONFIG, ...resolveWrI18nLocales({}) }),\n});\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { of, type Observable } from 'rxjs';\n\nimport { type WrI18nCatalog } from './i18n-config';\n\n/**\n * Loads a catalog for a `(locale, scope)` pair. `scope` is `null` for the\n * root catalog. Implementations may return the catalog synchronously\n * (via `of(...)`) for static catalogs or asynchronously (via HTTP) for\n * lazy fetches.\n */\nexport interface WrI18nLoader {\n load(locale: string, scope: string | null): Observable<WrI18nCatalog>;\n}\n\n/**\n * The active loader.\n *\n * Defaults to one that serves an empty catalog, which is what makes\n * `provideWrI18n()` genuinely optional: every ngwr component routes its\n * built-in strings through `useI18nText` / `readI18nText`, those inject\n * `WrI18n` optionally — and because `WrI18n` is `providedIn: 'root'`, an\n * optional inject still CONSTRUCTS it. Without a default here that construction\n * threw `NG0201: No provider found for WR_I18N_LOADER`, so an app that had\n * simply not configured i18n could not render `<wr-alert>` at all.\n *\n * With the empty catalog, every lookup misses, `t()` hands back the key, and\n * the helpers fall through to the component's own English default — the\n * documented no-i18n behaviour.\n */\nexport const WR_I18N_LOADER = new InjectionToken<WrI18nLoader>('WR_I18N_LOADER', {\n providedIn: 'root',\n factory: () => ({ load: () => of({}) }),\n});\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { LOCALE_ID, Service, type Signal, computed, effect, inject, isDevMode, signal } from '@angular/core';\n\nimport { type Observable, firstValueFrom } from 'rxjs';\n\nimport { WrStorage } from 'ngwr/storage';\n\nimport { WR_I18N_BASE_CATALOGS } from './i18n-base-catalogs';\nimport { WR_I18N_CONFIG, type WrI18nCatalog, type WrI18nParams } from './i18n-config';\nimport { WR_I18N_LOADER } from './i18n-loader';\n\n/** Cache key shape: `<locale>::<scope|''>`. @internal */\nfunction cacheKey(locale: string, scope: string | null): string {\n return `${locale}::${scope ?? ''}`;\n}\n\n/**\n * A locale and the language under it: `'ru-RU'` gives `['ru-RU', 'ru']`.\n *\n * Every lookup and every load walks this, so a catalog registered as `ru`\n * answers an app running `ru-RU`. Without it the two spellings are unrelated\n * strings, and the miss is silent — `t()` returns the key, `useI18nText` reads\n * that as \"missing\" and serves the English fallback, so a fully translated app\n * renders English with nothing logged. It only ever truncates: an `en` lookup\n * never reaches an `en-US` catalog, because a language is not a region.\n *\n * @internal\n */\nfunction localeChain(locale: string): readonly string[] {\n const dash = locale.indexOf('-');\n return dash > 0 ? [locale, locale.slice(0, dash)] : [locale];\n}\n\n/** Walk a dotted path through a catalog tree. Returns string | null. @internal */\nfunction walk(cat: WrI18nCatalog | null, key: string): string | null {\n if (!cat) return null;\n let node: string | WrI18nCatalog | undefined = cat;\n for (const part of key.split('.')) {\n if (node === undefined || typeof node === 'string') return null;\n node = node[part];\n }\n return typeof node === 'string' ? node : null;\n}\n\n/**\n * `{{name}}` interpolation. Missing params resolve to `''`. Exported so\n * helpers in `util.ts` can interpolate the fallback template when no\n * `WrI18n` provider is wired up.\n *\n * @internal\n */\nexport function wrInterpolate(template: string, params: WrI18nParams | undefined): string {\n if (!params) return template;\n return template.replace(/\\{\\{\\s*([\\w.-]+)\\s*\\}\\}/g, (_match, name: string) => {\n const v = params[name];\n if (v === undefined || v === null) return '';\n if (typeof v === 'string') return v;\n if (typeof v === 'number' || typeof v === 'boolean') return String(v);\n try {\n return JSON.stringify(v);\n } catch {\n return '';\n }\n });\n}\n\n/**\n * Reactive i18n service. Holds:\n *\n * - the active locale as a `Signal<string>`\n * - per-`(locale, scope)` catalogs in a `Map` (loaded once, then cached)\n * - a per-locale signal counter so every `translate()` reading the signal\n * re-evaluates the moment a new catalog finishes loading\n *\n * Translations are looked up scope-first then root, per locale, and the locale\n * itself is tried as the full tag before the bare language underneath it — so\n * an app running `ru-RU` resolves against a catalog registered as `ru`, and a\n * regional catalog is never shadowed by a scope in the base language. For an\n * app that spells its locale one way, which is every app that existed before\n * the chain, the order is exactly what it always was.\n *\n * ## Which locale wins\n *\n * ngwr has three locale inputs and they used to be three unrelated answers — an\n * app that set `LOCALE_ID: 'ru-RU'` correctly still rendered an English\n * calendar, because the date token defaulted to `navigator.language`. The\n * precedence is now stated, highest first:\n *\n * 1. **A subsystem's own explicit option.** `provideWrDateAdapter({ locale })`\n * pins dates; `provideWrI18n({ defaultLocale })` pins the catalog. The most\n * specific statement wins, because it can only have been deliberate.\n * 2. **`WrI18n.locale()` — the runtime value.** The only one of the three that\n * can change without a reload, so it is what a language switcher writes.\n * 3. **`LOCALE_ID`.** Angular's app-wide constant, and the seed for both of the\n * above when neither was given. One statement, one answer.\n * 4. `'en-US'`, which is what `LOCALE_ID` itself falls back to.\n *\n * `navigator.language` is deliberately NOT in that list. It is the browser's\n * preference, not the application's, and reading it made prerendered output and\n * the hydrated page disagree.\n *\n * **What a runtime switch reaches, and what it does not.** `use()` repaints\n * every catalog string. It does not move `LOCALE_ID`, which is a constant, so\n * anything keyed on it — `wrDate` / `wrNumber` / `wrPlural`, `wr-input-number`,\n * `wr-statistic`, `wr-counter` — and anything keyed on `WR_DATE_LOCALE` — the\n * date adapter, and so `wr-calendar` and `wr-date-picker` — stays where it was.\n * `use()` says so once in dev mode rather than leaving it to be discovered.\n *\n * @example\n * ```ts\n * const i18n = inject(WrI18n);\n * i18n.use('ru'); // switch locale\n * i18n.t('cart.checkout'); // → 'Оформить заказ'\n * i18n.t('greeting', { name: 'Ada' }); // → 'Hello, Ada!'\n *\n * effect(() => console.log(i18n.translate('hi')())); // re-runs on locale change\n * ```\n *\n * @see https://ngwr.dev/reference/services/i18n\n */\n@Service()\nexport class WrI18n {\n private readonly config = inject(WR_I18N_CONFIG);\n private readonly loader = inject(WR_I18N_LOADER);\n private readonly storage = inject(WrStorage);\n\n /**\n * Angular's own locale. Read for the dev-mode drift warning only — the\n * resolved default already folded it in through `WR_I18N_CONFIG`. @internal\n */\n private readonly localeId = inject(LOCALE_ID);\n\n /**\n * Catalogs registered via `provideWrI18nBaseCatalogs()` — the floor under the\n * loader's own catalogs, so ngwr's built-in strings survive an app that only\n * ships its own keys. @internal\n */\n private readonly baseCatalogs = inject(WR_I18N_BASE_CATALOGS, { optional: true }) ?? [];\n\n /** Per-(locale,scope) catalogs, populated by `loadCatalog`. @internal */\n private readonly catalogs = new Map<string, WrI18nCatalog>();\n\n /** Bumped after each catalog write so reactive translates recompute. @internal */\n private readonly revision = signal(0);\n\n /** In-flight load promises — dedupes parallel `t()` callers. @internal */\n private readonly inflight = new Map<string, Promise<WrI18nCatalog>>();\n\n /** Registered scopes — auto-loaded whenever the locale changes. @internal */\n private readonly scopes = new Set<string>();\n\n /** Active locale. Writes go through `use()` so storage stays in sync. */\n private readonly _locale = signal<string>(this.initialLocale());\n readonly locale: Signal<string> = this._locale.asReadonly();\n\n constructor() {\n // Eagerly load the root catalog + every registered scope for the\n // current locale. Subsequent locale changes refire the same effect.\n effect(() => {\n const lc = this._locale();\n void this.loadChain(lc, null);\n for (const sc of this.scopes) void this.loadChain(lc, sc);\n });\n }\n\n // Locale\n\n /**\n * Switch active locale. Ignored when not whitelisted.\n *\n * Text only — see the class docs for what a runtime switch cannot reach. The\n * dev-mode warning below is the whole reporting of that limit; without it the\n * failure is a screen showing German labels beside `3/15/2026`, with nothing\n * anywhere saying why.\n */\n use(locale: string): void {\n if (!this.config.availableLocales.includes(locale)) return;\n const previous = this._locale();\n this._locale.set(locale);\n if (this.config.storageKey) this.storage.set(this.config.storageKey, locale);\n if (isDevMode() && previous !== locale) this.warnOnLocaleIdDrift(locale);\n }\n\n /** Available locales — pass-through from config. */\n available(): readonly string[] {\n return this.config.availableLocales;\n }\n\n // Scopes\n\n /**\n * Register a scope so its catalog loads alongside the root one. Idempotent.\n * Returns a promise resolving once the current locale's scope catalog is in\n * the cache — handy for feature `canActivate` guards.\n */\n registerScope(scope: string): Promise<WrI18nCatalog> {\n this.scopes.add(scope);\n const lc = this._locale();\n // Resolve on the exact tag: the promise is what a `canActivate` waits on,\n // and the base-language catalog is only ever a fallback under it.\n const exact = this.loadCatalog(lc, scope);\n void this.loadChain(lc, scope);\n return exact;\n }\n\n // Translate\n\n /**\n * Eager translate — returns the current value or the missing-handler\n * fallback. Does NOT auto-load missing catalogs; combine with the\n * reactive `translate(...)` if you want load-on-demand.\n */\n t(key: string, params?: WrI18nParams, scope?: string): string {\n // Read revision so callers inside computed/effect re-run on updates.\n this.revision();\n const lc = this._locale();\n\n const chain = localeChain(lc);\n let hit: string | null = null;\n for (const candidate of chain) {\n if (scope) hit = walk(this.catalogs.get(cacheKey(candidate, scope)) ?? null, key);\n hit ??= walk(this.catalogs.get(cacheKey(candidate, null)) ?? null, key);\n if (hit !== null) break;\n }\n // Base catalogs are the floor: consulted only once the loader's own catalogs\n // have missed, so an app's keys always win, but ngwr's built-in strings are\n // still there when the app's catalog doesn't carry them.\n hit ??= this.walkBase(chain, key);\n\n if (hit === null) {\n // Fire a background load so a future read can resolve it.\n void this.loadChain(lc, scope ?? null);\n return this.config.missingHandler(key, lc);\n }\n return wrInterpolate(hit, params);\n }\n\n /** Reactive translate — re-evaluates on locale or catalog updates. */\n translate(key: string, params?: WrI18nParams, scope?: string): Signal<string> {\n return computed(() => this.t(key, params, scope));\n }\n\n // Internals\n\n /**\n * Look a key up in the registered base catalogs, later contributions first so\n * a feature can shadow an earlier one.\n */\n private walkBase(chain: readonly string[], key: string): string | null {\n for (const locale of chain) {\n for (let i = this.baseCatalogs.length - 1; i >= 0; i--) {\n const hit = walk(this.baseCatalogs[i][locale] ?? null, key);\n if (hit !== null) return hit;\n }\n }\n return null;\n }\n\n private initialLocale(): string {\n if (this.config.storageKey) {\n const saved = this.storage.get<string>(this.config.storageKey);\n if (saved && this.config.availableLocales.includes(saved)) return saved;\n }\n return this.config.defaultLocale;\n }\n\n /**\n * Load a `(locale, scope)` catalog and, when the locale carries a region, the\n * bare-language one under it. Both go in the cache; `t()` reads them in that\n * order.\n */\n private loadChain(locale: string, scope: string | null): Promise<unknown> {\n return Promise.all(localeChain(locale).map(candidate => this.loadCatalog(candidate, scope)));\n }\n\n /** One warning per service, not one per switch. @internal */\n private warnedLocaleIdDrift = false;\n\n /**\n * Say once, in dev, that a runtime switch moved the text and nothing else.\n *\n * The mismatch is otherwise invisible in the way that costs the most time:\n * the catalog strings all change, which reads as \"the switch worked\", and the\n * dates and numbers beside them are still correct-looking output in the old\n * locale. Silent when the new locale IS `LOCALE_ID`, because then nothing is\n * out of step and a warning that fires when everything agrees is one people\n * learn to ignore. Production builds drop the call entirely via `isDevMode()`\n * tree-shaking.\n */\n private warnOnLocaleIdDrift(locale: string): void {\n if (this.warnedLocaleIdDrift || locale === this.localeId) return;\n this.warnedLocaleIdDrift = true;\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n `[NGWR] WrI18n.use('${locale}') switched the catalog, but LOCALE_ID is still '${this.localeId}'. ` +\n `LOCALE_ID is an Angular constant and WR_DATE_LOCALE resolves from it once at bootstrap, so ` +\n `formatted dates and numbers do not follow the switch and stay on '${this.localeId}': the date ` +\n `adapter (and so wr-calendar / wr-date-picker), the wrDate / wrNumber / wrPlural pipes, ` +\n `wr-input-number, wr-statistic, wr-counter, wr-pagination's total and wr-file-upload's sizes. ` +\n `Reload the app with the new LOCALE_ID to move those, or keep runtime switching to text.`\n );\n }\n\n private loadCatalog(locale: string, scope: string | null): Promise<WrI18nCatalog> {\n const ck = cacheKey(locale, scope);\n const cached = this.catalogs.get(ck);\n if (cached) return Promise.resolve(cached);\n\n const pending = this.inflight.get(ck);\n if (pending) return pending;\n\n const stream: Observable<WrI18nCatalog> = this.loader.load(locale, scope);\n const promise = firstValueFrom(stream)\n .then(catalog => {\n this.catalogs.set(ck, catalog);\n this.revision.update(v => v + 1);\n return catalog;\n })\n .catch((err: unknown) => {\n // eslint-disable-next-line no-console -- intentional diagnostic for missing catalog\n console.warn(`[ngwr/i18n] failed to load (${locale}, ${scope ?? 'root'})`, err);\n const empty: WrI18nCatalog = {};\n this.catalogs.set(ck, empty);\n return empty;\n })\n .finally(() => {\n this.inflight.delete(ck);\n });\n\n this.inflight.set(ck, promise);\n return promise;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Pipe, type PipeTransform, inject } from '@angular/core';\n\nimport { WrI18n } from './i18n';\nimport { type WrI18nParams } from './i18n-config';\n\n/**\n * Translate a key. Impure — re-evaluates on every CD so locale switches\n * and catalog loads propagate without a manual refresh.\n *\n * @example\n * ```html\n * <h1>{{ 'home.title' | wrT }}</h1>\n * <p>{{ 'greeting' | wrT: { name: user().name } }}</p>\n * <button>{{ 'forms.save' | wrT: null : 'checkout' }}</button>\n * ```\n */\n// eslint-disable-next-line @angular-eslint/no-pipe-impure -- intentional: locale + catalog updates must propagate even when args are stable\n@Pipe({ name: 'wrT', pure: false })\nexport class WrTPipe implements PipeTransform {\n private readonly i18n = inject(WrI18n);\n\n transform(key: string, params?: WrI18nParams | null, scope?: string): string {\n return this.i18n.t(key, params ?? undefined, scope);\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, ElementRef, computed, effect, inject, input } from '@angular/core';\n\nimport { WrI18n } from './i18n';\nimport { type WrI18nParams } from './i18n-config';\n\n/**\n * Attribute directive that sets `textContent` of its host to the translation\n * of the bound key. Reactive — re-renders on locale + catalog changes.\n *\n * @example\n * ```html\n * <span [wrT]=\"'home.title'\"></span>\n * <span [wrT]=\"'greeting'\" [wrTParams]=\"{ name: user().name }\"></span>\n * <span [wrT]=\"'forms.save'\" wrTScope=\"checkout\"></span>\n * ```\n */\n@Directive({\n selector: '[wrT]',\n})\nexport class WrTDirective {\n /** Translation key. Required. */\n readonly wrT = input.required<string>();\n\n /** Interpolation params for `{{name}}` tokens. */\n readonly wrTParams = input<WrI18nParams | null>(null);\n\n /** Optional scope — scoped lookup first, then root fallback. */\n readonly wrTScope = input<string | null>(null);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly i18n = inject(WrI18n);\n\n private readonly text = computed(() =>\n this.i18n.t(this.wrT(), this.wrTParams() ?? undefined, this.wrTScope() ?? undefined)\n );\n\n constructor() {\n effect(() => {\n this.host.nativeElement.textContent = this.text();\n });\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type Observable, of } from 'rxjs';\n\nimport { type WrI18nCatalog } from '../i18n-config';\nimport { type WrI18nLoader } from '../i18n-loader';\n\n/** Root catalogs keyed by locale: `{ en: catalog, ru: catalog, … }`. */\nexport type WrI18nStaticCatalogs = Readonly<Record<string, WrI18nCatalog>>;\n\n/** Per-scope catalogs: `{ checkout: { en: catalog, ru: catalog }, … }`. */\nexport type WrI18nStaticScopedCatalogs = Readonly<Record<string, WrI18nStaticCatalogs>>;\n\n/**\n * Loader for catalogs already in memory (imported from JSON or generated).\n *\n * - Pass `catalogs` for the root catalog of every locale.\n * - Pass `scopes` if you ship per-feature catalogs the loader should serve\n * to `WrI18n.registerScope(name)` calls.\n *\n * Missing locale or scope resolves to `{}` — the missing-key handler then\n * decides what to render.\n */\nexport class WrI18nStaticLoader implements WrI18nLoader {\n constructor(\n private readonly catalogs: WrI18nStaticCatalogs,\n private readonly scopes: WrI18nStaticScopedCatalogs = {}\n ) {}\n\n load(locale: string, scope: string | null): Observable<WrI18nCatalog> {\n if (scope === null) return of(this.catalogs[locale] ?? {});\n return of(this.scopes[scope]?.[locale] ?? {});\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { HttpClient } from '@angular/common/http';\nimport { inject } from '@angular/core';\n\nimport { type Observable, catchError, of } from 'rxjs';\n\nimport { type WrI18nCatalog } from '../i18n-config';\nimport { type WrI18nLoader } from '../i18n-loader';\n\n/** Configuration for {@link WrI18nHttpLoader}. */\nexport interface WrI18nHttpLoaderConfig {\n /**\n * URL template. Tokens:\n * - `{locale}` — required, BCP-47 tag (e.g. `en`).\n * - `{scope}` — optional, scope name. Use the `rootPath` if you need a\n * different path entirely for the root catalog.\n *\n * @example\n * ```ts\n * { path: '/assets/i18n/{locale}.json' } // root only\n * { path: '/assets/i18n/{scope}/{locale}.json',\n * rootPath: '/assets/i18n/{locale}.json' } // root + scopes\n * ```\n */\n readonly path: string;\n /** Path template for the root catalog. Defaults to `path`. */\n readonly rootPath?: string;\n}\n\n/**\n * Loader that fetches catalogs via `HttpClient`. Failures resolve to `{}`\n * (logged once at the service layer) so a missing file never throws into\n * user code.\n */\nexport class WrI18nHttpLoader implements WrI18nLoader {\n private readonly http = inject(HttpClient);\n\n constructor(private readonly config: WrI18nHttpLoaderConfig) {}\n\n load(locale: string, scope: string | null): Observable<WrI18nCatalog> {\n const template = scope === null ? (this.config.rootPath ?? this.config.path) : this.config.path;\n const url = template.replace('{locale}', locale).replace('{scope}', scope ?? '');\n return this.http.get<WrI18nCatalog>(url).pipe(catchError(() => of<WrI18nCatalog>({})));\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type EnvironmentProviders, type Provider, makeEnvironmentProviders } from '@angular/core';\n\nimport { WR_I18N_BASE_CATALOGS, type WrI18nBaseCatalogs } from './i18n-base-catalogs';\nimport {\n DEFAULT_WR_I18N_CONFIG,\n WR_I18N_CONFIG,\n type WrI18nConfig,\n type WrI18nConfigResolved,\n resolveWrI18nLocales,\n} from './i18n-config';\nimport { WR_I18N_LOADER, type WrI18nLoader } from './i18n-loader';\nimport { WrI18nHttpLoader, type WrI18nHttpLoaderConfig } from './loaders/http-loader';\nimport {\n WrI18nStaticLoader,\n type WrI18nStaticCatalogs,\n type WrI18nStaticScopedCatalogs,\n} from './loaders/static-loader';\n\n/**\n * Configure {@link WrI18n}. Either pass a `loader` directly, or use the\n * `provideWrI18nHttpLoader` / `provideWrI18nStaticLoader` helpers in the\n * same providers array.\n */\nexport interface ProvideWrI18nOptions extends WrI18nConfig {\n readonly loader?: WrI18nLoader;\n}\n\nexport function provideWrI18n(options: ProvideWrI18nOptions = {}): EnvironmentProviders {\n const { loader, ...config } = options;\n\n const providers: Provider[] = [\n {\n provide: WR_I18N_CONFIG,\n // A factory rather than a value: `defaultLocale` falls back to `LOCALE_ID`,\n // which only an injection context can read.\n useFactory: (): WrI18nConfigResolved => ({\n ...DEFAULT_WR_I18N_CONFIG,\n ...config,\n ...resolveWrI18nLocales(config),\n }),\n },\n ];\n if (loader) providers.push({ provide: WR_I18N_LOADER, useValue: loader });\n\n return makeEnvironmentProviders(providers);\n}\n\n/**\n * Provide a static loader — catalogs already in memory.\n *\n * A loader serves only the catalog you pass it, and ngwr registers none of its\n * own. Pass only your own keys here and register ngwr's catalogs with\n * {@link provideWrI18nBaseCatalogs} — not `{ ...wrRu, ...yours }`. A spread is\n * shallow, so any namespace you share with ngwr, e.g. `common`, `validation`,\n * `table`, keeps only the keys of the side spread last, and the other side's\n * keys stop resolving with nothing logged: ngwr's components fall back to their\n * English defaults, and a `wrT` read of a lost key renders the raw key under the\n * default missing handler.\n *\n * @param catalogs Root catalogs keyed by locale.\n * @param scopes Optional per-scope catalogs served to `registerScope(name)`.\n */\nexport function provideWrI18nStaticLoader(\n catalogs: WrI18nStaticCatalogs,\n scopes?: WrI18nStaticScopedCatalogs\n): Provider {\n return { provide: WR_I18N_LOADER, useValue: new WrI18nStaticLoader(catalogs, scopes) };\n}\n\n/**\n * Register catalogs consulted *underneath* the loader — this is how ngwr's own\n * built-in strings survive when you supply your own catalogs.\n *\n * A loader replaces the catalog for a locale instead of extending it, so a JSON\n * file holding only your keys leaves every built-in label on its hardcoded\n * English fallback, with nothing logged. One line fixes it, on either loader:\n *\n * @example\n * ```ts\n * import { wrRu } from 'ngwr/i18n/ru';\n *\n * providers: [\n * provideWrI18n({ defaultLocale: 'ru', availableLocales: ['ru'] }),\n * provideWrI18nBaseCatalogs({ ru: wrRu }),\n * provideWrI18nHttpLoader({ path: '/assets/i18n/{locale}.json' }),\n * ]\n * ```\n *\n * Pass only the locales you ship — the ones you leave out stay out of the\n * bundle. Your own keys always win; this is a floor, not an override.\n *\n * Use it instead of spreading `wrRu` into your own catalog, too: the lookup\n * walks these key by key after the loader's catalog misses, so a namespace both\n * define keeps both halves, where a shallow spread keeps only one.\n */\nexport function provideWrI18nBaseCatalogs(catalogs: WrI18nBaseCatalogs): Provider {\n return { provide: WR_I18N_BASE_CATALOGS, useValue: catalogs, multi: true };\n}\n\n/** Provide an HTTP loader — catalogs fetched from URLs. Requires `provideHttpClient`. */\nexport function provideWrI18nHttpLoader(config: WrI18nHttpLoaderConfig): Provider {\n return { provide: WR_I18N_LOADER, useFactory: () => new WrI18nHttpLoader(config) };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type Signal, computed, inject, signal } from '@angular/core';\n\nimport { WrI18n, wrInterpolate } from './i18n';\nimport type { WrI18nParams } from './i18n-config';\n\n/**\n * Helper for component default text. Returns a reactive string that:\n *\n * 1. Prefers the consumer's override (an `input<string | null>()` value).\n * 2. Falls back to the i18n catalog under `key` — re-renders on locale\n * change so a switcher updates the DOM live.\n * 3. Falls back to `fallback` when no `WrI18n` is provided OR the catalog\n * is missing the key.\n *\n * Components don't need a hard dependency on `provideWrI18n` — without it,\n * the fallback is returned and everything still works.\n *\n * @example\n * ```ts\n * readonly emptyText = input<string | null>(null);\n * protected readonly empty = useI18nText(this.emptyText, 'table.empty', 'No data');\n *\n * // In template: <div>{{ empty() }}</div>\n * ```\n */\nexport function useI18nText(binding: Signal<string | null | undefined>, key: string, fallback: string): Signal<string> {\n const i18n = inject(WrI18n, { optional: true });\n if (!i18n) {\n return computed(() => {\n const v = binding();\n return v ?? fallback;\n });\n }\n\n return computed(() => {\n const v = binding();\n if (v !== null && v !== undefined && v !== '') return v;\n const translated = i18n.t(key);\n // Default missing handler returns the key itself — treat that as \"missing\"\n // and use our explicit fallback.\n return translated === key ? fallback : translated;\n });\n}\n\n/**\n * {@link useI18nText} without a binding to forward — for a built-in string the\n * component exposes no override input for. Same reactivity, same fallback\n * rules; the only difference is the missing first argument.\n *\n * It used to return a plain `string`, resolved once at injection time, and\n * that was wrong in the ordinary case rather than an edge one: `WrI18n` writes\n * every loader-backed catalog from `firstValueFrom(...).then(...)`, so even a\n * static loader serving an object literal lands a microtask AFTER the first\n * change-detection pass. Every component built in that pass read an empty\n * catalog and froze its English fallback for the life of the app — in one\n * `<wr-date-picker>` the field said \"Открыть календарь\" and the calendar\n * button beside it \"Open calendar\", off the same key.\n */\nexport function readI18nText(key: string, fallback: string): Signal<string> {\n const i18n = inject(WrI18n, { optional: true });\n if (!i18n) return computed(() => fallback);\n\n return computed(() => {\n const v = i18n.t(key);\n return v === key ? fallback : v;\n });\n}\n\n/** Tiny shim — useful when the caller doesn't have an `input` to forward. */\nexport function nullSignal(): Signal<null> {\n return signal(null).asReadonly();\n}\n\n/**\n * Build a per-call formatter for parametrized labels (e.g. ARIA labels\n * that interpolate a per-row value: `\"Remove {{label}}\"`). Returns a\n * function the template calls with the params for the current item.\n *\n * The returned function:\n * - Re-resolves the i18n catalog on every call (live locale switches just\n * work — re-rendered templates pick up new strings).\n * - Falls back to the literal `fallback` template with the same\n * `{{name}}` syntax when no `WrI18n` provider is present, or when the\n * key is missing.\n *\n * Use this for labels that vary per row. For static labels, prefer\n * {@link useI18nText} or {@link readI18nText}.\n *\n * @example\n * ```ts\n * protected readonly removeChipLabel = useI18nFormatter('select.removeItem', 'Remove {{label}}');\n *\n * // In template:\n * // [attr.aria-label]=\"removeChipLabel({ label: chip.label })\"\n * ```\n */\nexport function useI18nFormatter(key: string, fallback: string): (params?: WrI18nParams) => string {\n const i18n = inject(WrI18n, { optional: true });\n if (!i18n) {\n return (params?: WrI18nParams) => wrInterpolate(fallback, params);\n }\n return (params?: WrI18nParams) => {\n const v = i18n.t(key, params);\n return v === key ? wrInterpolate(fallback, params) : v;\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AASH;;;;;;;;;;;;;;;;;AAiBG;MACU,qBAAqB,GAAG,IAAI,cAAc,CAAgC,uBAAuB;;AChC9G;;;;;AAKG;AAyDH;;;AAGG;AACI,MAAM,sBAAsB,GAAqE;AACtG,IAAA,UAAU,EAAE,gBAAgB;AAC5B,IAAA,cAAc,EAAE,GAAG,IAAI,GAAG;;AAG5B;;;AAGG;AACG,SAAU,oBAAoB,CAClC,MAAoB,EAAA;IAEpB,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,SAAS,CAAC;AAC/D,IAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,IAAI,CAAC,aAAa,CAAC,EAAE;AACxF;MAEa,cAAc,GAAG,IAAI,cAAc,CAAuB,gBAAgB,EAAE;AACvF,IAAA,OAAO,EAAE,OAAO,EAAE,GAAG,sBAAsB,EAAE,GAAG,oBAAoB,CAAC,EAAE,CAAC,EAAE,CAAC;AAC5E,CAAA;;ACpFD;;;;;AAKG;AAkBH;;;;;;;;;;;;;;AAcG;MACU,cAAc,GAAG,IAAI,cAAc,CAAe,gBAAgB,EAAE;AAC/E,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,M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AAG,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC;AAC7B,QAAA,OAAO,CAAC,KAAK,GAAG,GAAG,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC;AACxD,IAAA,CAAC;AACH;;AChHA;;AAEG;;;;"}
|
package/fesm2022/ngwr-table.mjs
CHANGED
|
@@ -228,6 +228,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
228
228
|
/**
|
|
229
229
|
* Sort indicator rendered in a sortable column's header.
|
|
230
230
|
*
|
|
231
|
+
* Draws an ARROW for a sorted column — up for `asc`, the same arrow turned by
|
|
232
|
+
* the stylesheet for `desc` — and a flat LINE for a column that sorts but is
|
|
233
|
+
* not sorted. A different shape rather than a fainter arrow, on purpose: a
|
|
234
|
+
* dimmed up-arrow reads as "sorted ascending", which is the one thing an
|
|
235
|
+
* unsorted column must not say, and a state told apart by opacity and colour
|
|
236
|
+
* alone is lost to anyone who cannot see that difference. A line also has no
|
|
237
|
+
* direction to mirror under RTL.
|
|
238
|
+
*
|
|
231
239
|
* @internal — used internally by `<wr-table>`. Parent listens for clicks
|
|
232
240
|
* on the indicator to cycle direction.
|
|
233
241
|
*/
|
|
@@ -243,13 +251,13 @@ class WrTableSort {
|
|
|
243
251
|
}, /* @ts-ignore */
|
|
244
252
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
245
253
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrTableSort, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
246
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
254
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrTableSort, isStandalone: true, selector: "wr-table-sort", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<svg class="wr-icon__svg wr-table-sort__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">@if (direction()) {<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>} @else {<path d="M6 12h12"/>}</svg>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
247
255
|
}
|
|
248
256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrTableSort, decorators: [{
|
|
249
257
|
type: Component,
|
|
250
258
|
args: [{
|
|
251
259
|
selector: 'wr-table-sort',
|
|
252
|
-
template: '<svg class="wr-icon__svg wr-table-sort__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"
|
|
260
|
+
template: '<svg class="wr-icon__svg wr-table-sort__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">@if (direction()) {<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>} @else {<path d="M6 12h12"/>}</svg>',
|
|
253
261
|
encapsulation: ViewEncapsulation.None,
|
|
254
262
|
host: { '[class]': 'classes()' },
|
|
255
263
|
}]
|