Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed May 16, 2024
1 parent 619ea9b commit de5b2cb
Show file tree
Hide file tree
Showing 8 changed files with 2,354 additions and 1,110 deletions.
12 changes: 12 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>taiga-family/renovate-config"],
"postUpgradeTasks": {
"commands": [
"echo 'TODO: workaround for https://github.com/npm/cli/issues/7019'",
"rm -rf package-lock.json node_modules **/node_modules",
"npm i",
"echo '------------------'",
"echo 'TODO: workaround for https://github.com/npm/cli/issues/6787#issuecomment-1751005219'",
"npm i"
],
"executionMode": "branch",
"fileFilters": ["package-lock.json"]
},
"packageRules": [
{
"matchUpdateTypes": ["major"],
Expand Down
3 changes: 2 additions & 1 deletion apps/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';
import {RouterOutlet} from '@angular/router';
import {TuiRootModule} from '@taiga-ui/core';
import {TuiEditorModule} from '@tinkoff/tui-editor';

@Component({
standalone: true,
selector: 'app',
imports: [TuiRootModule, RouterOutlet],
imports: [TuiRootModule, RouterOutlet, TuiEditorModule],
templateUrl: './app.component.html',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
16 changes: 14 additions & 2 deletions apps/demo/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type {ApplicationConfig} from '@angular/core';
import {importProvidersFrom} from '@angular/core';
import type {ApplicationConfig, Injector} from '@angular/core';
import {importProvidersFrom, INJECTOR} from '@angular/core';
import {provideClientHydration} from '@angular/platform-browser';
import {provideAnimations} from '@angular/platform-browser/animations';
import {provideRouter} from '@angular/router';
import {TUI_SANITIZER, TuiDialogModule, TuiRootModule} from '@taiga-ui/core';
import {TuiPushModule} from '@taiga-ui/kit';
import {NgDompurifySanitizer} from '@tinkoff/ng-dompurify';
import {TUI_EDITOR_DEFAULT_EXTENSIONS, TUI_EDITOR_EXTENSIONS} from '@tinkoff/tui-editor';

export const appConfig: ApplicationConfig = {
providers: [
Expand All @@ -19,6 +20,17 @@ export const appConfig: ApplicationConfig = {
]),
provideClientHydration(),
importProvidersFrom(TuiRootModule, TuiDialogModule, TuiPushModule),
{
provide: TUI_EDITOR_EXTENSIONS,
deps: [INJECTOR],
useFactory: (injector: Injector) => [
...TUI_EDITOR_DEFAULT_EXTENSIONS,
import('@tinkoff/tui-editor/extensions/image-editor').then(
({tuiCreateImageEditorExtension}) =>
tuiCreateImageEditorExtension({injector}),
),
],
},
{
provide: TUI_SANITIZER,
useClass: NgDompurifySanitizer,
Expand Down
2 changes: 2 additions & 0 deletions apps/demo/src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ <h2 class="title">
</div>
</div>

<tui-editor [tools]="builtInTools">Typing...</tui-editor>

<ng-template
#callTemplate
let-observer
Expand Down
1 change: 1 addition & 0 deletions apps/demo/src/app/home/home.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

.flex {
display: flex;
margin-bottom: 1.5625rem;
}

.date {
Expand Down
3 changes: 3 additions & 0 deletions apps/demo/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
TuiToggleModule,
} from '@taiga-ui/kit';
import {NgDompurifyModule, NgDompurifySanitizer} from '@tinkoff/ng-dompurify';
import {TuiEditorModule, TuiEditorTool} from '@tinkoff/tui-editor';

@Component({
standalone: true,
Expand All @@ -50,6 +51,7 @@ import {NgDompurifyModule, NgDompurifySanitizer} from '@tinkoff/ng-dompurify';
TuiLinkModule,
TuiDropdownModule,
NgDompurifyModule,
TuiEditorModule,
],
templateUrl: './home.component.html',
styleUrls: ['./home.component.less'],
Expand All @@ -61,6 +63,7 @@ export default class HomeComponent {
private readonly dialogs = inject(TuiDialogService);
private readonly cd = inject(ChangeDetectorRef);

protected readonly builtInTools = [TuiEditorTool.Undo, TuiEditorTool.Img];
protected readonly labels = ['New', 'Read', 'Archived', 'Junk'];
protected tags = ['Angular', 'Open source'];
protected date: TuiDay | null = null;
Expand Down
Loading

0 comments on commit de5b2cb

Please sign in to comment.