diff --git a/.editorconfig b/.editorconfig index 3a5764abc..6e87a003d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,6 +11,3 @@ trim_trailing_whitespace = true [*.md] max_line_length = off trim_trailing_whitespace = false - -[*.yml] -indent_size = 2 diff --git a/cspell.json b/cspell.json index d8b19aad8..5bfa6a141 100644 --- a/cspell.json +++ b/cspell.json @@ -8,7 +8,6 @@ "Redistributable", "fullscreen", "LGPL", - "Browserstack", "mincount", "QNAME", "PNAME", diff --git a/docs/extending/application-features.md b/docs/extending/application-features.md index c32edd784..d14173740 100644 --- a/docs/extending/application-features.md +++ b/docs/extending/application-features.md @@ -657,40 +657,39 @@ This external plugin disables the initial `exif:exif` aspect already defined in Here is the initial setting from `app.extension.json`: ```json -... - "content-metadata-presets": [ - { - "id": "app.content.metadata.custom", - "custom": [ - { - "id": "app.content.metadata.customGroup", - "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE", - "items": [ - { - "id": "app.content.metadata.exifAspect", - "aspect": "exif:exif", - "properties": [ - "exif:pixelXDimension", - "exif:pixelYDimension", - "exif:dateTimeOriginal", - "exif:exposureTime", - "exif:fNumber", - "exif:flash", - "exif:focalLength", - "exif:isoSpeedRatings", - "exif:orientation", - "exif:manufacturer", - "exif:model", - "exif:software" - ] - } - ] - } - ] - } - ] -... - +{ + "content-metadata-presets": [ + { + "id": "app.content.metadata.custom", + "custom": [ + { + "id": "app.content.metadata.customGroup", + "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE", + "items": [ + { + "id": "app.content.metadata.exifAspect", + "aspect": "exif:exif", + "properties": [ + "exif:pixelXDimension", + "exif:pixelYDimension", + "exif:dateTimeOriginal", + "exif:exposureTime", + "exif:fNumber", + "exif:flash", + "exif:focalLength", + "exif:isoSpeedRatings", + "exif:orientation", + "exif:manufacturer", + "exif:model", + "exif:software" + ] + } + ] + } + ] + } + ] +} ``` **Tip:** In order to allow the content-metadata presets to be extended, the settings from `app.config.json` must be copied to the `app.extensions.json` file and its ids must be added to all the items. diff --git a/docs/extending/custom-extension-loaders.md b/docs/extending/custom-extension-loaders.md index 66fd5098d..841e323c5 100644 --- a/docs/extending/custom-extension-loaders.md +++ b/docs/extending/custom-extension-loaders.md @@ -52,19 +52,15 @@ This registering can be done, using Angular's multi-provider capabilities: import { EXTENSION_DATA_LOADERS } from '@alfresco/aca-shared'; @NgModule({ - imports: [...], - declarations: [...], providers: [ - ... { provide: EXTENSION_DATA_LOADERS, multi: true, useValue: myExtensionLoader - }, - ... - ], + } + ] }) -export class MyExtensionModule { +export class MyExtensionModule {} ``` 1. `MyExtensionModule` is the extension's entry module, which needs to be imported by the extensions.module.ts. diff --git a/docs/extending/extension-format.md b/docs/extending/extension-format.md index cff675e2f..877c8e7d5 100644 --- a/docs/extending/extension-format.md +++ b/docs/extending/extension-format.md @@ -296,13 +296,11 @@ exposed by the application with a custom one coming with the plugin. "create": [ { "id": "app.create.folder", - "disabled": true, - ... + "disabled": true }, { "id": "plugin1.create.folder", - "title": "Create Folder", - ... + "title": "Create Folder" } ] } diff --git a/docs/extending/redistributable-libraries.md b/docs/extending/redistributable-libraries.md index 6c484076f..76699f376 100644 --- a/docs/extending/redistributable-libraries.md +++ b/docs/extending/redistributable-libraries.md @@ -103,8 +103,6 @@ Update the root `package.json` file and append the following entry to the `scrip ```json { "scripts": { - ..., - "build:my-extension": "ng build my-extension && cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst" } @@ -113,7 +111,7 @@ Update the root `package.json` file and append the following entry to the `scrip You can now use that script to build the library and copy assets to the output folder. -**Tip:** It is good practice to provide installation instructions for your library in the `README.md` file. +**Tip:** It is good practice providing installation instructions for your library in the `README.md` file. Be sure to mention that developers should have a build rule to copy your plugin definition file to the `assets/plugins` folder of the main application. ## Publishing library to NPM @@ -174,13 +172,10 @@ Use the following rule if you are installing an extension from NPM: In the main application, edit the `src/app/extensions.module.ts` file and append the module declaration as in the next example: ```typescript -... import { MyExtensionModule } from 'my-extension'; @NgModule({ - ... imports: [ - ..., MyExtensionModule ] }) @@ -194,7 +189,6 @@ Finally, update the `src/assets/app.extensions.json` file and add a reference to ```json { "$references": [ - ..., "my-extension.json" ] } diff --git a/docs/extending/registration.md b/docs/extending/registration.md index 6ef891bb8..bdaf773ff 100644 --- a/docs/extending/registration.md +++ b/docs/extending/registration.md @@ -17,7 +17,7 @@ and use the following snippet to register custom content: import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions'; @NgModule({ - imports: [ ExtensionsModule ] + imports: [ ExtensionsModule ], declarations: [ MyComponent1, MyLayout ] }) export class MyExtensionModule { diff --git a/docs/extending/routes.md b/docs/extending/routes.md index f5bdb1a21..8f5125187 100644 --- a/docs/extending/routes.md +++ b/docs/extending/routes.md @@ -91,16 +91,18 @@ Extensions may register a routes that are children of some existing application Imagine the situation when application has the following route structure: ```ts -{ - path: 'files, - component: FilesComponent, - children: [ - { - path: 'bin', - component: BinComponent, - }, - ], -} +export const APP_ROUTES: Routes = [ + { + path: 'files', + component: FilesComponent, + children: [ + { + path: 'bin', + component: BinComponent, + }, + ], + } +] ``` Within the extension, you can declare a route like: @@ -113,7 +115,7 @@ Within the extension, you can declare a route like: "parentRoute": "files", "path": "my-path", "layout": "app.layout.main", - "component": "your.component.id", + "component": "your.component.id" } ] } diff --git a/docs/extending/tutorials.md b/docs/extending/tutorials.md index b034f21c8..2280faa8b 100644 --- a/docs/extending/tutorials.md +++ b/docs/extending/tutorials.md @@ -192,15 +192,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions'; @Injectable() export class AppEffects { - constructor(...) {} - @Effect({ dispatch: false }) showMyDialog$ = this.actions$.pipe( ofType(SHOW_MY_DIALOG), map(() => {}) ); - - // ... } ``` @@ -216,10 +212,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my @Injectable() export class AppEffects { - constructor( - ..., - private dialog: MatDialog - ) {} + constructor(private dialog: MatDialog) {} @Effect({ dispatch: false }) showMyDialog$ = this.actions$.pipe( @@ -228,9 +221,6 @@ export class AppEffects { this.dialog.open(MyExtensionDialogComponent) }) ); - - ... - } ``` @@ -240,8 +230,6 @@ Update the `src/assets/app.extensions.json` file, and insert a new entry to the ```json { - ..., - "features": { "toolbar": [ { @@ -280,35 +268,35 @@ We need to add the custom route with our entry component and its child route for ```json { - ... - "routes": [{ - "id": "start-process", - "path": "start-process", - "parentRoute": "", - "layout": "app.layout.main", - // The component we register to be our entry point for this particular route - "component": "myplugin.components.start-process", - "children": [ + "routes": [ + { + "id": "start-process", + "path": "start-process", + "parentRoute": "", + "layout": "app.layout.main", + // The component we register to be our entry point for this particular route + "component": "myplugin.components.start-process", + "children": [ { - "id": "start-process-preview", - // It can be accessed on the "/start-process(viewer:preview/nodeId)" route - "path": "preview/:nodeId", - "component": "app.components.preview", - "data": { - // Using history.back() when closing the preview - "navigateBackAsClose": true, - // Disabling complex action and buttons for the preview - "simplestMode": true - }, - // We would like to target that named router outlet which is used for the viewer overlay - "outlet": "viewer" + "id": "start-process-preview", + // It can be accessed on the "/start-process(viewer:preview/nodeId)" route + "path": "preview/:nodeId", + "component": "app.components.preview", + "data": { + // Using history.back() when closing the preview + "navigateBackAsClose": true, + // Disabling complex action and buttons for the preview + "simplestMode": true + }, + // We would like to target that named router outlet which is used for the viewer overlay + "outlet": "viewer" } - ] - }] - ... + ] + } + ] +} ``` - ##### Dispatching the right action within our component to open the file preview ```ts @@ -316,8 +304,6 @@ import { PluginPreviewAction } from '@alfresco/aca-shared/store'; @Component({...}) export class StartProcessComponent { - ... - onFilePreview({ nodeId }) { this.store.dispatch(new PluginPreviewAction('start-process-cloud', nodeId)); } diff --git a/docs/features/file-viewer.md b/docs/features/file-viewer.md index 7497eea6f..45d641391 100644 --- a/docs/features/file-viewer.md +++ b/docs/features/file-viewer.md @@ -75,27 +75,27 @@ export interface ViewNodeExtras { ```typescript // app.routes.ts -... -{ - path: 'custom-path', - children: [ - { - path: '', - component: CustomComponent - }, - { - path: 'view/:nodeId', - outlet: 'viewer', - children: [ - { - path: '', - loadChildren: './components/viewer/viewer.module#AppViewerModule' - } - ] - } - ] -} -... +export const APP_ROUTES: Routes = [ + { + path: 'custom-path', + children: [ + { + path: '', + component: CustomComponent + }, + { + path: 'view/:nodeId', + outlet: 'viewer', + children: [ + { + path: '', + loadChildren: './components/viewer/viewer.module#AppViewerModule' + } + ] + } + ] + } +] ``` ```typescript diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md index 36f1b36a8..8742336a1 100644 --- a/docs/getting-started/configuration.md +++ b/docs/getting-started/configuration.md @@ -20,8 +20,7 @@ The example below demonstrates the most common dynamic format for a development ```json { - "ecmHost": "http://{hostname}{:port}", - ... + "ecmHost": "http://{hostname}{:port}" } ``` @@ -40,8 +39,7 @@ Alternatively, you can provide a static address for the ACS server if necessary: ```json { - "ecmHost": "http://localhost:4200", - ... + "ecmHost": "http://localhost:4200" } ``` @@ -65,7 +63,6 @@ The following block allows you to change the name of the application. ```json { - ..., "application": { "name": "Alfresco Example Content Application" } @@ -111,7 +108,7 @@ You can change the header background image by specifying the path to the corresp ```json { "application": { - "headerImagePath": "assets/images/mastHead-bg-shapesPattern.svg", + "headerImagePath": "assets/images/mastHead-bg-shapesPattern.svg" } } ``` @@ -124,7 +121,6 @@ By default, the application ships with the following rules already predefined: ```json { - ..., "files": { "excluded": [ ".DS_Store", @@ -132,8 +128,7 @@ By default, the application ships with the following rules already predefined: "thumbs.db", ".git" ] - }, - ... + } } ``` @@ -145,15 +140,13 @@ You can change the default settings of the pagination that gets applied to all t ```json { - ..., "pagination": { "supportedPageSizes": [ 25, 50, 100 ] - }, - ... + } } ``` diff --git a/docs/getting-started/internationalization.md b/docs/getting-started/internationalization.md index 348ff80d3..ca0898c40 100644 --- a/docs/getting-started/internationalization.md +++ b/docs/getting-started/internationalization.md @@ -35,7 +35,6 @@ To change the default language set edit the `app.config.json` file and add or re ```json { - ..., "languages": [ { "key": "de", @@ -48,8 +47,7 @@ To change the default language set edit the `app.config.json` file and add or re { "key": "es", "label": "Spanish" - }, - ... + } ] } ``` @@ -75,11 +73,9 @@ You can copy the content over to your newly created file and replace the English "CREATE_FOLDER": "Ordner erstellen", "UPLOAD_FILE": "Datei hochladen", "UPLOAD_FOLDER": "Ordner hochladen" - }, - ... + } } - }, - ... + } } ``` @@ -109,7 +105,6 @@ Modify the `/src/assets/i18n/en.json` file and append the "CORE" section like in ```json { "APP": { - ... }, "CORE": { "FOLDER_DIALOG": { diff --git a/docs/getting-started/navigation.md b/docs/getting-started/navigation.md index b510a685a..8934321ba 100644 --- a/docs/getting-started/navigation.md +++ b/docs/getting-started/navigation.md @@ -22,12 +22,8 @@ Navigation configuration supports array and object like schema. Defining an obje ```json { "navigation": { - "main": [ - ... - ], - "secondary": [ - ... - ] + "main": [], + "secondary": [] } } ``` @@ -37,9 +33,8 @@ Navigation configuration supports array and object like schema. Defining an obje ```json { "navigation": [ - { ... }, - { ... }, - ... + { }, + { } ] } ``` @@ -61,17 +56,17 @@ Navigation configuration supports array and object like schema. Defining an obje To change the `title` and `label` of navigation links edit the values under `BROWSE` entry found at `/src/assets/i18n/en.json` ```json -"APP" : { - ... - "BROWSE": { - "PERSONAL": { - "TITLE": "Personal Files", - "SIDENAV_LINK": { - "LABEL": "Personal Files", - "TOOLTIP": "View your Personal Files" +{ + "APP": { + "BROWSE": { + "PERSONAL": { + "TITLE": "Personal Files", + "SIDENAV_LINK": { + "LABEL": "Personal Files", + "TOOLTIP": "View your Personal Files" + } } - }, - ... + } } } ``` @@ -100,17 +95,12 @@ export class CustomPage { Register the component in ```app.module.ts``` ```javascript +import { CustomPage } from './components/custom-page/custom-page.component'; - ... - import { CustomPage } from './components/custom-page/custom-page.component'; - - @NgModule({ - ... - declarations: [ - ..., - CustomPage - ], - ... +@NgModule({ + declarations: [ + CustomPage + ] }) ``` @@ -119,7 +109,6 @@ In the `app.config.json` define a link entry which will point to the custom page ```json { - ..., "navigation": [ "main": [ ... ], "secondary": [ ... ], @@ -135,14 +124,12 @@ In the `app.config.json` define a link entry which will point to the custom page ] ] } - ``` This can also be declared using ngrx store action: ```json { - ..., "navigation": [ "main": [ ... ], "secondary": [ ... ], @@ -159,29 +146,25 @@ This can also be declared using ngrx store action: ] ] } - ``` Map the `/custom-route` in `app.routes.ts` as a child of `LayoutComponent` definition. ```js +import { CustomPage } from './components/custom-page/custom-page.component.ts'; - import { CustomPage } from './components/custom-page/custom-page.component.ts'; - - ... +export const APP_ROUTES: Routes = [ { path: '', component: LayoutComponent, children: [ - ..., { path: 'custom-route', component: CustomPage } ] } - ..., - +] ``` ![](../images/navigation-03.png) @@ -191,49 +174,48 @@ Map the `/custom-route` in `app.routes.ts` as a child of `LayoutComponent` defin Navigation definition also supports custom components to be dynamically render. The schema for this is as follows: ```json -"navbar": [ - { +{ + "navbar": [ + { "id": "app.navbar.primary", "items": [ - ... - - { - "id": "custom-component", - "component": "custom-menu-item" - } - - ... + { + "id": "custom-component", + "component": "custom-menu-item" + } ] - } -] + } + ] +} ``` Navigation items or group of navigation items can be conditional render based on defined rules. ```json -"navbar": [ - { - "id": "custom-group-1", - "rules": { - "visible": "rule-reference-id" +{ + "navbar": [ + { + "id": "custom-group-1", + "rules": { + "visible": "rule-reference-id" + }, + "items": [] }, - "items": [ ... ] - }, - { - "id": "custom-group-2", - "items": [ + { + "id": "custom-group-2", + "items": [ { "id": "itemId", "rules": { "visible": "rule-reference-id" - }, - ... + } } - ] - } -] + ] + } + ] +} ``` -For more informations about rules checkout [Rules](../extending/rules.md) section. +For more information about rules checkout [Rules](../extending/rules.md) section. For more information about the content of a custom page see [Document List Layout](/features/document-list-layout) section. diff --git a/docs/images/Browserstack-logo.svg b/docs/images/Browserstack-logo.svg deleted file mode 100644 index 195f64d2f..000000000 --- a/docs/images/Browserstack-logo.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - -Browserstack-logo-white - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/index.html b/docs/index.html index 7e9a280eb..6a444ef8d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,10 +3,7 @@ - + Alfresco Content App @@ -16,20 +13,19 @@