mirror of https://github.com/Squidex/squidex.git
committed by
GitHub
11 changed files with 46073 additions and 12262 deletions
@ -0,0 +1,22 @@ |
|||||
|
/* |
||||
|
* Squidex Headless CMS |
||||
|
* |
||||
|
* @license |
||||
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
||||
|
*/ |
||||
|
|
||||
|
module.exports = { |
||||
|
"stories": [ |
||||
|
"../src/**/*.stories.mdx", |
||||
|
"../src/**/*.stories.@(js|jsx|ts|tsx)" |
||||
|
], |
||||
|
"addons": [ |
||||
|
"@storybook/addon-links", |
||||
|
"@storybook/addon-essentials", |
||||
|
"@storybook/addon-interactions" |
||||
|
], |
||||
|
"framework": "@storybook/angular", |
||||
|
"core": { |
||||
|
"builder": "@storybook/builder-webpack5" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
/* |
||||
|
* Squidex Headless CMS |
||||
|
* |
||||
|
* @license |
||||
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
||||
|
*/ |
||||
|
|
||||
|
export const parameters = { |
||||
|
actions: { |
||||
|
argTypesRegex: "^on[A-Z].*" |
||||
|
}, |
||||
|
controls: { |
||||
|
matchers: { |
||||
|
color: /(background|color)$/i, |
||||
|
date: /Date$/, |
||||
|
}, |
||||
|
}, |
||||
|
docs: { |
||||
|
inlineStories: true |
||||
|
}, |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
{ |
||||
|
"extends": "../tsconfig.app.json", |
||||
|
"compilerOptions": { |
||||
|
"types": [ |
||||
|
"node" |
||||
|
], |
||||
|
"allowSyntheticDefaultImports": true |
||||
|
}, |
||||
|
"exclude": [ |
||||
|
"../src/test.ts", |
||||
|
"../src/**/*.spec.ts", |
||||
|
"../projects/**/*.spec.ts" |
||||
|
], |
||||
|
"include": [ |
||||
|
"../src/**/*", |
||||
|
"../projects/**/*" |
||||
|
], |
||||
|
"files": [ |
||||
|
"./typings.d.ts" |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
/* |
||||
|
* Squidex Headless CMS |
||||
|
* |
||||
|
* @license |
||||
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
||||
|
*/ |
||||
|
|
||||
|
declare module '*.md' { |
||||
|
const content: string; |
||||
|
export default content; |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,71 @@ |
|||||
|
/* |
||||
|
* Squidex Headless CMS |
||||
|
* |
||||
|
* @license |
||||
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
||||
|
*/ |
||||
|
|
||||
|
import { moduleMetadata } from '@storybook/angular'; |
||||
|
import { Meta, Story } from '@storybook/angular/types-6-0'; |
||||
|
import { LocalizerService, SqxFrameworkModule, UIOptions } from '@app/framework'; |
||||
|
import { DateTimeEditorComponent } from './date-time-editor.component'; |
||||
|
|
||||
|
const translations = { |
||||
|
'common.date': 'Date', |
||||
|
'common.dateTimeEditor.local': 'Local', |
||||
|
'common.dateTimeEditor.now': 'Now', |
||||
|
'common.dateTimeEditor.today': 'Today', |
||||
|
'common.dateTimeEditor.utc': 'UTC', |
||||
|
'common.time': 'Time', |
||||
|
}; |
||||
|
|
||||
|
export default { |
||||
|
title: 'Framework/DateTimeEditor', |
||||
|
component: DateTimeEditorComponent, |
||||
|
argTypes: { |
||||
|
hideClear: { |
||||
|
control: 'boolean', |
||||
|
}, |
||||
|
hideDateButtons: { |
||||
|
control: 'boolean', |
||||
|
}, |
||||
|
hideDateTimeModeButton: { |
||||
|
control: 'boolean', |
||||
|
}, |
||||
|
mode: { |
||||
|
control: 'radio', |
||||
|
options: [ |
||||
|
'Date', |
||||
|
'DateTime', |
||||
|
], |
||||
|
}, |
||||
|
}, |
||||
|
decorators: [ |
||||
|
moduleMetadata({ |
||||
|
imports: [ |
||||
|
SqxFrameworkModule, |
||||
|
SqxFrameworkModule.forRoot(), |
||||
|
], |
||||
|
providers: [ |
||||
|
{ provide: LocalizerService, useFactory: () => new LocalizerService(translations) }, |
||||
|
{ provide: UIOptions, useFactory: () => new UIOptions({}) }, |
||||
|
], |
||||
|
}), |
||||
|
], |
||||
|
} as Meta; |
||||
|
|
||||
|
const Template: Story<DateTimeEditorComponent> = (args: DateTimeEditorComponent) => ({ |
||||
|
props: args, |
||||
|
}); |
||||
|
|
||||
|
export const Date = Template.bind({}); |
||||
|
|
||||
|
Date.args = { |
||||
|
mode: 'Date', |
||||
|
}; |
||||
|
|
||||
|
export const DateTime = Template.bind({}); |
||||
|
|
||||
|
DateTime.args = { |
||||
|
mode: 'DateTime', |
||||
|
}; |
||||
Loading…
Reference in new issue