-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
37 changed files
with
17,741 additions
and
1,237 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,5 @@ testem.log | |
# System files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
*storybook.log |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { StorybookConfig } from '@storybook/angular'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/app/**/*.stories.ts'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
'@chromatic-com/storybook' | ||
], | ||
framework: { | ||
name: '@storybook/angular', | ||
options: {} | ||
}, | ||
docs: { | ||
autodocs: 'tag' | ||
}, | ||
staticDirs: ['../src/assets'] | ||
}; | ||
export default config; |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { provideHttpClient } from '@angular/common/http'; | ||
import { importProvidersFrom } from '@angular/core'; | ||
import { setCompodocJson } from '@storybook/addon-docs/angular'; | ||
import { applicationConfig, type Preview } from '@storybook/angular'; | ||
import docJson from '../documentation.json'; | ||
import { StorybookTranslateModule } from './utils'; | ||
setCompodocJson(docJson); | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i | ||
} | ||
} | ||
}, | ||
decorators: [ | ||
applicationConfig({ | ||
providers: [provideHttpClient(), importProvidersFrom(StorybookTranslateModule)] | ||
}) | ||
] | ||
}; | ||
export default preview; |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// This tsconfig is used by Compodoc to generate the documentation for the project. | ||
// If Compodoc is not used, this file can be deleted. | ||
{ | ||
"extends": "./tsconfig.json", | ||
// Exclude all files that are not needed for documentation generation. | ||
"exclude": ["../src/test.ts", "../src/**/*.spec.ts", "../src/**/*.stories.ts"], | ||
// Please make sure to include all files from which Compodoc should generate documentation. | ||
"include": ["../src/**/*"], | ||
"files": ["./typings.d.ts"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../tsconfig.app.json", | ||
"compilerOptions": { | ||
"types": ["node"], | ||
"allowSyntheticDefaultImports": true, | ||
"resolveJsonModule": true | ||
}, | ||
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"], | ||
"include": ["../src/**/*.stories.*", "./preview.ts"], | ||
"files": ["./typings.d.ts"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module '*.md' { | ||
const content: string; | ||
export default content; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { HttpClient, provideHttpClient } from '@angular/common/http'; | ||
import { LOCALE_ID, NgModule, inject } from '@angular/core'; | ||
import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; | ||
import { TranslateHttpLoader } from '@ngx-translate/http-loader'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
TranslateModule.forRoot({ | ||
loader: { | ||
provide: TranslateLoader, | ||
useFactory: (http: HttpClient) => new TranslateHttpLoader(http, './i18n/', '.json'), | ||
deps: [HttpClient] | ||
} | ||
}) | ||
], | ||
providers: [provideHttpClient(), { provide: LOCALE_ID, useValue: 'en' }], | ||
exports: [TranslateModule] | ||
}) | ||
export class StorybookTranslateModule { | ||
private readonly _translateService = inject(TranslateService); | ||
|
||
public constructor() { | ||
this._translateService.setDefaultLang('en'); | ||
this._translateService.use('en'); | ||
} | ||
} |
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.