diff --git a/projects/addon-preview/README.md b/projects/addon-preview/README.md deleted file mode 100644 index e8a8b85d0631..000000000000 --- a/projects/addon-preview/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Taiga UI — Preview - -[![npm version](https://img.shields.io/npm/v/@taiga-ui/addon-preview.svg)](https://npmjs.com/package/@taiga-ui/addon-preview) -[![npm bundle size](https://img.shields.io/bundlephobia/minzip/@taiga-ui/addon-preview)](https://bundlephobia.com/result?p=@taiga-ui/addon-preview) -[![Discord](https://img.shields.io/discord/748677963142135818?color=7289DA&label=%23taiga-ui&logo=discord&logoColor=white)](https://discord.gg/Us8d8JVaTg) - -[Website](https://taiga-ui.dev) • [Documentation](https://taiga-ui.dev/getting-started) • -[Core team](https://github.com/taiga-family/taiga-ui/#core-team) - -> A library to display tabled data with filters, search, group actions, etc. - -It's a part of [**Taiga UI**](https://github.com/taiga-family/taiga-ui) that is fully-treeshakable Angular UI Kit -consisting of multiple base libraries and several add-ons - -## How to install - -Install base packages: - -``` -npm i @taiga-ui/{cdk,core,kit,icons} -``` - -Install addon-preview: - -``` -npm i @taiga-ui/addon-preview -``` - -Don't forget that Taiga UI is fully-treeshakable. **You can import even just one entity from our library** and be sure -that there is no redundant code in your bundle. Bundlphobia badge shows size of the whole library. - -## Docs - -See our [Documentation](https://taiga-ui.dev/getting-started) diff --git a/projects/addon-preview/components/index.ts b/projects/addon-preview/components/index.ts deleted file mode 100644 index 763373571b80..000000000000 --- a/projects/addon-preview/components/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from '@taiga-ui/addon-preview/components/preview'; -export * from '@taiga-ui/addon-preview/components/preview-dialog'; diff --git a/projects/addon-preview/components/preview/ng-package.json b/projects/addon-preview/components/preview/ng-package.json deleted file mode 100644 index bebf62dcb5e5..000000000000 --- a/projects/addon-preview/components/preview/ng-package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "lib": { - "entryFile": "index.ts" - } -} diff --git a/projects/addon-preview/index.ts b/projects/addon-preview/index.ts deleted file mode 100644 index 686cb7359ae3..000000000000 --- a/projects/addon-preview/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from '@taiga-ui/addon-preview/components'; -export * from '@taiga-ui/addon-preview/tokens'; diff --git a/projects/addon-preview/ng-package.json b/projects/addon-preview/ng-package.json deleted file mode 100644 index 4e92d131dba5..000000000000 --- a/projects/addon-preview/ng-package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "allowedNonPeerDependencies": [ - "." - ], - "dest": "../../dist/addon-preview", - "lib": { - "entryFile": "index.ts" - } -} diff --git a/projects/addon-preview/package.json b/projects/addon-preview/package.json deleted file mode 100644 index 68f171bd94fd..000000000000 --- a/projects/addon-preview/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@taiga-ui/addon-preview", - "version": "3.59.0", - "description": "A library to show a modal with custom content preview", - "keywords": [ - "angular", - "component", - "preview", - "documents", - "images" - ], - "homepage": "https://github.com/taiga-family/taiga-ui", - "repository": "https://github.com/taiga-family/taiga-ui", - "license": "Apache-2.0", - "peerDependencies": { - "@angular/common": ">=16.0.0", - "@angular/core": ">=16.0.0", - "@ng-web-apis/mutation-observer": "^3.1.0", - "@taiga-ui/cdk": "^3.59.0", - "@taiga-ui/core": "^3.59.0", - "@taiga-ui/i18n": "^3.59.0", - "@taiga-ui/kit": "^3.59.0", - "@tinkoff/ng-polymorpheus": "^4.3.0", - "rxjs": ">=7.0.0", - "tslib": "^2.6.2" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/projects/addon-preview/project.json b/projects/addon-preview/project.json deleted file mode 100644 index 9568a859186b..000000000000 --- a/projects/addon-preview/project.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "addon-preview", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "projects/addon-preview", - "projectType": "library", - "prefix": "tui", - "implicitDependencies": ["!testing"], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:ng-packagr", - "outputs": ["{workspaceRoot}/dist/addon-preview"], - "options": { - "tsConfig": "tsconfig.build.json", - "project": "{projectRoot}/ng-package.json" - }, - "dependsOn": [ - { - "target": "build", - "params": "forward", - "dependencies": true - } - ] - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/addon-preview"], - "options": { - "jestConfig": "jest.config.ts", - "coverageDirectory": "coverage/addon-preview", - "collectCoverageFrom": ["/{projectRoot}/**/*.ts"], - "testMatch": ["/{projectRoot}/**/*.spec.ts"] - } - }, - "publish": { - "executor": "nx:run-commands", - "options": { - "commands": [ - "cp ./LICENSE ./dist/addon-preview", - "ts-node ./scripts/publish.ts --path ./dist/addon-preview --dry-run {args.dry-run} --customVersion {args.customVersion} --customTag {args.customTag}" - ], - "parallel": false - } - } - } -} diff --git a/projects/addon-preview/tokens/i18n.ts b/projects/addon-preview/tokens/i18n.ts deleted file mode 100644 index 8d594d174cc4..000000000000 --- a/projects/addon-preview/tokens/i18n.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {tuiCreateTokenFromFactory} from '@taiga-ui/cdk'; -import {tuiExtractI18n} from '@taiga-ui/i18n'; - -/** - * tui-preview i18n - */ -export const TUI_PREVIEW_TEXTS = tuiCreateTokenFromFactory( - tuiExtractI18n('previewTexts'), -); - -/** - * tui-preview zoom i18n - */ -export const TUI_PREVIEW_ZOOM_TEXTS = tuiCreateTokenFromFactory( - tuiExtractI18n('zoomTexts'), -); diff --git a/projects/addon-preview/tokens/index.ts b/projects/addon-preview/tokens/index.ts deleted file mode 100644 index fbe3fc7fcb55..000000000000 --- a/projects/addon-preview/tokens/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './i18n'; -export * from './preview-icons'; diff --git a/projects/addon-preview/tokens/ng-package.json b/projects/addon-preview/tokens/ng-package.json deleted file mode 100644 index bebf62dcb5e5..000000000000 --- a/projects/addon-preview/tokens/ng-package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "lib": { - "entryFile": "index.ts" - } -} diff --git a/projects/cdk/constants/used-icons.ts b/projects/cdk/constants/used-icons.ts index c2a4810d3676..d6e600574bb3 100644 --- a/projects/cdk/constants/used-icons.ts +++ b/projects/cdk/constants/used-icons.ts @@ -27,12 +27,6 @@ export const TUI_USED_ICONS = [ 'tuiIconMoon', 'tuiIconCode', 'tuiIconMenuLarge', - 'tuiIconRotate', - 'tuiIconArrowLeft', - 'tuiIconArrowRight', - 'tuiIconPlus', - 'tuiIconMinus', - 'tuiIconMinimize', 'tuiIconEye', 'tuiIconEyeOff', 'tuiIconDrag', @@ -53,15 +47,21 @@ export const TUI_USED_ICONS = [ 'tuiIconChevronDown', 'tuiIconChevronDownLarge', 'tuiIconMinusLarge', + 'tuiIconMinus', 'tuiIconFileLarge', 'tuiIconCheckCircleLarge', 'tuiIconAlertCircleLarge', 'tuiIconTrashLarge', 'tuiIconCopy', + 'tuiIconPlus', 'tuiIconEyeLarge', 'tuiIconEyeOffLarge', 'tuiIconClock', 'tuiIconClockLarge', 'tuiIconStarLarge', 'tuiIconCalendar', + 'tuiIconRotate', + 'tuiIconArrowLeft', + 'tuiIconArrowRight', + 'tuiIconMinimize', ] as const; diff --git a/projects/cdk/package.json b/projects/cdk/package.json index a1ce0eeee396..49c95e50865b 100644 --- a/projects/cdk/package.json +++ b/projects/cdk/package.json @@ -56,7 +56,6 @@ "@taiga-ui/addon-charts", "@taiga-ui/addon-commerce", "@taiga-ui/icons", - "@taiga-ui/addon-preview", "@taiga-ui/addon-tablebars", "@taiga-ui/addon-table", "@taiga-ui/addon-mobile", diff --git a/projects/cdk/schematics/ng-add/schema.json b/projects/cdk/schematics/ng-add/schema.json index 3611cbd22864..787523ff7902 100644 --- a/projects/cdk/schematics/ng-add/schema.json +++ b/projects/cdk/schematics/ng-add/schema.json @@ -79,10 +79,6 @@ "value": "addon-tablebars", "label": "addon-tablebars Group action sliding toolbar" }, - { - "value": "addon-preview", - "label": "addon-preview Custom fullscreen dialog to preview various content such as documents, images etc." - }, { "value": "layout", "label": "layout Layout components" diff --git a/projects/cdk/schematics/ng-update/v4/steps/constants/identifiers-to-replace.ts b/projects/cdk/schematics/ng-update/v4/steps/constants/identifiers-to-replace.ts index fec7135ef5e4..c1a7215a204b 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/constants/identifiers-to-replace.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/constants/identifiers-to-replace.ts @@ -952,7 +952,7 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [ }, to: { name: 'TuiPreview', - moduleSpecifier: '@taiga-ui/addon-preview', + moduleSpecifier: '@taiga-ui/kit', }, }, { @@ -1008,7 +1008,7 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [ }, to: { name: 'TuiPreviewDialogComponent', - moduleSpecifier: '@taiga-ui/addon-preview', + moduleSpecifier: '@taiga-ui/kit', }, }, { diff --git a/projects/demo/src/modules/app/home/examples/addons.md b/projects/demo/src/modules/app/home/examples/addons.md index cc402fb04229..9633772a0148 100644 --- a/projects/demo/src/modules/app/home/examples/addons.md +++ b/projects/demo/src/modules/app/home/examples/addons.md @@ -4,7 +4,6 @@ npm i @taiga-ui/addon-commerce // Money-related extension with currencies, cred npm i @taiga-ui/addon-mobile // Components and tools specific to mobile version of the app npm i @taiga-ui/addon-table // Interactive table component and related utilities npm i @taiga-ui/addon-tablebars // Group action sliding toolbar -npm i @taiga-ui/addon-preview // Custom fullscreen dialog to preview various content such as documents, images etc. npm i @taiga-ui/addon-doc // Taiga UI based library for developing documentation portals for Angular libraries npm i @taiga-ui/layout // Layout components ``` diff --git a/projects/demo/src/modules/app/stackblitz/stackblitz-deps.service.ts b/projects/demo/src/modules/app/stackblitz/stackblitz-deps.service.ts index 8d43ae22c153..20be4f6f79b4 100644 --- a/projects/demo/src/modules/app/stackblitz/stackblitz-deps.service.ts +++ b/projects/demo/src/modules/app/stackblitz/stackblitz-deps.service.ts @@ -51,7 +51,6 @@ export class StackblitzDepsService { '@taiga-ui/addon-charts': version, '@taiga-ui/addon-commerce': version, '@taiga-ui/addon-mobile': version, - '@taiga-ui/addon-preview': version, '@taiga-ui/addon-table': version, '@taiga-ui/addon-tablebars': version, '@taiga-ui/layout': version, diff --git a/projects/demo/src/modules/app/stackblitz/utils.ts b/projects/demo/src/modules/app/stackblitz/utils.ts index 80997aafc248..c5247c8b4957 100644 --- a/projects/demo/src/modules/app/stackblitz/utils.ts +++ b/projects/demo/src/modules/app/stackblitz/utils.ts @@ -103,7 +103,7 @@ export async function getAllTaigaUIModulesFile( * You can't just iterate the array with package-names - it will cause error: * `Warning: Critical dependency: the request of a dependency is an expression` * */ - const [cdk, core, kit, charts, commerce, mobile, preview, table, tablebars] = + const [cdk, core, kit, charts, commerce, mobile, table, tablebars] = await Promise.all([ import('@taiga-ui/cdk'), import('@taiga-ui/core'), @@ -111,7 +111,6 @@ export async function getAllTaigaUIModulesFile( import('@taiga-ui/addon-charts'), import('@taiga-ui/addon-commerce'), import('@taiga-ui/addon-mobile'), - import('@taiga-ui/addon-preview'), import('@taiga-ui/addon-table'), import('@taiga-ui/addon-tablebars'), ]).then(modules => { @@ -146,9 +145,6 @@ import { import { ${mobile} } from '@taiga-ui/addon-mobile'; -import { - ${preview} -} from '@taiga-ui/addon-preview'; import { ${table} } from '@taiga-ui/addon-table'; @@ -188,8 +184,6 @@ export const ALL_TAIGA_UI_MODULES = [ ${commerce}, /* ADDON-MOBILE */ ${mobile}, - /* ADDON-PREVIEW */ - ${preview}, /* ADDON-TABLE */ ${table}, /* ADDON-TABLEBARS */ diff --git a/projects/demo/src/modules/components/preview/examples/1/index.html b/projects/demo/src/modules/components/preview/examples/1/index.html index ffd85841875b..1748a65624c8 100644 --- a/projects/demo/src/modules/components/preview/examples/1/index.html +++ b/projects/demo/src/modules/components/preview/examples/1/index.html @@ -18,7 +18,7 @@ [rotatable]="true" (tuiSwipe)="onSwipe($event)" > - {{ title }} + {{ titles[index] }} - Show simple preview + Show preview - - - + + + {{ titles[index] }} + + + preview diff --git a/projects/demo/src/modules/components/preview/examples/2/index.less b/projects/demo/src/modules/components/preview/examples/2/index.less index 3c1b2e4cf1a7..e69de29bb2d1 100644 --- a/projects/demo/src/modules/components/preview/examples/2/index.less +++ b/projects/demo/src/modules/components/preview/examples/2/index.less @@ -1,4 +0,0 @@ -.content { - width: 80%; - height: 80%; -} diff --git a/projects/demo/src/modules/components/preview/examples/2/index.ts b/projects/demo/src/modules/components/preview/examples/2/index.ts index b47b65bfe189..f8639586a29c 100644 --- a/projects/demo/src/modules/components/preview/examples/2/index.ts +++ b/projects/demo/src/modules/components/preview/examples/2/index.ts @@ -1,26 +1,32 @@ -import type {TemplateRef} from '@angular/core'; -import {Component, inject, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiPreview, TuiPreviewDialogService} from '@taiga-ui/addon-preview'; -import type {TuiDialogContext} from '@taiga-ui/core'; +import {TuiSwipeDirective} from '@taiga-ui/cdk'; import {TuiButtonDirective} from '@taiga-ui/core'; +import {TuiPreview, TuiPreviewDialogDirective} from '@taiga-ui/kit'; +import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus'; @Component({ standalone: true, - imports: [TuiButtonDirective, TuiPreview], + imports: [ + TuiButtonDirective, + TuiPreview, + TuiSwipeDirective, + PolymorpheusModule, + TuiPreviewDialogDirective, + ], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, changeDetection, }) export default class ExampleComponent { - private readonly previewDialogService = inject(TuiPreviewDialogService); - - @ViewChild('preview') - protected readonly preview?: TemplateRef; - - protected show(): void { - this.previewDialogService.open(this.preview || '').subscribe(); - } + protected open = false; + protected index = 0; + protected length = 2; + protected titles = ['pic_1.jpg', 'pic_2.jpg']; + protected content = [ + 'https://picsum.photos/600/500', + 'https://picsum.photos/500/600', + ]; } diff --git a/projects/demo/src/modules/components/preview/examples/3/index.html b/projects/demo/src/modules/components/preview/examples/3/index.html index ce1f82964348..167964c99bfb 100644 --- a/projects/demo/src/modules/components/preview/examples/3/index.html +++ b/projects/demo/src/modules/components/preview/examples/3/index.html @@ -5,7 +5,7 @@ class="tui-space_bottom-4" (click)="show()" > - Show preview + Show simple preview - {{ title$ | async }} - - - + - - -
- -
Preview unavailable
-
-
- - img source - -
diff --git a/projects/demo/src/modules/components/preview/examples/3/index.less b/projects/demo/src/modules/components/preview/examples/3/index.less index 443d3694f438..3c1b2e4cf1a7 100644 --- a/projects/demo/src/modules/components/preview/examples/3/index.less +++ b/projects/demo/src/modules/components/preview/examples/3/index.less @@ -1,24 +1,4 @@ .content { - background-color: rgb(245, 241, 241); - width: 25rem; - height: 37.5rem; - padding: 2.5rem; - border-radius: 0.75rem; -} - -.t-container { - display: flex; - flex-direction: column; - align-items: center; - color: var(--tui-text-02-night); -} - -.t-icon { - margin-bottom: 0.75rem; - transform: scale(4); - height: 5rem; -} - -.t-loader { - width: 4rem; + width: 80%; + height: 80%; } diff --git a/projects/demo/src/modules/components/preview/examples/3/index.ts b/projects/demo/src/modules/components/preview/examples/3/index.ts index 76d2efc6edeb..e13ef5af80c6 100644 --- a/projects/demo/src/modules/components/preview/examples/3/index.ts +++ b/projects/demo/src/modules/components/preview/examples/3/index.ts @@ -1,25 +1,14 @@ -import {AsyncPipe, NgIf} from '@angular/common'; import type {TemplateRef} from '@angular/core'; import {Component, inject, ViewChild} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiPreview, TuiPreviewDialogService} from '@taiga-ui/addon-preview'; -import {tuiIsPresent} from '@taiga-ui/cdk'; import type {TuiDialogContext} from '@taiga-ui/core'; -import {TuiButtonDirective, TuiLoaderComponent, TuiSvgComponent} from '@taiga-ui/core'; -import type {Observable} from 'rxjs'; -import {BehaviorSubject, filter, map, of, startWith, switchMap, timer} from 'rxjs'; +import {TuiButtonDirective} from '@taiga-ui/core'; +import {TuiPreview, TuiPreviewDialogService} from '@taiga-ui/kit'; @Component({ standalone: true, - imports: [ - TuiButtonDirective, - TuiPreview, - AsyncPipe, - NgIf, - TuiSvgComponent, - TuiLoaderComponent, - ], + imports: [TuiButtonDirective, TuiPreview], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, @@ -31,49 +20,7 @@ export default class ExampleComponent { @ViewChild('preview') protected readonly preview?: TemplateRef; - protected readonly items = [ - { - title: 'some table.xlsx', - hasPreview: false, - }, - { - title: 'Content #2', - hasPreview: true, - }, - ]; - - protected readonly index$$ = new BehaviorSubject(0); - - protected readonly item$ = this.index$$.pipe( - map(index => this.items[index]), - filter(tuiIsPresent), - ); - - protected readonly title$ = this.item$.pipe(map(item => item.title)); - - protected readonly contentUnavailable$ = this.item$.pipe( - map(item => !item.hasPreview), - ); - - protected readonly imageSrc$ = this.item$.pipe( - switchMap(item => - item.hasPreview ? this.emulateBackendRequest().pipe(startWith('')) : of(null), - ), - ); - - protected readonly loading$ = this.imageSrc$.pipe(map(src => src === '')); - protected show(): void { this.previewDialogService.open(this.preview || '').subscribe(); } - - protected download(): void { - console.info('downloading...'); - } - - protected emulateBackendRequest(): Observable { - return timer(1500).pipe( - map(() => 'https://ng-web-apis.github.io/dist/assets/images/web-api.svg'), - ); - } } diff --git a/projects/demo/src/modules/components/preview/examples/4/index.html b/projects/demo/src/modules/components/preview/examples/4/index.html new file mode 100644 index 000000000000..ce1f82964348 --- /dev/null +++ b/projects/demo/src/modules/components/preview/examples/4/index.html @@ -0,0 +1,70 @@ + + + + + {{ title$ | async }} + + + + + + + +
+ +
Preview unavailable
+
+
+ + img source + + +
+
diff --git a/projects/demo/src/modules/components/preview/examples/4/index.less b/projects/demo/src/modules/components/preview/examples/4/index.less new file mode 100644 index 000000000000..443d3694f438 --- /dev/null +++ b/projects/demo/src/modules/components/preview/examples/4/index.less @@ -0,0 +1,24 @@ +.content { + background-color: rgb(245, 241, 241); + width: 25rem; + height: 37.5rem; + padding: 2.5rem; + border-radius: 0.75rem; +} + +.t-container { + display: flex; + flex-direction: column; + align-items: center; + color: var(--tui-text-02-night); +} + +.t-icon { + margin-bottom: 0.75rem; + transform: scale(4); + height: 5rem; +} + +.t-loader { + width: 4rem; +} diff --git a/projects/demo/src/modules/components/preview/examples/4/index.ts b/projects/demo/src/modules/components/preview/examples/4/index.ts new file mode 100644 index 000000000000..dd807e617b8d --- /dev/null +++ b/projects/demo/src/modules/components/preview/examples/4/index.ts @@ -0,0 +1,79 @@ +import {AsyncPipe, NgIf} from '@angular/common'; +import type {TemplateRef} from '@angular/core'; +import {Component, inject, ViewChild} from '@angular/core'; +import {changeDetection} from '@demo/emulate/change-detection'; +import {encapsulation} from '@demo/emulate/encapsulation'; +import {tuiIsPresent} from '@taiga-ui/cdk'; +import type {TuiDialogContext} from '@taiga-ui/core'; +import {TuiButtonDirective, TuiLoaderComponent, TuiSvgComponent} from '@taiga-ui/core'; +import {TuiPreview, TuiPreviewDialogService} from '@taiga-ui/kit'; +import type {Observable} from 'rxjs'; +import {BehaviorSubject, filter, map, of, startWith, switchMap, timer} from 'rxjs'; + +@Component({ + standalone: true, + imports: [ + TuiButtonDirective, + TuiPreview, + AsyncPipe, + NgIf, + TuiSvgComponent, + TuiLoaderComponent, + ], + templateUrl: './index.html', + styleUrls: ['./index.less'], + encapsulation, + changeDetection, +}) +export default class ExampleComponent { + private readonly previewDialogService = inject(TuiPreviewDialogService); + + @ViewChild('preview') + protected readonly preview?: TemplateRef; + + protected readonly items = [ + { + title: 'some table.xlsx', + hasPreview: false, + }, + { + title: 'Content #2', + hasPreview: true, + }, + ]; + + protected readonly index$$ = new BehaviorSubject(0); + + protected readonly item$ = this.index$$.pipe( + map(index => this.items[index]), + filter(tuiIsPresent), + ); + + protected readonly title$ = this.item$.pipe(map(item => item.title)); + + protected readonly contentUnavailable$ = this.item$.pipe( + map(item => !item.hasPreview), + ); + + protected readonly imageSrc$ = this.item$.pipe( + switchMap(item => + item.hasPreview ? this.emulateBackendRequest().pipe(startWith('')) : of(null), + ), + ); + + protected readonly loading$ = this.imageSrc$.pipe(map(src => src === '')); + + protected show(): void { + this.previewDialogService.open(this.preview || '').subscribe(); + } + + protected download(): void { + console.info('downloading...'); + } + + protected emulateBackendRequest(): Observable { + return timer(1500).pipe( + map(() => 'https://ng-web-apis.github.io/dist/assets/images/web-api.svg'), + ); + } +} diff --git a/projects/demo/src/modules/components/preview/examples/import/import.md b/projects/demo/src/modules/components/preview/examples/import/import.md index 22548a42492a..ed260a8955b1 100644 --- a/projects/demo/src/modules/components/preview/examples/import/import.md +++ b/projects/demo/src/modules/components/preview/examples/import/import.md @@ -1,6 +1,6 @@ ```ts import {Component, inject, TemplateRef, ViewChild} from '@angular/core'; -import {TuiPreviewDialogService} from '@taiga-ui/addon-preview'; +import {TuiPreviewDialogService} from '@taiga-ui/kit'; import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus'; import {TuiDialogContext} from '@taiga-ui/core'; diff --git a/projects/demo/src/modules/components/preview/index.html b/projects/demo/src/modules/components/preview/index.html index 80b1334b30d3..b6a196ed472e 100644 --- a/projects/demo/src/modules/components/preview/index.html +++ b/projects/demo/src/modules/components/preview/index.html @@ -1,6 +1,6 @@ diff --git a/projects/demo/src/modules/components/preview/index.ts b/projects/demo/src/modules/components/preview/index.ts index 6d9ffb265562..82dc367c0882 100644 --- a/projects/demo/src/modules/components/preview/index.ts +++ b/projects/demo/src/modules/components/preview/index.ts @@ -12,6 +12,7 @@ import {TuiNotificationComponent} from '@taiga-ui/core'; export default class PageComponent { protected readonly examples = [ 'Full preview', + 'Preview with directive', 'Simple mode', 'With loading and unavailable image', ]; diff --git a/projects/i18n/interfaces/language.ts b/projects/i18n/interfaces/language.ts index c35d21b997f0..1a36465cdbfc 100644 --- a/projects/i18n/interfaces/language.ts +++ b/projects/i18n/interfaces/language.ts @@ -92,6 +92,14 @@ export interface TuiLanguageKit { 'HH:MM:SS': string; 'HH:MM:SS.MSS': string; }; + previewTexts: { + rotate: string; + }; + zoomTexts: { + zoomIn: string; + zoomOut: string; + reset: string; + }; } export interface TuiLanguageCommerce { @@ -181,17 +189,6 @@ export interface TuiLanguageEditor { }; } -export interface TuiLanguagePreview { - previewTexts: { - rotate: string; - }; - zoomTexts: { - reset: string; - zoomIn: string; - zoomOut: string; - }; -} - export interface TuiLanguageMeta { name: TuiLanguageName; } @@ -202,5 +199,4 @@ export interface TuiLanguage TuiLanguageCommerce, TuiLanguageTable, TuiLanguageEditor, - TuiLanguagePreview, TuiLanguageMeta {} diff --git a/projects/i18n/languages/belarusian/addon-preview.ts b/projects/i18n/languages/belarusian/addon-preview.ts deleted file mode 100644 index 9220a79b27d0..000000000000 --- a/projects/i18n/languages/belarusian/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_BELARUSIAN_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Павярнуць', - }, - zoomTexts: { - zoomIn: 'Павялічыць', - zoomOut: 'Паменшыць', - reset: 'Скінуць маштаб', - }, -}; diff --git a/projects/i18n/languages/belarusian/belarusian.ts b/projects/i18n/languages/belarusian/belarusian.ts index 595f9a769804..7f9ec7f6e490 100644 --- a/projects/i18n/languages/belarusian/belarusian.ts +++ b/projects/i18n/languages/belarusian/belarusian.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_BELARUSIAN_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_BELARUSIAN_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_BELARUSIAN_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_BELARUSIAN_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_BELARUSIAN_LANGUAGE_CORE} from './core'; import {TUI_BELARUSIAN_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_BELARUSIAN_LANGUAGE: TuiLanguage = { ...TUI_BELARUSIAN_LANGUAGE_ADDON_COMMERCE, ...TUI_BELARUSIAN_LANGUAGE_ADDON_TABLE, ...TUI_BELARUSIAN_LANGUAGE_ADDON_EDITOR, - ...TUI_BELARUSIAN_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/belarusian/index.ts b/projects/i18n/languages/belarusian/index.ts index d544603df859..b385f5d0fa76 100644 --- a/projects/i18n/languages/belarusian/index.ts +++ b/projects/i18n/languages/belarusian/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './belarusian'; export * from './core'; diff --git a/projects/i18n/languages/belarusian/kit.ts b/projects/i18n/languages/belarusian/kit.ts index 0b557f1fc4fb..b4f9ff47bb90 100644 --- a/projects/i18n/languages/belarusian/kit.ts +++ b/projects/i18n/languages/belarusian/kit.ts @@ -61,4 +61,12 @@ export const TUI_BELARUSIAN_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Так', no: 'Не', }, + previewTexts: { + rotate: 'Павярнуць', + }, + zoomTexts: { + zoomIn: 'Павялічыць', + zoomOut: 'Паменшыць', + reset: 'Скінуць маштаб', + }, }; diff --git a/projects/i18n/languages/chinese/addon-preview.ts b/projects/i18n/languages/chinese/addon-preview.ts deleted file mode 100644 index 78ba0136b4a0..000000000000 --- a/projects/i18n/languages/chinese/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_CHINESE_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: '旋转', - }, - zoomTexts: { - zoomOut: '缩小', - zoomIn: '放大', - reset: '重置', - }, -}; diff --git a/projects/i18n/languages/chinese/chinese.ts b/projects/i18n/languages/chinese/chinese.ts index 623ce599f645..b3b517ec6978 100644 --- a/projects/i18n/languages/chinese/chinese.ts +++ b/projects/i18n/languages/chinese/chinese.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_CHINESE_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_CHINESE_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_CHINESE_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_CHINESE_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_CHINESE_LANGUAGE_CORE} from './core'; import {TUI_CHINESE_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_CHINESE_LANGUAGE: TuiLanguage = { ...TUI_CHINESE_LANGUAGE_ADDON_TABLE, ...TUI_CHINESE_LANGUAGE_ADDON_COMMERCE, ...TUI_CHINESE_LANGUAGE_ADDON_EDITOR, - ...TUI_CHINESE_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/chinese/index.ts b/projects/i18n/languages/chinese/index.ts index acc455d7cab1..920f6efd327f 100644 --- a/projects/i18n/languages/chinese/index.ts +++ b/projects/i18n/languages/chinese/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './chinese'; export * from './core'; diff --git a/projects/i18n/languages/chinese/kit.ts b/projects/i18n/languages/chinese/kit.ts index dab1b0a04291..7c1ec4392499 100644 --- a/projects/i18n/languages/chinese/kit.ts +++ b/projects/i18n/languages/chinese/kit.ts @@ -61,4 +61,12 @@ export const TUI_CHINESE_LANGUAGE_KIT: TuiLanguageKit = { yes: '是', no: '不', }, + previewTexts: { + rotate: '旋转', + }, + zoomTexts: { + zoomOut: '缩小', + zoomIn: '放大', + reset: '重置', + }, }; diff --git a/projects/i18n/languages/dutch/addon-preview.ts b/projects/i18n/languages/dutch/addon-preview.ts deleted file mode 100644 index 517c962b8c0d..000000000000 --- a/projects/i18n/languages/dutch/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_DUTCH_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Rotate', - }, - zoomTexts: { - zoomOut: 'Zoom out', - zoomIn: 'Zoom in', - reset: 'Reset', - }, -}; diff --git a/projects/i18n/languages/dutch/dutch.ts b/projects/i18n/languages/dutch/dutch.ts index d0dfde28e904..c6ff0e123dd9 100644 --- a/projects/i18n/languages/dutch/dutch.ts +++ b/projects/i18n/languages/dutch/dutch.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_DUTCH_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_DUTCH_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_DUTCH_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_DUTCH_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_DUTCH_LANGUAGE_CORE} from './core'; import {TUI_DUTCH_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_DUTCH_LANGUAGE: TuiLanguage = { ...TUI_DUTCH_LANGUAGE_ADDON_TABLE, ...TUI_DUTCH_LANGUAGE_ADDON_COMMERCE, ...TUI_DUTCH_LANGUAGE_ADDON_EDITOR, - ...TUI_DUTCH_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/dutch/index.ts b/projects/i18n/languages/dutch/index.ts index 8bd4a7c7cbcd..4fbaf697c002 100644 --- a/projects/i18n/languages/dutch/index.ts +++ b/projects/i18n/languages/dutch/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/dutch/kit.ts b/projects/i18n/languages/dutch/kit.ts index ec3113bdda81..57a6ec1f709c 100644 --- a/projects/i18n/languages/dutch/kit.ts +++ b/projects/i18n/languages/dutch/kit.ts @@ -61,4 +61,12 @@ export const TUI_DUTCH_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Ja', no: 'Ingen', }, + previewTexts: { + rotate: 'Draaien', + }, + zoomTexts: { + zoomOut: 'Uitzoomen', + zoomIn: 'Inzoomen', + reset: 'Opnieuw instellen', + }, }; diff --git a/projects/i18n/languages/english/addon-preview.ts b/projects/i18n/languages/english/addon-preview.ts deleted file mode 100644 index 0f23b18917f6..000000000000 --- a/projects/i18n/languages/english/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_ENGLISH_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Rotate', - }, - zoomTexts: { - zoomOut: 'Zoom out', - zoomIn: 'Zoom in', - reset: 'Reset', - }, -}; diff --git a/projects/i18n/languages/english/english.ts b/projects/i18n/languages/english/english.ts index 3e4ce9f67278..80439b6ca926 100644 --- a/projects/i18n/languages/english/english.ts +++ b/projects/i18n/languages/english/english.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_ENGLISH_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_ENGLISH_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_ENGLISH_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_ENGLISH_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_ENGLISH_LANGUAGE_CORE} from './core'; import {TUI_ENGLISH_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_ENGLISH_LANGUAGE: TuiLanguage = { ...TUI_ENGLISH_LANGUAGE_ADDON_TABLE, ...TUI_ENGLISH_LANGUAGE_ADDON_COMMERCE, ...TUI_ENGLISH_LANGUAGE_ADDON_EDITOR, - ...TUI_ENGLISH_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/english/index.ts b/projects/i18n/languages/english/index.ts index 569856fdd865..a123b044f01a 100644 --- a/projects/i18n/languages/english/index.ts +++ b/projects/i18n/languages/english/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/english/kit.ts b/projects/i18n/languages/english/kit.ts index 013ca1b89a21..d89543e0abd1 100644 --- a/projects/i18n/languages/english/kit.ts +++ b/projects/i18n/languages/english/kit.ts @@ -61,4 +61,12 @@ export const TUI_ENGLISH_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Yes', no: 'No', }, + previewTexts: { + rotate: 'Rotate', + }, + zoomTexts: { + zoomOut: 'Zoom out', + zoomIn: 'Zoom in', + reset: 'Reset', + }, }; diff --git a/projects/i18n/languages/french/addon-preview.ts b/projects/i18n/languages/french/addon-preview.ts deleted file mode 100644 index e1eba789a4d0..000000000000 --- a/projects/i18n/languages/french/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_FRENCH_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Faire pivoter', - }, - zoomTexts: { - zoomOut: 'Zoomer', - zoomIn: 'Dézoomer', - reset: 'Réinitialiser', - }, -}; diff --git a/projects/i18n/languages/french/french.ts b/projects/i18n/languages/french/french.ts index f9df75bdb04d..ac3575b1bbed 100644 --- a/projects/i18n/languages/french/french.ts +++ b/projects/i18n/languages/french/french.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_FRENCH_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_FRENCH_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_FRENCH_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_FRENCH_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_FRENCH_LANGUAGE_CORE} from './core'; import {TUI_FRENCH_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_FRENCH_LANGUAGE: TuiLanguage = { ...TUI_FRENCH_LANGUAGE_ADDON_TABLE, ...TUI_FRENCH_LANGUAGE_ADDON_COMMERCE, ...TUI_FRENCH_LANGUAGE_ADDON_EDITOR, - ...TUI_FRENCH_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/french/index.ts b/projects/i18n/languages/french/index.ts index 414d4b21f297..c89d49a9648e 100644 --- a/projects/i18n/languages/french/index.ts +++ b/projects/i18n/languages/french/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/french/kit.ts b/projects/i18n/languages/french/kit.ts index adbbe56a6d47..5c916fad5803 100644 --- a/projects/i18n/languages/french/kit.ts +++ b/projects/i18n/languages/french/kit.ts @@ -65,4 +65,12 @@ export const TUI_FRENCH_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Oui', no: 'Non', }, + previewTexts: { + rotate: 'Faire pivoter', + }, + zoomTexts: { + zoomOut: 'Zoomer', + zoomIn: 'Dézoomer', + reset: 'Réinitialiser', + }, }; diff --git a/projects/i18n/languages/german/addon-preview.ts b/projects/i18n/languages/german/addon-preview.ts deleted file mode 100644 index e36aa2e860f9..000000000000 --- a/projects/i18n/languages/german/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_GERMAN_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Rotieren', - }, - zoomTexts: { - zoomOut: 'Verkleinern', - zoomIn: 'Vergrößern', - reset: 'Zurücksetzen', - }, -}; diff --git a/projects/i18n/languages/german/german.ts b/projects/i18n/languages/german/german.ts index cd30b7b6ae25..3ea5587c06f2 100644 --- a/projects/i18n/languages/german/german.ts +++ b/projects/i18n/languages/german/german.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_GERMAN_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_GERMAN_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_GERMAN_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_GERMAN_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_GERMAN_LANGUAGE_CORE} from './core'; import {TUI_GERMAN_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_GERMAN_LANGUAGE: TuiLanguage = { ...TUI_GERMAN_LANGUAGE_ADDON_TABLE, ...TUI_GERMAN_LANGUAGE_ADDON_COMMERCE, ...TUI_GERMAN_LANGUAGE_ADDON_EDITOR, - ...TUI_GERMAN_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/german/index.ts b/projects/i18n/languages/german/index.ts index 6e0f0ca0666e..449bf2b8c3b9 100644 --- a/projects/i18n/languages/german/index.ts +++ b/projects/i18n/languages/german/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './german'; diff --git a/projects/i18n/languages/german/kit.ts b/projects/i18n/languages/german/kit.ts index b036063346f0..f9b9a81a18ba 100644 --- a/projects/i18n/languages/german/kit.ts +++ b/projects/i18n/languages/german/kit.ts @@ -62,4 +62,12 @@ export const TUI_GERMAN_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Ja', no: 'Nein', }, + previewTexts: { + rotate: 'Rotieren', + }, + zoomTexts: { + zoomOut: 'Verkleinern', + zoomIn: 'Vergrößern', + reset: 'Zurücksetzen', + }, }; diff --git a/projects/i18n/languages/italian/addon-preview.ts b/projects/i18n/languages/italian/addon-preview.ts deleted file mode 100644 index c57543362aea..000000000000 --- a/projects/i18n/languages/italian/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_ITALIAN_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Ruota', - }, - zoomTexts: { - zoomOut: 'Rimpicciolisci', - zoomIn: 'Ingrandisci', - reset: 'Ripristina', - }, -}; diff --git a/projects/i18n/languages/italian/index.ts b/projects/i18n/languages/italian/index.ts index a4215fd9f27a..283ccedd4a9d 100644 --- a/projects/i18n/languages/italian/index.ts +++ b/projects/i18n/languages/italian/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/italian/italian.ts b/projects/i18n/languages/italian/italian.ts index 342e2f4bdd27..4789e90dce73 100644 --- a/projects/i18n/languages/italian/italian.ts +++ b/projects/i18n/languages/italian/italian.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_ITALIAN_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_ITALIAN_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_ITALIAN_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_ITALIAN_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_ITALIAN_LANGUAGE_CORE} from './core'; import {TUI_ITALIAN_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_ITALIAN_LANGUAGE: TuiLanguage = { ...TUI_ITALIAN_LANGUAGE_ADDON_TABLE, ...TUI_ITALIAN_LANGUAGE_ADDON_COMMERCE, ...TUI_ITALIAN_LANGUAGE_ADDON_EDITOR, - ...TUI_ITALIAN_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/italian/kit.ts b/projects/i18n/languages/italian/kit.ts index 6ed3cdf60e6f..354d2b89b39b 100644 --- a/projects/i18n/languages/italian/kit.ts +++ b/projects/i18n/languages/italian/kit.ts @@ -61,4 +61,12 @@ export const TUI_ITALIAN_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Sì', no: 'No', }, + previewTexts: { + rotate: 'Ruota', + }, + zoomTexts: { + zoomOut: 'Rimpicciolisci', + zoomIn: 'Ingrandisci', + reset: 'Ripristina', + }, }; diff --git a/projects/i18n/languages/kazakh/addon-preview.ts b/projects/i18n/languages/kazakh/addon-preview.ts deleted file mode 100644 index 8c5bda84ad6f..000000000000 --- a/projects/i18n/languages/kazakh/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_KAZAKH_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Айналдыру', - }, - zoomTexts: { - zoomOut: 'Кішірейту', - zoomIn: 'Үлкейту', - reset: 'Қалпына келтіру', - }, -}; diff --git a/projects/i18n/languages/kazakh/index.ts b/projects/i18n/languages/kazakh/index.ts index 3aa82173fe48..d24a14e84045 100644 --- a/projects/i18n/languages/kazakh/index.ts +++ b/projects/i18n/languages/kazakh/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/kazakh/kazakh.ts b/projects/i18n/languages/kazakh/kazakh.ts index 171d660b39cf..09dc2a6d0732 100644 --- a/projects/i18n/languages/kazakh/kazakh.ts +++ b/projects/i18n/languages/kazakh/kazakh.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_KAZAKH_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_KAZAKH_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_KAZAKH_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_KAZAKH_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_KAZAKH_LANGUAGE_CORE} from './core'; import {TUI_KAZAKH_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_KAZAKH_LANGUAGE: TuiLanguage = { ...TUI_KAZAKH_LANGUAGE_ADDON_TABLE, ...TUI_KAZAKH_LANGUAGE_ADDON_COMMERCE, ...TUI_KAZAKH_LANGUAGE_ADDON_EDITOR, - ...TUI_KAZAKH_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/kazakh/kit.ts b/projects/i18n/languages/kazakh/kit.ts index 732ebf35ff36..df62c4a69958 100644 --- a/projects/i18n/languages/kazakh/kit.ts +++ b/projects/i18n/languages/kazakh/kit.ts @@ -61,4 +61,12 @@ export const TUI_KAZAKH_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Иә', no: 'Жоқ', }, + previewTexts: { + rotate: 'Айналдыру', + }, + zoomTexts: { + zoomOut: 'Кішірейту', + zoomIn: 'Үлкейту', + reset: 'Қалпына келтіру', + }, }; diff --git a/projects/i18n/languages/malay/addon-preview.ts b/projects/i18n/languages/malay/addon-preview.ts deleted file mode 100644 index 3090343d515b..000000000000 --- a/projects/i18n/languages/malay/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_MALAY_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Putar', - }, - zoomTexts: { - zoomOut: 'Zum keluar', - zoomIn: 'Zum masuk', - reset: 'Set semula', - }, -}; diff --git a/projects/i18n/languages/malay/index.ts b/projects/i18n/languages/malay/index.ts index b07aa2fb20ad..2fdb5144e8e9 100644 --- a/projects/i18n/languages/malay/index.ts +++ b/projects/i18n/languages/malay/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/malay/kit.ts b/projects/i18n/languages/malay/kit.ts index cd69f1a0483a..49a11dd8eb6b 100644 --- a/projects/i18n/languages/malay/kit.ts +++ b/projects/i18n/languages/malay/kit.ts @@ -61,4 +61,12 @@ export const TUI_MALAY_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Ya', no: 'tidak', }, + previewTexts: { + rotate: 'Putar', + }, + zoomTexts: { + zoomOut: 'Zum keluar', + zoomIn: 'Zum masuk', + reset: 'Set semula', + }, }; diff --git a/projects/i18n/languages/malay/malay.ts b/projects/i18n/languages/malay/malay.ts index 20b4d70897fe..432050540a7f 100644 --- a/projects/i18n/languages/malay/malay.ts +++ b/projects/i18n/languages/malay/malay.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_MALAY_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_MALAY_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_MALAY_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_MALAY_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_MALAY_LANGUAGE_CORE} from './core'; import {TUI_MALAY_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_MALAY_LANGUAGE: TuiLanguage = { ...TUI_MALAY_LANGUAGE_ADDON_TABLE, ...TUI_MALAY_LANGUAGE_ADDON_COMMERCE, ...TUI_MALAY_LANGUAGE_ADDON_EDITOR, - ...TUI_MALAY_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/polish/addon-preview.ts b/projects/i18n/languages/polish/addon-preview.ts deleted file mode 100644 index a0904c75f847..000000000000 --- a/projects/i18n/languages/polish/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_POLISH_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Rotate', - }, - zoomTexts: { - zoomOut: 'Zoom out', - zoomIn: 'Zoom in', - reset: 'Reset', - }, -}; diff --git a/projects/i18n/languages/polish/index.ts b/projects/i18n/languages/polish/index.ts index 16a77d57fee1..9ee2054ad208 100644 --- a/projects/i18n/languages/polish/index.ts +++ b/projects/i18n/languages/polish/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/polish/kit.ts b/projects/i18n/languages/polish/kit.ts index 7d595d76499d..1e1f92a2a048 100644 --- a/projects/i18n/languages/polish/kit.ts +++ b/projects/i18n/languages/polish/kit.ts @@ -61,4 +61,12 @@ export const TUI_POLISH_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Tak', no: 'Nie', }, + previewTexts: { + rotate: 'Obracać się', + }, + zoomTexts: { + zoomOut: 'Pomniejsz', + zoomIn: 'Zbliżenie', + reset: 'Resetowanie', + }, }; diff --git a/projects/i18n/languages/polish/polish.ts b/projects/i18n/languages/polish/polish.ts index c6e2ca1f628b..331d216436c4 100644 --- a/projects/i18n/languages/polish/polish.ts +++ b/projects/i18n/languages/polish/polish.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_POLISH_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_POLISH_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_POLISH_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_POLISH_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_POLISH_LANGUAGE_CORE} from './core'; import {TUI_POLISH_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_POLISH_LANGUAGE: TuiLanguage = { ...TUI_POLISH_LANGUAGE_ADDON_TABLE, ...TUI_POLISH_LANGUAGE_ADDON_COMMERCE, ...TUI_POLISH_LANGUAGE_ADDON_EDITOR, - ...TUI_POLISH_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/portuguese/addon-preview.ts b/projects/i18n/languages/portuguese/addon-preview.ts deleted file mode 100644 index 205cfa137fdb..000000000000 --- a/projects/i18n/languages/portuguese/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_PORTUGUESE_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Rotate', - }, - zoomTexts: { - zoomOut: 'Zoom out', - zoomIn: 'Zoom in', - reset: 'Reset', - }, -}; diff --git a/projects/i18n/languages/portuguese/index.ts b/projects/i18n/languages/portuguese/index.ts index 4389c32cf63f..5b908244841b 100644 --- a/projects/i18n/languages/portuguese/index.ts +++ b/projects/i18n/languages/portuguese/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/portuguese/kit.ts b/projects/i18n/languages/portuguese/kit.ts index 09ba4a7c3ab7..910aea96db47 100644 --- a/projects/i18n/languages/portuguese/kit.ts +++ b/projects/i18n/languages/portuguese/kit.ts @@ -61,4 +61,12 @@ export const TUI_PORTUGUESE_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Sim', no: 'Não', }, + previewTexts: { + rotate: 'Girar', + }, + zoomTexts: { + zoomOut: 'Reduzir o zoom', + zoomIn: 'Mais Zoom', + reset: 'Reiniciar', + }, }; diff --git a/projects/i18n/languages/portuguese/portuguese.ts b/projects/i18n/languages/portuguese/portuguese.ts index 81208bf00f74..2d0bfd1820a8 100644 --- a/projects/i18n/languages/portuguese/portuguese.ts +++ b/projects/i18n/languages/portuguese/portuguese.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_PORTUGUESE_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_PORTUGUESE_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_PORTUGUESE_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_PORTUGUESE_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_PORTUGUESE_LANGUAGE_CORE} from './core'; import {TUI_PORTUGUESE_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_PORTUGUESE_LANGUAGE: TuiLanguage = { ...TUI_PORTUGUESE_LANGUAGE_ADDON_TABLE, ...TUI_PORTUGUESE_LANGUAGE_ADDON_COMMERCE, ...TUI_PORTUGUESE_LANGUAGE_ADDON_EDITOR, - ...TUI_PORTUGUESE_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/russian/addon-preview.ts b/projects/i18n/languages/russian/addon-preview.ts deleted file mode 100644 index 7afe2cb48913..000000000000 --- a/projects/i18n/languages/russian/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_RUSSIAN_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Повернуть', - }, - zoomTexts: { - zoomIn: 'Увеличить масштаб', - zoomOut: 'Уменьшить масштаб', - reset: 'Сбросить масштаб', - }, -}; diff --git a/projects/i18n/languages/russian/index.ts b/projects/i18n/languages/russian/index.ts index 813faa14d2ef..8c76a61794f2 100644 --- a/projects/i18n/languages/russian/index.ts +++ b/projects/i18n/languages/russian/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/russian/kit.ts b/projects/i18n/languages/russian/kit.ts index cec25b0ceb2f..fb3b6f3c41cc 100644 --- a/projects/i18n/languages/russian/kit.ts +++ b/projects/i18n/languages/russian/kit.ts @@ -61,4 +61,12 @@ export const TUI_RUSSIAN_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Да', no: 'Нет', }, + previewTexts: { + rotate: 'Повернуть', + }, + zoomTexts: { + zoomIn: 'Увеличить масштаб', + zoomOut: 'Уменьшить масштаб', + reset: 'Сбросить масштаб', + }, }; diff --git a/projects/i18n/languages/russian/russian.ts b/projects/i18n/languages/russian/russian.ts index fd6a494a1e36..263199b42473 100644 --- a/projects/i18n/languages/russian/russian.ts +++ b/projects/i18n/languages/russian/russian.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_RUSSIAN_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_RUSSIAN_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_RUSSIAN_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_RUSSIAN_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_RUSSIAN_LANGUAGE_CORE} from './core'; import {TUI_RUSSIAN_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_RUSSIAN_LANGUAGE: TuiLanguage = { ...TUI_RUSSIAN_LANGUAGE_ADDON_COMMERCE, ...TUI_RUSSIAN_LANGUAGE_ADDON_TABLE, ...TUI_RUSSIAN_LANGUAGE_ADDON_EDITOR, - ...TUI_RUSSIAN_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/spanish/addon-preview.ts b/projects/i18n/languages/spanish/addon-preview.ts deleted file mode 100644 index e3c68ccb9235..000000000000 --- a/projects/i18n/languages/spanish/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_SPANISH_LANGUAGE_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Rotate', - }, - zoomTexts: { - zoomOut: 'Zoom out', - zoomIn: 'Zoom in', - reset: 'Reset', - }, -}; diff --git a/projects/i18n/languages/spanish/index.ts b/projects/i18n/languages/spanish/index.ts index d91aa9ff17ab..9d8e7847933a 100644 --- a/projects/i18n/languages/spanish/index.ts +++ b/projects/i18n/languages/spanish/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/spanish/kit.ts b/projects/i18n/languages/spanish/kit.ts index 27942120c9c8..9807a45f0ea6 100644 --- a/projects/i18n/languages/spanish/kit.ts +++ b/projects/i18n/languages/spanish/kit.ts @@ -61,4 +61,12 @@ export const TUI_SPANISH_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Sí', no: 'No', }, + previewTexts: { + rotate: 'Girar', + }, + zoomTexts: { + zoomOut: 'Disminuir el zoom', + zoomIn: 'Acercarse', + reset: 'Reiniciar', + }, }; diff --git a/projects/i18n/languages/spanish/spanish.ts b/projects/i18n/languages/spanish/spanish.ts index 51d4cde4ef0f..907642b0024d 100644 --- a/projects/i18n/languages/spanish/spanish.ts +++ b/projects/i18n/languages/spanish/spanish.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_SPANISH_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_SPANISH_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_SPANISH_LANGUAGE_PREVIEW} from './addon-preview'; import {TUI_SPANISH_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_SPANISH_LANGUAGE_CORE} from './core'; import {TUI_SPANISH_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_SPANISH_LANGUAGE: TuiLanguage = { ...TUI_SPANISH_LANGUAGE_ADDON_TABLE, ...TUI_SPANISH_LANGUAGE_ADDON_COMMERCE, ...TUI_SPANISH_LANGUAGE_ADDON_EDITOR, - ...TUI_SPANISH_LANGUAGE_PREVIEW, }; diff --git a/projects/i18n/languages/turkish/addon-preview.ts b/projects/i18n/languages/turkish/addon-preview.ts deleted file mode 100644 index a3ad64989781..000000000000 --- a/projects/i18n/languages/turkish/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_TURKISH_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Rotate', - }, - zoomTexts: { - zoomOut: 'Zoom out', - zoomIn: 'Zoom in', - reset: 'Reset', - }, -}; diff --git a/projects/i18n/languages/turkish/index.ts b/projects/i18n/languages/turkish/index.ts index 69324dc82182..a762b18927ac 100644 --- a/projects/i18n/languages/turkish/index.ts +++ b/projects/i18n/languages/turkish/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './kit'; diff --git a/projects/i18n/languages/turkish/kit.ts b/projects/i18n/languages/turkish/kit.ts index 36dddff00dfb..bdd70f7b43fa 100644 --- a/projects/i18n/languages/turkish/kit.ts +++ b/projects/i18n/languages/turkish/kit.ts @@ -61,4 +61,12 @@ export const TUI_TURKISH_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Evet', no: 'Hayır', }, + previewTexts: { + rotate: 'Döndür', + }, + zoomTexts: { + zoomOut: 'Uzaklaştır', + zoomIn: 'Yakınlaştır', + reset: 'Sıfırla', + }, }; diff --git a/projects/i18n/languages/turkish/turkish.ts b/projects/i18n/languages/turkish/turkish.ts index b21c2f15b023..f3c8d968763d 100644 --- a/projects/i18n/languages/turkish/turkish.ts +++ b/projects/i18n/languages/turkish/turkish.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_TURKISH_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_TURKISH_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_TURKISH_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_TURKISH_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_TURKISH_LANGUAGE_CORE} from './core'; import {TUI_TURKISH_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_TURKISH_LANGUAGE: TuiLanguage = { ...TUI_TURKISH_LANGUAGE_ADDON_TABLE, ...TUI_TURKISH_LANGUAGE_ADDON_COMMERCE, ...TUI_TURKISH_LANGUAGE_ADDON_EDITOR, - ...TUI_TURKISH_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/ukrainian/addon-preview.ts b/projects/i18n/languages/ukrainian/addon-preview.ts deleted file mode 100644 index ec9d5dae4eab..000000000000 --- a/projects/i18n/languages/ukrainian/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_UKRAINIAN_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Rotate', - }, - zoomTexts: { - zoomOut: 'Zoom out', - zoomIn: 'Zoom in', - reset: 'Reset', - }, -}; diff --git a/projects/i18n/languages/ukrainian/index.ts b/projects/i18n/languages/ukrainian/index.ts index 2acfa9da8442..d28d46b53517 100644 --- a/projects/i18n/languages/ukrainian/index.ts +++ b/projects/i18n/languages/ukrainian/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './kit'; diff --git a/projects/i18n/languages/ukrainian/kit.ts b/projects/i18n/languages/ukrainian/kit.ts index 4b10c1f85bd2..7ce34baa9318 100644 --- a/projects/i18n/languages/ukrainian/kit.ts +++ b/projects/i18n/languages/ukrainian/kit.ts @@ -61,4 +61,12 @@ export const TUI_UKRAINIAN_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Так', no: 'Немає', }, + previewTexts: { + rotate: 'Обертати', + }, + zoomTexts: { + zoomOut: 'Зменшення', + zoomIn: 'Збільшувати', + reset: 'Скинути', + }, }; diff --git a/projects/i18n/languages/ukrainian/ukrainian.ts b/projects/i18n/languages/ukrainian/ukrainian.ts index 5f986bcf3584..e2f76b755031 100644 --- a/projects/i18n/languages/ukrainian/ukrainian.ts +++ b/projects/i18n/languages/ukrainian/ukrainian.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_UKRAINIAN_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_UKRAINIAN_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_UKRAINIAN_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_UKRAINIAN_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_UKRAINIAN_LANGUAGE_CORE} from './core'; import {TUI_UKRAINIAN_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_UKRAINIAN_LANGUAGE: TuiLanguage = { ...TUI_UKRAINIAN_LANGUAGE_ADDON_COMMERCE, ...TUI_UKRAINIAN_LANGUAGE_ADDON_TABLE, ...TUI_UKRAINIAN_LANGUAGE_ADDON_EDITOR, - ...TUI_UKRAINIAN_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/i18n/languages/vietnamese/addon-preview.ts b/projects/i18n/languages/vietnamese/addon-preview.ts deleted file mode 100644 index 46079525090a..000000000000 --- a/projects/i18n/languages/vietnamese/addon-preview.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces'; - -export const TUI_VIETNAMESE_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = { - previewTexts: { - rotate: 'Xoay', - }, - zoomTexts: { - zoomOut: 'Thu nhỏ', - zoomIn: 'Phóng to', - reset: 'Đặt lại', - }, -}; diff --git a/projects/i18n/languages/vietnamese/index.ts b/projects/i18n/languages/vietnamese/index.ts index b68bcf5a02fc..0de3bdc55ec3 100644 --- a/projects/i18n/languages/vietnamese/index.ts +++ b/projects/i18n/languages/vietnamese/index.ts @@ -1,6 +1,5 @@ export * from './addon-commerce'; export * from './addon-editor'; -export * from './addon-preview'; export * from './addon-table'; export * from './core'; export * from './countries'; diff --git a/projects/i18n/languages/vietnamese/kit.ts b/projects/i18n/languages/vietnamese/kit.ts index 4ef1a207bcc9..ec54a6e5532f 100644 --- a/projects/i18n/languages/vietnamese/kit.ts +++ b/projects/i18n/languages/vietnamese/kit.ts @@ -61,4 +61,12 @@ export const TUI_VIETNAMESE_LANGUAGE_KIT: TuiLanguageKit = { yes: 'Đúng', no: 'Không', }, + previewTexts: { + rotate: 'Xoay', + }, + zoomTexts: { + zoomOut: 'Thu nhỏ', + zoomIn: 'Phóng to', + reset: 'Đặt lại', + }, }; diff --git a/projects/i18n/languages/vietnamese/vietnamese.ts b/projects/i18n/languages/vietnamese/vietnamese.ts index 1ec80a61a730..060af8ac20eb 100644 --- a/projects/i18n/languages/vietnamese/vietnamese.ts +++ b/projects/i18n/languages/vietnamese/vietnamese.ts @@ -2,7 +2,6 @@ import type {TuiLanguage} from '@taiga-ui/i18n/interfaces'; import {TUI_VIETNAMESE_LANGUAGE_ADDON_COMMERCE} from './addon-commerce'; import {TUI_VIETNAMESE_LANGUAGE_ADDON_EDITOR} from './addon-editor'; -import {TUI_VIETNAMESE_LANGUAGE_ADDON_PREVIEW} from './addon-preview'; import {TUI_VIETNAMESE_LANGUAGE_ADDON_TABLE} from './addon-table'; import {TUI_VIETNAMESE_LANGUAGE_CORE} from './core'; import {TUI_VIETNAMESE_LANGUAGE_KIT} from './kit'; @@ -14,5 +13,4 @@ export const TUI_VIETNAMESE_LANGUAGE: TuiLanguage = { ...TUI_VIETNAMESE_LANGUAGE_ADDON_TABLE, ...TUI_VIETNAMESE_LANGUAGE_ADDON_COMMERCE, ...TUI_VIETNAMESE_LANGUAGE_ADDON_EDITOR, - ...TUI_VIETNAMESE_LANGUAGE_ADDON_PREVIEW, }; diff --git a/projects/kit/components/index.ts b/projects/kit/components/index.ts index 70b88d99de4c..bca1ec5333d2 100644 --- a/projects/kit/components/index.ts +++ b/projects/kit/components/index.ts @@ -45,6 +45,7 @@ export * from '@taiga-ui/kit/components/multi-select-option'; export * from '@taiga-ui/kit/components/pagination'; export * from '@taiga-ui/kit/components/pdf-viewer'; export * from '@taiga-ui/kit/components/pin'; +export * from '@taiga-ui/kit/components/preview'; export * from '@taiga-ui/kit/components/progress'; export * from '@taiga-ui/kit/components/push'; export * from '@taiga-ui/kit/components/radio'; diff --git a/projects/addon-preview/components/preview/index.ts b/projects/kit/components/preview/index.ts similarity index 89% rename from projects/addon-preview/components/preview/index.ts rename to projects/kit/components/preview/index.ts index 5d9376de0718..b8145e421262 100644 --- a/projects/addon-preview/components/preview/index.ts +++ b/projects/kit/components/preview/index.ts @@ -2,5 +2,6 @@ export * from './pagination/preview-pagination.component'; export * from './preview.component'; export * from './preview.module'; export * from './preview-action/preview-action.directive'; +export * from './preview-dialog'; export * from './title/preview-title.component'; export * from './zoom/preview-zoom.component'; diff --git a/projects/addon-preview/components/preview/mixin.style.less b/projects/kit/components/preview/mixin.style.less similarity index 100% rename from projects/addon-preview/components/preview/mixin.style.less rename to projects/kit/components/preview/mixin.style.less diff --git a/projects/addon-preview/components/ng-package.json b/projects/kit/components/preview/ng-package.json similarity index 100% rename from projects/addon-preview/components/ng-package.json rename to projects/kit/components/preview/ng-package.json diff --git a/projects/addon-preview/components/preview/pagination/preview-pagination.component.ts b/projects/kit/components/preview/pagination/preview-pagination.component.ts similarity index 93% rename from projects/addon-preview/components/preview/pagination/preview-pagination.component.ts rename to projects/kit/components/preview/pagination/preview-pagination.component.ts index 44777d37196d..72b27f68e437 100644 --- a/projects/addon-preview/components/preview/pagination/preview-pagination.component.ts +++ b/projects/kit/components/preview/pagination/preview-pagination.component.ts @@ -8,10 +8,9 @@ import { Input, Output, } from '@angular/core'; -import {TUI_PREVIEW_ICONS} from '@taiga-ui/addon-preview/tokens'; import {tuiClamp} from '@taiga-ui/cdk'; import {TuiButtonDirective} from '@taiga-ui/core'; -import {TUI_PAGINATION_TEXTS} from '@taiga-ui/kit'; +import {TUI_PAGINATION_TEXTS, TUI_PREVIEW_ICONS} from '@taiga-ui/kit/tokens'; import {TuiPreviewActionDirective} from '../preview-action/preview-action.directive'; diff --git a/projects/addon-preview/components/preview/pagination/preview-pagination.style.less b/projects/kit/components/preview/pagination/preview-pagination.style.less similarity index 100% rename from projects/addon-preview/components/preview/pagination/preview-pagination.style.less rename to projects/kit/components/preview/pagination/preview-pagination.style.less diff --git a/projects/addon-preview/components/preview/pagination/preview-pagination.template.html b/projects/kit/components/preview/pagination/preview-pagination.template.html similarity index 100% rename from projects/addon-preview/components/preview/pagination/preview-pagination.template.html rename to projects/kit/components/preview/pagination/preview-pagination.template.html diff --git a/projects/addon-preview/components/preview/pagination/test/preview-pagination.spec.ts b/projects/kit/components/preview/pagination/test/preview-pagination.spec.ts similarity index 99% rename from projects/addon-preview/components/preview/pagination/test/preview-pagination.spec.ts rename to projects/kit/components/preview/pagination/test/preview-pagination.spec.ts index dd25cc3d061b..98fbc78a4fe0 100644 --- a/projects/addon-preview/components/preview/pagination/test/preview-pagination.spec.ts +++ b/projects/kit/components/preview/pagination/test/preview-pagination.spec.ts @@ -2,7 +2,7 @@ import {Component, ViewChild} from '@angular/core'; import type {ComponentFixture} from '@angular/core/testing'; import {TestBed} from '@angular/core/testing'; import {By} from '@angular/platform-browser'; -import {TuiPreview, TuiPreviewPaginationComponent} from '@taiga-ui/addon-preview'; +import {TuiPreview, TuiPreviewPaginationComponent} from '@taiga-ui/kit'; describe('PreviewPagination', () => { let fixture: ComponentFixture; diff --git a/projects/addon-preview/components/preview/preview-action/preview-action.directive.ts b/projects/kit/components/preview/preview-action/preview-action.directive.ts similarity index 100% rename from projects/addon-preview/components/preview/preview-action/preview-action.directive.ts rename to projects/kit/components/preview/preview-action/preview-action.directive.ts diff --git a/projects/addon-preview/components/preview-dialog/index.ts b/projects/kit/components/preview/preview-dialog/index.ts similarity index 66% rename from projects/addon-preview/components/preview-dialog/index.ts rename to projects/kit/components/preview/preview-dialog/index.ts index bf9c772c423f..40192ee4495f 100644 --- a/projects/addon-preview/components/preview-dialog/index.ts +++ b/projects/kit/components/preview/preview-dialog/index.ts @@ -1,2 +1,3 @@ export * from './preview-dialog.component'; +export * from './preview-dialog.directive'; export * from './preview-dialog.service'; diff --git a/projects/addon-preview/components/preview-dialog/ng-package.json b/projects/kit/components/preview/preview-dialog/ng-package.json similarity index 100% rename from projects/addon-preview/components/preview-dialog/ng-package.json rename to projects/kit/components/preview/preview-dialog/ng-package.json diff --git a/projects/addon-preview/components/preview-dialog/preview-dialog.component.ts b/projects/kit/components/preview/preview-dialog/preview-dialog.component.ts similarity index 100% rename from projects/addon-preview/components/preview-dialog/preview-dialog.component.ts rename to projects/kit/components/preview/preview-dialog/preview-dialog.component.ts diff --git a/projects/kit/components/preview/preview-dialog/preview-dialog.directive.ts b/projects/kit/components/preview/preview-dialog/preview-dialog.directive.ts new file mode 100644 index 000000000000..a31a4b8c84c3 --- /dev/null +++ b/projects/kit/components/preview/preview-dialog/preview-dialog.directive.ts @@ -0,0 +1,13 @@ +import {Directive} from '@angular/core'; +import {tuiAsPopover, TuiPopoverDirective} from '@taiga-ui/cdk'; + +import {TuiPreviewDialogService} from './preview-dialog.service'; + +@Directive({ + standalone: true, + selector: 'ng-template[tuiPreviewDialog]', + inputs: ['open: tuiPreviewDialog'], + outputs: ['openChange: tuiPreviewDialogChange'], + providers: [tuiAsPopover(TuiPreviewDialogService)], +}) +export class TuiPreviewDialogDirective extends TuiPopoverDirective {} diff --git a/projects/addon-preview/components/preview-dialog/preview-dialog.service.ts b/projects/kit/components/preview/preview-dialog/preview-dialog.service.ts similarity index 100% rename from projects/addon-preview/components/preview-dialog/preview-dialog.service.ts rename to projects/kit/components/preview/preview-dialog/preview-dialog.service.ts diff --git a/projects/addon-preview/components/preview-dialog/preview-dialog.style.less b/projects/kit/components/preview/preview-dialog/preview-dialog.style.less similarity index 100% rename from projects/addon-preview/components/preview-dialog/preview-dialog.style.less rename to projects/kit/components/preview/preview-dialog/preview-dialog.style.less diff --git a/projects/addon-preview/components/preview/preview.component.ts b/projects/kit/components/preview/preview.component.ts similarity index 98% rename from projects/addon-preview/components/preview/preview.component.ts rename to projects/kit/components/preview/preview.component.ts index 0c4b65892a6c..25ce9cb98644 100644 --- a/projects/addon-preview/components/preview/preview.component.ts +++ b/projects/kit/components/preview/preview.component.ts @@ -2,7 +2,6 @@ import {AsyncPipe, NgIf} from '@angular/common'; import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core'; import {MutationObserverModule} from '@ng-web-apis/mutation-observer'; import {ResizeObserverModule} from '@ng-web-apis/resize-observer'; -import {TUI_PREVIEW_ICONS, TUI_PREVIEW_TEXTS} from '@taiga-ui/addon-preview/tokens'; import type {TuiZoom} from '@taiga-ui/cdk'; import { TUI_FALSE_HANDLER, @@ -16,6 +15,7 @@ import { TuiZoomDirective, } from '@taiga-ui/cdk'; import {TuiButtonDirective, TuiHint, tuiSlideInTop} from '@taiga-ui/core'; +import {TUI_PREVIEW_ICONS, TUI_PREVIEW_TEXTS} from '@taiga-ui/kit/tokens'; import {BehaviorSubject, combineLatest, map, merge, startWith} from 'rxjs'; import {TuiPreviewActionDirective} from './preview-action/preview-action.directive'; diff --git a/projects/addon-preview/components/preview/preview.module.ts b/projects/kit/components/preview/preview.module.ts similarity index 100% rename from projects/addon-preview/components/preview/preview.module.ts rename to projects/kit/components/preview/preview.module.ts diff --git a/projects/addon-preview/components/preview/preview.style.less b/projects/kit/components/preview/preview.style.less similarity index 100% rename from projects/addon-preview/components/preview/preview.style.less rename to projects/kit/components/preview/preview.style.less diff --git a/projects/addon-preview/components/preview/preview.template.html b/projects/kit/components/preview/preview.template.html similarity index 100% rename from projects/addon-preview/components/preview/preview.template.html rename to projects/kit/components/preview/preview.template.html diff --git a/projects/addon-preview/components/preview/title/preview-title.component.ts b/projects/kit/components/preview/title/preview-title.component.ts similarity index 100% rename from projects/addon-preview/components/preview/title/preview-title.component.ts rename to projects/kit/components/preview/title/preview-title.component.ts diff --git a/projects/addon-preview/components/preview/title/preview-title.style.less b/projects/kit/components/preview/title/preview-title.style.less similarity index 100% rename from projects/addon-preview/components/preview/title/preview-title.style.less rename to projects/kit/components/preview/title/preview-title.style.less diff --git a/projects/addon-preview/components/preview/zoom/preview-zoom.component.ts b/projects/kit/components/preview/zoom/preview-zoom.component.ts similarity index 96% rename from projects/addon-preview/components/preview/zoom/preview-zoom.component.ts rename to projects/kit/components/preview/zoom/preview-zoom.component.ts index 3db6e68927cc..779162123f17 100644 --- a/projects/addon-preview/components/preview/zoom/preview-zoom.component.ts +++ b/projects/kit/components/preview/zoom/preview-zoom.component.ts @@ -8,10 +8,10 @@ import { Output, } from '@angular/core'; import {FormsModule} from '@angular/forms'; -import {TUI_PREVIEW_ICONS, TUI_PREVIEW_ZOOM_TEXTS} from '@taiga-ui/addon-preview/tokens'; import {TUI_FALSE_HANDLER, tuiClamp} from '@taiga-ui/cdk'; import {TuiButtonDirective, TuiHint} from '@taiga-ui/core'; -import {TuiSliderModule} from '@taiga-ui/kit'; +import {TuiSliderModule} from '@taiga-ui/kit/components/slider'; +import {TUI_PREVIEW_ICONS, TUI_PREVIEW_ZOOM_TEXTS} from '@taiga-ui/kit/tokens'; import {map, merge, of, startWith, switchMap, timer} from 'rxjs'; import {TuiPreviewActionDirective} from '../preview-action/preview-action.directive'; diff --git a/projects/addon-preview/components/preview/zoom/preview-zoom.style.less b/projects/kit/components/preview/zoom/preview-zoom.style.less similarity index 100% rename from projects/addon-preview/components/preview/zoom/preview-zoom.style.less rename to projects/kit/components/preview/zoom/preview-zoom.style.less diff --git a/projects/addon-preview/components/preview/zoom/preview-zoom.template.html b/projects/kit/components/preview/zoom/preview-zoom.template.html similarity index 100% rename from projects/addon-preview/components/preview/zoom/preview-zoom.template.html rename to projects/kit/components/preview/zoom/preview-zoom.template.html diff --git a/projects/kit/tokens/i18n.ts b/projects/kit/tokens/i18n.ts index 9fa00dbcdde6..5e6e2ecaf9ed 100644 --- a/projects/kit/tokens/i18n.ts +++ b/projects/kit/tokens/i18n.ts @@ -65,3 +65,11 @@ export const TUI_MULTI_SELECT_TEXTS = tuiCreateTokenFromFactory( export const TUI_COUNTRIES = tuiCreateTokenFromFactory< Observable> >(tuiExtractI18n('countries')); + +export const TUI_PREVIEW_TEXTS = tuiCreateTokenFromFactory( + tuiExtractI18n('previewTexts'), +); + +export const TUI_PREVIEW_ZOOM_TEXTS = tuiCreateTokenFromFactory( + tuiExtractI18n('zoomTexts'), +); diff --git a/projects/kit/tokens/index.ts b/projects/kit/tokens/index.ts index 6c50b1987f4d..e783f70ee1e5 100644 --- a/projects/kit/tokens/index.ts +++ b/projects/kit/tokens/index.ts @@ -6,4 +6,5 @@ export * from './input-date-options'; export * from './items-handlers'; export * from './mobile-calendar'; export * from './month-formatter'; +export * from './preview-icons'; export * from './validation-errors'; diff --git a/projects/addon-preview/tokens/preview-icons.ts b/projects/kit/tokens/preview-icons.ts similarity index 100% rename from projects/addon-preview/tokens/preview-icons.ts rename to projects/kit/tokens/preview-icons.ts diff --git a/tsconfig.build.json b/tsconfig.build.json index afccb19a3f34..e73bfb214f56 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -26,8 +26,6 @@ "@taiga-ui/addon-commerce": ["./dist/addon-commerce/index"], "@taiga-ui/addon-tablebars/*": ["./dist/addon-tablebars/*"], "@taiga-ui/addon-tablebars": ["./dist/addon-tablebars/index"], - "@taiga-ui/addon-preview/*": ["./dist/addon-preview/*"], - "@taiga-ui/addon-preview": ["./dist/addon-preview/index"], "@taiga-ui/testing": ["./dist/testing/index"], "@taiga-ui/testing/*": ["./dist/testing/*"], "@taiga-ui/icons": ["./dist/icons"], diff --git a/tsconfig.json b/tsconfig.json index 2514e2cff62d..b0c6262bb631 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,8 +30,6 @@ "@taiga-ui/addon-doc/*": ["projects/addon-doc/*"], "@taiga-ui/addon-mobile": ["projects/addon-mobile/index"], "@taiga-ui/addon-mobile/*": ["projects/addon-mobile/*"], - "@taiga-ui/addon-preview": ["projects/addon-preview/index"], - "@taiga-ui/addon-preview/*": ["projects/addon-preview/*"], "@taiga-ui/addon-table": ["projects/addon-table/index"], "@taiga-ui/addon-table/*": ["projects/addon-table/*"], "@taiga-ui/addon-tablebars": ["projects/addon-tablebars/index"],