From 9b5b88120aa09f36bab3347aefb42371e742180c Mon Sep 17 00:00:00 2001 From: splincode Date: Fri, 15 Dec 2023 14:25:32 +0300 Subject: [PATCH] chore: sync --- .npmrc | 4 ++-- projects/demo/src/app/app.component.ts | 7 +------ projects/demo/src/app/app.routes.ts | 4 ++-- .../pages/embed/html5/examples/1/index.less | 2 +- .../app/pages/embed/html5/examples/1/index.ts | 14 +++++++------- .../app/pages/embed/iframe/examples/1/index.ts | 10 +++++----- .../pages/embed/youtube/examples/1/index.ts | 4 ++-- .../pages/starter/editor-starter.component.ts | 4 ++-- .../app/pages/starter/editor-starter.module.ts | 2 -- .../pages/starter/editor-starter.template.html | 4 ++-- projects/demo/src/index.html | 2 +- projects/demo/src/styles.less | 18 ------------------ 12 files changed, 25 insertions(+), 50 deletions(-) diff --git a/.npmrc b/.npmrc index 5a68a3637..859fd1f8c 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1,5 @@ strict-ssl=false engine-strict=false -ignore-engines=true # Note: ngx-highlightjs Error - Unsupported engine -force=true # Note: cypress-image-snapshot require only cypress 4.x +ignore-engines=true +force=true legacy-peer-deps=true diff --git a/projects/demo/src/app/app.component.ts b/projects/demo/src/app/app.component.ts index d060d7bfd..46e108fd7 100644 --- a/projects/demo/src/app/app.component.ts +++ b/projects/demo/src/app/app.component.ts @@ -8,20 +8,16 @@ import { import {Router} from '@angular/router'; import {LOCAL_STORAGE} from '@ng-web-apis/common'; import {TUI_DOC_PAGE_LOADED} from '@taiga-ui/addon-doc'; -import {TUI_IS_CYPRESS} from '@taiga-ui/cdk'; import pkg from '@tinkoff/tui-editor/package.json'; import {Observable} from 'rxjs'; @Component({ - selector: 'tui-app', + selector: 'app', templateUrl: './app.component.html', styleUrls: ['./app.style.less'], changeDetection: ChangeDetectionStrategy.OnPush, }) export class TuiAppComponent implements OnInit { - @HostBinding('class._is-cypress-mode') - readonly isCypressMode = this.isCypress; - @HostBinding('class._loaded') readonly pageLoadedInit = '0'; @@ -31,7 +27,6 @@ export class TuiAppComponent implements OnInit { version = pkg.version; constructor( - @Inject(TUI_IS_CYPRESS) private readonly isCypress: boolean, @Inject(TUI_DOC_PAGE_LOADED) private readonly pageLoaded$: Observable, @Inject(Router) protected readonly router: Router, @Inject(LOCAL_STORAGE) protected readonly storage: Storage, diff --git a/projects/demo/src/app/app.routes.ts b/projects/demo/src/app/app.routes.ts index 8b45b566a..0a7298f1d 100644 --- a/projects/demo/src/app/app.routes.ts +++ b/projects/demo/src/app/app.routes.ts @@ -236,9 +236,9 @@ export const appRoutes: Routes = [ @NgModule({ imports: [ RouterModule.forRoot(appRoutes, { - initialNavigation: `enabledBlocking`, - relativeLinkResolution: `corrected`, scrollPositionRestoration: `enabled`, + anchorScrolling: `enabled`, + scrollOffset: [0, 64], }), ], exports: [RouterModule], diff --git a/projects/demo/src/app/pages/embed/html5/examples/1/index.less b/projects/demo/src/app/pages/embed/html5/examples/1/index.less index 068c759ce..8e9a5e049 100644 --- a/projects/demo/src/app/pages/embed/html5/examples/1/index.less +++ b/projects/demo/src/app/pages/embed/html5/examples/1/index.less @@ -1,5 +1,5 @@ :host { - &._cypress ::ng-deep { + &._e2e ::ng-deep { //noinspection CssInvalidPseudoSelector video::-webkit-media-controls-current-time-display, video::-webkit-media-controls-time-remaining-display, diff --git a/projects/demo/src/app/pages/embed/html5/examples/1/index.ts b/projects/demo/src/app/pages/embed/html5/examples/1/index.ts index e8bc7226e..64ab5af19 100644 --- a/projects/demo/src/app/pages/embed/html5/examples/1/index.ts +++ b/projects/demo/src/app/pages/embed/html5/examples/1/index.ts @@ -7,7 +7,7 @@ import { } from '@angular/core'; import {FormControl, Validators} from '@angular/forms'; import {DomSanitizer, SafeHtml} from '@angular/platform-browser'; -import {TUI_IS_CYPRESS, tuiPure, tuiTypedFromEvent} from '@taiga-ui/cdk'; +import {TUI_IS_E2E, tuiPure, tuiTypedFromEvent} from '@taiga-ui/cdk'; import { TUI_ATTACH_FILES_LOADER, TUI_ATTACH_FILES_OPTIONS, @@ -93,7 +93,7 @@ import {map} from 'rxjs/operators'; ], host: { class: 'html5-editor-example', - '[class._cypress]': 'isCypress', + '[class._e2e]': 'isE2E', }, }) export class TuiEditorEmbedHtml5Example1 { @@ -111,14 +111,14 @@ export class TuiEditorEmbedHtml5Example1 {

Here is video:

Here is audio:

@@ -129,13 +129,13 @@ export class TuiEditorEmbedHtml5Example1 { ); constructor( - @Inject(TUI_IS_CYPRESS) readonly isCypress: boolean, + @Inject(TUI_IS_E2E) readonly isE2E: boolean, @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer, ) {} @tuiPure - safe(content: string): SafeHtml { - return this.sanitizer.bypassSecurityTrustHtml(content); + safe(content: string | null): SafeHtml { + return this.sanitizer.bypassSecurityTrustHtml(content ?? ''); } attach([file]: Array>): void { diff --git a/projects/demo/src/app/pages/embed/iframe/examples/1/index.ts b/projects/demo/src/app/pages/embed/iframe/examples/1/index.ts index de0fb1300..69f271335 100644 --- a/projects/demo/src/app/pages/embed/iframe/examples/1/index.ts +++ b/projects/demo/src/app/pages/embed/iframe/examples/1/index.ts @@ -1,7 +1,7 @@ import {ChangeDetectionStrategy, Component, Inject, Injector} from '@angular/core'; import {FormControl, Validators} from '@angular/forms'; import {DomSanitizer, SafeHtml} from '@angular/platform-browser'; -import {TUI_IS_CYPRESS, tuiPure} from '@taiga-ui/cdk'; +import {TUI_IS_E2E, tuiPure} from '@taiga-ui/cdk'; import {TUI_EDITOR_EXTENSIONS, TuiEditorTool} from '@tinkoff/tui-editor'; @Component({ @@ -33,7 +33,7 @@ export class TuiEditorEmbedIframeExample1 {

Here is an online IDE: