Skip to content

Commit

Permalink
chore(demo): run nx generate @angular/core:standalone (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov authored Jan 11, 2024
1 parent fd13501 commit f5ed7eb
Show file tree
Hide file tree
Showing 116 changed files with 1,123 additions and 141 deletions.
6 changes: 0 additions & 6 deletions projects/demo/src/app/app.browser.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ import {TuiDocMainModule} from '@taiga-ui/addon-doc';
import {TuiLinkModule, TuiModeModule} from '@taiga-ui/core';
import {MarkdownModule} from 'ngx-markdown';

import {StackblitzEditButtonModule} from '../pages/stackblitz';
import {AppComponent} from './app.component';
import {APP_PROVIDERS} from './app.providers';
import {AppRoutingModule} from './app.routes';
import {DocExamplePrimaryTabsIconsModule} from './modules/example-primary-tabs-icons';
import {LogoModule} from './modules/logo/logo.module';

@NgModule({
imports: [
Expand All @@ -21,16 +18,13 @@ import {LogoModule} from './modules/logo/logo.module';
AppRoutingModule,
BrowserAnimationsModule,
HttpClientModule,
LogoModule,
MarkdownModule.forRoot({
loader: HttpClient,
sanitize: SecurityContext.NONE,
}),
TuiDocMainModule,
TuiLinkModule,
TuiModeModule,
StackblitzEditButtonModule,
DocExamplePrimaryTabsIconsModule,
],
declarations: [AppComponent],
providers: APP_PROVIDERS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {TuiSvgModule} from '@taiga-ui/core';
import {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';

@Component({
standalone: true,
selector: 'angular-logo',
imports: [TuiSvgModule],
template: `
<tui-svg src="assets/icons/angular.svg"></tui-svg>
`,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './angular-logo.component';
export * from './doc-example-primary-tabs-icons.module';
export * from './javascript-logo.component';
export * from './react-logo.component';
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {TuiSvgModule} from '@taiga-ui/core';
import {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';

@Component({
standalone: true,
selector: 'javascript-logo',
imports: [TuiSvgModule],
template: `
<tui-svg src="assets/icons/javascript.svg"></tui-svg>
`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {TuiSvgModule} from '@taiga-ui/core';
import {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';

@Component({
standalone: true,
selector: 'react-logo',
imports: [TuiSvgModule],
template: `
<tui-svg src="assets/icons/react.svg"></tui-svg>
`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {TuiSvgModule} from '@taiga-ui/core';
import {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';

@Component({
standalone: true,
selector: 'vue-logo',
imports: [TuiSvgModule],
template: `
<tui-svg src="assets/icons/vue.svg"></tui-svg>
`,
Expand Down
4 changes: 4 additions & 0 deletions projects/demo/src/app/modules/logo/logo.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {RouterLink} from '@angular/router';
import {TuiLinkModule} from '@taiga-ui/core';
import {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';

@Component({
standalone: true,
selector: 'logo',
imports: [TuiLinkModule, RouterLink],
templateUrl: './logo.template.html',
styleUrls: ['./logo.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
12 changes: 0 additions & 12 deletions projects/demo/src/app/modules/logo/logo.module.ts

This file was deleted.

18 changes: 18 additions & 0 deletions projects/demo/src/pages/cypress/cypress.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {TuiDocPageModule} from '@taiga-ui/addon-doc';

import {TestDocExample1} from './examples/1-predicate/component';
import {TestDocExample2} from './examples/2-native-max-length/component';
import {TestDocExample3} from './examples/3-mirrored-prefix-postfix/component';
import {TestDocExample4} from './examples/4-runtime-postfix-changes/component';
import {TestDocExample5} from './examples/5-react-async-predicate/angular-wrapper';
import {TestDocExample6} from './examples/6-multi-character-prefix/component';

@Component({
standalone: true,
selector: 'cypress-doc-page',
imports: [
TuiDocPageModule,
TestDocExample1,
TestDocExample2,
TestDocExample3,
TestDocExample4,
TestDocExample5,
TestDocExample6,
],
templateUrl: './cypress.template.html',
styleUrls: ['./cypress.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
2 changes: 0 additions & 2 deletions projects/demo/src/pages/cypress/cypress.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import {TestDocExample6} from './examples/6-multi-character-prefix/component';
TuiAddonDocModule,
RouterModule.forChild(tuiGenerateRoutes(CypressDocPageComponent)),
TestDocExample4,
],
declarations: [
CypressDocPageComponent,
TestDocExample1,
TestDocExample2,
Expand Down
12 changes: 12 additions & 0 deletions projects/demo/src/pages/cypress/examples/1-predicate/component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MaskitoDirective} from '@maskito/angular';
import {MaskitoElementPredicate, MaskitoOptions} from '@maskito/core';
import {TuiGroupModule} from '@taiga-ui/core';
import {TuiInputModule} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'test-doc-example-1',
imports: [
TuiGroupModule,
MaskitoDirective,
TuiInputModule,
ReactiveFormsModule,
FormsModule,
],
templateUrl: './template.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {MaskitoDirective} from '@maskito/angular';
import {MaskitoOptions} from '@maskito/core';
import {maskitoNumberOptionsGenerator} from '@maskito/kit';

@Component({
standalone: true,
selector: 'test-doc-example-2',
imports: [MaskitoDirective],
template: `
<input
maxlength="3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {MaskitoDirective} from '@maskito/angular';
import {MaskitoOptions} from '@maskito/core';
import {maskitoNumberOptionsGenerator} from '@maskito/kit';

@Component({
standalone: true,
selector: 'test-doc-example-3',
imports: [MaskitoDirective],
template: `
<input
value="$ 100 per day"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {App} from './react-app';
selector: 'test-doc-example-5',
template: '',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
})
export class TestDocExample5 {
constructor(elementRef: ElementRef, @Inject(PLATFORM_ID) platformId: Record<string, unknown>) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {MaskitoDirective} from '@maskito/angular';
import {MaskitoOptions} from '@maskito/core';
import {maskitoNumberOptionsGenerator} from '@maskito/kit';

@Component({
standalone: true,
selector: 'test-doc-example-6',
imports: [MaskitoDirective],
template: `
<input
placeholder="Type 'E', 'U' or 'R' character"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {NgFor, NgIf} from '@angular/common';
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {TuiDocPageModule} from '@taiga-ui/addon-doc';

@Component({
standalone: true,
selector: 'browser-support',
imports: [TuiDocPageModule, NgFor, NgIf],
templateUrl: './browser-support.template.html',
styles: ['td {width: 18.75rem}'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {BrowserSupportComponent} from './browser-support.component';
CommonModule,
TuiAddonDocModule,
RouterModule.forChild(tuiGenerateRoutes(BrowserSupportComponent)),
BrowserSupportComponent,
],
declarations: [BrowserSupportComponent],
exports: [BrowserSupportComponent],
})
export class BrowserSupportModule {}
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import {AsyncPipe} from '@angular/common';
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';
import {tuiRawLoad} from '@taiga-ui/addon-doc';
import {TuiDocPageModule, tuiRawLoad} from '@taiga-ui/addon-doc';
import {MarkdownModule} from 'ngx-markdown';
import {of, switchMap} from 'rxjs';

@Component({
standalone: true,
selector: 'changelog',
imports: [TuiDocPageModule, MarkdownModule, AsyncPipe],
templateUrl: './changelog.template.html',
styleUrls: ['./changelog.style.less'],
encapsulation: ViewEncapsulation.None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {ChangelogComponent} from './changelog.component';
MarkdownModule,
TuiAddonDocModule,
RouterModule.forChild(tuiGenerateRoutes(ChangelogComponent)),
ChangelogComponent,
],
declarations: [ChangelogComponent],
exports: [ChangelogComponent],
})
export class ChangelogModule {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {RouterLink} from '@angular/router';
import {DemoPath} from '@demo/constants';
import {TuiDocCodeModule, TuiDocPageModule} from '@taiga-ui/addon-doc';
import {TuiLinkModule, TuiNotificationModule} from '@taiga-ui/core';
import {TuiIslandModule} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'core-concepts-overview-doc-page',
imports: [
TuiDocPageModule,
TuiLinkModule,
TuiDocCodeModule,
TuiNotificationModule,
TuiIslandModule,
RouterLink,
],
templateUrl: './core-concepts-overview.template.html',
styleUrls: ['./core-concepts-overview.styles.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {CoreConceptsOverviewDocPageComponent} from './core-concepts-overview.com
TuiMarkerIconModule,
TuiNotificationModule,
RouterModule.forChild(tuiGenerateRoutes(CoreConceptsOverviewDocPageComponent)),
CoreConceptsOverviewDocPageComponent,
],
declarations: [CoreConceptsOverviewDocPageComponent],
exports: [CoreConceptsOverviewDocPageComponent],
})
export class CoreConceptsOverviewDocPageModule {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {RouterLink} from '@angular/router';
import {DemoPath} from '@demo/constants';
import {TuiDocCodeModule, TuiDocPageModule} from '@taiga-ui/addon-doc';
import {TuiLinkModule} from '@taiga-ui/core';

@Component({
standalone: true,
selector: 'element-state-doc-page',
imports: [TuiDocPageModule, TuiDocCodeModule, TuiLinkModule, RouterLink],
templateUrl: './element-state.template.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {ElementStateDocPageComponent} from './element-state.component';
TuiAddonDocModule,
TuiLinkModule,
RouterModule.forChild(tuiGenerateRoutes(ElementStateDocPageComponent)),
ElementStateDocPageComponent,
],
declarations: [ElementStateDocPageComponent],
exports: [ElementStateDocPageComponent],
})
export class ElementStateDocPageModule {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {RouterLink} from '@angular/router';
import {DemoPath} from '@demo/constants';
import {TuiDocCodeModule, TuiDocPageModule} from '@taiga-ui/addon-doc';
import {TuiLinkModule, TuiNotificationModule} from '@taiga-ui/core';

import {NextStepsComponent} from '../next-steps/next-steps.component';

@Component({
standalone: true,
selector: 'mask-expression-doc-page',
imports: [
TuiDocPageModule,
TuiLinkModule,
TuiDocCodeModule,
TuiNotificationModule,
RouterLink,
NextStepsComponent,
],
templateUrl: './mask-expression.template.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {RouterModule} from '@angular/router';
import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc';
import {TuiLinkModule, TuiNotificationModule} from '@taiga-ui/core';

import {NextStepsModule} from '../next-steps/next-steps.module';
import {MaskExpressionDocPageComponent} from './mask-expression.component';

@NgModule({
Expand All @@ -13,10 +12,9 @@ import {MaskExpressionDocPageComponent} from './mask-expression.component';
TuiAddonDocModule,
TuiLinkModule,
TuiNotificationModule,
NextStepsModule,
RouterModule.forChild(tuiGenerateRoutes(MaskExpressionDocPageComponent)),
MaskExpressionDocPageComponent,
],
declarations: [MaskExpressionDocPageComponent],
exports: [MaskExpressionDocPageComponent],
})
export class MaskExpressionDocPageModule {}
Loading

0 comments on commit f5ed7eb

Please sign in to comment.