[AAE 6360] Storybook brand with Alfresco (#7363)

* [AAE-6360] added config and logo files to process cloud and stories lib

* [AAE-6360] fixed build by adding unimplemented methods in form cloud mock service

* [AAE-6360] added config files for core and content services

* [AAE-6360] fixed bimport to correct build content-services storybook
This commit is contained in:
tomgny 2021-11-11 16:56:32 +01:00 committed by GitHub
parent e3204fd6e6
commit 0b24e896fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 98 additions and 2 deletions

View File

@ -0,0 +1,8 @@
import { create } from '@storybook/theming';
export default create({
base: 'light',
brandTitle: 'Hyland | Alfresco Storybook App',
brandUrl: 'https://www.alfresco.com/',
brandImage: '/assets/storybook-logo.png',
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

2
lib/.gitignore vendored
View File

@ -7,6 +7,7 @@ coverage
dist
content-services/**/*.js
!content-services/.storybook/*.js
!content-services/karma.conf.js
content-services/**/*.js.map
content-services/**/*.d.ts
@ -17,6 +18,7 @@ process-services/**/*.js.map
process-services/**/*.d.ts
core/**/*.js
!core/.storybook/*.js
!core/karma.conf.js
core/**/*.js.map
core/**/*.d.ts

View File

@ -0,0 +1,26 @@
const rootMain = require('../../../.storybook/main');
module.exports = {
...rootMain,
core: { ...rootMain.core, builder: 'webpack4' },
stories: [
...rootMain.stories,
'../**/*.stories.@(js|jsx|ts|tsx)'
],
addons: [...rootMain.addons ],
webpackFinal: async (config, { configType }) => {
// apply any global webpack configs that might have been specified in .storybook/main.js
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}
// add your own webpack tweaks if needed
return config;
},
};

View File

@ -0,0 +1,6 @@
import { addons } from '@storybook/addons';
import alfrescoTheme from '../../../.storybook/alfrescoTheme';
addons.setConfig({
theme: alfrescoTheme,
});

View File

@ -0,0 +1,3 @@
export const parameters = {
docs: { inlineStories: true }
}

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { FacetQuery } from '../../../facet-query.interface';
import { FacetQuery } from './facet-query.interface';
import { SearchFilterList } from './search-filter-list.model';
export class ResponseFacetQueryList extends SearchFilterList<FacetQuery> {

View File

@ -0,0 +1,26 @@
const rootMain = require('../../../.storybook/main');
module.exports = {
...rootMain,
core: { ...rootMain.core, builder: 'webpack4' },
stories: [
...rootMain.stories,
'../**/*.stories.@(js|jsx|ts|tsx)'
],
addons: [...rootMain.addons ],
webpackFinal: async (config, { configType }) => {
// apply any global webpack configs that might have been specified in .storybook/main.js
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}
// add your own webpack tweaks if needed
return config;
},
};

View File

@ -0,0 +1,6 @@
import { addons } from '@storybook/addons';
import alfrescoTheme from '../../../.storybook/alfrescoTheme';
addons.setConfig({
theme: alfrescoTheme,
});

View File

@ -0,0 +1,3 @@
export const parameters = {
docs: { inlineStories: true }
}

View File

@ -0,0 +1,6 @@
import { addons } from '@storybook/addons';
import alfrescoTheme from '../../../.storybook/alfrescoTheme';
addons.setConfig({
theme: alfrescoTheme,
});

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { FormModel, FormValues } from '@alfresco/adf-core';
import { FormFieldOption, FormModel, FormValues } from '@alfresco/adf-core';
import { UploadApi } from '@alfresco/js-api';
import { Observable, of } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
@ -96,4 +96,8 @@ export class FormCloudServiceMock implements FormCloudServiceInterface {
parseForm(_json: any, _data?: TaskVariableCloud[], _readOnly: boolean = false): FormModel {
throw new Error('Method not implemented.');
}
getRestWidgetData(_formName: string, _widgetId: string, _body: Map<String, String>): Observable<FormFieldOption[]> {
throw new Error('Method not implemented.');
}
}

View File

@ -0,0 +1,6 @@
import { addons } from '@storybook/addons';
import alfrescoTheme from '../../../.storybook/alfrescoTheme';
addons.setConfig({
theme: alfrescoTheme,
});