@taiga-ui/addon-doc 2.80.0 → 2.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-addon-doc.umd.js +11 -12
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-doc.umd.min.js +1 -1
- package/bundles/taiga-ui-addon-doc.umd.min.js.map +1 -1
- package/components/language-switcher/language-switcher.component.d.ts +1 -5
- package/esm2015/components/language-switcher/language-switcher.component.js +6 -13
- package/esm2015/components/language-switcher/language-switcher.module.js +9 -3
- package/esm5/components/language-switcher/language-switcher.component.js +6 -13
- package/esm5/components/language-switcher/language-switcher.module.js +9 -3
- package/fesm2015/taiga-ui-addon-doc.js +12 -13
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/fesm5/taiga-ui-addon-doc.js +12 -13
- package/fesm5/taiga-ui-addon-doc.js.map +1 -1
- package/package.json +5 -5
- package/taiga-ui-addon-doc.metadata.json +1 -1
|
@@ -1384,10 +1384,8 @@
|
|
|
1384
1384
|
}());
|
|
1385
1385
|
|
|
1386
1386
|
var TuiLanguageSwitcherComponent = /** @class */ (function () {
|
|
1387
|
-
function TuiLanguageSwitcherComponent(switcher
|
|
1387
|
+
function TuiLanguageSwitcherComponent(switcher) {
|
|
1388
1388
|
this.switcher = switcher;
|
|
1389
|
-
this.iconsPath = iconsPath;
|
|
1390
|
-
this.path = this.iconsPath('tuiIcon').replace('tuiIcon.svg#tuiIcon', '');
|
|
1391
1389
|
this.language = new forms.FormControl(core$1.tuiCapitalizeFirstLetter(this.switcher.language));
|
|
1392
1390
|
this.flags = new Map([
|
|
1393
1391
|
['chinese', i18n.TuiCountryIsoCode.CN],
|
|
@@ -1406,22 +1404,17 @@
|
|
|
1406
1404
|
]);
|
|
1407
1405
|
this.names = Array.from(this.flags.keys());
|
|
1408
1406
|
}
|
|
1409
|
-
TuiLanguageSwitcherComponent.prototype.getFlagPath = function (code) {
|
|
1410
|
-
return code ? "" + this.path + code + ".png" : null;
|
|
1411
|
-
};
|
|
1412
1407
|
TuiLanguageSwitcherComponent.ctorParameters = function () { return [
|
|
1413
|
-
{ type: i18n.TuiLanguageSwitcher, decorators: [{ type: core.Inject, args: [i18n.TuiLanguageSwitcher,] }] }
|
|
1414
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [core$1.TUI_ICONS_PATH,] }] }
|
|
1408
|
+
{ type: i18n.TuiLanguageSwitcher, decorators: [{ type: core.Inject, args: [i18n.TuiLanguageSwitcher,] }] }
|
|
1415
1409
|
]; };
|
|
1416
1410
|
TuiLanguageSwitcherComponent = __decorate([
|
|
1417
1411
|
core.Component({
|
|
1418
1412
|
selector: 'tui-language-switcher',
|
|
1419
|
-
template: "<tui-select [formControl]=\"language\">\n <ng-content></ng-content>\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let name of names\"\n tuiOption\n [value]=\"name | titlecase\"\n (click)=\"switcher.setLanguage(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"
|
|
1413
|
+
template: "<tui-select [formControl]=\"language\">\n <ng-content></ng-content>\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let name of names\"\n tuiOption\n [value]=\"name | titlecase\"\n (click)=\"switcher.setLanguage(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n </tui-data-list>\n</tui-select>\n",
|
|
1420
1414
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1421
1415
|
styles: [".t-flag{width:1.75rem;height:1.25rem;margin-right:.5rem}"]
|
|
1422
1416
|
}),
|
|
1423
|
-
__param(0, core.Inject(i18n.TuiLanguageSwitcher))
|
|
1424
|
-
__param(1, core.Inject(core$1.TUI_ICONS_PATH))
|
|
1417
|
+
__param(0, core.Inject(i18n.TuiLanguageSwitcher))
|
|
1425
1418
|
], TuiLanguageSwitcherComponent);
|
|
1426
1419
|
return TuiLanguageSwitcherComponent;
|
|
1427
1420
|
}());
|
|
@@ -1433,7 +1426,13 @@
|
|
|
1433
1426
|
core.NgModule({
|
|
1434
1427
|
exports: [TuiLanguageSwitcherComponent],
|
|
1435
1428
|
declarations: [TuiLanguageSwitcherComponent],
|
|
1436
|
-
imports: [
|
|
1429
|
+
imports: [
|
|
1430
|
+
common.CommonModule,
|
|
1431
|
+
core$1.TuiFlagPipeModule,
|
|
1432
|
+
kit.TuiSelectModule,
|
|
1433
|
+
core$1.TuiDataListModule,
|
|
1434
|
+
forms.ReactiveFormsModule,
|
|
1435
|
+
],
|
|
1437
1436
|
})
|
|
1438
1437
|
], TuiLanguageSwitcherModule);
|
|
1439
1438
|
return TuiLanguageSwitcherModule;
|