Skip to content

Commit

Permalink
chore(demo): drop postfix (#7845)
Browse files Browse the repository at this point in the history
Co-authored-by: taiga-family-bot <taiga-family-bot@users.noreply.github.com>
  • Loading branch information
splincode and taiga-family-bot committed Jun 19, 2024
1 parent 8f09845 commit 679408d
Show file tree
Hide file tree
Showing 243 changed files with 286 additions and 299 deletions.
4 changes: 2 additions & 2 deletions projects/demo/src/main.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {provideServerRendering, ServerModule} from '@angular/platform-server';
import {RESIZE_OBSERVER_SUPPORT} from '@ng-web-apis/resize-observer';
import {UNIVERSAL_PROVIDERS} from '@ng-web-apis/universal';

import {AppComponent} from './modules/app/app.component';
import {App} from './modules/app/app.component';
import {config} from './modules/app/app.config';
import {ServerErrorHandler} from './modules/app/server-error-handler';

Expand All @@ -30,4 +30,4 @@ const serverConfig = mergeApplicationConfig(config, {
});

export default async (): Promise<ApplicationRef> =>
bootstrapApplication(AppComponent, serverConfig);
bootstrapApplication(App, serverConfig);
4 changes: 2 additions & 2 deletions projects/demo/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import {enableProdMode} from '@angular/core';
import {bootstrapApplication} from '@angular/platform-browser';

import {environment} from './environments/environment';
import {AppComponent} from './modules/app/app.component';
import {App} from './modules/app/app.component';
import {config} from './modules/app/app.config';

if (environment.production) {
enableProdMode();
}

bootstrapApplication(AppComponent, config).catch(err => console.error(err));
bootstrapApplication(App, config).catch(err => console.error(err));
10 changes: 5 additions & 5 deletions projects/demo/src/modules/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import {TuiLanguageSwitcherComponent} from '@taiga-ui/addon-doc';
import {TuiSheetModule, TuiTextfieldControllerModule} from '@taiga-ui/legacy';
import {distinctUntilChanged, filter, map} from 'rxjs';

import {CustomHostComponent} from '../customization/portals/examples/1/portal/custom-host.component';
import {CustomHost} from '../customization/portals/examples/1/portal/custom-host.component';
import {AbstractDemoComponent, DEMO_PAGE_LOADED_PROVIDER} from './abstract.app';
import {YaMetrikaService} from './metrika/metrika.service';
import {VersionManagerComponent} from './version-manager/version-manager.component';
import {VersionManager} from './version-manager/version-manager.component';
import {TUI_VERSION_MANAGER_PROVIDERS} from './version-manager/version-manager.providers';

@Component({
Expand All @@ -23,8 +23,8 @@ import {TUI_VERSION_MANAGER_PROVIDERS} from './version-manager/version-manager.p
imports: [
TuiDemo,
TuiLanguageSwitcherComponent,
VersionManagerComponent,
CustomHostComponent,
VersionManager,
CustomHost,
TuiTextfieldControllerModule,
TuiSheetModule,
],
Expand All @@ -38,7 +38,7 @@ import {TUI_VERSION_MANAGER_PROVIDERS} from './version-manager/version-manager.p
TUI_VERSION_MANAGER_PROVIDERS,
],
})
export class AppComponent extends AbstractDemoComponent implements OnInit {
export class App extends AbstractDemoComponent implements OnInit {
private readonly destroyRef = inject(DestroyRef);
private readonly ym = inject(YaMetrikaService);
protected readonly router = inject(Router);
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/modules/app/getting-started/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDemo} from '@demo/utils';
import {tuiCreateToken} from '@taiga-ui/cdk';

import {HomeComponent} from '../home/home.component';
import {Home} from '../home/home.component';

export const TUI_HOME_COMPONENT = tuiCreateToken(HomeComponent);
export const TUI_HOME_COMPONENT = tuiCreateToken(Home);

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ import {TuiRoot} from '@taiga-ui/core';
templateUrl: './app.component.html',
styleUrls: ['./my.component.scss', './my.component.less'],
})
export class AppComponent {}
export class App {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
//...,
styleUrls: ['./my.component.scss', './my.component.less'],
})
export class MyComponent {}
export class Example {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ...
import {NG_EVENT_PLUGINS} from '@taiga-ui/event-plugins';

bootstrapApplication(AppComponent, {
bootstrapApplication(App, {
providers: [
provideAnimations(),
NG_EVENT_PLUGINS,
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/modules/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {TuiAccordion, TuiTabsModule} from '@taiga-ui/kit';
encapsulation,
changeDetection,
})
export class HomeComponent {
export class Home {
protected readonly angularJsonStyles = import(
'./examples/angular-json-styles.md?raw'
);
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/modules/app/logo/logo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {PolymorpheusComponent} from '@taiga-ui/polymorpheus';
styleUrls: ['./logo.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class LogoComponent {
export class Logo {
protected readonly demoRoutes = DemoRoute;
}

export const LOGO_CONTENT = new PolymorpheusComponent(LogoComponent);
export const LOGO_CONTENT = new PolymorpheusComponent(Logo);
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import {tuiSvgOptionsProvider, TUI_SANITIZER} from '@taiga-ui/core';
import {NgDompurifySanitizer} from '@taiga-ui/dompurify';

import {ALL_TAIGA_UI_MODULES} from './@stackblitz/all-taiga-modules';
import {AppComponent} from './app.component';
import {App} from './app.component';

@NgModule({
/**
* Don't use this approach,
* it's a workaround for stackblitz
*/
imports: ALL_TAIGA_UI_MODULES,
declarations: [AppComponent],
bootstrap: [AppComponent],
declarations: [App],
bootstrap: [App],
providers: [
// A workaround because StackBlitz does not support assets
tuiSvgOptionsProvider({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {PolymorpheusComponent} from '@taiga-ui/polymorpheus';
import {TsFileComponentParser, TsFileModuleParser} from '../classes';
import {StackblitzDepsService} from './stackblitz-deps.service';
import {AbstractTuiStackblitzResourcesLoader} from './stackblitz-resources-loader';
import {StackblitzEditButtonComponent} from './starter/stackblitz-edit';
import {StackblitzEditButton} from './starter/stackblitz-edit';
import {
appPrefix,
getAllTaigaUIModulesFile,
Expand All @@ -23,15 +23,15 @@ const APP_COMP_META = {
SELECTOR: 'my-app',
TEMPLATE_URL: './app.component.html',
STYLE_URLS: ['./app.component.less'],
CLASS_NAME: 'AppComponent',
CLASS_NAME: 'App',
} as const;

@Injectable()
export class TuiStackblitzService implements TuiCodeEditor {
private readonly deps = inject(StackblitzDepsService);

public readonly name = 'Stackblitz';
public readonly content = new PolymorpheusComponent(StackblitzEditButtonComponent);
public readonly content = new PolymorpheusComponent(StackblitzEditButton);

public async edit(
component: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import {Component} from '@angular/core';
templateUrl: `./app.component.html`,
styleUrls: [`./app.component.less`],
})
export class AppComponent {}
export class App {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ import {TuiLink} from '@taiga-ui/core';
styleUrls: ['./index.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class StackblitzEditButtonComponent {}
export class StackblitzEditButton {}
2 changes: 1 addition & 1 deletion projects/demo/src/modules/app/styles-info/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import {TuiLink, TuiNotification} from '@taiga-ui/core';
templateUrl: './index.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class StylesInfoComponent {
export class StylesInfo {
protected readonly routes = DemoRoute;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {TUI_VERSIONS_META_OPTIONS} from './versions.constants';
templateUrl: './version-manager.template.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class VersionManagerComponent {
export class VersionManager {
private readonly locationRef = inject(LOCATION);
private readonly router = inject(Router);
protected readonly initialVersion = inject(TUI_SELECTED_VERSION_META);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ import {TuiAccordion} from '@taiga-ui/kit';
],
// ...
})
export class MyComponent {}
export class Example {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import {TuiActionBar} from '@taiga-ui/kit';
],
// ...
})
export class AppComponent {}
export class App {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {switchMap, takeUntil} from 'rxjs';
`,
changeDetection,
})
export class AlertExampleComponent {
export class AlertExample {
protected readonly context =
inject<TuiPopover<TuiAlertOptions<void>, boolean>>(POLYMORPHEUS_CONTEXT);
}
Expand All @@ -42,7 +42,7 @@ export class AlertExampleComponent {
export default class Example {
private readonly alerts = inject(TuiAlertService);
private readonly notification = this.alerts
.open<boolean>(new PolymorpheusComponent(AlertExampleComponent), {
.open<boolean>(new PolymorpheusComponent(AlertExample), {
label: 'Question',
status: 'error',
autoClose: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {switchMap, takeUntil} from 'rxjs';
`,
changeDetection,
})
export class AlertExampleWithDataComponent {
export class AlertExampleWithData {
protected readonly context =
inject<TuiPopover<TuiAlertOptions<number>, number>>(POLYMORPHEUS_CONTEXT);

Expand All @@ -60,7 +60,7 @@ export class AlertExampleWithDataComponent {
export default class Example {
private readonly alerts = inject(TuiAlertService);
private readonly notification = this.alerts
.open<number>(new PolymorpheusComponent(AlertExampleWithDataComponent), {
.open<number>(new PolymorpheusComponent(AlertExampleWithData), {
label: 'Heading is so long that it should be shown in two lines of text',
data: 237,
status: 'warning',
Expand Down
10 changes: 5 additions & 5 deletions projects/demo/src/modules/components/alert/examples/5/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {takeUntil} from 'rxjs';
`,
changeDetection,
})
class CustomLabelComponent {}
class CustomLabel {}

@Component({
standalone: true,
Expand All @@ -37,7 +37,7 @@ class CustomLabelComponent {}
`,
changeDetection,
})
class AlertExampleWithCustomLabelComponent {
class AlertExampleWithCustomLabel {
protected readonly context =
inject<TuiPopover<TuiAlertOptions<unknown>, boolean>>(POLYMORPHEUS_CONTEXT);
}
Expand All @@ -55,7 +55,7 @@ export default class Example {
private readonly alerts = inject(TuiAlertService);

private readonly notification = this.alerts
.open(new PolymorpheusComponent(AlertExampleWithCustomLabelComponent), {
.open(new PolymorpheusComponent(AlertExampleWithCustomLabel), {
label: ({status}) =>
status === 'error'
? 'Error label from function'
Expand All @@ -66,8 +66,8 @@ export default class Example {
.pipe(takeUntil(this.router.events));

private readonly notificationWithCustomLabel = this.alerts
.open(new PolymorpheusComponent(AlertExampleWithCustomLabelComponent), {
label: new PolymorpheusComponent(CustomLabelComponent),
.open(new PolymorpheusComponent(AlertExampleWithCustomLabel), {
label: new PolymorpheusComponent(CustomLabel),
status: 'warning',
autoClose: 0,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {POLYMORPHEUS_CONTEXT} from '@taiga-ui/polymorpheus';

//...

export class NotificationExampleComponent {
export class NotificationExample {
private readonly context: TuiPopover<TuiAlertOptions<boolean>, boolean> = inject(POLYMORPHEUS_CONTEXT);

ok() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ import {tuiNotificationOptionsProvider} from '@taiga-ui/core';
],
// ...
})
export class MyComponent {}
export class Example {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {inject, INJECTOR} from '@angular/core';
import {CustomNotificationComponent} from './custom-notification.component';

//...
export class MyComponent {
export class Example {
constructor() {
//...
inject(TuiAlertService)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {inject} from '@angular/core';

//...

export class MyComponent {
export class Example {
private readonly alerts = inject(TuiAlertService);

constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {TuiAlertService} from '@taiga-ui/core';
//...

export class MyComponent {
export class Example {
private readonly alerts = inject(TuiAlertService);

constructor() {
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/modules/components/alert/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {PolymorpheusContent} from '@taiga-ui/polymorpheus';
import {PolymorpheusComponent} from '@taiga-ui/polymorpheus';
import {switchMap} from 'rxjs';

import {AlertExampleWithDataComponent} from './examples/4';
import {AlertExampleWithData} from './examples/4';

@Component({
standalone: true,
Expand Down Expand Up @@ -78,7 +78,7 @@ export default class Page {
protected closeable = true;

protected readonly component = new PolymorpheusComponent(
AlertExampleWithDataComponent,
AlertExampleWithData,
inject(INJECTOR),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ import {TuiAppBar} from '@taiga-ui/layout';
],
// ...
})
export class MyComponent {}
export class Example {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ import {TuiArcChart} from '@taiga-ui/addon-charts';
],
// ...
})
export class MyComponent {}
export class Example {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import {TuiAvatarModule} from '@taiga-ui/kit';
TuiAvatarModule,
],
})
export class MyComponent {}
export class Example {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ import {TuiAxes} from '@taiga-ui/addon-charts';
],
// ...
})
export class MyComponent {}
export class Example {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import {TuiBadgeNotificationComponent} from '@taiga-ui/kit';
TuiBadgeNotificationComponent,
],
})
export class MyComponent {}
export class Example {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {TuiBadgeNotificationComponent} from '@taiga-ui/kit';
templateUrl: './index.html',
changeDetection,
})
export default class ExampleTuiBadgeNotificationComponent {
export default class Example {
protected readonly sizeVariants: ReadonlyArray<TuiSizeL | TuiSizeXS> = [
'l',
'm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import {TuiBadgeDirective} from '@taiga-ui/kit';
TuiBadgeDirective,
],
})
export class MyComponent {}
export class Example {}
```
Loading

0 comments on commit 679408d

Please sign in to comment.