@tectra-ng/ui 0.4.3 → 0.4.5
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/amount/README.md +19 -1
- package/analog-clock/README.md +1 -1
- package/autocomplete/README.md +1 -1
- package/avatar/README.md +24 -4
- package/cascade-select/README.md +1 -1
- package/chips-input/README.md +10 -5
- package/color-picker/README.md +5 -0
- package/countdown/README.md +7 -1
- package/country/README.md +14 -1
- package/country-select/README.md +2 -1
- package/export/README.md +27 -2
- package/export-font/README.md +1 -1
- package/fesm2022/tectra-ng-ui-accordion.mjs +21 -21
- package/fesm2022/tectra-ng-ui-amount.mjs +99 -17
- package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-analog-clock.mjs +12 -25
- package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +8 -7
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-avatar.mjs +68 -26
- package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-badge.mjs +3 -3
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs +9 -9
- package/fesm2022/tectra-ng-ui-button-group.mjs +3 -3
- package/fesm2022/tectra-ng-ui-button.mjs +11 -11
- package/fesm2022/tectra-ng-ui-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-card.mjs +5 -5
- package/fesm2022/tectra-ng-ui-card.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-carousel.mjs +15 -15
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +10 -7
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-checkbox.mjs +9 -9
- package/fesm2022/tectra-ng-ui-chip.mjs +3 -3
- package/fesm2022/tectra-ng-ui-chips-input.mjs +120 -21
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +96 -9
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-swatches.mjs +3 -3
- package/fesm2022/tectra-ng-ui-confirm.mjs +9 -9
- package/fesm2022/tectra-ng-ui-countdown.mjs +48 -19
- package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country-select.mjs +31 -8
- package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country.mjs +18 -9
- package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-data-view.mjs +30 -30
- package/fesm2022/tectra-ng-ui-datepicker.mjs +53 -40
- package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-dialog.mjs +30 -30
- package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-divider.mjs +3 -3
- package/fesm2022/tectra-ng-ui-drawer.mjs +9 -9
- package/fesm2022/tectra-ng-ui-email-suggestion.mjs +3 -3
- package/fesm2022/tectra-ng-ui-export.mjs +1264 -111
- package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs +4 -3
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-fieldset.mjs +5 -5
- package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-file-upload.mjs +12 -12
- package/fesm2022/tectra-ng-ui-galleria.mjs +21 -21
- package/fesm2022/tectra-ng-ui-highlight-text.mjs +3 -3
- package/fesm2022/tectra-ng-ui-icon-field.mjs +63 -35
- package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-image.mjs +9 -9
- package/fesm2022/tectra-ng-ui-input-group.mjs +6 -6
- package/fesm2022/tectra-ng-ui-input-mask.mjs +3 -3
- package/fesm2022/tectra-ng-ui-input-number.mjs +5 -5
- package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input-otp.mjs +3 -3
- package/fesm2022/tectra-ng-ui-input.mjs +11 -10
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-key-filter.mjs +87 -22
- package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-knob.mjs +30 -8
- package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-label.mjs +77 -18
- package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-link.mjs +44 -20
- package/fesm2022/tectra-ng-ui-link.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-list-input.mjs +3 -3
- package/fesm2022/tectra-ng-ui-listbox.mjs +3 -3
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs +19 -8
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menu.mjs +15 -15
- package/fesm2022/tectra-ng-ui-menubar.mjs +6 -6
- package/fesm2022/tectra-ng-ui-message.mjs +23 -19
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-month-calendar.mjs +32 -15
- package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-multiselect.mjs +6 -5
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-overlay-badge.mjs +3 -3
- package/fesm2022/tectra-ng-ui-paginator.mjs +9 -9
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +51 -20
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel.mjs +7 -5
- package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password-generator.mjs +24 -7
- package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password.mjs +14 -14
- package/fesm2022/tectra-ng-ui-password.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-pill.mjs +39 -19
- package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-popover.mjs +15 -15
- package/fesm2022/tectra-ng-ui-progress-bar.mjs +6 -6
- package/fesm2022/tectra-ng-ui-progress-spinner.mjs +3 -3
- package/fesm2022/tectra-ng-ui-radio-button.mjs +6 -6
- package/fesm2022/tectra-ng-ui-rating.mjs +11 -11
- package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs +3 -3
- package/fesm2022/tectra-ng-ui-select-button.mjs +6 -6
- package/fesm2022/tectra-ng-ui-select.mjs +66 -43
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-skeleton.mjs +6 -6
- package/fesm2022/tectra-ng-ui-slider.mjs +3 -3
- package/fesm2022/tectra-ng-ui-sparkline.mjs +3 -3
- package/fesm2022/tectra-ng-ui-speed-dial.mjs +3 -3
- package/fesm2022/tectra-ng-ui-split-button.mjs +3 -3
- package/fesm2022/tectra-ng-ui-splitter.mjs +6 -6
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs +99 -14
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-status-icon.mjs +43 -6
- package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-stepper.mjs +41 -35
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-table.mjs +74 -60
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs +18 -18
- package/fesm2022/tectra-ng-ui-tag.mjs +8 -8
- package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-textarea.mjs +9 -9
- package/fesm2022/tectra-ng-ui-timeline.mjs +15 -15
- package/fesm2022/tectra-ng-ui-toast.mjs +11 -11
- package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toggle-button.mjs +3 -3
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs +6 -6
- package/fesm2022/tectra-ng-ui-toolbar.mjs +12 -12
- package/fesm2022/tectra-ng-ui-tooltip.mjs +9 -9
- package/fesm2022/tectra-ng-ui-tree-select.mjs +13 -11
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +7 -7
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree.mjs +30 -30
- package/fesm2022/tectra-ng-ui-truncate-text.mjs +36 -12
- package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +15 -15
- package/fesm2022/tectra-ng-ui.mjs +1 -1
- package/icon-field/README.md +2 -1
- package/input/README.md +1 -1
- package/key-filter/README.md +3 -2
- package/knob/README.md +3 -1
- package/label/README.md +4 -1
- package/link/README.md +4 -1
- package/message/README.md +2 -2
- package/month-calendar/README.md +2 -1
- package/multiselect/README.md +1 -1
- package/package.json +4 -4
- package/panel/README.md +3 -1
- package/panel-menu/README.md +3 -2
- package/password-generator/README.md +2 -0
- package/pill/README.md +4 -4
- package/select/README.md +1 -1
- package/stat-tiles/README.md +17 -1
- package/status-icon/README.md +3 -1
- package/table/README.md +1 -1
- package/tag/README.md +2 -0
- package/tree-select/README.md +1 -1
- package/truncate-text/README.md +2 -1
- package/types/tectra-ng-ui-amount.d.ts +41 -1
- package/types/tectra-ng-ui-amount.d.ts.map +1 -1
- package/types/tectra-ng-ui-analog-clock.d.ts +1 -4
- package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
- package/types/tectra-ng-ui-autocomplete.d.ts +1 -1
- package/types/tectra-ng-ui-avatar.d.ts +45 -12
- package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
- package/types/tectra-ng-ui-cascade-select.d.ts +3 -2
- package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-chips-input.d.ts +54 -6
- package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-color-picker.d.ts +38 -1
- package/types/tectra-ng-ui-color-picker.d.ts.map +1 -1
- package/types/tectra-ng-ui-countdown.d.ts +12 -1
- package/types/tectra-ng-ui-countdown.d.ts.map +1 -1
- package/types/tectra-ng-ui-country-select.d.ts +17 -4
- package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-country.d.ts +7 -1
- package/types/tectra-ng-ui-country.d.ts.map +1 -1
- package/types/tectra-ng-ui-datepicker.d.ts +4 -2
- package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
- package/types/tectra-ng-ui-export.d.ts +68 -8
- package/types/tectra-ng-ui-export.d.ts.map +1 -1
- package/types/tectra-ng-ui-icon-field.d.ts +9 -2
- package/types/tectra-ng-ui-icon-field.d.ts.map +1 -1
- package/types/tectra-ng-ui-input.d.ts +1 -1
- package/types/tectra-ng-ui-key-filter.d.ts +19 -4
- package/types/tectra-ng-ui-key-filter.d.ts.map +1 -1
- package/types/tectra-ng-ui-knob.d.ts +10 -2
- package/types/tectra-ng-ui-knob.d.ts.map +1 -1
- package/types/tectra-ng-ui-label.d.ts +8 -1
- package/types/tectra-ng-ui-label.d.ts.map +1 -1
- package/types/tectra-ng-ui-link.d.ts +8 -2
- package/types/tectra-ng-ui-link.d.ts.map +1 -1
- package/types/tectra-ng-ui-mention-textarea.d.ts +5 -0
- package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-message.d.ts +1 -1
- package/types/tectra-ng-ui-message.d.ts.map +1 -1
- package/types/tectra-ng-ui-month-calendar.d.ts +14 -4
- package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -1
- package/types/tectra-ng-ui-multiselect.d.ts +1 -1
- package/types/tectra-ng-ui-panel-menu.d.ts +34 -6
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-panel.d.ts +1 -1
- package/types/tectra-ng-ui-panel.d.ts.map +1 -1
- package/types/tectra-ng-ui-password-generator.d.ts +10 -3
- package/types/tectra-ng-ui-password-generator.d.ts.map +1 -1
- package/types/tectra-ng-ui-pill.d.ts +9 -5
- package/types/tectra-ng-ui-pill.d.ts.map +1 -1
- package/types/tectra-ng-ui-select.d.ts +5 -2
- package/types/tectra-ng-ui-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-stat-tiles.d.ts +49 -5
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
- package/types/tectra-ng-ui-status-icon.d.ts +20 -2
- package/types/tectra-ng-ui-status-icon.d.ts.map +1 -1
- package/types/tectra-ng-ui-stepper.d.ts +1 -0
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -1
- package/types/tectra-ng-ui-table.d.ts +2 -1
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-select.d.ts +3 -3
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-truncate-text.d.ts +7 -2
- package/types/tectra-ng-ui-truncate-text.d.ts.map +1 -1
- package/types/tectra-ng-ui.d.ts +1 -1
|
@@ -6,6 +6,8 @@ import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
|
6
6
|
import { countryTokens, toStyleObject } from "@tectra-ng/themes";
|
|
7
7
|
import { provideTxIconDefaults, txIconCircle, txIconCode, txIconFlag } from "@tectra-ng/icons";
|
|
8
8
|
const TX_COUNTRY_CODES = "AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XK YE YT ZA ZM ZW".split(" ");
|
|
9
|
+
const TX_REGION_CODES = ["EU", "UN"];
|
|
10
|
+
const FALLBACK_LOCALE = "en-US";
|
|
9
11
|
const COUNTRY_CODE = /^[A-Z]{2}$/;
|
|
10
12
|
const nameCache = /* @__PURE__ */ new Map();
|
|
11
13
|
function isCountryCode(code) {
|
|
@@ -14,15 +16,22 @@ function isCountryCode(code) {
|
|
|
14
16
|
function countryName(code, locale) {
|
|
15
17
|
const upper = code.trim().toUpperCase();
|
|
16
18
|
if (!isCountryCode(upper)) return code;
|
|
19
|
+
return regionNames(locale).of(upper) ?? upper;
|
|
20
|
+
}
|
|
21
|
+
function regionNames(locale) {
|
|
17
22
|
let names = nameCache.get(locale);
|
|
18
23
|
if (!names) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
try {
|
|
25
|
+
names = new Intl.DisplayNames([locale], {
|
|
26
|
+
type: "region",
|
|
27
|
+
fallback: "code"
|
|
28
|
+
});
|
|
29
|
+
} catch {
|
|
30
|
+
names = regionNames(FALLBACK_LOCALE);
|
|
31
|
+
}
|
|
23
32
|
nameCache.set(locale, names);
|
|
24
33
|
}
|
|
25
|
-
return names
|
|
34
|
+
return names;
|
|
26
35
|
}
|
|
27
36
|
function countryEmoji(code) {
|
|
28
37
|
const upper = code.trim().toUpperCase();
|
|
@@ -121,7 +130,7 @@ var TxCountry = class TxCountry {
|
|
|
121
130
|
}
|
|
122
131
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
123
132
|
minVersion: "12.0.0",
|
|
124
|
-
version: "22.2.
|
|
133
|
+
version: "22.2.6",
|
|
125
134
|
ngImport: i0,
|
|
126
135
|
type: TxCountry,
|
|
127
136
|
deps: [],
|
|
@@ -129,7 +138,7 @@ var TxCountry = class TxCountry {
|
|
|
129
138
|
});
|
|
130
139
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
131
140
|
minVersion: "17.0.0",
|
|
132
|
-
version: "22.2.
|
|
141
|
+
version: "22.2.6",
|
|
133
142
|
type: TxCountry,
|
|
134
143
|
isStandalone: true,
|
|
135
144
|
selector: "tx-country",
|
|
@@ -240,7 +249,7 @@ var TxCountry = class TxCountry {
|
|
|
240
249
|
};
|
|
241
250
|
i0.ɵɵngDeclareClassMetadata({
|
|
242
251
|
minVersion: "12.0.0",
|
|
243
|
-
version: "22.2.
|
|
252
|
+
version: "22.2.6",
|
|
244
253
|
ngImport: i0,
|
|
245
254
|
type: TxCountry,
|
|
246
255
|
decorators: [{
|
|
@@ -362,6 +371,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
362
371
|
function isPromise(value) {
|
|
363
372
|
return typeof value?.then === "function";
|
|
364
373
|
}
|
|
365
|
-
export { TX_COUNTRY_CODES, TX_FLAG_RESOLVER, TxCountry, countryEmoji, countryName, isCountryCode, provideTxFlags, txFlagIcons, txFlagImages };
|
|
374
|
+
export { TX_COUNTRY_CODES, TX_FLAG_RESOLVER, TX_REGION_CODES, TxCountry, countryEmoji, countryName, isCountryCode, provideTxFlags, txFlagIcons, txFlagImages };
|
|
366
375
|
|
|
367
376
|
//# sourceMappingURL=tectra-ng-ui-country.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-ui-country.mjs","names":[],"sources":["../../../../packages/ui/country/src/countries.ts","../../../../packages/ui/country/src/flags.ts","../../../../packages/ui/country/src/country.icons.ts","../../../../packages/ui/country/src/country.theme.ts","../../../../packages/ui/country/src/country.component.ts"],"sourcesContent":["/** ISO 3166-1 alpha-2 codes of the countries the kit knows, plus `XK` for Kosovo. */\nexport const TX_COUNTRY_CODES: readonly string[] = (\n 'AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL ' +\n 'CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT ' +\n 'GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY ' +\n 'MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN ' +\n 'PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT ' +\n 'TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XK YE YT ZA ZM ZW'\n).split(' ');\n\nconst COUNTRY_CODE = /^[A-Z]{2}$/;\nconst nameCache = new Map<string, Intl.DisplayNames>();\n\n/**\n * Tells whether the text is two letters, in any case, as a country code looks; it does not check that the country exists.\n */\nexport function isCountryCode(code: string | null | undefined): boolean {\n return !!code && COUNTRY_CODE.test(code.trim().toUpperCase());\n}\n\n/**\n * Name of the country in the given locale, such as `Poland` for `PL`; text that is not a country code comes back unchanged.\n */\nexport function countryName(code: string, locale: string): string {\n const upper = code.trim().toUpperCase();\n if (!isCountryCode(upper)) {\n return code;\n }\n let names = nameCache.get(locale);\n if (!names) {\n names = new Intl.DisplayNames([locale], { type: 'region', fallback: 'code' });\n nameCache.set(locale, names);\n }\n return names.of(upper) ?? upper;\n}\n\n/** Emoji flag of the country code; an empty string when the code is not valid. */\nexport function countryEmoji(code: string): string {\n const upper = code.trim().toUpperCase();\n return isCountryCode(upper) ? String.fromCodePoint(...[...upper].map((letter) => 0x1f1e6 + letter.charCodeAt(0) - 65)) : '';\n}\n","import { InjectionToken, Provider } from '@angular/core';\nimport { TxFlagResolver, TxFlagShape } from './country.types';\n\n/** Injection token of the flag resolver that `tx-country` uses; set it with `provideTxFlags`. */\nexport const TX_FLAG_RESOLVER = new InjectionToken<TxFlagResolver>('TX_FLAG_RESOLVER');\n\n/** Draws flags as images or CSS classes through the resolver instead of emoji; provide it once in the app. */\nexport function provideTxFlags(resolver: TxFlagResolver): Provider {\n return { provide: TX_FLAG_RESOLVER, useValue: resolver };\n}\n\n/**\n * Flag resolver for a flag stylesheet that is already on the page, using the classes `fi fi-ua` (and `fis` for circles).\n */\nexport const txFlagIcons: TxFlagResolver = (code, shape) => ({\n class: `fi fi-${code.toLowerCase()}${shape === 'circle' ? ' fis' : ''}`,\n});\n\n/**\n * Builds a flag resolver from a function that returns an image address for a lower-case code and a shape, now or as a promise.\n */\nexport function txFlagImages(url: (code: string, shape: TxFlagShape) => string | Promise<string | null>): TxFlagResolver {\n return (code, shape) => {\n const src = url(code.toLowerCase(), shape);\n return typeof src === 'string' ? { src } : src.then((value) => (value ? { src: value } : null));\n };\n}\n","import { TxIconSet, txIconCircle, txIconCode, txIconFlag } from '@tectra-ng/icons';\n\nexport const COUNTRY_ICON_DEFAULTS: TxIconSet = {\n circle: txIconCircle,\n code: txIconCode,\n flag: txIconFlag,\n};\n","import { countryTokens } from '@tectra-ng/themes';\n\nexport const COUNTRY_THEME = {\n country: countryTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, effect, inject, input, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraCountryTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { countryEmoji, countryName, isCountryCode } from './countries';\nimport { TxCountryPart, TxCountrySize, TxFlag, TxFlagShape } from './country.types';\nimport { TX_FLAG_RESOLVER } from './flags';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { COUNTRY_ICON_DEFAULTS } from './country.icons';\nimport { COUNTRY_THEME } from './country.theme';\n\n@Component({\n selector: 'tx-country',\n template: `\n @if (code(); as iso) {\n @if (flag(); as image) {\n @if (image.src) {\n <img class=\"tx-country__flag tx-country__flag--image\" alt=\"\" [src]=\"image.src\" [class]=\"passThrough().flag?.class\" [style]=\"passThrough().flag?.style\" />\n } @else {\n <span class=\"tx-country__flag\" aria-hidden=\"true\" [class]=\"flagClass(image.class)\" [style]=\"passThrough().flag?.style\"></span>\n }\n } @else if (isLoading()) {\n <span class=\"tx-country__flag tx-country__flag--loading\" aria-hidden=\"true\" [class]=\"passThrough().flag?.class\" [style]=\"passThrough().flag?.style\"></span>\n } @else {\n <span class=\"tx-country__flag tx-country__flag--emoji\" aria-hidden=\"true\" [class]=\"passThrough().flag?.class\" [style]=\"passThrough().flag?.style\">{{\n emoji()\n }}</span>\n }\n }\n @if (showName()) {\n <span class=\"tx-country__name\" [class]=\"passThrough().name?.class\" [style]=\"passThrough().name?.style\">{{ label() }}</span>\n }\n `,\n styleUrl: './country.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-country',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-shape]': 'shape()',\n '[attr.role]': 'showName() || !code() ? null : \"img\"',\n '[attr.aria-label]': 'showName() || !code() ? null : label()',\n '[attr.title]': 'showName() ? null : label()',\n },\n viewProviders: [provideTxIconDefaults(COUNTRY_ICON_DEFAULTS)],\n})\nexport class TxCountry {\n private readonly countryTheme = injectTokens(COUNTRY_THEME);\n\n private locale = inject(TxLocaleService);\n private resolver = inject(TX_FLAG_RESOLVER, { optional: true });\n\n readonly country = input<string | null | undefined>(undefined);\n readonly name = input<string | undefined>(undefined);\n readonly showName = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly size = input<TxCountrySize>('small');\n readonly shape = input<TxFlagShape>('rectangle');\n readonly dt = input<TectraDeepPartial<TectraCountryTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxCountryPart, TxCountry> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('country', this, this.pt, this.ptOptions);\n readonly code = computed(() => {\n const value = (this.country() ?? '').trim().toUpperCase();\n return isCountryCode(value) ? value : null;\n });\n readonly label = computed(() => {\n const code = this.code();\n return this.name() ?? (code ? countryName(code, this.locale.locale().intl) : (this.country() ?? '').trim());\n });\n private readonly loaded = signal<{ key: string; flag: TxFlag | null } | null>(null);\n private readonly resolution = computed(() => {\n const code = this.code();\n return code && this.resolver ? { key: `${this.shape()}:${code}`, value: this.resolver(code, this.shape()) } : null;\n });\n readonly isLoading = computed(() => {\n const resolution = this.resolution();\n return !!resolution && isPromise(resolution.value) && this.loaded()?.key !== resolution.key;\n });\n readonly flag = computed(() => {\n const resolution = this.resolution();\n if (!resolution) {\n return null;\n }\n if (!isPromise(resolution.value)) {\n return resolution.value;\n }\n const loaded = this.loaded();\n return loaded?.key === resolution.key ? loaded.flag : null;\n });\n readonly emoji = computed(() => countryEmoji(this.code() ?? ''));\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-country'), ...this.passThrough().root?.style }));\n\n constructor() {\n effect(() => {\n const resolution = this.resolution();\n if (resolution && isPromise(resolution.value)) {\n const { key, value } = resolution;\n value.then(\n (flag) => this.loaded.set({ key, flag }),\n () => this.loaded.set({ key, flag: null }),\n );\n }\n });\n }\n\n flagClass(own: string | undefined): string {\n return [own, this.passThrough().flag?.class].filter(Boolean).join(' ');\n }\n}\n\nfunction isPromise<T>(value: T | Promise<T>): value is Promise<T> {\n return typeof (value as Promise<T> | null)?.then === 'function';\n}\n"],"mappings":";;;;;;;AACA,MAAa,mBACX,gvBAMA,MAAM,GAAG;AAEX,MAAM,eAAe;AACrB,MAAM,4BAAY,IAAI,IAAG;AAKzB,SAAgB,cAAc,MAA+B;CAC3D,OAAO,CAAC,CAAC,QAAQ,aAAa,KAAK,KAAK,KAAI,CAAE,CAAC,YAAW,CAAE;AAC9D;AAKA,SAAgB,YAAY,MAAc,QAAc;CACtD,MAAM,QAAQ,KAAK,KAAI,CAAE,CAAC,YAAW;CACrC,IAAI,CAAC,cAAc,KAAK,GACtB,OAAO;CAET,IAAI,QAAQ,UAAU,IAAI,MAAM;CAChC,IAAI,CAAC,OAAO;EACV,QAAQ,IAAI,KAAK,aAAa,CAAC,MAAM,GAAG;GAAE,MAAM;GAAU,UAAU;EAAM,CAAE;EAC5E,UAAU,IAAI,QAAQ,KAAK;CAC7B;CACA,OAAO,MAAM,GAAG,KAAK,KAAK;AAC5B;AAGA,SAAgB,aAAa,MAAY;CACvC,MAAM,QAAQ,KAAK,KAAI,CAAE,CAAC,YAAW;CACrC,OAAO,cAAc,KAAK,IAAI,OAAO,cAAc,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,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CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EArCrB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAY,UACZ;;;;;;;;;;;;;;;;;;;;GAmBT,iBAEgB,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,qBAAqB;IACrB,eAAe;IACf,qBAAqB;IACrB,gBAAgB;GACjB;GAAA,eACc,CAAC,sBAAsB,qBAAqB,CAAC;GAAC,QAAA,CAAA,moCAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqE/D,SAAS,UAAa,OAAqB;CACzC,OAAO,OAAQ,OAA6B,SAAS;AACvD"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-country.mjs","names":[],"sources":["../../../../packages/ui/country/src/countries.ts","../../../../packages/ui/country/src/flags.ts","../../../../packages/ui/country/src/country.icons.ts","../../../../packages/ui/country/src/country.theme.ts","../../../../packages/ui/country/src/country.component.ts"],"sourcesContent":["/** ISO 3166-1 alpha-2 codes of the countries the kit knows, plus `XK` for Kosovo. */\nexport const TX_COUNTRY_CODES: readonly string[] = (\n 'AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL ' +\n 'CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT ' +\n 'GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY ' +\n 'MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN ' +\n 'PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT ' +\n 'TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XK YE YT ZA ZM ZW'\n).split(' ');\n\n/**\n * Two-letter codes that are not countries but have a localized name and a flag: `EU` (European Union) and `UN`\n * (United Nations). Add them to the country list where they fit: `[...TX_COUNTRY_CODES, ...TX_REGION_CODES]`.\n */\nexport const TX_REGION_CODES: readonly string[] = ['EU', 'UN'];\n\nconst FALLBACK_LOCALE = 'en-US';\nconst COUNTRY_CODE = /^[A-Z]{2}$/;\nconst nameCache = new Map<string, Intl.DisplayNames>();\n\n/**\n * Tells whether the text is two letters, in any case, as a country code looks; it does not check that the country exists.\n */\nexport function isCountryCode(code: string | null | undefined): boolean {\n return !!code && COUNTRY_CODE.test(code.trim().toUpperCase());\n}\n\n/**\n * Name of the country in the given locale, such as `Poland` for `PL`; text that is not a country code comes back unchanged.\n * A locale that `Intl` does not accept falls back to `en-US`.\n */\nexport function countryName(code: string, locale: string): string {\n const upper = code.trim().toUpperCase();\n if (!isCountryCode(upper)) {\n return code;\n }\n return regionNames(locale).of(upper) ?? upper;\n}\n\nfunction regionNames(locale: string): Intl.DisplayNames {\n let names = nameCache.get(locale);\n if (!names) {\n try {\n names = new Intl.DisplayNames([locale], { type: 'region', fallback: 'code' });\n } catch {\n names = regionNames(FALLBACK_LOCALE);\n }\n nameCache.set(locale, names);\n }\n return names;\n}\n\n/** Emoji flag of the country code; an empty string when the code is not valid. */\nexport function countryEmoji(code: string): string {\n const upper = code.trim().toUpperCase();\n return isCountryCode(upper) ? String.fromCodePoint(...[...upper].map((letter) => 0x1f1e6 + letter.charCodeAt(0) - 65)) : '';\n}\n","import { InjectionToken, Provider } from '@angular/core';\nimport { TxFlagResolver, TxFlagShape } from './country.types';\n\n/** Injection token of the flag resolver that `tx-country` uses; set it with `provideTxFlags`. */\nexport const TX_FLAG_RESOLVER = new InjectionToken<TxFlagResolver>('TX_FLAG_RESOLVER');\n\n/** Draws flags as images or CSS classes through the resolver instead of emoji; provide it once in the app. */\nexport function provideTxFlags(resolver: TxFlagResolver): Provider {\n return { provide: TX_FLAG_RESOLVER, useValue: resolver };\n}\n\n/**\n * Flag resolver for a flag stylesheet that is already on the page, using the classes `fi fi-ua` (and `fis` for circles).\n */\nexport const txFlagIcons: TxFlagResolver = (code, shape) => ({\n class: `fi fi-${code.toLowerCase()}${shape === 'circle' ? ' fis' : ''}`,\n});\n\n/**\n * Builds a flag resolver from a function that returns an image address for a lower-case code and a shape, now or as a promise.\n */\nexport function txFlagImages(url: (code: string, shape: TxFlagShape) => string | Promise<string | null>): TxFlagResolver {\n return (code, shape) => {\n const src = url(code.toLowerCase(), shape);\n return typeof src === 'string' ? { src } : src.then((value) => (value ? { src: value } : null));\n };\n}\n","import { TxIconSet, txIconCircle, txIconCode, txIconFlag } from '@tectra-ng/icons';\n\nexport const COUNTRY_ICON_DEFAULTS: TxIconSet = {\n circle: txIconCircle,\n code: txIconCode,\n flag: txIconFlag,\n};\n","import { countryTokens } from '@tectra-ng/themes';\n\nexport const COUNTRY_THEME = {\n country: countryTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, effect, inject, input, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraCountryTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { countryEmoji, countryName, isCountryCode } from './countries';\nimport { TxCountryPart, TxCountrySize, TxFlag, TxFlagShape } from './country.types';\nimport { TX_FLAG_RESOLVER } from './flags';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { COUNTRY_ICON_DEFAULTS } from './country.icons';\nimport { COUNTRY_THEME } from './country.theme';\n\n@Component({\n selector: 'tx-country',\n template: `\n @if (code(); as iso) {\n @if (flag(); as image) {\n @if (image.src) {\n <img class=\"tx-country__flag tx-country__flag--image\" alt=\"\" [src]=\"image.src\" [class]=\"passThrough().flag?.class\" [style]=\"passThrough().flag?.style\" />\n } @else {\n <span class=\"tx-country__flag\" aria-hidden=\"true\" [class]=\"flagClass(image.class)\" [style]=\"passThrough().flag?.style\"></span>\n }\n } @else if (isLoading()) {\n <span class=\"tx-country__flag tx-country__flag--loading\" aria-hidden=\"true\" [class]=\"passThrough().flag?.class\" [style]=\"passThrough().flag?.style\"></span>\n } @else {\n <span class=\"tx-country__flag tx-country__flag--emoji\" aria-hidden=\"true\" [class]=\"passThrough().flag?.class\" [style]=\"passThrough().flag?.style\">{{\n emoji()\n }}</span>\n }\n }\n @if (showName()) {\n <span class=\"tx-country__name\" [class]=\"passThrough().name?.class\" [style]=\"passThrough().name?.style\">{{ label() }}</span>\n }\n `,\n styleUrl: './country.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-country',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-shape]': 'shape()',\n '[attr.role]': 'showName() || !code() ? null : \"img\"',\n '[attr.aria-label]': 'showName() || !code() ? null : label()',\n '[attr.title]': 'showName() ? null : label()',\n },\n viewProviders: [provideTxIconDefaults(COUNTRY_ICON_DEFAULTS)],\n})\nexport class TxCountry {\n private readonly countryTheme = injectTokens(COUNTRY_THEME);\n\n private locale = inject(TxLocaleService);\n private resolver = inject(TX_FLAG_RESOLVER, { optional: true });\n\n readonly country = input<string | null | undefined>(undefined);\n readonly name = input<string | undefined>(undefined);\n readonly showName = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly size = input<TxCountrySize>('small');\n readonly shape = input<TxFlagShape>('rectangle');\n readonly dt = input<TectraDeepPartial<TectraCountryTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxCountryPart, TxCountry> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('country', this, this.pt, this.ptOptions);\n readonly code = computed(() => {\n const value = (this.country() ?? '').trim().toUpperCase();\n return isCountryCode(value) ? value : null;\n });\n readonly label = computed(() => {\n const code = this.code();\n return this.name() ?? (code ? countryName(code, this.locale.locale().intl) : (this.country() ?? '').trim());\n });\n private readonly loaded = signal<{ key: string; flag: TxFlag | null } | null>(null);\n private readonly resolution = computed(() => {\n const code = this.code();\n return code && this.resolver ? { key: `${this.shape()}:${code}`, value: this.resolver(code, this.shape()) } : null;\n });\n readonly isLoading = computed(() => {\n const resolution = this.resolution();\n return !!resolution && isPromise(resolution.value) && this.loaded()?.key !== resolution.key;\n });\n readonly flag = computed(() => {\n const resolution = this.resolution();\n if (!resolution) {\n return null;\n }\n if (!isPromise(resolution.value)) {\n return resolution.value;\n }\n const loaded = this.loaded();\n return loaded?.key === resolution.key ? loaded.flag : null;\n });\n readonly emoji = computed(() => countryEmoji(this.code() ?? ''));\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-country'), ...this.passThrough().root?.style }));\n\n constructor() {\n effect(() => {\n const resolution = this.resolution();\n if (resolution && isPromise(resolution.value)) {\n const { key, value } = resolution;\n value.then(\n (flag) => this.loaded.set({ key, flag }),\n () => this.loaded.set({ key, flag: null }),\n );\n }\n });\n }\n\n flagClass(own: string | undefined): string {\n return [own, this.passThrough().flag?.class].filter(Boolean).join(' ');\n }\n}\n\nfunction isPromise<T>(value: T | Promise<T>): value is Promise<T> {\n return typeof (value as Promise<T> | null)?.then === 'function';\n}\n"],"mappings":";;;;;;;AACA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AAA,moCAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqE/D,SAAS,UAAa,OAAqB;CACzC,OAAO,OAAQ,OAA6B,SAAS;AACvD"}
|
|
@@ -20,7 +20,7 @@ var TxDataViewList = class TxDataViewList {
|
|
|
20
20
|
}
|
|
21
21
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
22
22
|
minVersion: "12.0.0",
|
|
23
|
-
version: "22.2.
|
|
23
|
+
version: "22.2.6",
|
|
24
24
|
ngImport: i0,
|
|
25
25
|
type: TxDataViewList,
|
|
26
26
|
deps: [],
|
|
@@ -28,7 +28,7 @@ var TxDataViewList = class TxDataViewList {
|
|
|
28
28
|
});
|
|
29
29
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
30
30
|
minVersion: "17.1.0",
|
|
31
|
-
version: "22.2.
|
|
31
|
+
version: "22.2.6",
|
|
32
32
|
type: TxDataViewList,
|
|
33
33
|
isStandalone: true,
|
|
34
34
|
selector: "ng-template[txDataViewList]",
|
|
@@ -44,7 +44,7 @@ var TxDataViewList = class TxDataViewList {
|
|
|
44
44
|
};
|
|
45
45
|
i0.ɵɵngDeclareClassMetadata({
|
|
46
46
|
minVersion: "12.0.0",
|
|
47
|
-
version: "22.2.
|
|
47
|
+
version: "22.2.6",
|
|
48
48
|
ngImport: i0,
|
|
49
49
|
type: TxDataViewList,
|
|
50
50
|
decorators: [{
|
|
@@ -68,7 +68,7 @@ var TxDataViewGrid = class TxDataViewGrid {
|
|
|
68
68
|
}
|
|
69
69
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
70
70
|
minVersion: "12.0.0",
|
|
71
|
-
version: "22.2.
|
|
71
|
+
version: "22.2.6",
|
|
72
72
|
ngImport: i0,
|
|
73
73
|
type: TxDataViewGrid,
|
|
74
74
|
deps: [],
|
|
@@ -76,7 +76,7 @@ var TxDataViewGrid = class TxDataViewGrid {
|
|
|
76
76
|
});
|
|
77
77
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
78
78
|
minVersion: "17.1.0",
|
|
79
|
-
version: "22.2.
|
|
79
|
+
version: "22.2.6",
|
|
80
80
|
type: TxDataViewGrid,
|
|
81
81
|
isStandalone: true,
|
|
82
82
|
selector: "ng-template[txDataViewGrid]",
|
|
@@ -92,7 +92,7 @@ var TxDataViewGrid = class TxDataViewGrid {
|
|
|
92
92
|
};
|
|
93
93
|
i0.ɵɵngDeclareClassMetadata({
|
|
94
94
|
minVersion: "12.0.0",
|
|
95
|
-
version: "22.2.
|
|
95
|
+
version: "22.2.6",
|
|
96
96
|
ngImport: i0,
|
|
97
97
|
type: TxDataViewGrid,
|
|
98
98
|
decorators: [{
|
|
@@ -112,7 +112,7 @@ var TxDataViewHeader = class TxDataViewHeader {
|
|
|
112
112
|
templateRef = inject(TemplateRef);
|
|
113
113
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
114
114
|
minVersion: "12.0.0",
|
|
115
|
-
version: "22.2.
|
|
115
|
+
version: "22.2.6",
|
|
116
116
|
ngImport: i0,
|
|
117
117
|
type: TxDataViewHeader,
|
|
118
118
|
deps: [],
|
|
@@ -120,7 +120,7 @@ var TxDataViewHeader = class TxDataViewHeader {
|
|
|
120
120
|
});
|
|
121
121
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
122
122
|
minVersion: "14.0.0",
|
|
123
|
-
version: "22.2.
|
|
123
|
+
version: "22.2.6",
|
|
124
124
|
type: TxDataViewHeader,
|
|
125
125
|
isStandalone: true,
|
|
126
126
|
selector: "ng-template[txDataViewHeader]",
|
|
@@ -129,7 +129,7 @@ var TxDataViewHeader = class TxDataViewHeader {
|
|
|
129
129
|
};
|
|
130
130
|
i0.ɵɵngDeclareClassMetadata({
|
|
131
131
|
minVersion: "12.0.0",
|
|
132
|
-
version: "22.2.
|
|
132
|
+
version: "22.2.6",
|
|
133
133
|
ngImport: i0,
|
|
134
134
|
type: TxDataViewHeader,
|
|
135
135
|
decorators: [{
|
|
@@ -141,7 +141,7 @@ var TxDataViewFooter = class TxDataViewFooter {
|
|
|
141
141
|
templateRef = inject(TemplateRef);
|
|
142
142
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
143
143
|
minVersion: "12.0.0",
|
|
144
|
-
version: "22.2.
|
|
144
|
+
version: "22.2.6",
|
|
145
145
|
ngImport: i0,
|
|
146
146
|
type: TxDataViewFooter,
|
|
147
147
|
deps: [],
|
|
@@ -149,7 +149,7 @@ var TxDataViewFooter = class TxDataViewFooter {
|
|
|
149
149
|
});
|
|
150
150
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
151
151
|
minVersion: "14.0.0",
|
|
152
|
-
version: "22.2.
|
|
152
|
+
version: "22.2.6",
|
|
153
153
|
type: TxDataViewFooter,
|
|
154
154
|
isStandalone: true,
|
|
155
155
|
selector: "ng-template[txDataViewFooter]",
|
|
@@ -158,7 +158,7 @@ var TxDataViewFooter = class TxDataViewFooter {
|
|
|
158
158
|
};
|
|
159
159
|
i0.ɵɵngDeclareClassMetadata({
|
|
160
160
|
minVersion: "12.0.0",
|
|
161
|
-
version: "22.2.
|
|
161
|
+
version: "22.2.6",
|
|
162
162
|
ngImport: i0,
|
|
163
163
|
type: TxDataViewFooter,
|
|
164
164
|
decorators: [{
|
|
@@ -170,7 +170,7 @@ var TxDataViewEmpty = class TxDataViewEmpty {
|
|
|
170
170
|
templateRef = inject(TemplateRef);
|
|
171
171
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
172
172
|
minVersion: "12.0.0",
|
|
173
|
-
version: "22.2.
|
|
173
|
+
version: "22.2.6",
|
|
174
174
|
ngImport: i0,
|
|
175
175
|
type: TxDataViewEmpty,
|
|
176
176
|
deps: [],
|
|
@@ -178,7 +178,7 @@ var TxDataViewEmpty = class TxDataViewEmpty {
|
|
|
178
178
|
});
|
|
179
179
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
180
180
|
minVersion: "14.0.0",
|
|
181
|
-
version: "22.2.
|
|
181
|
+
version: "22.2.6",
|
|
182
182
|
type: TxDataViewEmpty,
|
|
183
183
|
isStandalone: true,
|
|
184
184
|
selector: "ng-template[txDataViewEmpty]",
|
|
@@ -187,7 +187,7 @@ var TxDataViewEmpty = class TxDataViewEmpty {
|
|
|
187
187
|
};
|
|
188
188
|
i0.ɵɵngDeclareClassMetadata({
|
|
189
189
|
minVersion: "12.0.0",
|
|
190
|
-
version: "22.2.
|
|
190
|
+
version: "22.2.6",
|
|
191
191
|
ngImport: i0,
|
|
192
192
|
type: TxDataViewEmpty,
|
|
193
193
|
decorators: [{
|
|
@@ -199,7 +199,7 @@ var TxDataViewLoading = class TxDataViewLoading {
|
|
|
199
199
|
templateRef = inject(TemplateRef);
|
|
200
200
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
201
201
|
minVersion: "12.0.0",
|
|
202
|
-
version: "22.2.
|
|
202
|
+
version: "22.2.6",
|
|
203
203
|
ngImport: i0,
|
|
204
204
|
type: TxDataViewLoading,
|
|
205
205
|
deps: [],
|
|
@@ -207,7 +207,7 @@ var TxDataViewLoading = class TxDataViewLoading {
|
|
|
207
207
|
});
|
|
208
208
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
209
209
|
minVersion: "14.0.0",
|
|
210
|
-
version: "22.2.
|
|
210
|
+
version: "22.2.6",
|
|
211
211
|
type: TxDataViewLoading,
|
|
212
212
|
isStandalone: true,
|
|
213
213
|
selector: "ng-template[txDataViewLoading]",
|
|
@@ -216,7 +216,7 @@ var TxDataViewLoading = class TxDataViewLoading {
|
|
|
216
216
|
};
|
|
217
217
|
i0.ɵɵngDeclareClassMetadata({
|
|
218
218
|
minVersion: "12.0.0",
|
|
219
|
-
version: "22.2.
|
|
219
|
+
version: "22.2.6",
|
|
220
220
|
ngImport: i0,
|
|
221
221
|
type: TxDataViewLoading,
|
|
222
222
|
decorators: [{
|
|
@@ -231,7 +231,7 @@ var TxDataViewPaginatorStart = class TxDataViewPaginatorStart {
|
|
|
231
231
|
}
|
|
232
232
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
233
233
|
minVersion: "12.0.0",
|
|
234
|
-
version: "22.2.
|
|
234
|
+
version: "22.2.6",
|
|
235
235
|
ngImport: i0,
|
|
236
236
|
type: TxDataViewPaginatorStart,
|
|
237
237
|
deps: [],
|
|
@@ -239,7 +239,7 @@ var TxDataViewPaginatorStart = class TxDataViewPaginatorStart {
|
|
|
239
239
|
});
|
|
240
240
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
241
241
|
minVersion: "14.0.0",
|
|
242
|
-
version: "22.2.
|
|
242
|
+
version: "22.2.6",
|
|
243
243
|
type: TxDataViewPaginatorStart,
|
|
244
244
|
isStandalone: true,
|
|
245
245
|
selector: "ng-template[txDataViewPaginatorStart]",
|
|
@@ -248,7 +248,7 @@ var TxDataViewPaginatorStart = class TxDataViewPaginatorStart {
|
|
|
248
248
|
};
|
|
249
249
|
i0.ɵɵngDeclareClassMetadata({
|
|
250
250
|
minVersion: "12.0.0",
|
|
251
|
-
version: "22.2.
|
|
251
|
+
version: "22.2.6",
|
|
252
252
|
ngImport: i0,
|
|
253
253
|
type: TxDataViewPaginatorStart,
|
|
254
254
|
decorators: [{
|
|
@@ -263,7 +263,7 @@ var TxDataViewPaginatorEnd = class TxDataViewPaginatorEnd {
|
|
|
263
263
|
}
|
|
264
264
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
265
265
|
minVersion: "12.0.0",
|
|
266
|
-
version: "22.2.
|
|
266
|
+
version: "22.2.6",
|
|
267
267
|
ngImport: i0,
|
|
268
268
|
type: TxDataViewPaginatorEnd,
|
|
269
269
|
deps: [],
|
|
@@ -271,7 +271,7 @@ var TxDataViewPaginatorEnd = class TxDataViewPaginatorEnd {
|
|
|
271
271
|
});
|
|
272
272
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
273
273
|
minVersion: "14.0.0",
|
|
274
|
-
version: "22.2.
|
|
274
|
+
version: "22.2.6",
|
|
275
275
|
type: TxDataViewPaginatorEnd,
|
|
276
276
|
isStandalone: true,
|
|
277
277
|
selector: "ng-template[txDataViewPaginatorEnd]",
|
|
@@ -280,7 +280,7 @@ var TxDataViewPaginatorEnd = class TxDataViewPaginatorEnd {
|
|
|
280
280
|
};
|
|
281
281
|
i0.ɵɵngDeclareClassMetadata({
|
|
282
282
|
minVersion: "12.0.0",
|
|
283
|
-
version: "22.2.
|
|
283
|
+
version: "22.2.6",
|
|
284
284
|
ngImport: i0,
|
|
285
285
|
type: TxDataViewPaginatorEnd,
|
|
286
286
|
decorators: [{
|
|
@@ -488,7 +488,7 @@ var TxDataView = class TxDataView {
|
|
|
488
488
|
}
|
|
489
489
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
490
490
|
minVersion: "12.0.0",
|
|
491
|
-
version: "22.2.
|
|
491
|
+
version: "22.2.6",
|
|
492
492
|
ngImport: i0,
|
|
493
493
|
type: TxDataView,
|
|
494
494
|
deps: [],
|
|
@@ -496,7 +496,7 @@ var TxDataView = class TxDataView {
|
|
|
496
496
|
});
|
|
497
497
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
498
498
|
minVersion: "17.0.0",
|
|
499
|
-
version: "22.2.
|
|
499
|
+
version: "22.2.6",
|
|
500
500
|
type: TxDataView,
|
|
501
501
|
isStandalone: true,
|
|
502
502
|
selector: "tx-data-view",
|
|
@@ -879,7 +879,7 @@ var TxDataView = class TxDataView {
|
|
|
879
879
|
};
|
|
880
880
|
i0.ɵɵngDeclareClassMetadata({
|
|
881
881
|
minVersion: "12.0.0",
|
|
882
|
-
version: "22.2.
|
|
882
|
+
version: "22.2.6",
|
|
883
883
|
ngImport: i0,
|
|
884
884
|
type: TxDataView,
|
|
885
885
|
decorators: [{
|
|
@@ -1227,7 +1227,7 @@ var TxDataViewLayoutSwitch = class TxDataViewLayoutSwitch {
|
|
|
1227
1227
|
isUnstyled = injectUnstyled(this.unstyled);
|
|
1228
1228
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1229
1229
|
minVersion: "12.0.0",
|
|
1230
|
-
version: "22.2.
|
|
1230
|
+
version: "22.2.6",
|
|
1231
1231
|
ngImport: i0,
|
|
1232
1232
|
type: TxDataViewLayoutSwitch,
|
|
1233
1233
|
deps: [],
|
|
@@ -1235,7 +1235,7 @@ var TxDataViewLayoutSwitch = class TxDataViewLayoutSwitch {
|
|
|
1235
1235
|
});
|
|
1236
1236
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1237
1237
|
minVersion: "17.1.0",
|
|
1238
|
-
version: "22.2.
|
|
1238
|
+
version: "22.2.6",
|
|
1239
1239
|
type: TxDataViewLayoutSwitch,
|
|
1240
1240
|
isStandalone: true,
|
|
1241
1241
|
selector: "tx-data-view-layout",
|
|
@@ -1350,7 +1350,7 @@ var TxDataViewLayoutSwitch = class TxDataViewLayoutSwitch {
|
|
|
1350
1350
|
};
|
|
1351
1351
|
i0.ɵɵngDeclareClassMetadata({
|
|
1352
1352
|
minVersion: "12.0.0",
|
|
1353
|
-
version: "22.2.
|
|
1353
|
+
version: "22.2.6",
|
|
1354
1354
|
ngImport: i0,
|
|
1355
1355
|
type: TxDataViewLayoutSwitch,
|
|
1356
1356
|
decorators: [{
|