generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bacfca
commit 6f3ecbe
Showing
26 changed files
with
113 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 5 additions & 10 deletions
15
...s/demo-integrations/src/tests/component-testing/react-async-predicate/angular-wrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
import {isPlatformBrowser} from '@angular/common'; | ||
import {ChangeDetectionStrategy, Component, ElementRef, Inject, PLATFORM_ID} from '@angular/core'; | ||
import {ChangeDetectionStrategy, Component, ElementRef, inject, PLATFORM_ID} from '@angular/core'; | ||
import {createRoot} from 'react-dom/client'; | ||
|
||
import {App} from './react-app'; | ||
|
||
@Component({ | ||
selector: 'test-wrapper', | ||
template: '', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
standalone: true, | ||
}) | ||
@Component({standalone: true, selector: 'test-wrapper', template: '', changeDetection: ChangeDetectionStrategy.OnPush}) | ||
export class TestWrapper { | ||
constructor(elementRef: ElementRef, @Inject(PLATFORM_ID) platformId: Record<string, unknown>) { | ||
if (isPlatformBrowser(platformId)) { | ||
createRoot(elementRef.nativeElement).render(<App />); | ||
constructor() { | ||
if (isPlatformBrowser(inject(PLATFORM_ID))) { | ||
createRoot(inject(ElementRef).nativeElement).render(<App />); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
.../demo/src/pages/frameworks/react/examples/1-use-maskito-basic-usage/example.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import {isPlatformBrowser} from '@angular/common'; | ||
import {Component, ElementRef, Inject, PLATFORM_ID} from '@angular/core'; | ||
import {Component, ElementRef, inject, PLATFORM_ID} from '@angular/core'; | ||
import {createRoot} from 'react-dom/client'; | ||
|
||
import {App} from './use-maskito-basic-usage'; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'react-example-1', | ||
template: '', | ||
host: { | ||
'comment-for-devtools': 'Everything inside this tag is really rendered by `react-dom` library', | ||
}, | ||
standalone: true, | ||
}) | ||
export class ReactExample1 { | ||
constructor(elementRef: ElementRef, @Inject(PLATFORM_ID) platformId: Record<string, unknown>) { | ||
if (isPlatformBrowser(platformId)) { | ||
createRoot(elementRef.nativeElement).render(<App />); | ||
constructor() { | ||
if (isPlatformBrowser(inject(PLATFORM_ID))) { | ||
createRoot(inject(ElementRef).nativeElement).render(<App />); | ||
} | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
...src/pages/frameworks/react/examples/1-use-maskito-basic-usage/use-maskito-basic-usage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
projects/demo/src/pages/frameworks/react/examples/2-element-predicate/awesome-input.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
projects/demo/src/pages/frameworks/react/examples/2-element-predicate/example.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import {isPlatformBrowser} from '@angular/common'; | ||
import {Component, ElementRef, Inject, PLATFORM_ID} from '@angular/core'; | ||
import {Component, ElementRef, inject, PLATFORM_ID} from '@angular/core'; | ||
import {createRoot} from 'react-dom/client'; | ||
|
||
import {App} from './index'; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'react-example-2', | ||
template: '', | ||
host: { | ||
'comment-for-devtools': 'Everything inside this tag is really rendered by `react-dom` library', | ||
}, | ||
standalone: true, | ||
}) | ||
export class ReactExample2 { | ||
constructor(elementRef: ElementRef, @Inject(PLATFORM_ID) platformId: Record<string, unknown>) { | ||
if (isPlatformBrowser(platformId)) { | ||
createRoot(elementRef.nativeElement).render(<App />); | ||
constructor() { | ||
if (isPlatformBrowser(inject(PLATFORM_ID))) { | ||
createRoot(inject(ElementRef).nativeElement).render(<App />); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.