@taiga-ui/addon-doc 2.80.0 → 2.81.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.
@@ -7,7 +7,7 @@ import { CommonModule, isPlatformBrowser, Location as Location$1, DOCUMENT } fro
7
7
  import { HighlightModule } from 'ngx-highlightjs';
8
8
  import { tuiPure, TuiDestroyService, px, TUI_IS_MOBILE, TuiDragModule, EMPTY_QUERY, itemsQueryListObservable, watch, TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_CYPRESS, TuiSwipeService, getElementObscurers, isPresent, uniqBy, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, tuiDefaultProp } from '@taiga-ui/cdk';
9
9
  import { TUI_COPY_TEXTS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule, TuiBadgeModule, TuiToggleModule, TuiInputCountModule, TuiTabsModule, TuiAccordionModule, TuiTagModule } from '@taiga-ui/kit';
10
- import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiDropdownControllerModule, TuiNotificationModule, TuiNotificationsService, capitalizeFirstLetter, tuiCapitalizeFirstLetter, TUI_ICONS_PATH, TuiHostedDropdownModule, TuiScrollbarModule, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiAlertModule } from '@taiga-ui/core';
10
+ import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiDropdownControllerModule, TuiNotificationModule, TuiNotificationsService, capitalizeFirstLetter, tuiCapitalizeFirstLetter, TuiFlagPipeModule, TuiHostedDropdownModule, TuiScrollbarModule, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiAlertModule } from '@taiga-ui/core';
11
11
  import { FormControl, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
12
12
  import { UrlSerializer, RouterModule, ActivatedRoute, Router, NavigationEnd } from '@angular/router';
13
13
  import { trigger, transition, style, animate } from '@angular/animations';
@@ -1102,10 +1102,8 @@ var TuiDocExampleModule = /** @class */ (function () {
1102
1102
  }());
1103
1103
 
1104
1104
  var TuiLanguageSwitcherComponent = /** @class */ (function () {
1105
- function TuiLanguageSwitcherComponent(switcher, iconsPath) {
1105
+ function TuiLanguageSwitcherComponent(switcher) {
1106
1106
  this.switcher = switcher;
1107
- this.iconsPath = iconsPath;
1108
- this.path = this.iconsPath('tuiIcon').replace('tuiIcon.svg#tuiIcon', '');
1109
1107
  this.language = new FormControl(tuiCapitalizeFirstLetter(this.switcher.language));
1110
1108
  this.flags = new Map([
1111
1109
  ['chinese', TuiCountryIsoCode.CN],
@@ -1124,22 +1122,17 @@ var TuiLanguageSwitcherComponent = /** @class */ (function () {
1124
1122
  ]);
1125
1123
  this.names = Array.from(this.flags.keys());
1126
1124
  }
1127
- TuiLanguageSwitcherComponent.prototype.getFlagPath = function (code) {
1128
- return code ? "" + this.path + code + ".png" : null;
1129
- };
1130
1125
  TuiLanguageSwitcherComponent.ctorParameters = function () { return [
1131
- { type: TuiLanguageSwitcher, decorators: [{ type: Inject, args: [TuiLanguageSwitcher,] }] },
1132
- { type: undefined, decorators: [{ type: Inject, args: [TUI_ICONS_PATH,] }] }
1126
+ { type: TuiLanguageSwitcher, decorators: [{ type: Inject, args: [TuiLanguageSwitcher,] }] }
1133
1127
  ]; };
1134
1128
  TuiLanguageSwitcherComponent = __decorate([
1135
1129
  Component({
1136
1130
  selector: 'tui-language-switcher',
1137
- 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]=\"getFlagPath(flags.get(name))\"\n />\n {{ name | titlecase }}\n </button>\n </tui-data-list>\n</tui-select>\n",
1131
+ 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",
1138
1132
  changeDetection: ChangeDetectionStrategy.OnPush,
1139
1133
  styles: [".t-flag{width:1.75rem;height:1.25rem;margin-right:.5rem}"]
1140
1134
  }),
1141
- __param(0, Inject(TuiLanguageSwitcher)),
1142
- __param(1, Inject(TUI_ICONS_PATH))
1135
+ __param(0, Inject(TuiLanguageSwitcher))
1143
1136
  ], TuiLanguageSwitcherComponent);
1144
1137
  return TuiLanguageSwitcherComponent;
1145
1138
  }());
@@ -1151,7 +1144,13 @@ var TuiLanguageSwitcherModule = /** @class */ (function () {
1151
1144
  NgModule({
1152
1145
  exports: [TuiLanguageSwitcherComponent],
1153
1146
  declarations: [TuiLanguageSwitcherComponent],
1154
- imports: [CommonModule, TuiSelectModule, TuiDataListModule, ReactiveFormsModule],
1147
+ imports: [
1148
+ CommonModule,
1149
+ TuiFlagPipeModule,
1150
+ TuiSelectModule,
1151
+ TuiDataListModule,
1152
+ ReactiveFormsModule,
1153
+ ],
1155
1154
  })
1156
1155
  ], TuiLanguageSwitcherModule);
1157
1156
  return TuiLanguageSwitcherModule;